1!function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroGitHash_myeroad="5ce3e63ee526711d9fdee9e150f093852f3a7cc4"}catch(e){}}(),function(){try{("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).__faroBundleId_myeroad="10.1.5092-apac"}catch(e){}}();try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="f417bc59-d2fb-47dc-bbe4-6972a232ab2d",e._sentryDebugIdIdentifier="sentry-dbid-f417bc59-d2fb-47dc-bbe4-6972a232ab2d")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"10.1.5092-apac"},(self.webpackChunk_eroad_myeroad=self.webpackChunk_eroad_myeroad||[]).push([[3300],{111:(e,t,r)=>{r.d(t,{h:()=>i});var n=r(81171),o=r(71705);const a=(0,r(1454).wY)(e=>({extension:{color:e.colors.onsurfaceGrayBorders,fontSize:e.typography.sizes.xs.fontSize,fontWeight:e.typography.weights.regular,marginTop:e.spacing(2)}}),{name:"GeofenceLabel"});var l=r(14041);const i=({latitude:e,location:t,longitude:r,name:i})=>{const c=a();return e&&r&&i?l.createElement(o.J,{long:r,lat:e,title:i,extension:t&&l.createElement("div",{className:c.extension},t),zIndex:n.bz}):null}},3239:(e,t,r)=>{r.d(t,{p:()=>p});var n=r(14041),o=r(56222),a=r(44328),l=r(62397),i=r(25816),c=r(1454),s=r(30602);const d=(0,c.wY)(e=>({root:{backgroundColor:e.colors.surfaceOverlay,borderRadius:2,display:"inline-grid",height:"min-content","& > button":{backgroundColor:e.colors.surfaceOverlay,border:`1px solid ${e.colors.onsurfaceTechnicalFont}`,padding:0,height:`${s.YN}px !important`,width:`${s.YN}px !important`,zIndex:1,"& > .anticon":{display:"flex",fontSize:"2rem",justifyContent:"center"}},"& .ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active":{backgroundColor:e.colors.surfaceOverlay},[`@media only screen and (max-width: ${e.breakpoints.values.md}px)`]:{display:"none"}}}),{name:"ZoomControl"}),p=()=>{const e=d(),{current:t}=(0,i.k)();return t?n.createElement("div",{className:e.root},n.createElement(l.$,{"data-testid":"map-action-zoom-in",icon:n.createElement(o.A,null),onClick:e=>{e.stopPropagation(),null==t||t.zoomIn()},block:!0}),n.createElement(l.$,{"data-testid":"map-action-zoom-out",icon:n.createElement(a.A,null),onClick:e=>{e.stopPropagation(),null==t||t.zoomOut()},block:!0})):null}},11071:(e,t,r)=>{r.d(t,{l:()=>l});var n=r(14041),o=r(4807),a=r(13821);const l=()=>{const{mapCenter:e,mapZoom:t}=(0,a.J)();return(0,n.useMemo)(()=>({zoom:(0,o.dg)(t[0]),center:(0,o.PH)(e)}),[t,e])}},14025:(e,t,r)=>{r.d(t,{UC:()=>$,tD:()=>B,GO:()=>Q,ff:()=>ge,Bv:()=>Pe}),r(4525),r(94416),r(44448);var n=r(1454);(0,n.wY)(e=>({root:{display:"flex",flexDirection:"column",rowGap:e.spacing(6)},optionsContainer:{display:"flex",flexDirection:"column",marginBottom:e.spacing(1)},categoryLabel:{display:"flex",alignItems:"center",gap:e.spacing(2),fontSize:e.typography.sizes.sm.fontSize,fontWeight:e.typography.weights.medium},categoryDivider:{margin:`${e.spacing(2)}px 0px`},categoryContent:{display:"flex",flexDirection:"column",rowGap:e.spacing(3)},tilesContainer:{columnGap:e.spacing(4),display:"grid",gridTemplateColumns:"min-content min-content min-content",gap:e.spacing(4),[`@media (max-width: ${e.breakpoints.values.md}px)`]:{display:"flex",flexWrap:"wrap"}}}),{name:"CategorisedContent"});var o=r(64145),a=Object.defineProperty,l=Object.defineProperties,i=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,s=Object.prototype.hasOwnProperty,d=Object.prototype.propertyIsEnumerable,p=(e,t,r)=>t in e?a(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))s.call(t,r)&&p(e,r,t[r]);if(c)for(var r of c(t))d.call(t,r)&&p(e,r,t[r]);return e};const m=(0,n.wY)(e=>{return{root:()=>({alignItems:"center",columnGap:e.spacing(3),display:"flex",flex:1,justifyContent:"space-between"}),label:(t=u({},e.typography.sizes.sm),r={color:e.colors.onsurfaceTechnicalFont},l(t,i(r)))};var t,r},{name:"Option"});var f=r(14041);
1const g=({name:e,onChange:t,isChecked:r,isDisabled:n,isHidden:a})=>{const l=m();return a?null:f.createElement("div",{className:l.root},f.createElement("div",{className:l.label},e),f.createElement(o.d,{checked:r,onChange:t,disabled:n}))};var y=r(42453),b=r(80601),v=r(81171),h=Object.defineProperty,w=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(w)for(var r of w(t))O.call(t,r)&&C(e,r,t[r]);return e};const P=(0,n.wY)(e=>({root:{alignItems:"center",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"flex",flexDirection:"column",justifyContent:"center",padding:0,"& > img":{border:"solid 2px transparent"},"&:hover":{color:e.colors.primaryBlueHover,"& > img":{border:`solid 2px ${e.colors.primaryBlueHover}`}}},image:{height:v.b4.HEIGHT,width:v.b4.WIDTH},selected:{color:e.colors.primaryBlueHover,"& > img":{border:`solid 2px ${e.colors.primaryBlueHover}`}},title:x({},e.typography.sizes.sm)}),{name:"TileButton"});var j=r(14041);const I=({tile:e,action:t,isSelected:r})=>{const n=P(),{t:o}=(0,b.t)();return j.createElement("button",{className:(0,y.$)(n.root,r&&n.selected),"data-testid":`${e.id}-button`,onClick:t,type:"button"},j.createElement("img",{src:e.image,alt:o(e.name),className:n.image}),j.createElement("div",{className:n.title},o(e.name)))};r(14041),Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var S=r(29117);const k=(0,n.wY)(e=>({root:{display:"flex",flexDirection:"column",rowGap:e.spacing(6)},optionsContainer:{display:"flex",flexDirection:"column",marginBottom:e.spacing(1),rowGap:e.spacing(3)},optionsGroup:{display:"flex",flexDirection:"column",rowGap:e.spacing(3),"&:not(:last-of-type)":{borderBottom:`solid 2px ${e.colors.surfaceLevel3}`,paddingBottom:e.spacing(3)}},tilesContainer:{columnGap:e.spacing(4),display:"grid",gridTemplateColumns:"min-content min-content min-content",gridGap:e.spacing(4),[`@media (max-width: ${e.breakpoints.values.md}px)`]:{columnGap:e.spacing(4),display:"flex",flexWrap:"wrap"}}}),{name:"Content"});var N=r(14041),T=Object.defineProperty,_=Object.getOwnPropertySymbols,D=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable,M=(e,t,r)=>t in e?T(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const $=({currentTile:e,onSelect:t,tiles:r,options:n})=>{const o=k();return N.createElement(S.W,null,N.createElement("div",{className:o.root},N.createElement("div",{className:o.tilesContainer},r.map(r=>N.createElement(I,{key:r.id,tile:r,action:()=>{t(r)},isSelected:e.id===r.id}))),n&&N.createElement("div",{className:o.optionsContainer},n.map((e,t)=>!!e.length&&N.createElement("div",{key:t,className:o.optionsGroup},e.map((e,t)=>N.createElement(g,((e,t)=>{for(var r in t||(t={}))D.call(t,r)&&M(e,r,t[r]);if(_)for(var r of _(t))G.call(t,r)&&M(e,r,t[r]);return e})({key:t},e))))))))};var z=r(14041),A=r(93815);const H=(0,n.wY)(e=>({drawer:{padding:e.spacing(6),[`@media (max-width: ${e.breakpoints.values.md}px)`]:{maxHeight:`calc(100vh - ${v.M3}px)`}}}),{name:"ContentDrawer"}),L=({children:e,onClose:t})=>{const{t:r}=(0,b.t)(),n=H();return z.createElement(A._s,{type:A.ts.STANDARD,height:"auto",mask:!0,onClose:t,title:r("map.library.map.drawer.title"),placement:"bottom",open:!0},z.createElement("div",{className:n.drawer},e))},B=({children:e,onClose:t,isHidden:r})=>r?null:z.createElement(S.W,null,z.createElement(L,{onClose:t},e));var F=r(48657),R=r(62397),V=r(29676);const W=(0,n.wY)(()=>({root:{position:"relative",zIndex:3},popover:{bottom:0,left:0,position:"absolute"},card:{maxHeight:`calc(100vh - ${v.M3}px)`,overflowY:"auto"}}),{name:"ContentPanel"});var Y=Object.defineProperty,J=Object.getOwnPropertySymbols,U=Object.prototype.hasOwnProperty,Z=Object.prototype.propertyIsEnumerable,q=(e,t,r)=>t in e?Y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const K=({children:e,onClose:t})=>{const{t:r}=(0,b.t)(),n=W(),o=(0,z.useRef)(null);return(0,z.useEffect)(()=>{const e=e=>{var r;(null==(r=o.current)?void 0:r.contains(e.target))||t()};return document.body.addEventListener("mouseup",e),()=>{document.body.removeEventListener("mouseup",e)}},[t]),z.createElement("div",{className:n.root},z.createElement("div",{className:n.popover,ref:o},z.createElement(V.Z,{className:n.card,title:r("map.library.map.drawer.title"),extra:z.createElement(R.$,{type:"link","data-testid":"close-layers-button",onClick:t,icon:z.createElement(F.A,null)})},e)))},Q=e=>z.createElement(S.W,null,z.createElement(K,((e,t)=>{for(var r in t||(t={}))U.call(t,r)&&q(e,r,t[r]);if(J)for(var r of J(t))Z.call(t,r)&&q(e,r,t[r]);return e})({},e)));var X=Object.defineProperty,ee=Object.defineProperties,te=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ne=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ae=(e,t,r)=>t in e?X(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,le=(e,t)=>
1{for(var r in t||(t={}))ne.call(t,r)&&ae(e,r,t[r]);if(re)for(var r of re(t))oe.call(t,r)&&ae(e,r,t[r]);return e};const ie=(0,n.wY)(e=>{return{root:{position:"relative",width:"min-content","& .ant-btn":{backgroundColor:e.colors.surfaceOverlay,border:`1px solid ${e.colors.onsurfaceTechnicalFont}`,boxSizing:"content-box",height:v.b4.HEIGHT,padding:e.spacing(1),width:v.b4.WIDTH,zIndex:1}},image:{height:"100%",width:"100%"},titleOverlay:{bottom:0,left:0,overflow:"hidden",padding:e.spacing(1),pointerEvents:"none",position:"absolute",width:"100%",zIndex:2},toggleButtonTitle:(t=le({},e.typography.sizes.sm),r={alignItems:"center",color:e.colors.surfaceOverlay,columnGap:e.spacing(1),display:"flex",fontWeight:e.typography.weights.bold,justifyContent:"center",margin:e.spacing(1),textShadow:"-1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000"},ee(t,te(r)))};var t,r},{name:"ToggleButton"});var ce=r(14041),se=Object.defineProperty,de=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,ue=Object.prototype.propertyIsEnumerable,me=(e,t,r)=>t in e?se(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const fe=({tile:e,action:t})=>{const r=ie(),{t:n}=(0,b.t)();return ce.createElement("div",{className:r.root},ce.createElement(R.$,{"data-testid":"open-layers-button",type:"default",onClick:t,block:!0},ce.createElement("img",{src:e.image,alt:n(e.name),className:r.image})),ce.createElement("div",{className:r.titleOverlay},ce.createElement("span",{className:r.toggleButtonTitle},ce.createElement("img",{src:"./images/svg/header-icon-cog-light.svg",alt:"layers",height:16,width:16}),n("map.library.map.settings"))))},ge=e=>ce.createElement(S.W,null,ce.createElement(fe,((e,t)=>{for(var r in t||(t={}))pe.call(t,r)&&me(e,r,t[r]);if(de)for(var r of de(t))ue.call(t,r)&&me(e,r,t[r]);return e})({},e)));var ye=r(44396);const be=(0,n.wY)(e=>({root:{"& .ant-btn":{backgroundColor:e.colors.surfaceOverlay,border:`1px solid ${e.colors.onsurfaceTechnicalFont}`,height:v.GN,width:v.GN,zIndex:1}},iconContainer:{display:"flex",alignItems:"center",justifyContent:"center"},icon:{fontSize:20,color:e.colors.onsurfaceFont}}),{name:"ToggleButtonMobile"});var ve=r(14041),he=Object.defineProperty,we=Object.getOwnPropertySymbols,Ee=Object.prototype.hasOwnProperty,Oe=Object.prototype.propertyIsEnumerable,Ce=(e,t,r)=>t in e?he(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const xe=({action:e})=>{const t=be();return ve.createElement("div",{className:t.root},ve.createElement(R.$,{"data-testid":"open-layers-button-mobile",type:"default",onClick:e},ve.createElement("div",{className:t.iconContainer},ve.createElement(ye.Br,{className:t.icon,"data-testid":"setting-icon"}))))},Pe=e=>ve.createElement(S.W,null,ve.createElement(xe,((e,t)=>{for(var r in t||(t={}))Ee.call(t,r)&&Ce(e,r,t[r]);if(we)for(var r of we(t))Oe.call(t,r)&&Ce(e,r,t[r]);return e})({},e)))},18021:(e,t,r)=>{r.d(t,{V:()=>G});var n=r(14041),o=r(42453),a=r(51962),l=r(87152),i=r(80601),c=r(44396),s=r(15102),d=r(62397),p=r(54826),u=r(39028),m=r(46487),f=r(29117),g=r(1454),y=r(81171),b=Object.defineProperty,v=Object.defineProperties,h=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertySymbols,E=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,C=(e,t,r)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,x=(e,t)=>{for(var r in t||(t={}))E.call(t,r)&&C(e,r,t[r]);if(w)for(var r of w(t))O.call(t,r)&&C(e,r,t[r]);return e},P=(e,t)=>v(e,h(t));const j=(0,g.wY)(e=>({addressSearch:P(x({},e.typography.sizes.sm),{width:e.spacing(75),"& .ant-input":x({},e.typography.sizes.sm),"& .anticon":P(x({},e.typography.sizes.sm),{lineHeight:0}),"& .ant-select-selection-placeholder":{lineHeight:"38px !important"},[`@media only screen and (max-width: ${e.breakpoints.values.md}px)`]:{width:"100%"}}),etaButton:{"& > button":{alignItems:"center",display:"inline-flex",justifyContent:"center",width:y.YN},"& .ant-btn:hover, .ant-btn:focus, .ant-btn:active, .ant-btn.active":{backgroundColor:e.colors.surfaceOverlay}}}),{name:"MapSearch"});var I=r(14041),S=Object.defineProperty,k=Object.getOwnPropertySymbols,N=Object.prototype.hasOwnProperty,T=Object.prototype.propertyIsEnumerable,_=(e,t,r)=>t in e?S(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;const D=({mapId:e,mapSearchBoundary:t,mapSearchPadding:r,onETADestinationClick:f,onSelect:g,onChange:y,className:b,showETA:v=!1})=>{const{t:h}=(0,i.t)(),w=j(),{jumpTo:E}
1=(0,m.V)(e),[O,C]=(0,n.useState)();return I.createElement(I.Fragment,null,I.createElement(s.N,{asyncSearchFunction:(0,p.T)({mapSearchBoundary:t}),className:(0,o.$)(w.addressSearch,b),errorLabel:h("map.library.map.search.error.result"),externalValue:O,noResultsLabel:h("map.library.map.search.no.results"),onChange:y,onSelect:e=>{return t=function*(){var t,n;if(!e)return;document.activeElement instanceof HTMLElement&&document.activeElement.blur();let o=(0,l.j)(e);if(o){const e=yield(0,u.HV)(o);C((null==(t=null==e?void 0:e.address)?void 0:t.label)||(null==e?void 0:e.title)||`${o.latitude},${o.longitude}`)}else{const{data:t}=null!=(n=yield(0,u.aK)(e))?n:{};t&&(o={longitude:t.position.lng,latitude:t.position.lat})}(0,a.O)(o)&&(g&&g(o),E(o,()=>{},r))},new Promise((e,r)=>{var n=e=>{try{a(t.next(e))}catch(e){r(e)}},o=e=>{try{a(t.throw(e))}catch(e){r(e)}},a=t=>t.done?e(t.value):Promise.resolve(t.value).then(n,o);a((t=t.apply(void 0,null)).next())});var t},placeholder:h("map.library.map.search.placeholder")}),v&&f&&I.createElement("div",{className:w.etaButton},I.createElement(d.$,{"data-testid":"map-action-eta-destination-from-search",icon:I.createElement(c.HO,null),onClick:f})))},G=e=>I.createElement(f.W,null,I.createElement(D,((e,t)=>{for(var r in t||(t={}))N.call(t,r)&&_(e,r,t[r]);if(k)for(var r of k(t))T.call(t,r)&&_(e,r,t[r]);return e})({},e)))},28547:(e,t,r)=>{r.d(t,{l:()=>he});var n=r(14041),o=r(68100),a=r(56843),l=r.n(a);const i="#E86900",c="#fff",s=["==",["get","active"],"true"],d=["==",["get","mode"],"simple_select"],p=["case",["all",["boolean",s],["boolean",["any",["==",["get","mode"],"direct_select"],["==",["get","mode"],"draw_polygon"]]]],i,["all",["boolean",s],["boolean",d]],"#3841FB","#6B7DFF"],u=[{id:"gl-draw-polygon-fill",type:"fill",filter:["all",["==","$type","Polygon"]],paint:{"fill-color":p,"fill-outline-color":p,"fill-opacity":.25}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":i}},{id:"gl-draw-line-or-polygon-stroke-inactive",type:"line",filter:["all",["any",["==","$type","Polygon"],["==","$type","LineString"]],["any",["==","active","false"],["==","mode","simple_select"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":p,"line-width":["case",["all",["boolean",s],["boolean",d]],2,1]}},{id:"gl-draw-line-or-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["!=","mode","simple_select"],["any",["==","$type","Polygon"],["==","$type","LineString"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":i,"line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":c}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":i}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","$type","Point"],["!=","mode","static"],["==","meta","feature"],["==","active","false"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":c}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","active","true"],["!=","mode","simple_select"],["==","$type","Point"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":c}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","active","true"],["==","$type","Point"],["!=","meta","midpoint"]],paint:{"circle-radius":5,"circle-color":i}}];var m=r(30602),f=Object.defineProperty,g=Object.getOwnPropertySymbols,y=Object.prototype.hasOwnProperty,b=Object.prototype.propertyIsEnumerable,v=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,h=r(10672),w=r(10501),E=r(16931),O=r(96354),C=r(96565),x=r(76738),P=r(51962),j=r(54479),I=Object.defineProperty,S=Object.getOwnPropertySymbols,k=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable,T=(e,t,r)=>t in e?I(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=Object.defineProperty,D=Object.getOwnPropertySymbols,G=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable,$=(e,t,r)=>t in e?_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,z=r(7073),A=r(94357),H=r(44242),L=r(1487),B=Object.defineProperty,F=Object.defineProperties,R=Object.getOwnPropertyDescriptors,V=Object.getOwnPropertySymbols,W=Object.prototype.hasOwnProperty,Y=Object.prototype.propertyIsEnumerable,J=(e,t,r)=>t in e?B(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,U=(e,t)=>{for(var r in t||(t={}))W.call(t,r)&&J(e,r,t[r]);if(V)for(var r of V(t))Y.call(t,r)&&J(e,r,t[r]);return e},Z=(e,t)=>F(e,R(t));var q=Object.defineProperty,K=Object.defineProperties,Q=Object.getOwnPropertyDescriptors,X=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,te=Object.prototype.propertyIsEnumerable,re=(e,t,r)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ne=(e,t)=>{for(var r in t||(t={}))ee.call(t,r)&&re(e,r,t[r]);if(X)for(var r of X(t))te.call(t,r)&&re(e,r,t[r]);return e},oe=(e,t)=>K(e,Q(t));const ae=oe(ne({},l().modes),{direct_select:function(e){const t=((e,t)=>{for(var r in t||(t={}))y.call(t,r)&&v(e,r,t[r]);if(g)for(var r of g(t))b.call(t,r)&&v(e,r,t[r]);return e})({},e);return t.clickNoTarget=()=>!1,t.clickInactive=()=>!1,t.onMidpoint=function(t,r){if(t.feature.coordinates[0].length>=m.yM){const e="draw.max_points_reached";return this.map.fire(e,{features:this.getSelected().map(e=>e.toGeoJSON())}),!1}e.onMidpoint.call(this,t,r)},t}(l().modes.direct_select),draw_polygon:function(e){const t=((e,t)=>{for(var r in t||(t={}))G.call(t,r)&&$(e,r,t[r]);if(D)for(var r of D(t))M.call(t,r)&&$(e,r,t[r]);return e})({},e);return t.clickOnVertex=function(e){var t;if((null==(t=e.polygon.coordinates[0])?void 0:t.length)>=4)this.changeMode("direct_select",{featureId:e.polygon.id});else{const e="draw.min_points_needed";this.map.fire(e)}},t.clickAnywhere=function(t,r){var n;if(e.clickAnywhere.call(this,t,r),(null==(n=t.polygon.coordinates[0])?void 0:n.length)>=m.yM+1){this.clickOnVertex(t);const e="draw.max_points_reached";this.map.fire(e,{features:[t.polygon.toGeoJSON()]})}},t}(l().modes.draw_polygon),simple_select:(e=>{const t=U({},e);return t.getFeaturesAtPoint=function(e,t){const{point:r}=t;return{features:H.A.click({point:r},null,this._ctx).map(e=>Z(U({},e),{properties:Z(U({},e.properties),{area:(0,L.W)(e)})})).sort((e,t)=>
1e.properties.area>t.properties.area?1:e.properties.area<t.properties.area?-1:0)}},t.clickOnFeature=function(e,t){var r,n,o,a;A.A.disable(this),this.stopExtendedInteractions(e);const l=z.RT(t),i=this.getSelectedIds(),c=null==(n=null==(r=t.featureTarget)?void 0:r.properties)?void 0:n.id,s=this.isSelected(c);if(s&&l)this.deselect(c),1===i.length&&A.A.enable(this);else if(!s){i.forEach(e=>this.doRender(e));const{features:r}=this.getFeaturesAtPoint(e,t);this.setSelected(null==(a=null==(o=r[0])?void 0:o.properties)?void 0:a.id)}this.updateUIClasses({mouse:h.kZ.POINTER}),this.doRender(c)},t.toDisplayFeatures=function(e,t,r){t.properties.active=this.isSelected(t.properties.id)?h.l4.ACTIVE:h.l4.INACTIVE,r(t),this.fireActionable()},t.onDrag=()=>!1,t.onMouseMove=function(){this.updateUIClasses({mouse:h.kZ.POINTER})},t.onMouseDown=function(){this.updateUIClasses({mouse:h.kZ.POINTER})},t.onMouseUp=function(){this.updateUIClasses({mouse:h.kZ.POINTER})},t})(l().modes.simple_select),static:{onSetup:function(){return this.setActionableState(),{}},toDisplayFeatures:function(e,t,r){r(t)}}}),le=oe(ne({},ae),{direct_select:function(e){const t=((e,t)=>{for(var r in t||(t={}))k.call(t,r)&&T(e,r,t[r]);if(S)for(var r of S(t))N.call(t,r)&&T(e,r,t[r]);return e})({},e);return t.clickNoTarget=()=>!1,t.clickInactive=()=>!1,t.onMidpoint=function(t,r){if(t.feature.coordinates[0].length>=m.lf){const e="draw.max_points_reached";return this.map.fire(e,{features:this.getSelected().map(e=>e.toGeoJSON())}),!1}return e.onMidpoint.call(this,t,r),!0},t.onMouseUp=function(e){e.dragMoving&&(e.dragMoving=!1,e.selectedCoordPaths=[],this.map.fire("draw.update",{features:[e.feature.toGeoJSON()]}))},t.onClick=function(e){if(!e.feature.properties.isCircle){if(e.feature.coordinates[0].length<=m.x4)return this.map.fire("draw.min_points_needed",{features:this.getSelected().map(e=>e.toGeoJSON())}),!1;e.feature.removeCoordinate(e.selectedCoordPaths[0]),e.selectedCoordPaths=[],this.map.fire("draw.update",{features:[e.feature.toGeoJSON()]})}return!0},t.dragFeature=function(e,t,r){(0,E.A)(this.getSelected(),r),this.getSelected().filter(e=>e.properties.isCircle).map(e=>e.properties.center).forEach(e=>{e[0]+=r.lng,e[1]+=r.lat}),e.dragMoveLocation=t.lngLat},t.dragVertex=function(t,r,n){if(t.feature.properties.isCircle){const e=t.feature.properties.center,n=[r.lngLat.lng,r.lngLat.lat],o=(0,C.I)((0,x.zx)(e),(0,x.zx)(n),{units:"meters"})/1e3,a=(0,O.n)(e,o);t.feature.incomingCoords(a.geometry.coordinates),t.feature.properties.radius=1e3*o}else e.dragVertex.call(this,t,r,n)},t.toDisplayFeatures=function(e,t,r){var n;if("properties"in t&&(0,P.O)(t.properties))if(e.featureId===(null==(n=t.properties)?void 0:n.id)){t.properties.active=h.l4.ACTIVE,r(t);const n=e.feature.properties.isCircle?(0,j.wq)(t):(0,w.A)(t,{map:this.map,midpoints:!0,selectedPaths:e.selectedCoordPaths});Array.isArray(n)&&n.forEach(r)}else t.properties.active=h.l4.INACTIVE,r(t);this.map.fire(e)},t}(l().modes.direct_select)});var ie=r(51851),ce=Object.defineProperty,se=Object.defineProperties,de=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,fe=(e,t,r)=>t in e?ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,ge=(e,t)=>{for(var r in t||(t={}))ue.call(t,r)&&fe(e,r,t[r]);if(pe)for(var r of pe(t))me.call(t,r)&&fe(e,r,t[r]);return e};function ye({allowCircleDrawMode:e=!1}={}){return e?le:ae}var be=r(25816),ve=r(81561);const he=({drawMode:e,inEditOrCreateMode:t,editingGeofence:r,eventHandlers:a,updateMapState:i})=>{const{current:c}=(0,be.k)(),{drawInstance:s}=(()=>{const e=(0,n.useContext)(ve.eN);if(void 0===e)throw new Error("Context must be called within Provider");return{drawInstance:e.drawInstance,mode:e.mode}})(),[d,p]=(0,n.useState)(()=>{var e;return null!=(e=null==c?void 0:c.loaded())&&e}),{onGeofenceCreated:m,onGeofenceDrawModeChange:f,onGeofenceUpdated:g,onGeofenceMaxPointsError:y,onGeofenceMinPointsError:b}=a;(e=>{var t=e,{handlers:r=[],allowCircleDrawMode:a}=t,i=((e,t)=>{var r={};for(var n in e)ue.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&pe)for(var n of pe(e))t.indexOf(n)<0&&me.call(e,n)&&(r[n]=e[n]);return r})(t,["handlers","allowCircleDrawMode"]);const{setDraw:c,resetDraw:s}
1=(0,ie.z)(),[d,p]=(0,n.useState)();(0,o.VI)(()=>{const e=[...u],t=ge({},ye({allowCircleDrawMode:a})),r=(n=ge({},i),se(n,de({clickBuffer:5,displayControlsDefault:!1,styles:e,modes:t})));var n;const o=new(l())(r);return p(o),o},({map:e})=>{r.map(({event:t,handler:r})=>e.on(t,r))},({map:e})=>{r.map(({event:t,handler:r})=>e.off(t,r))},{position:i.position}),(0,n.useEffect)(()=>(d&&c(d),()=>{s()}),[d,c,s])})({handlers:[{event:"draw.create",handler:m},{event:"draw.update",handler:g},{event:"draw.max_points_reached",handler:y},{event:"draw.min_points_needed",handler:b},{event:"draw.modechange",handler:f}]});const v=(0,n.useCallback)((e,t)=>{if(!s||!d)return"static";const r=s.getMode(),n=s.getSelectedIds();let o;return t&&("simple_select"===e?o={featureIds:[t]}:"direct_select"===e&&(o={featureId:t})),"draw_polygon"!==e&&r===e&&t===(null==n?void 0:n[0])||s.changeMode(e,o),s.getMode()},[s,d]);return(0,n.useEffect)(()=>{if(s&&d&&(s.deleteAll(),r)){const{id:e,geojson:t,name:n}=r;s.add({id:e,geometry:t,properties:{name:n},type:"Feature"})}},[s,r,d]),(0,n.useEffect)(()=>{let n="simple_select";const o=null==r?void 0:r.id;if(s&&d){"draw_polygon"!==e||o?o&&t&&(n="direct_select"):n=e;const r=v(n,o);i(r)}},[s,e,r,t,d,v,i]),(0,n.useEffect)(()=>{var e;const t=null!=(e=null==c?void 0:c.loaded())&&e;if(p(t),!c||t)return;const r=()=>{c.loaded()&&(p(!0),c.off("idle",r))};return c.on("idle",r),()=>{c.off("idle",r)}},[c]),null}},45583:(e,t,r)=>{r.d(t,{Br:()=>g,Nt:()=>y,ZA:()=>b,d_:()=>f,sC:()=>u,yC:()=>m});var n=r(14041),o=r(80601),a=r(30602),l=r(4807),i=r(46487),c=r(93815),s=r(79623),d=r(99204),p=r(29159);const u=({onGeofenceCreated:e})=>t=>{if(1===t.features.length){const{id:r,geometry:n}=t.features[0];n.coordinates&&r&&(null==e||e({id:r,geojson:n}))}},m=({onSelectionChanged:e,drawMode:t,newGeofenceId:r})=>{const o=(0,d.a)(),{innerWidth:a}=(0,p.l)(),{panGeometryIntoScreen:s}=(0,i.V)();return(0,n.useCallback)(n=>{var i;if("direct_select"===t)return;if(!n)return void(null==e||e({activeGeofenceId:null}));const{id:d,geometry:p}=n,u=a<=c.aZ,m=n.properties.centerLocation&&n.properties.centerLocation.latitude&&n.properties.centerLocation.longitude?{coords:{latitude:n.properties.centerLocation.latitude,longitude:n.properties.centerLocation.longitude},label:n.properties.centerLocation.readable}:{coords:(0,l.yw)((null==(i=p.coordinates[0])?void 0:i.map(e=>({lat:e[1],lng:e[0]})))||[]),label:""};p.coordinates&&d!==r?(null==e||e({activeGeofenceId:d,location:m}),s(p,{left:0,right:u?0:c.R6,bottom:o?152:96,top:64})):null==e||e({activeGeofenceId:null,location:m})},[e,t,o,r,s,a])},f=()=>{const{t:e}=(0,o.t)();return(0,n.useCallback)(()=>{s.i.warning({content:e({id:"geofence.centre.create.update.points.max.error",values:{limit:a.yM}}),duration:10,key:"geofence-points-max-error"})},[e])},g=()=>{const{t:e}=(0,o.t)();return(0,n.useCallback)(()=>{s.i.warning({content:e({id:"geofence.centre.create.update.points.min.error"}),duration:10,key:"geofence-points-min-error"})},[e])},y=({onGeofenceUpdated:e})=>t=>{var r;if(1===(null==(r=null==t?void 0:t.features)?void 0:r.length)){const{id:r,geometry:n}=t.features[0];n.coordinates&&r&&(null==e||e({id:r,geojson:n}))}},b=({onDrawingModeChanged:e})=>({mode:t})=>{null==e||e({drawMode:t})}},49976:(e,t,r)=>{r.d(t,{e:()=>_});var n=r(14041),o=r(70541),a=r(43420),l=r(93815),i=r(29159),c=r(41892),s=r(51480),d=r(47079),p=r(21693),u=r(34227),m=r(2881),f=r(55964),g=r(80601),y=r(20307),b=r(19116),v=r(1454),h=Object.defineProperty,w=Object.defineProperties,E=Object.getOwnPropertyDescriptors,O=Object.getOwnPropertySymbols,C=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable,P=(e,t,r)=>t in e?h(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,j=(e,t)=>{for(var r in t||(t={}))C.call(t,r)&&P(e,r,t[r]);if(O)for(var r of O(t))x.call(t,r)&&P(e,r,t[r]);return e};const I=(0,v.wY)(e=>{return{root:(t=j({},e.typography.sizes.xxl),r={color:e.colors.onsurfaceFont,display:"flex",alignItems:"center",fontWeight:e.typography.weights.medium,paddingRight:e.spacing(7),margin:0,minHeight:e.spacing(8),"& span":{marginRight:e.spacing(3)}},w(t,E(r))),icon:{fontSize:16},popover:{"& ol":{paddingLeft:e.spacing(4)},"& ul":{paddingLeft:e.spacing(4)}}};var t,r},{name:"GeofenceDetailsDrawer"});var S=r(14041);const k=()=>{const e=I(),{t}=(0,g.t)();return S.createElement("div",{className:e.root},S.createElement(a.s,{tagName:"span",id:"geofence.centre.create.drawer.title"}),S.createElement("div",{className:e.icon},S.createElement(b.A,{placement:"bottomRight",title:t("geofence.centre.details.drawer.create.help.title"),content:S.createElement(N,null),trigger:"click"},S.createElement(y.A,null))))},N=()=>{const e=I();return S.createElement("div",{className:e.popover},S.createElement("ol",null,S.createElement("li",null,S.createElement(a.s,{id:"geofence.centre.details.drawer.create.help.info.1"})),S.createElement("li",null,S.createElement(a.s,{id:"geofence.centre.details.drawer.create.help.info.2"})),S.createElement("li",null,S.createElement(a.s,{id:"geofence.centre.details.drawer.create.help.info.3"}))),S.createElement(a.s,{tagName:"strong",id:"geofence.centre.details.drawer.create.help.note"}),S.createElement("ul",null,S.createElement("li",null,S.createElement(a.s,{id:"geofence.centre.details.drawer.create.help.note.1"})),S.createElement("li",null,S.createElement(a.s,{id:"geofence.centre.details.drawer.create.help.note.2"}))))};var T=r(14041);const _=()=>{const e=(0,o.wA)(),{innerWidth:t}=(0,i.l)(),r=(0,o.d4)(d.T.getNewGeofenceId),c=(0,o.d4)(d.T.getNewGeofenceGeoJsonOnMap),g=(0,o.d4)(d.T.getIsNewGeofenceSaving),y=(0,o.d4)(d.T.getNewGeofenceSaveError),b=(0,o.d4)(d.T.allowsForceSave),[v,h]=(0,n.use
1State)(!1),[w,E]=(0,n.useState)(!1),O=D({dispatch:e,geofenceId:r}),C=()=>{v?E(!0):O()};return G({setHaveFormValuesChanged:h}),T.createElement(l._s,{type:l.ts.STANDARD,info:T.createElement(m.I,{saveError:y}),onClose:C,title:T.createElement(k,null),open:Boolean(r),primaryButtonConfig:{loading:!y&&g,disabled:!v,form:"geofence-details",htmlType:"submit",label:T.createElement(a.s,{id:b?"geofence.centre.details.drawer.button.save.anyway":"geofence.centre.details.drawer.button.save"})},secondaryButtonConfig:{label:T.createElement(a.s,{id:"geofence.centre.create.drawer.button.cancel"}),onClick:C},width:t<=l.aZ?t:void 0,destroyOnClose:!0},T.createElement(l.Tm,null,T.createElement(u.S,null),T.createElement(f.N,{forceSave:b,formInitialValues:s.vP,geofenceId:r,geofenceGeoJSON:c,setHaveFormValuesChanged:h,isNewGeofence:!0})),T.createElement(p.R,{onConfirm:O,hideModal:()=>E(!1),visible:w,type:s.Uv.CANCEL_EDIT}))},D=({dispatch:e,geofenceId:t})=>()=>{e(c.o.setDrawerMode(s.SJ.VIEW)),e(c.o.createGeofenceCancelled({id:t}))},G=({setHaveFormValuesChanged:e})=>{const t=(0,o.d4)(d.T.getNewGeofenceSaveError);(0,n.useEffect)(()=>{null!=t&&e(!0)},[e,t])}},51851:(e,t,r)=>{r.d(t,{z:()=>a});var n=r(14041),o=r(81561);const a=()=>{const e=(0,n.useContext)(o.eN),t=(0,n.useContext)(o.qK);if(void 0===e||void 0===t)throw new Error("Context must be called within Provider");const{drawInstance:r}=e,{setDraw:a,updateMode:l}=t,i=(0,n.useCallback)(()=>{null==r||r.trash()},[r]),c=(0,n.useCallback)(()=>{a(void 0)},[a]),s=(0,n.useCallback)((e,t)=>{let n;if(t)switch(e){case"simple_select":n={featureIds:[t]};break;case"direct_select":n={featureId:t};break;default:n=void 0}null==r||r.changeMode(e,n),l(e)},[r,l]);return{setDraw:(0,n.useCallback)(e=>a(e),[a]),resetDraw:c,updateMode:s,cleanDrawing:i}}},58967:(e,t,r)=>{r.d(t,{z:()=>m});var n=r(29117),o=r(43420),a=r(62397),l=r(14041);const i=({onCancelHandler:e})=>l.createElement(a.$,{onClick:()=>e({})},l.createElement(o.s,{id:"map.library.geofence.actions.cancel"}));var c=r(75284),s=r(36922),d=r(14041);const p=({onCreateHandler:e})=>d.createElement(s.m,{title:d.createElement(o.s,{id:"map.library.geofence.actions.create.tooltip"}),placement:"right"},d.createElement(a.$,{onClick:()=>e({}),icon:d.createElement(c.A,null)},d.createElement(o.s,{id:"map.library.geofence.actions.create",tagName:"span"})));var u=r(14041);const m=({canAddGeofence:e,canCancelGeofence:t,onCancelHandler:r,onCreateHandler:o,isVisible:a=!0})=>u.createElement(n.W,null,e&&a&&u.createElement(p,{onCreateHandler:o}),t&&u.createElement(i,{onCancelHandler:r}))},71705:(e,t,r)=>{r.d(t,{J:()=>d});var n=r(14041),o=r(68100),a=r(42453),l=r(83593),i=r(81171),c=r(54479);const s=(0,r(1454).wY)(e=>({root:({bgColor:t,textColor:r})=>({backgroundColor:null!=t?t:e.colors.onsurfaceElevated,border:t?"none":`1.5px solid ${e.colors.onsurfaceTechnicalFont}`,borderRadius:4,color:r,cursor:"pointer",fontSize:e.typography.sizes.xs.fontSize,fontWeight:600,lineHeight:"1rem",padding:e.spacing(1),whiteSpace:"nowrap",width:"min-content"}),selected:{backgroundColor:`${e.colors.onsurfaceFont} !important`,borderColor:`${e.colors.onsurfaceFont} !important`},titleContainer:{display:"flex"},titleExtra:{marginRight:e.spacing(1)}}),{name:"Label"}),d=({lat:e,long:t,onClick:r,title:d,titleExtra:p,extension:u,isSelected:m,onMouseEnter:f,onMouseLeave:g,offset:y=[i.Ev/2+2,-5],zIndex:b,color:v})=>{const h=(0,l.D)(),w=(0,c.cP)({hex:v}),E=s({bgColor:v,textColor:w?h.colors.surfaceLevel1:h.colors.onsurfaceFont});return n.createElement(o.pH,{longitude:t,latitude:e,anchor:"top-left",offset:y,style:{position:"absolute",zIndex:null!=b?b:i.fk},onClick:r},n.createElement("div",{className:(0,a.$)(E.root,m&&E.selected),onMouseEnter:f,onMouseLeave:g},n.createElement("div",{className:E.titleContainer},p&&n.createElement("div",{className:E.titleExtra},p),d),u&&n.createElement("div",null,u)))}},76328:(e,t,r)=>{r.d(t,{j:()=>i});var n=r(70541),o=r(99204),a=r(82162),l=r(92857);const i=({shouldShowGeofences:e=!0})=>{const t=(0,o.a)(),{userHasAccessToGeofences:r}=(0,l.e)(),i=(0,n.d4)(a.T.getIsUserOrgSwitched);return r&&!t&&(e||!i)}},79911:(e,t,r)=>{r.d(t,{l:()=>a});var n=r(14041),o=r(8296);const a=(e,t)=>{const r=(0,n.useRef)(null),a=(0,o.L)(t);(0,n.useEffect)(()=>{r.current&&clearTimeout(r.current),r.current=window.setTimeout(()=>{e&&e.resize()},50)},[e,a,r])}},81561:(e,t,r)=>{r.d(t,{eN:()=>o,lT:()=>l,qK:()=>a});var n=r(14041);const o=n.createContext({mode:"static",drawInstance:void 0}),a=n.createContext(void 0),l=({children:e})=>
1{const[t,r]=(0,n.useState)(),[l,i]=(0,n.useState)("static"),c=(0,n.useMemo)(()=>({updateMode:i,setDraw:r}),[i,r]),s=(0,n.useMemo)(()=>({drawInstance:t,mode:l}),[t,l]);return n.createElement(o.Provider,{value:s},n.createElement(a.Provider,{value:c},e))}}}]); 2//# sourceMappingURL=3300.myeroad.d22f0267771728d4d8f1.js.map
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.