PageSourceSearch

https://distryb.com/_next/static/chunks/10447-fb02218f41c3c563.js

js distryb.com collected 2026-10-09 22:58:56 UTC 10,084 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10447],{10447:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return b},premiseLabel:function(){return M}});var n=r(57437),o=r(2265),i=r(42520),l=r.n(i);r(64982);var a=r(40634),c=r(92510);l().accessToken=a.c;let s="#7FB84C",u="coverage-circle",d="coverage-circle-fill",p="coverage-circle-line",f="prospects-src",g="prospects-clusters",m="prospects-points",v="prospects-selected",y=e=>e.replace(/[&<>"]/g,e=>({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;"})[e]);function h(e){let t=e.getCenter(),r=e.getBounds(),n=r.getNorthEast(),o=r.getSouthWest(),i=Math.max(1,Math.round(function(e,t,r,n){let o=Math.sin((r-e)*Math.PI/180/2)**2+Math.cos(e*Math.PI/180)*Math.cos(r*Math.PI/180)*Math.sin((n-t)*Math.PI/180/2)**2;return 7917.6*Math.atan2(Math.sqrt(o),Math.sqrt(1-o))}(t.lat,t.lng,n.lat,n.lng)));return{center:{lat:t.lat,lng:t.lng},radiusMi:i,bbox:[o.lng,o.lat,n.lng,n.lat],zoom:e.getZoom()}}function x(e,t,r){let n=r/69,o=r/(69*Math.cos(e*Math.PI/180)||1e-6),i=[];for(let r=0;r<=64;r++){let l=r/64*2*Math.PI;i.push([t+o*Math.cos(l),e+n*Math.sin(l)])}return{type:"Feature",geometry:{type:"Polygon",coordinates:[i]},properties:{}}}function M(e){switch((e||"").toUpperCase()){case"OFF-PREMISES CONSUMPTION":return"Package store";case"ON-PREMISES CONSUMPTION":return"Bar / Restaurant";case"CONSUMPTION COMBINATION":return"On + Off premise";default:return e||"Licensed retailer"}}function b(e){let{prospects:t,userLocation:r,selectedId:i,onSelect:b,onMoveEnd:w,onReady:L,coverage:k}=e,I=(0,o.useRef)(null),P=(0,o.useRef)(null),R=(0,o.useRef)(null),C=(0,o.useRef)(null),N=(0,o.useRef)(null),S=(0,o.useRef)(b),T=(0,o.useRef)(w),_=(0,o.useRef)(L);S.current=b,T.current=w,_.current=L;let F=(0,o.useCallback)(e=>{if(!e.getSource(f))for(let t of(e.addSource(f,{type:"geojson",data:{type:"FeatureCollection",features:[]},cluster:!0,clusterRadius:50,clusterMaxZoom:14}),(0,c.Rr)(e,{"spiral-delinquent":"#ef4444","spiral-expired":"#ef4444","spiral-onplatform":s,"spiral-prospect":"#8a8f84"}),e.addLayer({id:g,type:"circle",source:f,filter:["has","point_count"],paint:{"circle-color":"rgba(127,184,76,0.85)","circle-stroke-color":"#1d2c10","circle-stroke-width":1.5,"circle-radius":["step",["get","point_count"],16,25,22,100,30,750,40]}}),e.addLayer({id:"prospects-cluster-count",type:"symbol",source:f,filter:["has","point_count"],layout:{"text-field":["get","point_count_abbreviated"],"text-font":["DIN Offc Pro Medium","Arial Unicode MS Bold"],"text-size":12},paint:{"text-color":"#0b140b"}}),e.addLayer({id:m,type:"symbol",source:f,filter:["!",["has","point_count"]],layout:{"icon-image":["case",["==",["get","delinquent"],1],"spiral-delinquent",["==",["get","expired"],1],"spiral-expired",["==",["get","onPlatform"],1],"spiral-onplatform","spiral-prospect"],"icon-size":["interpolate",["linear"],["zoom"],6,.38,12,.66],"icon-allow-overlap":!0}}),e.addLayer({id:v,type:"circle",source:f,filter:["==",["get","id"],"__none__"],paint:{"circle-radius":12,"circle-color":"rgba(0,0,0,0)","circle-stroke-width":3,"circle-stroke-color":"rgba(127,184,76,0.9)"}}),e.on("click",g,t=>{var r;let n=e.queryRenderedFeatures(t.point,{layers:[g]})[0];if(!n)return;let o=null===(r=n.properties)||void 0===r?void 0:r.cluster_id;e.getSource(f).getClusterExpansionZoom(o,(t,r)=>{if(t||null==r)return;let o=n.geometry;e.easeTo({center:o.coordinates,zoom:r})})}),e.on("click",m,e=>{var t,r,n;let o=null===(t=e.features)||void 0===t?void 0:t[0],i=null==o?void 0:null===(r=o.properties)||void 0===r?void 0:r.id;i&&(null===(n=S.current)||void 0===n||n.call(S,i))}),[g,m]))e.on("mouseenter",t,()=>{e.getCanvas().style.cursor="pointer"}),e.on("mouseleave",t,()=>{e.getCanvas().style.cursor=""})},[]);return(0,o.useEffect)(()=>{if(P.current||!I.current)return;if(!a.c){I.current.innerHTML='<div style="display:flex;align-items:center;justify-content:center;height:100%;color:rgba(255,255,255,0.45);font-size:0.85rem;text-align:center;padding:1rem">Map unavailable — missing Mapbox token.<br/>The prospect list still works.</div>';return}let e=new(l()).Map({container:I.current,style:a.R.style,center:r?[r.lng,r.lat]:k?[k.lng,k.lat]:a.R.center,zoom:r?11:k?10:a.R.zoom,minZoom:a.R.minZoom,maxZoom:a.R.maxZoom,attributionControl:!1});P.current=e,e.addControl(new(l()).NavigationControl({showCompass:!1}),"top-right"),"undefined"!=typeof navigator&&navigator.geolocation&&e.addControl(new(l()).GeolocateControl({trackUserLocation:!1,showUserHeading:!1}),"top-right"),e.on("load",()=>{var t;F(e),null===(t=_.current)||void 0===t||t.call(_,h(e))});let t=!0;return e.on("moveend",()=>{var r;if(t){t=!1;return}null===(r=T.current)||void 0===r||r.call(T,h(e))}),()=>{e.remove(),P.current=null}},[]),(0,o.useEffect)(()=>{var e;if(!P.current||!r)return;null===(e=R.current)||void 0===e||e.remove();let t=document.createElement("div");t.style.cssText="width:14px;
1height:14px;border-radius:50%;background:#4f9dff;box-shadow:0 0 0 4px rgba(79,157,255,0.3),0 0 10px rgba(79,157,255,0.6);",R.current=new(l()).Marker({element:t}).setLngLat([r.lng,r.lat]).addTo(P.current)},[null==r?void 0:r.lat,null==r?void 0:r.lng]),(0,o.useEffect)(()=>{let e=P.current;if(!e)return;let r=()=>{F(e);let r=e.getSource(f);null==r||r.setData({type:"FeatureCollection",features:t.filter(e=>Number.isFinite(e.lat)&&Number.isFinite(e.lng)).map(e=>{var t,r,n,o,i,l;return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng,e.lat]},properties:{id:e.id,name:null!==(t=e.name)&&void 0!==t?t:"Licensed retailer",onPlatform:e.onPlatform?1:0,licenseType:null!==(r=e.licenseType)&&void 0!==r?r:"",address:null!==(n=e.address)&&void 0!==n?n:"",city:null!==(o=e.city)&&void 0!==o?o:"",county:null!==(i=e.county)&&void 0!==i?i:"",distanceMiles:null!==(l=e.distanceMiles)&&void 0!==l?l:-1,expired:e.expired?1:0,delinquent:e.delinquent?1:0}}})})};e.isStyleLoaded()&&e.getSource(f)?r():e.once("idle",r)},[t,F]),(0,o.useEffect)(()=>{let e=P.current;if(!e)return;let t=()=>{var t;if(null===(t=C.current)||void 0===t||t.remove(),C.current=null,e.getLayer(p)&&e.removeLayer(p),e.getLayer(d)&&e.removeLayer(d),e.getSource(u)&&e.removeSource(u),!k||!Number.isFinite(k.lat)||!Number.isFinite(k.lng)||!(k.radiusMi>0))return;e.addSource(u,{type:"geojson",data:x(k.lat,k.lng,k.radiusMi)}),e.addLayer({id:d,type:"fill",source:u,paint:{"fill-color":s,"fill-opacity":.12}},e.getLayer(g)?g:void 0),e.addLayer({id:p,type:"line",source:u,paint:{"line-color":s,"line-width":2,"line-opacity":.7}},e.getLayer(g)?g:void 0);let r=document.createElement("div");r.style.cssText="width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid "+s+";box-shadow:0 0 0 4px rgba(127,184,76,0.25);",C.current=new(l()).Marker({element:r}).setLngLat([k.lng,k.lat]).addTo(e);let n=x(k.lat,k.lng,k.radiusMi).geometry.coordinates[0],o=n.reduce((e,t)=>e.extend(t),new(l()).LngLatBounds(n[0],n[0]));e.fitBounds(o,{padding:40,duration:700,maxZoom:13})};e.isStyleLoaded()?t():e.once("load",t)},[null==k?void 0:k.lat,null==k?void 0:k.lng,null==k?void 0:k.radiusMi]),(0,o.useEffect)(()=>{let e=P.current;if(!e)return;let r=()=>{var r,n;if(!e.getLayer(v)||(e.setFilter(v,["==",["get","id"],null!=i?i:"__none__"]),null===(r=N.current)||void 0===r||r.remove(),!i))return;let o=t.find(e=>e.id===i);if(!o||!Number.isFinite(o.lat)||!Number.isFinite(o.lng))return;e.flyTo({center:[o.lng,o.lat],zoom:Math.max(e.getZoom(),13),duration:700});let a=[o.city,o.county].filter(Boolean).join(", "),c=null!=o.distanceMiles?" \xb7 ".concat(o.distanceMiles," mi"):"",s=o.onPlatform?'<div style="font-size:10px;color:#46611f;font-weight:700;margin-top:3px">ON DISTRYB</div>':'<div style="font-size:10px;color:#7a7f74;font-weight:700;margin-top:3px">PROSPECT</div>',u='<div style="font-family:sans-serif;padding:2px 4px;max-width:210px"><strong style="color:#0b140b">'.concat(y(null!==(n=o.name)&&void 0!==n?n:"Licensed retailer"),"</strong>").concat(s,'<div style="font-size:11px;color:#46611f;font-weight:600;margin-top:2px">').concat(y(M(o.licenseType)),"</div>").concat(o.address?'<div style="font-size:11px;color:#5a6b4a;margin-top:2px">'.concat(y(o.address),"</div>"):"").concat(a||c?'<div style="font-size:11px;color:#5a6b4a">'.concat(y(a)).concat(c,"</div>"):"","</div>");N.current=new(l()).Popup({offset:12,closeButton:!1}).setLngLat([o.lng,o.lat]).setHTML(u).addTo(e)};e.isStyleLoaded()&&e.getLayer(v)?r():e.once("idle",r)},[i,t]),(0,n.jsx)("div",{ref:I,style:{width:"100%",height:"100%"}})}},92510:function(e,t,r){"use strict";r.d(t,{Rr:function(){return i},m1:function(){return o}});let n=(()=>{let e=5.5*Math.PI,t="";for(let r=0;r<=150;r++){let n=r/150,o=e*n,i=17.16*n,l=22+i*Math.cos(o-Math.PI/2),a=22+i*Math.sin(o-Math.PI/2);t+=(0===r?"M":"L")+l.toFixed(2)+" "+a.toFixed(2)}return t})();function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:44;return'<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(t,'" height="').concat(t,'" viewBox="0 0 ').concat(44," ").concat(44,'">')+'<circle cx="'.concat(22,'" cy="').concat(22,'" r="').concat(21,'" fill="rgba(11,15,11,0.55)" stroke="rgba(255,255,255,0.14)" stroke-width="0.75"/>')+'<path d="'.concat(n,'" fill="none" stroke="').concat(e,'" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"/>')+'<circle cx="'.concat(22,'" cy="').concat(22,'" r="2.1" fill="').concat(e,'"/>')+"</svg>"}function i(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:88;e.on("styleimagemissing",n=>{let i=t[n.id];!i||e.hasImage(n.id)||(function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:88;return new Promise((r,n)=>{let i=new Image(t,t);i.onload=()=>r(i),i.onerror=n,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(o(e,t))})})(i,r).then(t=>{e.hasImage(n.id)||e.addImage(n.id,t,{pixelRatio:2})}).catch(()=>{})})}},40634:function(e,t,r){"use strict";r.d(t,{R:function(){return o},c:function(){return n}});let n="pk.eyJ1IjoiZGlzdHJ5YiIsImEiOiJjbXB1dmowbHYyMmR3MnFvbnpncng5dXRxIn0.l0LwP9wMg1NGA2r6vC1tHw",o={style:"mapbox://styles/mapbox/dark-v11",center:[-89,40],zoom:6.3,minZoom:3,maxZoom:18}},64982:function(){}}]);

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.