@colabcommerce/elements 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/CartForm.js +26 -26
- package/dist/{Container-BPKk2w_q.js → Container-7bFgo-eP.js} +1 -1
- package/dist/Modal-BqRDRCTs.js +863 -0
- package/dist/ProductForm.js +178 -157
- package/dist/Retailer.js +1420 -1351
- package/dist/StoreLocator.js +590 -449
- package/dist/addressComponentsToAddress-CNK2WJ24.js +1932 -0
- package/dist/{browser-ponyfill-CAlAl1ZX.js → browser-ponyfill-BEmK0BQJ.js} +1 -1
- package/dist/{globals-D3YPIcjZ.js → globals-C3lGVSJ0.js} +710 -702
- package/dist/index-DqABFy0O.js +137 -0
- package/dist/index-TPy0P4tu.js +98 -0
- package/dist/style.css +1 -1
- package/package.json +3 -2
- package/vite.config.js +3 -0
- package/dist/addressComponentsToAddress-CHYXse0U.js +0 -153
- package/dist/index-BComOHrk.js +0 -1909
- package/dist/index-Dv5Y39GK.js +0 -98
- package/dist/index-Ot1CirR6.js +0 -932
package/dist/StoreLocator.js
CHANGED
|
@@ -1,168 +1,168 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
import { a as
|
|
5
|
-
import { C as
|
|
6
|
-
import { S as
|
|
7
|
-
import { A as
|
|
8
|
-
const
|
|
9
|
-
wrapper:
|
|
10
|
-
title:
|
|
11
|
-
hours:
|
|
12
|
-
open:
|
|
13
|
-
closed:
|
|
14
|
-
soon:
|
|
15
|
-
subHoursWrapper:
|
|
16
|
-
subHours:
|
|
17
|
-
today:
|
|
18
|
-
toggle:
|
|
19
|
-
shown:
|
|
20
|
-
shownHours:
|
|
21
|
-
},
|
|
22
|
-
const { t:
|
|
1
|
+
import { jsx as s, jsxs as l, Fragment as se } from "react/jsx-runtime";
|
|
2
|
+
import * as B from "react";
|
|
3
|
+
import T, { useState as k, useRef as pe, useEffect as D, useLayoutEffect as Ee, useMemo as he, useCallback as Te, Suspense as He } from "react";
|
|
4
|
+
import { a as E, b as je, c, d as Y, n as We, o as C, C as ne, p as U, q as F, T as Re, r as Be, t as De, E as fe, s as Fe, v as Pe, R as ge, e as Ae, h as Q, i as ze, B as oe, F as w, I as Ge, l as Le, m as Ue } from "./globals-C3lGVSJ0.js";
|
|
5
|
+
import { C as qe, u as H, L as Je, d as Qe, l as Ve, a as Xe, S as Ke, b as Ye, A as Ze, c as et, w as tt, e as st, f as at } from "./addressComponentsToAddress-CNK2WJ24.js";
|
|
6
|
+
import { S as nt } from "./index-TPy0P4tu.js";
|
|
7
|
+
import { A as rt, d as it, u as ct, a as ot, B as lt, F as dt, b as mt, g as ut, M as V } from "./Modal-BqRDRCTs.js";
|
|
8
|
+
const pt = "-E4vU", ht = "Y9kow", ft = "x0-tL", gt = "XBGE-", vt = "oUgyZ", yt = "_5xvIm", wt = "yR8v8", Nt = "-FfTB", bt = "mPv4I", _t = "DizAj", Ct = "pL7JB", It = "uUoP0", N = {
|
|
9
|
+
wrapper: pt,
|
|
10
|
+
title: ht,
|
|
11
|
+
hours: ft,
|
|
12
|
+
open: gt,
|
|
13
|
+
closed: vt,
|
|
14
|
+
soon: yt,
|
|
15
|
+
subHoursWrapper: wt,
|
|
16
|
+
subHours: Nt,
|
|
17
|
+
today: bt,
|
|
18
|
+
toggle: _t,
|
|
19
|
+
shown: Ct,
|
|
20
|
+
shownHours: It
|
|
21
|
+
}, St = ({ i: e, hour: t }) => {
|
|
22
|
+
const { t: n, locale: a } = E(), i = /* @__PURE__ */ new Date();
|
|
23
23
|
i.setUTCHours(t.open_at_hour - t.utc_offset_minute / 60, t.open_at_minute, 0, 0);
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
const
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
|
|
24
|
+
const r = /* @__PURE__ */ new Date();
|
|
25
|
+
r.setUTCHours(t.close_at_hour - t.utc_offset_minute / 60, t.close_at_minute, 0, 0);
|
|
26
|
+
const d = i.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" }), m = r.getUTCMinutes() === 0 ? new Intl.DateTimeFormat(a, { hour: "numeric" }) : new Intl.DateTimeFormat(a, { hour: "numeric", minute: "2-digit" });
|
|
27
|
+
return /* @__PURE__ */ l("div", { className: `${N.subHours} ${t.day === (/* @__PURE__ */ new Date()).getDay() ? N.today : ""}`, children: [
|
|
28
|
+
/* @__PURE__ */ s("div", { children: n(`store.days.${t.day}`) }),
|
|
29
|
+
/* @__PURE__ */ l("div", { children: [
|
|
30
|
+
d.format(i),
|
|
31
31
|
" - ",
|
|
32
|
-
|
|
32
|
+
m.format(r)
|
|
33
33
|
] })
|
|
34
34
|
] }, t.day);
|
|
35
|
-
},
|
|
36
|
-
const { t:
|
|
37
|
-
if (!(e == null ? void 0 : e.find((
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
return
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */
|
|
43
|
-
/* @__PURE__ */
|
|
44
|
-
|
|
35
|
+
}, Ot = ({ hours: e, defaultOpen: t = !1 }) => {
|
|
36
|
+
const { t: n, locale: a } = E(), { isOpen: i, openingSoon: r, closingSoon: d, openAt: m, closeAt: u, openFormatter: p, closeAtFormatter: f } = je(e), [y, _] = k(t), o = (/* @__PURE__ */ new Date()).getDay();
|
|
37
|
+
if (!(e == null ? void 0 : e.find((O) => O.day === o))) return null;
|
|
38
|
+
const W = i, I = e.sort((O, M) => O.day - M.day);
|
|
39
|
+
let S = null, h = null;
|
|
40
|
+
return W ? d ? (h = c(N.hours, N.soon), S = /* @__PURE__ */ s("span", { children: n("store.closingSoon") })) : (h = c(N.hours, N.open), S = /* @__PURE__ */ s("span", { children: n("store.openNow") })) : r ? (h = c(N.hours, N.soon), S = /* @__PURE__ */ s("span", { children: n("store.openingSoon") })) : (h = c(N.hours, N.closed), S = /* @__PURE__ */ s("span", { children: n("store.closedNow") })), /* @__PURE__ */ l("div", { className: y ? c(N.wrapper, N.shown) : c(N.wrapper), children: [
|
|
41
|
+
/* @__PURE__ */ l("div", { className: c(N.title), onClick: () => _(!y), children: [
|
|
42
|
+
/* @__PURE__ */ l("span", { className: h, children: [
|
|
43
|
+
/* @__PURE__ */ s("i", { className: "lpe-icons", children: "clock" }),
|
|
44
|
+
S
|
|
45
45
|
] }),
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
/* @__PURE__ */ l("span", { className: N.shownHours, children: [
|
|
47
|
+
p.format(m),
|
|
48
48
|
" - ",
|
|
49
|
-
|
|
49
|
+
f.format(u)
|
|
50
50
|
] }),
|
|
51
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ s("i", { className: c("lpe-icons", N.toggle), children: "arrow" })
|
|
52
52
|
] }),
|
|
53
|
-
/* @__PURE__ */
|
|
53
|
+
/* @__PURE__ */ s(qe, { in: y, children: /* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("div", { className: c(N.subHoursWrapper), children: I.map((O, M) => /* @__PURE__ */ s(St, { i: M, hour: O }, O.day)) }) }) })
|
|
54
54
|
] });
|
|
55
55
|
};
|
|
56
|
-
var
|
|
56
|
+
var ve = {
|
|
57
57
|
color: void 0,
|
|
58
58
|
size: void 0,
|
|
59
59
|
className: void 0,
|
|
60
60
|
style: void 0,
|
|
61
61
|
attr: void 0
|
|
62
|
-
},
|
|
63
|
-
function
|
|
62
|
+
}, le = T.createContext && /* @__PURE__ */ T.createContext(ve), xt = ["attr", "size", "title"];
|
|
63
|
+
function Mt(e, t) {
|
|
64
64
|
if (e == null) return {};
|
|
65
|
-
var
|
|
65
|
+
var n = $t(e, t), a, i;
|
|
66
66
|
if (Object.getOwnPropertySymbols) {
|
|
67
|
-
var
|
|
68
|
-
for (i = 0; i <
|
|
69
|
-
a =
|
|
67
|
+
var r = Object.getOwnPropertySymbols(e);
|
|
68
|
+
for (i = 0; i < r.length; i++)
|
|
69
|
+
a = r[i], !(t.indexOf(a) >= 0) && Object.prototype.propertyIsEnumerable.call(e, a) && (n[a] = e[a]);
|
|
70
70
|
}
|
|
71
|
-
return
|
|
71
|
+
return n;
|
|
72
72
|
}
|
|
73
|
-
function
|
|
73
|
+
function $t(e, t) {
|
|
74
74
|
if (e == null) return {};
|
|
75
|
-
var
|
|
75
|
+
var n = {};
|
|
76
76
|
for (var a in e)
|
|
77
77
|
if (Object.prototype.hasOwnProperty.call(e, a)) {
|
|
78
78
|
if (t.indexOf(a) >= 0) continue;
|
|
79
|
-
|
|
79
|
+
n[a] = e[a];
|
|
80
80
|
}
|
|
81
|
-
return
|
|
81
|
+
return n;
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
return
|
|
83
|
+
function X() {
|
|
84
|
+
return X = Object.assign ? Object.assign.bind() : function(e) {
|
|
85
85
|
for (var t = 1; t < arguments.length; t++) {
|
|
86
|
-
var
|
|
87
|
-
for (var a in
|
|
88
|
-
Object.prototype.hasOwnProperty.call(
|
|
86
|
+
var n = arguments[t];
|
|
87
|
+
for (var a in n)
|
|
88
|
+
Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
89
89
|
}
|
|
90
90
|
return e;
|
|
91
|
-
},
|
|
91
|
+
}, X.apply(this, arguments);
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
var
|
|
93
|
+
function de(e, t) {
|
|
94
|
+
var n = Object.keys(e);
|
|
95
95
|
if (Object.getOwnPropertySymbols) {
|
|
96
96
|
var a = Object.getOwnPropertySymbols(e);
|
|
97
97
|
t && (a = a.filter(function(i) {
|
|
98
98
|
return Object.getOwnPropertyDescriptor(e, i).enumerable;
|
|
99
|
-
})),
|
|
99
|
+
})), n.push.apply(n, a);
|
|
100
100
|
}
|
|
101
|
-
return
|
|
101
|
+
return n;
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function K(e) {
|
|
104
104
|
for (var t = 1; t < arguments.length; t++) {
|
|
105
|
-
var
|
|
106
|
-
t % 2 ?
|
|
107
|
-
|
|
108
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(
|
|
109
|
-
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(
|
|
105
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
106
|
+
t % 2 ? de(Object(n), !0).forEach(function(a) {
|
|
107
|
+
kt(e, a, n[a]);
|
|
108
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : de(Object(n)).forEach(function(a) {
|
|
109
|
+
Object.defineProperty(e, a, Object.getOwnPropertyDescriptor(n, a));
|
|
110
110
|
});
|
|
111
111
|
}
|
|
112
112
|
return e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return t =
|
|
114
|
+
function kt(e, t, n) {
|
|
115
|
+
return t = Et(t), t in e ? Object.defineProperty(e, t, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : e[t] = n, e;
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
var t =
|
|
117
|
+
function Et(e) {
|
|
118
|
+
var t = Tt(e, "string");
|
|
119
119
|
return typeof t == "symbol" ? t : t + "";
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Tt(e, t) {
|
|
122
122
|
if (typeof e != "object" || !e) return e;
|
|
123
|
-
var
|
|
124
|
-
if (
|
|
125
|
-
var a =
|
|
123
|
+
var n = e[Symbol.toPrimitive];
|
|
124
|
+
if (n !== void 0) {
|
|
125
|
+
var a = n.call(e, t);
|
|
126
126
|
if (typeof a != "object") return a;
|
|
127
127
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
128
128
|
}
|
|
129
129
|
return (t === "string" ? String : Number)(e);
|
|
130
130
|
}
|
|
131
|
-
function
|
|
132
|
-
return e && e.map((t,
|
|
133
|
-
key:
|
|
134
|
-
}, t.attr),
|
|
131
|
+
function ye(e) {
|
|
132
|
+
return e && e.map((t, n) => /* @__PURE__ */ T.createElement(t.tag, K({
|
|
133
|
+
key: n
|
|
134
|
+
}, t.attr), ye(t.child)));
|
|
135
135
|
}
|
|
136
|
-
function
|
|
137
|
-
return (t) => /* @__PURE__ */
|
|
138
|
-
attr:
|
|
139
|
-
}, t),
|
|
136
|
+
function Ht(e) {
|
|
137
|
+
return (t) => /* @__PURE__ */ T.createElement(jt, X({
|
|
138
|
+
attr: K({}, e.attr)
|
|
139
|
+
}, t), ye(e.child));
|
|
140
140
|
}
|
|
141
|
-
function
|
|
142
|
-
var t = (
|
|
141
|
+
function jt(e) {
|
|
142
|
+
var t = (n) => {
|
|
143
143
|
var {
|
|
144
144
|
attr: a,
|
|
145
145
|
size: i,
|
|
146
|
-
title:
|
|
147
|
-
} = e,
|
|
148
|
-
return
|
|
146
|
+
title: r
|
|
147
|
+
} = e, d = Mt(e, xt), m = i || n.size || "1em", u;
|
|
148
|
+
return n.className && (u = n.className), e.className && (u = (u ? u + " " : "") + e.className), /* @__PURE__ */ T.createElement("svg", X({
|
|
149
149
|
stroke: "currentColor",
|
|
150
150
|
fill: "currentColor",
|
|
151
151
|
strokeWidth: "0"
|
|
152
|
-
},
|
|
153
|
-
className:
|
|
154
|
-
style:
|
|
155
|
-
color: e.color ||
|
|
156
|
-
},
|
|
157
|
-
height:
|
|
158
|
-
width:
|
|
152
|
+
}, n.attr, a, d, {
|
|
153
|
+
className: u,
|
|
154
|
+
style: K(K({
|
|
155
|
+
color: e.color || n.color
|
|
156
|
+
}, n.style), e.style),
|
|
157
|
+
height: m,
|
|
158
|
+
width: m,
|
|
159
159
|
xmlns: "http://www.w3.org/2000/svg"
|
|
160
|
-
}),
|
|
160
|
+
}), r && /* @__PURE__ */ T.createElement("title", null, r), e.children);
|
|
161
161
|
};
|
|
162
|
-
return
|
|
162
|
+
return le !== void 0 ? /* @__PURE__ */ T.createElement(le.Consumer, null, (n) => t(n)) : t(ve);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
165
|
-
return
|
|
164
|
+
function Wt(e) {
|
|
165
|
+
return Ht({ attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z" }, child: [] }] })(e);
|
|
166
166
|
}
|
|
167
167
|
/**
|
|
168
168
|
* @license lucide-react v0.542.0 - ISC
|
|
@@ -170,28 +170,28 @@ function $t(e) {
|
|
|
170
170
|
* This source code is licensed under the ISC license.
|
|
171
171
|
* See the LICENSE file in the root directory of this source tree.
|
|
172
172
|
*/
|
|
173
|
-
const
|
|
173
|
+
const Rt = [
|
|
174
174
|
["path", { d: "m15 14 5-5-5-5", key: "12vg1m" }],
|
|
175
175
|
["path", { d: "M4 20v-7a4 4 0 0 1 4-4h12", key: "1lu4f8" }]
|
|
176
|
-
],
|
|
176
|
+
], Bt = Y("corner-up-right", Rt);
|
|
177
177
|
/**
|
|
178
178
|
* @license lucide-react v0.542.0 - ISC
|
|
179
179
|
*
|
|
180
180
|
* This source code is licensed under the ISC license.
|
|
181
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
182
182
|
*/
|
|
183
|
-
const
|
|
183
|
+
const Dt = [
|
|
184
184
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
185
185
|
["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
|
|
186
186
|
["path", { d: "M2 12h20", key: "9i4pu4" }]
|
|
187
|
-
],
|
|
187
|
+
], Ft = Y("globe", Dt);
|
|
188
188
|
/**
|
|
189
189
|
* @license lucide-react v0.542.0 - ISC
|
|
190
190
|
*
|
|
191
191
|
* This source code is licensed under the ISC license.
|
|
192
192
|
* See the LICENSE file in the root directory of this source tree.
|
|
193
193
|
*/
|
|
194
|
-
const
|
|
194
|
+
const Pt = [
|
|
195
195
|
[
|
|
196
196
|
"path",
|
|
197
197
|
{
|
|
@@ -202,14 +202,14 @@ const Tt = [
|
|
|
202
202
|
["path", { d: "M7 11h10", key: "1twpyw" }],
|
|
203
203
|
["path", { d: "M7 15h6", key: "d9of3u" }],
|
|
204
204
|
["path", { d: "M7 7h8", key: "af5zfr" }]
|
|
205
|
-
],
|
|
205
|
+
], At = Y("message-square-text", Pt);
|
|
206
206
|
/**
|
|
207
207
|
* @license lucide-react v0.542.0 - ISC
|
|
208
208
|
*
|
|
209
209
|
* This source code is licensed under the ISC license.
|
|
210
210
|
* See the LICENSE file in the root directory of this source tree.
|
|
211
211
|
*/
|
|
212
|
-
const
|
|
212
|
+
const zt = [
|
|
213
213
|
[
|
|
214
214
|
"path",
|
|
215
215
|
{
|
|
@@ -217,436 +217,577 @@ const Dt = [
|
|
|
217
217
|
key: "9njp5v"
|
|
218
218
|
}
|
|
219
219
|
]
|
|
220
|
-
],
|
|
220
|
+
], Gt = Y("phone", zt), Lt = () => {
|
|
221
|
+
const { t: e } = E(), { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, setShowFilters: r, setLoadingGeo: d, getPosition: m } = H(), u = pe(null), [p, f] = k(null), y = We("places");
|
|
222
|
+
return D(() => {
|
|
223
|
+
if (!y || !u.current) return;
|
|
224
|
+
const b = {
|
|
225
|
+
fields: ["geometry", "name", "formatted_address"]
|
|
226
|
+
};
|
|
227
|
+
f(new y.Autocomplete(u.current, b));
|
|
228
|
+
}, [y]), D(() => {
|
|
229
|
+
p && p.addListener("place_changed", () => {
|
|
230
|
+
const b = p.getPlace();
|
|
231
|
+
if (!b.geometry) {
|
|
232
|
+
console.log("Returned place contains no geometry");
|
|
233
|
+
return;
|
|
234
|
+
}
|
|
235
|
+
const o = { lat: b.geometry.location.lat(), lng: b.geometry.location.lng() };
|
|
236
|
+
i(o), a(o), n(b.formatted_address);
|
|
237
|
+
});
|
|
238
|
+
}, [p, n]), /* @__PURE__ */ s(Je, { locationName: t, setLocationName: n, setSearchCenter: a, setMapCenter: i, handleLocate: () => {
|
|
239
|
+
d(!0), m();
|
|
240
|
+
} });
|
|
241
|
+
}, Ut = typeof global < "u" && // @ts-ignore
|
|
221
242
|
global.navigator && // @ts-ignore
|
|
222
|
-
global.navigator.product === "ReactNative",
|
|
243
|
+
global.navigator.product === "ReactNative", qt = typeof document < "u", Jt = qt || Ut ? Ee : D, Qt = "_0KWD0", Vt = "g3FBG", Xt = "CLUyb", Kt = "npnV3", Yt = "BIswH", Zt = "-m7UC", es = "-q7GQ", ts = "YbQl1", ss = "N8xLz", as = "I-G0P", ns = "OuZOS", rs = "WA4AC", is = "xkI8T", cs = "frXG0", os = "xm9kk", ls = "owF5c", ds = "FeU6b", ms = "XSAWh", us = "RmHU1", ps = "VFB9v", v = {
|
|
244
|
+
wrapper: Qt,
|
|
245
|
+
selected: Vt,
|
|
246
|
+
nameWrapper: Xt,
|
|
247
|
+
details: Kt,
|
|
248
|
+
distance: Yt,
|
|
249
|
+
name: Zt,
|
|
250
|
+
address: es,
|
|
251
|
+
interactWrapper: ts,
|
|
252
|
+
interactItem: ss,
|
|
253
|
+
interactIcon: as,
|
|
254
|
+
interactText: ns,
|
|
255
|
+
addressWrapper: rs,
|
|
256
|
+
viewProducts: is,
|
|
257
|
+
rotateIcon: cs,
|
|
258
|
+
slide: os,
|
|
259
|
+
productItem: ls,
|
|
260
|
+
productImage: ds,
|
|
261
|
+
productName: ms,
|
|
262
|
+
productsWrapper: us,
|
|
263
|
+
dismissable: ps
|
|
264
|
+
}, hs = ({ id: e, location: t, dismissable: n }) => {
|
|
265
|
+
var q, P, A, z, J;
|
|
266
|
+
const a = "store-locator-sidebar-list-item", { selectedLocation: i, searchCenter: r, showDetails: d, setShowDetails: m, setMessageModalOpen: u, setSelectedLocationId: p } = H(), { t: f, i18n: y } = E(), _ = y == null ? void 0 : y.language, [b, o] = k(!1), [j, W] = k(!1), I = () => {
|
|
267
|
+
u(!0);
|
|
268
|
+
}, S = () => {
|
|
269
|
+
p(e);
|
|
270
|
+
const R = new URLSearchParams(window.location.search);
|
|
271
|
+
R.set("location", e), window.history.replaceState({}, "", `?${R.toString()}`);
|
|
272
|
+
}, h = (R) => {
|
|
273
|
+
b || (R.preventDefault(), o(!0));
|
|
274
|
+
}, O = Math.round(Qe({ lat: (q = t == null ? void 0 : t.address) == null ? void 0 : q.latitude, lng: (P = t == null ? void 0 : t.address) == null ? void 0 : P.longitude }, r) * 10) / 10, M = e === (i == null ? void 0 : i.id) ? C(["wrapper", "selected"], v, "sidebar-list-item") : C("wrapper", v, "sidebar-list-item");
|
|
275
|
+
return /* @__PURE__ */ l("div", { onClick: S, className: M, children: [
|
|
276
|
+
/* @__PURE__ */ l("section", { className: c(v.nameWrapper), children: [
|
|
277
|
+
/* @__PURE__ */ l("div", { className: c(v.name), children: [
|
|
278
|
+
t == null ? void 0 : t.retailer_name,
|
|
279
|
+
/* @__PURE__ */ l("div", { className: `text-muted fw-normal mt-1 ${v.distance}`, children: [
|
|
280
|
+
Math.round(Xe(O, _) * 10) / 10,
|
|
281
|
+
" ",
|
|
282
|
+
Ve(_),
|
|
283
|
+
" away"
|
|
284
|
+
] })
|
|
285
|
+
] }),
|
|
286
|
+
/* @__PURE__ */ s("div", { className: "text-end d-flex align-items-center justify-content-end", children: /* @__PURE__ */ s(Ke, { type: t == null ? void 0 : t.store_type }) })
|
|
287
|
+
] }),
|
|
288
|
+
/* @__PURE__ */ s("section", { className: `${v.hoursWrapper} d-flex justify-content-between align-items-center pe-3`, children: /* @__PURE__ */ s(Ye, { hours: t == null ? void 0 : t.retailer_location_hours }) }),
|
|
289
|
+
/* @__PURE__ */ s("section", { className: c(v.addressWrapper), children: /* @__PURE__ */ l("div", { className: c(v.address), children: [
|
|
290
|
+
/* @__PURE__ */ s("div", { children: t == null ? void 0 : t.address.street_line_one }),
|
|
291
|
+
/* @__PURE__ */ s("div", { children: t == null ? void 0 : t.address.street_line_two }),
|
|
292
|
+
/* @__PURE__ */ l("div", { children: [
|
|
293
|
+
t == null ? void 0 : t.address.city,
|
|
294
|
+
", ",
|
|
295
|
+
t == null ? void 0 : t.address.province,
|
|
296
|
+
" ",
|
|
297
|
+
t == null ? void 0 : t.address.postal_code
|
|
298
|
+
] }),
|
|
299
|
+
/* @__PURE__ */ s("div", { className: "d-none", children: t == null ? void 0 : t.address.country })
|
|
300
|
+
] }) }),
|
|
301
|
+
/* @__PURE__ */ l("section", { className: C("interactWrapper", v, "store-locator-sidebar-list-item"), children: [
|
|
302
|
+
(t == null ? void 0 : t.phone_number) && /* @__PURE__ */ l(
|
|
303
|
+
"a",
|
|
304
|
+
{
|
|
305
|
+
href: `tel:${(A = t == null ? void 0 : t.phone_number) == null ? void 0 : A.phone_number}`,
|
|
306
|
+
className: [C("interactItem", v, "store-locator-sidebar-list-item"), "cc-interact-item-phone"].join(" "),
|
|
307
|
+
onClick: h,
|
|
308
|
+
children: [
|
|
309
|
+
/* @__PURE__ */ s("div", { className: [v.interactIcon, "cc-interact-icon", "cc-interact-icon-phone"].join(" "), children: /* @__PURE__ */ s(Gt, { size: 20 }) }),
|
|
310
|
+
/* @__PURE__ */ s("div", { className: [v.interactText, "cc-interact-text", "cc-interact-text-phone"].join(" "), children: b ? (z = t == null ? void 0 : t.phone_number) == null ? void 0 : z.formatted : f("general.phone") })
|
|
311
|
+
]
|
|
312
|
+
}
|
|
313
|
+
),
|
|
314
|
+
/* @__PURE__ */ l(
|
|
315
|
+
"a",
|
|
316
|
+
{
|
|
317
|
+
href: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent((J = t == null ? void 0 : t.address) == null ? void 0 : J.string)}=&destination_place_id=${t == null ? void 0 : t.place_id}`,
|
|
318
|
+
target: "new",
|
|
319
|
+
className: [C("interactItem", v, a), "cc-interact-item-directions"].join(" "),
|
|
320
|
+
children: [
|
|
321
|
+
/* @__PURE__ */ s("div", { className: [C("interactIcon", v, a), "cc-interact-icon-directions"].join(" "), children: /* @__PURE__ */ s(Bt, { size: 20 }) }),
|
|
322
|
+
/* @__PURE__ */ s("div", { className: [C("interactText", v, a), "cc-interact-text-directions"].join(" "), children: f("general.directions") })
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
),
|
|
326
|
+
/* @__PURE__ */ l("button", { className: C("interactItem", v, a), onClick: I, children: [
|
|
327
|
+
/* @__PURE__ */ s("div", { className: C("interactIcon", v, a), children: /* @__PURE__ */ s(At, { size: 20 }) }),
|
|
328
|
+
/* @__PURE__ */ s("div", { className: C("interactText", v, a), children: f("general.message") })
|
|
329
|
+
] }),
|
|
330
|
+
(t == null ? void 0 : t.website) && /* @__PURE__ */ l("a", { href: t == null ? void 0 : t.website, target: "_blank", className: C("interactItem", v, a), children: [
|
|
331
|
+
/* @__PURE__ */ s("div", { className: C("interactIcon", v, a), children: /* @__PURE__ */ s(Ft, { size: 20 }) }),
|
|
332
|
+
/* @__PURE__ */ s("div", { className: C("interactText", v, a), children: f("general.website") })
|
|
333
|
+
] })
|
|
334
|
+
] })
|
|
335
|
+
] });
|
|
336
|
+
}, fs = "pCNHg", gs = "frwR4", vs = "sUqpG", G = {
|
|
337
|
+
loading: fs,
|
|
338
|
+
itemWrapper: gs,
|
|
339
|
+
wrapper: vs
|
|
340
|
+
}, ys = () => {
|
|
341
|
+
const { t: e } = E(), { locations: t, isLoading: n, selectedLocationId: a } = H();
|
|
342
|
+
function i(r, d) {
|
|
343
|
+
if (!r || !d) return;
|
|
344
|
+
const m = r.getBoundingClientRect(), p = d.getBoundingClientRect().top - m.top + r.scrollTop;
|
|
345
|
+
r.scrollTo({
|
|
346
|
+
top: p,
|
|
347
|
+
behavior: "smooth"
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
return D(() => {
|
|
351
|
+
const r = document.getElementById(`location-${a}`);
|
|
352
|
+
if (r) {
|
|
353
|
+
const d = document.getElementById("llw");
|
|
354
|
+
i(d, r);
|
|
355
|
+
}
|
|
356
|
+
}, [a]), n ? /* @__PURE__ */ s("div", { className: c(G.loading), children: /* @__PURE__ */ s("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", width: "50", height: "50", alt: e("store_locator.loading") }) }) : /* @__PURE__ */ s("div", { id: "location-list", className: `${G.wrapper} ${a ? G.hasSelected : ""}`, children: t.map((r) => /* @__PURE__ */ s("div", { id: `location-${r.id}`, className: `${G.itemWrapper} ${a === r.id ? G.selected : ""}`, children: /* @__PURE__ */ s(hs, { id: r.id, location: r }) }, r.id)) });
|
|
357
|
+
}, ws = "N2FHA", Ns = "BSoIL", bs = "xMDdB", _s = "-zMng", L = {
|
|
358
|
+
wrapper: ws,
|
|
359
|
+
top: Ns,
|
|
360
|
+
searchWrapper: bs,
|
|
361
|
+
listWrapper: _s
|
|
362
|
+
}, Cs = () => {
|
|
363
|
+
const { showMap: e, showFilters: t, setShowFilters: n, locale: a, selectedLocationId: i } = H();
|
|
364
|
+
return /* @__PURE__ */ l(ne, { xs: { order: 1 }, lg: { order: 0, span: 4 }, xxl: { order: 0, span: 3 }, className: c(L.wrapper), children: [
|
|
365
|
+
/* @__PURE__ */ s("div", { className: c(L.top), children: /* @__PURE__ */ s("div", { className: c(L.searchWrapper), children: /* @__PURE__ */ s("div", { className: "mb-3", children: /* @__PURE__ */ s(Lt, {}) }) }) }),
|
|
366
|
+
/* @__PURE__ */ s("div", { className: `${L.listWrapper} ${i ? L.hasSelected : ""}`, id: "llw", children: /* @__PURE__ */ s(ys, {}) })
|
|
367
|
+
] });
|
|
368
|
+
}, ae = /* @__PURE__ */ new WeakMap(), me = (e, t) => {
|
|
223
369
|
if (!e || !t) return;
|
|
224
|
-
const
|
|
225
|
-
|
|
226
|
-
let a =
|
|
227
|
-
return a || (a = t.matchMedia(e), a.refCount = 0,
|
|
370
|
+
const n = ae.get(t) || /* @__PURE__ */ new Map();
|
|
371
|
+
ae.set(t, n);
|
|
372
|
+
let a = n.get(e);
|
|
373
|
+
return a || (a = t.matchMedia(e), a.refCount = 0, n.set(a.media, a)), a;
|
|
228
374
|
};
|
|
229
|
-
function
|
|
230
|
-
const
|
|
231
|
-
return
|
|
232
|
-
let
|
|
233
|
-
if (!
|
|
375
|
+
function Is(e, t = typeof window > "u" ? void 0 : window) {
|
|
376
|
+
const n = me(e, t), [a, i] = k(() => n ? n.matches : !1);
|
|
377
|
+
return Jt(() => {
|
|
378
|
+
let r = me(e, t);
|
|
379
|
+
if (!r)
|
|
234
380
|
return i(!1);
|
|
235
|
-
let
|
|
236
|
-
const
|
|
237
|
-
i(
|
|
381
|
+
let d = ae.get(t);
|
|
382
|
+
const m = () => {
|
|
383
|
+
i(r.matches);
|
|
238
384
|
};
|
|
239
|
-
return
|
|
240
|
-
|
|
385
|
+
return r.refCount++, r.addListener(m), m(), () => {
|
|
386
|
+
r.removeListener(m), r.refCount--, r.refCount <= 0 && (d == null || d.delete(r.media)), r = void 0;
|
|
241
387
|
};
|
|
242
388
|
}, [e]), a;
|
|
243
389
|
}
|
|
244
|
-
function
|
|
390
|
+
function Ss(e) {
|
|
245
391
|
const t = Object.keys(e);
|
|
246
|
-
function
|
|
247
|
-
return
|
|
392
|
+
function n(m, u) {
|
|
393
|
+
return m === u ? u : m ? `${m} and ${u}` : u;
|
|
248
394
|
}
|
|
249
|
-
function a(
|
|
250
|
-
return t[Math.min(t.indexOf(
|
|
395
|
+
function a(m) {
|
|
396
|
+
return t[Math.min(t.indexOf(m) + 1, t.length - 1)];
|
|
251
397
|
}
|
|
252
|
-
function i(
|
|
253
|
-
const
|
|
254
|
-
let
|
|
255
|
-
return typeof
|
|
398
|
+
function i(m) {
|
|
399
|
+
const u = a(m);
|
|
400
|
+
let p = e[u];
|
|
401
|
+
return typeof p == "number" ? p = `${p - 0.2}px` : p = `calc(${p} - 0.2px)`, `(max-width: ${p})`;
|
|
256
402
|
}
|
|
257
|
-
function
|
|
258
|
-
let
|
|
259
|
-
return typeof
|
|
403
|
+
function r(m) {
|
|
404
|
+
let u = e[m];
|
|
405
|
+
return typeof u == "number" && (u = `${u}px`), `(min-width: ${u})`;
|
|
260
406
|
}
|
|
261
|
-
function
|
|
262
|
-
let
|
|
263
|
-
typeof
|
|
264
|
-
[
|
|
407
|
+
function d(m, u, p) {
|
|
408
|
+
let f;
|
|
409
|
+
typeof m == "object" ? (f = m, p = u, u = !0) : (u = u || !0, f = {
|
|
410
|
+
[m]: u
|
|
265
411
|
});
|
|
266
|
-
let
|
|
267
|
-
return
|
|
412
|
+
let y = he(() => Object.entries(f).reduce((_, [b, o]) => ((o === "up" || o === !0) && (_ = n(_, r(b))), (o === "down" || o === !0) && (_ = n(_, i(b))), _), ""), [JSON.stringify(f)]);
|
|
413
|
+
return Is(y, p);
|
|
268
414
|
}
|
|
269
|
-
return
|
|
415
|
+
return d;
|
|
270
416
|
}
|
|
271
|
-
const
|
|
417
|
+
const Os = Ss({
|
|
272
418
|
xs: 0,
|
|
273
419
|
sm: 576,
|
|
274
420
|
md: 768,
|
|
275
421
|
lg: 992,
|
|
276
422
|
xl: 1200,
|
|
277
423
|
xxl: 1400
|
|
278
|
-
}),
|
|
424
|
+
}), we = /* @__PURE__ */ B.forwardRef(({
|
|
279
425
|
className: e,
|
|
280
426
|
bsPrefix: t,
|
|
281
|
-
as:
|
|
427
|
+
as: n = "div",
|
|
282
428
|
...a
|
|
283
|
-
}, i) => (t =
|
|
429
|
+
}, i) => (t = U(t, "offcanvas-body"), /* @__PURE__ */ s(n, {
|
|
284
430
|
ref: i,
|
|
285
|
-
className:
|
|
431
|
+
className: F(e, t),
|
|
286
432
|
...a
|
|
287
433
|
})));
|
|
288
|
-
|
|
289
|
-
const
|
|
290
|
-
[
|
|
291
|
-
[
|
|
292
|
-
},
|
|
434
|
+
we.displayName = "OffcanvasBody";
|
|
435
|
+
const xs = {
|
|
436
|
+
[fe]: "show",
|
|
437
|
+
[Pe]: "show"
|
|
438
|
+
}, Ne = /* @__PURE__ */ B.forwardRef(({
|
|
293
439
|
bsPrefix: e,
|
|
294
440
|
className: t,
|
|
295
|
-
children:
|
|
441
|
+
children: n,
|
|
296
442
|
in: a = !1,
|
|
297
443
|
mountOnEnter: i = !1,
|
|
298
|
-
unmountOnExit:
|
|
299
|
-
appear:
|
|
300
|
-
...
|
|
301
|
-
},
|
|
302
|
-
ref:
|
|
303
|
-
addEndListener:
|
|
444
|
+
unmountOnExit: r = !1,
|
|
445
|
+
appear: d = !1,
|
|
446
|
+
...m
|
|
447
|
+
}, u) => (e = U(e, "offcanvas"), /* @__PURE__ */ s(Re, {
|
|
448
|
+
ref: u,
|
|
449
|
+
addEndListener: De,
|
|
304
450
|
in: a,
|
|
305
451
|
mountOnEnter: i,
|
|
306
|
-
unmountOnExit:
|
|
307
|
-
appear:
|
|
308
|
-
...
|
|
309
|
-
childRef:
|
|
310
|
-
children: (
|
|
311
|
-
...
|
|
312
|
-
className:
|
|
452
|
+
unmountOnExit: r,
|
|
453
|
+
appear: d,
|
|
454
|
+
...m,
|
|
455
|
+
childRef: Be(n),
|
|
456
|
+
children: (p, f) => /* @__PURE__ */ B.cloneElement(n, {
|
|
457
|
+
...f,
|
|
458
|
+
className: F(t, n.props.className, (p === fe || p === Fe) && `${e}-toggling`, xs[p])
|
|
313
459
|
})
|
|
314
460
|
})));
|
|
315
|
-
|
|
316
|
-
const
|
|
461
|
+
Ne.displayName = "OffcanvasToggling";
|
|
462
|
+
const be = /* @__PURE__ */ B.forwardRef(({
|
|
317
463
|
bsPrefix: e,
|
|
318
464
|
className: t,
|
|
319
|
-
closeLabel:
|
|
465
|
+
closeLabel: n = "Close",
|
|
320
466
|
closeButton: a = !1,
|
|
321
467
|
...i
|
|
322
|
-
},
|
|
323
|
-
ref:
|
|
468
|
+
}, r) => (e = U(e, "offcanvas-header"), /* @__PURE__ */ s(rt, {
|
|
469
|
+
ref: r,
|
|
324
470
|
...i,
|
|
325
|
-
className:
|
|
326
|
-
closeLabel:
|
|
471
|
+
className: F(t, e),
|
|
472
|
+
closeLabel: n,
|
|
327
473
|
closeButton: a
|
|
328
474
|
})));
|
|
329
|
-
|
|
330
|
-
const
|
|
475
|
+
be.displayName = "OffcanvasHeader";
|
|
476
|
+
const Ms = it("h5"), _e = /* @__PURE__ */ B.forwardRef(({
|
|
331
477
|
className: e,
|
|
332
478
|
bsPrefix: t,
|
|
333
|
-
as:
|
|
479
|
+
as: n = Ms,
|
|
334
480
|
...a
|
|
335
|
-
}, i) => (t =
|
|
481
|
+
}, i) => (t = U(t, "offcanvas-title"), /* @__PURE__ */ s(n, {
|
|
336
482
|
ref: i,
|
|
337
|
-
className:
|
|
483
|
+
className: F(e, t),
|
|
338
484
|
...a
|
|
339
485
|
})));
|
|
340
|
-
|
|
341
|
-
function
|
|
342
|
-
return /* @__PURE__ */
|
|
486
|
+
_e.displayName = "OffcanvasTitle";
|
|
487
|
+
function $s(e) {
|
|
488
|
+
return /* @__PURE__ */ s(Ne, {
|
|
343
489
|
...e
|
|
344
490
|
});
|
|
345
491
|
}
|
|
346
|
-
function
|
|
347
|
-
return /* @__PURE__ */
|
|
492
|
+
function ks(e) {
|
|
493
|
+
return /* @__PURE__ */ s(dt, {
|
|
348
494
|
...e
|
|
349
495
|
});
|
|
350
496
|
}
|
|
351
|
-
const
|
|
497
|
+
const Ce = /* @__PURE__ */ B.forwardRef(({
|
|
352
498
|
bsPrefix: e,
|
|
353
499
|
className: t,
|
|
354
|
-
children:
|
|
500
|
+
children: n,
|
|
355
501
|
"aria-labelledby": a,
|
|
356
502
|
placement: i = "start",
|
|
357
|
-
responsive:
|
|
503
|
+
responsive: r,
|
|
358
504
|
/* BaseModal props */
|
|
359
|
-
show:
|
|
360
|
-
backdrop:
|
|
361
|
-
keyboard:
|
|
362
|
-
scroll:
|
|
363
|
-
onEscapeKeyDown:
|
|
364
|
-
onShow:
|
|
365
|
-
onHide:
|
|
366
|
-
container:
|
|
367
|
-
autoFocus:
|
|
368
|
-
enforceFocus:
|
|
369
|
-
restoreFocus:
|
|
370
|
-
restoreFocusOptions:
|
|
371
|
-
onEntered:
|
|
372
|
-
onExit:
|
|
373
|
-
onExiting:
|
|
505
|
+
show: d = !1,
|
|
506
|
+
backdrop: m = !0,
|
|
507
|
+
keyboard: u = !0,
|
|
508
|
+
scroll: p = !1,
|
|
509
|
+
onEscapeKeyDown: f,
|
|
510
|
+
onShow: y,
|
|
511
|
+
onHide: _,
|
|
512
|
+
container: b,
|
|
513
|
+
autoFocus: o = !0,
|
|
514
|
+
enforceFocus: j = !0,
|
|
515
|
+
restoreFocus: W = !0,
|
|
516
|
+
restoreFocusOptions: I,
|
|
517
|
+
onEntered: S,
|
|
518
|
+
onExit: h,
|
|
519
|
+
onExiting: O,
|
|
374
520
|
onEnter: M,
|
|
375
|
-
onEntering:
|
|
376
|
-
onExited:
|
|
377
|
-
backdropClassName:
|
|
378
|
-
manager:
|
|
379
|
-
renderStaticNode:
|
|
380
|
-
...
|
|
381
|
-
},
|
|
382
|
-
const
|
|
383
|
-
e =
|
|
384
|
-
const [
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
}, [
|
|
388
|
-
const
|
|
389
|
-
onHide:
|
|
390
|
-
}), [
|
|
391
|
-
function
|
|
392
|
-
return
|
|
521
|
+
onEntering: q,
|
|
522
|
+
onExited: P,
|
|
523
|
+
backdropClassName: A,
|
|
524
|
+
manager: z,
|
|
525
|
+
renderStaticNode: J = !1,
|
|
526
|
+
...R
|
|
527
|
+
}, Ie) => {
|
|
528
|
+
const Z = pe();
|
|
529
|
+
e = U(e, "offcanvas");
|
|
530
|
+
const [re, Se] = k(!1), ee = ct(_), ie = Os(r || "xs", "up");
|
|
531
|
+
D(() => {
|
|
532
|
+
Se(r ? d && !ie : d);
|
|
533
|
+
}, [d, r, ie]);
|
|
534
|
+
const Oe = he(() => ({
|
|
535
|
+
onHide: ee
|
|
536
|
+
}), [ee]);
|
|
537
|
+
function xe() {
|
|
538
|
+
return z || (p ? (Z.current || (Z.current = new mt({
|
|
393
539
|
handleContainerOverflow: !1
|
|
394
|
-
})),
|
|
540
|
+
})), Z.current) : ut());
|
|
395
541
|
}
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
|
|
400
|
-
},
|
|
401
|
-
...
|
|
402
|
-
className:
|
|
403
|
-
}), [
|
|
404
|
-
...
|
|
405
|
-
...
|
|
406
|
-
className:
|
|
542
|
+
const Me = (x, ...te) => {
|
|
543
|
+
x && (x.style.visibility = "visible"), M == null || M(x, ...te);
|
|
544
|
+
}, $e = (x, ...te) => {
|
|
545
|
+
x && (x.style.visibility = ""), P == null || P(...te);
|
|
546
|
+
}, ke = Te((x) => /* @__PURE__ */ s("div", {
|
|
547
|
+
...x,
|
|
548
|
+
className: F(`${e}-backdrop`, A)
|
|
549
|
+
}), [A, e]), ce = (x) => /* @__PURE__ */ s("div", {
|
|
550
|
+
...x,
|
|
551
|
+
...R,
|
|
552
|
+
className: F(t, r ? `${e}-${r}` : e, `${e}-${i}`),
|
|
407
553
|
"aria-labelledby": a,
|
|
408
|
-
children:
|
|
554
|
+
children: n
|
|
409
555
|
});
|
|
410
|
-
return /* @__PURE__ */
|
|
411
|
-
children: [!
|
|
412
|
-
value:
|
|
413
|
-
children: /* @__PURE__ */
|
|
414
|
-
show:
|
|
415
|
-
ref:
|
|
416
|
-
backdrop:
|
|
417
|
-
container:
|
|
418
|
-
keyboard:
|
|
419
|
-
autoFocus:
|
|
420
|
-
enforceFocus:
|
|
421
|
-
restoreFocus:
|
|
422
|
-
restoreFocusOptions:
|
|
423
|
-
onEscapeKeyDown:
|
|
424
|
-
onShow:
|
|
425
|
-
onHide:
|
|
426
|
-
onEnter:
|
|
427
|
-
onEntering:
|
|
428
|
-
onEntered:
|
|
429
|
-
onExit:
|
|
430
|
-
onExiting:
|
|
431
|
-
onExited:
|
|
432
|
-
manager:
|
|
433
|
-
transition:
|
|
434
|
-
backdropTransition:
|
|
435
|
-
renderBackdrop:
|
|
436
|
-
renderDialog:
|
|
556
|
+
return /* @__PURE__ */ l(se, {
|
|
557
|
+
children: [!re && (r || J) && ce({}), /* @__PURE__ */ s(ot.Provider, {
|
|
558
|
+
value: Oe,
|
|
559
|
+
children: /* @__PURE__ */ s(lt, {
|
|
560
|
+
show: re,
|
|
561
|
+
ref: Ie,
|
|
562
|
+
backdrop: m,
|
|
563
|
+
container: b,
|
|
564
|
+
keyboard: u,
|
|
565
|
+
autoFocus: o,
|
|
566
|
+
enforceFocus: j && !p,
|
|
567
|
+
restoreFocus: W,
|
|
568
|
+
restoreFocusOptions: I,
|
|
569
|
+
onEscapeKeyDown: f,
|
|
570
|
+
onShow: y,
|
|
571
|
+
onHide: ee,
|
|
572
|
+
onEnter: Me,
|
|
573
|
+
onEntering: q,
|
|
574
|
+
onEntered: S,
|
|
575
|
+
onExit: h,
|
|
576
|
+
onExiting: O,
|
|
577
|
+
onExited: $e,
|
|
578
|
+
manager: xe(),
|
|
579
|
+
transition: $s,
|
|
580
|
+
backdropTransition: ks,
|
|
581
|
+
renderBackdrop: ke,
|
|
582
|
+
renderDialog: ce
|
|
437
583
|
})
|
|
438
584
|
})]
|
|
439
585
|
});
|
|
440
586
|
});
|
|
441
|
-
|
|
442
|
-
const
|
|
443
|
-
Body:
|
|
444
|
-
Header:
|
|
445
|
-
Title:
|
|
446
|
-
}),
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
fields: ["geometry", "name", "formatted_address"]
|
|
452
|
-
};
|
|
453
|
-
h(new g.Autocomplete(o.current, w));
|
|
454
|
-
}, [g]), H(() => {
|
|
455
|
-
m && m.addListener("place_changed", () => {
|
|
456
|
-
const w = m.getPlace();
|
|
457
|
-
if (!w.geometry) {
|
|
458
|
-
console.log("Returned place contains no geometry");
|
|
459
|
-
return;
|
|
460
|
-
}
|
|
461
|
-
const y = { lat: w.geometry.location.lat(), lng: w.geometry.location.lng() };
|
|
462
|
-
i(y), a(y), s(w.formatted_address);
|
|
463
|
-
});
|
|
464
|
-
}, [m, s]), /* @__PURE__ */ r(Ae, { locationName: t, setLocationName: s, setSearchCenter: a, setMapCenter: i, handleLocate: () => {
|
|
465
|
-
p(!0), l();
|
|
466
|
-
} });
|
|
467
|
-
}, Jt = "_0KWD0", Kt = "g3FBG", Zt = "CLUyb", Vt = "BIswH", Xt = "-m7UC", Yt = "-q7GQ", qt = "YbQl1", er = "N8xLz", tr = "I-G0P", rr = "OuZOS", sr = "WA4AC", f = {
|
|
468
|
-
wrapper: Jt,
|
|
469
|
-
selected: Kt,
|
|
470
|
-
nameWrapper: Zt,
|
|
471
|
-
distance: Vt,
|
|
472
|
-
name: Xt,
|
|
473
|
-
address: Yt,
|
|
474
|
-
interactWrapper: qt,
|
|
475
|
-
interactItem: er,
|
|
476
|
-
interactIcon: tr,
|
|
477
|
-
interactText: rr,
|
|
478
|
-
addressWrapper: sr
|
|
479
|
-
}, ar = ({ id: e, location: t, dismissable: s }) => {
|
|
480
|
-
var b, M, z, k, B;
|
|
481
|
-
const { selectedLocation: a, searchCenter: i, showDetails: c, setShowDetails: p, setMessageModalOpen: l, setSelectedLocationId: o } = j(), { t: m, i18n: h } = x(), g = h == null ? void 0 : h.language;
|
|
482
|
-
console.log("locale:", g);
|
|
483
|
-
const [N, w] = C(!1), [y, G] = C(!1), D = () => {
|
|
484
|
-
l(!0);
|
|
485
|
-
}, W = () => {
|
|
486
|
-
o(e);
|
|
487
|
-
const I = new URLSearchParams(window.location.search);
|
|
488
|
-
I.set("location", e), window.history.replaceState({}, "", `?${I.toString()}`);
|
|
489
|
-
}, O = (I) => {
|
|
490
|
-
N || (I.preventDefault(), w(!0));
|
|
491
|
-
}, S = Math.round(ze({ lat: (b = t == null ? void 0 : t.address) == null ? void 0 : b.latitude, lng: (M = t == null ? void 0 : t.address) == null ? void 0 : M.longitude }, i) * 10) / 10;
|
|
492
|
-
return /* @__PURE__ */ d("div", { onClick: W, className: `${f.wrapper} ${e === (a == null ? void 0 : a.id) ? n(f.selected) : ""}`, children: [
|
|
493
|
-
/* @__PURE__ */ d("section", { className: n(f.nameWrapper), children: [
|
|
494
|
-
/* @__PURE__ */ d("div", { className: n(f.name), children: [
|
|
495
|
-
t == null ? void 0 : t.retailer_name,
|
|
496
|
-
/* @__PURE__ */ d("div", { className: `text-muted fw-normal mt-1 ${f.distance}`, children: [
|
|
497
|
-
Math.round(Le(S, g) * 10) / 10,
|
|
498
|
-
" ",
|
|
499
|
-
Fe(g),
|
|
500
|
-
" away"
|
|
501
|
-
] })
|
|
502
|
-
] }),
|
|
503
|
-
/* @__PURE__ */ r("div", { className: "text-end d-flex align-items-center justify-content-end", children: /* @__PURE__ */ r(Ue, { type: t == null ? void 0 : t.store_type }) })
|
|
504
|
-
] }),
|
|
505
|
-
/* @__PURE__ */ r("section", { className: `${f.hoursWrapper} d-flex justify-content-between align-items-center pe-3`, children: /* @__PURE__ */ r(Ge, { hours: t == null ? void 0 : t.retailer_location_hours }) }),
|
|
506
|
-
/* @__PURE__ */ r("section", { className: n(f.addressWrapper), children: /* @__PURE__ */ d("div", { className: n(f.address), children: [
|
|
507
|
-
/* @__PURE__ */ r("div", { children: t == null ? void 0 : t.address.street_line_one }),
|
|
508
|
-
/* @__PURE__ */ r("div", { children: t == null ? void 0 : t.address.street_line_two }),
|
|
509
|
-
/* @__PURE__ */ d("div", { children: [
|
|
510
|
-
t == null ? void 0 : t.address.city,
|
|
511
|
-
", ",
|
|
512
|
-
t == null ? void 0 : t.address.province,
|
|
513
|
-
" ",
|
|
514
|
-
t == null ? void 0 : t.address.postal_code
|
|
515
|
-
] }),
|
|
516
|
-
/* @__PURE__ */ r("div", { className: "d-none", children: t == null ? void 0 : t.address.country })
|
|
517
|
-
] }) }),
|
|
518
|
-
/* @__PURE__ */ d("section", { className: n(f.interactWrapper), children: [
|
|
519
|
-
(t == null ? void 0 : t.phone_number) && /* @__PURE__ */ d("a", { href: `tel:${(z = t == null ? void 0 : t.phone_number) == null ? void 0 : z.phone_number}`, className: n(f.interactItem), onClick: O, children: [
|
|
520
|
-
/* @__PURE__ */ r("div", { className: n(f.interactIcon), children: /* @__PURE__ */ r(Wt, {}) }),
|
|
521
|
-
/* @__PURE__ */ r("div", { className: n(f.interactText), children: N ? (k = t == null ? void 0 : t.phone_number) == null ? void 0 : k.formatted : m("general.phone") })
|
|
522
|
-
] }),
|
|
523
|
-
/* @__PURE__ */ d("a", { href: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent((B = t == null ? void 0 : t.address) == null ? void 0 : B.string)}=&destination_place_id=${t == null ? void 0 : t.place_id}`, target: "new", className: n(f.interactItem), children: [
|
|
524
|
-
/* @__PURE__ */ r("div", { className: n(f.interactIcon), children: /* @__PURE__ */ r(xt, {}) }),
|
|
525
|
-
/* @__PURE__ */ r("div", { className: n(f.interactText), children: m("general.directions") })
|
|
526
|
-
] }),
|
|
527
|
-
/* @__PURE__ */ d("button", { className: n(f.interactItem), onClick: D, children: [
|
|
528
|
-
/* @__PURE__ */ r("div", { className: n(f.interactIcon), children: /* @__PURE__ */ r(jt, {}) }),
|
|
529
|
-
/* @__PURE__ */ r("div", { className: n(f.interactText), children: m("general.message") })
|
|
530
|
-
] }),
|
|
531
|
-
(t == null ? void 0 : t.website) && /* @__PURE__ */ d("a", { href: t == null ? void 0 : t.website, target: "_blank", className: n(f.interactItem), children: [
|
|
532
|
-
/* @__PURE__ */ r("div", { className: n(f.interactIcon), children: /* @__PURE__ */ r(Ht, {}) }),
|
|
533
|
-
/* @__PURE__ */ r("div", { className: n(f.interactText), children: m("general.website") })
|
|
534
|
-
] })
|
|
535
|
-
] })
|
|
536
|
-
] });
|
|
537
|
-
}, nr = "pCNHg", cr = "frwR4", ir = "sUqpG", or = "xVDe4", lr = "DZ-Z2", R = {
|
|
538
|
-
loading: nr,
|
|
539
|
-
itemWrapper: cr,
|
|
540
|
-
wrapper: ir,
|
|
541
|
-
hasSelected: or,
|
|
542
|
-
selected: lr
|
|
543
|
-
}, dr = () => {
|
|
544
|
-
const { t: e } = x(), { locations: t, isLoading: s, selectedLocationId: a } = j();
|
|
545
|
-
function i(c, p) {
|
|
546
|
-
if (!c || !p) return;
|
|
547
|
-
const l = c.getBoundingClientRect(), m = p.getBoundingClientRect().top - l.top + c.scrollTop;
|
|
548
|
-
c.scrollTo({
|
|
549
|
-
top: m,
|
|
550
|
-
behavior: "smooth"
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
return H(() => {
|
|
554
|
-
const c = document.getElementById(`location-${a}`);
|
|
555
|
-
if (c) {
|
|
556
|
-
const p = document.getElementById("llw");
|
|
557
|
-
i(p, c);
|
|
558
|
-
}
|
|
559
|
-
}, [a]), s ? /* @__PURE__ */ r("div", { className: n(R.loading), children: /* @__PURE__ */ r("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", width: "50", height: "50", alt: e("store_locator.loading") }) }) : /* @__PURE__ */ r("div", { id: "location-list", className: `${R.wrapper} ${a ? R.hasSelected : ""}`, children: t.map((c) => /* @__PURE__ */ r("div", { id: `location-${c.id}`, className: `${R.itemWrapper} ${a === c.id ? R.selected : ""}`, children: /* @__PURE__ */ r(ar, { id: c.id, location: c }) }, c.id)) });
|
|
560
|
-
}, mr = "N2FHA", pr = "BSoIL", ur = "xMDdB", hr = "-zMng", fr = "gz4We", P = {
|
|
561
|
-
wrapper: mr,
|
|
562
|
-
top: pr,
|
|
563
|
-
searchWrapper: ur,
|
|
564
|
-
listWrapper: hr,
|
|
565
|
-
hasSelected: fr
|
|
566
|
-
}, gr = () => {
|
|
567
|
-
const { showMap: e, showFilters: t, setShowFilters: s, locale: a, selectedLocationId: i } = j();
|
|
568
|
-
return /* @__PURE__ */ d(V, { xs: { order: 1 }, lg: { order: 0, span: 4 }, xxl: { order: 0, span: 3 }, className: n(P.wrapper), children: [
|
|
569
|
-
/* @__PURE__ */ r("div", { className: n(P.top), children: /* @__PURE__ */ r("div", { className: n(P.searchWrapper), children: /* @__PURE__ */ r("div", { className: "mb-3", children: /* @__PURE__ */ r(Qt, {}) }) }) }),
|
|
570
|
-
/* @__PURE__ */ r("div", { className: `${P.listWrapper} ${i ? P.hasSelected : ""}`, id: "llw", children: /* @__PURE__ */ r(dr, {}) })
|
|
571
|
-
] });
|
|
572
|
-
}, u = {}, vr = () => {
|
|
573
|
-
var l, o, m;
|
|
574
|
-
const { selectedLocation: e, showDetails: t, setShowDetails: s, setMessageModalOpen: a } = j(), { t: i } = x(), c = () => {
|
|
575
|
-
s(!1);
|
|
576
|
-
}, p = () => {
|
|
587
|
+
Ce.displayName = "Offcanvas";
|
|
588
|
+
const ue = Object.assign(Ce, {
|
|
589
|
+
Body: we,
|
|
590
|
+
Header: be,
|
|
591
|
+
Title: _e
|
|
592
|
+
}), g = {}, Es = () => {
|
|
593
|
+
var m, u, p;
|
|
594
|
+
const { selectedLocation: e, showDetails: t, setShowDetails: n, setMessageModalOpen: a } = H(), { t: i } = E(), r = () => {
|
|
595
|
+
n(!1);
|
|
596
|
+
}, d = () => {
|
|
577
597
|
a(!0);
|
|
578
598
|
};
|
|
579
|
-
return /* @__PURE__ */
|
|
580
|
-
/* @__PURE__ */
|
|
581
|
-
/* @__PURE__ */
|
|
582
|
-
/* @__PURE__ */
|
|
599
|
+
return /* @__PURE__ */ s(ue, { show: t, onHide: r, backdrop: !1, placement: "start", className: c(g.wrapper), scroll: !0, children: /* @__PURE__ */ l(ue.Body, { className: "px-0", children: [
|
|
600
|
+
/* @__PURE__ */ l("section", { className: c(g.nameWrapper), children: [
|
|
601
|
+
/* @__PURE__ */ l("div", { className: c(g.close), onClick: r, children: [
|
|
602
|
+
/* @__PURE__ */ s("i", { className: "lpe-icons", children: "back" }),
|
|
583
603
|
" ",
|
|
584
604
|
i("general.viewAll")
|
|
585
605
|
] }),
|
|
586
|
-
/* @__PURE__ */
|
|
606
|
+
/* @__PURE__ */ s("div", { className: c(g.name), children: e == null ? void 0 : e.retailer_name })
|
|
587
607
|
] }),
|
|
588
|
-
/* @__PURE__ */
|
|
589
|
-
/* @__PURE__ */
|
|
590
|
-
/* @__PURE__ */
|
|
591
|
-
/* @__PURE__ */
|
|
608
|
+
/* @__PURE__ */ l("section", { className: c(g.interactWrapper), children: [
|
|
609
|
+
/* @__PURE__ */ l("a", { href: `tel:${(m = e == null ? void 0 : e.phone_number) == null ? void 0 : m.phone_number}`, className: c(g.interactItem), children: [
|
|
610
|
+
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "phone" }) }),
|
|
611
|
+
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.phone") })
|
|
592
612
|
] }),
|
|
593
|
-
/* @__PURE__ */
|
|
594
|
-
/* @__PURE__ */
|
|
595
|
-
/* @__PURE__ */
|
|
613
|
+
/* @__PURE__ */ l("a", { href: `https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent((u = e == null ? void 0 : e.address) == null ? void 0 : u.string)}=&destination_place_id=${e == null ? void 0 : e.place_id}`, target: "new", className: c(g.interactItem), children: [
|
|
614
|
+
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "direction" }) }),
|
|
615
|
+
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.directions") })
|
|
596
616
|
] }),
|
|
597
|
-
/* @__PURE__ */
|
|
598
|
-
/* @__PURE__ */
|
|
599
|
-
/* @__PURE__ */
|
|
617
|
+
/* @__PURE__ */ l("a", { className: c(g.interactItem), onClick: d, children: [
|
|
618
|
+
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s(Wt, {}) }),
|
|
619
|
+
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.message") })
|
|
600
620
|
] }),
|
|
601
|
-
/* @__PURE__ */
|
|
602
|
-
/* @__PURE__ */
|
|
603
|
-
/* @__PURE__ */
|
|
621
|
+
/* @__PURE__ */ l("a", { href: e == null ? void 0 : e.website, target: "_blank", className: c(g.interactItem), children: [
|
|
622
|
+
/* @__PURE__ */ s("div", { className: c(g.interactIcon), children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "world" }) }),
|
|
623
|
+
/* @__PURE__ */ s("div", { className: c(g.interactText), children: i("general.website") })
|
|
604
624
|
] })
|
|
605
625
|
] }),
|
|
606
|
-
/* @__PURE__ */
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */
|
|
609
|
-
/* @__PURE__ */
|
|
610
|
-
/* @__PURE__ */
|
|
611
|
-
/* @__PURE__ */
|
|
626
|
+
/* @__PURE__ */ l("section", { className: c(g.addressWrapper), children: [
|
|
627
|
+
/* @__PURE__ */ s("div", { children: /* @__PURE__ */ s("i", { className: "lpe-icons", children: "marker" }) }),
|
|
628
|
+
/* @__PURE__ */ l("div", { className: c(g.address), children: [
|
|
629
|
+
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.street_line_one }),
|
|
630
|
+
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.street_line_two }),
|
|
631
|
+
/* @__PURE__ */ l("div", { children: [
|
|
612
632
|
e == null ? void 0 : e.address.city,
|
|
613
633
|
", ",
|
|
614
634
|
e == null ? void 0 : e.address.province,
|
|
615
635
|
" ",
|
|
616
636
|
e == null ? void 0 : e.address.postal_code
|
|
617
637
|
] }),
|
|
618
|
-
/* @__PURE__ */
|
|
638
|
+
/* @__PURE__ */ s("div", { children: e == null ? void 0 : e.address.country })
|
|
619
639
|
] })
|
|
620
640
|
] }),
|
|
621
|
-
/* @__PURE__ */
|
|
622
|
-
/* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
624
|
-
/* @__PURE__ */
|
|
625
|
-
/* @__PURE__ */
|
|
626
|
-
/* @__PURE__ */
|
|
627
|
-
/* @__PURE__ */
|
|
628
|
-
] }) },
|
|
641
|
+
/* @__PURE__ */ s("section", { className: c(g.hoursWrapper), children: /* @__PURE__ */ s(Ot, { hours: e == null ? void 0 : e.retailer_location_hours }) }),
|
|
642
|
+
/* @__PURE__ */ l("section", { className: "container", children: [
|
|
643
|
+
/* @__PURE__ */ s("h5", { className: c(g.productTitle), children: i("store_locator.products") }),
|
|
644
|
+
/* @__PURE__ */ s(ge, { children: (p = e == null ? void 0 : e.retailer_location_products) == null ? void 0 : p.map((f, y) => /* @__PURE__ */ s(ne, { xs: 6, className: "mb-3", children: /* @__PURE__ */ l("div", { className: c(g.product), children: [
|
|
645
|
+
/* @__PURE__ */ s("img", { src: f.image_url || `https://placehold.co/400x400?text=${f.name}`, alt: f.name, className: c(g.productImage) }),
|
|
646
|
+
/* @__PURE__ */ s("div", { className: c(g.productName), children: f.name }),
|
|
647
|
+
/* @__PURE__ */ s("div", { className: c(g.productPrice), children: f.price })
|
|
648
|
+
] }) }, y)) })
|
|
629
649
|
] })
|
|
630
650
|
] }) });
|
|
631
|
-
},
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
651
|
+
}, Ts = "_3k9so", Hs = "-sMg9", js = "IGCsG", Ws = "Ri4DF", Rs = "AmPYE", $ = {
|
|
652
|
+
title: Ts,
|
|
653
|
+
formGroup: Hs,
|
|
654
|
+
submit: js,
|
|
655
|
+
error: Ws,
|
|
656
|
+
success: Rs
|
|
657
|
+
}, Bs = () => {
|
|
658
|
+
const { id: e, messageModalOpen: t, setMessageModalOpen: n, selectedLocation: a, locale: i, searchCenter: r } = H(), { t: d } = E("default", { lng: i }), [m, u] = k(!1), [p, f] = k(!1), y = /^((\\+[1-9]{1,4}[ \\-]*)|(\\([0-9]{2,3}\\)[ \\-]*)|([0-9]{2,4})[ \\-]*)*?[0-9]{3,4}?[ \\-]*[0-9]{3,4}?$/, _ = Ae({
|
|
659
|
+
name: Q().required(d("message.validation.name")),
|
|
660
|
+
email: Q().email(d("message.validation.email")).required(d("message.validation.email")),
|
|
661
|
+
phone: Q().matches(y, "Phone number is not valid"),
|
|
662
|
+
message: Q().required(d("message.validation.message"))
|
|
663
|
+
}), o = ze({
|
|
664
|
+
initialValues: {
|
|
665
|
+
name: "",
|
|
666
|
+
email: "",
|
|
667
|
+
phone: "",
|
|
668
|
+
message: "",
|
|
669
|
+
optIn: !1
|
|
670
|
+
},
|
|
671
|
+
enableReinitialize: !0,
|
|
672
|
+
validationSchema: _,
|
|
673
|
+
onSubmit: async (I) => {
|
|
674
|
+
f(!0), tt("AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M");
|
|
675
|
+
const S = await Ze(r == null ? void 0 : r.lat, r == null ? void 0 : r.lng), h = et(S.results[0].address_components);
|
|
676
|
+
if (!(await fetch("https://api.colabcommerce.com/widget_api/leads", {
|
|
677
|
+
method: "POST",
|
|
678
|
+
headers: {
|
|
679
|
+
"Content-Type": "application/json"
|
|
680
|
+
},
|
|
681
|
+
body: JSON.stringify({
|
|
682
|
+
id: e,
|
|
683
|
+
lead: {
|
|
684
|
+
name: I.name,
|
|
685
|
+
emails_attributes: [{ email: I.email }],
|
|
686
|
+
phone_numbers_attributes: [{ phone_number: I.phone, country_code: "US" }],
|
|
687
|
+
message: I.message,
|
|
688
|
+
opt_in: I.optIn,
|
|
689
|
+
location_attributes: {
|
|
690
|
+
street_line_one: h == null ? void 0 : h.addressLine1,
|
|
691
|
+
street_line_two: h == null ? void 0 : h.addressLine2,
|
|
692
|
+
city: h == null ? void 0 : h.city,
|
|
693
|
+
province: h == null ? void 0 : h.province,
|
|
694
|
+
postal_code: h == null ? void 0 : h.postalCode,
|
|
695
|
+
country: h == null ? void 0 : h.country,
|
|
696
|
+
latitude: (r == null ? void 0 : r.lat) || null,
|
|
697
|
+
longitude: (r == null ? void 0 : r.lng) || null
|
|
698
|
+
},
|
|
699
|
+
assignee_id: (a == null ? void 0 : a.id) || null,
|
|
700
|
+
assignee_type: "CompanyRetailerLocation",
|
|
701
|
+
lead_activities_attributes: [{
|
|
702
|
+
type: "LeadActivity::Referral",
|
|
703
|
+
message: I.message,
|
|
704
|
+
source_type: "Company",
|
|
705
|
+
source_id: e
|
|
706
|
+
}]
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
})).ok) {
|
|
710
|
+
o.setErrors({ general: d("message.validation.general") }), f(!1);
|
|
711
|
+
return;
|
|
712
|
+
}
|
|
713
|
+
u(!0), f(!1);
|
|
714
|
+
}
|
|
715
|
+
}), j = () => {
|
|
716
|
+
n(!1), u(!1), o.resetForm();
|
|
717
|
+
}, W = typeof window < "u" ? document.querySelector(".cc") : null;
|
|
718
|
+
return /* @__PURE__ */ l(V, { container: W, show: t, centered: !0, dialogClassName: "cc", onHide: j, children: [
|
|
719
|
+
m && /* @__PURE__ */ l("div", { className: "p-5 d-flex align-items-center justify-content-center flex-column", style: { display: m ? "flex" : "none" }, children: [
|
|
720
|
+
/* @__PURE__ */ s("div", { className: "fw-bold fs-2", children: "Thank you!" }),
|
|
721
|
+
/* @__PURE__ */ s("div", { className: "fw-bold mb-3", children: "Your Palliser retailer will be in touch soon" }),
|
|
722
|
+
/* @__PURE__ */ s(oe, { variant: "dark", onClick: j, children: "Close" })
|
|
723
|
+
] }),
|
|
724
|
+
!m && /* @__PURE__ */ l(se, { children: [
|
|
725
|
+
/* @__PURE__ */ s(V.Header, { closeButton: !0, children: /* @__PURE__ */ l(V.Title, { className: c($.title), children: [
|
|
726
|
+
d("message.title"),
|
|
727
|
+
" ",
|
|
728
|
+
a == null ? void 0 : a.retailer_name
|
|
729
|
+
] }) }),
|
|
730
|
+
/* @__PURE__ */ s(V.Body, { children: /* @__PURE__ */ l(w, { onSubmit: o.handleSubmit, children: [
|
|
731
|
+
/* @__PURE__ */ l(w.Group, { className: c($.formGroup), children: [
|
|
732
|
+
/* @__PURE__ */ s(w.Label, { htmlFor: "name", children: d("message.name") }),
|
|
733
|
+
/* @__PURE__ */ s(w.Control, { type: "text", name: "name", isInvalid: !!o.errors.name && o.touched.name, value: o.values.name, onChange: o.handleChange }),
|
|
734
|
+
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.name && o.touched.name ? "block" : "none" }, children: o.errors.name })
|
|
735
|
+
] }),
|
|
736
|
+
/* @__PURE__ */ l(w.Group, { className: c($.formGroup), children: [
|
|
737
|
+
/* @__PURE__ */ s(w.Label, { htmlFor: "email", children: d("message.email") }),
|
|
738
|
+
/* @__PURE__ */ s(
|
|
739
|
+
w.Control,
|
|
740
|
+
{
|
|
741
|
+
type: "email",
|
|
742
|
+
name: "email",
|
|
743
|
+
isInvalid: !!o.errors.email && o.touched.email,
|
|
744
|
+
value: o.values.email,
|
|
745
|
+
onChange: o.handleChange
|
|
746
|
+
}
|
|
747
|
+
),
|
|
748
|
+
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.email && o.touched.email ? "block" : "none" }, children: o.errors.email })
|
|
749
|
+
] }),
|
|
750
|
+
/* @__PURE__ */ l(w.Group, { className: c($.formGroup), children: [
|
|
751
|
+
/* @__PURE__ */ s(w.Label, { children: d("message.phone") }),
|
|
752
|
+
/* @__PURE__ */ s(w.Control, { type: "tel", name: "phone", isInvalid: !!o.errors.phone && o.touched.phone, value: o.values.phone, onChange: o.handleChange }),
|
|
753
|
+
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.phone && o.touched.phone ? "block" : "none" }, children: o.errors.phone })
|
|
754
|
+
] }),
|
|
755
|
+
/* @__PURE__ */ l(w.Group, { className: c($.formGroup), children: [
|
|
756
|
+
/* @__PURE__ */ s(w.Label, { children: d("message.message") }),
|
|
757
|
+
/* @__PURE__ */ s(w.Control, { as: "textarea", name: "message", isInvalid: !!o.errors.message && o.touched.message, value: o.values.message, onChange: o.handleChange }),
|
|
758
|
+
/* @__PURE__ */ s(w.Control.Feedback, { type: "invalid", style: { display: o.errors.message && o.touched.message ? "block" : "none" }, children: o.errors.message })
|
|
759
|
+
] }),
|
|
760
|
+
/* @__PURE__ */ l(oe, { className: c($.submit), variant: "dark", type: "submit", disabled: o.isSubmitting || m, children: [
|
|
761
|
+
!m && /* @__PURE__ */ s(se, { children: o.isSubmitting ? d("message.sending") : d("message.send") }),
|
|
762
|
+
m && d("message.sent"),
|
|
763
|
+
o.isSubmitting && /* @__PURE__ */ s("img", { src: "https://images.sofasandsectionals.com/cc/pal-loader.svg", alt: "Loading", width: 20, height: 20 })
|
|
764
|
+
] }),
|
|
765
|
+
/* @__PURE__ */ s(w.Text, { className: c($.success), children: m && d("message.success") }),
|
|
766
|
+
/* @__PURE__ */ s(w.Text, { className: c($.error), children: o.errors.general })
|
|
767
|
+
] }) })
|
|
768
|
+
] })
|
|
769
|
+
] });
|
|
770
|
+
}, Ds = {}, Fs = ({ id: e, locale: t, baseUrl: n = "/retailers" }) => {
|
|
771
|
+
var d;
|
|
772
|
+
const { t: a, i18n: i } = E("default"), { settings: r } = H();
|
|
773
|
+
return D(() => {
|
|
774
|
+
i.changeLanguage(t);
|
|
775
|
+
}, [t]), /* @__PURE__ */ l("div", { className: "cc", children: [
|
|
776
|
+
/* @__PURE__ */ s("style", { dangerouslySetInnerHTML: { __html: ((d = r == null ? void 0 : r.entity) == null ? void 0 : d.store_locator_css) || "" } }),
|
|
777
|
+
/* @__PURE__ */ l(ge, { children: [
|
|
778
|
+
/* @__PURE__ */ s(Cs, {}),
|
|
779
|
+
/* @__PURE__ */ s(ne, { xs: { order: 0 }, lg: { order: 1 }, className: c(Ds.noMap, "position-relative"), children: /* @__PURE__ */ l("div", { className: "position-relative", children: [
|
|
780
|
+
/* @__PURE__ */ s(at, {}),
|
|
781
|
+
/* @__PURE__ */ s(nt, {})
|
|
641
782
|
] }) })
|
|
642
783
|
] }),
|
|
643
|
-
/* @__PURE__ */
|
|
644
|
-
/* @__PURE__ */
|
|
784
|
+
/* @__PURE__ */ s(Es, {}),
|
|
785
|
+
/* @__PURE__ */ s(Bs, {})
|
|
645
786
|
] });
|
|
646
|
-
},
|
|
647
|
-
/* @__PURE__ */
|
|
648
|
-
/* @__PURE__ */
|
|
787
|
+
}, qs = ({ id: e, locale: t }) => /* @__PURE__ */ s(He, { children: /* @__PURE__ */ s(Ge, { i18n: Le, children: /* @__PURE__ */ l(Ue, { apiKey: "AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M", libraries: ["places"], children: [
|
|
788
|
+
/* @__PURE__ */ s("script", { src: "https://maps.googleapis.com/maps/api/js?key=AIzaSyAnJmWEU1r63DiRWHkjczxzHyIEq3dhj4M&libraries=places" }),
|
|
789
|
+
/* @__PURE__ */ s(st, { id: e, lngLocale: t, autolocate: !0, children: /* @__PURE__ */ s(Fs, { id: e, locale: t }) })
|
|
649
790
|
] }) }) });
|
|
650
791
|
export {
|
|
651
|
-
|
|
792
|
+
qs as default
|
|
652
793
|
};
|