PageSourceSearch

https://www.meccagames.com/build/_shared/chunk-GY3TUN7V.js

js meccagames.com collected 2026-09-26 12:31:12 UTC 3,947 bytes, 1 lines download raw bytes

1var S=async(e,t)=>{let n=m(e);for(let r of n)try{let i=new google.maps.LatLng(t.lat,t.lng),o=y(r),{elements:s}=await f([i],o),a=1/0,d=null;if(s[0].forEach((u,l)=>{u.status==="OK"&&u.distance.value<a&&(a=u.distance.value,d={name:e[l].name,url:e[l].url,id:e[l].id})}),d)return d}catch{return null}return null},y=e=>e.map(t=>new google.maps.LatLng(Number(t.venueLatitude),Number(t.venueLongitude))),E=e=>{if(!(e!=null&&e.data))return null;let{allCasinoListing:t,allClubListing:n,allCasinoDetailPage:r,allClubDetailPage:i}=(e==null?void 0:e.data)||{};return[...r.items,...i.items].map(o=>{let s=[...t.items,...n.items].find(a=>{var d,u;return a.id===((d=o.casinoListing)==null?void 0:d.id)||a.id===((u=o.clubListing)==null?void 0:u.id)});return s?{...s,url:o.url}:null}).filter(Boolean)},m=(e,t=25)=>{let n=e.filter(r=>r.venueLatitude&&!isNaN(Number(r.venueLatitude))&&r.venueLongitude&&!isNaN(Number(r.venueLongitude)));return p(n,t)},p=(e,t)=>e.reduce((n,r,i)=>(i%t===0&&n.push([]),n[n.length-1].push(r),n),[]),w=e=>e instanceof Error?e.message.includes("OVER_QUERY_LIMIT"):typeof e=="string"?e.includes("OVER_QUERY_LIMIT"):e&&typeof e.code=="string"?e.code==="OVER_QUERY_LIMIT":!1,f=async(e,t,n=3,r=500)=>{let i=new google.maps.DistanceMatrixService;for(let o=0;o<=n;o++)try{let s=await i.getDistanceMatrix({origins:e,destinations:t,travelMode:google.maps.TravelMode.DRIVING,avoidHighways:!1,avoidTolls:!1,unitSystem:google.maps.UnitSystem.IMPERIAL});return{elements:s.rows.map(a=>a.elements),originAddresses:s.originAddresses}}catch(s){if(!w(s)||o===n)throw s;await new Promise(a=>setTimeout(a,r*(o+1)))}throw new Error("getDistanceMatrix: max retries exceeded")},c=null,g=async()=>{if(!c)try{let e=sessionStorage.getItem("geoEncryptionKey");if(e){let t=JSON.parse(e);c=await window.crypto.subtle.importKey("raw",new Uint8Array(t),{name:"AES-GCM"},!0,["encrypt","decrypt"])}else{c=await window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);let t=await window.crypto.subtle.exportKey("raw",c);sessionStorage.setItem("geoEncryptionKey",JSON.stringify(Array.from(new Uint8Array(t))))}}catch(e){console.error("Key generation/retrieval failed:",e),c=await window.crypto.subtle.generateKey({name:"AES-GCM",length:256},!1,["encrypt","decrypt"])}return c},L=async e=>{try{let t=await g(),n=new TextEncoder,r=window.crypto.getRandomValues(new Uint8Array(12)),i=await window.crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,n.encode(e)),o=new Uint8Array(r.length+i.byteLength);return o.set(r),o.set(new Uint8Array(i),r.length),btoa(String.fromCharCode(...o))}catch(t){throw console.error("Encryption failed:",t),new Error("Failed to encrypt data")}},b=async e=>{try{let t=await g(),n=new TextDecoder,r=new Uint8Array(atob(e).split("").map(a=>a.charCodeAt(0))),i=r.slice(0,12),o=r.slice(12),s=await window.crypto.subtle.decrypt({name:"AES-GCM",iv:i},t,o);return n.decode(s)}catch(t){throw console.error("Decryption failed:",t),new Error("Failed to decrypt data")}},h=async()=>{try{let e=sessionStorage.getItem("userGeoLocation");if(!e)return null;let t=await b(e),n=JSON.parse(t);if(typeof n.latitude=="number"&&typeof n.longitude=="number")return n;throw new Error("Invalid location data format")}catch(e){return console.error("Failed to retrieve stored location:",e),sessionStorage.removeItem("userGeoLocation"),sessionStorage.removeItem("geoEncryptionKey"),null}},v=()=>{sessionStorage.removeItem("userGeoLocation"),sessionStorage.removeItem("geoEncryptionKey"),c=null},I=async()=>new Promise(e=>{if(!navigator.geolocation){e(null);return}navigator.geolocation.getCurrentPosition(async t=>{let n={latitude:t.coords.latitude,longitude:t.coords.longitude};try{let r=await L(JSON.stringify(n));sessionStorage.setItem("userGeoLocation",r)}catch(r){console.error("Failed to encrypt location data:",r)}e(n)},t=>{t.code===t.PERMISSION_DENIED?e("denied"):e(null)})});export{S as a,y as b,E as c,m as d,f as e,h as f,v as g,I as h};

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.