Rocky_Mountain_Vending/.pnpm-store/v10/files/63/19ac92bfeb32cdc9a6d9cd7884a31cd1ee722c331362b8659dd428237c44a34bdbe11b942e7214427d173726b4783fb74a7701bf59c7cc452af1909845cc28
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

1 line
No EOL
7.8 KiB
Text

{"version":3,"sources":["../../../../src/client/components/router-reducer/fill-lazy-items-till-leaf-with-head.ts"],"sourcesContent":["import type { CacheNode } from '../../../shared/lib/app-router-types'\nimport type {\n FlightRouterState,\n CacheNodeSeedData,\n} from '../../../shared/lib/app-router-types'\nimport { createRouterCacheKey } from './create-router-cache-key'\n\nexport function fillLazyItemsTillLeafWithHead(\n navigatedAt: number,\n newCache: CacheNode,\n existingCache: CacheNode | undefined,\n routerState: FlightRouterState,\n cacheNodeSeedData: CacheNodeSeedData | null,\n head: React.ReactNode\n): void {\n const isLastSegment = Object.keys(routerState[1]).length === 0\n if (isLastSegment) {\n newCache.head = head\n return\n }\n // Remove segment that we got data for so that it is filled in during rendering of rsc.\n for (const key in routerState[1]) {\n const parallelRouteState = routerState[1][key]\n const segmentForParallelRoute = parallelRouteState[0]\n const cacheKey = createRouterCacheKey(segmentForParallelRoute)\n\n // TODO: We should traverse the cacheNodeSeedData tree instead of the router\n // state tree. Ideally, they would always be the same shape, but because of\n // the loading.js pattern, cacheNodeSeedData sometimes only represents a\n // partial tree. That's why this node is sometimes null. Once PPR lands,\n // loading.js will no longer have special behavior and we can traverse the\n // data tree instead.\n //\n // We should also consider merging the router state tree and the data tree\n // in the response format, so that we don't have to send the keys twice.\n // Then the client can convert them into separate representations.\n const parallelSeedData =\n cacheNodeSeedData !== null && cacheNodeSeedData[1][key] !== undefined\n ? cacheNodeSeedData[1][key]\n : null\n if (existingCache) {\n const existingParallelRoutesCacheNode =\n existingCache.parallelRoutes.get(key)\n if (existingParallelRoutesCacheNode) {\n let parallelRouteCacheNode = new Map(existingParallelRoutesCacheNode)\n const existingCacheNode = parallelRouteCacheNode.get(cacheKey)\n let newCacheNode: CacheNode\n if (parallelSeedData !== null) {\n // New data was sent from the server.\n const seedNode = parallelSeedData[0]\n const loading = parallelSeedData[2]\n newCacheNode = {\n lazyData: null,\n rsc: seedNode,\n // This is a PPR-only field. When PPR is enabled, we shouldn't hit\n // this path during a navigation, but until PPR is fully implemented\n // yet it's possible the existing node does have a non-null\n // `prefetchRsc`. As an incremental step, we'll just de-opt to the\n // old behavior — no PPR value.\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n loading,\n parallelRoutes: new Map(existingCacheNode?.parallelRoutes),\n navigatedAt,\n }\n } else {\n // No data available for this node. This will trigger a lazy fetch\n // during render.\n newCacheNode = {\n lazyData: null,\n rsc: null,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(existingCacheNode?.parallelRoutes),\n loading: null,\n navigatedAt,\n }\n }\n\n // Overrides the cache key with the new cache node.\n parallelRouteCacheNode.set(cacheKey, newCacheNode)\n // Traverse deeper to apply the head / fill lazy items till the head.\n fillLazyItemsTillLeafWithHead(\n navigatedAt,\n newCacheNode,\n existingCacheNode,\n parallelRouteState,\n parallelSeedData ? parallelSeedData : null,\n head\n )\n\n newCache.parallelRoutes.set(key, parallelRouteCacheNode)\n continue\n }\n }\n\n let newCacheNode: CacheNode\n if (parallelSeedData !== null) {\n // New data was sent from the server.\n const seedNode = parallelSeedData[0]\n const loading = parallelSeedData[2]\n newCacheNode = {\n lazyData: null,\n rsc: seedNode,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(),\n loading,\n navigatedAt,\n }\n } else {\n // No data available for this node. This will trigger a lazy fetch\n // during render.\n newCacheNode = {\n lazyData: null,\n rsc: null,\n prefetchRsc: null,\n head: null,\n prefetchHead: null,\n parallelRoutes: new Map(),\n loading: null,\n navigatedAt,\n }\n }\n\n const existingParallelRoutes = newCache.parallelRoutes.get(key)\n if (existingParallelRoutes) {\n existingParallelRoutes.set(cacheKey, newCacheNode)\n } else {\n newCache.parallelRoutes.set(key, new Map([[cacheKey, newCacheNode]]))\n }\n\n fillLazyItemsTillLeafWithHead(\n navigatedAt,\n newCacheNode,\n undefined,\n parallelRouteState,\n parallelSeedData,\n head\n )\n }\n}\n"],"names":["fillLazyItemsTillLeafWithHead","navigatedAt","newCache","existingCache","routerState","cacheNodeSeedData","head","isLastSegment","Object","keys","length","key","parallelRouteState","segmentForParallelRoute","cacheKey","createRouterCacheKey","parallelSeedData","undefined","existingParallelRoutesCacheNode","parallelRoutes","get","parallelRouteCacheNode","Map","existingCacheNode","newCacheNode","seedNode","loading","lazyData","rsc","prefetchRsc","prefetchHead","set","existingParallelRoutes"],"mappings":";;;;+BAOgBA;;;eAAAA;;;sCAFqB;AAE9B,SAASA,8BACdC,WAAmB,EACnBC,QAAmB,EACnBC,aAAoC,EACpCC,WAA8B,EAC9BC,iBAA2C,EAC3CC,IAAqB;IAErB,MAAMC,gBAAgBC,OAAOC,IAAI,CAACL,WAAW,CAAC,EAAE,EAAEM,MAAM,KAAK;IAC7D,IAAIH,eAAe;QACjBL,SAASI,IAAI,GAAGA;QAChB;IACF;IACA,uFAAuF;IACvF,IAAK,MAAMK,OAAOP,WAAW,CAAC,EAAE,CAAE;QAChC,MAAMQ,qBAAqBR,WAAW,CAAC,EAAE,CAACO,IAAI;QAC9C,MAAME,0BAA0BD,kBAAkB,CAAC,EAAE;QACrD,MAAME,WAAWC,IAAAA,0CAAoB,EAACF;QAEtC,4EAA4E;QAC5E,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,0EAA0E;QAC1E,qBAAqB;QACrB,EAAE;QACF,0EAA0E;QAC1E,wEAAwE;QACxE,kEAAkE;QAClE,MAAMG,mBACJX,sBAAsB,QAAQA,iBAAi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