@betterinternship/components 1.4.5 → 1.4.7
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/dist/index.esm.js +429 -435
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/dist/hooks/ClientProcess.d.ts +0 -21
package/dist/index.esm.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import React__default, { useState, useEffect, useRef } from 'react';
|
|
1
|
+
import require$$0, { useState, useEffect, useRef } from 'react';
|
|
2
|
+
import { Slot } from '@radix-ui/react-slot';
|
|
4
3
|
import { useQuery } from '@tanstack/react-query';
|
|
5
|
-
import '
|
|
4
|
+
import { toast } from 'sonner';
|
|
6
5
|
|
|
7
6
|
function styleInject(css, ref) {
|
|
8
7
|
if ( ref === void 0 ) ref = {};
|
|
@@ -41,138 +40,428 @@ const configure = (newConfig) => {
|
|
|
41
40
|
config = { ...config, ...newConfig };
|
|
42
41
|
};
|
|
43
42
|
|
|
44
|
-
|
|
45
|
-
function setRef(ref, value) {
|
|
46
|
-
if (typeof ref === "function") {
|
|
47
|
-
return ref(value);
|
|
48
|
-
} else if (ref !== null && ref !== void 0) {
|
|
49
|
-
ref.current = value;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
function composeRefs(...refs) {
|
|
53
|
-
return (node) => {
|
|
54
|
-
let hasCleanup = false;
|
|
55
|
-
const cleanups = refs.map((ref) => {
|
|
56
|
-
const cleanup = setRef(ref, node);
|
|
57
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
58
|
-
hasCleanup = true;
|
|
59
|
-
}
|
|
60
|
-
return cleanup;
|
|
61
|
-
});
|
|
62
|
-
if (hasCleanup) {
|
|
63
|
-
return () => {
|
|
64
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
65
|
-
const cleanup = cleanups[i];
|
|
66
|
-
if (typeof cleanup == "function") {
|
|
67
|
-
cleanup();
|
|
68
|
-
} else {
|
|
69
|
-
setRef(refs[i], null);
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
};
|
|
73
|
-
}
|
|
74
|
-
};
|
|
75
|
-
}
|
|
43
|
+
var jsxRuntime = {exports: {}};
|
|
76
44
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
if (isLazyComponent(children) && typeof use === "function") {
|
|
119
|
-
children = use(children._payload);
|
|
120
|
-
}
|
|
121
|
-
if (React.isValidElement(children)) {
|
|
122
|
-
const childrenRef = getElementRef(children);
|
|
123
|
-
const props2 = mergeProps(slotProps, children.props);
|
|
124
|
-
if (children.type !== React.Fragment) {
|
|
125
|
-
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
|
126
|
-
}
|
|
127
|
-
return React.cloneElement(children, props2);
|
|
128
|
-
}
|
|
129
|
-
return React.Children.count(children) > 1 ? React.Children.only(null) : null;
|
|
130
|
-
});
|
|
131
|
-
SlotClone.displayName = `${ownerName}.SlotClone`;
|
|
132
|
-
return SlotClone;
|
|
133
|
-
}
|
|
134
|
-
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
|
135
|
-
function isSlottable(child) {
|
|
136
|
-
return React.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
|
45
|
+
var reactJsxRuntime_production = {};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* @license React
|
|
49
|
+
* react-jsx-runtime.production.js
|
|
50
|
+
*
|
|
51
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
52
|
+
*
|
|
53
|
+
* This source code is licensed under the MIT license found in the
|
|
54
|
+
* LICENSE file in the root directory of this source tree.
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
var hasRequiredReactJsxRuntime_production;
|
|
58
|
+
|
|
59
|
+
function requireReactJsxRuntime_production () {
|
|
60
|
+
if (hasRequiredReactJsxRuntime_production) return reactJsxRuntime_production;
|
|
61
|
+
hasRequiredReactJsxRuntime_production = 1;
|
|
62
|
+
var REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
63
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
|
|
64
|
+
function jsxProd(type, config, maybeKey) {
|
|
65
|
+
var key = null;
|
|
66
|
+
void 0 !== maybeKey && (key = "" + maybeKey);
|
|
67
|
+
void 0 !== config.key && (key = "" + config.key);
|
|
68
|
+
if ("key" in config) {
|
|
69
|
+
maybeKey = {};
|
|
70
|
+
for (var propName in config)
|
|
71
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
72
|
+
} else maybeKey = config;
|
|
73
|
+
config = maybeKey.ref;
|
|
74
|
+
return {
|
|
75
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
76
|
+
type: type,
|
|
77
|
+
key: key,
|
|
78
|
+
ref: void 0 !== config ? config : null,
|
|
79
|
+
props: maybeKey
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
reactJsxRuntime_production.Fragment = REACT_FRAGMENT_TYPE;
|
|
83
|
+
reactJsxRuntime_production.jsx = jsxProd;
|
|
84
|
+
reactJsxRuntime_production.jsxs = jsxProd;
|
|
85
|
+
return reactJsxRuntime_production;
|
|
137
86
|
}
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
87
|
+
|
|
88
|
+
var reactJsxRuntime_development = {};
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* @license React
|
|
92
|
+
* react-jsx-runtime.development.js
|
|
93
|
+
*
|
|
94
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
95
|
+
*
|
|
96
|
+
* This source code is licensed under the MIT license found in the
|
|
97
|
+
* LICENSE file in the root directory of this source tree.
|
|
98
|
+
*/
|
|
99
|
+
|
|
100
|
+
var hasRequiredReactJsxRuntime_development;
|
|
101
|
+
|
|
102
|
+
function requireReactJsxRuntime_development () {
|
|
103
|
+
if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
|
|
104
|
+
hasRequiredReactJsxRuntime_development = 1;
|
|
105
|
+
"production" !== process.env.NODE_ENV &&
|
|
106
|
+
(function () {
|
|
107
|
+
function getComponentNameFromType(type) {
|
|
108
|
+
if (null == type) return null;
|
|
109
|
+
if ("function" === typeof type)
|
|
110
|
+
return type.$$typeof === REACT_CLIENT_REFERENCE
|
|
111
|
+
? null
|
|
112
|
+
: type.displayName || type.name || null;
|
|
113
|
+
if ("string" === typeof type) return type;
|
|
114
|
+
switch (type) {
|
|
115
|
+
case REACT_FRAGMENT_TYPE:
|
|
116
|
+
return "Fragment";
|
|
117
|
+
case REACT_PROFILER_TYPE:
|
|
118
|
+
return "Profiler";
|
|
119
|
+
case REACT_STRICT_MODE_TYPE:
|
|
120
|
+
return "StrictMode";
|
|
121
|
+
case REACT_SUSPENSE_TYPE:
|
|
122
|
+
return "Suspense";
|
|
123
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
124
|
+
return "SuspenseList";
|
|
125
|
+
case REACT_ACTIVITY_TYPE:
|
|
126
|
+
return "Activity";
|
|
127
|
+
}
|
|
128
|
+
if ("object" === typeof type)
|
|
129
|
+
switch (
|
|
130
|
+
("number" === typeof type.tag &&
|
|
131
|
+
console.error(
|
|
132
|
+
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
133
|
+
),
|
|
134
|
+
type.$$typeof)
|
|
135
|
+
) {
|
|
136
|
+
case REACT_PORTAL_TYPE:
|
|
137
|
+
return "Portal";
|
|
138
|
+
case REACT_CONTEXT_TYPE:
|
|
139
|
+
return type.displayName || "Context";
|
|
140
|
+
case REACT_CONSUMER_TYPE:
|
|
141
|
+
return (type._context.displayName || "Context") + ".Consumer";
|
|
142
|
+
case REACT_FORWARD_REF_TYPE:
|
|
143
|
+
var innerType = type.render;
|
|
144
|
+
type = type.displayName;
|
|
145
|
+
type ||
|
|
146
|
+
((type = innerType.displayName || innerType.name || ""),
|
|
147
|
+
(type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef"));
|
|
148
|
+
return type;
|
|
149
|
+
case REACT_MEMO_TYPE:
|
|
150
|
+
return (
|
|
151
|
+
(innerType = type.displayName || null),
|
|
152
|
+
null !== innerType
|
|
153
|
+
? innerType
|
|
154
|
+
: getComponentNameFromType(type.type) || "Memo"
|
|
155
|
+
);
|
|
156
|
+
case REACT_LAZY_TYPE:
|
|
157
|
+
innerType = type._payload;
|
|
158
|
+
type = type._init;
|
|
159
|
+
try {
|
|
160
|
+
return getComponentNameFromType(type(innerType));
|
|
161
|
+
} catch (x) {}
|
|
162
|
+
}
|
|
163
|
+
return null;
|
|
164
|
+
}
|
|
165
|
+
function testStringCoercion(value) {
|
|
166
|
+
return "" + value;
|
|
167
|
+
}
|
|
168
|
+
function checkKeyStringCoercion(value) {
|
|
169
|
+
try {
|
|
170
|
+
testStringCoercion(value);
|
|
171
|
+
var JSCompiler_inline_result = !1;
|
|
172
|
+
} catch (e) {
|
|
173
|
+
JSCompiler_inline_result = true;
|
|
174
|
+
}
|
|
175
|
+
if (JSCompiler_inline_result) {
|
|
176
|
+
JSCompiler_inline_result = console;
|
|
177
|
+
var JSCompiler_temp_const = JSCompiler_inline_result.error;
|
|
178
|
+
var JSCompiler_inline_result$jscomp$0 =
|
|
179
|
+
("function" === typeof Symbol &&
|
|
180
|
+
Symbol.toStringTag &&
|
|
181
|
+
value[Symbol.toStringTag]) ||
|
|
182
|
+
value.constructor.name ||
|
|
183
|
+
"Object";
|
|
184
|
+
JSCompiler_temp_const.call(
|
|
185
|
+
JSCompiler_inline_result,
|
|
186
|
+
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
187
|
+
JSCompiler_inline_result$jscomp$0
|
|
188
|
+
);
|
|
189
|
+
return testStringCoercion(value);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function getTaskName(type) {
|
|
193
|
+
if (type === REACT_FRAGMENT_TYPE) return "<>";
|
|
194
|
+
if (
|
|
195
|
+
"object" === typeof type &&
|
|
196
|
+
null !== type &&
|
|
197
|
+
type.$$typeof === REACT_LAZY_TYPE
|
|
198
|
+
)
|
|
199
|
+
return "<...>";
|
|
200
|
+
try {
|
|
201
|
+
var name = getComponentNameFromType(type);
|
|
202
|
+
return name ? "<" + name + ">" : "<...>";
|
|
203
|
+
} catch (x) {
|
|
204
|
+
return "<...>";
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function getOwner() {
|
|
208
|
+
var dispatcher = ReactSharedInternals.A;
|
|
209
|
+
return null === dispatcher ? null : dispatcher.getOwner();
|
|
210
|
+
}
|
|
211
|
+
function UnknownOwner() {
|
|
212
|
+
return Error("react-stack-top-frame");
|
|
213
|
+
}
|
|
214
|
+
function hasValidKey(config) {
|
|
215
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
216
|
+
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
|
|
217
|
+
if (getter && getter.isReactWarning) return false;
|
|
218
|
+
}
|
|
219
|
+
return void 0 !== config.key;
|
|
220
|
+
}
|
|
221
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
222
|
+
function warnAboutAccessingKey() {
|
|
223
|
+
specialPropKeyWarningShown ||
|
|
224
|
+
((specialPropKeyWarningShown = true),
|
|
225
|
+
console.error(
|
|
226
|
+
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
227
|
+
displayName
|
|
228
|
+
));
|
|
229
|
+
}
|
|
230
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
231
|
+
Object.defineProperty(props, "key", {
|
|
232
|
+
get: warnAboutAccessingKey,
|
|
233
|
+
configurable: true
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
function elementRefGetterWithDeprecationWarning() {
|
|
237
|
+
var componentName = getComponentNameFromType(this.type);
|
|
238
|
+
didWarnAboutElementRef[componentName] ||
|
|
239
|
+
((didWarnAboutElementRef[componentName] = true),
|
|
240
|
+
console.error(
|
|
241
|
+
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
242
|
+
));
|
|
243
|
+
componentName = this.props.ref;
|
|
244
|
+
return void 0 !== componentName ? componentName : null;
|
|
245
|
+
}
|
|
246
|
+
function ReactElement(type, key, props, owner, debugStack, debugTask) {
|
|
247
|
+
var refProp = props.ref;
|
|
248
|
+
type = {
|
|
249
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
250
|
+
type: type,
|
|
251
|
+
key: key,
|
|
252
|
+
props: props,
|
|
253
|
+
_owner: owner
|
|
254
|
+
};
|
|
255
|
+
null !== (void 0 !== refProp ? refProp : null)
|
|
256
|
+
? Object.defineProperty(type, "ref", {
|
|
257
|
+
enumerable: false,
|
|
258
|
+
get: elementRefGetterWithDeprecationWarning
|
|
259
|
+
})
|
|
260
|
+
: Object.defineProperty(type, "ref", { enumerable: false, value: null });
|
|
261
|
+
type._store = {};
|
|
262
|
+
Object.defineProperty(type._store, "validated", {
|
|
263
|
+
configurable: false,
|
|
264
|
+
enumerable: false,
|
|
265
|
+
writable: true,
|
|
266
|
+
value: 0
|
|
267
|
+
});
|
|
268
|
+
Object.defineProperty(type, "_debugInfo", {
|
|
269
|
+
configurable: false,
|
|
270
|
+
enumerable: false,
|
|
271
|
+
writable: true,
|
|
272
|
+
value: null
|
|
273
|
+
});
|
|
274
|
+
Object.defineProperty(type, "_debugStack", {
|
|
275
|
+
configurable: false,
|
|
276
|
+
enumerable: false,
|
|
277
|
+
writable: true,
|
|
278
|
+
value: debugStack
|
|
279
|
+
});
|
|
280
|
+
Object.defineProperty(type, "_debugTask", {
|
|
281
|
+
configurable: false,
|
|
282
|
+
enumerable: false,
|
|
283
|
+
writable: true,
|
|
284
|
+
value: debugTask
|
|
285
|
+
});
|
|
286
|
+
Object.freeze && (Object.freeze(type.props), Object.freeze(type));
|
|
287
|
+
return type;
|
|
288
|
+
}
|
|
289
|
+
function jsxDEVImpl(
|
|
290
|
+
type,
|
|
291
|
+
config,
|
|
292
|
+
maybeKey,
|
|
293
|
+
isStaticChildren,
|
|
294
|
+
debugStack,
|
|
295
|
+
debugTask
|
|
296
|
+
) {
|
|
297
|
+
var children = config.children;
|
|
298
|
+
if (void 0 !== children)
|
|
299
|
+
if (isStaticChildren)
|
|
300
|
+
if (isArrayImpl(children)) {
|
|
301
|
+
for (
|
|
302
|
+
isStaticChildren = 0;
|
|
303
|
+
isStaticChildren < children.length;
|
|
304
|
+
isStaticChildren++
|
|
305
|
+
)
|
|
306
|
+
validateChildKeys(children[isStaticChildren]);
|
|
307
|
+
Object.freeze && Object.freeze(children);
|
|
308
|
+
} else
|
|
309
|
+
console.error(
|
|
310
|
+
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
311
|
+
);
|
|
312
|
+
else validateChildKeys(children);
|
|
313
|
+
if (hasOwnProperty.call(config, "key")) {
|
|
314
|
+
children = getComponentNameFromType(type);
|
|
315
|
+
var keys = Object.keys(config).filter(function (k) {
|
|
316
|
+
return "key" !== k;
|
|
317
|
+
});
|
|
318
|
+
isStaticChildren =
|
|
319
|
+
0 < keys.length
|
|
320
|
+
? "{key: someKey, " + keys.join(": ..., ") + ": ...}"
|
|
321
|
+
: "{key: someKey}";
|
|
322
|
+
didWarnAboutKeySpread[children + isStaticChildren] ||
|
|
323
|
+
((keys =
|
|
324
|
+
0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}"),
|
|
325
|
+
console.error(
|
|
326
|
+
'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
|
|
327
|
+
isStaticChildren,
|
|
328
|
+
children,
|
|
329
|
+
keys,
|
|
330
|
+
children
|
|
331
|
+
),
|
|
332
|
+
(didWarnAboutKeySpread[children + isStaticChildren] = true));
|
|
333
|
+
}
|
|
334
|
+
children = null;
|
|
335
|
+
void 0 !== maybeKey &&
|
|
336
|
+
(checkKeyStringCoercion(maybeKey), (children = "" + maybeKey));
|
|
337
|
+
hasValidKey(config) &&
|
|
338
|
+
(checkKeyStringCoercion(config.key), (children = "" + config.key));
|
|
339
|
+
if ("key" in config) {
|
|
340
|
+
maybeKey = {};
|
|
341
|
+
for (var propName in config)
|
|
342
|
+
"key" !== propName && (maybeKey[propName] = config[propName]);
|
|
343
|
+
} else maybeKey = config;
|
|
344
|
+
children &&
|
|
345
|
+
defineKeyPropWarningGetter(
|
|
346
|
+
maybeKey,
|
|
347
|
+
"function" === typeof type
|
|
348
|
+
? type.displayName || type.name || "Unknown"
|
|
349
|
+
: type
|
|
350
|
+
);
|
|
351
|
+
return ReactElement(
|
|
352
|
+
type,
|
|
353
|
+
children,
|
|
354
|
+
maybeKey,
|
|
355
|
+
getOwner(),
|
|
356
|
+
debugStack,
|
|
357
|
+
debugTask
|
|
358
|
+
);
|
|
359
|
+
}
|
|
360
|
+
function validateChildKeys(node) {
|
|
361
|
+
isValidElement(node)
|
|
362
|
+
? node._store && (node._store.validated = 1)
|
|
363
|
+
: "object" === typeof node &&
|
|
364
|
+
null !== node &&
|
|
365
|
+
node.$$typeof === REACT_LAZY_TYPE &&
|
|
366
|
+
("fulfilled" === node._payload.status
|
|
367
|
+
? isValidElement(node._payload.value) &&
|
|
368
|
+
node._payload.value._store &&
|
|
369
|
+
(node._payload.value._store.validated = 1)
|
|
370
|
+
: node._store && (node._store.validated = 1));
|
|
371
|
+
}
|
|
372
|
+
function isValidElement(object) {
|
|
373
|
+
return (
|
|
374
|
+
"object" === typeof object &&
|
|
375
|
+
null !== object &&
|
|
376
|
+
object.$$typeof === REACT_ELEMENT_TYPE
|
|
377
|
+
);
|
|
378
|
+
}
|
|
379
|
+
var React = require$$0,
|
|
380
|
+
REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"),
|
|
381
|
+
REACT_PORTAL_TYPE = Symbol.for("react.portal"),
|
|
382
|
+
REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"),
|
|
383
|
+
REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"),
|
|
384
|
+
REACT_PROFILER_TYPE = Symbol.for("react.profiler"),
|
|
385
|
+
REACT_CONSUMER_TYPE = Symbol.for("react.consumer"),
|
|
386
|
+
REACT_CONTEXT_TYPE = Symbol.for("react.context"),
|
|
387
|
+
REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"),
|
|
388
|
+
REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"),
|
|
389
|
+
REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"),
|
|
390
|
+
REACT_MEMO_TYPE = Symbol.for("react.memo"),
|
|
391
|
+
REACT_LAZY_TYPE = Symbol.for("react.lazy"),
|
|
392
|
+
REACT_ACTIVITY_TYPE = Symbol.for("react.activity"),
|
|
393
|
+
REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"),
|
|
394
|
+
ReactSharedInternals =
|
|
395
|
+
React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,
|
|
396
|
+
hasOwnProperty = Object.prototype.hasOwnProperty,
|
|
397
|
+
isArrayImpl = Array.isArray,
|
|
398
|
+
createTask = console.createTask
|
|
399
|
+
? console.createTask
|
|
400
|
+
: function () {
|
|
401
|
+
return null;
|
|
402
|
+
};
|
|
403
|
+
React = {
|
|
404
|
+
react_stack_bottom_frame: function (callStackForError) {
|
|
405
|
+
return callStackForError();
|
|
406
|
+
}
|
|
407
|
+
};
|
|
408
|
+
var specialPropKeyWarningShown;
|
|
409
|
+
var didWarnAboutElementRef = {};
|
|
410
|
+
var unknownOwnerDebugStack = React.react_stack_bottom_frame.bind(
|
|
411
|
+
React,
|
|
412
|
+
UnknownOwner
|
|
413
|
+
)();
|
|
414
|
+
var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
|
|
415
|
+
var didWarnAboutKeySpread = {};
|
|
416
|
+
reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
|
|
417
|
+
reactJsxRuntime_development.jsx = function (type, config, maybeKey) {
|
|
418
|
+
var trackActualOwner =
|
|
419
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
420
|
+
return jsxDEVImpl(
|
|
421
|
+
type,
|
|
422
|
+
config,
|
|
423
|
+
maybeKey,
|
|
424
|
+
false,
|
|
425
|
+
trackActualOwner
|
|
426
|
+
? Error("react-stack-top-frame")
|
|
427
|
+
: unknownOwnerDebugStack,
|
|
428
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
429
|
+
);
|
|
430
|
+
};
|
|
431
|
+
reactJsxRuntime_development.jsxs = function (type, config, maybeKey) {
|
|
432
|
+
var trackActualOwner =
|
|
433
|
+
1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
|
|
434
|
+
return jsxDEVImpl(
|
|
435
|
+
type,
|
|
436
|
+
config,
|
|
437
|
+
maybeKey,
|
|
438
|
+
true,
|
|
439
|
+
trackActualOwner
|
|
440
|
+
? Error("react-stack-top-frame")
|
|
441
|
+
: unknownOwnerDebugStack,
|
|
442
|
+
trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
|
|
443
|
+
);
|
|
444
|
+
};
|
|
445
|
+
})();
|
|
446
|
+
return reactJsxRuntime_development;
|
|
161
447
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
448
|
+
|
|
449
|
+
var hasRequiredJsxRuntime;
|
|
450
|
+
|
|
451
|
+
function requireJsxRuntime () {
|
|
452
|
+
if (hasRequiredJsxRuntime) return jsxRuntime.exports;
|
|
453
|
+
hasRequiredJsxRuntime = 1;
|
|
454
|
+
|
|
455
|
+
if (process.env.NODE_ENV === 'production') {
|
|
456
|
+
jsxRuntime.exports = requireReactJsxRuntime_production();
|
|
457
|
+
} else {
|
|
458
|
+
jsxRuntime.exports = requireReactJsxRuntime_development();
|
|
459
|
+
}
|
|
460
|
+
return jsxRuntime.exports;
|
|
174
461
|
}
|
|
175
462
|
|
|
463
|
+
var jsxRuntimeExports = requireJsxRuntime();
|
|
464
|
+
|
|
176
465
|
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
177
466
|
|
|
178
467
|
const falsyToString = (value)=>typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
@@ -3317,307 +3606,12 @@ const buttonVariants = cva([
|
|
|
3317
3606
|
size: "default",
|
|
3318
3607
|
},
|
|
3319
3608
|
});
|
|
3320
|
-
const Button =
|
|
3609
|
+
const Button = require$$0.forwardRef(({ className, variant, scheme, size, asChild = false, ...props }, ref) => {
|
|
3321
3610
|
const Comp = asChild ? Slot : "button";
|
|
3322
|
-
return (jsx(Comp, { className: cn(buttonVariants({ variant, scheme, size, className })), ref: ref, ...props }));
|
|
3611
|
+
return (jsxRuntimeExports.jsx(Comp, { className: cn(buttonVariants({ variant, scheme, size, className })), ref: ref, ...props }));
|
|
3323
3612
|
});
|
|
3324
3613
|
Button.displayName = "Button";
|
|
3325
3614
|
|
|
3326
|
-
function __insertCSS(code) {
|
|
3327
|
-
if (typeof document == 'undefined') return
|
|
3328
|
-
let head = document.head || document.getElementsByTagName('head')[0];
|
|
3329
|
-
let style = document.createElement('style');
|
|
3330
|
-
style.type = 'text/css';
|
|
3331
|
-
head.appendChild(style)
|
|
3332
|
-
;style.styleSheet ? (style.styleSheet.cssText = code) : style.appendChild(document.createTextNode(code));
|
|
3333
|
-
}
|
|
3334
|
-
Array(12).fill(0);
|
|
3335
|
-
|
|
3336
|
-
let toastsCounter = 1;
|
|
3337
|
-
class Observer {
|
|
3338
|
-
constructor(){
|
|
3339
|
-
// We use arrow functions to maintain the correct `this` reference
|
|
3340
|
-
this.subscribe = (subscriber)=>{
|
|
3341
|
-
this.subscribers.push(subscriber);
|
|
3342
|
-
return ()=>{
|
|
3343
|
-
const index = this.subscribers.indexOf(subscriber);
|
|
3344
|
-
this.subscribers.splice(index, 1);
|
|
3345
|
-
};
|
|
3346
|
-
};
|
|
3347
|
-
this.publish = (data)=>{
|
|
3348
|
-
this.subscribers.forEach((subscriber)=>subscriber(data));
|
|
3349
|
-
};
|
|
3350
|
-
this.addToast = (data)=>{
|
|
3351
|
-
this.publish(data);
|
|
3352
|
-
this.toasts = [
|
|
3353
|
-
...this.toasts,
|
|
3354
|
-
data
|
|
3355
|
-
];
|
|
3356
|
-
};
|
|
3357
|
-
this.create = (data)=>{
|
|
3358
|
-
var _data_id;
|
|
3359
|
-
const { message, ...rest } = data;
|
|
3360
|
-
const id = typeof (data == null ? void 0 : data.id) === 'number' || ((_data_id = data.id) == null ? void 0 : _data_id.length) > 0 ? data.id : toastsCounter++;
|
|
3361
|
-
const alreadyExists = this.toasts.find((toast)=>{
|
|
3362
|
-
return toast.id === id;
|
|
3363
|
-
});
|
|
3364
|
-
const dismissible = data.dismissible === undefined ? true : data.dismissible;
|
|
3365
|
-
if (this.dismissedToasts.has(id)) {
|
|
3366
|
-
this.dismissedToasts.delete(id);
|
|
3367
|
-
}
|
|
3368
|
-
if (alreadyExists) {
|
|
3369
|
-
this.toasts = this.toasts.map((toast)=>{
|
|
3370
|
-
if (toast.id === id) {
|
|
3371
|
-
this.publish({
|
|
3372
|
-
...toast,
|
|
3373
|
-
...data,
|
|
3374
|
-
id,
|
|
3375
|
-
title: message
|
|
3376
|
-
});
|
|
3377
|
-
return {
|
|
3378
|
-
...toast,
|
|
3379
|
-
...data,
|
|
3380
|
-
id,
|
|
3381
|
-
dismissible,
|
|
3382
|
-
title: message
|
|
3383
|
-
};
|
|
3384
|
-
}
|
|
3385
|
-
return toast;
|
|
3386
|
-
});
|
|
3387
|
-
} else {
|
|
3388
|
-
this.addToast({
|
|
3389
|
-
title: message,
|
|
3390
|
-
...rest,
|
|
3391
|
-
dismissible,
|
|
3392
|
-
id
|
|
3393
|
-
});
|
|
3394
|
-
}
|
|
3395
|
-
return id;
|
|
3396
|
-
};
|
|
3397
|
-
this.dismiss = (id)=>{
|
|
3398
|
-
if (id) {
|
|
3399
|
-
this.dismissedToasts.add(id);
|
|
3400
|
-
requestAnimationFrame(()=>this.subscribers.forEach((subscriber)=>subscriber({
|
|
3401
|
-
id,
|
|
3402
|
-
dismiss: true
|
|
3403
|
-
})));
|
|
3404
|
-
} else {
|
|
3405
|
-
this.toasts.forEach((toast)=>{
|
|
3406
|
-
this.subscribers.forEach((subscriber)=>subscriber({
|
|
3407
|
-
id: toast.id,
|
|
3408
|
-
dismiss: true
|
|
3409
|
-
}));
|
|
3410
|
-
});
|
|
3411
|
-
}
|
|
3412
|
-
return id;
|
|
3413
|
-
};
|
|
3414
|
-
this.message = (message, data)=>{
|
|
3415
|
-
return this.create({
|
|
3416
|
-
...data,
|
|
3417
|
-
message
|
|
3418
|
-
});
|
|
3419
|
-
};
|
|
3420
|
-
this.error = (message, data)=>{
|
|
3421
|
-
return this.create({
|
|
3422
|
-
...data,
|
|
3423
|
-
message,
|
|
3424
|
-
type: 'error'
|
|
3425
|
-
});
|
|
3426
|
-
};
|
|
3427
|
-
this.success = (message, data)=>{
|
|
3428
|
-
return this.create({
|
|
3429
|
-
...data,
|
|
3430
|
-
type: 'success',
|
|
3431
|
-
message
|
|
3432
|
-
});
|
|
3433
|
-
};
|
|
3434
|
-
this.info = (message, data)=>{
|
|
3435
|
-
return this.create({
|
|
3436
|
-
...data,
|
|
3437
|
-
type: 'info',
|
|
3438
|
-
message
|
|
3439
|
-
});
|
|
3440
|
-
};
|
|
3441
|
-
this.warning = (message, data)=>{
|
|
3442
|
-
return this.create({
|
|
3443
|
-
...data,
|
|
3444
|
-
type: 'warning',
|
|
3445
|
-
message
|
|
3446
|
-
});
|
|
3447
|
-
};
|
|
3448
|
-
this.loading = (message, data)=>{
|
|
3449
|
-
return this.create({
|
|
3450
|
-
...data,
|
|
3451
|
-
type: 'loading',
|
|
3452
|
-
message
|
|
3453
|
-
});
|
|
3454
|
-
};
|
|
3455
|
-
this.promise = (promise, data)=>{
|
|
3456
|
-
if (!data) {
|
|
3457
|
-
// Nothing to show
|
|
3458
|
-
return;
|
|
3459
|
-
}
|
|
3460
|
-
let id = undefined;
|
|
3461
|
-
if (data.loading !== undefined) {
|
|
3462
|
-
id = this.create({
|
|
3463
|
-
...data,
|
|
3464
|
-
promise,
|
|
3465
|
-
type: 'loading',
|
|
3466
|
-
message: data.loading,
|
|
3467
|
-
description: typeof data.description !== 'function' ? data.description : undefined
|
|
3468
|
-
});
|
|
3469
|
-
}
|
|
3470
|
-
const p = Promise.resolve(promise instanceof Function ? promise() : promise);
|
|
3471
|
-
let shouldDismiss = id !== undefined;
|
|
3472
|
-
let result;
|
|
3473
|
-
const originalPromise = p.then(async (response)=>{
|
|
3474
|
-
result = [
|
|
3475
|
-
'resolve',
|
|
3476
|
-
response
|
|
3477
|
-
];
|
|
3478
|
-
const isReactElementResponse = React__default.isValidElement(response);
|
|
3479
|
-
if (isReactElementResponse) {
|
|
3480
|
-
shouldDismiss = false;
|
|
3481
|
-
this.create({
|
|
3482
|
-
id,
|
|
3483
|
-
type: 'default',
|
|
3484
|
-
message: response
|
|
3485
|
-
});
|
|
3486
|
-
} else if (isHttpResponse(response) && !response.ok) {
|
|
3487
|
-
shouldDismiss = false;
|
|
3488
|
-
const promiseData = typeof data.error === 'function' ? await data.error(`HTTP error! status: ${response.status}`) : data.error;
|
|
3489
|
-
const description = typeof data.description === 'function' ? await data.description(`HTTP error! status: ${response.status}`) : data.description;
|
|
3490
|
-
const isExtendedResult = typeof promiseData === 'object' && !React__default.isValidElement(promiseData);
|
|
3491
|
-
const toastSettings = isExtendedResult ? promiseData : {
|
|
3492
|
-
message: promiseData
|
|
3493
|
-
};
|
|
3494
|
-
this.create({
|
|
3495
|
-
id,
|
|
3496
|
-
type: 'error',
|
|
3497
|
-
description,
|
|
3498
|
-
...toastSettings
|
|
3499
|
-
});
|
|
3500
|
-
} else if (response instanceof Error) {
|
|
3501
|
-
shouldDismiss = false;
|
|
3502
|
-
const promiseData = typeof data.error === 'function' ? await data.error(response) : data.error;
|
|
3503
|
-
const description = typeof data.description === 'function' ? await data.description(response) : data.description;
|
|
3504
|
-
const isExtendedResult = typeof promiseData === 'object' && !React__default.isValidElement(promiseData);
|
|
3505
|
-
const toastSettings = isExtendedResult ? promiseData : {
|
|
3506
|
-
message: promiseData
|
|
3507
|
-
};
|
|
3508
|
-
this.create({
|
|
3509
|
-
id,
|
|
3510
|
-
type: 'error',
|
|
3511
|
-
description,
|
|
3512
|
-
...toastSettings
|
|
3513
|
-
});
|
|
3514
|
-
} else if (data.success !== undefined) {
|
|
3515
|
-
shouldDismiss = false;
|
|
3516
|
-
const promiseData = typeof data.success === 'function' ? await data.success(response) : data.success;
|
|
3517
|
-
const description = typeof data.description === 'function' ? await data.description(response) : data.description;
|
|
3518
|
-
const isExtendedResult = typeof promiseData === 'object' && !React__default.isValidElement(promiseData);
|
|
3519
|
-
const toastSettings = isExtendedResult ? promiseData : {
|
|
3520
|
-
message: promiseData
|
|
3521
|
-
};
|
|
3522
|
-
this.create({
|
|
3523
|
-
id,
|
|
3524
|
-
type: 'success',
|
|
3525
|
-
description,
|
|
3526
|
-
...toastSettings
|
|
3527
|
-
});
|
|
3528
|
-
}
|
|
3529
|
-
}).catch(async (error)=>{
|
|
3530
|
-
result = [
|
|
3531
|
-
'reject',
|
|
3532
|
-
error
|
|
3533
|
-
];
|
|
3534
|
-
if (data.error !== undefined) {
|
|
3535
|
-
shouldDismiss = false;
|
|
3536
|
-
const promiseData = typeof data.error === 'function' ? await data.error(error) : data.error;
|
|
3537
|
-
const description = typeof data.description === 'function' ? await data.description(error) : data.description;
|
|
3538
|
-
const isExtendedResult = typeof promiseData === 'object' && !React__default.isValidElement(promiseData);
|
|
3539
|
-
const toastSettings = isExtendedResult ? promiseData : {
|
|
3540
|
-
message: promiseData
|
|
3541
|
-
};
|
|
3542
|
-
this.create({
|
|
3543
|
-
id,
|
|
3544
|
-
type: 'error',
|
|
3545
|
-
description,
|
|
3546
|
-
...toastSettings
|
|
3547
|
-
});
|
|
3548
|
-
}
|
|
3549
|
-
}).finally(()=>{
|
|
3550
|
-
if (shouldDismiss) {
|
|
3551
|
-
// Toast is still in load state (and will be indefinitely — dismiss it)
|
|
3552
|
-
this.dismiss(id);
|
|
3553
|
-
id = undefined;
|
|
3554
|
-
}
|
|
3555
|
-
data.finally == null ? void 0 : data.finally.call(data);
|
|
3556
|
-
});
|
|
3557
|
-
const unwrap = ()=>new Promise((resolve, reject)=>originalPromise.then(()=>result[0] === 'reject' ? reject(result[1]) : resolve(result[1])).catch(reject));
|
|
3558
|
-
if (typeof id !== 'string' && typeof id !== 'number') {
|
|
3559
|
-
// cannot Object.assign on undefined
|
|
3560
|
-
return {
|
|
3561
|
-
unwrap
|
|
3562
|
-
};
|
|
3563
|
-
} else {
|
|
3564
|
-
return Object.assign(id, {
|
|
3565
|
-
unwrap
|
|
3566
|
-
});
|
|
3567
|
-
}
|
|
3568
|
-
};
|
|
3569
|
-
this.custom = (jsx, data)=>{
|
|
3570
|
-
const id = (data == null ? void 0 : data.id) || toastsCounter++;
|
|
3571
|
-
this.create({
|
|
3572
|
-
jsx: jsx(id),
|
|
3573
|
-
id,
|
|
3574
|
-
...data
|
|
3575
|
-
});
|
|
3576
|
-
return id;
|
|
3577
|
-
};
|
|
3578
|
-
this.getActiveToasts = ()=>{
|
|
3579
|
-
return this.toasts.filter((toast)=>!this.dismissedToasts.has(toast.id));
|
|
3580
|
-
};
|
|
3581
|
-
this.subscribers = [];
|
|
3582
|
-
this.toasts = [];
|
|
3583
|
-
this.dismissedToasts = new Set();
|
|
3584
|
-
}
|
|
3585
|
-
}
|
|
3586
|
-
const ToastState = new Observer();
|
|
3587
|
-
// bind this to the toast function
|
|
3588
|
-
const toastFunction = (message, data)=>{
|
|
3589
|
-
const id = (data == null ? void 0 : data.id) || toastsCounter++;
|
|
3590
|
-
ToastState.addToast({
|
|
3591
|
-
title: message,
|
|
3592
|
-
...data,
|
|
3593
|
-
id
|
|
3594
|
-
});
|
|
3595
|
-
return id;
|
|
3596
|
-
};
|
|
3597
|
-
const isHttpResponse = (data)=>{
|
|
3598
|
-
return data && typeof data === 'object' && 'ok' in data && typeof data.ok === 'boolean' && 'status' in data && typeof data.status === 'number';
|
|
3599
|
-
};
|
|
3600
|
-
const basicToast = toastFunction;
|
|
3601
|
-
const getHistory = ()=>ToastState.toasts;
|
|
3602
|
-
const getToasts = ()=>ToastState.getActiveToasts();
|
|
3603
|
-
// We use `Object.assign` to maintain the correct types as we would lose them otherwise
|
|
3604
|
-
const toast = Object.assign(basicToast, {
|
|
3605
|
-
success: ToastState.success,
|
|
3606
|
-
info: ToastState.info,
|
|
3607
|
-
warning: ToastState.warning,
|
|
3608
|
-
error: ToastState.error,
|
|
3609
|
-
custom: ToastState.custom,
|
|
3610
|
-
message: ToastState.message,
|
|
3611
|
-
promise: ToastState.promise,
|
|
3612
|
-
dismiss: ToastState.dismiss,
|
|
3613
|
-
loading: ToastState.loading
|
|
3614
|
-
}, {
|
|
3615
|
-
getHistory,
|
|
3616
|
-
getToasts
|
|
3617
|
-
});
|
|
3618
|
-
|
|
3619
|
-
__insertCSS("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");
|
|
3620
|
-
|
|
3621
3615
|
/**
|
|
3622
3616
|
* The orchestrator service to get the process from.
|
|
3623
3617
|
*
|
|
@@ -3663,18 +3657,18 @@ function useClientProcessBase({ processId, processName, processCallbackUrl, base
|
|
|
3663
3657
|
throw new Error("No processId");
|
|
3664
3658
|
if (!processName)
|
|
3665
3659
|
throw new Error("No processName");
|
|
3666
|
-
const
|
|
3660
|
+
const { process } = await processStatusChecker(processId);
|
|
3667
3661
|
// Handled! Return the proper response too
|
|
3668
|
-
if (
|
|
3662
|
+
if (process.status === "handled") {
|
|
3669
3663
|
const response = await processCallbackFetcher(processId, processName, processCallbackUrl);
|
|
3670
3664
|
setStatus("handled");
|
|
3671
3665
|
return response;
|
|
3672
3666
|
}
|
|
3673
3667
|
// Pending or failed
|
|
3674
|
-
if (
|
|
3668
|
+
if (process.status === "pending") {
|
|
3675
3669
|
setStatus("pending");
|
|
3676
3670
|
}
|
|
3677
|
-
else if (
|
|
3671
|
+
else if (process.status === "failed") {
|
|
3678
3672
|
setStatus("failed");
|
|
3679
3673
|
}
|
|
3680
3674
|
// Return null since no response
|
|
@@ -3685,7 +3679,7 @@ function useClientProcessBase({ processId, processName, processCallbackUrl, base
|
|
|
3685
3679
|
// Returns the next interval length to use to wait for fetch
|
|
3686
3680
|
refetchInterval: (query) => {
|
|
3687
3681
|
const data = query.state.data;
|
|
3688
|
-
if (data
|
|
3682
|
+
if (data !== null)
|
|
3689
3683
|
return false;
|
|
3690
3684
|
const interval = Math.min(baseInterval * 2 ** attemptRef.current, maxInterval);
|
|
3691
3685
|
attemptRef.current += 1;
|
|
@@ -3695,8 +3689,8 @@ function useClientProcessBase({ processId, processName, processCallbackUrl, base
|
|
|
3695
3689
|
return {
|
|
3696
3690
|
status,
|
|
3697
3691
|
attempts: attemptRef.current,
|
|
3698
|
-
result: query.data
|
|
3699
|
-
error: query.
|
|
3692
|
+
result: query.data,
|
|
3693
|
+
error: query.error,
|
|
3700
3694
|
isFetching: query.isFetching,
|
|
3701
3695
|
};
|
|
3702
3696
|
}
|