1try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`38e31a58-c855-4957-a702-b8cacac3196b`,e._sentryDebugIdIdentifier=`sentry-dbid-38e31a58-c855-4957-a702-b8cacac3196b`)}catch{}import{o as e}from"./chunk-DzYj8TJc.js";import{t}from"./react-Dw1lVNpL.js";import{t as n}from"./useRouter-Ba3CWQZf.js";import{t as r}from"./useRouteContext-whUmRexs.js";import{t as i}from"./geoView-DpgG7-46.js";import{t as a}from"./useGeoView-C_AwWX9O.js";import{n as o,t as s}from"./useGeoLinkParams-D2zsVbNj.js";import{t as c}from"./useBookingLink-CdCVk4HP.js";import{t as l}from"./locationRedirect-_ZTSg6CM.js";var u=e(t(),1),d={"/sandbox-socials":`/{-$marketGroup}/{-$market}/{-$store}/sandbox-socials`,"/location":`/{-$marketGroup}/{-$market}/{-$store}/location`,"/booking":`/{-$marketGroup}/{-$market}/{-$store}/booking`,"/checkout":`/{-$marketGroup}/{-$market}/{-$store}/checkout/$url`,"/private-events":`/{-$marketGroup}/{-$market}/{-$store}/private-events`,"/subscription":`/{-$marketGroup}/{-$market}/{-$store}/subscription`,"/gift-voucher":`/{-$marketGroup}/{-$market}/{-$store}/gift-voucher`,"/giftvoucher":`/{-$marketGroup}/{-$market}/{-$store}/gift-voucher`,"/gift-card":`/{-$marketGroup}/{-$market}/{-$store}/gift-card`},f=Object.keys(d);function p(e){if(!e||!e.startsWith(`/`)||e.startsWith(`//`))return{root:void 0,rest:``,search:void 0};let[t,n]=e.split(`#`,2),[r,i]=t.split(`?`),a=f.find(e=>r===e||r.startsWith(`${e}/`)),o=i?Object.fromEntries(new URLSearchParams(i)):void 0;return{root:a,rest:a?r.slice(a.length):``,search:o,...n?{hash:n}:{}}}function m(e,t){let n=e[t];for(;n;){let e=n.options?.staticData?.geoUrlMask;if(e)return e;n=n.parentRoute}}function h(e,{search:t}={}){let f=p(e),h=t?JSON.stringify(t):``,g=(0,u.useMemo)(()=>{let e={...f.search,...h?JSON.parse(h):{}};return Object.keys(e).length>0?e:void 0},[e,h]),_=c({search:g}),v=a(),{marketList:y}=r({from:`__root__`}),b=n();return(0,u.useMemo)(()=>{let t={to:e??``,isGeoAware:!1};if(!f.root)return t;let n=f.hash?{hash:f.hash}:{},r=`${f.root}${f.rest}`;if(f.rest&&b.routesByPath[r])return t;let a=`${r}${g?`?${new URLSearchParams(g).toString()}`:``}${f.hash?`#${f.hash}`:``}`,c=`${d[f.root]}${f.rest}`;if(f.root===`/booking`&&!f.rest)return{to:_.to,params:_.params,search:g,...n,isGeoAware:!0};let u=m(b.routesByPath,c),p=s(i(o(v),u,y));if(f.root===`/sandbox-socials`&&!p.store)return{to:l(a,!0),isGeoAware:!0};if(f.root===`/checkout`){let e=f.rest.replace(/^\//,``);return!e||e.includes(`/`)?t:{to:d[`/checkout`],params:{...p,url:e},search:g,...n,isGeoAware:!0}}let h=o(v),x=(h.store?.market??h.market)?.newMarketUrl;return{to:c,params:p,search:f.root===`/gift-card`&&!f.rest&&x?{...g,giftCardMarket:x}:g,...n,isGeoAware:!0}},[f.hash,f.root,f.rest,e,_,g,b,v,y])}export{h as t};
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.