PageSourceSearch

http://www.clickthecity.com/assets/vendor-router-CaznPqhZ.js

js clickthecity.com collected 2026-10-01 10:24:28 UTC 4,008 bytes, 1 lines download raw bytes

1import{r as a,R as N,s as D,p as F}from"./vendor-BrGQ9Xpj.js";const U=N.useInsertionEffect,A=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",x=A?a.useLayoutEffect:a.useEffect,B=U||x,p=e=>{const t=a.useRef([e,(...n)=>t[0](...n)]).current;return B(()=>{t[0]=e}),t[1]},R=["popstate","pushState","replaceState","hashchange"];let y=[];const w=()=>y.forEach(e=>e()),T=e=>(y.push(e)===1&&R.forEach(t=>addEventListener(t,w)),()=>{y=y.filter(t=>t!==e),y.length||R.forEach(t=>removeEventListener(t,w))}),L=(e,t)=>D.useSyncExternalStore(T,e,t),C=()=>location.search,V=({ssrSearch:e}={})=>L(C,e!=null?()=>e:C),S=()=>location.pathname,z=({ssrPath:e}={})=>L(S,e!=null?()=>e:S),M=(e,{replace:t=!1,state:n=null}={})=>history[t?"replaceState":"pushState"](n,"",e),$=e=>[z(e),M],v=Symbol.for("wouter_v3");if(typeof history<"u"&&typeof window[v]>"u"){for(const e of["pushState","replaceState"]){const t=history[e];history[e]=function(){const n=t.apply(this,arguments),o=new Event(e);return o.arguments=arguments,dispatchEvent(o),n}}Object.defineProperty(window,v,{value:!0})}const b=(e="")=>e==="/"?"":e,q=(e,t)=>e[0]==="~"?e.slice(1):b(t)+e,O=(e,t)=>(e=E(b(e)),t=E(t),!e||!t.toLowerCase().indexOf(e.toLowerCase())?t.slice(e.length)||"/":"~"+t),E=e=>{try{return e.includes("%")?decodeURI(e):e}catch{return e}},G=e=>E(e[0]==="?"?e.slice(1):e),H={hook:$,searchHook:V,parser:F,base:"",ssrPath:void 0,ssrSearch:void 0,ssrContext:void 0,hrefs:e=>e,aroundNav:(e,t,n)=>e(t,n)},I=a.createContext(H),h=()=>a.useContext(I),K={},_=a.createContext(K),J=()=>a.useContext(_),g=(e,t=e.base)=>O(t,e.hook(e)[0]),P=e=>{const[t,n]=e.hook(e);return[O(e.base,t),p((o,r)=>e.aroundNav(n,q(o,e.base),r))]},ne=()=>P(h()),se=()=>{const e=h();return G(e.searchHook(e))},k=(e,t,n,o)=>{const{pattern:r,keys:i}=t instanceof RegExp?{pattern:t}:e(t||"*",o),c=r.exec(n);if(!c)return[!1,null];const u={};for(let s=1;s<c.length;s++)u[s-1]=c[s];if(i)for(let s=0;s<i.length;s++)u[i[s]]=c[s+1];else Object.assign(u,c.groups);return o?[!0,u,c[0]]:[!0,u]},oe=e=>{const t=h(),n=/^~\//.test(e);return k(t.parser,n?e.slice(1):e,g(t,n?"":t.base))},Q=({children:e,...t})=>{const n=h(),o=t.hook?H:n;let r=o;if(t.ssrPath){const[s,f=t.ssrSearch??""]=t.ssrPath.split("?");s&&(t.ssrSearch=f,t.ssrPath=s)}t.hrefs=t.hrefs??t.hook?.hrefs,t.searchHook=t.searchHook??t.hook?.searchHook;let i=a.useRef(o),c=i.current,u=c;for(let s in o){const f=s==="base"?o[s]+(t[s]??""):t[s]??o[s];f!==u[s]&&(c===u&&(i.current=u={...u}),u[s]=f),(f!==o[s]||f!==r[s])&&(r=u)}return a.createElement(I.Provider,{value:r},e)},W=({children:e,component:t},n)=>t?a.createElement(t,{params:n}):typeof e=="function"?e(n):e,X=e=>{let t=a.useRef(K);const n=t.current,o=Object.keys(e);return t.current=o.length!==Object.keys(n).length||o.some(r=>e[r]!==n[r])?e:n},re=({path:e,nest:t,match:n,...o})=>{const r=h(),i=g(r),[c,u,s]=n??k(r.parser,e,i,t),f=X({...J(),...u});if(!c)return null;const d=W(o,f);return a.createElement(_.Provider,{value:f},s?a.createElement(Q,{base:s},d):d)},ce=a.forwardRef((e,t)=>{const n=h(),[o,r]=P(n),{to:i="",href:c=i,onClick:u,asChild:s,children:f,className:d,replace:Y,state:Z,transition:ee,...m}=e;return m.onClick=p(l=>{l.ctrlKey||l.metaKey||l.altKey||l.shiftKey||l.button!==0||(u?.(l),l.defaultPrevented||(l.preventDefault(),r(c,e)))}),m.href=n.hrefs(c[0]==="~"?c.slice(1):n.base+c,n),d!==void 0&&(m.className=d?.call?d(o===c):d),t&&(m.ref=t),s&&a.isValidElement(f)?a.cloneElement(f,m):a.createElement("a",m,f)}),j=(e,t=[])=>{if(Array.isArray(e))for(const n of e)j(n&&n.type===a.Fragment?n.props.children:n,t);else t.push(e);return t},ae=({children:e,location:t})=>{const n=h(),o=g(n);for(const r of j(e)){let i=0;if(a.isValidElement(r)&&(i=k(n.parser,r.props.path,t||o,r.props.nest))[0])return a.cloneElement(r,{match:i})}return null},ue=e=>{const{to:t,href:n=t}=e,o=h(),[,r]=P(o),i=p(()=>r(t||n,e)),{ssrContext:c}=o;return x(()=>{i()},[]),c&&(c.redirectTo=t),null};export{ce as L,re as R,ae as S,ue as a,oe as b,se as c,J as d,ne as u};

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.