1"use strict";(self.webpackChunkborzodelivery_frontend=self.webpackChunkborzodelivery_frontend||[]).push([[728],{65036(t,e,n){n.r(e),n.d(e,{default:()=>p});var o=n(96540),i=n(20808),s=n(79018),a=(n(18111),n(7588),n(61701),n(22587)),r=n(44355);class l extends o.Component{constructor(t){super(t),this.map=void 0,this.mapCanvas=void 0,this.map=null,this.mapCanvas=o.createRef()}onMapLoaded(){const t=r.A.getPolygons()||{};Object.values(t).forEach((t=>{this.map?.setPolygon({path:t.path,color:t.color})}))}componentDidMount(){this.mapCanvas.current&&(this.map=new a.K(this.mapCanvas.current,{center:r.A.getCenter(),zoom:r.A.getZoom(),onMapLoaded:this.onMapLoaded.bind(this)}))}render(){return o.createElement("div",{id:"map-canvas",ref:this.mapCanvas})}}function p(){return o.createElement(i.t,{fallback:o.createElement("div",null,"Map loading error"),onException:s.A.log.logException},o.createElement(l,null))}},20808(t,e,n){n.d(e,{t:()=>i});var o=n(96540);class i extends o.Component{constructor(t){super(t),this.state={hasError:!1}}componentDidCatch(t){this.props.onException(t),this.setState({hasError:!0})}render(){return this.state.hasError?this.props.fallback:this.props.children}}},22587(t,e,n){n.d(e,{K:()=>p}),n(44114),n(18111),n(61701);var o=n(72512);const i=new class{constructor(){this.directionsTypes=null,this.activeInfoWindow=null,this.flightPath=null,this.currentOptions={},this.MarkerLibrary=void 0}initMap(t,e,n){const o=new google.maps.Map(t,{mapId:"DEMO_MAP_ID",zoom:e.zoom,center:{lat:e.center[0],lng:e.center[1]},scaleControl:!0,scrollwheel:!0,mapTypeId:google.maps.MapTypeId.ROADMAP,streetViewControl:!1,zoomControl:!0,zoomControlOptions:{position:google.maps.ControlPosition.RIGHT_CENTER}});e.onMapCenterChanged&&o.addListener("center_changed",(()=>{const t=o.getCenter();t&&e.onMapCenterChanged&&e.onMapCenterChanged([t.lat(),t.lng()])})),e.onMapClick&&o.addListener("click",(()=>{e.onMapClick&&e.onMapClick()})),this.currentOptions=e,google.maps.importLibrary("marker").then((t=>{this.MarkerLibrary=t,n(o)}))}setPoint(t,e){const{AdvancedMarkerElement:n,PinElement:o}=this.MarkerLibrary,i={position:{lat:e.position[0],lng:e.position[1]},map:t},s=void 0!==e.isFocused;if(e.icon){const t=document.createElement("img");t.src=e.icon;const n=new o({glyph:t,scale:s?1.5:void 0});if(i.content=n.element,e.label){const t=new o({glyph:e.name.toString()});i.content=t.element}}else if(e.hintContent&&(i.title=e.hintContent),e.color||s){const t=`#${e.color}`,n=new o({glyph:e.name?.toString(),background:t,borderColor:t,scale:s?1.5:void 0});i.content=n.element}else if(e.name){const t=new o({glyph:e.name.toString()});i.content=t.element}const a=new n(i);return e.balloonContent&&a.addListener("click",(()=>{this.activeInfoWindow&&this.activeInfoWindow.close(),this.activeInfoWindow=new google.maps.InfoWindow({content:e.balloonContent}),this.activeInfoWindow.open({map:t,anchor:a}),this.currentOptions.onPinClick&&"function"==typeof this.currentOptions.onPinClick&&this.currentOptions.onPinClick()})),a}changePosition(t,e){t.position=new google.maps.LatLng(...e)}changeVisible(t,e,n){t.map=e?null:n}setZoom(t,e){t.setZoom(e)}setRoute(t,e,n,o){const i=new google.maps.DirectionsService,s=new google.maps.DirectionsRenderer({preserveViewport:!0,suppressMarkers:!0}),a={origin:new google.maps.LatLng(e[0],e[1]),destination:new google.maps.LatLng(n[0],n[1]),travelMode:o?this.directionsTypes[o]:this.directionsTypes.walk};i.route(a,((t,e)=>{e===google.maps.DirectionsStatus.OK&&s.setDirections(t)})),s.setMap(t)}setPolygon(t,e){const n=[];for(let t=0;t<e.path.length;t++){const o=[];for(let n=0;n<e.path[t].length;n++)o.push({lat:parseFloat(e.path[t][n][0]),lng:parseFloat(e.path[t][n][1])});n.push(o)}const o=new google.maps.Polygon({paths:n,strokeColor:e.color,strokeOpacity:.8,strokeWeight:2,fillColor:e.color,fillOpacity:e.opacity,hintContent:e.name||null,balloonContent:e.baloonContent||null});return e.onClick&&"function"==typeof e.onClick&&o.addListener("click",(()=>{e.onClick()})),o.setMap(t),o}setCenter(t,e){t.setCenter(new google.maps.LatLng(...e))}panTo(t,e){t&&t.panTo(new google.maps.LatLng(...e))}getCenter(t){const e=t.getCenter();return e?[e.lat(),e.lng()]:[0,0]}getObjectByCoordinate(t,e){const n=new google.maps.Geocoder,i={lat:t[0],lng:t[1]};o.A.logEvent("GoogleMap",{action:"geocode"}),n.geocode({location:i},((t,n)=>{"OK"===n&&t?t[0]&&e(t[0].formatted_address):o.A.logEvent("GoogleMapError",{status:n})}))}clearPoints(t,e){if(t)for(let t=0;t<e.length;t++)e[t].map=null}fitBounds(t,e){const n=new google.maps.LatLngBounds;for(let t=0;t<e.length;t++)n.extend(e[t].position);t&&t.fitBounds&&t.fitBounds(n)}clearPolyline(){this.flightPath&&this.flightPath.setMap(null)}setPolyline(t,e){const n=e.map((({latitude:t,longitude:e})=>({lat:t,lng:e})));this.flightPath=new google.maps.Polyline({path:n,geodesic:!0,strokeColor:"#F04240",strokeOpacity:.8,strokeWeight:6}),this.flightPath.setMap(t)}disableDrag(){}};var s=n(79018),a=n(59801);
1class r{constructor(){this.clientApi=void 0,this.clientApi=i}static onMapLoaded(t){const e=r.getLoader();e?.load().then(t)}initMap(t,e,n){t&&this.clientApi.initMap(t,{center:e.center?this.toInternalLatLon(e.center):[0,0],zoom:e.zoom||9,onMapCenterChanged:e.onMapCenterChanged?t=>{e.onMapCenterChanged?.(this.toExternalLatLon(t))}:void 0,onPinClick:e.onPinClick,onMapClick:e.onMapClick,onItemDrag:e.onItemDrag,routeSteps:e.routeSteps,requestUserLocation:e.requestUserLocation},n)}setPoint(t,e){return this.clientApi.setPoint(t,{...e,position:this.toInternalLatLon(e.position)})}changePosition(t,e){this.clientApi.changePosition(t,this.toInternalLatLon(e))}changeVisible(t,e,n){this.clientApi.changeVisible(t,e,n)}setRoute(t,e,n,o){this.clientApi.setRoute(t,this.toInternalLatLon(e),this.toInternalLatLon(n),o)}clearPolyline(){this.clientApi.clearPolyline()}setPolyline(t,e){this.clientApi.setPolyline(t,e.map((t=>({latitude:Number(t.latitude),longitude:Number(t.longitude)}))))}setPolygon(t,e){return this.clientApi.setPolygon(t,e)}setCenter(t,e){this.clientApi.setCenter(t,this.toInternalLatLon(e))}panTo(t,e){this.clientApi.panTo(t,this.toInternalLatLon(e))}getCenter(t){const e=this.clientApi.getCenter(t);return this.toExternalLatLon(e)}getObjectByCoordinate(t,e){this.clientApi.getObjectByCoordinate(this.toInternalLatLon(t),e)}disableDrag(t){this.clientApi.disableDrag()}clearPoints(t,e){this.clientApi.clearPoints(t,e)}fitBounds(t,e){this.clientApi.fitBounds(t,e)}setZoom(t,e){this.clientApi.setZoom(t,e)}static getLoader(){return s.A.getScriptLoader(a.S.GOOGLE)}toInternalLatLon(t){return t.map(Number)}toExternalLatLon(t){return t.map(String)}}var l=n(44355);class p{constructor(t,e){this.map=null,this.points=[],this.polygons=[],this.mapServiceAdapter=void 0,r.onMapLoaded((()=>{this.mapServiceAdapter=new r;const n=l.A.getCenter();let o=[n[0],n[1]],i=l.A.getZoom();e&&e.center&&(o=e.center),e&&e.zoom&&(i=e.zoom),void 0===e.requestUserLocation&&(e.requestUserLocation=!0),this.mapServiceAdapter.initMap(t,{center:[...o],zoom:i,onMapCenterChanged:e?.onMapCenterChanged,onPinClick:e?.onPinClick,onMapClick:e?.onMapClick,onItemDrag:t=>{e.onItemDrag&&"function"==typeof e.onItemDrag&&e.onItemDrag(t)},routeSteps:e?.routeSteps||[],requestUserLocation:e?.requestUserLocation??!0},(t=>{this.map=t,e&&(e.onMapLoaded&&e.onMapLoaded(),e.disableDrag&&this.mapServiceAdapter.disableDrag(this.map))}))}))}setPoints(t){if(!t)return;const e=[];for(let n=0;n<t.length;n++)e.push(this.setPoint(t[n]));return e}setPoint(t){const e=t.isFocused?"fe4584":t.color,n=this.mapServiceAdapter.setPoint(this.map,{...t,color:e});return this.points.push(n),n}setZoom(t){this.mapServiceAdapter.setZoom(this.map,t)}changePosition(t,[e,n]){this.mapServiceAdapter.changePosition(t,[e,n])}setPointVisible(t,e){this.mapServiceAdapter.changeVisible(t,e,this.map)}setPolygon(t){t.opacity||(t.opacity=.2),this.polygons.push(this.mapServiceAdapter.setPolygon(this.map,t))}setCenter(t){this.mapServiceAdapter.setCenter(this.map,t)}panTo(t){this.mapServiceAdapter.panTo(this.map,t)}getCenter(){const t=this.mapServiceAdapter.getCenter(this.map);return[String(t[0]),String(t[1])]}clearPoints(t=this.points){this.mapServiceAdapter.clearPoints(this.map,t),this.points=[]}clear(){this.clearPoints();for(let t=0;t<this.polygons.length;t++)this.polygons[t].setParent(null);this.polygons=[]}getObjectByCoordinate(t,e){this.mapServiceAdapter.getObjectByCoordinate(t,e)}getPoints(){return this.points}getMap(){return this.map}fitBounds(){this.mapServiceAdapter.fitBounds(this.map,this.points)}setRoute(t,e,n){this.mapServiceAdapter.setRoute(this.map,t,e,n)}clearPolyline(){this.mapServiceAdapter.clearPolyline()}setPolyline(t){this.mapServiceAdapter.setPolyline(this.map,t)}}},44355(t,e,n){n.d(e,{A:()=>a});var o=n(48995);const{currentRegionData:i}=o.A;function s(t){return i[t]}const a={getCenter:()=>s("map_center"),getPolygons:()=>o.A.regionPolygons,getZoom:()=>s("initial_zoom")}}}]);
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.