{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./_dev/js/front/checkout/checkout-16-5steps.js","webpack:///./_dev/js/front/checkout/checkout.js","webpack:///./_dev/js/mondialrelay_widget.js"],"names":["$","document","on","ev","MR","savedRelay","preventDefault","stopPropagation","alert","MONDIALRELAY_NO_SELECTION_ERROR","hide","data","fromAjax","initialized","MONDIALRELAY_SELECTED_RELAY_IDENTIFIER","save_button","click","show","initOrUpdate","ColLivMod","summary_container","init","widget","MR_Widget","isCarrierSelected","MONDIALRELAY_NATIVE_CARRIERS_IDS","includes","getSelectedCarrierId","id","val","replace","getCarrierDeliveryMode","id_carrier","MONDIALRELAY_CARRIER_METHODS","displayErrors","empty","addLoader","trigger","params","ajax","action","mondialrelay_selectedRelay","type","url","MONDIALRELAY_AJAX_CHECKOUT_URL","dataType","success","response","error","status","html","content","relaySummary","save_container","length","removeLoader","MONDIALRELAY_SAVE_RELAY_ERROR","loadJs","callback","script","createElement","onload","src","head","appendChild","load","loaded","MONDIALRELAY_BAD_CONFIGURATION","slideDown","widget_container","defaultParams","Target","selected_relay_input","Brand","MONDIALRELAY_ENSEIGNE","Country","MONDIALRELAY_COUNTRY_ISO","PostCode","MONDIALRELAY_POSTCODE","ShowResultsOnMap","MONDIALRELAY_DISPLAY_MAP","NbResults","Responsive","OnParcelShopSelected","relayData","setSelectedRelay","extend","MR_ParcelShopPicker","update","relayIdentifier","oldRelay","messages","box","error_container","stop","children","fadeOut","queue","errors","each","k","m","push","addClass","text","append","dequeue","fadeIn","container","clone","attr","appendTo","remove","ready","change_button"],"mappings":";;;;;;;;;AAAA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD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AAb,CAAsB,sBAAtB,EAA8CzC,MAA9C,GAAuD,CAA3D,EAA8D;AAC5D;AACD;;AAEDtD,GAAC,CAAC,+BAAD,CAAD,CACG6G,KADH,GAEGC,IAFH,CAEQ,IAFR,EAEc,IAFd,EAGG7F,IAHH,GAIG8F,QAJH,CAIYH,SAJZ;AAKD,CAdD;;AAgBAtF,MAAM,CAACiC,YAAP,GAAsB,UAACqD,SAAD,EAAe;AACnC5G,GAAC,CAAC4G,SAAD,CAAD,CAAab,QAAb,CAAsB,sBAAtB,EAA8CiB,MAA9C;AACD,CAFD;;AAIAhH,CAAC,CAACC,QAAD,CAAD,CAAYgH,KAAZ,CAAkB,YAAW;AAC3B3F,QAAM,CAACjB,UAAP,GAAoBS,sCAApB;AACAd,GAAC,CAACsB,MAAD,CAAD,CAAUe,OAAV,CAAkB,oBAAlB;AACD,CAHD;AAKArC,CAAC,CAACC,QAAD,CAAD,CAAYC,EAAZ,CAAe,OAAf,EAAwBoB,MAAM,CAAC4F,aAA/B,EAA8C,UAAS/G,EAAT,EAAa;AACzDmB,QAAM,CAACL,IAAP;AACD,CAFD;AAIAjB,CAAC,CAACC,QAAD,CAAD,CAAYC,EAAZ,CAAe,OAAf,EAAwB,eAAxB,EAAyC,UAASC,EAAT,EAAa;AAClDA,IAAE,CAACG,cAAH;AACAH,IAAE,CAACI,eAAH;AACH,CAHD","file":"js/front/checkout/checkout-16-5steps.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = \"./_dev/js/front/checkout/checkout-16-5steps.js\");\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n/**\n * Javascript for PS 1.6, when not using OPC\n */\n\n// modules ES6\nimport * as MR from './checkout';\n\n$(document).on('submit', '#form', function(ev) {\n if (MR.isCarrierSelected() && !MR.widget.savedRelay) {\n ev.preventDefault();\n ev.stopPropagation();\n alert(MONDIALRELAY_NO_SELECTION_ERROR);\n return false;\n }\n \n return true;\n});\n\n$(document).on('change', '[name^=\"delivery_option\"]', function(ev) {\n if (!MR.isCarrierSelected()) {\n MR.widget.hide();\n }\n});\n\n$(document).on('mondialrelay.contentRefreshed', '#mondialrelay_content', function(ev, data) {\n // We only care about this event if the content was reloaded by AJAX\n if (!data.fromAjax) {\n return;\n }\n \n // The content was refreshed, so the widget is no longer there\n MR.widget.initialized = false;\n // Get latest data\n MR.widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n \n // Hide payment methods as long as we don't have a relay selected\n if (!MR.isCarrierSelected()) {\n MR.widget.hide();\n } else {\n if (MR.widget.savedRelay) {\n // If we have a selected relay, then we're reselecting the carrier\n // Resubmit the relay, just in case\n $(MR.widget.save_button).click();\n }\n MR.widget.show();\n MR.widget.initOrUpdate({ColLivMod: MR.getCarrierDeliveryMode(MR.getSelectedCarrierId())});\n }\n});\n\n$(MR.widget).on('mondialrelay.ready', function() {\n if (MR.isCarrierSelected()) {\n if (!MR.widget.savedRelay) {\n MR.widget.show();\n } else {\n $(MR.widget.summary_container).show();\n MR.widget.hide();\n }\n MR.widget.init({ ColLivMod: MR.getCarrierDeliveryMode(MR.getSelectedCarrierId()) });\n }\n});","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\n// modules ES6\nimport * as MR_Widget from '../../mondialrelay_widget';\n\nconst widget = MR_Widget.widget;\n\nconst isCarrierSelected = () => {\n return MONDIALRELAY_NATIVE_CARRIERS_IDS.includes(getSelectedCarrierId());\n};\n\nconst getSelectedCarrierId = () => {\n let id = $('[name^=\"delivery_option\"]:checked').val();\n return id ? id.replace(',', '') : false;\n};\n\nconst getCarrierDeliveryMode = (id_carrier) => {\n return MONDIALRELAY_CARRIER_METHODS[id_carrier]['delivery_mode'];\n};\n\n$(document).on('click', widget.save_button, function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n\n widget.displayErrors(null);\n $(widget.summary_container).empty().show();\n widget.addLoader(widget.summary_container);\n \n $(widget).trigger('mondialrelay.saveSelectedRelay.before');\n \n let params = {\n ajax: true,\n action: 'saveSelectedRelay',\n mondialrelay_selectedRelay: MONDIALRELAY_SELECTED_RELAY_IDENTIFIER ? MONDIALRELAY_SELECTED_RELAY_IDENTIFIER : 0,\n id_carrier: getSelectedCarrierId(),\n };\n \n $.ajax(\n {\n type : 'POST',\n url: MONDIALRELAY_AJAX_CHECKOUT_URL,\n data : params,\n dataType: 'json',\n success: function(response) {\n if (!response) {\n this.error(response);\n return;\n }\n \n if (response.status == 'ok') {\n widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n $(widget.summary_container)\n .html(response.content.relaySummary);\n widget.hide();\n $(widget.save_container).hide();\n } else {\n widget.savedRelay = null;\n if (response.error.length) {\n widget.displayErrors(response.error);\n }\n widget.removeLoader($(widget.summary_container));\n $(widget).trigger('mondialrelay.saveSelectedRelay.error');\n return;\n }\n \n $(widget).trigger('mondialrelay.saveSelectedRelay.success');\n },\n error: function(response) {\n widget.savedRelay = null;\n alert(MONDIALRELAY_SAVE_RELAY_ERROR);\n $(widget).trigger('mondialrelay.saveSelectedRelay.error');\n widget.removeLoader($(widget.summary_container));\n }\n });\n \n return false;\n});\n\nexport {\n isCarrierSelected,\n getSelectedCarrierId,\n getCarrierDeliveryMode,\n widget,\n};\n","/**\n * NOTICE OF LICENSE\n *\n * @author 202 ecommerce \n * @author Mondial Relay\n * @copyright Copyright (c) Mondial Relay\n */\n\nconst widget = {\n 'url': '//widget.mondialrelay.com/parcelshop-picker/jquery.plugin.mondialrelay.parcelshoppicker.min.js',\n 'loaded': false,\n 'initialized': false,\n 'widget_container': '#mondialrelay_widget',\n 'save_container': '#mondialrelay_save-container',\n 'error_container': '#mondialrelay_errors',\n 'summary_container': '#mondialrelay_summary',\n 'save_button': '#mondialrelay_save-relay',\n 'change_button': '#mondialrelay_change-relay',\n 'selected_relay_input': '#mondialrelay_selected-relay',\n 'savedRelay': null,\n};\n\nconst loadJs = (url, callback) => {\n var script = document.createElement('script');\n script.onload = callback;\n script.src = url;\n \n document.head.appendChild(script);\n};\n\nwidget.load = (callback) => {\n loadJs(widget.url, function() {\n widget.loaded = true;\n callback();\n });\n};\n\nwidget.init = (params) => {\n \n // Access to the page may be completely blocked if the configuration isn't\n // done, so this variable may not always be defined.\n if (\n typeof MONDIALRELAY_BAD_CONFIGURATION != 'undefined'\n && MONDIALRELAY_BAD_CONFIGURATION\n ) {\n return;\n }\n \n if (widget.savedRelay) {\n $(widget.summary_container).slideDown();\n }\n \n if (!widget.loaded) {\n widget.addLoader(widget.widget_container);\n widget.load(function() {\n // No need to remove the loader; it will be replaced by the\n // widget's content\n widget.init();\n });\n return;\n }\n \n let defaultParams = {\n // Where to store the selected relay's ID\n Target: widget.selected_relay_input,\n Brand: MONDIALRELAY_ENSEIGNE,\n // iso code, 2 letters\n Country: MONDIALRELAY_COUNTRY_ISO,\n // Postcode for default search\n PostCode: MONDIALRELAY_POSTCODE,\n // Delivery mode; carrier dependent (Standard [24R], XL [24L], XXL [24X], Drive [DRI])\n ColLivMod: '24R',\n // Wether to display the relays on a map or as a list\n ShowResultsOnMap: MONDIALRELAY_DISPLAY_MAP == true,\n // Nombre de Point Relais à afficher\n NbResults: \"7\",\n Responsive: true,\n OnParcelShopSelected: function(relayData) {\n $(widget.save_container).show();\n widget.setSelectedRelay(null, relayData);\n }\n };\n \n if (params) {\n $.extend(defaultParams, params);\n }\n\n // This isn't really pretty, but it *should* add events useful to our processes\n // TODO : OPC, lock process until widget is initialized. How can we detect an\n // error though ?... Is OnNoResultReturned called either way ?...\n /*let firstSearch = true;\n let OnNoResultReturned = defaultParams.OnNoResultReturned;\n let OnSearchSuccess = defaultParams.OnSearchSuccess;\n \n defaultParams.OnNoResultReturned = function() {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnNoResultReturned) {\n OnNoResultReturned();\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: []});\n };\n \n defaultParams.OnSearchSuccess = function(data) {\n if (firstSearch) {\n firstSearch = false;\n widget.initialized = true;\n $(widget).trigger('mondialrelay.initialized');\n }\n \n if (OnSearchSuccess) {\n OnSearchSuccess(data);\n }\n \n $(widget).trigger('mondialrelay.searchComplete', {result: data});\n };*/\n\n $(widget.widget_container).MR_ParcelShopPicker(defaultParams);\n widget.initialized = true;\n};\n\nwidget.show = () => {\n $(widget.widget_container).show();\n};\n\nwidget.hide = () => {\n $(widget.widget_container).hide();\n};\n\nwidget.update = (params) => {\n $(widget.widget_container).trigger(\"MR_SetParams\", params);\n};\n\nwidget.initOrUpdate = (params) => {\n if (widget.initialized) {\n widget.update(params);\n } else {\n widget.init(params);\n }\n};\n\nwidget.setSelectedRelay = (relayIdentifier, relayData) => {\n if (typeof relayIdentifier == 'undefined' || !relayIdentifier) {\n relayIdentifier = $(widget.selected_relay_input).val();\n }\n \n if (relayIdentifier != $(widget.selected_relay_input).val()) {\n // @TODO : select relay on map... if we can\n return;\n }\n \n // This can happen sometimes; we don't want to trigger a change if the value\n // didn't actually change\n if (MONDIALRELAY_SELECTED_RELAY_IDENTIFIER != relayIdentifier) {\n let oldRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n MONDIALRELAY_SELECTED_RELAY_IDENTIFIER = relayIdentifier;\n $(widget).trigger('mondialrelay.selectedRelay', {oldRelay: oldRelay, relayData: relayData});\n }\n};\n\nwidget.displayErrors = (messages) => {\n let box = $(widget.error_container);\n if (box.length == 0) {\n return;\n }\n \n box.stop(true);\n \n if (box.children().length) {\n box.fadeOut(function() {\n $(this).empty();\n });\n }\n \n if (typeof messages == 'undefined' || !messages) {\n return;\n }\n \n // Either the queue is already going with .fadeOut(), either it will be\n // launched by .fadeIn()\n box.queue(function() {\n \n let errors = [];\n $.each(messages, function(k, m) {\n errors.push($(\"
\").addClass(\"alert alert-danger\").text(m));\n });\n \n $(this).append(errors);\n $(this).dequeue();\n });\n box.fadeIn();\n};\n\nwidget.addLoader = (container) => {\n if ($(container).length == 0) {\n return;\n }\n \n if ($(container).children('.mondialrelay_loader').length > 0) {\n return;\n }\n \n $(\"#mondialrelay_loader-template\")\n .clone()\n .attr('id', null)\n .show()\n .appendTo(container);\n};\n\nwidget.removeLoader = (container) => {\n $(container).children('.mondialrelay_loader').remove();\n};\n\n$(document).ready(function() {\n widget.savedRelay = MONDIALRELAY_SELECTED_RELAY_IDENTIFIER;\n $(widget).trigger('mondialrelay.ready');\n});\n\n$(document).on('click', widget.change_button, function(ev) {\n widget.show();\n});\n\n$(document).on('click', '.MRW-ShowList', function(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n});\n\nexport { widget };"],"sourceRoot":""}