PageSourceSearch

https://petwellhk.com/assets/RestaurantsByArea-DFQTWAH3.js

js petwellhk.com collected 2026-10-06 05:23:07 UTC 11,202 bytes, 1 lines download raw bytes

1import{p as C,r as p,j as a,N as H,L as y}from"./react-vendor-BDHNqS4B.js";import{b as U}from"./Header-BkbupWq-.js";import{F as B}from"./Footer-CtylQEAH.js";import{u as M,P as W}from"./useNearbyPlaceSearch-x_utv8ac.js";import{F as _}from"./FehdPetFriendlyDirectory-r9MKUtlq.js";import{r as K,a as N,R as Z,b as Q}from"./RestaurantListInfiniteLoader-C6rlaODV.js";import{a as V}from"./useRestaurants-DQ6cKGMa.js";import{u as Y}from"./useSearchQueryFromUrl-jHjzcbFS.js";import{u as $}from"./useSEO-CoArDrdl.js";import{g as z}from"./availableHours-DsyGI15X.js";import{g as G}from"./distance-Bwcv1qLg.js";import{u as T}from"./main-m_sUF2N4.js";import"./amplify-DYDcjoow.js";import"./chevron-right-CpkQxGj-.js";import"./check-DS0-tR9o.js";import"./tag-D40gy_Nl.js";import"./query-7-WHkg5t.js";import"./textarea-D7qsgB_p.js";import"./reportService-tEzofQZ6.js";import"./phone-B2rvvDkK.js";import"./type-CVgQCqWZ.js";import"./FAQSection-CoCzp6cx.js";import"./accordion-DxrqSPr2.js";import"./index-BZFL-brE.js";import"./DirectAnswerBox-Bx52E2kD.js";import"./card-U4xgiZnN.js";import"./lock-CHPI1fFl.js";import"./DiscoverPlaceTabs-DPoC_wAS.js";import"./AppDownloadCTA-DAEixTy3.js";import"./shield-check-we62WOC3.js";import"./search-BSw3vufk.js";import"./sliders-horizontal-zztTPW4P.js";import"./badge-BYBBu8xB.js";import"./select-fZgDq8v8.js";import"./index-CFf87M6S.js";import"./chevron-up-Cb9C18fB.js";import"./info-DIDAIaTg.js";import"./RestaurantImage-CN6NkWJn.js";import"./hongKongDistricts--r8_jlh4.js";import"./RestaurantVerificationBadge-BvUGD2EG.js";import"./PetWellVerifiedBadge-DpC4-twT.js";import"./triangle-alert-1QSShUG6.js";import"./restaurantApi-J7TAaZ7f.js";import"./placeSearchConfig-BfT0dFXT.js";import"./PremiumPartnerBadge-Vc4azdA6.js";import"./coffee-DvdZrCo4.js";import"./door-open-DBssRldx.js";import"./calendar-check-D9qQBLib.js";import"./star-Dim9pf51.js";import"./clock-CRHi7pcr.js";function J(m,e){return e==="離島"?"新界區":e==="香港"?"港島區":e==="九龍"?"九龍區":"新界區"}const zt=()=>{const{areaSlug:m}=C(),e=K(m),{t,i18n:h}=T(),c=h.language==="en",[d,f]=p.useState(!1),[u,o]=p.useState(!1),[b,x]=Y(),n=M(),R=p.useMemo(()=>{const r={verifiedOnly:!0,keyword:b,indoorAllowed:d,walkInAllowed:u};if((e==null?void 0:e.type)==="region")r.region=e.region.filterRegion;else if((e==null?void 0:e.type)==="district"){const l=e.district.filterValues.filter(g=>/[\u4e00-\u9fff]/.test(g));r.selectedDistricts=l.length>0?l:[e.district.labelZh]}return n.nearbyActive&&n.coords&&(r.location=n.coords,r.sortMethod="location"),r},[e,b,d,u,n.nearbyActive,n.coords]),{restaurants:i,isLoading:j,error:v,hasNextPage:L,fetchNextPage:k,isFetchingNextPage:E}=V(R,h.language),s=p.useMemo(()=>{if(!e||e.type==="index")return{title:t("restaurants.districtPage.indexSeoTitle"),description:t("restaurants.districtPage.indexSeoDescription"),keywords:t("restaurants.districtPage.indexSeoKeywords"),canonicalUrl:"https://petwellhk.com/pet-friendly-restaurants/districts/",pageTitle:t("restaurants.districtPage.indexTitle"),subtitle:t("restaurants.districtPage.indexSubtitle"),areaLabel:"",regionLabel:""};if(e.type==="district"){const l=c?e.district.labelEn:e.district.labelZh,g=c?e.district.regionLabelEn:e.district.regionLabelZh;return{title:t("restaurants.districtPage.seoTitle",{district:l}),description:t("restaurants.districtPage.seoDescription",{district:l,count:i.length,region:g}),keywords:t("restaurants.districtPage.seoKeywords",{district:l,region:g}),canonicalUrl:`https://petwellhk.com/pet-friendly-restaurants/${e.district.slug}/`,pageTitle:t("restaurants.districtPage.pageTitle",{district:l}),subtitle:t("restaurants.districtPage.subtitle",{district:l,region:g}),areaLabel:l,regionLabel:g,district:e.district}}const r=c?e.region.labelEn:e.region.labelZh;return{title:t("restaurants.regionPage.seoTitle",{region:r}),description:t("restaurants.regionPage.seoDescription",{region:r,count:i.length}),keywords:t("restaurants.regionPage.seoKeywords",{region:r}),canonicalUrl:`https://petwellhk.com/pet-friendly-restaurants/${e.region.slug}/`,pageTitle:t("restaurants.regionPage.pageTitle",{region:r}),subtitle:t("restaurants.regionPage.subtitle",{region:r}),areaLabel:r,regionLabel:r}},[e,i.length,c,t]),P=p.useMemo(()=>
1{if((e==null?void 0:e.type)==="index")return[{question:t("restaurants.districtPage.indexFaq.q1"),answer:t("restaurants.districtPage.indexFaq.a1")},{question:t("restaurants.districtPage.indexFaq.q2"),answer:t("restaurants.districtPage.indexFaq.a2")}];const r=s.areaLabel;return[{question:t("restaurants.districtPage.faq.q1",{district:r}),answer:t("restaurants.districtPage.faq.a1",{district:r,count:i.length})},{question:t("restaurants.districtPage.faq.q2",{district:r}),answer:t("restaurants.districtPage.faq.a2",{district:r})},{question:t("restaurants.faq.q5"),answer:t("restaurants.faq.a5")},{question:t("restaurants.faq.q6"),answer:t("restaurants.faq.a6")},{question:t("restaurants.faq.q9"),answer:t("restaurants.faq.a9")}]},[e==null?void 0:e.type,i.length,s.areaLabel,t]),F=p.useMemo(()=>{const r=(e==null?void 0:e.type)==="index"?t("restaurants.districtPage.indexTitle"):s.pageTitle;return[{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"PetWell HK",item:"https://petwellhk.com/"},{"@type":"ListItem",position:2,name:t("restaurants.pageTitle"),item:"https://petwellhk.com/restaurants"},{"@type":"ListItem",position:3,name:r,item:s.canonicalUrl}]},{"@context":"https://schema.org","@type":"CollectionPage",name:s.pageTitle,description:s.description,url:s.canonicalUrl,numberOfItems:i.length}]},[e==null?void 0:e.type,i.length,s,t]);if($({title:s.title,description:s.description,keywords:s.keywords,canonicalUrl:s.canonicalUrl,structuredData:F,faqItems:P,speakableSelectors:[".hero-summary",".restaurants-area-seo","h1"]}),!e)return a.jsx(H,{to:"/restaurants",replace:!0});if(e.type==="index")return a.jsxs("div",{className:"min-h-screen flex flex-col",children:[a.jsx(U,{}),a.jsx("main",{className:"flex-1 pb-14",children:a.jsxs("div",{className:"container mx-auto max-w-6xl px-4 pt-8 md:pt-10",children:[a.jsxs("header",{className:"hero-summary",children:[a.jsx("h1",{className:"text-2xl font-bold md:text-3xl",children:s.pageTitle}),a.jsx("p",{className:"mt-2 text-sm text-muted-foreground md:text-base",children:s.subtitle})]}),a.jsx(N,{showCounts:!1})]})}),a.jsx(B,{})]});const w=i.filter(r=>r.petAccessArea==="INDOOR_ALLOWED").length,A=i.filter(r=>r.petEntryPolicy==="WALK_IN_ONLY"||r.petEntryPolicy==="BOTH").length,I=e.type==="district"?e.district.labelZh.replace(/區$/,""):void 0,O=e.type==="district"?J(e.district.labelZh,e.district.regionKey):e.type==="region"?e.region.regionKey==="香港"?"港島區":e.region.regionKey==="九龍"?"九龍區":"新界區":void 0,D=r=>{switch(r){case"WALK_IN_ONLY":return t("restaurant.petEntryPolicy.walkInOnly");case"RESERVATION_REQUIRED":return t("restaurant.petEntryPolicy.reservationRequired");case"BOTH":return t("restaurant.petEntryPolicy.both");default:return null}},S=r=>{switch(r){case"INDOOR_ALLOWED":return t("restaurant.petAccessArea.indoorAllowed");case"OUTDOOR_ONLY":return t("restaurant.petAccessArea.outdoorOnly");default:return null}},q=e.type==="region"?[{value:e.region.filterRegion,label:s.areaLabel}]:[{value:"all",label:s.areaLabel}];return a.jsx(W,{title:s.pageTitle,subtitle:s.subtitle,searchIntent:t("restaurants.districtPage.searchIntent",{district:s.areaLabel}),searchIntentClassName:"restaurants-search-intent",trustBadge:t("restaurants.verifiedPanelTitle"),searchPlaceholder:t("restaurants.searchPlaceholder"),searchQuery:b,onSearchChange:x,filterByRegionLabel:t("restaurants.filterByRegion"),filtersLabel:t("restaurants.filtersLabel"),regions:q,selectedRegion:q[0].value,onRegionChange:()=>{n.exitNearby()},nearbyActive:n.nearbyActive,onSearchNearby:n.requestNearby,isRequestingNearby:n.isRequesting,policyFilters:[{id:"indoor",label:t("restaurant.petAccessArea.indoorAllowed"),active:d,onToggle:()=>f(r=>!r)},{id:"walkin",label:t("restaurants.filterWalkIn"),active:u,onToggle:()=>o(r=>!r)}],activeFilterLabels:[...d?[t("restaurant.petAccessArea.indoorAllowed")]:[],...u?[t("restaurants.filterWalkIn")]:[]],hasActiveFilters:d||u,onClearFilters:()=>{f(!1),o(!1),x("")},clearFiltersLabel:t("restaurants.clearFilters"),isLoading:j,error:v,errorTitle:t("restaurants.error"),errorSubtitle:t("restaurants.errorSubtitle"),resultCount:i.length,hasMoreToLoad:L,partialEmptyMessage:t("restaurants.districtPage.noResults",{district:s.areaLabel}),partialEmptyHint:t("restaurants.searchingMore"),resultsCountLabel:"",noResults:t("restaurants.districtPage.noResults",{district:s.areaLabel}),noResultsHint:t("restaurants.districtPage.noResultsHint",{district:s.areaLabel}),suggestPlaceCategory:"restaurant",listAriaLabel:t("restaurants.districtPage.listAriaLabel",{district:s.areaLabel}),ctaTitle:t("restaurants.ctaTitle"),ctaDescription:t("restaurants.ctaDescription"),directQuestion:t("restaurants.districtPage.directQuestion",{district:s.areaLabel}),directAnswer:t("restaurants.districtPage.directAnswer",{district:s.areaLabel,count:i.length,indoorCount:w,walkInCount:A}
1),faqItems:P,faqTitle:t("restaurants.districtPage.faqTitle",{district:s.areaLabel}),faqHidden:!1,listFooterContent:a.jsx(Z,{hasNextPage:L,isFetchingNextPage:E,fetchNextPage:k}),belowListContent:a.jsx(X,{areaLabel:s.areaLabel,count:i.length,indoorCount:w,walkInCount:A,fehdRegion:O,fehdDistrict:I,currentSlug:e.type==="district"?e.district.slug:e.region.slug,showFehd:i.length<5}),children:a.jsx("div",{className:"grid gap-5 md:grid-cols-2 md:gap-6 lg:grid-cols-4",children:i.map(r=>a.jsx(Q,{restaurant:r,petAccessLabel:S(r.petAccessArea),petEntryLabel:D(r.petEntryPolicy),openingHoursText:z(r.availableHours,r.is247,t)||null,distanceLabel:G(n.nearbyActive,n.coords,r.location,t)},r.id))})})};function X({areaLabel:m,count:e,indoorCount:t,walkInCount:h,fehdRegion:c,fehdDistrict:d,currentSlug:f,showFehd:u}){const{t:o}=T();return a.jsxs("div",{className:"restaurants-area-seo mt-10 space-y-8 border-t border-border pt-8",children:[a.jsxs("section",{children:[a.jsx("h2",{className:"text-lg font-semibold",children:o("restaurants.districtPage.statsTitle",{district:m})}),a.jsx("p",{className:"mt-2 max-w-3xl text-sm leading-relaxed text-muted-foreground",children:o("restaurants.districtPage.statsBody",{district:m,count:e,indoorCount:t,walkInCount:h})}),a.jsx("p",{className:"mt-3 max-w-3xl text-sm leading-relaxed text-muted-foreground",children:o("restaurants.districtPage.fehdCompare")}),a.jsxs("div",{className:"mt-4 flex flex-wrap gap-3 text-sm",children:[a.jsx(y,{to:"/restaurants",className:"text-primary underline-offset-4 hover:underline",children:o("restaurants.districtPage.hubLink")}),a.jsx(y,{to:"/hk-fehd-pet-friendly-restaurants-1000-list",className:"text-primary underline-offset-4 hover:underline",children:o("restaurants.districtPage.fehdLink")}),a.jsx(y,{to:"/pet-friendly-restaurants/districts",className:"text-primary underline-offset-4 hover:underline",children:o("restaurants.districtPage.allDistricts")})]})]}),u&&c?a.jsx(_,{defaultRegion:c,defaultDistrict:d}):null,a.jsx(N,{currentSlug:f,compact:!0,showCounts:!1})]})}export{zt 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.