1!function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var l="function"==typeof require&&require;if(!s&&l)return l(a,!0);if(i)return i(a,!0);var c=new Error("Cannot find module '"+a+"'");throw c.code="MODULE_NOT_FOUND",c}var u=n[a]={exports:{}};t[a][0].call(u.exports,(function(e){return o(t[a][1][e]||e)}),u,u.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;a<r.length;a++)o(r[a]);return o}({1:[function(e,t,n){"use strict";!function(e){if("function"!=typeof n){var n=function(e){return e};n.nonNative=!0}const r=n("plaintext"),o=n("html"),i=n("comment"),a=/<(\w*)>/g,s=/<\/?([^\s\/>]+)/;function l(e,t,n){return u(e=e||"",c(t=t||[],n=n||""))}function c(e,t){return{allowable_tags:e=function(e){let t=new Set;if("string"==typeof e){let n;for(;n=a.exec(e);)t.add(n[1])}else n.nonNative||"function"!=typeof e[n.iterator]?"function"==typeof e.forEach&&e.forEach(t.add,t):t=new Set(e);return t}(e),tag_replacement:t,state:r,tag_buffer:"",depth:0,in_quote_char:""}}function u(e,t){if("string"!=typeof e)throw new TypeError("'html' parameter must be a string");let n=t.allowable_tags,a=t.tag_replacement,s=t.state,l=t.tag_buffer,c=t.depth,u=t.in_quote_char,f="";for(let t=0,p=e.length;t<p;t++){let p=e[t];if(s===r)if("<"===p)s=o,l+=p;else f+=p;else if(s===o)switch(p){case"<":if(u)break;c++;break;case">":if(u)break;if(c){c--;break}u="",s=r,l+=">",n.has(d(l))?f+=l:f+=a,l="";break;case'"':case"'":u=p===u?"":u||p,l+=p;break;case"-":"<!-"===l&&(s=i),l+=p;break;case" ":case"\n":if("<"===l){s=r,f+="< ",l="";break}l+=p;break;default:l+=p}else if(s===i)if(">"===p)"--"==l.slice(-2)&&(s=r),l="";else l+=p}return t.state=s,t.tag_buffer=l,t.depth=c,t.in_quote_char=u,f}function d(e){let t=s.exec(e);return t?t[1].toLowerCase():null}l.init_streaming_mode=function(e,t){let n=c(e=e||[],t=t||"");return function(e){return u(e||"",n)}},"function"==typeof define&&define.amd?define((function(){return l})):"object"==typeof t&&t.exports?t.exports=l:e.striptags=l}(this)},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=_(e("./helpers/config")),i=_(e("./eventsManager")),a=e("./enum"),s=e("./helpers/http"),l=e("./entities/XHRObserver"),c=e("./entities/FetchObserver"),u=e("./helpers/url"),d=e("./entities/CurrenciesConverter"),f=e("./entities/DomObserver"),p=_(e("./entities/DomObserver/listeners/DynamicReplacementsListener")),h=_(e("./entities/DomObserver/listeners/CurrenciesListener")),m=_(e("./entities/DomObserver/listeners/LinksListener")),g=_(e("./entities/DomObserver/listeners/AppsIntegrationListener")),v=_(e("./entities/ThirdPartyApps/apps/ProductReviews")),y=e("./style"),b=_(e("./entities/DomObserver/listeners/SwitchersListener")),w=_(e("./entities/Switcher")),S=_(e("./entities/DomObserver/listeners/ShortcodesListener")),E=e("./helpers/location"),C=e("./helpers/abilities");function _(e){return e&&e.__esModule?e:{default:e}}function L(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}n.default=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init=function(){t.initLanguages(),t.initCurrencies();var e=(0,o.default)(),n=e.isInIframe,r=e.isDesignMode,a=e.isBot,s=e.currentLanguage,l=t.isLanguagesInitialized(),c=t.isCurrenciesInitialized(),u=t.isRequestedOriginalLanguage(),d=t.isPageExcluded();(l||c||!u)&&(t.setLoaded(),d||(l&&(t.initHashChangeListener(),n||(t.createXHRObserver(),t.createFetchObserver())),r&&t.initDesignModeListener(),t.createCurrenciesConverter(),t.initDocumentReadyListener(),n||a||t.getRequestState((function(e,n,r){t.startStateSession(),e&&n&&(t.saveStoredLanguage(e.code),t.saveStoredCurrency(n.code),t.currentLanguage.code===s&&e.code===t.currentLanguage.code&&n.code===t.currentCurrency.code||(t.isRecommendationAlertEnabled()&&r?t.isReady()?t.createRecommendationAlert(e,n):i.default.on("ready",(function(){return t.createRecommendationAlert(e,n)})):t.switchLanguageAndCurrency(e,n,!0)))}))))},this.initLanguages=function(){var e=(0,o.default)(),n=e.originalLanguage,r=e.currentLanguage,i=e.shopifyLocales,a=e.isStorageSupported;if(n&&r){t.languages=t.getLanguages(),t.originalLanguage=n,t.currentLanguage=t.getCurrentLanguage(),t.storedLanguage=t.getStoredLanguage(),t.previewLanguage=t.getPreviewLanguage();var s=i.find((function(e){return"/"===e.rootUrl}));t.defaultLanguage=s?s.code:null,a&&t.defaultLanguage&&window.localStorage.setItem("ls-default-locale",t.defaultLanguage)}},this.initCurrencies=function(){(0,o.default)().defaultCurrency&&(t.currencies=t.getCurrencies(),t.defaultCurrency=(0,o.default)().defaultCurrency,t.storedCurrency=t.getStoredCurrency(),t.currentCurrency=t.getCurrentCurrency())},this.initDocumentReadyListener=function(){"loading"===document.readyState?document.addEventListener("DOMContentLoaded",t.onDocumentReady):t.onDocumentReady()},this.initStyles=function(){var e=document.createElement("style");e.innerHTML=(0,y.getStyles)(),document.head.appendChild(e)},this.onDocumentReady=function(){var e=t.isLanguagesInitialized(),n=t.isCurrenciesInitialized(),r=t.isRequestedDefaultLanguage(),s=t.isShopifyCurrenciesEnabled(),l=t.isMoneyFormatConfigured();(0,o.default)().recommendationAlert&&(t.recommendationAlert=(0,o.default)().recommendationAlert),!(0,o.default)().isNeedInitStyles&&(0,o.default)().isShadowDomSupp
1orted||t.initStyles(),i.default.trigger(a.EventsEnum.BEFORE_SWITCHERS_CREATED),e&&(t.languagesSwitchers=t.createLanguagesSwitcher(t.languages,t.currentLanguage)),n&&(s||l)&&(t.currenciesSwitchers=t.createCurrenciesSwitcher(t.currencies,t.currentCurrency)),i.default.trigger(a.EventsEnum.AFTER_SWITCHERS_CREATED),e&&!r&&t.updateRelativeLinks(document.body),(0,o.default)().originalLanguage.code!==(0,o.default)().currentLanguage&&t.translateApps(document.body,!0),t.convertCurrencies(),t.createDomObserver(document.body),t.instantClickListener(),t.windowClickListener(),t.setReady()},this.setLoaded=function(){t.loaded=!0,i.default.trigger(a.EventsEnum.LOADED)},this.setReady=function(){t.ready=!0,i.default.trigger(a.EventsEnum.READY)},this.createCurrenciesConverter=function(){t.currencyConverter=new d.CurrenciesConverter(t.currencies,t.currentCurrency.code,t.defaultCurrency.code)},this.createRecommendationAlert=function(e,n){return(0,o.default)().recommendationAlert.create(t.languages,t.currencies,e.code!==t.currentLanguage.code?e.code:null,n.code!==t.currentCurrency.code?n.code:null)},this.convertCurrencies=function(){t.isShopifyCurrenciesEnabled()||t.isCurrenciesInitialized()&&t.currencyConverter.convertAll(t.currentCurrency.code)},this.initHashChangeListener=function(){window.addEventListener("hashchange",(function(){var e=window.location.hash.substr(1).split("=");if(2===e.length)switch(e[0]){case"locale":window.history.replaceState("",document.title,window.location.pathname+window.location.search);var n=t.languages.find((function(t){return t.code===e[1]}));if(!n)return;t.switchLanguage(n);break;case"currency":window.history.replaceState("",document.title,window.location.pathname+window.location.search);var r=t.currencies.find((function(t){return t.code===e[1]}));if(!r)return;t.switchCurrency(r)}}),!1)},this.initDesignModeListener=function(){var e=new S.default(t.handleShortcode);window.addEventListener("shopify:section:load",(function(t){var n=t.target;n&&e.handleMutatedNodes([n])}))},this.getRequestState=function(e){if(t.previewLanguage)return e(t.previewLanguage,t.currentCurrency);var n=t.isRequestedDefaultLanguage(),r=t.isRecommendationAlertEnabled();if((0,o.default)().isStorageSupported){if((n||r)&&t.shouldCheckVisitorMappings())return t.getVisitorMappings((function(n,r){e(n||t.currentLanguage,r||t.currentCurrency,!0)}));if(n&&!t.isEmptyStorage()&&!t.hasStateSession()&&!(0,o.default)().isSameSiteReferrer)return e(t.storedLanguage||t.currentLanguage,t.storedCurrency||t.currentCurrency)}return e(t.currentLanguage,t.currentCurrency)},this.isPageExcluded=function(){for(var e=window.location.pathname,t=["^\\/gift_cards"],n=0,r=t.length;n<r;n++){if(new RegExp(t[n],"g").exec(e))return!0}return!1},this.isLoaded=function(){return t.loaded},this.isReady=function(){return t.ready},this.isRequestedOriginalLanguage=function(){return t.currentLanguage.code===t.originalLanguage.code},this.isRequestedDefaultLanguage=function(){var e=(0,o.default)().shopifyLocales.find((function(e){return e.code===t.currentLanguage.code}));return!!e&&"/"===e.rootUrl},this.isLanguagesInitialized=function(){return t.currentLanguage&&t.languages.length>1},this.isCurrenciesInitialized=function(){return t.defaultCurrency&&t.currencies.length>1},this.isRequestedDefaultCurrency=function(){return t.currentCurrency.code===t.defaultCurrency.code},this.isEmptyStorage=function(){return!t.storedLanguage&&!t.storedCurrency},this.isShopifyCurrenciesEnabled=function(){return(0,o.default)().shopifyCurrencies.length>1},this.isMoneyFormatConfigured=function(){var e=!0;return[(0,o.default)().storeMoneyFormat,(0,o.default)().storeMoneyWithCurrencyFormat].forEach((function(t){var n=document.createElement("div");n.innerHTML=t,n.querySelector("span.money")||(e=!1)})),e},this.isRecommendationAlertEnabled=function(){var e=(0,o.default)().recommendationAlert;return e&&e.canBeCreated()},this.isAutomaticRedirectsEnabled=function(){return(0,o.default)().allowAutomaticRedirects&&(0,C.hasAbility)(C.USE_MAPPINGS)},this.shouldCheckVisitorMappings=function(){if(!t.isEmptyStorage())return!1;var e=(0,o.default)(),n=e.languageDetection,r=e.currencyDetection;return(n!==a.LanguageDetectionEnum.STORE||r!==a.CurrencyDetectionEnum.STORE)&&(t.isRecommendationAlertEnabled()||t.isAutomaticRedirectsEnabled())},this.getVisitorMappings=function(e){var n=void 0,r=void 0;if((0,o.default)().languageDetection===a.LanguageDetectionEnum.BROWSER||(0,o.default)().currencyDetection===a.CurrencyDetectionEnum.LANGUAGE){var i=void 0,s=t.getVisitorBrowserLanguages();if((0,o.default)().languageDetection===a.LanguageDetectionEnum.BROWSER)for(i=0;i<s.length&&!(r=t.getLanguageByBrowser(s[i]));i++);if((0,o.default)().currencyDetection===a.CurrencyDetectionEnum.LANGUAGE)for(i=0;i<s.length&&!(n=t.getCurrencyByLanguage(s[i]));i++);}(0,o.default)().languageDetection===a.LanguageDetectionEnum.LOCATION||(0,o.default)().currencyDetection===a.CurrencyDetectionEnum.LOCATION?t.getVisitorCountry((function(i){(0,o.default)().languageDetection===a.LanguageDetectionEnum.LOCATION&&(r=t.getLanguageByCountry(i)),(0,o.default)().currencyDetection===a.CurrencyDetectionEnum.LOCATION&&(n=t.getCurrencyByCountry(i)),e(r,n)}),(function(){e(r,n)})):e(r,n)},this.getVisitorBrowserLanguages=function(){if(Array.isArray(navigator.languages)
1)return navigator.languages;var e=navigator.language;return e?[e]:["en"]},this.getLanguageByBrowser=function(e){var n=(0,o.default)().languagesBrowsers.find((function(t){return t.browsers.indexOf(e)>-1||t.browsers.indexOf(e.substring(0,2))>-1}));return n?t.languages.find((function(e){return e.code===n.code})):t.languages.find((function(t){return t.code===e||t.code===e.substring(0,2)}))},this.getLanguageByCountry=function(e){var n=(0,o.default)().languagesCountries.find((function(t){return t.countries.indexOf(e)>-1}));return n?t.languages.find((function(e){return e.code===n.code})):null},this.getCurrencyByLanguage=function(e){var n=(0,o.default)().currenciesLanguages.find((function(t){return t.languages.indexOf(e)>-1||t.languages.indexOf(e.substring(0,2))>-1}));return n?t.currencies.find((function(e){return e.code===n.code})):null},this.getCurrencyByCountry=function(e){var n=(0,o.default)().currenciesCountries.find((function(t){return t.countries.indexOf(e)>-1}));return n?t.currencies.find((function(e){return e.code===n.code})):null},this.getVisitorCountry=function(e,t){var n=0,o=[{url:"https://get.geojs.io/v1/ip/country",success:function(t){return t?(t=t.replace(/[\s]+/g,""),/^[A-Z]{2}$/.test(t)?void e(t.toLowerCase()):(n++,void i(o[n]))):(n++,void i(o[n]))}},{url:"https://ipapi.co/country/",success:function(t){return t?(t=t.replace(/[\s]+/g,""),/^[A-Z]{2}$/.test(t)?void e(t.toLowerCase()):(n++,void i(o[n]))):(n++,void i(o[n]))}},{url:"https://ipinfo.io/json",success:function(t){var a=JSON.parse(t);a&&"object"===(void 0===a?"undefined":r(a))&&a.hasOwnProperty("country")?e(a.country.toLowerCase()):(n++,i(o[n]))}},{url:"https://extreme-ip-lookup.com/json/",success:function(t){var a=JSON.parse(t);a&&"object"===(void 0===a?"undefined":r(a))&&a.hasOwnProperty("countryCode")&&a.countryCode?e(a.countryCode.toLowerCase()):(n++,i(o[n]))}}],i=function e(r){if(r){var i=(0,s.getXMLHttpClient)();i.timeout=3e3,i.open("GET",r.url,!0),i.onload=function(){if(4===i.readyState){if(200!==i.status)return n++,void e(o[n]);try{r.success(i.responseText)}catch(t){n++,e(o[n])}}},i.ontimeout=function(){n++,e(o[n])},i.onerror=function(){n++,e(o[n])},i.send()}else t()};i(o[n])},this.instantClickListener=function(){"object"===r(window.InstantClick)&&window.InstantClick.hasOwnProperty("on")&&window.InstantClick.on("change",(function(){t.languagesSwitchers.forEach((function(e){e.remove(),e.create(t.languages,t.currentLanguage.code)})),t.currenciesSwitchers.forEach((function(e){e.remove(),e.create(t.currencies,t.currentCurrency.code)}))}))},this.windowClickListener=function(){window.addEventListener("click",(function(e){(t.languagesSwitchers.length||t.currenciesSwitchers.length)&&[].concat(L(t.languagesSwitchers),L(t.currenciesSwitchers)).forEach((function(t){t.hasOwnProperty("handleWindowClick")&&t.handleWindowClick(e)}))}))},this.createDomObserver=function(e){if(!(0,o.default)().isMutationObserverSupported)return null;var n=t.isLanguagesInitialized(),r=t.isRequestedDefaultLanguage(),i=t.isRequestedOriginalLanguage(),a=t.isCurrenciesInitialized(),s=t.isShopifyCurrenciesEnabled(),l=[];(n||a)&&l.push(new b.default([].concat(L(t.languagesSwitchers),L(t.currenciesSwitchers)),(function(e){e.remove(),e.resource===w.default.RESOURCE_LANGUAGES?e.create(t.languages,t.currentLanguage.code):e.create(t.currencies,t.currentCurrency.code)}))),n&&!r&&l.push(new m.default(t.updateRelativeLinks));var c=(0,E.locationTemplate)(),u=(0,o.default)().themeDynamics.filter((function(e){return e.shouldBeChecked(c)}));return!i&&u.length&&(0,C.hasAbility)(C.USE_DYNAMIC_REPLACEMENTS)&&l.push(new p.default(u)),a&&!s&&l.push(new h.default(t.currencyConverter)),n&&!r&&(0,C.hasAbility)(C.USE_THIRD_PARTY_APPS)&&l.push(new g.default(t.translateApps)),l.length?new f.DomObserver(e,l):null},this.createXHRObserver=function(){return new l.XHRObserver(t)},this.createFetchObserver=function(){return new c.FetchObserver(t)},this.createLanguagesSwitcher=function(e,t){return e.length<=1?[]:(0,o.default)().languagesSwitchers.map((function(n){return n.create(e,t.code)}))},this.createCurrenciesSwitcher=function(e,n){return t.currencies.find((function(e){return e.code===(0,o.default)().currentCurrency}))?e.length<=1?[]:(0,o.default)().currenciesSwitchers.map((function(t){return t.create(e,n.code)})):[]},this.getLanguages=function(){var e=(0,o.default)(),t=e.originalLanguage,n=e.targetLanguages,r=e.isAdmin,i=e.isPreview,a=e.isPrimaryDomain,s=e.shopifyLocales;return t?[].concat(L(n),[t]).filter((function(e){return!(!r&&!i||!a)||-1!==s.findIndex((function(t){return t.code===e.code}))})):[]},this.getCurrencies=function(){if(!(0,o.default)().defaultCurrency)return[];var e=(0,o.default)().targetCurrencies.concat([(0,o.default)().defaultCurrency]);return t.isShopifyCurrenciesEnabled()?e.filter((function(e){return-1!==(0,o.default)().shopifyCurrencies.indexOf(e.code)})):e},this.getCurrentLanguage=function(){var e=(0,o.default)().currentLanguage;return t.languages.find((function(t){return t.code===e}))},this.getPreviewLanguage=function(){var e=(0,u.getQueryParameter)("preview_locale");return"string"!=typeof e?null:t.languages.find((function(t){return t.code===e}))||t.currentLanguage},this.getCurrentCurrency=function(){return(t.isShopifyCurrenciesEnabled()?t.currencies.find((function(e){return e.code===(0,o.default)().currentCurrency})):t.getQueryCurrency()||t.getStoredCurrency())||(0,o.default)().defaultCurrency}
1,this.updateCart=function(e,t,n){var r=(0,s.getXMLHttpClient)();r.open("POST","/cart/update.js?cache=false&_="+(new Date).getTime(),!0),r.setRequestHeader("Content-type","application/json"),r.send(JSON.stringify(e)),r.onload=function(){4===r.readyState&&(r.status>=400||r.status<200?n&&n():t&&t())},r.onerror=n},this.getStoredLanguage=function(){return(0,o.default)().isStorageSupported&&localStorage.getItem("ls-locale")?t.languages.find((function(e){return e.code===localStorage.getItem("ls-locale")})):null},this.saveStoredLanguage=function(e){(0,o.default)().isStorageSupported&&localStorage.setItem("ls-locale",e)},this.getQueryCurrency=function(){var e=new URLSearchParams(window.location.search.substring(1)).get("currency");return e&&(e=e.toLowerCase()),t.currencies.find((function(t){return t.code===e}))},this.getStoredCurrency=function(){return t.isShopifyCurrenciesEnabled()?null:(0,o.default)().isStorageSupported&&localStorage.getItem("ls-currency")?t.currencies.find((function(e){return e.code===localStorage.getItem("ls-currency")})):null},this.saveStoredCurrency=function(e){(0,o.default)().isStorageSupported&&localStorage.setItem("ls-currency",e)},this.startStateSession=function(){(0,o.default)().isStorageSupported&&sessionStorage.setItem("ls-state-session","yes")},this.hasStateSession=function(){return!!(0,o.default)().isStorageSupported&&!!sessionStorage.getItem("ls-state-session")},this.switchLanguage=function(e){t.isLoaded()&&(t.languagesSwitchers.forEach((function(t){return t.setActive(e.code)})),(0,o.default)().isInIframe||(i.default.trigger(a.EventsEnum.BEFORE_LANGUAGE_SWITCHED,[e.code]),t.saveStoredLanguage(e.code),window.location.href=e.getLink()))},this.switchCurrency=function(e){t.isLoaded()&&(t.currenciesSwitchers.forEach((function(t){return t.setActive(e.code)})),(0,o.default)().isInIframe||(i.default.trigger(a.EventsEnum.BEFORE_CURRENCY_SWITCHED,[e.code]),t.saveStoredCurrency(e.code),t.isShopifyCurrenciesEnabled()?(0,o.default)().currencyInQueryParam?window.location.href=e.getLink():t.updateCart({form_type:"currency",utf8:"â",return_to:window.location.pathname,currency:e.code.toUpperCase()},(function(){return window.location.reload()}),(function(){return window.location.reload()})):(t.currencyConverter.convertAll(e.code),t.currentCurrency=e,(0,o.default)().currencyInQueryParam&&history.replaceState({},null,e.getLink()),i.default.trigger(a.EventsEnum.AFTER_CURRENCY_SWITCHED,[e.code]))))},this.switchLanguageAndCurrency=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(t.isLoaded()&&!(0,o.default)().isInIframe&&(!r||t.isAutomaticRedirectsEnabled()))if(e.code!==t.currentLanguage.code)if(n.code!==t.currentCurrency.code)if(i.default.trigger(a.EventsEnum.BEFORE_LANGUAGE_SWITCHED,[e.code]),i.default.trigger(a.EventsEnum.BEFORE_CURRENCY_SWITCHED,[n.code]),t.saveStoredCurrency(n.code),t.saveStoredLanguage(e.code),(0,o.default)().currencyInQueryParam){var s=(0,u.parseUrl)(e.getLink()),l=new URLSearchParams(s.search.substring(1));l.set("currency",n.code),s.search="?"+l.toString(),window.location.href=(0,u.buildUrl)(s)}else{var c=e.getLink();t.updateCart({form_type:"currency",utf8:"â",return_to:c,currency:n.code.toUpperCase()},(function(){return window.location.href=c}),(function(){return window.location.href=c}))}else t.switchLanguage(e);else t.switchCurrency(n)},this.updateRelativeLinks=function(e){if(e&&(e.nodeType===Node.TEXT_NODE&&e.parentNode&&(e=e.parentNode),e.nodeType===Node.ELEMENT_NODE)){var t=(0,u.getRequestRoot)(),n=window.location.pathname.replace(t,"");n||(n="/");for(var r="A"!==e.nodeName?e.querySelectorAll("a"):[e],o=0,i=r.length;o<i;o++){var a=r[o],s=a.getAttribute("href");"string"==typeof s&&(s!==n&&(s.startsWith("/cart")||s.startsWith("/search")||s.startsWith("/blogs")||s.startsWith("/account")||s.startsWith("/products")||s.startsWith("/pages")||s.startsWith("/checkout")||s.startsWith("/policies")||s.startsWith("/collections")||s.startsWith("/apps/")||s.startsWith("/a/")||s.startsWith("/community/")||s.startsWith("/tools/"))&&a.setAttribute("href",t+s))}}},this.handleShortcode=function(e){var n=(e=e.substring(1,e.length-1)).split(" ").map((function(e){return e.trim()}));if(n.length<2)return null;var r=n.shift();if("LS_LANGUAGES_SWITCHER"===r){var o=parseInt(n.shift(),10),i=t.languagesSwitchers.find((function(e){return e.id===o}));if(!i)return null;var a=document.createElement("div");return a.classList.add("ls-sw-"+i.resource,"ls-sw-"+i.resource+"-"+i.id),a.setAttribute("translate","no"),a}if("LS_LANGUAGE_TITLE"===r){var s=n.shift(),l=t.languages.find((function(e){return e.code===s}));return s?l.getTitle():null}if("LS_LANGUAGE_HREF"===r){var c=n.shift(),u=t.languages.find((function(e){return e.code===c}));return u?'javascript:LangShopSDK.switchLanguage("'+c+'");':null}if("LS_CURRENCIES_SWITCHER"===r){var d=parseInt(n.shift(),10),f=t.currenciesSwitchers.find((function(e){return e.id===d}));if(!f)return null;var p=document.createElement("div");return p.classList.add("ls-sw-"+f.resource,"ls-sw-"+f.resource+"-"+f.id),p.setAttribute("translate","no"),p}if("LS_CURRENCY_TITLE"===r){var h=n.shift(),m=t.currencies.find((function(e){return e.code===h}
1));return h?m.getTitle():null}if("LS_CURRENCY_HREF"===r){var g=n.shift(),v=t.currencies.find((function(e){return e.code===g}));return v?'javascript:LangShopSDK.switchCurrency("'+g+'");':null}return null},this.translateApps=function(e){for(var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=0;r<t.apps.length;r++){var o=t.apps[r];o.isNodesMatch(e,n)&&o.translate()}},this.configured=!1,this.loaded=!1,this.ready=!1,this.languages=[],this.languagesSwitchers=[],this.currencies=[],this.currenciesSwitchers=[],this.apps=[new v.default]}},{"./entities/CurrenciesConverter":5,"./entities/DomObserver":9,"./entities/DomObserver/listeners/AppsIntegrationListener":10,"./entities/DomObserver/listeners/CurrenciesListener":11,"./entities/DomObserver/listeners/DynamicReplacementsListener":12,"./entities/DomObserver/listeners/LinksListener":13,"./entities/DomObserver/listeners/ShortcodesListener":14,"./entities/DomObserver/listeners/SwitchersListener":15,"./entities/FetchObserver":17,"./entities/Switcher":35,"./entities/ThirdPartyApps/apps/ProductReviews":42,"./entities/XHRObserver":45,"./enum":46,"./eventsManager":47,"./helpers/abilities":48,"./helpers/config":51,"./helpers/http":55,"./helpers/location":59,"./helpers/url":66,"./style":70}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=h(e("./helpers/config")),i=e("./enum"),a=h(e("./eventsManager")),s=e("./entities/Switcher/switcherFactory"),l=e("./helpers/collection"),c=e("./entities/Currency"),u=e("./entities/Language"),d=e("./entities/RecommendationAlert/recommendationAlertFactory"),f=h(e("./LangShop")),p=e("./helpers/translator");function h(e){return e&&e.__esModule?e:{default:e}}n.default=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init=function(){return t.langShop.isLoaded()||t.langShop.init(),t},this.on=a.default.on,this.off=a.default.off,this.getLanguages=function(){return Array.from(t.langShop.languages.map((function(e){return e.toObject()})))},this.getCurrentLanguage=function(){return t.langShop.currentLanguage?t.langShop.currentLanguage.toObject():null},this.getOriginalLanguage=function(){return t.langShop.originalLanguage?t.langShop.originalLanguage.toObject():null},this.getCurrencies=function(){return Array.from(t.langShop.currencies.map((function(e){return e.toObject()})))},this.getCurrencyCode=function(){return t.langShop.isShopifyCurrenciesEnabled()?Shopify.currency.active:t.getCurrentCurrency().code.toUpperCase()},this.getCurrencyRate=function(){if(t.langShop.isShopifyCurrenciesEnabled())return parseFloat(Shopify.currency.rate);var e=t.getCurrentCurrency(),n=t.getOriginalCurrency();return e.rate/n.rate},this.getCurrentCurrency=function(){return t.langShop.currentCurrency?t.langShop.currentCurrency.toObject():null},this.getOriginalCurrency=function(){return t.langShop.defaultCurrency?t.langShop.defaultCurrency.toObject():null},this.getLocalizedPath=function(e){if(!t.isLoaded())return e;if(t.isOriginalLanguage())return e;var n="/"+t.langShop.currentLanguage.code;return e.trim().split("/")[0]&&(n+="/"),n+e},this.switchLanguage=function(e){if(t.isLoaded()){var n=t.langShop.languages.find((function(t){return t.code===e}));if(!n)throw new Error("Invalid language code");t.langShop.switchLanguage(n)}},this.switchCurrency=function(e){if(t.isLoaded()){var n=t.langShop.currencies.find((function(t){return t.code===e}));if(!n)throw new Error("Invalid currency code");t.langShop.switchCurrency(n)}},this.switchLanguageAndCurrency=function(e,n){if(t.isLoaded()){var r=t.langShop.languages.find((function(t){return t.code===e})),o=t.langShop.currencies.find((function(e){return e.code===n}));if(!r&&o)return t.langShop.switchCurrency(o);if(r&&!o)return t.langShop.switchLanguage(r);if(!o&&!r)throw new Error("Invalid currency and language code");t.langShop.switchLanguageAndCurrency(r,o)}},this.convertAmount=function(e){return isNaN(e)||(0,o.default)().defaultCurrency.code===t.langShop.currentCurrency.code||t.langShop.isShopifyCurrenciesEnabled()?e:t.langShop.currencyConverter.convert(e,(0,o.default)().defaultCurrency.code,t.langShop.currentCurrency.code)},this.getMoneyFormat=function(e){return e||(e=(0,o.default)().storeMoneyFormat),t.langShop.isShopifyCurrenciesEnabled()?e:t.langShop.currencyConverter.getMoneyFormat(t.langShop.currentCurrency.code)},this.formatMoney=function(e,n){return t.langShop.currencyConverter.formatMoney(e,n||(0,o.default)().storeMoneyFormat)},this.createLanguagesSwitcher=function(e,n,o){var i=void 0;if(!e)throw new Error('"switcher" argument is required');if("object"!==(void 0===e?"undefined":r(e)))throw new Error('"switcher" argument must be an object');if(!(i=n?(0,l.collection)(n,u.Language):t.langShop.languages).length)throw new Error("There are no languages to display switcher");"string"!=typeof o&&t.langShop.currentLanguage&&(o=t.langShop.currentLanguage.code);var a=(0,s.switcherFactory)(e,"languages");if(e.id){var c=t.langShop.languagesSwitchers.findIndex((function(t){return t.id===e.id}));if(c>-1){if(t.langShop.languagesSwitchers[c].type===a.type)return t.langShop.languagesSwitchers[c].update(e,i,o);t.langShop.languagesSwitchers[c].remove(),t.langShop.languagesSwitchers.splice(c,1)}}return t.langShop.languagesSwitchers.push(a),a.create(i,o)},this.removeLanguagesSwitcher=function(e){if(e&&void 0!==t.langShop.languagesSwitchers){var n=t.langShop.languagesSwitchers.findIndex((function(t){return t.id===e}));-1!==n&&(t.langShop.languagesSwitchers[n].remove(),t.langShop.languagesSwitchers.splice(n,1))}},this.createCurrenciesSwitcher=function(e,n,o){var i=void 0;if(!e)throw new Error('"switcher" argument is required');if("object"!==(void 0===e?"undefined":r(e)))throw new Error('"switcher" argument must be an object');if(!(i=n?(0,l.collection)(n,c.Currency):t.langShop.currencies).length)throw new Error("There are no currencies to display switcher");"string"!=typeof o&&t.langShop.currentCurrency&&(o=t.langShop.currentCurrency.code);var a=(0,s.switcherFactory)(e,"currencies");if(e.id){var u=t.langShop.currenciesSwitchers.findIndex((function(t){return t.id===e.id}));if(u>-1){if(t.langShop.currenciesSwitchers[u].type===a.type)return t.langShop.currenciesSwitchers[u].update(e,i,o);t.langShop.currenciesSwitchers[u].remove(),t.langShop.currenciesSwitchers.splice(u,1)}}return t.langShop.currenciesSwitchers.push(a),a.create(i,o)},this.removeCurrenciesSwitcher=function(e){if(e&&void 0!==t.langShop.currenciesSwitchers){var n=t.langShop.currenciesSwitchers.findIndex((function(t){return t.id===e}));-1!==n&&(t.langShop.currenciesSwitchers[n].remove(),t.langShop.currenciesSwitchers.splice(n,1))}},this.createRecommendationAlert=function(e,n,o,i,a){if(!e)throw new Error('"settings" argument is required');if("object"!==(void 0===e?"undefined":r(e)))throw new Error('"settings" argument must be an object');return n=n?(0,l.collection)(n,u.Language):t.langShop.languages,o=o?(0,l.collection)(o,c.Currency):t.langShop.currencies,t.langShop.recommendationAlert&&t.langShop.recommendationAlert.remove(),t.langShop.recommendationAlert=(0,d.recommendationAlertFactory)(e).create(n,o,i,a),t.langShop.recommendationAlert},this.isReady=function(){return t.langShop.isReady()},this.isLoaded=function(){return t.langShop.isLoaded()},this.isOriginalLanguage=function(){if(!t.isLoaded())throw new Error("LangShop is not loaded at this moment");return t.langShop.isRequestedDefaultLanguage()},this.translate=function(e,n,r){if(!t.isLoaded())throw new Error("LangShop is not loaded at this moment");
1if("string"!=typeof e)throw new Error("Invalid or missing token");if(!Array.isArray(n))throw new Error("Invalid or missing query");if(n.map((function(e,t){if("string"!=typeof e)throw new Error("Invalid query item at "+t+" position")})),"function"!=typeof r)throw new Error("Missing success callback");if(t.isOriginalLanguage())r(n);else{var o=t.getCurrentLanguage();try{(0,p.translate)(e,o.code,n.map((function(e){return{value:e}})),(function(e){return r(e.map((function(e){return e.value})))}))}catch(e){r(n)}}},this.langShop=new f.default,this.events=Object.values(i.EventsEnum)}},{"./LangShop":2,"./entities/Currency":6,"./entities/Language":18,"./entities/RecommendationAlert/recommendationAlertFactory":22,"./entities/Switcher/switcherFactory":36,"./enum":46,"./eventsManager":47,"./helpers/collection":49,"./helpers/config":51,"./helpers/translator":64}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("./helpers/location"),i=e("./helpers/environment"),a=e("./entities/Currency"),s=e("./entities/Language"),l=e("./entities/Switcher"),c=(r=l)&&r.__esModule?r:{default:r},u=e("./entities/LanguageCountries"),d=e("./entities/LanguageBrowsers"),f=e("./entities/CurrencyCountries"),p=e("./entities/CurrencyLanguages"),h=e("./entities/DynamicItem"),m=e("./helpers/storage"),g=e("./entities/Switcher/switcherFactory"),v=e("./entities/RecommendationAlert/recommendationAlertFactory"),y=e("./helpers/collection");n.default=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(t.shopifyLocales.find((function(e){return e.code===t.currentLanguage}))||t.shopifyLocales.push({code:t.currentLanguage,rootUrl:"/"+t.currentLanguage}),this.abilities=t.abilities,this.isAdmin=t.isAdmin,this.i18n=t.i18n,this.debug=t.debug||!1,this.storeMoneyFormat=t.storeMoneyFormat||"${{amount}}",this.storeMoneyWithCurrencyFormat=t.storeMoneyWithCurrencyFormat||this.storeMoneyFormat,this.currencyInQueryParam="boolean"!=typeof t.currencyInQueryParam||t.currencyInQueryParam,this.currentLanguage=t.currentLanguage,this.currentCurrency=t.currentCurrency,this.shopifyLocales=t.shopifyLocales,this.shopifyCurrencies=(0,y.collection)(t.shopifyCurrencies,(function(e){return e.toLowerCase()})),this.languageDetection=t.languageDetection,this.currencyDetection=t.currencyDetection,this.allowAutomaticRedirects=t.allowAutomaticRedirects,this.originalLanguage=new s.Language(t.originalLanguage),this.defaultCurrency=new a.Currency(t.defaultCurrency),this.recommendationAlert=(0,v.recommendationAlertFactory)(t.recommendationAlert),this.targetLanguages=(0,y.collection)(t.targetLanguages,s.Language),this.targetCurrencies=(0,y.collection)(t.targetCurrencies,a.Currency),this.languagesCountries=(0,y.collection)(t.languagesCountries,u.LanguageCountries),this.currenciesCountries=(0,y.collection)(t.currenciesCountries,f.CurrencyCountries),this.languagesBrowsers=(0,y.collection)(t.languagesBrowsers,d.LanguageBrowsers),this.currenciesLanguages=(0,y.collection)(t.currenciesLanguages,p.CurrencyLanguages),this.languagesSwitchers=(0,y.collection)(t.languagesSwitchers,(function(e){return(0,g.switcherFactory)(e,c.default.RESOURCE_LANGUAGES)})),this.currenciesSwitchers=(0,y.collection)(t.currenciesSwitchers,(function(e){return(0,g.switcherFactory)(e,c.default.RESOURCE_CURRENCIES)})),this.themeDynamics=(0,y.collection)(t.themeDynamics,h.DynamicItem),this.isStorageSupported=(0,m.isStorageSupported)(),this.isSessionStorageSupported=(0,m.isSessionStorageSupported)(),this.isSameSiteReferrer=(0,o.isSameSiteReferrer)(),this.isMutationObserverSupported=(0,i.isMutationObserverSupported)(),this.isShopifyCheckout=(0,o.isShopifyCheckout)(),this.isShopifyOrder=(0,o.isShopifyOrder)(),this.isInIframe=(0,i.isInIframe)(),this.isMobile=(0,i.isMobile)(),this.isBot=(0,i.isBot)(),this.isNeedInitStyles=(0,i.isNeedInitStyles)(this.recommendationAlert,this.languagesSwitchers,this.currenciesSwitchers),this.allowAutomaticRedirects=t.allowAutomaticRedirects,this.isPreview=t.isPreview,this.isPrimaryDomain=(0,o.isPrimaryDomain)(),this.isShadowDomSupp
1orted=(0,i.isShadowDomSupported)(),this.isRtl=(0,i.isRtl)(t.currentLanguage),this.isDesignMode=window.Shopify&&!!window.Shopify.designMode)}},{"./entities/Currency":6,"./entities/CurrencyCountries":7,"./entities/CurrencyLanguages":8,"./entities/DynamicItem":16,"./entities/Language":18,"./entities/LanguageBrowsers":19,"./entities/LanguageCountries":20,"./entities/RecommendationAlert/recommendationAlertFactory":22,"./entities/Switcher":35,"./entities/Switcher/switcherFactory":36,"./helpers/collection":49,"./helpers/environment":53,"./helpers/location":59,"./helpers/storage":62}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CurrenciesConverter=void 0;var r=i(e("../../helpers/config")),o=i(e("striptags"));function i(e){return e&&e.__esModule?e:{default:e}}n.CurrenciesConverter=function e(t,n,i){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.convert=function(e,t,n){var r=a.currencies.find((function(e){return e.code===t}));return e*a.currencies.find((function(e){return e.code===n})).rate/r.rate},this.getMoneyFormat=function(e){var t=a.currencies.find((function(t){return t.code===e}));return"money_with_currency_format"===a.format?t.formatWithCurrency:t.formatWithoutCurrency},this.getStoreMoneyFormat=function(){return"money_with_currency_format"===a.format?(0,r.default)().storeMoneyWithCurrencyFormat:(0,r.default)().storeMoneyFormat},this.formatMoney=function(e,t,n,r){var o=function(e,t){return void 0===e?t:e},i=function(e,t,n,i){if(t=o(t,2),n=o(n,","),i=o(i,"."),isNaN(e)||null==e)return 0;var a=(e=e.toFixed(t)).split("."),s=a[0].replace(/(\d)(?=(\d\d\d)+(?!\d))/g,"$1"+n),l=a[1]?i+a[1]:"";return r?s+"<sup>"+l+"</sup>":s+l};"string"==typeof e&&(e=a.parseFloat(e));var s="",l=/{{\s*(\w+)\s*}}/,c=t||"${{amount}}",u=2,d=c.match(l),f=d&&void 0!==d[1]?d[1]:"amount";switch((n||"kwd"!==a.currentCurrency&&"bhd"!==a.currentCurrency&&"jod"!==a.currentCurrency&&"omr"!==a.currentCurrency)&&(!n||"kwd"!==a.shopCurrency&&"bhd"!==a.shopCurrency&&"jod"!==a.shopCurrency&&"omr"!==a.shopCurrency)||(u=3),f.indexOf("no_decimals")>-1&&(u=0),(!n&&"btc"===a.currentCurrency||n&&"btc"===a.shopCurrency)&&(u=8),f){case"amount":case"amount_no_decimals":default:s=i(e,u),a.roundDecimals&&!n&&a.currentCurrency!==a.shopCurrency&&"btc"!==a.currentCurrency&&0!==s&&-1!==s.toString().indexOf(".")&&(s=s.substr(0,s.toString().indexOf(".")+1)+a.roundTo,"kwd"!==a.currentCurrency&&"bhd"!==a.currentCurrency&&"jod"!==a.currentCurrency&&"omr"!==a.currentCurrency||(s+="0"),r&&(s+="</sup>"));break;case"amount_with_comma_separator":case"amount_no_decimals_with_comma_separator":s=i(e,u,".",","),a.roundDecimals&&!n&&a.currentCurrency!==a.shopCurrency&&"btc"!==a.currentCurrency&&"0"!==s.toString().replace(",",".")&&-1!==s.toString().indexOf(",")&&(s=s.substr(0,s.toString().indexOf(",")+1)+a.roundTo,"kwd"!==a.currentCurrency&&"bhd"!==a.currentCurrency&&"jod"!==a.currentCurrency&&"omr"!==a.currentCurrency||(s+="0"),r&&(s+="</sup>"));break;case"amount_with_apostrophe_separator":s=i(e,u,"'","."),a.roundDecimals&&!n&&a.currentCurrency!==a.shopCurrency&&"btc"!==a.currentCurrency&&0!==s&&-1!==s.toString().indexOf(".")&&(s=s.substr(0,s.toString().indexOf(".")+1)+a.roundTo,"kwd"!==a.currentCurrency&&"bhd"!==a.currentCurrency&&"jod"!==a.currentCurrency&&"omr"!==a.currentCurrency||(s+="0"),r&&(s+="</sup>"))}return isNaN(e)?"":c.replace(l,s)},this.convertAll=function(e,t){var n=!1;void 0===t&&(a.currentCurrency=e),"string"==typeof t&&".price-on-hover"===t&&Array.from(document.querySelectorAll(t)).forEach((function(e){var t=(e.closest("."+a.spanClass)||e).getAttribute("ls-currency-"+a.shopCurrency);e.attr("ls-currency-"+a.shopCurrency,t),n=!0})),Array.from(document.querySelectorAll(t||"span."+a.spanClass)).forEach((function(r){if(!r.querySelector(t||"span."+a.spanClass)&&r.getAttribute("ls-currency")!==e){var o=0;if(r.getAttribute("ls-currency-"+e)){var i=a.getMoneyFormat(e)||"{{amount}}";o="btc"!==e?a.parseFloat(r.getAttribute("ls-currency-"+e)):Number(r.getAttribute("ls-currency-"+e));var s=a.hasSup(r.innerHTML);r.innerHTML=a.formatMoney(o,i,n,s)}else{var l=0,c=a.getStoreMoneyFormat()||"{{amount}}",u=a.getMoneyFormat(e)||"{{amount}}";r.getAttribute("ls-currency-"+a.shopCurrency)?l=a.parseFloat(r.getAttribute("ls-currency-"+a.shopCurrency)):(l=a.parsePrice(r.innerHTML,c),r.setAttribute("ls-currency-"+a.shopCurrency,l)),o=a.shopCurrency!==e?a.convert(l,a.shopCurrency,e):l,r.setAttribute("ls-currency-"+e,o);var d=a.hasSup(r.innerHTML);r.innerHTML=a.formatMoney(o,u,n,d)}r.setAttribute("ls-currency",e)}}))},this.parsePrice=function(e,t){e=(0,o.default)(e,"<sup>");return-1!==t.indexOf("comma")&&(e=e.replace(/[.]/g,"").replace(/[,]/g,".")),-1===e.indexOf(".")&&a.hasSup(e)&&(e=e.replace("<sup>",".").replace("</sup>","")),a.parseFloat(e)},this.parseFloat=function(e){return"number"==typeof e?e:Number.parseFloat(e.replace(/[^\d.]/g,"").replace(/[.]$/,""))},this.hasSup=function(e){return-1!==e.indexOf("<sup>")},this.currencies=t,this.currentCurrency=n,this.shopCurrency=i,this.format="money_without_currency_format",this.spanClass="money",this.roundTo="00",this.roundDecimals=!1}},{"../../helpers/config":51,striptags:1}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Currency=void 0;
1var r=e("../../helpers/i18n");n.Currency=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getTitle=function(e){return(0,r.i18n)("currencies."+n.code,n.title,{},e)},this.getLink=function(){var e=window.location.host,t=window.location.pathname,r=window.location.search,o=window.location.hash,i=new URLSearchParams(r.substring(1));return i.set("currency",n.code),["https://",e,t,"?"+i.toString(),o].join("")},this.getIconClassPref=function(){return"ls-curr-"},this.onSelected=function(){return window.LangShopSDK.switchCurrency(n.code)},this.toObject=function(){return{code:n.code,title:n.getTitle(),rate:n.rate,icon:n.icon,formatWithCurrency:n.formatWithCurrency,formatWithoutCurrency:n.formatWithoutCurrency}},this.code=t.code,this.title=t.title,this.rate=t.rate,this.icon=t.icon,this.formatWithCurrency=t.formatWithCurrency,this.formatWithoutCurrency=t.formatWithoutCurrency,"function"==typeof t.onSelected&&(this.onSelected=t.onSelected.bind(this))}},{"../../helpers/i18n":56}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.CurrencyCountries=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t.code,this.countries=t.countries}},{}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.CurrencyLanguages=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t.code,this.languages=t.languages}},{}],9:[function(e,t,n){"use strict";function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}Object.defineProperty(n,"__esModule",{value:!0});n.DomObserver=function e(t,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.createObserver=function(){var e=void 0,t=[];return new MutationObserver((function(n){t=[].concat(r(t),r(n)),clearTimeout(e),e=setTimeout((function(){o.pause(),o.dispatch(t),t=[],o.resume()}),LangShopConfig.dynamicThemeDomObserverInterval||0)}))},this.getMutationNodes=function(e){return"childList"===e.type?e.addedNodes:[e.target]},this.dispatch=function(e){for(var t=e.length,n=o.listeners.length,r=0;r<t;r++)for(var i=e[r],a=0;a<n;a++){var s=o.listeners[a];s.isObservableMutation(i)&&s.handleMutatedNodes(o.getMutationNodes(i))}},this.pause=function(){o.observer.disconnect()},this.resume=function(){o.observer.observe(o.element,o.config)},this.element=t,this.listeners=n,this.config={subtree:!0,characterData:!0,childList:!0,attributes:!0},this.observer=this.createObserver(),this.observer.observe(this.element,this.config)}},{}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isObservableMutation=function(e){return"characterData"===e.type||"childList"===e.type&&e.addedNodes.length>0},this.handleMutatedNodes=function(e){n.elementMutator(e)},this.isObservableNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE},this.elementMutator=t}},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isObservableMutation=function(e){return"childList"===e.type&&e.addedNodes.length>0},this.handleMutatedNodes=function(e){for(var t=0;t<e.length;t++){var r=e[t];n.isObservableNode(r)&&(r.isConnected&&n.converter.convertAll(n.converter.currentCurrency))}},this.isObservableNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE},this.converter=t}},{}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("../../../helpers/regexp"),o=e("../../../helpers/strings");n.default=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}
1(this,e),this.getSearchPatterns=function(){for(var e=[],t=0;t<n.items.length;t++){var i=n.items[t],a=("("+(0,r.escapeRegExp)(i.before)+"[\\s]*"+(0,r.escapeRegExp)((0,o.escapeHtml)(i.search))+"[\\s]*"+(0,r.escapeRegExp)(i.after)+")").replace(/(?:\\{){2}[\s]*custom[\s]*(?:\\}){2}/g,"(.*?)");e.push(a)}return e},this.isObservableMutation=function(e){if("childList"===e.type&&e.addedNodes.length>0)return!0;if("characterData"===e.type)return!0;var t=e.target;return!("attributes"!==e.type||"value"!==e.attributeName||!n.isValueAttributeObservable(t))||"attributes"===e.type&&"placeholder"===e.attributeName&&n.isPlaceholderAttributeObservable(t)},this.handleMutatedNodes=function(e){for(var t=0;t<e.length;t++){var r=e[t];n.isObservableNode(r)&&(r.isConnected&&n.replaceItems(r))}},this.isObservableNode=function(e){if(!e)return!1;if(e.nodeType===Node.TEXT_NODE){if(!e.textContent.trim())return!1;if(!(e=e.parentNode))return!1}return e.nodeType===Node.ELEMENT_NODE&&-1===["SCRIPT","STYLE","NOSCRIPT","IFRAME","FRAME","CANVAS","SVG","TEMPLATE"].indexOf(e.nodeName)},this.isValueAttributeObservable=function(e){return e.nodeType===Node.ELEMENT_NODE&&("INPUT"===e.nodeName&&"type"in e&&["submit","button","reset"].indexOf(e.type)>-1||"BUTTON"===e.nodeName)},this.isPlaceholderAttributeObservable=function(e){return e.nodeType===Node.ELEMENT_NODE&&["INPUT","TEXTAREA"].indexOf(e.nodeName)>-1},this.isTextContentAttributeObservable=function(e){return e.nodeType===Node.TEXT_NODE&&!!e.textContent.trim()},this.replaceItems=function(e){if(e.nodeType===Node.TEXT_NODE&&(e=e.parentNode),"outerHTML"in e&&(0,r.testRegExp)(n.searchPattern,e.outerHTML))for(var t=e.childNodes,o=t.length;o--;){var i=t[o];n.isObservableNode(i)&&(n.isPlaceholderAttributeObservable(i)&&n.replaceItem(i,"placeholder"),n.isValueAttributeObservable(i)&&n.replaceItem(i,"value"),n.isTextContentAttributeObservable(i)&&n.replaceItem(i,"textContent"),i.nodeType!==Node.TEXT_NODE&&n.replaceItems(i))}},this.replaceItem=function(e,t){for(var r=0;r<n.items.length;r++){var o=void 0,i=n.items[r],a=e[t],s=i.replace,l=new RegExp(i.pattern,"gi");do{if((o=l.exec(a))&&o.length>2){for(var c=2;c<o.length-1;c++)s=n.replaceCustomMask(s,o[c]);e[t]=e[t].replace(o[0],o[1]+s+o[o.length-1])}}while(o)}},this.replaceCustomMask=function(e,t){return e.replace(/[{]{2}[\s]*custom[\s]*[}]{2}/,t)},this.items=t,this.patterns=this.getSearchPatterns(),this.searchPattern=this.patterns.join("|"),this.replaceItems(document.body)}},{"../../../helpers/regexp":61,"../../../helpers/strings":63}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isObservableMutation=function(e){return"childList"===e.type&&e.addedNodes.length>0},this.handleMutatedNodes=function(e){for(var t=0;t<e.length;t++){var r=e[t];n.isObservableNode(r)&&(r.isConnected&&n.elementMutator(r))}},this.isObservableNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE},this.elementMutator=t}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("../../../helpers/dom");n.default=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isObservableMutation=function(e){return"childList"===e.type&&e.addedNodes.length>0||"characterData"===e.type},this.handleMutatedNodes=function(e){for(var t=0;t<e.length;t++){var o=e[t];n.isObservableNode(o)&&(o.isConnected&&(o.nodeType===Node.TEXT_NODE?n.resolveTextNodes([o]):n.resolveTextNodes((0,r.getTextNodesIn)(o,(function(e){return e.textContent.trim()})))))}},this.isObservableNode=function(e){return!!e&&(!(e.nodeType!==Node.TEXT_NODE||!e.textContent.trim())||e.nodeType===Node.ELEMENT_NODE)},this.resolveTextNodes=function(e){for(var t=0,r=e.length;t<r;t++)n.handleTextNode(e[t])},this.handleTextNode=function(e){if(e){var t=e.textContent;if(t.trim()){var r=t.match(/\[LS_([^\]]+)]/);if(r){var o=r[0],i=r.index,a=i+o.length,s=n.handleShortcode(o),l=n.injectElement(e,s,i,a);n.handleTextNode(l[2])}}}},this.handleShortcode=function(e){var t=n.resolver(e)||"";return"string"==typeof t?document.createTextNode(t):t},this.injectElement=function(e,t,n,r){var o=e.parentNode;if(o){var i=e.textContent;if(!(i.length<r)){var a=i.substring(0,n),s=document.createTextNode(a),l=i.substring(r),c=document.createTextNode(l);return o.replaceChild(s,e),o.insertBefore(t,s.nextSibling),o.insertBefore(c,t.nextSibling),[s,t,c]}}},this.resolver=t}}
1,{"../../../helpers/dom":52}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.default=function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.isObservableMutation=function(e){return"childList"===e.type&&e.addedNodes.length>0},this.handleMutatedNodes=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(r.isObservableNode(n)&&n.isConnected){var o="selector[data-type][data-id],.ls-sw-languages,.ls-sw-currencies",i=n.matches(o)?[n]:n.querySelectorAll(o);i.length&&r.resolveContainers(i)}}},this.isObservableNode=function(e){return!!e&&e.nodeType===Node.ELEMENT_NODE},this.resolveContainers=function(e){for(var t=function(t,n){var o=e[t];if(o.children.length>0)return"continue";var i=null;if("SELECTOR"!==o.nodeName)i=[].slice.call(o.classList,0).reduce((function(e,t){var n=t.match(/^ls-sw-(currencies|languages)-([\d]+)$/);return n?{resource:n[1],id:parseInt(n[2],10)}:e}),null);else{var a=o.dataset;i={resource:a.type,id:parseInt(a.id,10)}}if(!i)return"continue";var s=r.switchers.find((function(e){return e.id===i.id&&e.resource===i.resource}));if(!s)return"continue";r.resolver(s)},n=0,o=e.length;n<o;n++)t(n)},this.switchers=t,this.resolver=n}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.DynamicItem=void 0;var r=e("../../helpers/regexp");n.DynamicItem=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.shouldBeChecked=function(e){return!Array.isArray(n.templates)||!!n.templates.length&&n.templates.includes(e)},this.before=t.before,this.search=t.search,this.replace=t.replace,this.after=t.after,this.templates=t.templates,this.pattern=("((?:[^\\w]|^|[\\s]))"+(0,r.escapeRegExp)(this.search)+"((?:[^\\w]|$|[\\s]))").replace(/(?:\\{){2}[\s]*custom[\s]*(?:\\}){2}/g,"(.*?)")}},{"../../helpers/regexp":61}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.FetchObserver=void 0;var r=e("../../helpers/strings"),o=e("../../helpers/locale");n.FetchObserver=function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),window.fetch){var n=this,i=["^\\/search","^\\/cart","^\\/collections","^\\/products","^\\/recommendations\\/products"];this.langShop=t,this.fetch=window.fetch,window.fetch=function(){var e=arguments;if("string"==typeof e[0]&&!n.langShop.isRequestedDefaultLanguage())for(var t=window.location.protocol+"//"+window.location.host,a=0===e[0].indexOf(t)?e[0].replace(t,""):e[0],s=0;s<i.length;s++){var l=new RegExp(i[s],"g"),c=l.exec(a);if(c){var u=(0,o.getLocalePathPrefix)(n.langShop.currentLanguage.code);e[0]=u+"/"+(0,r.trim)(a,"/");break}}return n.fetch.apply(null,e)}}}},{"../../helpers/locale":58,"../../helpers/strings":63}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Language=void 0;var r,o=e("../../helpers/config"),i=(r=o)&&r.__esModule?r:{default:r}
1,a=e("../../helpers/locale"),s=(e("../../helpers/strings"),e("../../helpers/i18n"));n.Language=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getTitle=function(e){return(0,s.i18n)("languages."+n.code,n.title,{},e||n.code)},this.getLink=function(){var e="https://",t=window.location.host,r=window.location.pathname,o=window.location.search,s=window.location.hash,l=(0,i.default)(),c=l.currentLanguage,u=l.isShopifyCheckout,d=l.isShopifyOrder;if(!c)return window.location.toString();if(u||d){var f=new URLSearchParams(o.substring(1));return f.set("locale",n.code),[e,t,r,"?"+f.toString(),s].join("")}var p=(0,a.getLocalePathPrefix)(c);return[e,t,r=(0,a.getLocalePathPrefix)(n.code)+(r=r.replace(p,"")),o,s].join("")},this.getIconClassPref=function(){return"ls-lang-"},this.onSelected=function(){return window.LangShopSDK.switchLanguage(n.code)},this.toObject=function(){return{code:n.code,title:n.getTitle(),icon:n.icon}},this.code=t.code,this.alias=t.alias,this.title=t.title,this.icon=t.icon,"function"==typeof t.onSelected&&(this.onSelected=t.onSelected.bind(this))}},{"../../helpers/config":51,"../../helpers/i18n":56,"../../helpers/locale":58,"../../helpers/strings":63}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.LanguageBrowsers=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t.code,this.browsers=t.browsers}},{}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.LanguageCountries=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.code=t.code,this.countries=t.countries}},{}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("../StyleScheme"),a=e("../../helpers/i18n"),s=e("../../style"),l=e("../../helpers/environment"),c=e("../../
1helpers/config"),u=(r=c)&&r.__esModule?r:{default:r},d=e("../../enum"),f=e("../../helpers/abilities");var p=function(){function e(t,n){var r=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getSelector=function(){return".ls-alert-type-"+r.type},this.getMessage=function(){if(r.recommendedLanguage&&r.recommendedCurrency){var e=r.languages.find((function(e){return e.code===r.recommendedLanguage})),t=r.currencies.find((function(e){return e.code===r.recommendedCurrency}));return(0,a.i18n)("recommendation_alert.currency_language_suggestion","Looks like {{ language }} and {{ currency }} are more preferred for you. Change language and currency?",{language:e.getTitle(),currency:t.getTitle(r.recommendedLanguage)},r.recommendedLanguage)}if(r.recommendedCurrency){var n=r.currencies.find((function(e){return e.code===r.recommendedCurrency}));return(0,a.i18n)("recommendation_alert.currency_suggestion","Looks like {{ currency }} is more preferred for you. Change currency?",{currency:n.getTitle()})}if(r.recommendedLanguage){var o=r.languages.find((function(e){return e.code===r.recommendedLanguage}));return(0,a.i18n)("recommendation_alert.language_suggestion","Looks like {{ language }} is more preferred for you. Change language?",{language:o.getTitle()},r.recommendedLanguage)}return""},this.create=function(e,t,n,o){return r.canBeCreated()?(e.length>1&&n&&e.find((function(e){return e.code===n}))&&(r.languages=e,r.recommendedLanguage=n),t.length>1&&o&&t.find((function(e){return e.code===o}))&&(r.currencies=t,r.recommendedCurrency=o),r.recommendedLanguage||r.recommendedCurrency?(r.style=r.styleScheme.createStyle(r.styles),r.isolateStyles||document.querySelector("head").appendChild(r.style),r.root=r.createRoot(),document.body.appendChild(r.root.shadow||r.root.element),r):r):r},this.remove=function(){return r.root&&(r.root.shadow?r.root.shadow.remove():r.root.element.remove()),r.style&&r.style.remove(),r},this.close=function(){r.root&&r.root.element.classList.remove("js-ls-alert-active")},this.createRoot=function(){var e=document.createElement("div"),t=document.createElement("div");return t.classList.add("ls-recommendation-alert"),t.classList.add("js-ls-alert-active"),t.setAttribute("translate","no"),e.classList.add("ls-alert-type-"+r.type),(0,u.default)().isRtl&&(e.setAttribute("dir","rtl"),e.classList.add("ls-dir-rtl")),r.createAlertElements(e),t.appendChild(e),r.isolateElement(t)},this.canBeCreated=function(){return!!(0,f.hasAbility)(f.USE_MAPPINGS)&&(r.status!==d.VisibilityStatusEnum.DISABLED&&(r.status===d.VisibilityStatusEnum.ADMIN_ONLY?(0,u.default)().isAdmin||(0,u.default)().isPreview:r.status===d.VisibilityStatusEnum.PUBLISHED))},this.shouldCreateBranding=function(){return!(0,f.hasAbility)(f.DISABLE_BRANDING)},this.type=t.type,this.languages=[],this.currencies=[],this.recommendedCurrency=null,this.recommendedLanguage=null,this.styles=t.styles[this.type]||{},this.styleScheme=new i.StyleScheme(this.getSelector(),{},n),"boolean"==typeof t.enabled?this.status=t.enabled?d.VisibilityStatusEnum.PUBLISHED:d.VisibilityStatusEnum.DISABLED:this.status=Object.values(d.VisibilityStatusEnum).indexOf(t.status)>-1?t.status:d.VisibilityStatusEnum.ADMIN_ONLY,this.isolateStyles=!("boolean"!=typeof t.isolateStyles||!(0,l.isShadowDomSupported)())&&t.isolateStyles}return o(e,[{key:"isolateElement",value:function(e){if(!this.isolateStyles)return{element:e,shadow:null};var t=document.createElement("style");t.innerHTML=(0,s.getStyles)();var n=document.createElement("shadow-root");n.style.display="inline";var r=n.attachShadow({mode:"open"});return r.appendChild(t),r.appendChild(this.style.cloneNode(!0)),r.appendChild(e),{element:e,shadow:n}}}]),e}();n.default=p},{"../../enum":46,"../../helpers/abilities":48,"../../helpers/config":51,"../../helpers/environment":53,"../../helpers/i18n":56,"../../style":70,"../StyleScheme":28}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.recommendationAlertFactory=void 0;var r=a(e("./types/BannerAlert")),o=e("../../enum"),i=a(e("./types/PopupAlert"));
1function a(e){return e&&e.__esModule?e:{default:e}}n.recommendationAlertFactory=function(e){if(!e)return null;switch(e.type){case o.RecommendationAlertTypesEnum.BANNER:return new r.default(e);case o.RecommendationAlertTypesEnum.POPUP:return new i.default(e);default:return new r.default(e)}}},{"../../enum":46,"./types/BannerAlert":23,"./types/PopupAlert":24}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("../"),i=(r=o)&&r.__esModule?r:{default:r},a=e("../../../helpers/i18n");var s=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{bannerContainer:{selector:"{container}",computed:{position:function(e){return"bottom"===e?{"{container}":{bottom:"0px"}}:{"{container}":{top:"0px"}}},spacing:function(e){return{"{container} .ls-banner-message":{marginRight:e+"px"},".ls-dir-rtl{container} .ls-banner-message":{marginRight:"0px",marginLeft:e+"px"},"{container} .ls-banner-actions-wrapper > *":{marginRight:e+"px"},".ls-dir-rtl{container} .ls-banner-actions-wrapper > *":{marginRight:"0px",marginLeft:e+"px"}}}},default:{position:"top",spacing:10,borderTop:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},borderRight:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},padding:{top:{value:15,dimension:"px"},right:{value:20,dimension:"px"},bottom:{value:15,dimension:"px"},left:{value:20,dimension:"px"}},background:"rgba(255, 255, 255, 1)"}},bannerMessage:{selector:"{container} .ls-banner-message",default:{fontSize:{value:16,dimension:"px"},fontFamily:"Open Sans",fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",color:"rgba(39, 46, 49, 1)"}},selectorContainer:{selector:"{container} .ls-banner-selector",default:{background:"rgba(244,244,244, 1)",borderRadius:{topLeft:{value:2,dimension:"px"},topRight:{value:2,dimension:"px"},bottomLeft:{value:2,dimension:"px"},bottomRight:{value:2,dimension:"px"}},borderTop:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderLeft:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}}}},selectorContainerHovered:{selector:"{container} .ls-banner-selector:hover"},selectorText:{selector:"{container} .ls-banner-selector select",default:{padding:{top:{value:8,dimension:"px"},right:{value:8,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:8,dimension:"px"}},fontSize:{value:16,dimension:"px"},fontFamily:"Open Sans",fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",color:"rgba(39, 46, 49, 1)"}},selectorTextHovered:{selector:"{container} .ls-banner-selector select:hover"},changeButton:{selector:"{container} .ls-banner-change-button",default:{borderTop:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderLeft:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},fontSize:{value:16,dimension:"px"},fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",borderRadius:{topLeft:{value:2,dimension:"px"},topRight:{value:2,dimension:"px"},bottomLeft:{value:2,dimension:"px"},bottomRight:{value:2,dimension:"px"}},padding:{top:{value:8,dimension:"px"},right:{value:8,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:8,dimension:"px"}},background:"rgba(0, 0, 0, 1)",color:"rgba(255, 255, 255, 1)"}},changeButtonHovered:{selector:"{container} .ls-banner-change-button:hover"},closeButton:{selector:"{container} .ls-banner-close-button",computed:{color:function(e){return{"{container} .ls-banner-close-button":{fill:e}}}},default:{alignSelf:"baseline",fontSize:{value:16,dimension:"px"},color:"rgba(0, 0, 0, 1)"}},closeButtonHovered:{selector:"{container} .ls-banner-close-button:hover",computed:{color:function(e){return{"{container} .ls-banner-close-button:hover":{fill:e}}}}}}));return n.createAlertElements=function(e){var t=document.createElement("div");t.className="ls-banner-content";var r=n.createCallToAction(),o=n.createCloseButton();o.onclick=function(e){return e.preventDefault(),n.close(),!1};var i=n.createBrandLink();t.appendChild(r),t.appendChild(o),e.appendChild(t),n.shouldCreateBranding()&&e.appendChild(i)},n.createCallToAction=function(){var e=document.createElement("div");e.className="ls-banner-call-to-action";var t=n.createMessage(),r=n.createLanguagesSelectorContainer(),o=n.createCurrenciesSelectorContainer(),i=n.createChangeButton();if(!r&&!o)return e;var a=document.createElement("div");return a.className="ls-banner-actions-wrapper",r&&a.appendChild(r),o&&a.appendChild(o),a.appendChild(i),i.onclick=function(e){e.preventDefault();var t=r?r.querySelector("select").value:null,i=o?o.querySelector("select").value:null;return window.LangShopSDK.switchLanguageAndCurrency(t,i),n.close(),!1},e.appendChild(t),e.appendChild(a),e},n.createMessage=function(){var e=document.createElement("p");return e.className="ls-banner-message",e.innerHTML=n.getMessage(),e},n.createLanguagesSelectorContainer=function(){if(!n.recommendedLanguage)return null;var e=document.createElement("div");e.className="ls-banner-selector";for(var t=document.createElement("select"),r=0;r<n.languages.length;r++){var o=n.languages[r],i=document.createElement("option");i.value=o.code,i.text=n.shortTitles?o.code.toUpperCase():o.getTitle(),o.code===n.recommendedLanguage&&(i.selected=!0),t.appendChild(i)}return e.appendChild(t),e},n.createCurrenciesSelectorContainer=function(){if(!n.recommendedCurrency)return null;var e=document.createElement("div");e.className="ls-banner-selector";for(var t=document.createElement("select"),r=0;r<n.currencies.length;r++){var o=n.currencies[r],i=document.createElement("option");i.value=o.code,i.text=n.shortTitles?o.code.toUpperCase():o.getTitle(n.recommendedLanguage),o.code===n.recommendedCurrency&&(i.selected=!0),t.appendChild(i)}return e.appendChild(t),e},n.createChangeButton=function(){var e=document.createElement("button");return e.type="button",e.className="ls-banner-change-button",e.innerHTML=(0,a.i18n)("recommendation_alert.change","Change",{},n.recommendedLanguage),e},n.createCloseButton=function(){var e=document.createElement("button");return e.type="button",e.className="ls-banner-close-button",e.innerHTML='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" style="height: 1em; width: 1em;"><path d="M11.414 10l6.293-6.293a.999.999 0 1 0-1.414-1.414L10 8.586 3.707 2.293a.999.999 0 1 0-1.414 1.414L8.586 10l-6.293 6.293a.999.999 0 1 0 1.414 1.414L10 11.414l6.293 6.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z" /></svg>',e},n.createBrandLink=function(){var e=document.createElement("div");e.style.display="flex",e.style.justifyContent="flex-end";var t=document.createElement("a");return t.href="https://langshop.app/",t.target="_blank",t.style.cursor="pointer",t.textContent="Powered by LangShop",e.appendChild(t),e},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);n.default=s},{"../":21,"../../../helpers/i18n":56}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("../"),i=(r=o)&&r.__esModule?r:{default:r},a=e("../../../helpers/i18n"),s=e("../../../enum");e("../../../helpers/environment");var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,{popupContainer:{selector:"{container}",computed:{offset:function(e,t){return t.popupContainer.position===s.PopupAlertPositionEnum.CENTER?{"{container}":{left:"50%",top:"50%",transform:"translate(-50%, -50%)",width:"calc(100% - 2em)"},"ls-recommendation-alert .ls-popup-overlay":{display:"block"}}:t.popupContainer.position===s.PopupAlertPositionEnum.BOTTOM_RIGHT?{"{container}":{bottom:e,right:e,marginRight:e},".ls-recommendation-alert .ls-popup-overlay":{display:"none"}}:{"{container}":{bottom:e,left:e,marginLeft:e},".ls-recommendation-alert .ls-popup-overlay":{display:"none"}}},position:function(){return{}},spacing:function(e){return{"{container} .ls-popup-message":{marginRight:e+"px"},".ls-dir-rtl{container} .ls-popup-message":{marginRight:"0px",marginLeft:e+"px"},"{container} .ls-popup-actions-wrapper > *":{marginRight:e+"px"},".ls-dir-rtl{container} .ls-popup-actions-wrapper > *":{marginRight:"0px",marginLeft:e+"px"}}}},default:{maxWidth:{value:30,dimension:"rem"},position:s.PopupAlertPositionEnum.BOTTOM_LEFT,spacing:10,offset:{value:1,dimension:"em"},borderTop:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(0,0,0,0.2)",style:"solid",width:{value:0,dimension:"px"}},borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},padding:{top:{value:15,dimension:"px"},right:{value:20,dimension:"px"},bottom:{value:15,dimension:"px"},left:{value:20,dimension:"px"}},background:"rgba(255, 255, 255, 1)"}},popupMessage:{selector:"{container} .ls-popup-message",default:{fontSize:{value:16,dimension:"px"},fontFamily:"Open Sans",fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",color:"rgba(39, 46, 49, 1)"}},selectorContainer:{selector:"{container} .ls-popup-selector",default:{background:"rgba(244,244,244, 1)",borderRadius:{topLeft:{value:2,dimension:"px"},topRight:{value:2,dimension:"px"},bottomLeft:{value:2,dimension:"px"},bottomRight:{value:2,dimension:"px"}},borderTop:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}},borderLeft:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:0,dimension:"px"}}}},selectorContainerHovered:{selector:"{container} .ls-popup-selector:hover"},selectorText:{selector:"{container} .ls-popup-selector select",default:{padding:{top:{value:8,dimension:"px"},right:{value:8,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:8,dimension:"px"}},fontSize:{value:16,dimension:"px"},fontFamily:"Open Sans",fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",color:"rgba(39, 46, 49, 1)"}},selectorTextHovered:{selector:"{container} .ls-popup-selector select:hover"},changeButton:{selector:"{container} .ls-popup-change-button",default:{borderTop:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},borderLeft:{color:"transparent",style:"solid",width:{value:0,dimension:"px"}},fontSize:{value:16,dimension:"px"},fontStyle:"normal",fontWeight:"normal",lineHeight:"1.5",borderRadius:{topLeft:{value:2,dimension:"px"},topRight:{value:2,dimension:"px"},bottomLeft:{value:2,dimension:"px"},bottomRight:{value:2,dimension:"px"}},padding:{top:{value:8,dimension:"px"},right:{value:8,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:8,dimension:"px"}},background:"rgba(0, 0, 0, 1)",color:"rgba(255, 255, 255, 1)"}},changeButtonHovered:{selector:"{container} .ls-popup-change-button:hover"},closeButton:{selector:"{container} .ls-popup-close-button",computed:{color:function(e){return{"{container} .ls-popup-close-button":{fill:e}}}},default:{alignSelf:"baseline",fontSize:{value:16,dimension:"px"},color:"rgba(0, 0, 0, 1)"}},closeButtonHovered:{selector:"{container} .ls-popup-close-button:hover",computed:{color:function(e){return{"{container} .ls-popup-close-button:hover":{fill:e}}}}}}));return n.createAlertElements=function(e){var t=document.createElement("div");t.className="ls-popup-content";var r=n.createCallToAction(),o=n.createCloseButton();o.onclick=n.closeAlert;var i=n.createBrandLink();t.appendChild(r),t.appendChild(o),e.appendChild(t),n.shouldCreateBranding()&&e.appendChild(i)},n.closeAlert=function(e){return e.preventDefault(),n.close(),!1},n.createPopupOverlay=function(){var e=document.createElement("div");return e.className=["ls-popup-overlay"].join(" "),e},n.createCallToAction=function(){var e=document.createElement("div");e.className="ls-popup-call-to-action";var t=n.createMessage(),r=n.createLanguagesSelectorContainer(),o=n.createCurrenciesSelectorContainer(),i=n.createChangeButton();if(!r&&!o)return e;var a=document.createElement("div");return a.className="ls-popup-actions-wrapper",r&&a.appendChild(r),o&&a.appendChild(o),a.appendChild(i),i.onclick=function(e){e.preventDefault();var t=r?r.querySelector("select").value:null,i=o?o.querySelector("select").value:null;return window.LangShopSDK.switchLanguageAndCurrency(t,i),n.close(),!1},e.appendChild(t),e.appendChild(a),e},n.createMessage=function(){var e=document.createElement("p");return e.className="ls-popup-message",e.innerHTML=n.getMessage(),e},n.createLanguagesSelectorContainer=function(){if(!n.recommendedLanguage)return null;var e=document.createElement("div");e.className="ls-popup-selector";for(var t=document.createElement("select"),r=0;r<n.languages.length;r++){var o=n.languages[r],i=document.createElement("option");i.value=o.code,i.text=n.shortTitles?o.code.toUpperCase():o.getTitle(),o.code===n.recommendedLanguage&&(i.selected=!0),t.appendChild(i)}return e.appendChild(t),e},n.createCurrenciesSelectorContainer=function(){if(!n.recommendedCurrency)return null;var e=document.createElement("div");e.className="ls-popup-selector";for(var t=document.createElement("select"),r=0;r<n.currencies.length;r++){var o=n.currencies[r],i=document.createElement("option");i.value=o.code,i.text=n.shortTitles?o.code.toUpperCase():o.getTitle(n.recommendedLanguage),o.code===n.recommendedCurrency&&(i.selected=!0),t.appendChild(i)}return e.appendChild(t),e},n.createChangeButton=function(){var e=document.createElement("button");return e.type="button",e.className="ls-popup-change-button",e.innerHTML=(0,a.i18n)("recommendation_alert.change","Change",{},n.recommendedLanguage),e},n.createCloseButton=function(){var e=document.createElement("button");return e.type="button",e.className="ls-popup-close-button",e.innerHTML='<svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" style="height: 1em; width: 1em;"><path d="M11.414 10l6.293-6.293a.999.999 0 1 0-1.414-1.414L10 8.586 3.707 2.293a.999.999 0 1 0-1.414 1.414L8.586 10l-6.293 6.293a.999.999 0 1 0 1.414 1.414L10 11.414l6.293 6.293a.997.997 0 0 0 1.414 0 .999.999 0 0 0 0-1.414L11.414 10z" /></svg>',e},n.createWrapper=function(){var e=document.createElement("div");return e.classList.add("ls-recommendation-alert"),e.classList.add("js-ls-alert-active"),e.setAttribute("translate","no"),e},n.createRoot=function(){var e=n.createWrapper(),t=document.createElement("div");t.classList.add("ls-alert-type-"+n.type);var r=n.createPopupOverlay();return r.onclick=n.closeAlert,n.createAlertElements(t),e.appendChild(t),e.appendChild(r),n.isolateElement(e)},n.createBrandLink=function(){var
1 e=document.createElement("div");e.style.display="flex",e.style.justifyContent="flex-end";var t=document.createElement("a");return t.href="https://langshop.app/",t.target="_blank",t.style.cursor="pointer",t.textContent="Powered by LangShop",e.appendChild(t),e},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);n.default=l},{"../":21,"../../../enum":46,"../../../helpers/environment":53,"../../../helpers/i18n":56}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}();var o=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return r(e,[{key:"parse",value:function(e){return JSON.parse(e)}},{key:"stringify",value:function(e){return JSON.stringify(e)}},{key:"isExpiredItem",value:function(e){if(!e.hasOwnProperty("expiredAt"))return!1;if(!e.expiredAt)return!1;var t=(new Date).getTime();return e.expiredAt<t}}]),e}();n.default=o},{}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("../");function i(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var a=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.getItem=function(t){var n=e.storage.find((function(e){return e.key===t}));return n&&n.hasOwnProperty("value")?n.value:null},e.setItem=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;e.storage=[].concat(i(e.storage),[{key:t,value:n,expiredAt:r}])},e.clear=function(){e.storage=[]},e.removeItem=function(t){e.storage=[].concat(i(e.storage.filter((function(e){return e.key!==t}))))},e.storage=[],e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=o)&&r.__esModule?r:{default:r}).default),s=new a;n.default=s},{"../":25}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},o=a(e("../")),i=a(e("../../../helpers/config"));function a(e){return e&&e.__esModule?e:{default:e}}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var c=function(e){function t(){var e,n,o;s(this,t);for(var a=arguments.length,c=Array(a),u=0;u<a;u++)c[u]=arguments[u];return n=o=l(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(c))),o.isAvailable=function(){return(0,i.default)().isSessionStorageSupported},o.getItem=function(e){if(o.isAvailable())try{return r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"parse",o).call(o,sessionStorage.getItem(e))}catch(e){return null}},o.setItem=function(e,n){if(o.isAvailable())try{sessionStorage.setItem(e,r(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"stringify",o).call(o,n))}catch(e){return!1}},o.clear=function(){if(o.isAvailable())try{sessionStorage.clear()}catch(e){return!1}},o.removeItem=function(e){if(o.isAvailable())try{sessionStorage.removeItem(e)}catch(e){return!1}},l(o,n)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(o.default),u=new c;n.default=u},{"../":25,"../../../helpers/config":51}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.StyleScheme=void 0;var r=e("./properties/DimensionValue"),o=e("./properties/BorderValue"),i=e("./properties/OffsetsValue"),a=e("./properties/FontFamilyValue"),s=e("./properties/CornersValue"),l=e("./properties/BoxShadowValue"),c=e("../../
1helpers/merge"),u=e("../../helpers/image"),d=e("../Language"),f=e("../../enum");var p=(0,e("../../helpers/url").getCdnUrl)("/img/svg/"),h=n.StyleScheme=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),m.call(this),this.selector=t,this.devices=n,this.scheme=r};h.prefixes=["-webkit-","-moz-","-ms-","-o-"],h.casts={fontSize:r.DimensionValue,border:o.BorderValue,borderTop:o.BorderValue,borderRight:o.BorderValue,borderBottom:o.BorderValue,borderLeft:o.BorderValue,padding:i.OffsetsValue,paddingTop:r.DimensionValue,paddingRight:r.DimensionValue,paddingLeft:r.DimensionValue,paddingBottom:r.DimensionValue,margin:i.OffsetsValue,marginTop:r.DimensionValue,marginRight:r.DimensionValue,marginLeft:r.DimensionValue,marginBottom:r.DimensionValue,top:r.DimensionValue,right:r.DimensionValue,left:r.DimensionValue,bottom:r.DimensionValue,width:r.DimensionValue,height:r.DimensionValue,minHeight:r.DimensionValue,maxHeight:r.DimensionValue,minWidth:r.DimensionValue,maxWidth:r.DimensionValue,borderRadius:s.CornersValue,fontFamily:a.FontFamilyValue,boxShadow:l.BoxShadowValue,letterSpacing:r.DimensionValue,lineHeight:r.DimensionValue},h.autoprefix={color:function(e){return h.toStyleProperty("-webkit-text-fill-color",e)},transition:function(e){return h.withPrefixes("transition",e)},transform:function(e){return h.withPrefixes("transform",e)},flex:function(e){return h.withPrefixes("flex",e)},flexDirection:function(e){return h.withPrefixes("flex-direction",e)},flexGrow:function(e){return h.withPrefixes("flex-grow",e)},alignItems:function(e){return h.withPrefixes("align-items",e)},justifyContent:function(e){return h.withPrefixes("justify-content",e)}},h.withPrefixes=function(e,t){return h.prefixes.map((function(n){return h.toStyleProperty(n+e,t)})).join("")},h.toStyleProperty=function(e,t){return e.replace(/([A-Z])/g,"-$1").toLowerCase()+": "+t+";"},h.getStyle=function(e,t){var n=h.autoprefix.hasOwnProperty(e)?h.autoprefix[e](t):"";return n+=h.toStyleProperty(e,t)};var m=function(){var e=this;this.getProperties=function(e,t){for(var n={},r=Object.keys(e),o=0;o<r.length;o++){var i=r[o],a=e[i];n[i]=(0,c.deepMerge)(a.default||{},t[i]||{})}return n},this.getSelectors=function(t){for(var n=e.getProperties(e.scheme,t),r=e.scheme,o=Object.keys(r),i={},a=0;a<o.length;a++){var s=o[a],l=r[s],u=l.selector;i.hasOwnProperty(u)||(i[u]={});for(var d=n[s],f=Object.keys(d),p=0;p<f.length;p++){var h=f[p],m=d[h];l.computed&&"function"==typeof l.computed[h]?i=(0,c.deepMerge)(i,l.computed[h](d[h],n)):i[u][h]=m}}return i},this.createSelectorsStyles=function(t){for(var n="",r=e.getSelectors(t),o=Object.keys(r),i=function(t){var i=r[o[t]],a=Object.keys(i);if(!a.length)return"continue";var s=e.selector.split(",").map((function(e){return o[t].split("{container}").join(e)}));n+=s.filter((function(e){return!e.includes("]-")})).join(","),n+="{";for(var l=0;l<a.length;l++){var c=void 0;if(h.casts.hasOwnProperty(a[l]))c=new(0,h.casts[a[l]])(i[a[l]]);else c=i[a[l]];n+=h.getStyle(a[l],"string"!=typeof c?c.toString():c)}n+="}"},a=0;a<o.length;a++)i(a);return n},this.createVisibilityBreakpoints=function(){for(var t="",n=Object.keys(e.devices),o=0;o<n.length;o++){var i=e.devices[n[o]];i.visible||(t+="@media all",i.minWidth&&(t+=" and (min-width: "+new r.DimensionValue(i.minWidth)+")"),i.maxWidth&&(t+=" and (max-width: "+new r.DimensionValue(i.maxWidth)+")"),t+="{"+e.selector+" {display: none}}")}return t},this.iconUrl=function(e,t,n,r){return n===f.SwitchersIconsEnum.ROUNDED?n=f.SwitchersIconsEnum.RECTANGLE:n===f.SwitchersIconsEnum.CIRCLE&&"currencies"===e&&"symbols"===t&&(n=f.SwitchersIconsEnum.SQUARE),""+p+e+"/"+t+"/"+n+"/"+r+".svg"},this.createItemsStyles=function(t,n,r){for(var o="",i=function(i){var a=t[i];if(a.icon)e.selector.split(",").forEach((function(e){o+=e+"-modal .ls-icon-custom."+a.getIconClassPref()+a.code+":before, ",o+=e+" .ls-icon-custom."+a.getIconClassPref()+a.code+":before {",o+="background-position: center center;",o+="background-size: cover;",o+='background-image: url("'+(0,u.formatImageUrl)(a.icon,"28x21","crop_center",2)+'");',o+="}"}));else{var s=e.iconUrl(a instanceof d.Language?"languages":"currencies",r,n,a.alias||a.code);e.selector.split(",").forEach((function(e){o+=e+"-modal ."+a.getIconClassPref()+"icon."+a.getIconClassPref()+a.code+":before, ",o+=e+" ."+a.getIconClassPref()+"icon."+a.getIconClassPref()+a.code+":before {",o+="background-position: center center;",o+="background-size: cover;",o+='background-image: url("'+(0,u.formatImageUrl)(s,"28x21","crop_center",2)+'");',o+="}"}))}},a=0;a<t.length;a++)i(a);return o},this.createStyle=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments[2],o=arguments[3],i="";i+=e.createItemsStyles(n,r,o),i+=e.createVisibilityBreakpoints(),i+=e.createSelectorsStyles(t);var a=document.createElement("style");return a.appendChild(document.createTextNode(i)),a}}},{"../../enum":46,"../../helpers/image":57,"../../helpers/merge":60,"../../helpers/url":66,"../Language":18,"./properties/BorderValue":29,"./properties/BoxShadowValue":30,"./properties/CornersValue":31,"./properties/DimensionValue":32,"./properties/FontFamilyValue":33,"./properties/OffsetsValue":34}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BorderValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./DimensionValue");n.BorderValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return n.value},this.value="object"===(void 0===t?"undefined":r(t))?new o.DimensionValue(t.width)+" "+t.style+" "+t.color:t}},{"./DimensionValue":32}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.BoxShadowValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./DimensionValue");n.BoxShadowValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return n.value},this.value="object"===(void 0===t?"undefined":r(t))?new o.DimensionValue(t.x)+" "+new o.DimensionValue(t.y)+" "+new o.DimensionValue(t.blur)+" "+new o.DimensionValue(t.spread)+" "+t.color:t}},{"./DimensionValue":32}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.CornersValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./DimensionValue");n.CornersValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return n.value},this.value="object"===(void 0===t?"undefined":r(t))?new o.DimensionValue(t.topLeft)+" "+new o.DimensionValue(t.topRight)+" "+new o.DimensionValue(t.bottomRight)+" "+new o.DimensionValue(t.bottomLeft):t}},{"./DimensionValue":32}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.DimensionValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return n.value},this.value="object"===(void 0===t?"undefined":r(t))?t.value+t.dimension:t}},{}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.FontFamilyValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return'"'+n.family+'", sans-serif'},this.family=t}},{}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.OffsetsValue=void 0;var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./DimensionValue");n.OffsetsValue=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.toString=function(){return n.value},this.value="object"===(void 0===t?"undefined":r(t))?new o.DimensionValue(t.top)+" "+new o.DimensionValue(t.right)+" "+new o.DimensionValue(t.bottom)+" "+new o.DimensionValue(t.left):t}},{"./DimensionValue":32}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("../../enum"),i=e("../StyleScheme"),a=f(e("../../eventsManager")),s=e("../../style"),l=e("../../
1helpers/environment"),c=e("../../helpers/dom"),u=f(e("../../helpers/config")),d=e("../../helpers/abilities");function f(e){return e&&e.__esModule?e:{default:e}}var p=function e(t,n,r){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),h.call(this),this.active=null,this.items=[],this.roots=[],this.scheme=r,this.resource=n,this.configure(t)};p.RESOURCE_LANGUAGES="languages",p.RESOURCE_CURRENCIES="currencies";var h=function(){var e=this;this.configure=function(t){e.type=t.type,e.target=t.target,e.sibling=t.sibling,e.sprite=t.sprite||"flags",e.icons=Object.values(o.SwitchersIconsEnum).indexOf(t.icons)>-1?t.icons:o.SwitchersIconsEnum.ROUNDED,e.position=Object.values(o.SwitchersPositionEnum).indexOf(t.position)>-1?t.position:o.SwitchersPositionEnum.RELATIVE,e.display=Object.values(o.SwitchersDisplayEnum).indexOf(t.display)>-1?t.display:o.SwitchersDisplayEnum.ALL,e.id=t.id,e.offset=t.offset,e.shortTitles="boolean"==typeof t.shortTitles&&t.shortTitles,e.defaultStyles="boolean"!=typeof t.defaultStyles||t.defaultStyles,e.styles="object"===r(t.styles)&&t.styles[e.type]||{},e.styleScheme=new i.StyleScheme(e.getSelector(),t.devices||{},e.defaultStyles?e.scheme:{}),"boolean"==typeof t.disabled?e.status=t.disabled?o.VisibilityStatusEnum.DISABLED:o.VisibilityStatusEnum.PUBLISHED:e.status=Object.values(o.VisibilityStatusEnum).indexOf(t.status)>-1?t.status:o.VisibilityStatusEnum.ADMIN_ONLY,e.isolateStyles=!("boolean"!=typeof t.isolateStyles||!(0,l.isShadowDomSupported)())&&t.isolateStyles}
1,this.getSelector=function(){return'selector[data-type="'+e.resource+'"][data-id="'+e.id+'"],.ls-sw-'+e.resource+"-"+e.id},this.create=function(t,n){return e.remove(),e.canBeCreated()&&t.length?(e.items=t,e.active=n,e.style=e.createStyle(t),e.isolateStyles||document.querySelector("head").appendChild(e.style),e.roots=e.createRoots(e.items.find((function(e){return e.code===n}))||t[0]),e):e},this.remove=function(){for(var t=0;t<e.roots.length;t++)e.roots[t].shadow?e.roots[t].shadow.remove():(0,c.removeChildren)(e.roots[t].element);return e.style&&e.style.remove(),e},this.update=function(t,n,r){var o=e.shouldRecreate(t,n,r);return e.configure(t),o?e.create(n,r):e.canBeCreated()?(e.style=e.createStyle(n),document.querySelectorAll(".ls-style-scheme-"+e.id).forEach((function(t){return t.replaceWith(e.style.cloneNode(!0))})),document.querySelectorAll("shadow-root").forEach((function(t){try{t.shadowRoot.querySelectorAll(".ls-style-scheme-"+e.id).forEach((function(t){return t.replaceWith(e.style.cloneNode(!0))}))}catch(e){}})),e):e},this.isolateElement=function(t,n){if(!e.isolateStyles)return{element:t,shadow:null};n||(n=document.createElement("shadow-root")),n.style.display="inline";var r=document.createElement("style");r.innerHTML=(0,s.getStyles)();var o=n.attachShadow({mode:"open"});return o.appendChild(r),o.appendChild(e.style.cloneNode(!0)),o.appendChild(t),{element:t,shadow:n}},this.createRoot=function(t,n){t||(t=document.body||document.querySelector("body"));var r=document.createElement("div"),o=e.isolateElement(r);return o.shadow?t.insertBefore(o.shadow,n||null):t.insertBefore(o.element,n||null),o},this.createStyle=function(t){var n=e.styleScheme.createStyle((0,d.hasAbility)(d.USE_SELECTORS_CUSTOMIZATION)?e.styles:{},t,e.icons,e.sprite);return n.classList.add("ls-style-scheme","ls-style-scheme-"+e.id),n},this.getTargets=function(){return e.target?e.target instanceof HTMLElement?[e.target]:[].slice.call(document.querySelectorAll(e.target),0):[]},this.getTargetSibling=function(t){if(!e.sibling)return null;for(var n="string"==typeof e.sibling?function(t){return t.matches(e.sibling)}:function(t){return t===e.sibling},r=0;r<t.childNodes.length;r++){var o=t.childNodes[r];if(o instanceof HTMLElement&&n.call(e,o))return o}return null},this.getRoots=function(){var t=[];if(e.target&&(t=e.getTargets().map((function(t){return e.createRoot(t,e.getTargetSibling(t))}))),t=t.concat([].slice.call(document.querySelectorAll(e.getSelector()),0).map((function(t){return e.isolateStyles?e.createRoot(t):{element:t,shadow:null}}))),e.target||t.length||e.position===o.SwitchersPositionEnum.RELATIVE||t.push(e.createRoot(document.body||document.querySelector("body"))),!t.length)return[];for(var n=0;n<t.length;n++)e.setContainerAttributes(t[n].element);return t},this.createRoots=function(t){var n=e.getRoots();if(!n.length)return[];if(!("createSwitcherElements"in e))return[];for(var r=0;r<n.length;r++)a.default.trigger(o.EventsEnum.BEFORE_SWITCHER_CREATED,[n[r].element,e.resource]),e.createSwitcherElements(n[r],t),a.default.trigger(o.EventsEnum.AFTER_SWITCHER_CREATED,[n[r].element,e.resource]);return n},this.parseOffsets=function(e){var t=[];return isNaN(e)?"string"==typeof e&&(t=(e=e.trim()).split(" ").map((function(e){return(e=e.trim())&&!isNaN(e)?e+"px":e})).filter((function(e){return!!e}))):(t[0]=e+"px",t[1]=e+"px"),t.length||(t=[0,0]),void 0===t[1]&&(t[1]=t[0]),t},this.setContainerAttributes=function(t){var n=["ls-sw-"+e.resource,"ls-sw-"+e.resource+"-"+e.id,"ls-sw-"+e.position];return e.defaultStyles&&(n=n.concat(["ls-sw","ls-sw-"+e.type,"ls-sw-"+e.display,"ls-sw-"+e.sprite])),t.setAttribute("translate","no"),t.className=n.join(" "),(0,u.default)().isRtl&&(t.setAttribute("dir","rtl"),t.classList.add("ls-dir-rtl")),e.setContainerOffsets(t,e.position,e.parseOffsets(e.offset)),t},this.setContainerOffsets=function(e,t,n){var r=null,i=null,a=null,s=null;switch(t){case o.SwitchersPositionEnum.TOP_LEFT:r=n[0],i="auto",a=n[1],s="auto";break;case o.SwitchersPositionEnum.TOP_RIGHT:r=n[0],i="auto",a="auto",s=n[1];break;case o.SwitchersPositionEnum.BOTTOM_LEFT:r="auto",i=n[0],a=n[1],s="auto";break;case o.SwitchersPositionEnum.BOTTOM_RIGHT:r="auto",i=n[0],a="auto",s=n[1]}e.style.top=r,e.style.bottom=i,e.style.left=a,e.style.right=s},this.createLink=function(t){var n=document.createElement("a");if(n.title=t.getTitle(),n.href=t.getLink(),n.setAttribute("data-no-instant",""),n.classList.add("js-no-transition"),n.classList.add("ls-sw-link"),e.display!==o.SwitchersDisplayEnum.TITLES){var r=document.createElement("i");r.classList.add("ls-icon"),r.classList.add(t.getIconClassPref()+e.icons),r.classList.add(t.getIconClassPref()+t.code),t.icon?r.classList.add("ls-icon-custom"):r.classList.add(t.getIconClassPref()+"icon"),n.appendChild(r)}
1if(e.display!==o.SwitchersDisplayEnum.ICONS){var i=document.createElement("i");i.classList.add("ls-text"),i.textContent=e.shortTitles?t.code.toUpperCase():t.getTitle(),n.appendChild(i)}return n},this.onSelected=function(t){var n=e.items.find((function(e){return e.code===t}));n&&n.onSelected()},this.canBeCreated=function(){return e.status!==o.VisibilityStatusEnum.DISABLED&&(e.status===o.VisibilityStatusEnum.ADMIN_ONLY?(0,u.default)().isAdmin||(0,u.default)().isPreview:e.status===o.VisibilityStatusEnum.PUBLISHED)},this.shouldRecreate=function(t,n,r){if(!e.active||e.active.code!==r.code||n.length!==e.items.length||n.find((function(t){return-1===e.items.findIndex((function(e){return e.code===t.code}))})))return!0;for(var o=["status","target","sibling","sprite","icons","position","display","id","offset","shortTitles","isolateStyles"],i=0;i<o.length;i++){var a=o[i];if(t[a]!==e[a])return!0}return!1},this.shouldCreateBranding=function(){return!(0,d.hasAbility)(d.DISABLE_BRANDING)}};n.default=p},{"../../enum":46,"../../eventsManager":47,"../../helpers/abilities":48,"../../helpers/config":51,"../../helpers/dom":52,"../../helpers/environment":53,"../../style":70,"../StyleScheme":28}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.switcherFactory=void 0;var r=e("../../enum"),o=c(e("./types/InlineSwitcher")),i=c(e("./types/SelectSwitcher")),a=c(e("./types/IosSwitcher")),s=c(e("./types/ModalSwitcher")),l=c(e("./types/DropDownSwitcher"));function c(e){return e&&e.__esModule?e:{default:e}}n.switcherFactory=function(e,t){switch(e.type){case r.SwitchersTypesEnum.INLINE:return new o.default(e,t);case r.SwitchersTypesEnum.SELECT:return new i.default(e,t);case r.SwitchersTypesEnum.IOS:return new a.default(e,t);case r.SwitchersTypesEnum.MODAL:return new s.default(e,t);default:return new l.default(e,t)}}},{"../../enum":46,"./types/DropDownSwitcher":37,"./types/InlineSwitcher":38,"./types/IosSwitcher":39,"./types/ModalSwitcher":40,"./types/SelectSwitcher":41}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=l(e("../")),i=e("../../StyleScheme/properties/DimensionValue"),a=e("../../../enum"),s=l(e("../../../eventsManager"));function l(e){return e&&e.__esModule?e:{default:e}}var c=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{activeContainer:{selector:"{container} > .active",default:{padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}},background:"rgba(255,255,255,.95)",borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}}}},activeContainerHovered:{selector:"{container} > .active:hover"},activeItem:{selector:"{container} > .active a",default:{fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)"}},activeItemHovered:{selector:"{container} > .active:hover a"},activeItemIcon:{selector:"{container}.ls-sw-all > .active .ls-icon",computed:{position:function(e){return{"{container}.ls-sw-all > .active a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}.ls-sw-all > .active .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?e:0,marginLeft:"right"!==t.activeItemIcon.position?0:e},".ls-dir-rtl{container}.ls-sw-all > .active .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?0:e,marginLeft:"right"!==t.activeItemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{offset:{value:10,dimension:"px"},position:"left"}},dropdownContainer:{selector:"{container} > ul",computed:{animation:function(e){return{sliding:{"{container} > ul":{transition:"max-height 0.3s, visibility 0.2s, opacity 0.2s",maxHeight:"0px"}},fading:{"{container} > ul":{transition:"visibility 0.3s, opacity 0.3s"},"{container}.ls-sw-open-up > ul":{transition:"visibility 0.3s, opacity 0.3s"}}}[e]||{}}},default:{animation:"sliding",background:"rgba(255,255,255,.95)",borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},padding:{top:{value:0,dimension:"px"},right:{value:0,dimension:"px"},bottom:{value:0,dimension:"px"},left:{value:0,dimension:"px"}}}},dropdownContainerHovered:{selector:"{container} > ul:hover"},dropdownItem:{selector:"{container} > ul a",default:{padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}},fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)"}},dropdownItemHovered:{selector:"{container} > ul a:hover",default:{color:"rgba(27, 160, 227, 1)"}},dropdownItemIcon:{selector:"{container}.ls-sw-all > ul .ls-icon",computed:{position:function(e){return{"{container}.ls-sw-all > ul a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}.ls-sw-all > ul .ls-icon":{marginRight:"right"!==t.dropdownItemIcon.position?e:0,marginLeft:"right"!==t.dropdownItemIcon.position?0:e},".ls-dir-rtl{container}.ls-sw-all > ul .ls-icon":{marginRight:"right"!==t.dropdownItemIcon.position?0:e,marginLeft:"right"!==t.dropdownItemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{position:"left",offset:{value:10,dimension:"px"}}},arrow:{selector:"{container} > .active:after",computed:{size:function(e){return{"{container} > .active:after":{width:e,height:e,top:"calc(50% - "+new i.DimensionValue(e)+"/2)"}}},offset:function(e,t){return"none"===t.arrow.position?null:{"{container} > .active a":{paddingRight:"right"===t.arrow.position?"calc("+new i.DimensionValue(e)+" + "+new i.DimensionValue(t.arrow.size)+")":0,paddingLeft:"right"===t.arrow.position?0:"calc("+new i.DimensionValue(e)+" + "+new i.DimensionValue(t.arrow.size)+")"},".ls-dir-rtl{container} > .active a":{paddingRight:"right"===t.arrow.position?0:"calc("+new i.DimensionValue(e)+" + "+new i.DimensionValue(t.arrow.size)+")",paddingLeft:"right"===t.arrow.position?"calc("+new i.DimensionValue(e)+" + "+new i.DimensionValue(t.arrow.size)+")":0}}},position:function(e,t){return"none"===e?{"{container} > .active:after":{display:"none"}}:{"{container} > .active:after":{right:"right"===e?t.activeContainer.padding.right:"auto",left:"r
1ight"===e?"auto":t.activeContainer.padding.left,transform:"rotate(135deg)"},".ls-dir-rtl{container} > .active:after":{right:"right"===e?"auto":t.activeContainer.padding.right,left:"right"===e?t.activeContainer.padding.left:"auto"},"{container}.ls-sw-open-up > .active:after":{transform:"right"===e?"rotate(-45deg)":"rotate(315deg)"},".ls-dir-rtl{container}.ls-sw-open-up > .active:after":{transform:"right"===e?"rotate(315deg)":"rotate(-45deg)"},"{container}.ls-sw-closed > .active:after":{transform:"right"===e?"rotate(45deg)":"rotate(225deg)"},".ls-dir-rtl{container}.ls-sw-closed > .active:after":{transform:"right"===e?"rotate(225deg)":"rotate(45deg)"}}}},default:{color:"rgba(39, 46, 49, 1)",position:"right",offset:{value:20,dimension:"px"},size:{value:6,dimension:"px"}}}}));return r.getOffset=function(e){var t=e.getBoundingClientRect();return{top:t.top,left:t.left}},r.openDropDown=function(e){e.classList.remove("ls-sw-closed"),e.classList.add("ls-sw-opened");var t=window.innerHeight;r.getOffset(e).top>t/2?e.classList.add("ls-sw-open-up"):e.classList.remove("ls-sw-open-up");var n=e.querySelector("ul"),o=getComputedStyle(n),i=n.scrollHeight+parseInt(o.marginTop)+parseInt(o.marginBottom)+parseInt(o.borderTop)+parseInt(o.borderBottom);n.style.maxHeight=i<300?i+"px":"300px",s.default.trigger(a.EventsEnum.DROPDOWN_SWITCHER_OPENED,[e,r.resource])},r.closeDropDown=function(e){e.classList.add("ls-sw-closed"),e.classList.remove("ls-sw-opened"),e.querySelector("ul").style.maxHeight=null,s.default.trigger(a.EventsEnum.DROPDOWN_SWITCHER_CLOSED,[e,r.resource])},r.handleActiveClick=function(e){e.preventDefault();var t=e.currentTarget.parentNode;return t.classList.contains("ls-sw-opened")?r.closeDropDown(t):r.openDropDown(t),!1},r.handleWindowClick=function(e){for(var t=0;t<r.roots.length;t++){var n=r.roots[t].element,o=r.roots[t].shadow;n!==e.target&&(n.contains(e.target)||o&&e.target===o||r.closeDropDown(n))}},r.createSwitcherElements=function(e,t){var n=e.element;n.innerHTML="",n.classList.add("ls-sw-closed"),n.classList.remove("ls-sw-opened"),n.appendChild(r.createActiveContainer(t)),n.appendChild(r.createDropDownContainer(t));var o=n.querySelector("ul").offsetWidth,i=n.offsetWidth;n.style.minWidth=i<o?o+"px":i+"px"},r.createActiveContainer=function(e){var t=document.createElement("div");return t.className="active "+e.code,t.setAttribute("data-code",e.code),t.appendChild(r.createLink(e)),t.onclick=r.handleActiveClick,t},r.createDropDownContainer=function(e){var t=document.createElement("ul"),n=r.createBrandLink();r.shouldCreateBranding()&&t.appendChild(n);for(var o=0;o<r.items.length;o++){var i=r.items[o];if(i.code!==e.code){var a=document.createElement("li");a.setAttribute("data-code",i.code),a.onclick=function(e){e.preventDefault();var t=e.currentTarget.getAttribute("data-code");return r.onSelected(t),!1},a.appendChild(r.createLink(i)),t.appendChild(a)}}return t},r.setActive=function(e){var t=r.items.find((function(t){return t.code===e}));if(t)for(var n=0;n<r.roots.length;n++)r.createSwitcherElements(r.roots[n],t)},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"createBrandLink",value:function(){var e=document.createElement("li");e.style.fontSize="12px";var t=document.createElement("a");return t.href="https://langshop.app/",t.target="_blank",t.style.cursor="pointer",t.textContent="Powered by LangShop",e.appendChild(t),e}}]),t}(o.default);n.default=c},{"../":35,"../../../enum":46,"../../../eventsManager":47,"../../StyleScheme/properties/DimensionValue":32}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),i=e("../");var a=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{container:{selector:"{container} ul",default:{background:"rgba(255,255,255,.95)",borderRadius:{topLeft:{value:4,dimension:"px"},topRight:{value:4,dimension:"px"},bottomLeft:{value:4,dimension:"px"},bottomRight:{value:4,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},overflow:"hidden"}},containerHovered:{selector:"{container} ul:hover"},item:{selector:"{container} a",default:{background:"transparent",padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}},fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)"}},itemHovered:{selector:"{container} a:hover",default:{background:"rgba(245, 245, 245, 1)",color:"rgba(39, 46, 49, 1)"}},itemActive:{selector:"{container} .active a",default:{background:"rgba(245, 245, 245, 1)",color:"rgba(27, 160, 227, 1)"}},itemIcon:{selector:"{container}.ls-sw-all .ls-icon",computed:{position:function(e){return{"{container}.ls-sw-all a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.itemIcon.position?e:0,marginLeft:"right"!==t.itemIcon.position?0:e},".ls-dir-rtl{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.itemIcon.position?0:e,marginLeft:"right"!==t.itemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{position:"left",offset:{value:10,dimension:"px"}}}}));return r.createSwitcherElements=function(e,t){for(var n=document.createElement("ul"),o=0;o<r.items.length;o++){var i=r.items[o],a=document.createElement("li");a.setAttribute("data-code",i.code),a.onclick=function(e){e.preventDefault();var t=e.currentTarget,n=t.getAttribute("data-code");return t.classList.contains("active")||r.onSelected(n),!1},a.appendChild(r.createLink(i)),i.code===t.code&&a.classList.add("active"),n.appendChild(a)}r.shouldCreateBranding()&&(n.style.borderBottom="none"),e.element.appendChild(n),r.shouldCreateBranding()&&e.element.appendChild(r.createBrandLink())},r.setActive=function(e){if(r.items.find((function(t){return t.code===e}))&&r.roots.length)for(var t=0;t<r.roots.length;t++){var n=r.roots[t].element.querySelector("ul"),o=n.querySelector('[data-code="'+e+'"]');n.querySelector(".active").classList.remove("active"),o.classList.add("active")}},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),o(t,[{key:"createBrandLink",value:function(){var e=document.createElement("ul");e.style.fontSize="12px",e.style.borderTop="none";var t=document.createElement("li");e.appendChild(t);var n=document.createElement("a");return n.href="https://langshop.app/",n.target="_blank",n.style.padding="6px",n.textContent="Powered by LangShop",t.appendChild(n),e}}]),t}(((r=i)&&r.__esModule?r:{default:r}).default);n.default=a},{"../":35}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=u(e("../")),o=e("../../../enum"),i=e("../../../helpers/colors"),a=e("../../../helpers/i18n"),s=u(e("../../../eventsManager")),l=e("../../../helpers/
1dom"),c=u(e("../../../helpers/config"));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{activeContainer:{selector:"{container}",default:{padding:{top:{value:0,dimension:"px"},right:{value:0,dimension:"px"},bottom:{value:0,dimension:"px"},left:{value:0,dimension:"px"}},background:"rgba(255,255,255,.95)",borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}}}},activeContainerHovered:{selector:"{container}:hover"},activeItem:{selector:"{container} a",default:{fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)",padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}}}},activeItemHovered:{selector:"{container} a:hover"},activeItemIcon:{selector:"{container}.ls-sw-all .ls-icon",computed:{position:function(e){return{"{container}.ls-sw-all a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?e:0,marginLeft:"right"!==t.activeItemIcon.position?0:e},".ls-dir-rtl{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?0:e,marginLeft:"right"!==t.activeItemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{position:"left",offset:{value:10,dimension:"px"}}},modalOverlay:{selector:"{container}-modal .ls-modal-overlay",default:{background:"rgba(0, 0, 0, 0.7)"}},wheelButtonsContainer:{selector:"{container}-modal .ls-modal-content-buttons",default:{background:"rgba(255, 255, 255, 1)",padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:0,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:0,dimension:"px"}}}},wheelCloseButton:{selector:"{container}-modal .ls-modal-close",default:{fontSize:{value:14,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)",fontWeight:"bold"}},wheelCloseButtonHover:{selector:"{container}-modal .ls-modal-close:hover"},wheelSubmitButton:{selector:"{container}-modal .ls-modal-submit",default:{fontSize:{value:14,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)",fontWeight:"bold"}},wheelSubmitButtonHover:{selector:"{container}-modal .ls-modal-submit:hover"},wheelPanelContainer:{selector:"{container}-modal .ls-modal-content-panel",computed:{background:function(e){var t={"{container}-modal .ls-modal-content-panel":{background:e}};if("transparent"===e)return t;var n=(0,i.rgba)(e);if(!n)return t;var r="rgba("+n.r+", "+n.g+", "+n.b+", "+n.a+")",o="rgba("+n.r+", "+n.g+", "+n.b+", 0)",a="rgba("+n.r+", "+n.g+", "+n.b+", "+n.a+")";return t["{container}-modal .ls-sw-wheel-mask"]={background:"linear-gradient(to bottom, "+r+", "+o+", "+a+")"},t}},default:{background:"rgba(255, 255, 255, 1)"}},wheelLine:{selector:"{container}-modal .ls-sw-wheel-line",default:{borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:0,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:0,dimension:"px"}}}},wheelItem:{selector:"{container}-modal .ls-sw-wheel-slider a",default:{background:"transparent",padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}},fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)",justifyContent:"flex-start"}},wheelItemIcon:{selector:"{container}-modal.ls-sw-all .ls-sw-wheel-slider .ls-icon",computed:{position:function(e){return{"{container}-modal.ls-sw-all .ls-sw-wheel-slider a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}-modal.ls-sw-all .ls-sw-wheel-slider .ls-icon":{marginRight:"right"!==t.wheelItemIcon.position?e:0,marginLeft:"right"!==t.wheelItemIcon.position?0:e},".ls-dir-rtl{container}-modal.ls-sw-all .ls-sw-wheel-slider .ls-icon":{marginRight:"right"!==t.wheelItemIcon.position?0:e,marginLeft:"right"!==t.wheelItemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}-modal.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{position:"left",offset:{value:10,dimension:"px"}}}}));return r.createRoots=function(e){var t=r.getRoots();if(!t.length)return[];r.wheel=r.createWheel(e),r.modal=r.createModal(),(0,c.default)().isRtl&&(r.modal.element.setAttribute("dir","rtl"),r.modal.element.classList.add("ls-dir-rtl"));for(var n=0;n<t.length;n++)s.default.trigger(o.EventsEnum.BEFORE_SWITCHER_CREATED,[t[n].element,r.resource]),r.createSwitcherElements(t[n],e),s.default.trigger(o.EventsEnum.AFTER_SWITCHER_CREATED,[t[n].element,r.resource]);return t},r.createSwitcherElements=function(e,t){r.createContainerElements(e.element,t),document.body.appendChild(r.modal.shadow||r.modal.element),r.moveTo(r.wheel.activeIndex)},r.createContainerElements=function(e,t){e.innerHTML="";var n=r.createLink(t);n.onclick=function(e){return e.preventDefault(),r.openModal(),!1},e.appendChild(n)},r.createModal=function(){var e=document.createElement("div");e.className=["ls-sw","ls-modal","ls-sw-"+r.type+"-modal","ls-sw-"+r.resource+"-"+r.id+"-modal","ls-sw-"+r.display,"ls-sw-"+r.sprite].join(" "),e.setAttribute("translate","no");var t=document.createElement("div");t.classList.add("ls-modal-cell");var n=r.createModalOverlay();return n.onclick=r.closeModal,t.appendChild(n),t.appendChild(r.createModalContent()),e.appendChild(t),r.isolateElement(e)},r.createModalOverlay=function(){var e=document.createElement("div");return e.className=["ls-modal-overlay"].join(" "),e},r.createModalContent=function(){var e=document.createElement("div");return e.classList.add("ls-modal-content"),e.appendChild(r.createModalContentButtons()),e.appendChild(r.createModalContentPanel()),e},r.createModalContentButtons=function(){var e=document.createElement("div");e.classList.add("ls-modal-content-buttons");var t=document.createElement("button");t.classList.add("ls-modal-close"),t.innerText=(0,a.i18n)("switchers.ios_switcher.close","Close"),t.onclick=function(e){return e.preventDefault(),r.closeModal(),!1};var n=document.createElement("button");return n.classList.add("ls-modal-submit"),n.innerText=(0,a.i18n)("switchers.ios_switcher.done","Done"),n.onclick=function(e){return e.preventDefault(),r.wheel.activeIndex===r.wheel.currentIndex?(r.closeModal(),!1):(r.onSelected(r.items[r.wheel.currentIndex].code),!1)},e.appendChild(t),e.appendChild(n),e},r.createModalContentPanel=function(){var e=document.createElement("div");return e.classList.add("ls-modal-content-panel"),e.appendChild(r.wheel.container),e},r.createWheel=function(e){var t=document.createElement("div");t.classList.add("ls-sw-wheel");var n=document.createElement("ul");n.classList.add("ls-sw-wheel-slider");for(var o=0;o<r.items.length;o++){var i=r.items[o],a=document.createElement("li"),s=r.createLink(i);s.onclick=function(e){return e.preventDefault(),!1},a.appendChild(s),n.appendChild(a)}var l=document.createElement("div");l.classList.add("ls-sw-wheel-line");var c=document.createElement("div");return c.classList.add("ls-sw-wheel-mask"),t.appendChild(n),t.appendChild(l),t.appendChild(c),{mouseWheelDelta:0,mou
1seWheelWeight:0,mouseWheelTimeout:null,activeIndex:r.items.indexOf(e),currentDistance:0,moveOffset:0,offsetSum:0,dragStatus:!1,container:t,slider:n,line:l}},r.addListeners=function(){r.wheel.container.addEventListener("touchstart",r.handleSliderDragStart,!0),r.wheel.container.addEventListener("touchmove",r.handleSliderDragOver,!0),r.wheel.container.addEventListener("touchend",r.handleSliderDragEnd,!0),r.wheel.container.addEventListener("mousedown",r.handleSliderDragStart,!0),r.wheel.container.addEventListener("mousemove",r.handleSliderDragOver,!0),window.addEventListener("mouseup",r.handleSliderDragEnd,!0),document.addEventListener("keydown",r.handleKeyPress,!0),r.wheel.container.addEventListener("mousewheel",r.handleMouseWheel,!1),r.wheel.container.addEventListener("wheel",r.handleMouseWheel,!1),r.wheel.container.addEventListener("DOMMouseScroll",r.handleMouseWheel,!1)},r.removeListeners=function(){r.wheel.container.removeEventListener("touchstart",r.handleSliderDragStart,!0),r.wheel.container.removeEventListener("touchmove",r.handleSliderDragOver,!0),r.wheel.container.removeEventListener("touchend",r.handleSliderDragEnd,!0),r.wheel.container.removeEventListener("mousedown",r.handleSliderDragStart,!0),r.wheel.container.removeEventListener("mousemove",r.handleSliderDragOver,!0),window.removeEventListener("mouseup",r.handleSliderDragEnd,!0),document.removeEventListener("keydown",r.handleKeyPress,!0),r.wheel.container.removeEventListener("mousewheel",r.handleMouseWheel,!1),r.wheel.container.removeEventListener("wheel",r.handleMouseWheel,!1),r.wheel.container.removeEventListener("DOMMouseScroll",r.handleMouseWheel,!1)},r.getSliderLineHeight=function(){var e=r.wheel.slider.firstChild.offsetHeight;return r.wheel.line.style.height=e+"px",r.wheel.line.style.top="calc(50% - "+e+"px/2)",e},r.getSliderLineOffset=function(){return r.wheel.line.offsetTop},r.handleKeyPress=function(e){if(r.modalOpened)switch(e.keyCode||e.code){case 13:case"Enter":return e.preventDefault(),r.closeModal(),r.wheel.activeIndex===r.wheel.currentIndex?!1:(r.onSelected(r.items[r.wheel.currentIndex].code),!1);case 27:case"Escape":return e.preventDefault(),r.closeModal(),!1;case 38:case"ArrowUp":return e.preventDefault(),r.moveTo(r.wheel.currentIndex-1),!1;case 40:case"ArrowDown":return e.preventDefault(),r.moveTo(r.wheel.currentIndex+1),!1}},r.handleMouseWheel=function(e){e.preventDefault();var t=e.deltaY,n=Math.abs(t),o=r.wheel.mouseWheelDelta;return r.wheel.mouseWheelDelta=n,clearTimeout(r.wheel.mouseWheelTimeout),r.wheel.mouseWheelTimeout=setTimeout((function(){r.wheel.mouseWheelWeight=0,r.wheel.mouseWheelDelta=0}),300),r.wheel.mouseWheelWeight+=n,o>0&&r.wheel.mouseWheelWeight<100||(t>0?r.moveTo(r.wheel.currentIndex+1):t<0&&r.moveTo(r.wheel.currentIndex-1),r.wheel.mouseWheelWeight=0),!1},r.handleSliderDragEnd=function(e){e.preventDefault(),"touchend"===e.type?r.wheel.moveEndY=parseInt(e.changedTouches[0].clientY,10):r.wheel.moveEndY=e.clientY,r.wheel.dragStatus=!1;var t=r.getSliderLineHeight(),n=r.getSliderLineOffset();if(r.wheel.offsetSum=r.wheel.moveEndY-r.wheel.startY,0===r.wheel.offsetSum){var o=Math.round((document.documentElement.clientHeight-r.wheel.moveEndY-n-t/2)/t);if(!o)return!1;var i=r.wheel.currentDistance+o*t;r.moveTo(r.findDistanceIndex(i))}else r.moveTo(r.findDistanceIndex(r.wheel.currentDistance));return!1},r.handleSliderDragStart=function(e){return e.preventDefault(),"touchstart"===e.type?r.wheel.startY=parseInt(e.touches[0].clientY,10):r.wheel.startY=e.clientY,r.wheel.oldMoveY=r.wheel.startY,r.wheel.dragStatus=!0,!1},r.handleSliderDragOver=function(e){return e.preventDefault(),!!r.wheel.dragStatus&&("touchmove"===e.type?r.wheel.moveY=e.touches[0].clientY:r.wheel.moveY=e.clientY,r.wheel.moveOffset=r.wheel.moveY-r.wheel.oldMoveY,r.wheel.currentDistance=r.wheel.currentDistance+r.wheel.moveOffset,r.movePosition(r.wheel.currentDistance),r.wheel.oldMoveY=r.wheel.moveY,!1)},r.openModal=function(){r.modal&&(r.modal.element.classList.add("ls-modal-opened"),r.addListeners(),r.modalOpened=!0)},r.closeModal=function(){r.modal&&(r.modal.element.classList.remove("ls-modal-opened"),r.removeListeners(),r.modalOpened=!1)},r.moveTo=function(e){var t=r.items.length-1;e>t&&(e=t),e<0&&(e=0);var n=r.getSliderLineHeight(),o=r.getSliderLineOffset()-e*n;r.wheel.currentDistance=o,r.wheel.currentIndex=e,r.movePosition(o)},r.findDistanceIndex=function(e){var t=r.getSliderLineHeight(),n=r.getSliderLineOffset();return Math.round((n-e)/t)},r.movePosition=function(e){r.wheel.slider.style.webkitTransform="translate3d(0,"+e+"px, 0)",r.wheel.slider.style.transform="translate3d(0,"+e+"px, 0)"},r.setActive=function(e){r.closeModal();var t=r.items.findIndex((function(t){return t.code===e}));if(-1!==t&&r.roots.length){r.wheel.activeIndex=t;for(var n=0;n<r.roots.length;n++)r.createContainerElements(r.roots[n].element,r.items[t]);r.moveTo(r.wheel.activeIndex)}},r.remove=function(){for(var e=0;e<r.roots.length;e++)r.roots[e].shadow?r.roots[e].shadow.remove():(0,l.removeChildren)(r.roots[e].element);return r.modal&&(r.modal.shadow||r.modal.element).remove(),r.style&&r.style.remove(),r},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(r.default);n.default=d},{"../":35,"../../../enum":46,"../../../eventsManager":47,"../../../helpers/colors":50,"../../../helpers/config":51,"../../../helpers/
1dom":52,"../../../helpers/i18n":56}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),o=u(e("../")),i=e("../../StyleScheme/properties/DimensionValue"),a=e("../../../enum"),s=u(e("../../../eventsManager")),l=e("../../../helpers/dom"),c=u(e("../../../helpers/config"));function u(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{activeContainer:{selector:"{container}",default:{padding:{top:{value:0,dimension:"px"},right:{value:0,dimension:"px"},bottom:{value:0,dimension:"px"},left:{value:0,dimension:"px"}},background:"rgba(255,255,255,.95)",borderRadius:{topLeft:{value:0,dimension:"px"},topRight:{value:0,dimension:"px"},bottomLeft:{value:0,dimension:"px"},bottomRight:{value:0,dimension:"px"}},borderTop:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(224, 224, 224, 1)",style:"solid",width:{value:1,dimension:"px"}}}},activeContainerHovered:{selector:"{container}:hover"},activeItem:{selector:"{container} a",default:{fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)",padding:{top:{value:8,dimension:"px"},right:{value:10,dimension:"px"},bottom:{value:8,dimension:"px"},left:{value:10,dimension:"px"}}}},activeItemHovered:{selector:"{container} a:hover"},activeItemIcon:{selector:"{container}.ls-sw-all .ls-icon",computed:{position:function(e){return{"{container}.ls-sw-all a":{flexDirection:"right"!==e?"row":"row-reverse"}}},offset:function(e,t){return{"{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?e:0,marginLeft:"right"!==t.activeItemIcon.position?0:e},".ls-dir-rtl{container}.ls-sw-all .ls-icon":{marginRight:"right"!==t.activeItemIcon.position?0:e,marginLeft:"right"!==t.activeItemIcon.position?e:0}}},color:function(e){return e.filter?{"{container}.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{position:"left",offset:{value:10,dimension:"px"}}},modalOverlay:{selector:"{container}-modal .ls-modal-overlay",default:{background:"rgba(0, 0, 0, 0.7)"}},modalContent:{selector:"{container}-modal .ls-modal-content",computed:{animation:function(e){return{"sliding-up":{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"},"{container}-modal .ls-modal-content":{transition:"bottom 0.4s",bottom:"-100vh"},"{container}-modal.ls-modal-opened .ls-modal-content":{bottom:"0"}},"sliding-down":{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"},"{container}-modal .ls-modal-content":{transition:"top 0.4s",top:"-100vh"},"{container}-modal.ls-modal-opened .ls-modal-content":{top:"0"}},"sliding-left":{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"},"{container}-modal .ls-modal-content":{transition:"right 0.4s",right:"-100vw"},"{container}-modal.ls-modal-opened .ls-modal-content":{right:"0"}},"sliding-right":{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"},"{container}-modal .ls-modal-content":{transition:"left 0.4s",left:"-100vw"},"{container}-modal.ls-modal-opened .ls-modal-content":{left:"0"}},scale:{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"},"{container}-modal .ls-modal-content":{transition:"transform 0.3s",transform:"scale(0)"},"{container}-modal.ls-modal-opened .ls-modal-content":{transform:"scale(1)"}},fading:{"{container}-modal":{transition:"visibility 0.4s, opacity 0.4s"}}}[e]||{}}},default:{animation:"sliding-down",background:"rgba(255, 255, 255, 1)",maxHeight:{value:80,dimension:"vh"},maxWidth:{value:80,dimension:"vw"},width:{value:320,dimension:"px"}}},modalContentHover:{selector:"{container}-modal .ls-modal-content:hover"},modalItem:{selector:"{container}-modal a",computed:{reverseElements:function(e){return{"{container}-modal a":{flexDirection:e?"row-reverse":"row"},"{container}
1-modal .ls-text":{flexGrow:1,textAlign:e?"left":"right"},".ls-dir-rtl{container}-modal .ls-text":{flexGrow:1,textAlign:e?"right":"left"}}}},default:{reverseElements:!0,fontSize:{value:11,dimension:"px"},fontFamily:"Open Sans",color:"rgba(102, 102, 102, 1)",textTransform:"uppercase",fontWeight:"bold",justifyContent:"space-between",letterSpacing:{value:3,dimension:"px"},padding:{top:{value:20,dimension:"px"},right:{value:26,dimension:"px"},bottom:{value:20,dimension:"px"},left:{value:26,dimension:"px"}}}},modalItemIcon:{selector:"{container}-modal.ls-sw-all .ls-icon",computed:{offset:function(e,t){return{"{container}-modal.ls-sw-all .ls-icon":{marginRight:t.modalItem.reverseElements?0:e,marginLeft:t.modalItem.reverseElements?e:0},".ls-dir-rtl{container}-modal.ls-sw-all .ls-icon":{marginRight:t.modalItem.reverseElements?e:0,marginLeft:t.modalItem.reverseElements?0:e}}},color:function(e){return e.filter?{"{container}-modal.ls-sw-symbols .ls-icon:not(.ls-icon-custom)":{filter:e.filter}}:null}},default:{offset:{value:20,dimension:"px"}}},modalItemRadio:{selector:"{container}-modal .ls-radio",computed:{size:function(e){return{"{container}-modal .ls-radio":{width:e,height:e,flex:"0 0 "+new i.DimensionValue(e)}}},color:function(e){return{"{container}-modal .ls-radio":{border:{width:{value:2,dimension:"px"},style:"solid",color:e}}}},offset:function(e,t){return{"{container}-modal .ls-radio":{marginRight:t.modalItem.reverseElements?0:e,marginLeft:t.modalItem.reverseElements?e:0},".ls-dir-rtl{container}-modal .ls-radio":{marginRight:t.modalItem.reverseElements?e:0,marginLeft:t.modalItem.reverseElements?0:e}}}},default:{size:{value:20,dimension:"px"},offset:{value:20,dimension:"px"},color:"rgba(193, 202, 202, 1)"}},modalItemHovered:{selector:"{container}-modal a:hover",default:{background:"rgba(255, 103, 99, 0.5)",color:"rgba(254, 236, 233, 1)"}},modalItemHoveredRadio:{selector:"{container}-modal a:hover .ls-radio",computed:{size:function(e){return{"{container}-modal a:hover .ls-radio":{width:e,height:e,flex:"0 0 "+new i.DimensionValue(e)}}},color:function(e){return{"{container}-modal a:hover .ls-radio":{border:{width:{value:2,dimension:"px"},style:"solid",color:e}}}},offset:function(e,t){return{"{container}-modal a:hover .ls-radio":{marginRight:t.modalItem.reverseElements?0:e,marginLeft:t.modalItem.reverseElements?e:0},".ls-dir-rtl{container}-modal a:hover .ls-radio":{marginRight:t.modalItem.reverseElements?e:0,marginLeft:t.modalItem.reverseElements?0:e}}}},default:{size:{value:20,dimension:"px"},offset:{value:20,dimension:"px"},color:"rgba(254, 236, 233, 1)"}},modalActiveItem:{selector:"{container}-modal .active a",default:{fontSize:{value:15,dimension:"px"},color:"rgba(254, 236, 233, 1)",background:"rgba(255, 103, 99, 1)"}},modalActiveItemRadio:{selector:"{container}-modal .active a .ls-radio",computed:{size:function(e){return{"{container}-modal .active a .ls-radio":{width:e,height:e,flex:"0 0 "+new i.DimensionValue(e)}}},color:function(e){return{"{container}-modal .active a .ls-radio":{border:{width:{value:2,dimension:"px"},style:"solid",color:e}},"{container}-modal .active a .ls-radio:after":{background:e}}},offset:function(e,t){return{"{container}-modal .active a .ls-radio":{marginRight:t.modalItem.reverseElements?0:e,marginLeft:t.modalItem.reverseElements?e:0},".ls-dir-rtl{container}-modal .active a .ls-radio":{marginRight:t.modalItem.reverseElements?e:0,marginLeft:t.modalItem.reverseElements?0:e}}}},default:{size:{value:24,dimension:"px"},offset:{value:18,dimension:"px"},color:"rgba(255, 255, 255, 1)"}},modalActiveItemHovered:{selector:"{container}-modal .active a:hover"},modalActiveItemHoveredRadio:{selector:"{container}-modal .active a:hover .ls-radio",computed:{size:function(e){return{"{container}-modal .active a:hover .ls-radio":{width:e,height:e,flex:"0 0 "+new i.DimensionValue(e)}}},color:function(e){return{"{container}-modal .active a:hover .ls-radio":{border:{width:{value:2,dimension:"px"},style:"solid",color:e}},"{container}-modal .active a:hover .ls-radio:after":{background:e}}},offset:function(e,t){return{"{container}-modal .active a:hover .ls-radio":{marginRight:t.modalItem.reverseElements?0:e,marginLeft:t.modalItem.reverseElements?e:0},".ls-dir-rtl{container}-modal .active a:hover .ls-radio":{marginRight:t.modalItem.reverseElements?e:0,marginLeft:t.modalItem.reverseElements?0:e}}}}}}));return r.createRoots=function(e){var t=r.getRoots();if(!t.length)return[];r.modal=r.createModal(e),(0,c.default)().isRtl&&(r.modal.element.setAttribute("dir","rtl"),r.modal.element.classList.add("ls-dir-rtl"));for(var n=0;n<t.length;n++)s.default.trigger(a.EventsEnum.BEFORE_SWITCHER_CREATED,[t[n].element,r.resource]),r.createSwitcherElements(t[n],e),s.default.trigger(a.EventsEnum.AFTER_SWITCHER_CREATED,[t[n].element,r.resource]);return t},r.createSwitcherElements=function(e,t){r.createContainerElements(e.element,t),document.body.appendChild(r.modal.shadow||r.modal.element)},r.createContainerElements=function(e,t){e.innerHTML="";var n=r.createLink(t);n.onclick=function(e){return e.preventDefault(),r.openModal(),!1},e.appendChild(n)},r.createModal=function(e){var t=document.createElement("div");t.className=["ls-sw","ls-modal","ls-sw-"+r.type+"-modal","ls-sw-"+r.resource+"-"+r.id+"-modal","ls-sw-"+r.display,"ls-sw-"+r.sprite].join(" "),t.setAttribute("translate","no");var n=document.createElement("div");n.classList.add("ls-modal-cell");var o=r.createModalOverlay();return o.onclick=r.closeModal,n.appendChild(o),n.appendChild(r.createModalContent(e)),t.appendChild(n),r.isolateElement(t)},r.createModalOverlay=function(){var e=document.createElement("div");return e.className=["ls-modal-overlay"].join(" "),e},r.createModalContent=function(e){var t=document.createElement("div");return t.classList.add("ls-modal-content"),t.appendChild(r.createModalContentPanel(e)),t},r.createModalContentPanel=function(e){var t=document.createElement("ul");t.classList.add("ls-modal-content-panel");for(var n=0;n<r.items.length;n++){var o=r.items[n],i=document.createElement("li");i.setAttribute("data-code",o.code),i.onclick=function(e){e.preventDefault();var t=e.currentTarget,n=t.getAttribute("data-code");return t.classList.contains("active")||r.onSelected(n),!1},o.code===e.code&&i.classList.add("active");var a=document.createElement("span");a.classList.add("ls-radio");var s=r.createLink(o);s.insertBefore(a,s.firstChild),i.appendChild(s),t.appendChild(i)}return r.shouldCreateBranding()&&t.appendChild(r.createBrandLink()),t},r.openModal=function(){r.modal&&r.modal.element.classList.add("ls-modal-opened")},r.closeModal=function(){r.modal&&r.modal.element.classList.remove("ls-modal-opened")},r.setActive=function(e){r.closeModal();var t=r.items.find((function(t){return t.code===e}));if(t&&r.roots.length){for(var n=0;n<r.roots.length;n++)r.createContainerElements(r.roots[n].element,t);var o=r.modal.element.querySelector("ul"),i=o.querySelector('[data-code="'+e+'"]');o.querySelector(".active").classList.remove("active"),i.classList.add("active")}},r.remove=function(){for(var e=0;e<r.roots.length;e++)r.roots[e].shadow?r.roots[e].shadow.remove():(0,l.removeChildren)(r.roots[e].element);return r.modal&&(r.modal.shadow||r.modal.element).remove(),r.style&&r.style.remove(),r},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),r(t,[{key:"createBrandLink",value:function(){var e=document.createElement("li"),t=document.createElement("a");t.href="https://langshop.app/",t.target="_blank";return Object.assign(t.style,{display:"block",textAlign:"center",fontSize:"12px",padding:"6px",textTransform:"none",letterSpacing:"normal"}),t.textContent="Powered by LangShop",e.appendChild(t),e}}]),t}(o.default);n.default=d},{"../":35,"../../../enum":46,"../../../eventsManager":47,"../../../helpers/config":51,"../../../helpers/
1dom":52,"../../StyleScheme/properties/DimensionValue":32}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("../");var i=function(e){function t(e,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e,n,{container:{selector:"{container}",default:{background:"rgba(255,255,255, 1)",borderRadius:{topLeft:{value:4,dimension:"px"},topRight:{value:4,dimension:"px"},bottomLeft:{value:4,dimension:"px"},bottomRight:{value:4,dimension:"px"}},borderTop:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:1,dimension:"px"}},borderRight:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:1,dimension:"px"}},borderBottom:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:1,dimension:"px"}},borderLeft:{color:"rgba(204, 204, 204, 1)",style:"solid",width:{value:1,dimension:"px"}}}},containerHovered:{selector:"{container}:hover"},text:{selector:"{container} select",default:{padding:{top:{value:5,dimension:"px"},right:{value:8,dimension:"px"},bottom:{value:5,dimension:"px"},left:{value:8,dimension:"px"}},fontSize:{value:13,dimension:"px"},fontFamily:"Open Sans",color:"rgba(39, 46, 49, 1)"}},textHovered:{selector:"{container} select:hover"}}));return r.createSwitcherElements=function(e,t){var n=document.createElement("select");n.onchange=function(e){e.preventDefault();var t=e.currentTarget.value;return r.onSelected(t),!1};for(var o=0;o<r.items.length;o++){var i=r.items[o],a=document.createElement("option");a.value=i.code,a.text=r.shortTitles?i.code.toUpperCase():i.getTitle(),i.code===t.code&&(a.selected=!0),n.appendChild(a)}e.element.appendChild(n)},r.setActive=function(e){if(r.items.find((function(t){return t.code===e}))&&r.roots.length)for(var t=0;t<r.roots.length;t++){r.roots[t].element.querySelector("select").value=e}},r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(((r=o)&&r.__esModule?r:{default:r}).default);n.default=i},{"../":35}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=function e(t,n,r){null===t&&(t=Function.prototype);var o=Object.getOwnPropertyDescriptor(t,n);if(void 0===o){var i=Object.getPrototypeOf(t);return null===i?void 0:e(i,n,r)}if("value"in o)return o.value;var a=o.get;return void 0!==a?a.call(r):void 0},i=d(e("../")),a=d(e("../../../helpers/config")),s=d(e("../../Storage/types/MemoryStorage")),l=e("./constants/ProductReviews"),c=d(e("../../Storage/types/SessionStorage")),u=d(e("../../../logger"));function d(e){return e&&e.__esModule?e:{default:e}}function f(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var p=function(e){function t(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var e=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,l.PRODUCT_REVIEWS_SELECTORS));return e.isNodeMatch=function(t){return!!t&&(!!t.tagName&&("html"!==t.tagName.toLowerCase()&&(t.id===l.PRODUCT_REVIEWS_IDENTIFIER||e.isNodeMatch(t.parentNode))))},e.isNodesMatch=function(t,n){if(!e.productReviewsNode)return!1;if(n)return!0;for(var r=!1,o=0;o<t.length;o++){var i=t[o];if(i.nodeType===Node.TEXT_NODE&&(i=i.parentNode),e.isNodeMatch(i)){r=!0;break}}return r},e.replaceItems=function(n){for(var i=function(i){var a=n[i],s=e.selectors.find((function(e){return e.key===a.key}));if(s.hasOwnProperty("multiply")&&s.multiply&&s.nodes.length)for(var l=0;l<s.nodes.length;l++){var c=s.nodes[l];c&&o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceItem",e).call(e,c,r({}
1,a,{value:e.unWrapField(s,a.value)}))}else o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"replaceItem",e).call(e,s.node,r({},a,{value:e.unWrapField(s,a.value)}))},a=0;a<n.length;a++)i(a)},e.getCachedItems=function(){return e.storage.getItem(e.cachedKey)||[]},e.getCachedItem=function(t){var n=e.getCachedItems().find((function(e){return e.key===t[l.PRODUCT_REVIEWS_KEY]}));return n||null},e.collectSingleItem=function(n,i){if(!o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"isNodeObservable",e).call(e,n))return null;var a=o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"parseNodes",e).call(e,n);if(!a)return null;if(!a.value)return null;if(a.node[l.LANGSHOP_STATUS_KEY]===l.IN_PROGRESS_STATUS)return null;if(a.node[l.LANGSHOP_STATUS_KEY]===l.IN_TRANSLATION)return null;o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,a.node,l.PRODUCT_REVIEWS_KEY,i.key);var s=e.getCachedItem(a.node),c=e.wrapField(i,a.value);return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,a.node,l.PRODUCT_REVIEWS_NODE_ORIGINAL,a.value),s?(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,a.node,l.PRODUCT_REVIEWS_NODE_TRANSLATED,s.value),r({},i,a,{fromCache:!0},c,{value:s.value})):(i.nodes.length?o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,a.node,l.LANGSHOP_STATUS_KEY,i.nodes[0][l.LANGSHOP_STATUS_KEY]):o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,a.node,l.LANGSHOP_STATUS_KEY,l.IN_PROGRESS_STATUS),r({},i,a,e.wrapField(i,a.value)))},e.wrapField=function(e,t){return e.isWrap?{initial:t.match(e.regexp)[0],value:e.wrap(t,e.variable,e.regexp)}:{value:t}},e.unWrapField=function(e,t){return e.isWrap?e.unwrap(t,e.variable,e.initial):t},e.isNodeTranslated=function(e){var t=!0;if(e.multiply)for(var n=0;n<e.nodes.length;n++){e.nodes[n][l.LANGSHOP_STATUS_KEY]!==l.TRANSLATED_STATUS&&(t=!1)}else t=e.node[l.LANGSHOP_STATUS_KEY]===l.TRANSLATED_STATUS;return t},e.collectMultiplyItem=function(t,n){for(var o=0;o<t.length;o++){var i=t[o],a=e.collectSingleItem(i,n);a&&(n=r({},n,a,{nodes:[].concat(f(n.nodes),[a.node])}))}return n},e.collectItems=function(){for(var t=[],n=function(n){var r=e.selectors[n];e.productReviewsNode.length||(e.productReviewsNode=window.document.querySelectorAll("#"+l.PRODUCT_REVIEWS_IDENTIFIER));for(var o=0;o<e.productReviewsNode.length;o++){var i=e.productReviewsNode[o].querySelectorAll(r.selector);r=e.collectMultiplyItem(i,r)}return r&&r.value?(t=[].concat(f(t.filter((function(e){return e.key!==r.key}))),[r]),void(e.selectors=[].concat(f(e.selectors.filter((function(e){return e.key!==r.key}))),[r]))):"continue"},r=0;r<e.selectors.length;r++)n(r);return t},e.cacheTranslation=function(t){var n=e.getCachedItems();if(n){for(var o=function(e){var o=t[e],i=n.find((function(e){return e.key===o.key}));n=[].concat(f(i?n.filter((function(e){return e.key!==o.key})):n),[r({},o)])},i=0;i<t.length;i++)o(i);e.storage.setItem(e.cachedKey,n)}else e.storage.setItem(e.cachedKey,[].concat(f(t.map((function(e){return r({},e)})))))},e.mergeTranslation=function(e,t){return[].concat(f(e.map((function(e){var n=t.find((function(t){return t.key===e.key}));return n?r({},e,{value:n.value,fromCache:!0}):r({},e)})))).filter((function(e){return e.fromCache}))},e.markAsInTranslation=function(n){if(!n||!n.length)return!1;e.selectors=[].concat(f(e.selectors.map((function(i){return n.find((function(e){return e.key===i.key}))?i.multiply?r({},i,{nodes:[].concat(f(i.nodes.map((function(n){return o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,n,l.LANGSHOP_STATUS_KEY,l.IN_TRANSLATION),n}))))}):(o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"setNodeKey",e).call(e,i.node,l.LANGSHOP_STATUS_KEY,l.IN_TRANSLATION),r({},i)):r({},i)}))))},e.getNotTranslatedNode=function(e){return[].concat(f(e.filter((function(e){return!e.fromCache&&![l.TRANSLATED_STATUS,l.IN_TRANSLATION].includes(e.nodes[0][l.LANGSHOP_STATUS_KEY])}))))},e.translate=function(){var n=e.collectItems(),r=e.getNotTranslatedNode(n);if(!r.length)return e.replaceItems(n);e.markAsInTranslation(r);var i=r.map((function(e){return{key:e.key,value:e.value}}));o(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"translate",e).call(e,e.appToken,i).then((function(t){e.cacheTranslation(t);var r=e.mergeTranslation(n,t);e.replaceItems(r)}
1)).catch((function(e){u.default.warning(e)}))},e.appToken="db1a97bf8cb0fd5bc8ccd3daa750fb8e755f1e8e5e5857d1164227f6d0cd31a9",e.selectors=l.PRODUCT_REVIEWS_SELECTORS,e.storage=c.default.isAvailable()?c.default:s.default,e.cachedKey=l.STORAGE_PREFIX_KEY+"_"+(0,a.default)().currentLanguage,e.productReviewsNode=window.document.querySelectorAll("#"+l.PRODUCT_REVIEWS_IDENTIFIER),e}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),t}(i.default);n.default=p},{"../":44,"../../../helpers/config":51,"../../../logger":68,"../../Storage/types/MemoryStorage":26,"../../Storage/types/SessionStorage":27,"./constants/ProductReviews":43}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},o=n.PRODUCT_REVIEWS_IDENTIFIER="shopify-product-reviews",i=n.PRODUCT_REVIEWS_CONTAINER_CLASS=".spr-container",a=n.PRODUCT_REVIEWS_CONTENT_CLASS=".spr-content",s=n.PRODUCT_REVIEWS_FORM_CLASS=".spr-form",l=(n.LANGSHOP_STATUS_KEY="__LANGSHOP_STATUS__",n.PRODUCT_REVIEWS_NODE_ORIGINAL="__PRODUCT_REVIEWS_NODE_ORIGINAL__",n.PRODUCT_REVIEWS_NODE_TRANSLATED="__PRODUCT_REVIEWS_NODE_TRANSLATED__",n.PRODUCT_REVIEWS_KEY="__PRODUCT_REVIEWS_KEY__",n.BASE_SELECTOR=["#"+o,""+i]),c={multiply:!0,value:"",node:null,nodes:[],isWrap:!1,wrap:function(e){return e},unwrap:function(e){return e},fromCache:!1};n.PRODUCT_REVIEWS_SELECTORS=[r({selector:[].concat(l,[".spr-header",".spr-header-title"]).join(" "),key:"product_reviews.review_headline"},c),r({selector:[].concat(l,[".spr-header",".spr-summary",".spr-summary-caption"]).join(" "),key:"product_reviews.review_summary_with_no_reviews"},c),r({selector:[].concat(l,[".spr-header",".spr-summary",".spr-summary-caption",".spr-summary-actions-togglereviews"]).join(" "),key:"product_reviews.review_summary_with_1_or_more_reviews"},c,{isWrap:!0,wrap:function(e,t,n){return e.replace(n,t)},unwrap:function(e,t,n){return e.replace(t,n)},variable:"{{product.reviews_count}}",initial:null,regexp:/\d+/}),r({selector:[].concat(l,[".spr-header",".spr-summary",".spr-summary-actions",".spr-summary-actions-newreview"]).join(" "),key:"product_reviews.write_a_review_link"},c),r({selector:[].concat(l,[a,s,".spr-form-title"]).join(" "),key:"product_reviews.form.title"},c),r({selector:[].concat(l,[a,s,".spr-form-message-error"]).join(" "),key:"product_reviews.form.messages.error"},c),r({selector:[].concat(l,[a,s,".spr-form-message-success"]).join(" "),key:"product_reviews.form.messages.success"},c),r({selector:[].concat(l,[a,s,".spr-form-contact",".spr-form-contact-name",".spr-form-label"]).join(" "),key:"product_reviews.form.contact.name.label"},c),r({selector:[].concat(l,[a,s,".spr-form-contact",".spr-form-contact-name",".spr-form-input"]).join(" "),key:"product_reviews.form.contact.name.placeholder"},c),r({selector:[].concat(l,[a,s,".spr-form-contact",".spr-form-contact-email",".spr-form-label"]).join(" "),key:"product_reviews.form.contact.email.label"},c),r({selector:[].concat(l,[a,s,".spr-form-contact",".spr-form-contact-email",".spr-form-input"]).join(" "),key:"product_reviews.form.contact.email.placeholder"},c),r({selector:[].concat(l,[a,s,".spr-form-review",".spr-form-review-rating",".spr-form-label"]).join(" "),key:"product_reviews.form.review.rating.label"},c),r({selector:[].concat(l,[a,s,".spr-form-review",".spr-form-review-title",".spr-form-label"]).join(" "),key:"product_reviews.form.review.title.label"},c),r({selector:[].concat(l,[a,s,".spr-form-review",".spr-form-review-title",".spr-form-input"]).join(" "),key:"product_reviews.form.review.title.placeholder"},c),r({selector:[].concat(l,[a,s,".spr-form-review",".spr-form-review-body",".spr-form-label"]).join(" "),key:"product_reviews.form.review.body.label"},c),r({selector:[].concat(l,[a,s,".spr-form-review",".spr-form-review-body",".spr-form-input-textarea"]).join(" "),key:"product_reviews.form.review.body.placeholder"},c),r({selector:[].concat(l,[a,s,".spr-form-actions","input"]).join(" "),key:"product_reviews.form.action.submit"},c),r({selector:[].concat(l,[a,".spr-reviews",".spr-review",".spr-review-footer","a.spr-review-reportreview"]).join(" "),key:"product_reviews.reviews.action.report_review"},c,{multiply:!0}),r({selector:[].concat(l,[a,".spr-reviews",".spr-review",".spr-review-footer","span.spr-review-reportreview"]).join(" "),key:"product_reviews.reviews.message.report_review"},c,{multiply:!0}),r({selector:[].concat(l,[a,".spr-reviews",".spr-pagination",".spr-pagination-next","a"]).join(" "),key:"product_reviews.reviews.pagination.next"},c),r({selector:[].concat(l,[a,".spr-reviews",".spr-pagination",".spr-pagination-prev","a"]).join(" "),key:"product_reviews.reviews.pagination.prev"},c)],n.STORAGE_PREFIX_KEY="product_reviews_",n.IN_PROGRESS_STATUS="IN_PROGRESS_STATUS",n.TRANSLATED_STATUS="TRANSLATED_STATUS",n.IN_TRANSLATION="IN_TRANSLATION_STATUS"},{}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}
1(),i=e("./apps/constants/ProductReviews"),a=e("../../helpers/config"),s=(r=a)&&r.__esModule?r:{default:r},l=e("../../helpers/translator");var c=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.selectors=t,this.apiEndpoint="https://api.langshop.app/translate"}return o(e,[{key:"isValueAttributeObservable",value:function(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&("INPUT"===e.nodeName&&"type"in e&&["submit","button","reset"].indexOf(e.type)>-1||"BUTTON"===e.nodeName))}},{key:"isPlaceholderAttributeObservable",value:function(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&["INPUT","TEXTAREA"].indexOf(e.nodeName)>-1)}},{key:"isTextContentAttributeObservable",value:function(e){return e.nodeType===Node.TEXT_NODE&&!!e.textContent.trim()}},{key:"parseNodes",value:function(e){if(this.isValueAttributeObservable(e))return{node:e,value:e.value||e.defaultValue};if(this.isPlaceholderAttributeObservable(e))return{node:e,value:e.placeholder};e.nodeType===Node.TEXT_NODE&&(e=e.parentNode);for(var t=e.childNodes,n=t.length;n--;){var r=t[n];if(this.isTextContentAttributeObservable(r))return{node:r,value:r.textContent}}}},{key:"replaceItem",value:function(e,t){e&&e.isConnected&&(e[i.LANGSHOP_STATUS_KEY]===i.TRANSLATED_STATUS&&e[i.PRODUCT_REVIEWS_NODE_ORIGINAL]===e[i.PRODUCT_REVIEWS_NODE_TRANSLATED]||(this.isValueAttributeObservable(e)&&(e.value=t.value),this.isPlaceholderAttributeObservable(e)?e.placeholder=t.value:e.textContent=t.value,this.setNodeKey(e,i.LANGSHOP_STATUS_KEY,i.TRANSLATED_STATUS)))}},{key:"setNodeKey",value:function(e,t,n){e[t]=n}},{key:"isNodeObservable",value:function(e){return!!e&&!!e.isConnected}},{key:"translate",value:function(e,t){return new Promise((function(n,r){return(0,l.translate)(e,(0,s.default)().currentLanguage,t,n,r)}))}}]),e}();n.default=c},{"../../helpers/config":51,"../../helpers/translator":64,"./apps/constants/ProductReviews":43}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.XHRObserver=void 0;var r=e("../../helpers/strings"),o=e("../../helpers/locale");n.XHRObserver=function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.getOpenHandler=function(e,t){var r=void 0;if(n.langShop.isRequestedDefaultLanguage())return null;if((r=n.requestsHandlers.find((function(t){return t.xhr===e})))&&"function"==typeof r.open)return r;if("string"!=typeof t[1])return null;for(var o=window.location.protocol+"//"+window.location.host,i=0===t[1].indexOf(o)?t[1].replace(o,""):t[1],a=0;a<n.openHandlers.length;a++){var s=n.openHandlers[a],l=new RegExp(s.pattern,"g").exec(i);if(l)return t[1]=i,r=s.handler(e,l),n.requestsHandlers.push(r),r}return null},this.getSendHandler=function(e){if(n.langShop.isRequestedDefaultLanguage())return null;var t=n.requestsHandlers.find((function(t){return t.xhr===e}));return t&&"function"==typeof t.send?t:null},this.localizedRequestHandler=function(e){var t={xhr:e,open:function(e){if(n.langShop.isRequestedDefaultLanguage())return n.open.apply(t.xhr,e);var i=(0,o.getLocalePathPrefix)(n.langShop.currentLanguage.code);return e[1]=i+"/"+(0,r.trim)(e[1],"/"),n.open.apply(t.xhr,e)}};return t};var i=this;this.langShop=t,this.requestsHandlers=[],this.openHandlers=[{pattern:"^\\/search",handler:function(e){return n.localizedRequestHandler(e)}},{pattern:"^\\/cart",handler:function(e){return n.localizedRequestHandler(e)}},{pattern:"^\\/collections",handler:function(e){return n.localizedRequestHandler(e)}},{pattern:"^\\/products",handler:function(e){return n.localizedRequestHandler(e)}},{pattern:"^\\/recommendations\\/products",handler:function(e){return n.localizedRequestHandler(e)}}],this.open=window.XMLHttpRequest.prototype.open,this.send=window.XMLHttpRequest.prototype.send,window.XMLHttpRequest.prototype.open=function(){var e=this,t=i.getOpenHandler(e,arguments);return t?t.open(arguments):i.open.apply(e,arguments)},window.XMLHttpRequest.prototype.send=function(){var e=this,t=i.getSendHandler(e,arguments);return t?t.send(arguments):i.send.apply(e,arguments)}}},{"../../helpers/locale":58,"../../helpers/strings":63}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.CurrencyDetectionEnum={STORE:"store",LANGUAGE:"language",LOCATION:"location"},n.LanguageDetectionEnum={STORE:"store",BROWSER:"browser",LOCATION:"location"},n.SwitchersTypesEnum={INLINE:"inline",DROPDOWN:"dropdown",IOS:"ios",MODAL:"modal",SELECT:"select",BANNER:"banner"},n.RecommendationAlertTypesEnum={BANNER:"banner",POPUP:"popup"},n.PopupAlertPositionEnum={BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",CENTER:"center"},n.SwitchersPositionEnum={BOTTOM_RIGHT:"bottom-right",BOTTOM_LEFT:"bottom-left",TOP_RIGHT:"top-right",TOP_LEFT:"top-left",RELATIVE:"relative"},n.SwitchersIconsEnum={ROUNDED:"rounded",CIRCLE:"circle",SQUARE:"square",RECTANGLE:"rectangle"}
1,n.SwitchersDisplayEnum={ALL:"all",TITLES:"titles",ICONS:"icons"},n.VisibilityStatusEnum={DISABLED:"disabled",ADMIN_ONLY:"admin-only",PUBLISHED:"published"},n.EventsEnum={LOADED:"loaded",READY:"ready",BEFORE_LANGUAGE_SWITCHED:"beforeLanguageSwitched",BEFORE_CURRENCY_SWITCHED:"beforeCurrencySwitched",AFTER_CURRENCY_SWITCHED:"afterCurrencySwitched",BEFORE_SWITCHERS_CREATED:"beforeSwitchersCreated",BEFORE_SWITCHER_CREATED:"beforeSwitcherCreated",AFTER_SWITCHER_CREATED:"afterSwitcherCreated",AFTER_SWITCHERS_CREATED:"afterSwitchersCreated",DROPDOWN_SWITCHER_OPENED:"dropdownSwitcherOpened",DROPDOWN_SWITCHER_CLOSED:"dropdownSwitcherClosed"}},{}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.on=function(e,n){t.events.hasOwnProperty(e)||(t.events[e]=[]),t.events[e].push(n)},this.off=function(e,n){if(t.events.hasOwnProperty(e)){var r=t.events[e].indexOf(n);-1!==r&&t.events[e].splice(r,1)}},this.dispatch=function(e){var t=new Event("langshop:"+e);window.dispatchEvent(t),document.dispatchEvent(t)},this.trigger=function(e,n){if(t.dispatch(e),t.events.hasOwnProperty(e)){n||(n=[]);for(var r=0,o=t.events[e].length;r<o;r++)if("function"==typeof t.events[e][r])try{t.events[e][r].apply(null,n)}catch(e){console.error(e)}}},this.events={}};n.default=r},{}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.hasAbility=n.USE_SELECTORS_CUSTOMIZATION=n.DISABLE_BRANDING=n.USE_THIRD_PARTY_APPS=n.USE_DYNAMIC_REPLACEMENTS=n.USE_MAPPINGS=void 0;var r,o=e("./config"),i=(r=o)&&r.__esModule?r:{default:r};n.USE_MAPPINGS="use-mappings",n.USE_DYNAMIC_REPLACEMENTS="use-dynamic-replacements",n.USE_THIRD_PARTY_APPS="use-third-party-apps",n.DISABLE_BRANDING="disable-branding",n.USE_SELECTORS_CUSTOMIZATION="use-selectors-customization",n.hasAbility=function(e){var t=(0,i.default)().abilities;if(void 0===t)return!0;if(null===t)return!0;if(!Array.isArray(t))return!1;var n=t.find((function(t){return t.name===e}));if(!n)return!1;if(null===n.expiresAt)return!0;var r=(new Date).getSeconds()/1e3;return new Date(n.expiresAt).getTime()/1e3-r>0}},{"./config":51}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.collection=void 0;var r=e("./types");n.collection=function(e,t){return Array.isArray(e)&&(0,r.isFunction)(t)?(0,r.isConstructor)(t)?e.map((function(e){return new t(e)})):e.map((function(e){return t(e)})):[]}},{"./types":65}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.rgba=function(e){var t=e.match(/^rgba\((\d{1,3}),\s*(\d{1,3}),\s*(\d{1,3}),\s*(\d*(?:\.\d+)?)\)$/);return t?{r:Number(t[1]),g:Number(t[2]),b:Number(t[3]),a:Number(t[4])}:null}},{}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r,o=e("../config"),i=(r=o)&&r.__esModule?r:{default:r};var a=null;n.default=function(){return a||(a=new i.default(window.LangShopConfig)),a}},{"../config":4}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.removeChildren=function(e){if(e.parentNode){var t=e.cloneNode(!1);e.parentNode.replaceChild(t,e)}else e.innerHTML=""},n.isRtlAttribute=function(e){return!!e&&"rtl"===e.getAttribute("dir")},n.getTextNodesIn=function e(t,n){var r=[];if(t)for(var o=t.childNodes,i=o.length;i--;){var a=o[i],s=a.nodeType,l=a.nodeName;["SCRIPT","STYLE","NOSCRIPT","IFRAME","FRAME","CANVAS","SVG","TEMPLATE"].includes(l)||(3===s?n&&!n(a,t)||r.push(a):1!==s&&9!==s&&11!==s||(r=r.concat(e(a,n))))}return r}},{}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.isShadowDomSupported=n.isNeedInitStyles=n.isMutationObserverSupported=n.isBot=n.isRtl=n.isInIframe=n.isMobile=void 0;var r=e("./i18n"),o=e("./dom");n.isMobile=function(){var e=navigator.userAgent.toLowerCase(),t=e.match(/ipad/i),n=e.match(/iphone os/i),r=e.match(/midp/i),o=e.match(/rv:1.2.3.4/i),i=e.match(/ucweb/i),a=e.match(/android/i),s=e.match(/windows ce/i),l=e.match(/windows mobile/i);return t||n||r||o||i||a||s||l},n.isInIframe=function(){try{return window.self!==window.top}catch(e){return!0}},n.isRtl=function(e){return(0,r.isRtlCode)(e)||(0,o.isRtlAttribute)(document.querySelector("html"))},n.isBot=function(){var e=new RegExp("(googlebot/|Googlebot-Mobile|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis|pingdom|Chrome-Lighthouse)","i"),t=navigator.userAgent;return e.test(t)},n.isMutationObserverSupported=function(){return!(window.navigator&&window.navigator.userAgent&&window.navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&window.MutationObserver&&"function"==typeof window.MutationObserver},n.isNeedInitStyles=function(e,t,n){if(e&&!e.hasOwnProperty("isolationStyles"))return!0;
1if(e&&!e.isolationStyles)return!0;var r=t.findIndex((function(e){return!e.hasOwnProperty("isolationStyles")||!e.isolationStyles})),o=n.findIndex((function(e){return!e.hasOwnProperty("isolationStyles")||!e.isolationStyles}));return r>-1||o>-1},n.isShadowDomSupported=function(){try{return document.createElement("div").attachShadow({mode:"open"}),!0}catch(e){return!1}}},{"./dom":52,"./i18n":56}],54:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.get=function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=t.split("."),o=e,i=0;i<r.length;i++){if(void 0===o[r[i]])return n;o=o[r[i]]}return o}},{}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.getXMLHttpClient=function(){if(window.XMLHttpRequest)return new XMLHttpRequest;if(!window.ActiveXObject)throw new Error("XHR client can't be created.");try{return new ActiveXObject("Msxml2.XMLHTTP")}catch(e){}try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(e){}throw new Error("XHR client can't be created.")}},{}],56:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.i18n=n.isRtlCode=void 0;var r,o=e("./config"),i=(r=o)&&r.__esModule?r:{default:r},a=e("./regexp"),s=e("./get");n.isRtlCode=function(e){return["ar","arc","bcc","bqi","ckb","dv","fa","glk","he","lrc","mzn","pnb","ps","sd","ug","ur","yi"].includes(e)},n.i18n=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=arguments[3],a=(0,i.default)(),c=a.i18n,u=a.currentLanguage,d=a.originalLanguage.code;o||(o=u);var f=(0,s.get)(c,o+"."+t);return f?l(f,r):o!==d?e(t,n,r,d):l(n||t,r)};function l(e,t){for(var n in Array.isArray(e)||(e=[e]),t)if(t.hasOwnProperty(n)){for(var r=0;r<e.length;r++)e[r]=c(e[r],n,t[n]);e=u(e)}return e.join("")}function c(e,t,n){if(!e)return e;if("string"!=typeof e)return e;for(var r=e.split(new RegExp("([{]{2}[\\s]*"+(0,a.escapeRegExp)(t)+"[\\s]*[}]{2})","gi")),o=1,i=r.length;o<i;o+=2)r[o]=n;return r}function u(e){return e.reduce((function(e,t){return e.concat(Array.isArray(t)?u(t):t)}),[])}},{"./config":51,"./get":54,"./regexp":61}],57:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.formatImageUrl=void 0;var r=e("./url");n.formatImageUrl=function(e,t,n,o){var i=(0,r.parseUrl)(e);if("cdn.shopify.com"!==i.host)return e;var a=i.pathname.split("/"),s=a.length-1,l=a[s].split(".");if(l.length>1){var c=l.pop(),u=l.pop();t&&(u+="_"+t),n&&(u+="_"+n),o&&(u+="@"+o+"x"),l.push(u),l.push(c)}return a[s]=l.join("."),i.pathname=a.join("/"),(0,r.buildUrl)(i)}},{"./url":66}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getCurrentLocalePathPrefix=n.getLocalePathPrefix=n.getCurrentLocaleCodeFromShopify=void 0;var r,o=e("./location"),i=e("./config"),a=(r=i)&&r.__esModule?r:{default:r};var s=n.getCurrentLocaleCodeFromShopify=function(){return window.Shopify?(0,o.isShopifyCheckout)()&&window.Shopify.Checkout?window.Shopify.Checkout.locale:window.Shopify.locale:null},l=n.getLocalePathPrefix=function(e){if(!e)return"";var t=(0,a.default)().shopifyLocales.find((function(t){return t.code===e}));return t?"/"===t.rootUrl?"":t.rootUrl.toLowerCase():"/"+e.toLowerCase()};n.getCurrentLocalePathPrefix=function(){var e=s();return l(e)}},{"./config":51,"./location":59}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.locationTemplate=n.isPrimaryDomain=n.isShopifyOrder=n.isShopifyCheckout=n.isSameSiteReferrer=void 0;var r=e("./url"),o=e("./strings");n.isSameSiteReferrer=function(){var e=document.referrer;if(!e)return!1;var t=(0,r.parseUrl)(e);return window.location.host===t.host},n.isShopifyCheckout=function(){return/^\/[\d]+\/checkouts\//.test(window.location.pathname)},n.isShopifyOrder=function(){return/^\/[\d]+\/orders\//.test(window.location.pathname)},n.isPrimaryDomain=function(){return window.location.host.includes("myshopify.com")},n.locationTemplate=function(){var e=window.location.pathname.toLowerCase(),t="/"+window.Shopify.locale.toLowerCase();e!==t&&0!==e.indexOf(t+"/")||(e=e.replace(t,""));var n=(e=(0,o.trim)(e,"/")).split("/");e="/"+e;var r={article:function(){return e.startsWith("/blogs/")&&3===n.length},blog:function(){return e.startsWith("/blogs/")&&2===n.length},cart:function(){return"/cart"===e},collection:function(){return e.startsWith("/collections/")&&2===n.length},gift_card:function(){return e.startsWith("/gift_cards/")},index:function(){return"/"===e},"list-collections":function(){return"/collections"===e},page:function(){return e.startsWith("/policies/")||e.startsWith("/pages/")},password:function(){return"/password"===e},product:function(){return-1!==e.indexOf("/products/")},search:function(){return"/search"===e},account:function(){return"/account"===e},activate_account:function(){return e.startsWith("/account/activate/")},addresses:function(){return"/account/addresses"===e},login:function(){return"/account/login"===e},order:function(){return e.startsWith("/account/orders/")},register:function(){return"/account/register"===e},reset_password:function(){return"/account/login"===e}};for(var i in r)if(r.hasOwnProperty(i)&&r[i]())return i;return"404"}},{"./strings":63,"./url":66}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};n.deepMerge=function e(t,n){if("object"!==(void 0===t?"undefined":r(t))||"object"!==(void 0===n?"undefined":r(n)))return!1;for(var o in n)n.hasOwnProperty(o)&&(o in t?"object"!==r(t[o])||"object"!==r(n[o])?t[o]=n[o]:t[o
1].concat&&n[o].concat?t[o]=t[o].concat(n[o]):t[o]=e(t[o],n[o]):t[o]=n[o]);return t}},{}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.escapeRegExp=function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},n.testRegExp=function(e,t){return new RegExp(e,"gi").test(t)}},{}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.isStorageSupported=function(){try{return"localStorage"in window&&null!==window.localStorage}catch(e){return!1}},n.isSessionStorageSupported=function(){try{return"sessionStorage"in window&&null!==window.sessionStorage}catch(e){return!1}}},{}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.trim=function(e,t){return e=r(e,t),e=o(e,t)};var r=n.trimLeft=function(e,t){for(;e.charAt(0)===t;)e=e.substring(1);return e},o=n.trimRight=function(e,t){for(;e.charAt(e.length-1)===t;)e=e.substring(0,e.length-1);return e},i=n.caseCompare=function(e,t){var n=(e+"").toLowerCase(),r=(t+"").toLowerCase();return n>r?1:n===r?0:-1};n.escapeHtml=function(e){var t=document.createTextNode(e),n=document.createElement("p");return n.appendChild(t),n.innerHTML},n.isSame=function(e,t){return 0===i(e,t)}},{}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.translate=function(e,t,n,r,o){fetch("https://api.langshop.app/translate",{method:"POST",mode:"cors",headers:{"Content-Type":"application/json",Accept:"application/json",Authorization:"Basic "+btoa(window.Shopify.shop+":"+e)},body:JSON.stringify({to:t,query:n})}).then((function(e){return e.json()})).then((function(e){var t=e.data.translations;return r(t)})).catch((function(e){return o?o(e):r(n)}))}},{}],65:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.isFunction=function(e){return!!(e&&e.constructor&&e.call&&e.apply)},n.isConstructor=function(e){return!!e.prototype&&!!e.prototype.constructor.name}},{}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getProxyRoot=n.getBaseHref=n.getRequestRoot=n.getQueryParameter=n.buildUrl=n.parseUrl=n.currentScriptSrc=n.getCdnUrl=void 0;var r=e("./strings"),o=e("./location"),i=e("./locale"),a=e("./storage"),s=e("./environment"),l=(n.getCdnUrl=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=l();return(t&&!t.includes("cdn.shopify.com")?t.split("/libs/storefront/sdk.js")[0]:"https://cdn.langshop.app/buckets/app")+e},n.currentScriptSrc=function(){return document.currentScript&&document.currentScript.src?document.currentScript.src:null}),c=n.parseUrl=function(e){var t=document.createElement("a"),n={},r=void 0,o=void 0,i=void 0;for(t.href=e,r=t.search.replace(/^\?/,"").split("&"),i=0;i<r.length;i++)n[(o=r[i].split("="))[0]]=o[1];return{protocol:t.protocol.replace(":",""),host:t.host,hostname:t.hostname,port:t.port,pathname:t.pathname,search:t.search,searchObject:n,hash:t.hash}},u=(n.buildUrl=function(e){return[e.protocol,"://",e.host,e.pathname,e.search,e.hash].join("")},n.getQueryParameter=function(e,t){t||(t=window.location.search),e=e.replace(/[\[\]]/g,"\\$&");var n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},n.getRequestRoot=function(){var e="";if(!window.Shopify)return e;var t=(0,i.getCurrentLocaleCodeFromShopify)();window.Shopify.routes?e=(window.Shopify.routes.root||window.Shopify.routes.root_url)+"":(e="/"+t.toLowerCase(),0!==window.location.pathname.toLowerCase().indexOf(e)&&(e=""));var n=(0,o.isShopifyCheckout)(),s=(0,o.isShopifyOrder)();if((n||s)&&(0,a.isStorageSupported)()){var l=window.localStorage.getItem("ls-default-locale");l&&!(0,r.isSame)(l,t)||(e="")}return"/"===e&&(e=""),(0,r.trimRight)(e,"/")}),d=n.getBaseHref=function(){return(0,s.isInIframe)()&&document.baseURI&&document.getElementsByTagName("base").length?(0,r.trimRight)(document.baseURI,"/"):""};n.getProxyRoot=function(){var e=d()+u(),t=e+"/apps/langshop",n=l();if(!n)return t;var o=c(n);return o.searchObject.proxy_prefix?e+"/"+(0,r.trim)(o.searchObject.proxy_prefix,"/"):t}},{"./environment":53,"./locale":58,"./location":59,"./storage":62,"./strings":63}],67:[function(e,t,n){"use strict";var r=s(e("./polyfills")),o=e("./helpers/http"),i=s(e("./LangShopSDK")),a=e("./helpers/url");
1function s(e){return e&&e.__esModule?e:{default:e}}!function(e){if(void 0===e.LangShop&&!e.LangShopAlreadyLoading){e.LangShopAlreadyLoading=!0;var t=function(t){try{e.LangShopConfig=t,e.LangShop=e.LangShopSDK=new i.default,e.LangShop.init()}catch(e){console.error(e)}};(0,r.default)((function(){var n;e.LangShopConfig?t(e.LangShopConfig):((n=(0,o.getXMLHttpClient)()).open("GET",(0,a.getProxyRoot)()+"/store/config.liquid.js",!0),n.onload=function(){if(4===n.readyState&&200===n.status)try{t(JSON.parse(n.responseText))}catch(t){e.parent||console.error(t)}},n.send())}))}}(window)},{"./LangShopSDK":3,"./helpers/http":55,"./helpers/url":66,"./polyfills":69}],68:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=new function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.error=function(e){console.error(t.message(e))},this.warning=function(e){console.warn(t.message(e))},this.info=function(e){console.info(t.message(e))},this.debug=function(e){config().debug&&console.log(t.message(e))},this.message=function(e){return"string"!=typeof e?e:"[LangShop] "+e}};n.default=r},{}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./helpers/get"),o=["Function.prototype.name","Function.prototype.bind","Function.name","fetch","Object.assign","Promise","Event","Object.values","URLSearchParams","Array.from","Array.prototype.findIndex","Array.prototype.find","Array.prototype.includes","String.prototype.includes","Element.prototype.closest","String.prototype.startsWith","Array.prototype.reduce"];n.default=function(e){if(function(e){for(var t=0,n=e.length;t<n;t++)if(null===(0,r.get)(window,e[t]))return!1;return!0}(o))e();else{var t=document.createElement("script");t.type="text/javascript",t.src="https://polyfill.io/v3/polyfill.min.js?features="+encodeURIComponent(o.join(",")),t.onload=e;var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n)}}},{"./helpers/get":54}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getStyles=function(){return'.ls-sw-currencies,.ls-sw-languages,selector[data-type=currencies],selector[data-type=languages]{position:relative;display:inline-block;vertical-align:middle}.ls-sw,.ls-sw *,.ls-sw :after,.ls-sw :before{all:unset;box-sizing:border-box}.ls-sw{line-height:1;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-weight:400}.ls-sw>*{z-index:1}.ls-sw .ls-icon{flex-shrink:0}.ls-sw a{vertical-align:middle;outline:0;cursor:pointer;text-align:initial;white-space:nowrap;width:100%;display:-webkit-flex;display:flex;align-items:center}.ls-sw a:active,.ls-sw a:focus,.ls-sw a:hover,.ls-sw a:visited{outline:0}.ls-sw ul{display:block}.ls-text{vertical-align:middle;display:inline-block}.ls-sw-select{margin:0;overflow:hidden}.ls-sw-select select{width:100%;border:none;box-shadow:none;background-color:transparent;background-image:none}.ls-sw-select select:focus{outline:0}.ls-sw-dropdown{position:relative;display:inline-block}.ls-sw-dropdown.ls-sw-opened{z-index:1000}.ls-sw-dropdown ul{position:absolute;z-index:1010;list-style:none;margin:0;min-width:100%;visibility:visible;opacity:1;overflow:auto;top:100%}.ls-sw-dropdown li{margin:0}.ls-sw-dropdown .active{display:inline-block;vertical-align:middle;cursor:pointer;width:100%;position:relative;z-index:1011}.ls-sw-dropdown .active:after{display:inline-block;position:absolute;line-height:100%;border-style:solid;border-width:2px 2px 0 0;content:\'\';-webkit-transition:transform .2s ease;-o-transition:transform .2s ease;transition:transform .2s ease;vertical-align:middle;pointer-events:none}.ls-sw-closed ul{visibility:hidden;opacity:0}.ls-sw-open-up ul{bottom:100%;top:auto}.ls-sw-inline ul{margin:0}.ls-sw-inline li{display:inline-block;vertical-align:middle;margin:0}.ls-sw-relative{z-index:0}.ls-sw-bottom-right{position:fixed;z-index:999;top:auto;left:auto;right:10px;bottom:10px}.ls-sw-bottom-left{position:fixed;z-index:999;left:10px;right:auto;top:auto;bottom:10px}.ls-sw-top-right{position:fixed;z-index:999;right:10px;left:auto;bottom:auto;top:10px}.ls-sw-top-left{position:fixed;z-index:999;left:10px;top:10px;bottom:auto;right:auto}.ls-sw-wheel{display:inline-block;overflow:hidden;position:relative;z-index:0;width:100%;cursor:pointer;text-align:center;max-height:300px;min-height:150px}.ls-sw-wheel .ls-sw-wheel-slider{display:inline-block;transition:transform .18s ease-out;margin:0;padding:0;vertical-align:middle}.ls-sw-wheel .ls-sw-wheel-slider li{margin:0;padding:0;display:list-item;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:0}.ls-sw-wheel .ls-sw-wheel-line{width:100%;position:absolute;pointer-events:none;display:block;cursor:pointer}.ls-sw-wheel .ls-sw-wheel-mask{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.9;pointer-events:none;display:block}.ls-modal{position:fixed;z-index:999999;opacity:0;visibility:hidden;display:table;top:0;left:0;height:100%;width:100%}.ls-modal.ls-modal-opened{opacity:1;visibility:visible}.ls-modal-overlay{position:fixed;top:0;left:0;bottom:0;right:0;z-index:1;display:block}.ls-modal-cell{position:relative;display:table-cell;vertical-align:middle;float:none}.ls-modal-content{position:relative;z-index:2}.ls-modal-content-panel{display:block}.ls-sw-modal-modal .ls-modal-cell{text-align:center}.ls-sw-modal-modal .ls-modal-content{display:inline-block;overflow:auto}.ls-sw-modal-modal a{transition:background .3s}.ls-sw-modal-modal li{display:list-item}.ls-sw-modal-modal .ls-text{text-overflow:ellipsis;overflow:hidden}.ls-sw-ios-modal{-webkit-transition:opacity .4s,visibility .4s;transition:opacity .4s,visibility .4s}.ls-sw-ios-modal .ls-modal-content{position:fixed;width:100%;display:block;-webkit-transition:all .4s;transition:all .4s;bottom:-350px;left:0}.ls-sw-ios-modal.ls-modal-opened .ls-modal-content{bottom:0}.ls-sw-ios-modal .ls-modal-content-buttons{position:relative;text-align:center;display:block}.ls-sw-ios-modal .ls-modal-close{display:inline-block;float:left;cursor:pointer}.ls-sw-ios-modal .ls-modal-submit{display:inline-block;float:right;cursor:pointer}[dir=rtl].ls-sw-ios-modal .ls-modal-close{float:right}[dir=rtl].ls-sw-ios-modal .ls-modal-submit{float:left}.ls-sw-ios-modal .ls-modal-content-buttons:after{clear:both;display:block;content:""}.ls-radio{display:inline-block;border-radius:100%;vertical-align:middle;position:relative}.active .ls-radio:after{position:absolute;
1left:2px;top:2px;width:calc(100% - 4px);height:calc(100% - 4px);content:"";display:block;border-radius:50%}[class*=ls-curr-],[class*=ls-lang-]{vertical-align:middle;display:inline-block;overflow:hidden;font-size:0}[class*=ls-countries-]:before,[class*=ls-curr-]:before,[class*=ls-lang-]:before{vertical-align:middle;display:inline-block;content:"";float:left}.ls-curr-rounded,.ls-lang-rounded{border-radius:5px}.ls-curr-circle,.ls-lang-circle{border-radius:50%}.ls-curr-rectangle.ls-curr-icon:before,.ls-curr-rectangle.ls-icon-custom:before,.ls-curr-rounded.ls-curr-icon:before,.ls-curr-rounded.ls-icon-custom:before,.ls-lang-rectangle.ls-icon-custom:before,.ls-lang-rectangle.ls-lang-icon:before,.ls-lang-rounded.ls-icon-custom:before,.ls-lang-rounded.ls-lang-icon:before{width:28px;height:21px}.ls-curr-circle.ls-curr-icon:before,.ls-curr-circle.ls-icon-custom:before,.ls-curr-square.ls-curr-icon:before,.ls-curr-square.ls-icon-custom:before,.ls-lang-circle.ls-icon-custom:before,.ls-lang-circle.ls-lang-icon:before,.ls-lang-square.ls-icon-custom:before,.ls-lang-square.ls-lang-icon:before{width:21px;height:21px}html[style*="padding-bottom: 60px"] .ls-sw-bottom-left,html[style*="padding-bottom: 60px"] .ls-sw-bottom-right{margin-bottom:60px}html[style*="padding-bottom: 92px"] .ls-sw-bottom-left,html[style*="padding-bottom: 92px"] .ls-sw-bottom-right{margin-bottom:92px}.ls-alert-type-banner,.ls-alert-type-banner :after,.ls-alert-type-banner :before,.ls-alert-type-banner :not(path),.ls-alert-type-popup,.ls-alert-type-popup :after,.ls-alert-type-popup :before,.ls-alert-type-popup :not(path){all:unset;box-sizing:border-box}.ls-recommendation-alert{position:fixed;display:block;z-index:1000000;visibility:hidden;opacity:0}.ls-recommendation-alert .ls-alert-type-banner{width:100%;position:fixed;left:0}.ls-recommendation-alert.js-ls-alert-active{visibility:visible;opacity:1}.ls-recommendation-alert .ls-banner-content,.ls-recommendation-alert .ls-popup-content{align-items:center;display:flex;justify-content:space-between;margin:0 auto}.ls-recommendation-alert .ls-banner-call-to-action>*,.ls-recommendation-alert .ls-popup-call-to-action>*{display:inline-block}.ls-recommendation-alert .ls-banner-message,.ls-recommendation-alert .ls-popup-message{margin-bottom:3px;margin-top:3px}.ls-recommendation-alert .ls-banner-actions-wrapper>*,.ls-recommendation-alert .ls-popup-actions-wrapper>*{margin-top:3px;margin-bottom:3px}.ls-recommendation-alert .ls-banner-selector,.ls-recommendation-alert .ls-popup-selector{display:inline-block}.ls-recommendation-alert .ls-banner-change-button,.ls-recommendation-alert .ls-popup-change-button{height:auto!important;min-height:unset!important;min-width:unset!important;text-align:center!important;vertical-align:unset!important;width:auto!important;border:none;box-shadow:none;cursor:pointer}.ls-recommendation-alert .ls-banner-close-button,.ls-recommendation-alert .ls-popup-close-button{border:none!important;box-shadow:none!important;height:auto!important;min-height:unset!important;min-width:unset!important;text-align:center!important;vertical-align:unset!important;width:auto!important;background:0 0!important;cursor:pointer}.ls-recommendation-alert .ls-popup-close-button{align-self:baseline}.ls-recommendation-alert option{display:block}.ls-recommendation-alert .ls-alert-type-popup{box-shadow:0 0 1px rgba(0,0,0,.3),0 4px 4px 1px rgba(0,0,0,.1);z-index:1000000;position:fixed}.ls-recommendation-alert .ls-popup-overlay{background-color:rgba(0,0,0,.3);height:100vh;left:0;position:fixed;top:0;width:100vw;z-index:999999}.ls-recommendation-alert:not(.js-ls-alert-active) .ls-popup-overlay{display:none}'}},{}]},{},[67]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.