PageSourceSearch

https://dazzlerrecoleta.com/wp-content/themes/dazzler-theme/assets/js/search-mobile.js

js dazzlerrecoleta.com collected 2026-10-08 05:16:03 UTC 18,579 bytes, 259 lines download raw bytes

1// This code was minified and deminified, please refer to the desktop version
2// to make sense of this. Then make your changes here.
3Vue.component("search-bar-mobile", {
4  name: "search-bar-mobile",
5  data: function () {
6    return {
7      rooms: 1,
8      adults: 1,
9      childs: 0,
10      activeRooms: !1,
11      activeSpecials: !1,
12      specials: "",
13      icon: "fas fa-angle-down",
14      showCorporativeCodeInput: !1,
15      showGroupCode: !1,
16      groupCode: "",
17      corporativeCode: "",
18      slideup: !1,
19      checkIn: "",
20      checkOut: "",
21      lang: "",
22      hotelSlug: "",
23    };
24  },
25  created: function () {
26    window.addEventListener("click", this.close);
27  },
28  beforeDestroy: function () {
29    window.removeEventListener("click", this.close);
30  },
31  mounted: function () {
32    let e, o, s, t;
33    (this.lang = "es"),
34      (e = "CANCELAR"),
35      (o = "LIMPIAR"),
36      (s = "HOY"),
37      window.location.href.includes("/en/") && ((this.lang = "en"), (e = "CANCEL"), (o = "CLEAR"), (s = "TODAY")),
38      window.location.href.includes("/pt-br/") && ((this.lang = "por"), (e = "CANCELAR"), (o = "LIMPAR"), (s = "HOJE")),
39      (this.specials = this.specialName),
40      (t = "por" === this.lang ? "pt" : this.lang);
41    if (window.location.href.includes("https://dazzlerasuncion.com/")) {
42      this.hotelSlug = 'dazzler/asuncion-paraguay/dazzler-hotel-asuncion';
43    } else if (window.location.href.includes("https://dazzlercolonia.com/")) {
44      this.hotelSlug = 'dazzler/colonia-del-sacramento-uruguay/dazzler-colonia';
45    } else if (window.location.href.includes("https://dazzlermontevideo.com/")) {
46      this.hotelSlug = 'dazzler/montevideo-uruguay/dazzler-hotel-montevideo';
47    } else if (window.location.href.includes("https://dazzlermaipu.com/")) {
48      this.hotelSlug = 'dazzler/buenos-aires-argentina/dazzler-maipu';
49    } else if (window.location.href.includes("https://dazzlerpalermo.com/")) {
50      this.hotelSlug = 'dazzler/buenos-aires-argentina/dazzler-palermo-buenos-aires';
51    } else if (window.location.href.includes("https://dazzlerpuertomadryn.com/")) {
52      this.hotelSlug = 'dazzler/puerto-madryn-argentina/dazzler-puerto-madryn';
53    } else if (window.location.href.includes("https://dazzlerrosario.com/")) {
54      this.hotelSlug = 'dazzler/rosario-argentina/dazzler-rosario';
55    } else if (window.location.href.includes("https://dazzlerrecoleta.com/")) {
56      this.hotelSlug = 'dazzler/buenos-aires-argentina/dazzler-recoleta';
57    } else if (window.location.href.includes("https://dazzlerpolo.com/")) {
58      this.hotelSlug = 'dazzler/buenos-aires-argentina/dazzler-polo-hotel-buenos-aires';
59    } else if (window.location.href.includes("https://dazzlersanmartin.com/")) {
60      this.hotelSlug = 'dazzler/buenos-aires-argentina/dazzler-san-martin';
61    } else if (window.location.href.includes("https://dazzlerlaplata.com/")) {
62      this.hotelSlug = 'dazzler/la-plata/dazzler-la-plata';
63    } else {
64      this.hotelSlug = 'dazzler/ciudad-del-este-paraguay/dazzler-ciudad-del-este';
65    }
66    const i = bulmaCalendar.attach("#checkInMobile", {
67      lang: t,
68      type: "date",
69      labelFrom: "Check-in",
70      labelTo: "Check-out",
71      isRange: "true",
72      dateFormat: "DD MMM YYYY",
73      startDate: "",
74      endDate: "",
75      minDate: new Date(),
76      cancelLabel: e,
77      clearLabel: o,
78      todayLabel: s,
79    })[0];
80    i.on("show", (e) => {
81      (this.activeRooms = !1), (this.activeSpecials = !1);
82    }),
83      i.on("select", (e) => {
84        (this.checkIn = e.data.value().split("-")[0].trim()), (this.checkOut = e.data.value().split("-")[1].trim()), (document.getElementsByClassName("datetimepicker-clear-button")[1].style.display = "block");
85      }),
86      i.on("clear", (e) => {
87        (document.getElementsByClassName("datetimepicker-clear-button")[1].style.display = "none"), (this.checkIn = ""), (this.checkOut = "");
88      }),
89      "" === this.checkIn && "" === this.checkOut && (document.getElementsByClassName("datetimepicker-clear-button")[0].style.display = "none");
90  },
91  methods: {
92    formatDate(e) {
93      if (e.includes("ene")) {
94        let o = e.split(" ");
95        return (o[1] = "jan"), (o = o.join(" "));
96      }
97      if (e.includes("fev")) {
98        let o = e.split(" ");
99        return (o[1] = "jan"), (o = o.join(" "));
100      }
101      if (e.includes("abr")) {
102        console.log(e);
103        let o = e.split(" ");
104        return console.log(o), (o[1] = "apr"), (o = o.join(" "));
105      }
106      if (e.includes("mai")) {
107        let o = e.split(" ");
108        return (o[1] = "may"), (o = o.join(" "));
109      }
110      if (e.includes("ago")) {
111        let o = e.split(" ");
112        return (o[1] = "aug"), (o = o.join(" "));
113      }
114      if (e.includes("set")) {
115        let o = e.split(" ");
116        return (o[1] = "sep"), (o = o.join(" "));
117      }
118      if (e.includes("out")) {
119        let o = e.split(" ");
120        return (o[1] = "oct"), (o = o.join(" "));
121      }
122      if (e.includes("dic") || e.includes("dez")) {
123        let o = e.split(" ");
124        return (o[1] = "dec"), (o = o.join(" "));
125      }
126      return e;
127    },
128    search() {
129      // Google Analytics Event to track button clicks.
130      //ga('send', 'event', 'room-availability', 'click', 'search-bar');
131
132      let e, o;
133      return (
134        (e = "" === this.checkIn ? new Date().toLocaleDateString("en").split("/").join("-") : new Date(this.formatDate(this.checkIn)).toLocaleDateString("en").split("/").join("-")),
135        (o = "" === this.checkOut ? new Date(new Date().setDate(new Date().getDate() + 1)).toLocaleDateString("en").split("/").join("-") : new Date(this.formatDate(this.checkOut)).toLocaleDateString("en").split("/").join("-")),
136        "en" === this.lang
137          ? "wyndham rewards points" === this.specials.toLowerCase()
138            ? window.open(
139              `https://www.wyndhamhotels.com/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=true&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
140            )
141            : "" !== this.corporativeCode
142              ? window.open(
143                `https://www.wyndhamhotels.com/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&corpCode=${this.corporativeCode}`
144              )
145              : "" !== this.groupCode
146                ? window.open(
147                  `https://www.wyndhamhotels.com/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&groupCode=${this.groupCode}`
148                )
149                : window.open(
150                  `https://www.wyndhamhotels.com/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
151                )
152          : "es" === this.lang
153            ? "puntos wyndham rewards" === this.specials.toLowerCase()
154              ? window.open(
155                `https://www.wyndhamhotels.com/es-xl/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=true&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
156              )
157              : "" !== this.corporativeCode
158                ? window.open(
159                  `https://www.wyndhamhotels.com/es-xl/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&corpCode=${this.corporativeCode}`
160                )
161                : "" !== this.groupCode
162                  ? window.open(
163                    `https://www.wyndhamhotels.com/es-xl/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&groupCode=${this.groupCode}`
164                  )
165                  : window.open(
166                    `https://www.wyndhamhotels.com/es-xl/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
167                  )
168            : "por" === this.lang
169              ? "pontos wyndham rewards" === this.specials.toLowerCase()
170                ? window.open(
171                  `https://www.wyndhamhotels.com/pt-br/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=true&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
172                )
173                : "" !== this.corporativeCode
174                  ? window.open(
175                    `https://www.wyndhamhotels.com/pt-br/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&corpCode=${this.corporativeCode}`
176                  )
177                  : "" !== this.groupCode
178                    ? window.open(
179                      `https://www.wyndhamhotels.com/pt-br/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}&groupCode=${this.groupCode}`
180                    )
181                    : window.open(
182                      `https://www.wyndhamhotels.com/pt-br/${this.hotelSlug}/rooms-rates?checkin_date=${e}&checkout_date=${o}&useWRPoints=false&rooms=${this.rooms}&adults=${this.adults}&children=${this.childs}`
183                    )
184              : void 0
185      );
186    },
187    close(e) {
188      this.$el.contains(e.target) || ((this.activeRooms = !1), (this.activeSpecials = !1));
189    },
190    addRoom: function () {
191      9 !== this.rooms && (this.rooms += 1);
192    },
193    removeRoom: function () {
194      1 !== this.rooms && (this.rooms -= 1);
195    },
196    addAdult: function () {
197      4 !== this.adults && (this.adults += 1);
198    },
199    removeAdult: function () {
200      1 !== this.adults && (this.adults -= 1);
201    },
202    addChild: function () {
203      8 !== this.childs && (this.childs += 1);
204    },
205    removeChild: function () {
206      0 !== this.childs && (this.childs -= 1);
207    },
208    toggleRoom: function () {
209      (this.activeRooms = !this.activeRooms), (this.activeSpecials = !1);
210    },
211    toggleSpecials: function () {
212      (this.activeSpecials = !this.activeSpecials), (this.activeRooms = !1);
213    },
214    resetSpecials: function () {
215      (this.specials = this.specialName), (this.showCorporativeCodeInput = !1), (this.showGroupCode = !1);
216    },
217    selectCorporativeCode: function () {
218      (this.specials = "Código Corporativo"), (this.showCorporativeCodeInput = !this.showCorporativeCodeInput), (this.showGroupCode = !1), (this.groupCode = "");
219    },
220    selectGroupCode: function () {
221      (this.specials = "Código Grupo"), (this.showGroupCode = !this.showGroupCode), (this.showCorporativeCodeInput = !1), (this.corporativeCode = "");
222    },
223    selectPoints: function () {
224      (this.specials = "Puntos Wyndham Rewards"), (this.showGroupCode = !1), (this.showCorporativeCodeInput = !1), (this.groupCode = ""), (this.corporativeCode = "");
225    },
226  },
227  computed: {
228    roomName() {
229      return "es" === this.lang ? "Habitaciones" : "en" === this.lang ? "Rooms" : "por" === this.lang ? "Quartos" : void 0;
230    },
231    adultName() {
232      return "es" === this.lang || "por" === this.lang ? "Adultos" : "en" === this.lang ? "Adults" : void 0;
233    },
234    childName() {
235      return "es" === this.lang ? "Niños" : "en" === this.lang ? "Children" : "por" === this.lang ? "Filhos" : void 0;
236    },
237    specialName() {
238      return "es" === this.lang ? "Tarifas Especiales" : "en" === this.lang ? "Special Rates" : "por" === this.lang ? "Tarifas Especiais" : void 0;
239    },
240    pointsName() {
241      return "es" === this.lang ? "Puntos Wyndham Rewards" : "en" === this.lang ? "Wyndham Rewards Points" : "por" === this.lang ? "Pontos Wyndham Rewards" : void 0;
242    },
243    corporativeName() {
244      return "es" === this.lang || "por" === this.lang ? "Código Corporativo" : "en" === this.lang ? "Corporative 
244Code" : void 0;
245    },
246    groupName() {
247      return "es" === this.lang ? "Código Grupo" : "en" === this.lang ? "Group Code" : "por" === this.lang ? "Código do grupo" : void 0;
248    },
249    searchName() {
250      return "es" === this.lang ? "Buscar" : "en" === this.lang ? "Search" : "por" === this.lang ? "Pesquisar" : void 0;
251    },
252    searchAvailability() {
253      return "es" === this.lang ? "Buscar disponibilidad" : "en" === this.lang ? "Check availability" : "por" === this.lang ? "Verificar disponibilidade" : void 0;
254    },
255  },
256  template:
257    '\n  <div>\n  <div class="slideup-button">\n      <button class="button" v-on:click="slideup = !slideup">\n          <span>Buscar disponibilidad</span>\n          <span class="icon is-small">\n          <i class="fas fa-angle-up"></i>\n          </span>\n      </button>\n  </div>\n  <div class="slideup" :class="{\'slideup-close\': !slideup}">\n  <button class="button modal-title" v-on:click="slideup = !slideup">\n          <span>{{ searchAvailability }}</span>\n          <span class="icon is-small">\n          <i :class="[slideup ? \'fas fa-angle-down\' : \'fas fa-angle-up\']"></i>\n          </span>\n      </button>\n  <div class="field">\n      <input id="checkInMobile" type="date">\n  </div>\n  <div class="field">\n      <div class="control">\n          <div id="habDropdown" class="dropdown" :class="{\'is-active\': activeRooms}">\n              <div class="dropdown-trigger">\n                  <button v-on:click="toggleRoom" class="button" aria-haspopup="true" aria-controls="dropdown-menu">\n                  <span>{{rooms}} {{roomName}}, {{adults}} {{adultName}}, {{childs}} {{childName}}</span>\n                  <span class="icon is-small">\n                      <i class="fas fa-angle-down" aria-hidden="true"></i>\n                  </span>\n                  </button>\n              </div>\n              <div class="dropdown-menu" id="dropdown-menu" role="menu">\n                  <div class="dropdown-content">\n                      <div href="#" class="dropdown-item">\n                      {{ roomName }}\n                          <div style="float: right; display: flex">\n                              <button v-on:click="removeRoom" name="add" class="hab-button">\n                                  <label for="" class="label"> - </label>\n                              </button>\n                              <p class="hab-box" name="room">{{ rooms }}</p>\n                              <button v-on:click="addRoom" name="remove" class="hab-button" >\n                                  <label for="" class="label"> + </label>\n                              </button>\n                          </div>\n                      </div>\n                      <hr class="dropdown-divider">\n                      <div href="#" class="dropdown-item">\n                        {{ adultName }}\n                          <div style="float: right; display: flex">\n                              <button v-on:click="removeAdult" class="hab-button" name="add">\n                                  <label for="" class="label"> - </label>\n                              </button>\n                              <p class="hab-box">{{ adults }}</p>\n                              <button v-on:click="addAdult" class="hab-button" name="remove">\n                                  <label for="" class="label"> + </label>\n                              </button>\n                          </div>\n                      </div>\n                      <hr class="dropdown-divider">\n                      <div href="#" class="dropdown-item">\n                        {{ childName }}\n                          <div style="float: right; display: flex">\n                              <button v-on:click="removeChild" class="hab-button" name="add">\n                                  <label for="" class="label"> - </label>\n                              </button>\n                              <p class="hab-box">{{ childs }}</p>\n                              <button v-on:click="addChild" class="hab-button" name="remove">\n                                  <label for="" class="label"> + </label>\n                              </button>\n                          </div>\n                      </div>\n                  </div>\n              </div>\n          </div>\n      </div>\n  </div>\n  <div class="field">\n      <div class="control">\n          <div id="habDropdown" class="dropdown" :class="{\'is-active\': activeSpecials}">\n              <div class="dropdown-trigger">\n                  <button v-on:click="toggleSpecials" class="button" aria-haspopup="true" aria-controls="dropdown-menu">
257\n                  <span name="specials">{{ specials }}</span>\n                  <span class="icon is-small" v-on:click="resetSpecials">\n                      <i name="iconEspecial" aria-hidden="true" :class="[specials === specialName ? \'fas fa-angle-down\' : \'fas fa-times\']"></i>\n                  </span>\n                  </button>\n              </div>\n              <div class="dropdown-menu" id="dropdown-menu" role="menu">\n                  <div class="dropdown-content">\n                  <div href="#" class="dropdown-item">\n                      <a v-on:click="selectPoints" name="points">{{ pointsName }}</a>\n                  </div>\n                  <hr class="dropdown-divider">\n                  <div href="#" class="dropdown-item">\n                  <a v-on:click="selectCorporativeCode" name="corpCode">{{ corporativeName }}</a> <br>\n                      <input v-model="corporativeCode" v-if="showCorporativeCodeInput" id="corpCode" class="input" type="text">\n                  </div>\n                  <hr class="dropdown-divider">\n                  <div href="#" class="dropdown-item">\n                      <a v-on:click="selectGroupCode">{{ groupName }}</a> <br>\n                      <input v-model="groupCode" v-if="showGroupCode" id="groupCode" class="input" type="text">\n                  </div>\n                  </div>\n              </div>\n              </div>\n      </div>\n  </div>\n  <div class="field is-grouped is-grouped-centered search-mobile-button">\n      <p class="control">\n          <button v-on:click="search" class="button is-primary button-action"  id="search-button">\n          {{searchName}}\n          </button>\n      </p>\n  </div>    \n</div>\n</div>\n</div>\n  ',
258}),
259  new Vue({ el: "#search-bar-mobile" });

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.