@visitscotland/component-library 1.2.5 → 1.2.7

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.
@@ -20,7 +20,7 @@
20
20
  "index.js"
21
21
  ],
22
22
  "styles": [
23
- "styles/a418ca5d5c343abd7c0e.css"
23
+ "styles/0a6b03ab5dcdc935cecc.css"
24
24
  ]
25
25
  }
26
26
  }
@@ -122,7 +122,7 @@ label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{fo
122
122
  .vs-guest-selector-number-group{display:flex;justify-content:space-between;margin-bottom:.75rem}.vs-guest-selector-number-group__button{color:#fff;background-color:#af006e;border-color:#af006e}.vs-guest-selector-number-group__input{width:30px;text-align:center;border:0;font-size:1rem}
123
123
  .vs-guest-selector-row{position:relative;border-bottom:1px solid #d0d0d0;margin-bottom:1rem}.vs-guest-selector-row:last-of-type{border-bottom:0}.vs-guest-selector-row__title{font-weight:700;margin-bottom:.75rem}.vs-guest-selector-row__remove{position:absolute;top:0;right:0;text-transform:none}.vs-guest-selector-row__remove.vs-button.vs-button--icon-only .vs-icon{margin-right:2px;vertical-align:middle}.vs-guest-selector-row .c-search__rooms-guests-picker__row{margin-bottom:1rem}
124
124
  button.vs-guest-selector__trigger{text-align:left}button.vs-guest-selector__trigger:focus{box-shadow:none}button.vs-guest-selector__trigger::after{font-family:"Font Awesome Kit";content:"";display:inline-block;position:absolute;top:3rem;right:1rem;pointer-events:none;font-size:1.125rem;color:#191919}.vs-guest-selector{position:relative}.vs-guest-selector__modal{width:100%;display:none;padding:1rem;box-shadow:0px 1px 3px 1px rgba(0,0,0,.15),0px 1px 2px 0px rgba(0,0,0,.3)}.vs-guest-selector__modal--visible{display:flex;flex-direction:column;position:absolute;background:#fff;z-index:1}.vs-guest-selector__label{font-weight:700;margin-bottom:0}.vs-guest-selector__close{align-self:end}
125
- label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{font-size:1rem;color:#ae2940;display:block}.hint-text{font-size:1rem;color:#757575;margin-bottom:0}.vs-input{border:#565656 1px solid;margin-top:.5rem}.vs-input.form-control-md{height:50px}.vs-input:focus{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.vs-input--error{border-color:#ae2940;box-shadow:0 0 0 1px #ae2940 inset}.vs-input__clear-button{position:absolute;right:1.25rem;top:50%;transform:translate(0, -50%)}.vs-select__element{background:#fff}.simple-typeahead{position:relative}.simple-typeahead-list{position:absolute;display:flex;flex-direction:column;max-height:250px;overflow-y:scroll;background:#fff;width:100%;z-index:10}.simple-typeahead-list-item{cursor:pointer;font-size:1rem;padding:.5rem 1rem}.simple-typeahead-list-item:hover{background-color:#f0eff0;color:#191919}.multiselect{height:50px}.multiselect.is-active{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.multiselect::after{font-family:"Font Awesome Kit";content:"";line-height:1.3;vertical-align:text-top;text-align:center;display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;width:1.5rem;height:1.5rem;border:1px solid #000;border-radius:1000px;position:absolute;top:calc(50% - 0.75rem);right:1rem;pointer-events:none}.multiselect-tags{flex-wrap:nowrap;overflow:hidden;min-height:42px;max-width:80%;align-self:flex-start;margin-right:4px}.multiselect-tags .multiselect-tag{background:#dad8d9;color:#191919}.multiselect-wrapper{min-height:auto;justify-content:flex-start;appearance:none;background-color:rgba(0,0,0,0);border:none;margin:0;width:100%;font-family:inherit;font-size:inherit;cursor:inherit;line-height:inherit;height:50px;border:#565656 1px solid;overflow:hidden}.multiselect-option.is-pointed{background-color:#f0eff0;color:#191919}.multiselect-caret{display:none}.multiselect-placeholder{color:#191919;opacity:.8}
125
+ label,legend{font-weight:600;margin-bottom:0}legend{font-size:1.125rem}.error{font-size:1rem;color:#ae2940;display:block}.hint-text{font-size:1rem;color:#757575;margin-bottom:0}.vs-input{border:#565656 1px solid;margin-top:.5rem}.vs-input.form-control-md{height:50px}.vs-input:focus{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.vs-input--error{border-color:#ae2940;box-shadow:0 0 0 1px #ae2940 inset}.vs-input__clear-button{position:absolute;right:1.25rem;top:50%;transform:translate(0, -50%)}.vs-select__element{background:#fff}.simple-typeahead{position:relative}.simple-typeahead-list{position:absolute;display:flex;flex-direction:column;max-height:250px;overflow-y:scroll;background:#fff;width:100%;z-index:10}.simple-typeahead-list-item{cursor:pointer;font-size:1rem;padding:.5rem 1rem}.simple-typeahead-list-item:hover{background-color:#f0eff0;color:#191919}.multiselect{height:50px}.multiselect.is-active{border-color:#af006e;box-shadow:0 0 0 3px #af006e inset;outline:none}.multiselect::after{font-family:"Font Awesome Kit";content:"";line-height:1.3;vertical-align:text-top;text-align:center;display:inline-block;text-rendering:auto;-webkit-font-smoothing:antialiased;width:1.5rem;height:1.5rem;border:1px solid #000;border-radius:1000px;position:absolute;top:calc(50% - 0.75rem);right:1rem;pointer-events:none}.multiselect-tags{flex-wrap:nowrap;overflow:hidden;min-height:42px;max-width:80%;align-self:flex-start;margin-right:4px}.multiselect-tags .multiselect-tag{background:#dad8d9;color:#191919}.multiselect-wrapper{min-height:auto;justify-content:flex-start;appearance:none;background-color:rgba(0,0,0,0);border:none;margin:0;width:100%;font-family:inherit;font-size:inherit;cursor:inherit;line-height:inherit;height:50px;border:#565656 1px solid;overflow:hidden}.multiselect-option.is-pointed{background-color:#f0eff0;color:#191919}.multiselect-caret{display:none}.multiselect-placeholder{color:#191919;opacity:.8}@media(min-width: 992px){.product-search__type .d-lg-flex .vs-select{width:100%}.product-search__type .d-lg-flex .product-search__in{margin:0 1rem}}.product-search__type .product-search__in{font-weight:600}
126
126
  .vs-product-search{width:100%;background:#383838;padding:2rem .25rem;font-family:"Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol"}.vs-product-search__no-js{display:none}.vs-product-search__heading,.vs-product-search__intro{color:#fff}.vs-product-search__heading.vs-heading{font-size:1.875rem;font-weight:300;letter-spacing:normal}.vs-product-search__col--left{background:#383838;font-family:"Source Sans Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";margin-bottom:3rem}.vs-product-search__col--right{display:flex;flex-direction:column;justify-content:center;background:#fcca1b;padding:1.5rem 1rem}@media(min-width: 576px){.vs-product-search{padding-left:.75rem;padding-right:.75rem}}@media(min-width: 1200px){.vs-product-search{padding:0;background:rgba(0,0,0,0)}.vs-product-search__heading,.vs-product-search__intro{color:#fff;margin-left:4rem;max-width:70%}.vs-product-search__heading.vs-heading{font-size:2.5rem}.vs-product-search__col{min-height:458px}.vs-product-search__col--left{padding:6rem;margin-bottom:0}.vs-product-search__col--right.col-lg-4{padding:2rem}}.no-js .vs-product-search__col--right{padding:0}.no-js .vs-product-search__no-js{display:flex}.no-js .vs-product-search__widget{display:none}
127
127
  .vs-quote__content{font-size:1.5rem;font-weight:300;line-height:1.3}.vs-quote__author-name{font-weight:700;margin-bottom:0}@media(min-width: 768px){.vs-quote__author-name{margin-bottom:.25rem;font-size:1.125rem}}.vs-quote__author-title{line-height:1.25rem}@media(min-width: 768px){.vs-quote__author-title{line-height:1.3;font-size:1.125rem;margin-bottom:1.75rem}}.vs-quote__speech-mark{font-weight:700;color:#848484;font-size:7rem;height:5rem;line-height:1;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.vs-quote__speech-container{display:block;margin-bottom:1rem;margin-right:1.25rem;width:3.5rem;height:2.5rem;position:relative}@media(min-width: 576px){.vs-quote__speech-container{display:inline-block;vertical-align:top}}.vs-quote__author-container{display:block;width:50%;max-width:8rem;margin-bottom:1rem}.vs-quote__author-container img{width:100%}@media(min-width: 992px){.vs-quote__author-container{margin-right:1.25rem}}.vs-quote__content-container{display:block}@media(min-width: 576px){.vs-quote--wide .vs-quote__author-container{display:inline-block;vertical-align:top;margin-bottom:1.25rem}}@media(min-width: 576px){.vs-quote--wide .vs-quote__content-container{display:inline-block;vertical-align:top}}@media(min-width: 1200px){.vs-quote--wide .vs-quote__content-container{width:calc(100% - 15rem);margin-top:-7px}}
128
128
  .vs-table th>span{padding:0}.vs-table .table-sm th,.vs-table .table-sm td{font-size:1rem;padding:.25rem}.vs-table.table.b-table.b-table-stacked>tbody>tr>[data-label]::before{text-align:left}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visitscotland/component-library",
3
- "version": "1.2.5",
3
+ "version": "1.2.7",
4
4
  "description": "VisitScotland Component Library",
5
5
  "author": "VisitScotland",
6
6
  "main": "dist/ssr/index.js",
@@ -199,5 +199,6 @@
199
199
  "highlight.js": "^10.4.1",
200
200
  "semver": "^7.5.4",
201
201
  "get-func-name": "^2.0.1"
202
- }
202
+ },
203
+ "packageManager": "yarn@1.22.4"
203
204
  }
@@ -1 +0,0 @@
1
- (self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[3293],{34705:function(){},3779:function(e,t,n){"use strict";var a=n(85072),o=n.n(a),r=n(97825),l=n.n(r),u=n(77659),c=n.n(u),i=n(55056),s=n.n(i),d=n(10540),f=n.n(d),v=n(41113),p=n.n(v),m=n(34705),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},59061: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(17527),c=n(17527),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"],p={class:"form-group mb-4"},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:0,class:"form-group"},x={for:"search-keyword"},E={key:2},T=["value"],B={key:0},L=["value"],N=n(17527),V=n(378),S=n(8611),C=n(10293),D=n(45906),P=l(n(35025)),j=l(n(51688)),O=l(n(22142)),U=l(n(58861)),M=l(n(34900)),A=l(n(19856)),I=l(n(48836)),F=n(17527),R=l(n(98745)),G=(0,F.defineComponent)({mixins:[R.default],methods:{trackSubmit:function(e,t){this.createDataLayerObject("productSearchDataEvent",{searchType:e,searchLocation:t.name},this.href)}}});t.default=(0,u.defineComponent)(a(a({},G),{__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,N.ref)(!1),u=(0,N.ref)(),F=(0,N.ref)([]),R=((0,N.ref)(null),(0,N.ref)());R.value={id:"",key:"",name:"",type:""};var G=(0,N.ref)("off"),J=(0,N.ref)(!1),Y=(0,N.computed)((function(){var e=void 0===u.value?"see-do":u.value;return"/info/".concat(S.paths[e])})),H=(0,N.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,N.computed)((function(){var e=n.defaultLocale.length>0?n.defaultLocale:(0,V.getLocale)();return"en"===e&&(e=""),e})),z=(0,N.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,N.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,N.ref)([]),Z=(0,N.ref)([]),$=(0,N.ref)([]),ee=(0,N.ref)([]),te=(0,N.computed)((function(){return l.value?[]:ee.value.map((function(e){return a(a({},e),{text:(0,V.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,D.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,D.getData)("https://www.visitscotland.com/tms-api/v1/attractions")];case 1:return(e=t.sent())&&(Z.value=e.data),[2]}}))}))},oe=function(e,t){R.value="key"===t?X.value.find((function(t){return t.key===e})):"id"===t?X.value.find((function(t){return t.id===e})):X.value.find((function(t){return t.name===e}))},re=function(){l.value=!0,(0,N.nextTick)((function(){l.value=!1,""!==n.defaultLocation&&H&&oe(n.defaultLocation,"id")}))};(0,N.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,N.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,D.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,N,C,D;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)(V.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)(V.getLabelText)("location","Location"),"multiselect-label":"name",name:"loc",options:X.value,placeholder:(0,c.unref)(V.getLabelText)("location_placeholder","Enter a location"),"track-by":"name",onChangeValue:n[1]||(n[1]=function(e){return oe(e)}),"default-val":(0,c.unref)(R)},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)(R))||void 0===a?void 0:a.type),value:(null===(o=(0,c.unref)(R))||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)(R))||void 0===r?void 0:r.type),value:(null===(N=(0,c.unref)(R))||void 0===N?void 0:N.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)(R))||void 0===C?void 0:C.type)?1:0},null,8,k)):(0,c.createCommentVNode)("",!0),"tour"!==u.value&&"DISTRICT"===(null===(D=(0,c.unref)(R))||void 0===D?void 0:D.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,[(0,c.createVNode)(A.default,{"start-label":(0,c.unref)(V.getLabelText)("startdate","Start Date","dates"),"end-label":(0,c.unref)(V.getLabelText)("enddate","End Date","dates"),onDateUpdated:n[2]||(n[2]=function(e){return function(e){G.value=e?"on":"off"}(e)}),"default-dates":J.value,"selected-prod":u.value},null,8,["start-label","end-label","default-dates","selected-prod"]),"even"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",_,[(0,c.createElementVNode)("label",x,(0,c.toDisplayString)((0,c.unref)(V.getLabelText)("keywords","Keywords")),1),(0,c.createVNode)(O.default,{"field-name":"search-keyword",placeholder:(0,c.unref)(V.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:1,availability:!0,id:"guest-selector"})):(0,c.createCommentVNode)("",!0),"acco"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",E,[(0,c.createElementVNode)("input",{hidden:"true",name:"avail",value:G.value},null,8,T)])):(0,c.createCommentVNode)("",!0)])):(0,c.createCommentVNode)("",!0)]),"tour"===u.value?((0,c.openBlock)(),(0,c.createElementBlock)("div",B,[(0,c.createVNode)(U.default,{id:"tour-origin",label:(0,c.unref)(V.getLabelText)("tour_origin","Starting point"),"multiselect-label":"name",name:"origins[]",options:$.value,placeholder:(0,c.unref)(V.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,L)})),256)),(0,c.createVNode)(U.default,{id:"tour-month",label:(0,c.unref)(V.getLabelText)("tour_month","I'm traveling in"),"multiselect-label":"label",name:"when",options:(0,c.unref)(V.getLabelText)("months",(0,c.unref)(S.monthsEnglish)),placeholder:(0,c.unref)(V.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",onClick:n[3]||(n[3]=function(e){return t.trackSubmit(u.value,void 0===(0,c.unref)(R)?"":(0,c.unref)(R))})},{default:(0,c.withCtx)((function(){return[(0,c.createTextVNode)((0,c.toDisplayString)((0,c.unref)(V.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)(P.default,{key:1,variant:"dark"}))])])]))])}}}))},8611: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"}]},45906:function(e,t,n){"use strict";var a=n(96763),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(86425));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]}}))}))}},10293:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getProductTypes=t.getURLParameters=void 0;var a,o=n(8611);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}},93293:function(e,t,n){"use strict";n.r(t);var a=n(43423),o={};for(var r in a)"default"!==r&&(o[r]=function(e){return a[e]}.bind(0,r));n.d(t,o),n(39751);const l=a.default;t.default=l},39751:function(e,t,n){"use strict";n(3779)},43423:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o.a}});var a=n(59061),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)}}]);
@@ -1 +0,0 @@
1
- "use strict";(self.webpackChunk_visitscotland_component_library=self.webpackChunk_visitscotland_component_library||[]).push([[8745],{98745:function(e,t,a){a.r(t);var r=a(64467),_=a(10810),n=a(47677),o=a(4859),i=a(63555),c=a(12554);function g(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,r)}return a}function l(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?g(Object(a),!0).forEach((function(t){(0,r.A)(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):g(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}var p={computed:l({},(0,_.aH)(o.A,{pageUrl:function(e){return e.pageUrl}})),data:function(){return{dataLayerLoadConfirmed:!1,dataLayerStore:null}},mounted:function(){this.dataLayerStore=(0,o.A)((0,n.A)())},methods:{templateFiller:function(e,t){var a={};return e.forEach((function(e){a[e]="",a[e]=t[e]||void 0})),a},createDataLayerObject:function(e,t,a){var r,_,n,o,i,g,l="";switch(t&&t.target&&(g=t.target.text?t.target.text.trim():t.target.innerText),e){case"productSearchDataEvent":_="VS - GA4 - Event - PSR Search",n={event:r="psr_search",psr_search_type:t.searchType,psr_search_location:t.searchLocation,page_path:a,tag_name:_},o=this.compileFullTemplate(n),i=this.templateFiller(c.Gn,o);break;case"pageViewTemplateDataEvent":n={event:r="page_view"},o=this.compileFullTemplate(n),i=this.templateFiller(c.Vq,o);break;case"menuNavigationDataEvent":n={event:r="menu_navigation",click_text:t.target.text.trim(),click_URL:a},o=this.compileFullTemplate(n),i=this.templateFiller(c.qv,o);break;case"socialMediaExternalLinkDataEvent":n={event:r="social_media_footer",tag_name:_="VS - GA - Social Media External Link",click_URL:a},o=this.compileFullTemplate(n),i=this.templateFiller(c.P4,o);break;case"homePageLogoClickDataEvent":n={event:r="homepage_logo_click",tag_name:_="VS - GA - Homepage Logo Click"},o=this.compileFullTemplate(n),i=this.templateFiller(c.C0,o);break;case"externalLinkDataEvent":n={event:r="external_link",tag_name:_="VS - GA - External Link",click_text:g,click_URL:a},o=this.compileFullTemplate(n),i=this.templateFiller(c.Uf,o);break;case"internalLinkDataEvent":n={event:r="internal_link",tag_name:_="VS - GA - Internal Link",click_text:g,click_URL:a},o=this.compileFullTemplate(n),i=this.templateFiller(c.Qo,o);break;case"formsDataEvent":n={event:r="forms",tag_name:_="VS - GA - Forms",form_status:"form_submitted"},o=this.compileFullTemplate(n),i=this.templateFiller(c.Uo,o);break;case"errorDataEvent":n={event:r="errors",tag_name:_="VS - GA - Errors",error_type:t.error_type,error_details:t.error_details},o=this.compileFullTemplate(n),i=this.templateFiller(c.BV,o);break;case"videoTrackingDataEvent":n={event:r="video_tracking",tag_name:_="VS - GA - Video Tracking",video_status:t.status,video_title:t.title||"",video_percent:t.percent||0},o=this.compileFullTemplate(n),i=this.templateFiller(c.lz,o);break;case"socialShareDataEvent":r="share",_="VS - GA - Share",void 0!==t.target.text&&(l=t.target.text.trim()),n={event:r,tag_name:_,click_text:l,click_URL:a},o=this.compileFullTemplate(n),i=this.templateFiller(c.g4,o);break;case"carbonQuestionEvent":n={event:r="carbonCalculatorQuestion",tag_name:_="VS - GA - Carbon Calculator Question Answered",question_number:t.questionNumber,answer:t.answer},o=this.compileFullTemplate(n),i=this.templateFiller(c.QI,o);break;case"carbonCompleteEvent":n={event:r="carbonCalculatorComplete",tag_name:_="VS - GA - Carbon Calculator Complete",total_emissions:t.totalEmissions,total_per_day:t.totalPerDay,travel_percent:t.travelPercent,accommodation_percent:t.accommodationPercent,food_percent:t.foodPercent},o=this.compileFullTemplate(n),i=this.templateFiller(c.T9,o)}this.pushToDataLayer(i)},returnIsoDate:function(){return new Date(Date.now()).toISOString()},pushToDataLayer:function(e){var t=this;this.dataLayerLoadConfirmed?window.dataLayer.push(e):(0,i.A)("dataLayer",(function(){t.dataLayerLoadConfirmed=!0,window.dataLayer.push(e)}))},compileFullTemplate:function(e){var t=l(l({},this.dataLayerStore.GTMData),e);return t.hit_timestamp=this.returnIsoDate(),t},targetText:function(e){return e.target.text?e.target.text.trim():""}}};t.default=p},63555:function(e,t){t.A=function e(t,a){window.setTimeout((function(){window[t]?a(window[t]):e(t,a)}),500)}},12554:function(e,t,a){a.d(t,{BV:function(){return s},C0:function(){return c},Gn:function(){return _},P4:function(){return i},QI:function(){return m},Qo:function(){return p},T9:function(){return y},Uf:function(){return l},Uo:function(){return u},Vq:function(){return r},g4:function(){return o},lz:function(){return g},qv:function(){return n}});var r=["event","site_language","content_language","content_category","content_page_type","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","content_region","content_city","provider_search_region","provider_search_category","provider_search_facilities","provider_search_grading","provider_search_awards","provider_search_rooms","provider_search_min_price","provider_search_max_price","provider_category","provider_category_level_1","provider_category_level_2","provider_name","provider_ID","star_grading","provider_region","provider_city","provider_has_website","page_with_booking_link","provider_has_availability","availability_search_start_date","availability_search_end_date","availability_search_no_of_nights","availability_search_no_of_adults","availability_search_no_of_children","availability_search_no_of_rooms","availability_search_price_range","hit_timestamp","tag_name","meta_data"],_=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","user_country_setting","hit_timestamp","tag_name","meta_data","psr_search_type","psr_search_location","page_path"],n=["event","site_language","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],o=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],i=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_URL","location_on_page"],c=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_URL"],g=["event","language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","video_status","video_title","video_percent"],l=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],p=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","click_text","click_URL"],s=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","error_type","error_details","page_path"],u=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","page_path","form_status"],m=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","question_number","answer"],y=["event","site_language","page_category_1","page_category_2","page_category_3","page_category_4","page_category_5","page_category_6","user_country_setting","hit_timestamp","tag_name","meta_data","total_emissions","total_per_day","travel_percent","accommodation_percent","food_percent"]},4859:function(e,t,a){var r=a(17527),_=(0,a(48086).defineStore)("datalayer",(function(){var e=(0,r.ref)(""),t=(0,r.ref)(!1),a=(0,r.ref)({});return{pageUrl:e,tagsTestRun:t,GTMData:a,getValueFromKey:function(e){return a.value[e]},setTestRun:function(e){t.value=e},setPageUrl:function(t){e.value=t},processPayload:function(e){a.value[e.key]=e.value}}}));t.A=_}}]);