var SensbitFedexMapWidget;!function(){"use strict";"undefined"==typeof SensbitFedexMapWidget?(SensbitFedexMapWidget=function(){function a(b,c){b.getMarkerClusterer().extend(a,google.maps.OverlayView),this.cluster_=b,this.className_=b.getMarkerClusterer().getClusterClass(),this.styles_=c,this.center_=null,this.div_=null,this.sums_=null,this.visible_=!1,this.setMap(b.getMap())}function b(b){this.markerClusterer_=b,this.map_=b.getMap(),this.gridSize_=b.getGridSize(),this.minClusterSize_=b.getMinimumClusterSize(),this.averageCenter_=b.getAverageCenter(),this.markers_=[],this.center_=null,this.bounds_=null,this.clusterIcon_=new a(this,b.getStyles())}function c(a,b,d){this.extend(c,google.maps.OverlayView),b=b||[],d=d||{},this.markers_=[],this.clusters_=[],this.listeners_=[],this.activeMap_=null,this.ready_=!1,this.gridSize_=d.gridSize||60,this.minClusterSize_=d.minimumClusterSize||2,this.maxZoom_=d.maxZoom||null,this.styles_=d.styles||[],this.title_=d.title||"",this.zoomOnClick_=!0,void 0!==d.zoomOnClick&&(this.zoomOnClick_=d.zoomOnClick),this.averageCenter_=!1,void 0!==d.averageCenter&&(this.averageCenter_=d.averageCenter),this.ignoreHidden_=!1,void 0!==d.ignoreHidden&&(this.ignoreHidden_=d.ignoreHidden),this.enableRetinaIcons_=!1,void 0!==d.enableRetinaIcons&&(this.enableRetinaIcons_=d.enableRetinaIcons),this.imagePath_=d.imagePath||c.IMAGE_PATH,this.imageExtension_=d.imageExtension||c.IMAGE_EXTENSION,this.imageSizes_=d.imageSizes||c.IMAGE_SIZES,this.calculator_=d.calculator||c.CALCULATOR,this.batchSize_=d.batchSize||c.BATCH_SIZE,this.batchSizeIE_=d.batchSizeIE||c.BATCH_SIZE_IE,this.clusterClass_=d.clusterClass||"cluster",navigator.userAgent.toLowerCase().indexOf("msie")!==-1&&(this.batchSize_=this.batchSizeIE_),this.setupStyles_(),this.addMarkers(b,!0),this.setMap(a)}function d(a,b){for(var c=0,d=a;c=332&&google.maps.event.addDomListener(this.div_,"touchstart",function(a){a.stopPropagation()}),google.maps.event.addDomListener(this.div_,"click",function(d){if(a=!1,!b){var e,f,g=c.cluster_.getMarkerClusterer();google.maps.event.trigger(g,"click",c.cluster_),google.maps.event.trigger(g,"clusterclick",c.cluster_),g.getZoomOnClick()&&(f=g.getMaxZoom(),e=c.cluster_.getBounds(),g.getMap().fitBounds(e),setTimeout(function(){g.getMap().fitBounds(e),null!==f&&g.getMap().getZoom()>f&&g.getMap().setZoom(f+1)},100)),d.cancelBubble=!0,d.stopPropagation&&d.stopPropagation()}}),google.maps.event.addDomListener(this.div_,"mouseover",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseover",c.cluster_)}),google.maps.event.addDomListener(this.div_,"mouseout",function(){var a=c.cluster_.getMarkerClusterer();google.maps.event.trigger(a,"mouseout",c.cluster_)})},a.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)},a.prototype.draw=function(){if(this.visible_){var a=this.getPosFromLatLng_(this.center_);this.div_.style.top=a.y+"px",this.div_.style.left=a.x+"px",this.div_.style.zIndex=google.maps.Marker.MAX_ZINDEX+1}},a.prototype.hide=function(){this.div_&&(this.div_.style.display="none"),this.visible_=!1},a.prototype.show=function(){if(this.div_){var a="",b=this.backgroundPosition_.split(" "),c=parseInt(b[0].replace(/^\s+|\s+$/g,""),10),d=parseInt(b[1].replace(/^\s+|\s+$/g,""),10),e=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(e),a="",this.div_.innerHTML=a+"
"+this.sums_.text+"
","undefined"==typeof this.sums_.title||""===this.sums_.title?this.div_.title=this.cluster_.getMarkerClusterer().getTitle():this.div_.title=this.sums_.title,this.div_.style.display=""}this.visible_=!0},a.prototype.useStyle=function(a){this.sums_=a;var b=Math.max(0,a.index-1);b=Math.min(this.styles_.length-1,b);var c=this.styles_[b];this.url_=c.url,this.height_=c.height,this.width_=c.width,this.anchorText_=c.anchorText||[0,0],this.anchorIcon_=c.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)],this.textColor_=c.textColor||"black",this.textSize_=c.textSize||11,this.textDecoration_=c.textDecoration||"none",this.fontWeight_=c.fontWeight||"bold",this.fontStyle_=c.fontStyle||"normal",this.fontFamily_=c.fontFamily||"Arial,sans-serif",this.backgroundPosition_=c.backgroundPosition||"0 0"},a.prototype.setCenter=function(a){this.center_=a},a.prototype.createCss=function(a){var b=[];return b.push("cursor: pointer;"),b.push("position: absolute; top: "+a.y+"px; left: "+a.x+"px;"),b.push("width: "+this.width_+"px; height: "+this.height_+"px;"),b.push("-webkit-user-select: none;"),b.push("-khtml-user-select: none;"),b.push("-moz-user-select: none;"),b.push("-o-user-select: none;"),b.push("user-select: none;"),b.join("")},a.prototype.getPosFromLatLng_=function(a){var b=this.getProjection().fromLatLngToDivPixel(a);return b.x-=this.anchorIcon_[1],b.y-=this.anchorIcon_[0],b.x=parseInt(b.x,10),b.y=parseInt(b.y,10),b},b.prototype.getSize=function(){return this.markers_.length},b.prototype.getMarkers=function(){return this.markers_},b.prototype.getCenter=function(){return this.center_},b.prototype.getMap=function(){return this.map_},b.prototype.getMarkerClusterer=function(){return this.markerClusterer_},b.prototype.getBounds=function(){var a,b=new google.maps.LatLngBounds(this.center_,this.center_),c=this.getMarkers();for(a=0;ad)a.getMap()!==this.map_&&a.setMap(this.map_);else if(cb)return void this.clusterIcon_.hide();if(a0))for(a=0;a3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.02070771743472,-178.48388434375),new google.maps.LatLng(-85.08136444384544,178.00048865625));var f=this.getExtendedBounds(d),g=Math.min(a+this.batchSize_,this.markers_.length);for(b=a;b\n '+b+"\n \n "},a.submitButtonOrText=function(a,b){return b?this.submitButton(a):"Punkt czasowo niedostępny"},a.addressDescription=function(a){var b=a.postalCode||"";return"\n
ul. "+a.street+"
"+b+" "+a.city+"
\n "},a.operatorLogo=function(a){var b=this.posImage(a+".png");return''+a+''},a.brandLogo=function(a){var b=this.asset("images/brand/"+a+".png");return''+a+''},a.rwdButtons=function(){var b=a.asset("images/icons/icon_target.svg"),c=a.asset("images/icons/icon_filter.svg");return'
\n
\n \n
\n
\n
\n
\n \n
\n
'},a.footer=function(){var a=this.asset("images/bp_log.svg");return''},a.parcelPrice=function(a){if(a&&(a.price||0==a.price)){var b=a.price.toFixed(2).replace(".",",");return b+" zł"}return""},a.posType=function(a){return a.deliveryPoint&&!a.postingPoint?'UWAGA! Punkt tylko odbiorczy':a.postingPoint&&!a.deliveryPoint?'UWAGA! Punkt tylko nadawczy':""},a.posTags=function(a){var b="";return a.deliveryPoint&&(b+='
Punkt odbiorczy
'),a.postingPoint&&(b+='
Punkt nadawczy
'),a.cod&&(b+='
Pobranie
'),"INPOST"==a.brand&&(b+='
Dostęp 24h
'),b},a.openingHoursDescription=function(a){function b(a){function b(a){for(var b={},c=0,e=d;c"+n+": "+j+"",h=k}return"
Pn-Nd: 00:00 - 23:59
"==g?"Pn-Nd: 24h":g}var c=a.openingHoursMap,d=c&&Object.keys(c).length?b(c):"brak danych";return'\n
Godziny otwarcia:
\n
\n '+d+"\n
\n "},a}(),o=function(){function a(){}return Object.defineProperty(a,"styles",{get:function(){return[{featureType:"administrative",elementType:"labels.text.fill",stylers:[{color:"#322e2d"}]},{featureType:"administrative",elementType:"labels.text.stroke",stylers:[{color:"#fffaf2"},{weight:4.68},{gamma:1}]},{featureType:"landscape",elementType:"all",stylers:[{lightness:20},{color:"#efe9e4"}]},{featureType:"landscape",elementType:"labels",stylers:[{visibility:"off"}]},{featureType:"landscape.man_made",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"poi",elementType:"geometry",stylers:[{visibility:"on"},{color:"#f0e4d3"}]},{featureType:"poi",elementType:"labels",stylers:[{visibility:"on"},{saturation:-24},{lightness:0}]},{featureType:"poi",elementType:"labels.text.fill",stylers:[{lightness:16},{saturation:-100},{hue:"#ffd800"}]},{featureType:"poi",elementType:"labels.icon",stylers:[{saturation:-100},{hue:"#ffd800"}]},{featureType:"poi.sports_complex",elementType:"labels.icon",stylers:[{visibility:"off"}]},{featureType:"road",elementType:"labels.text.fill",stylers:[{lightness:-100},{saturation:-77}]},{featureType:"road",elementType:"labels.text.stroke",stylers:[{lightness:100}]},{featureType:"road.highway",elementType:"geometry.fill",stylers:[{color:"#efe9e4"},{lightness:-10}]},{featureType:"road.highway",elementType:"geometry.stroke",stylers:[{color:"#efe9e4"},{lightness:-25}]},{featureType:"road.highway",elementType:"labels.text.fill",stylers:[{lightness:41}]},{featureType:"road.highway",elementType:"labels.text.stroke",stylers:[{weight:.01}]},{featureType:"road.highway",elementType:"labels.icon",stylers:[{lightness:43},{visibility:"off"}]},{featureType:"road.arterial",elementType:"geometry.fill",stylers:[{color:"#efe9e4"},{lightness:-6}]},{featureType:"road.arterial",elementType:"geometry.stroke",stylers:[{color:"#efe9e4"},{lightness:-20}]},{featureType:"road.arterial",elementType:"labels.text.fill",stylers:[{lightness:47}]},{featureType:"road.arterial",elementType:"labels.text.stroke",stylers:[{lightness:1},{weight:.01}]},{featureType:"road.local",elementType:"geometry.fill",stylers:[{color:"#f4f0f0"},{lightness:14}]},{featureType:"road.local",elementType:"labels.text.fill",stylers:[{lightness:65}]},{featureType:"transit.station",elementType:"labels.text",stylers:[{saturation:-100}]},{featureType:"transit.station",elementType:"labels.icon",stylers:[{saturation:-100}]},{featureType:"transit.station.bus",elementType:"all",stylers:[{visibility:"off"}]},{featureType:"water",elementType:"all",stylers:[{color:"#19a0d8"},{gamma:1},{lightness:52}]},{featureType:"water",elementType:"labels.text.fill",stylers:[{lightness:-100}]},{featureType:"water",elementType:"labels.text.stroke",stylers:[{lightness:100}]}]},enumerable:!0,configurable:!0}),a}();!function(a){a[a.OPERATOR="OPERATOR"]="OPERATOR",a[a.COD="COD"]="COD"}(l||(l={}));var p=function(){function a(){}return a.prototype.init=function(a,b){var c=this;this.filters=this.createFilters(a,b),this.filtersElement.innerHTML=this.display(),this.forEachFilterElement(function(a){a&&(a.checked=!0)});var d=this.findCodFilterElement();d&&(d.checked=b.filterValue),this.filtersButtonElement.addEventListener("click",function(){c.isCollapsed()?c.expandFilters():c.collapseFilters()}),this.rwdFiltersButtonElement.addEventListener("click",function(){c.isCollapsed()?c.expandFilters():c.collapseFilters()}),this.filtersContent.addEventListener("scroll",function(){c.processFiltersInsetShadow()}),window.addEventListener("resize",function(){c.filtersContent&&c.processFiltersInsetShadow()}),this.processFiltersInsetShadow()},a.prototype.processFiltersInsetShadow=function(){var a=this.filtersContent.offsetWidth,b=this.filtersContent.scrollWidth,c=this.filtersContent.scrollLeft;a\n \n
'+a+"
\n \n "},a.prototype.createFiltersDisplay=function(){for(var a=[],b=0,c=this.filters;b\n \n
\n \n
\n '+j+"\n
\n
\n \n "}else if(d.show){var k=d.show&&d.value?" disabled ":"";e='\n
\n \n
\n '}""!=e&&a.push(e)}return a.join("")},a}(),q=function(){function a(){this.POS_AVAILABLE_HANDLING_OPERATORS=["FEDEX"]}return a.prototype.init=function(b,d,e,f){var g=this;this.map=b,this.operators=d,this.selectPointCallback=e,this.submitPointCallback=f,this.markerClusterer=new c(b,[],{batchSize:4e4,batchSizeIE:1e4,ignoreHidden:!0,minimumClusterSize:4,styles:[{url:n.asset("images/markers/m1.png"),height:30,width:31,textColor:"white"},{url:n.asset("images/markers/m2.png"),height:34,width:35,textColor:"white"},{url:n.asset("images/markers/m3.png"),height:39,width:40,textColor:"white"},{url:n.asset("images/markers/m4.png"),height:43,width:45,textColor:"white"},{url:n.asset("images/markers/m5.png"),height:49,width:51,textColor:"white"}]}),this.oms=new SensbitFedexMapWidget.OverlappingMarkerSpiderfier(b,{markersWontMove:!0,markersWontHide:!1,keepSpiderfied:!0,ignoreMapClick:!0,nearbyDistance:10,circleFootSeparation:35}),this.siw=SensbitFedexMapWidget.SnazzyInfoWindow(google.maps.OverlayView), this.posListElement.innerHTML=a.displayPointDescription(),google.maps.event.addListener(b,"click",function(){g.unselectMarker()});var h=document.getElementById("SensbitFedexMapWidgetMap");h.addEventListener("touchmove",function(){g.markerClusterer.setZoomOnClick(!1)}),h.addEventListener("touchend",function(){setTimeout(function(){g.markerClusterer.setZoomOnClick(!0)})}),b.addListener("dragstart",function(){g.markerClusterer.setZoomOnClick(!1)}),b.addListener("dragend",function(){setTimeout(function(){g.markerClusterer.setZoomOnClick(!0)})})},a.prototype.clearMarkers=function(){this.oms.forgetAllMarkers(),this.markerClusterer.clearMarkers()},a.prototype.updateMarkers=function(a){for(var b=[],c=0,d=a;c\n
\n
\n
\n
\n
\n
\n
\n '+c+'\n
\n
\n '+b+'\n
\n
\n
\n \n
\n
\n
\n
\n Wybrany punkt nie jest w tym momencie dostępny\n
\n
\n
\n
\n '+e+'\n
\n
\n
\n Punkt obsługuje: '+a+"\n
\n \n "},a.prototype.createMarkerDescription=function(a){var b=n.brandLogo(a.brand),c=a.brandPretty,e=a.operatorPretty,f=a.description?'
'+a.description+"
":"",g=n.posTags(a),h=n.addressDescription(a),i=n.parcelPrice(d(this.operators,function(b){return b.operator==a.operator})),j=n.openingHoursDescription(a),k=""!=i,l=n.submitButtonOrText(k,this.isPosAvailable(a)),m=n.asset("images/icons/icon_anuluj.svg"),o=k?"bp-point-desc-submit-row-submit-button":"bp-point-desc-submit-row-submit-button centered";return'\n
\n
\n
\n
\n
\n
\n
\n
\n '+c+'\n
\n
\n '+a.code+'\n
\n
\n
\n \n
\n
\n
\n
\n '+h+'\n
\n
\n '+b+'\n
\n
\n
\n
\n '+i+'\n
\n
\n '+l+'\n
\n
\n
\n '+f+'\n
\n
\n '+j+'\n
\n
\n '+g+'\n
\n
\n Punkt obsługuje: '+e+"\n
\n
\n "},a.createMarkerShortDescription=function(a){var b=n.brandLogo(a.brand),c=a.brandPretty,d=a.operatorPretty;return'\n
\n
\n \n
\n
\n
\n
'+c+'
\n
'+d+"
\n
\n
\n
\n "},a.prototype.showMarkerDescription=function(){i(this.posListElement,"bp-info-hidden")},a.prototype.hideMarkerDescription=function(){h(this.posListElement,"bp-info-hidden")},a.displayPointDescription=function(){return'\n
\n '},a.prototype.updateMarkerDescription=function(a){if(a){var b=this.createMarkerDescription(a);this.updateMarkerDescriptionWithTemplate(b,a)}else this.hideMarkerDescription(),this.cleanup()},a.prototype.updateErrorDescription=function(b,c,d){var e=a.createErrorDescription(b,c,d);this.updateMarkerDescriptionWithTemplate(e,null),a.submitButton().disabled=!0},a.prototype.updateMarkerDescriptionWithTemplate=function(a,b){var c=this;this.showMarkerDescription();var d=document.createElement("DIV");d.className="bp-pos-info-element",d.id="SensbitFedexMapWidgetPOSInfoElement",d.innerHTML=a,b&&this.isPosAvailable(b)&&d.getElementsByClassName("bp-map-submit-button")[0].addEventListener("click",function(a){a.stopPropagation(),a.cancelBubble=!0,c.submitPointCallback(b)}),d.getElementsByClassName("bp-point-desc-point-block-close")[0].addEventListener("click",function(a){a.stopPropagation(),a.cancelBubble=!0,c.unselectMarker(),i(c.posListElement,"open")}),d.getElementsByClassName("bp-point-desc-header")[0].addEventListener("click",function(a){a.stopPropagation(),a.cancelBubble=!0,g(c.posListElement,"open")?i(c.posListElement,"open"):h(c.posListElement,"open")}),delete Hammer.defaults.cssProps.userSelect,this.hammerTime=new Hammer(d.getElementsByClassName("bp-point-desc-header")[0]),this.hammerTime.get("swipe").set({direction:Hammer.DIRECTION_VERTICAL}),this.hammerTime.on("swipeup",function(){g(c.posListElement,"open")||h(c.posListElement,"open")}),this.hammerTime.on("swipedown",function(){g(c.posListElement,"open")&&i(c.posListElement,"open")}),this.findPosElement()?this.posListContentElement.replaceChild(d,this.findPosElement()):this.posListContentElement.appendChild(d)},a.prototype.cleanup=function(){var a=this;this.findPosElement()&&setTimeout(function(){a.findPosElement().outerHTML=""},200)},Object.defineProperty(a.prototype,"posListElement",{get:function(){return document.getElementById("SensbitFedexMapWidgetPOSInfo")},enumerable:!0,configurable:!0}),Object.defineProperty(a.prototype,"posListContentElement",{get:function(){return document.getElementById("SensbitFedexMapWidgetPOSInfoContent")},enumerable:!0,configurable:!0}),a.prototype.findPosElement=function(){return document.getElementById("SensbitFedexMapWidgetPOSInfoElement")},a.submitButton=function(){return document.getElementsByClassName("bp-map-submit-button").item(0)},a.prototype.isPosAvailable=function(a){return a.available||!this.posAvailableHandling(a)},a.prototype.posAvailableHandling=function(a){return this.POS_AVAILABLE_HANDLING_OPERATORS.some(function(b){return b===a.operator})},a}(),r=function(){function a(){this.searchInputs=[],this.searchCallback=function(){}}return a.prototype.init=function(a,b){this.map=a,this.places=new google.maps.places.PlacesService(this.map),this.searchCallback=b||this.searchCallback},a.prototype.initAutocomplete=function(a){var b=this,c=new google.maps.places.Autocomplete(a,{componentRestrictions:{country:"pl"}});c.addListener("place_changed",function(){var d=c.getPlace();d.geometry?b.handleSearchResult(d,a.value):b.search(d.name)}),this.searchInputs.push(a)},a.prototype.search=function(a){var b=this;this.places.textSearch({query:a,bounds:new google.maps.LatLngBounds(new google.maps.LatLng(49.02317,14.544465),new google.maps.LatLng(54.763658,23.828641))},function(c){c&&c.length?b.handleSearchResult(c[0],a):console.warn("no place found for query:",a)})},a.prototype.handleSearchResult=function(a,b){this.changeMapBounds(a),this.updateInputsValue(b),this.searchCallback(b)},a.prototype.changeMapBounds=function(a){var b=new google.maps.LatLngBounds,c=!1;a.geometry.viewport?b.union(a.geometry.viewport):(b.extend(a.geometry.location),c=!0),this.map.fitBounds(b),c&&this.map.setZoom(this.map.getZoom()-6)},a.prototype.updateInputsValue=function(a){for(var b=0,c=this.searchInputs;b\n
\n
\n
\n \n
\n
\n Mój adres\n
\n
\n
\n
\n \n
\n
\n Znajdź mnie\n
\n
\n
\n
\n \n
\n
\n Filtry\n
\n
\n
\n \n \n '},a.prototype.secureLocation=function(){return"https:"===location.protocol||"localhost"===location.hostname||"127.0.0.1"===location.hostname},a}(),t=function(){function a(){var a=this;this.submit=function(b){a.http.countPointSelection(b.operator,b.code),a.options.callback&&a.options.callback({code:b.code,operator:b.operator,street:b.street,postalCode:b.postalCode,city:b.city,province:b.province,description:b.description,latitude:b.latitude,longitude:b.longitude,openingHoursMap:b.openingHoursMap,cod:b.cod,brand:b.brand})},this.updateRwd=function(){var b="bp-media-lg",c=a.rootElement;c.offsetWidth<=576?b="bp-media-xs":c.offsetWidth<=768?b="bp-media-sm":c.offsetWidth<=992&&(b="bp-media-md"),c.className=c.className.replace(/bp-media-(xs|sm|md|lg)/,b)},this.selectPoint=function(b,c){if(b){var d=b.get("posId");a.http.getPos(d,function(d){a.markers.selectMarker(b,d,c)},function(c){return a.markers.errorMarker(b,c)})}else a.markers.unselectMarker()}}return a.prototype.init=function(a,b){this.options=b,this.options.operators=this.options.operators||[{operator:"FEDEX"}],this.http=new m(b.testMode),a.innerHTML=this.display(),this.updateRwd(),SensbitFedexMapWidget.ResizeSensor(this.rootElement,this.updateRwd),this.createModules(),this.options.callback||(this.rootElement.className+=" bp-no-callback"),this.options.mapOnly&&h(this.rootElement,"map-only"),window.google&&google.maps?this.initMap():this.http.loadScript("https://maps.googleapis.com/maps/api/js?v=3.exp&key="+this.options.googleMapApiKey+"&libraries=places&language=pl®ion=PL&callback=SensbitFedexMapWidget.initMap")},a.prototype.initMap=function(){var a=this,b=this.createMapOptions(this.options.mapOptions);if(this.map=new google.maps.Map(document.getElementById("SensbitFedexMapWidgetMap"),b),this.options.readyCallback&&google.maps.event.addListenerOnce(this.map,"tilesloaded",this.options.readyCallback),this.markers.init(this.map,this.options.operators,this.selectPoint,this.submit),this.places.init(this.map,this.options.searchCallback),this.options.externalSearch&&this.places.initAutocomplete(this.options.externalSearch),this.options.initialAddress&&!this.options.selectedPos&&this.places.search(this.options.initialAddress),this.search&&this.search.init(this.map,this.places,this.options.userDataQuery),this.filters){var c={showFilter:!1,filterValue:this.options.codOnly};this.filters.init(this.options.operators,c),this.filters.onChange(function(){return a.updatePointsVisibility()})}this.updatePoints(function(){var b=a.options.selectedPos;if(b){var c=a.markers.findMarker(b);c&&a.selectPoint(c,!0)}var d=a.markers.getAvailableOperators();a.filters.updateFiltersDisplay(d),a.updatePointsVisibility()})},a.prototype.createModules=function(){this.markers=new q,this.places=new r,this.filters=new p,this.search=new s},a.prototype.createMapOptions=function(a){void 0===a&&(a={});var b={center:{lat:52.0693235,lng:19.4803114},zoom:6,styles:o.styles,mapTypeControl:!1,gestureHandling:"cooperative"};return a.center=a.center||b.center,a.zoom=void 0!==a.zoom?a.zoom:b.zoom,a.styles=a.styles||b.styles,a.mapTypeControl=void 0!==a.mapTypeControl?a.mapTypeControl:b.mapTypeControl,a.gestureHandling=void 0!==a.gestureHandling?a.gestureHandling:b.gestureHandling,a.fullscreenControl=!1,a},a.prototype.updatePoints=function(a){var b=this,c=this.getOperatorsToUpdate();return this.markers.clearMarkers(),c.length?void this.http.listPos(this.options.posType,c,function(c){b.markers.updateMarkers(c),b.hidePosLoader(),a()},function(a){console.error(a),b.hidePosLoader(),b.displayPosCount(-1)}):(console.warn("Operators array is empty"),void this.hidePosLoader())},a.prototype.setStatusMessage=function(a){var b=document.getElementById("BPPosCount");b.innerHTML=a},a.prototype.hidePosLoader=function(){var a=document.getElementById("BPPosLoader");h(a,"hide")},a.prototype.updatePointsVisibility=function(){var a=this.getOperatorsToUpdate(),b=this.getCodFilter(),c=this.markers.filterMarkers(a,b);this.displayPosCount(c)},a.prototype.displayPosCount=function(a){a>0?this.setStatusMessage(a+" punktów"):0==a?this.setStatusMessage("0 punktów"):this.setStatusMessage("Błąd ładowania punktów")},a.prototype.getOperatorsToUpdate=function(){return this.filters?this.filters.getValues():f(this.options.operators,function(a){return a.operator})},a.prototype.getCodFilter=function(){return this.filters.getCod()},Object.defineProperty(a.prototype,"rootElement",{get:function(){return document.getElementById("SensbitFedexMapWidget")},enumerable:!0,configurable:!0}),a.prototype.display=function(){var a=n.rwdButtons(),b=n.footer();return'\n
\n
\n
\n
\n
\n
\n '+a+'\n
\n \n
\n "},a}();return new t}(),function(){!function(a,b){"object"==typeof exports?module.exports=b():a.ResizeSensor=b()}(this,function(){function a(a,b){var c=Object.prototype.toString.call(a),d="[object Array]"===c||"[object NodeList]"===c||"[object HTMLCollection]"===c||"[object Object]"===c||"undefined"!=typeof jQuery&&a instanceof jQuery||"undefined"!=typeof Elements&&a instanceof Elements,e=0,f=a.length;if(d)for(;e
',a.appendChild(a.resizeSensor),"static"==g(a,"position")&&(a.style.position="relative");var h,i,j,k,l=a.resizeSensor.childNodes[0],m=l.childNodes[0],n=a.resizeSensor.childNodes[1],o=a.offsetWidth,p=a.offsetHeight,q=function(){m.style.width="100000px",m.style.height="100000px",l.scrollLeft=1e5,l.scrollTop=1e5,n.scrollLeft=1e5,n.scrollTop=1e5};q();var r=function(){i=0,h&&(o=j,p=k,a.resizedAttached&&a.resizedAttached.call())},s=function(){j=a.offsetWidth,k=a.offsetHeight,h=j!=o||k!=p,h&&!i&&(i=b(r)),q()},t=function(a,b,c){a.attachEvent?a.attachEvent("on"+b,c):a.addEventListener(b,c)};t(l,"scroll",s),t(n,"scroll",s)}a(d,function(a){h(a,e)}),this.detach=function(a){c.detach(d,a)}};return c.detach=function(b,c){a(b,function(a){a.resizedAttached&&"function"==typeof c&&(a.resizedAttached.remove(c),a.resizedAttached.length())||a.resizeSensor&&(a.contains(a.resizeSensor)&&a.removeChild(a.resizeSensor),delete a.resizeSensor,delete a.resizedAttached)})},c}),function(){var a,b,c,d,e,f={}.hasOwnProperty,g=[].slice;this.OverlappingMarkerSpiderfier=function(){function a(a,d){var e,g,j;this.map=a,null==d&&(d={}),null==this.constructor.N&&(this.constructor.N=!0,c=google.maps,b=c.event,h=c.MapTypeId,i.keepSpiderfied=!1,i.ignoreMapClick=!1,i.markersWontHide=!1,i.markersWontMove=!1,i.basicFormatEvents=!1,i.nearbyDistance=20,i.circleSpiralSwitchover=9,i.circleFootSeparation=23,i.circleStartAngle=k/12,i.spiralFootSeparation=26,i.spiralLengthStart=11,i.spiralLengthFactor=4,i.spiderfiedZIndex=c.Marker.MAX_ZINDEX+2e4,i.highlightedLegZIndex=c.Marker.MAX_ZINDEX+1e4,i.usualLegZIndex=c.Marker.MAX_ZINDEX+1,i.legWeight=1.5,i.legColors={usual:{},highlighted:{}},j=i.legColors.usual,g=i.legColors.highlighted,j[h.HYBRID]=j[h.SATELLITE]="#fff",g[h.HYBRID]=g[h.SATELLITE]="#f00",j[h.TERRAIN]=j[h.ROADMAP]="#444",g[h.TERRAIN]=g[h.ROADMAP]="#f00",this.constructor.j=function(a){return this.setMap(a)},this.constructor.j.prototype=new c.OverlayView,this.constructor.j.prototype.draw=function(){});for(e in d)f.call(d,e)&&(g=d[e],this[e]=g);this.g=new this.constructor.j(this.map),this.C(),this.c={},this.B=this.l=null,this.addListener("click",function(a,c){return b.trigger(a,"spider_click",c)}),this.addListener("format",function(a,c){return b.trigger(a,"spider_format",c)}),this.ignoreMapClick||b.addListener(this.map,"click",function(a){return function(){return a.unspiderfy()}}(this)),b.addListener(this.map,"maptypeid_changed",function(a){return function(){return a.unspiderfy()}}(this)),b.addListener(this.map,"zoom_changed",function(a){return function(){if(a.unspiderfy(),!a.basicFormatEvents)return a.h()}}(this))}var b,c,d,e,h,i,j,k,l;for(i=a.prototype,j=[a,i],d=0,e=j.length;dc)return this;for(g=this.s.splice(c,1)[0],d=0,e=g.length;dc||this.c[a].splice(c,1),this},i.clearListeners=function(a){return this.c[a]=[],this},i.trigger=function(){var a,b,c,d,e,f;for(b=arguments[0],a=2<=arguments.length?g.call(arguments,1):[],b=null!=(c=this.c[b])?c:[],f=[],d=0,e=b.length;da;d=0<=a?++f:--f)d=this.circleStartAngle+d*e,h.push(new c.Point(b.x+g*Math.cos(d),b.y+g*Math.sin(d)));return h},i.M=function(a,b){var d,e,f,g,h;for(g=this.spiralLengthStart,d=0,h=[],e=f=0;0<=a?fa;e=0<=a?++f:--f)d+=this.spiralFootSeparation/g+5e-4*e,e=new c.Point(b.x+g*Math.cos(d),b.y+g*Math.sin(d)),g+=k*this.spiralLengthFactor/d,h.push(e);return h},i.V=function(a,b){var c,d,e,f,g,h,i,j,k;if((h=null!=a._omsData)&&this.keepSpiderfied||this.unspiderfy(),h||this.map.getStreetView().getVisible()||"GoogleEarthAPI"===this.map.getMapTypeId())return this.trigger("click",a,b);for(h=[],i=[],c=this.nearbyDistance,j=c*c,g=this.f(a.position),k=this.a,c=0,d=k.length;c=this.circleSpiralSwitchover?this.M(n,e).reverse():this.L(n,e),e=function(){var d,e,l;for(l=[],d=0,e=h.length;d=b.left?c=b.left-a.left:a.right<=b.right&&(c=b.left-(a.right-b.width)),a.top>=b.top?d=b.top-a.top:a.bottom<=b.bottom&&(d=b.top-(a.bottom-b.height)),0===c&&0===d||this.getMap().panBy(c,d)}}},{key:"resize",value:function(){if(this._html){var a=this.getMapInnerBounds(),b=a.width;void 0!==this._opts.maxWidth&&(b=Math.min(b,this._opts.maxWidth)),b-=this._html.wrapper.offsetWidth-this._html.content.offsetWidth,this._html.content.style.maxWidth=b+"px";var c=a.height;void 0!==this._opts.maxHeight&&(c=Math.min(c,this._opts.maxHeight)),c-=this._html.wrapper.offsetHeight-this._html.content.offsetHeight,this._html.content.style.maxHeight=c+"px"}}}]),b};b.default=u,a.exports=b.default}),!function(a,b,c,d){function e(a,b,c){return setTimeout(j(a,c),b)}function f(a,b,c){return!!Array.isArray(a)&&(g(a,c[b],c),!0)}function g(a,b,c){var e;if(a)if(a.forEach)a.forEach(b,c);else if(a.length!==d)for(e=0;e\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",f=a.console&&(a.console.warn||a.console.log);return f&&f.call(a.console,e,d),b.apply(this,arguments)}}function i(a,b,c){var d,e=b.prototype;d=a.prototype=Object.create(e),d.constructor=a,d._super=e,c&&la(d,c)}function j(a,b){return function(){return a.apply(b,arguments)}}function k(a,b){return typeof a==oa?a.apply(b?b[0]||d:d,b):a}function l(a,b){return a===d?b:a}function m(a,b,c){g(q(b),function(b){a.addEventListener(b,c,!1)})}function n(a,b,c){g(q(b),function(b){a.removeEventListener(b,c,!1)})}function o(a,b){for(;a;){if(a==b)return!0;a=a.parentNode}return!1}function p(a,b){return a.indexOf(b)>-1}function q(a){return a.trim().split(/\s+/g)}function r(a,b,c){if(a.indexOf&&!c)return a.indexOf(b);for(var d=0;dc[b]}):d.sort()),d}function u(a,b){for(var c,e,f=b[0].toUpperCase()+b.slice(1),g=0;g1&&!c.firstMultiple?c.firstMultiple=D(b):1===e&&(c.firstMultiple=!1);var f=c.firstInput,g=c.firstMultiple,h=g?g.center:f.center,i=b.center=E(d);b.timeStamp=ra(),b.deltaTime=b.timeStamp-f.timeStamp,b.angle=I(h,i),b.distance=H(h,i),B(c,b),b.offsetDirection=G(b.deltaX,b.deltaY);var j=F(b.deltaTime,b.deltaX,b.deltaY);b.overallVelocityX=j.x,b.overallVelocityY=j.y,b.overallVelocity=qa(j.x)>qa(j.y)?j.x:j.y,b.scale=g?K(g.pointers,d):1,b.rotation=g?J(g.pointers,d):0,b.maxPointers=c.prevInput?b.pointers.length>c.prevInput.maxPointers?b.pointers.length:c.prevInput.maxPointers:b.pointers.length,C(c,b);var k=a.element;o(b.srcEvent.target,k)&&(k=b.srcEvent.target),b.target=k}function B(a,b){var c=b.center,d=a.offsetDelta||{},e=a.prevDelta||{},f=a.prevInput||{};b.eventType!==Ea&&f.eventType!==Ga||(e=a.prevDelta={x:f.deltaX||0,y:f.deltaY||0},d=a.offsetDelta={x:c.x,y:c.y}),b.deltaX=e.x+(c.x-d.x),b.deltaY=e.y+(c.y-d.y)}function C(a,b){var c,e,f,g,h=a.lastInterval||b,i=b.timeStamp-h.timeStamp;if(b.eventType!=Ha&&(i>Da||h.velocity===d)){var j=b.deltaX-h.deltaX,k=b.deltaY-h.deltaY,l=F(i,j,k);e=l.x,f=l.y,c=qa(l.x)>qa(l.y)?l.x:l.y,g=G(j,k),a.lastInterval=b}else c=h.velocity,e=h.velocityX,f=h.velocityY,g=h.direction;b.velocity=c,b.velocityX=e,b.velocityY=f,b.direction=g}function D(a){for(var b=[],c=0;ce;)c+=a[e].clientX,d+=a[e].clientY,e++;return{x:pa(c/b),y:pa(d/b)}}function F(a,b,c){return{x:b/a||0,y:c/a||0}}function G(a,b){return a===b?Ia:qa(a)>=qa(b)?0>a?Ja:Ka:0>b?La:Ma}function H(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return Math.sqrt(d*d+e*e)}function I(a,b,c){c||(c=Qa);var d=b[c[0]]-a[c[0]],e=b[c[1]]-a[c[1]];return 180*Math.atan2(e,d)/Math.PI}function J(a,b){return I(b[1],b[0],Ra)+I(a[1],a[0],Ra)}function K(a,b){return H(b[0],b[1],Ra)/H(a[0],a[1],Ra)}function L(){this.evEl=Ta,this.evWin=Ua,this.pressed=!1,x.apply(this,arguments)}function M(){this.evEl=Xa,this.evWin=Ya,x.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}function N(){this.evTarget=$a,this.evWin=_a,this.started=!1,x.apply(this,arguments)}function O(a,b){var c=s(a.touches),d=s(a.changedTouches);return b&(Ga|Ha)&&(c=t(c.concat(d),"identifier",!0)),[c,d]}function P(){this.evTarget=bb,this.targetIds={},x.apply(this,arguments)}function Q(a,b){var c=s(a.touches),d=this.targetIds;if(b&(Ea|Fa)&&1===c.length)return d[c[0].identifier]=!0,[c,c];var e,f,g=s(a.changedTouches),h=[],i=this.target;if(f=c.filter(function(a){return o(a.target,i)}),b===Ea)for(e=0;e-1&&d.splice(a,1)};setTimeout(e,cb)}}function U(a){for(var b=a.srcEvent.clientX,c=a.srcEvent.clientY,d=0;d=f&&db>=g)return!0}return!1}function V(a,b){this.manager=a,this.set(b)}function W(a){if(p(a,jb))return jb;var b=p(a,kb),c=p(a,lb);return b&&c?jb:b||c?b?kb:lb:p(a,ib)?ib:hb}function X(){if(!fb)return!1;var b={},c=a.CSS&&a.CSS.supports;return["auto","manipulation","pan-y","pan-x","pan-x pan-y","none"].forEach(function(d){b[d]=!c||a.CSS.supports("touch-action",d)}),b}function Y(a){this.options=la({},this.defaults,a||{}),this.id=v(),this.manager=null,this.options.enable=l(this.options.enable,!0),this.state=nb,this.simultaneous={},this.requireFail=[]}function Z(a){return a&sb?"cancel":a&qb?"end":a&pb?"move":a&ob?"start":""}function $(a){return a==Ma?"down":a==La?"up":a==Ja?"left":a==Ka?"right":""}function _(a,b){var c=b.manager;return c?c.get(a):a}function aa(){Y.apply(this,arguments)}function ba(){aa.apply(this,arguments),this.pX=null,this.pY=null}function ca(){aa.apply(this,arguments)}function da(){Y.apply(this,arguments),this._timer=null,this._input=null}function ea(){aa.apply(this,arguments)}function fa(){aa.apply(this,arguments)}function ga(){Y.apply(this,arguments),this.pTime=!1,this.pCenter=!1,this._timer=null,this._input=null,this.count=0}function ha(a,b){return b=b||{},b.recognizers=l(b.recognizers,ha.defaults.preset),new ia(a,b)}function ia(a,b){this.options=la({},ha.defaults,b||{}),this.options.inputTarget=this.options.inputTarget||a,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=a,this.input=y(this),this.touchAction=new V(this,this.options.touchAction),ja(this,!0),g(this.options.recognizers,function(a){var b=this.add(new a[0](a[1]));a[2]&&b.recognizeWith(a[2]),a[3]&&b.requireFailure(a[3])},this)}function ja(a,b){var c=a.element;if(c.style){var d;g(a.options.cssProps,function(e,f){d=u(c.style,f),b?(a.oldCssProps[d]=c.style[d],c.style[d]=e):c.style[d]=a.oldCssProps[d]||""}),b||(a.oldCssProps={})}}function ka(a,c){var d=b.createEvent("Event");d.initEvent(a,!0,!0),d.gesture=c,c.target.dispatchEvent(d)}var la,ma=["","webkit","Moz","MS","ms","o"],na=b.createElement("div"),oa="function",pa=Math.round,qa=Math.abs,ra=Date.now;la="function"!=typeof Object.assign?function(a){if(a===d||null===a)throw new TypeError("Cannot convert undefined or null to object");for(var b=Object(a),c=1;ch&&(b.push(a),h=b.length-1):e&(Ga|Ha)&&(c=!0),0>h||(b[h]=a,this.callback(this.manager,e,{pointers:b,changedPointers:[a],pointerType:f,srcEvent:a}),c&&b.splice(h,1))}});var Za={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},$a="touchstart",_a="touchstart touchmove touchend touchcancel";i(N,x,{handler:function(a){var b=Za[a.type];if(b===Ea&&(this.started=!0),this.started){var c=O.call(this,a,b);b&(Ga|Ha)&&c[0].length-c[1].length===0&&(this.started=!1),this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}}});var ab={touchstart:Ea,touchmove:Fa,touchend:Ga,touchcancel:Ha},bb="touchstart touchmove touchend touchcancel";i(P,x,{handler:function(a){var b=ab[a.type],c=Q.call(this,a,b);c&&this.callback(this.manager,b,{pointers:c[0],changedPointers:c[1],pointerType:za,srcEvent:a})}});var cb=2500,db=25;i(R,x,{handler:function(a,b,c){var d=c.pointerType==za,e=c.pointerType==Ba;if(!(e&&c.sourceCapabilities&&c.sourceCapabilities.firesTouchEvents)){if(d)S.call(this,b,c);else if(e&&U.call(this,c))return;this.callback(a,b,c)}},destroy:function(){this.touch.destroy(),this.mouse.destroy()}});var eb=u(na.style,"touchAction"),fb=eb!==d,gb="compute",hb="auto",ib="manipulation",jb="none",kb="pan-x",lb="pan-y",mb=X();V.prototype={set:function(a){a==gb&&(a=this.compute()),fb&&this.manager.element.style&&mb[a]&&(this.manager.element.style[eb]=a),this.actions=a.toLowerCase().trim()},update:function(){this.set(this.manager.options.touchAction)},compute:function(){var a=[];return g(this.manager.recognizers,function(b){k(b.options.enable,[b])&&(a=a.concat(b.getTouchAction()))}),W(a.join(" "))},preventDefaults:function(a){var b=a.srcEvent,c=a.offsetDirection;if(this.manager.session.prevented)return void b.preventDefault();var d=this.actions,e=p(d,jb)&&!mb[jb],f=p(d,lb)&&!mb[lb],g=p(d,kb)&&!mb[kb];if(e){var h=1===a.pointers.length,i=a.distance<2,j=a.deltaTime<250;if(h&&i&&j)return}return g&&f?void 0:e||f&&c&Na||g&&c&Oa?this.preventSrc(b):void 0},preventSrc:function(a){this.manager.session.prevented=!0,a.preventDefault()}};var nb=1,ob=2,pb=4,qb=8,rb=qb,sb=16,tb=32;Y.prototype={defaults:{},set:function(a){return la(this.options,a),this.manager&&this.manager.touchAction.update(),this},recognizeWith:function(a){if(f(a,"recognizeWith",this))return this;var b=this.simultaneous;return a=_(a,this),b[a.id]||(b[a.id]=a,a.recognizeWith(this)),this},dropRecognizeWith:function(a){return f(a,"dropRecognizeWith",this)?this:(a=_(a,this),delete this.simultaneous[a.id],this)},requireFailure:function(a){if(f(a,"requireFailure",this))return this;var b=this.requireFail;return a=_(a,this),-1===r(b,a)&&(b.push(a),a.requireFailure(this)),this},dropRequireFailure:function(a){if(f(a,"dropRequireFailure",this))return this;a=_(a,this);var b=r(this.requireFail,a);return b>-1&&this.requireFail.splice(b,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(a){return!!this.simultaneous[a.id]},emit:function(a){function b(b){c.manager.emit(b,a)}var c=this,d=this.state;qb>d&&b(c.options.event+Z(d)),b(c.options.event),a.additionalEvent&&b(a.additionalEvent),d>=qb&&b(c.options.event+Z(d))},tryEmit:function(a){return this.canEmit()?this.emit(a):void(this.state=tb)},canEmit:function(){for(var a=0;af?Ja:Ka,c=f!=this.pX,d=Math.abs(a.deltaX)):(e=0===g?Ia:0>g?La:Ma,c=g!=this.pY,d=Math.abs(a.deltaY))),a.direction=e,c&&d>b.threshold&&e&b.direction},attrTest:function(a){return aa.prototype.attrTest.call(this,a)&&(this.state&ob||!(this.state&ob)&&this.directionTest(a))},emit:function(a){this.pX=a.deltaX,this.pY=a.deltaY;var b=$(a.direction);b&&(a.additionalEvent=this.options.event+b),this._super.emit.call(this,a)}}),i(ca,aa,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.scale-1)>this.options.threshold||this.state&ob)},emit:function(a){if(1!==a.scale){var b=a.scale<1?"in":"out";a.additionalEvent=this.options.event+b}this._super.emit.call(this,a)}}),i(da,Y,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return[hb]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distanceb.time;if(this._input=a,!d||!c||a.eventType&(Ga|Ha)&&!f)this.reset();else if(a.eventType&Ea)this.reset(),this._timer=e(function(){this.state=rb,this.tryEmit()},b.time,this);else if(a.eventType&Ga)return rb;return tb},reset:function(){clearTimeout(this._timer)},emit:function(a){this.state===rb&&(a&&a.eventType&Ga?this.manager.emit(this.options.event+"up",a):(this._input.timeStamp=ra(),this.manager.emit(this.options.event,this._input)))}}),i(ea,aa,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[jb]},attrTest:function(a){return this._super.attrTest.call(this,a)&&(Math.abs(a.rotation)>this.options.threshold||this.state&ob)}}),i(fa,aa,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:Na|Oa,pointers:1},getTouchAction:function(){return ba.prototype.getTouchAction.call(this)},attrTest:function(a){var b,c=this.options.direction;return c&(Na|Oa)?b=a.overallVelocity:c&Na?b=a.overallVelocityX:c&Oa&&(b=a.overallVelocityY),this._super.attrTest.call(this,a)&&c&a.offsetDirection&&a.distance>this.options.threshold&&a.maxPointers==this.options.pointers&&qa(b)>this.options.velocity&&a.eventType&Ga},emit:function(a){var b=$(a.offsetDirection);b&&this.manager.emit(this.options.event+b,a),this.manager.emit(this.options.event,a)}}),i(ga,Y,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[ib]},process:function(a){var b=this.options,c=a.pointers.length===b.pointers,d=a.distance