Rocky_Mountain_Vending/.pnpm-store/v10/files/d6/bb0b238659e5cfbf8a8338f6d85c796cb721a78d8f528544f3cbacffac76bd294a3ba05ed13421660d1fae50c36ec5f483da18b1cfa5cff96929738b938184
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":["createRouterCacheKey","fillLazyItemsTillLeafWithHead","navigatedAt","newCache","existingCache","routerState","cacheNodeSeedData","head","isLastSegment","Object","keys","length","key","parallelRouteState","segmentForParallelRoute","cacheKey","parallelSeedData","undefined","existingParallelRoutesCacheNode","parallelRoutes","get","parallelRouteCacheNode","Map","existingCacheNode","newCacheNode","seedNode","loading","lazyData","rsc","prefetchRsc","prefetchHead","set","existingParallelRoutes"],"mappings":"AAKA,SAASA,oBAAoB,QAAQ,4BAA2B;AAEhE,OAAO,SAASC,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,WAAWf,qBAAqBc;QAEtC,4EAA4E;QAC5E,2EAA2E;QAC3E,wEAAwE;QACxE,wEAAwE;QACxE,0EAA0E;QAC1E,qBAAqB;QACrB,EAAE;QACF,0EAA0E;QAC1E,wEAAwE;QACxE,kEAAkE;QAClE,MAAME,mBACJV,sBAAsB,QAAQA,iBAAiB,C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