PageSourceSearch

https://hexjobs.com/assets/island.U6DZOU3T.js

js hexjobs.com collected 2026-10-06 13:06:26 UTC 4,138 bytes, 1 lines download raw bytes

1var L="/maplibre-gl.css",P="/maplibre/maplibre-gl-worker.mjs",k={light:"https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",dark:"https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json"},u="offers",b=300;function E(){return document.documentElement.classList.contains("dark")?k.dark:k.light}function O(){if(document.querySelector(`link[href="${L}"]`))return;let t=document.createElement("link");t.rel="stylesheet",t.href=L,document.head.appendChild(t)}function N(t){return{type:"FeatureCollection",features:t.map(e=>({type:"Feature",geometry:{type:"Point",coordinates:[e.lng,e.lat]},properties:{title:e.title,company:e.company,slug:e.slug,own:e.own}}))}}function h(t){return t.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e]??e)}function q(t,e){t.addSource(u,{type:"geojson",data:e,cluster:!0,clusterRadius:50,clusterMaxZoom:13}),t.addLayer({id:"clusters",type:"circle",source:u,filter:["has","point_count"],paint:{"circle-color":"#4f46e5","circle-opacity":.85,"circle-stroke-width":2,"circle-stroke-color":"#ffffff","circle-radius":["step",["get","point_count"],16,10,22,50,28]}}),t.addLayer({id:"cluster-count",type:"symbol",source:u,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-size":12},paint:{"text-color":"#ffffff"}}),t.addLayer({id:"offer",type:"circle",source:u,filter:["!",["has","point_count"]],paint:{"circle-color":"#4f46e5","circle-radius":7,"circle-stroke-width":2,"circle-stroke-color":"#ffffff"}})}function F(t,e){let r=t.querySelector("[data-controls]"),d=t.querySelector("[data-compass]"),f=[],n=(i,m)=>{let p=t.querySelector(i);p&&(p.addEventListener("click",m),f.push(()=>p.removeEventListener("click",m)))};n("[data-zoom-in]",()=>e.zoomTo(e.getZoom()+1,{duration:b})),n("[data-zoom-out]",()=>e.zoomTo(e.getZoom()-1,{duration:b})),n("[data-compass-button]",()=>e.resetNorthPitch({duration:b})),n("[data-locate]",()=>{"geolocation"in navigator&&navigator.geolocation.getCurrentPosition(i=>{e.flyTo({center:[i.coords.longitude,i.coords.latitude],zoom:11,duration:1500})})}),n("[data-fullscreen]",()=>{if(document.fullscreenElement){document.exitFullscreen();return}e.getContainer().requestFullscreen()});let a=()=>{d&&(d.style.transform=`rotateX(${e.getPitch()}deg) rotateZ(${-e.getBearing()}deg)`)};return e.on("rotate",a),e.on("pitch",a),a(),r&&(r.hidden=!1),()=>{e.off("rotate",a),e.off("pitch",a);for(let i of f)i()}}function H(t,e){let r=t.matches("[data-offers-map]")?t:t.querySelector("[data-offers-map]");if(!r)return()=>{};let d=!1,f=()=>{};return O(),Promise.all([import("/assets/island.YZNLKWX6.js"),fetch(r.dataset.endpoint??"",{headers:{accept:"application/json"}}).then(n=>n.json())]).then(([{Map:n,Popup:a,LngLatBounds:i,setWorkerUrl:m},p])=>{if(d)return;m(P);let g=p?.points??[],o=new n({container:r,style:E(),center:[19.4,52],zoom:5,renderWorldCopies:!1,attributionControl:{compact:!0}}),M=r.dataset.offerBase??"",T=N(g),x=()=>{if(g.length===0)return;let s=new i;for(let c of g)s.extend([c.lng,c.lat]);o.fitBounds(s,{padding:48,maxZoom:12,duration:0})},C=()=>{o.getSource(u)||q(o,T)},v=()=>{C(),x(),r.querySelector("[data-placeholder]")?.remove()};o.on("load",v),o.once("styledata",v),o.on("click","clusters",s=>{let c=s.features?.[0],l=c?.properties?.cluster_id;l!==void 0&&o.getSource(u).getClusterExpansionZoom(Number(l)).then(y=>{o.easeTo({center:c.geometry.coordinates,zoom:y})})}),o.on("click","offer",s=>{let c=s.features?.[0];if(!c)return;let l=c.properties,y=`${M}/${l.slug}`;new a({offset:12,closeButton:!1}).setLngLat(c.geometry.coordinates).setHTML(`<a href="${h(y)}" class="block"><span class="block text-sm font-semibold">${h(l.title)}</span><span class="block text-xs text-muted-foreground">${h(l.company)}</span></a>`).addTo(o)});for(let s of["clusters","offer"])o.on("mouseenter",s,()=>{o.getCanvas().style.cursor="pointer"}),o.on("mouseleave",s,()=>{o.getCanvas().style.cursor=""});let w=F(r,o),S=new MutationObserver(()=>o.setStyle(E()));S.observe(document.documentElement,{attributes:!0,attributeFilter:["class"]}),f=()=>{S.disconnect(),w(),o.remove()}}),()=>{d=!0,f()}}export{H as mount};

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.