{"version":3,"sources":["webpack:///./node_modules/@bluekiri/alexandria/helpers/domHelpers.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header/client/js/cookie.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/modal/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria/helpers/dataHelpers.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/store/actions.js","webpack:///./components/layout-logitravel-legal-text/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/footer/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria/core/ViewHelpers.js","webpack:///./node_modules/@bluekiri/alexandria/core/PriceFormatter.js","webpack:///./node_modules/@bluekiri/alexandria/core/Env.js","webpack:///./node_modules/@bluekiri/alexandria/core/utils/texts.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/image/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/footer/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/modal-msi/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/modal/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/modal/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria/helpers/store.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/modal-msi/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/modal-origins/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/origin-list/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/origin-list/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria-contrib-components/components/origin-list/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/modal-origins/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/modal-origins/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/index.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/prototype.js","webpack:///./node_modules/@bluekiri/alexandria/helpers/state.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/store/reducer.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/services/index.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header-master-expedient/client/js/config.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header/client/js/welcome.js","webpack:///./node_modules/@bluekiri/alexandria-logitravel/components/header/client/js/tooltip.js"],"names":["module","exports","elementExist","element","document","querySelector","toNode","html","DOMParser","parseFromString","body","childNodes","getCookie","cname","name","concat","splitCookie","cookie","split","i","length","value","charAt","substring","indexOf","setCookie","cookieName","cookieValue","nDays","today","Date","expire","nDaysFinal","setTime","getTime","toGMTString","require","prototype","config","result","selector","arguments","undefined","configuration","instance","Object","create","_objectSpread","dataset","JSON","parse","init","randomId","modalInStore","getStore","filter","item","type","modalIsUnique","checkUniqueModal","_newInstance$config$t","triggers","getTriggers","removeFromDom","newInstance","push","apply","_toConsumableArray","addTriggers","id","prepareLink","link","key","content","href","title","target","mail","prepareDataConfig","data","latitude","longitude","max","min","selected","token","items","defaultDate","preparePrice","price","from","currency","prepareLinks","links","temp","map","prepareImage","image","resize","tempResize","operation","suboperation","height","width","quality","src","alt","alternative","carousel","resizeData","formatDate","date","rDate","getDate","rMonth","getMonth","rYear","getFullYear","Math","floor","random","addStyle","styles","css","addData","dataValue","DESTROY","LOGOUT","types","actions","destroy","logout","footer","ImageClient","certifications","querySelectorAll","includes","certification","index","blog","flags","flag","logos","logo","timer","_require2","take","repeat","ViewHelpers","TRIGGERED","createLoop","this","images","delay","pipe","loops","Error","startLoop","_this","loop","subscribe","next","setImage","error","complete","stopLoop","unsubscribe","getAlt","getImageEl","getTitle","options","opts","context","renderImage","startLazy","classList","remove","add","bindEvents","onError","bind","addEventListener","_this2","once","autoplay","disableLazy","url","markdown","PriceFormatter","Env","textUtils","_PriceFormatter","formatPrice","format","formatWithForcedDecimals","debug","imageResizer","asset","staticUrl","getStaticsBaseUrl","viewport","isDesktop","isTablet","isMobile","dateFormat","renderMarkdown","icon","msg","console","log","file","versionTimestamp","trimmedFile","replace","isDevelopment","NODE_ENV","isStaging","assetUrl","cdnBase","assetsPath","devHost","isLocal","_process$env$PORT","process","env","PORT","URL","mscdn","startsWith","_url$URL","_ref","_ref$quality","regex","finalSource","prepareSrc","join","querySeparator","match","exec","relative","params","path","protocol","_ref2","viewportWidth","viewportHeight","finalWidth","finalHeight","device","out","app","str","toHTML","currencySymbols","USD","CAD","BRL","GBP","EUR","MXN","RUB","AED","currencyPositionsByMarket","br","us","gb","it","mx","ae","ca","currencyPositionsByLanguage","en","decimalPosition","lang","getDecimalTemplate","decPart","decimalCharacter","reverseString","reverse","useMarket","currencyPosition","getMarket","getLanguage","round","currencySymbol","absValue","abs","priceParts","pow","toString","intPart","formatPriceWithThousandsSeparator","roundDecimals","numberGroupSeparator","es","pt","de","fr","fi","se","ve","ru","he","ar","tr","ua","intPartWithSeparation","Language","language","Market","market","toLowerCase","isProduction","tagAttributes","attributesArray","attributesObject","tagAttributesObject","keys","forEach","Array","isArray","getConfigPlaceholder","newConfig","vertical_spacing_top","vertical_spacing_bottom","class","setSpacingPlaceholder","top","bottom","verticalSpacingTop","verticalSpacingBottom","spacing","closeMardownInParagraphs","paragraphs","ellipsis","hasStrongTags","text","p","linkDataAtribute","dataAttributes","buildTags","tagsData","tag","attributes","content_tag","setConfigPlaceholder","classes","spacingClass","cutStringByWords","_ref$limit","limit","_ref$splitWord","splitWord","_ref$ellipsis","textWithSpace","trimmedString","substr","lastIndexOf","cutParagraphsByWords","paragraphsSize","paragraphsProcessed","wordsTotal","words","elementsToInclude","splice","countStringWords","count","component","lazy","withBackground","isVertical","$","ModalMsiClient","ModalOriginsClient","HeaderMasterExpedient","initWelcome","initTooltips","_require3","addClassActive","listItemClass","dropdownClass","listItem","dropdown","hasClass","addClass","removeClass","modal","modalCookie","closeButton","loginModal","click","setTimeout","on","elementLanguageDropdown","event","attr","languageSelected","currentTarget","language_url","ajax","contentType","stringify","dataType","success","window","parent","location","reload","warn","elementCurrencyDropdown","currencySelected","currency_url","userAgent","navigator","test","e","preventDefault","ModalClient","hasClose","autoDom","autoStore","isLoading","cssVisible","cssModalBody","modalClose","notClose","_require","addToStore","removeFromStore","store","getHeaderEl","getHeaderText","innerText","setHeaderText","trigger","onClickTrigger","setClose","closeElement","isOpen","isVisible","display","addToDom","setAttribute","onOpen","hide","removeEventListener","onClose","appendChild","parentNode","removeChild","call","onClickClose","stopPropagation","onKeydown","keyCode","onClickModal","onClickWindow","firstChild","OriginListCLient","origin","getConfig","initialize","buildRequest","session","_defineProperty","SessionCode","parameterName","executeAjax","endpoint","verb","promise","post","withCredentials","get","done","pathname","splittedString","search","newQuery","buildFinalUrl","fail","prototypeConfiguration","setCookieAutoOrigin","autoOrigin","ck_name","ck_value","onClickOrigin","parentElement","newSelectedOrigin","selectedOrigin","selectedClass","lastChild","nodeName","originOption","contains","code","base","logitravel","hooks","Store","fromEvent","of","_require4","reducer","services","setupStore","headerMasterExpedient","setupActions","dispatch","setupReactions","reactions","state","action","endpoints","response","err","message","_this3","subscriptions","_this4","start","reducers","initialState","subscribers","reduce","fn","subscriber","acc","val","addReducers","select","catchError","switchMap","fromFetch","ok","json","statusText","$containerModalLogin","literals","login","find","loginModalNewUserTitle","loginModalNewUserDescription","loginModalNewUserButtonText","loginModalNewUserFooterText","loginModalButtonText","replaceData","tippy","tooltips","tippySelector","tippyTitle","tippytemplateId","tippyTheme","htmlElementExists","useTitle","tippyArrow","tippyTrigger","tippyConfig","arrow","arrowType","duration","animation","placement","theme","allowTitleHTML","maxWidth","interactive","onShown","$buttonLogout","popper","urlLogout","sessionCode","xhr","status","googleyolo","disableAutoSignIn","then","finally","crossDomain"],"mappings":";2EAQAA,EAAOC,QAAU,CACbC,aALiB,SAAAC,GAAO,QAAMC,SAASC,cAAcF,IAMrDG,OAJW,SAAAC,GAAI,OAAI,IAAIC,WAAYC,gBAAgBF,EAAM,aAAaG,KAAKC,c,0BC0B/EX,EAAOC,QAAU,CACbW,UA7Bc,SAAAC,GAGd,IAFA,IAAMC,EAAO,GAAHC,OAAMF,EAAK,KACfG,EAAcZ,SAASa,OAAOC,MAAM,KACjCC,EAAI,EAAGA,EAAIH,EAAYI,OAAQD,IAAK,CAEzC,IADA,IAAIE,EAAQL,EAAYG,GACG,MAApBE,EAAMC,OAAO,IAChBD,EAAQA,EAAME,UAAU,GAE5B,GAA4B,IAAxBF,EAAMG,QAAQV,GACd,OAAOO,EAAME,UAAUT,EAAKM,OAAQC,EAAMD,QAGlD,MAAO,IAkBPK,UAfc,SAACC,EAAYC,EAAaC,GACxC,IAAMC,EAAQ,IAAIC,KACZC,EAAS,IAAID,KAEfE,EAAaJ,EACH,OAAVA,GAA4B,IAAVA,IAClBI,EAAa,GAGjBD,EAAOE,QAAQJ,EAAMK,UAAY,MAAeF,GAChD5B,SAASa,OAAS,GAAHF,OAAMW,EAAU,KAAAX,OAAIY,EAAW,aAAAZ,OAAYgB,EAAOI,cAAa,c,yoBCxBlF,IAAQjC,EAAiBkC,EAAQ,KAAzBlC,aACFmC,EAAYD,EAAQ,KACpBE,EAASF,EAAQ,KAMvBpC,EAAOC,QAAU,WAA0E,IAarEsC,EAbUC,EAAQC,UAAArB,OAAA,QAAAsB,IAAAD,UAAA,GAAAA,UAAA,GAAG,2BAA4BE,EAAaF,UAAArB,OAAA,QAAAsB,IAAAD,UAAA,GAAAA,UAAA,GAAG,GACnF,GAAIvC,EAAasC,GAAW,CAExB,IAAMI,EAAWC,OAAOC,OAAOT,GAoB/B,OAjBAO,EAASzC,QAAU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,MACG,eAGA,WAEIviB,EAAU,oBAAqB,OAAQ,EAAI,OAGlDwiB,SAAQ,WACL7K,OAAOC,OAAOC,SAASC,QAAO,OAItC9X,EAAU,oBAAqB,OAAQ,EAAI,IAC3C2X,OAAOC,OAAOC,SAASC,QAAO,MAI1C2K,aAAa,EACbnf,KAAM,CACF4e,eAEJzK,SAAU,QACVxN,IAAKgY,SAQf,CACVja,MAAO,EACPqZ,MAAOH,EACPI,UAAW,QACXC,SAAU,EACVC,UAAW,QACXC,UAAW,SACXC,MAAO,cAAFpiB,OAAgByhB,GACrBY,eAAgBd,EAChBe,SAAU,QACVC,aAAa,EACbpI,QAAS0H,EACTriB,KAAMgiB,GAIdJ,EAAM,WAADphB,OAAYshB,GAAiBQ,W","file":"index.bundle.js","sourcesContent":["/* ==========================================================================\n Dom helpers\n ========================================================================== */\n\nconst elementExist = element => !!document.querySelector(element);\n\nconst toNode = html => new DOMParser().parseFromString(html, 'text/html').body.childNodes;\n\nmodule.exports = {\n elementExist,\n toNode\n};\n","/* ==========================================================================\n Header > Client > Cookie\n ========================================================================== */\n\nconst getCookie = cname => {\n const name = `${cname}=`;\n const splitCookie = document.cookie.split(';');\n for (let i = 0; i < splitCookie.length; i++) {\n let value = splitCookie[i];\n while (value.charAt(0) === ' ') {\n value = value.substring(1);\n }\n if (value.indexOf(name) === 0) {\n return value.substring(name.length, value.length);\n }\n }\n return '';\n};\n\nconst setCookie = (cookieName, cookieValue, nDays) => {\n const today = new Date();\n const expire = new Date();\n\n let nDaysFinal = nDays;\n if (nDays === null || nDays === 0) {\n nDaysFinal = 1;\n }\n\n expire.setTime(today.getTime() + 3600000 * 24 * nDaysFinal);\n document.cookie = `${cookieName}=${cookieValue};expires=${expire.toGMTString()};path=/`;\n};\n\nmodule.exports = {\n getCookie,\n setCookie\n};\n","/* ==========================================================================\n Image > Client\n ========================================================================== */\n\n/* Modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * Image component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function Image(selector = '[data-component=\"Image\"]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Element reference */\n instance.element = document.querySelector(selector);\n\n /* Config reference */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n const result = instance.element.dataset.config ? JSON.parse(instance.element.dataset.config) : {};\n instance.element.dataset.config = '';\n return result;\n })()\n };\n\n /* Auto init */\n if (instance.config.init) instance.init();\n\n /* Return instance to other components */\n return instance;\n }\n};\n","/* ==========================================================================\n Modal > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst { randomId } = require('@bluekiri/alexandria/helpers/dataHelpers');\nconst config = require('./config');\nconst prototype = require('./prototype');\n\n/* Utilities functions */\nconst modalInStore = instance => instance.getStore().filter(item => item.type === instance.type);\nconst modalIsUnique = instance => modalInStore(instance).length > 0;\nconst getTriggers = instance => instance.config.triggers;\n\n/**\n * Modal component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ModalClient(selector = '[data-component=\"Modal\"]', configuration = {}) {\n if (elementExist(selector)) {\n /* Build instance */\n const instance = Object.create(prototype);\n\n /* Config */\n instance.config = { ...config(), ...configuration };\n\n /* Element reference */\n instance.element = document.querySelector(selector);\n\n /* Id reference */\n instance.id = instance.element.dataset.id || randomId('modal');\n\n /* Type reference control */\n instance.type = configuration.type;\n\n if (modalIsUnique(instance)) return checkUniqueModal(instance);\n\n /* Auto init */\n if (instance.config.init) instance.init();\n\n return instance;\n }\n};\n\nfunction checkUniqueModal(instance) {\n /* Get referene to the trigger for this modal to apply to the store one */\n const triggers = getTriggers(instance);\n\n /* Remove from dom newly created modal to replace it */\n instance.removeFromDom();\n\n /* Replace instance with the current in store */\n const newInstance = modalInStore(instance)[0];\n\n newInstance.config.triggers.push(...triggers);\n\n /* Init new triggrs */\n newInstance.addTriggers(triggers);\n\n return newInstance;\n}\n","/* ==========================================================================\n Data Helpers\n ========================================================================== */\n/* eslint-disable */\n/**\n * Function to prepare the data config\n * @param {object} data Object containing the data config.\n * @param {string} key Key name to start the key name value for the object values.\n * @returns {object} Config data to have available in the template\n */\nfunction prepareDataConfig(data = {}, key = 'data') {\n const name = key;\n\n const result = {};\n result[`${name}Content`] = data.content || false;\n result[`${name}Id`] = data.id || false;\n result[`${name}Latitude`] = data.latitude || 0;\n result[`${name}Longitude`] = data.longitude || 0;\n result[`${name}Max`] = data.max || false;\n result[`${name}Min`] = data.min || false;\n result[`${name}Selected`] = data.selected ? '' : false;\n result[`${name}Token`] = data.token || false;\n result[`${name}Type`] = data.type || false;\n result[`${name}Value`] = data.value || false;\n result[`${name}Items`] = data.items || false;\n result[`${name}DefaultDate`] = data.defaultDate || false;\n\n return result;\n}\n/* eslint-enable */\n\n/**\n * Function to prepare the price\n * @param {object} price Object containing the data model for the price.\n * @param {string} key Key name to start the key name value for the object values.\n * @returns {object} Price data to have available in the template\n */\nfunction preparePrice(price = {}, key = 'price') {\n const name = key;\n\n const result = {};\n result[`${name}Value`] = price.value;\n result[`${name}From`] = price.from || '';\n result[`${name}Currency`] = price.currency;\n\n return result;\n}\n\n/**\n * Function to prepare the link\n * @param {object} link Object containing the data model for the link.\n * @param {string} key Key name to start the key name value for the object values.\n * @returns {object} Link data to have available in the template\n */\nfunction prepareLink(link = {}, key = 'link') {\n const name = key;\n\n const result = {};\n result[`${name}Content`] = link.content || '';\n result[`${name}Href`] = link.href;\n result[`${name}Title`] = link.title;\n result[`${name}Target`] = link.target || '_self';\n result[`${name}Mail`] = link.mail || false;\n\n return result;\n}\n\n/**\n * Function to prepare an array of links\n * @param {array} link Object containing the data model for the links.\n * @param {string} key Key name to start the key name value for the object values.\n * @returns {object} Link data to have available in the template\n */\nfunction prepareLinks(links = [], key) {\n const name = key;\n const temp = links.map(item => prepareLink(item.link, name));\n\n const result = {};\n result[`${name}Content`] = temp.map(item => item[`${name}Content`]);\n result[`${name}Href`] = temp.map(item => item[`${name}Href`]);\n result[`${name}Title`] = temp.map(item => item[`${name}Title`]);\n result[`${name}Target`] = temp.map(item => item[`${name}Target`]);\n result[`${name}Mail`] = temp.map(item => item[`${name}Mail`]);\n\n return result;\n}\n/**\n * Function to prepare the date of a image\n * @param {object} image Object containing the data model for the image.\n * @param {string} key Key name to start the key name value for the object values.\n * @param {object} resize Resize configuration for the image.\n * @returns {object} Image data to have available in the template\n */\nfunction prepareImage(image = {}, key = 'image', resize = {}) {\n const name = key;\n const tempResize = {\n operation: resize.operation || 'resize',\n suboperation: resize.suboperation || 'crop',\n height: resize.height || 75,\n width: resize.width || 75,\n quality: resize.quality || 97\n };\n\n const result = {};\n result[`${name}Src`] = image.src;\n result[`${name}Alt`] = image.alt;\n result[`${name}Alternative`] = image.alternative;\n result[`${name}Title`] = image.title;\n result[`${name}Class`] = image.carousel ? 'carousel__lazy' : 'lazy';\n result[`${name}Lazy`] = 'images/shim.gif';\n result[`${name}Carousel`] = !!image.carousel;\n result.resizeData = tempResize;\n\n // Add link to image\n if (image.link) result[`${name}Link`] = prepareLink(image.link);\n\n return result;\n}\n\n/**\n * Function to format the date\n * @param {object} date Object containing the date\n * @returns {string} Date in format yyyy-mm-dd\n */\nfunction formatDate(date = new Date()) {\n const rDate = date.getDate();\n const rMonth = date.getMonth() + 1;\n const rYear = date.getFullYear();\n\n return `${rYear}-${rMonth < 10 ? `0${rMonth}` : rMonth}-${rDate}`;\n}\n\n/**\n * Function to create random id\n * @param {string} key String containing the key to prepend the id\n * @param {Number} max Max number to calculate random number to\n * @returns {string} Random id with format key-number\n */\nfunction randomId(key = 'id', max = 1000) {\n return `${key}-${Math.floor(Math.random() * max)}`;\n}\n\n/**\n * Function to add styles to the config\n * @param {object} data Object containing the data of the model part\n * @param {Array} styles Collection of styles to add to the data\n * @returns {object} Data object with the styles added to the config\n */\nfunction addStyle(data, styles = []) {\n const result = data;\n const css = styles;\n\n result.config = data.config ? data.config : {};\n result.config.styles = result.config ? result.config.styles : [];\n\n result.config.styles = css;\n\n return result;\n}\n\n/**\n * Function to add styles to the config\n * @param {object} data Object containing the data of the model part\n * @param {object} values Collection of data-values to add to the data\n * @returns {object} Data object with the data added to the config\n */\nfunction addData(data, dataValue = {}) {\n const result = data;\n\n result.config = data.config ? data.config : {};\n result.config.data = result.config\n ? {\n ...result.config.data,\n ...dataValue\n }\n : dataValue;\n\n // result.config.data = css;\n\n return result;\n}\n\nmodule.exports = {\n prepareDataConfig,\n preparePrice,\n prepareLink,\n prepareLinks,\n prepareImage,\n formatDate,\n randomId,\n addStyle,\n addData\n};\n","/* ==========================================================================\n HeaderMasterExpedient > Client > Store > Actions\n ========================================================================== */\n\n/* Types */\nconst DESTROY = 'HEADER_MASTER_EXPEDIENT::DESTROY';\nconst LOGOUT = 'HEADER_MASTER_EXPEDIENT::LOGOUT';\n\n/* Actions */\nconst destroy = () => ({ type: DESTROY });\nconst logout = () => ({ type: LOGOUT });\n\n/* Exports */\nmodule.exports = {\n types: {\n DESTROY,\n LOGOUT\n },\n actions: {\n destroy,\n logout\n }\n};\n","const footer = require('@bluekiri/alexandria-logitravel/components/footer/client/js');\nrequire('@bluekiri/alexandria-logitravel/components/header/client/js');\n\n/* ==========================================================================\n LayoutLogitravelLegalText > Client\n ========================================================================== */\n\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\n\n(function LayoutLogitravelLegalText(selector = '[data-component=\"LayoutLogitravelLegalText\"]') {\n if (elementExist(selector)) {\n /* Footer */\n footer();\n }\n})();\n","/* ==========================================================================\n Footer > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst ImageClient = require('@bluekiri/alexandria-contrib-components/components/image/client/js');\nconst config = require('./config');\n\n/**\n * Footer component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function Footer(selector = '[data-component=Footer]', configuration = {}) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = {};\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = { ...config(), ...configuration };\n\n /* Certifications -> Images */\n instance.certifications = [...instance.element.querySelectorAll('[data-component=\"Image\"]')]\n .filter(item => item.dataset.type)\n .filter(item => item.dataset.type.includes(config().type.certification.image))\n .map((item, index) =>\n ImageClient(\n `${selector} [data-component=\"Image\"][data-type=\"${config().type.certification.image}-${index}\"]`,\n {\n ...configuration.certification\n }\n )\n );\n\n /* Blog -> Image */\n instance.blog = {\n image: ImageClient(`${selector} [data-component=\"Image\"][data-type=\"${config().type.blog.image}\"]`, {\n ...configuration.image\n })\n };\n\n /* Flags -> Images */\n instance.flags = [...instance.element.querySelectorAll('[data-component=\"Image\"]')]\n .filter(item => item.dataset.type)\n .filter(item => item.dataset.type.includes(config().type.flag.image))\n .map((item, index) =>\n ImageClient(`${selector} [data-component=\"Image\"][data-type=\"${config().type.flag.image}-${index}\"]`, {\n ...configuration.flag\n })\n );\n\n /* Logos -> Images */\n instance.logos = [...instance.element.querySelectorAll('[data-component=\"Image\"]')]\n .filter(item => item.dataset.type)\n .filter(item => item.dataset.type.includes(config().type.logo.image))\n .map((item, index) =>\n ImageClient(`${selector} [data-component=\"Image\"][data-type=\"${config().type.logo.image}-${index}\"]`, {\n ...configuration.logo\n })\n );\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n Image > Client > Prototype\n ========================================================================== */\n\n/* Modules */\nrequire('lazysizes');\nconst { timer } = require('rxjs');\nconst { take, repeat } = require('rxjs/operators');\nconst ViewHelpers = require('@bluekiri/alexandria/core/ViewHelpers');\n\nlet TRIGGERED = false;\n\n/* Prototype */\nconst prototype = {\n /* Create loop */\n createLoop() {\n /* Exit if we have no images to loop */\n if (!this.config.images) return new Error(\"It seems that you don't have images to loop from\");\n\n return timer(this.config.delay, this.config.delay).pipe(\n take(this.config.images.length),\n repeat(this.config.loops === 0 ? false : this.config.loops)\n );\n },\n /* Start loop */\n startLoop() {\n /* Exit if we have no images to loop */\n if (!this.config.images) return new Error(\"It seems that you don't have images to loop from\");\n\n this.loop = this.createLoop().subscribe({\n next: index => this.setImage(this.config.images[index].src, this.config.resize).init(),\n error: () => {},\n complete: () => {}\n });\n\n return this;\n },\n /* Stop loop */\n stopLoop() {\n /* Exit if we have no images to loop */\n if (!this.config.images) return new Error(\"It seems that you don't have images to loop from\");\n\n this.loop.unsubscribe();\n\n return this;\n },\n /* Get alt */\n getAlt() {\n return this.getImageEl().alt;\n },\n /* Get title */\n getTitle() {\n return this.getImageEl().title;\n },\n /* Get Image element */\n getImageEl: function getImageEl() {\n return this.element.querySelector('img');\n },\n /* Set Image */\n setImage: function setImage(src, options = false) {\n let opts = false;\n\n if (options) {\n opts = {\n operation: options.operation || this.config.resize.operation,\n suboperation: options.suboperation || this.config.resize.suboperation,\n width: options.width || this.config.resize.width,\n height: options.height || this.config.resize.height,\n quality: options.quality || this.config.resize.quality\n };\n }\n\n this.getImageEl().dataset.src = ViewHelpers(this.config.context).renderImage(src, opts);\n\n return this;\n },\n /* Start lazy */\n startLazy: function startLazy() {\n this.getImageEl().classList.remove('lazyloaded');\n this.getImageEl().classList.add('lazyload');\n },\n /* Binding events */\n bindEvents: function bindEvents() {\n this.onError = this.onError.bind(this);\n\n return this;\n },\n /* onError */\n onError: function onError() {\n this.getImageEl().src = this.getImageEl().dataset.alternative;\n\n return this;\n },\n /* Add event listener */\n addEventListener: function addEventListener() {\n /* Bind events */\n this.bindEvents();\n\n /* Error */\n this.getImageEl().addEventListener('error', this.onError, { once: true });\n\n /* Lazy loaded */\n if (!TRIGGERED)\n this.getImageEl().addEventListener(\n 'lazyloaded',\n () => {\n if (this.config.autoplay) this.startLoop();\n TRIGGERED = true;\n },\n { once: true }\n );\n },\n /* Init */\n init: function init() {\n /* Exit in case its not lazy */\n if (this.config.disableLazy) return this;\n\n /* Add event listener */\n this.addEventListener();\n\n /* Start lazy load */\n this.startLazy();\n\n /* Return */\n return this;\n }\n};\n\nmodule.exports = prototype;\n","const url = require('url');\nconst { markdown } = require('markdown');\nconst PriceFormatter = require('./PriceFormatter');\nconst Env = require('./Env');\nconst textUtils = require('./utils/texts');\n\nmodule.exports = (context = {}) => {\n const { format: formatPrice, formatWithForcedDecimals } = PriceFormatter(context);\n\n return {\n debug,\n renderImage,\n imageResizer: renderImage,\n asset,\n staticUrl,\n getStaticsBaseUrl,\n viewport,\n resize,\n isDesktop,\n isTablet,\n isMobile,\n random,\n dateFormat,\n markdown: renderMarkdown,\n formatPrice,\n formatWithForcedDecimals,\n icon: name => ``,\n ...textUtils\n };\n\n /**\n * Alias of console.log\n */\n function debug(msg) {\n console.log(msg);\n }\n\n /**\n * Returns the full URL of an asset\n * @param {string} file Asset filename (with extension)\n * @param {string} versionTimestamp (optional) timestamp to add to the url\n * @example staticUrl('alex-cruceros/index.css')\n * @returns {string} The asset's url\n */\n function staticUrl(file, versionTimestamp) {\n let trimmedFile = file.replace(/^\\//, '');\n\n if (Env.isDevelopment(context.NODE_ENV)) {\n trimmedFile = trimmedFile.replace('alexandria', 'alexandria/development');\n }\n\n if (Env.isStaging(context.NODE_ENV)) {\n trimmedFile = trimmedFile.replace('alexandria', 'alexandria/staging');\n }\n\n const assetUrl = getStaticsBaseUrl() + trimmedFile;\n\n if (versionTimestamp) {\n return `${assetUrl}?${versionTimestamp}`;\n }\n return assetUrl;\n }\n\n /**\n * Returns the base url of assets\n * @param {string} assetsPath (optional) relative path where assets are located\n * @param {*} devHost (optional) port for development environments\n */\n function getStaticsBaseUrl(assetsPath = '', devHost = `localhost:8080`) {\n /* Local */\n if (Env.isLocal(context.NODE_ENV) || Env.isDevelopment(context.NODE_ENV)) {\n const { PORT = false } = process.env;\n\n return new url.URL(assetsPath, `${PORT ? `http://localhost:${PORT}` : `http://${devHost}`}`).href;\n }\n\n let cdnBase;\n if (context.mscdn.startsWith('http')) {\n cdnBase = context.mscdn;\n } else {\n cdnBase = `http://${context.mscdn}`;\n }\n const { href } = new url.URL(assetsPath, cdnBase);\n return href.replace(/https?:/, '');\n }\n\n /**\n * Generates image URLs to resize and crop images\n *\n * @param {string} src source of the image ( without CDN )\n * @param {object} [{\n * operation, suboperation, width, height, quality = 80\n * }={}] Options object:\n * operation - first type of operation: resize\n * suboperation - second type of operation: crop\n * width - width you want for your image\n * height - height you want for your image\n *\n * @returns {string} finalSource - return a final source of image resized and cropped\n * @example renderImage(Model.image)\n * @example renderImage(Model.image, \"resize\", 1000, 375)\n * @example renderImage(Model.image, \"resize\", \"crop\", 1000, 375)\n */\n function renderImage(src, { operation, suboperation, width, height, quality = 80 } = {}) {\n const regex = /.*((cdn|ssl)\\.(logitravel|alitravel|traveltool|bookingay)\\..*?)\\/+(.*\\.(jpg|png|gif))(\\?.*)?/gim;\n\n let finalSource = prepareSrc();\n\n if (operation && width >= 0 && height >= 0) {\n if (finalSource.startsWith('//')) {\n finalSource = finalSource.substring(2);\n }\n\n if (suboperation && suboperation !== '') {\n finalSource = [\n context.mscdn,\n '/wsimgresize/',\n operation,\n '/',\n suboperation,\n '/',\n width,\n '/',\n height,\n '/',\n finalSource\n ].join('');\n } else {\n finalSource = [\n context.mscdn,\n '/wsimgresize/',\n operation,\n '/',\n width,\n '/',\n height,\n '/',\n finalSource\n ].join('');\n }\n }\n\n const querySeparator = finalSource.indexOf('?') === -1 ? '?' : '&';\n finalSource += `${querySeparator}jpegQuality=${quality}`;\n return finalSource;\n\n function prepareSrc() {\n const match = regex.exec(src);\n if (match !== null) {\n const relative = match[4];\n const params = match[6] || '';\n\n return [context.mscdn, '/', relative, params].join('');\n }\n if (src.startsWith('http') || src.startsWith('https') || src.startsWith('//')) {\n return src.replace(/(^\\w+:|^)\\/\\//, '');\n }\n if (src.startsWith('/')) {\n return [context.mscdn, src].join('');\n }\n return [context.mscdn, '/', src].join('');\n }\n }\n\n /**\n * Construct the full url of images with added protocol\n * @param {string} path - source of the image ( without CDN )\n * @returns {string} return a final source of image with CDN added\n * @example assetImg('http://logitravel.com/photo.jpg')\n */\n function asset(path) {\n const image = renderImage(path);\n let protocol = '';\n if (path.startsWith('http:')) {\n protocol = 'http:';\n } else if (path.startsWith('https:')) {\n protocol = 'https:';\n }\n return protocol ? [protocol, image.startsWith('//') ? '' : '//', image].join('') : image;\n }\n\n /**\n * Construct the url of images to resize and crop depending on viewport's size\n\n * @param {string} src - source of the image ( without CDN )\n * @param {string} [operation] - first type of operation: resize\n * @param {string} [suboperation] - second type of operation: crop\n * @param {number} [width] - width you want for your image\n * @param {number} [height] - height you want for your image\n * @param {number} [viewportWidth] - width of the viewport\n * @param {number} [viewportHeight] - height of the viewport\n * @returns {string} return a final source of image using renderImage with a calculated size\n * @example viewport(Model.image, \"resize\", \"crop\", 1000, 375, 1980, 1080)\n */\n\n /**\n * Construct the url of images to resize and crop depending on viewport's size\n *\n * @param {any} src source of the image ( without CDN )\n * @param {any} [{\n * operation, suboperation, width, height, viewportWidth, viewportHeight\n * }={}] Options:\n * operation - first type of operation: resize\n * suboperation - second type of operation: crop\n * width - width you want for your image\n * height - height you want for your image\n * viewportWidth - width of the viewport\n * viewportHeight - height of the viewport\n * @returns {string} return a final source of image using renderImage with a calculated size\n * @example viewport(Model.image, \"resize\", \"crop\", 1000, 375, 1980, 1080)\n */\n function viewport(src, { operation, suboperation, width, height, viewportWidth, viewportHeight } = {}) {\n const finalWidth = viewportWidth ? Math.min(width, viewportWidth) : width;\n const finalHeight = viewportHeight ? Math.min(height, viewportHeight) : height;\n const options = {\n operation,\n suboperation,\n width: finalWidth,\n height: finalHeight\n };\n return renderImage(src, options);\n }\n\n /**\n * Alias for renderImage with resize operation\n */\n function resize(src, width, height) {\n const options = {\n operation: 'resize',\n suboperation: undefined,\n width,\n height\n };\n return renderImage(src, options);\n }\n\n /**\n * Checks if device is desktop\n * @returns {boolean} return if it's true\n */\n function isDesktop() {\n return context.device === 'desktop';\n }\n\n /**\n * Checks if device is tablet\n * @returns {boolean} return if it's true\n */\n function isTablet() {\n return context.device === 'tablet';\n }\n\n /**\n * Checks if device is mobile\n * @returns {boolean} return if it's true\n */\n function isMobile() {\n return context.device === 'mobile';\n }\n\n /**\n * Get a random number, perfect for ID's\n * @returns {number} return a random number\n */\n function random() {\n const out = Math.floor(Math.random() * 9999 + 1);\n return `r${out}`;\n }\n\n /**\n * Returns a date format\n *\n * @param {string} device\n * @param {string} app\n * @returns {string}\n */\n function dateFormat(device, app) {\n let format = 'DD, d MM, yy';\n if (device === 'mobile') {\n switch (app) {\n case 'logitravelru':\n format = 'd-mm-yy';\n break;\n case 'logitravelil':\n format = 'd-mm-yy';\n break;\n case 'logitravelae':\n format = 'd-mm-yy';\n break;\n default:\n format = 'd M yy';\n break;\n }\n } else {\n switch (app) {\n case 'logitravelru':\n format = 'd M yy';\n break;\n case 'logitravelil':\n format = 'd MM yy';\n break;\n case 'logitravelae':\n format = 'd MM yy';\n break;\n default:\n format = 'D, d MM, yy';\n break;\n }\n }\n return format;\n }\n\n function renderMarkdown(str = '') {\n let out = markdown.toHTML(str);\n out = out.replace(/^
/, '').replace(/<\\/p>$/, '');\n return out;\n }\n};\n","const currencySymbols = {\n USD: '$',\n CAD: '$',\n BRL: 'R$',\n GBP: '£',\n EUR: '€',\n MXN: '$',\n RUB: '₽',\n AED: 'AED'\n};\n\nconst currencyPositionsByMarket = {\n br: -1,\n us: -1,\n gb: -1,\n it: -1,\n mx: 2,\n ae: -1,\n ca: 2\n};\n\nconst currencyPositionsByLanguage = {\n br: -1,\n en: -1,\n it: -1,\n mx: 2,\n ae: -1\n};\n\nconst decimalPosition = lang => {\n switch (lang) {\n case 'en':\n case 'fi':\n case 'mx':\n case 'us':\n case 'he':\n case 'ar':\n case 'tr':\n return '.';\n default:\n return ',';\n }\n};\n\nconst decimals = 2;\n\n/**\n * Price Formatter\n * @param {object} context Context object passed from back\n */\nmodule.exports = function PriceFormatter(context = {}, useMarket = false) {\n const currencyPosition = useMarket\n ? currencyPositionsByMarket[getMarket()] || 1\n : currencyPositionsByLanguage[getLanguage()] || 1;\n const decimalCharacter = decimalPosition(getLanguage());\n\n return {\n /**\n * Prints price formatted for product cards\n * @param {number} value - price of the product\n * @param {string} currency - currency of the product\n * @returns {Object} return HTML with the price and currency ready to be used\n */\n format(value, currency, round) {\n const currencySymbol = currencySymbols[currency] || '';\n let template = '';\n const absValue = Math.abs(value);\n const stringPrice = (Math.round(absValue * 10 ** decimals) / 10 ** decimals).toString();\n const priceParts = stringPrice.split('.');\n let intPart = priceParts[0];\n let decPart = priceParts.length > 1 ? priceParts[1] : '';\n intPart = formatPriceWithThousandsSeparator(intPart);\n\n if (round && decPart) {\n template = roundDecimals();\n } else if (currencyPosition === -1) {\n template =\n `${currencySymbol}` +\n `${intPart}`;\n } else if (currencyPosition === 1) {\n template =\n `${intPart}` +\n `${currencySymbol}`;\n } else {\n template =\n `${currencySymbol}` +\n `${intPart}` +\n `${currency}`;\n }\n return template;\n\n function roundDecimals() {\n decPart = priceParts.length > 1 ? priceParts[1] : '';\n while (decPart.length < decimals) {\n decPart += '0';\n }\n if (currencyPosition === -1) {\n return (\n `${currencySymbol}` +\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}`\n );\n }\n if (currencyPosition === 1) {\n return (\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}` +\n `${currencySymbol}`\n );\n }\n return (\n `${currencySymbol}` +\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}` +\n `${currency}`\n );\n }\n },\n /**\n * Prints price formatted for product cards\n * @param {number} value - price of the product\n * @param {string} currency - currency of the product\n * @returns {Object} return HTML with the price and currency ready to be used\n */\n formatWithForcedDecimals(value, currency) {\n const currencySymbol = currencySymbols[currency] || '';\n let template = '';\n const absValue = Math.abs(value);\n const stringPrice = (Math.round(absValue * 10 ** decimals) / 10 ** decimals).toString();\n const priceParts = stringPrice.split('.');\n let intPart = priceParts[0];\n let decPart = priceParts.length > 1 ? priceParts[1] : '';\n intPart = formatPriceWithThousandsSeparator(intPart);\n\n template = roundDecimals();\n\n return template;\n\n function roundDecimals() {\n decPart = priceParts.length > 1 ? priceParts[1] : '00';\n while (decPart.length < decimals) {\n decPart += '0';\n }\n if (currencyPosition === -1) {\n return (\n `${currencySymbol}` +\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}`\n );\n }\n if (currencyPosition === 1) {\n return (\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}` +\n `${currencySymbol}`\n );\n }\n return (\n `${currencySymbol}` +\n `${intPart}${getDecimalTemplate(decPart, decimalCharacter)}` +\n `${currency}`\n );\n }\n }\n };\n\n function formatPriceWithThousandsSeparator(intPart) {\n const numberGroupSeparators = {\n es: '.',\n pt: '.',\n it: '.',\n de: '.',\n fr: ' ',\n br: '.',\n en: ',',\n fi: ',',\n se: ' ',\n mx: ',',\n us: ',',\n ca: '.',\n ve: '.',\n ru: ' ',\n he: ',',\n ar: ',',\n tr: ',',\n ua: ' '\n };\n\n const numberGroupSeparator = numberGroupSeparators[getLanguage()] || '.';\n const intPartWithSeparation = [];\n let str = '';\n for (let i = intPart.length - 1; i >= 0; i--) {\n str += intPart[i];\n if (str.length === 3) {\n intPartWithSeparation.push(reverseString(str));\n str = '';\n }\n }\n if (str.length > 0) {\n intPartWithSeparation.push(reverseString(str));\n }\n intPartWithSeparation.reverse();\n return intPartWithSeparation.join(numberGroupSeparator);\n }\n\n function getLanguage() {\n return context.Language || context.language;\n }\n\n function getMarket() {\n return context.Market || context.market;\n }\n};\n\nfunction getDecimalTemplate(decPart, decimalCharacter) {\n return `${decimalCharacter}${decPart}`;\n}\n\nfunction reverseString(str) {\n return str\n .split('')\n .reverse()\n .join('');\n}\n","module.exports = {\n isLocal(env = process.env.NODE_ENV) {\n if (!env) {\n return false;\n }\n\n return env.toLowerCase() === 'local';\n },\n\n isDevelopment(env = process.env.NODE_ENV) {\n if (!env) {\n return false;\n }\n\n return env.toLowerCase() === 'dev' || env === 'development';\n },\n\n isStaging(env = process.env.NODE_ENV) {\n if (!env) {\n return false;\n }\n\n return env.toLowerCase() === 'staging' || env.toLowerCase() === 'sta';\n },\n\n isProduction(env = process.env.NODE_ENV) {\n if (!env) {\n return false;\n }\n\n return !(\n this.isLocal(env.toLowerCase()) ||\n this.isDevelopment(env.toLowerCase()) ||\n this.isStaging(env.toLowerCase())\n );\n }\n};\n","/**\n * Module that contains utils for text and html\n */\nmodule.exports = {\n linkDataAtribute,\n tagAttributes,\n tagAttributesObject,\n buildTags,\n getConfigPlaceholder,\n setConfigPlaceholder,\n setSpacingPlaceholder,\n cutStringByWords,\n cutParagraphsByWords,\n countStringWords\n};\n\n/**\n * Pug syntax &attributes -> https://pugjs.org/language/attributes.html\n * Build string of the next data structure from an array\n *\n * @param {Array} [dataAttributes=[]]\n * @returns {object}\n */\nfunction linkDataAtribute(dataAttributes = []) {\n const data = {};\n dataAttributes.forEach(item => {\n data[`data-${item.name}`] = item.value;\n });\n return data;\n}\n\n/**\n * Return html tags attributes as a string\n *\n * @param {array} attributesArray array with a data of the tag attributes\n * @returns {string} the string of HTML attrs\n */\nfunction tagAttributes(attributesArray) {\n const attributesObject = tagAttributesObject(attributesArray);\n return Object.keys(attributesObject)\n .map(name => `${name}= \"${attributesObject[name]}\"`)\n .join(' ');\n}\n\n/**\n * Return html tags attributes as an object\n *\n * @param {array} attributesArray array with a data of the tag attributes\n * @returns {object} the object of HTML attrs\n */\nfunction tagAttributesObject(attributesArray) {\n const attributesObject = {};\n\n attributesArray\n .filter(item => !!item.name)\n .forEach(item => {\n // if value is an array, just join the values as a single string\n const value = Array.isArray(item.value) ? item.value.join(' ') : item.value;\n attributesObject[item.name] = value;\n });\n\n return attributesObject;\n}\n\n/**\n * Builds a list of tags\n *\n * @param {Array} tagsData The array of data for each tag. Each one { content, content_tag?, attributes? }\n * @param {string} [tag='span'] The tag name (span by default)\n * @returns markup html tag with your attributes if has it\n */\nfunction buildTags(tagsData, tag = 'span') {\n return tagsData\n .map(item => {\n const attributes = item.attributes ? ` ${tagAttributes(item.attributes)}` : '';\n let html;\n if (item.content_tag) {\n html = `<${tag}${attributes}><${item.content_tag}>${item.content}${item.content_tag}>${tag}>`;\n } else {\n html = `<${tag}${attributes}>${item.content}${tag}>`;\n }\n return html;\n })\n .join('');\n}\n\n/**\n * Generates config for placeholders\n *\n * @param {any} config Model.{placeholder}.data.config\n * @returns config object\n */\nfunction getConfigPlaceholder(config) {\n const newConfig = {};\n newConfig.vertical_spacing_top = config.vertical_spacing_top || false;\n newConfig.vertical_spacing_bottom = config.vertical_spacing_bottom || false;\n newConfig.class = config.class || false;\n return newConfig;\n}\n\n/**\n * Sets placeholders layout\n * @param {object} config - Model.{placeholder}.data.config\n * @returns {string} return class names\n */\nfunction setConfigPlaceholder(config) {\n const newConfig = getConfigPlaceholder(config);\n const spacingClass = setSpacingPlaceholder(newConfig.vertical_spacing_top, newConfig.vertical_spacing_bottom);\n let classes;\n\n if (!spacingClass && !newConfig.class) {\n classes = false;\n } else if (spacingClass) {\n classes = `${spacingClass} `;\n } else {\n classes = '';\n }\n\n if (newConfig.class) {\n newConfig.class.forEach(item => {\n classes += `${item} `;\n });\n }\n\n return classes;\n}\n\n/**\n * Sets class name for the vertical spacing of layout containers(\"placeholder\")\n *\n * @param {any} top Model.{placeholder}.config.vertical_spacing_top\n * @param {any} bottom Model.{placeholder}.config.vertical_spacing_bottom\n * @returns {string} class name\n */\nfunction setSpacingPlaceholder(top, bottom) {\n const verticalSpacingTop = top ? 'spacing-top' : false;\n const verticalSpacingBottom = bottom ? 'spacing-bottom' : false;\n let spacing = false;\n\n if (verticalSpacingBottom && verticalSpacingTop) {\n spacing = `${verticalSpacingTop} ${verticalSpacingBottom}`;\n return spacing;\n }\n\n if (verticalSpacingTop) {\n spacing = verticalSpacingTop;\n }\n\n if (verticalSpacingBottom) {\n spacing = verticalSpacingBottom;\n }\n\n return spacing;\n}\n\n/**\n * Cut long string by words ( or not ) how you want\n *\n * @param {any} text text to be cutted\n * @param {any} [{ limit = 155, splitWord = false, ellipsis = '...' }={}] Options:\n * - limit: maximum of characters to be displayed, NOT WORDS\n * - splitWord: cut words splitting in the middle. if true, will get the last entire words and cut there.\n * - ellipsis: custom ellipsis for the end of the string\n * @returns {string}\n * @example cutStringByWords('my string', { limit: 40} )\n * @example cutStringByWords('my string', { limit: 40, splitWord: true })\n * @example cutStringByWords('my string', { limit: 40, splitWord: true, elipsis: 'xxx' })\n */\nfunction cutStringByWords(text, { limit = 155, splitWord = false, ellipsis = '...' } = {}) {\n const textWithSpace = `${text} `;\n let trimmedString = textWithSpace.substr(0, limit || 155);\n if (!splitWord) {\n trimmedString = trimmedString.substr(0, Math.min(trimmedString.length, trimmedString.lastIndexOf(' ')));\n }\n if (trimmedString.length + 1 < textWithSpace.length && ellipsis !== ' ') {\n trimmedString += ellipsis;\n }\n return trimmedString;\n}\n\n/**\n * Cuts a list of paragraphs using a character limit\n *\n * @param {Array} paragraphs An array of paragraphs\n * @param {Number} limit The character limit\n * @param {string} [ellipsis='...']\n * @returns {Array} The array of paragraphs\n */\nfunction cutParagraphsByWords(paragraphs, limit, ellipsis = '...') {\n const paragraphsSize = paragraphs.length;\n const paragraphsProcessed = [];\n let wordsTotal = 0;\n\n for (let i = 0; i < paragraphsSize; i++) {\n let words = paragraphs[i].split(' ');\n\n if (wordsTotal + words.length <= limit) {\n wordsTotal += words.length;\n paragraphsProcessed.push(paragraphs[i]);\n } else {\n const elementsToInclude = limit - wordsTotal;\n if (elementsToInclude > 0) {\n words = words.splice(0, elementsToInclude);\n paragraphsProcessed.push(words.join(' ') + ellipsis);\n } else {\n paragraphsProcessed[i - 1] = paragraphsProcessed[i - 1] + ellipsis;\n }\n i = paragraphsSize + 1;\n }\n }\n\n return closeMardownInParagraphs(paragraphsProcessed, ellipsis);\n}\n\nfunction closeMardownInParagraphs(paragraphs, ellipsis = '...') {\n const hasStrongTags = text => text.match(/(\\*\\*)/g) && text.match(/(\\*\\*)/g).length % 2 !== 0;\n\n return paragraphs.map(p => {\n if (hasStrongTags(p)) {\n return p.replace(ellipsis, `**${ellipsis}`);\n }\n return p;\n });\n}\n\n/**\n * @name countStringWords\n * @summary count the words from a string\n * @param {string} text - text to be counted\n * @returns {number} total - returns the total number of words at the string\n * @example countStringWords(Model.title)\n */\nfunction countStringWords(text) {\n let count = 0;\n const words = text.toString().split(' ');\n for (let i = 0, { length } = words; i < length; i++) {\n if (words[i] !== '') {\n count++;\n }\n }\n return count;\n}\n","/* ==========================================================================\n Image > Client > Config\n ========================================================================== */\n\n/* Modules */\n\n/* Config */\nconst config = {\n component: 'Image',\n init: true,\n autoplay: false,\n delay: 3000,\n loops: 1,\n resize: {\n operation: 'resize',\n suboperation: 'crop',\n width: 200,\n height: 200,\n quality: 97\n },\n disableLazy: false,\n image: {\n lazy: '/comun/images/shim.gif'\n },\n css: {\n withBackground: 'image--with-background',\n isVertical: 'image--is-vertical'\n }\n};\n\n/* Export */\nmodule.exports = () => config;\n","/* ==========================================================================\n Footer > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'Footer',\n type: {\n certification: {\n image: 'footer-certification-image'\n },\n logo: {\n image: 'footer-logo-image'\n },\n blog: {\n image: 'footer-blog-image'\n },\n flag: {\n image: 'footer-flag-image'\n }\n }\n};\n\nmodule.exports = () => config;\n","const $ = require('jquery');\n\nconst ModalMsiClient = require('../../../modal-msi/client/js');\nconst ModalOriginsClient = require('../../../modal-origins/client/js');\nconst HeaderMasterExpedient = require('../../../header-master-expedient/client/js');\n\nconst { initWelcome } = require('./welcome');\nconst { initTooltips } = require('./tooltip');\nconst { getCookie, setCookie } = require('./cookie');\n\n// eslint-disable-next-line max-statements\n$(() => {\n // Welcome\n initWelcome();\n\n // Tooltips\n initTooltips();\n\n // Modal Origins\n ModalOriginsClient('.Header [data-component=\"Modal\"][data-type=\"modal-origins\"]', {\n modal: {\n triggers: [document.querySelector('.Header [data-modal-open=\"modal-origins\"]')]\n }\n });\n\n // Modal MSI\n ModalMsiClient('.Header [data-component=\"Modal\"][data-type=\"modal-msi\"]', {\n modal: {\n triggers: [...document.querySelectorAll('[data-modal-open=\"modal-msi\"]')]\n }\n });\n\n // Header Master Expedient\n HeaderMasterExpedient('[data-component=\"HeaderMasterExpedient\"]');\n\n // Login Modal\n const modalCookie = getCookie('login_modal_closed');\n const closeButton = $('.close-button');\n const loginModal = $('#loginModal');\n const warningCookie = 'warning_closed';\n\n closeButton.click(() => {\n document.cookie = 'login_modal_closed=1; expire=; path=/;';\n loginModal.css('display', 'none');\n });\n\n if (loginModal && modalCookie === '') {\n setTimeout(() => {\n loginModal.css('display', 'block');\n }, 6000);\n }\n\n /* Event to close top warning and cookies */\n checkWarning(warningCookie);\n $('.message-alert__content-close').on('click', () => {\n setCookie(warningCookie);\n $(`.message-alert`).addClass('message-alert__hidden');\n });\n\n // DROPDOWN LANGUAGE ITEM CLICK EVENT\n $('.options-list__item--language').on('click', () => {\n const elementLanguageDropdown = $('.dropdown--language .dropdown__item');\n if (elementLanguageDropdown) {\n elementLanguageDropdown.on('click', event => {\n const config = JSON.parse($('.dropdown--language').attr('data-config'));\n const languageSelected = event.currentTarget.dataset.language;\n\n if (config.language_url) {\n $.ajax({\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n language: languageSelected\n }),\n dataType: 'json',\n success: () => {\n window.parent.location.reload();\n },\n type: 'POST',\n url: config.language_url\n });\n } else {\n console.warn(\"WARNING: Origin url hasn't been defined.\");\n }\n });\n }\n });\n\n // DROPDOWN CURRENCY ITEM CLICK EVENT\n $('.options-list__item--currency').on('click', () => {\n const elementCurrencyDropdown = $('.dropdown--currency .dropdown__item');\n if (elementCurrencyDropdown) {\n elementCurrencyDropdown.on('click', event => {\n const config = JSON.parse($('.dropdown--currency').attr('data-config'));\n const currencySelected = event.currentTarget.dataset.currency;\n\n if (config.currency_url) {\n $.ajax({\n contentType: 'application/json; charset=utf-8',\n data: JSON.stringify({\n currency: currencySelected\n }),\n dataType: 'json',\n success: () => {\n window.parent.location.reload();\n },\n type: 'POST',\n url: config.currency_url\n });\n } else {\n console.warn(\"WARNING: Origin url hasn't been defined.\");\n }\n });\n }\n });\n});\n\naddClassActive('.options-list__item--currency', '.dropdown--currency');\naddClassActive('.options-list__item--language', '.dropdown--language');\n\nfunction addClassActive(listItemClass, dropdownClass) {\n const listItem = $(listItemClass);\n const dropdown = $(dropdownClass);\n\n if (dropdown.hasClass('dropdown--language') || dropdown.hasClass('dropdown--currency')) {\n listItem.addClass('active');\n } else {\n listItem.removeClass('active');\n }\n}\n\nconst userAgent = navigator.userAgent.toLowerCase();\n// eslint-disable-next-line max-len\nconst isTablet = /(ipad|tablet|(android(?!.*mobile))|(windows(?!.*phone)(.*touch))|kindle|playbook|silk|(puffin(?!.*(IP|AP|WP))))/.test(\n userAgent\n);\n\nif (isTablet) {\n $('.Header .menu-tabs .menu-item.dropdown').on('click', e => {\n if ($(e.currentTarget).hasClass('js-menu-clicked')) {\n return true;\n }\n $('.Header .menu-tabs .menu-item.dropdown').removeClass('js-menu-clicked');\n $(e.currentTarget).addClass('js-menu-clicked');\n e.preventDefault();\n return false;\n });\n}\n\nfunction checkWarning(cookie) {\n if (getCookie(cookie) === '') {\n $(`.message-alert`).removeClass('message-alert__hidden');\n }\n}\n","/* ==========================================================================\n ModalMsi > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst ModalClient = require('@bluekiri/alexandria-contrib-components/components/modal/client/js');\nconst ImageClient = require('@bluekiri/alexandria-contrib-components/components/image/client/js');\nconst config = require('./config');\n\n/**\n * ModalMsi component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ModalMsi(\n selector = `[data-component=\"Modal\"][data-type=\"${config().type.modal}\"]`,\n configuration = {}\n) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = {};\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = { ...config(), ...configuration };\n\n /* Images */\n instance.images = [...instance.element.querySelectorAll('[data-component=\"Image\"]')].map((item, index) =>\n ImageClient(`${selector} [data-component=\"Image\"][data-type=\"${config().type.image}-${index}\"]`, {\n ...configuration.image\n })\n );\n\n /* Modal */\n instance.modal = ModalClient(selector, {\n ...configuration.modal,\n type: config().type.modal\n });\n\n /* Returns */\n return instance;\n }\n};\n","/* ==========================================================================\n Modal > Client > Config\n ========================================================================== */\n\n/* Base config */\nconst config = {\n component: 'Modal',\n init: true,\n hasClose: true,\n autoDom: true,\n autoStore: true,\n isLoading: false,\n triggers: [],\n type: 'modal-type',\n cssVisible: 'is-visible',\n cssModalBody: 'modal-is-visible',\n modalClose: 'data-modal-close'\n};\n\n/* Not close config */\nconst notClose = {\n hasClose: false\n};\n\nconst getConfig = (type = '') => {\n if (type === 'notClose') return { ...config, ...notClose };\n\n return { ...config };\n};\n\nmodule.exports = getConfig;\n","/* ==========================================================================\n Modal > Client > Prototype\n ========================================================================== */\n\n/* Imports */\nconst { addToStore, removeFromStore } = require('@bluekiri/alexandria/helpers/store');\n\n/* Modal store */\nlet store = [];\n\nconst modal = {\n /* Get header el */\n getHeaderEl() {\n return this.element.querySelector('[data-modal-header]');\n },\n /* Get header text */\n getHeaderText() {\n return this.getHeaderEl().innerText;\n },\n /* Set header text */\n setHeaderText(text = false) {\n if (text) this.getHeaderEl().innerText = text;\n\n return this;\n },\n /* Add triggers */\n addTriggers: function Fn(triggers) {\n triggers.forEach(trigger => {\n this.bindEvents();\n trigger.addEventListener('click', this.onClickTrigger);\n });\n },\n\n /* Set close button */\n setClose: function Fn() {\n if (!this.config.hasClose) return this;\n\n this.closeElement = this.element.querySelector(`[${this.config.modalClose}]`);\n\n return this;\n },\n\n /* Is open status */\n isOpen: function Fn() {\n return this.isVisible;\n },\n\n /* Display modal */\n display: function Fn() {\n /* Add to dom in case it is loading modal */\n if (this.config.autoDom) this.addToDom();\n\n this.element.setAttribute('aria-hidden', 'false');\n this.element.classList.add(this.config.cssVisible);\n document.body.classList.add(this.config.cssModalBody);\n this.isVisible = true;\n if (!this.config.isLoading) this.addEventListener();\n\n // Fire external callbacks before open panel\n this.onOpen();\n\n return this;\n },\n\n /* Hide modal */\n hide: function Fn() {\n this.element.setAttribute('aria-hidden', 'true');\n this.element.classList.remove(this.config.cssVisible);\n document.body.classList.remove(this.config.cssModalBody);\n this.isVisible = false;\n if (!this.config.isLoading) this.removeEventListener();\n\n /* Remove from dom in case it is loading modal */\n if (this.config.isLoading) this.removeFromDom();\n\n /* Fire external callbacks before open panel */\n this.onClose();\n\n return this;\n },\n\n /* Add to dom */\n addToDom: function Fn() {\n document.body.appendChild(this.element);\n\n return this;\n },\n\n /* Remove from dom */\n removeFromDom: function Fn() {\n this.element.parentNode.removeChild(this.element);\n\n return this;\n },\n\n /* onOpen callBacks */\n onOpen: function Fn(event = false) {\n /* Fire external callbacks */\n if (this.config.onOpen) this.config.onOpen.call(this, this, event);\n\n return this;\n },\n\n /* onClose callBacks */\n onClose: function Fn(event = false) {\n /* Fire external callbacks */\n if (this.config.onClose) this.config.onClose.call(this, this, event);\n\n return this;\n },\n\n /* On click close */\n onClickClose: function Fn(event) {\n /* Hide */\n this.hide();\n\n /* Remove from dom */\n if (this.config.autoDom) this.removeFromDom();\n\n /* Prevent bubbling */\n event.stopPropagation();\n event.preventDefault();\n\n return this;\n },\n\n /* On key down */\n onKeydown: function Fn(event) {\n /* Esc key */\n if (!(event.keyCode === 27)) return this;\n\n /* Hide */\n this.hide();\n\n /* Remove from dom */\n if (this.config.autoDom) this.removeFromDom();\n\n /* Prevent bubbling */\n event.stopPropagation();\n\n return this;\n },\n\n /* On click trigger */\n onClickTrigger: function Fn(event) {\n /* Add to dom first */\n if (this.config.autoDom) this.addToDom();\n\n /* Display */\n this.display();\n\n /* Prevent bubbling */\n event.stopPropagation();\n\n return this;\n },\n\n /* On click modal */\n onClickModal: function Fn(event) {\n /* Prevent bubbling */\n event.stopPropagation();\n\n return this;\n },\n\n /* On click window */\n onClickWindow: function Fn() {\n /* Hide */\n this.hide();\n\n /* Remove from dom */\n if (this.config.autoDom) this.removeFromDom();\n\n return this;\n },\n\n /* Bind events */\n bindEvents: function Fn() {\n this.onClickTrigger = this.onClickTrigger.bind(this);\n this.onClickWindow = this.onClickWindow.bind(this);\n this.onClickClose = this.onClickClose.bind(this);\n this.onClickModal = this.onClickModal.bind(this);\n this.onKeydown = this.onKeydown.bind(this);\n this.onOpen = this.onOpen.bind(this);\n this.onClose = this.onClose.bind(this);\n },\n\n /* Remove event listener */\n removeEventListener: function Fn() {\n /* Window */\n document.removeEventListener('click', this.onClickWindow);\n\n /* Modal */\n this.element.firstChild.removeEventListener('click', this.onClickModal);\n\n /* Close */\n if (this.config.hasClose) this.closeElement.removeEventListener('click', this.onClickClose);\n document.removeEventListener('keydown', this.onKeydown);\n },\n\n /* Add event listener */\n addEventListener: function Fn() {\n /* Bind events */\n this.bindEvents();\n\n /* Window */\n document.addEventListener('click', this.onClickWindow);\n\n /* Modal */\n this.element.firstChild.addEventListener('click', this.onClickModal);\n\n /* Close */\n if (this.config.hasClose) this.closeElement.addEventListener('click', this.onClickClose);\n document.addEventListener('keydown', this.onKeydown);\n },\n\n /* Add to store */\n addToStore: function Fn() {\n /* Control unique instances of same modal */\n if (this.getStore().filter(item => item.type === this.type).length > 0) return this;\n\n /* Quarry function */\n addToStore(this, store);\n\n return this;\n },\n\n /* Remove from store */\n removeFromStore: function Fn() {\n store = removeFromStore(this, store);\n\n return this;\n },\n\n /* Get store */\n getStore: function Fn() {\n return store;\n },\n\n /* Init */\n init: function Fn() {\n /* Set close button */\n this.setClose();\n\n /* Add triggers */\n if (this.config.triggers.length > 0) this.addTriggers(this.config.triggers);\n\n /* Add to store */\n if (this.config.autoStore) this.addToStore();\n\n /* Remove from dom */\n if (this.config.autoDom) this.removeFromDom();\n }\n};\n\nmodule.exports = modal;\n","/* ==========================================================================\n Helpers > Store\n ========================================================================== */\n\nconst removeFromStore = (instance, store) => store.filter(item => instance !== item);\nconst addToStore = (instance, store) => store.push(instance);\n\nmodule.exports = {\n removeFromStore,\n addToStore\n};\n","/* ==========================================================================\n ModalMsi > Client > Config\n ========================================================================== */\n\n/* Config */\nconst config = {\n type: {\n modal: 'modal-msi',\n image: 'modal-msi-image'\n },\n css: {\n modal: 'modal--msi'\n }\n};\n\n/* Exports */\nmodule.exports = () => config;\n","/* ==========================================================================\n ModalOrigins > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst ModalClient = require('@bluekiri/alexandria-contrib-components/components/modal/client/js');\nconst OriginListCLient = require('@bluekiri/alexandria-contrib-components/components/origin-list/client/js');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * ModalOrigins component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function ModalOrigins(\n selector = `[data-component=\"Modal\"][data-type=\"${config().type.modal}\"]`,\n configuration = {}\n) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = { ...config(), ...configuration };\n\n /* Origins */\n instance.origin = OriginListCLient(`${selector} [data-component=\"OriginList\"]`, {\n ...configuration.origin\n });\n\n /* Modal */\n instance.modal = ModalClient(selector, {\n ...configuration.modal,\n type: config().type.modal,\n onOpen: () => instance.addEventListener(),\n onClose: () => instance.removeEventListener()\n });\n\n /* Clean */\n instance.removeEventListener();\n\n /* Return */\n return instance;\n }\n};\n","/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst { randomId } = require('@bluekiri/alexandria/helpers/dataHelpers');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\nmodule.exports = function OriginListClient(selector = '[data-component=\"OriginList\"]', configuration = {}) {\n if (elementExist(selector)) {\n const instance = Object.create(prototype);\n\n instance.element = document.querySelector(selector);\n\n instance.config = { ...config(), ...instance.getConfig(), ...configuration };\n\n instance.id = instance.element.dataset.id || randomId('origin-list');\n\n if (instance.config.init) instance.initialize();\n\n return instance;\n }\n};\n","const $ = require('jquery/dist/jquery');\n\nconst buildRequest = function fn(configuration, instance) {\n if (configuration.session) {\n return JSON.stringify({ SessionCode: configuration.session, [configuration.parameterName]: instance.value });\n }\n return JSON.stringify({ [configuration.parameterName]: instance.value, Source: 900 });\n};\n\nconst buildFinalUrl = () => {\n const splittedString = window.location.search.split('&');\n if (splittedString.length > 0) {\n if (splittedString[0] === '') return '';\n\n let newQuery = splittedString\n .map(str => {\n if (str.indexOf('origen') !== -1 || str.indexOf('origin') !== -1) return false;\n return str;\n })\n .filter(str => str !== false)\n .join('&');\n\n if (newQuery[0] && newQuery[0] !== '?') {\n if (newQuery[0] === '&') newQuery = `?${newQuery.substring(1, newQuery.length)}`;\n else newQuery = `?${newQuery.substring(0, newQuery.length)}`;\n }\n return newQuery;\n }\n return ``;\n};\n\nconst executeAjax = function fn(instance) {\n const configuration = instance.config;\n\n // Exit in case we dont have the information we need\n if (!(configuration.endpoint && configuration.parameterName && configuration.verb)) return false;\n\n const verb = configuration.verb.toLowerCase();\n\n setTimeout(() => {\n let promise;\n if (verb === 'post') {\n promise = $.post({\n url: configuration.endpoint,\n data: buildRequest(configuration, instance),\n contentType: 'application/json; charset=utf-8',\n withCredentials: true\n });\n } else if (verb === 'get') {\n promise = $.get({\n url: configuration.endpoint,\n data: buildRequest(configuration, instance),\n contentType: 'application/json; charset=utf-8',\n withCredentials: true\n });\n }\n\n if (promise) {\n promise\n .done(() => {\n window.location.href = window.location.origin + window.location.pathname + buildFinalUrl();\n })\n .fail(() => {\n console.error('Oooopsss ... An error has occurred to change the origin :(');\n });\n }\n }, 1);\n\n return true;\n};\n\nmodule.exports = {\n getConfig: function fn() {\n let prototypeConfiguration = {};\n\n if (this.element) {\n const configuration = this.element.dataset.config;\n\n if (configuration) {\n prototypeConfiguration = JSON.parse(configuration);\n this.element.dataset.config = '';\n }\n }\n\n return prototypeConfiguration;\n },\n get: function fn() {\n return this.value || '';\n },\n setCookieAutoOrigin: function fn() {\n if (this.config && this.config.autoOrigin) {\n document.cookie = `${this.config.autoOrigin.ck_name}=${this.config.autoOrigin.ck_value};path=/`;\n }\n },\n onClickOrigin: function fn(e) {\n if (e.target.parentElement === this.element) {\n const newSelectedOrigin = e.target;\n\n if (newSelectedOrigin === this.selectedOrigin) return false;\n\n this.setCookieAutoOrigin();\n\n // --> We have a selected origin?\n if (this.selectedOrigin) {\n // --> Delete current origin to set the new\n this.selectedOrigin.classList.remove(this.config.selectedClass);\n const icon = this.selectedOrigin.lastChild;\n\n if (icon && icon.nodeName === 'SPAN') {\n newSelectedOrigin.appendChild(icon);\n }\n }\n // --> Set the new origin\n this.selectedOrigin = newSelectedOrigin;\n this.selectedOrigin.classList.add(this.config.selectedClass);\n this.value = this.selectedOrigin.attributes[this.config.originOption].value;\n\n // --> Try to set the new origin in session using an API\n executeAjax(this);\n\n return true;\n }\n return false;\n },\n bindEvents: function bindEvents() {\n this.onClickOrigin = this.onClickOrigin.bind(this);\n },\n addEventListener: function fn() {\n this.bindEvents();\n this.element.addEventListener('click', this.onClickOrigin);\n\n return this;\n },\n removeEventListener: function fn() {\n this.element.removeEventListener('click', this.onClickOrigin);\n\n return this;\n },\n initialize: function fn() {\n const selectedOrigin = this.element.querySelector(`.${this.config.selectedClass}`);\n\n if (!selectedOrigin) return this;\n\n const checkHasSelected = selectedOrigin.classList.contains(this.config.selectedClass);\n\n if (checkHasSelected) {\n this.selectedOrigin = selectedOrigin;\n this.value = selectedOrigin.dataset.code;\n }\n\n this.addEventListener();\n\n return this;\n }\n};\n","const base = {\n component: 'OriginList',\n init: true,\n originOption: 'data-code',\n selectedClass: 'selected'\n};\n\nconst configuration = {\n logitravel: {\n ...base,\n ...{\n endpoint: '/mybookings/origin/setorigin',\n parameterName: 'airportcode',\n verb: 'post'\n }\n }\n};\n\nmodule.exports = function fn(type = 'logitravel') {\n return configuration[type] || base;\n};\n","/* ==========================================================================\n ModalOrigins > Client > Prototype\n ========================================================================== */\n\n/* Prototype */\nconst prototype = {\n /* Add event listener */\n addEventListener: function addEventListener() {\n /* Origin List */\n this.origin.addEventListener();\n\n return this;\n },\n /* Remove event listener */\n removeEventListener: function removeEventListener() {\n /* Origin List */\n this.origin.removeEventListener();\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/* ==========================================================================\n ModalOrigins > Client > Config\n ========================================================================== */\n\n/* Config */\nconst config = {\n type: {\n modal: 'modal-origins'\n },\n css: {\n modal: 'modal--origins'\n }\n};\n\n/* Exports */\nmodule.exports = () => config;\n","/* ==========================================================================\n HeaderMasterExpedient > Client\n ========================================================================== */\n\n/* Import modules */\nconst { elementExist } = require('@bluekiri/alexandria/helpers/domHelpers');\nconst prototype = require('./prototype');\nconst config = require('./config');\n\n/**\n * HeaderMasterExpedient component\n * @param {selector} String selector for the component in the client side.\n */\nmodule.exports = function HeaderMasterExpedient(\n selector = '[data-component=HeaderMasterExpedient]',\n configuration = {}\n) {\n if (elementExist(selector)) {\n /* Instance */\n const instance = Object.create(prototype);\n\n /* Element */\n instance.element = document.querySelector(selector);\n\n /* Config */\n instance.config = {\n ...config(),\n ...configuration,\n ...(function getConfig() {\n if (!instance.element.dataset.config) return '';\n\n const result = JSON.parse(instance.element.dataset.config);\n instance.element.dataset.config = '';\n\n return result;\n })()\n };\n\n /* Hooks */\n instance.hooks = {\n logout: instance.element.querySelector('[data-logout]')\n };\n\n /* Init */\n instance.init();\n\n /* Return */\n return instance;\n }\n};\n","/* ==========================================================================\n HeaderMasterExpedient > Prototype\n ========================================================================== */\n\n/* Modules */\nconst { Store } = require('@bluekiri/alexandria/helpers/state');\n\nconst { take } = require('rxjs/operators');\nconst { fromEvent, of } = require('rxjs');\nconst { actions, types } = require('./store/actions');\nconst { reducer } = require('./store/reducer');\n\nconst services = require('./services');\n\n/* Prototype */\nconst prototype = {\n /* Setup store */\n setupStore() {\n if (this.store) return this;\n\n this.store = new Store({\n headerMasterExpedient: reducer\n });\n\n return this;\n },\n /* Setup actions */\n setupActions() {\n if (this.actions) return this;\n\n this.actions = {\n destroy: () => {\n return this.store.dispatch(actions.destroy());\n },\n logout: () => {\n return this.store.dispatch(actions.logout());\n }\n };\n\n return this;\n },\n /* Setup reactions */\n setupReactions() {\n if (this.reactions) return this;\n\n this.reactions = {\n destroy: this.store.subscribe((state, action) => {\n if (action.type !== types.DESTROY) return;\n\n /* Unsubscribe */\n this.unsubscribe();\n [...Object.keys(this.reactions)].forEach(key => this.reactions[key].unsubscribe());\n\n /* Clean DOM */\n this.element.parentNode.removeChild(this.element);\n\n /* Clean references */\n [...Object.keys(this)].forEach(key => delete this[key]);\n }),\n logout: this.store.subscribe((state, action) => {\n if (action.type !== types.LOGOUT) return;\n\n services\n .logout(this.config.endpoints.logout)\n .pipe(take(1))\n .subscribe({\n next: response => {\n if (response.result) {\n this.actions.destroy();\n }\n },\n error: err => {\n return of({ error: true, message: err.message });\n }\n });\n })\n };\n\n return this;\n },\n /* Subscribe */\n subscribe() {\n if (this.subscriptions) this.unsubscribe();\n\n this.subscriptions = {\n logout: fromEvent(this.hooks.logout, 'click').subscribe(() => {\n this.actions.logout();\n })\n };\n\n return this;\n },\n /* Unsubscribe */\n unsubscribe() {\n if (!this.subscriptions) return this;\n\n [...Object.keys(this.subscriptions)].forEach(key => this.subscriptions[key].unsubscribe());\n\n return this;\n },\n /* Start */\n start() {\n if (!this.config.start) return this;\n\n return this;\n },\n /* Init */\n init() {\n if (!this.config.init) return this;\n\n /* Setup store */\n this.setupStore();\n\n /* Setup actions */\n this.setupActions();\n\n /* Setup reactions */\n this.setupReactions();\n\n /* Subscribe */\n this.subscribe();\n\n /* Start */\n this.start();\n\n return this;\n }\n};\n\n/* Exports */\nmodule.exports = prototype;\n","/* ==========================================================================\n Helpers > State\n ========================================================================== */\n\n/* Store Constructor */\nfunction Store(reducers = {}, initialState = {}) {\n this.subscribers = [];\n this.reducers = reducers;\n this.state = this.reduce(initialState, {});\n}\n\n/* Subscribe */\nStore.prototype.subscribe = function subscribe(fn) {\n this.subscribers = [...this.subscribers, fn];\n /* Return the state passed to the subscriber on the first subscription */\n fn(this.state, {});\n return {\n unsubscribe: () => {\n this.subscribers = this.subscribers.filter(subscriber => subscriber !== fn);\n }\n };\n};\n\n/* Dispatch */\nStore.prototype.dispatch = function dispatch(action) {\n this.state = this.reduce(this.state, action);\n this.subscribers.forEach(subscriber => subscriber(this.state, action));\n};\n\n/* Reduce */\nStore.prototype.reduce = function reduce(state, action) {\n const newState = Object.keys(this.reducers)\n .map(key => ({ [key]: this.reducers[key](state[key], action) }))\n .reduce((acc, val) => ({ ...acc, ...val }));\n\n return newState;\n};\n\n/* Add reducers */\nStore.prototype.addReducers = function addReducers(reducers = {}) {\n this.reducers = {\n ...this.reducers,\n ...reducers\n };\n};\n\n/* Select */\nStore.prototype.select = function select(key = '') {\n return this.state[key];\n};\n\n/* Exports */\nmodule.exports = {\n Store\n};\n","/* ==========================================================================\n HeaderMasterExpedient > Client > Store > Reducer\n ========================================================================== */\n\n/* Modules */\nconst { types } = require('./actions');\n\n/* Initial state */\nconst initialState = {};\n\n/* Reducer */\nfunction reducer(state = initialState, action) {\n switch (action.type) {\n case types.DESTROY:\n return state;\n case types.LOGOUT:\n return {\n ...state\n };\n default:\n return state;\n }\n}\n\n/* Exports */\nmodule.exports = {\n reducer\n};\n","/* ==========================================================================\n HeaderMasterExpedient > Client > Services\n ========================================================================== */\n\n/* Modules */\nconst { of } = require('rxjs');\nconst { catchError, switchMap } = require('rxjs/operators');\nconst { fromFetch } = require('rxjs/fetch');\n\n/**\n * Get destinations from a remote server\n * @param {string} endpoint\n * @param {object} params\n * @returns {JSON} data\n */\nfunction logout(endpoint = '') {\n /* Build url */\n\n return fromFetch(endpoint).pipe(\n switchMap(response => {\n if (response.ok) {\n return response.json();\n }\n return of({ error: true, message: `Error fetching data searcher ${response.statusText}` });\n }),\n catchError(err => {\n return of({ error: true, message: err.message });\n })\n );\n}\n\n/* Exports */\nmodule.exports = {\n logout\n};\n","/* ==========================================================================\n HeaderMasterExpedient > Client > Config\n ========================================================================== */\n\n/* Import modules */\n\n/* Config */\nconst config = {\n component: 'HeaderMasterExpedient',\n name: 'header-master-expedient',\n init: true,\n start: true\n};\n\nmodule.exports = () => config;\n","/* ==========================================================================\n Header > Client > Welcome\n ========================================================================== */\n\nconst $ = require('jquery');\nconst { getCookie } = require('./cookie');\n\nfunction initWelcome() {\n const modalNewUserCookie = getCookie('login_modal_new_user');\n\n if (modalNewUserCookie === '') {\n const $containerModalLogin = $('#loginModal');\n const literals = $('#loginModal').data('literals');\n const links = {\n login: {\n href: $containerModalLogin.find('.log-in__link').attr('href'),\n title: $containerModalLogin.find('.log-in__link').attr('title')\n },\n create: {\n href: $containerModalLogin.find('.footer-modal__link').attr('href'),\n title: $containerModalLogin.find('.footer-modal__link').attr('title')\n }\n };\n\n document.cookie = 'login_modal_new_user=1; expire=; path=/;';\n replaceData({ $containerModalLogin, literals, links });\n }\n}\nfunction replaceData({ $containerModalLogin, literals, links }) {\n if ($containerModalLogin) return;\n $containerModalLogin.find('.content__title').html(literals.loginModalNewUserTitle);\n $containerModalLogin.find('.content__description').html(literals.loginModalNewUserDescription);\n $containerModalLogin.find('.log-in .Button').html(literals.loginModalNewUserButtonText);\n $containerModalLogin.find('.footer-modal__text').html(`${literals.loginModalNewUserFooterText} `);\n $containerModalLogin.find('.footer-modal__link').html(literals.loginModalButtonText);\n $containerModalLogin.find('.icon__content').html('');\n $containerModalLogin\n .find('.log-in__link')\n .attr('href', links.create.href)\n .attr('title', links.create.title);\n $containerModalLogin.find('.log-in__link').html(links.create.title);\n $containerModalLogin\n .find('.footer-modal__link')\n .attr('href', links.login.href)\n .attr('title', links.login.title);\n $containerModalLogin.find('.footer-modal__link').html(links.login.title);\n}\n\nmodule.exports = {\n initWelcome\n};\n","/* ==========================================================================\n Header > Client > Tooltip\n ========================================================================== */\n\nconst $ = require('jquery');\nconst tippy = require('tippy.js');\nconst { setCookie } = require('./cookie');\n\nconst tooltips = [\n ['.popover-phone', true, '', 'header', true, 'mouseenter'],\n ['#Header-popover-cert0', false, '#Header-cert0', 'header', 'true', 'mouseenter'],\n ['#Header-popover-cert1', false, '#Header-cert1', 'header', 'true', 'mouseenter'],\n ['#Header-popover-user', false, '#Header-user-logged', 'user', 'true', 'mouseenter'],\n ['#list-language', false, '#languageDropdown', 'languages', 'false', 'click'],\n ['#list-currency', false, '#currencyDropdown', 'currencies', 'false', 'click']\n];\n\nfunction initTooltips() {\n tooltips.forEach(element => {\n const tippySelector = element[0];\n const tippyTitle = element[1];\n const tippytemplateId = element[2];\n const tippyTheme = element[3];\n const htmlElementExists = element[1] === false && $(element[2]).length;\n const useTitle = element[1];\n const tippyArrow = element[4];\n const tippyTrigger = element[5];\n if (htmlElementExists || useTitle) {\n let tippyConfig = {};\n if (tippySelector === '#Header-popover-user') {\n tippyConfig = {\n delay: 0,\n arrow: tippyArrow,\n arrowType: 'sharp',\n duration: 0,\n animation: 'scale',\n placement: 'bottom',\n theme: `light base ${tippyTheme}`,\n allowTitleHTML: tippyTitle,\n maxWidth: '300px',\n interactive: true,\n trigger: tippyTrigger,\n html: tippytemplateId,\n onShown(instance) {\n const $buttonLogout = $(instance.popper).find('.js-logout');\n if ($buttonLogout.length) {\n $buttonLogout.on('click', e => {\n const urlLogout = $(e.currentTarget).data('urlLogout');\n const sessionCode = $(e.currentTarget).data('sessionCode');\n if (urlLogout && sessionCode) {\n $.ajax({\n complete: xhr => {\n if (xhr.status === 200) {\n if (window.googleyolo) {\n window.googleyolo\n .disableAutoSignIn()\n .then(\n () => {\n // Do nothing\n },\n () => {\n // Error, write cookie to disable onetap\n setCookie('ck_disable_onetap', 'true', 1 / 24);\n }\n )\n .finally(() => {\n window.parent.location.reload(true);\n });\n } else {\n // Just disable One Tap by cookie and reload page\n setCookie('ck_disable_onetap', 'true', 1 / 24);\n window.parent.location.reload(true);\n }\n }\n },\n crossDomain: true,\n data: {\n sessionCode\n },\n dataType: 'jsonp',\n url: urlLogout\n });\n }\n });\n }\n }\n };\n } else {\n tippyConfig = {\n delay: 0,\n arrow: tippyArrow,\n arrowType: 'sharp',\n duration: 0,\n animation: 'scale',\n placement: 'bottom',\n theme: `light base ${tippyTheme}`,\n allowTitleHTML: tippyTitle,\n maxWidth: '300px',\n interactive: true,\n trigger: tippyTrigger,\n html: tippytemplateId\n };\n }\n\n tippy(`.Header ${tippySelector}`, tippyConfig);\n }\n });\n}\n\nmodule.exports = {\n initTooltips\n};\n"],"sourceRoot":""}