1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6429],{6429:function(t,n,e){"use strict";e.r(n),e.d(n,{default:function(){return z}});var r,o,l=e(57437),i=e(2265);function a(t,n){return Object.freeze({...t,...n})}let u=(0,i.createContext)(null),c=u.Provider;function s(){let t=(0,i.useContext)(u);if(null==t)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return t}var f=e(60759),h=e.n(f);function p(){return(p=Object.assign||function(t){for(var n=1;n<arguments.length;n++){var e=arguments[n];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])}return t}).apply(this,arguments)}let d=(0,i.forwardRef)(function({bounds:t,boundsOptions:n,center:e,children:r,className:o,id:l,placeholder:a,style:u,whenReady:s,zoom:h,...d},g){let[w]=(0,i.useState)({className:o,id:l,style:u}),[M,v]=(0,i.useState)(null);(0,i.useImperativeHandle)(g,()=>M?.map??null,[M]);let m=(0,i.useCallback)(r=>{if(null!==r&&null===M){let o=new f.Map(r,d);null!=e&&null!=h?o.setView(e,h):null!=t&&o.fitBounds(t,n),null!=s&&o.whenReady(s),v(Object.freeze({__version:1,map:o}))}},[]);(0,i.useEffect)(()=>()=>{M?.map.remove()},[M]);let x=M?i.createElement(c,{value:M},r):a??null;return i.createElement("div",p({},w,{ref:m}),x)});function g(t){return(0,i.forwardRef)(function(n,e){let{instance:r,context:o}=t(n).current;return(0,i.useImperativeHandle)(e,()=>r),null==n.children?null:i.createElement(c,{value:o},n.children)})}function w(t,n,e){return Object.freeze({instance:t,context:n,container:e})}function M(t,n){return null==n?function(n,e){let r=(0,i.useRef)();return r.current||(r.current=t(n,e)),r}:function(e,r){let o=(0,i.useRef)();o.current||(o.current=t(e,r));let l=(0,i.useRef)(e),{instance:a}=o.current;return(0,i.useEffect)(function(){l.current!==e&&(n(a,e,l.current),l.current=e)},[a,e,r]),o}}function v(t,n){let e=(0,i.useRef)();(0,i.useEffect)(function(){return null!=n&&t.instance.on(n),e.current=n,function(){null!=e.current&&t.instance.off(e.current),e.current=null}},[t,n])}function m(t,n){let e=t.pane??n.pane;return e?{...t,pane:e}:t}function x(t,n){(0,i.useEffect)(function(){return(n.layerContainer??n.map).addLayer(t.instance),function(){n.layerContainer?.removeLayer(t.instance),n.map.removeLayer(t.instance)}},[n,t])}function y(t){return function(n){let e=s(),r=t(m(n,e),e);return!function(t,n){let e=(0,i.useRef)(n);(0,i.useEffect)(function(){n!==e.current&&null!=t.attributionControl&&(null!=e.current&&t.attributionControl.removeAttribution(e.current),null!=n&&t.attributionControl.addAttribution(n)),e.current=n},[t,n])}(e.map,n.attribution),v(r.current,n.eventHandlers),x(r.current,e),r}}e(54887);let b=(r=y(M(function({url:t,...n},e){return w(new f.TileLayer(t,m(n,e)),e)},function(t,n,e){!function(t,n,e){let{opacity:r,zIndex:o}=n;null!=r&&r!==e.opacity&&t.setOpacity(r),null!=o&&o!==e.zIndex&&t.setZIndex(o)}(t,n,e);let{url:r}=n;null!=r&&r!==e.url&&t.setUrl(r)})),(0,i.forwardRef)(function(t,n){let{instance:e}=r(t).current;return(0,i.useImperativeHandle)(n,()=>e),null})),C=g(y(M(function({position:t,...n},e){let r=new f.Marker(t,n);return w(r,a(e,{overlayContainer:r}))},function(t,n,e){n.position!==e.position&&t.setLatLng(n.position),null!=n.icon&&n.icon!==e.icon&&t.setIcon(n.icon),null!=n.zIndexOffset&&n.zIndexOffset!==e.zIndexOffset&&t.setZIndexOffset(n.zIndexOffset),null!=n.opacity&&n.opacity!==e.opacity&&t.setOpacity(n.opacity),null!=t.dragging&&n.draggable!==e.draggable&&(!0===n.draggable?t.dragging.enable():t.dragging.disable())}))),I=g((o=M(function({positions:t,...n},e){let r=new f.Polyline(t,n);return w(r,a(e,{overlayContainer:r}))},function(t,n,e){n.positions!==e.positions&&t.setLatLngs(n.positions)}),function(t){let n=s(),e=o(m(t,n),n);return v(e.current,t.eventHandlers),x(e.current,n),function(t,n){let e=(0,i.useRef)();(0,i.useEffect)(function(){if(n.pathOptions!==e.current){let r=n.pathOptions??{};t.instance.setStyle(r),e.current=r}},[t,n])}(e.current,t),e}));e(35046);var O=e(25786);let E=new(h()).Icon({iconUrl:"data:image/svg+xml;base64,"+btoa('\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#3b82f6" width="32" height="32">\n <circle cx="12" cy="12" r="8" fill="#3b82f6" stroke="white" stroke-width="2"/>\n </svg>\n '),iconSize:[24,24],iconAnchor:[12,12]}),j=new(h()).Icon({iconUrl:"data:image/svg+xml;base64,"+btoa('\n <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="32" height="32">\n <rect x="4" y="4" width="16" height="16" fill="#1a1a1a" stroke="#d4af37" stroke-width="2" rx="1"/>\n <rect x="8" y="10" width="8" height="8" fill="none" stroke="#d4af37" stroke-width="1.5"/>\n </svg>\n '),iconSize:[32,32],iconAnchor:[16,16]});function k(t){let{userLocation:n,focusOnUser:e}=t,r=s().map;return(0,i.useEffect)(()=>
1{if(e)r.setView([n.lat,n.lon],18);else{let t=h().latLngBounds([n.lat,n.lon],[O.oC.lat,O.oC.lon]);r.fitBounds(t,{padding:[50,50]})}},[r,n,e]),null}function z(t){let{userLocation:n,className:e,focusOnUser:r=!1}=t,o=(0,i.useMemo)(()=>{let t=[],e=n.lat*Math.PI/180,r=n.lon*Math.PI/180,o=O.oC.lat*Math.PI/180,l=O.oC.lon*Math.PI/180;for(let i=0;i<=100;i++){let a=i/100,u=Math.acos(Math.sin(e)*Math.sin(o)+Math.cos(e)*Math.cos(o)*Math.cos(l-r));if(0===u){t.push([n.lat,n.lon]);continue}let c=Math.sin((1-a)*u)/Math.sin(u),s=Math.sin(a*u)/Math.sin(u),f=c*Math.cos(e)*Math.cos(r)+s*Math.cos(o)*Math.cos(l),h=c*Math.cos(e)*Math.sin(r)+s*Math.cos(o)*Math.sin(l),p=180/Math.PI*Math.atan2(c*Math.sin(e)+s*Math.sin(o),Math.sqrt(f*f+h*h)),d=180/Math.PI*Math.atan2(h,f);t.push([p,d])}return t},[n]),a=(0,i.useMemo)(()=>({lat:(n.lat+O.oC.lat)/2,lng:(n.lon+O.oC.lon)/2}),[n]);return(0,l.jsx)("div",{className:e,children:(0,l.jsxs)(d,{center:[a.lat,a.lng],zoom:4,scrollWheelZoom:!0,className:"h-full w-full rounded-2xl",style:{minHeight:"300px"},children:[(0,l.jsx)(b,{attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,l.jsx)(C,{position:[n.lat,n.lon],icon:E}),(0,l.jsx)(C,{position:[O.oC.lat,O.oC.lon],icon:j}),(0,l.jsx)(I,{positions:o,pathOptions:{color:"#d4af37",weight:3,opacity:.9,dashArray:"10, 5"}}),(0,l.jsx)(k,{userLocation:n,focusOnUser:r})]})})}},35046: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.