1var d;const m=((d=window.smartSortConfig)==null?void 0:d.transitHubs)??{};var h;const u=((h=window.smartSortConfig)==null?void 0:h.cityTiers)??{DEFAULT:{default:45}};function M(t,n,s,e){const r=t*Math.PI/180,a=s*Math.PI/180,i=(s-t)*Math.PI/180,c=(e-n)*Math.PI/180,l=Math.sin(i/2)**2+Math.cos(r)*Math.cos(a)*Math.sin(c/2)**2;return 6371e3*2*Math.atan2(Math.sqrt(l),Math.sqrt(1-l))}function p(t){if(!t)return null;let n=t.trim();if(n.includes("<iframe")){const o=n.match(/src=["']([^"']+)["']/);o!=null&&o[1]&&(n=o[1])}const s=n.match(/!2d(-?\d+\.?\d*)!3d(-?\d+\.?\d*)/);if(s)return{lat:parseFloat(s[2]),lng:parseFloat(s[1])};const e=n.match(/\/@(-?\d+\.?\d*),(-?\d+\.?\d*)/);if(e)return{lat:parseFloat(e[1]),lng:parseFloat(e[2])};try{const o=new URL(n),a=(o.searchParams.get("q")||o.searchParams.get("ll")||"").split(",");if(a.length>=2){const i=parseFloat(a[0]),c=parseFloat(a[1]);if(!isNaN(i)&&!isNaN(c))return{lat:i,lng:c}}}catch{}return null}function S(t,n,s){const e=m[s==null?void 0:s.toUpperCase()]||[];if(!e.length)return 1/0;let o=1/0;for(const r of e){if(Math.abs(r.lat-t)>.1||Math.abs(r.lng-n)>.1)continue;const a=M(t,n,r.lat,r.lng);if(a<o&&(o=a,a<=500))break}return o}function g(t,n,s){const e=S(t,n,s);return e<=500?90:e<=1e3?75:e<=2e3?58:e<=5e3?38:15}function w(t,n,s){const e=u[s==null?void 0:s.toUpperCase()]||u.DEFAULT,o=[(n||"").toLowerCase().trim(),(t||"").toLowerCase().trim()];for(const r of o)if(r){for(const[a,i]of Object.entries(e))if(a!=="default"&&(r.includes(a)||a.includes(r)))return i}return e.default??u.DEFAULT.default}const f=new Map;function T(t){const n=`${t.id}|${t.gmap}|${t.country}|${t.state}|${t.township}`;if(f.has(n))return f.get(n);const s=(t.country||"").trim(),e=s.length===2?s.toUpperCase():I(s),o=p(t.gmap),r=w(t.state,t.township,e),i={transScore:o?g(o.lat,o.lng,e):Math.round(r*.7),amenScore:r,eduScore:Math.round(r*.9)};return f.set(n,i),i}function b(t,n){const{transScore:s,amenScore:e,eduScore:o}=T(t),r=s*n.transport+e*n.amenities+o*n.education+50*n.lifestyle;return Math.min(100,Math.round(r))}function C(t){const n=["transport","amenities","education","lifestyle"],s=n.reduce((e,o)=>e+(t[o]??0),0);return s===0?{transport:.25,amenities:.25,education:.25,lifestyle:.25}:Object.fromEntries(n.map(e=>[e,(t[e]??0)/s]))}const F={malaysia:"MY",singapore:"SG",indonesia:"ID",thailand:"TH",philippines:"PH","united arab emirates":"AE",dubai:"AE",uae:"AE",australia:"AU","united kingdom":"GB",uk:"GB",england:"GB"};function I(t){const n=t.toLowerCase();for(const[s,e]of Object.entries(F))if(n.includes(s))return e;return""}window.computeSmartSortScores=function(t,n){const s=C(n),e={};for(const o of t)o.id!=null&&(e[o.id]=b(o,s));return e};
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.