(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1718],{7720:(e,t,r)=>{"use strict";r.d(t,{T:()=>s});var o=r(80074),n=r(91845);let s={locale:(0,o.eU)(n.q)}},11548:()=>{},14749:(e,t,r)=>{"use strict";r.d(t,{H:()=>i});var o=r(95155);r(12115);var n=r(8492);function s(e){let{className:t,children:r,color:s="inherit",position:a="absolute",sx:i}=e;return(0,o.jsx)(n.A,{className:t,color:s,position:a,sx:i,children:r})}var a=r(88294);function i(e){let{left:t,center:r,right:n,sx:i}=e;return(0,o.jsxs)(s,{position:"fixed",sx:{zIndex:a.R.position.zIndex.applicationBar,"&.MuiAppBar-root":{boxShadow:"none"},flexDirection:"row",justifyContent:"space-between",alignItems:"center",padding:" 24px 1% 0 1%",borderBottom:"1px solid #D9D9D9",backgroundColor:"var(--color-background)",...i},children:[null!=t?t:(0,o.jsx)("div",{children:"\xa0"}),null!=r?r:(0,o.jsx)("div",{children:"\xa0"}),null!=n?n:(0,o.jsx)("div",{children:"\xa0"})]})}},20547:(e,t,r)=>{"use strict";r.d(t,{J:()=>o});let o="reset-stops-on-search-nav"},22501:(e,t,r)=>{"use strict";r.d(t,{t:()=>s});var o=r(95155);r(12115);var n=r(75970);function s(e){let{className:t,component:r="div",elevation:s,sx:a,children:i}=e;return(0,o.jsx)(n.A,{className:t,component:r,elevation:s,sx:a,children:i})}},23188:(e,t,r)=>{"use strict";r.d(t,{ErrorProvider:()=>M});var o=r(95155),n=r(12115),s=r(73909),a=r(77202),i=r(80074),c=r(97129);function l(){let e=(0,a.md)(c.N.errorState);return{errorState:e,setErrorState:(0,a.Xr)((0,i.eU)(null,(e,t,r)=>{let{error:o,errorMessage:n}=r;t(c.N.errorState,{error:o,errorMessage:n,timestamp:Date.now()})})),resetErrorState:(0,a.Xr)((0,i.eU)(null,(e,t)=>{t(c.N.errorState,{error:null,errorMessage:null,timestamp:void 0})}))}}var u=r(20063),d=r(87094),p=r(46985),h=r(92840),m=r(84161),f=r(97951);function v(){let{t:e}=(0,h.PZ)();return(0,o.jsx)(f.E,{description:e("error.bad-request.description"),title:e("error.bad-request.title")})}function x(){let{t:e}=(0,h.PZ)();return(0,o.jsx)(f.E,{description:e("error.forbidden.description"),title:e("error.forbidden.title")})}function g(){let{t:e}=(0,h.PZ)();return(0,o.jsx)(f.E,{description:e("error.internal-server-error.description"),title:e("error.internal-server-error.title")})}var b=r(38645);function j(){let{t:e}=(0,h.PZ)();return(0,o.jsx)(f.E,{description:e("error.unauthorized.description"),title:e("error.unauthorized.title")})}class E extends n.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){let{onResetError:r}=e,{error:o}=t;return o&&e.pathname!==t.previousPathname?(r&&r(),{error:null,previousPathname:e.pathname}):t}componentDidCatch(e,t){d.K.isProd||console.error("ErrorBoundary caught an error:",e);let{onTriggerError:r}=this.props;r&&r(e,"")}render(){let{error:e}=this.state,{children:t}=this.props;if(e){let t=(0,o.jsx)(g,{});return e instanceof p.v7&&(t=(0,o.jsx)(v,{})),e instanceof p.D_&&(t=(0,o.jsx)(j,{})),e instanceof p.qQ&&(t=(0,o.jsx)(x,{})),e instanceof p.m_&&(t=(0,o.jsx)(b.Q,{})),(0,o.jsx)(m.x,{children:t})}return t}constructor(e){super(e),this.state={error:null,previousPathname:e.pathname}}}function S(e){let{children:t}=e,r=(0,u.usePathname)(),{triggerError:n,resetError:s}=(0,h.pu)();return(0,o.jsx)(E,{pathname:r,onResetError:s,onTriggerError:n,children:t})}var y=r(77567),C=r(55401);function k(e){let{onClose:t}=e,{errorState:r}=l(),{error:s,errorMessage:a}=r,i=(0,n.useMemo)(()=>!!s&&!!a,[s,a]);return(0,o.jsx)(C.z,{autoHideDuration:y.k.defaultAutoHideDuration,message:a,open:i,severity:"error",onClose:t})}function w(e){let{children:t}=e,{errorState:r,setErrorState:a,resetErrorState:i}=l(),{error:c,errorMessage:u}=r,d=(0,n.useCallback)((e,t)=>{a({error:e,errorMessage:t})},[a]),p=(0,n.useCallback)(()=>{i()},[i]),h=(0,n.useMemo)(()=>({error:c,errorMessage:u,triggerError:d,resetError:p}),[c,u,d,p]);return(0,o.jsxs)(s.Y.Provider,{value:h,children:[(0,o.jsx)(S,{children:t}),(0,o.jsx)(k,{onClose:p})]})}function M(e){let{children:t}=e;return(0,o.jsx)(w,{children:t})}},25803:(e,t,r)=>{"use strict";r.d(t,{IB:()=>s,RH:()=>n,q:()=>a,ts:()=>o});let o="ja",n="en",s=[o,n],a=o},34198:(e,t,r)=>{"use strict";r.d(t,{MaintenanceGuard:()=>i});var o=r(12115),n=r(20063),s=r(76767);let a="/maintenance";function i(e){var t;let{children:r}=e,i=null!=(t=(0,n.usePathname)())?t:"/",c=i===a||i==="".concat(a,"/"),l=s.q.maintenanceMode&&!c,u=!s.q.maintenanceMode&&c;return((0,o.useEffect)(()=>{l?window.location.replace("".concat(a,"/")):u&&window.location.replace("/")},[l,u]),l||u)?null:r}},38645:(e,t,r)=>{"use strict";r.d(t,{Q:()=>a});var o=r(95155),n=r(92840),s=r(97951);function a(){let{t:e}=(0,n.PZ)();return(0,o.jsx)(s.E,{description:e("error.not-found.description"),title:e("error.not-found.title")})}},44330:(e,t,r)=>{"use strict";r.d(t,{r9:()=>u,sq:()=>l,H4:()=>c});var o=r(80074),n=r(87094);let s={badRequestErrorMessage:"リクエストが無効です。",unauthorizedErrorMessage:"認証が必要です。",forbiddenErrorMessage:"アクセス権限がありません。",internalServerErrorMessage:"サーバーエラーが発生しました。",httpErrorMessage:"エラーが発生しました。"};var a=r(46985),i=r(97129);let c=(e,t)=>{n.K.isProd;let r="Unknown Error";e instanceof a.v7?(r=s.badRequestErrorMessage,console.warn("Bad Request Error:",e.message,{context:t})):e instanceof a.D_?(r=s.unauthorizedErrorMessage,console.error("Unauthorized Error:",e.message,{context:t})):e instanceof a.qQ?(r=s.forbiddenErrorMessage,console.error("Forbidden Error:",e.message,{context:t})):e instanceof a.PO?(r=s.internalServerErrorMessage,console.error("Internal Server Error:",e.message,{context:t})):e instanceof a.j$?(r=s.httpErrorMessage,console.error("Http Error:",e.message,{context:t})):console.error("Unexpected Error:",e.message,{context:t}),(0,o.zp)().set(i.N.errorState,{error:e,errorMessage:r})},l=async(e,t)=>{try{return await e()}catch(e){return c(e,t),null}},u=async(e,t)=>l(e,"API: ".concat(t||"unknown"))},46141:(e,t,r)=>{"use strict";r.d(t,{StyleProvider:()=>l});var o=r(95155),n=r(74286),s=r(22390),a=r(16650),i=r(97533);function c(e){let{children:t}=e,r=(0,n.A)({key:"css",prepend:!0}),c=(0,a.A)();return(0,o.jsx)(s.C,{value:r,children:(0,o.jsx)(i.A,{theme:c,children:t})})}function l(e){let{children:t}=e;return(0,o.jsx)(c,{children:t})}},46985:(e,t,r)=>{"use strict";r.d(t,{v7:()=>o,Qy:()=>l,qQ:()=>s,j$:()=>c,PO:()=>i,m_:()=>a,D_:()=>n});class o extends Error{constructor(e="Bad Request"){super(e),this.statusCode=400,this.name="BadRequestError"}}class n extends Error{constructor(e="Unauthorized"){super(e),this.statusCode=401,this.name="UnauthorizedError"}}class s extends Error{constructor(e="forbidden"){super(e),this.statusCode=403,this.name="ForbiddenError"}}class a extends Error{constructor(e="not found"){super(e),this.statusCode=404,this.name="NotFoundError"}}class i extends Error{constructor(e="internal server error"){super(e),this.statusCode=500,this.name="InternalServerError"}}class c extends Error{constructor(e,t){super(t),this.name="HttpError",this.statusCode=e}}class l extends Error{constructor(e="Bookmark limit exceeded"){super(e),this.statusCode=400,this.name="BookmarkLimitError"}}},50477:()=>{},52869:(e,t,r)=>{"use strict";r.d(t,{Rq:()=>s,af:()=>n});var o=r(60316);function n(e){return{oauth_consumer_key:e,oauth_nonce:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:32,t="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789",r="";for(let o=0;o4&&void 0!==arguments[4]?arguments[4]:"",a=Object.keys(r).sort().map(e=>{var t;return"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(null!=(t=r[e])?t:""))}).join("&"),i=[e.toUpperCase(),encodeURIComponent(t),encodeURIComponent(a)].join("&"),c="".concat(encodeURIComponent(n),"&").concat(encodeURIComponent(s)),l=o.HmacSHA1(i,c);return o.enc.Base64.stringify(l)}},55401:(e,t,r)=>{"use strict";r.d(t,{z:()=>u});var o=r(95155);r(12115);var n=r(14909),s=r(86498),a=r(42262);function i(e){let{className:t,sx:r,open:n,anchorOrigin:s={vertical:"bottom",horizontal:"center"},autoHideDuration:i=null,onClose:c,children:l}=e;return(0,o.jsx)(a.A,{className:t,anchorOrigin:s,autoHideDuration:i,open:n,sx:r,onClose:c,children:l})}var c=r(88294);let l={success:{color:"#007A7A",backgroundColor:"#e6eee8"},error:{color:"#C9312D",backgroundColor:"#efe6e6"},warning:{color:"#EAA221",backgroundColor:"#f1eeed"},info:{color:"#2871A5",backgroundColor:"#e8eef2"}};function u(e){let{open:t,autoHideDuration:r=null,message:a,onClose:u,action:d,severity:p="success"}=e;return(0,o.jsx)(i,{anchorOrigin:{vertical:"bottom",horizontal:"center"},autoHideDuration:r,open:t,sx:{backgroundColor:"transparent",zIndex:c.R.position.zIndex.snackbar,marginBottom:"100px"},onClose:u,children:(0,o.jsxs)("div",{className:"relative rounded-sm px-6 py-4 text-center",style:{backgroundColor:l[p].backgroundColor},children:[u&&(0,o.jsx)("div",{className:"absolute right-0 top-0",children:(0,o.jsx)(s.K,{onClick:u,children:(0,o.jsx)(n.I,{name:"cross",color:"black",opacity:"medium"})})}),(0,o.jsx)("p",{className:"py-6",children:a}),d&&(0,o.jsx)("span",{style:{color:l[p].color},children:d})]})})}},58845:(e,t,r)=>{"use strict";r.d(t,{LocaleProvider:()=>c});var o=r(95155),n=r(12115),s=r(91305),a=r(77202),i=r(7720);function c(e){let{locale:t,dictionary:r,children:c}=e,{setLocale:l}={locale:(0,a.md)(i.T.locale),setLocale:(0,a.Xr)(i.T.locale)};(0,n.useEffect)(()=>{l(t)},[t,l]);let u=(0,n.useMemo)(()=>function(e){var t;return null!=(t=r[e])?t:e},[r]),d=(0,n.useMemo)(()=>({locale:t,t:u}),[t,u]);return(0,o.jsx)(s.I.Provider,{value:d,children:c})}},63639:(e,t,r)=>{"use strict";r.d(t,{y:()=>f});var o=r(95155),n=r(12115),s=r(20063),a=r(92840),i=r(20547),c=r(69553),l=r(94520);function u(e){let{className:t,component:r="div",actions:n,showLabels:s=!0,sx:a,value:i,onChange:u}=e;return(0,o.jsx)(c.A,{className:t,component:r,showLabels:s,sx:a,value:i,onChange:(e,t)=>{u(t)},children:n.map(e=>(0,o.jsx)(l.A,{icon:e.icon,label:e.label,value:e.value},e.value))})}var d=r(14909),p=r(22501),h=r(88294);let m=["originStop","destinationStop","stopPlatform","trip","route"];function f(){let e=(0,s.useRouter)(),t=(0,s.usePathname)(),r=(0,s.useSearchParams)(),{locale:c,t:l}=(0,a.PZ)(),[f,v]=(0,n.useState)("search"),x=(0,n.useMemo)(()=>[{label:l("navigation.search.label"),value:"",icon:(0,o.jsx)(d.I,{name:"text",color:"inherit",fill:"currentColor"})},{label:l("navigation.search-nearby.label"),value:"search-nearby",icon:(0,o.jsx)(d.I,{name:"focus",color:"inherit",fill:"currentColor"})},{label:l("navigation.search-by-route.label"),value:"search-by-route",icon:(0,o.jsx)(d.I,{name:"route",color:"inherit",fill:"currentColor"})},{label:l("navigation.support.label"),value:"support",icon:(0,o.jsx)(d.I,{name:"other",color:"inherit",fill:"currentColor"})}],[l]),g=(0,n.useCallback)(e=>{let t="/".concat(c);if(""!==e&&(t+="/".concat(e)),r){let o=new URLSearchParams((null==r?void 0:r.toString())||"");m.forEach(e=>{o.delete(e)});let n=o.toString();n&&""===e&&(t+="?".concat(n))}return t},[c,r]);(0,n.useEffect)(()=>{let e=t.startsWith("/".concat(c,"/"))?t.slice(c.length+2):"home";e.endsWith("/")&&(e=e.slice(0,-1)),e.includes("search-by-route")&&(e="search-by-route"),v(e)},[t,c]),(0,n.useEffect)(()=>{x.forEach(t=>{let r=g(t.value);e.prefetch(r)})},[e,x,g]);let b=(0,n.useCallback)(r=>{v(r);let o=new RegExp("^/".concat(c,"/(trips(/detail)?|search-nearby|search-by-route(/stops)?)/?$")).test(t);""===r&&o&&sessionStorage.setItem(i.J,"1");let n=x.find(e=>e.value===r),s=g((null==n?void 0:n.value)||"");e.push(s)},[e,x,g,c,t]);return(0,o.jsx)(p.t,{elevation:1,sx:{position:"fixed",bottom:0,left:0,right:0,zIndex:h.R.position.zIndex.bottomNavigation},children:(0,o.jsx)(u,{actions:x,sx:{height:79,"& .MuiButtonBase-root.Mui-selected":{color:"var(--color-kobe-green)",borderTop:"3px solid var(--color-kobe-green)"}},value:f,onChange:e=>b(e)})})}},72557:(e,t,r)=>{"use strict";r.d(t,{E:()=>c});var o=r(95155),n=r(12115),s=r(20063),a=r(14909),i=r(86498);function c(){let e=(0,s.useRouter)(),[t,r]=(0,n.useState)(!1);(0,n.useEffect)(()=>{window.history.length>2&&r(!0)},[]);let c=(0,n.useCallback)(()=>{e.back()},[e]);return(0,o.jsx)("div",{className:"w-3/12",children:t&&(0,o.jsx)(i.K,{onClick:c,children:(0,o.jsx)(a.I,{name:"return",color:"black",opacity:"high"})})})}},73483:()=>{},76767:(e,t,r)=>{"use strict";r.d(t,{q:()=>o});let o={maintenanceMode:!1,maintenanceScheduledEndAt:"Tue, 2025-09-30 14:00",findBusStopsByNameLimit:30,findBusStopsByNameDebounceMsec:300,findBusStopsByRouteIdDebounceMsec:300,findBusTripsPastMinutes:60,nearbyBusStopDistanceLimitMeters:500,busTripAutoUpdateIntervalSec:30,maxBusStopSuggestions:10,maxNearestBusStops:20,maxBusStopTimes:10,maxBookmarks:10,accordionTransitionExpandMsec:0,accordionTransitionCollapseMsec:0,externalNewsPageUrl:"https://kotsu.city.kobe.lg.jp",externalPolicyPageUrl:"https://www.city.kobe.lg.jp/a57337/homepage/p_policy.html"}},77567:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});let o={defaultSeverity:"info",defaultAutoHideDuration:6e3}},82104:(e,t,r)=>{"use strict";r.d(t,{GeolocationProvider:()=>f});var o=r(95155),n=r(12115);let s={geolocationNotSupported:"Geolocation is not supported"};var a=r(44330),i=r(76669),c=r(87094),l=r(46985),u=r(52869);async function d(e,t,r){let o=new URL("".concat(c.K.itsMo.webApiBaseUrl).concat(t)),n=c.K.itsMo.apiKey||"",s=c.K.itsMo.apiSecret||"",a=(0,u.af)(n),i=Object.assign(r,{if_clientid:c.K.itsMo.apiKey||"",if_auth_type:"oauth"}),d={...a,...i},p=(0,u.Rq)(e,o.toString(),d,s);d.oauth_signature=p,"GET"===e&&(o.search=new URLSearchParams(d).toString());let h=await fetch(o);if(!h.ok){if(400===h.status)throw new l.v7("バリデーションエラーが発生しました");if(401===h.status)throw new l.D_("認証に失敗しました");if(403===h.status)throw new l.qQ("アクセスが禁止されています");if(500===h.status)throw new l.PO("サーバーエラーが発生しました");throw new l.j$(h.status,h.statusText)}return await h.json()}async function p(e){let t={latlon:"".concat(e.latitude,",").concat(e.longitude)};return await d("GET","/zmaps/api/apicore/core/v1_0/location",t)}async function h(e){return await p(e).then(e=>e[0]&&e[0].address&&e[0].address.parts?e[0].address.parts:[]).catch(e=>{throw e})}function m(e){let{children:t}=e,[r,c]=(0,n.useState)([]),[l,u]=(0,n.useState)(""),[d,p]=(0,n.useState)(null),[m,f]=(0,n.useState)(null),[v,x]=(0,n.useState)(!1);(0,n.useEffect)(()=>{"geolocation"in navigator||console.warn(s.geolocationNotSupported)},[]),(0,n.useEffect)(()=>{if(!d||!m)return;let e=function(e){let{latitude:t,longitude:r}=e;return{latitude:t+106961e-9*t-17467e-9*r-.004602017,longitude:r+46047e-9*t+83049e-9*r-.010041046}}({latitude:d,longitude:m});(async()=>{let t=await (0,a.sq)(()=>h({latitude:e.latitude.toString(),longitude:e.longitude.toString()}),"getAddressByPosition");t&&(u(t.slice(0,3).join("")),c(t))})()},[d,m]);let g=(0,n.useCallback)(()=>{x(!1),(e=>{let{success:t,error:r,options:o}=e;navigator.geolocation.getCurrentPosition(t,r,o)})({success:e=>{p(e.coords.latitude),f(e.coords.longitude),x(!1)},error:e=>{console.error(e),e.code===e.PERMISSION_DENIED&&x(!0)},options:{enableHighAccuracy:!0}})},[]),b=(0,n.useMemo)(()=>d&&m?{latitude:d,longitude:m}:null,[d,m]),j=(0,n.useMemo)(()=>d&&m?"".concat(d.toFixed(6),",").concat(m.toFixed(6)):"",[d,m]),E=(0,n.useMemo)(()=>({address:l,addressParts:r,position:b,getPosition:g,isPermissionDenied:v}),[l,r,v,j]);return(0,o.jsx)(i.W.Provider,{value:E,children:t})}function f(e){let{children:t}=e;return(0,o.jsx)(m,{children:t})}},84161:(e,t,r)=>{"use strict";r.d(t,{x:()=>c});var o=r(95155);r(12115);var n=r(63639),s=r(14749),a=r(72557);function i(){return(0,o.jsx)(s.H,{left:(0,o.jsx)(a.E,{})})}function c(e){let{children:t}=e;return(0,o.jsxs)("div",{children:[(0,o.jsx)(i,{}),(0,o.jsx)("div",{className:"mx-auto py-26 min-h-screen flex items-center justify-center",children:t}),(0,o.jsx)(n.y,{})]})}},86498:(e,t,r)=>{"use strict";r.d(t,{K:()=>s});var o=r(95155);r(12115);var n=r(24288);function s(e){let{className:t,disabled:r=!1,sx:s,size:a,onClick:i,children:c}=e;return(0,o.jsx)(n.A,{className:t,disabled:r,size:a,sx:s,type:"button",onClick:i,children:c})}},87094:(e,t,r)=>{"use strict";r.d(t,{K:()=>s});var o=r(95704);let n="production",s={nodeEnv:n,isDev:"development"===n,isProd:"production"===n,appUrl:"https://kotsucitykobe.bus-service.jp",appVersion:"20260724_MCAPP_バス位置情報連携対応版",mobustation:{apiKey:"4jBS0SVkRH1NZjnlE0Tj57EarJFami386LFCQCSy",apiBaseUrl:"https://kobe-mobustaapi.mcapps.jp"},itsMo:{apiKey:"JSZd30cc314d4bf|4pZqo",apiSecret:"vpyRUXm8kVWJiVyHT8QIpfcAOFY",webApiBaseUrl:"https://core.its-mo.com",jsApiBaseUrl:"https://api.its-mo.com"},google:{tagManagerId:"GTM-MZBGV4TV",adsensePublisherId:o.env.NEXT_PUBLIC_GOOGLE_ADSENSE_PUBLISHER_ID}}},91845:(e,t,r)=>{"use strict";r.d(t,{q:()=>n,y1:()=>o});let o=r(25803).ts,n=o},93836:()=>{},97129:(e,t,r)=>{"use strict";r.d(t,{N:()=>o});let o={errorState:(0,r(80074).eU)({error:null,errorMessage:null,timestamp:void 0})}},97951:(e,t,r)=>{"use strict";r.d(t,{E:()=>n});var o=r(95155);function n(e){let{title:t,description:r,action:n}=e;return(0,o.jsxs)("div",{className:"text-center px-8",children:[(0,o.jsx)("h2",{className:"text-xl font-bold mb-5",children:t}),r&&(0,o.jsx)("p",{className:"max-w-100 text-left text-sm",children:r}),n&&(0,o.jsx)("div",{children:n})]})}}}]);