PageSourceSearch

https://rajarepair.id/_rr/D0ffDg7Y.js

js rajarepair.id collected 2026-10-06 20:54:11 UTC 11,324 bytes, 7 lines download raw bytes

1import{_ as ot}from"./3EBg3iUg.js";import{_ as at}from"./DU6cNFPH.js";import{d as q,I as lt}from"./DxbuN_IJ.js";import{f as nt,u as it,w as rt,r as dt,z as d,C as s,D as n,v as t,G as c,B as p,t as N,E as b,H as V,M as ct,J as ut,I as A,F as k,A as O,s as pt,X as mt,Y as xt,x as m,i as F,V as ft,y as r,P as R,T as gt}from"./D5MLA-hU.js";import{I as W}from"./B_CZSOLB.js";import{I as bt}from"./DlZaLOuR.js";import{I as ht}from"./BdbZa608.js";import{u as vt}from"./DOZv0An5.js";import{o as B,b as S,c as _t,a as j}from"./VfYlVZiT.js";import{u as kt}from"./CbqWd3-v.js";import{u as yt}from"./BZMDioPG.js";import{u as wt}from"./7tJk1O9I.js";import"./B1_oImu8.js";import"./Dv4Z5I8w.js";import"./D_rngVSp.js";import"./BsSRCWlq.js";(function(){try{var h=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new h.Error().stack;a&&(h._sentryDebugIds=h._sentryDebugIds||{},h._sentryDebugIds[a]="8064ec34-6ae0-4509-bacc-229525b56c62",h._sentryDebugIdIdentifier="sentry-dbid-8064ec34-6ae0-4509-bacc-229525b56c62")}catch{}})();const Lt={class:"bg-white"},Ct={class:"mx-auto max-w-7xl px-6 pt-32 pb-8 sm:pt-40"},It={class:"grid items-end gap-8 lg:grid-cols-2"},Mt={class:"display text-4xl text-ink-900 sm:text-5xl"},$t={class:"mt-3 max-w-xl text-base leading-relaxed text-slate-500"},Dt={class:"mt-2 text-sm text-slate-500"},Tt={key:0,class:"flex gap-10 lg:justify-end"},Pt={class:"display text-4xl text-brand-500 sm:text-5xl"},zt={class:"mt-1 text-sm text-slate-500"},Et={class:"display text-4xl text-brand-500 sm:text-5xl"},Nt={class:"mt-1 text-sm text-slate-500"},Bt={class:"mt-1 text-sm text-slate-500"},St={class:"px-6 pb-24"},Ht={class:"mx-auto grid max-w-7xl gap-8 lg:grid-cols-[400px_1fr]"},qt={class:"flex items-center gap-2 rounded-2xl bg-white p-2 pl-4 shadow-[0_2px_14px_rgba(0,0,0,0.06)] focus-within:shadow-[0_2px_18px_rgba(53,55,145,0.15)]"},Vt=["placeholder"],At={key:0,class:"mt-3 rounded-xl bg-amber-50 px-4 py-3 text-xs leading-relaxed text-amber-700 ring-1 ring-amber-100"},Ot={class:"mt-5 text-xs font-medium text-slate-500"},Ft={class:"mt-3 space-y-3 lg:max-h-[640px] lg:overflow-y-auto lg:pr-2 lg:[scrollbar-width:thin] lg:[&::-webkit-scrollbar-thumb]:rounded-full lg:[&::-webkit-scrollbar-thumb]:bg-slate-200 lg:[&::-webkit-scrollbar]:w-1.5"},Rt={key:0,class:"space-y-3"},Wt=["onClick"],jt={class:"flex items-start justify-between gap-3"},Ut={class:"font-semibold leading-snug text-ink-900"},Gt={key:0,class:"shrink-0 text-xs font-semibold text-brand-600"},Jt={class:"mt-1.5 line-clamp-2 text-sm leading-relaxed text-slate-500"},Xt={class:"mt-2 text-xs text-slate-500"},Yt=["href","data-track-label","onClick"],Zt=["href","onClick"],Kt={key:2,class:"rounded-2xl bg-slate-50 px-4 py-10 text-center text-sm text-slate-500"},Qt={class:"lg:sticky lg:top-28"},te={class:"relative isolate h-[420px] overflow-hidden rounded-3xl bg-slate-100 shadow-[0_2px_20px_rgba(0,0,0,0.07)] lg:h-[700px]"},ee={key:0,class:"absolute inset-0 grid place-items-center bg-slate-100 text-slate-400"},se={class:"w-full max-w-sm rounded-3xl bg-white p-7 text-center shadow-2xl"},oe={class:"mx-auto grid h-14 w-14 place-items-center rounded-2xl bg-brand-50 text-brand-600"},ae={class:"mt-5 text-lg font-semibold text-ink-900"},le={class:"mt-2 text-sm leading-relaxed text-slate-500"},ne={class:"mt-6 flex flex-col gap-2"},we=nt({__name:"index",setup(h){const{t:a}=it(),z=gt();kt({title:a("lokasiList.seoTitle"),description:a("lokasiList.seoDescription")});const U=yt(),{fetchLocations:G}=vt(),x=m([]),y=m(!0),$=m(""),f=m(),v=m(),w=m(!1),L=m(!1),g=m();function J(e,o){if(!o.lat||!o.lng)return 1/0;const i=6371,u=st=>st*Math.PI/180,_=u(o.lat-e.lat),l=u(o.lng-e.lng),M=Math.sin(_/2)**2+Math.cos(u(e.lat))*Math.cos(u(o.lat))*Math.sin(l/2)**2;return i*2*Math.atan2(Math.sqrt(M),Math.sqrt(1-M))}const D=e=>v.value?J(v.value,e):1/0,C=F(()=>{const e=$.value.trim().toLowerCase();let o=e?x.value.filter(i=>`${i.name} ${i.city} ${i.state}`.toLowerCase().includes(e)):x.value.slice();return v.value&&(o=o.sort((i,u)=>D(i)-D(u))),o});async function X(){if(g.value=void 0,!("geolocation"in navigator)){g.value="unsupported";return}if(v.value){f.value=C.value[0];return}try{if((await navigator.permissions?.query({name:"geolocation"}))?.state==="denied"){g.value="denied";return}}catch{}L.value=!0}function Y(){L.value=!1,w.value=!0,navigator.geolocation.getCurrentPosition(e=>
1{v.value={lat:e.coords.latitude,lng:e.coords.longitude},f.value=C.value[0],w.value=!1},e=>{w.value=!1,g.value=e.code===e.PERMISSION_DENIED?"denied":"unavailable"},{enableHighAccuracy:!0,timeout:1e4,maximumAge:3e5})}const Z=F(()=>new Set(x.value.map(e=>(e.city??"").trim().toLowerCase()).filter(Boolean)).size),E=m();let I=null;const T={},{loadLeaflet:K,markerIcon:H,addTiles:Q}=wt(),P=e=>e.replace(/[&<>"']/g,o=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"})[o]??o);function tt(e){const o=P(B(e.name)),i=P([e.city,e.state].filter(Boolean).join(", ")),u=P(e.landmark??""),_=S(e.store_open,e.store_close),l=_?`<div style="font-size:12px;color:#64748b;margin-top:6px">${a("lokasiList.openHoursPopup",{hours:P(_)})}</div>`:"";return`<div style="max-width:240px;font-family:inherit">
2    <div style="font-weight:700;font-size:15px;color:#0d0d0d;line-height:1.3">${o}</div>
3    <div style="font-size:12px;color:#64748b;margin-top:4px">${i}</div>
4    <div style="font-size:13px;color:#334155;margin-top:8px;line-height:1.4">${u}</div>
5    ${l}
6    <a href="${q(e)}" target="_blank" rel="noopener" style="display:inline-block;margin-top:10px;font-size:13px;font-weight:600;color:#353791;text-decoration:none">${a("lokasiList.viewRoute")} &rsaquo;</a>
7  </div>`}async function et(){if(!E.value)return;const e=await K();I=e.map(E.value,{scrollWheelZoom:!1,zoomControl:!1,attributionControl:!1}).setView([-2.5,118],5),Q(e,I);for(const o of x.value){if(!o.lat||!o.lng)continue;const i=e.marker([o.lat,o.lng],{icon:H(e,!1)}).addTo(I);i.bindPopup(tt(o),{closeButton:!1,offset:[0,-2]}),i.on("click",()=>f.value=o),T[o.id]=i}}return rt(f,e=>{if(!I||!e?.lat||!e?.lng)return;const o=window.L;for(const i in T)T[i]?.setIcon(H(o,Number(i)===e.id));I.flyTo([e.lat,e.lng],15,{duration:.6}),T[e.id]?.openPopup()}),dt(async()=>{try{x.value=await G()}catch{x.value=[]}finally{y.value=!1}await et(),f.value=x.value[0]}),(e,o)=>{const i=ot,u=at,_=ft("reveal");return r(),d("div",Lt,[s("section",Ct,[s("div",It,[s("div",null,[s("h1",Mt,n(t(a)("lokasiList.heading")),1),s("p",$t,n(t(a)("lokasiList.subheading")),1),s("p",Dt,[c(n(t(a)("lokasiList.nearbyLead"))+" ",1),p(i,{to:"/service-terdekat",class:"font-semibold text-brand-600 underline-offset-2 hover:underline"},{default:N(()=>[c(n(t(a)("site.navServisHp")),1)]),_:1}),o[4]||(o[4]=c(". ",-1))])]),t(y)?b("",!0):(r(),d("dl",Tt,[s("div",null,[s("dt",Pt,n(t(x).length),1),s("dd",zt,n(t(a)("lokasiList.statOutlets")),1)]),s("div",null,[s("dt",Et,n(t(Z)),1),s("dd",Nt,n(t(a)("lokasiList.statCities")),1)]),s("div",null,[o[5]||(o[5]=s("dt",{class:"display text-4xl text-brand-500 sm:text-5xl"}," 7 ",-1)),s("dd",Bt,n(t(a)("lokasiList.statDaysOpen")),1)])]))])]),V((r(),d("section",St,[s("div",Ht,[s("div",null,[s("div",qt,[p(t(ht),{class:"h-5 w-5 shrink-0 text-slate-400"}),V(s("input",{"onUpdate:modelValue":o[0]||(o[0]=l=>ct($)?$.value=l:null),type:"text",placeholder:t(a)("lokasiList.searchPlaceholder"),class:"min-w-0 flex-1 bg-transparent py-2 text-sm text-ink-900 placeholder:text-slate-400 focus:outline-none"},null,8,Vt),[[ut,t($)]])]),s("button",{class:"mt-3 inline-flex items-center gap-2 text-sm font-semibold text-brand-600 transition-colors hover:text-brand-700",onClick:X},[p(t(W),{class:A(["h-4 w-4",t(w)&&"animate-pulse"])},null,8,["class"]),c(" "+n(t(w)?t(a)("lokasiList.detectingLocation"):t(a)("lokasiList.useMyLocation")),1)]),t(g)?(r(),d("p",At,[t(g)==="denied"?(r(),d(k,{key:0},[c(n(t(a)("lokasiList.geoDenied")),1)],64)):t(g)==="unsupported"?(r(),d(k,{key:1},[c(n(t(a)("lokasiList.geoUnsupported")),1)],64)):(r(),d(k,{key:2},[c(n(t(a)("lokasiList.geoUnavailable")),1)],64))])):b("",!0),s("p",Ot,n(t(C).length)+" "+n(t(a)("lokasiList.outletWord"))+n(t(v)?" · "+t(a)("lokasiList.nearestFirst"):""),1),s("div",Ft,[t(y)?(r(),d("div",Rt,[(r(),d(k,null,O(5,l=>s("div",{key:l,class:"h-32 animate-pulse rounded-2xl bg-slate-100"})),64))])):(r(!0),d(k,{key:1},O(t(C),l=>(r(),d("button",{key:l.id,type:"button",class:A(["block w-full rounded-2xl border p-5 text-left transition-colors duration-200",t(f)?.id===l.id?"border-brand-500 bg-brand-50/30":"border-slate-200 hover:border-slate-300"]),onClick:M=>f.value=l},[s("div",jt,[s("h3",Ut,n(t(B)(l.name)),1),D(l)!==1/0?(r(),d("span",Gt,n(D(l).toFixed(1))+" km",1)):b("",!0)]),s("p",Jt,n(l.landmark||l.city),1),s("p",Xt,[c(n(l.city)+" ",1),t(S)(l.store_open,l.store_close)?(r(),d(k,{key:0},[c(" · "+n(t(a)("lokasiList.openHours",{hours:t(S)(l.store_open,l.store_close)})),1)],64)):b("",!0)]),s("div",{class:"mt-4 flex flex-wrap items-center gap-2",onClick:o[1]||(o[1]=R(()=>{},["stop"]))},[p(i,{to:`/lokasi/${t(_t)(l.name)}`,class:"inline-flex items-center gap-1.5 rounded-full bg-brand-500 px-4 py-1.5 text-xs font-semibold text-white transition-colors hover:bg-brand-600"},{default:N(()=>[c(n(t(a)("lokasiList.outletDetail")),1)]),_:1},8,["to"]),s("a",{href:("directions"in e?e.directions:t(q))(l),target:"_blank",rel:"noopener","data-track":"FindLocation","data-track-label":l.name,class:"inline-flex items-center gap-1.5 rounded-full border border-brand-200 px-4 py-1.5 text-xs font-semibold text-brand-600 transition-colors hover:bg-brand-50",onClick:M=>t(z)(t(j)(l.city,"direction","list"))},[p(t(lt),{class:"h-3.5 w-3.5"}),c(" "+n(t(a)("lokasiList.directions")),1)],8,Yt),s("a",{href:t(U).whatsapp(t(a)("lokasiList.waMessage",{outlet:t(B)(l.name)})),target:"_blank",rel:"noopener",class:"inline-flex items-center gap-1.5 rounded-full border border-brand-200 px-4 py-1.5 text-xs font-semibold text-brand-600 transition-colors hover:bg-brand-50",onClick:M=>t(z)(t(j)(l.city,"wa","list"))},[p(u,{class:"h-3.5 w-3.5"}),o[6]||(o[6]=c(" WhatsApp ",-1))],8,Zt)])],10,Wt))),128)),!t(y)&&!t(C).length?(r(),d("p",Kt,n(t(a)("lokasiList.noOutlets")),1)):b("",!0)])]),s("div",Qt,[s("div",te,[s("div",{ref_key:"mapEl",ref:E,class:"h-full w-full"},null,512),t(y)?(r(),d("div",ee,[p(t(bt),{class:"h-6 w-6 animate-spin"})])):b("",!0)])])])])),[[_]]),(r(),pt(xt,{to:"body"},[p(mt,{"enter-active-class":"transition duration-200 ease-out","enter-from-class":"opacity-0","leave-active-class":"transition duration-150 ease-in","leave-to-class":"opacity-0"},{default:N(()=>[t(L)?(r(),d("div",{key:0,class:"fixed inset-0 z-[1000] grid place-items-center bg-ink-900/40 p-6 backdrop-blur-sm",onClick:o[3]||(o[3]=R(l=>L.value=!1,["self"]))},[s("div",se,[s("div",oe,[p(t(W),{class:"h-7 w-7"})]),s("h3",ae,n(t(a)("lokasiList.geoCardTitle")),1),s("p",le,n(t(a)("lokasiList.geoCardBody")),1),s("div",ne,[s("button",{type:"button",class:"rounded-full bg-brand-500 px-5 py-3 text-sm font-semibold text-white transition-colors hover:bg-brand-600",onClick:Y},n(t(a)("lokasiList.geoAllow")),1),s("button",{type:"button",class:"rounded-full px-5 py-3 text-sm font-semibold text-slate-500 transition-colors hover:bg-slate-50",onClick:o[2]||(o[2]=l=>L.value=!1)},n(t(a)("lokasiList.geoLater")),1)])])])):b("",!0)]),_:1})]))])}}});
7export{we 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.