@plainsheet/core 0.7.11 → 1.0.1

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.
Files changed (31) hide show
  1. package/README.md +8 -7
  2. package/dist/animation/animation.d.ts +16 -1
  3. package/dist/animation/animation.d.ts.map +1 -1
  4. package/dist/animation/animation.type.d.ts +5 -0
  5. package/dist/animation/animation.type.d.ts.map +1 -1
  6. package/dist/bottom-sheet.d.ts +1 -1
  7. package/dist/bottom-sheet.d.ts.map +1 -1
  8. package/dist/calculator/position-calculator.d.ts +1 -1
  9. package/dist/event-handlers/dragging-handler.d.ts +3 -3
  10. package/dist/event-handlers/dragging-handler.d.ts.map +1 -1
  11. package/dist/index.d.ts +6 -8
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/initializer/bottom-sheet-defaults.d.ts.map +1 -1
  14. package/dist/initializer/bottom-sheet-initializer.d.ts +2 -2
  15. package/dist/initializer/bottom-sheet-props-initializer.d.ts +3 -3
  16. package/dist/initializer/bottom-sheet-props-initializer.d.ts.map +1 -1
  17. package/dist/plainsheet-core.cjs.js +2 -2
  18. package/dist/plainsheet-core.es.js +611 -559
  19. package/dist/plainsheet-core.umd.js +3 -3
  20. package/dist/types/bottom-sheet-props.type.d.ts +16 -1
  21. package/dist/types/bottom-sheet-props.type.d.ts.map +1 -1
  22. package/dist/types/bottom-sheet-state.type.d.ts +2 -1
  23. package/dist/types/bottom-sheet-state.type.d.ts.map +1 -1
  24. package/dist/types/bottom-sheet.type.d.ts +2 -2
  25. package/dist/utils/animation/animation.type.d.ts +1 -1
  26. package/dist/utils/animation/animation.type.d.ts.map +1 -1
  27. package/dist/utils/dom/translate.d.ts +1 -1
  28. package/dist/utils/dom/visibility.d.ts +2 -0
  29. package/dist/utils/dom/visibility.d.ts.map +1 -1
  30. package/dist/utils/event-listeners/TabEventListener.d.ts +1 -1
  31. package/package.json +6 -5
@@ -1,58 +1,61 @@
1
- (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.pbs-root{position:fixed;left:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:fit-content;max-height:100vh;z-index:2}.pbs-dialog-reset{background-color:transparent;color:inherit;border:none;outline:none;padding:0;margin:0}.pbs-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1;transition:background-color .2s ease-out}.pbs-backdrop.hidden{visibility:hidden}.pbs-backdrop.open{background-color:#454545b3}.pbs-backdrop.transparent{background-color:transparent}.pbs-container{--pbs-container-background-color: rgb(240, 240, 240);background-color:var(--pbs-container-background-color);position:relative;display:none;flex-direction:column;align-items:center;justify-content:flex-start;width:92%;height:fit-content;max-height:100vh;border-radius:10px 10px 0 0}.pbs-container.open{display:flex}.pbs-container .pbs-gap-filler{position:absolute;bottom:calc(-100vh + .5px);left:0;background-color:var(--pbs-container-background-color);content:"";width:100%;height:100vh}.pbs-handle{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:30px;cursor:pointer}.pbs-handle.hidden{display:none}.pbs-button-reset{background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none}button:focus.pbs-button-reset{outline:none}.pbs-handle-bar{background-color:#a8a8a8;position:relative;width:12%;height:7px;border-radius:12px}.pbs-handle-bar.hidden{display:none}.pbs-content-wrapper{position:relative;width:100%;height:fit-content;max-height:100%;overflow-y:scroll}.pbs-content-wrapper::-webkit-scrollbar{display:none}.example{-ms-overflow-style:none;scrollbar-width:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
- var Lt = Object.defineProperty;
3
- var At = (t, n, e) => n in t ? Lt(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
4
- var j = (t, n, e) => At(t, typeof n != "symbol" ? n + "" : n, e);
5
- function H(t) {
1
+ (function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode('.pbs-root{position:fixed;left:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;width:100%;height:fit-content;max-height:100vh;z-index:2}.pbs-dialog-reset{background-color:transparent;color:inherit;border:none;outline:none;padding:0;margin:0}.pbs-backdrop{position:fixed;top:0;left:0;width:100%;height:100%;background-color:transparent;z-index:1;backface-visibility:"hidden"}.pbs-backdrop.hidden{visibility:hidden}.pbs-backdrop.open{background-color:#454545b3}.pbs-backdrop.transparent{background-color:transparent}.pbs-container{--pbs-container-background-color: rgb(240, 240, 240);background-color:var(--pbs-container-background-color);position:relative;display:none;flex-direction:column;align-items:center;justify-content:flex-start;width:92%;height:fit-content;max-height:100vh;border-radius:10px 10px 0 0}.pbs-container.open{display:flex}.pbs-container .pbs-gap-filler{position:absolute;bottom:calc(-100vh + .5px);left:0;background-color:var(--pbs-container-background-color);content:"";width:100%;height:100vh}.pbs-handle{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:100%;height:30px;cursor:pointer}.pbs-handle.hidden{display:none}.pbs-button-reset{background-color:transparent;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none;border:none}button:focus.pbs-button-reset{outline:none}.pbs-handle-bar{background-color:#a8a8a8;position:relative;width:12%;height:7px;border-radius:12px}.pbs-handle-bar.hidden{display:none}.pbs-content-wrapper{position:relative;width:100%;height:fit-content;max-height:100%;overflow-y:scroll}.pbs-content-wrapper::-webkit-scrollbar{display:none}.example{-ms-overflow-style:none;scrollbar-width:none}')),document.head.appendChild(e)}}catch(n){console.error("vite-plugin-css-injected-by-js",n)}})();
2
+ var It = Object.defineProperty;
3
+ var Nt = (t, n, e) => n in t ? It(t, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : t[n] = e;
4
+ var _ = (t, n, e) => (Nt(t, typeof n != "symbol" ? n + "" : n, e), e);
5
+ function w(t) {
6
6
  return typeof t == "string";
7
7
  }
8
- function Bt(t, n) {
9
- return t.classList.contains(Z(n));
8
+ function at(t, n) {
9
+ return t.classList.contains(rt(n));
10
10
  }
11
- function $(t, n) {
12
- t.classList.add(Z(n));
11
+ function X(t, n) {
12
+ t.classList.add(rt(n));
13
13
  }
14
- function rt(t, n) {
15
- t.classList.remove(Z(n));
14
+ function st(t, n) {
15
+ t.classList.remove(rt(n));
16
16
  }
17
- function U(t, n, e) {
18
- H(e) && (H(n) && rt(t, n), $(t, e));
17
+ function V(t, n, e) {
18
+ w(e) && (w(n) && st(t, n), X(t, e));
19
19
  }
20
- function Z(t) {
21
- return H(t) ? t.trim().replace(/\./g, "") : "";
20
+ function rt(t) {
21
+ return w(t) ? t.trim().replace(/\./g, "") : "";
22
22
  }
23
- function M(t) {
24
- return t.map((n) => Z(n)).filter(Boolean).join(" ");
23
+ function x(t) {
24
+ return t.map((n) => rt(n)).filter(Boolean).join(" ");
25
25
  }
26
- function Dt(t) {
27
- return t.map((n) => n == null ? void 0 : n.trim()).filter(Boolean).map((n) => `.${n}`).join(" ");
26
+ const ct = "open", lt = "hidden";
27
+ function xt(t) {
28
+ return Mt(t);
28
29
  }
29
- const lt = "open", ut = "hidden";
30
- function et(t, n) {
30
+ function Q(t, n) {
31
31
  const e = n;
32
32
  if (Array.isArray(t)) {
33
33
  t.forEach((r) => {
34
- q(r, e), r.setAttribute("aria-modal", e ? "true" : "false");
34
+ tt(r, e), r.setAttribute("aria-modal", e ? "true" : "false");
35
35
  });
36
36
  return;
37
37
  }
38
- q(t, e), t.setAttribute("aria-modal", e ? "true" : "false");
38
+ tt(t, e), t.setAttribute("aria-modal", e ? "true" : "false");
39
+ }
40
+ function tt(t, n) {
41
+ n ? (X(t, ct), st(t, lt)) : (X(t, lt), st(t, ct));
39
42
  }
40
- function q(t, n) {
41
- n ? ($(t, lt), rt(t, ut)) : ($(t, ut), rt(t, lt));
43
+ function Mt(t) {
44
+ return at(t, ct) && !at(t, lt);
42
45
  }
43
- function yt(t) {
46
+ function Ht(t) {
44
47
  return t instanceof HTMLElement;
45
48
  }
46
- function Y(t) {
49
+ function B(t) {
47
50
  return typeof t == "number" && !Number.isNaN(t);
48
51
  }
49
- function Yt(t) {
50
- yt(t) && t.focus();
52
+ function Pt(t) {
53
+ Ht(t) && t.focus();
51
54
  }
52
- function It(t) {
53
- if (!yt(t) || t.offsetParent === null || "disabled" in t && t.disabled)
55
+ function Rt(t) {
56
+ if (!Ht(t) || t.offsetParent === null || "disabled" in t && t.disabled)
54
57
  return !1;
55
- const e = t.getAttribute("tabindex"), r = Y(e) ? parseInt(e, 10) : -1, i = [
58
+ const e = t.getAttribute("tabindex"), r = B(e) ? parseInt(e, 10) : -1, a = [
56
59
  "INPUT",
57
60
  "BUTTON",
58
61
  "SELECT",
@@ -60,26 +63,20 @@ function It(t) {
60
63
  "A",
61
64
  "AREA",
62
65
  "IFRAME"
63
- ].includes(t.tagName), a = t instanceof HTMLAnchorElement && t.href !== "" || t instanceof HTMLAreaElement && t.href !== "";
64
- return i || a || r > -1;
66
+ ].includes(t.tagName), o = t instanceof HTMLAnchorElement && t.href !== "" || t instanceof HTMLAreaElement && t.href !== "";
67
+ return a || o || r > -1;
65
68
  }
66
- var T = /* @__PURE__ */ ((t) => (t.Backdrop = "pbs-backdrop", t.Root = "pbs-root", t.Container = "pbs-container", t.GapFiller = "pbs-gap-filler", t.Handle = "pbs-handle", t.HandleBar = "pbs-handle-bar", t.ContentWrapper = "pbs-content-wrapper", t))(T || {}), ot = /* @__PURE__ */ ((t) => (t.Button = "pbs-button-reset", t.Dialog = "pbs-dialog-reset", t))(ot || {}), K = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t))(K || {});
67
- function x(t, n, e) {
69
+ var v = /* @__PURE__ */ ((t) => (t.Backdrop = "pbs-backdrop", t.Root = "pbs-root", t.Container = "pbs-container", t.GapFiller = "pbs-gap-filler", t.Handle = "pbs-handle", t.HandleBar = "pbs-handle-bar", t.ContentWrapper = "pbs-content-wrapper", t))(v || {}), ut = /* @__PURE__ */ ((t) => (t.Button = "pbs-button-reset", t.Dialog = "pbs-dialog-reset", t))(ut || {}), Z = /* @__PURE__ */ ((t) => (t.Hidden = "hidden", t))(Z || {});
70
+ function I(t, n, e) {
68
71
  const r = document.createElement(t);
69
- return n.split(" ").forEach((i) => {
70
- $(r, i);
71
- }), H(e) && r.setAttribute("data-testid", e), r;
72
+ return n.split(" ").forEach((a) => {
73
+ X(r, a);
74
+ }), w(e) && r.setAttribute("data-testid", e), r;
72
75
  }
73
- const sn = {
74
- CONTENTS_WRAPPER: Dt([
75
- T.Root,
76
- T.ContentWrapper
77
- ])
78
- };
79
- function dt(t, n, e, r) {
76
+ function pt(t, n, e, r) {
80
77
  switch (r) {
81
78
  case "content-height":
82
- return n >= t ? Et(t, n, e) : 0;
79
+ return n >= t ? At(t, n, e) : 0;
83
80
  case "middle":
84
81
  return -(t / 2 - n);
85
82
  case "top":
@@ -88,7 +85,7 @@ function dt(t, n, e, r) {
88
85
  return 0;
89
86
  }
90
87
  }
91
- function Ct(t, n) {
88
+ function St(t, n) {
92
89
  const e = n < t, r = n > t;
93
90
  return {
94
91
  isUp: e,
@@ -96,13 +93,13 @@ function Ct(t, n) {
96
93
  stayedSame: n === t
97
94
  };
98
95
  }
99
- function Tt(t, n) {
96
+ function Ot(t, n) {
100
97
  return n < t ? -(t - n) : n - t;
101
98
  }
102
99
  function W(t, n) {
103
100
  return t > n ? t - n : n - t;
104
101
  }
105
- function xt(t, n) {
102
+ function Gt(t, n) {
106
103
  const e = t < n, r = t > n;
107
104
  return {
108
105
  isUp: e,
@@ -110,63 +107,63 @@ function xt(t, n) {
110
107
  stayedSame: t === n
111
108
  };
112
109
  }
113
- function ft(t, n, e) {
110
+ function yt(t, n, e) {
114
111
  const r = t === "above";
115
- return e.filter((o) => {
116
- const i = o * n.viewportHeight;
117
- return r ? n.visibleHeight < i : n.visibleHeight > i;
112
+ return e.filter((i) => {
113
+ const a = i * n.viewportHeight;
114
+ return r ? n.visibleHeight < a : n.visibleHeight > a;
118
115
  });
119
116
  }
120
- function Et(t, n, e) {
117
+ function At(t, n, e) {
121
118
  return -(t - n) + e;
122
119
  }
123
- function gt(t) {
120
+ function Ct(t) {
124
121
  return Number(t.replace("px", ""));
125
122
  }
126
- function J(t, ...n) {
123
+ function nt(t, ...n) {
127
124
  return Number(t.toFixed(...n));
128
125
  }
129
- function vt(t) {
126
+ function Lt(t) {
130
127
  const n = /(?<type>\w+)\((?<values>[^)]+)\)/g, e = [];
131
128
  let r;
132
129
  for (; (r = n.exec(t)) !== null; ) {
133
- const o = r[1], i = r[2].split(",").map((a) => a.trim());
134
- e.push({ type: o, values: i });
130
+ const i = r[1], a = r[2].split(",").map((o) => o.trim());
131
+ e.push({ type: i, values: a });
135
132
  }
136
133
  return e;
137
134
  }
138
- function Nt(t) {
139
- const n = t.style.transform, e = vt(n);
135
+ function jt(t) {
136
+ const n = t.style.transform, e = Lt(n);
140
137
  return { transform: n, transformValues: e };
141
138
  }
142
- function wt(t, n) {
139
+ function Bt(t, n) {
143
140
  const e = t.find(
144
141
  (r) => r.type.startsWith(n)
145
142
  );
146
143
  return e || null;
147
144
  }
148
- const it = "translate";
149
- function I(t) {
150
- const n = t.style.transform, e = vt(n), r = wt(
145
+ const dt = "translate";
146
+ function F(t) {
147
+ const n = t.style.transform, e = Lt(n), r = Bt(
151
148
  e,
152
- it
149
+ dt
153
150
  );
154
- return St(r ?? {
155
- type: it,
151
+ return Dt(r ?? {
152
+ type: dt,
156
153
  values: []
157
154
  });
158
155
  }
159
- function Q(t, { x: n, y: e }) {
156
+ function et(t, { x: n, y: e }) {
160
157
  const {
161
158
  transform: r,
162
- transformValues: o
163
- } = Nt(t), i = wt(
164
- o,
165
- it
159
+ transformValues: i
160
+ } = jt(t), a = Bt(
161
+ i,
162
+ dt
166
163
  );
167
- if (i) {
168
- const a = St(i);
169
- t.style.transform = `translate(${n ?? a.x ?? 0}px,${e ?? a.y ?? 0}px)`;
164
+ if (a) {
165
+ const o = Dt(a);
166
+ t.style.transform = `translate(${n ?? o.x ?? 0}px,${e ?? o.y ?? 0}px)`;
170
167
  return;
171
168
  }
172
169
  if (r) {
@@ -175,69 +172,69 @@ function Q(t, { x: n, y: e }) {
175
172
  }
176
173
  t.style.transform = `translate(${n ?? 0}px,${e ?? 0}px)`;
177
174
  }
178
- function St(t) {
175
+ function Dt(t) {
179
176
  if (t.type !== "translate")
180
177
  throw new Error(
181
178
  `Could not get coordinates from ${t.type}, since is not translate.`
182
179
  );
183
180
  const n = t.values[0], e = t.values[1];
184
181
  return {
185
- x: gt(n) ?? 0,
186
- y: gt(e) ?? 0
182
+ x: Ct(n) ?? 0,
183
+ y: Ct(e) ?? 0
187
184
  };
188
185
  }
189
- function at(t) {
186
+ function ft(t) {
190
187
  return t != null;
191
188
  }
192
- function ht(t, {
189
+ function Tt(t, {
193
190
  min: n,
194
191
  max: e
195
192
  }) {
196
- return at(e) && t >= e ? e : at(n) && t <= n ? n : t;
193
+ return ft(e) && t >= e ? e : ft(n) && t <= n ? n : t;
197
194
  }
198
- const Ft = (t, n, e) => {
199
- n instanceof HTMLElement && !Bt(n, T.Handle) && e.scrollTop >= 1 || (t.isDragging = !0);
200
- }, Mt = (t, n, e, r) => (o) => {
201
- r.startY = t.getCoordinates(o).y, r.containerStartTranslate = I(n), e.onDragStart();
202
- }, Pt = (t, n, e, r, o) => (i) => {
203
- Rt(
204
- i,
195
+ const Ut = (t, n, e) => {
196
+ n instanceof HTMLElement && !at(n, v.Handle) && e.scrollTop >= 1 || (t.isDragging = !0);
197
+ }, _t = (t, n, e, r) => (i) => {
198
+ r.isDragging && (r.startY = t.getCoordinates(i).y, r.containerStartTranslate = F(n), e.onDragStart());
199
+ }, Vt = (t, n, e, r, i) => (a) => {
200
+ $t(
201
+ a,
205
202
  t,
206
203
  e,
207
204
  r,
208
- o,
205
+ i,
209
206
  n,
210
207
  e.marginTop
211
208
  );
212
209
  };
213
- function Rt(t, n, e, r, o, i, a) {
214
- if (!r.isDragging || !Y(r.startY))
210
+ function $t(t, n, e, r, i, a, o) {
211
+ if (!r.isDragging || !B(r.startY))
215
212
  return;
216
- const u = n.getCoordinates(t).y, s = Tt(r.startY, u), b = window.innerHeight, l = i.clientHeight, d = l - (r.containerStartTranslate.y + s);
217
- if (d >= b)
213
+ const l = n.getCoordinates(t).y, s = Ot(r.startY, l), g = window.innerHeight, d = a.clientHeight, b = d - (r.containerStartTranslate.y + s);
214
+ if (b >= g)
218
215
  return;
219
- const y = Ct(r.startY, u);
220
- if (y.isUp && !e.expandable && d >= l || e.preventClosing && d <= l)
216
+ const C = St(r.startY, l);
217
+ if (C.isUp && !e.expandable && b >= d || e.preventClosing && b <= d)
221
218
  return;
222
- o.start(() => {
223
- Q(i, {
219
+ i.start(() => {
220
+ et(a, {
224
221
  y: r.containerStartTranslate.y + s
225
222
  });
226
223
  }, 0);
227
- const E = b - a, c = l - r.containerStartTranslate.y;
228
- if (y.isUp) {
229
- const C = E - c, w = E - d, k = ht(
230
- 1 - J(w / C, 2),
224
+ const f = g - o, T = d - r.containerStartTranslate.y;
225
+ if (C.isUp) {
226
+ const E = f - T, c = f - b, O = Tt(
227
+ 1 - nt(c / E, 2),
231
228
  {
232
229
  min: 0,
233
230
  max: 1
234
231
  }
235
232
  );
236
- e.onDragMove(y, k);
237
- } else if (y.isDown) {
238
- const C = ht(
239
- J(
240
- 1 - d / c,
233
+ e.onDragMove(C, O);
234
+ } else if (C.isDown) {
235
+ const E = Tt(
236
+ nt(
237
+ 1 - b / T,
241
238
  2
242
239
  ),
243
240
  {
@@ -245,85 +242,85 @@ function Rt(t, n, e, r, o, i, a) {
245
242
  max: 1
246
243
  }
247
244
  );
248
- e.onDragMove(y, C);
245
+ e.onDragMove(C, E);
249
246
  }
250
247
  }
251
- const Gt = (t, n, e, r, o, i, a) => (u) => {
252
- if (!r.isDragging || (r.isDragging = !1, !Y(r.startY)))
248
+ const Wt = (t, n, e, r, i, a, o) => (l) => {
249
+ if (!r.isDragging || (r.isDragging = !1, !B(r.startY)))
253
250
  return;
254
251
  e.onDragEnd();
255
- const s = r.startY, b = t.getCoordinates(u).y, l = I(n).y, d = Ct(s, b), y = window.innerHeight, E = n.clientHeight;
256
- if (d.isUp) {
252
+ const s = r.startY, g = t.getCoordinates(l).y, d = F(n).y, b = St(s, g), C = window.innerHeight, f = n.clientHeight;
253
+ if (b.isUp) {
257
254
  if (!e.expandable)
258
255
  return;
259
- const c = [...e.snapPoints].sort(
260
- (k, B) => k - B
261
- ), C = E + -l;
262
- for (const k of c) {
263
- const B = k * window.innerHeight;
264
- if (C <= B) {
265
- const O = W(
266
- C,
267
- B
256
+ const T = [...e.snapPoints].sort(
257
+ (O, Y) => O - Y
258
+ ), E = f + -d;
259
+ for (const O of T) {
260
+ const Y = O * window.innerHeight;
261
+ if (E <= Y) {
262
+ const A = W(
263
+ E,
264
+ Y
268
265
  );
269
- a.translateContainer({
270
- startY: l,
271
- endY: l - O,
272
- animationFrame: o,
266
+ o.translateContainer({
267
+ startY: d,
268
+ endY: d - A,
269
+ animationFrame: i,
273
270
  bottomSheetContainer: n
274
271
  });
275
272
  return;
276
273
  }
277
274
  }
278
- const w = Et(
279
- y,
280
- E,
275
+ const c = At(
276
+ C,
277
+ f,
281
278
  e.marginTop
282
279
  );
283
- a.translateContainer({
284
- startY: l,
285
- endY: w,
286
- animationFrame: o,
280
+ o.translateContainer({
281
+ startY: d,
282
+ endY: c,
283
+ animationFrame: i,
287
284
  bottomSheetContainer: n
288
285
  });
289
- } else if (d.isDown) {
290
- const c = [...e.snapPoints].sort(
291
- (C, w) => w - C
286
+ } else if (b.isDown) {
287
+ const T = [...e.snapPoints].sort(
288
+ (E, c) => c - E
292
289
  );
293
- for (const C of c) {
294
- const w = C * window.innerHeight, k = E + -l;
295
- if (k >= w) {
296
- const B = W(
297
- k,
298
- w
290
+ for (const E of T) {
291
+ const c = E * window.innerHeight, O = f + -d;
292
+ if (O >= c) {
293
+ const Y = W(
294
+ O,
295
+ c
299
296
  );
300
- a.translateContainer({
301
- startY: l,
302
- endY: l + B,
303
- animationFrame: o,
297
+ o.translateContainer({
298
+ startY: d,
299
+ endY: d + Y,
300
+ animationFrame: i,
304
301
  bottomSheetContainer: n
305
302
  });
306
303
  return;
307
304
  }
308
305
  }
309
306
  if (e.preventClosing) {
310
- const C = E + -l;
311
- if (C >= E) {
312
- const w = W(C, E);
313
- a.translateContainer({
314
- startY: l,
315
- endY: l + w,
316
- animationFrame: o,
307
+ const E = f + -d;
308
+ if (E >= f) {
309
+ const c = W(E, f);
310
+ o.translateContainer({
311
+ startY: d,
312
+ endY: d + c,
313
+ animationFrame: i,
317
314
  bottomSheetContainer: n
318
315
  });
319
316
  }
320
317
  return;
321
318
  }
322
- i();
319
+ a();
323
320
  }
324
321
  };
325
322
  var G = /* @__PURE__ */ ((t) => (t[t.All = -1] = "All", t[t.None = 0] = "None", t[t.Capture = 1] = "Capture", t[t.Target = 2] = "Target", t[t.Bubble = 3] = "Bubble", t))(G || {});
326
- function mt(t) {
323
+ function Et(t) {
327
324
  switch (t) {
328
325
  case 0:
329
326
  return 0;
@@ -337,62 +334,62 @@ function mt(t) {
337
334
  return -1;
338
335
  }
339
336
  }
340
- const _t = {
337
+ const Xt = {
341
338
  eventPhase: G.All
342
339
  };
343
- class V {
340
+ class $ {
344
341
  constructor(n) {
345
- j(this, "currentTarget");
342
+ _(this, "currentTarget");
346
343
  this.currentTarget = n;
347
344
  }
348
345
  addEventListeners({
349
346
  onStart: n,
350
- onStartOptions: e = _t,
347
+ onStartOptions: e = Xt,
351
348
  onMove: r,
352
- onEnd: o
349
+ onEnd: i
353
350
  }) {
354
- this.addTouchEventListeners({ onStart: n, onStartOptions: e, onMove: r, onEnd: o }), this.addMouseEventListeners({ onStart: n, onStartOptions: e, onMove: r, onEnd: o });
351
+ this.addTouchEventListeners({ onStart: n, onStartOptions: e, onMove: r, onEnd: i }), this.addMouseEventListeners({ onStart: n, onStartOptions: e, onMove: r, onEnd: i });
355
352
  }
356
353
  addTouchEventListeners({
357
354
  onStart: n,
358
355
  onStartOptions: e,
359
356
  onMove: r,
360
- onEnd: o
357
+ onEnd: i
361
358
  }) {
362
359
  n && this.currentTarget.addEventListener(
363
360
  "touchstart",
364
- (i) => {
361
+ (a) => {
365
362
  if (e.eventPhase === G.All) {
366
- n(i);
363
+ n(a);
367
364
  return;
368
365
  }
369
- mt(i.eventPhase) === e.eventPhase && n(i);
366
+ Et(a.eventPhase) === e.eventPhase && n(a);
370
367
  },
371
368
  {
372
369
  passive: !0
373
370
  }
374
- ), r && this.currentTarget.addEventListener("touchmove", r), o && this.currentTarget.addEventListener("touchend", o);
371
+ ), r && this.currentTarget.addEventListener("touchmove", r), i && this.currentTarget.addEventListener("touchend", i);
375
372
  }
376
373
  addMouseEventListeners({
377
374
  onStart: n,
378
375
  onStartOptions: e,
379
376
  onMove: r,
380
- onEnd: o
377
+ onEnd: i
381
378
  }) {
382
379
  n && this.currentTarget.addEventListener(
383
380
  "mousedown",
384
- (i) => {
381
+ (a) => {
385
382
  if (e.eventPhase === G.All) {
386
- n(i);
383
+ n(a);
387
384
  return;
388
385
  }
389
- mt(i.eventPhase) === e.eventPhase && n(i);
386
+ Et(a.eventPhase) === e.eventPhase && n(a);
390
387
  },
391
388
  {
392
389
  passive: !0
393
390
  }
394
- ), r && this.currentTarget.addEventListener("mousemove", r), o && this.currentTarget.addEventListener("mouseup", (i) => {
395
- o(i);
391
+ ), r && this.currentTarget.addEventListener("mousemove", r), i && this.currentTarget.addEventListener("mouseup", (a) => {
392
+ i(a);
396
393
  });
397
394
  }
398
395
  removeEventListeners({
@@ -433,18 +430,18 @@ class V {
433
430
  };
434
431
  }
435
432
  }
436
- function Ht(t) {
433
+ function Yt(t) {
437
434
  const n = t;
438
435
  return `${n} ${n} 0px 0px`;
439
436
  }
440
- function jt(t, n) {
441
- const e = Ut(t);
442
- Vt(e), e.bottomSheetContainer.style.width = t.width;
437
+ function zt(t, n) {
438
+ const e = Kt(t);
439
+ qt(e), e.bottomSheetContainer.style.width = t.width;
443
440
  const r = document.createElement("div");
444
441
  r.innerHTML = t.content ?? "";
445
- const o = window.innerHeight;
446
- e.bottomSheetContainer.style.maxHeight = `${o}px`, e.bottomSheetContentWrapper.appendChild(r);
447
- const i = Wt({
442
+ const i = window.innerHeight;
443
+ e.bottomSheetContainer.style.maxHeight = `${i}px`, e.bottomSheetContentWrapper.appendChild(r);
444
+ const a = Jt({
448
445
  bottomSheetElements: e,
449
446
  bottomSheetProps: t,
450
447
  options: n
@@ -455,237 +452,237 @@ function jt(t, n) {
455
452
  ), t.handleStyle && Object.assign(e.bottomSheetHandleBar.style, t.handleStyle), t.contentWrapperStyle && Object.assign(
456
453
  e.bottomSheetContentWrapper.style,
457
454
  t.contentWrapperStyle
458
- ), { elements: e, eventHandlers: i };
455
+ ), { elements: e, eventHandlers: a };
459
456
  }
460
- function Ut(t) {
461
- const n = x(
457
+ function Kt(t) {
458
+ const n = I(
462
459
  "dialog",
463
- M([
464
- T.Root,
465
- ot.Dialog,
460
+ x([
461
+ v.Root,
462
+ ut.Dialog,
466
463
  t.rootClass
467
464
  ]),
468
- T.Root
465
+ v.Root
469
466
  );
470
467
  n.ariaLabel = t.ariaLabel;
471
- const e = x(
468
+ const e = I(
472
469
  "section",
473
- M([T.Container, t.containerClass]),
474
- T.Container
470
+ x([v.Container, t.containerClass]),
471
+ v.Container
475
472
  );
476
- t.containerBorderRadius && (e.style.borderRadius = Ht(
473
+ t.containerBorderRadius && (e.style.borderRadius = Yt(
477
474
  t.containerBorderRadius
478
475
  ));
479
- const r = x(
476
+ const r = I(
480
477
  "div",
481
- T.GapFiller,
482
- T.GapFiller
478
+ v.GapFiller,
479
+ v.GapFiller
483
480
  );
484
481
  t.containerBackgroundColor && (e.style.backgroundColor = t.containerBackgroundColor, r.style.backgroundColor = t.containerBackgroundColor);
485
- const o = x(
482
+ const i = I(
486
483
  "button",
487
- M([
488
- T.Handle,
489
- ot.Button,
490
- t.shouldShowHandle ? null : K.Hidden,
484
+ x([
485
+ v.Handle,
486
+ ut.Button,
487
+ t.shouldShowHandle ? null : Z.Hidden,
491
488
  t.handleClass
492
489
  ]),
493
- T.Handle
490
+ v.Handle
494
491
  );
495
- o.setAttribute("type", "button"), o.ariaLabel = "bottom sheet close button";
496
- const i = x(
492
+ i.setAttribute("type", "button"), i.ariaLabel = "bottom sheet close button";
493
+ const a = I(
497
494
  "span",
498
- M([
499
- T.HandleBar,
500
- t.shouldShowHandle ? null : K.Hidden
495
+ x([
496
+ v.HandleBar,
497
+ t.shouldShowHandle ? null : Z.Hidden
501
498
  ]),
502
- T.HandleBar
503
- ), a = x(
499
+ v.HandleBar
500
+ ), o = I(
504
501
  "article",
505
- M([
506
- T.ContentWrapper,
502
+ x([
503
+ v.ContentWrapper,
507
504
  t.contentWrapperClass
508
505
  ]),
509
- T.ContentWrapper
510
- ), u = x(
506
+ v.ContentWrapper
507
+ ), l = I(
511
508
  "div",
512
- M([
513
- T.Backdrop,
509
+ x([
510
+ v.Backdrop,
514
511
  t.backdropClass,
515
- K.Hidden
512
+ Z.Hidden
516
513
  ]),
517
- T.Backdrop
514
+ v.Backdrop
518
515
  );
519
- return t.backdropColor && (u.style.backgroundColor = t.backdropColor), t.backDropTransition && (u.style.transition = t.backDropTransition), {
516
+ return t.backdropColor && (l.style.backgroundColor = t.backdropColor), t.backDropTransition && (l.style.transition = t.backDropTransition), {
520
517
  bottomSheetRoot: n,
521
- bottomSheetBackdrop: u,
518
+ bottomSheetBackdrop: l,
522
519
  bottomSheetContainer: e,
523
- bottomSheetHandle: o,
524
- bottomSheetHandleBar: i,
525
- bottomSheetContentWrapper: a,
520
+ bottomSheetHandle: i,
521
+ bottomSheetHandleBar: a,
522
+ bottomSheetContentWrapper: o,
526
523
  bottomSheetContainerGapFiller: r
527
524
  };
528
525
  }
529
- function Vt({
526
+ function qt({
530
527
  bottomSheetRoot: t,
531
528
  bottomSheetContainer: n,
532
529
  bottomSheetHandle: e,
533
530
  bottomSheetHandleBar: r,
534
- bottomSheetContentWrapper: o,
535
- bottomSheetContainerGapFiller: i
531
+ bottomSheetContentWrapper: i,
532
+ bottomSheetContainerGapFiller: a
536
533
  }) {
537
- t.appendChild(n), e.appendChild(r), n.appendChild(e), n.appendChild(o), n.appendChild(i);
534
+ t.appendChild(n), e.appendChild(r), n.appendChild(e), n.appendChild(i), n.appendChild(a);
538
535
  }
539
- function Wt({
536
+ function Jt({
540
537
  bottomSheetElements: t,
541
538
  bottomSheetProps: n,
542
539
  options: e
543
540
  }) {
544
541
  const {
545
542
  bottomSheetRoot: r,
546
- bottomSheetContainer: o,
547
- bottomSheetHandle: i,
548
- bottomSheetContainerGapFiller: a,
549
- bottomSheetContentWrapper: u,
543
+ bottomSheetContainer: i,
544
+ bottomSheetHandle: a,
545
+ bottomSheetContainerGapFiller: o,
546
+ bottomSheetContentWrapper: l,
550
547
  bottomSheetBackdrop: s
551
- } = t, { animationFrame: b } = e, l = new V(i), d = new V(
552
- u
553
- ), y = new V(
554
- a
548
+ } = t, { animationFrame: g } = e, d = new $(a), b = new $(
549
+ l
550
+ ), C = new $(
551
+ o
555
552
  );
556
- let E = [];
557
- const c = new V(
553
+ let f = [];
554
+ const T = new $(
558
555
  window
559
- ), C = Mt(
560
- c,
561
- o,
556
+ ), E = _t(
557
+ T,
558
+ i,
562
559
  n,
563
560
  e.draggingState
564
- ), w = Pt(
565
- c,
566
- o,
561
+ ), c = Vt(
562
+ T,
563
+ i,
567
564
  n,
568
565
  e.draggingState,
569
- b
570
- ), k = Gt(
571
- c,
572
- o,
566
+ g
567
+ ), O = Wt(
568
+ T,
569
+ i,
573
570
  n,
574
571
  e.draggingState,
575
- b,
572
+ g,
576
573
  e.onClose,
577
574
  e.bottomSheetState
578
575
  );
579
- function B(S) {
580
- S.target instanceof Element && !r.contains(S.target) && e.onClose();
576
+ function Y(H) {
577
+ H.target instanceof Element && !r.contains(H.target) && e.onClose();
581
578
  }
582
- function O(S) {
583
- Ft(
579
+ function A(H) {
580
+ Ut(
584
581
  e.draggingState,
585
- S.target,
582
+ H.target,
586
583
  t.bottomSheetContentWrapper
587
584
  );
588
585
  }
589
- function N(S) {
590
- const L = S ?? n;
591
- L.draggable && L.backgroundDraggable && (d.addEventListeners({
592
- onStart: O,
586
+ function z(H) {
587
+ const S = H ?? n;
588
+ S.draggable && S.backgroundDraggable && (b.addEventListeners({
589
+ onStart: A,
593
590
  onStartOptions: {
594
591
  eventPhase: G.Target
595
592
  }
596
- }), y.addEventListeners({
597
- onStart: O
598
- })), L.draggable && c.addEventListeners({
599
- onStart: C,
600
- onMove: w,
601
- onEnd: k
602
- }), L.draggable && window.document.addEventListener("keyup", (p) => {
603
- p.key === "Escape" && e.onClose();
604
- }), i.addEventListener("keyup", (p) => {
605
- if (p.key === "ArrowUp") {
593
+ }), C.addEventListeners({
594
+ onStart: A
595
+ })), S.draggable && T.addEventListeners({
596
+ onStart: E,
597
+ onMove: c,
598
+ onEnd: O
599
+ }), S.draggable && window.document.addEventListener("keyup", (y) => {
600
+ y.key === "Escape" && e.onClose();
601
+ }), a.addEventListener("keyup", (y) => {
602
+ if (y.key === "ArrowUp") {
606
603
  e.moveUp();
607
604
  return;
608
605
  }
609
- if (p.key === "ArrowDown") {
606
+ if (y.key === "ArrowDown") {
610
607
  e.moveDown();
611
608
  return;
612
609
  }
613
- if (p.shiftKey && p.key === "Tab") {
614
- const F = nt(
610
+ if (y.shiftKey && y.key === "Tab") {
611
+ const U = ot(
615
612
  t.bottomSheetContentWrapper
616
613
  );
617
- Yt(F);
614
+ Pt(U);
618
615
  }
619
616
  });
620
617
  }
621
- function X(S) {
622
- const L = S ?? n;
623
- n.shouldCloseOnOutsideClick && !n.preventClosing ? s.addEventListener("click", B) : s.style.pointerEvents = "none", L.draggable && (l.addEventListeners({
624
- onStart: O
625
- }), E.forEach((p) => {
626
- p.removeEventListeners({
627
- onStart: O
618
+ function K(H) {
619
+ const S = H ?? n;
620
+ n.shouldCloseOnOutsideClick && !n.preventClosing ? s.addEventListener("click", Y) : s.style.pointerEvents = "none", S.draggable && (d.addEventListeners({
621
+ onStart: A
622
+ }), f.forEach((y) => {
623
+ y.removeEventListeners({
624
+ onStart: A
628
625
  });
629
- }), E = n.dragTriggers.reduce((p, F) => {
630
- const g = r.querySelectorAll(F);
631
- if (!g.length)
632
- return p;
633
- const h = Array.from(g).map((f) => f instanceof HTMLElement ? new V(f) : null).filter((f) => !!f);
634
- return [...p, ...h];
635
- }, []), E.forEach((p) => {
636
- p.addEventListeners({
637
- onStart: O,
626
+ }), f = n.dragTriggers.reduce((y, U) => {
627
+ const q = r.querySelectorAll(U);
628
+ if (!q.length)
629
+ return y;
630
+ const J = Array.from(q).map((u) => u instanceof HTMLElement ? new $(u) : null).filter((u) => !!u);
631
+ return [...y, ...J];
632
+ }, []), f.forEach((y) => {
633
+ y.addEventListeners({
634
+ onStart: A,
638
635
  onStartOptions: {
639
636
  eventPhase: G.Target
640
637
  }
641
638
  });
642
639
  }));
643
640
  }
644
- function tt() {
645
- s.removeEventListener("click", B);
641
+ function N() {
642
+ s.removeEventListener("click", Y);
646
643
  }
647
- function nt(S) {
648
- let L = [...Array.from(S.childNodes).reverse()];
649
- for (; L.length; ) {
650
- const p = L.shift();
651
- if (It(p))
652
- return p;
653
- p && (L = [
654
- ...L,
655
- ...Array.from(p.childNodes).reverse()
644
+ function ot(H) {
645
+ let S = [...Array.from(H.childNodes).reverse()];
646
+ for (; S.length; ) {
647
+ const y = S.shift();
648
+ if (Rt(y))
649
+ return y;
650
+ y && (S = [
651
+ ...S,
652
+ ...Array.from(y.childNodes).reverse()
656
653
  ]);
657
654
  }
658
655
  return null;
659
656
  }
660
- function z() {
661
- l.removeEventListeners({
662
- onStart: O
663
- }), d.removeEventListeners({
664
- onStart: O
665
- }), y.removeEventListeners({
666
- onStart: O
667
- }), E.forEach((S) => {
668
- S.removeEventListeners({
669
- onStart: O
657
+ function it() {
658
+ d.removeEventListeners({
659
+ onStart: A
660
+ }), b.removeEventListeners({
661
+ onStart: A
662
+ }), C.removeEventListeners({
663
+ onStart: A
664
+ }), f.forEach((H) => {
665
+ H.removeEventListeners({
666
+ onStart: A
670
667
  });
671
- }), c.removeEventListeners({
672
- onStart: C,
673
- onMove: w,
674
- onEnd: k
668
+ }), T.removeEventListeners({
669
+ onStart: E,
670
+ onMove: c,
671
+ onEnd: O
675
672
  });
676
673
  }
677
674
  return {
678
- attachEventListeners: N,
679
- clearEventListeners: z,
680
- attacheOnOpenEventListeners: X,
681
- clearOnOpenEventListeners: tt
675
+ attachEventListeners: z,
676
+ clearEventListeners: it,
677
+ attacheOnOpenEventListeners: K,
678
+ clearOnOpenEventListeners: N
682
679
  };
683
680
  }
684
- class $t {
681
+ class kt {
685
682
  constructor() {
686
- j(this, "animationId");
687
- j(this, "isInProgress");
688
- j(this, "startedAt");
683
+ _(this, "animationId");
684
+ _(this, "isInProgress");
685
+ _(this, "startedAt");
689
686
  this.animationId = null, this.isInProgress = !1, this.startedAt = null;
690
687
  }
691
688
  /**
@@ -695,123 +692,146 @@ class $t {
695
692
  */
696
693
  start(n, e, r = !1) {
697
694
  this.isInProgress = !0;
698
- const o = (i) => {
699
- this.startedAt || (this.startedAt = i);
700
- const a = i - this.startedAt, s = e === 0 ? 1 : J(a / e, 2), b = s >= 1 && !r;
701
- n(s), b ? this.stop() : this.animationId = requestAnimationFrame(o);
695
+ const i = (a) => {
696
+ this.startedAt || (this.startedAt = a);
697
+ const o = a - this.startedAt, s = e === 0 ? 1 : nt(o / e, 2), g = s >= 1 && !r;
698
+ n(s), g ? this.stop() : this.animationId = requestAnimationFrame(i);
702
699
  };
703
- this.animationId = requestAnimationFrame(o);
700
+ this.animationId = requestAnimationFrame(i);
704
701
  }
705
702
  stop() {
706
- this.isInProgress = !1, this.startedAt = null, Y(this.animationId) && cancelAnimationFrame(this.animationId);
703
+ this.isInProgress = !1, this.startedAt = null, B(this.animationId) && cancelAnimationFrame(this.animationId);
707
704
  }
708
705
  }
709
- function Xt(t) {
706
+ function Qt(t) {
710
707
  const {
711
708
  startY: n,
712
709
  endY: e,
713
710
  bottomSheetContainer: r,
714
- animationFrame: o,
715
- onEnd: i,
716
- animationTimingFunction: a,
717
- animationDuration: u
718
- } = t, s = Tt(n, e);
719
- o.stop();
720
- let b = !1;
721
- o.start((l) => {
722
- Q(r, {
723
- y: n + s * a(l)
724
- }), !b && l >= 1 && (i == null || i(), b = !0);
725
- }, u);
711
+ animationFrame: i,
712
+ onEnd: a,
713
+ animationTimingFunction: o,
714
+ animationDuration: l
715
+ } = t, s = Ot(n, e);
716
+ i.stop();
717
+ let g = !1;
718
+ i.start((d) => {
719
+ et(r, {
720
+ y: n + s * o(d)
721
+ }), !g && d >= 1 && (a == null || a(), g = !0);
722
+ }, l);
726
723
  }
727
- const st = (t, n) => (e) => {
728
- Xt({
724
+ const gt = (t, n) => (e) => {
725
+ Qt({
729
726
  ...e,
730
727
  animationTimingFunction: t,
731
728
  animationDuration: n
732
729
  });
733
- }, R = {
730
+ };
731
+ function Zt(t) {
732
+ const {
733
+ backdrop: n,
734
+ animationFrame: e,
735
+ animationTimingFunction: r,
736
+ animationDuration: i,
737
+ onEnd: a
738
+ } = t;
739
+ e.stop();
740
+ let o = !1;
741
+ e.start((l) => {
742
+ Object.entries(t.styleCreators).forEach(([s, g]) => {
743
+ n.style[s] = g(Number(r(l).toFixed(2)));
744
+ }), !o && l >= 1 && (a == null || a(), o = !0);
745
+ }, i);
746
+ }
747
+ const mt = (t, n) => (e) => {
748
+ Zt({
749
+ ...e,
750
+ animationTimingFunction: t,
751
+ animationDuration: n
752
+ });
753
+ }, P = {
734
754
  TOP: "top",
735
755
  MIDDLE: "middle",
736
756
  CONTENT_HEIGHT: "content-height",
737
757
  CLOSED: "closed"
738
758
  };
739
- function zt(t) {
740
- return !(!Y(t) || t > 1 || t < 0);
759
+ function tn(t) {
760
+ return !(!B(t) || t > 1 || t < 0);
741
761
  }
742
- function Kt(t, n) {
762
+ function nn(t, n) {
743
763
  const e = {
744
- set(r, o, i, a) {
745
- return n(o, i), Reflect.set(r, o, i, a);
764
+ set(r, i, a, o) {
765
+ return n(i, a), Reflect.set(r, i, a, o);
746
766
  }
747
767
  };
748
768
  return new Proxy(t, e);
749
769
  }
750
- function qt(...t) {
770
+ function en(...t) {
751
771
  console.error(t);
752
772
  }
753
- const P = {
773
+ const M = {
754
774
  EASE: "ease",
755
775
  EASE_IN: "ease-in",
756
776
  EASE_OUT: "ease-out",
757
777
  EASE_IN_OUT: "ease-in-out",
758
778
  SPRING: "spring"
759
779
  };
760
- function Jt(t) {
761
- for (const n of Object.values(P))
780
+ function ht(t) {
781
+ for (const n of Object.values(M))
762
782
  if (n === t)
763
783
  return !0;
764
784
  return !1;
765
785
  }
766
- function Ot(t) {
767
- return !!(t instanceof Object && "p1x" in t && "p1y" in t && "p2x" in t && "p2y" in t && Y(t.p1x) && Y(t.p1y) && Y(t.p2x) && Y(t.p2y));
786
+ function bt(t) {
787
+ return !!(t instanceof Object && "p1x" in t && "p1y" in t && "p2x" in t && "p2y" in t && B(t.p1x) && B(t.p1y) && B(t.p2x) && B(t.p2y));
768
788
  }
769
- function _(t, n, e, r) {
789
+ function j(t, n, e, r) {
770
790
  return function(s) {
771
- return u(i(s));
791
+ return l(a(s));
772
792
  };
773
- function i(s) {
774
- let b = 0, l = 1, d = s, y;
793
+ function a(s) {
794
+ let g = 0, d = 1, b = s, C;
775
795
  if (s === 0 || s === 1)
776
796
  return s;
777
- for (; b < l; ) {
778
- if (y = a(d), Math.abs(y - s) < 1e-3)
779
- return d;
780
- s > y ? b = d : l = d, d = (l + b) / 2;
797
+ for (; g < d; ) {
798
+ if (C = o(b), Math.abs(C - s) < 1e-3)
799
+ return b;
800
+ s > C ? g = b : d = b, b = (d + g) / 2;
781
801
  }
782
- return d;
802
+ return b;
783
803
  }
784
- function a(s) {
804
+ function o(s) {
785
805
  return 3 * t * s * Math.pow(1 - s, 2) + 3 * e * Math.pow(s, 2) * (1 - s) + Math.pow(s, 3);
786
806
  }
787
- function u(s) {
807
+ function l(s) {
788
808
  return 3 * n * s * Math.pow(1 - s, 2) + 3 * r * Math.pow(s, 2) * (1 - s) + Math.pow(s, 3);
789
809
  }
790
810
  }
791
- const bt = _(0.25, 0.1, 0.25, 1), Qt = _(0.42, 0, 1, 1), kt = _(0.42, 0, 0.58, 1), Zt = _(0.4, 0.1, 0.6, 1), tn = _(0.45, 1.5, 0.55, 1);
792
- function nn(t) {
811
+ const vt = j(0.25, 0.1, 0.25, 1), rn = j(0.42, 0, 1, 1), Ft = j(0.42, 0, 0.58, 1), on = j(0.4, 0.1, 0.6, 1), an = j(0.45, 1.5, 0.55, 1);
812
+ function sn(t) {
793
813
  switch (t) {
794
- case P.EASE:
795
- return bt;
796
- case P.EASE_IN:
797
- return Qt;
798
- case P.EASE_OUT:
799
- return kt;
800
- case P.EASE_IN_OUT:
801
- return Zt;
802
- case P.SPRING:
803
- return tn;
814
+ case M.EASE:
815
+ return vt;
816
+ case M.EASE_IN:
817
+ return rn;
818
+ case M.EASE_OUT:
819
+ return Ft;
820
+ case M.EASE_IN_OUT:
821
+ return on;
822
+ case M.SPRING:
823
+ return an;
804
824
  default:
805
- return bt;
825
+ return vt;
806
826
  }
807
827
  }
808
- function pt(t) {
828
+ function wt(t) {
809
829
  return typeof t == "boolean";
810
830
  }
811
- const en = {
831
+ const cn = {
812
832
  ariaLabel: "Bottom sheet",
813
833
  content: "",
814
- defaultPosition: R.CONTENT_HEIGHT,
834
+ defaultPosition: P.CONTENT_HEIGHT,
815
835
  marginTop: 20,
816
836
  snapPoints: [],
817
837
  width: "92%",
@@ -848,6 +868,11 @@ const en = {
848
868
  backdropClass: null,
849
869
  draggingAnimationTimings: "ease-in-out",
850
870
  draggingAnimationDuration: 180,
871
+ backdropAnimationTimings: "ease-out",
872
+ backdropAnimationDuration: 180,
873
+ backdropAnimStyleCreators: {
874
+ opacity: (t) => `${1 - t}`
875
+ },
851
876
  rootStyle: {},
852
877
  containerStyle: {},
853
878
  handleStyle: {},
@@ -855,13 +880,13 @@ const en = {
855
880
  backdropStyle: {},
856
881
  containerGapFillerStyle: {}
857
882
  };
858
- function rn(t) {
883
+ function ln(t) {
859
884
  const n = {
860
- ...en
885
+ ...cn
861
886
  }, e = Object.entries(t).reduce(
862
- (o, i) => {
863
- const [a, u] = i;
864
- return at(u) && (o[a] = u), o;
887
+ (i, a) => {
888
+ const [o, l] = a;
889
+ return ft(l) && (i[o] = l), i;
865
890
  },
866
891
  {}
867
892
  );
@@ -870,83 +895,83 @@ function rn(t) {
870
895
  ...e
871
896
  };
872
897
  }
873
- function ct(t) {
874
- if (Ot(t)) {
875
- const { p1x: n, p1y: e, p2x: r, p2y: o } = t;
876
- return _(n, e, r, o);
898
+ function R(t) {
899
+ if (bt(t)) {
900
+ const { p1x: n, p1y: e, p2x: r, p2y: i } = t;
901
+ return j(n, e, r, i);
877
902
  }
878
- return Jt(t) ? nn(t) : kt;
903
+ return ht(t) ? sn(t) : Ft;
879
904
  }
880
- function on(t, n, e, r) {
881
- function o(i, a) {
882
- switch (i) {
905
+ function un(t, n, e, r) {
906
+ function i(a, o) {
907
+ switch (a) {
883
908
  case "content":
884
- H(a) && (t.bottomSheetContentWrapper.innerHTML = a);
909
+ w(o) && (t.bottomSheetContentWrapper.innerHTML = o);
885
910
  break;
886
911
  case "width":
887
- H(a) && (t.bottomSheetContainer.style.width = a);
912
+ w(o) && (t.bottomSheetContainer.style.width = o);
888
913
  break;
889
914
  case "shouldShowHandle":
890
- pt(a) || q(t.bottomSheetHandle, !1);
915
+ wt(o) || tt(t.bottomSheetHandle, !1);
891
916
  break;
892
917
  case "shouldShowBackdrop":
893
- pt(a) || q(t.bottomSheetBackdrop, !1);
918
+ wt(o) || tt(t.bottomSheetBackdrop, !1);
894
919
  break;
895
920
  case "containerBorderRadius":
896
- H(a) && (t.bottomSheetContainer.style.borderRadius = Ht(a));
921
+ w(o) && (t.bottomSheetContainer.style.borderRadius = Yt(o));
897
922
  break;
898
923
  case "containerBackgroundColor":
899
- H(a) && (t.bottomSheetContainer.style.backgroundColor = a, t.bottomSheetContainerGapFiller.style.backgroundColor = a);
924
+ w(o) && (t.bottomSheetContainer.style.backgroundColor = o, t.bottomSheetContainerGapFiller.style.backgroundColor = o);
900
925
  break;
901
926
  case "backdropColor":
902
- H(a) && (t.bottomSheetBackdrop.style.backgroundColor = a);
927
+ w(o) && (t.bottomSheetBackdrop.style.backgroundColor = o);
903
928
  break;
904
929
  case "backDropTransition":
905
- H(a) && (t.bottomSheetBackdrop.style.transition = a);
930
+ w(o) && (t.bottomSheetBackdrop.style.transition = o);
906
931
  break;
907
932
  case "rootClass":
908
- if (!H(a))
933
+ if (!w(o))
909
934
  return;
910
- U(
935
+ V(
911
936
  t.bottomSheetRoot,
912
937
  e.rootClass,
913
- a
938
+ o
914
939
  );
915
940
  break;
916
941
  case "containerClass":
917
- if (!H(a))
942
+ if (!w(o))
918
943
  return;
919
- U(
944
+ V(
920
945
  t.bottomSheetContainer,
921
946
  e.containerClass,
922
- a
947
+ o
923
948
  );
924
949
  break;
925
950
  case "handleClass":
926
- if (!H(a))
951
+ if (!w(o))
927
952
  return;
928
- U(
953
+ V(
929
954
  t.bottomSheetHandle,
930
955
  e.handleClass,
931
- a
956
+ o
932
957
  );
933
958
  break;
934
959
  case "contentWrapperClass":
935
- if (!H(a))
960
+ if (!w(o))
936
961
  return;
937
- U(
962
+ V(
938
963
  t.bottomSheetContentWrapper,
939
964
  e.contentWrapperClass,
940
- a
965
+ o
941
966
  );
942
967
  break;
943
968
  case "backdropClass":
944
- if (!H(a))
969
+ if (!w(o))
945
970
  return;
946
- U(
971
+ V(
947
972
  t.bottomSheetBackdrop,
948
973
  e.backdropClass,
949
- a
974
+ o
950
975
  );
951
976
  break;
952
977
  case "expandable":
@@ -962,25 +987,45 @@ function on(t, n, e, r) {
962
987
  r.clearEventListeners(), r.attachEventListeners(e);
963
988
  break;
964
989
  case "draggingAnimationTimings":
965
- if (Ot(a)) {
966
- const u = ct(a), s = st(
967
- u,
990
+ if (bt(o) || ht(o)) {
991
+ const l = R(o), s = gt(
992
+ l,
968
993
  e.draggingAnimationDuration
969
994
  );
970
995
  n.translateContainer = s;
971
996
  }
972
997
  break;
973
998
  case "draggingAnimationDuration":
974
- if (Y(a)) {
975
- const u = ct(
999
+ if (B(o)) {
1000
+ const l = R(
976
1001
  e.draggingAnimationTimings
977
- ), s = st(
978
- u,
979
- a
1002
+ ), s = gt(
1003
+ l,
1004
+ o
980
1005
  );
981
1006
  n.translateContainer = s;
982
1007
  }
983
1008
  break;
1009
+ case "backdropAnimationTimings":
1010
+ if (bt(o) || ht(o)) {
1011
+ const l = R(o), s = mt(
1012
+ l,
1013
+ e.backdropAnimationDuration
1014
+ );
1015
+ n.animateBackdrop = s;
1016
+ }
1017
+ break;
1018
+ case "backdropAnimationDuration":
1019
+ if (B(o)) {
1020
+ const l = R(
1021
+ e.backdropAnimationTimings
1022
+ ), s = mt(
1023
+ l,
1024
+ o
1025
+ );
1026
+ n.animateBackdrop = s;
1027
+ }
1028
+ break;
984
1029
  case "rootStyle":
985
1030
  e.rootStyle && Object.assign(
986
1031
  t.bottomSheetRoot.style,
@@ -1019,18 +1064,24 @@ function on(t, n, e, r) {
1019
1064
  break;
1020
1065
  }
1021
1066
  }
1022
- return o;
1067
+ return i;
1023
1068
  }
1024
- function cn(t) {
1025
- const n = rn(t), e = ct(
1069
+ function fn(t) {
1070
+ const n = ln(t), e = R(
1026
1071
  t.draggingAnimationTimings
1072
+ ), r = gt(
1073
+ e,
1074
+ n.draggingAnimationDuration
1075
+ ), i = R(
1076
+ t.backdropAnimationTimings
1077
+ ), a = mt(
1078
+ i,
1079
+ n.backdropAnimationDuration
1027
1080
  ), o = {
1028
1081
  isMounted: !1,
1029
- translateContainer: st(
1030
- e,
1031
- n.draggingAnimationDuration
1032
- )
1033
- }, i = {
1082
+ translateContainer: r,
1083
+ animateBackdrop: a
1084
+ }, l = {
1034
1085
  startY: null,
1035
1086
  containerStartTranslate: {
1036
1087
  x: 0,
@@ -1040,126 +1091,137 @@ function cn(t) {
1040
1091
  originalDocumentOverflowY: null,
1041
1092
  originalDocumentOverscrollBehavior: null
1042
1093
  };
1043
- function a() {
1044
- i.originalDocumentOverflowY && i.originalDocumentOverflowY !== "hidden" && (document.body.style.overflowY = i.originalDocumentOverflowY), i.originalDocumentOverscrollBehavior && (document.body.style.position = i.originalDocumentOverscrollBehavior);
1094
+ function s() {
1095
+ l.originalDocumentOverflowY && l.originalDocumentOverflowY !== "hidden" && (document.body.style.overflowY = l.originalDocumentOverflowY), l.originalDocumentOverscrollBehavior && (document.body.style.position = l.originalDocumentOverscrollBehavior);
1045
1096
  }
1046
- const u = new $t(), s = {
1047
- animationFrame: u,
1048
- onClose: B,
1097
+ const g = new kt(), d = {
1098
+ animationFrame: g,
1099
+ onClose: z,
1049
1100
  bottomSheetState: o,
1050
- draggingState: i,
1051
- snapTo: F,
1052
- moveUp: L,
1053
- moveDown: p
1054
- }, { elements: b, eventHandlers: l } = jt(
1101
+ draggingState: l,
1102
+ snapTo: J,
1103
+ moveUp: U,
1104
+ moveDown: q
1105
+ }, { elements: b, eventHandlers: C } = zt(
1055
1106
  n,
1056
- s
1057
- ), d = Kt(
1107
+ d
1108
+ ), f = nn(
1058
1109
  n,
1059
- on(
1110
+ un(
1060
1111
  b,
1061
1112
  o,
1062
1113
  n,
1063
- l
1114
+ C
1064
1115
  )
1065
- ), { bottomSheetBackdrop: y, bottomSheetRoot: E, bottomSheetContainer: c } = b, C = (g) => {
1066
- const h = g ?? window.document.body;
1067
- h.appendChild(E), h.appendChild(y);
1068
- const f = window.innerHeight;
1069
- Q(c, {
1070
- y: f
1071
- }), l.attachEventListeners(), o.isMounted = !0;
1072
- }, w = () => {
1073
- l.clearEventListeners(), Object.values(b).forEach((g) => {
1074
- g.remove();
1075
- }), a(), o.isMounted = !1;
1076
- }, k = () => {
1116
+ ), { bottomSheetBackdrop: T, bottomSheetRoot: E, bottomSheetContainer: c } = b, O = (u) => {
1117
+ const h = u ?? window.document.body;
1118
+ h.appendChild(E), h.appendChild(T);
1119
+ const p = window.innerHeight;
1120
+ et(c, {
1121
+ y: p
1122
+ }), C.attachEventListeners(), o.isMounted = !0;
1123
+ }, Y = () => {
1124
+ C.clearEventListeners(), Object.values(b).forEach((u) => {
1125
+ u.remove();
1126
+ }), s(), o.isMounted = !1;
1127
+ }, A = () => {
1077
1128
  var D;
1078
- if (O() || qt(
1129
+ if (K() || en(
1079
1130
  'Bottom Sheet is not mounted yet. call the "mount" method first.'
1080
1131
  ), (D = t.beforeOpen) == null || D.call(t), N())
1081
1132
  return;
1082
- et(y, !0), d.shouldShowBackdrop || $(y, "transparent"), et([c], !0), Q(c, {
1133
+ Q(T, !0), f.shouldShowBackdrop || X(T, "transparent"), Q([c], !0), et(c, {
1083
1134
  y: c.clientHeight
1084
1135
  });
1085
- const h = window.innerHeight, f = dt(
1136
+ const h = window.innerHeight, p = pt(
1086
1137
  h,
1087
1138
  c.clientHeight,
1088
- d.marginTop,
1089
- d.defaultPosition
1090
- ), m = I(c).y;
1139
+ f.marginTop,
1140
+ f.defaultPosition
1141
+ ), m = F(c).y;
1091
1142
  o.translateContainer({
1092
1143
  startY: m,
1093
- endY: f,
1094
- animationFrame: u,
1144
+ endY: p,
1145
+ animationFrame: g,
1095
1146
  bottomSheetContainer: c,
1096
1147
  onEnd: t.afterOpen
1097
1148
  });
1098
- const v = document.body.style.overflowY;
1099
- i.originalDocumentOverflowY = v || "initial";
1100
- const A = document.body.style.overscrollBehavior;
1101
- i.originalDocumentOverscrollBehavior = A || "initial", document.body.style.overflow = "hidden", document.body.style.overscrollBehavior = "contain", b.bottomSheetHandle.focus(), l.attacheOnOpenEventListeners();
1149
+ const k = document.body.style.overflowY;
1150
+ l.originalDocumentOverflowY = k || "initial";
1151
+ const L = document.body.style.overscrollBehavior;
1152
+ l.originalDocumentOverscrollBehavior = L || "initial", document.body.style.overflow = "hidden", document.body.style.overscrollBehavior = "contain", b.bottomSheetHandle.focus(), C.attacheOnOpenEventListeners();
1102
1153
  };
1103
- function B() {
1104
- var f;
1105
- if (X())
1154
+ function z() {
1155
+ var p;
1156
+ if (!xt(c))
1106
1157
  return;
1107
- (f = t.beforeClose) == null || f.call(t);
1108
- const g = I(c).y, h = c.clientHeight;
1109
- o.translateContainer({
1110
- startY: g,
1158
+ (p = t.beforeClose) == null || p.call(t);
1159
+ const u = F(c).y, h = c.clientHeight;
1160
+ if (o.translateContainer({
1161
+ startY: u,
1111
1162
  endY: h,
1112
- animationFrame: u,
1163
+ animationFrame: g,
1113
1164
  bottomSheetContainer: c,
1114
1165
  onEnd: () => {
1115
1166
  var m;
1116
- (m = t.afterClose) == null || m.call(t), et([y, c], !1), l.clearOnOpenEventListeners();
1167
+ (m = t.afterClose) == null || m.call(t), Q([c], !1), C.clearOnOpenEventListeners();
1117
1168
  }
1118
- }), a();
1169
+ }), Object.keys(f.backdropAnimStyleCreators).length > 0) {
1170
+ const m = new kt();
1171
+ o.animateBackdrop({
1172
+ animationFrame: m,
1173
+ backdrop: T,
1174
+ styleCreators: f.backdropAnimStyleCreators,
1175
+ onEnd: () => {
1176
+ Q([T], !1), T.style.opacity = "1";
1177
+ }
1178
+ });
1179
+ }
1180
+ s();
1119
1181
  }
1120
- function O() {
1182
+ function K() {
1121
1183
  return o.isMounted;
1122
1184
  }
1123
1185
  function N() {
1124
- const g = I(c).y, h = window.innerHeight, f = c.clientHeight >= h ? h : c.clientHeight;
1125
- return g <= f;
1186
+ const u = F(c).y, h = window.innerHeight, p = c.clientHeight >= h ? h : c.clientHeight;
1187
+ return u <= p;
1126
1188
  }
1127
- function X() {
1189
+ function ot() {
1128
1190
  return !N();
1129
1191
  }
1130
- function tt() {
1131
- const g = I(c).y, h = c.clientHeight, f = window.innerHeight;
1132
- if (g <= 5 && g >= -5)
1133
- return R.CONTENT_HEIGHT;
1134
- const m = h - g;
1135
- if (m === f / 2)
1136
- return R.MIDDLE;
1137
- const v = f - d.marginTop, A = 10;
1138
- return m <= v + A && m >= v - A ? R.TOP : R.CLOSED;
1192
+ function it() {
1193
+ const u = F(c).y, h = c.clientHeight, p = window.innerHeight;
1194
+ if (u <= 5 && u >= -5)
1195
+ return P.CONTENT_HEIGHT;
1196
+ const m = h - u;
1197
+ if (m === p / 2)
1198
+ return P.MIDDLE;
1199
+ const k = p - f.marginTop, L = 10;
1200
+ return m <= k + L && m >= k - L ? P.TOP : P.CLOSED;
1139
1201
  }
1140
- function nt() {
1202
+ function H() {
1141
1203
  return c.clientHeight;
1142
1204
  }
1143
- function z(g) {
1205
+ function S(u) {
1144
1206
  if (!N())
1145
1207
  return;
1146
- const h = I(c).y, m = c.clientHeight - h, v = window.innerHeight - g, A = xt(m, v), D = W(m, v);
1208
+ const h = F(c).y, m = c.clientHeight - h, k = window.innerHeight - u, L = Gt(m, k), D = W(m, k);
1147
1209
  o.translateContainer({
1148
1210
  startY: h,
1149
- endY: h + (A.isUp ? -D : D),
1150
- animationFrame: u,
1211
+ endY: h + (L.isUp ? -D : D),
1212
+ animationFrame: g,
1151
1213
  bottomSheetContainer: c
1152
1214
  });
1153
1215
  }
1154
- function S(g, {
1216
+ function y(u, {
1155
1217
  viewportHeight: h,
1156
- visibleHeight: f
1218
+ visibleHeight: p
1157
1219
  }) {
1158
1220
  let m = null;
1159
- for (const v of g) {
1160
- const A = v * h, D = W(
1161
- f,
1162
- A
1221
+ for (const k of u) {
1222
+ const L = k * h, D = W(
1223
+ p,
1224
+ L
1163
1225
  );
1164
1226
  (m === null || D < m) && (m = D);
1165
1227
  }
@@ -1167,82 +1229,82 @@ function cn(t) {
1167
1229
  minOffset: m
1168
1230
  };
1169
1231
  }
1170
- function L() {
1171
- const g = [...d.snapPoints].reverse(), h = I(c).y, f = c.clientHeight, m = f - h;
1172
- if (!d.expandable && m >= f)
1232
+ function U() {
1233
+ const u = [...f.snapPoints].reverse(), h = F(c).y, p = c.clientHeight, m = p - h;
1234
+ if (!f.expandable && m >= p)
1173
1235
  return;
1174
- const v = window.innerHeight, A = ft(
1236
+ const k = window.innerHeight, L = yt(
1175
1237
  "above",
1176
- { visibleHeight: m, viewportHeight: v },
1177
- g
1178
- ), { minOffset: D } = S(A, {
1238
+ { visibleHeight: m, viewportHeight: k },
1239
+ u
1240
+ ), { minOffset: D } = y(L, {
1179
1241
  visibleHeight: m,
1180
- viewportHeight: v
1242
+ viewportHeight: k
1181
1243
  });
1182
- if (D === null && m < v - d.marginTop) {
1244
+ if (D === null && m < k - f.marginTop) {
1183
1245
  o.translateContainer({
1184
1246
  startY: h,
1185
- endY: dt(
1186
- v,
1187
- f,
1188
- d.marginTop,
1247
+ endY: pt(
1248
+ k,
1249
+ p,
1250
+ f.marginTop,
1189
1251
  "top"
1190
1252
  ),
1191
- animationFrame: u,
1253
+ animationFrame: g,
1192
1254
  bottomSheetContainer: c
1193
1255
  });
1194
1256
  return;
1195
1257
  }
1196
- Y(D) && o.translateContainer({
1258
+ B(D) && o.translateContainer({
1197
1259
  startY: h,
1198
1260
  endY: h - D,
1199
- animationFrame: u,
1261
+ animationFrame: g,
1200
1262
  bottomSheetContainer: c
1201
1263
  });
1202
1264
  }
1203
- function p() {
1204
- const g = I(c).y, f = c.clientHeight - g;
1205
- if (f < 1)
1265
+ function q() {
1266
+ const u = F(c).y, p = c.clientHeight - u;
1267
+ if (p < 1)
1206
1268
  return;
1207
- const m = window.innerHeight, v = ft(
1269
+ const m = window.innerHeight, k = yt(
1208
1270
  "below",
1209
- { visibleHeight: f, viewportHeight: m },
1210
- d.snapPoints
1211
- ), { minOffset: A } = S(v, {
1212
- visibleHeight: f,
1271
+ { visibleHeight: p, viewportHeight: m },
1272
+ f.snapPoints
1273
+ ), { minOffset: L } = y(k, {
1274
+ visibleHeight: p,
1213
1275
  viewportHeight: m
1214
1276
  });
1215
- Y(A) && o.translateContainer({
1216
- startY: g,
1217
- endY: g + A,
1218
- animationFrame: u,
1277
+ B(L) && o.translateContainer({
1278
+ startY: u,
1279
+ endY: u + L,
1280
+ animationFrame: g,
1219
1281
  bottomSheetContainer: c
1220
1282
  });
1221
1283
  }
1222
- function F(g) {
1284
+ function J(u) {
1223
1285
  const h = window.innerHeight;
1224
- if (!zt(g))
1286
+ if (!tn(u))
1225
1287
  return;
1226
- const f = J(h * g, 2);
1227
- z(f);
1288
+ const p = nt(h * u, 2);
1289
+ S(p);
1228
1290
  }
1229
1291
  return {
1230
- props: d,
1292
+ props: f,
1231
1293
  elements: b,
1232
- mount: C,
1233
- unmount: w,
1234
- open: k,
1235
- close: B,
1236
- getIsMounted: O,
1294
+ mount: O,
1295
+ unmount: Y,
1296
+ open: A,
1297
+ close: z,
1298
+ getIsMounted: K,
1237
1299
  getIsOpen: N,
1238
- getIsClosed: X,
1239
- getPosition: tt,
1240
- getHeight: nt,
1241
- moveTo: z,
1242
- snapTo: F
1300
+ getIsClosed: ot,
1301
+ getPosition: it,
1302
+ getHeight: H,
1303
+ moveTo: S,
1304
+ snapTo: J
1243
1305
  };
1244
1306
  }
1245
- function ln() {
1307
+ function gn() {
1246
1308
  return {
1247
1309
  elements: {
1248
1310
  bottomSheetRoot: void 0,
@@ -1265,7 +1327,7 @@ function ln() {
1265
1327
  getHeight: () => 0,
1266
1328
  getIsOpen: () => !1,
1267
1329
  getIsClosed: () => !0,
1268
- getPosition: () => R.CLOSED,
1330
+ getPosition: () => P.CLOSED,
1269
1331
  moveTo: () => {
1270
1332
  },
1271
1333
  snapTo: () => {
@@ -1276,17 +1338,7 @@ function ln() {
1276
1338
  };
1277
1339
  }
1278
1340
  export {
1279
- en as BOTTOM_SHEET_DEFAULT_PROPS,
1280
- R as BOTTOM_SHEET_POSITION,
1281
- sn as BOTTOM_SHEET_SELECTORS,
1282
- P as COMMON_ANIMATION_KEYS,
1283
- T as ClassNames,
1284
- G as EventPhase,
1285
- ot as ResetClassNames,
1286
- K as UtilClassNames,
1287
- cn as createBottomSheet,
1288
- ln as createPlaceholderBottomSheet,
1289
- mt as eventPhaseToEnum,
1290
- Ot as isAnimationTimingPoints,
1291
- Jt as isCommonAnimationTimingsKey
1341
+ v as ClassNames,
1342
+ fn as createBottomSheet,
1343
+ gn as createPlaceholderBottomSheet
1292
1344
  };