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C,EAAU,MAAM,IAAI,EAC5C1C,EAAM,OAAO,cAAe0C,EAAU,MAAM,SAAS,EACrD1C,EAAM,OAAO,+BAAgC0C,EAAU,MAAM,aAAa,EAC1E1C,EAAM,OAAO,WAAYQ,CAAK,EAC9BR,EAAM,OAAO,oBAAqB,OAAO,cAAc,EACvDA,EAAM,OAAO,YAAa0C,EAAU,MAAM,MAAM,EAChD1C,EAAM,OAAO,cAAe0C,EAAU,MAAM,SAAS,EAErDE,EAAI,MAAMH,CAAI,CAChB,CAAC","names":["envelopesApi","itemId","optionId","api","addressListsApi","addressListId","formData","eventId","addressApi","list","addressList","address","newAddress","state","actions","commit","response","error","mutations","addresses","index","add","formErrors","modules","rootState","dispatch","data","cartItem","uploadData","lists","addressLists","returnAddressApi","errors","returnAddress","store","createStore","flashMessages","upsell","u","getters","option","item","paths","flag","responsiveMode","change","locale","loggedIn","deal","upsellId","redirect","upsellsApi","EnvelopesView","__vitePreload","ExtrasView","routes","router","createRouter","createWebHistory","_sfc_main","Overlay","FlashMessages","mapState","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_ctx","_createBlock","_component_overlay","_createCommentVNode","_createElementVNode","_createVNode","_component_flash_messages","_component_router_view","node","storeData","translations","app","createApp","AddOns","I18n"],"ignoreList":[],"sources":["../../../app/javascript/api/envelopes.js","../../../app/javascript/api/addressLists.js","../../../app/javascript/api/addressLists/addresses.js","../../../app/javascript/store/modules/addressLists/addresses.js","../../../app/javascript/store/modules/addressLists.js","../../../app/javascript/api/returnAddress.js","../../../app/javascript/store/modules/addOns/returnAddress.js","../../../app/javascript/store/addOns.js","../../../app/javascript/routers/addOns.js","../../../app/javascript/pages/AddOns.vue","../../../app/javascript/entrypoints/addOns.js"],"sourcesContent":["import api from \"./index\";\n\nexport default {\n  async updateEnvelopeOption({ itemId, optionId }) {\n    return api.put(`/cart_items/${itemId}/update_envelope_option/${optionId}`);\n  }\n};\n","import api from \"./index\";\n\nexport default {\n  async createForCartItem(itemId) {\n    try {\n      return await api.post(`/cart_items/${itemId}/add_address_list`);\n    } catch (error) {\n      return false;\n    }\n  },\n  async removeForCartItem(itemId) {\n    try {\n      return await api.put(`/cart_items/${itemId}/remove_address_list`);\n    } catch (error) {\n      return false;\n    }\n  },\n  async setForCartItem({ itemId, addressListId }) {\n    try {\n      return await api.post(\n        `/cart_items/${itemId}/set_address_list/${addressListId}`\n      );\n    } catch (error) {\n      return false;\n    }\n  },\n  async batchUpload({ itemId, formData }) {\n    return api.post(`/cart_items/${itemId}/batch_upload`, formData);\n  },\n  async createAddressListFromEvent({ itemId, eventId }) {\n    return api.post(`/cart_items/${itemId}/create_from_planner_event`, {\n      event_id: eventId\n    });\n  }\n};\n","import api from \"../index\";\n\nexport default {\n  async index(list) {\n    try {\n      return await api.get(`/account/api/address_lists/${list.id}/addresses`);\n    } catch (error) {\n      return false;\n    }\n  },\n  async create({ addressList, address }) {\n    return api.post(`/account/api/address_lists/${addressList.id}/addresses`, {\n      address\n    });\n  },\n  async update({ addressList, address, newAddress }) {\n    return api.put(\n      `/account/api/address_lists/${addressList.id}/addresses/${address.id}`,\n      { address: newAddress }\n    );\n  },\n  async delete({ addressList, address }) {\n    return api.delete(\n      `/account/api/address_lists/${addressList.id}/addresses/${address.id}`\n    );\n  }\n};\n","/* eslint no-shadow: [\"error\", { \"allow\": [\"state\"] }] */\n\nimport addressApi from \"../../../api/addressLists/addresses\";\n\nconst state = {\n  addresses: [],\n  formErrors: []\n};\n\nconst actions = {\n  async index({ commit }, list) {\n    const response = await addressApi.index(list);\n    if (response) {\n      commit(\"setAddresses\", response.data);\n    } else {\n      // Handle error\n    }\n  },\n  async update({ commit }, { addressList, address, newAddress }) {\n    try {\n      const response = await addressApi.update({\n        addressList,\n        address,\n        newAddress\n      });\n      if (response) {\n        commit(\"setFormErrors\", []);\n        commit(\"replaceAddress\", {\n          address,\n          newAddress: response.data.address\n        });\n      }\n    } catch (error) {\n      if (error.response) {\n        commit(\"setFormErrors\", error.response.data);\n        throw new Error(\"Invalid address\");\n      }\n    }\n  },\n  async create({ commit }, { addressList, address }) {\n    try {\n      const response = await addressApi.create({ addressList, address });\n      if (response) {\n        commit(\"setFormErrors\", []);\n        commit(\"addAddress\", response.data.address);\n        commit(\"adjustAddressesCount\", 1, { root: true });\n      }\n    } catch (error) {\n      if (error.response) {\n        commit(\"setFormErrors\", error.response.data);\n        throw new Error(\"Invalid address\");\n      }\n    }\n  },\n  async delete({ commit }, { addressList, address }) {\n    commit(\"deleteAddress\", address);\n    await addressApi.delete({ addressList, address });\n    commit(\"adjustAddressesCount\", -1, { root: true });\n  }\n};\n\nconst mutations = {\n  setAddresses(state, addresses) {\n    state.addresses = addresses;\n  },\n  addAddress(state, address) {\n    state.addresses.push(address);\n  },\n  replaceAddress(state, { address, newAddress }) {\n    const index = state.addresses.findIndex(add => add.id === address.id);\n    state.addresses.splice(index, 1, newAddress);\n  },\n  deleteAddress(state, address) {\n    state.addresses = state.addresses.filter(add => add.id !== address.id);\n  },\n  setFormErrors(state, formErrors) {\n    state.formErrors = formErrors;\n  }\n};\n\nexport default {\n  namespaced: true,\n  state,\n  mutations,\n  actions\n};\n","/* eslint no-shadow: [\"error\", { \"allow\": [\"state\"] }] */\n\nimport addressListsApi from \"../../api/addressLists\";\nimport addresses from \"./addressLists/addresses\";\n\nconst modules = {\n  addresses\n};\n\nconst state = {\n  addressLists: [],\n  uploadData: null\n};\n\nconst actions = {\n  async createAddressListForCartItem({ rootState, commit }) {\n    commit(\"setLoading\", true, { root: true });\n    try {\n      const response = await addressListsApi.createForCartItem(\n        rootState.cartItem.id\n      );\n      commit(\"setLoading\", false, { root: true });\n      if (response) {\n        commit(\"setCartItem\", response.data.cart_item, { root: true });\n        commit(\"addAddressList\", response.data.cart_item.address_list);\n      }\n    } catch (error) {\n      commit(\"setLoading\", false, { root: true });\n      if (error.response) {\n        throw new Error(\"Invalid address list\");\n      }\n    }\n  },\n  async removeAddressListForCartItem({ rootState, commit }) {\n    commit(\"setLoading\", true, { root: true });\n    const response = await addressListsApi.removeForCartItem(\n      rootState.cartItem.id\n    );\n    commit(\"setLoading\", false, { root: true });\n    commit(\"setCartItem\", response.data.cart_item, { root: true });\n    commit(\"setAddressLists\", response.data.address_lists);\n  },\n  async setAddressListForCartItem({ rootState, commit }, addressListId) {\n    commit(\"setLoading\", true, { root: true });\n    const response = await addressListsApi.setForCartItem({\n      itemId: rootState.cartItem.id,\n      addressListId\n    });\n    commit(\"setLoading\", false, { root: true });\n    commit(\"setCartItem\", response.data.cart_item, { root: true });\n  },\n  async batchUpload({ commit, rootState, dispatch }, formData) {\n    commit(\"setLoading\", true, { root: true });\n    const { data } = await addressListsApi.batchUpload({\n      itemId: rootState.cartItem.id,\n      formData\n    });\n    const { cart_item: cartItem, ...uploadData } = data;\n    dispatch(\"setUploadData\", uploadData);\n    commit(\"setLoading\", false, { root: true });\n    commit(\"setCartItem\", cartItem, {\n      root: true\n    });\n    commit(\"addressLists/addAddressList\", cartItem.address_list, {\n      root: true\n    });\n  },\n  async createAddressListFromEvent({ rootState, commit, dispatch }, eventId) {\n    commit(\"setLoading\", true, { root: true });\n    const { data } = await addressListsApi.createAddressListFromEvent({\n      itemId: rootState.cartItem.id,\n      eventId\n    });\n    const { cart_item: cartItem, ...uploadData } = data;\n    commit(\"setLoading\", false, { root: true });\n    dispatch(\"setUploadData\", uploadData);\n    commit(\"setCartItem\", cartItem, { root: true });\n    commit(\"addressLists/addAddressList\", cartItem.address_list, {\n      root: true\n    });\n  },\n  setUploadData({ commit }, uploadData) {\n    commit(\"setUploadData\", uploadData);\n    setTimeout(() => {\n      commit(\"setUploadData\", null);\n    }, 5000);\n  }\n};\n\nconst mutations = {\n  setAddressLists(state, lists) {\n    state.addressLists = lists;\n  },\n  addAddressList(state, list) {\n    state.addressLists.push(list);\n  },\n  setUploadData(state, data) {\n    state.uploadData = data;\n  }\n};\n\nexport default {\n  namespaced: true,\n  modules,\n  state,\n  mutations,\n  actions\n};\n","import api from \"./index\";\n\nexport default {\n  async createReturnAddress({ itemId, address }) {\n    return api.post(`/cart_items/${itemId}/add_return_address`, {\n      address\n    });\n  },\n  async updateReturnAddress({ itemId, address }) {\n    return api.put(`/cart_items/${itemId}/update_return_address`, {\n      address\n    });\n  },\n  async deleteReturnAddress(itemId) {\n    return api.delete(`/cart_items/${itemId}/remove_return_address`);\n  }\n};\n","/* eslint no-shadow: [\"error\", { \"allow\": [\"state\"] }] */\n\nimport returnAddressApi from \"../../../api/returnAddress\";\n\nconst state = {\n  formErrors: []\n};\n\nconst actions = {\n  async createReturnAddress({ rootState, commit }, address) {\n    commit(\"setLoading\", true, { root: true });\n    try {\n      const response = await returnAddressApi.createReturnAddress({\n        itemId: rootState.cartItem.id,\n        address\n      });\n      commit(\"setLoading\", false, { root: true });\n      if (response) {\n        commit(\"setFormErrors\", []);\n        commit(\"setCartItem\", response.data.cart_item, { root: true });\n      }\n    } catch (error) {\n      commit(\"setLoading\", false, { root: true });\n      if (error.response) {\n        commit(\"setFormErrors\", error.response.data.errors);\n        throw new Error(\"Invalid address\");\n      }\n    }\n  },\n  async updateReturnAddress({ rootState, commit }, address) {\n    commit(\"setLoading\", true, { root: true });\n    try {\n      const response = await returnAddressApi.updateReturnAddress({\n        itemId: rootState.cartItem.id,\n        address\n      });\n      commit(\"setLoading\", false, { root: true });\n      if (response) {\n        commit(\"setFormErrors\", []);\n        commit(\"setCartItem\", response.data.cart_item, { root: true });\n      }\n    } catch (error) {\n      commit(\"setLoading\", false, { root: true });\n      if (error.response) {\n        commit(\"setFormErrors\", error.response.data.errors);\n        throw new Error(\"Invalid address\");\n      }\n    }\n  },\n  async deleteReturnAddress({ rootState, commit }) {\n    commit(\"setLoading\", true, { root: true });\n    const response = await returnAddressApi.deleteReturnAddress(\n      rootState.cartItem.id\n    );\n    commit(\"setLoading\", false, { root: true });\n    commit(\"setCartItem\", response.data.cart_item, { root: true });\n  }\n};\n\nconst mutations = {\n  setFormErrors(state, errors) {\n    state.formErrors = errors;\n  }\n};\n\nexport default {\n  namespaced: true,\n  state,\n  mutations,\n  actions\n};\n","import { createStore } from \"vuex\";\n\nimport upsellsApi from \"../api/upsells\";\nimport envelopesApi from \"../api/envelopes\";\n\nimport addressLists from \"./modules/addressLists\";\nimport returnAddress from \"./modules/addOns/returnAddress\";\nimport flashMessages from \"./modules/flashMessages\";\n\nexport default createStore({\n  modules: {\n    addressLists,\n    returnAddress,\n    flashMessages\n  },\n  state: {\n    cartItem: null,\n    loading: false,\n    paths: {},\n    upsells: [],\n    responsiveMode: false,\n    locale: null,\n    loggedIn: false,\n    deal: null\n  },\n  getters: {\n    upsellsAdded(state) {\n      return state.cartItem.upsells.length > 0;\n    },\n    showDeal(state) {\n      return state.deal && state.deal.showOnAddOns && state.deal.meetsThreshold;\n    },\n    includesUpsell(state) {\n      return upsell =>\n        state.cartItem.upsells.filter(u => u.id === upsell.id).length > 0;\n    },\n    includedUpsells(state, getters) {\n      return state.cartItem.potential_upsells.filter(getters.includesUpsell);\n    },\n    isActiveEnvelopeOption(state) {\n      return option =>\n        option.id === state.cartItem.current_envelope_option.option.id;\n    },\n    hasChildren(state) {\n      return state.cartItem.has_children;\n    }\n  },\n  mutations: {\n    setCurrencyCode(state, item) {\n      state.currencyCode = item;\n    },\n    setCartItem(state, item) {\n      state.cartItem = item;\n    },\n    setPaths(state, paths) {\n      state.paths = paths;\n    },\n    setLoading(state, flag) {\n      state.loading = flag;\n    },\n    setResponsiveMode(state, responsiveMode) {\n      state.responsiveMode = responsiveMode;\n    },\n    adjustAddressesCount(state, change) {\n      state.cartItem.address_list.addressCount += change;\n    },\n    setLocale(state, locale) {\n      state.locale = locale;\n    },\n    setLoggedIn(state, loggedIn) {\n      state.loggedIn = loggedIn;\n    },\n    setDeal(state, deal) {\n      state.deal = deal;\n    }\n  },\n  actions: {\n    async addUpsell({ state, commit }, { upsellId, redirect = false }) {\n      commit(\"setLoading\", true);\n      const response = await upsellsApi.addUpsell({\n        itemId: state.cartItem.id,\n        upsellId\n      });\n      if (redirect) {\n        window.location = state.paths.basketPath;\n      } else {\n        commit(\"setCartItem\", response.data.cart_item);\n        commit(\"setLoading\", false);\n      }\n    },\n    async removeUpsell({ state, commit }, upsellId) {\n      commit(\"setLoading\", true);\n      const response = await upsellsApi.removeUpsell({\n        itemId: state.cartItem.id,\n        upsellId\n      });\n      commit(\"setCartItem\", response.data.cart_item);\n      commit(\"setLoading\", false);\n    },\n    async setEnvelopeOption({ state, commit }, optionId) {\n      commit(\"setLoading\", true);\n      const response = await envelopesApi.updateEnvelopeOption({\n        itemId: state.cartItem.id,\n        optionId\n      });\n      commit(\"setCartItem\", response.data.cart_item);\n      commit(\"setLoading\", false);\n    }\n  }\n});\n","import { createRouter, createWebHistory } from \"vue-router\";\n\nconst EnvelopesView = () => import(\"../components/addOns/EnvelopesView.vue\");\nconst ExtrasView = () => import(\"../components/addOns/ExtrasView.vue\");\n\nconst routes = [\n  {\n    path: \"/cart_items/:id/add_ons/\",\n    redirect: { name: \"Envelopes\" }\n  },\n  {\n    path: \"/cart_items/:id/add_ons/envelopes\",\n    component: EnvelopesView,\n    name: \"Envelopes\"\n  },\n  {\n    path: \"/cart_items/:id/add_ons/extras\",\n    component: ExtrasView,\n    name: \"Extras\"\n  }\n];\n\nconst router = createRouter({\n  routes,\n  history: createWebHistory(`${window.countryCode}/`)\n});\n\nexport default router;\n","<template>\n  <div data-cs-capture>\n    <overlay v-if=\"loading\" />\n    <div class=\"container\">\n      <flash-messages />\n      <router-view key=\"view\" />\n    </div>\n  </div>\n</template>\n\n<script>\nimport { mapState } from \"vuex\";\n\nimport FlashMessages from \"../components/shared/FlashMessages.vue\";\nimport Overlay from \"../components/shared/Overlay.vue\";\n\nexport default {\n  name: \"AddOns\",\n  components: {\n    Overlay,\n    FlashMessages\n  },\n  computed: {\n    ...mapState({\n      loading: state => state.loading\n    })\n  }\n};\n</script>\n","import { createApp } from \"vue\";\n\nimport I18n from \"../plugins/i18n\";\nimport store from \"../store/addOns\";\nimport router from \"../routers/addOns\";\nimport AddOns from \"../pages/AddOns.vue\";\nimport responsiveMode from \"../utils/responsiveMode\";\n\nif (responsiveMode()) {\n  window.responsiveMode = true;\n} else {\n  window.responsiveMode = false;\n}\n\nif (window.Cypress) {\n  window.responsiveMode = window.Cypress.env(\"mobile\");\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", () => {\n  const node = document.getElementById(\"add-ons-app\");\n  const paths = JSON.parse(node.dataset.paths);\n  const storeData = JSON.parse(node.dataset.store);\n  const translations = JSON.parse(node.dataset.translations);\n\n  const app = createApp(AddOns);\n  app.use(router);\n  app.use(store);\n  app.use(I18n, translations);\n\n  store.commit(\"setCurrencyCode\", storeData.state.currency_code);\n  store.commit(\"setDeal\", storeData.state.deal);\n  store.commit(\"setCartItem\", storeData.state.cart_item);\n  store.commit(\"addressLists/setAddressLists\", storeData.state.address_lists);\n  store.commit(\"setPaths\", paths);\n  store.commit(\"setResponsiveMode\", window.responsiveMode);\n  store.commit(\"setLocale\", storeData.state.locale);\n  store.commit(\"setLoggedIn\", storeData.state.logged_in);\n\n  app.mount(node);\n});\n"],"file":"assets/addOns-CrtrrFFi.js"}