@revolugo/elements 5.5.3-beta.9 → 5.5.3-rc.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (247) hide show
  1. package/dist/css/revolugo.0.min.css +5 -0
  2. package/dist/css/revolugo.1.min.css +1 -0
  3. package/dist/css/revolugo.11.min.css +1 -0
  4. package/dist/css/revolugo.12.min.css +1 -0
  5. package/dist/css/revolugo.13.min.css +1 -0
  6. package/dist/css/revolugo.14.min.css +1 -0
  7. package/dist/css/revolugo.15.min.css +1 -0
  8. package/dist/css/revolugo.16.min.css +1 -0
  9. package/dist/css/revolugo.17.min.css +1 -0
  10. package/dist/css/revolugo.18.min.css +1 -0
  11. package/dist/css/revolugo.19.min.css +1 -0
  12. package/dist/css/revolugo.2.min.css +1 -0
  13. package/dist/css/revolugo.20.min.css +1 -0
  14. package/dist/css/revolugo.21.min.css +1 -0
  15. package/dist/css/revolugo.22.min.css +1 -0
  16. package/dist/css/revolugo.23.min.css +1 -0
  17. package/dist/css/revolugo.24.min.css +1 -0
  18. package/dist/css/revolugo.25.min.css +1 -0
  19. package/dist/css/revolugo.26.min.css +1 -0
  20. package/dist/css/revolugo.27.min.css +1 -0
  21. package/dist/css/revolugo.28.min.css +1 -0
  22. package/dist/css/revolugo.29.min.css +1 -0
  23. package/dist/css/revolugo.30.min.css +1 -0
  24. package/dist/css/revolugo.31.min.css +1 -0
  25. package/dist/css/revolugo.32.min.css +1 -0
  26. package/dist/css/revolugo.33.min.css +1 -0
  27. package/dist/css/revolugo.34.min.css +1 -0
  28. package/dist/css/revolugo.4.min.css +1 -0
  29. package/dist/css/revolugo.5.min.css +1 -0
  30. package/dist/css/revolugo.6.min.css +1 -0
  31. package/dist/css/revolugo.7.min.css +1 -0
  32. package/dist/css/revolugo.fonts.min.css +1 -0
  33. package/dist/fonts/amenities.2aad1d12.woff +0 -0
  34. package/dist/fonts/amenities.9adae269.ttf +0 -0
  35. package/dist/fonts/amenities.a9bf50f8.svg +42 -0
  36. package/dist/fonts/amenities.bd6b3a4a.eot +0 -0
  37. package/dist/fonts/beds.2b8e38c8.svg +12 -0
  38. package/dist/img/apst.c1092975.png +0 -0
  39. package/dist/img/apst.ec7669f2.png +0 -0
  40. package/dist/img/atout-france.72107e30.png +0 -0
  41. package/dist/img/atout-france.df038f22.png +0 -0
  42. package/dist/img/revolugo.179c459d.png +0 -0
  43. package/dist/img/revolugo.e0879dcc.png +0 -0
  44. package/dist/img/stripe.405543e2.png +0 -0
  45. package/dist/img/stripe.c3e16f9f.png +0 -0
  46. package/dist/index.min.js +1 -65
  47. package/dist/revolugo.0.min.js +18 -0
  48. package/dist/revolugo.1.min.js +1 -0
  49. package/dist/revolugo.11.min.js +134 -0
  50. package/dist/revolugo.12.min.js +19 -0
  51. package/dist/revolugo.13.min.js +14 -0
  52. package/dist/revolugo.14.min.js +19 -0
  53. package/dist/revolugo.15.min.js +139 -0
  54. package/dist/revolugo.16.min.js +14 -0
  55. package/dist/revolugo.17.min.js +14 -0
  56. package/dist/revolugo.18.min.js +1 -0
  57. package/dist/revolugo.19.min.js +1 -0
  58. package/dist/revolugo.2.min.js +1 -0
  59. package/dist/revolugo.20.min.js +1 -0
  60. package/dist/revolugo.21.min.js +116 -0
  61. package/dist/revolugo.22.min.js +1 -0
  62. package/dist/revolugo.23.min.js +1 -0
  63. package/dist/revolugo.24.min.js +1 -0
  64. package/dist/revolugo.25.min.js +1 -0
  65. package/dist/revolugo.26.min.js +1 -0
  66. package/dist/revolugo.27.min.js +1 -0
  67. package/dist/revolugo.28.min.js +116 -0
  68. package/dist/revolugo.29.min.js +1 -0
  69. package/dist/revolugo.30.min.js +1 -0
  70. package/dist/revolugo.31.min.js +1 -0
  71. package/dist/revolugo.32.min.js +1 -0
  72. package/dist/revolugo.33.min.js +1 -0
  73. package/dist/revolugo.34.min.js +1 -0
  74. package/dist/revolugo.35.min.js +1 -0
  75. package/dist/revolugo.36.min.js +1 -0
  76. package/dist/revolugo.4.min.js +1 -0
  77. package/dist/revolugo.5.min.js +1 -0
  78. package/dist/revolugo.6.min.js +1 -0
  79. package/dist/revolugo.7.min.js +1 -0
  80. package/dist/revolugo.en-US.min.js +1 -0
  81. package/dist/revolugo.fonts.min.js +1 -0
  82. package/dist/revolugo.fr-FR.min.js +1 -0
  83. package/dist/revolugo.min.js +7 -257
  84. package/package.json +32 -25
  85. package/dist/css/fonts.css +0 -1
  86. package/dist/css/revolugo.bdaterangepicker.DEh20utH.css +0 -1
  87. package/dist/css/revolugo.bhotelroomsdetails.4XsxkvH7.css +0 -1
  88. package/dist/css/revolugo.bhotelsearchbar.dwYB1gUC.css +0 -1
  89. package/dist/css/revolugo.bookingdetailssidebar.tDtXpaIj.css +0 -1
  90. package/dist/css/revolugo.bphoneinput.Kq_-XiGI.css +0 -1
  91. package/dist/css/revolugo.bstarrating.nzH7iii4.css +0 -1
  92. package/dist/css/revolugo.btag.Bdbqb_8a.css +0 -1
  93. package/dist/css/revolugo.common.BSIsYREh.css +0 -1
  94. package/dist/css/revolugo.creditcardform.BGPUxkRC.css +0 -1
  95. package/dist/css/revolugo.creditcardpayment.0MNnDloZ.css +0 -1
  96. package/dist/css/revolugo.currencypicker.BRYsKdMu.css +0 -1
  97. package/dist/css/revolugo.fullbookingflow.BHV7_MhK.css +0 -1
  98. package/dist/css/revolugo.hotel-offer.CEd50mBT.css +0 -1
  99. package/dist/css/revolugo.hoteldescriptionview.9ofE1uWG.css +0 -1
  100. package/dist/css/revolugo.hoteloffersmap.0LnWfOu_.css +0 -1
  101. package/dist/css/revolugo.hoteloffersview.MWOmwEwv.css +0 -1
  102. package/dist/css/revolugo.hotelroomofferlist.xJfKaofV.css +0 -1
  103. package/dist/css/revolugo.hotelroomoffersbookingflow.PPEIqHuM.css +0 -1
  104. package/dist/css/revolugo.hotelroomoffersview.B8Y-2QYc.css +0 -1
  105. package/dist/css/revolugo.index.BMkl7a3p.css +0 -1
  106. package/dist/css/revolugo.index.CFW4Oklv.css +0 -1
  107. package/dist/css/revolugo.index.vq4xksqn.css +0 -1
  108. package/dist/css/revolugo.langpicker.B3TsOwUq.css +0 -1
  109. package/dist/css/revolugo.parsed-height.Xzhpy3D3.css +0 -1
  110. package/dist/css/revolugo.parsed-props.C3kOvm7T.css +0 -1
  111. package/dist/css/revolugo.prebookform.DBm2B4rS.css +0 -1
  112. package/dist/css/revolugo.revolugo-config.Dg8v1l3c.css +0 -5
  113. package/dist/css/revolugo.storybooktoolbar.CVnww0dZ.css +0 -1
  114. package/dist/css/revolugo.termsandconditions.DV2YnGzG.css +0 -1
  115. package/dist/css/revolugo.valert.BzcMswjJ.css +0 -1
  116. package/dist/css/revolugo.vautocomplete.OMX_yAge.css +0 -1
  117. package/dist/css/revolugo.vbadge.CiK_DSkI.css +0 -1
  118. package/dist/css/revolugo.vbtn.By46MJOU.css +0 -1
  119. package/dist/css/revolugo.vcard.DmB53ZNL.css +0 -1
  120. package/dist/css/revolugo.vchip.BdAdP6lC.css +0 -1
  121. package/dist/css/revolugo.vdialog.C02Cvwul.css +0 -1
  122. package/dist/css/revolugo.vexpansionpanelheader.B2eKo8Lo.css +0 -1
  123. package/dist/css/revolugo.vinput.SfhpXNi0.css +0 -1
  124. package/dist/css/revolugo.vitemgroup.EbHsz8Rr.css +0 -1
  125. package/dist/css/revolugo.vlistitem.BzwNE1YK.css +0 -1
  126. package/dist/css/revolugo.vmenu.BKE0IO4q.css +0 -1
  127. package/dist/css/revolugo.vselect.DljSkk6y.css +0 -1
  128. package/dist/css/revolugo.vsheet.Dtdo2Rps.css +0 -1
  129. package/dist/css/revolugo.vskeletonloader.BpGoaAbZ.css +0 -1
  130. package/dist/css/revolugo.vslidegroup.D5TIbmaw.css +0 -1
  131. package/dist/css/revolugo.vsnackbar.DTAXPYkr.css +0 -1
  132. package/dist/css/revolugo.vtextfield.BliJY6uv.css +0 -1
  133. package/dist/css/revolugo.vtoolbar.DQsezjcM.css +0 -1
  134. package/dist/css/revolugo.vtooltip.B_oOB9pj.css +0 -1
  135. package/dist/css/revolugo.vuetify.BpIoHlAi.css +0 -1
  136. package/dist/css/revolugo.webcomponentwrapper.BRZRuwZ0.css +0 -1
  137. package/dist/index.es.min.js +0 -14187
  138. package/dist/index.es.min.js.map +0 -1
  139. package/dist/index.min.js.map +0 -1
  140. package/dist/revolugo.banktransferdetails.CbUr_kHV.min.js +0 -105
  141. package/dist/revolugo.bbreakfastoptionbadge.DND6bz7J.min.js +0 -62
  142. package/dist/revolugo.bdaterangepicker.DwXWu7y_.min.js +0 -1351
  143. package/dist/revolugo.bformattedamount.D4xCyTcv.min.js +0 -82
  144. package/dist/revolugo.bhotelroomsdetails.8yoNt-KM.min.js +0 -213
  145. package/dist/revolugo.bhotelsearchbar.Dm84Zzn5.min.js +0 -446
  146. package/dist/revolugo.booking-api-client.Du5goV4n.min.js +0 -7672
  147. package/dist/revolugo.bookingdetailssidebar.AR2t6BHt.min.js +0 -28
  148. package/dist/revolugo.bookingdetailssidebar.DY-YF6-6.min.js +0 -242
  149. package/dist/revolugo.bookingmanager.KlY3kOLa.min.js +0 -404
  150. package/dist/revolugo.bphoneinput.Qc_UlGIL.min.js +0 -1935
  151. package/dist/revolugo.bpricesummaryskeleton.BAzD7raP.min.js +0 -47
  152. package/dist/revolugo.breakpoint-service.CwWRBzMQ.min.js +0 -65
  153. package/dist/revolugo.bstarrating.B-PUaeDZ.min.js +0 -173
  154. package/dist/revolugo.btag.DD6eI8G4.min.js +0 -68
  155. package/dist/revolugo.cancellationpoliciesbadge.BTwUNf7h.min.js +0 -76
  156. package/dist/revolugo.cancellationpoliciesbadge.DA_X-aEr.min.js +0 -28
  157. package/dist/revolugo.cancellationpolicieslist.BweNL3Zh.min.js +0 -316
  158. package/dist/revolugo.cancellationpolicieslist.XF-OE6mm.min.js +0 -28
  159. package/dist/revolugo.common.D4pnatuu.min.js +0 -34
  160. package/dist/revolugo.creditcardform.B0ZACL31.min.js +0 -28
  161. package/dist/revolugo.creditcardform.Bmpk72uW.min.js +0 -2047
  162. package/dist/revolugo.creditcardpayment.DDAlWRp0.min.js +0 -28
  163. package/dist/revolugo.creditcardpayment.Dnr2WHEp.min.js +0 -288
  164. package/dist/revolugo.currencypicker.BxCxn4FE.min.js +0 -122
  165. package/dist/revolugo.currencypickerbtn.D8fIyw_x.min.js +0 -121
  166. package/dist/revolugo.currencypickerbtn.DoEdhphF.min.js +0 -28
  167. package/dist/revolugo.dialog-attach.05NirMLv.min.js +0 -27
  168. package/dist/revolugo.en-us.BP-UxrRq.min.js +0 -1171
  169. package/dist/revolugo.event-bus.CYLYgD3Y.min.js +0 -37
  170. package/dist/revolugo.fr-fr.CF_knN5b.min.js +0 -1177
  171. package/dist/revolugo.fullbookingflow.BROGdW-q.min.js +0 -239
  172. package/dist/revolugo.hotel-offer.JfkzuZyf.min.js +0 -608
  173. package/dist/revolugo.hoteldescriptionview.C9XjZcdv.min.js +0 -2174
  174. package/dist/revolugo.hoteldescriptionview.wVex0D_a.min.js +0 -28
  175. package/dist/revolugo.hotelofferitemlayout.BrulX_X4.min.js +0 -64
  176. package/dist/revolugo.hotelofferlist.CcITpxz4.min.js +0 -28
  177. package/dist/revolugo.hotelofferlist.DJ8B6BpP.min.js +0 -3450
  178. package/dist/revolugo.hotelofferrequestcreator.CiNpCqiH.min.js +0 -225
  179. package/dist/revolugo.hoteloffersearchmenu.CnVV4htq.min.js +0 -54
  180. package/dist/revolugo.hoteloffersmap.C1N5EZ0d.min.js +0 -28
  181. package/dist/revolugo.hoteloffersmap.gHrmWy8H.min.js +0 -8737
  182. package/dist/revolugo.hoteloffersview.BCvASsRk.min.js +0 -157
  183. package/dist/revolugo.hoteloffersview.DfbOUEie.min.js +0 -28
  184. package/dist/revolugo.hotelroomofferlist.BS32D6Sj.min.js +0 -28
  185. package/dist/revolugo.hotelroomofferlist.BltT6U-0.min.js +0 -1336
  186. package/dist/revolugo.hotelroomofferrequestcreator.CbISsNdn.min.js +0 -225
  187. package/dist/revolugo.hotelroomoffersbookingflow.D5iNQyH9.min.js +0 -679
  188. package/dist/revolugo.hotelroomoffersearchmenu.Bsg_FnJp.min.js +0 -29
  189. package/dist/revolugo.hotelroomoffersearchmenu.DqVQ1oKf.min.js +0 -38
  190. package/dist/revolugo.hotelroomoffersview.4NC1efEJ.min.js +0 -124
  191. package/dist/revolugo.hotelroomoffersview.DfmNWUJQ.min.js +0 -28
  192. package/dist/revolugo.i18n.DF3U6VhD.min.js +0 -11263
  193. package/dist/revolugo.index.A8BtC3Nq.min.js +0 -322
  194. package/dist/revolugo.index.BEcLuOn-.min.js +0 -281
  195. package/dist/revolugo.index.BUUmIL9V.min.js +0 -68
  196. package/dist/revolugo.index.BwvidmNu.min.js +0 -128
  197. package/dist/revolugo.index.CQC_pZJn.min.js +0 -15
  198. package/dist/revolugo.index.CcRooNT6.min.js +0 -270
  199. package/dist/revolugo.index.Cn5YTzy6.min.js +0 -43
  200. package/dist/revolugo.index.Cn8GgIte.min.js +0 -142
  201. package/dist/revolugo.index.DTZNxZHf.min.js +0 -9
  202. package/dist/revolugo.index.DfBSjbYu.min.js +0 -42
  203. package/dist/revolugo.index.GdvjICDR.min.js +0 -13
  204. package/dist/revolugo.index.owaXEEBO.min.js +0 -9
  205. package/dist/revolugo.index.sTY3URQu.min.js +0 -390
  206. package/dist/revolugo.index.tY8MFB9m.min.js +0 -161
  207. package/dist/revolugo.langpicker.yr7wtnZM.min.js +0 -103
  208. package/dist/revolugo.langpickerbtn.4XN3tTRs.min.js +0 -28
  209. package/dist/revolugo.langpickerbtn.BHhYWwCD.min.js +0 -111
  210. package/dist/revolugo.localizedformat.Wox_NThB.min.js +0 -47
  211. package/dist/revolugo.parsed-height.DRzHRmIo.min.js +0 -2492
  212. package/dist/revolugo.parsed-props.B_x1Ob04.min.js +0 -95
  213. package/dist/revolugo.prebookform.BeSJk0ad.min.js +0 -28
  214. package/dist/revolugo.prebookform.DZMMJst9.min.js +0 -484
  215. package/dist/revolugo.revolugo-config.Bs_HF2Eu.min.js +0 -1707
  216. package/dist/revolugo.roominglisteditor.BpdFoplV.min.js +0 -201
  217. package/dist/revolugo.roominglisteditor.DxmH3gRW.min.js +0 -28
  218. package/dist/revolugo.sentry.Bc7mnscp.min.js +0 -12146
  219. package/dist/revolugo.store.DPvvq0Rz.min.js +0 -1718
  220. package/dist/revolugo.storybooktoolbar.C_y4Nf-_.min.js +0 -300
  221. package/dist/revolugo.termsandconditions.BIHsJaCg.min.js +0 -27
  222. package/dist/revolugo.termsandconditions.D2C1eZuC.min.js +0 -162
  223. package/dist/revolugo.typed-mixins.B_7wrdes.min.js +0 -8
  224. package/dist/revolugo.valert.CMzvSBzo.min.js +0 -194
  225. package/dist/revolugo.vautocomplete.C-5OLCEj.min.js +0 -255
  226. package/dist/revolugo.vbadge.xQq9jf9W.min.js +0 -172
  227. package/dist/revolugo.vbtn.CP4AezmI.min.js +0 -286
  228. package/dist/revolugo.vcard.Cy5A2_pV.min.js +0 -80
  229. package/dist/revolugo.vchip.BcIMSmkF.min.js +0 -157
  230. package/dist/revolugo.vdialog.BAexO59W.min.js +0 -341
  231. package/dist/revolugo.vexpansionpanelheader.D9ENep1_.min.js +0 -263
  232. package/dist/revolugo.vform.oeljK9Tu.min.js +0 -98
  233. package/dist/revolugo.vinput.CDpcVlCU.min.js +0 -509
  234. package/dist/revolugo.vitemgroup.DyY_3pfW.min.js +0 -168
  235. package/dist/revolugo.vlistitem.CrJxrMpP.min.js +0 -204
  236. package/dist/revolugo.vmenu.CtMz9t6s.min.js +0 -349
  237. package/dist/revolugo.vselect.UcLk_jBF.min.js +0 -859
  238. package/dist/revolugo.vsheet.C1tyLBBd.min.js +0 -120
  239. package/dist/revolugo.vskeletonloader.CMMMMGzf.min.js +0 -172
  240. package/dist/revolugo.vslidegroup.BXF0FLd1.min.js +0 -650
  241. package/dist/revolugo.vsnackbar.xIK_rBpB.min.js +0 -178
  242. package/dist/revolugo.vtextfield.D2qOTbGQ.min.js +0 -438
  243. package/dist/revolugo.vtoolbar.D3HhuFrj.min.js +0 -364
  244. package/dist/revolugo.vtooltip.B7xN8tzo.min.js +0 -168
  245. package/dist/revolugo.vuetify.yojzDMFk.min.js +0 -865
  246. package/dist/revolugo.watch-list.cR2ZEwBA.min.js +0 -44
  247. package/dist/revolugo.webcomponentwrapper.-wnE6sKX.min.js +0 -777
@@ -1,1718 +0,0 @@
1
- import { E as m, D as Ae } from "./revolugo.revolugo-config.Bs_HF2Eu.min.js";
2
- import { V as I, d as L, c as de, o as Oe, r as Le, u as ke, e as xe, a as ne, f as oe, n as Ue, s as b, h as Ne } from "./revolugo.i18n.DF3U6VhD.min.js";
3
- import { y as Ge, Y as Ee } from "./revolugo.booking-api-client.Du5goV4n.min.js";
4
- import { a as k } from "./revolugo.event-bus.CYLYgD3Y.min.js";
5
- /*!
6
- * vuex v3.6.2
7
- * (c) 2021 Evan You
8
- * @license MIT
9
- */
10
- function qe(e) {
11
- var t = Number(e.version.split(".")[0]);
12
- if (t >= 2)
13
- e.mixin({ beforeCreate: n });
14
- else {
15
- var r = e.prototype._init;
16
- e.prototype._init = function(o) {
17
- o === void 0 && (o = {}), o.init = o.init ? [n].concat(o.init) : n, r.call(this, o);
18
- };
19
- }
20
- function n() {
21
- var o = this.$options;
22
- o.store ? this.$store = typeof o.store == "function" ? o.store() : o.store : o.parent && o.parent.$store && (this.$store = o.parent.$store);
23
- }
24
- }
25
- var Be = typeof window < "u" ? window : typeof global < "u" ? global : {}, C = Be.__VUE_DEVTOOLS_GLOBAL_HOOK__;
26
- function Ve(e) {
27
- C && (e._devtoolHook = C, C.emit("vuex:init", e), C.on("vuex:travel-to-state", function(t) {
28
- e.replaceState(t);
29
- }), e.subscribe(function(t, r) {
30
- C.emit("vuex:mutation", t, r);
31
- }, { prepend: !0 }), e.subscribeAction(function(t, r) {
32
- C.emit("vuex:action", t, r);
33
- }, { prepend: !0 }));
34
- }
35
- function je(e, t) {
36
- return e.filter(t)[0];
37
- }
38
- function z(e, t) {
39
- if (t === void 0 && (t = []), e === null || typeof e != "object")
40
- return e;
41
- var r = je(t, function(o) {
42
- return o.original === e;
43
- });
44
- if (r)
45
- return r.copy;
46
- var n = Array.isArray(e) ? [] : {};
47
- return t.push({
48
- original: e,
49
- copy: n
50
- }), Object.keys(e).forEach(function(o) {
51
- n[o] = z(e[o], t);
52
- }), n;
53
- }
54
- function H(e, t) {
55
- Object.keys(e).forEach(function(r) {
56
- return t(e[r], r);
57
- });
58
- }
59
- function _e(e) {
60
- return e !== null && typeof e == "object";
61
- }
62
- function Ye(e) {
63
- return e && typeof e.then == "function";
64
- }
65
- function Qe(e, t) {
66
- return function() {
67
- return e(t);
68
- };
69
- }
70
- var g = function(t, r) {
71
- this.runtime = r, this._children = /* @__PURE__ */ Object.create(null), this._rawModule = t;
72
- var n = t.state;
73
- this.state = (typeof n == "function" ? n() : n) || {};
74
- }, ge = { namespaced: { configurable: !0 } };
75
- ge.namespaced.get = function() {
76
- return !!this._rawModule.namespaced;
77
- };
78
- g.prototype.addChild = function(t, r) {
79
- this._children[t] = r;
80
- };
81
- g.prototype.removeChild = function(t) {
82
- delete this._children[t];
83
- };
84
- g.prototype.getChild = function(t) {
85
- return this._children[t];
86
- };
87
- g.prototype.hasChild = function(t) {
88
- return t in this._children;
89
- };
90
- g.prototype.update = function(t) {
91
- this._rawModule.namespaced = t.namespaced, t.actions && (this._rawModule.actions = t.actions), t.mutations && (this._rawModule.mutations = t.mutations), t.getters && (this._rawModule.getters = t.getters);
92
- };
93
- g.prototype.forEachChild = function(t) {
94
- H(this._children, t);
95
- };
96
- g.prototype.forEachGetter = function(t) {
97
- this._rawModule.getters && H(this._rawModule.getters, t);
98
- };
99
- g.prototype.forEachAction = function(t) {
100
- this._rawModule.actions && H(this._rawModule.actions, t);
101
- };
102
- g.prototype.forEachMutation = function(t) {
103
- this._rawModule.mutations && H(this._rawModule.mutations, t);
104
- };
105
- Object.defineProperties(g.prototype, ge);
106
- var w = function(t) {
107
- this.register([], t, !1);
108
- };
109
- w.prototype.get = function(t) {
110
- return t.reduce(function(r, n) {
111
- return r.getChild(n);
112
- }, this.root);
113
- };
114
- w.prototype.getNamespace = function(t) {
115
- var r = this.root;
116
- return t.reduce(function(n, o) {
117
- return r = r.getChild(o), n + (r.namespaced ? o + "/" : "");
118
- }, "");
119
- };
120
- w.prototype.update = function(t) {
121
- ve([], this.root, t);
122
- };
123
- w.prototype.register = function(t, r, n) {
124
- var o = this;
125
- n === void 0 && (n = !0);
126
- var i = new g(r, n);
127
- if (t.length === 0)
128
- this.root = i;
129
- else {
130
- var s = this.get(t.slice(0, -1));
131
- s.addChild(t[t.length - 1], i);
132
- }
133
- r.modules && H(r.modules, function(a, u) {
134
- o.register(t.concat(u), a, n);
135
- });
136
- };
137
- w.prototype.unregister = function(t) {
138
- var r = this.get(t.slice(0, -1)), n = t[t.length - 1], o = r.getChild(n);
139
- o && o.runtime && r.removeChild(n);
140
- };
141
- w.prototype.isRegistered = function(t) {
142
- var r = this.get(t.slice(0, -1)), n = t[t.length - 1];
143
- return r ? r.hasChild(n) : !1;
144
- };
145
- function ve(e, t, r) {
146
- if (t.update(r), r.modules)
147
- for (var n in r.modules) {
148
- if (!t.getChild(n))
149
- return;
150
- ve(
151
- e.concat(n),
152
- t.getChild(n),
153
- r.modules[n]
154
- );
155
- }
156
- }
157
- var E, _ = function(t) {
158
- var r = this;
159
- t === void 0 && (t = {}), !E && typeof window < "u" && window.Vue && pe(window.Vue);
160
- var n = t.plugins;
161
- n === void 0 && (n = []);
162
- var o = t.strict;
163
- o === void 0 && (o = !1), this._committing = !1, this._actions = /* @__PURE__ */ Object.create(null), this._actionSubscribers = [], this._mutations = /* @__PURE__ */ Object.create(null), this._wrappedGetters = /* @__PURE__ */ Object.create(null), this._modules = new w(t), this._modulesNamespaceMap = /* @__PURE__ */ Object.create(null), this._subscribers = [], this._watcherVM = new E(), this._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
164
- var i = this, s = this, a = s.dispatch, u = s.commit;
165
- this.dispatch = function(l, d) {
166
- return a.call(i, l, d);
167
- }, this.commit = function(l, d, O) {
168
- return u.call(i, l, d, O);
169
- }, this.strict = o;
170
- var f = this._modules.root.state;
171
- N(this, f, [], this._modules.root), X(this, f), n.forEach(function(h) {
172
- return h(r);
173
- });
174
- var c = t.devtools !== void 0 ? t.devtools : E.config.devtools;
175
- c && Ve(this);
176
- }, J = { state: { configurable: !0 } };
177
- J.state.get = function() {
178
- return this._vm._data.$$state;
179
- };
180
- J.state.set = function(e) {
181
- };
182
- _.prototype.commit = function(t, r, n) {
183
- var o = this, i = x(t, r, n), s = i.type, a = i.payload, u = { type: s, payload: a }, f = this._mutations[s];
184
- f && (this._withCommit(function() {
185
- f.forEach(function(h) {
186
- h(a);
187
- });
188
- }), this._subscribers.slice().forEach(function(c) {
189
- return c(u, o.state);
190
- }));
191
- };
192
- _.prototype.dispatch = function(t, r) {
193
- var n = this, o = x(t, r), i = o.type, s = o.payload, a = { type: i, payload: s }, u = this._actions[i];
194
- if (u) {
195
- try {
196
- this._actionSubscribers.slice().filter(function(c) {
197
- return c.before;
198
- }).forEach(function(c) {
199
- return c.before(a, n.state);
200
- });
201
- } catch {
202
- }
203
- var f = u.length > 1 ? Promise.all(u.map(function(c) {
204
- return c(s);
205
- })) : u[0](s);
206
- return new Promise(function(c, h) {
207
- f.then(function(l) {
208
- try {
209
- n._actionSubscribers.filter(function(d) {
210
- return d.after;
211
- }).forEach(function(d) {
212
- return d.after(a, n.state);
213
- });
214
- } catch {
215
- }
216
- c(l);
217
- }, function(l) {
218
- try {
219
- n._actionSubscribers.filter(function(d) {
220
- return d.error;
221
- }).forEach(function(d) {
222
- return d.error(a, n.state, l);
223
- });
224
- } catch {
225
- }
226
- h(l);
227
- });
228
- });
229
- }
230
- };
231
- _.prototype.subscribe = function(t, r) {
232
- return me(t, this._subscribers, r);
233
- };
234
- _.prototype.subscribeAction = function(t, r) {
235
- var n = typeof t == "function" ? { before: t } : t;
236
- return me(n, this._actionSubscribers, r);
237
- };
238
- _.prototype.watch = function(t, r, n) {
239
- var o = this;
240
- return this._watcherVM.$watch(function() {
241
- return t(o.state, o.getters);
242
- }, r, n);
243
- };
244
- _.prototype.replaceState = function(t) {
245
- var r = this;
246
- this._withCommit(function() {
247
- r._vm._data.$$state = t;
248
- });
249
- };
250
- _.prototype.registerModule = function(t, r, n) {
251
- n === void 0 && (n = {}), typeof t == "string" && (t = [t]), this._modules.register(t, r), N(this, this.state, t, this._modules.get(t), n.preserveState), X(this, this.state);
252
- };
253
- _.prototype.unregisterModule = function(t) {
254
- var r = this;
255
- typeof t == "string" && (t = [t]), this._modules.unregister(t), this._withCommit(function() {
256
- var n = Z(r.state, t.slice(0, -1));
257
- E.delete(n, t[t.length - 1]);
258
- }), Re(this);
259
- };
260
- _.prototype.hasModule = function(t) {
261
- return typeof t == "string" && (t = [t]), this._modules.isRegistered(t);
262
- };
263
- _.prototype.hotUpdate = function(t) {
264
- this._modules.update(t), Re(this, !0);
265
- };
266
- _.prototype._withCommit = function(t) {
267
- var r = this._committing;
268
- this._committing = !0, t(), this._committing = r;
269
- };
270
- Object.defineProperties(_.prototype, J);
271
- function me(e, t, r) {
272
- return t.indexOf(e) < 0 && (r && r.prepend ? t.unshift(e) : t.push(e)), function() {
273
- var n = t.indexOf(e);
274
- n > -1 && t.splice(n, 1);
275
- };
276
- }
277
- function Re(e, t) {
278
- e._actions = /* @__PURE__ */ Object.create(null), e._mutations = /* @__PURE__ */ Object.create(null), e._wrappedGetters = /* @__PURE__ */ Object.create(null), e._modulesNamespaceMap = /* @__PURE__ */ Object.create(null);
279
- var r = e.state;
280
- N(e, r, [], e._modules.root, !0), X(e, r, t);
281
- }
282
- function X(e, t, r) {
283
- var n = e._vm;
284
- e.getters = {}, e._makeLocalGettersCache = /* @__PURE__ */ Object.create(null);
285
- var o = e._wrappedGetters, i = {};
286
- H(o, function(a, u) {
287
- i[u] = Qe(a, e), Object.defineProperty(e.getters, u, {
288
- get: function() {
289
- return e._vm[u];
290
- },
291
- enumerable: !0
292
- // for local getters
293
- });
294
- });
295
- var s = E.config.silent;
296
- E.config.silent = !0, e._vm = new E({
297
- data: {
298
- $$state: t
299
- },
300
- computed: i
301
- }), E.config.silent = s, e.strict && Ze(e), n && (r && e._withCommit(function() {
302
- n._data.$$state = null;
303
- }), E.nextTick(function() {
304
- return n.$destroy();
305
- }));
306
- }
307
- function N(e, t, r, n, o) {
308
- var i = !r.length, s = e._modules.getNamespace(r);
309
- if (n.namespaced && (e._modulesNamespaceMap[s], e._modulesNamespaceMap[s] = n), !i && !o) {
310
- var a = Z(t, r.slice(0, -1)), u = r[r.length - 1];
311
- e._withCommit(function() {
312
- E.set(a, u, n.state);
313
- });
314
- }
315
- var f = n.context = ze(e, s, r);
316
- n.forEachMutation(function(c, h) {
317
- var l = s + h;
318
- We(e, l, c, f);
319
- }), n.forEachAction(function(c, h) {
320
- var l = c.root ? h : s + h, d = c.handler || c;
321
- Je(e, l, d, f);
322
- }), n.forEachGetter(function(c, h) {
323
- var l = s + h;
324
- Xe(e, l, c, f);
325
- }), n.forEachChild(function(c, h) {
326
- N(e, t, r.concat(h), c, o);
327
- });
328
- }
329
- function ze(e, t, r) {
330
- var n = t === "", o = {
331
- dispatch: n ? e.dispatch : function(i, s, a) {
332
- var u = x(i, s, a), f = u.payload, c = u.options, h = u.type;
333
- return (!c || !c.root) && (h = t + h), e.dispatch(h, f);
334
- },
335
- commit: n ? e.commit : function(i, s, a) {
336
- var u = x(i, s, a), f = u.payload, c = u.options, h = u.type;
337
- (!c || !c.root) && (h = t + h), e.commit(h, f, c);
338
- }
339
- };
340
- return Object.defineProperties(o, {
341
- getters: {
342
- get: n ? function() {
343
- return e.getters;
344
- } : function() {
345
- return Ke(e, t);
346
- }
347
- },
348
- state: {
349
- get: function() {
350
- return Z(e.state, r);
351
- }
352
- }
353
- }), o;
354
- }
355
- function Ke(e, t) {
356
- if (!e._makeLocalGettersCache[t]) {
357
- var r = {}, n = t.length;
358
- Object.keys(e.getters).forEach(function(o) {
359
- if (o.slice(0, n) === t) {
360
- var i = o.slice(n);
361
- Object.defineProperty(r, i, {
362
- get: function() {
363
- return e.getters[o];
364
- },
365
- enumerable: !0
366
- });
367
- }
368
- }), e._makeLocalGettersCache[t] = r;
369
- }
370
- return e._makeLocalGettersCache[t];
371
- }
372
- function We(e, t, r, n) {
373
- var o = e._mutations[t] || (e._mutations[t] = []);
374
- o.push(function(s) {
375
- r.call(e, n.state, s);
376
- });
377
- }
378
- function Je(e, t, r, n) {
379
- var o = e._actions[t] || (e._actions[t] = []);
380
- o.push(function(s) {
381
- var a = r.call(e, {
382
- dispatch: n.dispatch,
383
- commit: n.commit,
384
- getters: n.getters,
385
- state: n.state,
386
- rootGetters: e.getters,
387
- rootState: e.state
388
- }, s);
389
- return Ye(a) || (a = Promise.resolve(a)), e._devtoolHook ? a.catch(function(u) {
390
- throw e._devtoolHook.emit("vuex:error", u), u;
391
- }) : a;
392
- });
393
- }
394
- function Xe(e, t, r, n) {
395
- e._wrappedGetters[t] || (e._wrappedGetters[t] = function(i) {
396
- return r(
397
- n.state,
398
- // local state
399
- n.getters,
400
- // local getters
401
- i.state,
402
- // root state
403
- i.getters
404
- // root getters
405
- );
406
- });
407
- }
408
- function Ze(e) {
409
- e._vm.$watch(function() {
410
- return this._data.$$state;
411
- }, function() {
412
- }, { deep: !0, sync: !0 });
413
- }
414
- function Z(e, t) {
415
- return t.reduce(function(r, n) {
416
- return r[n];
417
- }, e);
418
- }
419
- function x(e, t, r) {
420
- return _e(e) && e.type && (r = t, t = e, e = e.type), { type: e, payload: t, options: r };
421
- }
422
- function pe(e) {
423
- E && e === E || (E = e, qe(E));
424
- }
425
- var Te = q(function(e, t) {
426
- var r = {};
427
- return G(t).forEach(function(n) {
428
- var o = n.key, i = n.val;
429
- r[o] = function() {
430
- var a = this.$store.state, u = this.$store.getters;
431
- if (e) {
432
- var f = B(this.$store, "mapState", e);
433
- if (!f)
434
- return;
435
- a = f.context.state, u = f.context.getters;
436
- }
437
- return typeof i == "function" ? i.call(this, a, u) : a[i];
438
- }, r[o].vuex = !0;
439
- }), r;
440
- }), Se = q(function(e, t) {
441
- var r = {};
442
- return G(t).forEach(function(n) {
443
- var o = n.key, i = n.val;
444
- r[o] = function() {
445
- for (var a = [], u = arguments.length; u--; )
446
- a[u] = arguments[u];
447
- var f = this.$store.commit;
448
- if (e) {
449
- var c = B(this.$store, "mapMutations", e);
450
- if (!c)
451
- return;
452
- f = c.context.commit;
453
- }
454
- return typeof i == "function" ? i.apply(this, [f].concat(a)) : f.apply(this.$store, [i].concat(a));
455
- };
456
- }), r;
457
- }), ye = q(function(e, t) {
458
- var r = {};
459
- return G(t).forEach(function(n) {
460
- var o = n.key, i = n.val;
461
- i = e + i, r[o] = function() {
462
- if (!(e && !B(this.$store, "mapGetters", e)))
463
- return this.$store.getters[i];
464
- }, r[o].vuex = !0;
465
- }), r;
466
- }), we = q(function(e, t) {
467
- var r = {};
468
- return G(t).forEach(function(n) {
469
- var o = n.key, i = n.val;
470
- r[o] = function() {
471
- for (var a = [], u = arguments.length; u--; )
472
- a[u] = arguments[u];
473
- var f = this.$store.dispatch;
474
- if (e) {
475
- var c = B(this.$store, "mapActions", e);
476
- if (!c)
477
- return;
478
- f = c.context.dispatch;
479
- }
480
- return typeof i == "function" ? i.apply(this, [f].concat(a)) : f.apply(this.$store, [i].concat(a));
481
- };
482
- }), r;
483
- }), et = function(e) {
484
- return {
485
- mapState: Te.bind(null, e),
486
- mapGetters: ye.bind(null, e),
487
- mapMutations: Se.bind(null, e),
488
- mapActions: we.bind(null, e)
489
- };
490
- };
491
- function G(e) {
492
- return tt(e) ? Array.isArray(e) ? e.map(function(t) {
493
- return { key: t, val: t };
494
- }) : Object.keys(e).map(function(t) {
495
- return { key: t, val: e[t] };
496
- }) : [];
497
- }
498
- function tt(e) {
499
- return Array.isArray(e) || _e(e);
500
- }
501
- function q(e) {
502
- return function(t, r) {
503
- return typeof t != "string" ? (r = t, t = "") : t.charAt(t.length - 1) !== "/" && (t += "/"), e(t, r);
504
- };
505
- }
506
- function B(e, t, r) {
507
- var n = e._modulesNamespaceMap[r];
508
- return n;
509
- }
510
- function rt(e) {
511
- e === void 0 && (e = {});
512
- var t = e.collapsed;
513
- t === void 0 && (t = !0);
514
- var r = e.filter;
515
- r === void 0 && (r = function(c, h, l) {
516
- return !0;
517
- });
518
- var n = e.transformer;
519
- n === void 0 && (n = function(c) {
520
- return c;
521
- });
522
- var o = e.mutationTransformer;
523
- o === void 0 && (o = function(c) {
524
- return c;
525
- });
526
- var i = e.actionFilter;
527
- i === void 0 && (i = function(c, h) {
528
- return !0;
529
- });
530
- var s = e.actionTransformer;
531
- s === void 0 && (s = function(c) {
532
- return c;
533
- });
534
- var a = e.logMutations;
535
- a === void 0 && (a = !0);
536
- var u = e.logActions;
537
- u === void 0 && (u = !0);
538
- var f = e.logger;
539
- return f === void 0 && (f = console), function(c) {
540
- var h = z(c.state);
541
- typeof f > "u" || (a && c.subscribe(function(l, d) {
542
- var O = z(d);
543
- if (r(l, h, O)) {
544
- var R = ae(), p = o(l), $ = "mutation " + l.type + R;
545
- ie(f, $, t), f.log("%c prev state", "color: #9E9E9E; font-weight: bold", n(h)), f.log("%c mutation", "color: #03A9F4; font-weight: bold", p), f.log("%c next state", "color: #4CAF50; font-weight: bold", n(O)), se(f);
546
- }
547
- h = O;
548
- }), u && c.subscribeAction(function(l, d) {
549
- if (i(l, d)) {
550
- var O = ae(), R = s(l), p = "action " + l.type + O;
551
- ie(f, p, t), f.log("%c action", "color: #03A9F4; font-weight: bold", R), se(f);
552
- }
553
- }));
554
- };
555
- }
556
- function ie(e, t, r) {
557
- var n = r ? e.groupCollapsed : e.group;
558
- try {
559
- n.call(e, t);
560
- } catch {
561
- e.log(t);
562
- }
563
- }
564
- function se(e) {
565
- try {
566
- e.groupEnd();
567
- } catch {
568
- e.log("—— log end ——");
569
- }
570
- }
571
- function ae() {
572
- var e = /* @__PURE__ */ new Date();
573
- return " @ " + D(e.getHours(), 2) + ":" + D(e.getMinutes(), 2) + ":" + D(e.getSeconds(), 2) + "." + D(e.getMilliseconds(), 3);
574
- }
575
- function nt(e, t) {
576
- return new Array(t + 1).join(e);
577
- }
578
- function D(e, t) {
579
- return nt("0", t - e.toString().length) + e;
580
- }
581
- var ot = {
582
- Store: _,
583
- install: pe,
584
- version: "3.6.2",
585
- mapState: Te,
586
- mapMutations: Se,
587
- mapGetters: ye,
588
- mapActions: we,
589
- createNamespacedHelpers: et,
590
- createLogger: rt
591
- };
592
- const it = ot;
593
- var U = {
594
- /**
595
- * THIS OBJECT IS REPLACED AT RUNTIME WITH THE ACTUAL VUEX STORE
596
- */
597
- store: {
598
- state: null,
599
- commit: function() {
600
- },
601
- dispatch: function() {
602
- }
603
- }
604
- };
605
- function ur() {
606
- for (var e, t = [], r = arguments.length; r--; )
607
- t[r] = arguments[r];
608
- return (e = U.store).dispatch.apply(e, t);
609
- }
610
- function st(e) {
611
- return S(e) && !Array.isArray(e);
612
- }
613
- function S(e) {
614
- return !!e && typeof e == "object";
615
- }
616
- function ce(e) {
617
- return typeof e == "number" || /^\d+$/.test(e);
618
- }
619
- function at(e, t) {
620
- return S(e) && t in e;
621
- }
622
- function V(e) {
623
- return e ? Array.isArray(e) ? e.map(function(t) {
624
- return String(t);
625
- }) : typeof e == "object" ? Object.keys(e) : typeof e == "string" ? e.match(/[-$\w]+/g) || [] : [] : [];
626
- }
627
- function Ce(e, t) {
628
- var r = e, n = V(t);
629
- return n.every(function(o) {
630
- var i = S(r) && r.hasOwnProperty(o);
631
- return r = i ? r[o] : void 0, i;
632
- }), r;
633
- }
634
- function ct(e, t, r, n) {
635
- n === void 0 && (n = !1);
636
- var o = V(t);
637
- return o.reduce(function(i, s, a) {
638
- if (!i)
639
- return !1;
640
- if (Array.isArray(i) && ce(s) && (s = parseInt(s)), a === o.length - 1)
641
- return i[s] = r, !0;
642
- if (!S(i[s]) || !(s in i))
643
- if (n)
644
- i[s] = ce(o[a + 1]) ? [] : {};
645
- else
646
- return !1;
647
- return i[s];
648
- }, e);
649
- }
650
- function ut(e, t) {
651
- var r = V(t);
652
- if (S(e)) {
653
- for (; r.length; ) {
654
- var n = r.shift();
655
- if (at(e, n))
656
- e = e[n];
657
- else
658
- return !1;
659
- }
660
- return !0;
661
- }
662
- return !1;
663
- }
664
- function ft(e) {
665
- return JSON.parse(JSON.stringify(e));
666
- }
667
- var T = {
668
- mapping: "standard",
669
- // map states to store members using the "standard" scheme
670
- strict: !0,
671
- // throw an error if the store member cannot be found
672
- cache: !0,
673
- // cache generated functions for faster re-use
674
- deep: 1
675
- // allow sub-property access, but not creation
676
- }, lt = {
677
- camel: function() {
678
- for (var e = [], t = arguments.length; t--; )
679
- e[t] = arguments[t];
680
- return e.shift() + e.map(function(r) {
681
- return r.replace(/\w/, function(n) {
682
- return n.toUpperCase();
683
- });
684
- }).join("");
685
- },
686
- snake: function() {
687
- for (var e, t = [], r = arguments.length; r--; )
688
- t[r] = arguments[r];
689
- return (e = this).camel.apply(e, t).replace(/([a-z])([A-Z])/g, function(n, o, i) {
690
- return o + "_" + i;
691
- }).toLowerCase();
692
- },
693
- const: function() {
694
- for (var e, t = [], r = arguments.length; r--; )
695
- t[r] = arguments[r];
696
- return (e = this).snake.apply(e, t).toUpperCase();
697
- }
698
- }, ht = {
699
- state: "state",
700
- getters: "getters",
701
- actions: "_actions",
702
- mutations: "_mutations"
703
- }, ue = {
704
- /**
705
- * Standard name mapping function
706
- *
707
- * Adheres to seemingly the most common Vuex naming pattern
708
- *
709
- * @param {string} type The member type, i.e state, getters, mutations, or actions
710
- * @param {string} name The name of the property being targeted, i.e. value
711
- * @param {object} formatters A formatters object with common format functions, camel, snake, const
712
- * @returns {string}
713
- */
714
- standard: function(t, r, n) {
715
- switch (t) {
716
- case "mutations":
717
- return n.const("set", r);
718
- case "actions":
719
- return n.camel("set", r);
720
- }
721
- return r;
722
- },
723
- /**
724
- * Simple name mapping function
725
- */
726
- simple: function(t, r, n) {
727
- return t === "actions" ? n.camel("set", r) : r;
728
- }
729
- }, Y;
730
- function M(e, t) {
731
- if (t.match(/!$/))
732
- return t.substr(0, t.length - 1);
733
- var r = Y;
734
- if (!r) {
735
- if (r = ue[T.mapping], !r)
736
- throw new Error("[Vuex Pathify] Unknown mapping '" + T.mapping + `' in options
737
- - Choose one of '` + Object.keys(ue).join("', '") + `'
738
- - Or, supply a custom function
739
- `);
740
- Y = r;
741
- }
742
- return Y(e, t, lt);
743
- }
744
- function K(e, t) {
745
- var r = t.replace(/[/@!]+/g, "."), n = t.split("@"), o = n[0], i = n[1], s, a;
746
- if (o.indexOf("/") > -1) {
747
- var u = o.split("/");
748
- a = u.pop(), s = u.join("/");
749
- } else
750
- a = o;
751
- if (s && !e._modulesNamespaceMap[s + "/"])
752
- throw new Error("[Vuex Pathify] Unknown module '" + s + "' via path '" + t + "'");
753
- return {
754
- absPath: r,
755
- module: s,
756
- target: o,
757
- name: a.replace("!", ""),
758
- isDynamic: t.indexOf(":") > -1,
759
- /**
760
- * Returns properties about the targeted member
761
- *
762
- * @param {string} type The member type, i.e state, getters, mutations, or actions
763
- * @returns {{exists: boolean, member: object, type: string, path: string}}
764
- */
765
- get: function(f) {
766
- var c = e[ht[f]], h = M(f, a), l = s ? s + "/" + h : h;
767
- return {
768
- exists: f === "state" ? ut(c, l) : l in c,
769
- member: c,
770
- trgPath: l,
771
- trgName: h,
772
- objPath: i
773
- };
774
- }
775
- };
776
- }
777
- var y = function(t, r, n) {
778
- this.expr = t, this.path = r, this.value = n;
779
- };
780
- y.prototype.update = function(t) {
781
- var r = ct(t, this.path, this.value, T.deep > 1);
782
- return Array.isArray(t) ? [].concat(t) : Object.assign({}, t);
783
- };
784
- y.isSerialized = function(e) {
785
- return st(e) && "expr" in e && "path" in e && "value" in e;
786
- };
787
- function dt(e, t) {
788
- var r = K(e, t), n = r.get("actions");
789
- if (n.exists)
790
- return function(i) {
791
- var s = n.objPath ? new y(t, n.objPath, i) : i;
792
- return e.dispatch(n.trgPath, s);
793
- };
794
- var o = r.get("mutations");
795
- return o.exists || r.isDynamic ? function(i) {
796
- if (r.isDynamic) {
797
- var s = He(t, this);
798
- o = K(e, s).get("mutations");
799
- }
800
- var a = o.objPath ? new y(t, o.objPath, i) : i;
801
- return e.commit(o.trgPath, a);
802
- } : function(i) {
803
- };
804
- }
805
- function Me(e, t, r) {
806
- var n = K(e, t), o;
807
- if (!r && (o = n.get("getters"), o.exists))
808
- return function() {
809
- var s = o.member[o.trgPath];
810
- return o.objPath ? fe(t, s, o.objPath) : s;
811
- };
812
- var i = n.get("state");
813
- return i.exists || n.isDynamic ? function() {
814
- var s = n.isDynamic ? He(n.absPath, this) : n.absPath;
815
- return fe(t, e.state, s);
816
- } : function() {
817
- };
818
- }
819
- function fe(e, t, r) {
820
- return Ce(t, r);
821
- }
822
- function He(e, t) {
823
- return e.replace(/:(\w+)/g, function(n, o) {
824
- return o in t || console.error('Error resolving dynamic store path: The property "' + o + '" does not exist on the scope', t), t[o];
825
- });
826
- }
827
- function Ot(e) {
828
- e.set = function(t, r) {
829
- var n = dt(e, t);
830
- if (typeof n < "u")
831
- return n(r);
832
- }, e.get = function(t) {
833
- for (var r = [], n = arguments.length - 1; n-- > 0; )
834
- r[n] = arguments[n + 1];
835
- var o = Me(e, t);
836
- if (typeof o < "u") {
837
- var i = o();
838
- return typeof i == "function" ? i.apply(void 0, r) : i;
839
- }
840
- }, e.copy = function(t) {
841
- for (var r = [], n = arguments.length - 1; n-- > 0; )
842
- r[n] = arguments[n + 1];
843
- var o = e.get.apply(e, [t].concat(r));
844
- return S(o) ? ft(o) : o;
845
- };
846
- }
847
- function P(e) {
848
- return M(e, "value");
849
- }
850
- function Et() {
851
- console.log(`
852
- [Vuex Pathify] Options:
853
-
854
- Mapping (` + T.mapping + `)
855
- -------------------------------
856
- path : value
857
- state : ` + P("state") + `
858
- getters : ` + P("getters") + `
859
- actions : ` + P("actions") + `
860
- mutations : ` + P("mutations") + `
861
-
862
- Settings
863
- -------------------------------
864
- strict : ` + T.strict + `
865
- cache : ` + T.cache + `
866
- deep : ` + T.deep + `
867
-
868
- `);
869
- }
870
- function _t(e) {
871
- U.store = e, Ot(e);
872
- }
873
- var gt = {
874
- options: T,
875
- plugin: _t,
876
- debug: Et
877
- };
878
- function ee(e) {
879
- return V(typeof e == "function" ? e() : e);
880
- }
881
- function vt(e) {
882
- return ee(e).reduce(function(t, r) {
883
- var n = M("getters", r);
884
- return t[n] = function(o) {
885
- return o[r];
886
- }, t;
887
- }, {});
888
- }
889
- function mt(e) {
890
- return ee(e).reduce(function(t, r) {
891
- var n = M("mutations", r);
892
- return t[n] = function(o, i) {
893
- i instanceof y ? i = i.update(o[r]) : y.isSerialized(i) && (i = y.prototype.update.call(i, o[r])), o[r] = i;
894
- }, t;
895
- }, {});
896
- }
897
- function Rt(e) {
898
- return ee(e).reduce(function(t, r) {
899
- var n = M("actions", r), o = M("mutations", r);
900
- return t[n] = function(i, s) {
901
- var a = i.commit;
902
- a(o, s);
903
- }, t;
904
- }, {});
905
- }
906
- var F = {
907
- getters: vt,
908
- mutations: mt,
909
- actions: Rt
910
- };
911
- function pt(e, t, r) {
912
- return yt(e, t) ? Tt(e, t).concat(St(e, r)) : "";
913
- }
914
- function Tt(e, t) {
915
- var r = e.match(/([^/@\.]+)$/)[1], n = e.substring(0, e.length - r.length), o = n.replace(/\W+$/, "").split(/[/@.]/), i = n ? Ce(t, o) : t;
916
- if (!i)
917
- return console.error("[Vuex Pathify] Unable to expand wildcard path '" + e + `':
918
- - It looks like '` + n.replace(/\W+$/, "") + "' does not resolve to an existing state property"), [];
919
- var s = new RegExp("^" + r.replace(/\*/g, "\\w+") + "$");
920
- return Object.keys(i).filter(function(a) {
921
- return s.test(a);
922
- }).map(function(a) {
923
- return n + a;
924
- });
925
- }
926
- function St(e, t) {
927
- var r = new RegExp("^" + e.replace(/\*/g, "\\w+") + "$");
928
- return Object.keys(t).filter(function(n) {
929
- return r.test(n);
930
- });
931
- }
932
- function yt(e, t) {
933
- return e.indexOf("*") > -1 && /\*.*[/@.]/.test(e) ? (console.error("[Vuex Pathify] Invalid wildcard placement for path '" + e + `':
934
- - Wildcards may only be used in the last segment of a path`), !1) : t ? !0 : (console.error("[Vuex Pathify] Unable to expand wildcard path '" + e + `':
935
- - The usual reason for this is that the router was set up before the store
936
- - Make sure the store is imported before the router, then reload`), !1);
937
- }
938
- function wt(e, t, r) {
939
- if (typeof e == "string" && e.indexOf("*") > -1)
940
- return Q(r(e));
941
- if (Array.isArray(e))
942
- return Q(e);
943
- if (S(e) && (t = e, e = ""), Array.isArray(t)) {
944
- var n = t.map(function(o) {
945
- return le(e, o);
946
- });
947
- return Q(n);
948
- }
949
- return S(t) ? Object.keys(t).reduce(function(o, i) {
950
- return o[i] = le(e, t[i]), o;
951
- }, {}) : e;
952
- }
953
- function le(e, t) {
954
- t === void 0 && (t = ""), e = e.replace(/\/+$/, "");
955
- var r = e.indexOf("@") > -1 ? e + "." + t : e + "/" + t;
956
- return r.replace(/^\/|[.@/]+$/, "").replace(/\/@/, "@").replace(/@\./, "@");
957
- }
958
- function Q(e) {
959
- return e.reduce(function(t, r) {
960
- var n = r.match(/\w+$/);
961
- return t[n] = r, t;
962
- }, {});
963
- }
964
- function fr(e, t) {
965
- return Ct(e, t, Mt, function(r) {
966
- return pt(r, U.store.state, U.store.getters);
967
- });
968
- }
969
- function Ct(e, t, r, n) {
970
- var o = wt(e, t, n);
971
- return typeof o == "string" ? r(o) : (Object.keys(o).forEach(function(i) {
972
- o[i] = r(o[i]);
973
- }), o);
974
- }
975
- function Mt(e, t) {
976
- var r, n;
977
- return function() {
978
- for (var o = [], i = arguments.length; i--; )
979
- o[i] = arguments[i];
980
- if (!this.$store)
981
- throw new Error(`[Vuex Pathify] Unexpected condition: this.$store is undefined.
982
-
983
- This is a known edge case with some setups and will cause future lookups to fail`);
984
- return (!r || n !== this.$store) && (n = this.$store, r = Me(n, e, t)), r.call.apply(r, [this].concat(o));
985
- };
986
- }
987
- const Fe = {
988
- breakpointObservers: {}
989
- }, Ht = {
990
- getBreakpointService: (e) => (t) => e.breakpointObservers[t]
991
- }, Ft = F.mutations(Fe), It = {
992
- getters: Ht,
993
- mutations: Ft,
994
- namespaced: !0,
995
- state: Fe
996
- }, v = () => window.RevolugoElements.bookingApiClient, Ie = {
997
- idToImages: {}
998
- }, $t = {
999
- images(e) {
1000
- return (t) => e.idToImages[t];
1001
- }
1002
- }, bt = {
1003
- ...F.mutations(Ie),
1004
- SET_HOTEL_IMAGES(e, t) {
1005
- I.set(e.idToImages, t.hotelId, t.hotelImages);
1006
- }
1007
- }, Dt = {
1008
- async retrieveHotelImages({ commit: e, state: t }, {
1009
- hotelId: r,
1010
- locale: n
1011
- }) {
1012
- try {
1013
- if (t.idToImages[r])
1014
- return;
1015
- const o = v();
1016
- if (!o)
1017
- return;
1018
- const i = await (o == null ? void 0 : o.hotelImages.retrieve({
1019
- id: r,
1020
- lang: n
1021
- }));
1022
- e("SET_HOTEL_IMAGES", {
1023
- hotelId: r,
1024
- hotelImages: i
1025
- });
1026
- } catch (o) {
1027
- console.error("Cannot retrieve hotel images:", o);
1028
- }
1029
- }
1030
- }, Pt = {
1031
- actions: Dt,
1032
- namespaced: !0,
1033
- getters: $t,
1034
- mutations: bt,
1035
- state: Ie
1036
- }, $e = {
1037
- address: void 0,
1038
- adultCount: 0,
1039
- checkInDate: "",
1040
- checkOutDate: "",
1041
- children: null,
1042
- hasError: !1,
1043
- id: void 0,
1044
- isFetching: !1,
1045
- latitude: void 0,
1046
- longitude: void 0,
1047
- roomCount: 0,
1048
- sourceMarket: Ge.Fr
1049
- }, At = {
1050
- nightCount(e) {
1051
- return L(e.checkOutDate, "YYYY-MM-DD").diff(
1052
- L(e.checkInDate, "YYYY-MM-DD"),
1053
- "day"
1054
- );
1055
- }
1056
- }, Lt = F.mutations($e), kt = {
1057
- // eslint-disable-next-line max-statements
1058
- createHotelOfferRequest: async ({ commit: e }, t) => {
1059
- const r = v();
1060
- if (r)
1061
- try {
1062
- e("SET_HAS_ERROR", !1), e("SET_ID", void 0), e("SET_IS_FETCHING", !0);
1063
- const n = {
1064
- body: {
1065
- address: t.address,
1066
- adultCount: t.adultCount,
1067
- checkInDate: t.checkInDate,
1068
- checkOutDate: t.checkOutDate,
1069
- children: t.children,
1070
- latitude: t.latitude,
1071
- longitude: t.longitude,
1072
- roomCount: t.roomCount,
1073
- sourceMarket: t.sourceMarket
1074
- }
1075
- }, { eventMetadata: o } = window.RevolugoElements.config;
1076
- de(o) || (n.body.eventMetadata = {
1077
- ...Oe(o, ["name", "slug"]),
1078
- name: o.slug || o.name
1079
- });
1080
- const i = await (r == null ? void 0 : r.hotelOfferRequests.create(
1081
- n
1082
- ));
1083
- (i.adultCount !== t.adultCount || i.checkInDate !== t.checkInDate || i.checkOutDate !== t.checkOutDate || i.children !== t.children || i.sourceMarket !== t.sourceMarket) && console.warn(
1084
- `Hotel offer request params mismatch: adultCount: ${i.adultCount} : ${t.adultCount}, checkInDate: ${i.checkInDate} : ${t.checkInDate}, checkOutDate: ${i.checkOutDate} : ${t.checkOutDate}, children: ${i.children} : ${t.children}, roomCount: ${i.roomCount} : ${t.roomCount}, sourceMarket: ${i.sourceMarket} : ${t.sourceMarket}`
1085
- ), e("SET_ADDRESS", i.address), e("SET_ADULT_COUNT", i.adultCount), e("SET_CHECK_OUT_DATE", i.checkOutDate), e("SET_CHECK_IN_DATE", i.checkInDate), e("SET_CHILDREN", i.children), e("SET_ID", i.id), e("SET_LATITUDE", i.latitude), e("SET_LONGITUDE", i.longitude), e("SET_ROOM_COUNT", i.roomCount), e("SET_SOURCE_MARKET", i.sourceMarket), window.RevolugoElements.eventBus.$emit(
1086
- m.HOTEL_OFFER_REQUEST_CREATED,
1087
- i
1088
- );
1089
- } catch (n) {
1090
- e("SET_HAS_ERROR", !0), console.error("Cannot create hotel offer request:", n);
1091
- } finally {
1092
- setTimeout(() => {
1093
- e("SET_IS_FETCHING", !1);
1094
- }, 500);
1095
- }
1096
- },
1097
- resetId: ({ commit: e }) => {
1098
- e("SET_ID", void 0);
1099
- },
1100
- retrieveHotelOfferRequest: async ({ commit: e }, t) => {
1101
- try {
1102
- const r = v();
1103
- if (!r)
1104
- return;
1105
- e("SET_HAS_ERROR", !1), e("SET_ID", void 0), e("SET_IS_FETCHING", !0);
1106
- const n = await (r == null ? void 0 : r.hotelOfferRequests.retrieve({
1107
- id: t
1108
- }));
1109
- if (n.id !== t)
1110
- throw new Error(
1111
- `Hotel offer request id mismatch: requested: ${t}, retrieved: ${n.id}`
1112
- );
1113
- e("SET_ADDRESS", n.address), e("SET_ADULT_COUNT", n.adultCount), e("SET_CHECK_OUT_DATE", n.checkOutDate), e("SET_CHECK_IN_DATE", n.checkInDate), e("SET_CHILDREN", n.children), e("SET_ID", n.id), e("SET_LATITUDE", n.latitude), e("SET_LONGITUDE", n.longitude), e("SET_ROOM_COUNT", n.roomCount), e("SET_SOURCE_MARKET", n.sourceMarket), window.RevolugoElements.eventBus.$emit(
1114
- m.HOTEL_OFFER_REQUEST_RETRIEVED,
1115
- n
1116
- );
1117
- } catch (r) {
1118
- e("SET_HAS_ERROR", !0), e("SET_ID", void 0), console.error("Cannot retrieve hotel offer request:", r);
1119
- } finally {
1120
- setTimeout(() => {
1121
- e("SET_IS_FETCHING", !1);
1122
- }, 500);
1123
- }
1124
- }
1125
- }, xt = {
1126
- actions: kt,
1127
- getters: At,
1128
- mutations: Lt,
1129
- namespaced: !0,
1130
- state: $e
1131
- };
1132
- Array.from({ length: 40 }).map(
1133
- () => Le(0, 10)
1134
- );
1135
- const Ut = 10;
1136
- var Nt = /* @__PURE__ */ ((e) => (e.PRICE = "price", e.RATING = "rating", e.REVIEW_RATING = "review_rating", e.SORT_BY = "sort_by", e))(Nt || {});
1137
- const Gt = "", qt = 0, Bt = [0, 0], Vt = Ee.TopPicks, jt = "asc", be = {
1138
- rating: Gt,
1139
- review_rating: qt,
1140
- price: Bt,
1141
- sort_by: {
1142
- value: Vt,
1143
- direction: jt
1144
- }
1145
- }, De = {
1146
- isPolling: !1,
1147
- pollingPayload: void 0,
1148
- hasError: !1,
1149
- hotelOffersCurrency: void 0,
1150
- hotelOffers: [],
1151
- priceHistogram: [],
1152
- priceMax: 0,
1153
- priceMin: 0,
1154
- filters: be,
1155
- startingAfter: null
1156
- }, A = {
1157
- priceHistogramStepCount(e) {
1158
- return e.priceHistogram ? e.priceHistogram.length : 0;
1159
- },
1160
- // eslint-disable-next-line @typescript-eslint/max-params
1161
- getPriceMin(e, t, r, n) {
1162
- return !e.priceMin || !e.hotelOffersCurrency ? 0 : Math.round(
1163
- oe({
1164
- amount: e.priceMin,
1165
- currency: e.hotelOffersCurrency
1166
- }) / n["hotelOfferRequest/nightCount"] / r.hotelOfferRequest.roomCount
1167
- );
1168
- },
1169
- // eslint-disable-next-line @typescript-eslint/max-params
1170
- getPriceMax(e, t, r, n) {
1171
- return !e.priceMax || !e.hotelOffersCurrency ? 0 : Math.round(
1172
- oe({
1173
- amount: e.priceMax,
1174
- currency: e.hotelOffersCurrency
1175
- }) / n["hotelOfferRequest/nightCount"] / r.hotelOfferRequest.roomCount
1176
- );
1177
- },
1178
- isPriceFilterActive(e) {
1179
- return e.filters.price[0] !== 0 || e.filters.price[1] !== 0;
1180
- },
1181
- isStarRatingFilterActive(e) {
1182
- return e.filters.rating !== "";
1183
- },
1184
- isReviewRatingFilterActive(e) {
1185
- return e.filters.review_rating !== 0;
1186
- },
1187
- // eslint-disable-next-line @typescript-eslint/no-shadow, @typescript-eslint/no-explicit-any
1188
- activeFiltersNumber(e, t) {
1189
- return [
1190
- t.isPriceFilterActive,
1191
- t.isStarRatingFilterActive,
1192
- t.isReviewRatingFilterActive
1193
- ].filter(Boolean).length;
1194
- },
1195
- // eslint-disable-next-line @typescript-eslint/max-params
1196
- transformFilterPrices(e, t, r, n) {
1197
- if (!(!e.filters.price || e.filters.price[0] === 0 && e.filters.price[1] === 0))
1198
- return e.filters.price.map(
1199
- (o) => Ue({
1200
- amount: o * n["hotelOfferRequest/nightCount"] * r.hotelOfferRequest.roomCount,
1201
- currency: window.RevolugoElements.config.currency
1202
- })
1203
- );
1204
- }
1205
- }, Yt = {
1206
- ...F.mutations(De),
1207
- ADD_HOTEL_OFFERS(e, t) {
1208
- e.hotelOffers = ke(
1209
- [...e.hotelOffers ?? [], ...t],
1210
- "id"
1211
- );
1212
- }
1213
- }, Qt = {
1214
- saveFilters({ commit: e }, t) {
1215
- e("SET_FILTERS", t);
1216
- },
1217
- resetFilters({ commit: e, state: t }) {
1218
- e("SET_FILTERS", {
1219
- ...be,
1220
- sort_by: t.filters.sort_by
1221
- });
1222
- },
1223
- resetHotelOffers({ commit: e }) {
1224
- e("SET_HOTEL_OFFERS", []);
1225
- },
1226
- retrieveHotelOffers: xe(
1227
- async ({ commit: e, state: t, rootState: r, rootGetters: n }, o) => {
1228
- var s, a, u, f;
1229
- if (!o.hotelOfferRequestId)
1230
- return;
1231
- const i = v();
1232
- if (i) {
1233
- const c = {
1234
- ...o,
1235
- priceHistogramStepCount: Ut,
1236
- filterByReviewRating: t.filters.review_rating || void 0,
1237
- filterByPrice: (s = A.transformFilterPrices(t, void 0, r, n)) == null ? void 0 : s.join("-"),
1238
- filterByStar: t.filters.rating || void 0,
1239
- onlyRecommendedHotelOffers: ((a = t.filters.sort_by) == null ? void 0 : a.value) === Ee.TopPicks,
1240
- sortBy: (u = t.filters.sort_by) == null ? void 0 : u.value,
1241
- sortByOrder: (f = t.filters.sort_by) == null ? void 0 : f.direction,
1242
- currency: window.RevolugoElements.config.currency,
1243
- lang: window.RevolugoElements.config.lang
1244
- };
1245
- if (t.isPolling && ne(t.pollingPayload, c))
1246
- return;
1247
- k.$emit(m.HOTEL_OFFERS_POLLING_STARTED), e("SET_IS_POLLING", !0), e("SET_POLLING_PAYLOAD", c), e("SET_HAS_ERROR", !1), o.startingAfter || e("SET_HOTEL_OFFERS", []), e("SET_HOTEL_OFFERS_CURRENCY", null), await (i == null ? void 0 : i.hotelOffers.list(
1248
- c,
1249
- (h, l) => {
1250
- var p, $;
1251
- if (!ne(t.pollingPayload, c))
1252
- return;
1253
- if (h) {
1254
- e("SET_IS_POLLING", !1), e("SET_HAS_ERROR", !0), console.error("Cannot retrieve hotel offers:", h);
1255
- return;
1256
- }
1257
- if (e(
1258
- "SET_IS_POLLING",
1259
- (((p = l == null ? void 0 : l.meta) == null ? void 0 : p.status) ?? "").toLowerCase() !== "complete"
1260
- ), !(($ = l == null ? void 0 : l.data) != null && $.hotelOffers))
1261
- return;
1262
- o.startingAfter ? e("ADD_HOTEL_OFFERS", l.data.hotelOffers) : e("SET_HOTEL_OFFERS", l.data.hotelOffers), k.$emit(
1263
- m.HOTEL_OFFERS_RETRIEVED,
1264
- l.data.hotelOffers
1265
- ), e("SET_HOTEL_OFFERS_CURRENCY", l.data.currency), e("SET_PRICE_HISTOGRAM", l.data.priceHistogram), e("SET_PRICE_MIN", l.data.priceMin), e("SET_PRICE_MAX", l.data.priceMax), e("SET_STARTING_AFTER", l.meta.startingAfter);
1266
- const d = (te) => {
1267
- const j = A.getPriceMin(
1268
- t,
1269
- void 0,
1270
- r,
1271
- n
1272
- ), re = A.getPriceMax(
1273
- t,
1274
- void 0,
1275
- r,
1276
- n
1277
- );
1278
- return j === re && j === 0 ? !0 : te >= j && te <= re;
1279
- }, O = d(t.filters.price[0]) ? t.filters.price[0] : 0, R = d(t.filters.price[1]) ? t.filters.price[1] : 0;
1280
- e("SET_FILTERS", {
1281
- ...t.filters,
1282
- price: [O, R]
1283
- });
1284
- },
1285
- {
1286
- maxCallCount: 10
1287
- }
1288
- ).catch((h) => {
1289
- e("SET_IS_POLLING", !1), e("SET_HAS_ERROR", !0), console.error("Cannot retrieve hotel offers:", h);
1290
- }));
1291
- }
1292
- },
1293
- 100
1294
- )
1295
- }, zt = {
1296
- actions: Qt,
1297
- namespaced: !0,
1298
- getters: A,
1299
- mutations: Yt,
1300
- state: De
1301
- }, W = {
1302
- hotelRoomOfferRequestByHotelId: {}
1303
- }, Kt = {
1304
- hotelRoomOfferRequest(e) {
1305
- return (t) => e.hotelRoomOfferRequestByHotelId[t];
1306
- },
1307
- nightCount(e) {
1308
- return (t) => {
1309
- if (e.hotelRoomOfferRequestByHotelId[t])
1310
- return L(
1311
- e.hotelRoomOfferRequestByHotelId[t].checkOutDate,
1312
- "YYYY-MM-DD"
1313
- ).diff(
1314
- L(
1315
- e.hotelRoomOfferRequestByHotelId[t].checkInDate,
1316
- "YYYY-MM-DD"
1317
- ),
1318
- "day"
1319
- );
1320
- };
1321
- }
1322
- }, Wt = {
1323
- ...F.mutations(W),
1324
- DELETE_HOTEL_ROOM_OFFER_REQUEST(e, t) {
1325
- I.set(e.hotelRoomOfferRequestByHotelId, t, void 0);
1326
- },
1327
- RESET_HOTEL_ROOM_OFFER_REQUEST(e, t) {
1328
- I.set(e.hotelRoomOfferRequestByHotelId, t, {
1329
- ...e.hotelRoomOfferRequestByHotelId[t],
1330
- hasError: !1,
1331
- id: null
1332
- });
1333
- },
1334
- RESET_HOTEL_ROOM_OFFER_REQUESTS() {
1335
- W.hotelRoomOfferRequestByHotelId = {};
1336
- },
1337
- SET_HOTEL_ROOM_OFFER_REQUEST(e, t) {
1338
- I.set(e.hotelRoomOfferRequestByHotelId, t.hotelId, {
1339
- ...e.hotelRoomOfferRequestByHotelId[t.hotelId],
1340
- ...t
1341
- });
1342
- }
1343
- }, Jt = {
1344
- createHotelRoomOfferRequest: async ({ commit: e }, t) => {
1345
- const r = v();
1346
- if (r)
1347
- try {
1348
- e("SET_HOTEL_ROOM_OFFER_REQUEST", {
1349
- hasError: !1,
1350
- hotelId: t.hotelId,
1351
- id: void 0,
1352
- isFetching: !0
1353
- });
1354
- const n = {
1355
- body: {
1356
- adultCount: t.adultCount,
1357
- checkInDate: t.checkInDate,
1358
- checkOutDate: t.checkOutDate,
1359
- children: t.children,
1360
- hotelId: t.hotelId,
1361
- roomCount: t.roomCount,
1362
- sourceMarket: t.sourceMarket
1363
- }
1364
- }, { eventMetadata: o } = window.RevolugoElements.config;
1365
- de(o) || (n.body.eventMetadata = {
1366
- ...Oe(o, ["name", "slug"]),
1367
- name: o.slug || o.name
1368
- });
1369
- const i = await r.hotelRoomOfferRequests.create(
1370
- n
1371
- );
1372
- (i.adultCount !== t.adultCount || i.checkInDate !== t.checkInDate || i.checkOutDate !== t.checkOutDate || i.children !== t.children || i.sourceMarket !== t.sourceMarket) && console.warn(
1373
- `Hotel offer request params mismatch: adultCount: ${i.adultCount} : ${t.adultCount}, checkInDate: ${i.checkInDate} : ${t.checkInDate}, checkOutDate: ${i.checkOutDate} : ${t.checkOutDate}, children: ${i.children} : ${t.children}, roomCount: ${i.roomCount} : ${t.roomCount}, sourceMarket: ${i.sourceMarket} : ${t.sourceMarket}`
1374
- ), e("SET_HOTEL_ROOM_OFFER_REQUEST", {
1375
- ...i,
1376
- hasError: !1,
1377
- isFetching: !1
1378
- }), window.RevolugoElements.eventBus.$emit(
1379
- m.HOTEL_ROOM_OFFER_REQUEST_CREATED,
1380
- i
1381
- );
1382
- } catch (n) {
1383
- e("SET_HOTEL_ROOM_OFFER_REQUEST", {
1384
- hasError: !0,
1385
- hotelId: t.hotelId
1386
- }), console.error("Cannot create hotel room offer request:", n);
1387
- }
1388
- },
1389
- deleteHotelRoomOfferRequest({ commit: e }, t) {
1390
- e("DELETE_HOTEL_ROOM_OFFER_REQUEST", t);
1391
- },
1392
- resetHotelRoomOfferRequest({ commit: e }, t) {
1393
- e("RESET_HOTEL_ROOM_OFFER_REQUESTS", t);
1394
- },
1395
- resetHotelRoomOfferRequests({ commit: e }) {
1396
- e("RESET_HOTEL_ROOM_OFFER_REQUESTS");
1397
- },
1398
- async retrieveHotelRoomOfferRequest({ commit: e }, {
1399
- hotelId: t,
1400
- hotelRoomOfferRequestId: r
1401
- }) {
1402
- try {
1403
- const n = v();
1404
- if (!n)
1405
- return;
1406
- e("SET_HOTEL_ROOM_OFFER_REQUEST", {
1407
- hasError: !1,
1408
- hotelId: t,
1409
- id: void 0,
1410
- isFetching: !0
1411
- });
1412
- const o = await (n == null ? void 0 : n.hotelRoomOfferRequests.retrieve({
1413
- id: r
1414
- }));
1415
- if (o.hotelId !== t)
1416
- throw new Error(
1417
- "Hotel room offer request does not match provided hotel id"
1418
- );
1419
- if (o.id !== r)
1420
- throw new Error(
1421
- `Hotel room offer request id mismatch: requested: ${r}, retrieved: ${o.id}`
1422
- );
1423
- e("SET_HOTEL_ROOM_OFFER_REQUEST", {
1424
- ...o,
1425
- isFetching: !1
1426
- }), window.RevolugoElements.eventBus.$emit(
1427
- m.HOTEL_ROOM_OFFER_REQUEST_RETRIEVED,
1428
- o
1429
- );
1430
- } catch (n) {
1431
- e("DELETE_HOTEL_ROOM_OFFER_REQUEST", t), console.error("Cannot retrieve hotel offer request:", n);
1432
- }
1433
- }
1434
- }, Xt = {
1435
- actions: Jt,
1436
- getters: Kt,
1437
- mutations: Wt,
1438
- namespaced: !0,
1439
- state: W
1440
- }, Pe = {
1441
- hotelRoomOffersByHotel: {}
1442
- }, Zt = {
1443
- hotelRoomOffers(e) {
1444
- return (t) => e.hotelRoomOffersByHotel[t];
1445
- },
1446
- hotelTimezone(e) {
1447
- return (t) => e.hotelRoomOffersByHotel[t].hotelTimezone;
1448
- }
1449
- }, er = {
1450
- /* eslint-disable @typescript-eslint/no-shadow */
1451
- RESET_HOTEL_ROOM_OFFERS(e) {
1452
- e.hotelRoomOffersByHotel = {};
1453
- },
1454
- SET_HOTEL_ROOM_OFFERS(e, t) {
1455
- b(e.hotelRoomOffersByHotel, t.hotelId, t);
1456
- },
1457
- PUSH_IN_PROGRESS_HOTEL_ROOM_OFFER(e, {
1458
- hotelId: t,
1459
- hotelRoomOffer: r
1460
- }) {
1461
- const n = e.hotelRoomOffersByHotel[t];
1462
- if (!n)
1463
- return;
1464
- const o = n.inProgressOffers;
1465
- o && b(e.hotelRoomOffersByHotel, t, {
1466
- ...n,
1467
- inProgressOffers: [...o, r]
1468
- });
1469
- },
1470
- UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER(e, {
1471
- hotelId: t,
1472
- hotelRoomOffer: r
1473
- }) {
1474
- const n = e.hotelRoomOffersByHotel[t];
1475
- if (!n)
1476
- return;
1477
- const o = n.inProgressOffers;
1478
- if (!o)
1479
- return;
1480
- const i = o.findIndex(
1481
- (s) => s.id === r.id
1482
- );
1483
- i !== void 0 && b(e.hotelRoomOffersByHotel, t, {
1484
- ...n,
1485
- inProgressOffers: [
1486
- ...o.slice(0, i),
1487
- {
1488
- ...o[i],
1489
- ...r
1490
- },
1491
- ...o.slice(i + 1)
1492
- ]
1493
- });
1494
- },
1495
- // eslint-disable-next-line @typescript-eslint/consistent-return
1496
- UPDATE_HOTEL_ROOM_OFFER(e, {
1497
- hotelId: t,
1498
- id: r,
1499
- hotelRoomOffer: n
1500
- }) {
1501
- const o = e.hotelRoomOffersByHotel[t], i = o.offers;
1502
- if (!i)
1503
- return;
1504
- const s = i.findIndex(
1505
- (u) => u.id === r
1506
- );
1507
- if (s === void 0)
1508
- return;
1509
- const a = i[s];
1510
- Ne(
1511
- n.cancellationPolicies,
1512
- a.cancellationPolicies
1513
- ) || k.$emit(
1514
- m.CANCELLATION_POLICIES_UPDATED,
1515
- n.cancellationPolicies
1516
- ), b(e.hotelRoomOffersByHotel, t, {
1517
- ...o,
1518
- offers: [
1519
- ...i.slice(0, s),
1520
- {
1521
- ...i[s],
1522
- ...n,
1523
- packageType: i[s].packageType
1524
- },
1525
- ...i.slice(s + 1)
1526
- ]
1527
- });
1528
- }
1529
- }, tr = {
1530
- async createBookingPolicies({ commit: e }, {
1531
- addBreakfast: t,
1532
- hotelId: r,
1533
- hotelRoomOfferId: n
1534
- }) {
1535
- var s;
1536
- const o = v();
1537
- if (!o)
1538
- return;
1539
- const i = (s = Pe.hotelRoomOffersByHotel[r].offers) == null ? void 0 : s.find(
1540
- (a) => a.id === n
1541
- );
1542
- i && e("PUSH_IN_PROGRESS_HOTEL_ROOM_OFFER", {
1543
- hotelId: r,
1544
- hotelRoomOffer: {
1545
- ...i,
1546
- isLoading: !0
1547
- }
1548
- });
1549
- try {
1550
- const a = await o.bookingPolicies.create({
1551
- body: {
1552
- addBreakfast: t,
1553
- hotelRoomOfferId: n,
1554
- lang: window.RevolugoElements.config.lang
1555
- }
1556
- });
1557
- return k.$emit(m.BOOKING_POLICY_CREATED, a), e("UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER", {
1558
- hotelId: r,
1559
- hotelRoomOffer: {
1560
- id: n,
1561
- isLoading: !1
1562
- }
1563
- }), e("UPDATE_HOTEL_ROOM_OFFER", {
1564
- hotelId: r,
1565
- hotelRoomOffer: {
1566
- ...a.hotelRoomOffer,
1567
- isLoading: !1
1568
- },
1569
- id: n
1570
- }), a;
1571
- } catch (a) {
1572
- throw e("UPDATE_IN_PROGRESS_HOTEL_ROOM_OFFER", {
1573
- hotelId: r,
1574
- hotelRoomOffer: {
1575
- id: n,
1576
- isLoading: !1
1577
- }
1578
- }), e("UPDATE_HOTEL_ROOM_OFFER", {
1579
- hotelId: r,
1580
- hotelRoomOffer: {
1581
- isLoading: !1
1582
- },
1583
- id: n
1584
- }), a;
1585
- }
1586
- },
1587
- async reifyHotelRoomOffer({ commit: e }, {
1588
- hotelId: t,
1589
- id: r,
1590
- addBreakfast: n
1591
- }) {
1592
- const o = v();
1593
- if (o) {
1594
- e("UPDATE_HOTEL_ROOM_OFFER", {
1595
- hotelId: t,
1596
- hotelRoomOffer: {
1597
- isLoading: !0
1598
- },
1599
- id: r
1600
- });
1601
- const i = await o.hotelRoomOffers.create({
1602
- body: {
1603
- addBreakfast: n,
1604
- currency: window.RevolugoElements.config.currency,
1605
- hotelRoomOffers: [
1606
- {
1607
- count: 1,
1608
- hotelRoomOfferId: r
1609
- }
1610
- ],
1611
- lang: window.RevolugoElements.config.lang
1612
- }
1613
- });
1614
- e("UPDATE_HOTEL_ROOM_OFFER", {
1615
- hotelId: t,
1616
- hotelRoomOffer: {
1617
- ...i.hotelRoomOffer,
1618
- isLoading: !1
1619
- },
1620
- id: r
1621
- });
1622
- }
1623
- },
1624
- resetHotelRoomOffers({ commit: e }, t) {
1625
- t != null && t.hotelId ? e("SET_HOTEL_ROOM_OFFERS", {
1626
- hotelId: t.hotelId
1627
- }) : e("RESET_HOTEL_ROOM_OFFERS");
1628
- },
1629
- async retrieveHotelRoomOffers({ commit: e, state: { hotelRoomOffersByHotel: t } }, r) {
1630
- const n = v();
1631
- n && (e("SET_HOTEL_ROOM_OFFERS", {
1632
- hasError: !1,
1633
- hotelId: r.hotelId,
1634
- isPolling: !0,
1635
- offers: null,
1636
- inProgressOffers: []
1637
- }), await n.hotelRoomOffers.list(
1638
- {
1639
- currency: window.RevolugoElements.config.currency,
1640
- hotelRoomOfferRequestId: r.hotelRoomOfferRequestId,
1641
- lang: window.RevolugoElements.config.lang
1642
- },
1643
- (o, i) => {
1644
- var s, a, u, f, c;
1645
- if (o) {
1646
- e("SET_HOTEL_ROOM_OFFERS", {
1647
- hasError: !0,
1648
- hotelId: r.hotelId,
1649
- hotelTimezone: "",
1650
- isPolling: !1,
1651
- offers: [],
1652
- inProgressOffers: []
1653
- }), console.error("Cannot retrieve hotel room offers:", o);
1654
- return;
1655
- }
1656
- if ((s = i == null ? void 0 : i.data) != null && s.hotelRoomOffers) {
1657
- window.RevolugoElements.eventBus.$emit(
1658
- m.HOTEL_ROOM_OFFERS_RETRIEVED,
1659
- i
1660
- );
1661
- const h = (a = i == null ? void 0 : i.data) == null ? void 0 : a.hotelTimezone, l = (u = i == null ? void 0 : i.data) != null && u.hotelRoomOffers ? [...i.data.hotelRoomOffers] : [], d = ((f = t[r.hotelId]) == null ? void 0 : f.inProgressOffers) || [];
1662
- for (const O of d)
1663
- l.findIndex(
1664
- (p) => p.id === O.id
1665
- ) === -1 && l.push(O);
1666
- e("SET_HOTEL_ROOM_OFFERS", {
1667
- hasError: !1,
1668
- hotelId: r.hotelId,
1669
- hotelTimezone: h,
1670
- isPolling: (((c = i == null ? void 0 : i.meta) == null ? void 0 : c.status) ?? "").toLowerCase() !== "complete",
1671
- offers: l.sort((O, R) => O.price - R.price),
1672
- inProgressOffers: d
1673
- });
1674
- }
1675
- }
1676
- ));
1677
- }
1678
- }, rr = {
1679
- actions: tr,
1680
- getters: Zt,
1681
- mutations: er,
1682
- namespaced: !0,
1683
- state: Pe
1684
- };
1685
- I.use(it);
1686
- const he = {}, nr = {}, or = new _({
1687
- actions: nr,
1688
- modules: {
1689
- breakpointService: It,
1690
- hotelOfferRequest: xt,
1691
- hotelOffers: zt,
1692
- hotelRoomOfferRequest: Xt,
1693
- hotelRoomOffers: rr,
1694
- hotelImages: Pt
1695
- },
1696
- mutations: F.mutations(he),
1697
- plugins: [gt.plugin],
1698
- state: he,
1699
- strict: Ae
1700
- }), lr = {
1701
- install(e) {
1702
- e.mixin({
1703
- store: or
1704
- });
1705
- }
1706
- };
1707
- export {
1708
- be as D,
1709
- Nt as F,
1710
- Bt as P,
1711
- qt as R,
1712
- or as a,
1713
- Gt as b,
1714
- ur as d,
1715
- fr as g,
1716
- lr as s
1717
- };
1718
- //# sourceMappingURL=revolugo.store.DPvvq0Rz.min.js.map