{"version":3,"file":"FC_SortButton.bdbx7U4r.mjs","names":["urlParams","products","error","type","active","value","p","matches","props"],"sources":["https:/framerusercontent.com/modules/A55TPw8oJtDToWtsjcDZ/efvR3aKErSMemVA7DBdP/filterMappings.js","https:/framerusercontent.com/modules/Hk0F8C2ru2KtdcLr7KmL/E6WMIzPeV3m14tYvXG7W/FC_CatalogDisplay.js","https:/framerusercontent.com/modules/4w9sJWojogi6mWAJoJH9/yWDuikQSaQQDOJT4sG0Q/FC_SortButton.js"],"sourcesContent":["export const getFilterValue=(property,options)=>{if(property.startsWith(\"variant_\")){return{type:\"variant\",value:{[property]:options.value}};}switch(property){case\"product_type\":case\"product_tag\":case\"collection\":return{type:property,value:options.value};case\"price\":return{type:\"price\",// value: options.price_ranges.map((range: string) => {\n//     const [min, max] = range.split('-').map(Number);\n//     return { min, max };\n// }),\nvalue:options.values.map(value=>{if(value.priceType===\"Under\"){return{min:null,max:value.max}// Handle \"Under\" case\n;}else if(value.priceType===\"Over\"){return{min:value.min,max:null}// Handle \"Over\" case\n;}else{const[min,max]=value.split(\"-\").map(Number);return{min,max}// Handle regular range\n;}})};case\"discount_amount\":return{type:\"discount_amount\",value:options.discount_amount_min?{min:options.discount_amount_min,max:options.discount_amount_max}:options.discount_amount};case\"discount_percent\":return{type:\"discount_percent\",value:options.discount_percent_min?{min:options.discount_percent_min,max:options.discount_percent_max}:options.discount_percent};case\"on_sale\":case\"in_stock\":case\"bundle\":case\"subscription\":return{type:property,value:options.value===\"true\"};default:return{type:property,value:\"\"};}};/**\n * Convert legacy filter names to new format and vice versa\n */export const convertFilterName=(name,toLegacy=false)=>{//console.log('convertFilterName input:', name, 'toLegacy:', toLegacy);\nconst mappings={// New format to legacy format\nproduct_type:\"product-type\",product_tag:\"product-tag\",on_sale:\"on-sale\",in_stock:\"in-stock\",bundle:\"bundles\",subscription:\"subscriptions\"};if(toLegacy){const result=mappings[name]||name;//console.log('convertFilterName output (toLegacy):', result);\nreturn result;}else{// Legacy format to new format\nconst reverseMappings={};Object.entries(mappings).forEach(([key,value])=>{reverseMappings[value]=key;});const result=reverseMappings[name]||name;//console.log('convertFilterName output (fromLegacy):', result);\nreturn result;}};/**\n * Parses URL parameters and converts them into filter state\n *\n * URL format conventions:\n * 1. Between different filter types: Always use AND logic with separate parameters\n *    (e.g., ?product_type=shirts&collection=summer)\n *\n * 2. Within the same filter type:\n *    - For collection, product_type, product_tag: Use comma-separated values for OR logic\n *      (e.g., ?product_type=shirts,pants,jackets means products that are shirts OR pants OR jackets)\n *    - For variant filters:\n *      a) Comma-separated values indicate OR logic\n *         (e.g., ?variant_color=blue,red,green means blue OR red OR green)\n *      b) Repeated parameters indicate AND logic\n *         (e.g., ?variant_color=blue&variant_size=large means blue AND large)\n */export const parseUrlFilters=urlParams=>{console.log(\"Parsing URL filters from:\",urlParams.toString());const filters={collection:{active:false,values:[]},product_type:{active:false,values:[]},product_tag:{active:false,values:[]},variant:{active:false,values:[]},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true}};[\"collection\",\"product_type\",\"product_tag\",\"product-type\",\"product-tag\"].forEach(filterType=>{const value=urlParams.get(filterType);if(value){const normalizedType=convertFilterName(filterType);console.log(`Found filter ${filterType}, normalized to ${normalizedType}:`,value);// Split by comma for OR logic between values\nconst values=value.split(\",\").filter(Boolean);filters[normalizedType].values=values;filters[normalizedType].active=values.length>0;}});// Process variant filters (variant_color, variant_size, etc.)\n// Support both comma-separated values (OR logic) and multiple params with same name (AND logic between different options)\nArray.from(urlParams.keys()).forEach(key=>{if(key.startsWith(\"variant_\")){const variantName=key.replace(\"variant_\",\"\");const value=urlParams.get(key);if(value){// Decode the value first to handle any URL encoding\nconst decodedValue=decodeURIComponent(value);// Log the variant filter values being processed\nconsole.log(`Parsing variant filter ${key}:`,{rawValue:value,decodedValue,isMultiValue:decodedValue.includes(\",\")});// Split by comma for OR logic between values of the same option\nconst values=decodedValue.split(\",\").filter(Boolean);// Each value is an OR option for this variant type\nvalues.forEach(val=>{filters.variant.values.push({name:variantName,value:val.trim()});});console.log(`Found variant filter ${key}:`,{values,orLogic:\"Values within same variant type use OR logic\"});}}});filters.variant.active=filters.variant.values.length>0;// Process price filters\nconst priceRanges=urlParams.get(\"price\");const priceMax=urlParams.get(\"price_max\");const priceMin=urlParams.get(\"price_min\");filters.price={active:false,values:[]};if(priceRanges){// Handle regular price ranges\nconst ranges=priceRanges.split(\",\").map(range=>{const[min,max]=range.split(\"-\").map(Number);return{min,max,priceType:\"Range\"};});filters.price.values.push(...ranges);filters.price.active=true;}if(priceMax){// Handle \"Under\" price ranges\nconst maxValues=priceMax.split(\",\").map(Number);const underRanges=maxValues.map(max=>({min:null,max,priceType:\"Under\"}));filters.price.values.push(...underRanges);filters.price.active=true;}// Handle \"Over\" price ranges\nif(priceMin){const minValues=priceMin.split(\",\").map(Number);minValues.forEach(min=>{filters.price.values.push({min,max:null,priceType:\"Over\"});});filters.price.active=true;}// Process discount filters\nconst discountAmount=urlParams.get(\"discount_amount\");if(discountAmount){const ranges=discountAmount.split(\",\").map(range=>{const[min,max]=range.split(\"-\").map(Number);return{min,max};});filters.discount_amount={active:true,values:ranges};}const discountAmountMin=urlParams.get(\"discount_amount_min\");if(discountAmountMin){const minValues=discountAmountMin.split(\",\").map(Number);if(!filters.discount_amount){filters.discount_amount={active:true,values:[]};}// Add each min value as a range with null max\nminValues.forEach(min=>{filters.discount_amount.values.push({min,max:null});});filters.discount_amount.active=true;}const discountPercent=urlParams.get(\"discount_percent\");if(discountPercent){const ranges=discountPercent.split(\",\").map(range=>{const[min,max]=range.split(\"-\").map(Number);return{min,max};});filters.discount_percent={active:true,values:ranges};}const discountPercentMin=urlParams.get(\"discount_percent_min\");if(discountPercentMin){const minValues=discountPercentMin.split(\",\").map(Number);if(!filters.discount_percent){filters.discount_percent={active:true,values:[]};}// Add each min value as a range with null max\nminValues.forEach(min=>{filters.discount_percent.values.push({min,max:null});});filters.discount_percent.active=true;}[\"on_sale\",\"in_stock\",\"bundle\",\"subscription\"].forEach(filterType=>{const value=urlParams.get(filterType);if(value===\"true\"){filters[filterType]={active:true,value:true};}});return filters;};/**\n * Updates URL parameters based on current filter state\n *\n * URL format conventions:\n * 1. Between different filter types: Always use AND logic with separate parameters\n *\n * 2. Within the same filter type:\n *    - For collection, product_type, product_tag: Use comma-separated values for OR logic\n *    - For variant filters:\n *      a) Group variants by name and use comma-separated values for OR logic within same variant type\n *      b) Different variant types use AND logic with separate parameters\n */export const updateUrlWithFilters=(filters,url)=>{console.log(\"Updating URL with filters:\",filters);// Clear existing filter params\nArray.from(url.searchParams.keys()).filter(key=>key.startsWith(\"variant_\")||[\"product_type\",\"product_tag\",\"collection\",\"price\",\"price_min\",\"price_max\",\"discount_amount\",\"discount_amount_min\",\"discount_percent\",\"discount_percent_min\",\"on_sale\",\"in_stock\",\"bundle\",\"subscription\",// Also include legacy filter names\n    \"product-type\",\"product-tag\",\"on-sale\",\"in-stock\",\"bundles\",\"subscriptions\"].includes(key)).forEach(key=>url.searchParams.delete(key));[\"collection\",\"product_type\",\"product_tag\"].forEach(filterType=>{if(filters[filterType]?.active&&filters[filterType]?.values?.length>0){url.searchParams.set(filterType,filters[filterType].values.join(\",\"));console.log(`Set URL param ${filterType}=`,filters[filterType].values.join(\",\"));}});// Add variant filters\n// Group variant values by name, and each group uses comma-separated values for OR logic\nif(filters.variant?.active&&filters.variant?.values?.length>0){// Group variant values by name\nconst variantGroups={};filters.variant.values.forEach(variant=>{// Use lowercase name for case-insensitive grouping\nconst normalizeName=`variant_${variant.name}`;if(!variantGroups[normalizeName]){variantGroups[normalizeName]=[];}// Avoid adding duplicate values\nif(!variantGroups[normalizeName].some(v=>v.toLowerCase()===variant.value.toLowerCase())){variantGroups[normalizeName].push(variant.value);}});// Add each variant group to URL with comma-separated values (OR logic)\nObject.entries(variantGroups).forEach(([key,values])=>{// Don't encode the values here as URLSearchParams will handle that\nurl.searchParams.set(key,values.join(\",\"));console.log(`Set URL param ${key}=`,values.join(\",\"),\"(OR logic between values)\");});}// Add price filters\nif(filters.price?.active&&filters.price.values?.length>0){// const regularRanges = [];\n// const underMaxValues = [];\n// const overMinValues = [];\nconst regularRanges=[];const underMaxValues=[];const overMinValues=[];filters.price.values.forEach(range=>{if(range.priceType===\"Under\"){underMaxValues.push(range.max);}else if(range.priceType===\"Over\"){overMinValues.push(range.min);}else{regularRanges.push(`${range.min}-${range.max}`);}});if(regularRanges.length>0){url.searchParams.set(\"price\",regularRanges.join(\",\"));}if(underMaxValues.length>0){url.searchParams.set(\"price_max\",underMaxValues.join(\",\"));}if(overMinValues.length>0){url.searchParams.set(\"price_min\",overMinValues.join(\",\"));}}// Add discount filters\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const discountRanges=[];const discountMinValues=[];filters.discount_amount.values.forEach(range=>{if(range.max===null){// This is an \"Over\" type discount\ndiscountMinValues.push(range.min);}else{// This is a regular range\ndiscountRanges.push(`${range.min}-${range.max}`);}});if(discountRanges.length>0){url.searchParams.set(\"discount_amount\",discountRanges.join(\",\"));}if(discountMinValues.length>0){url.searchParams.set(\"discount_amount_min\",discountMinValues.join(\",\"));}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const discountPercentRanges=[];const discountPercentMinValues=[];filters.discount_percent.values.forEach(range=>{if(range.max===null){// This is an \"Over\" type discount\ndiscountPercentMinValues.push(range.min);}else{// This is a regular range\ndiscountPercentRanges.push(`${range.min}-${range.max}`);}});if(discountPercentRanges.length>0){url.searchParams.set(\"discount_percent\",discountPercentRanges.join(\",\"));}if(discountPercentMinValues.length>0){url.searchParams.set(\"discount_percent_min\",discountPercentMinValues.join(\",\"));}}[\"on_sale\",\"in_stock\",\"bundle\",\"subscription\"].forEach(filterType=>{if(filters[filterType]?.active){url.searchParams.set(filterType,\"true\");}});};\nexport const __FramerMetadata__ = {\"exports\":{\"getFilterValue\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"FilterValue\":{\"type\":\"tsType\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"updateUrlWithFilters\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"parseUrlFilters\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"convertFilterName\":{\"type\":\"variable\",\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./filterMappings.map","/*\n * Framer Commerce\n * Confidential and Proprietary - All Rights Reserved\n * Unauthorized use, reproduction, distribution, or disclosure of this\n * source code or any related information is strictly prohibited.\n *\n * This software is the exclusive property of Framer Commerce (\"Company\").\n * It is considered highly confidential and proprietary information.\n *\n * Any use, copying, modification, distribution, or sharing of this software,\n * in whole or in part, without the express written permission of the Company\n * is strictly prohibited and may result in legal action.\n *\n * DISCLAIMER: This software does not provide any express or\n * implied warranties, including, but not limited to, the implied warranties\n * of merchantability and fitness for a particular purpose. In no event shall\n * Framer Commerce be liable for any direct, indirect, incidental, special,\n * exemplary, or consequential damages (including, but not limited to, procurement\n * of substitute goods or services; loss of use, data, or profits; or business\n * interruption) however caused and on any theory of liability, whether in\n * contract, strict liability, or tort (including negligence or otherwise)\n * arising in any way out of the use of this software, even if advised of\n * the possibility of such damage.\n *\n * Any unauthorized possession, use, copying, distribution, or dissemination\n * of this software will be considered a breach of confidentiality and may\n * result in legal action.\n *\n * For inquiries, contact:\n * Framer Commerce\n * Email: hello@framercommerce.com\n *\n * © 2025 Butter Supply Inc. All Rights Reserved.\n */function _define_property(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}import{jsx as _jsx}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType,RenderTarget}from\"framer\";import{debounce}from\"lodash-es\";import{parseUrlFilters,updateUrlWithFilters}from\"https://framerusercontent.com/modules/A55TPw8oJtDToWtsjcDZ/efvR3aKErSMemVA7DBdP/filterMappings.js\";// Global state management to prevent duplicate instances\nconst globalSortState={instances:new Set,eventListeners:new Map,cleanup:()=>{globalSortState.instances.clear();globalSortState.eventListeners.forEach((listener,event)=>{window.removeEventListener(event,listener);});globalSortState.eventListeners.clear();},lastUrl:typeof window!==\"undefined\"?window.location.href:\"\",isBackToFilter:false};// Ensure cleanup on page unload\nif(typeof window!==\"undefined\"){window.addEventListener(\"beforeunload\",globalSortState.cleanup);}// Helper function to find 13-digit number\nfunction findDeep13DigitNumber(obj){if(typeof obj===\"string\"){const match=obj.match(/\\d{12,}/);if(match)return match[0];return null;}if(!obj||typeof obj!==\"object\")return null;for(const key in obj){if(Array.isArray(obj[key])||typeof obj[key]===\"object\"){const found=findDeep13DigitNumber(obj[key]);if(found)return found;}else if(typeof obj[key]===\"string\"){const match=obj[key].match(/\\d{12,}/);if(match)return match[0];}}return null;}class ErrorBoundary extends React.Component{static getDerivedStateFromError(error){return{hasError:true,error};}componentDidCatch(error,errorInfo){console.error(\"CMS Error:\",error,errorInfo);}render(){if(this.state.hasError){return /*#__PURE__*/_jsx(\"div\",{style:{padding:20,color:\"red\"},children:\"Something went wrong loading the CMS content.\"});}// @ts-ignore: TypeScript doesn't recognize props in this context\nreturn this.props.children;}constructor(props){super(props);_define_property(this,\"state\",{hasError:false,error:null});}}// Let's add a helper function for consistent logging\nconst logDebug=(component,action,data)=>{// console.log(`🔍 [${component}] ${action}:`, data)\n};// Helper function to get active search fields based on scope settings\nfunction getActiveSearchFields(scope){const fields=[];if(scope?.title)fields.push(\"title\");if(scope?.productType)fields.push(\"productType\");if(scope?.productTag)fields.push(\"tags\");if(scope?.collection)fields.push(\"collections\");if(scope?.vendor)fields.push(\"vendor\");if(scope?.variants)fields.push(\"variants\");return fields;}/**\n * @framerDisableUnlink\n */export default function FC_CatalogDisplay(props){// State declarations at the top of the component\nconst[isLoading,setIsLoading]=React.useState(true);const[sortedChildren,setSortedChildren]=React.useState(null);const[products,setProducts]=React.useState([]);const[favorites,setFavorites]=React.useState([]);const[isTransitioning,setIsTransitioning]=React.useState(false);const[isSettling,setIsSettling]=React.useState(false);// console.log(\"🚨🚨🚨 COMPONENT MOUNTED 🚨🚨🚨\", {\n//     hasCollection: !!props.Collection,\n//     hasProducts:\n//         typeof window !== \"undefined\" && !!window.shopXtools?.products,\n//     url: typeof window !== \"undefined\" ? window.location.href : null,\n// })\n// Keep a log of component initialization\nlogDebug(\"ProductSort\",\"Component initializing\",{props:Object.keys(props)});const{Collection,pageType,Metafields}=props;const includeMetafields=Metafields?.include||false;const transitionTimeoutRef=React.useRef(null);const settlingTimeoutRef=React.useRef(null);const lastUpdateRef=React.useRef(null);const urlParams=typeof window!==\"undefined\"?new URLSearchParams(window.location.search):new URLSearchParams;// Add pagination state\nconst[currentPage,setCurrentPage]=React.useState(()=>{if(typeof window!==\"undefined\"){const pageParam=urlParams.get(\"page\");return pageParam?parseInt(pageParam):1;}return 1;});const[hasMore,setHasMore]=React.useState(false);const observerRef=React.useRef(null);const loadMoreRef=React.useRef(null);const itemsPerPage=props.Pagination?.items||8;// Add state to maintain full product list\nconst[allProducts,setAllProducts]=React.useState([]);const[displayedProducts,setDisplayedProducts]=React.useState([]);// Add search state\nconst[searchConfig,setSearchConfig]=React.useState(()=>{// Initialize from URL parameter if it exists\nif(typeof window!==\"undefined\"){const urlParams=new URLSearchParams(window.location.search);const searchParam=urlParams.get(\"search\");// console.log(\"🔍 Initializing search from URL:\", {\n//     url: window.location.href,\n//     searchParam,\n//     allParams: Object.fromEntries(urlParams.entries()),\n// })\nif(searchParam){return{term:searchParam,fields:getActiveSearchFields(props.Search?.Scope),active:true};}}return{term:\"\",fields:getActiveSearchFields(props.Search?.Scope),active:false};});// Add effect to update search fields when scope changes\nReact.useEffect(()=>{setSearchConfig(prev=>({...prev,fields:getActiveSearchFields(props.Search?.Scope)}));},[props.Search?.Scope]);// Adjust initial state based on search settings\nReact.useEffect(()=>{if(props.Search.initialSearchState===\"none\"&&props.Search.enableSearch&&!searchConfig.term){// console.log(\"Applying initial 'none' state\")\nsetSortedChildren([])// Start with no products displayed\n;// Disable pagination buttons for both load more and next/prev types because there are no products to display\nsetTimeout(()=>{if(props.Pagination?.type===\"load_more\"){const hasMoreItemsEvent=new CustomEvent(\"hide-loadmore-button\",{detail:{hasMoreItems:false}});document.dispatchEvent(hasMoreItemsEvent);//console.log(\"hide-loadmore-button dispatched (delayed)\", hasMoreItemsEvent);\n}else if(props.Pagination?.type===\"next_prev\"){const updateNextPrevButtonsEvent=new CustomEvent(\"update_next_prev_buttons\",{detail:{hasMoreItems:false,type:props.Pagination?.type,currentPage:1}});document.dispatchEvent(updateNextPrevButtonsEvent);//console.log(\"update_next_prev_buttons dispatched (delayed)\", updateNextPrevButtonsEvent);\n}},100)// 100ms delay to ensure listeners are attached\n;}},[props.Search.initialSearchState,props.Search.enableSearch,searchConfig.term]);// Function to get paginated products\nconst getPaginatedProducts=React.useCallback(products=>{if(!props.Pagination?.enable||!Array.isArray(products))return products;let startIndex,endIndex,paginatedProducts;switch(props.Pagination.type){case\"load_more\":// For Load More, show all items up to current page\nstartIndex=0;endIndex=currentPage*itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreLoadMore=endIndex<products.length;setHasMore(hasMoreLoadMore);// console.log(\"hasMoreLoadMore\", hasMoreLoadMore)\n// console.log(\"products.length\", products?.length)\n// console.log(\"currentPage\", currentPage)\n// console.log(\"itemsPerPage\", itemsPerPage)\n// console.log(\"endIndex\", endIndex)\n// console.log(\"searchConfig.active\", searchConfig.active)\nif(!hasMoreLoadMore){const hasMoreItemsEvent=new CustomEvent(\"hide-loadmore-button\",{detail:{hasMoreItems:hasMoreLoadMore}});document.dispatchEvent(hasMoreItemsEvent);//console.log(\"hide-loadmore-button dispatched\", hasMoreItemsEvent)\n}break;case\"next_prev\":// For Next/Previous, show only current page items\nstartIndex=(currentPage-1)*itemsPerPage;endIndex=startIndex+itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreNextPrev=endIndex<products.length;setHasMore(hasMoreNextPrev);const updateNextPrevButtonsEvent=new CustomEvent(\"update_next_prev_buttons\",{detail:{hasMoreItems:hasMoreNextPrev,type:props.Pagination?.type,currentPage}});document.dispatchEvent(updateNextPrevButtonsEvent);break;case\"infinite\":// For Infinite Scroll, show all items up to current page\nstartIndex=0;endIndex=currentPage*itemsPerPage;paginatedProducts=products.slice(startIndex,endIndex);const hasMoreInfinite=endIndex<products.length;setHasMore(hasMoreInfinite);break;default:return products;}return paginatedProducts;},[currentPage,itemsPerPage,props.Pagination?.enable,props.Pagination?.type]);// Add effect to handle URL pagination parameters\nReact.useEffect(()=>{if(typeof window===\"undefined\"||!props.Pagination?.enable)return;const url=new URL(window.location.href);const urlParams=new URLSearchParams(url.search);// // Update page parameter\n// if (props.Pagination?.enable) {\n//     if (currentPage > 1) {\n//         urlParams.set(\"page\", currentPage.toString())\n//     } else {\n//         urlParams.delete(\"page\")\n//     }\n// } else {\n//     urlParams.delete(\"page\")\n// }\n// // Update URL without triggering a page reload\n// window.history.pushState(\n//     { page: currentPage },\n//     \"\",\n//     url.toString()\n// )\nif(currentPage>1){urlParams.set(\"page\",currentPage.toString());}else{urlParams.delete(\"page\");}const newUrl=`${url.pathname}?${urlParams.toString()}`;if(newUrl!==window.location.pathname+window.location.search){//console.log(\"📌 Pushing new page URL:\", newUrl)\nwindow.history.pushState({page:currentPage},\"\",newUrl);}},[currentPage,props.Pagination?.enable]);// Update the infinite scroll effect\nReact.useEffect(()=>{if(!props.Pagination?.enable||props.Pagination?.type!==\"infinite\"||typeof window===\"undefined\")return;console.log(\"[CMS] Setting up infinite scroll observer\",{hasMore,isLoading,currentPage,loadMoreRefExists:!!loadMoreRef.current});const observer=new IntersectionObserver(entries=>{const target=entries[0];console.log(\"[CMS] Intersection observed:\",{isIntersecting:target.isIntersecting,hasMore,isLoading,currentPage});if(target.isIntersecting&&hasMore&&!isLoading){console.log(\"[CMS] Loading more items, incrementing page\");setCurrentPage(prev=>prev+1);}},{root:null,rootMargin:\"100px\",threshold:.1});if(loadMoreRef.current){console.log(\"[CMS] Observing load more trigger element\");observer.observe(loadMoreRef.current);}return()=>{if(observer){console.log(\"[CMS] Cleaning up observer\");observer.disconnect();}};},[hasMore,props.Pagination?.enable,props.Pagination?.type,isLoading,currentPage]);// Update the sorted children wrapper to include the infinite scroll trigger\nconst updateSortedChildrenWithTransition=newChildren=>{if(!newChildren){console.warn(\"[CMS] Received null/undefined children\");return;}// console.log(\"[CMS] Starting transition update:\", {\n//     totalChildren: newChildren.length,\n//     currentPage,\n//     paginationType: props.Pagination?.type,\n//     hasMore,\n// })\n// Store the full list\nsetAllProducts(newChildren);// Get paginated subset for display\nconst paginatedChildren=getPaginatedProducts(newChildren);//console.log(\"[CMS] hasMore:\", hasMore)\n// Add infinite scroll trigger if needed\nif(props.Pagination?.enable&&props.Pagination?.type===\"infinite\"&&hasMore&&paginatedChildren.length>0){console.log(\"[CMS] Adding infinite scroll trigger\");paginatedChildren.push(/*#__PURE__*/_jsx(\"div\",{ref:loadMoreRef,style:{width:\"100%\",height:\"50px\",gridColumn:\"1 / -1\",opacity:0,pointerEvents:\"none\"}},\"infinite-scroll-trigger\"));}logDebug(\"ProductSort\",\"Updating sorted children with transition\",{totalChildren:newChildren.length,paginatedChildren:paginatedChildren.length,currentPage,isSettling,hasMore});const now=Date.now();if(lastUpdateRef.current&&now-lastUpdateRef.current<100){setIsSettling(true);if(settlingTimeoutRef.current){clearTimeout(settlingTimeoutRef.current);}//console.log(\"[CMS] Delaying transition\")\nsettlingTimeoutRef.current=setTimeout(()=>{setIsSettling(false);setDisplayedProducts(paginatedChildren);performTransition(paginatedChildren);},150);}else{//console.log(\"[CMS] Immediate transition\")\nsetDisplayedProducts(paginatedChildren);performTransition(paginatedChildren);}lastUpdateRef.current=now;};// Add logging for URL parameters\nif(typeof window!==\"undefined\"){logDebug(\"ProductSort\",\"URL parameters on init\",{url:window.location.href,params:Object.fromEntries(urlParams.entries())});}const[sortConfig,setSortConfig]=React.useState(()=>{// First try to get sort from URL parameter\nif(typeof window!==\"undefined\"){const urlParams=new URLSearchParams(window.location.search);const sortParam=urlParams.get(\"sort\");logDebug(\"ProductSort\",\"Sort parameter from URL\",{sortParam});if(sortParam){// Map URL sort parameter to internal sort configuration\nswitch(sortParam){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};}}// Then check session storage\nconst storedSort=sessionStorage.getItem(\"sortBy\");if(storedSort){switch(storedSort){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};}}}// If no URL parameter or session storage, use the default sort from props\nswitch(props.defaultSort){case\"relevance\":return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};case\"title_asc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};case\"title_desc\":return{type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};case\"price_asc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};case\"price_desc\":return{type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};case\"newest\":return{type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};case\"best_selling\":return{type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};default:return{type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};}});const[filters,setFilters]=React.useState(()=>{//console.log(\"props.display for scopes\", props.display)\n// Create the initial filter state based on props\nconst initialFilters={collection:{active:props.display===\"Collection\"&&props.value?true:false,values:props.display===\"Collection\"&&props.value?[props.value]:[]},product_type:{active:props.display===\"Product Type\"&&props.value?true:false,values:props.display===\"Product Type\"&&props.value?[props.value]:[]},product_tag:{active:props.display===\"Product Tag\"&&props.value?true:false,values:props.display===\"Product Tag\"&&props.value?[props.value]:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}};// Log the initial filter state\nlogDebug(\"ProductSort\",\"Initial filter state created\",{display:props.display,value:props.value,filters:initialFilters,activeFilters:Object.entries(initialFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{})});// First try to parse filters directly from URL\nif(typeof window!==\"undefined\"){const url=new URL(window.location.href);logDebug(\"ProductSort\",\"Attempting to parse filters from URL for scopes\",{url:url.toString(),search:url.search});try{const urlFilters=parseUrlFilters(url.searchParams);logDebug(\"ProductSort\",\"Filters parsed from URL for scopes\",urlFilters);if(urlFilters&&Object.keys(urlFilters).length>0){const activeFilters=Object.entries(urlFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{});logDebug(\"ProductSort\",\"Active filters from URL for scopes\",activeFilters);if(Object.keys(activeFilters).length>0){// Merge URL filters with initial scope instead of replacing them\nconst mergedFilters={...initialFilters};logDebug(\"ProductSort\",\"Merged filters from URL for scopes\",mergedFilters);// For each filter type that has an initial scope, ensure it's preserved\nif(props.display===\"Collection\"&&props.value){mergedFilters.collection={active:true,values:[props.value]};}else if(props.display===\"Product Type\"&&props.value){mergedFilters.product_type={active:true,values:[props.value]};}else if(props.display===\"Product Tag\"&&props.value){mergedFilters.product_tag={active:true,values:[props.value]};}// console.log(\"Props - Tag:\", {\n//     active:\n//         props.display === \"Product Tag\" && props.value\n//             ? true\n//             : false,\n//     values:\n//         props.display === \"Product Tag\" && props.value\n//             ? [props.value]\n//             : [],\n// })\n// console.log(\"Props:\", props.display)\n// Then apply URL filters for other filter types\nObject.entries(urlFilters).forEach(([key,filter])=>{if(key===\"collection\"&&props.display===\"Collection\"&&props.value||key===\"product_type\"&&props.display===\"Product Type\"&&props.value||key===\"product_tag\"&&props.display===\"Product Tag\"&&props.value){// Merge values for the scoped filter\nmergedFilters[key]={active:true,values:[...new Set([...mergedFilters[key].values,...filter.values||[]])]};}else{// For non-scoped filters, use the URL filter\nmergedFilters[key]=filter;}});logDebug(\"ProductSort\",\"Merged filters\",mergedFilters);return mergedFilters;}}}catch(error){console.error(\"❌ Error parsing URL filters:\",error);}}// If no URL filters or error, return the initial filters\nreturn initialFilters;});// Memoize event handlers\nconst handleProductsReady=React.useCallback(e=>{logDebug(\"ProductSort\",\"Products ready event received\",{eventType:e.type,shopXToolsAvailable:typeof window!==\"undefined\"&&!!window.shopXtools,shopXProductsCount:typeof window!==\"undefined\"?window.shopXtools?.products?.length:0});// First try to get products from shopXtools\nif(typeof window!==\"undefined\"&&window.shopXtools?.products){// console.log(\"🚨 Setting products from shopXtools 🚨\", {\n//     count: window.shopXtools.products.length,\n//     sample: window.shopXtools.products[0]?.node,\n//     sampleTitle:\n//         window.shopXtools.products[0]?.node?.title ||\n//         \"No title\",\n//     hasNode: !!window.shopXtools.products[0]?.node,\n//     searchConfig: searchConfig,\n//     searchActive: searchConfig.active,\n//     searchTerm: searchConfig.term,\n// })\n// Important: shopXtools.products is already in the correct format with node structure\nsetProducts(window.shopXtools.products);// After setting products, force a re-filter if search is active\nif(searchConfig.active&&searchConfig.term){// console.log(\n//     \"🔍 Active search detected during product load, forcing re-filter\"\n// )\nsetSortedChildren(null);}}else if(Array.isArray(e.detail.products)){// console.log(\"🚨 Setting products from event 🚨\", {\n//     count: e.detail.products.length,\n//     sample: e.detail.products[0],\n//     sampleTitle:\n//         e.detail.products[0]?.node?.title || \"No title\",\n//     hasNode: !!e.detail.products[0]?.node,\n//     searchConfig: searchConfig,\n//     searchActive: searchConfig.active,\n//     searchTerm: searchConfig.term,\n// })\nsetProducts(e.detail.products);// After setting products, force a re-filter if search is active\nif(searchConfig.active&&searchConfig.term){// console.log(\n//     \"🔍 Active search detected during product load, forcing re-filter\"\n// )\nsetSortedChildren(null);}}},[searchConfig]);const handleSortChange=React.useCallback(e=>{setSortConfig(e.detail);setSortedChildren(null)// Reset sorted children to trigger resort\n;},[]);const handleFilterReset=React.useCallback(e=>{// console.log(\"Resetting filters\", e)\n// Check if we should reset to initial scope\nconst shouldResetToInitialScope=e?.detail?.resetToInitialScope===true;// console.log(\n//     \"Should reset to initial scope:\",\n//     shouldResetToInitialScope\n// )\nif(shouldResetToInitialScope){// Create a reset state that respects the initial filter scope\nconst resetFilters={collection:{active:props.display===\"Collection\"&&props.value?true:false,values:props.display===\"Collection\"&&props.value?[props.value]:[]},product_type:{active:props.display===\"Product Type\"&&props.value?true:false,values:props.display===\"Product Type\"&&props.value?[props.value]:[]},product_tag:{active:props.display===\"Product Tag\"&&props.value?true:false,values:props.display===\"Product Tag\"&&props.value?[props.value]:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}};// console.log(\"Resetting to initial filter scope:\", resetFilters)\nsetFilters(resetFilters);}else{// Reset all filters to inactive\nsetFilters({collection:{active:false,values:[]},product_type:{active:false,values:[]},product_tag:{active:false,values:[]},on_sale:{active:false,value:true},in_stock:{active:false,value:true},bundle:{active:false,value:true},subscription:{active:false,value:true},price:{active:false,values:[]},discount_amount:{active:false,values:[]},discount_percent:{active:false,values:[]},variant:{active:false,values:[]}});}setSortedChildren(null)// Reset sorted children to trigger filter reset\n;},[props.display,props.value]);const handleFilter=React.useCallback(e=>{const{type,value,active}=e.detail;// console.log(\n//     \"Received filter event:\",\n//     e?.detail || \"Reset filter event is not receieved\"\n// )\nlogDebug(\"ProductSort\",\"Processing filter event\",{type:e.detail.type,group:e.detail.group,active:e.detail.active,value:e.detail.value,filterType:e.detail.filterType,componentId:e.detail.componentId});// Check if this filter matches the initial filter scope\nconst isInitialFilter=type===\"collection\"&&props.display===\"Collection\"&&props.value===value||type===\"product_type\"&&props.display===\"Product Type\"&&props.value===value||type===\"product_tag\"&&props.display===\"Product Tag\"&&props.value===value;// If this is the initial filter and we're trying to deactivate it, ignore the event\nif(isInitialFilter&&!active){// console.log(\"Ignoring deactivation of initial filter scope\")\nreturn;}// Continue with normal filter handling\nsetFilters(prev=>{const newFilters={...prev};const{type,group,active,value,filterType,variantStockFilter}=e.detail;// console.log(\"Processing filter:\", {\n//     type,\n//     group,\n//     active,\n//     value,\n//     filterType,\n//     variantStockFilter,\n// })\n// Log previous state of this filter\nlogDebug(\"ProductSort\",\"Filter state before update\",{filterType:type,previousState:prev[type]||\"not set\",newActive:active,newValue:value});// Use filterMappings to handle the filter\nif(type.startsWith(\"variant_\")){// Handle dynamic variant filters\nconst variantName=type.replace(\"variant_\",\"\");// Add more comprehensive debugging for variant filters\n// console.log(\"🚨 Processing variant filter:\", {\n//     type,\n//     variantName,\n//     active,\n//     variantStockFilter,\n//     value,\n//     isMultiValue:\n//         typeof value === \"string\" && value.includes(\",\"),\n//     multipleValues:\n//         typeof value === \"string\" && value.includes(\",\")\n//             ? value.split(\",\").filter(Boolean)\n//             : null,\n//     currentVariantValues:\n//         newFilters.variant?.values?.filter(\n//             (v) => v.name === variantName\n//         ) || [],\n//     rawValue: value,\n//     decodedValue:\n//         typeof value === \"string\"\n//             ? decodeURIComponent(value)\n//             : value,\n// })\nif(active){if(!newFilters.variant){newFilters.variant={active:true,values:[],variantStockFilter:variantStockFilter||undefined};}else if(variantStockFilter){newFilters.variant.variantStockFilter=variantStockFilter;}// Check if value is a comma-separated list - support both encoded and decoded commas\n// Both %2C and , should be treated as delimiters\nlet valueToProcess=value;if(typeof value===\"string\"){// First decode the value to handle any URL encoding\nvalueToProcess=decodeURIComponent(value);}if(typeof valueToProcess===\"string\"&&valueToProcess.includes(\",\")){// Handle multiple comma-separated values (OR condition)\nconst variantValues=valueToProcess.split(\",\").filter(Boolean);// console.log(\"Processing multiple variant values:\", {\n//     variantName,\n//     variantValues,\n//     original: valueToProcess,\n// })\n// Add each value as a separate entry\nvariantValues.forEach(val=>{// Check if this value already exists to avoid duplicates\nconst exists=newFilters.variant.values.some(v=>v.name.toLowerCase()===variantName.toLowerCase()&&v.value.toLowerCase()===val.trim().toLowerCase());if(!exists){newFilters.variant.values.push({name:variantName,value:val.trim()});}});}else{// Handle single value\n// Check if this value already exists\nconst exists=newFilters.variant.values.some(v=>v.name.toLowerCase()===variantName.toLowerCase()&&v.value.toLowerCase()===String(valueToProcess).toLowerCase());if(!exists){newFilters.variant.values.push({name:variantName,value:valueToProcess});}}newFilters.variant.active=true;}else{if(newFilters.variant&&newFilters.variant.values){// console.log(\n//     \"[Variant Removal] Initial variant values:\",\n//     newFilters.variant.values\n// )\n// Check if we're removing a comma-separated list - support both encoded and decoded commas\nlet valueToProcess=value;// console.log(\n//     \"[Variant Removal] Value to process\",\n//     valueToProcess\n// )\nif(typeof value===\"string\"){// First decode the value to handle any URL encoding\nvalueToProcess=decodeURIComponent(value);// console.log(\n//     \"[Variant Removal] Value to process (decoded)\",\n//     valueToProcess\n// )\n}if(typeof valueToProcess===\"string\"&&valueToProcess.includes(\",\")){const variantValues=valueToProcess.split(\",\").filter(Boolean);// console.log(\n//     \"[Variant Removal] Comma-separated variant values:\",\n//     variantValues\n// )\n// Remove each value individually (case-insensitive)\nnewFilters.variant.values=newFilters.variant.values.filter(v=>{const nameMatches=v.name.toLowerCase()===variantName.toLowerCase();const valueMatches=v.value.toLowerCase()===String(valueToProcess).toLowerCase();const shouldRemove=nameMatches&&valueMatches;// console.log(\n//     \"[Variant Removal] Checking variant:\",\n//     {\n//         variant: v,\n//         nameMatches,\n//         valueMatches,\n//         shouldRemove,\n//     }\n// )\nreturn!shouldRemove;});}else{// Remove single value (case-insensitive)\nnewFilters.variant.values=newFilters.variant.values.filter(v=>{const nameMatches=v.name.toLowerCase()===variantName.toLowerCase();const valueMatches=v.value.toLowerCase()===String(valueToProcess).toLowerCase();const shouldRemove=nameMatches&&valueMatches;// console.log(\n//     \"[Variant Removal] Checking variant:\",\n//     {\n//         variant: v,\n//         nameMatches,\n//         valueMatches,\n//         shouldRemove,\n//     }\n// )\nreturn!shouldRemove;});}// console.log(\n//     \"[Variant Removal] Updated variant values:\",\n//     newFilters.variant.values\n// )\nnewFilters.variant.active=newFilters.variant.values.length>0;// console.log(\n//     \"[Variant Removal] Variant active state:\",\n//     newFilters.variant.active\n// )\n}}}else{// Handle other filter types\nswitch(type){case\"product_type\":case\"product_tag\":case\"collection\":logDebug(\"ProductSort\",`Processing ${type} filter`,{active,value,currentValues:newFilters[type].values});if(active){newFilters[type].values=[...newFilters[type].values||[],value];}else{newFilters[type].values=newFilters[type].values.filter(v=>v!==value);}newFilters[type].active=newFilters[type].values.length>0;logDebug(\"ProductSort\",`${type} filter updated`,{newActive:newFilters[type].active,newValues:newFilters[type].values});break;case\"price\":if(active){// console.log(\n//     \"🏷️ Processing ACTIVE price filter:\",\n//     {\n//         currentPriceFilter:\n//             newFilters.price.values,\n//         incomingValue: value,\n//     }\n// )\nif(!newFilters.price){newFilters.price={active:active,values:[]};}// Always ensure active state is set when adding ranges\nnewFilters.price.active=active;const newRange=value?.values?.[0];if(newRange){// console.log(\n//     \"🎯 Processing new price range:\",\n//     {\n//         newRange,\n//         priceType: newRange.priceType,\n//         currentRanges:\n//             newFilters.price.values,\n//     }\n// )\n// Format the range based on priceType\nconst formattedRange={priceType:newRange.priceType,min:newRange.priceType===\"Under\"?null:newRange.min,max:newRange.priceType===\"Over\"?null:newRange.max};const rangeExists=newFilters.price.values.some(range=>range.priceType===formattedRange.priceType&&range.min===formattedRange.min&&range.max===formattedRange.max);if(!rangeExists){newFilters.price.values.push(formattedRange);// console.log(\n//     \"✅ Added new price range. Updated ranges:\",\n//     newFilters.price.values\n// )\n}}}else{// console.log(\n//     \"🏷️ Processing INACTIVE price filter:\",\n//     {\n//         currentPriceFilter: newFilters.price,\n//         incomingValue: value,\n//     }\n// )\nif(newFilters.price.active&&newFilters.price.values){// Loop through incoming values and remove them from current filters\nvalue.values?.forEach(valueRange=>{newFilters.price.values=newFilters.price.values.filter(currentRange=>{// Check if the current range matches the incoming range\nconst isMatchingRange=currentRange.priceType===valueRange.priceType&&currentRange.min===valueRange.min&&currentRange.max===valueRange.max;return!isMatchingRange// Remove only the matching range\n;});});}// Update the active state based on remaining ranges\nnewFilters.price.active=newFilters.price.values.length>0;}break;case\"discount_amount\":case\"discount_percent\":const discountType=type;if(!newFilters[discountType]){newFilters[discountType]={active:false,values:[]};}if(active){// Add new discount range\nnewFilters[discountType].values.push(...value.values);}else{// Remove discount range\nnewFilters[discountType].values=newFilters[discountType].values.filter(range=>!value.values.some(v=>v.min===range.min&&v.max===range.max));}// Update active state\nnewFilters[discountType].active=newFilters[discountType].values.length>0;break;case\"on_sale\":case\"in_stock\":case\"bundle\":case\"subscription\":newFilters[type]={active:active,value:true};break;default:console.warn(\"Unhandled filter type:\",type);}}logDebug(\"ProductSort\",\"Updated filters\",{filterType:type,newFilterState:newFilters[type],allActiveFilters:Object.entries(newFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{})});return newFilters;});// Force reset sorted children to trigger re-filter and re-sort\nlogDebug(\"ProductSort\",\"Resetting sorted children to trigger re-filtering\",null);setSortedChildren(null);},[props.display,props.value]);// Add a new handler for search events\nconst handleSearch=React.useCallback(e=>{// Only process search if it's enabled\nif(!props.Search?.enableSearch){return;}setSearchConfig({term:e.detail.term,fields:getActiveSearchFields(props.Search?.Scope),active:!!e.detail.term});setSortedChildren(null);},[props.Search?.enableSearch,props.Search?.Scope]);// Load favorites from localStorage\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const loadFavorites=()=>{const storedFavorites=JSON.parse(localStorage.getItem(\"favorites\")||\"[]\");// console.log(\"Loaded favorites:\", storedFavorites)\nsetFavorites(storedFavorites);};loadFavorites();const handleFavoritesUpdate=e=>{// console.log(\"favorites_updated event\", e.detail)\nconst{favorites:newFavorites,action,productId}=e.detail||{};// Set isTransitioning early to prevent flash\nif(pageType===\"favorites\"&&action===\"remove\"){setIsTransitioning(true);}if(action===\"remove\"&&productId){// console.log(\"Removing from favorites:\", productId)\nsetFavorites(prev=>{const updatedFavorites=prev.filter(id=>id!==productId);// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){// If we have sorted children already, prepare for a smoother transition\nif(sortedChildren&&sortedChildren.length>0){// Filter out the removed product from current view without setting to null\nconst updatedChildren=sortedChildren.filter(child=>{const key=child.key||\"\";return key!==productId;});if(updatedChildren.length>0){performTransition(updatedChildren);}else{// If all items removed, then do a full reset\nsetSortedChildren(null);}}else{setSortedChildren(null);}}return updatedFavorites;});}else if(action===\"add\"&&productId){// console.log(\"Adding to favorites:\", productId)\nsetFavorites(prev=>{const updatedFavorites=[...prev,productId];// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){setSortedChildren(null);}return updatedFavorites;});}else{//(\"Loading favorites with loadFavorites\")\nloadFavorites();// Only retrigger UI if we're in favorites display mode\nif(pageType===\"favorites\"){setSortedChildren(null);}}};document.addEventListener(\"favorites-updated\",handleFavoritesUpdate);return()=>{document.removeEventListener(\"favorites-updated\",handleFavoritesUpdate);};},[pageType,sortedChildren]);// Use global state management for event listeners\nReact.useEffect(()=>{// console.log(\"🚨 Setting up event listeners 🚨\", {\n//     hasShopXTools: typeof window !== \"undefined\" && !!window.shopXtools,\n//     hasProducts:\n//         typeof window !== \"undefined\" && !!window.shopXtools?.products,\n//     productsCount:\n//         typeof window !== \"undefined\"\n//             ? window.shopXtools?.products?.length\n//             : 0,\n// })\n// Use global state management\nglobalSortState.instances.add(\"FC_CatalogDisplay\");// Add event listeners with proper typing\nconst handleProductsReadyEvent=e=>{// console.log(\"🚨 Received data__products-ready event 🚨\", {\n//     hasEventDetail: !!e,\n//     hasProducts: !!(e as any).detail?.products,\n//     productsCount: (e as any).detail?.products?.length || 0,\n// })\nconst customEvent=e;logDebug(\"ProductSort\",\"data__products-ready event received\",{hasProducts:!!customEvent.detail?.products,count:customEvent.detail?.products?.length||0});handleProductsReady(customEvent);};const handleSortChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-sort-change event received\",customEvent.detail);handleSortChange(customEvent);};const handleFilterResetEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"filter-reset for reset event received\",customEvent.detail);handleFilterReset(customEvent);};const handleFilterChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-filter-change event received\",customEvent.detail);handleFilter(customEvent);};const handleSearchChangeEvent=e=>{const customEvent=e;logDebug(\"ProductSort\",\"product-search-change event received\",customEvent.detail);handleSearch(customEvent);};document.addEventListener(\"filter-reset\",handleFilterResetEvent);document.addEventListener(\"data__products-ready\",handleProductsReadyEvent);document.addEventListener(\"product-sort-change\",handleSortChangeEvent);document.addEventListener(\"product-filter-change\",handleFilterChangeEvent);document.addEventListener(\"product-search-change\",handleSearchChangeEvent);// Cleanup\nreturn()=>{globalSortState.instances.delete(\"FC_CatalogDisplay\");document.removeEventListener(\"data__products-ready\",handleProductsReadyEvent);document.removeEventListener(\"product-sort-change\",handleSortChangeEvent);document.removeEventListener(\"product-filter-change\",handleFilterChangeEvent);document.removeEventListener(\"product-search-change\",handleSearchChangeEvent);document.removeEventListener(\"filter-reset\",handleFilterReset);logDebug(\"ProductSort\",\"Event listeners cleaned up\",null);};},[handleProductsReady,handleSortChange,handleFilter,handleSearch,handleFilterReset]);// At the top of your component, add this debug log\nReact.useEffect(()=>{if(products.length>0){// console.log(\"Products data structure:\", {\n//     totalProducts: products.length,\n//     sampleProduct: products[0]?.node,\n//     allFields: products[0]?.node\n//         ? Object.keys(products[0].node)\n//         : [],\n//     allProductTypes: products\n//         .slice(0, 10)\n//         .map((p) => p.node?.productType), // Log first 10 product types\n//     activeFilters: Object.entries(filters)\n//         .filter(([key, filter]: [string, any]) => filter.active)\n//         .reduce(\n//             (acc, [key, filter]: [string, any]) => ({\n//                 ...acc,\n//                 [key]: filter,\n//             }),\n//             {}\n//         ),\n// })\n// Log a specific check for the filter value\nif(filters.product_type?.active){const filterValues=filters.product_type.values;const matchingProducts=products.filter(p=>{const productType=p.node?.productType;if(!productType)return false;return filterValues.some(filterValue=>productType.toLowerCase().includes(filterValue.toLowerCase()));});// console.log(\"Filter match check:\", {\n//     filterValues: filterValues,\n//     totalProducts: products.length,\n//     matchingProductsCount: matchingProducts.length,\n//     sampleMatches: matchingProducts.slice(0, 3).map((p) => ({\n//         title: p.node?.title,\n//         productType: p.node?.productType,\n//     })),\n// })\n}}},[products]);// At the top of your component, add this debug log\n// React.useEffect(() => {\n//     if (products.length > 0) {\n//         console.log(\"🔍 Debugging Product Structure:\", {\n//             firstProduct: products[0]?.node,\n//             hasSellingPlanGroups:\n//                 products[0]?.node?.sellingPlanGroups?.edges?.length > 0,\n//             variants: products[0]?.node?.variants?.edges?.map((edge) => ({\n//                 title: edge.node.title,\n//                 hasSellingPlans:\n//                     edge.node.sellingPlanAllocations?.edges?.length > 0,\n//                 sellingPlans: edge.node.sellingPlanAllocations?.edges,\n//             })),\n//         })\n//     }\n// }, [products])\n// Helper to get product details\nconst getProductDetails=React.useCallback(productId=>{logDebug(\"ProductSort\",\"Looking up product details\",{searchingForId:productId,fullId:`gid://shopify/Product/${productId}`,productsCount:products.length,usingShopXTools:typeof window!==\"undefined\"&&!!window.shopXtools});const fullId=`gid://shopify/Product/${productId}`;let product;// First try to find product in shopXtools\nif(typeof window!==\"undefined\"&&window.shopXtools?.products){product=window.shopXtools.products.find(({node})=>node.id===fullId)?.node;if(product){logDebug(\"ProductSort\",\"Found product in shopXtools\",{id:product.id,title:product.title});}}// Fall back to products state if not found in shopXtools\nif(!product){product=products.find(({node})=>node.id===fullId)?.node;}if(product){logDebug(\"ProductSort\",\"Raw product data found\",{id:product.id,title:product.title,rawProductType:product.productType,rawTags:product.tags,rawCollections:product.collections,fromShopXTools:!!window.shopXtools});return{id:product.id,title:product.title||\"\",price:product.priceRange?.minVariantPrice?.amount?parseFloat(product.priceRange.minVariantPrice.amount):0,productType:product.productType||\"\",tags:product.tags||[],compareAtPrice:product.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(product.compareAtPriceRange.minVariantPrice.amount):0,isOnSale:product.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(product.compareAtPriceRange.minVariantPrice.amount)>parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\"):false,collections:Array.isArray(product.collections)?product.collections.map(c=>c.title):[],options:product.options||[],variants:product.variants?.edges||[],sellingPlanGroups:product.sellingPlanGroups?.edges||[],hasProductLevelPlans:product.sellingPlanGroups?.edges?.length>0,hasVariantLevelPlans:product.variants?.edges?.some(edge=>edge.node.sellingPlanAllocations?.edges?.length>0)};}logDebug(\"ProductSort\",\"Product not found in any source\",{searchId:productId});return{id:\"\",title:\"\",price:0,productType:\"\",tags:[],compareAtPrice:0,isOnSale:false,collections:[],options:[],variants:[],sellingPlanGroups:[],hasProductLevelPlans:false,hasVariantLevelPlans:false};},[products]);// Helper function to perform the actual transition\nconst performTransition=newChildren=>{logDebug(\"ProductSort\",\"Performing transition\",{childrenCount:newChildren?newChildren.length:0});if(transitionTimeoutRef.current){clearTimeout(transitionTimeoutRef.current);}setIsTransitioning(true);// Directly set sorted children without fade out\nsetSortedChildren(newChildren);setTimeout(()=>{setIsTransitioning(false);setIsSettling(false);},200)// Fade in duration\n;};// Cleanup timeouts\nReact.useEffect(()=>{return()=>{if(transitionTimeoutRef.current){clearTimeout(transitionTimeoutRef.current);}if(settlingTimeoutRef.current){clearTimeout(settlingTimeoutRef.current);}};},[]);// Add a debug log to show which filters are active when filtering products\n// After the getProductDetails function, add this useEffect for debugging\n// React.useEffect(() => {\n//     console.log(\n//         \"Active filters:\",\n//         Object.entries(filters)\n//             .filter(([key, filter]: [string, any]) => filter.active)\n//             .reduce(\n//                 (acc, [key, filter]: [string, any]) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             )\n//     )\n// }, [filters])\n// Add this function to check if a product matches the filters\nconst productMatchesFilters=React.useCallback(product=>{/**\n             * Determines if a product matches all active filters\n             * Returns details about which filters matched or failed\n             */const filterResults={};// Log active filters at the beginning\nconst activeFilters={search:searchConfig.active?{term:searchConfig.term,fields:searchConfig.fields}:null,collection:filters.collection?.active?{values:filters.collection.values}:null,product_type:filters.product_type?.active?{values:filters.product_type.values}:null,product_tag:filters.product_tag?.active?{values:filters.product_tag.values}:null,price:filters.price?.active?{values:filters.price.values}:null,on_sale:filters.on_sale?.active||null,in_stock:filters.in_stock?.active||null,bundle:filters.bundle?.active||null,subscription:filters.subscription?.active||null,variant:filters.variant?.active?{values:filters.variant.values}:null,discount_amount:filters.discount_amount?.active?{values:filters.discount_amount.values}:null,discount_percent:filters.discount_percent?.active?{values:filters.discount_percent.values}:null};// console.log(\"Active filters (line 1128):\", activeFilters)\n// Only log if we have any active filters\nif(Object.values(activeFilters).some(v=>v!==null)){// console.log(\n//     `🔍 FILTERING PRODUCT \"${product.title}\" with active filters:`,\n//     Object.fromEntries(\n//         Object.entries(activeFilters).filter(\n//             ([_, v]) => v !== null\n//         )\n//     )\n// )\n}// ---- SEARCH TERM FILTER ----\nif(searchConfig.active&&searchConfig.term&&props.Search?.enableSearch){const searchTerm=searchConfig.term.toLowerCase();let matches=false;// Add debug log for search filtering\n// console.log(\"🔍 FILTERING PRODUCT by search term\", {\n//     productTitle: product.title,\n//     searchTerm: searchTerm,\n//     searchFields: searchConfig.fields,\n//     searchConfig: searchConfig\n// })\n// Map search fields to shopX product structure\nfor(const field of searchConfig.fields){// console.log(`🔍 Checking search field:`, {\n//     field,\n//     searchTerm,\n//     productTitle: product.title\n// });\nswitch(field){case\"variants\":// Search through variant values with proper null checks\nif(product?.variants?.edges&&Array.isArray(product.variants.edges))try{// First check variant colors\nconst variantMatches=product.variants.edges.some(edge=>{if(!edge?.node?.selectedOptions||!Array.isArray(edge.node.selectedOptions)){return false;}return edge.node.selectedOptions.some(option=>{return option?.value&&typeof option.value===\"string\"&&option.value.toLowerCase().includes(searchTerm);});});// Search all custom.fc_* metafields for the search term\nlet metafieldMatches=false;if(includeMetafields&&product?.metafields&&Array.isArray(product.metafields)){metafieldMatches=product.metafields.some(mf=>{if(mf&&mf.namespace===\"custom\"&&mf.key.startsWith(\"fc_\")&&typeof mf.value===\"string\"){let values=[];try{const parsed=JSON.parse(mf.value);if(Array.isArray(parsed)){values=parsed.map(v=>v.toLowerCase());}else if(typeof parsed===\"string\"){values=[parsed.toLowerCase()];}}catch{values=[mf.value.toLowerCase()];}return values.some(val=>val.includes(searchTerm));}return false;});}matches=matches||variantMatches||metafieldMatches;if(matches){// console.log(`🎯 Final match found for \"${product.title}\"`, {\n//     variantMatches,\n//     metafieldMatches\n// })\n}}catch(error){console.error(\"Error searching variants and custom color:\",error);return false;}break;case\"title\":// Product title is directly accessible on the product object\nif(product.title){const titleMatches=product.title.toLowerCase().includes(searchTerm);if(titleMatches){// Only log matches to reduce console noise\nconsole.log(`🎯 Title match: \"${product.title}\" includes \"${searchTerm}\"`);}matches=matches||titleMatches;}else{// console.log(\n//     `⚠️ Product has no title property:`,\n//     product\n// )\n}break;case\"productType\":// Product type is under productType\nif(product.productType){const typeMatches=product.productType.toLowerCase().includes(searchTerm);if(typeMatches){// console.log(\n//     `🎯 Product Type match: \"${product.productType}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||typeMatches;}break;case\"tags\":// Tags are in an array\nif(Array.isArray(product.tags)){const tagMatches=product.tags.some(tag=>tag&&tag.toLowerCase().includes(searchTerm));if(tagMatches){// console.log(\n//     `🎯 Tag match: \"${product.tags.join(\", \")}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||tagMatches;}break;case\"collections\":// Collections are in an array\nif(Array.isArray(product.collections)){const collectionMatches=product.collections.some(collection=>{const collectionTitle=collection?.title||collection;return typeof collectionTitle===\"string\"&&collectionTitle.toLowerCase().includes(searchTerm);});if(collectionMatches){// console.log(\n//     `🎯 Collection match: \"${product.collections\n//         .map((c) => c?.title || c)\n//         .filter(Boolean)\n//         .join(\n//             \", \"\n//         )}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||collectionMatches;}break;case\"vendor\":// Vendor is under product.vendor\nif(product.vendor){const vendorMatches=product.vendor.toLowerCase().includes(searchTerm);if(vendorMatches){// console.log(\n//     `🎯 Vendor match: \"${product.vendor}\" includes \"${searchTerm}\"`\n// )\n}matches=matches||vendorMatches;}break;}// If we found a match, no need to check other fields\nif(matches)break;}filterResults.search={active:true,term:searchConfig.term,matches};// If search is active but we don't match, return early\nif(!matches){return{matches:false,filterResults};}}// ----- COLLECTION FILTER -----\nif(filters.collection?.active&&filters.collection.values?.length>0){const collectionValues=filters.collection.values;let matches=false;// Get the collection titles from the new nested structure\nconst productCollections=product.collections.map(collection=>collection.node?.title||collection.node?.handle||collection);// Use OR logic (some) for collections if not scoped to collections\n// Use AND logic (every) only if scoped to collections\nif(props.display===\"Collection\"){matches=collectionValues.every(collectionValue=>productCollections.includes(collectionValue));}else{matches=collectionValues.some(collectionValue=>productCollections.includes(collectionValue));}filterResults.collection={active:true,values:collectionValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRODUCT TYPE FILTER -----\nif(filters.product_type?.active&&filters.product_type.values?.length>0){const productTypeValues=filters.product_type.values;let matches=false;if(product.productType){// Use OR logic (some) for product types if not scoped to product types\n// Use AND logic (every) only if scoped to product types\nif(props.display===\"Product Type\"){matches=productTypeValues.every(type=>product.productType.toLowerCase().includes(type.toLowerCase()));}else{matches=productTypeValues.some(type=>product.productType.toLowerCase().includes(type.toLowerCase()));}}filterResults.product_type={active:true,values:productTypeValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRODUCT TAG FILTER -----\nif(filters.product_tag?.active&&filters.product_tag.values?.length>0){const tagValues=filters.product_tag.values;let matches=false;if(Array.isArray(product.tags)){// Use OR logic (some) for tags if not scoped to tags\n// Use AND logic (every) only if scoped to tags\nif(props.display===\"Product Tag\"){matches=tagValues.every(tagValue=>product.tags.some(tag=>tag.toLowerCase().includes(tagValue.toLowerCase())));}else{matches=tagValues.some(tagValue=>product.tags.some(tag=>tag.toLowerCase().includes(tagValue.toLowerCase())));}}filterResults.product_tag={active:true,values:tagValues,matches};if(!matches){return{matches:false,filterResults};}}// ----- PRICE FILTER -----\nif(filters.price?.active&&filters.price.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");let matches=false;// Check if product matches any of the active price ranges\nmatches=filters.price.values.some(range=>{if(range.min===null){// Handle \"Under\" price range\nreturn productPrice<=range.max;}else if(range.max===null){// Handle \"Over\" price range\nreturn productPrice>=range.min;}else{// Handle regular price range\nreturn productPrice>=range.min&&productPrice<=range.max;}});filterResults.price={active:true,values:filters.price.values,productPrice,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- DISCOUNT FILTER -----\nif(filters.discount_amount?.active&&filters.discount_amount.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountAmount=compareAtPrice>productPrice?compareAtPrice-productPrice:0;let matches=false;// console.log(\"🔍 Checking discount amount:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountAmount,\n//     ranges: filters.discount_amount.values,\n// })\n// Check if product matches any of the active discount ranges\nmatches=filters.discount_amount.values.some(range=>{if(range.min===null){// Handle \"Under\" discount range\nreturn discountAmount<=range.max;}else if(range.max===null){// Handle \"Over\" discount range\nreturn discountAmount>=range.min;}else{// Handle regular discount range\nreturn discountAmount>=range.min&&discountAmount<=range.max;}});filterResults.discount_amount={active:true,values:filters.discount_amount.values,discountAmount,matches};if(!matches){return{matches:false,filterResults};}}if(filters.discount_percent?.active&&filters.discount_percent.values?.length>0){const productPrice=parseFloat(product.priceRange?.minVariantPrice?.amount||\"0\");const compareAtPrice=parseFloat(product.compareAtPriceRange?.minVariantPrice?.amount||\"0\");const discountPercent=compareAtPrice>productPrice?(compareAtPrice-productPrice)/compareAtPrice*100:0;let matches=false;// console.log(\"🔍 Checking discount percent:\", {\n//     productPrice,\n//     compareAtPrice,\n//     discountPercent,\n//     ranges: filters.discount_percent.values,\n// })\n// Check if product matches any of the active discount percentage ranges\nmatches=filters.discount_percent.values.some(range=>{if(range.min===null){// Handle \"Under\" discount percentage range\nreturn discountPercent<=range.max;}else if(range.max===null){// Handle \"Over\" discount percentage range\nreturn discountPercent>=range.min;}else{// Handle regular discount percentage range\nreturn discountPercent>=range.min&&discountPercent<=range.max;}});filterResults.discount_percent={active:true,values:filters.discount_percent.values,discountPercent,matches};if(!matches){return{matches:false,filterResults};}}// ----- ON SALE FILTER -----\nif(filters.on_sale?.active){let matches=false;if(product.compareAtPriceRange?.minVariantPrice?.amount&&product.priceRange?.minVariantPrice?.amount){const comparePrice=parseFloat(product.compareAtPriceRange.minVariantPrice.amount);const price=parseFloat(product.priceRange.minVariantPrice.amount);matches=comparePrice>price;}filterResults.on_sale={active:true,matches};if(!matches){return{matches:false,filterResults};}}// ----- IN STOCK FILTER -----\nif(filters.in_stock?.active){let matches=false;// Check if any variant is available for sale\nif(product.variants?.edges?.some(edge=>edge.node.availableForSale)){matches=true;}filterResults.in_stock={active:true,matches};if(!matches){return{matches:false,filterResults};}}// ----- SUBSCRIPTION FILTER -----\nif(filters.subscription?.active){let matches=false;const sellingPlanGroups=product.sellingPlanGroups?.edges||[];// Check if the product has subscription plans\nif(sellingPlanGroups&&product.sellingPlanGroups?.edges?.length>0){matches=true;}// Check for variant-level subscription plans\nif(product.variants?.edges?.some(edge=>edge.node.sellingPlanAllocations?.edges?.length>0)){matches=true;}filterResults.subscription={active:true,matches};// console.log(\n//     \"filterResults.subscription\",\n//     filterResults.subscription\n// )\nif(!matches){return{matches:false,filterResults};}}// ----- VARIANT FILTER -----\nif(filters.variant?.active&&filters.variant.values?.length>0){const variantFilters=filters.variant.values;let matches=false;// Check if any variant matches the filter criteria\nif(product.variants?.edges){// Add detailed logging for variant filtering\n// console.log(\n//     `🔍 VARIANT FILTERING: Checking product \"${product.title}\" variants against filter:`,\n//     {\n//         filterCriteria: variantFilters.map((filter) => ({\n//             name: filter.name,\n//             value: filter.value,\n//         })),\n//         hasVariants: product.variants.edges.length > 0,\n//         variantCount: product.variants.edges.length,\n//     }\n// )\n// First check variant options\nmatches=product.variants.edges.some(edge=>{const variant=edge.node;if(!variant.selectedOptions){// console.log(\n//     `⚠️ Variant has no selectedOptions:`,\n//     variant\n// )\nreturn false;}// Optional stock filter for variant match\nconst shouldCheckStock=filters.variant?.variantStockFilter===\"in_stock\";const isAvailable=variant.availableForSale;if(shouldCheckStock&&!isAvailable){return false// Skip this variant if it's not available\n;}// Log variant options for debugging\n// console.log(`👉 Checking variant:`, {\n//     variantOptions: variant.selectedOptions.map(\n//         (opt) => `${opt.name}: ${opt.value}`\n//     ),\n//     filterValues: variantFilters.map(\n//         (f) => `${f.name}: ${f.value}`\n//     ),\n// })\n// Group filters by variant name (e.g., Color, Size)\n// For OR logic within same variant type, we need to group filters by name\nconst variantFiltersByName={};variantFilters.forEach(filter=>{if(!variantFiltersByName[filter.name]){variantFiltersByName[filter.name]=[];}variantFiltersByName[filter.name].push(filter.value);});// Log grouped filters\n// console.log(\n//     `🔍 Grouped variant filters:`,\n//     variantFiltersByName\n// )\n// A variant matches if it satisfies at least one value from each variant type\n// (AND between different variant types, OR between values of same type)\nconst matchesByType=Object.entries(variantFiltersByName).map(([name,values])=>{// Find the option that matches the filter name\nconst matchingOption=variant.selectedOptions.find(option=>option.name.toLowerCase()===name.toLowerCase());if(!matchingOption){// console.log(\n//     `❌ No matching option found for ${name}`\n// )\nreturn false;}// Check if the option value matches any of the filter values (case-insensitive)\nconst valueMatches=values.some(value=>matchingOption.value.toLowerCase()===value.toLowerCase());// console.log(\n//     `${valueMatches ? \"✅\" : \"❌\"} ${name} = ${matchingOption.value}`,\n//     {\n//         acceptableValues: values,\n//         matches: valueMatches,\n//     }\n// )\nreturn valueMatches;});// True if ALL filter types have at least one matching value\nconst allTypesMatch=matchesByType.every(matches=>matches);// console.log(\n//     `${allTypesMatch ? \"✅\" : \"❌\"} Overall match result: ${allTypesMatch}`\n// )\nreturn allTypesMatch;});// If no variant matches and we're looking for a color, check custom metadata\nif(includeMetafields&&product.metafields&&Array.isArray(product.metafields)){variantFilters.forEach(filter=>{const metafieldKey=`fc_${filter.name.toLowerCase()}`;const metafield=product.metafields.find(mf=>mf&&mf.namespace===\"custom\"&&mf.key===metafieldKey&&typeof mf.value===\"string\");if(metafield){let values=[];try{// Try to parse as JSON array\nconst parsed=JSON.parse(metafield.value);if(Array.isArray(parsed)){values=parsed.map(v=>v.toLowerCase());}else if(typeof parsed===\"string\"){values=[parsed.toLowerCase()];}}catch{// If not JSON, treat as a single string value\nvalues=[metafield.value.toLowerCase()];}if(values.length>0&&filter.value){if(values.includes(filter.value.toLowerCase())){matches=true;}}}});}}filterResults.variant={active:true,values:variantFilters,matches};if(!matches){return{matches:false,filterResults};}}// Log final result\nconsole.log(`🔍 FILTER RESULT for \"${product.title}\": ${JSON.stringify({matches:true,filterResults})}`);// All tests passed\nreturn{matches:true,filterResults};},[filters,searchConfig]);// Add this after the handleFilter useCallback\nReact.useEffect(()=>{// console.log(\"🚨 Search state 🚨\", {\n//     sortedChildren: sortedChildren,\n//     sortedChildrenCount: sortedChildren ? sortedChildren.length : 0,\n//     searchConfig: searchConfig,\n//     paginationType: props.Pagination.type,\n//     enableSearch: props.Search.enableSearch,\n//     initialSearchState: props.Search.initialSearchState,\n// })\n// Dispatch product-search-results event when filtered products change\nif(sortedChildren&&searchConfig.active||!searchConfig.active){const shouldShowCustomInitial=props.Search?.enableSearch&&props.Search?.initialSearchState===\"custom\"&&!searchConfig.term;const searchResultsEvent=new CustomEvent(\"product-search-results\",{detail:{count:shouldShowCustomInitial?0:sortedChildren?sortedChildren.length:products.length,term:searchConfig.term||\"\"}});document.dispatchEvent(searchResultsEvent);//console.log(\"product-search-results dispatched\", searchResultsEvent);\nconst hasMoreLoadMore=sortedChildren?.length>0;setHasMore(hasMoreLoadMore);if(props.Pagination.type===\"load_more\"){const hasMoreItemsEvent=new CustomEvent(\"hide-loadmore-button\",{detail:{hasMoreItems:hasMoreLoadMore}});document.dispatchEvent(hasMoreItemsEvent);console.log(\"hide-loadmore-button dispatched\",hasMoreItemsEvent);}if(props.Pagination.type===\"next_prev\"){const updateNextPrevButtonsEvent=new CustomEvent(\"update_next_prev_buttons\",{detail:{hasMoreItems:hasMoreLoadMore,type:props.Pagination?.type,currentPage}});document.dispatchEvent(updateNextPrevButtonsEvent);//console.log(\"update_next_prev_buttons dispatched\", updateNextPrevButtonsEvent)\n}}},[products,sortedChildren,searchConfig.active]);React.useEffect(()=>{const hasMoreLoadMore=sortedChildren?.length>0;setHasMore(hasMoreLoadMore);if(props.Pagination.type===\"load_more\"&&searchConfig.active&&!sortedChildren){const hasMoreItemsEvent=new CustomEvent(\"hide-loadmore-button\",{detail:{hasMoreItems:hasMoreLoadMore}});document.dispatchEvent(hasMoreItemsEvent);//console.log(\"hide-loadmore-button dispatched\", hasMoreItemsEvent)\n}if(props.Pagination.type===\"next_prev\"&&searchConfig.active&&!sortedChildren){const updateNextPrevButtonsEvent=new CustomEvent(\"update_next_prev_buttons\",{detail:{hasMoreItems:hasMoreLoadMore,type:props.Pagination?.type,currentPage}});document.dispatchEvent(updateNextPrevButtonsEvent);//console.log(\"update_next_prev_buttons dispatched\", updateNextPrevButtonsEvent)\n}},[products,sortedChildren,searchConfig.active,props.Pagination.type]);// Add this after the URL parameters useEffect\nReact.useEffect(()=>{// Check if we're in a browser environment\nif(typeof window===\"undefined\")return;// Check for shopXtools and products\nconst hasShopXTools=!!window.shopXtools;const products=window.shopXtools?.products;// Log initial state\n// console.log(\"🚨 Checking for initial shopXtools products 🚨\", {\n//     hasShopXTools,\n//     hasProducts: !!products,\n//     productsCount: products?.length || 0,\n// })\n// Set products if available\nif(products){// console.log(\"🚨 Setting initial products from shopXtools 🚨\", {\n//     count: products.length,\n//     sample: products[0]?.node,\n// })\nsetProducts(products);}},[])// Only run on mount\n;if(!Collection?.[0]){logDebug(\"ProductSort\",\"No collection instance found\",null);return /*#__PURE__*/_jsx(\"div\",{style:{height:\"100%\",display:\"flex\",alignItems:\"center\",justifyContent:\"center\",color:\"#666\",fontSize:\"14px\"},children:\"Connect instance\"});}const collectionInstance=Collection[0];const emptyStateInstance=props.EmptyState?.[0];const sizedInstance=/*#__PURE__*/React.cloneElement(collectionInstance,{style:{...collectionInstance.props?.style||{},width:\"100%\",height:\"100%\"}});// Update the layout styling logic\nlet layoutStyle={};if(props.layout){const layout=props.layout;switch(layout.type){case\"stack\":const isVertical=layout.direction===\"vertical\";layoutStyle={display:\"flex\",flexDirection:isVertical?\"column\":\"row\",flexWrap:layout.wrap?\"wrap\":\"nowrap\",alignItems:isVertical?layout.align:layout.alignH,justifyContent:layout.distribute,gap:layout.gap,padding:layout.paddingPerSide?`${layout.paddingTop}px ${layout.paddingRight}px ${layout.paddingBottom}px ${layout.paddingLeft}px`:`${layout.padding}px`,width:\"100%\",\"& > *\":{minWidth:layout.stackMinWidth,flexGrow:1,flexShrink:1,flexBasis:0}};break;case\"grid\":let gridTemplateColumns=\"\";if(layout.columns===\"auto\"){// Combine auto-fit with a calculated minmax to respect both gridWidth and maxColumns.\n// The min value ensures columns are at least gridWidth, but also effectively caps\n// the column count at maxColumns by calculating the width required for that many columns.\ngridTemplateColumns=`repeat(auto-fit, minmax(max(${layout.gridWidth}px, calc((100% - ${layout.gap*(layout.maxColumns-1)}px) / ${layout.maxColumns})), 1fr))`;}else{gridTemplateColumns=`repeat(${layout.columnCount}, 1fr)`;}layoutStyle={display:\"grid\",gridTemplateColumns,justifyItems:layout.gridAlign,gap:layout.gap,padding:layout.paddingPerSide?`${layout.paddingTop}px ${layout.paddingRight}px ${layout.paddingBottom}px ${layout.paddingLeft}px`:`${layout.padding}px`,width:\"100%\"};break;}}// Create the styled instance with layout\nconst styledInstance=/*#__PURE__*/React.cloneElement(sizedInstance,{style:{...sizedInstance.props.style,...layoutStyle}});if(RenderTarget.current()===RenderTarget.canvas){return styledInstance;}const[isBackNavigation,setIsBackNavigation]=React.useState(false);React.useEffect(()=>{if(typeof window===\"undefined\")return;const handleUrlChange=event=>{// console.log(\"popstate\", event)\nconst url=new URL(window.location.href);const urlParams=new URLSearchParams(url.search);// Handle page parameter\nconst pageParam=urlParams.get(\"page\");const newPage=pageParam?parseInt(pageParam,10):1;//console.log(\"[CMS] Checking page change:\", { currentPage, newPage })\nif(newPage!==currentPage){//console.log(\"[CMS] Updating to page:\", newPage)\nsetCurrentPage(newPage);setSortedChildren(null)// Reset sorted children to trigger re-render\n;}setIsLoading(true);logDebug(\"ProductSort\",\"URL changed\",{url:url.toString(),search:url.search,eventType:event?.type||\"direct\",currentPage:currentPage,newPage:newPage});if(event.type===\"popstate\"){//console.log(\"Reloading the page\")\nwindow.location.reload();}// Set loading to false after a short delay to prevent flash\nsetTimeout(()=>{setIsLoading(false);setIsBackNavigation(false);},150);};// Run initial check\nhandleUrlChange({});// Listen for both popstate and pagination events\nwindow.addEventListener(\"popstate\",handleUrlChange);document.addEventListener(\"product-pagination-change\",handleUrlChange);return()=>{// window.removeEventListener(\"popstate\", handleUrlChange)\ndocument.removeEventListener(\"product-pagination-change\",handleUrlChange);};},[currentPage]);try{logDebug(\"ProductSort\",\"Rendering collection\",{hasCollection:!!Collection[0],productsCount:products.length,sortedChildrenCount:sortedChildren?sortedChildren.length:0,isBackNavigation,isLoading});return /*#__PURE__*/React.cloneElement(styledInstance,{...styledInstance.props,style:{...styledInstance.props.style,opacity:isLoading?0:1,transition:\"opacity 0.2s ease-in-out\",visibility:isLoading?\"hidden\":\"visible\"},children:/*#__PURE__*/React.cloneElement(styledInstance.props.children,{...styledInstance.props.children.props,children:/*#__PURE__*/React.cloneElement(styledInstance.props.children.props.children,{...styledInstance.props.children.props.children.props,children:collection=>{logDebug(\"ProductSort\",\"Collection render function called\",{collectionSize:collection?.length||0});const originalRender=styledInstance.props.children.props.children.props.children(collection);if(!originalRender?.props?.children){logDebug(\"ProductSort\",\"No children in original render\",null);return originalRender;}if(props.Search?.enableSearch&&props.Search?.initialSearchState===\"custom\"&&!searchConfig.term&&props.CustomInitialState?.[0]){// console.log(\n//     \"Rendering custom initial state:\",\n//     {\n//         enableSearch: props.Search?.enableSearch,\n//         initialSearchState: props.Search?.initialSearchState,\n//         searchConfig: searchConfig,\n//     }\n// )\nconst styledCustomInitial=/*#__PURE__*/React.cloneElement(props.CustomInitialState[0],{style:{...props.CustomInitialState[0].props?.style||{},width:\"100%\",height:\"100%\",maxWidth:\"100%\",transform:\"none\"}});// Create a wrapper that completely overrides any grid styles\nconst CustomInitialWrapper=()=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",padding:props.layout?.padding?`${props.layout.padding}px`:\"0px\",// Override any grid properties\n    gridColumn:\"1 / -1\",gridRow:\"1 / -1\",// Ensure it spans the full container\n    position:\"relative\",minWidth:\"100%\",maxWidth:\"100%\"},children:styledCustomInitial});return{...originalRender,props:{...originalRender.props,children:/*#__PURE__*/_jsx(CustomInitialWrapper,{})}};}if(!sortedChildren&&products.length>0){// console.log(\n//     \"🚨🚨🚨 STARTING FILTERING PROCESS 🚨🚨🚨\",\n//     {\n//         productsLength: products.length,\n//         hasShopXTools:\n//             typeof window !== \"undefined\" &&\n//             !!window.shopXtools,\n//         activeFilters: Object.entries(filters)\n//             .filter(\n//                 ([key, filter]: [\n//                     string,\n//                     any,\n//                 ]) => filter.active\n//             )\n//             .reduce(\n//                 (\n//                     acc,\n//                     [key, filter]: [string, any]\n//                 ) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             ),\n//         firstProduct: products[0]?.node,\n//     }\n// )\n// First filter all shopXtools products\nconst filteredShopXProducts=products.filter(({node})=>{// Add debug log for products being filtered\n// console.log(\n//     \"🔍 Checking product for filtering:\",\n//     {\n//         title:\n//             node?.title || \"No title\",\n//         hasNode: !!node,\n//         nodeType: node\n//             ? typeof node\n//             : \"undefined\",\n//         productType:\n//             node?.productType ||\n//             \"No product type\",\n//         filterActive:\n//             searchConfig.active,\n//     }\n// )\n// Ensure node exists\nif(!node){// console.log(\n//     \"⚠️ No node found for product, skipping\"\n// )\nreturn false;}const matches=productMatchesFilters(node);// console.log(\n//     \"🔍 Product filter result:\",\n//     {\n//         title: node.title,\n//         productType: node.productType,\n//         matches: matches.matches,\n//         searchActive:\n//             searchConfig.active,\n//         searchTerm: searchConfig.term,\n//     }\n// )\nreturn matches.matches;});// console.log(\n//     \"🔍 Filtered shopX products results:\",\n//     {\n//         totalBefore: products.length,\n//         totalAfter:\n//             filteredShopXProducts.length,\n//         firstProduct: filteredShopXProducts[0]\n//             ?.node\n//             ? {\n//                   title: filteredShopXProducts[0]\n//                       .node.title,\n//                   productType:\n//                       filteredShopXProducts[0]\n//                           .node.productType,\n//               }\n//             : null,\n//         activeFilters: Object.entries(filters)\n//             .filter(\n//                 ([key, filter]: [\n//                     string,\n//                     any,\n//                 ]) => filter.active\n//             )\n//             .reduce(\n//                 (\n//                     acc,\n//                     [key, filter]: [string, any]\n//                 ) => ({\n//                     ...acc,\n//                     [key]: filter,\n//                 }),\n//                 {}\n//             ),\n//         searchActive: searchConfig.active,\n//         searchTerm: searchConfig.term,\n//     }\n// )\n// Add additional debugging if no products match\n// if (\n//     filteredShopXProducts.length === 0 &&\n//     products.length > 0\n// ) {\n//     console.log(\n//         \"⚠️ NO PRODUCTS MATCHED FILTERS! Active filters:\",\n//         {\n//             searchConfig: searchConfig.active\n//                 ? searchConfig\n//                 : null,\n//             otherFilters: Object.entries(\n//                 filters\n//             )\n//                 .filter(\n//                     ([key, filter]: [\n//                         string,\n//                         any,\n//                     ]) => filter.active\n//                 )\n//                 .reduce(\n//                     (\n//                         acc,\n//                         [key, filter]: [\n//                             string,\n//                             any,\n//                         ]\n//                     ) => ({\n//                         ...acc,\n//                         [key]: filter,\n//                     }),\n//                     {}\n//                 ),\n//         }\n//     )\n//     // Log some sample products to help diagnose\n//     console.log(\n//         \"Sample products that didn't match:\",\n//         products.slice(0, 3).map((p) => ({\n//             title: p.node?.title,\n//             productType: p.node?.productType,\n//             tags: p.node?.tags?.slice(0, 3),\n//             collections: p.node?.collections\n//                 ?.map((c) => c.title || c)\n//                 .slice(0, 3),\n//         }))\n//     )\n// }\nconst filteredForPage=pageType===\"favorites\"?filteredShopXProducts.filter(({node})=>{const productId=findDeep13DigitNumber(node);return productId&&favorites.includes(productId);}):filteredShopXProducts;// If no items match, render the empty state directly\nif(filteredForPage.length===0){if(emptyStateInstance){const styledEmptyState=/*#__PURE__*/React.cloneElement(emptyStateInstance,{style:{...emptyStateInstance.props?.style||{},width:\"100%\",height:\"100%\",maxWidth:\"100%\",transform:\"none\"}});// Create a wrapper that completely overrides any grid styles\nconst EmptyStateWrapper=()=>/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",display:\"flex\",justifyContent:\"center\",alignItems:\"center\",padding:props.layout?.padding?`${props.layout.padding}px`:\"0px\",// Override any grid properties\n    gridColumn:\"1 / -1\",gridRow:\"1 / -1\",// Ensure it spans the full container\n    position:\"relative\",minWidth:\"100%\",maxWidth:\"100%\"},children:styledEmptyState});// Return the wrapper component directly\nreturn{...originalRender,props:{...originalRender.props,style:{...originalRender.props.style,// Override grid properties at the container level\ndisplay:\"flex\",gridTemplateColumns:\"none\",gridAutoColumns:\"none\",gridTemplateRows:\"none\",gap:0},children:/*#__PURE__*/_jsx(EmptyStateWrapper,{})}};}return null;}// Then map the filtered products to collection items\nconst items=originalRender.props.children.map(child=>{const item=collection.find(collectionItem=>collectionItem.id===child.key);const productId=item?findDeep13DigitNumber(item):null;// Find the product in our filtered shopX products\nconst fullId=`gid://shopify/Product/${productId}`;const matchingProduct=filteredForPage.find(({node})=>node.id===fullId);// Only include items that exist in our filtered products\nif(!matchingProduct){logDebug(\"ProductSort\",\"Product filtered out\",{id:fullId,productId});return null;}const details={id:matchingProduct.node.id,title:matchingProduct.node.title||\"\",price:matchingProduct.node.priceRange?.minVariantPrice?.amount?parseFloat(matchingProduct.node.priceRange.minVariantPrice.amount):0,productType:matchingProduct.node.productType||\"\",tags:matchingProduct.node.tags||[],compareAtPrice:matchingProduct.node.compareAtPriceRange?.minVariantPrice?.amount?parseFloat(matchingProduct.node.compareAtPriceRange.minVariantPrice.amount):0,collections:Array.isArray(matchingProduct.node.collections)?matchingProduct.node.collections.map(c=>c.title):[]};return{child,productId:productId||\"0\",price:details.price,title:details.title,originalIndex:originalRender.props.children.indexOf(child),details};}).filter(Boolean)// Remove null items\n;logDebug(\"ProductSort\",\"Final filtered items\",{totalProducts:products.length,filteredForPage:filteredForPage.length,finalItems:items.length,finalItemsList:items,sample:items[0]?{title:items[0].title,productType:items[0].details.productType}:null});// Use React.memo for components that do not change\nconst OptimizedChild=/*#__PURE__*/React.memo(({child,...props})=>{return /*#__PURE__*/React.cloneElement(child,props);});// Ensure debouncing is applied effectively\nconst debouncedUpdateSort=React.useCallback(debounce(newSortConfig=>{setSortConfig(newSortConfig);},150),[]);const debouncedUpdateFilter=React.useCallback(debounce(newFilters=>{setFilters(newFilters);},150),[]);// Add detailed logging around transition logic\n// console.log(\n//     \"🔍 Transition state before rendering\",\n//     {\n//         isTransitioning,\n//         isSettling,\n//         itemsLength: items.length,\n//         emptyStateInstanceExists:\n//             !!emptyStateInstance,\n//     }\n// )\n// Modify the child wrapper styles to include settling state\nconst getTransitionStyles=baseStyles=>({...baseStyles,opacity:isTransitioning||isSettling?0:1,transition:`opacity ${isSettling?\"0.5s\":\"0.3s\"} ease-in-out`,pointerEvents:isTransitioning||isSettling?\"none\":\"auto\"});// Render sorted items\n// console.log(\"🔍 Rendering sorted items\", {\n//     sortedItemsCount: items.length,\n//     sortedItems: items,\n//     isTransitioning,\n//     isSettling,\n// })\n// Sort the filtered items\nconst sorted=[...items].sort((a,b)=>{if(sortConfig.type===\"relevancy\"){return a.originalIndex-b.originalIndex;}if(sortConfig.type===\"price\"){const result=sortConfig.sortDirection===\"highToLow\"?b.price-a.price:a.price-b.price;return result||a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"name\"){// sort by name\nconst result=sortConfig.sortDirection===\"aToZ\"?a.title.localeCompare(b.title):b.title.localeCompare(a.title);return result||a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"created\"){// For \"newest\", we try to use the product ID as a proxy\n// since Shopify IDs are sequential\n// Higher ID = newer product\nconst aId=parseInt(a.productId);const bId=parseInt(b.productId);if(!isNaN(aId)&&!isNaN(bId)){return bId-aId// Newest first\n;}// Fall back to original order if we can't parse IDs\nreturn a.originalIndex-b.originalIndex;}else if(sortConfig.type===\"best-selling\"){// For best-selling, maintain the original order\n// as we assume Shopify has already sorted by best-selling\nreturn a.originalIndex-b.originalIndex;}else{// Default to original order for unknown types\nreturn a.originalIndex-b.originalIndex;}});// Apply pagination if enabled\nlet paginatedItems=sorted;// console.log(\"🔍 Paginated items\", {\n//     paginatedItemsCount: sorted.length,\n//     paginatedItems: sorted,\n// })\n// Update the product items wrapper with a standard list instead of virtualized one\nconst wrappedChildren=paginatedItems.map(item=>/*#__PURE__*/React.cloneElement(item.child,{style:getTransitionStyles(item.child.props.style),key:item.productId||item.originalIndex}));// console.log(\"🔍 Rendering wrapped children\", {\n//     wrappedChildrenCount: wrappedChildren.length,\n//     wrappedChildren: wrappedChildren,\n// })\n// Update sorted children state which triggers re-render\nupdateSortedChildrenWithTransition(wrappedChildren);// Return the placeholder structure expected by the outer cloneElement\n// The actual content will be replaced by sortedChildren on re-render\nreturn{...originalRender,props:{...originalRender.props,// Use the original children length initially\nchildren:originalRender.props.children}};}// Initial render or while loading/filtering\nreturn{...originalRender,props:{...originalRender.props,children:sortedChildren||originalRender.props.children}};}})})});}catch(error){console.error(\"Error in ProductSort:\",error);logDebug(\"ProductSort\",\"Render error\",{error:error.message});return styledInstance;}// Update URL state management\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const url=new URL(window.location.href);// Use the updateUrlWithFilters function to update URL parameters\nupdateUrlWithFilters(filters,url);// Add search term to URL\nif(searchConfig.active&&searchConfig.term){url.searchParams.set(\"search\",searchConfig.term);}else if(url.searchParams.has(\"search\")){url.searchParams.delete(\"search\");}// Add sort configuration to URL using the simplified sort parameter\nif(sortConfig){// Map internal sort configuration to URL sort parameter\nlet sortParam;if(sortConfig.type===\"relevancy\"){sortParam=\"relevance\";}else if(sortConfig.type===\"name\"){sortParam=sortConfig.sortDirection===\"aToZ\"?\"title_asc\":\"title_desc\";}else if(sortConfig.type===\"price\"){sortParam=sortConfig.sortDirection===\"lowToHigh\"?\"price_asc\":\"price_desc\";}else if(sortConfig.type===\"created\"){sortParam=\"newest\";}else if(sortConfig.type===\"best-selling\"){sortParam=\"best_selling\";}if(sortParam){url.searchParams.set(\"sort\",sortParam);// Remove legacy sortConfig parameter if it exists\nif(url.searchParams.has(\"sortConfig\")){url.searchParams.delete(\"sortConfig\");}}else{// Fallback to the old format if we can't map to a simple parameter\nurl.searchParams.set(\"sortConfig\",JSON.stringify(sortConfig));}}// Update history state with search config\nwindow.history.pushState({filters,sortConfig,searchConfig},\"\",url.toString());},[sortConfig,filters,searchConfig]);// Update the useEffect for initializing state from URL\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const handleUrlChange=event=>{const url=new URL(window.location.href);const urlParams=new URLSearchParams(window.location.search);logDebug(\"ProductSort\",\"URL changed\",{url:url.toString(),search:url.search,eventType:event?.type||\"direct\"});// Handle search parameter\nconst searchParam=urlParams.get(\"search\");if(searchParam){setSearchConfig({term:searchParam,fields:getActiveSearchFields(props.Search?.Scope),active:true});setSortedChildren(null)// Force re-filter when search changes\n;}else if(searchConfig.active){setSearchConfig({term:\"\",fields:getActiveSearchFields(props.Search?.Scope),active:false});setSortedChildren(null)// Force re-filter when search is cleared\n;}// Log all variant parameters in URL for debugging\nconst variantParams=Array.from(urlParams.keys()).filter(key=>key.startsWith(\"variant_\")).reduce((acc,key)=>{const value=urlParams.get(key);// Decode values to see what's actually stored\nacc[key]={raw:value,decoded:value?decodeURIComponent(value):null,values:value?decodeURIComponent(value).split(\",\").filter(Boolean):[]};return acc;},{});//console.log(\"📊 VARIANT PARAMS IN URL:\", variantParams)\n// Handle sort parameter\nconst sortParam=urlParams.get(\"sort\");if(sortParam){let newSortConfig;// Map URL sort parameter to internal sort configuration\nswitch(sortParam){case\"relevance\":newSortConfig={type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};break;case\"title_asc\":newSortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};break;case\"title_desc\":newSortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};break;case\"price_asc\":newSortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};break;case\"price_desc\":newSortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};break;case\"newest\":newSortConfig={type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};break;case\"best_selling\":newSortConfig={type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};break;}if(newSortConfig){logDebug(\"ProductSort\",\"Updating sort config from URL parameter\",{sortParam,newSortConfig});setSortConfig(newSortConfig);setSortedChildren(null)// Reset sorted children to trigger resort\n;}}try{// Use parseUrlFilters to get filters from URL\nconst urlFilters=parseUrlFilters(url.searchParams);// Check if we have active filters\nconst hasActiveFilters=urlFilters&&Object.keys(urlFilters).some(key=>urlFilters[key]?.active);logDebug(\"ProductSort\",\"URL filters parsed\",{hasActiveFilters,filters:urlFilters,activeFilters:hasActiveFilters?Object.entries(urlFilters).filter(([key,filter])=>filter.active).reduce((acc,[key,filter])=>({...acc,[key]:filter}),{}):null});// Only update if we have filters in the URL\nif(hasActiveFilters){setFilters(urlFilters);setSortedChildren(null);}}catch(error){console.error(\"❌ Error handling URL change:\",error);}};// Run initial check\nlogDebug(\"ProductSort\",\"Running initial URL check\",{url:window.location.href});handleUrlChange({})// Removed event listener for now\n;// Listen for popstate events\nwindow.addEventListener(\"popstate\",handleUrlChange);return()=>{window.removeEventListener(\"popstate\",handleUrlChange);};},[props.Search?.Scope]);// Add error state management\nconst[error,setError]=React.useState(null);// Create the content to render\nconst content=error?/*#__PURE__*/_jsx(\"div\",{style:{padding:20,color:\"red\"},children:error.message}):// Original render content with layout styling\n/*#__PURE__*/_jsx(\"div\",{...props,style:{...props.style,width:\"100%\",height:\"100%\",...(!products?.length||pageType===\"favorites\"&&!favorites?.length)&&{display:\"flex\",gridTemplateColumns:\"none\",gridAutoColumns:\"none\",gridTemplateRows:\"none\",gap:0}},children:styledInstance.props.children});// Wrap the main content in error boundary\nreturn /*#__PURE__*/_jsx(ErrorBoundary,{children:content});}addPropertyControls(FC_CatalogDisplay,{Collection:{type:ControlType.ComponentInstance,title:\"CMS Source\",description:\"Connect to CMS collection off-page\"},EmptyState:{type:ControlType.ComponentInstance,title:\"Empty State\",description:\"Connect to design off-page\"},CustomInitialState:{type:ControlType.ComponentInstance,title:\"Initial State\",description:\"Connect to design off-page\",hidden:props=>!props.Search?.enableSearch||props.Search?.initialSearchState!==\"custom\"},pageType:{type:ControlType.Enum,title:\"Display\",options:[\"default\",\"favorites\"],optionTitles:[\"All\",\"Favorites\"],defaultValue:\"default\",displaySegmentedControl:true},display:{type:ControlType.Enum,title:\"Filter Type\",options:[\"All\",\"Collection\",\"Product Tag\",\"Product Type\"],defaultValue:\"All\"},value:{type:ControlType.String,title:\"Filter Value\",placeholder:\"New Arrivals\"},defaultSort:{type:ControlType.Enum,title:\"Default Sort\",options:[\"relevance\",\"title_asc\",\"title_desc\",\"price_asc\",\"price_desc\",\"newest\",\"best_selling\"],optionTitles:[\"Relevance\",\"Title A-Z\",\"Title Z-A\",\"Price Low-High\",\"Price High-Low\",\"Newest\",\"Best Selling\"],defaultValue:\"relevance\"},Search:{type:ControlType.Object,title:\"Search\",controls:{enableSearch:{type:ControlType.Boolean,title:\"Allow\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},initialSearchState:{type:ControlType.Enum,title:\"Initial State\",options:[\"all\",\"none\",\"custom\"],optionTitles:[\"Full\",\"Empty\",\"Custom\"],defaultValue:\"all\",description:\"Use custom to display product or search suggestions. Connect your component on the main panel.\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:props=>!props.enableSearch},Scope:{type:ControlType.Object,title:\"Scope\",hidden:props=>!props.enableSearch,controls:{title:{type:ControlType.Boolean,title:\"Title\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},productType:{type:ControlType.Boolean,title:\"Product Type\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},productTag:{type:ControlType.Boolean,title:\"Tags\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},collection:{type:ControlType.Boolean,title:\"Collections\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},vendor:{type:ControlType.Boolean,title:\"Vendor\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"},variants:{type:ControlType.Boolean,title:\"Variants\",defaultValue:true,enabledTitle:\"Yes\",disabledTitle:\"No\"}}}}},Metafields:{type:ControlType.Object,title:\"Metafields\",controls:{include:{type:ControlType.Boolean,title:\"Include\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\",description:\"Searching or filtering by Variant: Color will also check custom metafields using custom.fc_color. \\n [Learn more](https://framercommerce.com/resources/docs/components/catalog#catalog-display)\"}}},Pagination:{type:ControlType.Object,title:\"Pagination\",controls:{enable:{type:ControlType.Boolean,title:\"Enable\",defaultValue:false,enabledTitle:\"Yes\",disabledTitle:\"No\"},type:{type:ControlType.Enum,title:\"Type\",options:[\"load_more\",\"next_prev\"/* \"infinite\"*/],optionTitles:[\"Load More\",\"Next/Prev\"/*\"Infinite Scroll\"*/],defaultValue:\"load_more\",displaySegmentedControl:true,segmentedControlDirection:\"vertical\",hidden:({enable})=>!enable},items:{type:ControlType.Number,title:\"Items\",defaultValue:12,min:1,step:1,displayStepper:true,hidden:({enable})=>!enable}}},layout:{type:ControlType.Object,optional:true,controls:{type:{type:ControlType.Enum,defaultValue:\"grid\",options:[\"stack\",\"grid\"],optionTitles:[\"Stack\",\"Grid\"],displaySegmentedControl:true},// Stack specific controls\ndirection:{type:ControlType.Enum,defaultValue:\"vertical\",options:[\"horizontal\",\"vertical\"],optionTitles:[\"Horizontal\",\"Vertical\"],optionIcons:[\"direction-horizontal\",\"direction-vertical\"],displaySegmentedControl:true,hidden:props=>props.type!==\"stack\"},wrap:{type:ControlType.Boolean,defaultValue:false,title:\"Wrap\",hidden:props=>props.type!==\"stack\"},stackMinWidth:{type:ControlType.Number,defaultValue:200,min:1,max:1e3,step:1,title:\"Min Width\",hidden:props=>props.type!==\"stack\"||!props.wrap},distribute:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\",\"space-between\",\"space-around\",\"space-evenly\"],optionTitles:[\"Start\",\"Center\",\"End\",\"Space Between\",\"Space Around\",\"Space Evenly\"],hidden:props=>props.type!==\"stack\"},align:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Start\",\"Center\",\"End\"],optionIcons:[\"align-left\",\"align-center\",\"align-right\"],displaySegmentedControl:true,hidden:props=>props.type!==\"stack\"||props.direction!==\"vertical\"},alignH:{type:ControlType.Enum,defaultValue:\"start\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Top\",\"Center\",\"Bottom\"],optionIcons:[\"align-top\",\"align-middle\",\"align-bottom\"],displaySegmentedControl:true,title:\"Align\",hidden:props=>props.type!==\"stack\"||props.direction!==\"horizontal\"},// Grid specific controls\ncolumns:{type:ControlType.Enum,defaultValue:\"fixed\",options:[\"auto\",\"fixed\"],optionTitles:[\"Auto\",\"Fixed\"],displaySegmentedControl:true,hidden:props=>props.type!==\"grid\"},columnCount:{type:ControlType.Number,defaultValue:3,min:1,step:1,displayStepper:true,title:\"Columns\",hidden:props=>props.type!==\"grid\"||props.columns===\"auto\"},gridWidth:{type:ControlType.Number,defaultValue:300,min:1,max:1e3,step:1,title:\"Min Width\",hidden:props=>props.type!==\"grid\"||props.columns===\"fixed\"},maxColumns:{type:ControlType.Number,defaultValue:4,min:1,step:1,title:\"Max Col\",displayStepper:true,hidden:props=>props.type!==\"grid\"||props.columns===\"fixed\"},gridAlign:{type:ControlType.Enum,defaultValue:\"center\",options:[\"start\",\"center\",\"end\"],optionTitles:[\"Left\",\"Center\",\"Right\"],displaySegmentedControl:true,title:\"Align\",hidden:props=>props.type!==\"grid\"},// Common controls\ngap:{type:ControlType.Number,defaultValue:20,min:0,step:1,title:\"Gap\"},padding:{type:ControlType.FusedNumber,title:\"Padding\",defaultValue:0,min:0,toggleKey:\"paddingPerSide\",toggleTitles:[\"All\",\"Sides\"],valueKeys:[\"paddingTop\",\"paddingRight\",\"paddingBottom\",\"paddingLeft\"],valueLabels:[\"T\",\"R\",\"B\",\"L\"]}}}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_CatalogDisplay\",\"slots\":[],\"annotations\":{\"framerContractVersion\":\"1\",\"framerDisableUnlink\":\"\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_CatalogDisplay.map","import{jsx as _jsx,jsxs as _jsxs}from\"react/jsx-runtime\";import*as React from\"react\";import{addPropertyControls,ControlType}from\"framer\";export default function FC_SortButton(props){const{DropdownVisual,relevanceText=\"Relevance\",titleAscText=\"A-Z\",titleDescText=\"Z-A\",priceAscText=\"Price (lowest first)\",priceDescText=\"Price (highest first)\",newestText=\"Newest\",bestSellingText=\"Best Selling\"}=props;const[currentSort,setCurrentSort]=React.useState(\"relevance\");// Map internal sort values to display text\nconst sortOptions=React.useMemo(()=>{return[{value:\"relevance\",text:relevanceText},{value:\"title_asc\",text:titleAscText},{value:\"title_desc\",text:titleDescText},{value:\"price_asc\",text:priceAscText},{value:\"price_desc\",text:priceDescText},{value:\"newest\",text:newestText},{value:\"best_selling\",text:bestSellingText}].filter(option=>option.text)// Filter out options with empty text\n;},[relevanceText,titleAscText,titleDescText,priceAscText,priceDescText,newestText,bestSellingText]);// Get the current sort text\nconst getCurrentSortText=React.useCallback(()=>{const option=sortOptions.find(opt=>opt.value===currentSort);return option?.text||relevanceText;},[currentSort,sortOptions,relevanceText]);// Helper function to update text content with {{param}}\nconst updateButtonContent=element=>{if(!element||typeof element!==\"object\")return element;// Handle arrays\nif(Array.isArray(element)){return element.map(child=>updateButtonContent(child));}if(!/*#__PURE__*/React.isValidElement(element))return element;const{children,...otherProps}=element.props;// Special handling for Framer Text components\nif(element.type?.displayName?.includes(\"Text\")){const text=element.props.text||\"\";const newText=text.replace(/{{param}}/g,getCurrentSortText());return /*#__PURE__*/React.cloneElement(element,{...otherProps,text:newText});}// Handle children recursively\nlet newChildren=children;if(children){if(typeof children===\"string\"){newChildren=children.replace(/{{param}}/g,getCurrentSortText());}else if(/*#__PURE__*/React.isValidElement(children)||Array.isArray(children)){newChildren=updateButtonContent(children);}}return /*#__PURE__*/React.cloneElement(element,{...otherProps,children:newChildren});};// Handle sort change\nconst handleSortChange=React.useCallback(e=>{const value=e.target.value;setCurrentSort(value);// Map URL sort parameter to internal sort configuration\nlet sortConfig;switch(value){case\"relevance\":sortConfig={type:\"relevancy\",sortBy:\"relevancy\",sortDirection:null};break;case\"title_asc\":sortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"aToZ\"};break;case\"title_desc\":sortConfig={type:\"name\",sortBy:\"name\",sortDirection:\"zToA\"};break;case\"price_asc\":sortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"lowToHigh\"};break;case\"price_desc\":sortConfig={type:\"price\",sortBy:\"price\",sortDirection:\"highToLow\"};break;case\"newest\":sortConfig={type:\"created\",sortBy:\"created\",sortDirection:\"newest\"};break;case\"best_selling\":sortConfig={type:\"best-selling\",sortBy:\"best-selling\",sortDirection:null};break;}// Update URL with sort parameter\nif(typeof window!==\"undefined\"){const url=new URL(window.location.href);url.searchParams.set(\"sort\",value);window.history.pushState({sortConfig},\"\",url.toString());}// Dispatch sort change event\ndocument.dispatchEvent(new CustomEvent(\"product-sort-change\",{detail:sortConfig}));},[]);// Update sort value from URL on mount and URL changes\nReact.useEffect(()=>{if(typeof window===\"undefined\")return;const updateSortFromUrl=()=>{const urlParams=new URLSearchParams(window.location.search);const sortParam=urlParams.get(\"sort\");if(sortParam&&sortOptions.some(option=>option.value===sortParam)){setCurrentSort(sortParam);}};updateSortFromUrl();window.addEventListener(\"popstate\",updateSortFromUrl);return()=>{window.removeEventListener(\"popstate\",updateSortFromUrl);};},[sortOptions]);return /*#__PURE__*/_jsxs(\"div\",{style:{position:\"relative\",width:\"100%\",height:\"100%\"},children:[/*#__PURE__*/_jsx(\"div\",{style:{width:\"100%\",height:\"100%\",pointerEvents:\"none\"},children:updateButtonContent(DropdownVisual)}),/*#__PURE__*/_jsx(\"select\",{value:currentSort,onChange:handleSortChange,style:{position:\"absolute\",top:0,left:0,width:\"100%\",height:\"100%\",opacity:0,cursor:\"pointer\"},children:sortOptions.map(option=>/*#__PURE__*/_jsx(\"option\",{value:option.value,children:option.text},option.value))})]});}addPropertyControls(FC_SortButton,{DropdownVisual:{type:ControlType.ComponentInstance,title:\"Component\",description:\"Connect to native Framer component, on-canvas but off-page. Use {{param}} in text to show the current sort option\"},relevanceText:{type:ControlType.String,title:\"Relevance\",defaultValue:\"Relevance\"},titleAscText:{type:ControlType.String,title:\"Title (A-Z)\",defaultValue:\"A-Z\"},titleDescText:{type:ControlType.String,title:\"Title (Z-A)\",defaultValue:\"Z-A\"},priceAscText:{type:ControlType.String,title:\"Price (Low)\",defaultValue:\"Price (lowest first)\"},priceDescText:{type:ControlType.String,title:\"Price (High)\",defaultValue:\"Price (highest first)\"},newestText:{type:ControlType.String,title:\"Newest\",defaultValue:\"Newest\"},bestSellingText:{type:ControlType.String,title:\"Best Selling\",defaultValue:\"Best Selling\",description:\"Empty fields won't be displayed\"}});\nexport const __FramerMetadata__ = {\"exports\":{\"default\":{\"type\":\"reactComponent\",\"name\":\"FC_SortButton\",\"slots\":[\"DropdownVisual\"],\"annotations\":{\"framerContractVersion\":\"1\"}},\"__FramerMetadata__\":{\"type\":\"variable\"}}}\n//# sourceMappingURL=./FC_SortButton.map"],"mappings":"+dAsDgB,AA7CA,EAAkB,CAAC,EAAK,GAAS,IAAQ,CACzD,IAAM,EAAS,CACf,aAAa,eAAe,YAAY,cAAc,QAAQ,UAAU,SAAS,WAAW,OAAO,UAAU,aAAa,eAAgB,EAAC,GAAG,EAAS,CAAC,IAAM,EAAO,EAAS,IAAO,EACrL,OAAO,CAAQ,KAAI,CACnB,IAAM,EAAgB,CAAE,EAAC,OAAO,QAAQ,EAAS,CAAC,QAAQ,CAAC,CAAC,EAAI,EAAM,GAAG,CAAC,EAAgB,GAAO,CAAK,EAAC,CAAC,IAAM,EAAO,EAAgB,IAAO,EAC5I,OAAO,CAAQ,CAAC,EAeA,EAAgB,GAAW,CAAC,QAAQ,IAAI,4BAA4B,EAAU,UAAU,CAAC,CAAC,IAAM,EAAQ,CAAC,WAAW,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,aAAa,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,YAAY,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,QAAQ,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,MAAM,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,gBAAgB,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,iBAAiB,CAAC,QAAO,EAAM,OAAO,CAAE,CAAC,EAAC,QAAQ,CAAC,QAA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