@visitscotland/component-library 1.0.37 → 1.0.38

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.
package/CHANGELOG.md CHANGED
@@ -2,29 +2,42 @@
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.37](https://github.com/visitscotland/vs-component-library/compare/v1.0.36...v1.0.37) (2023-09-28)
5
+ ### [1.0.38](https://github.com/visitscotland/vs-component-library/compare/v1.0.37...v1.0.38) (2023-09-29)
6
6
 
7
7
 
8
8
  ### 🐛 Bug Fixes
9
9
 
10
- * **carbon calculator:** ensure focus scrolls into view on iphone ([98e3c56](https://github.com/visitscotland/vs-component-library/commit/98e3c5606068156bc73406f4e70dfd5692ef3f28))
11
- * **psw:** fix default location not showing ([b9acdcf](https://github.com/visitscotland/vs-component-library/commit/b9acdcf66fb12f85f48ae8eeb3e345fa768d3ee8))
10
+ * **psw:** adds fix for setting default dates on search ([51ba331](https://github.com/visitscotland/vs-component-library/commit/51ba3310d90b821fc8095dba72f4a7096c4c1ddc))
11
+ * **psw:** looking at fixing default dates ([17066c9](https://github.com/visitscotland/vs-component-library/commit/17066c903dd9f0d496a7d1eb477bbfa1758cc73a))
12
12
 
13
13
 
14
- ### Tests
14
+ ### ♻️ Code Refactoring
15
15
 
16
- * **psw:** add Autocomplete tests ([3da9892](https://github.com/visitscotland/vs-component-library/commit/3da98929c875f2751491ae85c54cb7bbe10b43fc))
17
- * **psw:** add more unit tests for product search embed ([ee71952](https://github.com/visitscotland/vs-component-library/commit/ee719529642794848ba3a4c929a3e2a7eef1c32a))
18
- * **psw:** add unit tests for DateInput ([21bd876](https://github.com/visitscotland/vs-component-library/commit/21bd8761af276a9831190bc59c4da63cb9f86111))
19
- * **psw:** add unit tests for DateRange ([98f1e5b](https://github.com/visitscotland/vs-component-library/commit/98f1e5b7de4c9ba1bf9fa086d2f01dbf09cbc652))
20
- * **psw:** first unit tests for PSW ([3373542](https://github.com/visitscotland/vs-component-library/commit/3373542a26624186e051a140a3670948976d4841))
21
-
22
-
23
- ### ✨ Features
24
-
25
- * **map:** move bounding box north and south to contain Scotland ([cd01d55](https://github.com/visitscotland/vs-component-library/commit/cd01d5599821b09235a1423d074ae2f404d46164))
26
- * **sticky nav:** ensure user can scroll mobile nav rather than scrolling down page ([9e38a81](https://github.com/visitscotland/vs-component-library/commit/9e38a81d5f744a2889525a56bcf53c878b227dcb))
16
+ * **psw:** code tidy ([79c7e88](https://github.com/visitscotland/vs-component-library/commit/79c7e889ccaed58b2a11acf9bb44ed54abf6970b))
27
17
 
18
+ ### [1.0.37](https://github.com/visitscotland/vs-component-library/compare/v1.0.36...v1.0.37) (2023-09-28)
19
+
20
+
21
+ ### 🐛 Bug Fixes
22
+
23
+ * **carbon calculator:** ensure focus scrolls into view on iphone ([98e3c56](https://github.com/visitscotland/vs-component-library/commit/98e3c5606068156bc73406f4e70dfd5692ef3f28))
24
+ * **psw:** fix default location not showing ([b9acdcf](https://github.com/visitscotland/vs-component-library/commit/b9acdcf66fb12f85f48ae8eeb3e345fa768d3ee8))
25
+
26
+
27
+ ### ✅ Tests
28
+
29
+ * **psw:** add Autocomplete tests ([3da9892](https://github.com/visitscotland/vs-component-library/commit/3da98929c875f2751491ae85c54cb7bbe10b43fc))
30
+ * **psw:** add more unit tests for product search embed ([ee71952](https://github.com/visitscotland/vs-component-library/commit/ee719529642794848ba3a4c929a3e2a7eef1c32a))
31
+ * **psw:** add unit tests for DateInput ([21bd876](https://github.com/visitscotland/vs-component-library/commit/21bd8761af276a9831190bc59c4da63cb9f86111))
32
+ * **psw:** add unit tests for DateRange ([98f1e5b](https://github.com/visitscotland/vs-component-library/commit/98f1e5b7de4c9ba1bf9fa086d2f01dbf09cbc652))
33
+ * **psw:** first unit tests for PSW ([3373542](https://github.com/visitscotland/vs-component-library/commit/3373542a26624186e051a140a3670948976d4841))
34
+
35
+
36
+ ### ✨ Features
37
+
38
+ * **map:** move bounding box north and south to contain Scotland ([cd01d55](https://github.com/visitscotland/vs-component-library/commit/cd01d5599821b09235a1423d074ae2f404d46164))
39
+ * **sticky nav:** ensure user can scroll mobile nav rather than scrolling down page ([9e38a81](https://github.com/visitscotland/vs-component-library/commit/9e38a81d5f744a2889525a56bcf53c878b227dcb))
40
+
28
41
  ### [1.0.36](https://github.com/visitscotland/vs-component-library/compare/v1.0.35...v1.0.36) (2023-09-26)
29
42
 
30
43
 
@@ -5213,11 +5213,11 @@
5213
5213
  "scripts/414cc4d3f993aab28a8f.js",
5214
5214
  "scripts/5232795cc4e58cd16241.js",
5215
5215
  "scripts/ac01af68728960a71854.js",
5216
- "scripts/e873970bfb88791e0d4a.js",
5216
+ "scripts/c809cf38c5272bcfe17e.js",
5217
5217
  "scripts/891ff7a5d9b432a92b97.js"
5218
5218
  ],
5219
5219
  "styles": [
5220
- "styles/e873970bfb88791e0d4a.css"
5220
+ "styles/c809cf38c5272bcfe17e.css"
5221
5221
  ]
5222
5222
  },
5223
5223
  "VsGuestCounter": {
@@ -5435,9 +5435,9 @@
5435
5435
  "scripts/125bf47b90f088fff229.js",
5436
5436
  "scripts/ac01af68728960a71854.js",
5437
5437
  "scripts/ba70a1a96c6e4c09ba97.js",
5438
- "scripts/e873970bfb88791e0d4a.js",
5438
+ "scripts/c809cf38c5272bcfe17e.js",
5439
5439
  "scripts/2bc5373aabf3a6531c37.js",
5440
- "scripts/8baf6b6edfb717769fc7.js",
5440
+ "scripts/e3267b196125faed2e14.js",
5441
5441
  "scripts/7ea8dd44bb61579880bb.js"
5442
5442
  ],
5443
5443
  "styles": [
@@ -5449,9 +5449,9 @@
5449
5449
  "styles/d77faf4a34865a5467e3.css",
5450
5450
  "styles/125bf47b90f088fff229.css",
5451
5451
  "styles/ba70a1a96c6e4c09ba97.css",
5452
- "styles/e873970bfb88791e0d4a.css",
5452
+ "styles/c809cf38c5272bcfe17e.css",
5453
5453
  "styles/2bc5373aabf3a6531c37.css",
5454
- "styles/8baf6b6edfb717769fc7.css"
5454
+ "styles/e3267b196125faed2e14.css"
5455
5455
  ]
5456
5456
  },
5457
5457
  "VsProductSearch": {
@@ -5509,9 +5509,9 @@
5509
5509
  "scripts/125bf47b90f088fff229.js",
5510
5510
  "scripts/ac01af68728960a71854.js",
5511
5511
  "scripts/ba70a1a96c6e4c09ba97.js",
5512
- "scripts/e873970bfb88791e0d4a.js",
5512
+ "scripts/c809cf38c5272bcfe17e.js",
5513
5513
  "scripts/2bc5373aabf3a6531c37.js",
5514
- "scripts/8baf6b6edfb717769fc7.js",
5514
+ "scripts/e3267b196125faed2e14.js",
5515
5515
  "scripts/d476bdf3c63e8acd857e.js"
5516
5516
  ],
5517
5517
  "styles": [
@@ -5526,9 +5526,9 @@
5526
5526
  "styles/d77faf4a34865a5467e3.css",
5527
5527
  "styles/125bf47b90f088fff229.css",
5528
5528
  "styles/ba70a1a96c6e4c09ba97.css",
5529
- "styles/e873970bfb88791e0d4a.css",
5529
+ "styles/c809cf38c5272bcfe17e.css",
5530
5530
  "styles/2bc5373aabf3a6531c37.css",
5531
- "styles/8baf6b6edfb717769fc7.css",
5531
+ "styles/e3267b196125faed2e14.css",
5532
5532
  "styles/d476bdf3c63e8acd857e.css"
5533
5533
  ]
5534
5534
  },
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[6971],{13002:function(){},34279:function(e,t,a){"use strict";var n=a(93379),l=a.n(n),u=a(7795),r=a.n(u),o=a(90569),i=a.n(o),d=a(3565),c=a.n(d),s=a(19216),v=a.n(s),f=a(44589),m=a.n(f),D=a(13002),p=a.n(D),g={};g.styleTagTransform=m(),g.setAttributes=c(),g.insert=i().bind(null,"head"),g.domAPI=r(),g.insertStyleElement=v(),l()(p(),g),p()&&p().locals&&p().locals},69325:function(e,t,a){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var l=a(76765),u=a(76765),r={class:"vs-date-range","data-test":"vs-date-range"},o={class:"row align-items-center"},i={class:"col-12 col-sm-5 order-1"},d={class:"col-12 col-sm-5 order-2"},c={class:"col-12 col-sm-2 order-first order-sm-3 text-sm-right"},s=(0,u.createElementVNode)("input",{type:"hidden",name:"refine-date",value:"on"},null,-1),v=["value"],f=a(76765),m=a(12147),D=n(a(32278));t.default=(0,l.defineComponent)({__name:"DateRange",props:{startLabel:{type:String,required:!1,default:"Start Date"},endLabel:{type:String,required:!1,default:"End Date"},defaultDates:{type:Boolean,default:!1}},emits:["dateUpdated"],setup:function(e,t){var a=t.emit,n=e,l=(0,f.ref)(""),p=(0,f.ref)(""),g=(0,f.computed)((function(){return!!l.value||!!p.value})),b=(0,f.computed)((function(){var e=new Date(p.value),t=new Date(l.value),a=e.getTime()-t.getTime();return isNaN(a)?1:a/864e5}));function _(){l.value="",p.value=""}var w=function(e){var t=e.toLocaleString("default",{year:"numeric"}),a=e.toLocaleString("default",{month:"2-digit"}),n=e.toLocaleString("default",{day:"2-digit"});return"".concat(t,"-").concat(a,"-").concat(n)},y=(0,f.computed)((function(){return""===l.value?w(new Date):""})),h=(0,f.computed)((function(){var e;if(""!==l.value){var t=new Date(l.value);t.setDate(t.getDate()+1),e=w(t)}else if(n.defaultDates){var a=new Date,u=new Date(a);u.setDate(u.getDate()+1),e=w(u)}return e})),N=(0,f.computed)((function(){var e;if(""===l.value){var t=new Date,a=new Date(t);a.setDate(a.getDate()+1),e=w(a)}else{var n=new Date,u=new Date(l.value);n.setDate(u.getDate()+1),e=w(n)}return e}));function k(){var e,t;e=!(!l.value&&!p.value),a("dateUpdated",e),t=new Date(l.value),new Date(p.value)<=t&&(p.value="")}return function(t,a){return(0,u.openBlock)(),(0,u.createElementBlock)("fieldset",r,[(0,u.createElementVNode)("div",o,[(0,u.createElementVNode)("div",i,[(0,u.createVNode)(D.default,{label:e.startLabel,value:e.defaultDates&&""===l.value&&p.value?y.value:l.value,name:"isostartdate",id:"startDate",onChangeDate:a[0]||(a[0]=function(e){l.value=e,k()}),class:"mb-4"},null,8,["label","value"])]),(0,u.createElementVNode)("div",d,[(0,u.createVNode)(D.default,{label:e.endLabel,value:e.defaultDates&&""===p.value&&l.value?h.value:p.value,"min-date":N.value,name:"isoenddate",id:"endDate",onChangeDate:a[1]||(a[1]=function(e){p.value=e,k()}),class:"mb-4"},null,8,["label","value","min-date"])]),(0,u.createElementVNode)("div",c,[g.value?((0,u.openBlock)(),(0,u.createElementBlock)("button",{key:0,id:"clearDateRange",type:"button",onClick:_,class:"vs-date-range__clear"},(0,u.toDisplayString)((0,u.unref)(m.getLabelText)("reset","Clear")),1)):(0,u.createCommentVNode)("",!0),s,(0,u.createElementVNode)("input",{type:"hidden",name:"nights",value:b.value},null,8,v)])])])}}})},96971:function(e,t,a){"use strict";a.r(t);var n=a(5451),l={};for(var u in n)"default"!==u&&(l[u]=function(e){return n[e]}.bind(0,u));a.d(t,l),a(62008);const r=n.default;t.default=r},62008:function(e,t,a){"use strict";a(34279)},5451:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return l.a}});var n=a(69325),l=a.n(n),u={};for(var r in n)"default"!==r&&(u[r]=function(e){return n[e]}.bind(0,r));a.d(t,u)}}]);
@@ -0,0 +1 @@
1
+ (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[7809],{30112:function(){},36839:function(e,t,n){"use strict";var a=n(93379),o=n.n(a),r=n(7795),l=n.n(r),u=n(90569),c=n.n(u),i=n(3565),s=n.n(i),d=n(19216),f=n.n(d),v=n(44589),p=n.n(v),m=n(30112),h=n.n(m),b={};b.styleTagTransform=p(),b.setAttributes=s(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=f(),o()(h(),b),h()&&h().locals&&h().locals},43062:function(e,t,n){"use strict";var a=this&&this.__assign||function(){return a=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)},o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function l(e){try{c(a.next(e))}catch(e){r(e)}}function u(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,u)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,u[0]&&(l=0)),l;)try{if(n=1,a&&(o=2&u[0]?a.return:u[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,u[1])).done)return o;switch(a=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,a=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],a=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0});var u=n(76765),c=n(76765),i={class:"vs-product-search-embed","data-test":"vs-product-search-embed"},s={key:0,class:"container"},d={class:"row"},f={class:"col-12"},v=["action","onSubmit"],p={class:"form-group"},m={for:"prodtypes"},h={"aria-live":"polite"},b=["disabled","value"],y=["disabled","value"],k=["value"],g={key:4,type:"hidden",name:"areaproxdist",value:"10"},w={key:5},_={key:1,class:"form-group"},x={for:"search-keyword"},B={key:3},E=["value"],T={key:0},N=["value"],V=n(76765),L=n(12147),S=n(61309),C=n(68504),P=n(83506),D=l(n(16145)),j=l(n(92664)),O=l(n(63817)),U=l(n(27175)),M=l(n(17710)),A=l(n(96971)),I=l(n(83918));t.default=(0,u.defineComponent)({__name:"ProductSearchEmbed",props:{defaultProd:{type:String,default:"acti,attr,reta",validator:function(e){return["acco","cate","even","tour","acti,attr,reta"].includes(e)}},defaultLocale:{type:String,default:"",validator:function(e){return["en","fr","de","es","it","nl",""].includes(e)}},defaultLocation:{type:String,default:""}},setup:function(e){var t=this,n=e,l=(0,V.ref)(!1),u=(0,V.ref)(),F=(0,V.ref)([]),G=((0,V.ref)(null),(0,V.ref)()),R=(0,V.ref)("off"),J=(0,V.ref)(!1),Y=(0,V.computed)((function(){var e=void 0===u.value?"see-do":u.value;return"/info/".concat(S.paths[e])})),H=(0,V.ref)(!1),K={en:{localeUrl:""},fr:{localeUrl:"fr-fr"},de:{localeUrl:"de-de"},es:{localeUrl:"es-es"},it:{localeUrl:"it-it"},nl:{localeUrl:"nl-nl"}},q=(0,V.computed)((function(){var e=n.defaultLocale.length>0?n.defaultLocale:(0,L.getLocale)();return"en"===e&&(e=""),e})),z=(0,V.computed)((function(){if("undefined"!=typeof window){var e=window.location.origin;return e.includes("localhost")?"https://www.visitscotland.com":e}return"https://www.visitscotland.com"})),Q=(0,V.computed)((function(){return"".concat(z.value).concat(q.value?"/"+q.value:"").concat(Y.value,"/search-results")})),W="https://www.visitscotland.com/data/locations"+"?locale=".concat(q.value),X=(0,V.ref)([]),Z=(0,V.ref)([]),$=(0,V.ref)([]),ee=(0,V.ref)([]),te=(0,V.computed)((function(){return l.value?[]:ee.value.map((function(e){return a(a({},e),{text:(0,L.getProductName)(e.value,e.text)})}))})),ne=function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)("https://www.visitscotland.com/tms-api/v1/origins?active=1")];case 1:return(e=t.sent())&&($.value=e.data),[2]}}))}))},ae=function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)("https://www.visitscotland.com/tms-api/v1/attractions")];case 1:return(e=t.sent())&&(Z.value=e.data),[2]}}))}))},oe=function(e,t){G.value="key"===t?X.value.find((function(t){return t.key===e})):X.value.find((function(t){return t.name===e}))},re=function(){l.value=!0,(0,V.nextTick)((function(){l.value=!1,""!==n.defaultLocation&&H&&oe(n.defaultLocation,"key")}))};(0,V.onBeforeMount)((function(){return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){return window.VS={},(e=document.createElement("script")).async=!1,e.onload=re,e.setAttribute("src","https://www.visitscotland.com/".concat((K[n.defaultLocale]||"").localeUrl,"/data/template/search.js")),document.head.appendChild(e),[2]}))}))})),(0,V.onMounted)((function(){return o(t,void 0,void 0,(function(){return r(this,(function(e){var a,l;return o(t,void 0,void 0,(function(){var e;return r(this,(function(t){switch(t.label){case 0:return[4,(0,P.getData)(W)];case 1:return(e=t.sent())&&(X.value=e.data),[2]}}))})),H.value=!0,u.value=n.defaultProd,"tour"===u.value&&(ne(),ae()),a=(0,C.getProductTypes)(),l=[],a.forEach((function(e){l.push(e)})),ee.value=l,[2]}))}))}));var le=function(e){J.value=!0;var t=e.currentTarget;setTimeout((function(){t.submit()}),500)};return function(t,n){var a,o,r,V,C,P;return(0,c.openBlock)(),(0,c.createElementBlock)("div",i,[l.value?(0,c.createCommentVNode)("",!0):((0,c.openBlock)(),(0,c.createElementBlock)("div",s,[(0,c.createElementVNode)("div",d,[(0,c.createElementVNode)("div",f,[(0,c.unref)(H)?((0,c.openBlock)(),(0,c.createElementBlock)("form",{key:0,action:Q.value,onSubmit:(0,c.withModifiers)(le,["prevent"]),"accept-charset":"UTF-8","data-test":"psw-form"},[(0,c.createElementVNode)("div",p,[(0,c.createElementVNode)("label",m,(0,c.toDisplayString)((0,c.unref)(L.getLabelText)("search_for","I'm looking for")),1),(0,c.createVNode)(j.default,{options:te.value,value:e.defaultProd,onUpdated:n[0]||(n[0]=function(e){return t=e.value,u.value=t,void("tour"===t&&(ne(),ae()));var t}),"field-name":"prodtypes"},null,8,["options","value"])]),(0,c.createElementVNode)("div",h,["tour"!=u.value&&(0,c.unref)(H)?((0,c.openBlock)(),(0,c.createBlock)(U.default,{key:0,id:"search-location",label:(0,c.unref)(L.getLabelText)("location","Location"),"multiselect-label":"name",name:"loc",options:X.value,placeholder:(0,c.unref)(L.getLabelText)("location_placeholder","Enter a location"),"track-by":"name",onChangeValue:n[1]||(n[1]=function(e){return oe(e)}),"default-val":(0,c.unref)(G)},null,8,["label","options","placeholder","default-val"])):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:1,type:"hidden",name:"locplace",disabled:"POLYGON"===(null===(a=(0,c.unref)(G))||void 0===a?void 0:a.type),value:(null===(o=(0,c.unref)(G))||void 0===o?void 0:o.key)||""},null,8,b)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:2,type:"hidden",name:"locpoly",disabled:"POLYGON"!==(null===(r=(0,c.unref)(G))||void 0===r?void 0:r.type),value:(null===(V=(0,c.unref)(G))||void 0===V?void 0:V.key)||""},null,8,y)):(0,c.createCommentVNode)("",!0),"tour"!==u.value?((0,c.openBlock)(),(0,c.createElementBlock)("input",{key:3,type:"hidden",name:"locprox",value:"DISTRICT"===(null===(C=(0,c.unref)(G))||void 0===C?void 0:C.type)?1:0},null,8,k)):(0,c.createCommentVNode)("",!0),"tour"!==u.value&&"DISTRICT"===(null===(P=(0,c.unref)(G))||void 0===P?void 0:P.type)?((0,c.openBlock)(),(0,c.createElementBlock)("input",g)):(0,c.createCommentVNode)("",!0),"even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",w,["even"===u.value||"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(A.default,{key:0,"start-label":(0,c.unref)(L.getLabelText)("startdate","Start Date","dates"),"end-label":(0,c.unref)(L.getLabelText)("enddate","End Date","dates"),onDateUpdated:n[2]||(n[2]=function(e){return function(e){R.value=e?"on":"off"}(e)}),"default-dates":J.value},null,8,["start-label","end-label","default-dates"])):(0,c.createCommentVNode)("",!0),"even"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",_,[(0,c.createElementVNode)("label",x,(0,c.toDisplayString)((0,c.unref)(L.getLabelText)("keywords","Keywords")),1),(0,c.createVNode)(O.default,{"field-name":"search-keyword",placeholder:(0,c.unref)(L.getLabelText)("events_keywords_placeholder","Highland games, music festivals etc"),name:"name"},null,8,["placeholder"])])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createBlock)(M.default,{key:2,availability:!0,label:(0,c.unref)(L.getLabelText)("guests","Guests"),id:"guest-selector"},null,8,["label"])):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",B,[(0,c.createElementVNode)("input",{hidden:"true",name:"avail",value:R.value},null,8,E)])):(0,c.createCommentVNode)("",!0)])):(0,c.createCommentVNode)("",!0)]),"tour"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",T,[(0,c.createVNode)(U.default,{id:"tour-origin",label:(0,c.unref)(L.getLabelText)("tour_origin","Starting point"),"multiselect-label":"name",name:"origins[]",options:$.value,placeholder:(0,c.unref)(L.getLabelText)("tour_origin_placeholder","Location"),"track-by":"name","is-tour-location":!0},null,8,["label","options","placeholder"]),((0,c.openBlock)(!0),(0,c.createElementBlock)(c.Fragment,null,(0,c.renderList)(F.value,(function(e){return(0,c.openBlock)(),(0,c.createElementBlock)("input",{type:"hidden",name:"attractions[]",value:e},null,8,N)})),256)),(0,c.createVNode)(U.default,{id:"tour-month",label:(0,c.unref)(L.getLabelText)("tour_month","I'm traveling in"),"multiselect-label":"label",name:"when",options:(0,c.unref)(L.getLabelText)("months",(0,c.unref)(S.monthsEnglish)),placeholder:(0,c.unref)(L.getLabelText)("tour_month_placeholder","Select month"),"track-by":"value"},null,8,["label","options","placeholder"])])):(0,c.createCommentVNode)("",!0),(0,c.createVNode)(I.default,{class:"mt-6","data-test":"psw-submit",type:"submit",variant:"dark"},{default:(0,c.withCtx)((function(){return[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(L.getLabelText)("search","Search")),1)]})),_:1})],40,v)):(0,c.createCommentVNode)("",!0),(0,c.unref)(H)?(0,c.createCommentVNode)("",!0):((0,c.openBlock)(),(0,c.createBlock)(D.default,{key:1,variant:"dark"}))])])]))])}}})},61309:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.monthsEnglish=t.paths=t.products=void 0,t.products=[{key:"accommodation",text:"Accommodation",value:"acco"},{key:"eventsAndFestivals",text:"Events & Festivals",value:"even"},{key:"foodAndDrink",text:"Food & Drink",value:"cate"},{key:"thingsToDo",text:"Things to do",value:"acti,attr,reta"},{key:"tours",text:"Tours",value:"tour"}],t.paths={acco:"accommodation","acti,attr,reta":"see-do",cate:"food-drink",even:"events",tour:"tours"},t.monthsEnglish=[{label:"January",value:"january"},{label:"February",value:"february"},{label:"March",value:"march"},{label:"April",value:"april"},{label:"May",value:"may"},{label:"June",value:"june"},{label:"July",value:"july"},{label:"August",value:"august"},{label:"September",value:"september"},{label:"October",value:"october"},{label:"November",value:"november"},{label:"December",value:"december"}]},83506:function(e,t,n){"use strict";var a=n(25108),o=this&&this.__awaiter||function(e,t,n,a){return new(n||(n=Promise))((function(o,r){function l(e){try{c(a.next(e))}catch(e){r(e)}}function u(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(l,u)}c((a=a.apply(e,t||[])).next())}))},r=this&&this.__generator||function(e,t){var n,a,o,r,l={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return r={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function u(u){return function(c){return function(u){if(n)throw new TypeError("Generator is already executing.");for(;r&&(r=0,u[0]&&(l=0)),l;)try{if(n=1,a&&(o=2&u[0]?a.return:u[0]?a.throw||((o=a.return)&&o.call(a),0):a.next)&&!(o=o.call(a,u[1])).done)return o;switch(a=0,o&&(u=[2&u[0],o.value]),u[0]){case 0:case 1:o=u;break;case 4:return l.label++,{value:u[1],done:!1};case 5:l.label++,a=u[1],u=[0];continue;case 7:u=l.ops.pop(),l.trys.pop();continue;default:if(!((o=(o=l.trys).length>0&&o[o.length-1])||6!==u[0]&&2!==u[0])){l=0;continue}if(3===u[0]&&(!o||u[1]>o[0]&&u[1]<o[3])){l.label=u[1];break}if(6===u[0]&&l.label<o[1]){l.label=o[1],o=u;break}if(o&&l.label<o[2]){l.label=o[2],l.ops.push(u);break}o[2]&&l.ops.pop(),l.trys.pop();continue}u=t.call(e,l)}catch(e){u=[6,e],a=0}finally{n=o=0}if(5&u[0])throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}([u,c])}}},l=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getData=void 0;var u=l(n(97218));t.getData=function(e){return o(this,void 0,void 0,(function(){var t;return r(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,u.default.get(e)];case 1:return[2,n.sent().data];case 2:return t=n.sent(),a.error("Axios error: ".concat(t)),[3,3];case 3:return[2]}}))}))}},68504:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductTypes=t.getURLParameters=void 0;var a,o=n(61309);a="undefined"!=typeof window&&"object"==typeof window.VS?window.VS:{},t.getURLParameters=function(){var e=new URLSearchParams(document.location.search),t=Object.fromEntries(e);return"object"==typeof t&&Object.keys(t).forEach((function(e){return null===t[e]&&delete t[e]})),t},t.getProductTypes=function(){if(Object.keys(a).length<=0)return o.products;var e=a.search_config.basic_config.productTypes,t=[];return Object.keys(e).forEach((function(n){t.push({key:e[n].value,text:e[n].text,value:e[n].value})})),t}},97809:function(e,t,n){"use strict";n.r(t);var a=n(65531),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o),n(10167);const l=a.default;t.default=l},10167:function(e,t,n){"use strict";n(36839)},65531:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o.a}});var a=n(43062),o=n.n(a),r={};for(var l in a)"default"!==l&&(r[l]=function(e){return a[e]}.bind(0,l));n.d(t,r)}}]);