@dismissible/react-client 0.3.2 → 1.0.0-canary.4.a9fb4a5
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/CHANGELOG.md +12 -0
- package/LICENSE +21 -0
- package/README.md +247 -232
- package/dist/components/Dismissible.d.ts +3 -4
- package/dist/config/api.config.d.ts +0 -14
- package/dist/contexts/DismissibleContext.d.ts +3 -2
- package/dist/contexts/DismissibleProvider.d.ts +3 -1
- package/dist/dismissible-client.es.js +388 -345
- package/dist/dismissible-client.umd.js +1 -1
- package/dist/hooks/useDismissibleItem.d.ts +17 -16
- package/dist/mockServiceWorker.js +17 -12
- package/dist/{style.css → react-client.css} +1 -1
- package/dist/root.d.ts +0 -6
- package/dist/types/dismissible.types.d.ts +7 -3
- package/dist/utils/auth.utils.d.ts +0 -6
- package/package.json +68 -48
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
var
|
|
1
|
+
var he = Object.defineProperty, me = Object.defineProperties;
|
|
2
|
+
var ye = Object.getOwnPropertyDescriptors;
|
|
3
|
+
var J = Object.getOwnPropertySymbols;
|
|
4
|
+
var te = Object.prototype.hasOwnProperty, re = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var ee = (e, r, t) => r in e ? he(e, r, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[r] = t, b = (e, r) => {
|
|
6
6
|
for (var t in r || (r = {}))
|
|
7
|
-
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
10
|
-
|
|
7
|
+
te.call(r, t) && ee(e, t, r[t]);
|
|
8
|
+
if (J)
|
|
9
|
+
for (var t of J(r))
|
|
10
|
+
re.call(r, t) && ee(e, t, r[t]);
|
|
11
11
|
return e;
|
|
12
|
-
},
|
|
13
|
-
var
|
|
12
|
+
}, E = (e, r) => me(e, ye(r));
|
|
13
|
+
var G = (e, r) => {
|
|
14
14
|
var t = {};
|
|
15
15
|
for (var n in e)
|
|
16
|
-
|
|
17
|
-
if (e != null &&
|
|
18
|
-
for (var n of
|
|
19
|
-
r.indexOf(n) < 0 &&
|
|
16
|
+
te.call(e, n) && r.indexOf(n) < 0 && (t[n] = e[n]);
|
|
17
|
+
if (e != null && J)
|
|
18
|
+
for (var n of J(e))
|
|
19
|
+
r.indexOf(n) < 0 && re.call(e, n) && (t[n] = e[n]);
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
|
-
var
|
|
23
|
-
var s = (
|
|
22
|
+
var $ = (e, r, t) => new Promise((n, o) => {
|
|
23
|
+
var s = (f) => {
|
|
24
24
|
try {
|
|
25
|
-
|
|
26
|
-
} catch (
|
|
27
|
-
|
|
25
|
+
c(t.next(f));
|
|
26
|
+
} catch (d) {
|
|
27
|
+
o(d);
|
|
28
28
|
}
|
|
29
|
-
},
|
|
29
|
+
}, i = (f) => {
|
|
30
30
|
try {
|
|
31
|
-
|
|
32
|
-
} catch (
|
|
33
|
-
|
|
31
|
+
c(t.throw(f));
|
|
32
|
+
} catch (d) {
|
|
33
|
+
o(d);
|
|
34
34
|
}
|
|
35
|
-
},
|
|
36
|
-
|
|
35
|
+
}, c = (f) => f.done ? n(f.value) : Promise.resolve(f.value).then(s, i);
|
|
36
|
+
c((t = t.apply(e, r)).next());
|
|
37
37
|
});
|
|
38
|
-
import { jsx as
|
|
39
|
-
import { createContext as
|
|
40
|
-
const
|
|
38
|
+
import { jsx as U, jsxs as be } from "react/jsx-runtime";
|
|
39
|
+
import { createContext as pe, useContext as we, useMemo as X, useRef as W, useState as z, useCallback as K, useEffect as Q } from "react";
|
|
40
|
+
const ge = /\{[^{}]+\}/g, ve = () => {
|
|
41
41
|
var e, r;
|
|
42
42
|
return typeof process == "object" && Number.parseInt((r = (e = process == null ? void 0 : process.versions) == null ? void 0 : e.node) == null ? void 0 : r.substring(0, 2)) >= 18 && process.versions.undici;
|
|
43
43
|
};
|
|
44
|
-
function
|
|
44
|
+
function Ee() {
|
|
45
45
|
return Math.random().toString(36).slice(2, 11);
|
|
46
46
|
}
|
|
47
47
|
function Re(e) {
|
|
48
|
-
let j =
|
|
48
|
+
let j = b({}, e), {
|
|
49
49
|
baseUrl: r = "",
|
|
50
50
|
Request: t = globalThis.Request,
|
|
51
51
|
fetch: n = globalThis.fetch,
|
|
52
|
-
querySerializer:
|
|
52
|
+
querySerializer: o,
|
|
53
53
|
bodySerializer: s,
|
|
54
|
-
headers:
|
|
55
|
-
requestInitExt:
|
|
56
|
-
} = j,
|
|
54
|
+
headers: i,
|
|
55
|
+
requestInitExt: c = void 0
|
|
56
|
+
} = j, f = G(j, [
|
|
57
57
|
"baseUrl",
|
|
58
58
|
"Request",
|
|
59
59
|
"fetch",
|
|
@@ -62,22 +62,23 @@ function Re(e) {
|
|
|
62
62
|
"headers",
|
|
63
63
|
"requestInitExt"
|
|
64
64
|
]);
|
|
65
|
-
|
|
66
|
-
const
|
|
65
|
+
c = ve() ? c : void 0, r = oe(r);
|
|
66
|
+
const d = [];
|
|
67
67
|
function g(l, a) {
|
|
68
|
-
return
|
|
69
|
-
var
|
|
70
|
-
const
|
|
71
|
-
baseUrl:
|
|
72
|
-
fetch:
|
|
73
|
-
Request:
|
|
74
|
-
headers:
|
|
75
|
-
params:
|
|
76
|
-
parseAs:
|
|
77
|
-
querySerializer:
|
|
78
|
-
bodySerializer:
|
|
79
|
-
body:
|
|
80
|
-
|
|
68
|
+
return $(this, null, function* () {
|
|
69
|
+
var Z;
|
|
70
|
+
const Y = a || {}, {
|
|
71
|
+
baseUrl: R,
|
|
72
|
+
fetch: x = n,
|
|
73
|
+
Request: I = t,
|
|
74
|
+
headers: C,
|
|
75
|
+
params: v = {},
|
|
76
|
+
parseAs: A = "json",
|
|
77
|
+
querySerializer: S,
|
|
78
|
+
bodySerializer: k = s != null ? s : xe,
|
|
79
|
+
body: F,
|
|
80
|
+
middleware: u = []
|
|
81
|
+
} = Y, y = G(Y, [
|
|
81
82
|
"baseUrl",
|
|
82
83
|
"fetch",
|
|
83
84
|
"Request",
|
|
@@ -86,63 +87,64 @@ function Re(e) {
|
|
|
86
87
|
"parseAs",
|
|
87
88
|
"querySerializer",
|
|
88
89
|
"bodySerializer",
|
|
89
|
-
"body"
|
|
90
|
+
"body",
|
|
91
|
+
"middleware"
|
|
90
92
|
]);
|
|
91
|
-
let
|
|
92
|
-
|
|
93
|
-
let
|
|
94
|
-
|
|
95
|
-
const
|
|
96
|
-
|
|
93
|
+
let h = r;
|
|
94
|
+
R && (h = (Z = oe(R)) != null ? Z : r);
|
|
95
|
+
let H = typeof o == "function" ? o : ne(o);
|
|
96
|
+
S && (H = typeof S == "function" ? S : ne(b(b({}, typeof o == "object" ? o : {}), S)));
|
|
97
|
+
const P = F === void 0 ? void 0 : k(
|
|
98
|
+
F,
|
|
97
99
|
// Note: we declare mergeHeaders() both here and below because it’s a bit of a chicken-or-egg situation:
|
|
98
100
|
// bodySerializer() needs all headers so we aren’t dropping ones set by the user, however,
|
|
99
101
|
// the result of this ALSO sets the lowest-priority content-type header. So we re-merge below,
|
|
100
102
|
// setting the content-type at the very beginning to be overwritten.
|
|
101
103
|
// Lastly, based on the way headers work, it’s not a simple “present-or-not” check becauase null intentionally un-sets headers.
|
|
102
|
-
|
|
103
|
-
),
|
|
104
|
+
se(i, C, v.header)
|
|
105
|
+
), fe = se(
|
|
104
106
|
// with no body, we should not to set Content-Type
|
|
105
|
-
|
|
106
|
-
|
|
107
|
+
P === void 0 || // if serialized body is FormData; browser will correctly set Content-Type & boundary expression
|
|
108
|
+
P instanceof FormData ? {} : {
|
|
107
109
|
"Content-Type": "application/json"
|
|
108
110
|
},
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
),
|
|
111
|
+
i,
|
|
112
|
+
C,
|
|
113
|
+
v.header
|
|
114
|
+
), D = [...d, ...u], de = E(b(b({
|
|
113
115
|
redirect: "follow"
|
|
114
|
-
},
|
|
115
|
-
body:
|
|
116
|
-
headers:
|
|
116
|
+
}, f), y), {
|
|
117
|
+
body: P,
|
|
118
|
+
headers: fe
|
|
117
119
|
});
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
let L, N, T = new I(
|
|
121
|
+
Se(l, { baseUrl: h, params: v, querySerializer: H }),
|
|
122
|
+
de
|
|
121
123
|
), m;
|
|
122
|
-
for (const
|
|
123
|
-
|
|
124
|
-
if (
|
|
125
|
-
|
|
126
|
-
baseUrl:
|
|
127
|
-
fetch:
|
|
128
|
-
parseAs:
|
|
129
|
-
querySerializer:
|
|
130
|
-
bodySerializer:
|
|
124
|
+
for (const w in y)
|
|
125
|
+
w in T || (T[w] = y[w]);
|
|
126
|
+
if (D.length) {
|
|
127
|
+
L = Ee(), N = Object.freeze({
|
|
128
|
+
baseUrl: h,
|
|
129
|
+
fetch: x,
|
|
130
|
+
parseAs: A,
|
|
131
|
+
querySerializer: H,
|
|
132
|
+
bodySerializer: k
|
|
131
133
|
});
|
|
132
|
-
for (const
|
|
133
|
-
if (
|
|
134
|
-
const
|
|
135
|
-
request:
|
|
134
|
+
for (const w of D)
|
|
135
|
+
if (w && typeof w == "object" && typeof w.onRequest == "function") {
|
|
136
|
+
const p = yield w.onRequest({
|
|
137
|
+
request: T,
|
|
136
138
|
schemaPath: l,
|
|
137
|
-
params:
|
|
138
|
-
options:
|
|
139
|
-
id:
|
|
139
|
+
params: v,
|
|
140
|
+
options: N,
|
|
141
|
+
id: L
|
|
140
142
|
});
|
|
141
|
-
if (
|
|
142
|
-
if (
|
|
143
|
-
|
|
144
|
-
else if (
|
|
145
|
-
m =
|
|
143
|
+
if (p)
|
|
144
|
+
if (p instanceof I)
|
|
145
|
+
T = p;
|
|
146
|
+
else if (p instanceof Response) {
|
|
147
|
+
m = p;
|
|
146
148
|
break;
|
|
147
149
|
} else
|
|
148
150
|
throw new Error("onRequest: must return new Request() or Response() when modifying the request");
|
|
@@ -150,104 +152,104 @@ function Re(e) {
|
|
|
150
152
|
}
|
|
151
153
|
if (!m) {
|
|
152
154
|
try {
|
|
153
|
-
m = yield
|
|
154
|
-
} catch (
|
|
155
|
-
let
|
|
156
|
-
if (
|
|
157
|
-
for (let
|
|
158
|
-
const
|
|
159
|
-
if (
|
|
160
|
-
const
|
|
161
|
-
request:
|
|
162
|
-
error:
|
|
155
|
+
m = yield x(T, c);
|
|
156
|
+
} catch (w) {
|
|
157
|
+
let p = w;
|
|
158
|
+
if (D.length)
|
|
159
|
+
for (let q = D.length - 1; q >= 0; q--) {
|
|
160
|
+
const M = D[q];
|
|
161
|
+
if (M && typeof M == "object" && typeof M.onError == "function") {
|
|
162
|
+
const O = yield M.onError({
|
|
163
|
+
request: T,
|
|
164
|
+
error: p,
|
|
163
165
|
schemaPath: l,
|
|
164
|
-
params:
|
|
165
|
-
options:
|
|
166
|
-
id:
|
|
166
|
+
params: v,
|
|
167
|
+
options: N,
|
|
168
|
+
id: L
|
|
167
169
|
});
|
|
168
|
-
if (
|
|
169
|
-
if (
|
|
170
|
-
|
|
170
|
+
if (O) {
|
|
171
|
+
if (O instanceof Response) {
|
|
172
|
+
p = void 0, m = O;
|
|
171
173
|
break;
|
|
172
174
|
}
|
|
173
|
-
if (
|
|
174
|
-
|
|
175
|
+
if (O instanceof Error) {
|
|
176
|
+
p = O;
|
|
175
177
|
continue;
|
|
176
178
|
}
|
|
177
179
|
throw new Error("onError: must return new Response() or instance of Error");
|
|
178
180
|
}
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
|
-
if (
|
|
182
|
-
throw
|
|
183
|
+
if (p)
|
|
184
|
+
throw p;
|
|
183
185
|
}
|
|
184
|
-
if (
|
|
185
|
-
for (let
|
|
186
|
-
const
|
|
187
|
-
if (
|
|
188
|
-
const
|
|
189
|
-
request:
|
|
186
|
+
if (D.length)
|
|
187
|
+
for (let w = D.length - 1; w >= 0; w--) {
|
|
188
|
+
const p = D[w];
|
|
189
|
+
if (p && typeof p == "object" && typeof p.onResponse == "function") {
|
|
190
|
+
const q = yield p.onResponse({
|
|
191
|
+
request: T,
|
|
190
192
|
response: m,
|
|
191
193
|
schemaPath: l,
|
|
192
|
-
params:
|
|
193
|
-
options:
|
|
194
|
-
id:
|
|
194
|
+
params: v,
|
|
195
|
+
options: N,
|
|
196
|
+
id: L
|
|
195
197
|
});
|
|
196
|
-
if (
|
|
197
|
-
if (!(
|
|
198
|
+
if (q) {
|
|
199
|
+
if (!(q instanceof Response))
|
|
198
200
|
throw new Error("onResponse: must return new Response() when modifying the response");
|
|
199
|
-
m =
|
|
201
|
+
m = q;
|
|
200
202
|
}
|
|
201
203
|
}
|
|
202
204
|
}
|
|
203
205
|
}
|
|
204
|
-
if (m.status === 204 ||
|
|
206
|
+
if (m.status === 204 || T.method === "HEAD" || m.headers.get("Content-Length") === "0")
|
|
205
207
|
return m.ok ? { data: void 0, response: m } : { error: void 0, response: m };
|
|
206
208
|
if (m.ok)
|
|
207
|
-
return
|
|
208
|
-
let
|
|
209
|
+
return A === "stream" ? { data: m.body, response: m } : { data: yield m[A](), response: m };
|
|
210
|
+
let B = yield m.text();
|
|
209
211
|
try {
|
|
210
|
-
|
|
211
|
-
} catch (
|
|
212
|
+
B = JSON.parse(B);
|
|
213
|
+
} catch (w) {
|
|
212
214
|
}
|
|
213
|
-
return { error:
|
|
215
|
+
return { error: B, response: m };
|
|
214
216
|
});
|
|
215
217
|
}
|
|
216
218
|
return {
|
|
217
|
-
request(l, a,
|
|
218
|
-
return g(a,
|
|
219
|
+
request(l, a, R) {
|
|
220
|
+
return g(a, E(b({}, R), { method: l.toUpperCase() }));
|
|
219
221
|
},
|
|
220
222
|
/** Call a GET endpoint */
|
|
221
223
|
GET(l, a) {
|
|
222
|
-
return g(l,
|
|
224
|
+
return g(l, E(b({}, a), { method: "GET" }));
|
|
223
225
|
},
|
|
224
226
|
/** Call a PUT endpoint */
|
|
225
227
|
PUT(l, a) {
|
|
226
|
-
return g(l,
|
|
228
|
+
return g(l, E(b({}, a), { method: "PUT" }));
|
|
227
229
|
},
|
|
228
230
|
/** Call a POST endpoint */
|
|
229
231
|
POST(l, a) {
|
|
230
|
-
return g(l,
|
|
232
|
+
return g(l, E(b({}, a), { method: "POST" }));
|
|
231
233
|
},
|
|
232
234
|
/** Call a DELETE endpoint */
|
|
233
235
|
DELETE(l, a) {
|
|
234
|
-
return g(l,
|
|
236
|
+
return g(l, E(b({}, a), { method: "DELETE" }));
|
|
235
237
|
},
|
|
236
238
|
/** Call a OPTIONS endpoint */
|
|
237
239
|
OPTIONS(l, a) {
|
|
238
|
-
return g(l,
|
|
240
|
+
return g(l, E(b({}, a), { method: "OPTIONS" }));
|
|
239
241
|
},
|
|
240
242
|
/** Call a HEAD endpoint */
|
|
241
243
|
HEAD(l, a) {
|
|
242
|
-
return g(l,
|
|
244
|
+
return g(l, E(b({}, a), { method: "HEAD" }));
|
|
243
245
|
},
|
|
244
246
|
/** Call a PATCH endpoint */
|
|
245
247
|
PATCH(l, a) {
|
|
246
|
-
return g(l,
|
|
248
|
+
return g(l, E(b({}, a), { method: "PATCH" }));
|
|
247
249
|
},
|
|
248
250
|
/** Call a TRACE endpoint */
|
|
249
251
|
TRACE(l, a) {
|
|
250
|
-
return g(l,
|
|
252
|
+
return g(l, E(b({}, a), { method: "TRACE" }));
|
|
251
253
|
},
|
|
252
254
|
/** Register middleware */
|
|
253
255
|
use(...l) {
|
|
@@ -255,19 +257,19 @@ function Re(e) {
|
|
|
255
257
|
if (a) {
|
|
256
258
|
if (typeof a != "object" || !("onRequest" in a || "onResponse" in a || "onError" in a))
|
|
257
259
|
throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");
|
|
258
|
-
|
|
260
|
+
d.push(a);
|
|
259
261
|
}
|
|
260
262
|
},
|
|
261
263
|
/** Unregister middleware */
|
|
262
264
|
eject(...l) {
|
|
263
265
|
for (const a of l) {
|
|
264
|
-
const
|
|
265
|
-
|
|
266
|
+
const R = d.indexOf(a);
|
|
267
|
+
R !== -1 && d.splice(R, 1);
|
|
266
268
|
}
|
|
267
269
|
}
|
|
268
270
|
};
|
|
269
271
|
}
|
|
270
|
-
function
|
|
272
|
+
function _(e, r, t) {
|
|
271
273
|
if (r == null)
|
|
272
274
|
return "";
|
|
273
275
|
if (typeof r == "object")
|
|
@@ -276,69 +278,71 @@ function N(e, r, t) {
|
|
|
276
278
|
);
|
|
277
279
|
return `${e}=${(t == null ? void 0 : t.allowReserved) === !0 ? r : encodeURIComponent(r)}`;
|
|
278
280
|
}
|
|
279
|
-
function
|
|
281
|
+
function ce(e, r, t) {
|
|
280
282
|
if (!r || typeof r != "object")
|
|
281
283
|
return "";
|
|
282
|
-
const n = [],
|
|
284
|
+
const n = [], o = {
|
|
283
285
|
simple: ",",
|
|
284
286
|
label: ".",
|
|
285
287
|
matrix: ";"
|
|
286
288
|
}[t.style] || "&";
|
|
287
289
|
if (t.style !== "deepObject" && t.explode === !1) {
|
|
288
|
-
for (const
|
|
289
|
-
n.push(
|
|
290
|
-
const
|
|
290
|
+
for (const c in r)
|
|
291
|
+
n.push(c, t.allowReserved === !0 ? r[c] : encodeURIComponent(r[c]));
|
|
292
|
+
const i = n.join(",");
|
|
291
293
|
switch (t.style) {
|
|
292
294
|
case "form":
|
|
293
|
-
return `${e}=${
|
|
295
|
+
return `${e}=${i}`;
|
|
294
296
|
case "label":
|
|
295
|
-
return `.${
|
|
297
|
+
return `.${i}`;
|
|
296
298
|
case "matrix":
|
|
297
|
-
return `;${e}=${
|
|
299
|
+
return `;${e}=${i}`;
|
|
298
300
|
default:
|
|
299
|
-
return
|
|
301
|
+
return i;
|
|
300
302
|
}
|
|
301
303
|
}
|
|
302
|
-
for (const
|
|
303
|
-
const
|
|
304
|
-
n.push(
|
|
304
|
+
for (const i in r) {
|
|
305
|
+
const c = t.style === "deepObject" ? `${e}[${i}]` : i;
|
|
306
|
+
n.push(_(c, r[i], t));
|
|
305
307
|
}
|
|
306
|
-
const s = n.join(
|
|
307
|
-
return t.style === "label" || t.style === "matrix" ? `${
|
|
308
|
+
const s = n.join(o);
|
|
309
|
+
return t.style === "label" || t.style === "matrix" ? `${o}${s}` : s;
|
|
308
310
|
}
|
|
309
|
-
function
|
|
311
|
+
function le(e, r, t) {
|
|
310
312
|
if (!Array.isArray(r))
|
|
311
313
|
return "";
|
|
312
314
|
if (t.explode === !1) {
|
|
313
|
-
const s = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[t.style] || ",",
|
|
315
|
+
const s = { form: ",", spaceDelimited: "%20", pipeDelimited: "|" }[t.style] || ",", i = (t.allowReserved === !0 ? r : r.map((c) => encodeURIComponent(c))).join(s);
|
|
314
316
|
switch (t.style) {
|
|
315
317
|
case "simple":
|
|
316
|
-
return
|
|
318
|
+
return i;
|
|
317
319
|
case "label":
|
|
318
|
-
return `.${
|
|
320
|
+
return `.${i}`;
|
|
319
321
|
case "matrix":
|
|
320
|
-
return `;${e}=${
|
|
322
|
+
return `;${e}=${i}`;
|
|
323
|
+
// case "spaceDelimited":
|
|
324
|
+
// case "pipeDelimited":
|
|
321
325
|
default:
|
|
322
|
-
return `${e}=${
|
|
326
|
+
return `${e}=${i}`;
|
|
323
327
|
}
|
|
324
328
|
}
|
|
325
|
-
const n = { simple: ",", label: ".", matrix: ";" }[t.style] || "&",
|
|
329
|
+
const n = { simple: ",", label: ".", matrix: ";" }[t.style] || "&", o = [];
|
|
326
330
|
for (const s of r)
|
|
327
|
-
t.style === "simple" || t.style === "label" ?
|
|
328
|
-
return t.style === "label" || t.style === "matrix" ? `${n}${
|
|
331
|
+
t.style === "simple" || t.style === "label" ? o.push(t.allowReserved === !0 ? s : encodeURIComponent(s)) : o.push(_(e, s, t));
|
|
332
|
+
return t.style === "label" || t.style === "matrix" ? `${n}${o.join(n)}` : o.join(n);
|
|
329
333
|
}
|
|
330
|
-
function
|
|
334
|
+
function ne(e) {
|
|
331
335
|
return function(t) {
|
|
332
336
|
const n = [];
|
|
333
337
|
if (t && typeof t == "object")
|
|
334
|
-
for (const
|
|
335
|
-
const s = t[
|
|
338
|
+
for (const o in t) {
|
|
339
|
+
const s = t[o];
|
|
336
340
|
if (s != null) {
|
|
337
341
|
if (Array.isArray(s)) {
|
|
338
342
|
if (s.length === 0)
|
|
339
343
|
continue;
|
|
340
344
|
n.push(
|
|
341
|
-
|
|
345
|
+
le(o, s, E(b({
|
|
342
346
|
style: "form",
|
|
343
347
|
explode: !0
|
|
344
348
|
}, e == null ? void 0 : e.array), {
|
|
@@ -349,7 +353,7 @@ function ee(e) {
|
|
|
349
353
|
}
|
|
350
354
|
if (typeof s == "object") {
|
|
351
355
|
n.push(
|
|
352
|
-
|
|
356
|
+
ce(o, s, E(b({
|
|
353
357
|
style: "deepObject",
|
|
354
358
|
explode: !0
|
|
355
359
|
}, e == null ? void 0 : e.object), {
|
|
@@ -358,279 +362,310 @@ function ee(e) {
|
|
|
358
362
|
);
|
|
359
363
|
continue;
|
|
360
364
|
}
|
|
361
|
-
n.push(
|
|
365
|
+
n.push(_(o, s, e));
|
|
362
366
|
}
|
|
363
367
|
}
|
|
364
368
|
return n.join("&");
|
|
365
369
|
};
|
|
366
370
|
}
|
|
367
|
-
function
|
|
371
|
+
function Ce(e, r) {
|
|
368
372
|
var n;
|
|
369
373
|
let t = e;
|
|
370
|
-
for (const
|
|
371
|
-
let s =
|
|
372
|
-
if (s.endsWith("*") && (
|
|
374
|
+
for (const o of (n = e.match(ge)) != null ? n : []) {
|
|
375
|
+
let s = o.substring(1, o.length - 1), i = !1, c = "simple";
|
|
376
|
+
if (s.endsWith("*") && (i = !0, s = s.substring(0, s.length - 1)), s.startsWith(".") ? (c = "label", s = s.substring(1)) : s.startsWith(";") && (c = "matrix", s = s.substring(1)), !r || r[s] === void 0 || r[s] === null)
|
|
373
377
|
continue;
|
|
374
|
-
const
|
|
375
|
-
if (Array.isArray(
|
|
376
|
-
t = t.replace(
|
|
378
|
+
const f = r[s];
|
|
379
|
+
if (Array.isArray(f)) {
|
|
380
|
+
t = t.replace(o, le(s, f, { style: c, explode: i }));
|
|
377
381
|
continue;
|
|
378
382
|
}
|
|
379
|
-
if (typeof
|
|
380
|
-
t = t.replace(
|
|
383
|
+
if (typeof f == "object") {
|
|
384
|
+
t = t.replace(o, ce(s, f, { style: c, explode: i }));
|
|
381
385
|
continue;
|
|
382
386
|
}
|
|
383
|
-
if (
|
|
384
|
-
t = t.replace(
|
|
387
|
+
if (c === "matrix") {
|
|
388
|
+
t = t.replace(o, `;${_(s, f)}`);
|
|
385
389
|
continue;
|
|
386
390
|
}
|
|
387
|
-
t = t.replace(
|
|
391
|
+
t = t.replace(o, c === "label" ? `.${encodeURIComponent(f)}` : encodeURIComponent(f));
|
|
388
392
|
}
|
|
389
393
|
return t;
|
|
390
394
|
}
|
|
391
|
-
function
|
|
395
|
+
function xe(e, r) {
|
|
392
396
|
var t, n;
|
|
393
397
|
return e instanceof FormData ? e : r && (r.get instanceof Function ? (t = r.get("Content-Type")) != null ? t : r.get("content-type") : (n = r["Content-Type"]) != null ? n : r["content-type"]) === "application/x-www-form-urlencoded" ? new URLSearchParams(e).toString() : JSON.stringify(e);
|
|
394
398
|
}
|
|
395
|
-
function
|
|
396
|
-
var
|
|
399
|
+
function Se(e, r) {
|
|
400
|
+
var o, s;
|
|
397
401
|
let t = `${r.baseUrl}${e}`;
|
|
398
|
-
(
|
|
402
|
+
(o = r.params) != null && o.path && (t = Ce(t, r.params.path));
|
|
399
403
|
let n = r.querySerializer((s = r.params.query) != null ? s : {});
|
|
400
404
|
return n.startsWith("?") && (n = n.substring(1)), n && (t += `?${n}`), t;
|
|
401
405
|
}
|
|
402
|
-
function
|
|
406
|
+
function se(...e) {
|
|
403
407
|
const r = new Headers();
|
|
404
408
|
for (const t of e) {
|
|
405
409
|
if (!t || typeof t != "object")
|
|
406
410
|
continue;
|
|
407
411
|
const n = t instanceof Headers ? t.entries() : Object.entries(t);
|
|
408
|
-
for (const [
|
|
412
|
+
for (const [o, s] of n)
|
|
409
413
|
if (s === null)
|
|
410
|
-
r.delete(
|
|
414
|
+
r.delete(o);
|
|
411
415
|
else if (Array.isArray(s))
|
|
412
|
-
for (const
|
|
413
|
-
r.append(
|
|
414
|
-
else s !== void 0 && r.set(
|
|
416
|
+
for (const i of s)
|
|
417
|
+
r.append(o, i);
|
|
418
|
+
else s !== void 0 && r.set(o, s);
|
|
415
419
|
}
|
|
416
420
|
return r;
|
|
417
421
|
}
|
|
418
|
-
function
|
|
422
|
+
function oe(e) {
|
|
419
423
|
return e.endsWith("/") ? e.substring(0, e.length - 1) : e;
|
|
420
424
|
}
|
|
421
|
-
const
|
|
422
|
-
baseUrl: "http://localhost:3200"
|
|
423
|
-
}, je = {
|
|
424
|
-
development: {
|
|
425
|
-
baseUrl: "http://localhost:3200"
|
|
426
|
-
},
|
|
427
|
-
staging: {
|
|
428
|
-
baseUrl: "https://api.staging.dismissible.io"
|
|
429
|
-
},
|
|
430
|
-
production: {
|
|
431
|
-
// Use Vite's import.meta.env instead of process.env
|
|
432
|
-
// baseUrl: import.meta.env.VITE_API_BASE_URL || "https://api.dismissible.io",
|
|
433
|
-
baseUrl: "https://api.dismissible.io"
|
|
434
|
-
}
|
|
435
|
-
}, Ie = () => je["production"] || Ae, ne = (e, r, t) => {
|
|
425
|
+
const ie = (e, r, t) => {
|
|
436
426
|
try {
|
|
437
|
-
const n = `${r}_${e}`,
|
|
438
|
-
if (!
|
|
439
|
-
const { data: s, timestamp:
|
|
440
|
-
return t && Date.now() -
|
|
427
|
+
const n = `${r}_${e}`, o = localStorage.getItem(n);
|
|
428
|
+
if (!o) return null;
|
|
429
|
+
const { data: s, timestamp: i } = JSON.parse(o);
|
|
430
|
+
return t && Date.now() - i > t ? (localStorage.removeItem(n), null) : s;
|
|
441
431
|
} catch (n) {
|
|
442
432
|
return null;
|
|
443
433
|
}
|
|
444
|
-
},
|
|
434
|
+
}, V = (e, r, t) => {
|
|
445
435
|
try {
|
|
446
|
-
const n = `${t}_${e}`,
|
|
436
|
+
const n = `${t}_${e}`, o = {
|
|
447
437
|
data: r,
|
|
448
438
|
timestamp: Date.now()
|
|
449
439
|
};
|
|
450
|
-
localStorage.setItem(n, JSON.stringify(
|
|
440
|
+
localStorage.setItem(n, JSON.stringify(o));
|
|
451
441
|
} catch (n) {
|
|
452
442
|
console.warn("Failed to cache dismissible item:", n);
|
|
453
443
|
}
|
|
454
|
-
},
|
|
444
|
+
}, ae = (e, r) => {
|
|
455
445
|
try {
|
|
456
446
|
const t = `${r}_${e}`;
|
|
457
447
|
localStorage.removeItem(t);
|
|
458
448
|
} catch (t) {
|
|
459
449
|
console.warn("Failed to remove cached dismissible item:", t);
|
|
460
450
|
}
|
|
461
|
-
},
|
|
451
|
+
}, ue = pe(
|
|
462
452
|
null
|
|
463
|
-
),
|
|
464
|
-
|
|
453
|
+
), Ae = () => {
|
|
454
|
+
const e = we(ue);
|
|
455
|
+
if (!e)
|
|
456
|
+
throw new Error(
|
|
457
|
+
"useDismissibleContext must be used within a DismissibleProvider"
|
|
458
|
+
);
|
|
459
|
+
return e;
|
|
460
|
+
}, $e = "dismissible", je = (e, r = {}) => {
|
|
465
461
|
const {
|
|
466
462
|
initialData: t,
|
|
467
463
|
enableCache: n = !0,
|
|
468
|
-
cachePrefix:
|
|
464
|
+
cachePrefix: o = $e,
|
|
469
465
|
cacheExpiration: s
|
|
470
|
-
} = r,
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
headers: {}
|
|
475
|
-
});
|
|
476
|
-
}, [o]), c = B(() => !!(o != null && o.jwt) ? `${e}-auth` : e, [e, o == null ? void 0 : o.jwt]), h = M({
|
|
466
|
+
} = r, i = Ae(), { userId: c } = i, f = X(() => Re({
|
|
467
|
+
baseUrl: i.baseUrl,
|
|
468
|
+
headers: {}
|
|
469
|
+
}), [i.baseUrl]), d = X(() => `${c}-${e}`, [c, e]), g = W({
|
|
477
470
|
enableCache: n,
|
|
478
|
-
cachePrefix:
|
|
471
|
+
cachePrefix: o,
|
|
479
472
|
cacheExpiration: s
|
|
480
|
-
}),
|
|
473
|
+
}), j = W(e), l = W(d), a = W(null), [R, x] = z(!1), [I, C] = z(), [v, A] = z(() => {
|
|
481
474
|
if (t) return t;
|
|
482
475
|
if (n) {
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
476
|
+
const u = ie(
|
|
477
|
+
d,
|
|
478
|
+
o,
|
|
486
479
|
s
|
|
487
480
|
);
|
|
488
|
-
if (
|
|
481
|
+
if (u) return u;
|
|
489
482
|
}
|
|
490
|
-
}),
|
|
491
|
-
var
|
|
483
|
+
}), S = K(() => $(null, null, function* () {
|
|
484
|
+
var y;
|
|
492
485
|
if (n) {
|
|
493
|
-
const
|
|
494
|
-
|
|
495
|
-
|
|
486
|
+
const h = ie(
|
|
487
|
+
d,
|
|
488
|
+
o,
|
|
496
489
|
s
|
|
497
490
|
);
|
|
498
|
-
if (
|
|
499
|
-
|
|
491
|
+
if (h != null && h.dismissedAt) {
|
|
492
|
+
A(h), x(!1);
|
|
500
493
|
return;
|
|
501
494
|
}
|
|
502
495
|
}
|
|
503
|
-
a
|
|
496
|
+
(y = a.current) == null || y.abort();
|
|
497
|
+
const u = new AbortController();
|
|
498
|
+
a.current = u, x(!0), C(void 0);
|
|
504
499
|
try {
|
|
505
|
-
const
|
|
506
|
-
"/v1/
|
|
500
|
+
const h = yield i.getAuthHeaders(), { data: H, error: P } = yield f.GET(
|
|
501
|
+
"/v1/users/{userId}/items/{itemId}",
|
|
507
502
|
{
|
|
508
503
|
params: {
|
|
509
504
|
path: {
|
|
505
|
+
userId: c,
|
|
510
506
|
itemId: e
|
|
511
507
|
}
|
|
512
508
|
},
|
|
513
|
-
headers:
|
|
509
|
+
headers: h,
|
|
510
|
+
signal: u.signal
|
|
514
511
|
}
|
|
515
512
|
);
|
|
516
|
-
if (
|
|
517
|
-
throw new Error(
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
513
|
+
if (P || !H)
|
|
514
|
+
throw new Error("Failed to fetch dismissible item");
|
|
515
|
+
A(H.data), n && V(d, H.data, o);
|
|
516
|
+
} catch (h) {
|
|
517
|
+
if (h instanceof Error && h.name === "AbortError")
|
|
518
|
+
return;
|
|
522
519
|
C(
|
|
523
|
-
|
|
520
|
+
h instanceof Error ? h : new Error("Unknown error occurred")
|
|
524
521
|
);
|
|
525
522
|
} finally {
|
|
526
|
-
|
|
523
|
+
x(!1);
|
|
527
524
|
}
|
|
528
525
|
}), [
|
|
529
526
|
e,
|
|
530
527
|
c,
|
|
528
|
+
d,
|
|
531
529
|
n,
|
|
532
|
-
|
|
530
|
+
o,
|
|
533
531
|
s,
|
|
534
|
-
|
|
535
|
-
|
|
532
|
+
f,
|
|
533
|
+
i
|
|
536
534
|
]);
|
|
537
|
-
|
|
538
|
-
const
|
|
539
|
-
|
|
540
|
-
}, [e,
|
|
541
|
-
|
|
542
|
-
(
|
|
535
|
+
Q(() => {
|
|
536
|
+
const u = j.current !== e, y = l.current !== d;
|
|
537
|
+
u || y ? (j.current = e, l.current = d, S()) : t || S();
|
|
538
|
+
}, [e, d, t, S]), Q(() => () => {
|
|
539
|
+
var u;
|
|
540
|
+
(u = a.current) == null || u.abort();
|
|
541
|
+
}, []), Q(() => {
|
|
542
|
+
const u = g.current;
|
|
543
|
+
(u.enableCache !== n || u.cachePrefix !== o || u.cacheExpiration !== s) && (u.cachePrefix !== o && ae(d, u.cachePrefix), !n && u.enableCache && ae(d, u.cachePrefix), g.current = {
|
|
543
544
|
enableCache: n,
|
|
544
|
-
cachePrefix:
|
|
545
|
+
cachePrefix: o,
|
|
545
546
|
cacheExpiration: s
|
|
546
|
-
},
|
|
547
|
-
}, [n,
|
|
548
|
-
const
|
|
549
|
-
|
|
550
|
-
C(null);
|
|
547
|
+
}, S());
|
|
548
|
+
}, [n, o, s, d, S]);
|
|
549
|
+
const k = K(() => $(null, null, function* () {
|
|
550
|
+
C(void 0);
|
|
551
551
|
try {
|
|
552
|
-
const
|
|
553
|
-
"/v1/
|
|
552
|
+
const u = yield i.getAuthHeaders(), { data: y, error: h } = yield f.DELETE(
|
|
553
|
+
"/v1/users/{userId}/items/{itemId}",
|
|
554
554
|
{
|
|
555
555
|
params: {
|
|
556
556
|
path: {
|
|
557
|
+
userId: c,
|
|
557
558
|
itemId: e
|
|
558
559
|
}
|
|
559
560
|
},
|
|
560
|
-
headers:
|
|
561
|
+
headers: u
|
|
561
562
|
}
|
|
562
563
|
);
|
|
563
|
-
if (
|
|
564
|
-
throw new Error(
|
|
565
|
-
|
|
566
|
-
} catch (
|
|
564
|
+
if (h || !y)
|
|
565
|
+
throw new Error("Failed to dismiss item");
|
|
566
|
+
A(y.data), n && V(d, y.data, o);
|
|
567
|
+
} catch (u) {
|
|
567
568
|
throw C(
|
|
568
|
-
|
|
569
|
-
),
|
|
569
|
+
u instanceof Error ? u : new Error("Failed to dismiss item")
|
|
570
|
+
), u;
|
|
570
571
|
}
|
|
571
|
-
}), [
|
|
572
|
+
}), [
|
|
573
|
+
e,
|
|
574
|
+
c,
|
|
575
|
+
d,
|
|
576
|
+
n,
|
|
577
|
+
o,
|
|
578
|
+
f,
|
|
579
|
+
i
|
|
580
|
+
]), F = K(() => $(null, null, function* () {
|
|
581
|
+
C(void 0);
|
|
582
|
+
try {
|
|
583
|
+
const u = yield i.getAuthHeaders(), { data: y, error: h } = yield f.POST(
|
|
584
|
+
"/v1/users/{userId}/items/{itemId}",
|
|
585
|
+
{
|
|
586
|
+
params: {
|
|
587
|
+
path: {
|
|
588
|
+
userId: c,
|
|
589
|
+
itemId: e
|
|
590
|
+
}
|
|
591
|
+
},
|
|
592
|
+
headers: u
|
|
593
|
+
}
|
|
594
|
+
);
|
|
595
|
+
if (h || !y)
|
|
596
|
+
throw new Error("Failed to restore item");
|
|
597
|
+
A(y.data), n && V(d, y.data, o);
|
|
598
|
+
} catch (u) {
|
|
599
|
+
throw C(
|
|
600
|
+
u instanceof Error ? u : new Error("Failed to restore item")
|
|
601
|
+
), u;
|
|
602
|
+
}
|
|
603
|
+
}), [
|
|
604
|
+
e,
|
|
605
|
+
c,
|
|
606
|
+
d,
|
|
607
|
+
n,
|
|
608
|
+
o,
|
|
609
|
+
f,
|
|
610
|
+
i
|
|
611
|
+
]);
|
|
572
612
|
return {
|
|
573
|
-
|
|
574
|
-
dismiss:
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
613
|
+
dismissedAt: v == null ? void 0 : v.dismissedAt,
|
|
614
|
+
dismiss: k,
|
|
615
|
+
restore: F,
|
|
616
|
+
isLoading: R,
|
|
617
|
+
error: I,
|
|
618
|
+
item: v
|
|
578
619
|
};
|
|
579
|
-
},
|
|
580
|
-
error: e
|
|
581
|
-
}) => /* @__PURE__ */ oe("div", { className: "dismissible-error", role: "alert", children: [
|
|
582
|
-
"Error loading dismissible item: ",
|
|
583
|
-
e.message
|
|
584
|
-
] }), xe = ({ id: e, onDismiss: r, ariaLabel: t }) => /* @__PURE__ */ x(
|
|
620
|
+
}, De = () => /* @__PURE__ */ U("div", { className: "dismissible-loading", "aria-live": "polite", children: "Loading..." }), Te = () => /* @__PURE__ */ U("div", { className: "dismissible-error", role: "alert", children: "Unable to load content. Please try again later." }), Ue = ({ onDismiss: e, ariaLabel: r }) => /* @__PURE__ */ U(
|
|
585
621
|
"button",
|
|
586
622
|
{
|
|
587
|
-
id: e,
|
|
588
623
|
className: "dismissible-button",
|
|
589
|
-
onClick:
|
|
590
|
-
"aria-label":
|
|
624
|
+
onClick: e,
|
|
625
|
+
"aria-label": r,
|
|
591
626
|
type: "button",
|
|
592
627
|
children: "×"
|
|
593
628
|
}
|
|
594
629
|
), ke = ({
|
|
595
|
-
|
|
630
|
+
itemId: e,
|
|
596
631
|
children: r,
|
|
597
632
|
onDismiss: t,
|
|
598
|
-
LoadingComponent: n =
|
|
599
|
-
ErrorComponent:
|
|
600
|
-
DismissButtonComponent: s =
|
|
601
|
-
enableCache:
|
|
602
|
-
cachePrefix:
|
|
603
|
-
cacheExpiration:
|
|
604
|
-
ignoreErrors:
|
|
633
|
+
LoadingComponent: n = De,
|
|
634
|
+
ErrorComponent: o = Te,
|
|
635
|
+
DismissButtonComponent: s = Ue,
|
|
636
|
+
enableCache: i,
|
|
637
|
+
cachePrefix: c,
|
|
638
|
+
cacheExpiration: f,
|
|
639
|
+
ignoreErrors: d = !1
|
|
605
640
|
}) => {
|
|
606
|
-
const {
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
641
|
+
const { dismissedAt: g, isLoading: j, error: l, dismiss: a } = je(
|
|
642
|
+
e,
|
|
643
|
+
{
|
|
644
|
+
enableCache: i,
|
|
645
|
+
cachePrefix: c,
|
|
646
|
+
cacheExpiration: f
|
|
647
|
+
}
|
|
648
|
+
), [R, x] = z(!1), [I, C] = z(e);
|
|
649
|
+
e !== I && (C(e), x(!1));
|
|
650
|
+
const v = () => $(null, null, function* () {
|
|
651
|
+
x(!0);
|
|
616
652
|
try {
|
|
617
653
|
yield a(), t == null || t();
|
|
618
|
-
} catch (
|
|
619
|
-
|
|
654
|
+
} catch (A) {
|
|
655
|
+
x(!1);
|
|
620
656
|
}
|
|
621
657
|
});
|
|
622
|
-
return j && n ? /* @__PURE__ */
|
|
623
|
-
/* @__PURE__ */
|
|
624
|
-
s ? /* @__PURE__ */
|
|
658
|
+
return j && n ? /* @__PURE__ */ U(n, { itemId: e }) : j && !n ? null : l && o && !d ? /* @__PURE__ */ U(o, { itemId: e, error: l }) : g || R ? null : /* @__PURE__ */ be("div", { className: "dismissible-container", children: [
|
|
659
|
+
/* @__PURE__ */ U("div", { className: "dismissible-content", children: r }),
|
|
660
|
+
s ? /* @__PURE__ */ U(
|
|
625
661
|
s,
|
|
626
662
|
{
|
|
627
|
-
|
|
628
|
-
onDismiss: $,
|
|
663
|
+
onDismiss: v,
|
|
629
664
|
ariaLabel: `Dismiss ${e}`
|
|
630
665
|
}
|
|
631
666
|
) : null
|
|
632
667
|
] });
|
|
633
|
-
},
|
|
668
|
+
}, He = (e) => $(null, null, function* () {
|
|
634
669
|
if (typeof e == "function")
|
|
635
670
|
try {
|
|
636
671
|
const r = e();
|
|
@@ -640,37 +675,45 @@ const Ae = {
|
|
|
640
675
|
return;
|
|
641
676
|
}
|
|
642
677
|
return e;
|
|
643
|
-
}),
|
|
644
|
-
const r = yield
|
|
678
|
+
}), qe = (e) => $(null, null, function* () {
|
|
679
|
+
const r = yield He(e);
|
|
645
680
|
return r ? { Authorization: `Bearer ${r}` } : {};
|
|
646
|
-
}),
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
681
|
+
}), Ie = (e) => {
|
|
682
|
+
try {
|
|
683
|
+
const r = new URL(e), t = r.hostname === "localhost" || r.hostname === "127.0.0.1" || r.hostname === "[::1]", n = r.protocol === "https:";
|
|
684
|
+
return { isSecure: n || t, isLocalhost: t, isHttps: n };
|
|
685
|
+
} catch (r) {
|
|
686
|
+
return { isSecure: !1, isLocalhost: !1, isHttps: !1 };
|
|
687
|
+
}
|
|
688
|
+
}, Fe = ({
|
|
689
|
+
userId: e,
|
|
690
|
+
jwt: r,
|
|
691
|
+
baseUrl: t,
|
|
692
|
+
children: n
|
|
653
693
|
}) => {
|
|
654
|
-
const
|
|
694
|
+
const { isSecure: o } = Ie(t);
|
|
695
|
+
o || console.warn(
|
|
696
|
+
`[dismissible] Insecure baseUrl "${t}". Use https:// in production (or localhost for development). JWT tokens may be exposed over insecure connections.`
|
|
697
|
+
);
|
|
698
|
+
const s = X(
|
|
655
699
|
() => ({
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
700
|
+
userId: e,
|
|
701
|
+
jwt: r,
|
|
702
|
+
baseUrl: t,
|
|
703
|
+
getAuthHeaders: () => $(null, null, function* () {
|
|
704
|
+
return yield qe(r);
|
|
660
705
|
})
|
|
661
706
|
}),
|
|
662
|
-
[e, r]
|
|
707
|
+
[e, r, t]
|
|
663
708
|
);
|
|
664
|
-
return /* @__PURE__ */
|
|
665
|
-
}
|
|
709
|
+
return /* @__PURE__ */ U(ue.Provider, { value: s, children: n });
|
|
710
|
+
};
|
|
666
711
|
export {
|
|
667
712
|
ke as Dismissible,
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
He as
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
Se as useDismissibleContext,
|
|
675
|
-
De as useDismissibleItem
|
|
713
|
+
ue as DismissibleContext,
|
|
714
|
+
Fe as DismissibleProvider,
|
|
715
|
+
qe as getAuthHeaders,
|
|
716
|
+
He as resolveJwt,
|
|
717
|
+
Ae as useDismissibleContext,
|
|
718
|
+
je as useDismissibleItem
|
|
676
719
|
};
|