@visitscotland/component-library 5.12.4 → 5.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3916,9 +3916,9 @@
3916
3916
  "scripts/5da5edbd1dee89fbe799.js",
3917
3917
  "scripts/1262d9eb296be8be48b9.js",
3918
3918
  "scripts/6011db9e93655179bce2.js",
3919
- "scripts/090230dd49cc87e8d678.js",
3919
+ "scripts/d794ecf417a6a0caf595.js",
3920
3920
  "scripts/3bab08b47e7f5ecd123d.js",
3921
- "scripts/632d74efd45a76bd6867.js"
3921
+ "scripts/10a59cfadd197ee7121d.js"
3922
3922
  ],
3923
3923
  "styles": [
3924
3924
  "styles/b08f62c02ec3d19cd9b2.css",
@@ -3939,9 +3939,9 @@
3939
3939
  "styles/5da5edbd1dee89fbe799.css",
3940
3940
  "styles/1262d9eb296be8be48b9.css",
3941
3941
  "styles/6011db9e93655179bce2.css",
3942
- "styles/090230dd49cc87e8d678.css",
3942
+ "styles/d794ecf417a6a0caf595.css",
3943
3943
  "styles/3bab08b47e7f5ecd123d.css",
3944
- "styles/632d74efd45a76bd6867.css"
3944
+ "styles/10a59cfadd197ee7121d.css"
3945
3945
  ]
3946
3946
  },
3947
3947
  "VsMapMarker": {
@@ -4025,7 +4025,7 @@
4025
4025
  "scripts/8abb35c450930c27b128.js",
4026
4026
  "scripts/e94da6d3801ebb02d8ce.js",
4027
4027
  "scripts/1d4bce736f6780bdfd08.js",
4028
- "scripts/090230dd49cc87e8d678.js",
4028
+ "scripts/d794ecf417a6a0caf595.js",
4029
4029
  "scripts/1ebff55e007c5c454b07.js"
4030
4030
  ],
4031
4031
  "styles": [
@@ -4037,7 +4037,7 @@
4037
4037
  "styles/e342d9e806627f8c5899.css",
4038
4038
  "styles/8abb35c450930c27b128.css",
4039
4039
  "styles/1d4bce736f6780bdfd08.css",
4040
- "styles/090230dd49cc87e8d678.css"
4040
+ "styles/d794ecf417a6a0caf595.css"
4041
4041
  ]
4042
4042
  },
4043
4043
  "VsMegaNavAccordionItem": {
@@ -7772,7 +7772,7 @@
7772
7772
  "scripts/7cae16274579ecf36069.js",
7773
7773
  "scripts/828b362c38b3886bbe00.js",
7774
7774
  "scripts/588b32ff5515fdd5707e.js",
7775
- "scripts/e8415b4fb267f7b45238.js"
7775
+ "scripts/363ebd14fe2bb640d687.js"
7776
7776
  ],
7777
7777
  "styles": [
7778
7778
  "styles/5ef9a0f18541fee55f4c.css",
@@ -7926,7 +7926,7 @@
7926
7926
  "styles/7cae16274579ecf36069.css",
7927
7927
  "styles/828b362c38b3886bbe00.css",
7928
7928
  "styles/588b32ff5515fdd5707e.css",
7929
- "styles/e8415b4fb267f7b45238.css"
7929
+ "styles/363ebd14fe2bb640d687.css"
7930
7930
  ]
7931
7931
  }
7932
7932
  }
@@ -0,0 +1 @@
1
+ !function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VsMapWithSidebar=e():t.VsMapWithSidebar=e()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[316],{8258:function(t,e,s){"use strict";s.r(e);var a=s(73884),n=s(84542);s(71622);const i=(0,s(66262).A)(n.A,[["render",a.X]]);e.default=i},22544:function(){},50106:function(t,e,s){"use strict";var a=s(89394),n=s(64467),i=s(11438),o=s(48836),r=s(79122),l=s(90080),c=s(57536),u=s(10810),d=s(79920),g=s(81610),p=s(4249);function h(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,a)}return s}function f(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?h(Object(s),!0).forEach((function(e){(0,n.A)(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):h(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var m=null;e.A={name:"VsMapWithSidebar",status:"prototype",release:"0.0.1",components:{VsContainer:i.T$,VsRow:i.AQ,VsCol:i.Il,VsMap:g.default,VsButton:o.default,VsMapWithSidebarPanel:p.default,VsButtonToggleGroup:l.default,VsWarning:r.default},provide:function(){return{filters:this.filters,filtersWithLocations:this.filtersWithLocations,placesData:this.placesData,mapId:this.mapId,regions:this.regionsData,clearSelectionText:this.clearSelectionText,applyFiltersText:this.applyFiltersText,subCatList:this.subCatList,filtersAppliedText:this.filtersAppliedText,clearFiltersText:this.clearFiltersText,focussedListItem:this.focussedListItem}},props:{categoryHeading:{type:String,default:""},filters:{type:Array,required:!0},placesData:{type:Array,required:!0},mapId:{type:String,required:!0},mainHeadingExists:{type:Boolean,default:!1},initialSelected:{type:String,default:""},toggleData:{type:Array,default:function(){return[]}},buttonsLabel:{type:String,default:""},clearSelectionText:{type:String,required:!0},applyFiltersText:{type:String,required:!0},detailsEndpoint:{type:String,default:""},regionBounds:{type:Object,default:function(){}},clearFiltersText:{type:String,required:!0},filtersAppliedText:{type:String,required:!0},placeId:{type:String,default:null},mapFilterMessage:{type:String,required:!0},mapNoResultsMessage:{type:String,required:!0},panelMessage:{type:String,default:null},loadBrandingImmediately:{type:Boolean,default:!1}},data:function(){return{panelVisible:!1,selectedCategory:"",filterCategories:this.filters,selectedItem:null,activePins:this.placesData,currentlyHovered:"",showRegions:!1,regions:[],subCatList:null,selectedToggle:"",currentEndpointData:[],mapStatus:"",panelStatus:"map-loading",mapReady:!1,showPanelMessage:null,currentPanelEndpointFilters:"",totalEndpointPins:0,focussedListItem:0,resetZoom:!1,currentStage:0,selectedSubCategory:null}},computed:f(f({mapDisplayClass:function(){return this.panelVisible?"d-none d-lg-block":""},panelDisplayClass:function(){return this.panelVisible?"":"d-none d-lg-block"},regionsData:function(){return this.placesData.filter((function(t){return"Polygon"===t.geometry.type||"MultiPolygon"===t.geometry.type}))}},(0,u.aH)(d.A,{subCatActiveFilters:function(t){return t.activeSubcatFilters}})),{},{infoMessage:function(){var t="";switch(this.mapStatus){case"no-results":t=this.mapNoResultsMessage;break;case"filter-results":t=this.mapFilterMessage}return t},existingCategories:function(){return this.placesData?(0,a.A)(new Set(this.placesData.map((function(t){return t.properties.category.id})))):[]},filtersWithLocations:function(){var t=this;return this.filters.filter((function(e){return!!t.existingCategories.includes(e.id)||!(!e.subCategory||!e.subCategory.length)}))},togglesWithLocations:function(){return-1===this.existingCategories.indexOf("vics")?this.toggleData.filter((function(t){return"icentres"!==t.value})):this.toggleData}}),watch:{selectedSubCategory:function(t){null===t&&(this.mapStatus="",this.resetZoom=!0)}},mounted:function(){var t=this;m=(0,d.A)(),this.selectedToggle=this.initialSelected,this.emitter&&this.emitter.on("clearSelectedSubcats",(function(){t.resetZoom=!0}))},methods:{openMenu:function(){this.setStage(0),this.openPanel()},closePanel:function(){this.panelVisible=!1},openPanel:function(){this.panelVisible=!0},showDetail:function(t){document.fullscreenElement&&document.exitFullscreen(),this.selectedItem=t,this.setStage(2),this.openPanel(),null===this.selectedSubCategory&&this.filterPlaces(this.selectedCategory)},setCategory:function(t){this.selectedCategory=t,null===this.selectedSubCategory&&this.filterPlaces(t)},setSubCategory:function(t){m.setSelectedSubcat(t),this.selectedSubCategory=t,null!==t?(this.getSubcatMarkerData(),this.selectedCategory=t):(m.setActiveSubcatFilters([]),this.showAllPlaces())},filterSubCategories:function(t){var e="";t.forEach((function(t){var s="&cat=".concat(t);e+=s})),this.currentPanelEndpointFilters=e,this.getSubcatMarkerData(e),this.getSubcatPanelData(e,0)},getSubcatMarkerData:function(t){var e=this,s=this.filters.filter((function(t){return t.id===e.selectedSubCategory}));if(s.length>0){var a=s[0].pinsEndpoint;void 0!==t&&(a+=t),this.activePins=[],void 0===t?(this.activePins=[],this.mapStatus="filter-results"):c.A.get(a).then((function(t){e.totalEndpointPins=t.data.features.length,0===e.totalEndpointPins?e.mapStatus="no-results":(t.data.features.forEach((function(t){var s=t;s.properties.apiData=!0,e.activePins.push(s)})),e.mapStatus="")}))}},getSubcatPanelData:function(t,e){var s=this,a=this.filters.filter((function(t){return t.id===s.selectedSubCategory}))[0].listProductsEndPoint;void 0!==t&&(a+=t),0!==e&&(a+="".concat(t,"&page=").concat(e)),this.panelStatus="loading-data",c.A.get(a).then((function(t){void 0!==t.data.data.products?(s.setStage(1),0===e?(s.subCatList=t.data.data.products,s.focussedListItem=0):(s.focussedListItem=24*e,s.subCatList=s.subCatList.concat(t.data.data.products))):s.mapStatus="no-results",s.panelStatus=null}))},setStage:function(t){var e=this;if(2===t&&""!==this.detailsEndpoint&&null!==this.selectedSubCategory){var s="".concat(this.detailsEndpoint).concat(this.selectedItem.properties.id);c.A.get(s).then((function(s){var a=[];a.push(s.data.data),e.currentEndpointData=a,e.currentStage=t}))}else this.currentStage=t,0===this.currentStage?(this.currentEndpointData=[],null===this.selectedSubCategory?(this.resetZoom=!0,this.showAllPlaces(),this.mapStatus=""):this.getSubcatMarkerData(),this.selectedToggle="places"):1===this.currentStage&&null===this.selectedSubCategory&&this.filterPlaces(this.selectedCategory);2!==t&&(m.setActivePlace({mapId:this.mapId,activeFeature:""}),this.selectedItem=null)},filterPlaces:function(t){if("regions"===t)this.showRegions=!0,this.activePins=[],this.selectedToggle="regions";else{this.showRegions=!1,this.selectedToggle="places";var e=this.placesData.filter((function(e){return void 0!==e.properties&&e.properties.category.id===t}));this.activePins=e}},loadMorePlaces:function(t){this.getSubcatPanelData(this.currentPanelEndpointFilters,t)},showAllPlaces:function(){this.activePins=this.placesData,this.showRegions=!1},onToggleChanged:function(t){"regions"===t?(this.setCategory("regions"),this.setStage(1)):"icentres"===t?(this.setCategory("vics"),this.setStage(1)):"places-regional"===t?(this.setCategory("twnv"),this.setStage(1)):(this.showAllPlaces(),this.setStage(0))},setMapReady:function(t){this.mapReady=t,this.panelStatus=t?null:"loading"},categoryHasData:function(t){return-1!==this.existingCategories.indexOf(t)}}}},71622:function(t,e,s){"use strict";s(77066)},73884:function(t,e,s){"use strict";s.d(e,{X:function(){return i}});var a=s(20641),n=s(90033);function i(t,e,s,i,o,r){var l=(0,a.g2)("VsMapWithSidebarPanel"),c=(0,a.g2)("VsButton"),u=(0,a.g2)("VsMap"),d=(0,a.g2)("VsButtonToggleGroup"),g=(0,a.g2)("VsWarning"),p=(0,a.g2)("VsCol"),h=(0,a.g2)("VsRow"),f=(0,a.g2)("VsContainer");return(0,a.uX)(),(0,a.Wv)(f,{"data-test":"vs-map-with-sidebar"},{default:(0,a.k6)((function(){return[(0,a.bF)(h,null,{default:(0,a.k6)((function(){return[(0,a.bF)(p,null,{default:(0,a.k6)((function(){return[(0,a.Lk)("div",{class:"vs-map-with-sidebar",ref:s.mapId},[(0,a.Lk)("div",{class:(0,n.normalizeClass)(["vs-map-with-sidebar__side-panel",r.panelDisplayClass]),"data-test":"vs-map-with-sidebar__side-panel"},[(0,a.bF)(l,{"category-heading":s.categoryHeading,"selected-category":o.selectedCategory,"selected-subcategory":o.selectedSubCategory,"current-stage":o.currentStage,"selected-item":o.selectedItem,"heading-level":s.mainHeadingExists?"3":"2","subcategory-locations":o.subCatList,"current-endpoint-data":o.currentEndpointData,"panel-status":o.panelStatus,"panel-message":0===o.currentStage?s.panelMessage:null,"total-pins":o.totalEndpointPins,"current-list-item-focus":o.focussedListItem,onSetCategory:r.setCategory,onSetSubcategory:r.setSubCategory,onSubcategoriesFiltered:r.filterSubCategories,onSetStage:r.setStage,onClosePanel:r.closePanel,onShowItemDetail:r.showDetail,onFilterPlaces:r.filterPlaces,onLoadMorePlaces:r.loadMorePlaces},{closePanelText:(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"close-side-panel-text")]})),"reset-side-panel-text":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"reset-side-panel-text")]})),"menu-btn-text":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"menu-btn-text")]})),"panel-loading-message":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"panel-loading-message")]})),"load-more-text":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"load-more-text")]})),_:3},8,["category-heading","selected-category","selected-subcategory","current-stage","selected-item","heading-level","subcategory-locations","current-endpoint-data","panel-status","panel-message","total-pins","current-list-item-focus","onSetCategory","onSetSubcategory","onSubcategoriesFiltered","onSetStage","onClosePanel","onShowItemDetail","onFilterPlaces","onLoadMorePlaces"])],2),(0,a.Lk)("div",{class:(0,n.normalizeClass)(["vs-map-with-sidebar__map",r.mapDisplayClass])},[(0,a.bF)(c,{class:"vs-map-with-sidebar__map-toggle",icon:"vs-icon-control-menu",size:"sm",onClick:r.openMenu,"data-test":"vs-map-with-sidebar__map-toggle",variant:"secondary"},{default:(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"open-side-panel-text")]})),_:3},8,["onClick"]),(0,a.bF)(u,{"is-visible":!o.panelVisible,labels:{},filters:r.filtersWithLocations,places:o.activePins,"selected-item":o.selectedItem,"map-id":s.mapId,"show-polygons":o.showRegions,"show-info-message":""!==o.mapStatus,onShowDetail:r.showDetail,onSetCategory:r.setCategory,onMapReady:r.setMapReady,onZoomReset:e[0]||(e[0]=function(t){return o.resetZoom=!1}),"bounds-data":s.regionBounds,"reset-zoom":o.resetZoom,"show-marker-popups":!1,"load-branding-immediately":s.loadBrandingImmediately},{"map-loading-text":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"map-loading-text")]})),"info-message":(0,a.k6)((function(){return[(0,a.eW)((0,n.toDisplayString)(r.infoMessage),1)]})),"zoom-too-close":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"zoom-too-close")]})),"zoom-too-far":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"zoom-too-far")]})),"no-js":(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"no-js")]})),_:3},8,["is-visible","filters","places","selected-item","map-id","show-polygons","show-info-message","onShowDetail","onSetCategory","onMapReady","bounds-data","reset-zoom","load-branding-immediately"]),r.togglesWithLocations.length>1?((0,a.uX)(),(0,a.Wv)(d,{key:0,"data-test":"vs-map-with-sidebar__map-toggle-group","initial-selected":o.selectedToggle,options:r.togglesWithLocations,"buttons-label":s.buttonsLabel,onToggleChanged:r.onToggleChanged},null,8,["initial-selected","options","buttons-label","onToggleChanged"])):(0,a.Q3)("",!0)],2)],512),(0,a.bF)(g,{class:"vs-map-with-sidebar__no-js"},{default:(0,a.k6)((function(){return[(0,a.RG)(t.$slots,"no-js")]})),_:3})]})),_:3})]})),_:3})]})),_:3})}},77066:function(t,e,s){"use strict";var a=s(85072),n=s.n(a),i=s(97825),o=s.n(i),r=s(77659),l=s.n(r),c=s(55056),u=s.n(c),d=s(10540),g=s.n(d),p=s(41113),h=s.n(p),f=s(22544),m=s.n(f),y={};y.styleTagTransform=h(),y.setAttributes=u(),y.insert=l().bind(null,"head"),y.domAPI=o(),y.insertStyleElement=g(),n()(m(),y),m()&&m().locals&&m().locals},84542:function(t,e,s){"use strict";s.d(e,{A:function(){return a.A}});var a=s(50106)}},function(t){return t.O(0,[641,6262,7510,3751,4352,4467,7527,8086,810,7800,9394,2543,7536,3777,4982,6422,8745,8836,8638,2368,3838,7521,1438,4580,1574,9122,5025,2536,7539,80,1101,2552,681,1213,3055,3198,3844,4079,4249],(function(){return t(t.s=8258)})),t.O()}])}));
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.VsFederatedSearch=t():e.VsFederatedSearch=t()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1746],{39535:function(e,t,a){"use strict";a.d(t,{A:function(){return r.A}});var r=a(77891)},39957:function(){},49439:function(e,t,a){"use strict";a.r(t);var r=a(39535);a(93691);const n=r.A;t.default=n},60223:function(e,t,a){"use strict";var r=a(85072),n=a.n(r),s=a(97825),o=a.n(s),l=a(77659),i=a.n(l),u=a(55056),c=a.n(u),d=a(10540),f=a.n(d),g=a(41113),p=a.n(g),v=a(39957),b=a.n(v),m={};m.styleTagTransform=p(),m.setAttributes=c(),m.insert=i().bind(null,"head"),m.domAPI=o(),m.insertStyleElement=f(),n()(b(),m),b()&&b().locals&&b().locals},77891:function(e,t,a){"use strict";var r=a(20641),n=a(50953),s=a(53751),o=a(90033),l=a(12903),i=a(45922),u=a.n(i),c=a(88620),d=a(1780),f=a(58995),g=a(35965),p={class:"vs-federated-search","data-test":"vs-federated-search"},v={class:"vs-federated-search__container"},b={key:0,class:"d-flex justify-content-between mb-200"},m={key:2},y={class:"position-relative"},h={class:"position-absolute bottom-0 start-0 d-flex gap-2"},R={class:"truncate-3-lines"},k={class:"d-flex justify-content-end align-items-end mt-050"},L={key:0,class:"d-flex align-items-start flex-grow-1"},_={key:3,class:"vs-federated-search--warning"};t.A={__name:"FederatedSearch",props:{cludoApiKey:{type:String,default:(0,c.A)("CLUDO_API_KEY")},cludoCustomerId:{type:Number,default:Number((0,c.A)("CLUDO_CUSTOMER_ID"))},cludoEngineId:{type:Number,default:Number((0,c.A)("CLUDO_ENGINE_ID"))},eventsApi:{type:String,default:(0,c.A)("EVENTS_API_URL")},subFilters:{type:Array,default:void 0},errorMessages:{type:Object,required:!0},fromText:{type:String,default:""},paginationLabels:{type:Object,required:!0},searchLabels:{type:Object,required:!0},sortLabels:{type:Object,required:!0}},setup:function(e){var t=u()(),a=(0,n.KR)({message:"",error:!1}),i=e,c=(0,r.EW)((function(){return Math.ceil(t.totalResults/12)}));function D(){t.endDate&&t.startDate>t.endDate?(a.value.error=!0,a.value.message=i.errorMessages.incorrectDateOrder):"Events & Festivals"===t.selectedCategory&&t.eventsApiError&&!t.isLoading?(a.value.error=!0,a.value.message=i.errorMessages.eventError):(t.searchTerm||t.selectedCategory)&&"Events & Festivals"!==t.selectedCategory&&t.cludoError&&!t.isLoading?(a.value.error=!0,a.value.message=i.errorMessages.cludoError):0!==t.totalResults||t.isLoading?(a.value.error=!1,a.value.message=""):(a.value.error=!0,a.value.message=i.errorMessages.noResults)}function C(e){t.startDate=e,t.navigateToResultsPage(!0)}function S(e){t.endDate=e,t.navigateToResultsPage(!0)}function E(e){t.sortBy=e,t.navigateToResultsPage(!0)}function F(e){t.currentPage=e,"undefined"!=typeof window&&window.scrollTo({top:0,left:0,behavior:"smooth"}),t.navigateToResultsPage()}function V(e){if(e.url)return e.url;if(e.placeUrl)return e.placeUrl;var t=encodeURIComponent(e.title.replaceAll(" ","-").toLowerCase());return"".concat("https://www.datathistle.com/event/").concat(e.parentId,"-").concat(t)}return(0,r.sV)((function(){if(t.cludoCredentials={apiKey:i.cludoApiKey,customerId:i.cludoCustomerId,engineId:i.cludoEngineId},t.eventsApi=i.eventsApi,D(),"undefined"!=typeof window&&"undefined"!=typeof document){var e=new URLSearchParams(document.location.search),a=e.get("search-term"),r=parseInt(e.get("page"),10);r&&(t.currentPage=r),a&&(t.searchTerm=a,t.getSearchResults())}})),(0,r.$u)((function(){D()})),function(e,u){return(0,r.uX)(),(0,r.CE)("div",p,[(0,r.Lk)("div",v,[(0,r.bF)(f.default,{"cludo-api-key":i.cludoApiKey,"cludo-customer-id":i.cludoCustomerId,"cludo-engine-id":i.cludoEngineId,"sub-filters":i.subFilters,labels:i.searchLabels},null,8,["cludo-api-key","cludo-customer-id","cludo-engine-id","sub-filters","labels"]),(0,r.bF)(d.default,{class:"my-200"}),((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)((0,n.R1)(t).cludoCategories,(function(a,o){return(0,r.bo)(((0,r.uX)(),(0,r.CE)("div",{key:o,class:"mb-200"},[(0,r.RG)(e.$slots,"federated-search__spotlight-".concat(a.Key))],512)),[[s.vShow,(0,n.R1)(t).selectedCategory===a.Key]])})),128)),(0,n.R1)(t).results?((0,r.uX)(),(0,r.CE)("div",b,[(0,r.Lk)("div",null,[(0,r.bF)((0,n.R1)(l.VsHeading),{"heading-style":"heading-m",level:2,class:"my-0"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(i.searchLabels.searchResults),1)]})),_:1}),0!==(0,n.R1)(t).totalResults?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsDetail),{key:0},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(i.searchLabels.resultsFirst)+" "+(0,o.toDisplayString)((0,n.R1)(t).totalResults)+" "+(0,o.toDisplayString)(i.searchLabels.resultsSecond),1)]})),_:1})):(0,r.Q3)("",!0)]),"Events & Festivals"===(0,n.R1)(t).selectedCategory?((0,r.uX)(),(0,r.Wv)(g.default,{key:0,"date-filter-visible":!0,"sort-options":i.sortLabels.sortOptions,"from-date-label":i.sortLabels.dateFrom,"to-date-label":i.sortLabels.dateTo,"sort-label":i.sortLabels.sort,onFromDateUpdated:C,onEndDateUpdated:S,onSortOrderUpdated:E},null,8,["sort-options","from-date-label","to-date-label","sort-label"])):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0),(0,n.R1)(t).isLoading?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsLoadingSpinner),{key:1})):(0,r.Q3)("",!0),(0,n.R1)(t).isLoading||!(0,n.R1)(t).results||(0,n.R1)(t).eventsApiError?(0,r.Q3)("",!0):((0,r.uX)(),(0,r.CE)("div",m,[(0,r.bF)((0,n.R1)(l.VsCardGroup),{"cards-per-row":3,"scroll-snap":!0},{default:(0,r.k6)((function(){return[((0,r.uX)(!0),(0,r.CE)(r.FK,null,(0,r.pI)((0,n.R1)(t).results,(function(e){return(0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsCard),{key:e.id},{"vs-card-header":(0,r.k6)((function(){return[(0,r.Lk)("div",y,[(0,r.bF)((0,n.R1)(l.VsImg),{src:e.imgSrc||"https://static.visitscotland.com/img/fallback-img.png",class:"w-100 aspect-ratio-3-2 rounded-1 object-fit-cover img-zoom-on-hover"},null,8,["src"]),(0,r.Lk)("div",h,[e.minPrice?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsBadge),{key:0,variant:"information",class:"rounded-top-end rounded-bottom-start"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(i.fromText)+" "+(0,o.toDisplayString)((t=e.minPrice,null===t?"":t.match(/\b\d+\.\d\b/)?"£".concat(t,"0"):"£".concat(t))),1)];var t})),_:2},1024)):(0,r.Q3)("",!0),e.startDate?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsBadge),{key:1,variant:"information",class:"rounded-top"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)((t=e.startDate,a=e.endDate,t===a?t:"".concat(t," - ").concat(a))),1)];var t,a})),_:2},1024)):(0,r.Q3)("",!0)])])]})),"vs-card-body":(0,r.k6)((function(){return[(0,r.bF)((0,n.R1)(l.VsHeading),{level:"3","heading-style":"heading-xs"},{default:(0,r.k6)((function(){return[(0,r.bF)((0,n.R1)(l.VsLink),{href:V(e),class:"stretched-link",variant:"secondary"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(e.title),1)]})),_:2},1032,["href"])]})),_:2},1024),(0,r.bF)((0,n.R1)(l.VsBody),null,{default:(0,r.k6)((function(){return[(0,r.Lk)("p",R,(0,o.toDisplayString)(e.description),1)]})),_:2},1024)]})),"vs-card-footer":(0,r.k6)((function(){return[(0,r.Lk)("div",k,[e.location?((0,r.uX)(),(0,r.CE)("div",L,[(0,r.bF)((0,n.R1)(l.VsIcon),{icon:"fa-solid fa-location-dot",variant:"highlight",class:"me-050",size:"sm"}),(0,r.bF)((0,n.R1)(l.VsDetail),{"no-margins":"",color:"tertiary"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(e.location),1)]})),_:2},1024)])):(0,r.Q3)("",!0),(0,r.Lk)("div",null,[(0,r.bF)((0,n.R1)(l.VsIcon),{class:"flex-grow-1 align-items-end me-050",icon:"cludo"===e.dataSrc?"fa-regular fa-arrow-right":"vs-icon-control-external-link",variant:"highlight",size:"sm"},null,8,["icon"])])])]})),_:2},1024)})),128))]})),_:1}),(0,n.R1)(t).results&&c.value>1?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsPagination),{key:0,class:"vs-federated-search--pagination","number-of-pages":c.value,"next-button-label":i.paginationLabels.nextButtonLabel,"previous-button-label":i.paginationLabels.previousButtonLabel,"page-label":i.paginationLabels.pageLabel,"of-label":i.paginationLabels.ofLabel,modelValue:(0,n.R1)(t).currentPage,"onUpdate:modelValue":u[0]||(u[0]=function(e){return(0,n.R1)(t).currentPage=e}),onPageClick:F},null,8,["number-of-pages","next-button-label","previous-button-label","page-label","of-label","modelValue"])):(0,r.Q3)("",!0)])),a.value.error?((0,r.uX)(),(0,r.CE)("div",_,[a.value.error?((0,r.uX)(),(0,r.Wv)((0,n.R1)(l.VsWarning),{key:0},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(a.value.message),1)]})),_:1})):(0,r.Q3)("",!0)])):(0,r.Q3)("",!0)]),(0,r.bF)((0,n.R1)(l.VsWarning),{"data-test":"vs-federated-search__error--no-js",class:"vs-federated-search__error--no-js"},{default:(0,r.k6)((function(){return[(0,r.eW)((0,o.toDisplayString)(i.searchLabels.noJs),1)]})),_:1})])}}}},93691:function(e,t,a){"use strict";a(60223)}},function(e){return e.O(0,[641,6262,7510,3751,4352,4467,7527,8086,810,7800,9394,2543,3453,281,7536,7511,9033,8795,6425,7171,3498,8449,4982,6422,8745,8836,8638,2368,3838,7521,1438,4580,5676,1574,9122,4282,1459,5921,2142,5025,7957,9116,7275,4448,9810,8896,3486,378,6494,1244,1688,6216,1454,2491,4900,4360,6305,9856,8861,630,4179,7933,2710,3706,3614,3484,1371,9054,7553,6086,3130,5945,8167,4921,1288,3990,3293,680,4828,459,2329,4409,6358,1696,80,2152,4145,922,4433,2822,8258,1086,1154,8533,4681,71,7033,7894,6665,6618,1389,1161,9621,4029,3350,9146,6838,4879,4953,1718,1120,47,9464,9177,9839,625,6004,5513,7097,7311,8399,5465,6641,9633,5809,3337,2810,7086,3603,8978,3033,555,6649,5807,4712,5048,2761,8693,5782,8407,4562,7906,1841,6175,3642,7692,8462,7231,7195,8573,1106,1379,4999,4232,6431,3609,2759,7848,6241,8817,8570,815,4061,9323,9923,3731,2837,3914,5577,3650,2612,6283,9783,7969,9280,4036,8332,2437,6123,7570,4670,9423,9886,1474,1901,8969,5106,3734,627,538,1493,4297,4856,7006,6689,8995,5965,1780],(function(){return e(e.s=49439)})),e.O()}])}));
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4079],{3878:function(t,e,o){"use strict";o.d(e,{A:function(){return i.A}});var i=o(70146)},21489:function(t,e,o){"use strict";var i=o(85072),a=o.n(i),s=o(97825),n=o.n(s),r=o(77659),p=o.n(r),u=o(55056),l=o.n(u),d=o(10540),c=o.n(d),m=o(41113),h=o.n(m),g=o(24027),f=o.n(g),y={};y.styleTagTransform=h(),y.setAttributes=l(),y.insert=p().bind(null,"head"),y.domAPI=n(),y.insertStyleElement=c(),a()(f(),y),f()&&f().locals&&f().locals},24027:function(){},25159:function(t,e,o){"use strict";o.d(e,{X:function(){return l}});var i=o(20641),a=o(90033),s={class:"vs-map","data-test":"vs-map"},n={class:"vs-map__message-box"},r={class:"vs-map__message-text"},p={ref:"mapboxOuter",class:"vs-map__map-outer"},u=["id"];function l(t,e,o,l,d,c){var m=(0,i.g2)("VsLoading"),h=(0,i.g2)("VsWarning");return(0,i.uX)(),(0,i.CE)("div",s,[d.showMapMessage?((0,i.uX)(),(0,i.CE)("div",{key:0,class:(0,a.normalizeClass)(["vs-map__message",d.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[(0,i.Lk)("div",n,[d.isLoading?((0,i.uX)(),(0,i.Wv)(m,{key:0,class:"vs-map__loading"})):(0,i.Q3)("",!0),(0,i.Lk)("p",r,[d.isLoading?(0,i.RG)(t.$slots,"map-loading-text",{key:0}):o.showInfoMessage?(0,i.RG)(t.$slots,"info-message",{key:1}):"too-close"===d.showZoomMessage?(0,i.RG)(t.$slots,"zoom-too-close",{key:2}):"too-far"===d.showZoomMessage?(0,i.RG)(t.$slots,"zoom-too-far",{key:3}):(0,i.Q3)("",!0)])])],2)):(0,i.Q3)("",!0),(0,i.Lk)("div",p,[(0,i.Lk)("div",{id:o.mapId,class:"vs-map__map",ref:"mapbox"},null,8,u)],512),(0,i.bF)(h,{class:"vs-map__no-js"},{default:(0,i.k6)((function(){return[(0,i.RG)(t.$slots,"no-js")]})),_:3})])}},42634:function(){},42904:function(t,e){"use strict";var o=null;"undefined"!=typeof window&&(o=document.currentScript);var i={options:{div:"map",logo:"os-logo-maps",statement:"Contains OS data &copy; Crown copyright and database rights YYYY",prefix:"",suffix:""},init:function(t){if("undefined"!=typeof window){o&&(this.options.div=o.getAttribute("data-div")||this.options.div,this.options.logo=o.getAttribute("data-logo")||this.options.logo,this.options.statement=o.getAttribute("data-statement")||this.options.statement,this.options.prefix=o.getAttribute("data-prefix")||this.options.prefix,this.options.suffix=o.getAttribute("data-suffix")||this.options.suffix),t=void 0!==t?t:{},Object.assign(this.options,t);var e=document.getElementById(this.options.div),i="os-api-branding logo";"os-logo-maps-white"===this.options.logo&&(i="os-api-branding logo white");var a=this.options.statement;a=a.replace("YYYY",(new Date).getFullYear()),""!==this.options.prefix&&(a="".concat(this.options.prefix,"<span>|</span>").concat(a)),""!==this.options.suffix&&(a="".concat(a,"<span>|</span>").concat(this.options.suffix)),document.querySelectorAll("#".concat(this.options.div," .os-api-branding")).forEach((function(t){return t.remove()}));var s=document.createElement("div");s.className=i,e.appendChild(s);var n=document.createElement("div");n.className="os-api-branding copyright",n.innerHTML=a,e.appendChild(n)}}};e.A=i},70146:function(t,e,o){"use strict";var i=o(64467),a=o(79122),s=o(35025),n=o(42904),r=o(20641),p=o(53751),u=o(10810),l=o(79920),d=o(60842),c=o.n(d),m=o(25879),h=o.n(m),g=o(30681);function f(t,e){var o=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),o.push.apply(o,i)}return o}var y=null;e.A={name:"VsMap",status:"prototype",release:"0.0.1",components:{VsWarning:a.default,VsLoading:s.default},props:{overviewMapLatitude:{type:String,default:"57.81"},overviewMapLongitude:{type:String,default:"-5.51748"},overviewMapZoom:{type:String,default:"5"},mapId:{type:String,required:!0},isVisible:{type:Boolean,required:!0},places:{type:Array,required:!0},filters:{type:Array,default:function(){return[]}},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:Object,default:null},boundsData:{type:Object,default:function(){}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1},showMarkerPopups:{type:Boolean,default:!0},loadBrandingImmediately:{type:Boolean,default:!1}},emits:["map-ready","setCategory","showDetail","zoom-reset"],setup:function(){y=(0,l.A)()},data:function(){return{isDesktop:!1,geojsonData:{type:"FeatureCollection",features:[]},polygons:{type:"FeatureCollection",features:[]},multiPolygons:[],mapbox:{map:null,bounds:null,rotation:0,config:{container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",pitchWithRotate:!1,dragRotate:!1}},markers:[],popup:null,hoveredStateId:null,activeStateId:null,showMapMessage:!0,isLoading:!0,showZoomMessage:null}},computed:function(t){for(var e=1;e<arguments.length;e++){var o=null!=arguments[e]?arguments[e]:{};e%2?f(Object(o),!0).forEach((function(e){(0,i.A)(t,e,o[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(o)):f(Object(o)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(o,e))}))}return t}({getZoom:function(){return this.mapbox.map?this.mapbox.map.getZoom():null}},(0,u.aH)(l.A,{activeMarkerPostion:function(t){return this.mapbox.map?t.activeMarkerPos:null},highlightedPlace:function(t){return this.mapbox.map?t.getHoveredStop(this.mapId):null},activePlace:function(t){return this.mapbox.map?t.getActivePlace(this.mapId):null}})),watch:{isVisible:function(t){var e=this;t&&null!==this.mapbox.map&&setTimeout((function(){e.mapbox.map.resize()}),20)},places:{handler:function(){this.geojsonData.features=[],this.initialiseMapFeatures(),this.initialiseMapMarkers()},deep:!0},showPolygons:function(t){!0===t?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace:function(t){t&&(0===t.length?this.removeHoveredPolygon():"Point"!==t.geometry.type&&this.addHoveredPolygon(t))},selectedItem:function(t){t&&"Point"!==t.geometry.type&&this.polygons.features.filter((function(e){return e.properties.id===t.properties.id})).length>0&&this.addActivePolygon(t),t||this.removeActivePolygon()},activeMarkerPostion:function(t){this.checkPointIsVisible(t)||this.centreMapOnPoint(t)},showInfoMessage:function(t){this.showMapMessage=!!t},resetZoom:function(t){t&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted:function(){var t=this;y.addMapInstance({id:this.mapId,filters:this.filters,places:this.places,activePins:this.places}),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),this.loadBrandingImmediately?n.A.init({div:this.mapId}):window.addEventListener("DOMContentLoaded",(function(){n.A.init({div:t.mapId})}))},methods:{addMap:function(){var t=this,e=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new(c().Map)({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:e,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",(function(){t.mapbox.rotation=t.mapbox.map.transform.angle})),this.mapbox.map.resize(),this.mapbox.map.on("load",(function(){t.addMapPolygons(),t.showMapMessage=!1,t.isLoading=!1,t.$emit("map-ready",!0),t.mapbox.map.boxZoom.enable()})),this.mapbox.map.on("zoomend",(function(){4===t.mapbox.map.getZoom()?(t.showZoomMessage="too-far",t.showMapMessage=!0):18===t.mapbox.map.getZoom()?(t.showZoomMessage="too-close",t.showMapMessage=!0):t.showInfoMessage||(t.showZoomMessage=null,t.showMapMessage=!1)}))},addMapControls:function(){var t=new(c().NavigationControl);this.mapbox.map.addControl(t,"top-right"),this.mapbox.map.addControl(new(c().FullscreenControl))},initialiseMapFeatures:function(){var t=this;this.places.map((function(e){if(void 0!==e.geometry){var o=t.getCoordinateArray(e);return t.getMapFeatures(e,o)}return!(!e.latitude||!e.longitude)&&t.getItineraryMapFeatures(e)}))},getCoordinateArray:function(t){return"Polygon"===t.geometry.type?[t.geometry.coordinates[0]]:"MultiPolygon"===t.geometry.type?[t.geometry.coordinates]:[t.geometry.coordinates[0],t.geometry.coordinates[1]]},getMapFeatures:function(t,e){return this.geojsonData.features.push({type:"Feature",geometry:{type:t.geometry.type,coordinates:e},properties:{title:t.properties.title,imageSrc:t.image,type:void 0!==t.properties.category?t.properties.category.id:"",id:t.properties.id},id:t.properties.id})},getItineraryMapFeatures:function(t){var e=this._uid;return this.geojsonData.features.push({type:"Feature",geometry:{type:"Point",coordinates:[parseFloat(t.longitude),parseFloat(t.latitude)]},properties:{title:t.title,imageSrc:t.imageSrc,type:"itinerary-stop",stopCount:t.stopCount,id:e},id:e})},initialiseMapMarkers:function(){var t=this,e=0;this.initialLoad&&(e=1e3),setTimeout((function(){if(null!==t.markers){for(var e=t.markers.length-1;e>=0;e--)t.markers[e].remove();t.markers=[]}t.geojsonData.features.forEach((function(e){"Point"===e.geometry.type&&t.createMapMarker(e)}))}),e)},createMapMarker:function(t){var e=this,o=(0,r.h)(g.default,{feature:t,mapId:this.mapId,hasPopups:this.showMarkerPopups,onShowDetail:function(t){e.$emit("showDetail",t)},onSetCategory:function(t){e.$emit("setCategory",t)}}),i=document.createElement("div");this.$refs.mapboxOuter.appendChild(i),(0,p.render)(o,i),t&&this.showMarkerPopups&&this.addMapPopup(t);var a=new(c().Marker)(i.children[0]).setLngLat(t.geometry.coordinates).setPopup(this.popup).addTo(this.mapbox.map);this.setupMarkerListeners(a),this.markers.push(a),i.remove()},hideMapPolygons:function(){this.mapbox.map.setLayoutProperty("regionFills","visibility","none"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","none")},showMapPolygons:function(){this.mapbox.map.setLayoutProperty("regionFills","visibility","visible"),this.mapbox.map.setLayoutProperty("regionBorders","visibility","visible")},addMapPolygons:function(){var t=this;this.geojsonData.features.forEach((function(e){"Polygon"===e.geometry.type?t.polygons.features.includes(e.properties.id)||t.polygons.features.push(e):"MultiPolygon"===e.geometry.type&&(t.polygons.features.includes(e.properties.id)||t.multiPolygons.push(e))})),this.multiPolygons.forEach((function(e){var o=e.properties;e.geometry.coordinates[0].forEach((function(e){t.polygons.features.push({geometry:{type:"Polygon",coordinates:e},id:o.id,properties:{id:o.id,imageSrc:o.imageSrc,title:o.title,type:o.type},type:"Feature"})}))})),this.polygons.features.length>0&&(this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regionFills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(168,48,140,0.5)",["==",["feature-state","interaction-state"],"active"],"rgba(168,48,140,0.5)","rgba(25,200,197,0.6)"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regionBorders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regionFills",(function(e){e.features.length>0&&(t.addMapPopup(e),t.removeHoveredPolygon(),t.addHoveredPolygon(e.features[0]))})),this.mapbox.map.on("mouseleave","regionFills",(function(e){t.removeMapPopup(e),t.removeHoveredPolygon()})),this.mapbox.map.on("click","regionFills",(function(e){t.removeActivePolygon(),t.addActivePolygon(e.features[0]),t.addMapPopup(e.features[0])})))},removeActivePolygon:function(){this.mapbox.map.style._layers.regionFills&&(this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null)},addActivePolygon:function(t){this.activeStateId=t.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),y.setActivePlace({mapId:this.mapId,activeFeature:t}),this.$emit("showDetail",t),this.$emit("setCategory","regions")},removeHoveredPolygon:function(){if(this.hoveredStateId){var t="";this.hoveredStateId===this.activeStateId&&(t="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":t})}y.setHoveredPlace({mapId:this.mapId,hoveredFeature:""}),this.hoveredStateId=null},addHoveredPolygon:function(t){this.hoveredStateId=t.properties.id,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),this.addMapPopup(t),y.setHoveredPlace({mapId:this.mapId,hoveredFeature:t})},addMapPopup:function(t){var e;e=t.features?t.features[0]:t;var o=this.getCoordinates(e),i=this.getPopupHtml(e);e.properties.id&&(this.removeMapPopup(t),this.popup=new(c().Popup)({closeButton:!1,offset:{top:[0,20],bottom:[0,-40],left:[30,-20],right:[-30,-20]}}).setLngLat(o).setHTML(i).addTo(this.mapbox.map))},removeMapPopup:function(t){this.popup&&(this.popup.remove(),this.popup=null),t._popup&&t._popup.remove()},getCoordinates:function(t){return"Polygon"===t.geometry.type?this.findFeatureCentre(t.geometry.coordinates):"MultiPolygon"===t.geometry.type?this.findFeatureCentre(t.geometry.coordinates[0]):t.geometry.coordinates},findFeatureCentre:function(t){var e=[],o=[];return t[0].forEach((function(t){e.push(t[1]),o.push(t[0])})),{lat:(Math.min.apply(Math,e)+Math.max.apply(Math,e))/2,lng:(Math.min.apply(Math,o)+Math.max.apply(Math,o))/2}},getPopupHtml:function(t){return t.properties.imageSrc&&t.properties.stopCount?'\n <img class="vs-map__popup-image" src="'.concat(t.properties.imageSrc,'" />\n <div>\n <h4 class="vs-map__popup-subtitle">Stop ').concat(t.properties.stopCount,'</h4>\n <p class="vs-map__popup-title">').concat(t.properties.title,"</p>\n </div>\n "):'\n <p class="vs-map__popup-title">'.concat(t.properties.title,"</p>\n ")},setupMarkerListeners:function(t){var e=this;document.body.addEventListener("keyup",(function(o){"Escape"!==o.key&&"Tab"!==o.key||(e.removeMapPopup(t),e.showMarkerPopups&&y.setActivePlace({mapId:e.mapId,activeFeature:null}))})),t.getElement().addEventListener("keyup",(function(o){"Enter"===o.key&&(t._popup.isOpen()||t._popup.addTo(e.mapbox.map))}))},fitToBounds:function(){this.mapbox.map.fitBounds(h()(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent:function(){this.addMap(),this.addMapControls(),this.places.length&&this.initialiseMapFeatures(),this.geojsonData.features.length&&(this.initialiseMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent:function(){var t=this;c().supported({failIfMajorPerformanceCaveat:!0}),"IntersectionObserver"in window?(this.observer=new IntersectionObserver((function(e){e[0].intersectionRatio>0&&(t.observer.unobserve(t.$el),t.initialiseMapComponent())})),this.observer.observe(this.$el)):this.initialiseMapComponent()},onResize:function(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon:function(){var t=this.boundsData.coordinates[0];return t.reduce((function(t,e){return t.extend(e)}),new(c().LngLatBounds)(t[0],t[0]))},checkPointIsVisible:function(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint:function(t){this.mapbox.map.flyTo({center:t})},calculateBoundingBox:function(){var t;if(void 0===this.boundsData||"undefined"===this.boundsData.type)t=[[-7.555827,54.608836],[-.778285,60.880894]];else if("bounds"===this.boundsData.type){var e=new(c().LngLat)(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),o=new(c().LngLat)(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);t=new(c().LngLatBounds)(e,o)}else t="Polygon"===this.boundsData.type?this.getBoundsFromPolygon():[[-7.555827,54.608836],[-.778285,60.880894]];return t}}}},73349:function(t,e,o){"use strict";o(21489)},81610:function(t,e,o){"use strict";o.r(e);var i=o(95095),a=o(3878);o(73349);const s=(0,o(66262).A)(a.A,[["render",i.X]]);e.default=s},95095:function(t,e,o){"use strict";o.d(e,{X:function(){return i.X}});var i=o(25159)}}]);
@@ -98,6 +98,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
98
98
  type: BooleanConstructor;
99
99
  default: boolean;
100
100
  };
101
+ /**
102
+ * If true the map branding will load immediately after the component is mounted. This
103
+ * should be set to true if the map is loaded asynchronously after page creation, as in
104
+ * most uses cases of the /maps entry.
105
+ */
106
+ loadBrandingImmediately: {
107
+ type: BooleanConstructor;
108
+ default: boolean;
109
+ };
101
110
  }>, void, {
102
111
  isDesktop: boolean;
103
112
  geojsonData: {
@@ -354,6 +363,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
354
363
  type: BooleanConstructor;
355
364
  default: boolean;
356
365
  };
366
+ /**
367
+ * If true the map branding will load immediately after the component is mounted. This
368
+ * should be set to true if the map is loaded asynchronously after page creation, as in
369
+ * most uses cases of the /maps entry.
370
+ */
371
+ loadBrandingImmediately: {
372
+ type: BooleanConstructor;
373
+ default: boolean;
374
+ };
357
375
  }>> & Readonly<{
358
376
  onShowDetail?: (...args: any[]) => any;
359
377
  onSetCategory?: (...args: any[]) => any;
@@ -371,6 +389,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
371
389
  showInfoMessage: boolean;
372
390
  resetZoom: boolean;
373
391
  showMarkerPopups: boolean;
392
+ loadBrandingImmediately: boolean;
374
393
  }, {}, {
375
394
  VsWarning: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
376
395
  icon: {
@@ -131,6 +131,15 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
131
131
  type: StringConstructor;
132
132
  default: any;
133
133
  };
134
+ /**
135
+ * If true the map branding will load immediately after the component is mounted. This
136
+ * should be set to true if the map is loaded asynchronously after page creation, as in
137
+ * most uses cases of the /maps entry.
138
+ */
139
+ loadBrandingImmediately: {
140
+ type: BooleanConstructor;
141
+ default: boolean;
142
+ };
134
143
  }>, {}, {
135
144
  panelVisible: boolean;
136
145
  selectedCategory: string;
@@ -370,9 +379,19 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
370
379
  type: StringConstructor;
371
380
  default: any;
372
381
  };
382
+ /**
383
+ * If true the map branding will load immediately after the component is mounted. This
384
+ * should be set to true if the map is loaded asynchronously after page creation, as in
385
+ * most uses cases of the /maps entry.
386
+ */
387
+ loadBrandingImmediately: {
388
+ type: BooleanConstructor;
389
+ default: boolean;
390
+ };
373
391
  }>> & Readonly<{}>, {
374
392
  initialSelected: string;
375
393
  buttonsLabel: string;
394
+ loadBrandingImmediately: boolean;
376
395
  categoryHeading: string;
377
396
  panelMessage: string;
378
397
  mainHeadingExists: boolean;
@@ -597,6 +616,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
597
616
  type: BooleanConstructor;
598
617
  default: boolean;
599
618
  };
619
+ loadBrandingImmediately: {
620
+ type: BooleanConstructor;
621
+ default: boolean;
622
+ };
600
623
  }>, void, {
601
624
  isDesktop: boolean;
602
625
  geojsonData: {
@@ -721,6 +744,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
721
744
  type: BooleanConstructor;
722
745
  default: boolean;
723
746
  };
747
+ loadBrandingImmediately: {
748
+ type: BooleanConstructor;
749
+ default: boolean;
750
+ };
724
751
  }>> & Readonly<{
725
752
  onShowDetail?: (...args: any[]) => any;
726
753
  onSetCategory?: (...args: any[]) => any;
@@ -738,6 +765,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
738
765
  showInfoMessage: boolean;
739
766
  resetZoom: boolean;
740
767
  showMarkerPopups: boolean;
768
+ loadBrandingImmediately: boolean;
741
769
  }, {}, {
742
770
  VsWarning: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
743
771
  icon: {