@insforge/react 0.7.9 → 0.7.11-dev.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.
- package/dist/atoms.cjs +2138 -102
- package/dist/atoms.cjs.map +1 -1
- package/dist/atoms.js +2117 -96
- package/dist/atoms.js.map +1 -1
- package/dist/components.cjs +2258 -172
- package/dist/components.cjs.map +1 -1
- package/dist/components.js +2105 -34
- package/dist/components.js.map +1 -1
- package/dist/forms.cjs +2138 -102
- package/dist/forms.cjs.map +1 -1
- package/dist/forms.js +2160 -139
- package/dist/forms.js.map +1 -1
- package/dist/hooks.cjs +0 -2
- package/dist/hooks.cjs.map +1 -1
- package/dist/hooks.js +0 -2
- package/dist/hooks.js.map +1 -1
- package/dist/index.cjs +2272 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2110 -39
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.cjs
CHANGED
|
@@ -1,23 +1,439 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var React2 = require('react');
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
5
|
require('@insforge/sdk');
|
|
6
|
-
var react
|
|
7
|
-
require('@emotion/cache');
|
|
8
|
-
var react$1 = require('@emotion/react');
|
|
9
|
-
var styled = require('@emotion/styled');
|
|
6
|
+
var react = require('@insforge/shared/react');
|
|
10
7
|
var lucideReact = require('lucide-react');
|
|
11
8
|
var zod = require('zod');
|
|
12
9
|
|
|
13
|
-
function
|
|
10
|
+
function _interopNamespace(e) {
|
|
11
|
+
if (e && e.__esModule) return e;
|
|
12
|
+
var n = Object.create(null);
|
|
13
|
+
if (e) {
|
|
14
|
+
Object.keys(e).forEach(function (k) {
|
|
15
|
+
if (k !== 'default') {
|
|
16
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
17
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
18
|
+
enumerable: true,
|
|
19
|
+
get: function () { return e[k]; }
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
n.default = e;
|
|
25
|
+
return Object.freeze(n);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
var React2__namespace = /*#__PURE__*/_interopNamespace(React2);
|
|
14
29
|
|
|
15
|
-
var
|
|
30
|
+
var __create = Object.create;
|
|
31
|
+
var __defProp = Object.defineProperty;
|
|
32
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
33
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
34
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
35
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
36
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
37
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
38
|
+
};
|
|
39
|
+
var __copyProps = (to, from2, except, desc) => {
|
|
40
|
+
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
|
|
41
|
+
for (let key of __getOwnPropNames(from2))
|
|
42
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
43
|
+
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
|
|
44
|
+
}
|
|
45
|
+
return to;
|
|
46
|
+
};
|
|
47
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
48
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
49
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
50
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
51
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
52
|
+
!mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
53
|
+
mod
|
|
54
|
+
));
|
|
55
|
+
|
|
56
|
+
// ../node_modules/react-is/cjs/react-is.production.min.js
|
|
57
|
+
var require_react_is_production_min = __commonJS({
|
|
58
|
+
"../node_modules/react-is/cjs/react-is.production.min.js"(exports$1) {
|
|
59
|
+
var b = "function" === typeof Symbol && Symbol.for;
|
|
60
|
+
var c = b ? Symbol.for("react.element") : 60103;
|
|
61
|
+
var d = b ? Symbol.for("react.portal") : 60106;
|
|
62
|
+
var e = b ? Symbol.for("react.fragment") : 60107;
|
|
63
|
+
var f = b ? Symbol.for("react.strict_mode") : 60108;
|
|
64
|
+
var g = b ? Symbol.for("react.profiler") : 60114;
|
|
65
|
+
var h = b ? Symbol.for("react.provider") : 60109;
|
|
66
|
+
var k = b ? Symbol.for("react.context") : 60110;
|
|
67
|
+
var l = b ? Symbol.for("react.async_mode") : 60111;
|
|
68
|
+
var m = b ? Symbol.for("react.concurrent_mode") : 60111;
|
|
69
|
+
var n = b ? Symbol.for("react.forward_ref") : 60112;
|
|
70
|
+
var p = b ? Symbol.for("react.suspense") : 60113;
|
|
71
|
+
var q = b ? Symbol.for("react.suspense_list") : 60120;
|
|
72
|
+
var r = b ? Symbol.for("react.memo") : 60115;
|
|
73
|
+
var t = b ? Symbol.for("react.lazy") : 60116;
|
|
74
|
+
var v = b ? Symbol.for("react.block") : 60121;
|
|
75
|
+
var w = b ? Symbol.for("react.fundamental") : 60117;
|
|
76
|
+
var x = b ? Symbol.for("react.responder") : 60118;
|
|
77
|
+
var y = b ? Symbol.for("react.scope") : 60119;
|
|
78
|
+
function z2(a) {
|
|
79
|
+
if ("object" === typeof a && null !== a) {
|
|
80
|
+
var u = a.$$typeof;
|
|
81
|
+
switch (u) {
|
|
82
|
+
case c:
|
|
83
|
+
switch (a = a.type, a) {
|
|
84
|
+
case l:
|
|
85
|
+
case m:
|
|
86
|
+
case e:
|
|
87
|
+
case g:
|
|
88
|
+
case f:
|
|
89
|
+
case p:
|
|
90
|
+
return a;
|
|
91
|
+
default:
|
|
92
|
+
switch (a = a && a.$$typeof, a) {
|
|
93
|
+
case k:
|
|
94
|
+
case n:
|
|
95
|
+
case t:
|
|
96
|
+
case r:
|
|
97
|
+
case h:
|
|
98
|
+
return a;
|
|
99
|
+
default:
|
|
100
|
+
return u;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
case d:
|
|
104
|
+
return u;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
function A(a) {
|
|
109
|
+
return z2(a) === m;
|
|
110
|
+
}
|
|
111
|
+
exports$1.AsyncMode = l;
|
|
112
|
+
exports$1.ConcurrentMode = m;
|
|
113
|
+
exports$1.ContextConsumer = k;
|
|
114
|
+
exports$1.ContextProvider = h;
|
|
115
|
+
exports$1.Element = c;
|
|
116
|
+
exports$1.ForwardRef = n;
|
|
117
|
+
exports$1.Fragment = e;
|
|
118
|
+
exports$1.Lazy = t;
|
|
119
|
+
exports$1.Memo = r;
|
|
120
|
+
exports$1.Portal = d;
|
|
121
|
+
exports$1.Profiler = g;
|
|
122
|
+
exports$1.StrictMode = f;
|
|
123
|
+
exports$1.Suspense = p;
|
|
124
|
+
exports$1.isAsyncMode = function(a) {
|
|
125
|
+
return A(a) || z2(a) === l;
|
|
126
|
+
};
|
|
127
|
+
exports$1.isConcurrentMode = A;
|
|
128
|
+
exports$1.isContextConsumer = function(a) {
|
|
129
|
+
return z2(a) === k;
|
|
130
|
+
};
|
|
131
|
+
exports$1.isContextProvider = function(a) {
|
|
132
|
+
return z2(a) === h;
|
|
133
|
+
};
|
|
134
|
+
exports$1.isElement = function(a) {
|
|
135
|
+
return "object" === typeof a && null !== a && a.$$typeof === c;
|
|
136
|
+
};
|
|
137
|
+
exports$1.isForwardRef = function(a) {
|
|
138
|
+
return z2(a) === n;
|
|
139
|
+
};
|
|
140
|
+
exports$1.isFragment = function(a) {
|
|
141
|
+
return z2(a) === e;
|
|
142
|
+
};
|
|
143
|
+
exports$1.isLazy = function(a) {
|
|
144
|
+
return z2(a) === t;
|
|
145
|
+
};
|
|
146
|
+
exports$1.isMemo = function(a) {
|
|
147
|
+
return z2(a) === r;
|
|
148
|
+
};
|
|
149
|
+
exports$1.isPortal = function(a) {
|
|
150
|
+
return z2(a) === d;
|
|
151
|
+
};
|
|
152
|
+
exports$1.isProfiler = function(a) {
|
|
153
|
+
return z2(a) === g;
|
|
154
|
+
};
|
|
155
|
+
exports$1.isStrictMode = function(a) {
|
|
156
|
+
return z2(a) === f;
|
|
157
|
+
};
|
|
158
|
+
exports$1.isSuspense = function(a) {
|
|
159
|
+
return z2(a) === p;
|
|
160
|
+
};
|
|
161
|
+
exports$1.isValidElementType = function(a) {
|
|
162
|
+
return "string" === typeof a || "function" === typeof a || a === e || a === m || a === g || a === f || a === p || a === q || "object" === typeof a && null !== a && (a.$$typeof === t || a.$$typeof === r || a.$$typeof === h || a.$$typeof === k || a.$$typeof === n || a.$$typeof === w || a.$$typeof === x || a.$$typeof === y || a.$$typeof === v);
|
|
163
|
+
};
|
|
164
|
+
exports$1.typeOf = z2;
|
|
165
|
+
}
|
|
166
|
+
});
|
|
16
167
|
|
|
17
|
-
//
|
|
18
|
-
var
|
|
168
|
+
// ../node_modules/react-is/cjs/react-is.development.js
|
|
169
|
+
var require_react_is_development = __commonJS({
|
|
170
|
+
"../node_modules/react-is/cjs/react-is.development.js"(exports$1) {
|
|
171
|
+
if (process.env.NODE_ENV !== "production") {
|
|
172
|
+
(function() {
|
|
173
|
+
var hasSymbol = typeof Symbol === "function" && Symbol.for;
|
|
174
|
+
var REACT_ELEMENT_TYPE = hasSymbol ? Symbol.for("react.element") : 60103;
|
|
175
|
+
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for("react.portal") : 60106;
|
|
176
|
+
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for("react.fragment") : 60107;
|
|
177
|
+
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for("react.strict_mode") : 60108;
|
|
178
|
+
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for("react.profiler") : 60114;
|
|
179
|
+
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for("react.provider") : 60109;
|
|
180
|
+
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for("react.context") : 60110;
|
|
181
|
+
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for("react.async_mode") : 60111;
|
|
182
|
+
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for("react.concurrent_mode") : 60111;
|
|
183
|
+
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for("react.forward_ref") : 60112;
|
|
184
|
+
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for("react.suspense") : 60113;
|
|
185
|
+
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for("react.suspense_list") : 60120;
|
|
186
|
+
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for("react.memo") : 60115;
|
|
187
|
+
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for("react.lazy") : 60116;
|
|
188
|
+
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for("react.block") : 60121;
|
|
189
|
+
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for("react.fundamental") : 60117;
|
|
190
|
+
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for("react.responder") : 60118;
|
|
191
|
+
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for("react.scope") : 60119;
|
|
192
|
+
function isValidElementType(type) {
|
|
193
|
+
return typeof type === "string" || typeof type === "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
194
|
+
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === "object" && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
195
|
+
}
|
|
196
|
+
function typeOf(object) {
|
|
197
|
+
if (typeof object === "object" && object !== null) {
|
|
198
|
+
var $$typeof = object.$$typeof;
|
|
199
|
+
switch ($$typeof) {
|
|
200
|
+
case REACT_ELEMENT_TYPE:
|
|
201
|
+
var type = object.type;
|
|
202
|
+
switch (type) {
|
|
203
|
+
case REACT_ASYNC_MODE_TYPE:
|
|
204
|
+
case REACT_CONCURRENT_MODE_TYPE:
|
|
205
|
+
case REACT_FRAGMENT_TYPE:
|
|
206
|
+
case REACT_PROFILER_TYPE:
|
|
207
|
+
case REACT_STRICT_MODE_TYPE:
|
|
208
|
+
case REACT_SUSPENSE_TYPE:
|
|
209
|
+
return type;
|
|
210
|
+
default:
|
|
211
|
+
var $$typeofType = type && type.$$typeof;
|
|
212
|
+
switch ($$typeofType) {
|
|
213
|
+
case REACT_CONTEXT_TYPE:
|
|
214
|
+
case REACT_FORWARD_REF_TYPE:
|
|
215
|
+
case REACT_LAZY_TYPE:
|
|
216
|
+
case REACT_MEMO_TYPE:
|
|
217
|
+
case REACT_PROVIDER_TYPE:
|
|
218
|
+
return $$typeofType;
|
|
219
|
+
default:
|
|
220
|
+
return $$typeof;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
case REACT_PORTAL_TYPE:
|
|
224
|
+
return $$typeof;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
return void 0;
|
|
228
|
+
}
|
|
229
|
+
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
230
|
+
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
231
|
+
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
232
|
+
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
233
|
+
var Element = REACT_ELEMENT_TYPE;
|
|
234
|
+
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
235
|
+
var Fragment9 = REACT_FRAGMENT_TYPE;
|
|
236
|
+
var Lazy = REACT_LAZY_TYPE;
|
|
237
|
+
var Memo = REACT_MEMO_TYPE;
|
|
238
|
+
var Portal = REACT_PORTAL_TYPE;
|
|
239
|
+
var Profiler = REACT_PROFILER_TYPE;
|
|
240
|
+
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
241
|
+
var Suspense = REACT_SUSPENSE_TYPE;
|
|
242
|
+
var hasWarnedAboutDeprecatedIsAsyncMode = false;
|
|
243
|
+
function isAsyncMode(object) {
|
|
244
|
+
{
|
|
245
|
+
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
246
|
+
hasWarnedAboutDeprecatedIsAsyncMode = true;
|
|
247
|
+
console["warn"]("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.");
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
251
|
+
}
|
|
252
|
+
function isConcurrentMode(object) {
|
|
253
|
+
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
254
|
+
}
|
|
255
|
+
function isContextConsumer(object) {
|
|
256
|
+
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
257
|
+
}
|
|
258
|
+
function isContextProvider(object) {
|
|
259
|
+
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
260
|
+
}
|
|
261
|
+
function isElement(object) {
|
|
262
|
+
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
263
|
+
}
|
|
264
|
+
function isForwardRef(object) {
|
|
265
|
+
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
266
|
+
}
|
|
267
|
+
function isFragment(object) {
|
|
268
|
+
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
269
|
+
}
|
|
270
|
+
function isLazy(object) {
|
|
271
|
+
return typeOf(object) === REACT_LAZY_TYPE;
|
|
272
|
+
}
|
|
273
|
+
function isMemo(object) {
|
|
274
|
+
return typeOf(object) === REACT_MEMO_TYPE;
|
|
275
|
+
}
|
|
276
|
+
function isPortal(object) {
|
|
277
|
+
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
278
|
+
}
|
|
279
|
+
function isProfiler(object) {
|
|
280
|
+
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
281
|
+
}
|
|
282
|
+
function isStrictMode(object) {
|
|
283
|
+
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
284
|
+
}
|
|
285
|
+
function isSuspense(object) {
|
|
286
|
+
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
287
|
+
}
|
|
288
|
+
exports$1.AsyncMode = AsyncMode;
|
|
289
|
+
exports$1.ConcurrentMode = ConcurrentMode;
|
|
290
|
+
exports$1.ContextConsumer = ContextConsumer;
|
|
291
|
+
exports$1.ContextProvider = ContextProvider;
|
|
292
|
+
exports$1.Element = Element;
|
|
293
|
+
exports$1.ForwardRef = ForwardRef;
|
|
294
|
+
exports$1.Fragment = Fragment9;
|
|
295
|
+
exports$1.Lazy = Lazy;
|
|
296
|
+
exports$1.Memo = Memo;
|
|
297
|
+
exports$1.Portal = Portal;
|
|
298
|
+
exports$1.Profiler = Profiler;
|
|
299
|
+
exports$1.StrictMode = StrictMode;
|
|
300
|
+
exports$1.Suspense = Suspense;
|
|
301
|
+
exports$1.isAsyncMode = isAsyncMode;
|
|
302
|
+
exports$1.isConcurrentMode = isConcurrentMode;
|
|
303
|
+
exports$1.isContextConsumer = isContextConsumer;
|
|
304
|
+
exports$1.isContextProvider = isContextProvider;
|
|
305
|
+
exports$1.isElement = isElement;
|
|
306
|
+
exports$1.isForwardRef = isForwardRef;
|
|
307
|
+
exports$1.isFragment = isFragment;
|
|
308
|
+
exports$1.isLazy = isLazy;
|
|
309
|
+
exports$1.isMemo = isMemo;
|
|
310
|
+
exports$1.isPortal = isPortal;
|
|
311
|
+
exports$1.isProfiler = isProfiler;
|
|
312
|
+
exports$1.isStrictMode = isStrictMode;
|
|
313
|
+
exports$1.isSuspense = isSuspense;
|
|
314
|
+
exports$1.isValidElementType = isValidElementType;
|
|
315
|
+
exports$1.typeOf = typeOf;
|
|
316
|
+
})();
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
});
|
|
320
|
+
|
|
321
|
+
// ../node_modules/react-is/index.js
|
|
322
|
+
var require_react_is = __commonJS({
|
|
323
|
+
"../node_modules/react-is/index.js"(exports$1, module) {
|
|
324
|
+
if (process.env.NODE_ENV === "production") {
|
|
325
|
+
module.exports = require_react_is_production_min();
|
|
326
|
+
} else {
|
|
327
|
+
module.exports = require_react_is_development();
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// ../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js
|
|
333
|
+
var require_hoist_non_react_statics_cjs = __commonJS({
|
|
334
|
+
"../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js"(exports$1, module) {
|
|
335
|
+
var reactIs = require_react_is();
|
|
336
|
+
var REACT_STATICS = {
|
|
337
|
+
childContextTypes: true,
|
|
338
|
+
contextType: true,
|
|
339
|
+
contextTypes: true,
|
|
340
|
+
defaultProps: true,
|
|
341
|
+
displayName: true,
|
|
342
|
+
getDefaultProps: true,
|
|
343
|
+
getDerivedStateFromError: true,
|
|
344
|
+
getDerivedStateFromProps: true,
|
|
345
|
+
mixins: true,
|
|
346
|
+
propTypes: true,
|
|
347
|
+
type: true
|
|
348
|
+
};
|
|
349
|
+
var KNOWN_STATICS = {
|
|
350
|
+
name: true,
|
|
351
|
+
length: true,
|
|
352
|
+
prototype: true,
|
|
353
|
+
caller: true,
|
|
354
|
+
callee: true,
|
|
355
|
+
arguments: true,
|
|
356
|
+
arity: true
|
|
357
|
+
};
|
|
358
|
+
var FORWARD_REF_STATICS = {
|
|
359
|
+
"$$typeof": true,
|
|
360
|
+
render: true,
|
|
361
|
+
defaultProps: true,
|
|
362
|
+
displayName: true,
|
|
363
|
+
propTypes: true
|
|
364
|
+
};
|
|
365
|
+
var MEMO_STATICS = {
|
|
366
|
+
"$$typeof": true,
|
|
367
|
+
compare: true,
|
|
368
|
+
defaultProps: true,
|
|
369
|
+
displayName: true,
|
|
370
|
+
propTypes: true,
|
|
371
|
+
type: true
|
|
372
|
+
};
|
|
373
|
+
var TYPE_STATICS = {};
|
|
374
|
+
TYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;
|
|
375
|
+
TYPE_STATICS[reactIs.Memo] = MEMO_STATICS;
|
|
376
|
+
function getStatics(component) {
|
|
377
|
+
if (reactIs.isMemo(component)) {
|
|
378
|
+
return MEMO_STATICS;
|
|
379
|
+
}
|
|
380
|
+
return TYPE_STATICS[component["$$typeof"]] || REACT_STATICS;
|
|
381
|
+
}
|
|
382
|
+
var defineProperty = Object.defineProperty;
|
|
383
|
+
var getOwnPropertyNames = Object.getOwnPropertyNames;
|
|
384
|
+
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
|
|
385
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
386
|
+
var getPrototypeOf = Object.getPrototypeOf;
|
|
387
|
+
var objectPrototype = Object.prototype;
|
|
388
|
+
function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
389
|
+
if (typeof sourceComponent !== "string") {
|
|
390
|
+
if (objectPrototype) {
|
|
391
|
+
var inheritedComponent = getPrototypeOf(sourceComponent);
|
|
392
|
+
if (inheritedComponent && inheritedComponent !== objectPrototype) {
|
|
393
|
+
hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
var keys = getOwnPropertyNames(sourceComponent);
|
|
397
|
+
if (getOwnPropertySymbols) {
|
|
398
|
+
keys = keys.concat(getOwnPropertySymbols(sourceComponent));
|
|
399
|
+
}
|
|
400
|
+
var targetStatics = getStatics(targetComponent);
|
|
401
|
+
var sourceStatics = getStatics(sourceComponent);
|
|
402
|
+
for (var i = 0; i < keys.length; ++i) {
|
|
403
|
+
var key = keys[i];
|
|
404
|
+
if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {
|
|
405
|
+
var descriptor = getOwnPropertyDescriptor(sourceComponent, key);
|
|
406
|
+
try {
|
|
407
|
+
defineProperty(targetComponent, key, descriptor);
|
|
408
|
+
} catch (e) {
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
return targetComponent;
|
|
414
|
+
}
|
|
415
|
+
module.exports = hoistNonReactStatics;
|
|
416
|
+
}
|
|
417
|
+
});
|
|
418
|
+
|
|
419
|
+
// ../node_modules/@babel/runtime/helpers/extends.js
|
|
420
|
+
var require_extends = __commonJS({
|
|
421
|
+
"../node_modules/@babel/runtime/helpers/extends.js"(exports$1, module) {
|
|
422
|
+
function _extends2() {
|
|
423
|
+
return module.exports = _extends2 = Object.assign ? Object.assign.bind() : function(n) {
|
|
424
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
425
|
+
var t = arguments[e];
|
|
426
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
427
|
+
}
|
|
428
|
+
return n;
|
|
429
|
+
}, module.exports.__esModule = true, module.exports["default"] = module.exports, _extends2.apply(null, arguments);
|
|
430
|
+
}
|
|
431
|
+
module.exports = _extends2, module.exports.__esModule = true, module.exports["default"] = module.exports;
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
var NavigationContext = React2.createContext(null);
|
|
19
435
|
function useNavigationAdapter() {
|
|
20
|
-
const adapter =
|
|
436
|
+
const adapter = React2.useContext(NavigationContext);
|
|
21
437
|
if (!adapter) {
|
|
22
438
|
return {
|
|
23
439
|
useSearchParams: () => new URLSearchParams(),
|
|
@@ -32,8 +448,1316 @@ function useSearchParams() {
|
|
|
32
448
|
const adapter = useNavigationAdapter();
|
|
33
449
|
return adapter.useSearchParams();
|
|
34
450
|
}
|
|
451
|
+
function sheetForTag(tag) {
|
|
452
|
+
if (tag.sheet) {
|
|
453
|
+
return tag.sheet;
|
|
454
|
+
}
|
|
455
|
+
for (var i = 0; i < document.styleSheets.length; i++) {
|
|
456
|
+
if (document.styleSheets[i].ownerNode === tag) {
|
|
457
|
+
return document.styleSheets[i];
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
return void 0;
|
|
461
|
+
}
|
|
462
|
+
function createStyleElement(options) {
|
|
463
|
+
var tag = document.createElement("style");
|
|
464
|
+
tag.setAttribute("data-emotion", options.key);
|
|
465
|
+
if (options.nonce !== void 0) {
|
|
466
|
+
tag.setAttribute("nonce", options.nonce);
|
|
467
|
+
}
|
|
468
|
+
tag.appendChild(document.createTextNode(""));
|
|
469
|
+
tag.setAttribute("data-s", "");
|
|
470
|
+
return tag;
|
|
471
|
+
}
|
|
472
|
+
var StyleSheet = /* @__PURE__ */ (function() {
|
|
473
|
+
function StyleSheet2(options) {
|
|
474
|
+
var _this = this;
|
|
475
|
+
this._insertTag = function(tag) {
|
|
476
|
+
var before;
|
|
477
|
+
if (_this.tags.length === 0) {
|
|
478
|
+
if (_this.insertionPoint) {
|
|
479
|
+
before = _this.insertionPoint.nextSibling;
|
|
480
|
+
} else if (_this.prepend) {
|
|
481
|
+
before = _this.container.firstChild;
|
|
482
|
+
} else {
|
|
483
|
+
before = _this.before;
|
|
484
|
+
}
|
|
485
|
+
} else {
|
|
486
|
+
before = _this.tags[_this.tags.length - 1].nextSibling;
|
|
487
|
+
}
|
|
488
|
+
_this.container.insertBefore(tag, before);
|
|
489
|
+
_this.tags.push(tag);
|
|
490
|
+
};
|
|
491
|
+
this.isSpeedy = options.speedy === void 0 ? true : options.speedy;
|
|
492
|
+
this.tags = [];
|
|
493
|
+
this.ctr = 0;
|
|
494
|
+
this.nonce = options.nonce;
|
|
495
|
+
this.key = options.key;
|
|
496
|
+
this.container = options.container;
|
|
497
|
+
this.prepend = options.prepend;
|
|
498
|
+
this.insertionPoint = options.insertionPoint;
|
|
499
|
+
this.before = null;
|
|
500
|
+
}
|
|
501
|
+
var _proto = StyleSheet2.prototype;
|
|
502
|
+
_proto.hydrate = function hydrate(nodes) {
|
|
503
|
+
nodes.forEach(this._insertTag);
|
|
504
|
+
};
|
|
505
|
+
_proto.insert = function insert(rule) {
|
|
506
|
+
if (this.ctr % (this.isSpeedy ? 65e3 : 1) === 0) {
|
|
507
|
+
this._insertTag(createStyleElement(this));
|
|
508
|
+
}
|
|
509
|
+
var tag = this.tags[this.tags.length - 1];
|
|
510
|
+
if (this.isSpeedy) {
|
|
511
|
+
var sheet = sheetForTag(tag);
|
|
512
|
+
try {
|
|
513
|
+
sheet.insertRule(rule, sheet.cssRules.length);
|
|
514
|
+
} catch (e) {
|
|
515
|
+
}
|
|
516
|
+
} else {
|
|
517
|
+
tag.appendChild(document.createTextNode(rule));
|
|
518
|
+
}
|
|
519
|
+
this.ctr++;
|
|
520
|
+
};
|
|
521
|
+
_proto.flush = function flush() {
|
|
522
|
+
this.tags.forEach(function(tag) {
|
|
523
|
+
var _tag$parentNode;
|
|
524
|
+
return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);
|
|
525
|
+
});
|
|
526
|
+
this.tags = [];
|
|
527
|
+
this.ctr = 0;
|
|
528
|
+
};
|
|
529
|
+
return StyleSheet2;
|
|
530
|
+
})();
|
|
531
|
+
|
|
532
|
+
// ../node_modules/stylis/src/Enum.js
|
|
533
|
+
var MS = "-ms-";
|
|
534
|
+
var MOZ = "-moz-";
|
|
535
|
+
var WEBKIT = "-webkit-";
|
|
536
|
+
var COMMENT = "comm";
|
|
537
|
+
var RULESET = "rule";
|
|
538
|
+
var DECLARATION = "decl";
|
|
539
|
+
var IMPORT = "@import";
|
|
540
|
+
var KEYFRAMES = "@keyframes";
|
|
541
|
+
var LAYER = "@layer";
|
|
542
|
+
|
|
543
|
+
// ../node_modules/stylis/src/Utility.js
|
|
544
|
+
var abs = Math.abs;
|
|
545
|
+
var from = String.fromCharCode;
|
|
546
|
+
var assign = Object.assign;
|
|
547
|
+
function hash(value, length2) {
|
|
548
|
+
return charat(value, 0) ^ 45 ? (((length2 << 2 ^ charat(value, 0)) << 2 ^ charat(value, 1)) << 2 ^ charat(value, 2)) << 2 ^ charat(value, 3) : 0;
|
|
549
|
+
}
|
|
550
|
+
function trim(value) {
|
|
551
|
+
return value.trim();
|
|
552
|
+
}
|
|
553
|
+
function match(value, pattern) {
|
|
554
|
+
return (value = pattern.exec(value)) ? value[0] : value;
|
|
555
|
+
}
|
|
556
|
+
function replace(value, pattern, replacement) {
|
|
557
|
+
return value.replace(pattern, replacement);
|
|
558
|
+
}
|
|
559
|
+
function indexof(value, search) {
|
|
560
|
+
return value.indexOf(search);
|
|
561
|
+
}
|
|
562
|
+
function charat(value, index) {
|
|
563
|
+
return value.charCodeAt(index) | 0;
|
|
564
|
+
}
|
|
565
|
+
function substr(value, begin, end) {
|
|
566
|
+
return value.slice(begin, end);
|
|
567
|
+
}
|
|
568
|
+
function strlen(value) {
|
|
569
|
+
return value.length;
|
|
570
|
+
}
|
|
571
|
+
function sizeof(value) {
|
|
572
|
+
return value.length;
|
|
573
|
+
}
|
|
574
|
+
function append(value, array) {
|
|
575
|
+
return array.push(value), value;
|
|
576
|
+
}
|
|
577
|
+
function combine(array, callback) {
|
|
578
|
+
return array.map(callback).join("");
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
// ../node_modules/stylis/src/Tokenizer.js
|
|
582
|
+
var line = 1;
|
|
583
|
+
var column = 1;
|
|
584
|
+
var length = 0;
|
|
585
|
+
var position = 0;
|
|
586
|
+
var character = 0;
|
|
587
|
+
var characters = "";
|
|
588
|
+
function node(value, root, parent, type, props, children, length2) {
|
|
589
|
+
return { value, root, parent, type, props, children, line, column, length: length2, return: "" };
|
|
590
|
+
}
|
|
591
|
+
function copy(root, props) {
|
|
592
|
+
return assign(node("", null, null, "", null, null, 0), root, { length: -root.length }, props);
|
|
593
|
+
}
|
|
594
|
+
function char() {
|
|
595
|
+
return character;
|
|
596
|
+
}
|
|
597
|
+
function prev() {
|
|
598
|
+
character = position > 0 ? charat(characters, --position) : 0;
|
|
599
|
+
if (column--, character === 10)
|
|
600
|
+
column = 1, line--;
|
|
601
|
+
return character;
|
|
602
|
+
}
|
|
603
|
+
function next() {
|
|
604
|
+
character = position < length ? charat(characters, position++) : 0;
|
|
605
|
+
if (column++, character === 10)
|
|
606
|
+
column = 1, line++;
|
|
607
|
+
return character;
|
|
608
|
+
}
|
|
609
|
+
function peek() {
|
|
610
|
+
return charat(characters, position);
|
|
611
|
+
}
|
|
612
|
+
function caret() {
|
|
613
|
+
return position;
|
|
614
|
+
}
|
|
615
|
+
function slice(begin, end) {
|
|
616
|
+
return substr(characters, begin, end);
|
|
617
|
+
}
|
|
618
|
+
function token(type) {
|
|
619
|
+
switch (type) {
|
|
620
|
+
// \0 \t \n \r \s whitespace token
|
|
621
|
+
case 0:
|
|
622
|
+
case 9:
|
|
623
|
+
case 10:
|
|
624
|
+
case 13:
|
|
625
|
+
case 32:
|
|
626
|
+
return 5;
|
|
627
|
+
// ! + , / > @ ~ isolate token
|
|
628
|
+
case 33:
|
|
629
|
+
case 43:
|
|
630
|
+
case 44:
|
|
631
|
+
case 47:
|
|
632
|
+
case 62:
|
|
633
|
+
case 64:
|
|
634
|
+
case 126:
|
|
635
|
+
// ; { } breakpoint token
|
|
636
|
+
case 59:
|
|
637
|
+
case 123:
|
|
638
|
+
case 125:
|
|
639
|
+
return 4;
|
|
640
|
+
// : accompanied token
|
|
641
|
+
case 58:
|
|
642
|
+
return 3;
|
|
643
|
+
// " ' ( [ opening delimit token
|
|
644
|
+
case 34:
|
|
645
|
+
case 39:
|
|
646
|
+
case 40:
|
|
647
|
+
case 91:
|
|
648
|
+
return 2;
|
|
649
|
+
// ) ] closing delimit token
|
|
650
|
+
case 41:
|
|
651
|
+
case 93:
|
|
652
|
+
return 1;
|
|
653
|
+
}
|
|
654
|
+
return 0;
|
|
655
|
+
}
|
|
656
|
+
function alloc(value) {
|
|
657
|
+
return line = column = 1, length = strlen(characters = value), position = 0, [];
|
|
658
|
+
}
|
|
659
|
+
function dealloc(value) {
|
|
660
|
+
return characters = "", value;
|
|
661
|
+
}
|
|
662
|
+
function delimit(type) {
|
|
663
|
+
return trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)));
|
|
664
|
+
}
|
|
665
|
+
function whitespace(type) {
|
|
666
|
+
while (character = peek())
|
|
667
|
+
if (character < 33)
|
|
668
|
+
next();
|
|
669
|
+
else
|
|
670
|
+
break;
|
|
671
|
+
return token(type) > 2 || token(character) > 3 ? "" : " ";
|
|
672
|
+
}
|
|
673
|
+
function escaping(index, count) {
|
|
674
|
+
while (--count && next())
|
|
675
|
+
if (character < 48 || character > 102 || character > 57 && character < 65 || character > 70 && character < 97)
|
|
676
|
+
break;
|
|
677
|
+
return slice(index, caret() + (count < 6 && peek() == 32 && next() == 32));
|
|
678
|
+
}
|
|
679
|
+
function delimiter(type) {
|
|
680
|
+
while (next())
|
|
681
|
+
switch (character) {
|
|
682
|
+
// ] ) " '
|
|
683
|
+
case type:
|
|
684
|
+
return position;
|
|
685
|
+
// " '
|
|
686
|
+
case 34:
|
|
687
|
+
case 39:
|
|
688
|
+
if (type !== 34 && type !== 39)
|
|
689
|
+
delimiter(character);
|
|
690
|
+
break;
|
|
691
|
+
// (
|
|
692
|
+
case 40:
|
|
693
|
+
if (type === 41)
|
|
694
|
+
delimiter(type);
|
|
695
|
+
break;
|
|
696
|
+
// \
|
|
697
|
+
case 92:
|
|
698
|
+
next();
|
|
699
|
+
break;
|
|
700
|
+
}
|
|
701
|
+
return position;
|
|
702
|
+
}
|
|
703
|
+
function commenter(type, index) {
|
|
704
|
+
while (next())
|
|
705
|
+
if (type + character === 47 + 10)
|
|
706
|
+
break;
|
|
707
|
+
else if (type + character === 42 + 42 && peek() === 47)
|
|
708
|
+
break;
|
|
709
|
+
return "/*" + slice(index, position - 1) + "*" + from(type === 47 ? type : next());
|
|
710
|
+
}
|
|
711
|
+
function identifier(index) {
|
|
712
|
+
while (!token(peek()))
|
|
713
|
+
next();
|
|
714
|
+
return slice(index, position);
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
// ../node_modules/stylis/src/Parser.js
|
|
718
|
+
function compile(value) {
|
|
719
|
+
return dealloc(parse("", null, null, null, [""], value = alloc(value), 0, [0], value));
|
|
720
|
+
}
|
|
721
|
+
function parse(value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {
|
|
722
|
+
var index = 0;
|
|
723
|
+
var offset = 0;
|
|
724
|
+
var length2 = pseudo;
|
|
725
|
+
var atrule = 0;
|
|
726
|
+
var property = 0;
|
|
727
|
+
var previous = 0;
|
|
728
|
+
var variable = 1;
|
|
729
|
+
var scanning = 1;
|
|
730
|
+
var ampersand = 1;
|
|
731
|
+
var character2 = 0;
|
|
732
|
+
var type = "";
|
|
733
|
+
var props = rules;
|
|
734
|
+
var children = rulesets;
|
|
735
|
+
var reference = rule;
|
|
736
|
+
var characters2 = type;
|
|
737
|
+
while (scanning)
|
|
738
|
+
switch (previous = character2, character2 = next()) {
|
|
739
|
+
// (
|
|
740
|
+
case 40:
|
|
741
|
+
if (previous != 108 && charat(characters2, length2 - 1) == 58) {
|
|
742
|
+
if (indexof(characters2 += replace(delimit(character2), "&", "&\f"), "&\f") != -1)
|
|
743
|
+
ampersand = -1;
|
|
744
|
+
break;
|
|
745
|
+
}
|
|
746
|
+
// " ' [
|
|
747
|
+
case 34:
|
|
748
|
+
case 39:
|
|
749
|
+
case 91:
|
|
750
|
+
characters2 += delimit(character2);
|
|
751
|
+
break;
|
|
752
|
+
// \t \n \r \s
|
|
753
|
+
case 9:
|
|
754
|
+
case 10:
|
|
755
|
+
case 13:
|
|
756
|
+
case 32:
|
|
757
|
+
characters2 += whitespace(previous);
|
|
758
|
+
break;
|
|
759
|
+
// \
|
|
760
|
+
case 92:
|
|
761
|
+
characters2 += escaping(caret() - 1, 7);
|
|
762
|
+
continue;
|
|
763
|
+
// /
|
|
764
|
+
case 47:
|
|
765
|
+
switch (peek()) {
|
|
766
|
+
case 42:
|
|
767
|
+
case 47:
|
|
768
|
+
append(comment(commenter(next(), caret()), root, parent), declarations);
|
|
769
|
+
break;
|
|
770
|
+
default:
|
|
771
|
+
characters2 += "/";
|
|
772
|
+
}
|
|
773
|
+
break;
|
|
774
|
+
// {
|
|
775
|
+
case 123 * variable:
|
|
776
|
+
points[index++] = strlen(characters2) * ampersand;
|
|
777
|
+
// } ; \0
|
|
778
|
+
case 125 * variable:
|
|
779
|
+
case 59:
|
|
780
|
+
case 0:
|
|
781
|
+
switch (character2) {
|
|
782
|
+
// \0 }
|
|
783
|
+
case 0:
|
|
784
|
+
case 125:
|
|
785
|
+
scanning = 0;
|
|
786
|
+
// ;
|
|
787
|
+
case 59 + offset:
|
|
788
|
+
if (ampersand == -1) characters2 = replace(characters2, /\f/g, "");
|
|
789
|
+
if (property > 0 && strlen(characters2) - length2)
|
|
790
|
+
append(property > 32 ? declaration(characters2 + ";", rule, parent, length2 - 1) : declaration(replace(characters2, " ", "") + ";", rule, parent, length2 - 2), declarations);
|
|
791
|
+
break;
|
|
792
|
+
// @ ;
|
|
793
|
+
case 59:
|
|
794
|
+
characters2 += ";";
|
|
795
|
+
// { rule/at-rule
|
|
796
|
+
default:
|
|
797
|
+
append(reference = ruleset(characters2, root, parent, index, offset, rules, points, type, props = [], children = [], length2), rulesets);
|
|
798
|
+
if (character2 === 123)
|
|
799
|
+
if (offset === 0)
|
|
800
|
+
parse(characters2, root, reference, reference, props, rulesets, length2, points, children);
|
|
801
|
+
else
|
|
802
|
+
switch (atrule === 99 && charat(characters2, 3) === 110 ? 100 : atrule) {
|
|
803
|
+
// d l m s
|
|
804
|
+
case 100:
|
|
805
|
+
case 108:
|
|
806
|
+
case 109:
|
|
807
|
+
case 115:
|
|
808
|
+
parse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length2), children), rules, children, length2, points, rule ? props : children);
|
|
809
|
+
break;
|
|
810
|
+
default:
|
|
811
|
+
parse(characters2, reference, reference, reference, [""], children, 0, points, children);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
index = offset = property = 0, variable = ampersand = 1, type = characters2 = "", length2 = pseudo;
|
|
815
|
+
break;
|
|
816
|
+
// :
|
|
817
|
+
case 58:
|
|
818
|
+
length2 = 1 + strlen(characters2), property = previous;
|
|
819
|
+
default:
|
|
820
|
+
if (variable < 1) {
|
|
821
|
+
if (character2 == 123)
|
|
822
|
+
--variable;
|
|
823
|
+
else if (character2 == 125 && variable++ == 0 && prev() == 125)
|
|
824
|
+
continue;
|
|
825
|
+
}
|
|
826
|
+
switch (characters2 += from(character2), character2 * variable) {
|
|
827
|
+
// &
|
|
828
|
+
case 38:
|
|
829
|
+
ampersand = offset > 0 ? 1 : (characters2 += "\f", -1);
|
|
830
|
+
break;
|
|
831
|
+
// ,
|
|
832
|
+
case 44:
|
|
833
|
+
points[index++] = (strlen(characters2) - 1) * ampersand, ampersand = 1;
|
|
834
|
+
break;
|
|
835
|
+
// @
|
|
836
|
+
case 64:
|
|
837
|
+
if (peek() === 45)
|
|
838
|
+
characters2 += delimit(next());
|
|
839
|
+
atrule = peek(), offset = length2 = strlen(type = characters2 += identifier(caret())), character2++;
|
|
840
|
+
break;
|
|
841
|
+
// -
|
|
842
|
+
case 45:
|
|
843
|
+
if (previous === 45 && strlen(characters2) == 2)
|
|
844
|
+
variable = 0;
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
return rulesets;
|
|
848
|
+
}
|
|
849
|
+
function ruleset(value, root, parent, index, offset, rules, points, type, props, children, length2) {
|
|
850
|
+
var post = offset - 1;
|
|
851
|
+
var rule = offset === 0 ? rules : [""];
|
|
852
|
+
var size = sizeof(rule);
|
|
853
|
+
for (var i = 0, j = 0, k = 0; i < index; ++i)
|
|
854
|
+
for (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z2 = value; x < size; ++x)
|
|
855
|
+
if (z2 = trim(j > 0 ? rule[x] + " " + y : replace(y, /&\f/g, rule[x])))
|
|
856
|
+
props[k++] = z2;
|
|
857
|
+
return node(value, root, parent, offset === 0 ? RULESET : type, props, children, length2);
|
|
858
|
+
}
|
|
859
|
+
function comment(value, root, parent) {
|
|
860
|
+
return node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0);
|
|
861
|
+
}
|
|
862
|
+
function declaration(value, root, parent, length2) {
|
|
863
|
+
return node(value, root, parent, DECLARATION, substr(value, 0, length2), substr(value, length2 + 1, -1), length2);
|
|
864
|
+
}
|
|
865
|
+
|
|
866
|
+
// ../node_modules/stylis/src/Serializer.js
|
|
867
|
+
function serialize(children, callback) {
|
|
868
|
+
var output = "";
|
|
869
|
+
var length2 = sizeof(children);
|
|
870
|
+
for (var i = 0; i < length2; i++)
|
|
871
|
+
output += callback(children[i], i, children, callback) || "";
|
|
872
|
+
return output;
|
|
873
|
+
}
|
|
874
|
+
function stringify(element, index, children, callback) {
|
|
875
|
+
switch (element.type) {
|
|
876
|
+
case LAYER:
|
|
877
|
+
if (element.children.length) break;
|
|
878
|
+
case IMPORT:
|
|
879
|
+
case DECLARATION:
|
|
880
|
+
return element.return = element.return || element.value;
|
|
881
|
+
case COMMENT:
|
|
882
|
+
return "";
|
|
883
|
+
case KEYFRAMES:
|
|
884
|
+
return element.return = element.value + "{" + serialize(element.children, callback) + "}";
|
|
885
|
+
case RULESET:
|
|
886
|
+
element.value = element.props.join(",");
|
|
887
|
+
}
|
|
888
|
+
return strlen(children = serialize(element.children, callback)) ? element.return = element.value + "{" + children + "}" : "";
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// ../node_modules/stylis/src/Middleware.js
|
|
892
|
+
function middleware(collection) {
|
|
893
|
+
var length2 = sizeof(collection);
|
|
894
|
+
return function(element, index, children, callback) {
|
|
895
|
+
var output = "";
|
|
896
|
+
for (var i = 0; i < length2; i++)
|
|
897
|
+
output += collection[i](element, index, children, callback) || "";
|
|
898
|
+
return output;
|
|
899
|
+
};
|
|
900
|
+
}
|
|
901
|
+
function rulesheet(callback) {
|
|
902
|
+
return function(element) {
|
|
903
|
+
if (!element.root) {
|
|
904
|
+
if (element = element.return)
|
|
905
|
+
callback(element);
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
// ../node_modules/@emotion/weak-memoize/dist/emotion-weak-memoize.esm.js
|
|
911
|
+
var weakMemoize = function weakMemoize2(func) {
|
|
912
|
+
var cache = /* @__PURE__ */ new WeakMap();
|
|
913
|
+
return function(arg) {
|
|
914
|
+
if (cache.has(arg)) {
|
|
915
|
+
return cache.get(arg);
|
|
916
|
+
}
|
|
917
|
+
var ret = func(arg);
|
|
918
|
+
cache.set(arg, ret);
|
|
919
|
+
return ret;
|
|
920
|
+
};
|
|
921
|
+
};
|
|
922
|
+
|
|
923
|
+
// ../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
924
|
+
function memoize(fn) {
|
|
925
|
+
var cache = /* @__PURE__ */ Object.create(null);
|
|
926
|
+
return function(arg) {
|
|
927
|
+
if (cache[arg] === void 0) cache[arg] = fn(arg);
|
|
928
|
+
return cache[arg];
|
|
929
|
+
};
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
// ../node_modules/@emotion/cache/dist/emotion-cache.esm.js
|
|
933
|
+
var isBrowser = typeof document !== "undefined";
|
|
934
|
+
var identifierWithPointTracking = function identifierWithPointTracking2(begin, points, index) {
|
|
935
|
+
var previous = 0;
|
|
936
|
+
var character2 = 0;
|
|
937
|
+
while (true) {
|
|
938
|
+
previous = character2;
|
|
939
|
+
character2 = peek();
|
|
940
|
+
if (previous === 38 && character2 === 12) {
|
|
941
|
+
points[index] = 1;
|
|
942
|
+
}
|
|
943
|
+
if (token(character2)) {
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
next();
|
|
947
|
+
}
|
|
948
|
+
return slice(begin, position);
|
|
949
|
+
};
|
|
950
|
+
var toRules = function toRules2(parsed, points) {
|
|
951
|
+
var index = -1;
|
|
952
|
+
var character2 = 44;
|
|
953
|
+
do {
|
|
954
|
+
switch (token(character2)) {
|
|
955
|
+
case 0:
|
|
956
|
+
if (character2 === 38 && peek() === 12) {
|
|
957
|
+
points[index] = 1;
|
|
958
|
+
}
|
|
959
|
+
parsed[index] += identifierWithPointTracking(position - 1, points, index);
|
|
960
|
+
break;
|
|
961
|
+
case 2:
|
|
962
|
+
parsed[index] += delimit(character2);
|
|
963
|
+
break;
|
|
964
|
+
case 4:
|
|
965
|
+
if (character2 === 44) {
|
|
966
|
+
parsed[++index] = peek() === 58 ? "&\f" : "";
|
|
967
|
+
points[index] = parsed[index].length;
|
|
968
|
+
break;
|
|
969
|
+
}
|
|
970
|
+
// fallthrough
|
|
971
|
+
default:
|
|
972
|
+
parsed[index] += from(character2);
|
|
973
|
+
}
|
|
974
|
+
} while (character2 = next());
|
|
975
|
+
return parsed;
|
|
976
|
+
};
|
|
977
|
+
var getRules = function getRules2(value, points) {
|
|
978
|
+
return dealloc(toRules(alloc(value), points));
|
|
979
|
+
};
|
|
980
|
+
var fixedElements = /* @__PURE__ */ new WeakMap();
|
|
981
|
+
var compat = function compat2(element) {
|
|
982
|
+
if (element.type !== "rule" || !element.parent || // positive .length indicates that this rule contains pseudo
|
|
983
|
+
// negative .length indicates that this rule has been already prefixed
|
|
984
|
+
element.length < 1) {
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
var value = element.value;
|
|
988
|
+
var parent = element.parent;
|
|
989
|
+
var isImplicitRule = element.column === parent.column && element.line === parent.line;
|
|
990
|
+
while (parent.type !== "rule") {
|
|
991
|
+
parent = parent.parent;
|
|
992
|
+
if (!parent) return;
|
|
993
|
+
}
|
|
994
|
+
if (element.props.length === 1 && value.charCodeAt(0) !== 58 && !fixedElements.get(parent)) {
|
|
995
|
+
return;
|
|
996
|
+
}
|
|
997
|
+
if (isImplicitRule) {
|
|
998
|
+
return;
|
|
999
|
+
}
|
|
1000
|
+
fixedElements.set(element, true);
|
|
1001
|
+
var points = [];
|
|
1002
|
+
var rules = getRules(value, points);
|
|
1003
|
+
var parentRules = parent.props;
|
|
1004
|
+
for (var i = 0, k = 0; i < rules.length; i++) {
|
|
1005
|
+
for (var j = 0; j < parentRules.length; j++, k++) {
|
|
1006
|
+
element.props[k] = points[i] ? rules[i].replace(/&\f/g, parentRules[j]) : parentRules[j] + " " + rules[i];
|
|
1007
|
+
}
|
|
1008
|
+
}
|
|
1009
|
+
};
|
|
1010
|
+
var removeLabel = function removeLabel2(element) {
|
|
1011
|
+
if (element.type === "decl") {
|
|
1012
|
+
var value = element.value;
|
|
1013
|
+
if (
|
|
1014
|
+
// charcode for l
|
|
1015
|
+
value.charCodeAt(0) === 108 && // charcode for b
|
|
1016
|
+
value.charCodeAt(2) === 98
|
|
1017
|
+
) {
|
|
1018
|
+
element["return"] = "";
|
|
1019
|
+
element.value = "";
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
};
|
|
1023
|
+
function prefix(value, length2) {
|
|
1024
|
+
switch (hash(value, length2)) {
|
|
1025
|
+
// color-adjust
|
|
1026
|
+
case 5103:
|
|
1027
|
+
return WEBKIT + "print-" + value + value;
|
|
1028
|
+
// animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)
|
|
1029
|
+
case 5737:
|
|
1030
|
+
case 4201:
|
|
1031
|
+
case 3177:
|
|
1032
|
+
case 3433:
|
|
1033
|
+
case 1641:
|
|
1034
|
+
case 4457:
|
|
1035
|
+
case 2921:
|
|
1036
|
+
// text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break
|
|
1037
|
+
case 5572:
|
|
1038
|
+
case 6356:
|
|
1039
|
+
case 5844:
|
|
1040
|
+
case 3191:
|
|
1041
|
+
case 6645:
|
|
1042
|
+
case 3005:
|
|
1043
|
+
// mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,
|
|
1044
|
+
case 6391:
|
|
1045
|
+
case 5879:
|
|
1046
|
+
case 5623:
|
|
1047
|
+
case 6135:
|
|
1048
|
+
case 4599:
|
|
1049
|
+
case 4855:
|
|
1050
|
+
// background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)
|
|
1051
|
+
case 4215:
|
|
1052
|
+
case 6389:
|
|
1053
|
+
case 5109:
|
|
1054
|
+
case 5365:
|
|
1055
|
+
case 5621:
|
|
1056
|
+
case 3829:
|
|
1057
|
+
return WEBKIT + value + value;
|
|
1058
|
+
// appearance, user-select, transform, hyphens, text-size-adjust
|
|
1059
|
+
case 5349:
|
|
1060
|
+
case 4246:
|
|
1061
|
+
case 4810:
|
|
1062
|
+
case 6968:
|
|
1063
|
+
case 2756:
|
|
1064
|
+
return WEBKIT + value + MOZ + value + MS + value + value;
|
|
1065
|
+
// flex, flex-direction
|
|
1066
|
+
case 6828:
|
|
1067
|
+
case 4268:
|
|
1068
|
+
return WEBKIT + value + MS + value + value;
|
|
1069
|
+
// order
|
|
1070
|
+
case 6165:
|
|
1071
|
+
return WEBKIT + value + MS + "flex-" + value + value;
|
|
1072
|
+
// align-items
|
|
1073
|
+
case 5187:
|
|
1074
|
+
return WEBKIT + value + replace(value, /(\w+).+(:[^]+)/, WEBKIT + "box-$1$2" + MS + "flex-$1$2") + value;
|
|
1075
|
+
// align-self
|
|
1076
|
+
case 5443:
|
|
1077
|
+
return WEBKIT + value + MS + "flex-item-" + replace(value, /flex-|-self/, "") + value;
|
|
1078
|
+
// align-content
|
|
1079
|
+
case 4675:
|
|
1080
|
+
return WEBKIT + value + MS + "flex-line-pack" + replace(value, /align-content|flex-|-self/, "") + value;
|
|
1081
|
+
// flex-shrink
|
|
1082
|
+
case 5548:
|
|
1083
|
+
return WEBKIT + value + MS + replace(value, "shrink", "negative") + value;
|
|
1084
|
+
// flex-basis
|
|
1085
|
+
case 5292:
|
|
1086
|
+
return WEBKIT + value + MS + replace(value, "basis", "preferred-size") + value;
|
|
1087
|
+
// flex-grow
|
|
1088
|
+
case 6060:
|
|
1089
|
+
return WEBKIT + "box-" + replace(value, "-grow", "") + WEBKIT + value + MS + replace(value, "grow", "positive") + value;
|
|
1090
|
+
// transition
|
|
1091
|
+
case 4554:
|
|
1092
|
+
return WEBKIT + replace(value, /([^-])(transform)/g, "$1" + WEBKIT + "$2") + value;
|
|
1093
|
+
// cursor
|
|
1094
|
+
case 6187:
|
|
1095
|
+
return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + "$1"), /(image-set)/, WEBKIT + "$1"), value, "") + value;
|
|
1096
|
+
// background, background-image
|
|
1097
|
+
case 5495:
|
|
1098
|
+
case 3959:
|
|
1099
|
+
return replace(value, /(image-set\([^]*)/, WEBKIT + "$1$`$1");
|
|
1100
|
+
// justify-content
|
|
1101
|
+
case 4968:
|
|
1102
|
+
return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + "box-pack:$3" + MS + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + WEBKIT + value + value;
|
|
1103
|
+
// (margin|padding)-inline-(start|end)
|
|
1104
|
+
case 4095:
|
|
1105
|
+
case 3583:
|
|
1106
|
+
case 4068:
|
|
1107
|
+
case 2532:
|
|
1108
|
+
return replace(value, /(.+)-inline(.+)/, WEBKIT + "$1$2") + value;
|
|
1109
|
+
// (min|max)?(width|height|inline-size|block-size)
|
|
1110
|
+
case 8116:
|
|
1111
|
+
case 7059:
|
|
1112
|
+
case 5753:
|
|
1113
|
+
case 5535:
|
|
1114
|
+
case 5445:
|
|
1115
|
+
case 5701:
|
|
1116
|
+
case 4933:
|
|
1117
|
+
case 4677:
|
|
1118
|
+
case 5533:
|
|
1119
|
+
case 5789:
|
|
1120
|
+
case 5021:
|
|
1121
|
+
case 4765:
|
|
1122
|
+
if (strlen(value) - 1 - length2 > 6) switch (charat(value, length2 + 1)) {
|
|
1123
|
+
// (m)ax-content, (m)in-content
|
|
1124
|
+
case 109:
|
|
1125
|
+
if (charat(value, length2 + 4) !== 45) break;
|
|
1126
|
+
// (f)ill-available, (f)it-content
|
|
1127
|
+
case 102:
|
|
1128
|
+
return replace(value, /(.+:)(.+)-([^]+)/, "$1" + WEBKIT + "$2-$3$1" + MOZ + (charat(value, length2 + 3) == 108 ? "$3" : "$2-$3")) + value;
|
|
1129
|
+
// (s)tretch
|
|
1130
|
+
case 115:
|
|
1131
|
+
return ~indexof(value, "stretch") ? prefix(replace(value, "stretch", "fill-available"), length2) + value : value;
|
|
1132
|
+
}
|
|
1133
|
+
break;
|
|
1134
|
+
// position: sticky
|
|
1135
|
+
case 4949:
|
|
1136
|
+
if (charat(value, length2 + 1) !== 115) break;
|
|
1137
|
+
// display: (flex|inline-flex)
|
|
1138
|
+
case 6444:
|
|
1139
|
+
switch (charat(value, strlen(value) - 3 - (~indexof(value, "!important") && 10))) {
|
|
1140
|
+
// stic(k)y
|
|
1141
|
+
case 107:
|
|
1142
|
+
return replace(value, ":", ":" + WEBKIT) + value;
|
|
1143
|
+
// (inline-)?fl(e)x
|
|
1144
|
+
case 101:
|
|
1145
|
+
return replace(value, /(.+:)([^;!]+)(;|!.+)?/, "$1" + WEBKIT + (charat(value, 14) === 45 ? "inline-" : "") + "box$3$1" + WEBKIT + "$2$3$1" + MS + "$2box$3") + value;
|
|
1146
|
+
}
|
|
1147
|
+
break;
|
|
1148
|
+
// writing-mode
|
|
1149
|
+
case 5936:
|
|
1150
|
+
switch (charat(value, length2 + 11)) {
|
|
1151
|
+
// vertical-l(r)
|
|
1152
|
+
case 114:
|
|
1153
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb") + value;
|
|
1154
|
+
// vertical-r(l)
|
|
1155
|
+
case 108:
|
|
1156
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "tb-rl") + value;
|
|
1157
|
+
// horizontal(-)tb
|
|
1158
|
+
case 45:
|
|
1159
|
+
return WEBKIT + value + MS + replace(value, /[svh]\w+-[tblr]{2}/, "lr") + value;
|
|
1160
|
+
}
|
|
1161
|
+
return WEBKIT + value + MS + value + value;
|
|
1162
|
+
}
|
|
1163
|
+
return value;
|
|
1164
|
+
}
|
|
1165
|
+
var prefixer = function prefixer2(element, index, children, callback) {
|
|
1166
|
+
if (element.length > -1) {
|
|
1167
|
+
if (!element["return"]) switch (element.type) {
|
|
1168
|
+
case DECLARATION:
|
|
1169
|
+
element["return"] = prefix(element.value, element.length);
|
|
1170
|
+
break;
|
|
1171
|
+
case KEYFRAMES:
|
|
1172
|
+
return serialize([copy(element, {
|
|
1173
|
+
value: replace(element.value, "@", "@" + WEBKIT)
|
|
1174
|
+
})], callback);
|
|
1175
|
+
case RULESET:
|
|
1176
|
+
if (element.length) return combine(element.props, function(value) {
|
|
1177
|
+
switch (match(value, /(::plac\w+|:read-\w+)/)) {
|
|
1178
|
+
// :read-(only|write)
|
|
1179
|
+
case ":read-only":
|
|
1180
|
+
case ":read-write":
|
|
1181
|
+
return serialize([copy(element, {
|
|
1182
|
+
props: [replace(value, /:(read-\w+)/, ":" + MOZ + "$1")]
|
|
1183
|
+
})], callback);
|
|
1184
|
+
// :placeholder
|
|
1185
|
+
case "::placeholder":
|
|
1186
|
+
return serialize([copy(element, {
|
|
1187
|
+
props: [replace(value, /:(plac\w+)/, ":" + WEBKIT + "input-$1")]
|
|
1188
|
+
}), copy(element, {
|
|
1189
|
+
props: [replace(value, /:(plac\w+)/, ":" + MOZ + "$1")]
|
|
1190
|
+
}), copy(element, {
|
|
1191
|
+
props: [replace(value, /:(plac\w+)/, MS + "input-$1")]
|
|
1192
|
+
})], callback);
|
|
1193
|
+
}
|
|
1194
|
+
return "";
|
|
1195
|
+
});
|
|
1196
|
+
}
|
|
1197
|
+
}
|
|
1198
|
+
};
|
|
1199
|
+
var getServerStylisCache = isBrowser ? void 0 : weakMemoize(function() {
|
|
1200
|
+
return memoize(function() {
|
|
1201
|
+
return {};
|
|
1202
|
+
});
|
|
1203
|
+
});
|
|
1204
|
+
var defaultStylisPlugins = [prefixer];
|
|
1205
|
+
var createCache = function createCache2(options) {
|
|
1206
|
+
var key = options.key;
|
|
1207
|
+
if (isBrowser && key === "css") {
|
|
1208
|
+
var ssrStyles = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1209
|
+
Array.prototype.forEach.call(ssrStyles, function(node2) {
|
|
1210
|
+
var dataEmotionAttribute = node2.getAttribute("data-emotion");
|
|
1211
|
+
if (dataEmotionAttribute.indexOf(" ") === -1) {
|
|
1212
|
+
return;
|
|
1213
|
+
}
|
|
1214
|
+
document.head.appendChild(node2);
|
|
1215
|
+
node2.setAttribute("data-s", "");
|
|
1216
|
+
});
|
|
1217
|
+
}
|
|
1218
|
+
var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;
|
|
1219
|
+
var inserted = {};
|
|
1220
|
+
var container;
|
|
1221
|
+
var nodesToHydrate = [];
|
|
1222
|
+
if (isBrowser) {
|
|
1223
|
+
container = options.container || document.head;
|
|
1224
|
+
Array.prototype.forEach.call(
|
|
1225
|
+
// this means we will ignore elements which don't have a space in them which
|
|
1226
|
+
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1227
|
+
document.querySelectorAll('style[data-emotion^="' + key + ' "]'),
|
|
1228
|
+
function(node2) {
|
|
1229
|
+
var attrib = node2.getAttribute("data-emotion").split(" ");
|
|
1230
|
+
for (var i = 1; i < attrib.length; i++) {
|
|
1231
|
+
inserted[attrib[i]] = true;
|
|
1232
|
+
}
|
|
1233
|
+
nodesToHydrate.push(node2);
|
|
1234
|
+
}
|
|
1235
|
+
);
|
|
1236
|
+
}
|
|
1237
|
+
var _insert;
|
|
1238
|
+
var omnipresentPlugins = [compat, removeLabel];
|
|
1239
|
+
if (!getServerStylisCache) {
|
|
1240
|
+
var currentSheet;
|
|
1241
|
+
var finalizingPlugins = [stringify, rulesheet(function(rule) {
|
|
1242
|
+
currentSheet.insert(rule);
|
|
1243
|
+
})];
|
|
1244
|
+
var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));
|
|
1245
|
+
var stylis = function stylis2(styles) {
|
|
1246
|
+
return serialize(compile(styles), serializer);
|
|
1247
|
+
};
|
|
1248
|
+
_insert = function insert(selector, serialized, sheet, shouldCache) {
|
|
1249
|
+
currentSheet = sheet;
|
|
1250
|
+
stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1251
|
+
if (shouldCache) {
|
|
1252
|
+
cache.inserted[serialized.name] = true;
|
|
1253
|
+
}
|
|
1254
|
+
};
|
|
1255
|
+
} else {
|
|
1256
|
+
var _finalizingPlugins = [stringify];
|
|
1257
|
+
var _serializer = middleware(omnipresentPlugins.concat(stylisPlugins, _finalizingPlugins));
|
|
1258
|
+
var _stylis = function _stylis2(styles) {
|
|
1259
|
+
return serialize(compile(styles), _serializer);
|
|
1260
|
+
};
|
|
1261
|
+
var serverStylisCache = getServerStylisCache(stylisPlugins)(key);
|
|
1262
|
+
var getRules3 = function getRules4(selector, serialized) {
|
|
1263
|
+
var name = serialized.name;
|
|
1264
|
+
if (serverStylisCache[name] === void 0) {
|
|
1265
|
+
serverStylisCache[name] = _stylis(selector ? selector + "{" + serialized.styles + "}" : serialized.styles);
|
|
1266
|
+
}
|
|
1267
|
+
return serverStylisCache[name];
|
|
1268
|
+
};
|
|
1269
|
+
_insert = function _insert2(selector, serialized, sheet, shouldCache) {
|
|
1270
|
+
var name = serialized.name;
|
|
1271
|
+
var rules = getRules3(selector, serialized);
|
|
1272
|
+
if (cache.compat === void 0) {
|
|
1273
|
+
if (shouldCache) {
|
|
1274
|
+
cache.inserted[name] = true;
|
|
1275
|
+
}
|
|
1276
|
+
return rules;
|
|
1277
|
+
} else {
|
|
1278
|
+
if (shouldCache) {
|
|
1279
|
+
cache.inserted[name] = rules;
|
|
1280
|
+
} else {
|
|
1281
|
+
return rules;
|
|
1282
|
+
}
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
}
|
|
1286
|
+
var cache = {
|
|
1287
|
+
key,
|
|
1288
|
+
sheet: new StyleSheet({
|
|
1289
|
+
key,
|
|
1290
|
+
container,
|
|
1291
|
+
nonce: options.nonce,
|
|
1292
|
+
speedy: options.speedy,
|
|
1293
|
+
prepend: options.prepend,
|
|
1294
|
+
insertionPoint: options.insertionPoint
|
|
1295
|
+
}),
|
|
1296
|
+
nonce: options.nonce,
|
|
1297
|
+
inserted,
|
|
1298
|
+
registered: {},
|
|
1299
|
+
insert: _insert
|
|
1300
|
+
};
|
|
1301
|
+
cache.sheet.hydrate(nodesToHydrate);
|
|
1302
|
+
return cache;
|
|
1303
|
+
};
|
|
1304
|
+
|
|
1305
|
+
// ../node_modules/@babel/runtime/helpers/esm/extends.js
|
|
1306
|
+
function _extends() {
|
|
1307
|
+
return _extends = Object.assign ? Object.assign.bind() : function(n) {
|
|
1308
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
1309
|
+
var t = arguments[e];
|
|
1310
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
1311
|
+
}
|
|
1312
|
+
return n;
|
|
1313
|
+
}, _extends.apply(null, arguments);
|
|
1314
|
+
}
|
|
1315
|
+
|
|
1316
|
+
// ../node_modules/@emotion/utils/dist/emotion-utils.esm.js
|
|
1317
|
+
var isBrowser2 = typeof document !== "undefined";
|
|
1318
|
+
function getRegisteredStyles(registered, registeredStyles, classNames) {
|
|
1319
|
+
var rawClassName = "";
|
|
1320
|
+
classNames.split(" ").forEach(function(className) {
|
|
1321
|
+
if (registered[className] !== void 0) {
|
|
1322
|
+
registeredStyles.push(registered[className] + ";");
|
|
1323
|
+
} else if (className) {
|
|
1324
|
+
rawClassName += className + " ";
|
|
1325
|
+
}
|
|
1326
|
+
});
|
|
1327
|
+
return rawClassName;
|
|
1328
|
+
}
|
|
1329
|
+
var registerStyles = function registerStyles2(cache, serialized, isStringTag) {
|
|
1330
|
+
var className = cache.key + "-" + serialized.name;
|
|
1331
|
+
if (
|
|
1332
|
+
// we only need to add the styles to the registered cache if the
|
|
1333
|
+
// class name could be used further down
|
|
1334
|
+
// the tree but if it's a string tag, we know it won't
|
|
1335
|
+
// so we don't have to add it to registered cache.
|
|
1336
|
+
// this improves memory usage since we can avoid storing the whole style string
|
|
1337
|
+
(isStringTag === false || // we need to always store it if we're in compat mode and
|
|
1338
|
+
// in node since emotion-server relies on whether a style is in
|
|
1339
|
+
// the registered cache to know whether a style is global or not
|
|
1340
|
+
// also, note that this check will be dead code eliminated in the browser
|
|
1341
|
+
isBrowser2 === false && cache.compat !== void 0) && cache.registered[className] === void 0
|
|
1342
|
+
) {
|
|
1343
|
+
cache.registered[className] = serialized.styles;
|
|
1344
|
+
}
|
|
1345
|
+
};
|
|
1346
|
+
var insertStyles = function insertStyles2(cache, serialized, isStringTag) {
|
|
1347
|
+
registerStyles(cache, serialized, isStringTag);
|
|
1348
|
+
var className = cache.key + "-" + serialized.name;
|
|
1349
|
+
if (cache.inserted[serialized.name] === void 0) {
|
|
1350
|
+
var stylesForSSR = "";
|
|
1351
|
+
var current = serialized;
|
|
1352
|
+
do {
|
|
1353
|
+
var maybeStyles = cache.insert(serialized === current ? "." + className : "", current, cache.sheet, true);
|
|
1354
|
+
if (!isBrowser2 && maybeStyles !== void 0) {
|
|
1355
|
+
stylesForSSR += maybeStyles;
|
|
1356
|
+
}
|
|
1357
|
+
current = current.next;
|
|
1358
|
+
} while (current !== void 0);
|
|
1359
|
+
if (!isBrowser2 && stylesForSSR.length !== 0) {
|
|
1360
|
+
return stylesForSSR;
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
};
|
|
1364
|
+
|
|
1365
|
+
// ../node_modules/@emotion/hash/dist/emotion-hash.esm.js
|
|
1366
|
+
function murmur2(str) {
|
|
1367
|
+
var h = 0;
|
|
1368
|
+
var k, i = 0, len = str.length;
|
|
1369
|
+
for (; len >= 4; ++i, len -= 4) {
|
|
1370
|
+
k = str.charCodeAt(i) & 255 | (str.charCodeAt(++i) & 255) << 8 | (str.charCodeAt(++i) & 255) << 16 | (str.charCodeAt(++i) & 255) << 24;
|
|
1371
|
+
k = /* Math.imul(k, m): */
|
|
1372
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16);
|
|
1373
|
+
k ^= /* k >>> r: */
|
|
1374
|
+
k >>> 24;
|
|
1375
|
+
h = /* Math.imul(k, m): */
|
|
1376
|
+
(k & 65535) * 1540483477 + ((k >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
1377
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
1378
|
+
}
|
|
1379
|
+
switch (len) {
|
|
1380
|
+
case 3:
|
|
1381
|
+
h ^= (str.charCodeAt(i + 2) & 255) << 16;
|
|
1382
|
+
case 2:
|
|
1383
|
+
h ^= (str.charCodeAt(i + 1) & 255) << 8;
|
|
1384
|
+
case 1:
|
|
1385
|
+
h ^= str.charCodeAt(i) & 255;
|
|
1386
|
+
h = /* Math.imul(h, m): */
|
|
1387
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
1388
|
+
}
|
|
1389
|
+
h ^= h >>> 13;
|
|
1390
|
+
h = /* Math.imul(h, m): */
|
|
1391
|
+
(h & 65535) * 1540483477 + ((h >>> 16) * 59797 << 16);
|
|
1392
|
+
return ((h ^ h >>> 15) >>> 0).toString(36);
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
// ../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js
|
|
1396
|
+
var unitlessKeys = {
|
|
1397
|
+
animationIterationCount: 1,
|
|
1398
|
+
aspectRatio: 1,
|
|
1399
|
+
borderImageOutset: 1,
|
|
1400
|
+
borderImageSlice: 1,
|
|
1401
|
+
borderImageWidth: 1,
|
|
1402
|
+
boxFlex: 1,
|
|
1403
|
+
boxFlexGroup: 1,
|
|
1404
|
+
boxOrdinalGroup: 1,
|
|
1405
|
+
columnCount: 1,
|
|
1406
|
+
columns: 1,
|
|
1407
|
+
flex: 1,
|
|
1408
|
+
flexGrow: 1,
|
|
1409
|
+
flexPositive: 1,
|
|
1410
|
+
flexShrink: 1,
|
|
1411
|
+
flexNegative: 1,
|
|
1412
|
+
flexOrder: 1,
|
|
1413
|
+
gridRow: 1,
|
|
1414
|
+
gridRowEnd: 1,
|
|
1415
|
+
gridRowSpan: 1,
|
|
1416
|
+
gridRowStart: 1,
|
|
1417
|
+
gridColumn: 1,
|
|
1418
|
+
gridColumnEnd: 1,
|
|
1419
|
+
gridColumnSpan: 1,
|
|
1420
|
+
gridColumnStart: 1,
|
|
1421
|
+
msGridRow: 1,
|
|
1422
|
+
msGridRowSpan: 1,
|
|
1423
|
+
msGridColumn: 1,
|
|
1424
|
+
msGridColumnSpan: 1,
|
|
1425
|
+
fontWeight: 1,
|
|
1426
|
+
lineHeight: 1,
|
|
1427
|
+
opacity: 1,
|
|
1428
|
+
order: 1,
|
|
1429
|
+
orphans: 1,
|
|
1430
|
+
scale: 1,
|
|
1431
|
+
tabSize: 1,
|
|
1432
|
+
widows: 1,
|
|
1433
|
+
zIndex: 1,
|
|
1434
|
+
zoom: 1,
|
|
1435
|
+
WebkitLineClamp: 1,
|
|
1436
|
+
// SVG-related properties
|
|
1437
|
+
fillOpacity: 1,
|
|
1438
|
+
floodOpacity: 1,
|
|
1439
|
+
stopOpacity: 1,
|
|
1440
|
+
strokeDasharray: 1,
|
|
1441
|
+
strokeDashoffset: 1,
|
|
1442
|
+
strokeMiterlimit: 1,
|
|
1443
|
+
strokeOpacity: 1,
|
|
1444
|
+
strokeWidth: 1
|
|
1445
|
+
};
|
|
1446
|
+
var hyphenateRegex = /[A-Z]|^ms/g;
|
|
1447
|
+
var animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;
|
|
1448
|
+
var isCustomProperty = function isCustomProperty2(property) {
|
|
1449
|
+
return property.charCodeAt(1) === 45;
|
|
1450
|
+
};
|
|
1451
|
+
var isProcessableValue = function isProcessableValue2(value) {
|
|
1452
|
+
return value != null && typeof value !== "boolean";
|
|
1453
|
+
};
|
|
1454
|
+
var processStyleName = /* @__PURE__ */ memoize(function(styleName) {
|
|
1455
|
+
return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, "-$&").toLowerCase();
|
|
1456
|
+
});
|
|
1457
|
+
var processStyleValue = function processStyleValue2(key, value) {
|
|
1458
|
+
switch (key) {
|
|
1459
|
+
case "animation":
|
|
1460
|
+
case "animationName": {
|
|
1461
|
+
if (typeof value === "string") {
|
|
1462
|
+
return value.replace(animationRegex, function(match2, p1, p2) {
|
|
1463
|
+
cursor = {
|
|
1464
|
+
name: p1,
|
|
1465
|
+
styles: p2,
|
|
1466
|
+
next: cursor
|
|
1467
|
+
};
|
|
1468
|
+
return p1;
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
}
|
|
1473
|
+
if (unitlessKeys[key] !== 1 && !isCustomProperty(key) && typeof value === "number" && value !== 0) {
|
|
1474
|
+
return value + "px";
|
|
1475
|
+
}
|
|
1476
|
+
return value;
|
|
1477
|
+
};
|
|
1478
|
+
function handleInterpolation(mergedProps, registered, interpolation) {
|
|
1479
|
+
if (interpolation == null) {
|
|
1480
|
+
return "";
|
|
1481
|
+
}
|
|
1482
|
+
var componentSelector = interpolation;
|
|
1483
|
+
if (componentSelector.__emotion_styles !== void 0) {
|
|
1484
|
+
return componentSelector;
|
|
1485
|
+
}
|
|
1486
|
+
switch (typeof interpolation) {
|
|
1487
|
+
case "boolean": {
|
|
1488
|
+
return "";
|
|
1489
|
+
}
|
|
1490
|
+
case "object": {
|
|
1491
|
+
var keyframes3 = interpolation;
|
|
1492
|
+
if (keyframes3.anim === 1) {
|
|
1493
|
+
cursor = {
|
|
1494
|
+
name: keyframes3.name,
|
|
1495
|
+
styles: keyframes3.styles,
|
|
1496
|
+
next: cursor
|
|
1497
|
+
};
|
|
1498
|
+
return keyframes3.name;
|
|
1499
|
+
}
|
|
1500
|
+
var serializedStyles = interpolation;
|
|
1501
|
+
if (serializedStyles.styles !== void 0) {
|
|
1502
|
+
var next2 = serializedStyles.next;
|
|
1503
|
+
if (next2 !== void 0) {
|
|
1504
|
+
while (next2 !== void 0) {
|
|
1505
|
+
cursor = {
|
|
1506
|
+
name: next2.name,
|
|
1507
|
+
styles: next2.styles,
|
|
1508
|
+
next: cursor
|
|
1509
|
+
};
|
|
1510
|
+
next2 = next2.next;
|
|
1511
|
+
}
|
|
1512
|
+
}
|
|
1513
|
+
var styles = serializedStyles.styles + ";";
|
|
1514
|
+
return styles;
|
|
1515
|
+
}
|
|
1516
|
+
return createStringFromObject(mergedProps, registered, interpolation);
|
|
1517
|
+
}
|
|
1518
|
+
case "function": {
|
|
1519
|
+
if (mergedProps !== void 0) {
|
|
1520
|
+
var previousCursor = cursor;
|
|
1521
|
+
var result = interpolation(mergedProps);
|
|
1522
|
+
cursor = previousCursor;
|
|
1523
|
+
return handleInterpolation(mergedProps, registered, result);
|
|
1524
|
+
}
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1527
|
+
}
|
|
1528
|
+
var asString = interpolation;
|
|
1529
|
+
if (registered == null) {
|
|
1530
|
+
return asString;
|
|
1531
|
+
}
|
|
1532
|
+
var cached = registered[asString];
|
|
1533
|
+
return cached !== void 0 ? cached : asString;
|
|
1534
|
+
}
|
|
1535
|
+
function createStringFromObject(mergedProps, registered, obj) {
|
|
1536
|
+
var string = "";
|
|
1537
|
+
if (Array.isArray(obj)) {
|
|
1538
|
+
for (var i = 0; i < obj.length; i++) {
|
|
1539
|
+
string += handleInterpolation(mergedProps, registered, obj[i]) + ";";
|
|
1540
|
+
}
|
|
1541
|
+
} else {
|
|
1542
|
+
for (var key in obj) {
|
|
1543
|
+
var value = obj[key];
|
|
1544
|
+
if (typeof value !== "object") {
|
|
1545
|
+
var asString = value;
|
|
1546
|
+
if (registered != null && registered[asString] !== void 0) {
|
|
1547
|
+
string += key + "{" + registered[asString] + "}";
|
|
1548
|
+
} else if (isProcessableValue(asString)) {
|
|
1549
|
+
string += processStyleName(key) + ":" + processStyleValue(key, asString) + ";";
|
|
1550
|
+
}
|
|
1551
|
+
} else {
|
|
1552
|
+
if (Array.isArray(value) && typeof value[0] === "string" && (registered == null || registered[value[0]] === void 0)) {
|
|
1553
|
+
for (var _i = 0; _i < value.length; _i++) {
|
|
1554
|
+
if (isProcessableValue(value[_i])) {
|
|
1555
|
+
string += processStyleName(key) + ":" + processStyleValue(key, value[_i]) + ";";
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1558
|
+
} else {
|
|
1559
|
+
var interpolated = handleInterpolation(mergedProps, registered, value);
|
|
1560
|
+
switch (key) {
|
|
1561
|
+
case "animation":
|
|
1562
|
+
case "animationName": {
|
|
1563
|
+
string += processStyleName(key) + ":" + interpolated + ";";
|
|
1564
|
+
break;
|
|
1565
|
+
}
|
|
1566
|
+
default: {
|
|
1567
|
+
string += key + "{" + interpolated + "}";
|
|
1568
|
+
}
|
|
1569
|
+
}
|
|
1570
|
+
}
|
|
1571
|
+
}
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
return string;
|
|
1575
|
+
}
|
|
1576
|
+
var labelPattern = /label:\s*([^\s;{]+)\s*(;|$)/g;
|
|
1577
|
+
var cursor;
|
|
1578
|
+
function serializeStyles(args, registered, mergedProps) {
|
|
1579
|
+
if (args.length === 1 && typeof args[0] === "object" && args[0] !== null && args[0].styles !== void 0) {
|
|
1580
|
+
return args[0];
|
|
1581
|
+
}
|
|
1582
|
+
var stringMode = true;
|
|
1583
|
+
var styles = "";
|
|
1584
|
+
cursor = void 0;
|
|
1585
|
+
var strings = args[0];
|
|
1586
|
+
if (strings == null || strings.raw === void 0) {
|
|
1587
|
+
stringMode = false;
|
|
1588
|
+
styles += handleInterpolation(mergedProps, registered, strings);
|
|
1589
|
+
} else {
|
|
1590
|
+
var asTemplateStringsArr = strings;
|
|
1591
|
+
styles += asTemplateStringsArr[0];
|
|
1592
|
+
}
|
|
1593
|
+
for (var i = 1; i < args.length; i++) {
|
|
1594
|
+
styles += handleInterpolation(mergedProps, registered, args[i]);
|
|
1595
|
+
if (stringMode) {
|
|
1596
|
+
var templateStringsArr = strings;
|
|
1597
|
+
styles += templateStringsArr[i];
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
labelPattern.lastIndex = 0;
|
|
1601
|
+
var identifierName = "";
|
|
1602
|
+
var match2;
|
|
1603
|
+
while ((match2 = labelPattern.exec(styles)) !== null) {
|
|
1604
|
+
identifierName += "-" + match2[1];
|
|
1605
|
+
}
|
|
1606
|
+
var name = murmur2(styles) + identifierName;
|
|
1607
|
+
return {
|
|
1608
|
+
name,
|
|
1609
|
+
styles,
|
|
1610
|
+
next: cursor
|
|
1611
|
+
};
|
|
1612
|
+
}
|
|
1613
|
+
var isBrowser3 = typeof document !== "undefined";
|
|
1614
|
+
var syncFallback = function syncFallback2(create) {
|
|
1615
|
+
return create();
|
|
1616
|
+
};
|
|
1617
|
+
var useInsertionEffect2 = React2__namespace["useInsertionEffect"] ? React2__namespace["useInsertionEffect"] : false;
|
|
1618
|
+
var useInsertionEffectAlwaysWithSyncFallback = !isBrowser3 ? syncFallback : useInsertionEffect2 || syncFallback;
|
|
1619
|
+
var isBrowser4 = typeof document !== "undefined";
|
|
1620
|
+
var EmotionCacheContext = /* @__PURE__ */ React2__namespace.createContext(
|
|
1621
|
+
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1622
|
+
// because this module is primarily intended for the browser and node
|
|
1623
|
+
// but it's also required in react native and similar environments sometimes
|
|
1624
|
+
// and we could have a special build just for that
|
|
1625
|
+
// but this is much easier and the native packages
|
|
1626
|
+
// might use a different theme context in the future anyway
|
|
1627
|
+
typeof HTMLElement !== "undefined" ? /* @__PURE__ */ createCache({
|
|
1628
|
+
key: "css"
|
|
1629
|
+
}) : null
|
|
1630
|
+
);
|
|
1631
|
+
EmotionCacheContext.Provider;
|
|
1632
|
+
var withEmotionCache = function withEmotionCache2(func) {
|
|
1633
|
+
return /* @__PURE__ */ React2.forwardRef(function(props, ref) {
|
|
1634
|
+
var cache = React2.useContext(EmotionCacheContext);
|
|
1635
|
+
return func(props, cache, ref);
|
|
1636
|
+
});
|
|
1637
|
+
};
|
|
1638
|
+
if (!isBrowser4) {
|
|
1639
|
+
withEmotionCache = function withEmotionCache3(func) {
|
|
1640
|
+
return function(props) {
|
|
1641
|
+
var cache = React2.useContext(EmotionCacheContext);
|
|
1642
|
+
if (cache === null) {
|
|
1643
|
+
cache = createCache({
|
|
1644
|
+
key: "css"
|
|
1645
|
+
});
|
|
1646
|
+
return /* @__PURE__ */ React2__namespace.createElement(EmotionCacheContext.Provider, {
|
|
1647
|
+
value: cache
|
|
1648
|
+
}, func(props, cache));
|
|
1649
|
+
} else {
|
|
1650
|
+
return func(props, cache);
|
|
1651
|
+
}
|
|
1652
|
+
};
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
var ThemeContext = /* @__PURE__ */ React2__namespace.createContext({});
|
|
1656
|
+
var hasOwn = {}.hasOwnProperty;
|
|
1657
|
+
var typePropName = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__";
|
|
1658
|
+
var createEmotionProps = function createEmotionProps2(type, props) {
|
|
1659
|
+
var newProps = {};
|
|
1660
|
+
for (var _key in props) {
|
|
1661
|
+
if (hasOwn.call(props, _key)) {
|
|
1662
|
+
newProps[_key] = props[_key];
|
|
1663
|
+
}
|
|
1664
|
+
}
|
|
1665
|
+
newProps[typePropName] = type;
|
|
1666
|
+
return newProps;
|
|
1667
|
+
};
|
|
1668
|
+
var Insertion = function Insertion2(_ref) {
|
|
1669
|
+
var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
1670
|
+
registerStyles(cache, serialized, isStringTag);
|
|
1671
|
+
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
1672
|
+
return insertStyles(cache, serialized, isStringTag);
|
|
1673
|
+
});
|
|
1674
|
+
if (!isBrowser4 && rules !== void 0) {
|
|
1675
|
+
var _ref2;
|
|
1676
|
+
var serializedNames = serialized.name;
|
|
1677
|
+
var next2 = serialized.next;
|
|
1678
|
+
while (next2 !== void 0) {
|
|
1679
|
+
serializedNames += " " + next2.name;
|
|
1680
|
+
next2 = next2.next;
|
|
1681
|
+
}
|
|
1682
|
+
return /* @__PURE__ */ React2__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1683
|
+
__html: rules
|
|
1684
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
1685
|
+
}
|
|
1686
|
+
return null;
|
|
1687
|
+
};
|
|
1688
|
+
var Emotion = /* @__PURE__ */ withEmotionCache(function(props, cache, ref) {
|
|
1689
|
+
var cssProp = props.css;
|
|
1690
|
+
if (typeof cssProp === "string" && cache.registered[cssProp] !== void 0) {
|
|
1691
|
+
cssProp = cache.registered[cssProp];
|
|
1692
|
+
}
|
|
1693
|
+
var WrappedComponent = props[typePropName];
|
|
1694
|
+
var registeredStyles = [cssProp];
|
|
1695
|
+
var className = "";
|
|
1696
|
+
if (typeof props.className === "string") {
|
|
1697
|
+
className = getRegisteredStyles(cache.registered, registeredStyles, props.className);
|
|
1698
|
+
} else if (props.className != null) {
|
|
1699
|
+
className = props.className + " ";
|
|
1700
|
+
}
|
|
1701
|
+
var serialized = serializeStyles(registeredStyles, void 0, React2__namespace.useContext(ThemeContext));
|
|
1702
|
+
className += cache.key + "-" + serialized.name;
|
|
1703
|
+
var newProps = {};
|
|
1704
|
+
for (var _key2 in props) {
|
|
1705
|
+
if (hasOwn.call(props, _key2) && _key2 !== "css" && _key2 !== typePropName && true) {
|
|
1706
|
+
newProps[_key2] = props[_key2];
|
|
1707
|
+
}
|
|
1708
|
+
}
|
|
1709
|
+
newProps.className = className;
|
|
1710
|
+
if (ref) {
|
|
1711
|
+
newProps.ref = ref;
|
|
1712
|
+
}
|
|
1713
|
+
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(Insertion, {
|
|
1714
|
+
cache,
|
|
1715
|
+
serialized,
|
|
1716
|
+
isStringTag: typeof WrappedComponent === "string"
|
|
1717
|
+
}), /* @__PURE__ */ React2__namespace.createElement(WrappedComponent, newProps));
|
|
1718
|
+
});
|
|
1719
|
+
var Emotion$1 = Emotion;
|
|
1720
|
+
__toESM(require_extends());
|
|
1721
|
+
__toESM(require_hoist_non_react_statics_cjs());
|
|
1722
|
+
var jsx3 = function jsx4(type, props) {
|
|
1723
|
+
var args = arguments;
|
|
1724
|
+
if (props == null || !hasOwn.call(props, "css")) {
|
|
1725
|
+
return React2__namespace.createElement.apply(void 0, args);
|
|
1726
|
+
}
|
|
1727
|
+
var argsLength = args.length;
|
|
1728
|
+
var createElementArgArray = new Array(argsLength);
|
|
1729
|
+
createElementArgArray[0] = Emotion$1;
|
|
1730
|
+
createElementArgArray[1] = createEmotionProps(type, props);
|
|
1731
|
+
for (var i = 2; i < argsLength; i++) {
|
|
1732
|
+
createElementArgArray[i] = args[i];
|
|
1733
|
+
}
|
|
1734
|
+
return React2__namespace.createElement.apply(null, createElementArgArray);
|
|
1735
|
+
};
|
|
1736
|
+
(function(_jsx) {
|
|
1737
|
+
var JSX;
|
|
1738
|
+
/* @__PURE__ */ (function(_JSX) {
|
|
1739
|
+
})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));
|
|
1740
|
+
})(jsx3 || (jsx3 = {}));
|
|
1741
|
+
function css() {
|
|
1742
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1743
|
+
args[_key] = arguments[_key];
|
|
1744
|
+
}
|
|
1745
|
+
return serializeStyles(args);
|
|
1746
|
+
}
|
|
1747
|
+
function keyframes() {
|
|
1748
|
+
var insertable = css.apply(void 0, arguments);
|
|
1749
|
+
var name = "animation-" + insertable.name;
|
|
1750
|
+
return {
|
|
1751
|
+
name,
|
|
1752
|
+
styles: "@keyframes " + name + "{" + insertable.styles + "}",
|
|
1753
|
+
anim: 1,
|
|
1754
|
+
toString: function toString() {
|
|
1755
|
+
return "_EMO_" + this.name + "_" + this.styles + "_EMO_";
|
|
1756
|
+
}
|
|
1757
|
+
};
|
|
1758
|
+
}
|
|
35
1759
|
function useInsforge() {
|
|
36
|
-
const context =
|
|
1760
|
+
const context = React2.useContext(react.InsforgeContext);
|
|
37
1761
|
if (!context) {
|
|
38
1762
|
return {
|
|
39
1763
|
user: void 0,
|
|
@@ -62,9 +1786,9 @@ function useInsforge() {
|
|
|
62
1786
|
}
|
|
63
1787
|
function usePublicAuthConfig() {
|
|
64
1788
|
const { getPublicAuthConfig } = useInsforge();
|
|
65
|
-
const [authConfig, setAuthConfig] =
|
|
66
|
-
const [isLoaded, setIsLoaded] =
|
|
67
|
-
|
|
1789
|
+
const [authConfig, setAuthConfig] = React2.useState(null);
|
|
1790
|
+
const [isLoaded, setIsLoaded] = React2.useState(false);
|
|
1791
|
+
React2.useEffect(() => {
|
|
68
1792
|
async function fetchConfig() {
|
|
69
1793
|
const result = await getPublicAuthConfig();
|
|
70
1794
|
if (result) {
|
|
@@ -80,6 +1804,294 @@ function usePublicAuthConfig() {
|
|
|
80
1804
|
return { authConfig, isLoaded };
|
|
81
1805
|
}
|
|
82
1806
|
|
|
1807
|
+
// ../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js
|
|
1808
|
+
var reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|fetchpriority|fetchPriority|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|popover|popoverTarget|popoverTargetAction|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/;
|
|
1809
|
+
var isPropValid = /* @__PURE__ */ memoize(
|
|
1810
|
+
function(prop) {
|
|
1811
|
+
return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111 && prop.charCodeAt(1) === 110 && prop.charCodeAt(2) < 91;
|
|
1812
|
+
}
|
|
1813
|
+
/* Z+1 */
|
|
1814
|
+
);
|
|
1815
|
+
|
|
1816
|
+
// ../node_modules/@emotion/styled/base/dist/emotion-styled-base.esm.js
|
|
1817
|
+
var isBrowser5 = typeof document !== "undefined";
|
|
1818
|
+
var testOmitPropsOnStringTag = isPropValid;
|
|
1819
|
+
var testOmitPropsOnComponent = function testOmitPropsOnComponent2(key) {
|
|
1820
|
+
return key !== "theme";
|
|
1821
|
+
};
|
|
1822
|
+
var getDefaultShouldForwardProp = function getDefaultShouldForwardProp2(tag) {
|
|
1823
|
+
return typeof tag === "string" && // 96 is one less than the char code
|
|
1824
|
+
// for "a" so this is checking that
|
|
1825
|
+
// it's a lowercase character
|
|
1826
|
+
tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;
|
|
1827
|
+
};
|
|
1828
|
+
var composeShouldForwardProps = function composeShouldForwardProps2(tag, options, isReal) {
|
|
1829
|
+
var shouldForwardProp;
|
|
1830
|
+
if (options) {
|
|
1831
|
+
var optionsShouldForwardProp = options.shouldForwardProp;
|
|
1832
|
+
shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function(propName) {
|
|
1833
|
+
return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);
|
|
1834
|
+
} : optionsShouldForwardProp;
|
|
1835
|
+
}
|
|
1836
|
+
if (typeof shouldForwardProp !== "function" && isReal) {
|
|
1837
|
+
shouldForwardProp = tag.__emotion_forwardProp;
|
|
1838
|
+
}
|
|
1839
|
+
return shouldForwardProp;
|
|
1840
|
+
};
|
|
1841
|
+
var Insertion3 = function Insertion4(_ref) {
|
|
1842
|
+
var cache = _ref.cache, serialized = _ref.serialized, isStringTag = _ref.isStringTag;
|
|
1843
|
+
registerStyles(cache, serialized, isStringTag);
|
|
1844
|
+
var rules = useInsertionEffectAlwaysWithSyncFallback(function() {
|
|
1845
|
+
return insertStyles(cache, serialized, isStringTag);
|
|
1846
|
+
});
|
|
1847
|
+
if (!isBrowser5 && rules !== void 0) {
|
|
1848
|
+
var _ref2;
|
|
1849
|
+
var serializedNames = serialized.name;
|
|
1850
|
+
var next2 = serialized.next;
|
|
1851
|
+
while (next2 !== void 0) {
|
|
1852
|
+
serializedNames += " " + next2.name;
|
|
1853
|
+
next2 = next2.next;
|
|
1854
|
+
}
|
|
1855
|
+
return /* @__PURE__ */ React2__namespace.createElement("style", (_ref2 = {}, _ref2["data-emotion"] = cache.key + " " + serializedNames, _ref2.dangerouslySetInnerHTML = {
|
|
1856
|
+
__html: rules
|
|
1857
|
+
}, _ref2.nonce = cache.sheet.nonce, _ref2));
|
|
1858
|
+
}
|
|
1859
|
+
return null;
|
|
1860
|
+
};
|
|
1861
|
+
var createStyled = function createStyled2(tag, options) {
|
|
1862
|
+
var isReal = tag.__emotion_real === tag;
|
|
1863
|
+
var baseTag = isReal && tag.__emotion_base || tag;
|
|
1864
|
+
var identifierName;
|
|
1865
|
+
var targetClassName;
|
|
1866
|
+
if (options !== void 0) {
|
|
1867
|
+
identifierName = options.label;
|
|
1868
|
+
targetClassName = options.target;
|
|
1869
|
+
}
|
|
1870
|
+
var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);
|
|
1871
|
+
var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);
|
|
1872
|
+
var shouldUseAs = !defaultShouldForwardProp("as");
|
|
1873
|
+
return function() {
|
|
1874
|
+
var args = arguments;
|
|
1875
|
+
var styles = isReal && tag.__emotion_styles !== void 0 ? tag.__emotion_styles.slice(0) : [];
|
|
1876
|
+
if (identifierName !== void 0) {
|
|
1877
|
+
styles.push("label:" + identifierName + ";");
|
|
1878
|
+
}
|
|
1879
|
+
if (args[0] == null || args[0].raw === void 0) {
|
|
1880
|
+
styles.push.apply(styles, args);
|
|
1881
|
+
} else {
|
|
1882
|
+
var templateStringsArr = args[0];
|
|
1883
|
+
styles.push(templateStringsArr[0]);
|
|
1884
|
+
var len = args.length;
|
|
1885
|
+
var i = 1;
|
|
1886
|
+
for (; i < len; i++) {
|
|
1887
|
+
styles.push(args[i], templateStringsArr[i]);
|
|
1888
|
+
}
|
|
1889
|
+
}
|
|
1890
|
+
var Styled = withEmotionCache(function(props, cache, ref) {
|
|
1891
|
+
var FinalTag = shouldUseAs && props.as || baseTag;
|
|
1892
|
+
var className = "";
|
|
1893
|
+
var classInterpolations = [];
|
|
1894
|
+
var mergedProps = props;
|
|
1895
|
+
if (props.theme == null) {
|
|
1896
|
+
mergedProps = {};
|
|
1897
|
+
for (var key in props) {
|
|
1898
|
+
mergedProps[key] = props[key];
|
|
1899
|
+
}
|
|
1900
|
+
mergedProps.theme = React2__namespace.useContext(ThemeContext);
|
|
1901
|
+
}
|
|
1902
|
+
if (typeof props.className === "string") {
|
|
1903
|
+
className = getRegisteredStyles(cache.registered, classInterpolations, props.className);
|
|
1904
|
+
} else if (props.className != null) {
|
|
1905
|
+
className = props.className + " ";
|
|
1906
|
+
}
|
|
1907
|
+
var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);
|
|
1908
|
+
className += cache.key + "-" + serialized.name;
|
|
1909
|
+
if (targetClassName !== void 0) {
|
|
1910
|
+
className += " " + targetClassName;
|
|
1911
|
+
}
|
|
1912
|
+
var finalShouldForwardProp = shouldUseAs && shouldForwardProp === void 0 ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;
|
|
1913
|
+
var newProps = {};
|
|
1914
|
+
for (var _key in props) {
|
|
1915
|
+
if (shouldUseAs && _key === "as") continue;
|
|
1916
|
+
if (finalShouldForwardProp(_key)) {
|
|
1917
|
+
newProps[_key] = props[_key];
|
|
1918
|
+
}
|
|
1919
|
+
}
|
|
1920
|
+
newProps.className = className;
|
|
1921
|
+
if (ref) {
|
|
1922
|
+
newProps.ref = ref;
|
|
1923
|
+
}
|
|
1924
|
+
return /* @__PURE__ */ React2__namespace.createElement(React2__namespace.Fragment, null, /* @__PURE__ */ React2__namespace.createElement(Insertion3, {
|
|
1925
|
+
cache,
|
|
1926
|
+
serialized,
|
|
1927
|
+
isStringTag: typeof FinalTag === "string"
|
|
1928
|
+
}), /* @__PURE__ */ React2__namespace.createElement(FinalTag, newProps));
|
|
1929
|
+
});
|
|
1930
|
+
Styled.displayName = identifierName !== void 0 ? identifierName : "Styled(" + (typeof baseTag === "string" ? baseTag : baseTag.displayName || baseTag.name || "Component") + ")";
|
|
1931
|
+
Styled.defaultProps = tag.defaultProps;
|
|
1932
|
+
Styled.__emotion_real = Styled;
|
|
1933
|
+
Styled.__emotion_base = baseTag;
|
|
1934
|
+
Styled.__emotion_styles = styles;
|
|
1935
|
+
Styled.__emotion_forwardProp = shouldForwardProp;
|
|
1936
|
+
Object.defineProperty(Styled, "toString", {
|
|
1937
|
+
value: function value() {
|
|
1938
|
+
return "." + targetClassName;
|
|
1939
|
+
}
|
|
1940
|
+
});
|
|
1941
|
+
Styled.withComponent = function(nextTag, nextOptions) {
|
|
1942
|
+
var newStyled = createStyled2(nextTag, _extends({}, options, nextOptions, {
|
|
1943
|
+
shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)
|
|
1944
|
+
}));
|
|
1945
|
+
return newStyled.apply(void 0, styles);
|
|
1946
|
+
};
|
|
1947
|
+
return Styled;
|
|
1948
|
+
};
|
|
1949
|
+
};
|
|
1950
|
+
|
|
1951
|
+
// ../node_modules/@emotion/styled/dist/emotion-styled.esm.js
|
|
1952
|
+
__toESM(require_extends());
|
|
1953
|
+
var tags = [
|
|
1954
|
+
"a",
|
|
1955
|
+
"abbr",
|
|
1956
|
+
"address",
|
|
1957
|
+
"area",
|
|
1958
|
+
"article",
|
|
1959
|
+
"aside",
|
|
1960
|
+
"audio",
|
|
1961
|
+
"b",
|
|
1962
|
+
"base",
|
|
1963
|
+
"bdi",
|
|
1964
|
+
"bdo",
|
|
1965
|
+
"big",
|
|
1966
|
+
"blockquote",
|
|
1967
|
+
"body",
|
|
1968
|
+
"br",
|
|
1969
|
+
"button",
|
|
1970
|
+
"canvas",
|
|
1971
|
+
"caption",
|
|
1972
|
+
"cite",
|
|
1973
|
+
"code",
|
|
1974
|
+
"col",
|
|
1975
|
+
"colgroup",
|
|
1976
|
+
"data",
|
|
1977
|
+
"datalist",
|
|
1978
|
+
"dd",
|
|
1979
|
+
"del",
|
|
1980
|
+
"details",
|
|
1981
|
+
"dfn",
|
|
1982
|
+
"dialog",
|
|
1983
|
+
"div",
|
|
1984
|
+
"dl",
|
|
1985
|
+
"dt",
|
|
1986
|
+
"em",
|
|
1987
|
+
"embed",
|
|
1988
|
+
"fieldset",
|
|
1989
|
+
"figcaption",
|
|
1990
|
+
"figure",
|
|
1991
|
+
"footer",
|
|
1992
|
+
"form",
|
|
1993
|
+
"h1",
|
|
1994
|
+
"h2",
|
|
1995
|
+
"h3",
|
|
1996
|
+
"h4",
|
|
1997
|
+
"h5",
|
|
1998
|
+
"h6",
|
|
1999
|
+
"head",
|
|
2000
|
+
"header",
|
|
2001
|
+
"hgroup",
|
|
2002
|
+
"hr",
|
|
2003
|
+
"html",
|
|
2004
|
+
"i",
|
|
2005
|
+
"iframe",
|
|
2006
|
+
"img",
|
|
2007
|
+
"input",
|
|
2008
|
+
"ins",
|
|
2009
|
+
"kbd",
|
|
2010
|
+
"keygen",
|
|
2011
|
+
"label",
|
|
2012
|
+
"legend",
|
|
2013
|
+
"li",
|
|
2014
|
+
"link",
|
|
2015
|
+
"main",
|
|
2016
|
+
"map",
|
|
2017
|
+
"mark",
|
|
2018
|
+
"marquee",
|
|
2019
|
+
"menu",
|
|
2020
|
+
"menuitem",
|
|
2021
|
+
"meta",
|
|
2022
|
+
"meter",
|
|
2023
|
+
"nav",
|
|
2024
|
+
"noscript",
|
|
2025
|
+
"object",
|
|
2026
|
+
"ol",
|
|
2027
|
+
"optgroup",
|
|
2028
|
+
"option",
|
|
2029
|
+
"output",
|
|
2030
|
+
"p",
|
|
2031
|
+
"param",
|
|
2032
|
+
"picture",
|
|
2033
|
+
"pre",
|
|
2034
|
+
"progress",
|
|
2035
|
+
"q",
|
|
2036
|
+
"rp",
|
|
2037
|
+
"rt",
|
|
2038
|
+
"ruby",
|
|
2039
|
+
"s",
|
|
2040
|
+
"samp",
|
|
2041
|
+
"script",
|
|
2042
|
+
"section",
|
|
2043
|
+
"select",
|
|
2044
|
+
"small",
|
|
2045
|
+
"source",
|
|
2046
|
+
"span",
|
|
2047
|
+
"strong",
|
|
2048
|
+
"style",
|
|
2049
|
+
"sub",
|
|
2050
|
+
"summary",
|
|
2051
|
+
"sup",
|
|
2052
|
+
"table",
|
|
2053
|
+
"tbody",
|
|
2054
|
+
"td",
|
|
2055
|
+
"textarea",
|
|
2056
|
+
"tfoot",
|
|
2057
|
+
"th",
|
|
2058
|
+
"thead",
|
|
2059
|
+
"time",
|
|
2060
|
+
"title",
|
|
2061
|
+
"tr",
|
|
2062
|
+
"track",
|
|
2063
|
+
"u",
|
|
2064
|
+
"ul",
|
|
2065
|
+
"var",
|
|
2066
|
+
"video",
|
|
2067
|
+
"wbr",
|
|
2068
|
+
// SVG
|
|
2069
|
+
"circle",
|
|
2070
|
+
"clipPath",
|
|
2071
|
+
"defs",
|
|
2072
|
+
"ellipse",
|
|
2073
|
+
"foreignObject",
|
|
2074
|
+
"g",
|
|
2075
|
+
"image",
|
|
2076
|
+
"line",
|
|
2077
|
+
"linearGradient",
|
|
2078
|
+
"mask",
|
|
2079
|
+
"path",
|
|
2080
|
+
"pattern",
|
|
2081
|
+
"polygon",
|
|
2082
|
+
"polyline",
|
|
2083
|
+
"radialGradient",
|
|
2084
|
+
"rect",
|
|
2085
|
+
"stop",
|
|
2086
|
+
"svg",
|
|
2087
|
+
"text",
|
|
2088
|
+
"tspan"
|
|
2089
|
+
];
|
|
2090
|
+
var styled = createStyled.bind(null);
|
|
2091
|
+
tags.forEach(function(tagName) {
|
|
2092
|
+
styled[tagName] = styled(tagName);
|
|
2093
|
+
});
|
|
2094
|
+
|
|
83
2095
|
// src/styles/theme.ts
|
|
84
2096
|
var theme = {
|
|
85
2097
|
colors: {
|
|
@@ -188,7 +2200,7 @@ var theme = {
|
|
|
188
2200
|
// 32px
|
|
189
2201
|
}
|
|
190
2202
|
};
|
|
191
|
-
var
|
|
2203
|
+
var keyframes2 = {
|
|
192
2204
|
spin: `
|
|
193
2205
|
from {
|
|
194
2206
|
transform: rotate(0deg);
|
|
@@ -200,15 +2212,15 @@ var keyframes = {
|
|
|
200
2212
|
};
|
|
201
2213
|
|
|
202
2214
|
// src/components/atoms/styled.ts
|
|
203
|
-
var spinAnimation =
|
|
204
|
-
var AuthContainerWrapper =
|
|
2215
|
+
var spinAnimation = keyframes`${keyframes2.spin}`;
|
|
2216
|
+
var AuthContainerWrapper = styled.div`
|
|
205
2217
|
width: 100%;
|
|
206
2218
|
max-width: 400px;
|
|
207
2219
|
border-radius: ${theme.radius.xl};
|
|
208
2220
|
overflow: hidden;
|
|
209
2221
|
box-shadow: ${theme.shadow.lg};
|
|
210
2222
|
`;
|
|
211
|
-
var AuthCard =
|
|
2223
|
+
var AuthCard = styled.div`
|
|
212
2224
|
background-color: ${theme.colors.bgWhite};
|
|
213
2225
|
padding: ${theme.spacing[6]};
|
|
214
2226
|
display: flex;
|
|
@@ -217,14 +2229,14 @@ var AuthCard = styled__default.default.div`
|
|
|
217
2229
|
align-items: stretch;
|
|
218
2230
|
gap: ${theme.spacing[6]};
|
|
219
2231
|
`;
|
|
220
|
-
var AuthHeaderWrapper =
|
|
2232
|
+
var AuthHeaderWrapper = styled.div`
|
|
221
2233
|
display: flex;
|
|
222
2234
|
flex-direction: column;
|
|
223
2235
|
justify-content: flex-start;
|
|
224
2236
|
align-items: flex-start;
|
|
225
2237
|
gap: ${theme.spacing[2]};
|
|
226
2238
|
`;
|
|
227
|
-
var AuthHeaderTitle =
|
|
2239
|
+
var AuthHeaderTitle = styled.h1`
|
|
228
2240
|
font-size: ${theme.fontSize["2xl"]};
|
|
229
2241
|
font-weight: ${theme.fontWeight.semibold};
|
|
230
2242
|
color: ${theme.colors.text};
|
|
@@ -232,7 +2244,7 @@ var AuthHeaderTitle = styled__default.default.h1`
|
|
|
232
2244
|
margin: 0;
|
|
233
2245
|
font-family: ${theme.fontFamily.base};
|
|
234
2246
|
`;
|
|
235
|
-
var AuthHeaderSubtitle =
|
|
2247
|
+
var AuthHeaderSubtitle = styled.p`
|
|
236
2248
|
font-size: ${theme.fontSize.sm};
|
|
237
2249
|
font-weight: ${theme.fontWeight.normal};
|
|
238
2250
|
color: ${theme.colors.textSecondary};
|
|
@@ -240,21 +2252,21 @@ var AuthHeaderSubtitle = styled__default.default.p`
|
|
|
240
2252
|
margin: 0;
|
|
241
2253
|
font-family: ${theme.fontFamily.base};
|
|
242
2254
|
`;
|
|
243
|
-
var FormFieldWrapper =
|
|
2255
|
+
var FormFieldWrapper = styled.div`
|
|
244
2256
|
display: flex;
|
|
245
2257
|
flex-direction: column;
|
|
246
2258
|
justify-content: center;
|
|
247
2259
|
align-items: stretch;
|
|
248
2260
|
gap: ${theme.spacing[1]};
|
|
249
2261
|
`;
|
|
250
|
-
var FormFieldLabel =
|
|
2262
|
+
var FormFieldLabel = styled.label`
|
|
251
2263
|
font-size: ${theme.fontSize.sm};
|
|
252
2264
|
font-weight: ${theme.fontWeight.normal};
|
|
253
2265
|
color: ${theme.colors.text};
|
|
254
2266
|
line-height: ${theme.lineHeight.relaxed};
|
|
255
2267
|
font-family: ${theme.fontFamily.base};
|
|
256
2268
|
`;
|
|
257
|
-
var FormFieldInput =
|
|
2269
|
+
var FormFieldInput = styled.input`
|
|
258
2270
|
width: 100%;
|
|
259
2271
|
display: flex;
|
|
260
2272
|
align-items: center;
|
|
@@ -282,26 +2294,26 @@ var FormFieldInput = styled__default.default.input`
|
|
|
282
2294
|
border-color: ${theme.colors.borderFocus};
|
|
283
2295
|
}
|
|
284
2296
|
`;
|
|
285
|
-
var PasswordFieldWrapper =
|
|
2297
|
+
var PasswordFieldWrapper = styled.div`
|
|
286
2298
|
display: flex;
|
|
287
2299
|
flex-direction: column;
|
|
288
2300
|
justify-content: center;
|
|
289
2301
|
align-items: stretch;
|
|
290
2302
|
gap: ${theme.spacing[1]};
|
|
291
2303
|
`;
|
|
292
|
-
var PasswordFieldLabelRow =
|
|
2304
|
+
var PasswordFieldLabelRow = styled.div`
|
|
293
2305
|
display: flex;
|
|
294
2306
|
justify-content: space-between;
|
|
295
2307
|
align-items: center;
|
|
296
2308
|
`;
|
|
297
|
-
var PasswordFieldLabel =
|
|
2309
|
+
var PasswordFieldLabel = styled.label`
|
|
298
2310
|
font-size: ${theme.fontSize.sm};
|
|
299
2311
|
font-weight: ${theme.fontWeight.normal};
|
|
300
2312
|
color: ${theme.colors.text};
|
|
301
2313
|
line-height: ${theme.lineHeight.relaxed};
|
|
302
2314
|
font-family: ${theme.fontFamily.base};
|
|
303
2315
|
`;
|
|
304
|
-
var PasswordFieldForgotLink =
|
|
2316
|
+
var PasswordFieldForgotLink = styled.a`
|
|
305
2317
|
font-size: ${theme.fontSize.sm};
|
|
306
2318
|
font-weight: ${theme.fontWeight.normal};
|
|
307
2319
|
color: ${theme.colors.textSecondary};
|
|
@@ -310,11 +2322,11 @@ var PasswordFieldForgotLink = styled__default.default.a`
|
|
|
310
2322
|
font-family: ${theme.fontFamily.base};
|
|
311
2323
|
cursor: pointer;
|
|
312
2324
|
`;
|
|
313
|
-
var PasswordFieldInputWrapper =
|
|
2325
|
+
var PasswordFieldInputWrapper = styled.div`
|
|
314
2326
|
position: relative;
|
|
315
2327
|
width: 100%;
|
|
316
2328
|
`;
|
|
317
|
-
var PasswordFieldInput =
|
|
2329
|
+
var PasswordFieldInput = styled.input`
|
|
318
2330
|
width: 100%;
|
|
319
2331
|
display: flex;
|
|
320
2332
|
align-items: center;
|
|
@@ -340,7 +2352,7 @@ var PasswordFieldInput = styled__default.default.input`
|
|
|
340
2352
|
border-color: ${theme.colors.borderFocus};
|
|
341
2353
|
}
|
|
342
2354
|
`;
|
|
343
|
-
var PasswordFieldToggleButton =
|
|
2355
|
+
var PasswordFieldToggleButton = styled.button`
|
|
344
2356
|
position: absolute;
|
|
345
2357
|
right: ${theme.spacing[1]};
|
|
346
2358
|
top: 50%;
|
|
@@ -355,7 +2367,7 @@ var PasswordFieldToggleButton = styled__default.default.button`
|
|
|
355
2367
|
color: ${theme.colors.textSecondary};
|
|
356
2368
|
transition: color ${theme.transition.fast};
|
|
357
2369
|
`;
|
|
358
|
-
var SubmitButton =
|
|
2370
|
+
var SubmitButton = styled.button`
|
|
359
2371
|
border-radius: ${theme.radius.sm};
|
|
360
2372
|
background-color: ${theme.colors.primary};
|
|
361
2373
|
height: ${theme.sizes.button.height};
|
|
@@ -385,7 +2397,7 @@ var SubmitButton = styled__default.default.button`
|
|
|
385
2397
|
cursor: not-allowed;
|
|
386
2398
|
}
|
|
387
2399
|
`;
|
|
388
|
-
var SubmitButtonIcon =
|
|
2400
|
+
var SubmitButtonIcon = styled.div`
|
|
389
2401
|
width: ${theme.sizes.icon};
|
|
390
2402
|
height: ${theme.sizes.icon};
|
|
391
2403
|
display: flex;
|
|
@@ -397,7 +2409,7 @@ var SubmitButtonIcon = styled__default.default.div`
|
|
|
397
2409
|
height: 100%;
|
|
398
2410
|
}
|
|
399
2411
|
`;
|
|
400
|
-
var SubmitButtonSpinner =
|
|
2412
|
+
var SubmitButtonSpinner = styled.div`
|
|
401
2413
|
width: ${theme.sizes.icon};
|
|
402
2414
|
height: ${theme.sizes.icon};
|
|
403
2415
|
display: flex;
|
|
@@ -410,7 +2422,7 @@ var SubmitButtonSpinner = styled__default.default.div`
|
|
|
410
2422
|
height: 100%;
|
|
411
2423
|
}
|
|
412
2424
|
`;
|
|
413
|
-
var OAuthButton =
|
|
2425
|
+
var OAuthButton = styled.button`
|
|
414
2426
|
display: flex;
|
|
415
2427
|
width: 100%;
|
|
416
2428
|
height: ${theme.sizes.button.heightOAuth};
|
|
@@ -442,7 +2454,7 @@ var OAuthButton = styled__default.default.button`
|
|
|
442
2454
|
cursor: not-allowed;
|
|
443
2455
|
}
|
|
444
2456
|
`;
|
|
445
|
-
var OAuthButtonIcon =
|
|
2457
|
+
var OAuthButtonIcon = styled.div`
|
|
446
2458
|
display: flex;
|
|
447
2459
|
align-items: center;
|
|
448
2460
|
justify-content: center;
|
|
@@ -455,13 +2467,13 @@ var OAuthButtonIcon = styled__default.default.div`
|
|
|
455
2467
|
height: 100%;
|
|
456
2468
|
}
|
|
457
2469
|
`;
|
|
458
|
-
var OAuthProvidersContainer =
|
|
2470
|
+
var OAuthProvidersContainer = styled.div`
|
|
459
2471
|
display: flex;
|
|
460
2472
|
flex-direction: column;
|
|
461
2473
|
gap: ${theme.spacing[3]};
|
|
462
2474
|
width: 100%;
|
|
463
2475
|
`;
|
|
464
|
-
var AuthLinkWrapper =
|
|
2476
|
+
var AuthLinkWrapper = styled.div`
|
|
465
2477
|
display: flex;
|
|
466
2478
|
justify-content: center;
|
|
467
2479
|
align-items: center;
|
|
@@ -470,45 +2482,45 @@ var AuthLinkWrapper = styled__default.default.div`
|
|
|
470
2482
|
color: ${theme.colors.textSecondary};
|
|
471
2483
|
font-family: ${theme.fontFamily.base};
|
|
472
2484
|
`;
|
|
473
|
-
var AuthLinkText =
|
|
2485
|
+
var AuthLinkText = styled.span`
|
|
474
2486
|
font-weight: ${theme.fontWeight.normal};
|
|
475
2487
|
`;
|
|
476
|
-
var AuthLinkLink =
|
|
2488
|
+
var AuthLinkLink = styled.a`
|
|
477
2489
|
font-weight: ${theme.fontWeight.semibold};
|
|
478
2490
|
color: ${theme.colors.text};
|
|
479
2491
|
text-decoration: none;
|
|
480
2492
|
transition: opacity ${theme.transition.fast};
|
|
481
2493
|
cursor: pointer;
|
|
482
2494
|
`;
|
|
483
|
-
var AuthDividerWrapper =
|
|
2495
|
+
var AuthDividerWrapper = styled.div`
|
|
484
2496
|
display: flex;
|
|
485
2497
|
align-items: center;
|
|
486
2498
|
text-align: center;
|
|
487
2499
|
width: 100%;
|
|
488
2500
|
gap: ${theme.spacing[3]};
|
|
489
2501
|
`;
|
|
490
|
-
var AuthDividerLine =
|
|
2502
|
+
var AuthDividerLine = styled.div`
|
|
491
2503
|
flex: 1;
|
|
492
2504
|
border-top: 1px solid ${theme.colors.border};
|
|
493
2505
|
`;
|
|
494
|
-
var AuthDividerText =
|
|
2506
|
+
var AuthDividerText = styled.span`
|
|
495
2507
|
font-size: ${theme.fontSize.sm};
|
|
496
2508
|
color: ${theme.colors.textSecondary};
|
|
497
2509
|
font-weight: ${theme.fontWeight.normal};
|
|
498
2510
|
font-family: ${theme.fontFamily.manrope};
|
|
499
2511
|
`;
|
|
500
|
-
var ErrorBannerWrapper =
|
|
2512
|
+
var ErrorBannerWrapper = styled.div`
|
|
501
2513
|
padding: ${theme.spacing[3]};
|
|
502
2514
|
background-color: ${theme.colors.errorBg};
|
|
503
2515
|
border-radius: ${theme.radius.md};
|
|
504
2516
|
border: 1px solid ${theme.colors.error};
|
|
505
2517
|
`;
|
|
506
|
-
var ErrorBannerContent =
|
|
2518
|
+
var ErrorBannerContent = styled.div`
|
|
507
2519
|
display: flex;
|
|
508
2520
|
align-items: center;
|
|
509
2521
|
gap: ${theme.spacing[2]};
|
|
510
2522
|
`;
|
|
511
|
-
var ErrorBannerIcon =
|
|
2523
|
+
var ErrorBannerIcon = styled.div`
|
|
512
2524
|
width: ${theme.sizes.iconLg};
|
|
513
2525
|
height: ${theme.sizes.iconLg};
|
|
514
2526
|
flex-shrink: 0;
|
|
@@ -522,14 +2534,14 @@ var ErrorBannerIcon = styled__default.default.div`
|
|
|
522
2534
|
height: 100%;
|
|
523
2535
|
}
|
|
524
2536
|
`;
|
|
525
|
-
var ErrorBannerText =
|
|
2537
|
+
var ErrorBannerText = styled.p`
|
|
526
2538
|
font-size: ${theme.fontSize.sm};
|
|
527
2539
|
color: ${theme.colors.error};
|
|
528
2540
|
font-weight: ${theme.fontWeight.normal};
|
|
529
2541
|
font-family: ${theme.fontFamily.base};
|
|
530
2542
|
margin: 0;
|
|
531
2543
|
`;
|
|
532
|
-
var AuthBrandingWrapper =
|
|
2544
|
+
var AuthBrandingWrapper = styled.div`
|
|
533
2545
|
background-color: ${theme.colors.bgLight};
|
|
534
2546
|
padding: ${theme.spacing[4]} ${theme.spacing[2]};
|
|
535
2547
|
display: flex;
|
|
@@ -538,19 +2550,19 @@ var AuthBrandingWrapper = styled__default.default.div`
|
|
|
538
2550
|
align-items: center;
|
|
539
2551
|
gap: ${theme.spacing[1]};
|
|
540
2552
|
`;
|
|
541
|
-
var AuthBrandingText =
|
|
2553
|
+
var AuthBrandingText = styled.p`
|
|
542
2554
|
font-size: ${theme.fontSize.xs};
|
|
543
2555
|
font-weight: ${theme.fontWeight.medium};
|
|
544
2556
|
color: ${theme.colors.text};
|
|
545
2557
|
font-family: ${theme.fontFamily.manrope};
|
|
546
2558
|
margin: 0;
|
|
547
2559
|
`;
|
|
548
|
-
var VerificationCodeInputContainer =
|
|
2560
|
+
var VerificationCodeInputContainer = styled.div`
|
|
549
2561
|
display: flex;
|
|
550
2562
|
gap: ${theme.spacing[3]};
|
|
551
2563
|
justify-content: center;
|
|
552
2564
|
`;
|
|
553
|
-
var VerificationCodeInput =
|
|
2565
|
+
var VerificationCodeInput = styled.input`
|
|
554
2566
|
width: ${theme.sizes.verifyCode};
|
|
555
2567
|
height: ${theme.sizes.verifyCode};
|
|
556
2568
|
text-align: center;
|
|
@@ -566,21 +2578,21 @@ var VerificationCodeInput = styled__default.default.input`
|
|
|
566
2578
|
border-color: ${theme.colors.borderFocus};
|
|
567
2579
|
}
|
|
568
2580
|
`;
|
|
569
|
-
var PasswordStrengthWrapper =
|
|
2581
|
+
var PasswordStrengthWrapper = styled.div`
|
|
570
2582
|
margin-top: ${theme.spacing[2]};
|
|
571
2583
|
`;
|
|
572
|
-
|
|
2584
|
+
styled.div`
|
|
573
2585
|
height: 100%;
|
|
574
2586
|
transition:
|
|
575
2587
|
width ${theme.transition.base},
|
|
576
2588
|
background-color ${theme.transition.base};
|
|
577
2589
|
`;
|
|
578
|
-
|
|
2590
|
+
styled.span`
|
|
579
2591
|
font-size: ${theme.fontSize.xs};
|
|
580
2592
|
color: ${theme.colors.textSecondary};
|
|
581
2593
|
font-family: ${theme.fontFamily.base};
|
|
582
2594
|
`;
|
|
583
|
-
var PasswordStrengthRequirements =
|
|
2595
|
+
var PasswordStrengthRequirements = styled.div`
|
|
584
2596
|
display: flex;
|
|
585
2597
|
flex-direction: column;
|
|
586
2598
|
gap: ${theme.spacing[2]};
|
|
@@ -588,7 +2600,7 @@ var PasswordStrengthRequirements = styled__default.default.div`
|
|
|
588
2600
|
color: ${theme.colors.textGray};
|
|
589
2601
|
font-family: ${theme.fontFamily.base};
|
|
590
2602
|
`;
|
|
591
|
-
var PasswordStrengthRequirement =
|
|
2603
|
+
var PasswordStrengthRequirement = styled.div`
|
|
592
2604
|
display: flex;
|
|
593
2605
|
align-items: center;
|
|
594
2606
|
gap: ${theme.spacing[2]};
|
|
@@ -785,9 +2797,9 @@ function AuthPasswordField({
|
|
|
785
2797
|
}) {
|
|
786
2798
|
const searchParams = useSearchParams();
|
|
787
2799
|
const { Link } = useNavigationAdapter();
|
|
788
|
-
const [showPassword, setShowPassword] =
|
|
789
|
-
const [showStrength, setShowStrength] =
|
|
790
|
-
const resolvedForgotPasswordHref =
|
|
2800
|
+
const [showPassword, setShowPassword] = React2.useState(false);
|
|
2801
|
+
const [showStrength, setShowStrength] = React2.useState(false);
|
|
2802
|
+
const resolvedForgotPasswordHref = React2.useMemo(
|
|
791
2803
|
() => forgotPasswordLink ? resolveAuthUrl(forgotPasswordLink.href, searchParams) : void 0,
|
|
792
2804
|
[forgotPasswordLink, searchParams]
|
|
793
2805
|
);
|
|
@@ -1107,13 +3119,13 @@ function AuthOAuthProviders({
|
|
|
1107
3119
|
);
|
|
1108
3120
|
}
|
|
1109
3121
|
function AuthVerificationCodeInput({
|
|
1110
|
-
length = 6,
|
|
3122
|
+
length: length2 = 6,
|
|
1111
3123
|
value,
|
|
1112
3124
|
onChange,
|
|
1113
3125
|
disabled = false,
|
|
1114
3126
|
onComplete
|
|
1115
3127
|
}) {
|
|
1116
|
-
const inputRefs =
|
|
3128
|
+
const inputRefs = React2.useRef([]);
|
|
1117
3129
|
const handleChange = (index, digit) => {
|
|
1118
3130
|
if (digit.length > 1) {
|
|
1119
3131
|
return;
|
|
@@ -1125,10 +3137,10 @@ function AuthVerificationCodeInput({
|
|
|
1125
3137
|
newValue[index] = digit;
|
|
1126
3138
|
const updatedValue = newValue.join("");
|
|
1127
3139
|
onChange(updatedValue);
|
|
1128
|
-
if (digit && index <
|
|
3140
|
+
if (digit && index < length2 - 1) {
|
|
1129
3141
|
inputRefs.current[index + 1]?.focus();
|
|
1130
3142
|
}
|
|
1131
|
-
if (digit && index ===
|
|
3143
|
+
if (digit && index === length2 - 1 && updatedValue.length === length2 && onComplete) {
|
|
1132
3144
|
onComplete(updatedValue);
|
|
1133
3145
|
}
|
|
1134
3146
|
};
|
|
@@ -1141,22 +3153,22 @@ function AuthVerificationCodeInput({
|
|
|
1141
3153
|
}
|
|
1142
3154
|
} else if (e.key === "ArrowLeft" && index > 0) {
|
|
1143
3155
|
inputRefs.current[index - 1]?.focus();
|
|
1144
|
-
} else if (e.key === "ArrowRight" && index <
|
|
3156
|
+
} else if (e.key === "ArrowRight" && index < length2 - 1) {
|
|
1145
3157
|
inputRefs.current[index + 1]?.focus();
|
|
1146
3158
|
}
|
|
1147
3159
|
};
|
|
1148
3160
|
const handlePaste = (e) => {
|
|
1149
3161
|
e.preventDefault();
|
|
1150
3162
|
const pastedData = e.clipboardData.getData("text/plain").trim();
|
|
1151
|
-
if (/^\d+$/.test(pastedData) && pastedData.length ===
|
|
3163
|
+
if (/^\d+$/.test(pastedData) && pastedData.length === length2) {
|
|
1152
3164
|
onChange(pastedData);
|
|
1153
|
-
inputRefs.current[
|
|
3165
|
+
inputRefs.current[length2 - 1]?.focus();
|
|
1154
3166
|
if (onComplete) {
|
|
1155
3167
|
onComplete(pastedData);
|
|
1156
3168
|
}
|
|
1157
3169
|
}
|
|
1158
3170
|
};
|
|
1159
|
-
return /* @__PURE__ */ jsxRuntime.jsx(VerificationCodeInputContainer, { children: Array.from({ length }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3171
|
+
return /* @__PURE__ */ jsxRuntime.jsx(VerificationCodeInputContainer, { children: Array.from({ length: length2 }).map((_, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1160
3172
|
VerificationCodeInput,
|
|
1161
3173
|
{
|
|
1162
3174
|
ref: (el) => {
|
|
@@ -1175,20 +3187,22 @@ function AuthVerificationCodeInput({
|
|
|
1175
3187
|
index
|
|
1176
3188
|
)) });
|
|
1177
3189
|
}
|
|
1178
|
-
|
|
3190
|
+
|
|
3191
|
+
// src/components/forms/styled.ts
|
|
3192
|
+
styled.form`
|
|
1179
3193
|
display: flex;
|
|
1180
3194
|
flex-direction: column;
|
|
1181
3195
|
align-items: stretch;
|
|
1182
3196
|
justify-content: center;
|
|
1183
3197
|
gap: ${theme.spacing[6]};
|
|
1184
3198
|
`;
|
|
1185
|
-
var VerificationStepWrapper =
|
|
3199
|
+
var VerificationStepWrapper = styled.div`
|
|
1186
3200
|
display: flex;
|
|
1187
3201
|
flex-direction: column;
|
|
1188
3202
|
gap: ${theme.spacing[6]};
|
|
1189
3203
|
align-items: stretch;
|
|
1190
3204
|
`;
|
|
1191
|
-
var VerificationStepDescriptionContainer =
|
|
3205
|
+
var VerificationStepDescriptionContainer = styled.div`
|
|
1192
3206
|
width: 100%;
|
|
1193
3207
|
background-color: ${theme.colors.bgGray};
|
|
1194
3208
|
border-radius: ${theme.radius.lg};
|
|
@@ -1197,7 +3211,7 @@ var VerificationStepDescriptionContainer = styled__default.default.div`
|
|
|
1197
3211
|
flex-direction: column;
|
|
1198
3212
|
gap: ${theme.spacing[3]};
|
|
1199
3213
|
`;
|
|
1200
|
-
var VerificationStepDescriptionTitle =
|
|
3214
|
+
var VerificationStepDescriptionTitle = styled.h3`
|
|
1201
3215
|
color: ${theme.colors.black};
|
|
1202
3216
|
font-family: ${theme.fontFamily.base};
|
|
1203
3217
|
font-size: ${theme.fontSize.base};
|
|
@@ -1206,43 +3220,43 @@ var VerificationStepDescriptionTitle = styled__default.default.h3`
|
|
|
1206
3220
|
line-height: 24px;
|
|
1207
3221
|
margin: 0;
|
|
1208
3222
|
`;
|
|
1209
|
-
var VerificationStepDescription =
|
|
3223
|
+
var VerificationStepDescription = styled.p`
|
|
1210
3224
|
font-size: ${theme.fontSize.sm};
|
|
1211
3225
|
color: ${theme.colors.textGray};
|
|
1212
3226
|
text-align: left;
|
|
1213
3227
|
font-family: ${theme.fontFamily.base};
|
|
1214
3228
|
margin: 0;
|
|
1215
3229
|
`;
|
|
1216
|
-
var VerificationEmail =
|
|
3230
|
+
var VerificationEmail = styled.span`
|
|
1217
3231
|
font-weight: ${theme.fontWeight.medium};
|
|
1218
3232
|
color: ${theme.colors.text};
|
|
1219
3233
|
`;
|
|
1220
|
-
var VerificationStepCodeContainer =
|
|
3234
|
+
var VerificationStepCodeContainer = styled.div`
|
|
1221
3235
|
width: 100%;
|
|
1222
3236
|
display: flex;
|
|
1223
3237
|
flex-direction: column;
|
|
1224
3238
|
gap: ${theme.spacing[10]};
|
|
1225
3239
|
`;
|
|
1226
|
-
var VerificationStepCodeInputWrapper =
|
|
3240
|
+
var VerificationStepCodeInputWrapper = styled.div`
|
|
1227
3241
|
display: flex;
|
|
1228
3242
|
flex-direction: column;
|
|
1229
3243
|
gap: ${theme.spacing[6]};
|
|
1230
3244
|
`;
|
|
1231
|
-
|
|
3245
|
+
styled.p`
|
|
1232
3246
|
font-size: ${theme.fontSize.sm};
|
|
1233
3247
|
color: ${theme.colors.textSecondary};
|
|
1234
3248
|
text-align: center;
|
|
1235
3249
|
font-family: ${theme.fontFamily.base};
|
|
1236
3250
|
margin: 0;
|
|
1237
3251
|
`;
|
|
1238
|
-
var VerificationStepResendContainer =
|
|
3252
|
+
var VerificationStepResendContainer = styled.div`
|
|
1239
3253
|
width: 100%;
|
|
1240
3254
|
font-size: ${theme.fontSize.sm};
|
|
1241
3255
|
text-align: center;
|
|
1242
3256
|
color: ${theme.colors.textSecondary};
|
|
1243
3257
|
font-family: ${theme.fontFamily.base};
|
|
1244
3258
|
`;
|
|
1245
|
-
var VerificationStepResendButton =
|
|
3259
|
+
var VerificationStepResendButton = styled.button`
|
|
1246
3260
|
color: ${theme.colors.text};
|
|
1247
3261
|
font-weight: ${theme.fontWeight.medium};
|
|
1248
3262
|
transition: all ${theme.transition.base};
|
|
@@ -1261,7 +3275,7 @@ var VerificationStepResendButton = styled__default.default.button`
|
|
|
1261
3275
|
opacity: 0.5;
|
|
1262
3276
|
}
|
|
1263
3277
|
`;
|
|
1264
|
-
var VerifyStatusContainer =
|
|
3278
|
+
var VerifyStatusContainer = styled.div`
|
|
1265
3279
|
width: 100%;
|
|
1266
3280
|
display: flex;
|
|
1267
3281
|
flex-direction: column;
|
|
@@ -1269,19 +3283,19 @@ var VerifyStatusContainer = styled__default.default.div`
|
|
|
1269
3283
|
justify-content: center;
|
|
1270
3284
|
gap: ${theme.spacing[6]};
|
|
1271
3285
|
`;
|
|
1272
|
-
var VerifyStatusSpinner =
|
|
3286
|
+
var VerifyStatusSpinner = styled.div`
|
|
1273
3287
|
border-radius: ${theme.radius.full};
|
|
1274
3288
|
height: ${theme.sizes.verifyCode};
|
|
1275
3289
|
width: ${theme.sizes.verifyCode};
|
|
1276
3290
|
border-bottom: 2px solid ${theme.colors.primary};
|
|
1277
3291
|
`;
|
|
1278
|
-
var VerifyStatusSuccessContent =
|
|
3292
|
+
var VerifyStatusSuccessContent = styled.div`
|
|
1279
3293
|
display: flex;
|
|
1280
3294
|
flex-direction: column;
|
|
1281
3295
|
align-items: center;
|
|
1282
3296
|
gap: ${theme.spacing[4]};
|
|
1283
3297
|
`;
|
|
1284
|
-
var VerifyStatusSuccessIcon =
|
|
3298
|
+
var VerifyStatusSuccessIcon = styled.div`
|
|
1285
3299
|
width: ${theme.sizes.verifyIcon};
|
|
1286
3300
|
height: ${theme.sizes.verifyIcon};
|
|
1287
3301
|
border-radius: ${theme.radius.full};
|
|
@@ -1290,7 +3304,7 @@ var VerifyStatusSuccessIcon = styled__default.default.div`
|
|
|
1290
3304
|
align-items: center;
|
|
1291
3305
|
justify-content: center;
|
|
1292
3306
|
`;
|
|
1293
|
-
var VerifyStatusSuccessIconSvg =
|
|
3307
|
+
var VerifyStatusSuccessIconSvg = styled.div`
|
|
1294
3308
|
width: ${theme.sizes.verifyIconInner};
|
|
1295
3309
|
height: ${theme.sizes.verifyIconInner};
|
|
1296
3310
|
color: ${theme.colors.successDark};
|
|
@@ -1303,17 +3317,17 @@ var VerifyStatusSuccessIconSvg = styled__default.default.div`
|
|
|
1303
3317
|
height: 100%;
|
|
1304
3318
|
}
|
|
1305
3319
|
`;
|
|
1306
|
-
var VerifyStatusTextCenter =
|
|
3320
|
+
var VerifyStatusTextCenter = styled.p`
|
|
1307
3321
|
text-align: center;
|
|
1308
3322
|
font-family: ${theme.fontFamily.base};
|
|
1309
3323
|
font-size: ${theme.fontSize.sm};
|
|
1310
3324
|
color: ${theme.colors.text};
|
|
1311
3325
|
margin: 0;
|
|
1312
3326
|
`;
|
|
1313
|
-
|
|
3327
|
+
styled.div`
|
|
1314
3328
|
display: none;
|
|
1315
3329
|
`;
|
|
1316
|
-
|
|
3330
|
+
styled.span`
|
|
1317
3331
|
position: absolute;
|
|
1318
3332
|
width: 1px;
|
|
1319
3333
|
height: 1px;
|
|
@@ -1331,22 +3345,22 @@ function AuthEmailVerificationStep({
|
|
|
1331
3345
|
emailSent = false
|
|
1332
3346
|
}) {
|
|
1333
3347
|
const { sendVerificationEmail } = useInsforge();
|
|
1334
|
-
const [resendDisabled, setResendDisabled] =
|
|
1335
|
-
const [resendCountdown, setResendCountdown] =
|
|
1336
|
-
const [isSending, setIsSending] =
|
|
1337
|
-
const [verificationCode, setVerificationCode] =
|
|
1338
|
-
const [isVerifying, setIsVerifying] =
|
|
3348
|
+
const [resendDisabled, setResendDisabled] = React2.useState(emailSent ? true : false);
|
|
3349
|
+
const [resendCountdown, setResendCountdown] = React2.useState(emailSent ? 60 : 0);
|
|
3350
|
+
const [isSending, setIsSending] = React2.useState(false);
|
|
3351
|
+
const [verificationCode, setVerificationCode] = React2.useState("");
|
|
3352
|
+
const [isVerifying, setIsVerifying] = React2.useState(false);
|
|
1339
3353
|
const isLinkMethod = method === "link";
|
|
1340
3354
|
const displayDescription = isLinkMethod ? "We've sent an email to {email}. Please check your email to confirm your account before signing in. The confirmation link expires in 10 minutes." : "We've sent a verification code to your inbox at {email}. Enter it below to proceed.";
|
|
1341
|
-
|
|
3355
|
+
React2.useEffect(() => {
|
|
1342
3356
|
if (resendDisabled && resendCountdown > 0) {
|
|
1343
3357
|
const timer = setInterval(() => {
|
|
1344
|
-
setResendCountdown((
|
|
1345
|
-
if (
|
|
3358
|
+
setResendCountdown((prev2) => {
|
|
3359
|
+
if (prev2 <= 1) {
|
|
1346
3360
|
setResendDisabled(false);
|
|
1347
3361
|
return 0;
|
|
1348
3362
|
}
|
|
1349
|
-
return
|
|
3363
|
+
return prev2 - 1;
|
|
1350
3364
|
});
|
|
1351
3365
|
}, 1e3);
|
|
1352
3366
|
return () => clearInterval(timer);
|
|
@@ -1435,28 +3449,28 @@ function AuthResetPasswordVerificationStep({
|
|
|
1435
3449
|
onVerifyCode,
|
|
1436
3450
|
onResendEmail
|
|
1437
3451
|
}) {
|
|
1438
|
-
const [resendDisabled, setResendDisabled] =
|
|
1439
|
-
const [resendCountdown, setResendCountdown] =
|
|
1440
|
-
const [isSending, setIsSending] =
|
|
1441
|
-
const [verificationCode, setVerificationCode] =
|
|
1442
|
-
const [isVerifying, setIsVerifying] =
|
|
3452
|
+
const [resendDisabled, setResendDisabled] = React2.useState(true);
|
|
3453
|
+
const [resendCountdown, setResendCountdown] = React2.useState(60);
|
|
3454
|
+
const [isSending, setIsSending] = React2.useState(false);
|
|
3455
|
+
const [verificationCode, setVerificationCode] = React2.useState("");
|
|
3456
|
+
const [isVerifying, setIsVerifying] = React2.useState(false);
|
|
1443
3457
|
const isLinkMethod = method === "link";
|
|
1444
3458
|
const displayDescription = isLinkMethod ? "We have sent an email to {email}. Please check your email to reset your password. The link expires in 10 minutes." : "We've sent a reset password code to your inbox at {email}. Enter it below to proceed.";
|
|
1445
|
-
|
|
3459
|
+
React2.useEffect(() => {
|
|
1446
3460
|
if (resendCountdown > 0) {
|
|
1447
3461
|
const timer = setInterval(() => {
|
|
1448
|
-
setResendCountdown((
|
|
1449
|
-
if (
|
|
3462
|
+
setResendCountdown((prev2) => {
|
|
3463
|
+
if (prev2 <= 1) {
|
|
1450
3464
|
setResendDisabled(false);
|
|
1451
3465
|
return 0;
|
|
1452
3466
|
}
|
|
1453
|
-
return
|
|
3467
|
+
return prev2 - 1;
|
|
1454
3468
|
});
|
|
1455
3469
|
}, 1e3);
|
|
1456
3470
|
return () => clearInterval(timer);
|
|
1457
3471
|
}
|
|
1458
3472
|
}, [resendCountdown]);
|
|
1459
|
-
const handleResend =
|
|
3473
|
+
const handleResend = React2.useCallback(async () => {
|
|
1460
3474
|
setResendDisabled(true);
|
|
1461
3475
|
setResendCountdown(60);
|
|
1462
3476
|
setIsSending(true);
|
|
@@ -1627,12 +3641,12 @@ function SignInForm({
|
|
|
1627
3641
|
function SignIn({ onError, ...uiProps }) {
|
|
1628
3642
|
const { signIn, verifyEmail, loginWithOAuth } = useInsforge();
|
|
1629
3643
|
const { authConfig } = usePublicAuthConfig();
|
|
1630
|
-
const [email, setEmail] =
|
|
1631
|
-
const [password, setPassword] =
|
|
1632
|
-
const [error, setError] =
|
|
1633
|
-
const [loading, setLoading] =
|
|
1634
|
-
const [step, setStep] =
|
|
1635
|
-
const [oauthLoading] =
|
|
3644
|
+
const [email, setEmail] = React2.useState("");
|
|
3645
|
+
const [password, setPassword] = React2.useState("");
|
|
3646
|
+
const [error, setError] = React2.useState("");
|
|
3647
|
+
const [loading, setLoading] = React2.useState(false);
|
|
3648
|
+
const [step, setStep] = React2.useState("form");
|
|
3649
|
+
const [oauthLoading] = React2.useState(null);
|
|
1636
3650
|
const searchParams = useSearchParams();
|
|
1637
3651
|
const redirectUrl = searchParams.get("redirect");
|
|
1638
3652
|
async function handleSubmit(e) {
|
|
@@ -1844,12 +3858,12 @@ createPasswordSchema();
|
|
|
1844
3858
|
function SignUp({ onError, ...uiProps }) {
|
|
1845
3859
|
const { signUp, verifyEmail, loginWithOAuth } = useInsforge();
|
|
1846
3860
|
const { authConfig } = usePublicAuthConfig();
|
|
1847
|
-
const [email, setEmail] =
|
|
1848
|
-
const [password, setPassword] =
|
|
1849
|
-
const [error, setError] =
|
|
1850
|
-
const [loading, setLoading] =
|
|
1851
|
-
const [step, setStep] =
|
|
1852
|
-
const [oauthLoading] =
|
|
3861
|
+
const [email, setEmail] = React2.useState("");
|
|
3862
|
+
const [password, setPassword] = React2.useState("");
|
|
3863
|
+
const [error, setError] = React2.useState("");
|
|
3864
|
+
const [loading, setLoading] = React2.useState(false);
|
|
3865
|
+
const [step, setStep] = React2.useState("form");
|
|
3866
|
+
const [oauthLoading] = React2.useState(null);
|
|
1853
3867
|
const searchParams = useSearchParams();
|
|
1854
3868
|
const redirectUrl = searchParams.get("redirect");
|
|
1855
3869
|
async function handleSubmit(e) {
|
|
@@ -2111,15 +4125,15 @@ function ForgotPassword({ onError, ...uiProps }) {
|
|
|
2111
4125
|
const { sendResetPasswordEmail, exchangeResetPasswordToken, resetPassword } = useInsforge();
|
|
2112
4126
|
const { authConfig } = usePublicAuthConfig();
|
|
2113
4127
|
const searchParams = useSearchParams();
|
|
2114
|
-
const [step, setStep] =
|
|
2115
|
-
const [email, setEmail] =
|
|
2116
|
-
const [resetToken, setResetToken] =
|
|
2117
|
-
const [newPassword, setNewPassword] =
|
|
2118
|
-
const [confirmPassword, setConfirmPassword] =
|
|
2119
|
-
const [error, setError] =
|
|
2120
|
-
const [loading, setLoading] =
|
|
2121
|
-
const [success, setSuccess] =
|
|
2122
|
-
const [showVerificationStep, setShowVerificationStep] =
|
|
4128
|
+
const [step, setStep] = React2.useState("email");
|
|
4129
|
+
const [email, setEmail] = React2.useState("");
|
|
4130
|
+
const [resetToken, setResetToken] = React2.useState("");
|
|
4131
|
+
const [newPassword, setNewPassword] = React2.useState("");
|
|
4132
|
+
const [confirmPassword, setConfirmPassword] = React2.useState("");
|
|
4133
|
+
const [error, setError] = React2.useState("");
|
|
4134
|
+
const [loading, setLoading] = React2.useState(false);
|
|
4135
|
+
const [success, setSuccess] = React2.useState(false);
|
|
4136
|
+
const [showVerificationStep, setShowVerificationStep] = React2.useState(false);
|
|
2123
4137
|
async function handleEmailSubmit(e) {
|
|
2124
4138
|
e.preventDefault();
|
|
2125
4139
|
setLoading(true);
|
|
@@ -2267,14 +4281,14 @@ function ForgotPassword({ onError, ...uiProps }) {
|
|
|
2267
4281
|
}
|
|
2268
4282
|
function ResetPassword({ onError, ...uiProps }) {
|
|
2269
4283
|
const searchParams = useSearchParams();
|
|
2270
|
-
const
|
|
4284
|
+
const token2 = searchParams.get("token");
|
|
2271
4285
|
const { resetPassword } = useInsforge();
|
|
2272
4286
|
const { authConfig } = usePublicAuthConfig();
|
|
2273
|
-
const [newPassword, setNewPassword] =
|
|
2274
|
-
const [confirmPassword, setConfirmPassword] =
|
|
2275
|
-
const [error, setError] =
|
|
2276
|
-
const [loading, setLoading] =
|
|
2277
|
-
const [success, setSuccess] =
|
|
4287
|
+
const [newPassword, setNewPassword] = React2.useState("");
|
|
4288
|
+
const [confirmPassword, setConfirmPassword] = React2.useState("");
|
|
4289
|
+
const [error, setError] = React2.useState("");
|
|
4290
|
+
const [loading, setLoading] = React2.useState(false);
|
|
4291
|
+
const [success, setSuccess] = React2.useState(false);
|
|
2278
4292
|
async function handleSubmit(e) {
|
|
2279
4293
|
e.preventDefault();
|
|
2280
4294
|
setLoading(true);
|
|
@@ -2289,7 +4303,7 @@ function ResetPassword({ onError, ...uiProps }) {
|
|
|
2289
4303
|
setLoading(false);
|
|
2290
4304
|
return;
|
|
2291
4305
|
}
|
|
2292
|
-
if (!
|
|
4306
|
+
if (!token2) {
|
|
2293
4307
|
setError("Reset token is missing");
|
|
2294
4308
|
setLoading(false);
|
|
2295
4309
|
return;
|
|
@@ -2309,7 +4323,7 @@ function ResetPassword({ onError, ...uiProps }) {
|
|
|
2309
4323
|
return;
|
|
2310
4324
|
}
|
|
2311
4325
|
try {
|
|
2312
|
-
const result = await resetPassword(
|
|
4326
|
+
const result = await resetPassword(token2, newPassword);
|
|
2313
4327
|
if (result?.message) {
|
|
2314
4328
|
setSuccess(true);
|
|
2315
4329
|
} else {
|
|
@@ -2332,7 +4346,7 @@ function ResetPassword({ onError, ...uiProps }) {
|
|
|
2332
4346
|
if (!authConfig) {
|
|
2333
4347
|
return null;
|
|
2334
4348
|
}
|
|
2335
|
-
if (!
|
|
4349
|
+
if (!token2) {
|
|
2336
4350
|
return /* @__PURE__ */ jsxRuntime.jsxs(AuthContainer, { children: [
|
|
2337
4351
|
/* @__PURE__ */ jsxRuntime.jsx(AuthHeader, { title: "Invalid Reset Link", subtitle: "" }),
|
|
2338
4352
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2480,13 +4494,13 @@ function VerifyEmailStatus({
|
|
|
2480
4494
|
/* @__PURE__ */ jsxRuntime.jsx(VerifyStatusTextCenter, { style: { color: theme.colors.textSecondary }, children: successMessage })
|
|
2481
4495
|
] }) }) });
|
|
2482
4496
|
}
|
|
2483
|
-
function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
|
|
4497
|
+
function VerifyEmail({ token: token2, onSuccess, onError, ...uiProps }) {
|
|
2484
4498
|
const { verifyEmail } = useInsforge();
|
|
2485
|
-
const [status, setStatus] =
|
|
2486
|
-
const [error, setError] =
|
|
2487
|
-
|
|
4499
|
+
const [status, setStatus] = React2.useState("verifying");
|
|
4500
|
+
const [error, setError] = React2.useState("");
|
|
4501
|
+
React2.useEffect(() => {
|
|
2488
4502
|
const verifyEmailFn = async () => {
|
|
2489
|
-
if (!
|
|
4503
|
+
if (!token2) {
|
|
2490
4504
|
const errorMessage = "Invalid verification link. Missing required token.";
|
|
2491
4505
|
setError(errorMessage);
|
|
2492
4506
|
setStatus("error");
|
|
@@ -2496,7 +4510,7 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
|
|
|
2496
4510
|
return;
|
|
2497
4511
|
}
|
|
2498
4512
|
try {
|
|
2499
|
-
const result = await verifyEmail(
|
|
4513
|
+
const result = await verifyEmail(token2);
|
|
2500
4514
|
if (!result?.accessToken) {
|
|
2501
4515
|
const errorMessage = result ? "Verification succeeded but no access token received" : "Email verification failed";
|
|
2502
4516
|
setError(errorMessage);
|
|
@@ -2524,7 +4538,7 @@ function VerifyEmail({ token, onSuccess, onError, ...uiProps }) {
|
|
|
2524
4538
|
}
|
|
2525
4539
|
};
|
|
2526
4540
|
void verifyEmailFn();
|
|
2527
|
-
}, [
|
|
4541
|
+
}, [token2, verifyEmail, onSuccess, onError]);
|
|
2528
4542
|
return /* @__PURE__ */ jsxRuntime.jsx(VerifyEmailStatus, { status, error, ...uiProps });
|
|
2529
4543
|
}
|
|
2530
4544
|
function SignOutButton({ children, className, afterSignOutUrl = "/" }) {
|
|
@@ -2533,9 +4547,9 @@ function SignOutButton({ children, className, afterSignOutUrl = "/" }) {
|
|
|
2533
4547
|
await signOut();
|
|
2534
4548
|
window.location.href = afterSignOutUrl;
|
|
2535
4549
|
};
|
|
2536
|
-
if (children &&
|
|
4550
|
+
if (children && React2.isValidElement(children)) {
|
|
2537
4551
|
const originalOnClick = children.props?.onClick;
|
|
2538
|
-
return
|
|
4552
|
+
return React2.cloneElement(children, {
|
|
2539
4553
|
onClick: async (e) => {
|
|
2540
4554
|
await handleClick();
|
|
2541
4555
|
if (originalOnClick) {
|
|
@@ -2546,11 +4560,13 @@ function SignOutButton({ children, className, afterSignOutUrl = "/" }) {
|
|
|
2546
4560
|
}
|
|
2547
4561
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className, onClick: () => void handleClick(), children: children || "Sign out" });
|
|
2548
4562
|
}
|
|
2549
|
-
|
|
4563
|
+
|
|
4564
|
+
// src/components/styled.ts
|
|
4565
|
+
var UserButtonContainer = styled.div`
|
|
2550
4566
|
position: relative;
|
|
2551
4567
|
display: inline-block;
|
|
2552
4568
|
`;
|
|
2553
|
-
var UserButtonButton =
|
|
4569
|
+
var UserButtonButton = styled.button`
|
|
2554
4570
|
display: flex;
|
|
2555
4571
|
align-items: center;
|
|
2556
4572
|
justify-content: center;
|
|
@@ -2571,7 +4587,7 @@ var UserButtonButton = styled__default.default.button`
|
|
|
2571
4587
|
`}
|
|
2572
4588
|
}
|
|
2573
4589
|
`;
|
|
2574
|
-
var UserButtonAvatar =
|
|
4590
|
+
var UserButtonAvatar = styled.div`
|
|
2575
4591
|
width: 2rem;
|
|
2576
4592
|
height: 2rem;
|
|
2577
4593
|
border-radius: ${theme.radius.full};
|
|
@@ -2585,24 +4601,24 @@ var UserButtonAvatar = styled__default.default.div`
|
|
|
2585
4601
|
font-family: ${theme.fontFamily.base};
|
|
2586
4602
|
overflow: hidden;
|
|
2587
4603
|
`;
|
|
2588
|
-
var UserButtonAvatarImage =
|
|
4604
|
+
var UserButtonAvatarImage = styled.img`
|
|
2589
4605
|
border-radius: ${theme.radius.full};
|
|
2590
4606
|
object-fit: cover;
|
|
2591
4607
|
width: 100%;
|
|
2592
4608
|
height: 100%;
|
|
2593
4609
|
`;
|
|
2594
|
-
var UserButtonAvatarInitials =
|
|
4610
|
+
var UserButtonAvatarInitials = styled.span`
|
|
2595
4611
|
color: ${theme.colors.bgWhite};
|
|
2596
4612
|
font-weight: 600;
|
|
2597
4613
|
font-size: ${theme.fontSize.sm};
|
|
2598
4614
|
`;
|
|
2599
|
-
var UserButtonInfo =
|
|
4615
|
+
var UserButtonInfo = styled.div`
|
|
2600
4616
|
display: flex;
|
|
2601
4617
|
flex-direction: column;
|
|
2602
4618
|
align-items: flex-start;
|
|
2603
4619
|
gap: 0.125rem;
|
|
2604
4620
|
`;
|
|
2605
|
-
var UserButtonName =
|
|
4621
|
+
var UserButtonName = styled.div`
|
|
2606
4622
|
font-size: ${theme.fontSize.sm};
|
|
2607
4623
|
font-weight: 600;
|
|
2608
4624
|
color: ${theme.colors.text};
|
|
@@ -2610,16 +4626,26 @@ var UserButtonName = styled__default.default.div`
|
|
|
2610
4626
|
text-align: left;
|
|
2611
4627
|
font-family: ${theme.fontFamily.base};
|
|
2612
4628
|
`;
|
|
2613
|
-
var UserButtonEmail =
|
|
4629
|
+
var UserButtonEmail = styled.div`
|
|
2614
4630
|
font-size: ${theme.fontSize.xs};
|
|
2615
4631
|
color: ${theme.colors.textSecondary};
|
|
2616
4632
|
line-height: 1rem;
|
|
2617
4633
|
text-align: left;
|
|
2618
4634
|
font-family: ${theme.fontFamily.base};
|
|
2619
4635
|
`;
|
|
2620
|
-
var UserButtonMenu =
|
|
4636
|
+
var UserButtonMenu = styled.div`
|
|
2621
4637
|
position: absolute;
|
|
2622
|
-
|
|
4638
|
+
${(props) => props.$openUpward ? `
|
|
4639
|
+
bottom: 100%;
|
|
4640
|
+
margin-bottom: ${theme.spacing[2]};
|
|
4641
|
+
` : `
|
|
4642
|
+
top: 100%;
|
|
4643
|
+
margin-top: ${theme.spacing[2]};
|
|
4644
|
+
`}
|
|
4645
|
+
left: 0;
|
|
4646
|
+
${(props) => props.$horizontalOffset ? `
|
|
4647
|
+
transform: translateX(${props.$horizontalOffset}px);
|
|
4648
|
+
` : ""}
|
|
2623
4649
|
background-color: ${theme.colors.bgWhite};
|
|
2624
4650
|
border: 1px solid ${theme.colors.border};
|
|
2625
4651
|
border-radius: ${theme.radius.md};
|
|
@@ -2628,7 +4654,7 @@ var UserButtonMenu = styled__default.default.div`
|
|
|
2628
4654
|
min-width: 200px;
|
|
2629
4655
|
z-index: 50;
|
|
2630
4656
|
`;
|
|
2631
|
-
var UserButtonMenuItem =
|
|
4657
|
+
var UserButtonMenuItem = styled.button`
|
|
2632
4658
|
display: flex;
|
|
2633
4659
|
align-items: center;
|
|
2634
4660
|
gap: ${theme.spacing[2]};
|
|
@@ -2648,7 +4674,7 @@ var UserButtonMenuItem = styled__default.default.button`
|
|
|
2648
4674
|
background-color: ${theme.colors.bgLight};
|
|
2649
4675
|
}
|
|
2650
4676
|
`;
|
|
2651
|
-
var UserButtonMenuItemIcon =
|
|
4677
|
+
var UserButtonMenuItemIcon = styled.div`
|
|
2652
4678
|
width: 1.25rem;
|
|
2653
4679
|
height: 1.25rem;
|
|
2654
4680
|
display: flex;
|
|
@@ -2660,12 +4686,15 @@ var UserButtonMenuItemIcon = styled__default.default.div`
|
|
|
2660
4686
|
height: 100%;
|
|
2661
4687
|
}
|
|
2662
4688
|
`;
|
|
2663
|
-
function UserButton({ afterSignOutUrl = "/", mode = "
|
|
4689
|
+
function UserButton({ afterSignOutUrl = "/", mode = "simple" }) {
|
|
2664
4690
|
const { user } = useInsforge();
|
|
2665
|
-
const [isOpen, setIsOpen] =
|
|
2666
|
-
const [imageError, setImageError] =
|
|
2667
|
-
const
|
|
2668
|
-
|
|
4691
|
+
const [isOpen, setIsOpen] = React2.useState(false);
|
|
4692
|
+
const [imageError, setImageError] = React2.useState(false);
|
|
4693
|
+
const [openUpward, setOpenUpward] = React2.useState(false);
|
|
4694
|
+
const [horizontalOffset, setHorizontalOffset] = React2.useState(0);
|
|
4695
|
+
const dropdownRef = React2.useRef(null);
|
|
4696
|
+
const menuRef = React2.useRef(null);
|
|
4697
|
+
React2.useEffect(() => {
|
|
2669
4698
|
setImageError(false);
|
|
2670
4699
|
const avatarUrl = user?.avatarUrl;
|
|
2671
4700
|
if (!avatarUrl) {
|
|
@@ -2689,7 +4718,34 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
|
|
|
2689
4718
|
};
|
|
2690
4719
|
void checkImageUrl();
|
|
2691
4720
|
}, [user?.avatarUrl]);
|
|
2692
|
-
|
|
4721
|
+
React2.useEffect(() => {
|
|
4722
|
+
if (isOpen && dropdownRef.current) {
|
|
4723
|
+
const buttonRect = dropdownRef.current.getBoundingClientRect();
|
|
4724
|
+
const viewportHeight = window.innerHeight;
|
|
4725
|
+
const viewportWidth = window.innerWidth;
|
|
4726
|
+
const spaceBelow = viewportHeight - buttonRect.bottom;
|
|
4727
|
+
const spaceAbove = buttonRect.top;
|
|
4728
|
+
const menuHeight = 200;
|
|
4729
|
+
const shouldOpenUpward = spaceBelow < menuHeight && spaceAbove > spaceBelow;
|
|
4730
|
+
setOpenUpward(shouldOpenUpward);
|
|
4731
|
+
requestAnimationFrame(() => {
|
|
4732
|
+
if (menuRef.current) {
|
|
4733
|
+
const menuWidth = menuRef.current.offsetWidth;
|
|
4734
|
+
const menuRight = buttonRect.left + menuWidth;
|
|
4735
|
+
const viewportPadding = 16;
|
|
4736
|
+
if (menuRight > viewportWidth - viewportPadding) {
|
|
4737
|
+
const overflow = menuRight - (viewportWidth - viewportPadding);
|
|
4738
|
+
setHorizontalOffset(-overflow);
|
|
4739
|
+
} else {
|
|
4740
|
+
setHorizontalOffset(0);
|
|
4741
|
+
}
|
|
4742
|
+
}
|
|
4743
|
+
});
|
|
4744
|
+
} else {
|
|
4745
|
+
setHorizontalOffset(0);
|
|
4746
|
+
}
|
|
4747
|
+
}, [isOpen]);
|
|
4748
|
+
React2.useEffect(() => {
|
|
2693
4749
|
function handleClickOutside(event) {
|
|
2694
4750
|
if (dropdownRef.current && !dropdownRef.current.contains(event.target)) {
|
|
2695
4751
|
setIsOpen(false);
|
|
@@ -2730,10 +4786,18 @@ function UserButton({ afterSignOutUrl = "/", mode = "detailed" }) {
|
|
|
2730
4786
|
]
|
|
2731
4787
|
}
|
|
2732
4788
|
),
|
|
2733
|
-
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
4789
|
+
isOpen && /* @__PURE__ */ jsxRuntime.jsx(
|
|
4790
|
+
UserButtonMenu,
|
|
4791
|
+
{
|
|
4792
|
+
ref: menuRef,
|
|
4793
|
+
$openUpward: openUpward,
|
|
4794
|
+
$horizontalOffset: horizontalOffset,
|
|
4795
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SignOutButton, { afterSignOutUrl, children: /* @__PURE__ */ jsxRuntime.jsxs(UserButtonMenuItem, { $signout: true, onClick: () => setIsOpen(false), children: [
|
|
4796
|
+
/* @__PURE__ */ jsxRuntime.jsx(UserButtonMenuItemIcon, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, {}) }),
|
|
4797
|
+
"Sign out"
|
|
4798
|
+
] }) })
|
|
4799
|
+
}
|
|
4800
|
+
)
|
|
2737
4801
|
] });
|
|
2738
4802
|
}
|
|
2739
4803
|
function Protect({
|
|
@@ -2744,8 +4808,8 @@ function Protect({
|
|
|
2744
4808
|
onRedirect
|
|
2745
4809
|
}) {
|
|
2746
4810
|
const { userId, user } = useInsforge();
|
|
2747
|
-
const resolvedRedirectTo =
|
|
2748
|
-
|
|
4811
|
+
const resolvedRedirectTo = React2.useMemo(() => resolveAuthPath(redirectTo), [redirectTo]);
|
|
4812
|
+
React2.useEffect(() => {
|
|
2749
4813
|
if (userId === null) {
|
|
2750
4814
|
if (onRedirect) {
|
|
2751
4815
|
onRedirect(resolvedRedirectTo);
|
|
@@ -2795,9 +4859,9 @@ function SignInButton({ children, className }) {
|
|
|
2795
4859
|
authUrl.searchParams.set("redirect", redirectUrl);
|
|
2796
4860
|
window.location.replace(authUrl.toString());
|
|
2797
4861
|
};
|
|
2798
|
-
if (children &&
|
|
4862
|
+
if (children && React2.isValidElement(children)) {
|
|
2799
4863
|
const originalOnClick = children.props?.onClick;
|
|
2800
|
-
return
|
|
4864
|
+
return React2.cloneElement(children, {
|
|
2801
4865
|
onClick: (e) => {
|
|
2802
4866
|
handleClick();
|
|
2803
4867
|
if (originalOnClick) {
|
|
@@ -2816,9 +4880,9 @@ function SignUpButton({ children, className }) {
|
|
|
2816
4880
|
authUrl.searchParams.set("redirect", redirectUrl);
|
|
2817
4881
|
window.location.replace(authUrl.toString());
|
|
2818
4882
|
};
|
|
2819
|
-
if (children &&
|
|
4883
|
+
if (children && React2.isValidElement(children)) {
|
|
2820
4884
|
const originalOnClick = children.props?.onClick;
|
|
2821
|
-
return
|
|
4885
|
+
return React2.cloneElement(children, {
|
|
2822
4886
|
onClick: (e) => {
|
|
2823
4887
|
handleClick();
|
|
2824
4888
|
if (originalOnClick) {
|
|
@@ -2829,6 +4893,28 @@ function SignUpButton({ children, className }) {
|
|
|
2829
4893
|
}
|
|
2830
4894
|
return /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className, onClick: handleClick, children: children || "Sign up" });
|
|
2831
4895
|
}
|
|
4896
|
+
/*! Bundled license information:
|
|
4897
|
+
|
|
4898
|
+
react-is/cjs/react-is.production.min.js:
|
|
4899
|
+
(** @license React v16.13.1
|
|
4900
|
+
* react-is.production.min.js
|
|
4901
|
+
*
|
|
4902
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4903
|
+
*
|
|
4904
|
+
* This source code is licensed under the MIT license found in the
|
|
4905
|
+
* LICENSE file in the root directory of this source tree.
|
|
4906
|
+
*)
|
|
4907
|
+
|
|
4908
|
+
react-is/cjs/react-is.development.js:
|
|
4909
|
+
(** @license React v16.13.1
|
|
4910
|
+
* react-is.development.js
|
|
4911
|
+
*
|
|
4912
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
4913
|
+
*
|
|
4914
|
+
* This source code is licensed under the MIT license found in the
|
|
4915
|
+
* LICENSE file in the root directory of this source tree.
|
|
4916
|
+
*)
|
|
4917
|
+
*/
|
|
2832
4918
|
|
|
2833
4919
|
exports.AuthBranding = AuthBranding;
|
|
2834
4920
|
exports.AuthContainer = AuthContainer;
|