@visitscotland/component-library 1.0.14 → 1.0.16

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.
Files changed (31) hide show
  1. package/CHANGELOG.md +110 -85
  2. package/dist/{ssr/fonts/custom-icons.c4e1f0c.ttf → client/fonts/custom-icons.6f8bdb4.ttf} +0 -0
  3. package/dist/client/fonts/custom-icons.e7710b8.woff2 +0 -0
  4. package/dist/client/manifest.json +38 -38
  5. package/dist/client/scripts/{200bfeea3cbd7dce2b95.js → 35ffeb6941520c33adfe.js} +1 -1
  6. package/dist/client/scripts/4531b8ff3407394b6664.js +1 -0
  7. package/dist/client/scripts/52583a27e162e782272c.js +1 -0
  8. package/dist/client/scripts/7000e7c66566b9102f8b.js +1 -0
  9. package/dist/client/scripts/9f24f39f39375ad29408.js +1 -0
  10. package/dist/client/styles/35ffeb6941520c33adfe.css +1 -0
  11. package/dist/client/styles/{aa260d81d6025b38f93b.css → 52583a27e162e782272c.css} +1 -1
  12. package/dist/client/styles/{c5992240a3f3d7197c2b.css → 84d6faf2b1c8ecb899e2.css} +1 -1
  13. package/dist/client/styles/{535956e200092e54a3d6.css → efe8e855d5d230c353cd.css} +2 -2
  14. package/dist/{client/fonts/custom-icons.c4e1f0c.ttf → ssr/fonts/custom-icons.6f8bdb4.ttf} +0 -0
  15. package/dist/ssr/fonts/custom-icons.e7710b8.woff2 +0 -0
  16. package/dist/ssr/index.js +1 -1
  17. package/dist/ssr/manifest.json +1 -1
  18. package/dist/ssr/styles/{727d31acffe5806e69cf.css → 8d513933f6fd629d347b.css} +5 -5
  19. package/package.json +3 -2
  20. package/dist/client/fonts/custom-icons.103bd0a.woff2 +0 -0
  21. package/dist/client/scripts/3a1d3a02c238d41c9e68.js +0 -1
  22. package/dist/client/scripts/601b7a91a71eaf767d0d.js +0 -1
  23. package/dist/client/scripts/94aa5ac955de9ed0d840.js +0 -1
  24. package/dist/client/scripts/aa260d81d6025b38f93b.js +0 -1
  25. package/dist/client/styles/200bfeea3cbd7dce2b95.css +0 -1
  26. package/dist/ssr/fonts/custom-icons.103bd0a.woff2 +0 -0
  27. /package/dist/client/scripts/{c5992240a3f3d7197c2b.js → 84d6faf2b1c8ecb899e2.js} +0 -0
  28. /package/dist/client/scripts/{535956e200092e54a3d6.js → efe8e855d5d230c353cd.js} +0 -0
  29. /package/dist/client/styles/{601b7a91a71eaf767d0d.css → 4531b8ff3407394b6664.css} +0 -0
  30. /package/dist/client/styles/{94aa5ac955de9ed0d840.css → 7000e7c66566b9102f8b.css} +0 -0
  31. /package/dist/client/styles/{3a1d3a02c238d41c9e68.css → 9f24f39f39375ad29408.css} +0 -0
package/CHANGELOG.md CHANGED
@@ -2,96 +2,121 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
- ### [1.0.14](https://github.com/visitscotland/vs-component-library/compare/v1.0.13...v1.0.14) (2023-08-18)
5
+ ### [1.0.16](https://github.com/visitscotland/vs-component-library/compare/v1.0.15...v1.0.16) (2023-08-30)
6
6
 
7
7
 
8
8
  ### 🐛 Bug Fixes
9
9
 
10
- * **map:** fix map heading so the selected category is always displayed at the top ([b05a08c](https://github.com/visitscotland/vs-component-library/commit/b05a08c4e148294bc39e84bae7d99695bb8dc746))
11
-
12
- ### [1.0.13](https://github.com/visitscotland/vs-component-library/compare/v1.0.12...v1.0.13) (2023-08-16)
10
+ * **map:** fix regions for map and add regions story ([c23364d](https://github.com/visitscotland/vs-component-library/commit/c23364d061deb42e21c81c53309b09d3a3b71a18))
13
11
 
14
12
 
15
13
  ### ✨ Features
16
14
 
17
- * **map:** adds Outlander icons and themes for maps ([50ddc04](https://github.com/visitscotland/vs-component-library/commit/50ddc046c093cbfd75fe6c72b694a1e89ad1c609))
18
-
19
-
20
- ### 🎨 Styling
21
-
22
- * **map:** update height of the map module ([542a455](https://github.com/visitscotland/vs-component-library/commit/542a45506725f2afadd78367ef80a774c5fbe7db))
23
-
24
-
25
- ### 🔖 Others
26
-
27
- * add badges to README.md ([6dd823a](https://github.com/visitscotland/vs-component-library/commit/6dd823a8caefd786c528242fcd93700b5251b5c7))
28
- * add contribution guidelines and code of conduct ([6bf1764](https://github.com/visitscotland/vs-component-library/commit/6bf176469a094c509bbe1716968d349de8e1f177))
29
- * add contribution links to README.md ([a6a21d4](https://github.com/visitscotland/vs-component-library/commit/a6a21d4b13612571a65459fef3c703d45fe8a8da))
30
- * add contributor covenant badge to README.md ([e97840d](https://github.com/visitscotland/vs-component-library/commit/e97840df67affd041a0883c62262af2d643043a3))
31
- * add email address to code of conduct ([11cd613](https://github.com/visitscotland/vs-component-library/commit/11cd613f4cbc5ff530c1e36622aad2f622e9290d))
32
- * add security.md file ([de88335](https://github.com/visitscotland/vs-component-library/commit/de88335429593053aac434dcba232f35a022e0f0))
33
- * add Yarn Test badge ([0ac5afc](https://github.com/visitscotland/vs-component-library/commit/0ac5afcd2e142cdb5f4dee9d97b023c132cfaf19))
34
- * **package.json:** add Theo to build script ([9f9a5c5](https://github.com/visitscotland/vs-component-library/commit/9f9a5c59b036638c839f61241f5108981c55d96e))
35
- * **release:** 1.0.14 ([7bb68f8](https://github.com/visitscotland/vs-component-library/commit/7bb68f801aca6ce8661a778d8c095cf79603d65b))
36
- * **tokens:** remove auto-generated tokens from the repo ([46b3ebf](https://github.com/visitscotland/vs-component-library/commit/46b3ebf5b46e0d6e9fd1d5488d245318bfa60812))
37
- * update code of conduct ([1315c1a](https://github.com/visitscotland/vs-component-library/commit/1315c1a1a6d652909feb80bbede34df973d41338))
38
- * update email address in security policy ([36cc62e](https://github.com/visitscotland/vs-component-library/commit/36cc62e179b61f0e08aa899391e0fce98a320cdb))
39
- * update email addresses in code of conduct and contribution guide ([63472aa](https://github.com/visitscotland/vs-component-library/commit/63472aa0049045441e315aa81b4ad78358f278a6))
40
- * update README.md with licence info ([2de656b](https://github.com/visitscotland/vs-component-library/commit/2de656b121d4b8c0aeb3dd535729eac4adcd88dd))
41
- * update visitscotland badge URL ([ff387ea](https://github.com/visitscotland/vs-component-library/commit/ff387ea11bc8df7d9602b2f470d5b020cd990091))
42
-
43
- ### [1.0.12](https://github.com/visitscotland/vs-component-library/compare/v1.0.11...v1.0.12) (2023-08-09)
44
-
45
-
46
- ### 🐛 Bug Fixes
47
-
48
- * **third party:** styles in correct place ([4c8b28a](https://github.com/visitscotland/vs-component-library/commit/4c8b28ab004dedd928ffba5cc981a1c50d0324ce))
49
-
50
- ### [1.0.11](https://github.com/visitscotland/vs-component-library/compare/v1.0.10...v1.0.11) (2023-08-08)
51
-
52
-
53
- ### ✨ Features
54
-
55
- * **table:** simply data and fix stacked styles ([c89405b](https://github.com/visitscotland/vs-component-library/commit/c89405b14a0ac65db141fe12cda275660f6e3f98))
56
- * **workflow:** run tests on pr creation ([2a883b5](https://github.com/visitscotland/vs-component-library/commit/2a883b5e80bef222fe0309f64e5c3eec46f12f84))
57
-
58
-
59
- ### 🔖 Others
60
-
61
- * fix dependabot issue by upgrading resolutions entries ([0a27a34](https://github.com/visitscotland/vs-component-library/commit/0a27a34f2b409fb0ac1017fa25641dae9d2f6995))
62
-
63
-
64
- ### 🐛 Bug Fixes
65
-
66
- * **carousel:** set image urls locally instead of using image from the production site ([2affbe7](https://github.com/visitscotland/vs-component-library/commit/2affbe77e390d8404901d500b0d760c7d7881423))
67
- * **input:** fix validation logic and validation test ([d0060a0](https://github.com/visitscotland/vs-component-library/commit/d0060a0203621e2140341dfc1c63824c2117247b))
68
- * **meganav:** set image urls locally instead of using image from the production site ([8059770](https://github.com/visitscotland/vs-component-library/commit/80597705e68df64844b7e7d117f036e01f3bc9f3))
69
- * **table:** correct table story usage of header ([ccba843](https://github.com/visitscotland/vs-component-library/commit/ccba84309184ce2dd721f7312b176366ad3e0bfa))
70
- * **table:** fix stacked table ([b6773e9](https://github.com/visitscotland/vs-component-library/commit/b6773e915e0ab9cae47f02c3e15d3fecbc0d80d4))
71
- * **tests:** fix logic on carousel throttling test ([d031ff6](https://github.com/visitscotland/vs-component-library/commit/d031ff6481a9ff860e2d2bc5770781af014304d2))
72
- * **tests:** mock map store to and mapboxgl to fix map tests ([ef58f03](https://github.com/visitscotland/vs-component-library/commit/ef58f037d25c364f6bf52f93072747966e064c9c))
73
- * **tests:** mock video for tests and fix other testing logic ([e0bbd36](https://github.com/visitscotland/vs-component-library/commit/e0bbd36c5c76763e6ca691d5829a573bf0262271))
74
- * **tests:** mock window.url.createobjecturl for map wrapper tests ([52ad076](https://github.com/visitscotland/vs-component-library/commit/52ad0764a695424f533537dc2dcf17b18da32990))
75
- * **third party:** fix third party styles and build them in main script ([b9c9753](https://github.com/visitscotland/vs-component-library/commit/b9c97537e50197371f05336126d8f64bc601239f))
76
- * **video:** ensure cookie init status sets to error if onetrust doesn't initiate ([d9caa5d](https://github.com/visitscotland/vs-component-library/commit/d9caa5d30b160232296e3b8e46f264819ca94db3))
77
- * **workflow:** only run on one node version ([3aa0471](https://github.com/visitscotland/vs-component-library/commit/3aa04710e0ff90814f796b1a8b853b38c1338052))
78
-
79
- ### [1.0.10](https://github.com/visitscotland/vs-component-library/compare/v1.0.9...v1.0.10) (2023-08-04)
80
-
81
-
82
- ### 🐛 Bug Fixes
83
-
84
- * **meganav:** ensure search bar is open before focussing input ([7a6311d](https://github.com/visitscotland/vs-component-library/commit/7a6311d478e017c5d7a32894afec9cd88f8b57b6))
85
-
86
- ### [1.0.9](https://github.com/visitscotland/vs-component-library/compare/v1.0.8...v1.0.9) (2023-08-03)
87
-
88
-
89
- ### 📝 Docs
90
-
91
- * **socialshare.stories.js:** wrap the component in an absolutely positioned div ([8907dd7](https://github.com/visitscotland/vs-component-library/commit/8907dd735a3b421e7c26a004597c528d6b737505))
92
-
93
-
94
- ### 🐛 Bug Fixes
95
-
96
- * **socialshare.vue:** add container prop set to "body" ([3edc3b8](https://github.com/visitscotland/vs-component-library/commit/3edc3b84932f3b19969caa39a329af71316852b1))
97
- * **ssr:** bring lazy hydrate fix over from other repo ([b707973](https://github.com/visitscotland/vs-component-library/commit/b707973d90ea9212eed71ca30b550c3a1fd1fde8))
15
+ * **map:** adds new distillery map option ([c1855bc](https://github.com/visitscotland/vs-component-library/commit/c1855bc1938072e00de1df927a5e5c71cbdea512))
16
+
17
+ ### [1.0.15](https://github.com/visitscotland/vs-component-library/compare/v1.0.14...v1.0.15) (2023-08-28)
18
+
19
+
20
+ ### 🔖 Others
21
+
22
+ * **storybook:** upgrade Storybook to latest version ([2dc6e00](https://github.com/visitscotland/vs-component-library/commit/2dc6e00231e445c78ced57239fbe5028a71614f3))
23
+
24
+
25
+ ### 🐛 Bug Fixes
26
+
27
+ * **map:** bug fixes for map component ([3a90089](https://github.com/visitscotland/vs-component-library/commit/3a9008905564c2b7f2d88e9010b6d4bbbb155795))
28
+ * **map:** remove console.log statement ([c4b7b72](https://github.com/visitscotland/vs-component-library/commit/c4b7b724f33da1989346a163775bf4e6c76d15ba))
29
+
30
+ ### [1.0.14](https://github.com/visitscotland/vs-component-library/compare/v1.0.13...v1.0.14) (2023-08-18)
31
+
32
+
33
+ ### 🐛 Bug Fixes
34
+
35
+ * **map:** fix map heading so the selected category is always displayed at the top ([b05a08c](https://github.com/visitscotland/vs-component-library/commit/b05a08c4e148294bc39e84bae7d99695bb8dc746))
36
+
37
+ ### [1.0.13](https://github.com/visitscotland/vs-component-library/compare/v1.0.12...v1.0.13) (2023-08-16)
38
+
39
+
40
+ ### ✨ Features
41
+
42
+ * **map:** adds Outlander icons and themes for maps ([50ddc04](https://github.com/visitscotland/vs-component-library/commit/50ddc046c093cbfd75fe6c72b694a1e89ad1c609))
43
+
44
+
45
+ ### 🎨 Styling
46
+
47
+ * **map:** update height of the map module ([542a455](https://github.com/visitscotland/vs-component-library/commit/542a45506725f2afadd78367ef80a774c5fbe7db))
48
+
49
+
50
+ ### 🔖 Others
51
+
52
+ * add badges to README.md ([6dd823a](https://github.com/visitscotland/vs-component-library/commit/6dd823a8caefd786c528242fcd93700b5251b5c7))
53
+ * add contribution guidelines and code of conduct ([6bf1764](https://github.com/visitscotland/vs-component-library/commit/6bf176469a094c509bbe1716968d349de8e1f177))
54
+ * add contribution links to README.md ([a6a21d4](https://github.com/visitscotland/vs-component-library/commit/a6a21d4b13612571a65459fef3c703d45fe8a8da))
55
+ * add contributor covenant badge to README.md ([e97840d](https://github.com/visitscotland/vs-component-library/commit/e97840df67affd041a0883c62262af2d643043a3))
56
+ * add email address to code of conduct ([11cd613](https://github.com/visitscotland/vs-component-library/commit/11cd613f4cbc5ff530c1e36622aad2f622e9290d))
57
+ * add security.md file ([de88335](https://github.com/visitscotland/vs-component-library/commit/de88335429593053aac434dcba232f35a022e0f0))
58
+ * add Yarn Test badge ([0ac5afc](https://github.com/visitscotland/vs-component-library/commit/0ac5afcd2e142cdb5f4dee9d97b023c132cfaf19))
59
+ * **package.json:** add Theo to build script ([9f9a5c5](https://github.com/visitscotland/vs-component-library/commit/9f9a5c59b036638c839f61241f5108981c55d96e))
60
+ * **release:** 1.0.14 ([7bb68f8](https://github.com/visitscotland/vs-component-library/commit/7bb68f801aca6ce8661a778d8c095cf79603d65b))
61
+ * **tokens:** remove auto-generated tokens from the repo ([46b3ebf](https://github.com/visitscotland/vs-component-library/commit/46b3ebf5b46e0d6e9fd1d5488d245318bfa60812))
62
+ * update code of conduct ([1315c1a](https://github.com/visitscotland/vs-component-library/commit/1315c1a1a6d652909feb80bbede34df973d41338))
63
+ * update email address in security policy ([36cc62e](https://github.com/visitscotland/vs-component-library/commit/36cc62e179b61f0e08aa899391e0fce98a320cdb))
64
+ * update email addresses in code of conduct and contribution guide ([63472aa](https://github.com/visitscotland/vs-component-library/commit/63472aa0049045441e315aa81b4ad78358f278a6))
65
+ * update README.md with licence info ([2de656b](https://github.com/visitscotland/vs-component-library/commit/2de656b121d4b8c0aeb3dd535729eac4adcd88dd))
66
+ * update visitscotland badge URL ([ff387ea](https://github.com/visitscotland/vs-component-library/commit/ff387ea11bc8df7d9602b2f470d5b020cd990091))
67
+
68
+ ### [1.0.12](https://github.com/visitscotland/vs-component-library/compare/v1.0.11...v1.0.12) (2023-08-09)
69
+
70
+
71
+ ### 🐛 Bug Fixes
72
+
73
+ * **third party:** styles in correct place ([4c8b28a](https://github.com/visitscotland/vs-component-library/commit/4c8b28ab004dedd928ffba5cc981a1c50d0324ce))
74
+
75
+ ### [1.0.11](https://github.com/visitscotland/vs-component-library/compare/v1.0.10...v1.0.11) (2023-08-08)
76
+
77
+
78
+ ### ✨ Features
79
+
80
+ * **table:** simply data and fix stacked styles ([c89405b](https://github.com/visitscotland/vs-component-library/commit/c89405b14a0ac65db141fe12cda275660f6e3f98))
81
+ * **workflow:** run tests on pr creation ([2a883b5](https://github.com/visitscotland/vs-component-library/commit/2a883b5e80bef222fe0309f64e5c3eec46f12f84))
82
+
83
+
84
+ ### 🔖 Others
85
+
86
+ * fix dependabot issue by upgrading resolutions entries ([0a27a34](https://github.com/visitscotland/vs-component-library/commit/0a27a34f2b409fb0ac1017fa25641dae9d2f6995))
87
+
88
+
89
+ ### 🐛 Bug Fixes
90
+
91
+ * **carousel:** set image urls locally instead of using image from the production site ([2affbe7](https://github.com/visitscotland/vs-component-library/commit/2affbe77e390d8404901d500b0d760c7d7881423))
92
+ * **input:** fix validation logic and validation test ([d0060a0](https://github.com/visitscotland/vs-component-library/commit/d0060a0203621e2140341dfc1c63824c2117247b))
93
+ * **meganav:** set image urls locally instead of using image from the production site ([8059770](https://github.com/visitscotland/vs-component-library/commit/80597705e68df64844b7e7d117f036e01f3bc9f3))
94
+ * **table:** correct table story usage of header ([ccba843](https://github.com/visitscotland/vs-component-library/commit/ccba84309184ce2dd721f7312b176366ad3e0bfa))
95
+ * **table:** fix stacked table ([b6773e9](https://github.com/visitscotland/vs-component-library/commit/b6773e915e0ab9cae47f02c3e15d3fecbc0d80d4))
96
+ * **tests:** fix logic on carousel throttling test ([d031ff6](https://github.com/visitscotland/vs-component-library/commit/d031ff6481a9ff860e2d2bc5770781af014304d2))
97
+ * **tests:** mock map store to and mapboxgl to fix map tests ([ef58f03](https://github.com/visitscotland/vs-component-library/commit/ef58f037d25c364f6bf52f93072747966e064c9c))
98
+ * **tests:** mock video for tests and fix other testing logic ([e0bbd36](https://github.com/visitscotland/vs-component-library/commit/e0bbd36c5c76763e6ca691d5829a573bf0262271))
99
+ * **tests:** mock window.url.createobjecturl for map wrapper tests ([52ad076](https://github.com/visitscotland/vs-component-library/commit/52ad0764a695424f533537dc2dcf17b18da32990))
100
+ * **third party:** fix third party styles and build them in main script ([b9c9753](https://github.com/visitscotland/vs-component-library/commit/b9c97537e50197371f05336126d8f64bc601239f))
101
+ * **video:** ensure cookie init status sets to error if onetrust doesn't initiate ([d9caa5d](https://github.com/visitscotland/vs-component-library/commit/d9caa5d30b160232296e3b8e46f264819ca94db3))
102
+ * **workflow:** only run on one node version ([3aa0471](https://github.com/visitscotland/vs-component-library/commit/3aa04710e0ff90814f796b1a8b853b38c1338052))
103
+
104
+ ### [1.0.10](https://github.com/visitscotland/vs-component-library/compare/v1.0.9...v1.0.10) (2023-08-04)
105
+
106
+
107
+ ### 🐛 Bug Fixes
108
+
109
+ * **meganav:** ensure search bar is open before focussing input ([7a6311d](https://github.com/visitscotland/vs-component-library/commit/7a6311d478e017c5d7a32894afec9cd88f8b57b6))
110
+
111
+ ### [1.0.9](https://github.com/visitscotland/vs-component-library/compare/v1.0.8...v1.0.9) (2023-08-03)
112
+
113
+
114
+ ### 📝 Docs
115
+
116
+ * **socialshare.stories.js:** wrap the component in an absolutely positioned div ([8907dd7](https://github.com/visitscotland/vs-component-library/commit/8907dd735a3b421e7c26a004597c528d6b737505))
117
+
118
+
119
+ ### 🐛 Bug Fixes
120
+
121
+ * **socialshare.vue:** add container prop set to "body" ([3edc3b8](https://github.com/visitscotland/vs-component-library/commit/3edc3b84932f3b19969caa39a329af71316852b1))
122
+ * **ssr:** bring lazy hydrate fix over from other repo ([b707973](https://github.com/visitscotland/vs-component-library/commit/b707973d90ea9212eed71ca30b550c3a1fd1fde8))
@@ -25,11 +25,11 @@
25
25
  "scripts/a08f97460464cd02e2bc.js",
26
26
  "scripts/56c42bac08d8c1efa1e4.js",
27
27
  "scripts/f28a2e92ca4ac488ad47.js",
28
- "scripts/535956e200092e54a3d6.js"
28
+ "scripts/efe8e855d5d230c353cd.js"
29
29
  ],
30
30
  "styles": [
31
31
  "styles/f28a2e92ca4ac488ad47.css",
32
- "styles/535956e200092e54a3d6.css"
32
+ "styles/efe8e855d5d230c353cd.css"
33
33
  ]
34
34
  },
35
35
  "VsAddress": {
@@ -1351,7 +1351,7 @@
1351
1351
  "scripts/bb5f66fdff1806a7b91d.js",
1352
1352
  "scripts/af20ced2e34b6801258c.js",
1353
1353
  "scripts/d0fd50a5b063d113a609.js",
1354
- "scripts/3a1d3a02c238d41c9e68.js",
1354
+ "scripts/9f24f39f39375ad29408.js",
1355
1355
  "scripts/8f94c579870278535ad8.js",
1356
1356
  "scripts/d2b72d2f799a68620b20.js",
1357
1357
  "scripts/7757ce3ea4d54690a958.js",
@@ -1378,7 +1378,7 @@
1378
1378
  "styles/bb5f66fdff1806a7b91d.css",
1379
1379
  "styles/af20ced2e34b6801258c.css",
1380
1380
  "styles/d0fd50a5b063d113a609.css",
1381
- "styles/3a1d3a02c238d41c9e68.css",
1381
+ "styles/9f24f39f39375ad29408.css",
1382
1382
  "styles/7757ce3ea4d54690a958.css",
1383
1383
  "styles/f80af738a342894b1e70.css",
1384
1384
  "styles/b75cfdb317cbf454148d.css",
@@ -3381,15 +3381,15 @@
3381
3381
  "scripts/806da470b47604d66669.js",
3382
3382
  "scripts/721866ef74ab37fdfc1d.js",
3383
3383
  "scripts/18f2445b32c899cb5d25.js",
3384
- "scripts/aa260d81d6025b38f93b.js",
3385
- "scripts/c5992240a3f3d7197c2b.js",
3384
+ "scripts/52583a27e162e782272c.js",
3385
+ "scripts/84d6faf2b1c8ecb899e2.js",
3386
3386
  "scripts/0a6449acb793a9a6e320.js"
3387
3387
  ],
3388
3388
  "styles": [
3389
3389
  "styles/c1e52b98d340cd47fee7.css",
3390
3390
  "styles/18f2445b32c899cb5d25.css",
3391
- "styles/aa260d81d6025b38f93b.css",
3392
- "styles/c5992240a3f3d7197c2b.css"
3391
+ "styles/52583a27e162e782272c.css",
3392
+ "styles/84d6faf2b1c8ecb899e2.css"
3393
3393
  ]
3394
3394
  },
3395
3395
  "VsMainMapWrapperControls": {
@@ -3498,12 +3498,12 @@
3498
3498
  "scripts/eda81d149aecca45599c.js",
3499
3499
  "scripts/a08f97460464cd02e2bc.js",
3500
3500
  "scripts/c1e52b98d340cd47fee7.js",
3501
- "scripts/aa260d81d6025b38f93b.js",
3501
+ "scripts/52583a27e162e782272c.js",
3502
3502
  "scripts/a6320b1b88ef855399a1.js"
3503
3503
  ],
3504
3504
  "styles": [
3505
3505
  "styles/c1e52b98d340cd47fee7.css",
3506
- "styles/aa260d81d6025b38f93b.css"
3506
+ "styles/52583a27e162e782272c.css"
3507
3507
  ]
3508
3508
  },
3509
3509
  "VsMainMapWrapperListItem": {
@@ -3581,12 +3581,12 @@
3581
3581
  "scripts/721866ef74ab37fdfc1d.js",
3582
3582
  "scripts/18f2445b32c899cb5d25.js",
3583
3583
  "scripts/24228f9eee7eb5c30688.js",
3584
- "scripts/aa260d81d6025b38f93b.js",
3584
+ "scripts/52583a27e162e782272c.js",
3585
3585
  "scripts/f18a27162f88fe8abf41.js",
3586
3586
  "scripts/d83b18cb157603b0cef0.js",
3587
3587
  "scripts/675558e1c1ca13dceb13.js",
3588
3588
  "scripts/3c9d8724e602abc493bb.js",
3589
- "scripts/601b7a91a71eaf767d0d.js",
3589
+ "scripts/4531b8ff3407394b6664.js",
3590
3590
  "scripts/980e46faf302990630b5.js"
3591
3591
  ],
3592
3592
  "styles": [
@@ -3594,10 +3594,10 @@
3594
3594
  "styles/c1e52b98d340cd47fee7.css",
3595
3595
  "styles/18f2445b32c899cb5d25.css",
3596
3596
  "styles/24228f9eee7eb5c30688.css",
3597
- "styles/aa260d81d6025b38f93b.css",
3597
+ "styles/52583a27e162e782272c.css",
3598
3598
  "styles/d83b18cb157603b0cef0.css",
3599
3599
  "styles/675558e1c1ca13dceb13.css",
3600
- "styles/601b7a91a71eaf767d0d.css"
3600
+ "styles/4531b8ff3407394b6664.css"
3601
3601
  ]
3602
3602
  },
3603
3603
  "VsMainMapWrapperMarker": {
@@ -3629,14 +3629,14 @@
3629
3629
  "scripts/3f1b0a8f63d6d6aa404e.js",
3630
3630
  "scripts/c1e52b98d340cd47fee7.js",
3631
3631
  "scripts/806da470b47604d66669.js",
3632
- "scripts/aa260d81d6025b38f93b.js",
3632
+ "scripts/52583a27e162e782272c.js",
3633
3633
  "scripts/f18a27162f88fe8abf41.js",
3634
3634
  "scripts/675558e1c1ca13dceb13.js",
3635
3635
  "scripts/784b89872a2ba2f2f6b0.js"
3636
3636
  ],
3637
3637
  "styles": [
3638
3638
  "styles/c1e52b98d340cd47fee7.css",
3639
- "styles/aa260d81d6025b38f93b.css",
3639
+ "styles/52583a27e162e782272c.css",
3640
3640
  "styles/675558e1c1ca13dceb13.css"
3641
3641
  ]
3642
3642
  },
@@ -3674,15 +3674,15 @@
3674
3674
  "scripts/18f2445b32c899cb5d25.js",
3675
3675
  "scripts/ae5c80d270825f9d87fa.js",
3676
3676
  "scripts/af20ced2e34b6801258c.js",
3677
- "scripts/aa260d81d6025b38f93b.js",
3677
+ "scripts/52583a27e162e782272c.js",
3678
3678
  "scripts/f18a27162f88fe8abf41.js",
3679
- "scripts/c5992240a3f3d7197c2b.js",
3679
+ "scripts/84d6faf2b1c8ecb899e2.js",
3680
3680
  "scripts/e62d810e4ba9cb91fd03.js",
3681
3681
  "scripts/c2c21d2a64dc273bc13b.js",
3682
3682
  "scripts/026f994c17378bff06a3.js",
3683
3683
  "scripts/1571e0de0d235cbb16c8.js",
3684
3684
  "scripts/5f0a0570c71b9cc82d41.js",
3685
- "scripts/200bfeea3cbd7dce2b95.js",
3685
+ "scripts/35ffeb6941520c33adfe.js",
3686
3686
  "scripts/018afcd7924ff1c127ab.js"
3687
3687
  ],
3688
3688
  "styles": [
@@ -3690,14 +3690,14 @@
3690
3690
  "styles/18f2445b32c899cb5d25.css",
3691
3691
  "styles/ae5c80d270825f9d87fa.css",
3692
3692
  "styles/af20ced2e34b6801258c.css",
3693
- "styles/aa260d81d6025b38f93b.css",
3694
- "styles/c5992240a3f3d7197c2b.css",
3693
+ "styles/52583a27e162e782272c.css",
3694
+ "styles/84d6faf2b1c8ecb899e2.css",
3695
3695
  "styles/e62d810e4ba9cb91fd03.css",
3696
3696
  "styles/c2c21d2a64dc273bc13b.css",
3697
3697
  "styles/026f994c17378bff06a3.css",
3698
3698
  "styles/1571e0de0d235cbb16c8.css",
3699
3699
  "styles/5f0a0570c71b9cc82d41.css",
3700
- "styles/200bfeea3cbd7dce2b95.css"
3700
+ "styles/35ffeb6941520c33adfe.css"
3701
3701
  ]
3702
3702
  },
3703
3703
  "VsMainMapWrapperSubcategory": {
@@ -3730,14 +3730,14 @@
3730
3730
  "scripts/3f1b0a8f63d6d6aa404e.js",
3731
3731
  "scripts/c1e52b98d340cd47fee7.js",
3732
3732
  "scripts/806da470b47604d66669.js",
3733
- "scripts/aa260d81d6025b38f93b.js",
3733
+ "scripts/52583a27e162e782272c.js",
3734
3734
  "scripts/f18a27162f88fe8abf41.js",
3735
3735
  "scripts/c2c21d2a64dc273bc13b.js",
3736
3736
  "scripts/4c3af402f67c08e36413.js"
3737
3737
  ],
3738
3738
  "styles": [
3739
3739
  "styles/c1e52b98d340cd47fee7.css",
3740
- "styles/aa260d81d6025b38f93b.css",
3740
+ "styles/52583a27e162e782272c.css",
3741
3741
  "styles/c2c21d2a64dc273bc13b.css"
3742
3742
  ]
3743
3743
  },
@@ -3806,10 +3806,10 @@
3806
3806
  "scripts/ae5c80d270825f9d87fa.js",
3807
3807
  "scripts/24228f9eee7eb5c30688.js",
3808
3808
  "scripts/af20ced2e34b6801258c.js",
3809
- "scripts/aa260d81d6025b38f93b.js",
3809
+ "scripts/52583a27e162e782272c.js",
3810
3810
  "scripts/f18a27162f88fe8abf41.js",
3811
3811
  "scripts/d83b18cb157603b0cef0.js",
3812
- "scripts/c5992240a3f3d7197c2b.js",
3812
+ "scripts/84d6faf2b1c8ecb899e2.js",
3813
3813
  "scripts/e62d810e4ba9cb91fd03.js",
3814
3814
  "scripts/675558e1c1ca13dceb13.js",
3815
3815
  "scripts/c2c21d2a64dc273bc13b.js",
@@ -3817,10 +3817,10 @@
3817
3817
  "scripts/1571e0de0d235cbb16c8.js",
3818
3818
  "scripts/5f0a0570c71b9cc82d41.js",
3819
3819
  "scripts/3c9d8724e602abc493bb.js",
3820
- "scripts/601b7a91a71eaf767d0d.js",
3821
- "scripts/200bfeea3cbd7dce2b95.js",
3820
+ "scripts/4531b8ff3407394b6664.js",
3821
+ "scripts/35ffeb6941520c33adfe.js",
3822
3822
  "scripts/aa3967ab6e1ea94a93bd.js",
3823
- "scripts/94aa5ac955de9ed0d840.js"
3823
+ "scripts/7000e7c66566b9102f8b.js"
3824
3824
  ],
3825
3825
  "styles": [
3826
3826
  "styles/4171701a5998d9aea515.css",
@@ -3830,19 +3830,19 @@
3830
3830
  "styles/ae5c80d270825f9d87fa.css",
3831
3831
  "styles/24228f9eee7eb5c30688.css",
3832
3832
  "styles/af20ced2e34b6801258c.css",
3833
- "styles/aa260d81d6025b38f93b.css",
3833
+ "styles/52583a27e162e782272c.css",
3834
3834
  "styles/d83b18cb157603b0cef0.css",
3835
- "styles/c5992240a3f3d7197c2b.css",
3835
+ "styles/84d6faf2b1c8ecb899e2.css",
3836
3836
  "styles/e62d810e4ba9cb91fd03.css",
3837
3837
  "styles/675558e1c1ca13dceb13.css",
3838
3838
  "styles/c2c21d2a64dc273bc13b.css",
3839
3839
  "styles/026f994c17378bff06a3.css",
3840
3840
  "styles/1571e0de0d235cbb16c8.css",
3841
3841
  "styles/5f0a0570c71b9cc82d41.css",
3842
- "styles/601b7a91a71eaf767d0d.css",
3843
- "styles/200bfeea3cbd7dce2b95.css",
3842
+ "styles/4531b8ff3407394b6664.css",
3843
+ "styles/35ffeb6941520c33adfe.css",
3844
3844
  "styles/aa3967ab6e1ea94a93bd.css",
3845
- "styles/94aa5ac955de9ed0d840.css"
3845
+ "styles/7000e7c66566b9102f8b.css"
3846
3846
  ]
3847
3847
  },
3848
3848
  "VsMarketoForm": {
@@ -4649,14 +4649,14 @@
4649
4649
  "scripts/c3b673fbfb24084ec12a.js",
4650
4650
  "scripts/ae5c80d270825f9d87fa.js",
4651
4651
  "scripts/d0fd50a5b063d113a609.js",
4652
- "scripts/3a1d3a02c238d41c9e68.js",
4652
+ "scripts/9f24f39f39375ad29408.js",
4653
4653
  "scripts/a909e086f67eace7ad31.js"
4654
4654
  ],
4655
4655
  "styles": [
4656
4656
  "styles/66b8a5d09a8317bd9092.css",
4657
4657
  "styles/ae5c80d270825f9d87fa.css",
4658
4658
  "styles/d0fd50a5b063d113a609.css",
4659
- "styles/3a1d3a02c238d41c9e68.css"
4659
+ "styles/9f24f39f39375ad29408.css"
4660
4660
  ]
4661
4661
  },
4662
4662
  "VsPageIntro": {
@@ -5190,7 +5190,7 @@
5190
5190
  "scripts/c3b673fbfb24084ec12a.js",
5191
5191
  "scripts/ae5c80d270825f9d87fa.js",
5192
5192
  "scripts/d0fd50a5b063d113a609.js",
5193
- "scripts/3a1d3a02c238d41c9e68.js",
5193
+ "scripts/9f24f39f39375ad29408.js",
5194
5194
  "scripts/c455e61a9f00f29a5b06.js"
5195
5195
  ],
5196
5196
  "styles": [
@@ -5199,7 +5199,7 @@
5199
5199
  "styles/66b8a5d09a8317bd9092.css",
5200
5200
  "styles/ae5c80d270825f9d87fa.css",
5201
5201
  "styles/d0fd50a5b063d113a609.css",
5202
- "styles/3a1d3a02c238d41c9e68.css",
5202
+ "styles/9f24f39f39375ad29408.css",
5203
5203
  "styles/c455e61a9f00f29a5b06.css"
5204
5204
  ]
5205
5205
  },
@@ -1 +1 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4143],{30628:function(){},94360:function(e,t,a){"use strict";var n=a(83918),r=a(73366),s=a(10282),i=a(61570),l=a(81674),o=a(14613),c=a(29848),u=a(16520),p=a(175),d=a(85834),g=null;t.Z={name:"VsMainMapWrapperPanel",status:"prototype",release:"0.0.1",components:{VsButton:n.default,VsMainMapWrapperCategory:l.default,VsMainMapWrapperSubcategory:o.default,VsHeading:r.default,VsMainMapWrapperListItem:c.default,VsMainMapWrapperDetail:u.default,VsMainMapWrapperButtons:p.default,VsMainMapWrapperControls:d.default},inject:["filters","placesData","regions","mapId","focussedListItem"],props:{categoryHeading:{type:String,default:""},headingLevel:{type:String,default:"2"},selectedCategory:{type:String,default:""},selectedSubcategory:{type:String,default:null},currentStage:{type:Number,required:!0},selectedItem:{type:String,default:""},hovered:{type:String,default:""},subcategoryLocations:{type:Array,default:null},currentEndpointData:{type:Array,default:function(){return[]}},panelStatus:{type:String,default:null},panelMessage:{type:String,default:null},totalPins:{type:Number,default:0},currentListItemFocus:{type:Number,default:0}},data:function(){return{placesLoaded:1}},computed:{currentHeading:function(){var e="";if(null!==this.selectedSubcategory)e=this.selectedSubcategoryData[0].label;else switch(this.currentStage){case 0:e=this.categoryHeading;break;case 1:case 2:e=this.currentFilter.label}return e},currentData:function(){return"regions"===this.selectedCategory?this.regions:this.placesData},panelClasses:function(){var e="";return 2===this.currentStage&&(e+=" vs-main-map-wrapper-panel--small-padding"),e},headerClasses:function(){return 1===this.currentStage?"vs-main-map-wrapper-panel__header-section--with-spacer":2===this.currentStage?"vs-main-map-wrapper-panel__header-section--overlapped":""},currentFilter:function(){var e=this,t="";return this.filters.forEach((function(a){a.id===e.selectedCategory&&(t=a)})),t},currentPlaceData:function(){var e=this,t=this.placesData;return"regions"===this.selectedCategory&&(t=this.regions),this.currentEndpointData.length>0?this.refineEndpointData(this.currentEndpointData):t.filter((function(t){return void 0!==t.properties&&t.properties.id===e.selectedItem}))},selectedSubcategoryData:function(){var e=this;return this.selectedSubcategory?this.filters.filter((function(t){return t.id===e.selectedSubcategory})):[]},subCatFilterCount:function(){return g?g.activeSubcatFilters.length:null},detailHeadingLevel:function(){return(parseInt(this.headingLevel,10)+1).toString()},showLoadMore:function(){return!(this.subcategoryLocations.length>=this.totalPins||0===this.subcategoryLocations.length)}},watch:{currentFilter:function(){this.placesLoaded=1}},mounted:function(){g=(0,i.Z)((0,s.Z)())},methods:{closePanel:function(){this.$emit("close-panel")},stageBack:function(){if(this.selectedSubcategory&&0===this.currentStage)this.$emit("set-subcategory",null);else if(null!==this.selectedSubcategory&&null===this.subcategoryLocations)this.setStage(0);else{var e=this.currentStage-1;this.setStage(e)}},resetPanel:function(){g.setSelectedSubcat(null),this.setStage(0)},setStage:function(e){0===e&&(this.placesLoaded=1),this.$emit("set-stage",e)},subCatExists:function(e){return void 0!==e.subCategory&&e.subCategory.length>0},refineEndpointData:function(e){var t=[{isEndpoint:!0,properties:{category:e[0].category[0].id,id:e[0].id,image:e[0].images[0].mediaUrl,placeTitle:e[0].name,description:e[0].description,link:{label:e[0].productLink.label,link:e[0].productLink.link,type:e[0].productLink.type},website:{label:e[0].website.label,link:e[0].website.link,type:e[0].website.type},address:{shortAddress:""}}}];return void 0!==e[0].address&&(t[0].properties.address.shortAddress=e[0].address.shortAddress),t},clearSubCatFilters:function(){g.setActiveSubcatFilters([]),this.setStage(0)},loadMorePlaces:function(){this.placesLoaded+=1,this.$emit("load-more-places",this.placesLoaded)}}}},62998:function(e,t,a){"use strict";a.d(t,{s:function(){return f}});var n=a(66252),r=a(3577),s=a(49963),i={key:0,class:"vs-main-map-wrapper-panel__back"},l={class:"sr-only"},o={class:"vs-main-map-wrapper-panel__close d-lg-none"},c={class:"sr-only"},u={class:"sr-only"},p={key:2,class:"vs-main-map-wrapper-panel__bottom-message"},d={class:"vs-main-map-wrapper-panel__list-container"},g={key:3,class:"vs-main-map-wrapper-panel__overlay"},m={key:0,class:"vs-main-map-wrapper-panel__overlay-box"},y={class:"vs-main-map-wrapper-panel__overlay-text"};function f(e,t,a,f,h,v){var b=(0,n.up)("VsButton"),w=(0,n.up)("VsHeading"),S=(0,n.up)("VsMainMapWrapperSubcategory"),k=(0,n.up)("VsMainMapWrapperControls"),_=(0,n.up)("VsMainMapWrapperCategory"),C=(0,n.up)("VsMainMapWrapperListItem"),D=(0,n.up)("VsMainMapWrapperButtons"),M=(0,n.up)("VsMainMapWrapperDetail");return(0,n.wg)(),(0,n.iD)("section",{"data-test":"vs-main-map-wrapper-panel",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel",v.panelClasses])},[(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__header-section",v.headerClasses])},[a.currentStage>0||a.selectedSubcategory?((0,n.wg)(),(0,n.iD)("div",i,[(0,n.Wm)(b,{"icon-only":"",icon:"internal-link","icon-orientation":"down",size:"md",variant:"secondary",onClick:v.stageBack,"data-test":"vs-main-map-wrapper-panel--btn-back"},{default:(0,n.w5)((function(){return[(0,n._)("span",l,[(0,n.WI)(e.$slots,"back-btn-text")])]})),_:3},8,["onClick"])])):(0,n.kq)("",!0),""!==v.currentHeading?((0,n.wg)(),(0,n.j4)(w,{key:1,level:a.headingLevel,"override-style-level":"4",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__heading text-center mt-0",2===a.currentStage?"d-none d-lg-block":""]),"data-test":"vs-main-map-wrapper-panel__heading"},{default:(0,n.w5)((function(){return[(0,n.Uk)((0,r.toDisplayString)(v.currentHeading),1)]})),_:1},8,["level","class"])):(0,n.kq)("",!0),(0,n._)("div",o,[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.closePanel,"data-test":"vs-main-map-wrapper-panel--btn-close"},{default:(0,n.w5)((function(){return[(0,n._)("span",c,[(0,n.WI)(e.$slots,"close-side-panel-text")])]})),_:3},8,["onClick"])]),(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__reset",a.currentStage<2?"d-lg-none":""])},[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.resetPanel,"data-test":"vs-main-map-wrapper-panel--btn-reset"},{default:(0,n.w5)((function(){return[(0,n._)("span",u,[(0,n.WI)(e.$slots,"reset-side-panel-text")])]})),_:3},8,["onClick"])],2)],2),0===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Wm)(S,{data:v.selectedSubcategoryData[0].subCategory,selectedSubCategory:a.selectedSubcategory},null,8,["data","selectedSubCategory"]),(0,n.Wm)(k)],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.filters,(function(e){return(0,n.wg)(),(0,n.j4)(_,{key:e.id,"category-name":e.label,type:e.id,"has-sub-cat":v.subCatExists(e)},null,8,["category-name","type","has-sub-cat"])})),128)),null!==a.panelMessage?((0,n.wg)(),(0,n.iD)("div",p,[(0,n._)("p",null,(0,r.toDisplayString)(a.panelMessage),1)])):(0,n.kq)("",!0)],64)):(0,n.kq)("",!0),1===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n._)("div",d,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.subcategoryLocations,(function(t,r){return(0,n.wg)(),(0,n.j4)(C,{key:t.id,"item-data":t,"from-endpoint":!0,focussed:r===a.currentListItemFocus,onShowItemDetail:function(a){return e.showDetail(t.id)}},null,8,["item-data","focussed","onShowItemDetail"])})),128)),v.showLoadMore?((0,n.wg)(),(0,n.j4)(b,{key:0,class:"vs-main-map-wrapper-panel__load-more","data-test":"vs-main-map-wrapper-panel__load-more",onClick:t[0]||(t[0]=function(e){return v.loadMorePlaces()}),onKeyup:t[1]||(t[1]=(0,s.withKeys)((function(e){return v.loadMorePlaces()}),["enter"]))},{default:(0,n.w5)((function(){return[(0,n.WI)(e.$slots,"load-more-text")]})),_:3})):(0,n.kq)("",!0)]),(0,n.Wm)(D,{"content-data":{},"filter-count":v.subCatFilterCount,onClearFilters:v.clearSubCatFilters},null,8,["filter-count","onClearFilters"])],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.currentData,(function(t){return(0,n.wg)(),(0,n.iD)("div",{key:t.id},[void 0!==t.properties&&t.properties.category.id===a.selectedCategory?((0,n.wg)(),(0,n.j4)(C,{key:0,"item-data":t.properties,onShowItemDetail:function(a){return e.showDetail(t.properties.id)}},null,8,["item-data","onShowItemDetail"])):(0,n.kq)("",!0)])})),128))],64)):(0,n.kq)("",!0),2===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:2},[(0,n.Wm)(M,{"heading-level":v.detailHeadingLevel,"content-data":v.currentPlaceData[0]},null,8,["heading-level","content-data"]),(0,n.Wm)(D,{"content-data":v.currentPlaceData[0]},null,8,["content-data"])],64)):(0,n.kq)("",!0),null!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",g,[e.$slots["panel-loading-message"]&&"map-loading"!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("p",y,[(0,n.WI)(e.$slots,"panel-loading-message")])])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)],2)}},12631:function(e,t,a){"use strict";var n=a(93379),r=a.n(n),s=a(7795),i=a.n(s),l=a(90569),o=a.n(l),c=a(3565),u=a.n(c),p=a(19216),d=a.n(p),g=a(44589),m=a.n(g),y=a(30628),f=a.n(y),h={};h.styleTagTransform=m(),h.setAttributes=u(),h.insert=o().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=d(),r()(f(),h),f()&&f().locals&&f().locals},84143:function(e,t,a){"use strict";a.r(t);var n=a(67771),r=a(97794);a(90053);const s=(0,a(83744).Z)(r.Z,[["render",n.s]]);t.default=s},97794:function(e,t,a){"use strict";a.d(t,{Z:function(){return n.Z}});var n=a(94360)},67771:function(e,t,a){"use strict";a.d(t,{s:function(){return n.s}});var n=a(62998)},90053:function(e,t,a){"use strict";a(12631)}}]);
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4143],{68748:function(){},94360:function(e,t,a){"use strict";var n=a(83918),r=a(73366),s=a(10282),i=a(61570),l=a(81674),o=a(14613),c=a(29848),u=a(16520),p=a(175),d=a(85834),g=null;t.Z={name:"VsMainMapWrapperPanel",status:"prototype",release:"0.0.1",components:{VsButton:n.default,VsMainMapWrapperCategory:l.default,VsMainMapWrapperSubcategory:o.default,VsHeading:r.default,VsMainMapWrapperListItem:c.default,VsMainMapWrapperDetail:u.default,VsMainMapWrapperButtons:p.default,VsMainMapWrapperControls:d.default},inject:["filters","placesData","regions","mapId","focussedListItem"],props:{categoryHeading:{type:String,default:""},headingLevel:{type:String,default:"2"},selectedCategory:{type:String,default:""},selectedSubcategory:{type:String,default:null},currentStage:{type:Number,required:!0},selectedItem:{type:String,default:""},hovered:{type:String,default:""},subcategoryLocations:{type:Array,default:null},currentEndpointData:{type:Array,default:function(){return[]}},panelStatus:{type:String,default:null},panelMessage:{type:String,default:null},totalPins:{type:Number,default:0},currentListItemFocus:{type:Number,default:0}},data:function(){return{placesLoaded:1}},computed:{currentHeading:function(){var e="";if(null!==this.selectedSubcategory)e=this.selectedSubcategoryData[0].label;else switch(this.currentStage){case 0:e=this.categoryHeading;break;case 1:case 2:e=this.currentFilter.label}return e},currentData:function(){return"regions"===this.selectedCategory?this.regions:this.placesData},panelClasses:function(){var e="";return 2===this.currentStage&&(e+=" vs-main-map-wrapper-panel--small-padding"),e},headerClasses:function(){return 1===this.currentStage?"vs-main-map-wrapper-panel__header-section--with-spacer":2===this.currentStage?"vs-main-map-wrapper-panel__header-section--overlapped":""},currentFilter:function(){var e=this,t="";return this.filters.forEach((function(a){a.id===e.selectedCategory&&(t=a)})),t},currentPlaceData:function(){var e=this,t=this.placesData;return"regions"===this.selectedCategory&&(t=this.regions),this.currentEndpointData.length>0?this.refineEndpointData(this.currentEndpointData):t.filter((function(t){return void 0!==t.properties&&t.properties.id===e.selectedItem}))},selectedSubcategoryData:function(){var e=this;return this.selectedSubcategory?this.filters.filter((function(t){return t.id===e.selectedSubcategory})):[]},subCatFilterCount:function(){return g?g.activeSubcatFilters.length:null},detailHeadingLevel:function(){return(parseInt(this.headingLevel,10)+1).toString()},showLoadMore:function(){return!(this.subcategoryLocations.length>=this.totalPins||0===this.subcategoryLocations.length)}},watch:{currentFilter:function(){this.placesLoaded=1}},mounted:function(){g=(0,i.Z)((0,s.Z)())},methods:{closePanel:function(){this.$emit("close-panel")},stageBack:function(){if(this.selectedSubcategory&&0===this.currentStage)this.$emit("set-subcategory",null);else if(null!==this.selectedSubcategory&&null===this.subcategoryLocations)this.setStage(0);else{var e=this.currentStage-1;this.setStage(e)}},resetPanel:function(){g.setSelectedSubcat(null),this.setStage(0)},setStage:function(e){0===e&&(this.placesLoaded=1),this.$emit("set-stage",e)},subCatExists:function(e){return void 0!==e.subCategory&&e.subCategory.length>0},refineEndpointData:function(e){var t=[{isEndpoint:!0,properties:{category:e[0].category[0].id,id:e[0].id,image:e[0].images[0].mediaUrl,placeTitle:e[0].name,description:e[0].description,link:{label:e[0].productLink.label,link:e[0].productLink.link,type:e[0].productLink.type},website:{label:e[0].website.label,link:e[0].website.link,type:e[0].website.type},address:{shortAddress:""}}}];return void 0!==e[0].address&&(t[0].properties.address.shortAddress=e[0].address.shortAddress),t},clearSubCatFilters:function(){g.setActiveSubcatFilters([]),this.setStage(0)},loadMorePlaces:function(){this.placesLoaded+=1,this.$emit("load-more-places",this.placesLoaded)}}}},11257:function(e,t,a){"use strict";a.d(t,{s:function(){return f}});var n=a(66252),r=a(3577),s=a(49963),i={key:0,class:"vs-main-map-wrapper-panel__back"},l={class:"sr-only"},o={class:"vs-main-map-wrapper-panel__close d-lg-none"},c={class:"sr-only"},u={class:"sr-only"},p={key:2,class:"vs-main-map-wrapper-panel__bottom-message"},d={class:"vs-main-map-wrapper-panel__list-container"},g={key:3,class:"vs-main-map-wrapper-panel__overlay"},m={key:0,class:"vs-main-map-wrapper-panel__overlay-box"},y={class:"vs-main-map-wrapper-panel__overlay-text"};function f(e,t,a,f,h,v){var b=(0,n.up)("VsButton"),w=(0,n.up)("VsHeading"),S=(0,n.up)("VsMainMapWrapperSubcategory"),k=(0,n.up)("VsMainMapWrapperControls"),_=(0,n.up)("VsMainMapWrapperCategory"),C=(0,n.up)("VsMainMapWrapperListItem"),D=(0,n.up)("VsMainMapWrapperButtons"),M=(0,n.up)("VsMainMapWrapperDetail");return(0,n.wg)(),(0,n.iD)("section",{"data-test":"vs-main-map-wrapper-panel",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel",v.panelClasses])},[(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__header-section",v.headerClasses])},[a.currentStage>0||a.selectedSubcategory?((0,n.wg)(),(0,n.iD)("div",i,[(0,n.Wm)(b,{"icon-only":"",icon:"internal-link","icon-orientation":"down",size:"md",variant:"secondary",onClick:v.stageBack,"data-test":"vs-main-map-wrapper-panel--btn-back"},{default:(0,n.w5)((function(){return[(0,n._)("span",l,[(0,n.WI)(e.$slots,"back-btn-text")])]})),_:3},8,["onClick"])])):(0,n.kq)("",!0),""!==v.currentHeading?((0,n.wg)(),(0,n.j4)(w,{key:1,level:a.headingLevel,"override-style-level":"4",class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__heading text-center mt-0",2===a.currentStage?"d-none d-lg-block":""]),"data-test":"vs-main-map-wrapper-panel__heading"},{default:(0,n.w5)((function(){return[(0,n.Uk)((0,r.toDisplayString)(v.currentHeading),1)]})),_:1},8,["level","class"])):(0,n.kq)("",!0),(0,n._)("div",o,[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.closePanel,"data-test":"vs-main-map-wrapper-panel--btn-close"},{default:(0,n.w5)((function(){return[(0,n._)("span",c,[(0,n.WI)(e.$slots,"close-side-panel-text")])]})),_:3},8,["onClick"])]),(0,n._)("div",{class:(0,r.normalizeClass)(["vs-main-map-wrapper-panel__reset",a.currentStage<2?"d-lg-none":""])},[(0,n.Wm)(b,{"icon-only":"",icon:"close",size:"md",variant:"secondary",onClick:v.resetPanel,"data-test":"vs-main-map-wrapper-panel--btn-reset"},{default:(0,n.w5)((function(){return[(0,n._)("span",u,[(0,n.WI)(e.$slots,"reset-side-panel-text")])]})),_:3},8,["onClick"])],2)],2),0===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n.Wm)(S,{data:v.selectedSubcategoryData[0].subCategory,selectedSubCategory:a.selectedSubcategory},null,8,["data","selectedSubCategory"]),(0,n.Wm)(k)],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.filters,(function(e){return(0,n.wg)(),(0,n.j4)(_,{key:e.id,"category-name":e.label,type:e.id,"has-sub-cat":v.subCatExists(e)},null,8,["category-name","type","has-sub-cat"])})),128)),null!==a.panelMessage?((0,n.wg)(),(0,n.iD)("div",p,[(0,n._)("p",null,(0,r.toDisplayString)(a.panelMessage),1)])):(0,n.kq)("",!0)],64)):(0,n.kq)("",!0),1===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:1},[null!==a.selectedSubcategory?((0,n.wg)(),(0,n.iD)(n.HY,{key:0},[(0,n._)("div",d,[((0,n.wg)(!0),(0,n.iD)(n.HY,null,(0,n.Ko)(a.subcategoryLocations,(function(t,r){return(0,n.wg)(),(0,n.j4)(C,{key:t.id,"item-data":t,"from-endpoint":!0,focussed:r===a.currentListItemFocus,onShowItemDetail:function(a){return e.showDetail(t.id)}},null,8,["item-data","focussed","onShowItemDetail"])})),128)),v.showLoadMore?((0,n.wg)(),(0,n.j4)(b,{key:0,class:"vs-main-map-wrapper-panel__load-more","data-test":"vs-main-map-wrapper-panel__load-more",onClick:t[0]||(t[0]=function(e){return v.loadMorePlaces()}),onKeyup:t[1]||(t[1]=(0,s.withKeys)((function(e){return v.loadMorePlaces()}),["enter"]))},{default:(0,n.w5)((function(){return[(0,n.WI)(e.$slots,"load-more-text")]})),_:3})):(0,n.kq)("",!0)]),(0,n.Wm)(D,{"content-data":{},"filter-count":v.subCatFilterCount,onClearFilters:v.clearSubCatFilters},null,8,["filter-count","onClearFilters"])],64)):((0,n.wg)(!0),(0,n.iD)(n.HY,{key:1},(0,n.Ko)(v.currentData,(function(t){return(0,n.wg)(),(0,n.iD)("div",{key:t.id},[void 0!==t.properties&&t.properties.category.id===a.selectedCategory?((0,n.wg)(),(0,n.j4)(C,{key:0,"item-data":t.properties,onShowItemDetail:function(a){return e.showDetail(t.properties.id)}},null,8,["item-data","onShowItemDetail"])):(0,n.kq)("",!0)])})),128))],64)):(0,n.kq)("",!0),2===a.currentStage?((0,n.wg)(),(0,n.iD)(n.HY,{key:2},[(0,n.Wm)(M,{"heading-level":v.detailHeadingLevel,"content-data":v.currentPlaceData[0]},null,8,["heading-level","content-data"]),(0,n.Wm)(D,{"content-data":v.currentPlaceData[0]},null,8,["content-data"])],64)):(0,n.kq)("",!0),null!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",g,[e.$slots["panel-loading-message"]&&"map-loading"!==a.panelStatus?((0,n.wg)(),(0,n.iD)("div",m,[(0,n._)("p",y,[(0,n.WI)(e.$slots,"panel-loading-message")])])):(0,n.kq)("",!0)])):(0,n.kq)("",!0)],2)}},42167:function(e,t,a){"use strict";var n=a(93379),r=a.n(n),s=a(7795),i=a.n(s),l=a(90569),o=a.n(l),c=a(3565),u=a.n(c),p=a(19216),d=a.n(p),g=a(44589),m=a.n(g),y=a(68748),f=a.n(y),h={};h.styleTagTransform=m(),h.setAttributes=u(),h.insert=o().bind(null,"head"),h.domAPI=i(),h.insertStyleElement=d(),r()(f(),h),f()&&f().locals&&f().locals},84143:function(e,t,a){"use strict";a.r(t);var n=a(43420),r=a(97794);a(36949);const s=(0,a(83744).Z)(r.Z,[["render",n.s]]);t.default=s},97794:function(e,t,a){"use strict";a.d(t,{Z:function(){return n.Z}});var n=a(94360)},43420:function(e,t,a){"use strict";a.d(t,{s:function(){return n.s}});var n=a(11257)},36949:function(e,t,a){"use strict";a(42167)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4169],{72776:function(){},35097:function(e,t,o){"use strict";var a=o(22048),s=o(16145),i=o(83709),n=o(66252),r=o(49963),p=o(10282),d=o(61570),l=o(6158),u=o.n(l),m=o(29319),c=o.n(m),h=o(24173),g=null;t.Z={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},fitToMarkers:{type:Boolean,default:!1},showPolygons:{type:Boolean,default:!1},selectedItem:{type:String,default:null},boundsData:{type:Object,default:function(){}},showInfoMessage:{type:Boolean,default:null},resetZoom:{type:Boolean,default:!1}},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:{getZoom:function(){return this.mapbox.map?this.mapbox.map.getZoom():null},highlightedPlace:function(){return this.mapbox.map?g.getHoveredStop(this.mapId):""},activeMarkerPostion:function(){return this.mapbox.map?g.activeMarkerPos:null}},watch:{isVisible:function(e){var t=this;e&&null!==this.mapbox.map&&setTimeout((function(){t.mapbox.map.resize()}),20)},places:{handler:function(){this.geojsonData.features=[],this.addMapFeatures(),this.addMapMarkers()},deep:!0},showPolygons:function(e){!0===e?this.showMapPolygons():this.hideMapPolygons()},highlightedPlace:function(e){0===e.length?this.removeHoveredPolygon():this.addHoveredPolygon(e)},selectedItem:function(e){var t=this.polygons.features.filter((function(t){return t.properties.id===e}));e?t.length>0&&this.addActivePolygon(e):this.removeActivePolygon()},activeMarkerPostion:function(e){this.checkPointIsVisible(e)||this.centreMapOnPoint(e)},showInfoMessage:function(e){this.showMapMessage=!!e},resetZoom:function(e){e&&(this.mapbox.map.fitBounds(this.calculateBoundingBox()),this.$emit("zoom-reset"),this.showInfoMessage&&(this.showMapMessage=!0))}},mounted:function(){var e=this;g=(0,d.Z)((0,p.Z)()),this.lazyloadMapComponent(),this.isTablet=window.innerWidth>=768,window.addEventListener("resize",this.onResize),window.addEventListener("DOMContentLoaded",(function(){i.Z.init({div:e.mapId})}))},methods:{addMap:function(){var e=this,t=this.calculateBoundingBox();this.mapbox.config.container=this.$refs.mapbox,this.mapbox.map=new(u().Map)({container:this.$refs.mapbox,style:"https://api.visitscotland.com/maps/vector/v1/vts/resources/styles",bounds:t,maxZoom:18,minZoom:4,trackResize:!0}),this.mapbox.map.scrollZoom.disable(),this.mapbox.map.on("rotate",(function(){e.mapbox.rotation=e.mapbox.map.transform.angle})),this.mapbox.map.resize(),this.mapbox.map.on("load",(function(){e.addMapPolygons(),e.showMapMessage=!1,e.isLoading=!1,e.$emit("map-ready",!0),e.mapbox.map.boxZoom.enable()})),this.mapbox.map.on("zoomend",(function(){4===e.mapbox.map.getZoom()?(e.showZoomMessage="too-far",e.showMapMessage=!0):18===e.mapbox.map.getZoom()?(e.showZoomMessage="too-close",e.showMapMessage=!0):e.showInfoMessage||(e.showZoomMessage=null,e.showMapMessage=!1)}))},addMapControls:function(){var e=new(u().NavigationControl);this.mapbox.map.addControl(e,"top-right"),this.mapbox.map.addControl(new(u().FullscreenControl))},addMapFeatures:function(){var e=this;this.places.map((function(t){if(void 0!==t.geometry){var o=[t.geometry.coordinates[0],t.geometry.coordinates[1]];return"Polygon"===t.geometry.type&&(o=[t.geometry.coordinates[0]]),"MultiPolygon"===t.geometry.type&&(o=[t.geometry.coordinates]),e.geojsonData.features.push({type:"Feature",geometry:{type:t.geometry.type,coordinates:o},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})}return!1}))},addMapMarkers:function(){var e=this,t=0;this.initialLoad&&(t=1e3),setTimeout((function(){if(null!==e.markers){for(var t=e.markers.length-1;t>=0;t--)e.markers[t].remove();e.markers=[]}e.geojsonData.features.forEach((function(t){if("Point"===t.geometry.type){var o=(0,n.h)(h.default,{feature:t,mapId:e.mapId,onShowDetail:function(t){e.$emit("showDetail",t)},onSetCategory:function(t){e.$emit("setCategory",t)}}),a=document.createElement("div");e.$refs.mapboxOuter.appendChild(a),(0,r.render)(o,a);var s=new(u().Marker)(a.children[0]).setLngLat(t.geometry.coordinates).addTo(e.mapbox.map);e.markers.push(s),a.remove()}}))}),t)},hideMapPolygons:function(){this.mapbox.map.setLayoutProperty("regions-fills","visibility","none"),this.mapbox.map.setLayoutProperty("regions-borders","visibility","none")},showMapPolygons:function(){this.mapbox.map.setLayoutProperty("regions-fills","visibility","visible"),this.mapbox.map.setLayoutProperty("regions-borders","visibility","visible")},addMapPolygons:function(){var e=this;this.geojsonData.features.forEach((function(t){"Polygon"===t.geometry.type?e.polygons.features.includes(t.properties.id)||e.polygons.features.push(t):"MultiPolygon"===t.geometry.type&&(e.polygons.features.includes(t.properties.id)||e.multiPolygons.push(t))})),this.multiPolygons.forEach((function(t){var o=t.properties;t.geometry.coordinates[0].forEach((function(t){e.polygons.features.push({geometry:{type:"Polygon",coordinates:t},id:o.id,properties:{id:o.id,imageSrc:o.imageSrc,title:o.title,type:o.type},type:"Feature"})}))})),this.mapbox.map.addSource("regions",{type:"geojson",data:this.polygons,promoteId:"id"}),this.mapbox.map.addLayer({id:"regions-fills",type:"fill",source:"regions",layout:{},paint:{"fill-color":["case",["==",["feature-state","interaction-state"],"hover"],"rgba(173,14,110,0.698)",["==",["feature-state","interaction-state"],"active"],"rgba(173,14,110,0.533)","#A5A5A5"],"fill-opacity":.8}}),this.mapbox.map.addLayer({id:"regions-borders",type:"line",source:"regions",layout:{},paint:{"line-color":"#fff","line-width":1}}),this.hideMapPolygons(),this.mapbox.map.on("mousemove","regions-fills",(function(t){t.features.length>0&&(e.addMapPopup(t),e.removeHoveredPolygon(),e.addHoveredPolygon(t.features[0].id))})),this.mapbox.map.on("mouseleave","regions-fills",(function(){e.removeMapPopup(),e.removeHoveredPolygon()})),this.mapbox.map.on("click","regions-fills",(function(t){e.removeActivePolygon(),e.addActivePolygon(t.features[0].id)}))},removeActivePolygon:function(){this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":""}),this.activeStateId=null},addActivePolygon:function(e){this.activeStateId=e,this.mapbox.map.setFeatureState({source:"regions",id:this.activeStateId},{"interaction-state":"active"}),g.setActivePlace({mapId:this.mapId,placeId:e}),this.$emit("showDetail",e),this.$emit("setCategory","regions")},removeHoveredPolygon:function(){if(this.hoveredStateId){var e="";this.hoveredStateId===this.activeStateId&&(e="active"),this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":e})}g.setHoveredPlace({mapId:this.mapId,hoveredId:""}),this.hoveredStateId=null},addHoveredPolygon:function(e){this.hoveredStateId=e,this.mapbox.map.setFeatureState({source:"regions",id:this.hoveredStateId},{"interaction-state":"hover"}),g.setHoveredPlace({mapId:this.mapId,hoveredId:e})},addMapPopup:function(e){var t,o,a,s=this,i=function e(t){"Escape"===t.key&&(s.removeMapPopup(),document.body.removeEventListener("keyup",e))},n=(t=e.features[0].geometry.coordinates,o=[],a=[],t[0].forEach((function(e){o.push(e[1]),a.push(e[0])})),{lat:(Math.min.apply(Math,o)+Math.max.apply(Math,o))/2,lng:(Math.min.apply(Math,a)+Math.max.apply(Math,a))/2});e.features[0].id!==this.hoveredStateId&&e.features[0].id!==this.activeStateId&&(this.removeMapPopup(),document.body.removeEventListener("keyup",i),this.popup=(new(u().Popup)).setLngLat(n).setHTML(e.features[0].properties.title).addTo(this.mapbox.map)),document.body.addEventListener("keyup",i)},removeMapPopup:function(){this.popup&&(this.popup.remove(),this.popup=null)},fitToBounds:function(){this.mapbox.map.fitBounds(c()(this.geojsonData),{padding:{top:100,bottom:100,left:100,right:100}})},initialiseMapComponent:function(){this.addMap(),this.addMapControls(),this.places.length&&this.addMapFeatures(),this.geojsonData.features.length&&(this.addMapMarkers(),this.fitToMarkers&&this.fitToBounds())},lazyloadMapComponent:function(){var e=this;u().supported({failIfMajorPerformanceCaveat:!0}),"IntersectionObserver"in window?(this.observer=new IntersectionObserver((function(t){t[0].intersectionRatio>0&&(e.observer.unobserve(e.$el),e.initialiseMapComponent())})),this.observer.observe(this.$el)):this.initialiseMapComponent()},onResize:function(){this.isTablet=window.innerWidth>=768},getBoundsFromPolygon:function(){var e=this.boundsData.coordinates[0];return e.reduce((function(e,t){return e.extend(t)}),new(u().LngLatBounds)(e[0],e[0]))},checkPointIsVisible:function(){return this.mapbox.map.getBounds().contains(this.activeMarkerPostion)},centreMapOnPoint:function(e){this.mapbox.map.flyTo({center:e})},calculateBoundingBox:function(){var e;if(void 0===this.boundsData||"undefined"===this.boundsData.type)e=[[-7.555827,55.308836],[-.778285,60.830894]];else if("bounds"===this.boundsData.type){var t=new(u().LngLat)(this.boundsData.coordinates[1][0],this.boundsData.coordinates[1][1]),o=new(u().LngLat)(this.boundsData.coordinates[0][0],this.boundsData.coordinates[0][1]);e=new(u().LngLatBounds)(t,o)}else e="Polygon"===this.boundsData.type?this.getBoundsFromPolygon():[[-7.555827,55.308836],[-.778285,60.830894]];return e}}}},39376:function(e,t,o){"use strict";o.d(t,{s:function(){return l}});var a=o(66252),s=o(3577),i={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"},d=["id"];function l(e,t,o,l,u,m){var c=(0,a.up)("VsLoading"),h=(0,a.up)("VsWarning");return(0,a.wg)(),(0,a.iD)("div",i,[u.showMapMessage?((0,a.wg)(),(0,a.iD)("div",{key:0,class:(0,s.normalizeClass)(["vs-map__message",u.showZoomMessage?"":"vs-map__message--with-overlay"]),"data-test":"vs-map__message"},[(0,a._)("div",n,[u.isLoading?((0,a.wg)(),(0,a.j4)(c,{key:0,class:"vs-map__loading"})):(0,a.kq)("",!0),(0,a._)("p",r,[u.isLoading?(0,a.WI)(e.$slots,"map-loading-text",{key:0}):o.showInfoMessage?(0,a.WI)(e.$slots,"info-message",{key:1}):"too-close"===u.showZoomMessage?(0,a.WI)(e.$slots,"zoom-too-close",{key:2}):"too-far"===u.showZoomMessage?(0,a.WI)(e.$slots,"zoom-too-far",{key:3}):(0,a.kq)("",!0)])])],2)):(0,a.kq)("",!0),(0,a._)("div",p,[(0,a._)("div",{id:o.mapId,class:"vs-map__map",ref:"mapbox"},null,8,d)],512),(0,a.Wm)(h,{class:"vs-map__no-js"},{default:(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"no-js")]})),_:3})])}},44486:function(e,t,o){"use strict";var a=o(93379),s=o.n(a),i=o(7795),n=o.n(i),r=o(90569),p=o.n(r),d=o(3565),l=o.n(d),u=o(19216),m=o.n(u),c=o(44589),h=o.n(c),g=o(72776),f=o.n(g),v={};v.styleTagTransform=h(),v.setAttributes=l(),v.insert=p().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=m(),s()(f(),v),f()&&f().locals&&f().locals},14169:function(e,t,o){"use strict";o.r(t);var a=o(88687),s=o(88348);o(28627);const i=(0,o(83744).Z)(s.Z,[["render",a.s]]);t.default=i},88348:function(e,t,o){"use strict";o.d(t,{Z:function(){return a.Z}});var a=o(35097)},88687:function(e,t,o){"use strict";o.d(t,{s:function(){return a.s}});var a=o(39376)},28627:function(e,t,o){"use strict";o(44486)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[6573],{42603:function(){},14181:function(e,a,n){"use strict";var r=n(17370),s=n(42671);a.Z={name:"VsMainMapWrapperIcon",status:"prototype",release:"0.0.1",components:{VsIcon:r.default},mixins:[s.Z],props:{id:{type:String,required:!0},isHovered:{type:Boolean,default:!1},isMapMarker:{type:Boolean,default:!1}},computed:{mapMarkerType:function(){var e="map-marker-filled";return"twnv"===this.id&&(e="places-map-pin"),e},parentClasses:function(){return this.isMapMarker?"vs-main-map-marker-icon--map-marker":""},markerClasses:function(){return["vs-main-map-marker-icon__marker--".concat(this.id),this.isHovered?"vs-main-map-marker-icon__marker--outline":""]}}}},89515:function(e,a,n){"use strict";n.d(a,{s:function(){return t}});var r=n(66252),s=n(3577);function t(e,a,n,t,i,c){var o=(0,r.up)("VsIcon");return(0,r.wg)(),(0,r.iD)("div",{"data-test":"vs-main-map-marker-icon",class:(0,s.normalizeClass)(["vs-main-map-marker-icon",c.parentClasses])},[(0,r.Wm)(o,{name:c.mapMarkerType,class:(0,s.normalizeClass)(["vs-main-map-marker-icon__marker",c.markerClasses])},null,8,["name","class"]),(0,r.Wm)(o,{class:"vs-main-map-marker-icon__icon",name:e.getIconDetails(n.id).name,size:"xxs",variant:"color-white"},null,8,["name"])],2)}},42671:function(e,a){"use strict";a.Z={methods:{getIconDetails:function(e){var a={};switch(e){case"cities":case"outlander-city-town-village":a.name="city";break;case"towns":a.name="home";break;case"islands":a.name="boat";break;case"regions":a.name="map";break;case"acco":a.name="bed";break;case"acti":a.name="walk";break;case"attr":a.name="camera";break;case"even":a.name="events";break;case"cate":a.name="food";break;case"reta":a.name="shopping-bag";break;case"featured":a.name="star";break;case"twnv":a.name="";break;case"serv":a.name="icentre-information";break;case"outlander-castle":a.name="castle";break;case"outlander-church-abbey":a.name="church";break;case"outlander-heritage":a.name="history";break;case"outlander-landscape-park":a.name="landscape";break;case"outlander-palace-house":a.name="palace";break;case"distilleries":a.name="distillery"}return a}}}},61312:function(e,a,n){"use strict";var r=n(93379),s=n.n(r),t=n(7795),i=n.n(t),c=n(90569),o=n.n(c),m=n(3565),l=n.n(m),u=n(19216),p=n.n(u),k=n(44589),d=n.n(k),b=n(42603),v=n.n(b),f={};f.styleTagTransform=d(),f.setAttributes=l(),f.insert=o().bind(null,"head"),f.domAPI=i(),f.insertStyleElement=p(),s()(v(),f),v()&&v().locals&&v().locals},26573:function(e,a,n){"use strict";n.r(a);var r=n(89515),s=n(44357);n(71049);const t=(0,n(83744).Z)(s.Z,[["render",r.s]]);a.default=t},44357:function(e,a,n){"use strict";n.d(a,{Z:function(){return r.Z}});var r=n(14181)},71049:function(e,a,n){"use strict";n(61312)}}]);
@@ -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.VsMainMapWrapper=t():e.VsMainMapWrapper=t()}(self,(function(){return(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[4373],{68333:function(){},38822:function(e,t,s){"use strict";var a=s(81779),n=s(83918),i=s(22048),o=s(98869),l=s(5274),r=s(10282),u=s(61570),c=s(14169),p=s(84143),d=null;t.Z={name:"VsMainMapWrapper",status:"prototype",release:"0.0.1",components:{VsContainer:a.xB,VsRow:a.ou,VsCol:a.hY,VsMap:c.default,VsButton:n.default,VsMainMapWrapperPanel:p.default,VsButtonToggleGroup:o.default,VsWarning:i.default},provide:function(){return{filters:this.filters,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}},data:function(){return{panelVisible:!1,selectedCategory:"",filterCategories:this.filters,selectedItem:"",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:{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(e){return"Polygon"===e.geometry.type||"MultiPolygon"===e.geometry.type}))},subCatActiveFilters:function(){return d?d.activeSubcatFilters:null},infoMessage:function(){var e="";switch(this.mapStatus){case"no-results":e=this.mapNoResultsMessage;break;case"filter-results":e=this.mapFilterMessage}return e}},watch:{selectedSubCategory:function(e){null===e&&(this.mapStatus="",this.resetZoom=!0)}},mounted:function(){var e=this;d=(0,u.Z)((0,r.Z)()),this.selectedToggle=this.initialSelected,d.addMapInstance({id:this.mapId,filters:this.filters,places:this.placesData,activePins:this.activePins}),this.emitter&&this.emitter.on("clearSelectedSubcats",(function(){e.resetZoom=!0}))},methods:{closePanel:function(){this.panelVisible=!1},openPanel:function(){this.panelVisible=!0},showDetail:function(e){document.fullscreenElement&&document.exitFullscreen(),this.selectedItem=e,this.setStage(2),this.openPanel(),null===this.selectedSubCategory&&this.filterPlaces(this.selectedCategory)},setCategory:function(e){this.selectedCategory=e,null===this.selectedSubCategory&&this.filterPlaces(e)},setSubCategory:function(e){d.setSelectedSubcat(e),this.selectedSubCategory=e,null!==e?(this.getSubcatMarkerData(),this.selectedCategory=e):(d.setActiveSubcatFilters([]),this.showAllPlaces())},filterSubCategories:function(e){var t="";e.forEach((function(e){var s="&cat=".concat(e);t+=s})),this.currentPanelEndpointFilters=t,this.getSubcatMarkerData(t),this.getSubcatPanelData(t,0)},getSubcatMarkerData:function(e){var t=this,s=this.filters.filter((function(e){return e.id===t.selectedSubCategory}));if(s.length>0){var a=s[0].pinsEndpoint;void 0!==e&&(a+=e),this.activePins=[],void 0===e?(this.activePins=[],this.mapStatus="filter-results"):l.Z.get(a).then((function(e){t.totalEndpointPins=e.data.features.length,0===t.totalEndpointPins?t.mapStatus="no-results":(e.data.features.forEach((function(e){var s=e;s.properties.apiData=!0,t.activePins.push(s)})),t.mapStatus="")}))}},getSubcatPanelData:function(e,t){var s=this,a=this.filters.filter((function(e){return e.id===s.selectedSubCategory}))[0].listProductsEndPoint;void 0!==e&&(a+=e),0!==t&&(a+="".concat(e,"&page=").concat(t)),this.panelStatus="loading-data",l.Z.get(a).then((function(e){void 0!==e.data.data.products?(s.setStage(1),0===t?(s.subCatList=e.data.data.products,s.focussedListItem=0):(s.focussedListItem=24*t,s.subCatList=s.subCatList.concat(e.data.data.products))):s.mapStatus="no-results",s.panelStatus=null}))},setStage:function(e){var t=this;if(2===e&&""!==this.detailsEndpoint&&null!==this.selectedSubCategory){var s="".concat(this.detailsEndpoint).concat(this.selectedItem);l.Z.get(s).then((function(s){var a=[];a.push(s.data.data),t.currentEndpointData=a,t.currentStage=e}))}else this.currentStage=e,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!==e&&(d.setActivePlace({mapId:this.mapId,placeId:""}),this.selectedItem=null)},filterPlaces:function(e){if("regions"===e)this.showRegions=!0,this.activePins=[],this.selectedToggle="regions";else{this.showRegions=!1,this.selectedToggle="places";var t=this.placesData.filter((function(t){return void 0!==t.properties&&t.properties.category.id===e}));this.activePins=t}},loadMorePlaces:function(e){this.getSubcatPanelData(this.currentPanelEndpointFilters,e)},showAllPlaces:function(){this.activePins=this.placesData,this.showRegions=!1},onToggleChanged:function(e){"regions"===e?(this.setCategory("regions"),this.setStage(1)):"icentres"===e?(this.setCategory("serv"),this.setStage(1)):"places-regional"===e?(this.setCategory("twnv"),this.setStage(1)):(this.showAllPlaces(),this.setStage(0))},setMapReady:function(e){this.mapReady=e,this.panelStatus=e?null:"loading"}}}},31281:function(e,t,s){"use strict";s.d(t,{s:function(){return i}});var a=s(66252),n=s(3577);function i(e,t,s,i,o,l){var r=(0,a.up)("VsMainMapWrapperPanel"),u=(0,a.up)("VsButton"),c=(0,a.up)("VsMap"),p=(0,a.up)("VsButtonToggleGroup"),d=(0,a.up)("VsWarning"),g=(0,a.up)("VsCol"),f=(0,a.up)("VsRow"),h=(0,a.up)("VsContainer");return(0,a.wg)(),(0,a.j4)(h,{"data-test":"vs-main-map-wrapper"},{default:(0,a.w5)((function(){return[(0,a.Wm)(f,null,{default:(0,a.w5)((function(){return[(0,a.Wm)(g,null,{default:(0,a.w5)((function(){return[(0,a._)("div",{class:"vs-main-map-wrapper",ref:s.mapId},[(0,a._)("div",{class:(0,n.normalizeClass)(["vs-main-map-wrapper__side-panel",l.panelDisplayClass]),"data-test":"vs-main-map-wrapper__side-panel"},[(0,a.Wm)(r,{"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:l.setCategory,onSetSubcategory:l.setSubCategory,onSubcategoriesFiltered:l.filterSubCategories,onSetStage:l.setStage,onClosePanel:l.closePanel,onShowItemDetail:l.showDetail,onFilterPlaces:l.filterPlaces,onLoadMorePlaces:l.loadMorePlaces},{closePanelText:(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"close-side-panel-text")]})),"reset-side-panel-text":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"reset-side-panel-text")]})),"back-btn-text":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"back-btn-text")]})),"panel-loading-message":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"panel-loading-message")]})),"load-more-text":(0,a.w5)((function(){return[(0,a.WI)(e.$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._)("div",{class:(0,n.normalizeClass)(["vs-main-map-wrapper__map",l.mapDisplayClass])},[(0,a.Wm)(u,{class:"vs-main-map-wrapper__map-toggle",size:"sm",onClick:l.openPanel,"data-test":"vs-main-map-wrapper__map-toggle"},{default:(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"open-side-panel-text")]})),_:3},8,["onClick"]),(0,a.Wm)(c,{"is-visible":!o.panelVisible,labels:{},places:o.activePins,"selected-item":o.selectedItem,"map-id":s.mapId,"show-polygons":o.showRegions,"show-info-message":""!==o.mapStatus,onShowDetail:l.showDetail,onSetCategory:l.setCategory,onMapReady:l.setMapReady,onZoomReset:t[0]||(t[0]=function(e){return o.resetZoom=!1}),"bounds-data":s.regionBounds,"reset-zoom":o.resetZoom},{"map-loading-text":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"map-loading-text")]})),"info-message":(0,a.w5)((function(){return[(0,a.Uk)((0,n.toDisplayString)(l.infoMessage),1)]})),"zoom-too-close":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"zoom-too-close")]})),"zoom-too-far":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"zoom-too-far")]})),"no-js":(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"no-js")]})),_:3},8,["is-visible","places","selected-item","map-id","show-polygons","show-info-message","onShowDetail","onSetCategory","onMapReady","bounds-data","reset-zoom"]),s.toggleData.length>0?((0,a.wg)(),(0,a.j4)(p,{key:0,"data-test":"vs-main-map-wrapper__map-toggle-group","initial-selected":o.selectedToggle,options:s.toggleData,"buttons-label":s.buttonsLabel,onToggleChanged:l.onToggleChanged},null,8,["initial-selected","options","buttons-label","onToggleChanged"])):(0,a.kq)("",!0)],2)],512),(0,a.Wm)(d,{class:"vs-main-map-wrapper__no-js",theme:"light"},{default:(0,a.w5)((function(){return[(0,a.WI)(e.$slots,"no-js")]})),_:3})]})),_:3})]})),_:3})]})),_:3})}},58561:function(e,t,s){"use strict";var a=s(93379),n=s.n(a),i=s(7795),o=s.n(i),l=s(90569),r=s.n(l),u=s(3565),c=s.n(u),p=s(19216),d=s.n(p),g=s(44589),f=s.n(g),h=s(68333),m=s.n(h),y={};y.styleTagTransform=f(),y.setAttributes=c(),y.insert=r().bind(null,"head"),y.domAPI=o(),y.insertStyleElement=d(),n()(m(),y),m()&&m().locals&&m().locals},44152:function(e,t,s){"use strict";s.r(t);var a=s(31281),n=s(27492);s(28562);const i=(0,s(83744).Z)(n.Z,[["render",a.s]]);t.default=i},27492:function(e,t,s){"use strict";s.d(t,{Z:function(){return a.Z}});var a=s(38822)},28562:function(e,t,s){"use strict";s(58561)}},function(e){return e.O(0,[6252,3744,7991,9963,6486,2854,4942,6765,7169,5274,5924,7370,282,976,3918,7581,4186,1321,1779,3366,2048,2015,6573,1570,6145,1674,9848,4173,4613,6520,175,5834,3709,4169,4143,8869],(function(){return 44152,e(e.s=44152)})),e.O()}])}));
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[1861],{96754:function(){},51635:function(e,t,s){"use strict";var r=s(73366),n=s(44142),o=s(81779);t.Z={name:"VsModuleWrapper",status:"prototype",release:"0.0.1",components:{VsHeading:r.default,VsRichTextWrapper:n.default,VsContainer:o.xB,VsRow:o.ou,VsCol:o.hY},props:{theme:{type:String,default:"light",validator:function(e){return e.match(/(light|grey|dark)/)}}}}},7732:function(e,t,s){"use strict";s.d(t,{s:function(){return n}});var r=s(66252);function n(e,t,s,n,o,a){var u=(0,r.up)("VsHeading"),l=(0,r.up)("VsCol"),i=(0,r.up)("VsRichTextWrapper"),d=(0,r.up)("VsRow"),p=(0,r.up)("VsContainer");return(0,r.wg)(),(0,r.iD)("section",(0,r.dG)({class:["vs-module-wrapper","vs-module-wrapper--".concat(s.theme)],"data-test":"vs-module-wrapper"},e.$attrs),[e.$slots["vs-module-wrapper-heading"]&&e.$slots["vs-module-wrapper-heading"]||e.$slots["vs-module-wrapper-intro"]&&e.$slots["vs-module-wrapper-intro"]?((0,r.wg)(),(0,r.j4)(p,{key:0},{default:(0,r.w5)((function(){return[(0,r.Wm)(d,null,{default:(0,r.w5)((function(){return[e.$slots["vs-module-wrapper-heading"]&&e.$slots["vs-module-wrapper-heading"]?((0,r.wg)(),(0,r.j4)(l,{key:0,cols:"10",offset:"1",md:"8","offset-md":"2"},{default:(0,r.w5)((function(){return[(0,r.Wm)(u,{level:"2",class:"vs-module-wrapper__heading","data-test":"vs-module-wrapper__heading"},{default:(0,r.w5)((function(){return[(0,r.WI)(e.$slots,"vs-module-wrapper-heading")]})),_:3})]})),_:3})):(0,r.kq)("",!0),e.$slots["vs-module-wrapper-intro"]&&e.$slots["vs-module-wrapper-intro"]?((0,r.wg)(),(0,r.j4)(l,{key:1,cols:"12",sm:"10","offset-sm":"1",md:"8","offset-md":"2"},{default:(0,r.w5)((function(){return[(0,r.Wm)(i,{class:"vs-module-wrapper__intro","data-test":"vs-module-wrapper__intro",variant:"lead"},{default:(0,r.w5)((function(){return[(0,r.WI)(e.$slots,"vs-module-wrapper-intro")]})),_:3})]})),_:3})):(0,r.kq)("",!0)]})),_:3})]})),_:3})):(0,r.kq)("",!0),(0,r.WI)(e.$slots,"default")],16)}},54973:function(e,t,s){"use strict";var r=s(93379),n=s.n(r),o=s(7795),a=s.n(o),u=s(90569),l=s.n(u),i=s(3565),d=s.n(i),p=s(19216),c=s.n(p),f=s(44589),m=s.n(f),w=s(96754),v=s.n(w),_={};_.styleTagTransform=m(),_.setAttributes=d(),_.insert=l().bind(null,"head"),_.domAPI=a(),_.insertStyleElement=c(),n()(v(),_),v()&&v().locals&&v().locals},61861:function(e,t,s){"use strict";s.r(t);var r=s(7732),n=s(29996);s(77595);const o=(0,s(83744).Z)(n.Z,[["render",r.s]]);t.default=o},29996:function(e,t,s){"use strict";s.d(t,{Z:function(){return r.Z}});var r=s(51635)},77595:function(e,t,s){"use strict";s(54973)}}]);