/opt/canhelp/node_modules/next/dist/client/components/router-reducer
NameSizeModeActions
reducers/-0755rm
aliased-prefetch-navigations.d.ts15820644editdlrm
aliased-prefetch-navigations.js93070644editdlrm
aliased-prefetch-navigations.js.map147060644editdlrm
apply-flight-data.d.ts4100644editdlrm
apply-flight-data.js25100644editdlrm
apply-flight-data.js.map34340644editdlrm
apply-router-state-patch-to-tree.d.ts5540644editdlrm
apply-router-state-patch-to-tree.js42150644editdlrm
apply-router-state-patch-to-tree.js.map65150644editdlrm
clear-cache-node-data-for-segment-path.d.ts4560644editdlrm
clear-cache-node-data-for-segment-path.js33620644editdlrm
clear-cache-node-data-for-segment-path.js.map47340644editdlrm
compute-changed-path.d.ts5390644editdlrm
compute-changed-path.js55720644editdlrm
compute-changed-path.js.map84050644editdlrm
create-href-from-url.d.ts1220644editdlrm
create-href-from-url.js7670644editdlrm
create-href-from-url.js.map6010644editdlrm
create-initial-router-state.d.ts13230644editdlrm
create-initial-router-state.js64720644editdlrm
create-initial-router-state.js.map91520644editdlrm
create-router-cache-key.d.ts1720644editdlrm
create-router-cache-key.js13970644editdlrm
create-router-cache-key.js.map14300644editdlrm
fetch-server-response.d.ts19470644editdlrm
fetch-server-response.js147420644editdlrm
fetch-server-response.js.map233660644editdlrm
fill-cache-with-new-subtree-data.d.ts6880644editdlrm
fill-cache-with-new-subtree-data.js54120644editdlrm
fill-cache-with-new-subtree-data.js.map83590644editdlrm
fill-lazy-items-till-leaf-with-head.d.ts5360644editdlrm
fill-lazy-items-till-leaf-with-head.js74660644editdlrm
fill-lazy-items-till-leaf-with-head.js.map97940644editdlrm
handle-mutable.d.ts1910644editdlrm
handle-mutable.js34460644editdlrm
handle-mutable.js.map53900644editdlrm
handle-segment-mismatch.d.ts5360644editdlrm
handle-segment-mismatch.js12370644editdlrm
handle-segment-mismatch.js.map18030644editdlrm
invalidate-cache-below-flight-segmentpath.d.ts4110644editdlrm
invalidate-cache-below-flight-segmentpath.js27890644editdlrm
invalidate-cache-below-flight-segmentpath.js.map39090644editdlrm
invalidate-cache-by-router-state.d.ts3680644editdlrm
invalidate-cache-by-router-state.js14270644editdlrm
invalidate-cache-by-router-state.js.map18640644editdlrm
is-navigating-to-new-root-layout.d.ts1980644editdlrm
is-navigating-to-new-root-layout.js24730644editdlrm
is-navigating-to-new-root-layout.js.map31210644editdlrm
ppr-navigations.d.ts13790644editdlrm
ppr-navigations.js446890644editdlrm
ppr-navigations.js.map706960644editdlrm
prefetch-cache-utils.d.ts18950644editdlrm
prefetch-cache-utils.js159580644editdlrm
prefetch-cache-utils.js.map228050644editdlrm
refetch-inactive-parallel-segments.d.ts18860644editdlrm
refetch-inactive-parallel-segments.js49270644editdlrm
refetch-inactive-parallel-segments.js.map79110644editdlrm
router-reducer-types.d.ts91400644editdlrm
router-reducer-types.js24140644editdlrm
router-reducer-types.js.map98280644editdlrm
router-reducer.d.ts2610644editdlrm
router-reducer.js27870644editdlrm
router-reducer.js.map33100644editdlrm
set-cache-busting-search-param.d.ts15430644editdlrm
set-cache-busting-search-param.js29100644editdlrm
set-cache-busting-search-param.js.map47910644editdlrm
should-hard-navigate.d.ts2170644editdlrm
should-hard-navigate.js16230644editdlrm
should-hard-navigate.js.map20920644editdlrm
Edit: /opt/canhelp/node_modules/next/dist/client/components/router-reducer/should-hard-navigate.js.map (2092B)
{"version":3,"sources":["../../../../src/client/components/router-reducer/should-hard-navigate.ts"],"sourcesContent":["import type {\n FlightRouterState,\n FlightDataPath,\n Segment,\n} from '../../../server/app-render/types'\nimport { getNextFlightSegmentPath } from '../../flight-data-helpers'\nimport { matchSegment } from '../match-segments'\n\n// TODO-APP: flightSegmentPath will be empty in case of static response, needs to be handled.\nexport function shouldHardNavigate(\n flightSegmentPath: FlightDataPath,\n flightRouterState: FlightRouterState\n): boolean {\n const [segment, parallelRoutes] = flightRouterState\n // TODO-APP: Check if `as` can be replaced.\n const [currentSegment, parallelRouteKey] = flightSegmentPath as [\n Segment,\n string,\n ]\n\n // Check if current segment matches the existing segment.\n if (!matchSegment(currentSegment, segment)) {\n // If dynamic parameter in tree doesn't match up with segment path a hard navigation is triggered.\n if (Array.isArray(currentSegment)) {\n return true\n }\n\n // If the existing segment did not match soft navigation is triggered.\n return false\n }\n const lastSegment = flightSegmentPath.length <= 2\n\n if (lastSegment) {\n return false\n }\n\n return shouldHardNavigate(\n getNextFlightSegmentPath(flightSegmentPath),\n parallelRoutes[parallelRouteKey]\n )\n}\n"],"names":["shouldHardNavigate","flightSegmentPath","flightRouterState","segment","parallelRoutes","currentSegment","parallelRouteKey","matchSegment","Array","isArray","lastSegment","length","getNextFlightSegmentPath"],"mappings":";;;;+BASgBA;;;eAAAA;;;mCAJyB;+BACZ;AAGtB,SAASA,mBACdC,iBAAiC,EACjCC,iBAAoC;IAEpC,MAAM,CAACC,SAASC,eAAe,GAAGF;IAClC,2CAA2C;IAC3C,MAAM,CAACG,gBAAgBC,iBAAiB,GAAGL;IAK3C,yDAAyD;IACzD,IAAI,CAACM,IAAAA,2BAAY,EAACF,gBAAgBF,UAAU;QAC1C,kGAAkG;QAClG,IAAIK,MAAMC,OAAO,CAACJ,iBAAiB;YACjC,OAAO;QACT;QAEA,sEAAsE;QACtE,OAAO;IACT;IACA,MAAMK,cAAcT,kBAAkBU,MAAM,IAAI;IAEhD,IAAID,aAAa;QACf,OAAO;IACT;IAEA,OAAOV,mBACLY,IAAAA,2CAAwB,EAACX,oBACzBG,cAAc,CAACE,iBAAiB;AAEpC","ignoreList":[0]}