PageSourceSearch

https://www.furniture.com/_next/static/chunks/2hr9xa4odng4i.js?dpl…7ffb4ed62af1c3fd1c0d61387edac03-35741588990

js furniture.com collected 2026-09-24 17:53:40 UTC 6,456 bytes, 4 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a0c3d1-1f6d-7c32-b402-cdf20306dffa")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,255900,e=>{e.v(t=>Promise.all(["static/chunks/05s8xoz-1dsnv.js"].map(t=>e.l(t))).then(()=>t(104049)))},651715,e=>{e.v(t=>Promise.all(["static/chunks/18bxlj4w81m-w.js"].map(t=>e.l(t))).then(()=>t(481152)))},113766,e=>{e.v(t=>Promise.all(["static/chunks/2eur44k9axn5y.js"].map(t=>e.l(t))).then(()=>t(191439)))},469675,e=>{"use strict";var t=e.i(161863),r=e.i(945253);let i={isActive:!1,sourceProduct:null,cachedFdcIds:[],sourceFdcId:null};function s(e,t){switch(t.type){case"SET_SIMILAR_ITEMS":return{isActive:!0,sourceProduct:t.payload.sourceProduct,cachedFdcIds:t.payload.fdcIds,sourceFdcId:t.payload.sourceFdcId};case"CLEAR_SIMILAR_ITEMS":return i;default:return e}}let c=(0,r.createContext)(void 0);function l({children:e}){let[a,o]=(0,r.useReducer)(s,i),n=(0,r.useMemo)(()=>({state:a,dispatch:o}),[a,o]);return(0,t.jsx)(c.Provider,{value:n,children:e})}e.i(22983);var a=e.i(337691);function o({initialProducts:e=[],initialFilters:i=null,usePessimisticCache:s=!1,pageIcons:c=null,homeHero:l}){return(0,t.jsx)(t.Fragment,{children:(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:"Loading..."}),children:(0,t.jsx)(a.ProductsGrid,{initialProducts:e,initialFiltersData:i,isHomepage:!0,usePessimisticCache:s,pageIcons:c,homeHero:l})})})}var n=e.i(523449);function d(e){return/\d+["']\s*[-–]/.test(e)?e:e.split(",")[0]?.trim()||e}let u=["Material","Shape","Size","Color","Style"];var f=e.i(650052),m=e.i(46027),x=e.i(879161);e.i(400310);var p=e.i(327466);function h({fdcId:e,isDirectPage:i=!1}){let{state:s,dispatch:l}=function(){let e=(0,r.useContext)(c);if(!e)throw Error("useSimilarItems must be used within SimilarItemsProvi
1der");return e}(),{state:y}=(0,p.useGeolocation)(),{setBackgroundIsHome:v}=(0,n.usePDPModalManagerContext)(),I=y.currentLocation?.zipcode||f.DEFAULT_LOCATION.zipcode;(0,r.useLayoutEffect)(()=>{window.scrollTo(0,0)},[e]);let{data:g,error:P}=(0,x.useGetSimilarProductsQuery)({variables:{fdcId:e,zipCode:I,numProducts:m.SIMILAR_ITEMS_NUM_PRODUCTS},fetchPolicy:"cache-and-network"}),{product:_,error:j,loading:S}=function(e,t){let[i,s]=(0,r.useState)(null),[c,l]=(0,r.useState)(null),[a,o]=(0,r.useState)(!0);return(0,r.useEffect)(()=>{let r=!1;return s(null),l(null),o(!0),async function(){try{let i=await fetch(`https://api.furniture.com/v1/products/${encodeURIComponent(e)}?zip_code=${encodeURIComponent(t)}`),c=await i.json();if(r)return;if(c?.product){let e=c.product,t=function(e){if(e.partner)return e.partner;if(!e.partner_config)return;let{code:t,display_name:r,...i}=e.partner_config;return{code:t,display_name:r,configuration:Object.keys(i).length?i:void 0}}(e),r=function(e){for(let t of u){let r=t.toLowerCase(),i=e[`${r}_filter`]??e[r],s=Array.isArray(i)?i[0]:i;if(s)return[{label:t,value:d(s)}]}let t=e.details;if(Array.isArray(t))for(let e of u){let r=t.find(t=>t.label?.toLowerCase()===e.toLowerCase()),i=r?.family_value||r?.value;if(i)return[{label:e,value:d(i)}]}return[]}(e),i=[];Array.isArray(e.product_availability)?i=e.product_availability:e.product_availability&&(i=[e.product_availability]);let l=Array.isArray(e.image_classify_collection)?e.image_classify_collection.filter(e=>!!e.url).map(e=>({url:e.url,classifyValue:e.classifyValue||e.classify_value||"",fit:e.fit||null,aspectRatio:e.aspectRatio??e.aspect_ratio??null})):[],a=e.in_stock||i[0]?.in_stock||void 0,o=e.price??i[0]?.list_price??void 0,n=e.sale_price??i[0]?.sale_price??void 0,f={...e,partner:t,specifications:r,product_availability:i,in_stock:a,price:o,sale_price:n,images:l};s(f)}else l(Error("Product not found"))}catch(e){r||l(e instanceof Error?e:Error("Failed to fetch product"))}finally{r||o(!1)}}(),()=>{r=!0}},[e,t]),{product:i,error:c,loading:a}}(e,I),b=_?.fdc_id===e,A=b||!!j&&!S;(0,r.useEffect)(()=>{let t=g?.similarProducts?.fdcIds;if(!t||0===t.length||!A)return;let r=s.sourceFdcId!==e,i=s.sourceFdcId===e&&b&&!s.sourceProduct;(r||i)&&l({type:"SET_SIMILAR_ITEMS",payload:{sourceProduct:b?_:null,fdcIds:t,sourceFdcId:e}})},[g,_,b,A,e,l,s.sourceFdcId,s.sourceProduct]);let w=g?.similarProducts!==void 0&&(g.similarProducts.fdcIds?.length??0)===0,F=i&&(!!P||w&&(!!j||!S));return((0,r.useEffect)(()=>{F&&v(!0)},[F,v]),F)?(0,t.jsx)(o,{}):P?(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center px-4 py-16 text-center",children:[(0,t.jsx)("h3",{className:"font-serif text-xl font-bold text-gradient-green md:text-2xl",children:"Something went wrong"}),(0,t.jsx)("p",{className:"mt-2 text-base text-neutral-700",children:P&&j?"Something went wrong. Please try again.":"Unable to find similar items. Please try again."})]}):w&&j?(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center px-4 py-16 text-center",children:[(0,t.jsx)("h3",{className:"font-serif text-xl font-bold text-gradient-green md:text-2xl",children:"Product not found"}),(0,t.jsx)("p",{className:"mt-2 text-base text-neutral-700",children:"We couldn't find this product. It may no longer be available."})]}):w&&!S?(0,t.jsxs)("div",{className:"flex flex-1 flex-col items-center justify-center px-4 py-16 text-center",children:[(0,t.jsx)("h3",{className:"font-serif text-xl font-bold text-gradient-green md:text-2xl",children:"No similar items found"}),(0,t.jsx)("p",{className:"mt-2 text-base text-neutral-700",children:"We couldn't find items similar to this product right now."})]}):(0,t.jsx)(a.ProductsGrid,{isSimilarItems:!0,similarSourceFdcId:e,similarFdcIds:s.isActive&&s.sourceFdcId===e?s.cachedFdcIds:void 0,similarSourceProduct:s.isActive&&s.sourceFdcId===e?s.sourceProduct??void 0:void 0},e)}e.s(["SimilarItemsPage",0,function({fdcId:e,isDirectPage:i=!1}){return(0,t.jsx)(l,{children:(0,t.jsx)(r.Suspense,{fallback:(0,t.jsx)("div",{className:"flex flex-1 items-center justify-center",children:(0,t.jsx)("span",{className:"animate-pulse text-gray-400",children:"Loading..."})}),children:(0,t.jsx)(h,{fdcId:e,isDirectPage:i})})})}],469675)}]);
2
3//# sourceMappingURL=21xa14w374-g5.js.map
4//# chunkId=01a0c3d1-1f6d-7c32-b402-cdf20306dffa

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.