PageSourceSearch

https://app.merlinai.co/_next/static/chunks/17136.8daef76169111c60.js

js merlinai.co collected 2026-09-30 05:38:30 UTC 12,344 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[17136],{17136:function(n,t,e){"use strict";e.r(t),e.d(t,{LiveMapCanvasInner:function(){return j}});var r=e(785893);e(565254);var i=e(667294),o=e(543650),u=e(509106),l=e(921303),c=e(818191),s=e(862773),a=e(626238),f=e(685072),d=e(845243),p=e.n(d),v=e(970112),x=e(572921);let m=[31.9686,-99.9018];function h(n,t){return null!=n&&null!=t&&Number.isFinite(n)&&Number.isFinite(t)&&(0!==n||0!==t)?[n,t]:null}let b="var(--color-brand-500)";function g(){let n=(0,o.Sx)();return(0,i.useEffect)(()=>{let t=setTimeout(()=>n.invalidateSize(),0);return()=>clearTimeout(t)},[n]),null}function y(n){let{points:t}=n,e=(0,o.Sx)(),r=t.map(n=>n.join(",")).join("|");return(0,i.useEffect)(()=>{if(e.invalidateSize(),0!==t.length){if(1===t.length){e.setView(t[0],11);return}e.fitBounds(p().latLngBounds(t),{padding:[60,60],maxZoom:13})}},[r]),null}function j(n){var t;let{shipments:e,selectedId:o,trackedId:d,onSelect:j}=n,I=d&&null!==(t=e.find(n=>n.shipmentId===d))&&void 0!==t?t:null,O=I?h(I.driverPosition.lat,I.driverPosition.lon):null,w=I?h(I.destination.lat,I.destination.lon):null,E=O&&w?[O,w]:e.flatMap(n=>[h(n.destination.lat,n.destination.lon),h(n.driverPosition.lat,n.driverPosition.lon)]).filter(n=>null!==n);return(0,r.jsxs)(u.h,{center:m,zoom:6,zoomControl:!1,attributionControl:!1,style:{width:"100%",height:"100%",minHeight:"420px"},children:[(0,r.jsx)(l.I,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"}),(0,r.jsx)(c.L,{position:"bottomright"}),(0,r.jsx)(g,{}),(0,r.jsx)(y,{points:E}),O&&w&&(0,r.jsx)(s.a,{positions:[O,w],pathOptions:{color:"#5D2F70",weight:3,dashArray:"6 6",opacity:.8}}),e.map(n=>{var t,e,u,l;let c=h(n.driverPosition.lat,n.driverPosition.lon),s=h(n.destination.lat,n.destination.lon);return(0,r.jsxs)(i.Fragment,{children:[c&&(0,r.jsx)(a.J,{position:c,icon:function(n,t){let e=t?b:"#ffffff",r=t?b:"var(--color-stroke-sub-300)";return p().divIcon({className:"delivery-driver-pin",html:'\n      <div style="display:flex;flex-direction:column;align-items:center;transform:translateY(-6px)">\n        <span style="white-space:nowrap;background:'.concat(e,";
1color:").concat(t?"#ffffff":b,";border:1px solid ").concat(r,';\n          border-radius:6px;padding:1px 6px;font-size:11px;font-weight:600;line-height:1.4;\n          box-shadow:0 1px 4px rgba(14,18,27,0.16)">').concat(n,'</span>\n        <span style="width:12px;height:12px;background:').concat(e,";border:2px solid ").concat(r,';\n          border-radius:50% 50% 50% 0;transform:rotate(45deg);margin-top:2px"></span>\n      </div>'),iconSize:[0,0],iconAnchor:[0,0]})}("".concat(null!==(e=n.distanceMiles)&&void 0!==e?e:"—"," mi \xb7 ").concat(null!==(u=n.etaMinutes)&&void 0!==u?u:"—","m"),n.shipmentId===o),eventHandlers:{click:()=>j(n.shipmentId)},children:(0,r.jsxs)(f.u,{direction:"top",offset:[0,-18],children:[(0,r.jsxs)("span",{className:"text-xs font-semibold",children:[null!==(l=null===(t=n.driver)||void 0===t?void 0:t.name)&&void 0!==l?l:"Driver"," → ",(0,x.t7)(n.customer)]}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs",children:n.destination.label}),n.driverPosition.lastFixAt&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsxs)("span",{className:"text-xs text-text-soft-400",children:["Last seen ",(0,v.MU)(n.driverPosition.lastFixAt)," ago"]})]})]})}),s&&(0,r.jsx)(a.J,{position:s,icon:function(n){let t=n?18:14;return p().divIcon({className:"delivery-destination-pin",html:'<span style="display:block;width:'.concat(t,"px;height:").concat(t,"px;background:").concat(n?b:"var(--color-state-success-base)",';border:2px solid #ffffff;\n      border-radius:50%;box-shadow:0 1px 4px rgba(14,18,27,0.24)"></span>'),iconSize:[t,t],iconAnchor:[t/2,t/2]})}(n.shipmentId===o),eventHandlers:{click:()=>j(n.shipmentId)},children:(0,r.jsxs)(f.u,{direction:"top",offset:[0,-10],children:[(0,r.jsx)("span",{className:"text-xs font-semibold",children:(0,x.t7)(n.customer)}),(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs",children:n.destination.label}),n.orderId&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("br",{}),(0,r.jsx)("span",{className:"text-xs text-text-soft-400",children:n.orderId})]})]})})]},n.shipmentId)})]})}},565254:function(){},996021:function(n,t,e){"use strict";e.d(t,{d:function(){return i}});var r=e(667294);function i(n,t){let e=(0,r.useRef)(t);(0,r.useEffect)(function(){t!==e.current&&null!=n.attributionControl&&(null!=e.current&&n.attributionControl.removeAttribution(e.current),null!=t&&n.attributionControl.addAttribution(t)),e.current=t},[n,t])}},219776:function(n,t,e){"use strict";e.d(t,{G5:function(){return c},LE:function(){return l},RA:function(){return u}});var r=e(667294),i=e(973935),o=e(337560);function u(n){return(0,r.forwardRef)(function(t,e){let{instance:i,context:u}=n(t).current;return(0,r.useImperativeHandle)(e,()=>i),null==t.children?null:r.createElement(o.UO,{value:u},t.children)})}function l(n){return(0,r.forwardRef)(function(t,e){let[o,u]=(0,r.useState)(!1),{instance:l}=n(t,u).current;(0,r.useImperativeHandle)(e,()=>l),(0,r.useEffect)(function(){o&&l.update()},[l,o,t.children]);let c=l._contentNode;return c?(0,i.createPortal)(t.children,c):null})}function c(n){return(0,r.forwardRef)(function(t,e){let{instance:i}=n(t).current;return(0,r.useImperativeHandle)(e,()=>i),null})}},337560:function(n,t,e){"use strict";e.d(t,{Hb:function(){return i},UO:function(){return l},mE:function(){return c},sj:function(){return o}});var r=e(667294);function i(n){return Object.freeze({__version:1,map:n})}function o(n,t){return Object.freeze({...n,...t})}let u=(0,r.createContext)(null),l=u.Provider;function c(){let n=(0,r.useContext)(u);if(null==n)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return n}},601046:function(n,t,e){"use strict";e.d(t,{y:function(){return o}});var r=e(667294),i=e(337560);function o(n){return function(t){let e=(0,i.mE)(),o=n(t,e),{instance:u}=o.current,l=(0,r.useRef)(t.position),{position:c}=t;return(0,r.useEffect)(function(){return u.addTo(e.map),function(){u.remove()}},[e.map,u]),(0,r.useEffect)(function(){null!=c&&c!==l.current&&(u.setPosition(c),l.current=c)},[u,c]),o}}},507580:function(n,t,e){"use strict";e.d(t,{W:function(){return l}});var r=e(996021),i=e(337560),o=e(386660),u=e(833417);function l(n,t){return function(e,l){let c=(0,i.mE)(),s=n((0,u.q)(e,c),c);return(0,r.d)(c.map,e.attribution),(0,o.t)(s.current,e.eventHandlers),t(s.current,c,e,l),s}}},519533:function(n,t,e){"use strict";e.d(t,{I:function(){return o},O:function(){return i}});var r=e(667294);function i(n,t,e){return Object.freeze({instance:n,context:t,container:e})}function o(n,t){return null==t?function(t,e){let i=(0,r.useRef)();return i.current||(i.current=n(t,e)),i}:function(e,i){let o=(0,r.useRef)();o.current||(o.current=n(e,i));let u=(0,r.useRef)(e),{instance:l}=o.current;return(0,r.useEffect)(function(){u.current!==e&&(t(l,e,u.current),u.current=e)},[l,e,i]),o}}},386660:function(n,t,e){"use strict";e.d(t,{t:function(){return i}});var r=e(667294);function i(n,t){let e=(0,r.useRef)();(0,r.useEffect)(function(){return null!=t&&n.instance.on(t),e.current=t,function(){null!=e.current&&n.instance.off(e.current),e.current=null}},[n,t])}},427385:function(n,t,e){"use strict";e.d(t,{Au:function(){return d},Lf:function(){return p},SO:function(){return f},dW:function(){return a},vm:function(){return s}});
1var r=e(219776),i=e(601046),o=e(519533),u=e(602743),l=e(507580),c=e(582424);function s(n){let t=(0,o.I)(function(t,e){return(0,o.O)(n(t),e)}),e=(0,i.y)(t);return(0,r.G5)(e)}function a(n,t){let e=(0,o.I)(n,t),i=(0,u.u)(e);return(0,r.RA)(i)}function f(n,t){let e=(0,o.I)(n),i=(0,l.W)(e,t);return(0,r.LE)(i)}function d(n,t){let e=(0,o.I)(n,t),i=(0,c.n)(e);return(0,r.RA)(i)}function p(n,t){let e=(0,o.I)(n,t),i=(0,u.u)(e);return(0,r.G5)(i)}},522589:function(n,t,e){"use strict";function r(n,t,e){let{opacity:r,zIndex:i}=t;null!=r&&r!==e.opacity&&n.setOpacity(r),null!=i&&i!==e.zIndex&&n.setZIndex(i)}e.d(t,{I:function(){return r}})},602743:function(n,t,e){"use strict";e.d(t,{g:function(){return c},u:function(){return s}});var r=e(667294),i=e(996021),o=e(337560),u=e(386660),l=e(833417);function c(n,t){(0,r.useEffect)(function(){var e;let r=null!==(e=t.layerContainer)&&void 0!==e?e:t.map;return r.addLayer(n.instance),function(){var e;null===(e=t.layerContainer)||void 0===e||e.removeLayer(n.instance),t.map.removeLayer(n.instance)}},[t,n])}function s(n){return function(t){let e=(0,o.mE)(),r=n((0,l.q)(t,e),e);return(0,i.d)(e.map,t.attribution),(0,u.t)(r.current,t.eventHandlers),c(r.current,e),r}}},833417:function(n,t,e){"use strict";function r(n,t){var e;let r=null!==(e=n.pane)&&void 0!==e?e:t.pane;return r?{...n,pane:r}:n}e.d(t,{q:function(){return r}})},582424:function(n,t,e){"use strict";e.d(t,{n:function(){return c}});var r=e(667294),i=e(337560),o=e(386660),u=e(602743),l=e(833417);function c(n){return function(t){let e=(0,i.mE)(),c=n((0,l.q)(t,e),e);return(0,o.t)(c.current,t.eventHandlers),(0,u.g)(c.current,e),!function(n,t){let e=(0,r.useRef)();(0,r.useEffect)(function(){if(t.pathOptions!==e.current){var r;let i=null!==(r=t.pathOptions)&&void 0!==r?r:{};n.instance.setStyle(i),e.current=i}},[n,t])}(c.current,t),c}}},509106:function(n,t,e){"use strict";e.d(t,{h:function(){return l}});var r=e(337560),i=e(845243),o=e(667294);function u(){return(u=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r])}return n}).apply(this,arguments)}let l=(0,o.forwardRef)(function(n,t){var e;let{bounds:l,boundsOptions:c,center:s,children:a,className:f,id:d,placeholder:p,style:v,whenReady:x,zoom:m,...h}=n,[b]=(0,o.useState)({className:f,id:d,style:v}),[g,y]=(0,o.useState)(null);(0,o.useImperativeHandle)(t,()=>null!==(e=null==g?void 0:g.map)&&void 0!==e?e:null,[g]);let j=(0,o.useCallback)(n=>{if(null!==n&&null===g){let t=new i.Map(n,h);null!=s&&null!=m?t.setView(s,m):null!=l&&t.fitBounds(l,c),null!=x&&t.whenReady(x),y((0,r.Hb)(t))}},[]);(0,o.useEffect)(()=>()=>{null==g||g.map.remove()},[g]);let I=g?o.createElement(r.UO,{value:g},a):null!=p?p:null;return o.createElement("div",u({},b,{ref:j}),I)})},626238:function(n,t,e){"use strict";e.d(t,{J:function(){return l}});var r=e(427385),i=e(519533),o=e(337560),u=e(845243);let l=(0,r.dW)(function(n,t){let{position:e,...r}=n,l=new u.Marker(e,r);return(0,i.O)(l,(0,o.sj)(t,{overlayContainer:l}))},function(n,t,e){t.position!==e.position&&n.setLatLng(t.position),null!=t.icon&&t.icon!==e.icon&&n.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==e.zIndexOffset&&n.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==e.opacity&&n.setOpacity(t.opacity),null!=n.dragging&&t.draggable!==e.draggable&&(!0===t.draggable?n.dragging.enable():n.dragging.disable())})},862773:function(n,t,e){"use strict";e.d(t,{a:function(){return l}});var r=e(427385),i=e(519533),o=e(337560),u=e(845243);let l=(0,r.Au)(function(n,t){let{positions:e,...r}=n,l=new u.Polyline(e,r);return(0,i.O)(l,(0,o.sj)(t,{overlayContainer:l}))},function(n,t,e){t.positions!==e.positions&&n.setLatLngs(t.positions)})},921303:function(n,t,e){"use strict";e.d(t,{I:function(){return c}});var r=e(427385),i=e(833417),o=e(519533),u=e(522589),l=e(845243);let c=(0,r.Lf)(function(n,t){let{url:e,...r}=n,u=new l.TileLayer(e,(0,i.q)(r,t));return(0,o.O)(u,t)},function(n,t,e){(0,u.I)(n,t,e);let{url:r}=t;null!=r&&r!==e.url&&n.setUrl(r)})},685072:function(n,t,e){"use strict";e.d(t,{u:function(){return l}});var r=e(427385),i=e(519533),o=e(845243),u=e(667294);let l=(0,r.SO)(function(n,t){let e=new o.Tooltip(n,t.overlayContainer);return(0,i.O)(e,t)},function(n,t,e,r){let{position:i}=e;(0,u.useEffect)(function(){let e=t.overlayContainer;if(null==e)return;let{instance:o}=n,u=n=>{n.tooltip===o&&(null!=i&&o.setLatLng(i),o.update(),r(!0))},l=n=>{n.tooltip===o&&r(!1)};return e.on({tooltipopen:u,tooltipclose:l}),e.bindTooltip(o),function(){e.off({tooltipopen:u,tooltipclose:l}),null!=e._map&&e.unbindTooltip()}},[n,t,r,i])})},818191:function(n,t,e){"use strict";e.d(t,{L:function(){return o}});var r=e(427385),i=e(845243);let o=(0,r.vm)(function(n){return new i.Control.Zoom(n)})},543650:function(n,t,e){"use strict";e.d(t,{Sx:function(){return i}});var r=e(337560);function i(){return(0,r.mE)().map}e(667294)}}]);

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.