PageSourceSearch

https://tbs-akasaka-edo.web.app/assets/home-mfQV4uos.js

js tbs-akasaka-edo.web.app collected 2026-10-03 12:37:31 UTC 15,807 bytes, 36 lines download raw bytes

1import{w as T,b as q,q as t,I as $,T as _,J as U,K as Q,N as V,U as W,V as B,P as G,W as tt,X as K,D as et,Y as nt,s as Z,t as L,x as H,y as R,z as J,Z as ot,$ as st,A as it,v as at}from"./admin-B-F04zSM.js";import{F as rt}from"./FooterNav-DJLrmEdT.js";const ct="data:image/webp;base64,UklGRqILAABXRUJQVlA4WAoAAAAQAAAAqwAAxwAAQUxQSG0DAAABGUVtGzHqeJY/4ZsQIvofAQCz+AhgDThowdp2SJIyC2Pbtm3btm3btj1Xtu25sm0ba3u3uhZZ2X4jI1fvH19kTcQEMHIbSVEy0wNLfVp+gZbmemWUWSpxpZdcIvEk9UF0fiHEMPpNYAKiISkiwsB5H2WSBGnMxihF+aiAJGjIyVzlY8wgIFsq07SCyphQ8GMPPPYthsPKminLjWbqXJQSRmvfuOiAI8JKeVMRkZ8YL6ew4DVTMRpMptBZVwmESkZrEZdx1VdIKBSymAaameVkSmEzEZwxmS3MZCHi8wuBe1tDA5Af3WFkEkL0kZv+oogqMMKNfkFyGoLkvVXIcuJBCaf6kqYHwuSMlZIpASc/6agUAvVDSUiZKT+kbJUUUo5zQcp9v/EAyte+kQBQvpAckeKFlM+5IeUzUPmUC1SIlE9ADR+DGj6iQ8p7UMM7UPH7xwDEGnSWddoFavkF1PADqMHFqm5GhTXYAdNCW2AVrBDqwH4NtKwqO2AgtAOUf2+FfwwMQuj+1nrOs7DvqC3rghB263tfWtf/wtygBg+oIWhZgwvWzWzX78BiB9zfidgCQaBWrM/PyrJO+1jWoCzrZoJ12ha4ttOyTtNufc6TIJGagh3wftKPtmvQ0WZVlC3wPl3Zrtf256CWe6ByF1K+cxlSnrvmG0B54p2bgG75DE/BifoBz8LJYeQln4L5UW01DblCbyDZhSTzuCoWjCf12YybNgGRyTQGcjojGYTb3EOjrWyBj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q/iSVFoAvcv4rKtfbeIpekcbGQHsqqltFC6a3BPbIs4LcTkTrYXgz7gFjzcToQdYPbamDAIqZb3Lz+qwjMSWsWzl080sIVdZ0AWG5OX74eOZJZQbbQbNTRu0ko1iWYhxZwEy4h/tfJdT1egPr9KbJQ9XAgCdysMLDJEkK+XMRYALNMaseEjqKyJBHTV/2xMGFNPIFZz2wq5aaz8ofeBDr/rkFT7onTF1HlZ6wICEs6eyOw9BxxQNQM8DNFR6/C4UJgtwE6NrgCZNfAgfIMAHA7nY/KIm/bDjuJdEIaVmrPSzNSH9/cauYpclWjWA1UWS+vlfSdBZwO8ddFM6DdejQr+DyJMlyHCLX6sM5Ph2xnp7nvZUGaj715i52Cy4f+AFAE/qBKHl71KyoGIXrqlyNCAMeakmD1QA42qad37Shf/CX4spKVxLwLxb4etwFJcOW0U4Y86WaburABT4AFnQghu69BLh0T9oE+4o0cEuTh/OI8wGwKHwmSeim7iRZxA1wLDBF+o8Q7x6ctvBnu71OhZ7c+ikHnGAkKrvZjZnQ73do7A4g2EXdsnz1loKG9M3oKPc4AEEf/PVFfaWwETrSZGBfVzduslZgDgtoji4sinffHYLhMaCVcOJAif7AZI90TX/4lq9f0ohqi9QaoqXUyz1CekJrFSIzpRVnBLtvPJfPMAcj+/ixT1AwZRipnGgUTSjFIWCS4RyKEcL6arGsG3RqNXFaVAPFcXwj9mNYAUwEqLas8BE/bQN7cKt5D994DQMWM2DWzlHGS+tt7SI2NWzDGeZsXhQZJ4av4OOIIvkjn7wbhzwoMjrZxsdX9Oj76ofEVGgavhtbpvobuCeeCbAClK/wf6AZxMdpCTcVqNiM3BSmhAj7rHAUoOr8prU2lyNCCJx6bBdZ+iEkoJMozFTT/gcpnQX9fsqk9NV6/Ou813lX64YPaz5TxxeSr0BxS1IJJDVvho/EbbLqw/ovAFCuR9jKBNXFEwxIWOIsR93TC5wAAAAAA==",lt=30;async function ut(){const F=await Z(),l=H(F),M=R(l,"app","locations"),c=((await J(M)).data?.()??{}).points||{},u=new Date,g=u.getDay(),e=g===0||g===6,i=`${u.getFullYear()}${String(u.getMonth()+1).padStart(2,"0")}${String(u.getDate()).padStart(2,"0")}`,s=["20260226","20260320"].includes(i),p=e||s,f=[];for(const h of Object.keys(c)){const o=c[h],I=Number(h),P=u.getHours(),z=p&&P>=13&&P<17;if(!isNaN(I)&&I>=29&&!z)continue;let m=null,y=null,S;const v=o.route??o.path??null;if(Array.isArray(v)&&v.length>0)try{S=v.map(a=>{if(Array.isArray(a)&&a.length>=2)return[Number(a[0]),Number(a[1])];if(a&&typeof a=="object"){if(a.lat!=null&&a.lng!=null)return[Number(a.lat),Number(a.lng)];if(a.latitude!=null&&a.longitude!=null)return[Number(a.latitude),Number(a.longitude)]}return null}).filter(Boolean)}catch{S=void 0}const r=o.location??o.locationString??o.latlng??o.coords;if(Array.isArray(r)&&r.length>=2)m=Number(r[0]),y=Number(r[1]);else if(typeof r=="string"){const w=r.replace("/",",").split(",").map(j=>j.trim()).filter(Boolean);w.length>=2&&(m=Number(w[0]),y=Number(w[1]))}else r&&typeof r=="object"&&(r.latitude&&r.longitude?(m=Number(r.latitude),y=Number(r.longitude)):r.lat&&r.lng&&(m=Number(r.lat),y=Number(r.lng)));(!m||!y)&&S&&S.length>0&&(m=m||S[0][0],y=y||S[0][1]),f.push({id:String(o.id??h),position:typeof o.position=="number"?o.position:void 0,route:S,type:o.type,timeAttackId:o.timeAttackId??o.timeAttack,lat:m||0,lng:y||0,title:o.name??o.title,description:o.description??o.desc,color:o.color??(o.type==="timeAttack"?"#FFFF00":o.type==="game1"||o.type==="game2"||o.type==="game3"?"green":void 0),iconUrl:o.iconUrl,timeAttackMinutes:(()=>{const a=o.timeAttackMinutes??o.timeAttackMinute??o.timeAttackMin??null;if(a==null)return;const w=Number(a);return isNaN(w)?void 0:w})()})}return f.sort((h,o)=>(h.position??0)-(o.position??0)),f}function dt(){const F=nt(),[l,M]=q.useState(null);if(q.useEffect(()=>{if(!navigator.geolocation)return;const c=navigator.geolocation.watchPosition(u=>{const g=[u.coords.latitude,u.coords.longitude];M(g)},u=>{console.warn("Geolocation error:",u)},{enableHighAccuracy:!0,maximumAge:1e4,timeout:1e4});return()=>{try{navigator.geolocation.clearWatch(c)}catch{}}},[F]),!l)return null;const d=30,b=W.divIcon({html:B.renderToStaticMarkup(t.jsx("div",{style:{lineHeight:0,width:"100%",height:"100%"},children:t.jsx("img",{src:ct,alt:"現在地",width:d,height:d,style:{display:"block",width:"100%",height:"100%",objectFit:"contain"}})})),className:"",iconSize:[d,d],iconAnchor:[d/2,d]});return t.jsx(t.Fragment,{children:t.jsx(Q,{position:l,icon:b,children:t.jsx(V,{offset:[0,-d],children:"現在地"})})})}function pt(){const F=[35.672759012238544,139.73565353516693],{data:l=[],isLoading:M,error:d}=T({queryKey:["locations"],queryFn:ut,staleTime:1/0,refetchOnWindowFocus:!1,refetchOnMount:!1}),b=T({queryKey:["authUser"],queryFn:async()=>{const e=await Z();return L(e).currentUser?.uid??null},staleTime:1e3*60*5,refetchOnWindowFocus:!1,refetchOnMount:!1}),c=T({queryKey:["userDoc",b.data],queryFn:async()=>
1{if(!b.data)return null;const e=await Z(),i=H(e),n=R(i,"users",b.data),s=await J(n);return s.exists()?s.data():null},enabled:!!b.data,staleTime:1e3*60*5,refetchOnWindowFocus:!1}),u=q.useMemo(()=>{const e=c.data;if(!e)return 0;const i=e.stamps??{};return Object.values(i).reduce((n,s)=>n+(s?.ryo??0),0)},[c.data]),g=q.useMemo(()=>{const e={};for(const i of l)i.timeAttackId!=null&&Array.isArray(i.route)&&i.route.length>=2&&(e[String(i.timeAttackId)]=i.route.slice());return e},[l]);return q.useEffect(()=>{const e=setInterval(()=>{const i=document.querySelectorAll(".pin-countdown[data-expiry]"),n=Date.now();i.forEach(s=>{const p=s.getAttribute("data-expiry");if(!p)return;const f=Number(p);if(!f||isNaN(f))return;const h=Math.ceil((f-n)/1e3);if(h<=0){s.textContent="",s.removeAttribute("data-expiry");try{const o=s.closest(".bounce-marker");o&&o.classList&&o.classList.remove("bounce-marker")}catch{}return}if(h>=60){const o=Math.floor(h/60),I=h%60;s.textContent=`${o}分${I}秒`}else s.textContent=`${h}秒`})},1e3);return()=>clearInterval(e)},[]),t.jsxs("div",{style:{width:"100%",height:"100%",borderRadius:6,boxShadow:"0 1px 4px rgba(0,0,0,0.1)"},children:[t.jsx("style",{children:`
2        .bounce-marker svg {
3          transform-origin: 50% 100%;
4          animation: ta-bounce 1.6s ease-in-out infinite;
5        }
6        /* Make the countdown text float together with the bouncing marker */
7        .bounce-marker .pin-countdown {
8          transform-origin: 50% 100%;
9          display: inline-block;
10          animation: ta-bounce 1.6s ease-in-out infinite;
11        }
12        @keyframes ta-bounce {
13          0%,100% { transform: translateY(0); }
14          50% { transform: translateY(-10px); }
15        }
16
17        /* sway: ゆらゆら左右に揺れるアニメーション */
18        .ta-sway svg {
19          transform-origin: 50% 100%;
20          animation: ta-sway 1.2s ease-in-out infinite;
21        }
22        @keyframes ta-sway {
23          0%,100% { transform: translateX(0) rotate(0deg); }
24          25% { transform: translateX(-4px) rotate(0deg); }
25          75% { transform: translateX(4px) rotate(0deg); }
26        }
27        /* pin-countdown の自動高さ・余白調整 */
28        .pin-countdown {
29          display: inline-block;
30          line-height: 1;
31          padding: 4px 8px;
32          min-width: 28px;
33          box-sizing: border-box;
34          white-space: nowrap;
35        }
36      `}),t.jsxs($,{center:F,zoom:17,style:{height:"100%",width:"100%"},children:[t.jsx(_,{attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),t.jsx(dt,{}),!M&&!d&&(()=>{const e=[];for(const n of Object.keys(g)){const s=g[n];!s||s.length<2||e.push(t.jsx(U,{positions:s.map(p=>[p[0],p[1]]),pathOptions:{color:"#FFFF00",weight:7,dashArray:"7 10"},className:"offset-polyline"},`ta-route-${n}`))}const i={};for(const n of l)if(n.type==="timeAttack"&&n.timeAttackId!=null){const s=String(n.timeAttackId);if(g[s])continue;i[s]=i[s]||[],i[s].push({pos:n.position,coord:[n.lat,n.lng]})}for(const n of Object.keys(i)){const s=i[n].slice().sort((p,f)=>(p.pos??0)-(f.pos??0)).map(p=>p.coord);s.length<2||e.push(t.jsx(U,{positions:s,pathOptions:{color:"#FFFF00",weight:7,dashArray:"7 10"},className:"offset-polyline"},`ta-${n}`))}return e})(),M||d?null:l.map((e,i)=>{const n=lt,s=c.data,p=s?.stamps??{},f=String(e.id??""),h=f!==""&&Object.prototype.hasOwnProperty.call(p,f),o=s?.timeAttack??{},I=Date.now(),P={};for(const w of Object.keys(o)){const j=o[w];if(!j)continue;const x=j.arrivedAt;let A=null;if(x==null)A=null;else if(typeof x=="number")A=x;else if(typeof x.toMillis=="function")try{A=x.toMillis()}catch{A=null}else typeof x.seconds=="number"&&(A=x.seconds*1e3);if(A==null)continue;const E=I-A,D=j.pairPosition??j.pairPos??j.pairposition??null;if(D!=null){const N=Number(D),C=l[N],k=C&&typeof C.timeAttackMinutes=="number"&&!isNaN(C.timeAttackMinutes)?Math.max(0,C.timeAttackMinutes*60*1e3):600*1e3;E<=k&&(P[String(D)]={remainingMs:Math.max(0,k-E),windowMs:k})}}const z=P[String(i)],m=z?.remainingMs,y=z?.windowMs,v=["react-leaflet-div-icon",typeof m=="number"&&m>
360&&!h?"bounce-marker":""].filter(Boolean).join(" "),r=e.type=="startGoal"?"スタート&ゴール":e.type==="puzzle"?"謎解き":e.type==="secret"?"謎解き(土日祝限定)":e.type==="quiz"?"江戸クイズ":e.type==="timeAttack"?"タイムアタック":e.type?.match(/^game/)?"体感スマホゲーム":e.type??"",a=t.jsx(Q,{position:[e.lat,e.lng],icon:e.type==="startGoal"?W.divIcon({html:B.renderToStaticMarkup(t.jsx("div",{style:{lineHeight:0},children:t.jsx(G,{size:n,color:e.color??"#ff3b30"})})),className:v,iconSize:[n,n],iconAnchor:[n/2,n]}):e.type==="secret"?W.divIcon({html:B.renderToStaticMarkup(t.jsx("div",{style:{lineHeight:0},children:t.jsx(tt,{size:n,color:e.color??"#460e44"})})),className:[v,"ta-sway"].filter(Boolean).join(" "),iconSize:[n,n],iconAnchor:[n/2,n]}):W.divIcon({html:B.renderToStaticMarkup(t.jsx("div",{style:{lineHeight:0},children:(()=>{const j=c.data?.stamps??{},x=String(e.id??""),A=x!==""&&Object.prototype.hasOwnProperty.call(j,x),E=A?t.jsx(K,{size:n,color:"gray"}):t.jsx(K,{style:{strokeWidth:"15"},size:n,color:e.color??"#ff3b30"}),D=m,N=!A&&typeof D=="number"&&typeof y=="number"?Date.now()+D:null,C=(()=>{if(N==null)return null;const k=Math.ceil((N-Date.now())/1e3);if(k<=0)return null;if(k>=60){const X=Math.floor(k/60),Y=k%60;return`${X}分${Y}秒`}return`${k}秒`})();return t.jsxs("div",{style:{position:"relative",display:"flex",justifyContent:"center"},children:[N?t.jsx("div",{className:"pin-countdown","data-expiry":String(N),style:{position:"absolute",top:"-2rem",background:"rgba(255,255,255,0.95)",color:"red",padding:"4px 8px",borderRadius:999,fontWeight:700,fontSize:20,whiteSpace:"nowrap"},children:C}):null,E]})})()})),className:v,iconSize:[n,n],iconAnchor:[n/2,n]}),children:t.jsxs(V,{offset:[0,-n],children:[t.jsxs("strong",{children:[`${i?`(${i})`:""}${e.title??"地点"}`,t.jsx("br",{}),r]}),t.jsx("div",{children:e.description??""})]})});return t.jsx(et.Fragment,{children:a},e.id)})]}),u>=100&&t.jsx("div",{style:{position:"fixed",top:16,left:0,width:"100%",display:"flex",justifyContent:"center",zIndex:9999,pointerEvents:"none"},children:t.jsxs("div",{className:"mincho",style:{background:"rgba(255,255,255,0.95)",padding:"8px 12px",borderRadius:6,fontWeight:600,fontSize:16,display:"flex",alignItems:"center",color:"#111",maxWidth:"70%",flexWrap:"wrap"},children:[t.jsx("span",{children:"鋼鉄の魔城"}),t.jsx(G,{size:22,color:"#ff3b30"}),t.jsx("span",{children:"に"}),t.jsx("span",{children:"戻"}),t.jsx("span",{children:"り"}),t.jsx("span",{children:"QR"}),t.jsx("span",{children:"コ"}),t.jsx("span",{children:"ー"}),t.jsx("span",{children:"ド"}),t.jsx("span",{children:"を"}),t.jsx("span",{children:"も"}),t.jsx("span",{children:"う"}),t.jsx("span",{children:"一"}),t.jsx("span",{children:"度"}),t.jsx("span",{children:"読"}),t.jsx("span",{children:"み"}),t.jsx("span",{children:"込"}),t.jsx("span",{children:"め"})]})})]})}function ht(){return t.jsx(ot,{to:"/help",title:"ヘルプ","aria-label":"ヘルプ",style:{position:"fixed",right:16,top:"calc(16px + env(safe-area-inset-top))",zIndex:1200,width:32,height:32,display:"flex",alignItems:"center",justifyContent:"center",textDecoration:"none"},children:t.jsx(st,{style:{width:32,height:32,color:"#333"}})})}let O=!1;const gt=it(function(){return q.useEffect(()=>{O||(O=!0,Z().then(l=>{const M=L(l);let d=at(M,b=>{try{d()}catch{}if(b)return;const c=new URL("https://access.line.me/oauth2/v2.1/authorize");c.searchParams.set("response_type","code"),c.searchParams.set("client_id","2009225828");const g=`${location.origin}/callback`,e=Math.random().toString(36).slice(2,12),i=location.pathname+location.search+location.hash,n=`${e}|${encodeURIComponent(i)}`;sessionStorage.setItem("line_oauth_state",e),sessionStorage.setItem("post_login_redirect",i),c.searchParams.set("redirect_uri",g),c.searchParams.set("state",n),c.searchParams.set("scope","openid"),location.href=c.toString()})}).catch(l=>{console.error("failed to init firebase app",l)}))},[]),t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{minHeight:"calc(100dvh - var(--footer-height, 64px))",maxHeight:"calc(100dvh - var(--footer-height, 64px))",height:"calc(100dvh - var(--footer-height, 64px))",overflow:"hidden"},children:t.jsx(pt,{})}),t.jsx(rt,{}),t.jsx(ht,{})]})});export{gt as default};

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.