{"version":3,"sources":["webpack:///./src/project/modals/Modal.vue","webpack:///./src/project/modals/Modal.vue?4482","webpack:///./src/project/modals/Modal.vue?1301","webpack:///./src/project/site/SitePickerOverlay.vue?f73b","webpack:///./src/project/site/SitePickerOverlay.vue","webpack:///./src/project/site/SitePickerOverlay.vue?7a89","webpack:///./src/project/site/SitePickerOverlay.vue?ef6d","webpack:///./src/core/messages/WebApiMessage.vue?7e3a","webpack:///./src/core/messages/WebApiMessage.vue","webpack:///./src/core/messages/WebApiMessage.vue?5af9","webpack:///./src/core/messages/WebApiMessage.vue?0b74"],"names":["data","ModalState","hideModal","this","modal","id","type","Object","required","render","staticRenderFns","component","_vm","_h","$createElement","_c","_self","staticClass","_v","_s","_f","headerLabel","_l","site","key","attrs","url","siteLanguageLabel","languageCode","countryCode","_e","scopedSlots","_u","fn","ref","handleSubmit","on","$event","preventDefault","submit","model","value","callback","$$v","selectedCountryOption","expression","countryOption","countryIndex","domProps","countryLabel","languageCanBeChanged","selectedSite","siteIndex","updatingServer","Modal","basketChangeWarning","uaIsBot","getCountryOptions","newOptions","preFillInSelections","sortedOptions","siteOptions","countries","map","country","push","sites","sort","a","b","localeCompare","countryCodeAllowedList","languageCodeDisallowedList","countryOptions","flatMap","filter","includes","toLowerCase","isLoggedIn","preFillInSiteSelection","length","countryCanBeChanged","languageLabel","closeOverlay","siteId","find","be","getCountryCode","s","getSiteId","immediate","components","WebApiMessage","messages","_t","message","ix","getMessage","errorId","bus","onMessages","validationErrorEvent","messagesId","handled","msgOrLabel","exists","get","off"],"mappings":"wJAKA,IAAqB,EAArB,cAAmC,OAIrB,aAAaA,GACnBC,EAAA,KAAWC,UAAUC,KAAKC,MAAMC,GAAIL,KAHxC,gBADC,eAAK,CAAEM,KAAMC,OAAQC,UAAU,K,4BADf,EAAK,gBADzB,QACoB,OCLjBC,EAAQC,EDKS,IEL6X,I,YDO9YC,EAAY,eACd,EACAF,EACAC,GACA,EACA,KACA,KACA,MAIa,OAAAC,E,kDElBf,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qBE,WAIrB,WAAWC,GACf,OAAI,OAAkBC,OAAOD,GAClB,OAAkBE,IAAIF,GAE1BA,EAGH,YACJL,EAAA,KAAIQ,IAAI,OAAyBxG,KAAKiG,cAtB1C,gBAHC,eAAK,CACF5F,UAAU,K,yBAJG,EAAa,gBADjC,QACoB,WCzBqY,I,YCOtZG,EAAY,eACd,EACAF,EACAC,GACA,EACA,KACA,KACA,MAIa,OAAAC,E","file":"js/chunk-33021848.485c73b5.js","sourcesContent":["\r\nimport { Vue, Component, Prop } from 'vue-property-decorator';\r\nimport { IModal, ModalState } from '@/core/modals/ModalState';\r\n\r\n@Component\r\nexport default class Modal extends Vue {\r\n @Prop({ type: Object, required: true })\r\n protected modal!: IModal;\r\n\r\n protected closeOverlay(data?: any) {\r\n ModalState.hideModal(this.modal.id, data);\r\n }\r\n}\r\n","var render, staticRenderFns\nimport script from \"./Modal.vue?vue&type=script&lang=ts&\"\nexport * from \"./Modal.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Modal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./Modal.vue?vue&type=script&lang=ts&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('article',{staticClass:\"site-picker-overlay relative\"},[_c('h1',{staticClass:\"mb-20\"},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")(_vm.headerLabel))+\" \")]),(_vm.uaIsBot)?_c('ul',_vm._l((_vm.indexableSites),function(site){return _c('li',{key:site.id},[_c('a',{attrs:{\"href\":site.url}},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")(_vm.siteLanguageLabel(site.languageCode)))+\" (\"+_vm._s(site.countryCode)+\" - \"+_vm._s(site.languageCode)+\") \")])])}),0):_vm._e(),_c('ValidationObserver',{staticClass:\"mt-15\",attrs:{\"tag\":\"div\"},scopedSlots:_vm._u([{key:\"default\",fn:function(ref){\nvar handleSubmit = ref.handleSubmit;\nreturn [_c('form',{staticClass:\"bg-white\",on:{\"submit\":function($event){$event.preventDefault();return handleSubmit(_vm.submit)}}},[(_vm.countryCanBeChanged)?_c('section',[_c('h2',{staticClass:\"text-14 font-bold mb-10\"},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")('SitePicker.PleaseChooseCountry'))+\" \")]),_c('InputSelect',{attrs:{\"rules\":\"required\",\"name\":\"bu-select\"},model:{value:(_vm.selectedCountryOption),callback:function ($$v) {_vm.selectedCountryOption=$$v},expression:\"selectedCountryOption\"}},_vm._l((_vm.countryOptions),function(countryOption,countryIndex){return _c('option',{key:((countryOption.id) + \"-\" + countryIndex),domProps:{\"value\":countryOption}},[_vm._v(\" \"+_vm._s(countryOption.countryLabel)+\" \")])}),0)],1):_vm._e(),_c('section',{staticClass:\"mt-20\"},[_c('h2',{staticClass:\"text-14 font-bold mb-10\"},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")('SitePicker.PleaseChooseLanguage'))+\" \")]),_c('InputSelect',{attrs:{\"rules\":\"required\",\"name\":\"lang-select\",\"disabled\":!_vm.languageCanBeChanged},model:{value:(_vm.selectedSite),callback:function ($$v) {_vm.selectedSite=$$v},expression:\"selectedSite\"}},_vm._l((_vm.sites),function(site,siteIndex){return _c('option',{key:((site.siteId) + \"-\" + siteIndex),domProps:{\"value\":site}},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")(_vm.siteLanguageLabel(site.languageCode)))+\" \")])}),0)],1),_c('web-api-message',{attrs:{\"id\":\"switch-site\"}}),(_vm.basketChangeWarning)?_c('p',{staticClass:\"mt-20\"},[_vm._v(\" \"+_vm._s(_vm._f(\"t\")('SitePicker.BasketChangeWarning'))+\" \")]):_vm._e(),_c('call-to-action',{staticClass:\"mt-20\",attrs:{\"disabled\":_vm.updatingServer,\"text\":_vm._f(\"t\")('SitePicker.ChangeBtn'),\"type\":\"submit\"}})],1)]}}])})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Modal from '@/project/modals/Modal.vue';\r\nimport { Component, Watch } from 'vue-property-decorator';\r\nimport WebApiMessage from '@/core/messages/WebApiMessage.vue';\r\nimport { CountryOptionsViewModel, CountryOptionViewObject, SiteViewObject } from '@/types/apiServerContract';\r\nimport authService from '@/core/auth/auth.service';\r\nimport siteService from '@/project/site/site.service';\r\nimport botService from '@/project/site/bot.service';\r\nimport translateFilter from '@/core/translation/translate.filter';\r\n\r\ninterface ICountryOptionViewExtended extends CountryOptionViewObject {\r\n countryLabel: string;\r\n}\r\n\r\n@Component({\r\n components: { WebApiMessage }\r\n})\r\nexport default class SitePickerOverlay extends Modal {\r\n private updatingServer = false;\r\n private selectedCountryOption: CountryOptionViewObject | null = null;\r\n private selectedSite: SiteViewObject | null = null;\r\n private basketChangeWarning = false;\r\n\r\n get siteOptions(): CountryOptionsViewModel | null {\r\n return siteService.getCountryOptions();\r\n }\r\n\r\n @Watch('siteOptions', { immediate: true })\r\n onSiteOptionsChange(newOptions) {\r\n if (newOptions) {\r\n this.preFillInSelections();\r\n }\r\n }\r\n\r\n get countryOptions(): ICountryOptionViewExtended[] {\r\n const sortedOptions: ICountryOptionViewExtended[] = [];\r\n if (this.siteOptions) {\r\n this.siteOptions.countries.map((country) => {\r\n sortedOptions.push({ countryLabel: this.countryLabel(country.countryCode), countryCode: country.countryCode, id: country.id, sites: country.sites });\r\n });\r\n }\r\n return sortedOptions.sort((a, b) => a.countryLabel.localeCompare(b.countryLabel));\r\n }\r\n\r\n get sites(): SiteViewObject[] {\r\n return this.selectedCountryOption?.sites ?? [];\r\n }\r\n\r\n private get indexableSites() {\r\n const countryCodeAllowedList = ['en', 'gb', 'ie'];\r\n const languageCodeDisallowedList = ['en'];\r\n return this.countryOptions\r\n .flatMap(country => country.sites)\r\n .filter(sites => countryCodeAllowedList.includes(sites.countryCode.toLowerCase()) ||\r\n !languageCodeDisallowedList.includes(sites.languageCode.toLowerCase()));\r\n }\r\n\r\n private uaIsBot: boolean = botService.uaIsBot();\r\n\r\n @Watch('selectedCountryOption')\r\n onSelectedCountryOptionChanged() {\r\n if (authService.isLoggedIn()) {\r\n this.basketChangeWarning = true;\r\n }\r\n\r\n this.preFillInSiteSelection();\r\n }\r\n\r\n get countryCanBeChanged(): boolean {\r\n return this.countryOptions.length > 1;\r\n }\r\n\r\n get languageCanBeChanged(): boolean {\r\n return this.sites.length > 1;\r\n }\r\n\r\n get headerLabel(): string {\r\n return this.countryCanBeChanged ? 'SitePicker.Header' : 'SitePicker.HeaderOnlyLanguage';\r\n }\r\n\r\n siteLanguageLabel(languageCode: string): string {\r\n return siteService.languageLabel(languageCode);\r\n }\r\n\r\n countryLabel(countryCode: string): string {\r\n return translateFilter(siteService.countryLabel(countryCode));\r\n }\r\n\r\n async submit() {\r\n this.closeOverlay({ siteId: this.selectedSite!.siteId });\r\n }\r\n\r\n preFillInSelections(): void {\r\n // Country\r\n this.selectedCountryOption = this.countryOptions.find(be => be.countryCode.toLowerCase() === siteService.getCountryCode()?.toLowerCase()) ?? null;\r\n\r\n // Lang\r\n this.preFillInSiteSelection();\r\n }\r\n\r\n preFillInSiteSelection(): void {\r\n this.selectedSite = this.sites.find(s => s.siteId === siteService.getSiteId()) ?? this.sites[0];\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SitePickerOverlay.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SitePickerOverlay.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./SitePickerOverlay.vue?vue&type=template&id=09a1f815&\"\nimport script from \"./SitePickerOverlay.vue?vue&type=script&lang=ts&\"\nexport * from \"./SitePickerOverlay.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (_vm.messages.length > 0)?_c('div',[_vm._t(\"default\",function(){return [_c('ul',{staticClass:\"text-red-500 text-12 font-medium list-reset\"},_vm._l((_vm.messages),function(message,ix){return _c('li',{key:ix,staticClass:\"mt-15\"},[_vm._v(\" \"+_vm._s(_vm.getMessage(message.message))+\" \"),(_vm.errorId)?[_vm._v(\" [ \"+_vm._s(_vm.errorId)+\"] \")]:_vm._e()],2)}),0)]},{\"messages\":_vm.messages})],2):_vm._e()}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n\r\nimport Vue from 'vue';\r\nimport Component from 'vue-class-component';\r\nimport { Prop } from 'vue-property-decorator';\r\nimport bus from '@/core/bus';\r\nimport { ClientMessage, ValidationErrorEvent, ValidationErrorEventKey } from '@/core/messages/types';\r\nimport dictionaryService from '@/core/translation/dictionary.service';\r\n\r\n@Component\r\nexport default class WebApiMessage extends Vue {\r\n private messages: ClientMessage[] = [];\r\n private errorId: string = '';\r\n @Prop({\r\n required: true\r\n })\r\n private id!: string;\r\n\r\n private created() {\r\n bus.on(ValidationErrorEventKey, this.onMessages);\r\n }\r\n\r\n private onMessages(validationErrorEvent: ValidationErrorEvent) {\r\n if (validationErrorEvent.messagesId === this.id) {\r\n this.messages = validationErrorEvent.messages;\r\n this.errorId = validationErrorEvent.errorId;\r\n validationErrorEvent.handled();\r\n }\r\n }\r\n\r\n private getMessage(msgOrLabel: string): string {\r\n if (dictionaryService.exists(msgOrLabel)) {\r\n return dictionaryService.get(msgOrLabel);\r\n }\r\n return msgOrLabel;\r\n }\r\n\r\n private destroyed() {\r\n bus.off(ValidationErrorEventKey, this.onMessages);\r\n }\r\n}\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./WebApiMessage.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./WebApiMessage.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./WebApiMessage.vue?vue&type=template&id=5e361244&\"\nimport script from \"./WebApiMessage.vue?vue&type=script&lang=ts&\"\nexport * from \"./WebApiMessage.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}