@worldcoin/idkit 0.5.0 → 1.0.0-alpha.0

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/build/index.js ADDED
@@ -0,0 +1,2094 @@
1
+ import {
2
+ QRCode_default,
3
+ __,
4
+ idkit_default
5
+ } from "./chunk-EXZRURG3.js";
6
+
7
+ // src/hooks/useIDKit.ts
8
+ import { useEffect } from "react";
9
+ var getStore = ({ open, onOpenChange, addSuccessCallback, addVerificationCallback }) => ({
10
+ open,
11
+ onOpenChange,
12
+ addSuccessCallback,
13
+ addVerificationCallback
14
+ });
15
+ var useIDKit = ({ handleVerify, onSuccess } = {}) => {
16
+ const { open, onOpenChange, addSuccessCallback, addVerificationCallback } = idkit_default(getStore);
17
+ useEffect(() => {
18
+ if (onSuccess)
19
+ addSuccessCallback(onSuccess, "hook" /* HOOK */);
20
+ if (handleVerify)
21
+ addVerificationCallback(handleVerify, "hook" /* HOOK */);
22
+ }, [handleVerify, onSuccess]);
23
+ return { open, setOpen: onOpenChange };
24
+ };
25
+ var useIDKit_default = useIDKit;
26
+
27
+ // src/components/SignInButton.tsx
28
+ import { motion } from "framer-motion";
29
+
30
+ // src/components/Icons/WorldcoinIcon.tsx
31
+ import { jsx } from "react/jsx-runtime";
32
+ var WorldcoinIcon = (props) => /* @__PURE__ */ jsx("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 33 32", children: /* @__PURE__ */ jsx(
33
+ "path",
34
+ {
35
+ fill: "currentColor",
36
+ d: "M30.7195 9.77312C29.9097 7.87434 28.7647 6.17103 27.2845 4.6911C25.8044 3.21117 24.1288 2.06632 22.2298 1.25654C20.247 0.418848 18.1525 0 16.0021 0C13.8238 0 11.7293 0.418848 9.7744 1.25654C7.87537 2.06632 6.17184 3.21117 4.69171 4.6911C3.21159 6.17103 2.06659 7.87434 1.25671 9.77312C0.418903 11.7277 0 13.822 0 16C0 18.1501 0.418903 20.2443 1.25671 22.2269C2.06659 24.1257 3.21159 25.829 4.69171 27.3089C6.17184 28.7888 7.87537 29.9337 9.7744 30.7155C11.7572 31.5532 13.8517 31.9721 16.0021 31.9721C18.1525 31.9721 20.247 31.5532 22.2298 30.7155C24.1288 29.9058 25.8323 28.7609 27.3125 27.281C28.7926 25.801 29.9376 24.0977 30.7475 22.1989C31.5853 20.2164 32.0042 18.1222 32.0042 15.9721C32.0042 13.822 31.5574 11.7277 30.7195 9.77312ZM10.696 14.4921C11.3383 11.9232 13.6842 10.0524 16.4489 10.0524H27.5638C28.2899 11.4206 28.7367 12.9284 28.9043 14.4921H10.696ZM28.9043 17.5079C28.7367 19.0716 28.262 20.5794 27.5638 21.9476H16.4489C13.6842 21.9476 11.3662 20.0489 10.696 17.5079H28.9043ZM6.81415 6.81326C9.27172 4.35602 12.5392 3.01571 16.0021 3.01571C19.465 3.01571 22.7325 4.35602 25.19 6.81326C25.2738 6.89703 25.3297 6.95288 25.4134 7.03665H16.4489C14.0472 7.03665 11.8131 7.95811 10.1095 9.66143C8.76903 11.0017 7.9033 12.6771 7.62403 14.4921H3.09988C3.435 11.5881 4.71964 8.9075 6.81415 6.81326ZM16.0021 28.9843C12.5392 28.9843 9.27172 27.644 6.81415 25.1867C4.71964 23.0925 3.435 20.3839 3.09988 17.5079H7.62403C7.93123 19.3229 8.79696 20.9983 10.1095 22.3386C11.8131 24.0419 14.0472 24.9633 16.4489 24.9633H25.4134C25.3297 25.0471 25.2738 25.103 25.19 25.1867C22.7325 27.644 19.465 28.9843 16.0021 28.9843Z"
37
+ }
38
+ ) });
39
+ var WorldcoinIcon_default = WorldcoinIcon;
40
+
41
+ // src/components/SignInButton.tsx
42
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
43
+ var SignInButton = ({ style, theme = "light", ...props }) => /* @__PURE__ */ jsx2(
44
+ motion.button,
45
+ {
46
+ whileTap: { scale: 0.98 },
47
+ whileHover: { scale: 1.02 },
48
+ style: {
49
+ overflow: "hidden",
50
+ borderStyle: "none",
51
+ display: "relative",
52
+ padding: "1.5rem 6rem",
53
+ borderRadius: "0.75rem",
54
+ borderColor: "rgba(255, 255, 255, 0.1)",
55
+ borderWidth: theme == "dark" ? "1px" : "0px",
56
+ ...style
57
+ },
58
+ ...props,
59
+ children: /* @__PURE__ */ jsx2(
60
+ "div",
61
+ {
62
+ style: {
63
+ zIndex: 10,
64
+ inset: "1px",
65
+ display: "grid",
66
+ cursor: "pointer",
67
+ placeItems: "center",
68
+ position: "absolute",
69
+ borderRadius: "0.75rem",
70
+ backgroundColor: theme == "dark" ? "#000" : "#f2f5f9"
71
+ },
72
+ children: /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center" }, children: [
73
+ /* @__PURE__ */ jsx2(WorldcoinIcon_default, { style: { height: "1rem", width: "1rem" } }),
74
+ /* @__PURE__ */ jsx2(
75
+ "span",
76
+ {
77
+ style: {
78
+ marginLeft: "1rem",
79
+ fontSize: "0.875rem",
80
+ lineHeight: "1.25rem",
81
+ fontFamily: "Rubik, ui-sans-serif, system-ui, -apple-system, sans-serif"
82
+ },
83
+ children: __("Sign in with World ID")
84
+ }
85
+ )
86
+ ] })
87
+ }
88
+ )
89
+ }
90
+ );
91
+ var SignInButton_default = SignInButton;
92
+
93
+ // src/index.ts
94
+ import { CredentialType } from "@worldcoin/idkit-core";
95
+
96
+ // src/components/IDKitWidget/index.tsx
97
+ import { memo as memo2 } from "react";
98
+
99
+ // src/components/IDKitWidget/BaseWidget.tsx
100
+ import root from "react-shadow";
101
+
102
+ // src/hooks/useMedia.ts
103
+ import { useEffect as useEffect2, useState } from "react";
104
+ var useMedia = () => {
105
+ const [media, setMedia] = useState("desktop");
106
+ useEffect2(() => {
107
+ const mql = window.matchMedia("(max-width: 768px)");
108
+ const handleChange = (mql2) => setMedia(mql2.matches ? "mobile" : "desktop");
109
+ handleChange(mql);
110
+ mql.addEventListener("change", handleChange);
111
+ return () => {
112
+ mql.removeEventListener("change", handleChange);
113
+ };
114
+ }, []);
115
+ return media;
116
+ };
117
+ var useMedia_default = useMedia;
118
+
119
+ // src/lib/utils.ts
120
+ var classNames = (...classes) => {
121
+ return classes.filter(Boolean).join(" ");
122
+ };
123
+
124
+ // src/styles/styles.css
125
+ var styles_default = `/* TODO: Use an alternative to avoid the extra request to Google (e.g. hosting ourselves, or local file) */
126
+ @import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;600;700&family=Sora:wght@600&display=swap');
127
+ /* ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com */
128
+ /*
129
+ 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
130
+ 2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
131
+ */
132
+ *,
133
+ ::before,
134
+ ::after {
135
+ box-sizing: border-box; /* 1 */
136
+ border-width: 0; /* 2 */
137
+ border-style: solid; /* 2 */
138
+ border-color: #e5e7eb; /* 2 */
139
+ }
140
+ ::before,
141
+ ::after {
142
+ --tw-content: '';
143
+ }
144
+ /*
145
+ 1. Use a consistent sensible line-height in all browsers.
146
+ 2. Prevent adjustments of font size after orientation changes in iOS.
147
+ 3. Use a more readable tab size.
148
+ 4. Use the user's configured \`sans\` font-family by default.
149
+ 5. Use the user's configured \`sans\` font-feature-settings by default.
150
+ 6. Use the user's configured \`sans\` font-variation-settings by default.
151
+ */
152
+ html {
153
+ line-height: 1.5; /* 1 */
154
+ -webkit-text-size-adjust: 100%; /* 2 */
155
+ -moz-tab-size: 4; /* 3 */
156
+ -o-tab-size: 4;
157
+ tab-size: 4; /* 3 */
158
+ font-family: Rubik, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */
159
+ font-feature-settings: normal; /* 5 */
160
+ font-variation-settings: normal; /* 6 */
161
+ }
162
+ /*
163
+ 1. Remove the margin in all browsers.
164
+ 2. Inherit line-height from \`html\` so users can set them as a class directly on the \`html\` element.
165
+ */
166
+ body {
167
+ margin: 0; /* 1 */
168
+ line-height: inherit; /* 2 */
169
+ }
170
+ /*
171
+ 1. Add the correct height in Firefox.
172
+ 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
173
+ 3. Ensure horizontal rules are visible by default.
174
+ */
175
+ hr {
176
+ height: 0; /* 1 */
177
+ color: inherit; /* 2 */
178
+ border-top-width: 1px; /* 3 */
179
+ }
180
+ /*
181
+ Add the correct text decoration in Chrome, Edge, and Safari.
182
+ */
183
+ abbr:where([title]) {
184
+ -webkit-text-decoration: underline dotted;
185
+ text-decoration: underline dotted;
186
+ }
187
+ /*
188
+ Remove the default font size and weight for headings.
189
+ */
190
+ h1,
191
+ h2,
192
+ h3,
193
+ h4,
194
+ h5,
195
+ h6 {
196
+ font-size: inherit;
197
+ font-weight: inherit;
198
+ }
199
+ /*
200
+ Reset links to optimize for opt-in styling instead of opt-out.
201
+ */
202
+ a {
203
+ color: inherit;
204
+ text-decoration: inherit;
205
+ }
206
+ /*
207
+ Add the correct font weight in Edge and Safari.
208
+ */
209
+ b,
210
+ strong {
211
+ font-weight: bolder;
212
+ }
213
+ /*
214
+ 1. Use the user's configured \`mono\` font family by default.
215
+ 2. Correct the odd \`em\` font sizing in all browsers.
216
+ */
217
+ code,
218
+ kbd,
219
+ samp,
220
+ pre {
221
+ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
222
+ font-size: 1em; /* 2 */
223
+ }
224
+ /*
225
+ Add the correct font size in all browsers.
226
+ */
227
+ small {
228
+ font-size: 80%;
229
+ }
230
+ /*
231
+ Prevent \`sub\` and \`sup\` elements from affecting the line height in all browsers.
232
+ */
233
+ sub,
234
+ sup {
235
+ font-size: 75%;
236
+ line-height: 0;
237
+ position: relative;
238
+ vertical-align: baseline;
239
+ }
240
+ sub {
241
+ bottom: -0.25em;
242
+ }
243
+ sup {
244
+ top: -0.5em;
245
+ }
246
+ /*
247
+ 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
248
+ 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
249
+ 3. Remove gaps between table borders by default.
250
+ */
251
+ table {
252
+ text-indent: 0; /* 1 */
253
+ border-color: inherit; /* 2 */
254
+ border-collapse: collapse; /* 3 */
255
+ }
256
+ /*
257
+ 1. Change the font styles in all browsers.
258
+ 2. Remove the margin in Firefox and Safari.
259
+ 3. Remove default padding in all browsers.
260
+ */
261
+ button,
262
+ input,
263
+ optgroup,
264
+ select,
265
+ textarea {
266
+ font-family: inherit; /* 1 */
267
+ font-feature-settings: inherit; /* 1 */
268
+ font-variation-settings: inherit; /* 1 */
269
+ font-size: 100%; /* 1 */
270
+ font-weight: inherit; /* 1 */
271
+ line-height: inherit; /* 1 */
272
+ color: inherit; /* 1 */
273
+ margin: 0; /* 2 */
274
+ padding: 0; /* 3 */
275
+ }
276
+ /*
277
+ Remove the inheritance of text transform in Edge and Firefox.
278
+ */
279
+ button,
280
+ select {
281
+ text-transform: none;
282
+ }
283
+ /*
284
+ 1. Correct the inability to style clickable types in iOS and Safari.
285
+ 2. Remove default button styles.
286
+ */
287
+ button,
288
+ [type='button'],
289
+ [type='reset'],
290
+ [type='submit'] {
291
+ -webkit-appearance: button; /* 1 */
292
+ background-color: transparent; /* 2 */
293
+ background-image: none; /* 2 */
294
+ }
295
+ /*
296
+ Use the modern Firefox focus style for all focusable elements.
297
+ */
298
+ :-moz-focusring {
299
+ outline: auto;
300
+ }
301
+ /*
302
+ Remove the additional \`:invalid\` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
303
+ */
304
+ :-moz-ui-invalid {
305
+ box-shadow: none;
306
+ }
307
+ /*
308
+ Add the correct vertical alignment in Chrome and Firefox.
309
+ */
310
+ progress {
311
+ vertical-align: baseline;
312
+ }
313
+ /*
314
+ Correct the cursor style of increment and decrement buttons in Safari.
315
+ */
316
+ ::-webkit-inner-spin-button,
317
+ ::-webkit-outer-spin-button {
318
+ height: auto;
319
+ }
320
+ /*
321
+ 1. Correct the odd appearance in Chrome and Safari.
322
+ 2. Correct the outline style in Safari.
323
+ */
324
+ [type='search'] {
325
+ -webkit-appearance: textfield; /* 1 */
326
+ outline-offset: -2px; /* 2 */
327
+ }
328
+ /*
329
+ Remove the inner padding in Chrome and Safari on macOS.
330
+ */
331
+ ::-webkit-search-decoration {
332
+ -webkit-appearance: none;
333
+ }
334
+ /*
335
+ 1. Correct the inability to style clickable types in iOS and Safari.
336
+ 2. Change font properties to \`inherit\` in Safari.
337
+ */
338
+ ::-webkit-file-upload-button {
339
+ -webkit-appearance: button; /* 1 */
340
+ font: inherit; /* 2 */
341
+ }
342
+ /*
343
+ Add the correct display in Chrome and Safari.
344
+ */
345
+ summary {
346
+ display: list-item;
347
+ }
348
+ /*
349
+ Removes the default spacing and border for appropriate elements.
350
+ */
351
+ blockquote,
352
+ dl,
353
+ dd,
354
+ h1,
355
+ h2,
356
+ h3,
357
+ h4,
358
+ h5,
359
+ h6,
360
+ hr,
361
+ figure,
362
+ p,
363
+ pre {
364
+ margin: 0;
365
+ }
366
+ fieldset {
367
+ margin: 0;
368
+ padding: 0;
369
+ }
370
+ legend {
371
+ padding: 0;
372
+ }
373
+ ol,
374
+ ul,
375
+ menu {
376
+ list-style: none;
377
+ margin: 0;
378
+ padding: 0;
379
+ }
380
+ /*
381
+ Reset default styling for dialogs.
382
+ */
383
+ dialog {
384
+ padding: 0;
385
+ }
386
+ /*
387
+ Prevent resizing textareas horizontally by default.
388
+ */
389
+ textarea {
390
+ resize: vertical;
391
+ }
392
+ /*
393
+ 1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
394
+ 2. Set the default placeholder color to the user's configured gray 400 color.
395
+ */
396
+ input::-moz-placeholder, textarea::-moz-placeholder {
397
+ opacity: 1; /* 1 */
398
+ color: #9ca3af; /* 2 */
399
+ }
400
+ input::placeholder,
401
+ textarea::placeholder {
402
+ opacity: 1; /* 1 */
403
+ color: #9ca3af; /* 2 */
404
+ }
405
+ /*
406
+ Set the default cursor for buttons.
407
+ */
408
+ button,
409
+ [role="button"] {
410
+ cursor: pointer;
411
+ }
412
+ /*
413
+ Make sure disabled buttons don't get the pointer cursor.
414
+ */
415
+ :disabled {
416
+ cursor: default;
417
+ }
418
+ /*
419
+ 1. Make replaced elements \`display: block\` by default. (https://github.com/mozdevs/cssremedy/issues/14)
420
+ 2. Add \`vertical-align: middle\` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
421
+ This can trigger a poorly considered lint error in some tools but is included by design.
422
+ */
423
+ img,
424
+ svg,
425
+ video,
426
+ canvas,
427
+ audio,
428
+ iframe,
429
+ embed,
430
+ object {
431
+ display: block; /* 1 */
432
+ vertical-align: middle; /* 2 */
433
+ }
434
+ /*
435
+ Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
436
+ */
437
+ img,
438
+ video {
439
+ max-width: 100%;
440
+ height: auto;
441
+ }
442
+ /* Make elements with the HTML hidden attribute stay hidden by default */
443
+ [hidden] {
444
+ display: none;
445
+ }
446
+ [type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select{
447
+ -webkit-appearance: none;
448
+ -moz-appearance: none;
449
+ appearance: none;
450
+ background-color: #fff;
451
+ border-color: #6b7280;
452
+ border-width: 1px;
453
+ border-radius: 0px;
454
+ padding-top: 0.5rem;
455
+ padding-right: 0.75rem;
456
+ padding-bottom: 0.5rem;
457
+ padding-left: 0.75rem;
458
+ font-size: 1rem;
459
+ line-height: 1.5rem;
460
+ --tw-shadow: 0 0 #0000;
461
+ }
462
+ [type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus{
463
+ outline: 2px solid transparent;
464
+ outline-offset: 2px;
465
+ --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
466
+ --tw-ring-offset-width: 0px;
467
+ --tw-ring-offset-color: #fff;
468
+ --tw-ring-color: #2563eb;
469
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
470
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);
471
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
472
+ border-color: #2563eb;
473
+ }
474
+ input::-moz-placeholder, textarea::-moz-placeholder{
475
+ color: #6b7280;
476
+ opacity: 1;
477
+ }
478
+ input::placeholder,textarea::placeholder{
479
+ color: #6b7280;
480
+ opacity: 1;
481
+ }
482
+ ::-webkit-datetime-edit-fields-wrapper{
483
+ padding: 0;
484
+ }
485
+ ::-webkit-date-and-time-value{
486
+ min-height: 1.5em;
487
+ text-align: inherit;
488
+ }
489
+ ::-webkit-datetime-edit{
490
+ display: inline-flex;
491
+ }
492
+ ::-webkit-datetime-edit,::-webkit-datetime-edit-year-field,::-webkit-datetime-edit-month-field,::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field,::-webkit-datetime-edit-second-field,::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-meridiem-field{
493
+ padding-top: 0;
494
+ padding-bottom: 0;
495
+ }
496
+ select{
497
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
498
+ background-position: right 0.5rem center;
499
+ background-repeat: no-repeat;
500
+ background-size: 1.5em 1.5em;
501
+ padding-right: 2.5rem;
502
+ -webkit-print-color-adjust: exact;
503
+ print-color-adjust: exact;
504
+ }
505
+ [multiple],[size]:where(select:not([size="1"])){
506
+ background-image: initial;
507
+ background-position: initial;
508
+ background-repeat: unset;
509
+ background-size: initial;
510
+ padding-right: 0.75rem;
511
+ -webkit-print-color-adjust: unset;
512
+ print-color-adjust: unset;
513
+ }
514
+ [type='checkbox'],[type='radio']{
515
+ -webkit-appearance: none;
516
+ -moz-appearance: none;
517
+ appearance: none;
518
+ padding: 0;
519
+ -webkit-print-color-adjust: exact;
520
+ print-color-adjust: exact;
521
+ display: inline-block;
522
+ vertical-align: middle;
523
+ background-origin: border-box;
524
+ -webkit-user-select: none;
525
+ -moz-user-select: none;
526
+ user-select: none;
527
+ flex-shrink: 0;
528
+ height: 1rem;
529
+ width: 1rem;
530
+ color: #2563eb;
531
+ background-color: #fff;
532
+ border-color: #6b7280;
533
+ border-width: 1px;
534
+ --tw-shadow: 0 0 #0000;
535
+ }
536
+ [type='checkbox']{
537
+ border-radius: 0px;
538
+ }
539
+ [type='radio']{
540
+ border-radius: 100%;
541
+ }
542
+ [type='checkbox']:focus,[type='radio']:focus{
543
+ outline: 2px solid transparent;
544
+ outline-offset: 2px;
545
+ --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
546
+ --tw-ring-offset-width: 2px;
547
+ --tw-ring-offset-color: #fff;
548
+ --tw-ring-color: #2563eb;
549
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
550
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
551
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow);
552
+ }
553
+ [type='checkbox']:checked,[type='radio']:checked{
554
+ border-color: transparent;
555
+ background-color: currentColor;
556
+ background-size: 100% 100%;
557
+ background-position: center;
558
+ background-repeat: no-repeat;
559
+ }
560
+ [type='checkbox']:checked{
561
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
562
+ }
563
+ [type='radio']:checked{
564
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
565
+ }
566
+ [type='checkbox']:checked:hover,[type='checkbox']:checked:focus,[type='radio']:checked:hover,[type='radio']:checked:focus{
567
+ border-color: transparent;
568
+ background-color: currentColor;
569
+ }
570
+ [type='checkbox']:indeterminate{
571
+ background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3e%3cpath stroke='white' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M4 8h8'/%3e%3c/svg%3e");
572
+ border-color: transparent;
573
+ background-color: currentColor;
574
+ background-size: 100% 100%;
575
+ background-position: center;
576
+ background-repeat: no-repeat;
577
+ }
578
+ [type='checkbox']:indeterminate:hover,[type='checkbox']:indeterminate:focus{
579
+ border-color: transparent;
580
+ background-color: currentColor;
581
+ }
582
+ [type='file']{
583
+ background: unset;
584
+ border-color: inherit;
585
+ border-width: 0;
586
+ border-radius: 0;
587
+ padding: 0;
588
+ font-size: unset;
589
+ line-height: inherit;
590
+ }
591
+ [type='file']:focus{
592
+ outline: 1px solid ButtonText;
593
+ outline: 1px auto -webkit-focus-ring-color;
594
+ }
595
+ *, ::before, ::after{
596
+ --tw-border-spacing-x: 0;
597
+ --tw-border-spacing-y: 0;
598
+ --tw-translate-x: 0;
599
+ --tw-translate-y: 0;
600
+ --tw-rotate: 0;
601
+ --tw-skew-x: 0;
602
+ --tw-skew-y: 0;
603
+ --tw-scale-x: 1;
604
+ --tw-scale-y: 1;
605
+ --tw-pan-x: ;
606
+ --tw-pan-y: ;
607
+ --tw-pinch-zoom: ;
608
+ --tw-scroll-snap-strictness: proximity;
609
+ --tw-gradient-from-position: ;
610
+ --tw-gradient-via-position: ;
611
+ --tw-gradient-to-position: ;
612
+ --tw-ordinal: ;
613
+ --tw-slashed-zero: ;
614
+ --tw-numeric-figure: ;
615
+ --tw-numeric-spacing: ;
616
+ --tw-numeric-fraction: ;
617
+ --tw-ring-inset: ;
618
+ --tw-ring-offset-width: 0px;
619
+ --tw-ring-offset-color: #fff;
620
+ --tw-ring-color: rgb(59 130 246 / 0.5);
621
+ --tw-ring-offset-shadow: 0 0 #0000;
622
+ --tw-ring-shadow: 0 0 #0000;
623
+ --tw-shadow: 0 0 #0000;
624
+ --tw-shadow-colored: 0 0 #0000;
625
+ --tw-blur: ;
626
+ --tw-brightness: ;
627
+ --tw-contrast: ;
628
+ --tw-grayscale: ;
629
+ --tw-hue-rotate: ;
630
+ --tw-invert: ;
631
+ --tw-saturate: ;
632
+ --tw-sepia: ;
633
+ --tw-drop-shadow: ;
634
+ --tw-backdrop-blur: ;
635
+ --tw-backdrop-brightness: ;
636
+ --tw-backdrop-contrast: ;
637
+ --tw-backdrop-grayscale: ;
638
+ --tw-backdrop-hue-rotate: ;
639
+ --tw-backdrop-invert: ;
640
+ --tw-backdrop-opacity: ;
641
+ --tw-backdrop-saturate: ;
642
+ --tw-backdrop-sepia: ;
643
+ }
644
+ ::backdrop{
645
+ --tw-border-spacing-x: 0;
646
+ --tw-border-spacing-y: 0;
647
+ --tw-translate-x: 0;
648
+ --tw-translate-y: 0;
649
+ --tw-rotate: 0;
650
+ --tw-skew-x: 0;
651
+ --tw-skew-y: 0;
652
+ --tw-scale-x: 1;
653
+ --tw-scale-y: 1;
654
+ --tw-pan-x: ;
655
+ --tw-pan-y: ;
656
+ --tw-pinch-zoom: ;
657
+ --tw-scroll-snap-strictness: proximity;
658
+ --tw-gradient-from-position: ;
659
+ --tw-gradient-via-position: ;
660
+ --tw-gradient-to-position: ;
661
+ --tw-ordinal: ;
662
+ --tw-slashed-zero: ;
663
+ --tw-numeric-figure: ;
664
+ --tw-numeric-spacing: ;
665
+ --tw-numeric-fraction: ;
666
+ --tw-ring-inset: ;
667
+ --tw-ring-offset-width: 0px;
668
+ --tw-ring-offset-color: #fff;
669
+ --tw-ring-color: rgb(59 130 246 / 0.5);
670
+ --tw-ring-offset-shadow: 0 0 #0000;
671
+ --tw-ring-shadow: 0 0 #0000;
672
+ --tw-shadow: 0 0 #0000;
673
+ --tw-shadow-colored: 0 0 #0000;
674
+ --tw-blur: ;
675
+ --tw-brightness: ;
676
+ --tw-contrast: ;
677
+ --tw-grayscale: ;
678
+ --tw-hue-rotate: ;
679
+ --tw-invert: ;
680
+ --tw-saturate: ;
681
+ --tw-sepia: ;
682
+ --tw-drop-shadow: ;
683
+ --tw-backdrop-blur: ;
684
+ --tw-backdrop-brightness: ;
685
+ --tw-backdrop-contrast: ;
686
+ --tw-backdrop-grayscale: ;
687
+ --tw-backdrop-hue-rotate: ;
688
+ --tw-backdrop-invert: ;
689
+ --tw-backdrop-opacity: ;
690
+ --tw-backdrop-saturate: ;
691
+ --tw-backdrop-sepia: ;
692
+ }
693
+ .container{
694
+ width: 100%;
695
+ }
696
+ @media (min-width: 414px){
697
+ .container{
698
+ max-width: 414px;
699
+ }
700
+ }
701
+ @media (min-width: 640px){
702
+ .container{
703
+ max-width: 640px;
704
+ }
705
+ }
706
+ @media (min-width: 768px){
707
+ .container{
708
+ max-width: 768px;
709
+ }
710
+ }
711
+ @media (min-width: 1024px){
712
+ .container{
713
+ max-width: 1024px;
714
+ }
715
+ }
716
+ @media (min-width: 1280px){
717
+ .container{
718
+ max-width: 1280px;
719
+ }
720
+ }
721
+ @media (min-width: 1536px){
722
+ .container{
723
+ max-width: 1536px;
724
+ }
725
+ }
726
+ .pointer-events-none{
727
+ pointer-events: none;
728
+ }
729
+ .visible{
730
+ visibility: visible;
731
+ }
732
+ .invisible{
733
+ visibility: hidden;
734
+ }
735
+ .fixed{
736
+ position: fixed;
737
+ }
738
+ .\\!absolute{
739
+ position: absolute !important;
740
+ }
741
+ .absolute{
742
+ position: absolute;
743
+ }
744
+ .relative{
745
+ position: relative;
746
+ }
747
+ .inset-0{
748
+ inset: 0px;
749
+ }
750
+ .left-1\\/2{
751
+ left: 50%;
752
+ }
753
+ .top-1\\/2{
754
+ top: 50%;
755
+ }
756
+ .z-10{
757
+ z-index: 10;
758
+ }
759
+ .z-50{
760
+ z-index: 50;
761
+ }
762
+ .\\!-m-px{
763
+ margin: -1px !important;
764
+ }
765
+ .mx-6{
766
+ margin-left: 1.5rem;
767
+ margin-right: 1.5rem;
768
+ }
769
+ .-ml-4{
770
+ margin-left: -1rem;
771
+ }
772
+ .-mt-5{
773
+ margin-top: -1.25rem;
774
+ }
775
+ .-mt-6{
776
+ margin-top: -1.5rem;
777
+ }
778
+ .-mt-\\[2px\\]{
779
+ margin-top: -2px;
780
+ }
781
+ .mb-12{
782
+ margin-bottom: 3rem;
783
+ }
784
+ .mb-2{
785
+ margin-bottom: 0.5rem;
786
+ }
787
+ .mb-6{
788
+ margin-bottom: 1.5rem;
789
+ }
790
+ .mt-2{
791
+ margin-top: 0.5rem;
792
+ }
793
+ .mt-3{
794
+ margin-top: 0.75rem;
795
+ }
796
+ .mt-4{
797
+ margin-top: 1rem;
798
+ }
799
+ .mt-\\[2px\\]{
800
+ margin-top: 2px;
801
+ }
802
+ .inline-block{
803
+ display: inline-block;
804
+ }
805
+ .flex{
806
+ display: flex;
807
+ }
808
+ .inline-flex{
809
+ display: inline-flex;
810
+ }
811
+ .grid{
812
+ display: grid;
813
+ }
814
+ .hidden{
815
+ display: none;
816
+ }
817
+ .aspect-square{
818
+ aspect-ratio: 1 / 1;
819
+ }
820
+ .\\!h-px{
821
+ height: 1px !important;
822
+ }
823
+ .h-12{
824
+ height: 3rem;
825
+ }
826
+ .h-20{
827
+ height: 5rem;
828
+ }
829
+ .h-24{
830
+ height: 6rem;
831
+ }
832
+ .h-3{
833
+ height: 0.75rem;
834
+ }
835
+ .h-4{
836
+ height: 1rem;
837
+ }
838
+ .h-5{
839
+ height: 1.25rem;
840
+ }
841
+ .h-8{
842
+ height: 2rem;
843
+ }
844
+ .h-\\[244px\\]{
845
+ height: 244px;
846
+ }
847
+ .h-\\[72px\\]{
848
+ height: 72px;
849
+ }
850
+ .min-h-full{
851
+ min-height: 100%;
852
+ }
853
+ .\\!w-px{
854
+ width: 1px !important;
855
+ }
856
+ .w-12{
857
+ width: 3rem;
858
+ }
859
+ .w-20{
860
+ width: 5rem;
861
+ }
862
+ .w-24{
863
+ width: 6rem;
864
+ }
865
+ .w-3{
866
+ width: 0.75rem;
867
+ }
868
+ .w-4{
869
+ width: 1rem;
870
+ }
871
+ .w-5{
872
+ width: 1.25rem;
873
+ }
874
+ .w-8{
875
+ width: 2rem;
876
+ }
877
+ .w-\\[244px\\]{
878
+ width: 244px;
879
+ }
880
+ .w-\\[34px\\]{
881
+ width: 34px;
882
+ }
883
+ .w-\\[72px\\]{
884
+ width: 72px;
885
+ }
886
+ .w-full{
887
+ width: 100%;
888
+ }
889
+ .flex-1{
890
+ flex: 1 1 0%;
891
+ }
892
+ .-translate-x-1\\/2{
893
+ --tw-translate-x: -50%;
894
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
895
+ }
896
+ .-translate-y-1\\/2{
897
+ --tw-translate-y: -50%;
898
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
899
+ }
900
+ .transform{
901
+ transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
902
+ }
903
+ @keyframes spin{
904
+ to{
905
+ transform: rotate(360deg);
906
+ }
907
+ }
908
+ .animate-spin{
909
+ animation: spin 1s linear infinite;
910
+ }
911
+ .cursor-pointer{
912
+ cursor: pointer;
913
+ }
914
+ .list-disc{
915
+ list-style-type: disc;
916
+ }
917
+ .flex-col{
918
+ flex-direction: column;
919
+ }
920
+ .items-end{
921
+ align-items: flex-end;
922
+ }
923
+ .items-center{
924
+ align-items: center;
925
+ }
926
+ .justify-center{
927
+ justify-content: center;
928
+ }
929
+ .justify-between{
930
+ justify-content: space-between;
931
+ }
932
+ .gap-1{
933
+ gap: 0.25rem;
934
+ }
935
+ .space-x-2 > :not([hidden]) ~ :not([hidden]){
936
+ --tw-space-x-reverse: 0;
937
+ margin-right: calc(0.5rem * var(--tw-space-x-reverse));
938
+ margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
939
+ }
940
+ .space-x-3 > :not([hidden]) ~ :not([hidden]){
941
+ --tw-space-x-reverse: 0;
942
+ margin-right: calc(0.75rem * var(--tw-space-x-reverse));
943
+ margin-left: calc(0.75rem * calc(1 - var(--tw-space-x-reverse)));
944
+ }
945
+ .space-x-6 > :not([hidden]) ~ :not([hidden]){
946
+ --tw-space-x-reverse: 0;
947
+ margin-right: calc(1.5rem * var(--tw-space-x-reverse));
948
+ margin-left: calc(1.5rem * calc(1 - var(--tw-space-x-reverse)));
949
+ }
950
+ .space-y-3 > :not([hidden]) ~ :not([hidden]){
951
+ --tw-space-y-reverse: 0;
952
+ margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
953
+ margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
954
+ }
955
+ .space-y-4 > :not([hidden]) ~ :not([hidden]){
956
+ --tw-space-y-reverse: 0;
957
+ margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
958
+ margin-bottom: calc(1rem * var(--tw-space-y-reverse));
959
+ }
960
+ .space-y-6 > :not([hidden]) ~ :not([hidden]){
961
+ --tw-space-y-reverse: 0;
962
+ margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
963
+ margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
964
+ }
965
+ .space-y-8 > :not([hidden]) ~ :not([hidden]){
966
+ --tw-space-y-reverse: 0;
967
+ margin-top: calc(2rem * calc(1 - var(--tw-space-y-reverse)));
968
+ margin-bottom: calc(2rem * var(--tw-space-y-reverse));
969
+ }
970
+ .\\!overflow-hidden{
971
+ overflow: hidden !important;
972
+ }
973
+ .overflow-y-hidden{
974
+ overflow-y: hidden;
975
+ }
976
+ .\\!whitespace-nowrap{
977
+ white-space: nowrap !important;
978
+ }
979
+ .whitespace-nowrap{
980
+ white-space: nowrap;
981
+ }
982
+ .rounded-2xl{
983
+ border-radius: 1rem;
984
+ }
985
+ .rounded-full{
986
+ border-radius: 9999px;
987
+ }
988
+ .rounded-lg{
989
+ border-radius: 0.5rem;
990
+ }
991
+ .rounded-md{
992
+ border-radius: 0.375rem;
993
+ }
994
+ .rounded-t-2xl{
995
+ border-top-left-radius: 1rem;
996
+ border-top-right-radius: 1rem;
997
+ }
998
+ .\\!border-0{
999
+ border-width: 0px !important;
1000
+ }
1001
+ .border{
1002
+ border-width: 1px;
1003
+ }
1004
+ .border-4{
1005
+ border-width: 4px;
1006
+ }
1007
+ .border-solid{
1008
+ border-style: solid;
1009
+ }
1010
+ .border-current{
1011
+ border-color: currentColor;
1012
+ }
1013
+ .border-f1f5f8{
1014
+ --tw-border-opacity: 1;
1015
+ border-color: rgb(241 245 248 / var(--tw-border-opacity));
1016
+ }
1017
+ .border-transparent{
1018
+ border-color: transparent;
1019
+ }
1020
+ .border-r-transparent{
1021
+ border-right-color: transparent;
1022
+ }
1023
+ .bg-0d151d{
1024
+ --tw-bg-opacity: 1;
1025
+ background-color: rgb(13 21 29 / var(--tw-bg-opacity));
1026
+ }
1027
+ .bg-black\\/50{
1028
+ background-color: rgb(0 0 0 / 0.5);
1029
+ }
1030
+ .bg-d3dfea\\/30{
1031
+ background-color: rgb(211 223 234 / 0.3);
1032
+ }
1033
+ .bg-gray-100{
1034
+ --tw-bg-opacity: 1;
1035
+ background-color: rgb(243 244 246 / var(--tw-bg-opacity));
1036
+ }
1037
+ .bg-green-100{
1038
+ --tw-bg-opacity: 1;
1039
+ background-color: rgb(220 252 231 / var(--tw-bg-opacity));
1040
+ }
1041
+ .bg-green-500{
1042
+ --tw-bg-opacity: 1;
1043
+ background-color: rgb(34 197 94 / var(--tw-bg-opacity));
1044
+ }
1045
+ .bg-indigo-600{
1046
+ --tw-bg-opacity: 1;
1047
+ background-color: rgb(79 70 229 / var(--tw-bg-opacity));
1048
+ }
1049
+ .bg-red-100{
1050
+ --tw-bg-opacity: 1;
1051
+ background-color: rgb(254 226 226 / var(--tw-bg-opacity));
1052
+ }
1053
+ .bg-red-500{
1054
+ --tw-bg-opacity: 1;
1055
+ background-color: rgb(239 68 68 / var(--tw-bg-opacity));
1056
+ }
1057
+ .bg-white{
1058
+ --tw-bg-opacity: 1;
1059
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
1060
+ }
1061
+ .\\!p-0{
1062
+ padding: 0px !important;
1063
+ }
1064
+ .p-2{
1065
+ padding: 0.5rem;
1066
+ }
1067
+ .p-5{
1068
+ padding: 1.25rem;
1069
+ }
1070
+ .px-12{
1071
+ padding-left: 3rem;
1072
+ padding-right: 3rem;
1073
+ }
1074
+ .px-2{
1075
+ padding-left: 0.5rem;
1076
+ padding-right: 0.5rem;
1077
+ }
1078
+ .px-4{
1079
+ padding-left: 1rem;
1080
+ padding-right: 1rem;
1081
+ }
1082
+ .px-5{
1083
+ padding-left: 1.25rem;
1084
+ padding-right: 1.25rem;
1085
+ }
1086
+ .px-8{
1087
+ padding-left: 2rem;
1088
+ padding-right: 2rem;
1089
+ }
1090
+ .py-1{
1091
+ padding-top: 0.25rem;
1092
+ padding-bottom: 0.25rem;
1093
+ }
1094
+ .py-2{
1095
+ padding-top: 0.5rem;
1096
+ padding-bottom: 0.5rem;
1097
+ }
1098
+ .py-3{
1099
+ padding-top: 0.75rem;
1100
+ padding-bottom: 0.75rem;
1101
+ }
1102
+ .py-4{
1103
+ padding-top: 1rem;
1104
+ padding-bottom: 1rem;
1105
+ }
1106
+ .pb-10{
1107
+ padding-bottom: 2.5rem;
1108
+ }
1109
+ .pt-6{
1110
+ padding-top: 1.5rem;
1111
+ }
1112
+ .text-left{
1113
+ text-align: left;
1114
+ }
1115
+ .text-center{
1116
+ text-align: center;
1117
+ }
1118
+ .align-\\[-0\\.125em\\]{
1119
+ vertical-align: -0.125em;
1120
+ }
1121
+ .font-sans{
1122
+ font-family: Rubik, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
1123
+ }
1124
+ .font-sora{
1125
+ font-family: Sora, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
1126
+ }
1127
+ .text-2xl{
1128
+ font-size: 1.5rem;
1129
+ line-height: 2rem;
1130
+ }
1131
+ .text-lg{
1132
+ font-size: 1.125rem;
1133
+ line-height: 1.75rem;
1134
+ }
1135
+ .text-sm{
1136
+ font-size: 0.875rem;
1137
+ line-height: 1.25rem;
1138
+ }
1139
+ .text-xs{
1140
+ font-size: 0.75rem;
1141
+ line-height: 1rem;
1142
+ }
1143
+ .font-medium{
1144
+ font-weight: 500;
1145
+ }
1146
+ .font-normal{
1147
+ font-weight: 400;
1148
+ }
1149
+ .font-semibold{
1150
+ font-weight: 600;
1151
+ }
1152
+ .uppercase{
1153
+ text-transform: uppercase;
1154
+ }
1155
+ .text-0d151d{
1156
+ --tw-text-opacity: 1;
1157
+ color: rgb(13 21 29 / var(--tw-text-opacity));
1158
+ }
1159
+ .text-29343f{
1160
+ --tw-text-opacity: 1;
1161
+ color: rgb(41 52 63 / var(--tw-text-opacity));
1162
+ }
1163
+ .text-4940e0{
1164
+ --tw-text-opacity: 1;
1165
+ color: rgb(73 64 224 / var(--tw-text-opacity));
1166
+ }
1167
+ .text-70868f{
1168
+ --tw-text-opacity: 1;
1169
+ color: rgb(112 134 143 / var(--tw-text-opacity));
1170
+ }
1171
+ .text-9eafc0{
1172
+ --tw-text-opacity: 1;
1173
+ color: rgb(158 175 192 / var(--tw-text-opacity));
1174
+ }
1175
+ .text-black{
1176
+ --tw-text-opacity: 1;
1177
+ color: rgb(0 0 0 / var(--tw-text-opacity));
1178
+ }
1179
+ .text-gray-400{
1180
+ --tw-text-opacity: 1;
1181
+ color: rgb(156 163 175 / var(--tw-text-opacity));
1182
+ }
1183
+ .text-gray-900{
1184
+ --tw-text-opacity: 1;
1185
+ color: rgb(17 24 39 / var(--tw-text-opacity));
1186
+ }
1187
+ .text-white{
1188
+ --tw-text-opacity: 1;
1189
+ color: rgb(255 255 255 / var(--tw-text-opacity));
1190
+ }
1191
+ .shadow{
1192
+ --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
1193
+ --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
1194
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1195
+ }
1196
+ .shadow-sm{
1197
+ --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
1198
+ --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);
1199
+ box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1200
+ }
1201
+ .filter{
1202
+ filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
1203
+ }
1204
+ .backdrop-blur-lg{
1205
+ --tw-backdrop-blur: blur(16px);
1206
+ -webkit-backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
1207
+ backdrop-filter: var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);
1208
+ }
1209
+ .transition{
1210
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;
1211
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
1212
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;
1213
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
1214
+ transition-duration: 150ms;
1215
+ }
1216
+ input[type='number']::-webkit-inner-spin-button,
1217
+ input[type='number']::-webkit-outer-spin-button{
1218
+ -webkit-appearance: none;
1219
+ appearance: none;
1220
+ }
1221
+ .\\!\\[clip\\:rect\\(0\\2c 0\\2c 0\\2c 0\\)\\]{
1222
+ clip: rect(0,0,0,0) !important;
1223
+ }
1224
+ .hover\\:bg-indigo-700:hover{
1225
+ --tw-bg-opacity: 1;
1226
+ background-color: rgb(67 56 202 / var(--tw-bg-opacity));
1227
+ }
1228
+ .hover\\:underline:hover{
1229
+ text-decoration-line: underline;
1230
+ }
1231
+ .focus\\:outline-none:focus{
1232
+ outline: 2px solid transparent;
1233
+ outline-offset: 2px;
1234
+ }
1235
+ .focus\\:ring-2:focus{
1236
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1237
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1238
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1239
+ }
1240
+ .focus\\:ring-indigo-500:focus{
1241
+ --tw-ring-opacity: 1;
1242
+ --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));
1243
+ }
1244
+ .focus\\:ring-offset-2:focus{
1245
+ --tw-ring-offset-width: 2px;
1246
+ }
1247
+ .focus-visible\\:ring:focus-visible{
1248
+ --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
1249
+ --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);
1250
+ box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
1251
+ }
1252
+ .focus-visible\\:ring-purple-500\\/75:focus-visible{
1253
+ --tw-ring-color: rgb(168 85 247 / 0.75);
1254
+ }
1255
+ .disabled\\:cursor-not-allowed:disabled{
1256
+ cursor: not-allowed;
1257
+ }
1258
+ .disabled\\:opacity-40:disabled{
1259
+ opacity: 0.4;
1260
+ }
1261
+ .disabled\\:hover\\:bg-indigo-600:hover:disabled{
1262
+ --tw-bg-opacity: 1;
1263
+ background-color: rgb(79 70 229 / var(--tw-bg-opacity));
1264
+ }
1265
+ @media (prefers-reduced-motion: reduce){
1266
+ @keyframes spin{
1267
+ to{
1268
+ transform: rotate(360deg);
1269
+ }
1270
+ }
1271
+ .motion-reduce\\:animate-\\[spin_1\\.5s_linear_infinite\\]{
1272
+ animation: spin 1.5s linear infinite;
1273
+ }
1274
+ }
1275
+ :is(.dark .dark\\:border-f1f5f8\\/10){
1276
+ border-color: rgb(241 245 248 / 0.1);
1277
+ }
1278
+ :is(.dark .dark\\:bg-0d151d){
1279
+ --tw-bg-opacity: 1;
1280
+ background-color: rgb(13 21 29 / var(--tw-bg-opacity));
1281
+ }
1282
+ :is(.dark .dark\\:bg-29343f){
1283
+ --tw-bg-opacity: 1;
1284
+ background-color: rgb(41 52 63 / var(--tw-bg-opacity));
1285
+ }
1286
+ :is(.dark .dark\\:bg-d3dfea\\/15){
1287
+ background-color: rgb(211 223 234 / .15);
1288
+ }
1289
+ :is(.dark .dark\\:bg-white){
1290
+ --tw-bg-opacity: 1;
1291
+ background-color: rgb(255 255 255 / var(--tw-bg-opacity));
1292
+ }
1293
+ :is(.dark .dark\\:text-0d151d){
1294
+ --tw-text-opacity: 1;
1295
+ color: rgb(13 21 29 / var(--tw-text-opacity));
1296
+ }
1297
+ :is(.dark .dark\\:text-9eafc0){
1298
+ --tw-text-opacity: 1;
1299
+ color: rgb(158 175 192 / var(--tw-text-opacity));
1300
+ }
1301
+ :is(.dark .dark\\:text-white){
1302
+ --tw-text-opacity: 1;
1303
+ color: rgb(255 255 255 / var(--tw-text-opacity));
1304
+ }
1305
+ @media (min-width: 768px){
1306
+ .md\\:mt-2{
1307
+ margin-top: 0.5rem;
1308
+ }
1309
+ .md\\:hidden{
1310
+ display: none;
1311
+ }
1312
+ .md\\:max-w-md{
1313
+ max-width: 28rem;
1314
+ }
1315
+ .md\\:items-center{
1316
+ align-items: center;
1317
+ }
1318
+ .md\\:overflow-y-auto{
1319
+ overflow-y: auto;
1320
+ }
1321
+ .md\\:rounded-b-2xl{
1322
+ border-bottom-right-radius: 1rem;
1323
+ border-bottom-left-radius: 1rem;
1324
+ }
1325
+ .md\\:p-4{
1326
+ padding: 1rem;
1327
+ }
1328
+ }
1329
+ `;
1330
+
1331
+ // src/components/Styles.tsx
1332
+ import { jsx as jsx3 } from "react/jsx-runtime";
1333
+ var Styles = () => /* @__PURE__ */ jsx3("style", { children: styles_default });
1334
+ var Styles_default = Styles;
1335
+
1336
+ // src/components/IDKitWidget/BaseWidget.tsx
1337
+ import { shallow as shallow2 } from "zustand/shallow";
1338
+
1339
+ // src/components/Icons/XMarkIcon.tsx
1340
+ import { jsx as jsx4 } from "react/jsx-runtime";
1341
+ var XMarkIcon = (props) => /* @__PURE__ */ jsx4("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: /* @__PURE__ */ jsx4(
1342
+ "path",
1343
+ {
1344
+ strokeWidth: "1.5",
1345
+ stroke: "currentColor",
1346
+ strokeLinecap: "round",
1347
+ strokeLinejoin: "round",
1348
+ d: "m16.243 7.758-8.485 8.485m8.485 0L7.758 7.758"
1349
+ }
1350
+ ) });
1351
+ var XMarkIcon_default = XMarkIcon;
1352
+
1353
+ // src/components/IDKitWidget/States/ErrorState.tsx
1354
+ import { AppErrorCodes } from "@worldcoin/idkit-core";
1355
+ import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
1356
+ var getParams = ({ retryFlow, errorState }) => ({ retryFlow, errorState });
1357
+ var ERROR_TITLES = {
1358
+ [AppErrorCodes.FailedByHostApp]: __("Verification Declined"),
1359
+ [AppErrorCodes.GenericError]: __("Verification Failed")
1360
+ };
1361
+ var ERROR_MESSAGES = {
1362
+ [AppErrorCodes.ConnectionFailed]: __("Connection to the World App or identity wallet failed. Please try again."),
1363
+ [AppErrorCodes.VerificationRejected]: __("Verification request rejected in the World App."),
1364
+ [AppErrorCodes.MaxVerificationsReached]: __(
1365
+ "You have already verified the maximum number of times for this action."
1366
+ ),
1367
+ [AppErrorCodes.AlreadySigned]: __("You have already verified for this action."),
1368
+ [AppErrorCodes.CredentialUnavailable]: __("It seems you do not have the credential required by this app."),
1369
+ [AppErrorCodes.MalformedRequest]: __(
1370
+ "There was a problem with this request. Please try again or contact the app owner."
1371
+ ),
1372
+ [AppErrorCodes.InvalidNetwork]: __(
1373
+ "This app is not available on the network you are connected to. Visit docs.worldcoin.org/test for details."
1374
+ ),
1375
+ [AppErrorCodes.InclusionProofFailed]: __("There was an issue fetching your credential. Please try again."),
1376
+ [AppErrorCodes.InclusionProofPending]: __(
1377
+ "Your credential is still being registered. Please wait a few minutes and try again."
1378
+ ),
1379
+ [AppErrorCodes.FailedByHostApp]: __("Verification failed by the app. Please contact the app owner for details."),
1380
+ [AppErrorCodes.UnexpectedResponse]: __(
1381
+ "Unexpected response from the World App or identity wallet. Please try again."
1382
+ ),
1383
+ [AppErrorCodes.GenericError]: __("Something unexpected went wrong. Please try again.")
1384
+ };
1385
+ var ErrorState = () => {
1386
+ const { retryFlow, errorState } = idkit_default(getParams);
1387
+ return /* @__PURE__ */ jsxs2("div", { className: "space-y-8", children: [
1388
+ /* @__PURE__ */ jsx5("div", { className: "-mt-5 flex items-center justify-center", children: /* @__PURE__ */ jsx5("div", { className: "inline-flex aspect-square items-center justify-center rounded-full bg-red-100 p-5", children: /* @__PURE__ */ jsx5("div", { className: "flex aspect-square items-center justify-center rounded-full bg-red-500 p-5", children: /* @__PURE__ */ jsx5(XMarkIcon_default, { className: "w-8 text-white" }) }) }) }),
1389
+ /* @__PURE__ */ jsxs2("div", { children: [
1390
+ /* @__PURE__ */ jsx5("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: errorState?.code && ERROR_TITLES[errorState.code] || ERROR_TITLES[AppErrorCodes.GenericError] }),
1391
+ /* @__PURE__ */ jsx5("p", { className: "mt-2 text-center text-lg text-gray-400", children: errorState?.message || ERROR_MESSAGES[errorState?.code ?? AppErrorCodes.GenericError] })
1392
+ ] }),
1393
+ /* @__PURE__ */ jsx5("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx5(
1394
+ "button",
1395
+ {
1396
+ type: "button",
1397
+ onClick: retryFlow,
1398
+ className: "inline-flex items-center rounded-full border border-transparent bg-indigo-600 px-8 py-3 font-medium text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:bg-indigo-600",
1399
+ children: __("Try Again")
1400
+ }
1401
+ ) }),
1402
+ /* @__PURE__ */ jsx5("div", { children: /* @__PURE__ */ jsx5("p", { className: "mt-4 text-xs text-gray-400", children: __("If you are the app owner, check the console for further details.") }) })
1403
+ ] });
1404
+ };
1405
+ var ErrorState_default = ErrorState;
1406
+
1407
+ // src/components/Icons/LoadingIcon.tsx
1408
+ import { jsx as jsx6 } from "react/jsx-runtime";
1409
+ var LoadingIcon = ({ className = "" }) => /* @__PURE__ */ jsx6("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx6(
1410
+ "div",
1411
+ {
1412
+ className: `inline-block h-8 w-8 animate-spin rounded-full border-4 border-solid border-current border-r-transparent align-[-0.125em] motion-reduce:animate-[spin_1.5s_linear_infinite] ${className}`,
1413
+ role: "status",
1414
+ children: /* @__PURE__ */ jsx6("span", { className: "!absolute !-m-px !h-px !w-px !overflow-hidden !whitespace-nowrap !border-0 !p-0 ![clip:rect(0,0,0,0)]", children: __("Loading...") })
1415
+ }
1416
+ ) });
1417
+ var LoadingIcon_default = LoadingIcon;
1418
+
1419
+ // src/components/IDKitWidget/BaseWidget.tsx
1420
+ import * as Toast from "@radix-ui/react-toast";
1421
+
1422
+ // public/images/verified.webp
1423
+ var verified_default = "./verified-O6D4JQCX.webp";
1424
+
1425
+ // src/components/WorldIDIcon.tsx
1426
+ import { Fragment, jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
1427
+ var WorldIDIcon = ({ border, size = "sm", ...props }) => {
1428
+ const heightWidth = size === "md" ? 36 : 24;
1429
+ return /* @__PURE__ */ jsxs3(Fragment, { children: [
1430
+ border && /* @__PURE__ */ jsx7(
1431
+ "svg",
1432
+ {
1433
+ className: classNames(
1434
+ border,
1435
+ "absolute left-1/2 top-1/2 w-[34px] -mt-[2px] transform -translate-x-1/2 -translate-y-1/2"
1436
+ ),
1437
+ xmlns: "http://www.w3.org/2000/svg",
1438
+ fill: "currentColor",
1439
+ viewBox: "0 0 26 26",
1440
+ children: /* @__PURE__ */ jsx7("path", { d: "M8.382 2.244a6.938 6.938 0 0 1 9.236 0l1.626 1.451c.346.308.722.581 1.122.815l1.882 1.098a6.937 6.937 0 0 1 2.854 8.784l-.877 1.995c-.187.424-.33.866-.428 1.319l-.463 2.129a6.938 6.938 0 0 1-7.473 5.429l-2.168-.218a6.934 6.934 0 0 0-1.386 0l-2.168.218a6.938 6.938 0 0 1-7.473-5.429l-.463-2.13a6.937 6.937 0 0 0-.428-1.318l-.877-1.995a6.938 6.938 0 0 1 2.854-8.784L5.634 4.51c.4-.234.776-.507 1.122-.815l1.626-1.45Z" })
1441
+ }
1442
+ ),
1443
+ /* @__PURE__ */ jsx7("img", { src: verified_default, ...props, alt: "Verified", width: heightWidth, height: heightWidth })
1444
+ ] });
1445
+ };
1446
+ var WorldIDIcon_default = WorldIDIcon;
1447
+
1448
+ // src/components/Icons/InfoIcon.tsx
1449
+ import { jsx as jsx8 } from "react/jsx-runtime";
1450
+ var InfoIcon = (props) => /* @__PURE__ */ jsx8("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 16 16", children: /* @__PURE__ */ jsx8(
1451
+ "path",
1452
+ {
1453
+ fill: "currentColor",
1454
+ fillRule: "evenodd",
1455
+ d: "M14.665 7.999a6.667 6.667 0 1 1-13.333 0 6.667 6.667 0 0 1 13.333 0Zm-6-3.334a.667.667 0 1 1-1.333 0 .667.667 0 0 1 1.333 0Zm-1.333 1.5a.5.5 0 0 0 0 1h.167v4.167a.5.5 0 1 0 1 0V6.665a.5.5 0 0 0-.5-.5h-.667Z",
1456
+ clipRule: "evenodd"
1457
+ }
1458
+ ) });
1459
+ var InfoIcon_default = InfoIcon;
1460
+
1461
+ // src/components/IDKitWidget/States/PrivacyState.tsx
1462
+ import { jsx as jsx9, jsxs as jsxs4 } from "react/jsx-runtime";
1463
+ var PrivacyState = () => {
1464
+ return /* @__PURE__ */ jsxs4("div", { className: "-mt-6 flex flex-col items-center justify-center space-y-6 font-sans text-sm", children: [
1465
+ /* @__PURE__ */ jsx9(WorldIDIcon_default, { className: "h-12 w-12" }),
1466
+ /* @__PURE__ */ jsx9("p", { className: "text-center text-2xl font-semibold dark:text-white", children: __("Privacy preserving to the core.") }),
1467
+ /* @__PURE__ */ jsxs4("ul", { className: "text-9eafc0 mb-6 list-disc space-y-3 px-12 dark:text-white", children: [
1468
+ /* @__PURE__ */ jsx9("li", { className: "text-left", children: __(
1469
+ "World ID uses Zero-Knowledge Proofs to make it cryptographically impossible to track persons across applications."
1470
+ ) }),
1471
+ /* @__PURE__ */ jsx9("li", { className: "text-left", children: __("Orb biometrics analyzed by the Orb are not stored.") }),
1472
+ /* @__PURE__ */ jsxs4("li", { className: "text-left ", children: [
1473
+ __("Code and hardware are open source or source available on"),
1474
+ " ",
1475
+ /* @__PURE__ */ jsx9(
1476
+ "a",
1477
+ {
1478
+ href: "https://github.com/worldcoin/idkit-js",
1479
+ target: "_blank",
1480
+ className: "text-4940e0",
1481
+ rel: "noreferrer",
1482
+ children: "GitHub"
1483
+ }
1484
+ ),
1485
+ "."
1486
+ ] })
1487
+ ] }),
1488
+ /* @__PURE__ */ jsxs4("div", { className: "text-9eafc0 dark:text-9eafc0 -ml-4 flex items-center space-x-3", children: [
1489
+ /* @__PURE__ */ jsx9(InfoIcon_default, { className: "h-4 w-4 " }),
1490
+ /* @__PURE__ */ jsx9("p", { className: "whitespace-nowrap text-sm font-medium", children: __("Biometrics are never shared.") })
1491
+ ] })
1492
+ ] });
1493
+ };
1494
+ var PrivacyState_default = PrivacyState;
1495
+
1496
+ // src/components/Icons/CheckIcon.tsx
1497
+ import { jsx as jsx10 } from "react/jsx-runtime";
1498
+ var CheckIcon = (props) => /* @__PURE__ */ jsx10("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 11 8", children: /* @__PURE__ */ jsx10(
1499
+ "path",
1500
+ {
1501
+ stroke: "currentColor",
1502
+ strokeLinecap: "round",
1503
+ strokeLinejoin: "round",
1504
+ strokeWidth: "1.6",
1505
+ d: "M9.868 1 3.771 7 1 4.273"
1506
+ }
1507
+ ) });
1508
+ var CheckIcon_default = CheckIcon;
1509
+
1510
+ // src/components/IDKitWidget/States/SuccessState.tsx
1511
+ import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
1512
+ var SuccessState = () => {
1513
+ return /* @__PURE__ */ jsxs5("div", { className: "space-y-6", children: [
1514
+ /* @__PURE__ */ jsx11("div", { className: "-mt-5 flex items-center justify-center", children: /* @__PURE__ */ jsx11("div", { className: "inline-flex aspect-square items-center justify-center rounded-full bg-green-100 p-5", children: /* @__PURE__ */ jsx11("div", { className: "flex aspect-square items-center justify-center rounded-full bg-green-500 p-5", children: /* @__PURE__ */ jsx11(CheckIcon_default, { className: "w-8 text-white" }) }) }) }),
1515
+ /* @__PURE__ */ jsxs5("div", { children: [
1516
+ /* @__PURE__ */ jsx11("p", { className: "text-center text-2xl font-semibold text-gray-900 dark:text-white", children: __("Success! \u{1F389}") }),
1517
+ /* @__PURE__ */ jsx11("p", { className: "text-70868f mt-2 text-center text-lg", children: __("World ID verification was successful") })
1518
+ ] })
1519
+ ] });
1520
+ };
1521
+ var SuccessState_default = SuccessState;
1522
+
1523
+ // src/components/IDKitWidget/States/WorldID/QRState.tsx
1524
+ import copy from "copy-to-clipboard";
1525
+ import { useCallback, useState as useState2 } from "react";
1526
+ import { AnimatePresence, motion as motion2 } from "framer-motion";
1527
+ import { Fragment as Fragment2, jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
1528
+ var QRState = ({ qrData, showQR, setShowQR }) => {
1529
+ const media = useMedia_default();
1530
+ const [copiedLink, setCopiedLink] = useState2(false);
1531
+ const copyLink = useCallback(() => {
1532
+ copy(qrData ?? "");
1533
+ setCopiedLink(true);
1534
+ setTimeout(() => setCopiedLink(false), 2e3);
1535
+ }, [qrData]);
1536
+ return /* @__PURE__ */ jsxs6(Fragment2, { children: [
1537
+ (media == "desktop" || showQR) && /* @__PURE__ */ jsxs6(Fragment2, { children: [
1538
+ /* @__PURE__ */ jsx12(AnimatePresence, { children: copiedLink && /* @__PURE__ */ jsx12(
1539
+ motion2.div,
1540
+ {
1541
+ className: "text-sm text-9eafc0",
1542
+ initial: "hidden",
1543
+ animate: "visible",
1544
+ exit: "exit",
1545
+ variants: {
1546
+ hidden: { opacity: 0, height: 0, marginTop: 0, y: 0 },
1547
+ visible: {
1548
+ opacity: 1,
1549
+ height: "auto",
1550
+ marginTop: 8,
1551
+ y: 6,
1552
+ transition: {
1553
+ duration: 0.25,
1554
+ opacity: { delay: 0.05, duration: 0.2 },
1555
+ ease: "easeInOut"
1556
+ }
1557
+ },
1558
+ exit: {
1559
+ opacity: 0,
1560
+ height: 0,
1561
+ marginTop: 0,
1562
+ y: 0,
1563
+ transition: {
1564
+ duration: 0.4,
1565
+ delay: 0.1,
1566
+ opacity: { duration: 0.25, delay: 0 },
1567
+ ease: "easeInOut"
1568
+ }
1569
+ }
1570
+ },
1571
+ children: /* @__PURE__ */ jsx12("span", { className: "rounded-lg border border-f1f5f8 px-2 py-1 text-sm", children: __("QR Code copied") })
1572
+ },
1573
+ "copied"
1574
+ ) }),
1575
+ /* @__PURE__ */ jsx12("div", { className: "relative inline-flex items-center justify-center rounded-2xl border border-f1f5f8 p-2 dark:border-f1f5f8/10", children: /* @__PURE__ */ jsx12("div", { className: "text-29343f dark:text-white", children: qrData ? (
1576
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
1577
+ /* @__PURE__ */ jsx12("div", { onClick: copyLink, className: "cursor-pointer", children: /* @__PURE__ */ jsx12(QRCode_default, { data: qrData, size: 244 }) })
1578
+ ) : /* @__PURE__ */ jsx12("div", { className: "flex h-[244px] w-[244px] items-center justify-center", children: /* @__PURE__ */ jsx12(LoadingIcon_default, { className: "h-[72px] w-[72px]" }) }) }) })
1579
+ ] }),
1580
+ /* @__PURE__ */ jsxs6("div", { className: "space-y-4", children: [
1581
+ /* @__PURE__ */ jsxs6(
1582
+ motion2.a,
1583
+ {
1584
+ href: qrData ?? "",
1585
+ whileTap: { scale: 0.95 },
1586
+ whileHover: { scale: 1.05 },
1587
+ transition: { layout: { duration: 0.15 } },
1588
+ layoutId: media == "desktop" ? void 0 : "worldid-button",
1589
+ className: classNames(
1590
+ "flex w-full space-x-2 items-center px-4 py-4 border border-transparent font-medium rounded-2xl shadow-sm",
1591
+ "bg-0d151d dark:bg-white text-white dark:text-0d151d md:hidden"
1592
+ ),
1593
+ children: [
1594
+ /* @__PURE__ */ jsx12(WorldcoinIcon_default, { className: "h-5 w-5" }),
1595
+ /* @__PURE__ */ jsx12(
1596
+ motion2.span,
1597
+ {
1598
+ className: "flex-1 text-center",
1599
+ transition: { layout: { duration: 0.15 } },
1600
+ layoutId: media == "desktop" ? void 0 : "worldid-text",
1601
+ children: __("Open Worldcoin App")
1602
+ }
1603
+ )
1604
+ ]
1605
+ }
1606
+ ),
1607
+ /* @__PURE__ */ jsxs6("div", { className: "space-x-2 md:hidden", children: [
1608
+ /* @__PURE__ */ jsx12(motion2.button, { className: "text-sm text-9eafc0", onClick: () => setShowQR((state) => !state), children: showQR ? __("Hide QR Code") : __("Show QR Code instead") }),
1609
+ showQR && /* @__PURE__ */ jsxs6(Fragment2, { children: [
1610
+ /* @__PURE__ */ jsx12("span", { className: "text-9eafc0", children: "\xB7" }),
1611
+ /* @__PURE__ */ jsx12("button", { className: "text-sm dark:text-white", onClick: copyLink, children: copiedLink ? __("Copied!") : __("Copy QR Code") })
1612
+ ] })
1613
+ ] })
1614
+ ] })
1615
+ ] });
1616
+ };
1617
+ var QRState_default = QRState;
1618
+
1619
+ // src/components/IDKitWidget/States/WorldIDState.tsx
1620
+ import { shallow } from "zustand/shallow";
1621
+ import { useEffect as useEffect4, useState as useState3 } from "react";
1622
+
1623
+ // src/components/Icons/LockIcon.tsx
1624
+ import { jsx as jsx13 } from "react/jsx-runtime";
1625
+ var LockIcon = (props) => /* @__PURE__ */ jsx13("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 12 14", children: /* @__PURE__ */ jsx13(
1626
+ "path",
1627
+ {
1628
+ fill: "currentColor",
1629
+ fillRule: "evenodd",
1630
+ d: "M6 0a3.555 3.555 0 0 0-3.563 3.547v.052A3.001 3.001 0 0 0 0 6.547V11a3 3 0 0 0 3 3h6a3 3 0 0 0 3-3V6.547a3.001 3.001 0 0 0-2.438-2.948v-.052A3.555 3.555 0 0 0 5.999 0Zm2.437 3.547A2.432 2.432 0 0 0 5.999 1.12a2.432 2.432 0 0 0-2.437 2.427h4.875ZM7.5 8.773c0 .825-.671 1.494-1.5 1.494-.828 0-1.5-.669-1.5-1.494 0-.824.672-1.493 1.5-1.493.829 0 1.5.669 1.5 1.493Z",
1631
+ clipRule: "evenodd"
1632
+ }
1633
+ ) });
1634
+ var LockIcon_default = LockIcon;
1635
+
1636
+ // src/components/Icons/HumanIcon.tsx
1637
+ import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
1638
+ var HumanIcon = (props) => /* @__PURE__ */ jsxs7("svg", { ...props, xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 10 14", children: [
1639
+ /* @__PURE__ */ jsx14(
1640
+ "path",
1641
+ {
1642
+ fill: "currentColor",
1643
+ d: "M9.98 3.6c-.08-.345-.392-.553-.732-.477-.093.021-2.59.754-4.236.768C3.36 3.877.87 3.144.776 3.123a.629.629 0 0 0-.76.477.64.64 0 0 0 .467.767c.433.111 1.139.318 2.83.72 0 0-.02 2.28-.093 3.663-.1 1.99-.672 4.424-.672 4.424-.1.463.126.74.406.801.573.125.76-.276.826-.56l1.092-4.16A.128.128 0 0 1 5 9.164c.053 0 .106.027.126.09l1.093 4.16c.066.284.253.685.825.56.28-.062.507-.338.407-.801 0 0-.566-2.433-.673-4.424-.073-1.383-.093-3.664-.093-3.664 1.698-.4 2.398-.608 2.83-.719a.637.637 0 0 0 .467-.767Z"
1644
+ }
1645
+ ),
1646
+ /* @__PURE__ */ jsx14(
1647
+ "path",
1648
+ {
1649
+ fill: "currentColor",
1650
+ d: "M5.007 3.11a1.55 1.55 0 0 0 1.539-1.555C6.546.698 5.86 0 5.007 0A1.55 1.55 0 0 0 3.47 1.555c0 .857.686 1.555 1.538 1.555Z"
1651
+ }
1652
+ )
1653
+ ] });
1654
+ var HumanIcon_default = HumanIcon;
1655
+
1656
+ // src/components/AboutWorldID.tsx
1657
+ import { jsx as jsx15, jsxs as jsxs8 } from "react/jsx-runtime";
1658
+ var AboutWorldID = ({ className }) => {
1659
+ return /* @__PURE__ */ jsxs8("div", { className: classNames(className, "space-y-4 text-left"), children: [
1660
+ /* @__PURE__ */ jsx15("p", { className: "text-0d151d text-sm font-medium uppercase dark:text-white", children: __("What is World ID?") }),
1661
+ /* @__PURE__ */ jsxs8("div", { className: "space-y-3", children: [
1662
+ /* @__PURE__ */ jsx15(FeatureHighlight, { title: "Your global digital ID", icon: HumanIcon_default, children: /* @__PURE__ */ jsx15("p", { children: __("With Worldcoin and World ID sign in seamlessly and prove you are a unique human.") }) }),
1663
+ /* @__PURE__ */ jsx15(FeatureHighlight, { title: "Privacy-preserving", icon: LockIcon_default, children: /* @__PURE__ */ jsx15("p", { children: __("Maximum privacy. Prevents cross-tracking and can be used fully anonymously.") }) })
1664
+ ] })
1665
+ ] });
1666
+ };
1667
+ var FeatureHighlight = ({ icon: Icon, title, children }) => /* @__PURE__ */ jsxs8("div", { className: "flex space-x-6", children: [
1668
+ /* @__PURE__ */ jsx15("div", { className: "bg-d3dfea/30 dark:bg-29343f flex aspect-square h-8 w-8 items-center justify-center rounded-full", children: /* @__PURE__ */ jsx15(Icon, { className: "text-0d151d h-3 w-3 dark:text-white" }) }),
1669
+ /* @__PURE__ */ jsxs8("div", { children: [
1670
+ /* @__PURE__ */ jsx15("p", { className: "text-0d151d font-medium dark:text-white", children: title }),
1671
+ /* @__PURE__ */ jsx15("div", { className: "text-9eafc0 dark:text-9eafc0 mt-[2px] text-sm font-normal", children })
1672
+ ] })
1673
+ ] });
1674
+ var AboutWorldID_default = AboutWorldID;
1675
+
1676
+ // src/services/wld-bridge.ts
1677
+ import { useEffect as useEffect3, useRef } from "react";
1678
+ import { useWorldBridgeStore } from "@worldcoin/idkit-core";
1679
+ var useWorldBridge = (app_id, action, signal, bridge_url, credential_types, action_description) => {
1680
+ const ref_credential_types = useRef(credential_types);
1681
+ const { reset, result, connectorURI, createClient, pollForUpdates, verificationState, errorCode } = useWorldBridgeStore();
1682
+ useEffect3(() => {
1683
+ if (!app_id)
1684
+ return;
1685
+ if (!connectorURI) {
1686
+ void createClient(app_id, action, signal, bridge_url, ref_credential_types.current, action_description);
1687
+ }
1688
+ }, [app_id, action, signal, action_description, createClient, ref_credential_types, bridge_url, connectorURI]);
1689
+ useEffect3(() => {
1690
+ if (!connectorURI || result || errorCode)
1691
+ return;
1692
+ const interval = setInterval(() => void pollForUpdates(), 3e3);
1693
+ return () => clearInterval(interval);
1694
+ }, [connectorURI, pollForUpdates, errorCode, result]);
1695
+ return { connectorURI, reset, result, verificationState, errorCode };
1696
+ };
1697
+
1698
+ // src/components/IDKitWidget/States/WorldIDState.tsx
1699
+ import { AppErrorCodes as AppErrorCodes2, VerificationState } from "@worldcoin/idkit-core";
1700
+ import { jsx as jsx16, jsxs as jsxs9 } from "react/jsx-runtime";
1701
+ var getOptions = (store) => ({
1702
+ signal: store.signal,
1703
+ app_id: store.app_id,
1704
+ action: store.action,
1705
+ setStage: store.setStage,
1706
+ bridge_url: store.bridge_url,
1707
+ handleVerify: store.handleVerify,
1708
+ setErrorState: store.setErrorState,
1709
+ credential_types: store.credential_types,
1710
+ action_description: store.action_description
1711
+ });
1712
+ var WorldIDState = () => {
1713
+ const media = useMedia_default();
1714
+ const [showQR, setShowQR] = useState3(false);
1715
+ const {
1716
+ app_id,
1717
+ action,
1718
+ signal,
1719
+ setStage,
1720
+ handleVerify,
1721
+ bridge_url,
1722
+ action_description,
1723
+ credential_types,
1724
+ setErrorState
1725
+ } = idkit_default(getOptions, shallow);
1726
+ const { connectorURI, reset, errorCode, result, verificationState } = useWorldBridge(
1727
+ app_id,
1728
+ action,
1729
+ signal,
1730
+ bridge_url,
1731
+ credential_types,
1732
+ action_description
1733
+ );
1734
+ useEffect4(() => reset, [reset]);
1735
+ useEffect4(() => {
1736
+ if (verificationState === VerificationState.Failed) {
1737
+ setStage("ERROR" /* ERROR */);
1738
+ setErrorState({ code: errorCode ?? AppErrorCodes2.GenericError });
1739
+ }
1740
+ if (result) {
1741
+ return handleVerify(result);
1742
+ }
1743
+ }, [result, reset, handleVerify, verificationState, setStage, errorCode, setErrorState]);
1744
+ return /* @__PURE__ */ jsxs9("div", { className: "-mt-6 space-y-6", children: [
1745
+ /* @__PURE__ */ jsxs9("div", { children: [
1746
+ /* @__PURE__ */ jsx16("div", { className: "mb-2 flex items-center justify-center", children: /* @__PURE__ */ jsx16(WorldcoinIcon_default, { className: "h-8 text-0d151d dark:text-white" }) }),
1747
+ /* @__PURE__ */ jsx16("p", { className: "text-center font-sora text-2xl font-semibold text-gray-900 dark:text-white", children: verificationState === VerificationState.WaitingForApp ? __("Confirm in World App") : __("Continue with Worldcoin") }),
1748
+ verificationState === VerificationState.WaitingForApp && /* @__PURE__ */ jsx16("p", { className: "mt-3 text-center text-70868f dark:text-9eafc0 md:mt-2", children: "Please confirm the request in your app to continue." })
1749
+ ] }),
1750
+ verificationState === VerificationState.WaitingForApp ? /* @__PURE__ */ jsx16("div", { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx16(LoadingIcon_default, { className: "h-20 w-20" }) }) : /* @__PURE__ */ jsx16(QRState_default, { showQR, setShowQR, qrData: connectorURI }),
1751
+ (media == "desktop" || !showQR) && /* @__PURE__ */ jsx16(AboutWorldID_default, {})
1752
+ ] });
1753
+ };
1754
+ var WorldIDState_default = WorldIDState;
1755
+
1756
+ // src/components/IDKitWidget/BaseWidget.tsx
1757
+ import * as Dialog from "@radix-ui/react-dialog";
1758
+ import { Fragment as Fragment3, useEffect as useEffect5, useMemo } from "react";
1759
+
1760
+ // src/components/Icons/WorldIDWordmark.tsx
1761
+ import { jsx as jsx17, jsxs as jsxs10 } from "react/jsx-runtime";
1762
+ var WorldIDWordmark = (props) => /* @__PURE__ */ jsxs10(
1763
+ "svg",
1764
+ {
1765
+ ...props,
1766
+ xmlns: "http://www.w3.org/2000/svg",
1767
+ fill: "currentColor",
1768
+ viewBox: "0 0 188 32",
1769
+ clipRule: "evenodd",
1770
+ fillRule: "evenodd",
1771
+ children: [
1772
+ /* @__PURE__ */ jsxs10("g", { clipPath: "url(#clip0_17_787)", children: [
1773
+ /* @__PURE__ */ jsx17(
1774
+ "path",
1775
+ {
1776
+ d: "M68.7294 9.91241C72.0806 9.91241 74.8174 12.6489 74.8174 15.9997C74.8174 19.3504 72.0806 22.0869 68.7294 22.0869C65.3781 22.0869 62.6413 19.3504 62.6413 15.9997C62.6413 12.6489 65.3502 9.91241 68.7294 9.91241ZM68.7294 6.98047C63.7584 6.98047 59.709 11.0293 59.709 15.9997C59.709 20.97 63.7584 25.0189 68.7294 25.0189C73.7003 25.0189 77.7497 20.97 77.7497 15.9997C77.7497 11.0014 73.7003 6.98047 68.7294 6.98047Z",
1777
+ fill: "black"
1778
+ }
1779
+ ),
1780
+ /* @__PURE__ */ jsx17(
1781
+ "path",
1782
+ {
1783
+ d: "M156.112 9.91241C159.463 9.91241 162.2 12.6489 162.2 15.9997C162.2 19.3504 159.463 22.0869 156.112 22.0869C152.761 22.0869 150.024 19.3504 150.024 15.9997C150.024 12.6489 152.761 9.91241 156.112 9.91241ZM156.112 6.98047C151.141 6.98047 147.092 11.0293 147.092 15.9997C147.092 20.97 151.141 25.0189 156.112 25.0189C161.083 25.0189 165.133 20.97 165.133 15.9997C165.133 11.0014 161.111 6.98047 156.112 6.98047Z",
1784
+ fill: "black"
1785
+ }
1786
+ ),
1787
+ /* @__PURE__ */ jsx17(
1788
+ "path",
1789
+ {
1790
+ d: "M142.511 18.0939C141.645 20.4395 139.411 22.0869 136.786 22.0869C133.435 22.0869 130.698 19.3504 130.698 15.9997C130.698 12.6489 133.435 9.91241 136.786 9.91241C139.411 9.91241 141.645 11.5878 142.511 13.9054H145.555C144.633 9.94033 141.059 6.98047 136.786 6.98047C131.815 6.98047 127.766 11.0293 127.766 15.9997C127.766 20.97 131.815 25.0189 136.786 25.0189C141.059 25.0189 144.633 22.059 145.555 18.0939H142.511Z",
1791
+ fill: "black"
1792
+ }
1793
+ ),
1794
+ /* @__PURE__ */ jsx17(
1795
+ "path",
1796
+ {
1797
+ d: "M117.209 10.1937C120.477 10.1937 123.13 12.9301 123.018 16.2251C122.906 19.3804 120.225 21.8097 117.07 21.8097H113.858V10.1937H117.209ZM117.209 7.26172H110.926V24.7416H117.209C122.041 24.7416 125.95 20.8324 125.95 16.0017C125.95 11.171 122.041 7.26172 117.209 7.26172Z",
1798
+ fill: "black"
1799
+ }
1800
+ ),
1801
+ /* @__PURE__ */ jsx17("path", { d: "M170.216 7.28906H167.283V24.7131H170.216V7.28906Z", fill: "black" }),
1802
+ /* @__PURE__ */ jsx17(
1803
+ "path",
1804
+ {
1805
+ d: "M44.0696 24.7947L47.3929 11.978L50.7162 24.7947H54.7377L59.2898 7.20312H56.2737L52.727 20.8576L49.1803 7.20312H45.6056L42.0589 20.8576L38.5122 7.20312H35.4961L40.0482 24.7947H44.0696Z",
1806
+ fill: "black"
1807
+ }
1808
+ ),
1809
+ /* @__PURE__ */ jsx17(
1810
+ "path",
1811
+ {
1812
+ d: "M176.079 12.3158L184.96 24.7137H185.295H187.892V7.28964H184.96V19.6875L176.079 7.26172H175.855L175.827 7.28964H173.146V24.7137H176.079V12.3158Z",
1813
+ fill: "black"
1814
+ }
1815
+ ),
1816
+ /* @__PURE__ */ jsx17("path", { d: "M99.4753 7.28906H96.543V24.7131H108.775V21.7812H99.4753V7.28906Z", fill: "black" }),
1817
+ /* @__PURE__ */ jsx17(
1818
+ "path",
1819
+ {
1820
+ d: "M90.9038 17.5363C92.6911 16.6428 93.9199 14.8277 93.9199 12.7056C93.9199 9.7178 91.4902 7.31641 88.53 7.31641H83.0005H79.9844V18.1227V24.7405H83.0005V18.0948H84.6761C88.2507 18.2065 91.0993 21.1105 91.0993 24.7126H94.1154C94.1433 21.8644 92.8866 19.2955 90.9038 17.5363ZM83.0005 15.0791V10.3042H88.53C89.8426 10.3042 90.9038 11.3653 90.9038 12.6777C90.9038 13.9901 89.8426 15.0791 88.53 15.0791H83.0005Z",
1821
+ fill: "black"
1822
+ }
1823
+ ),
1824
+ /* @__PURE__ */ jsx17(
1825
+ "path",
1826
+ {
1827
+ d: "M30.7195 9.77312C29.9097 7.87434 28.7647 6.17103 27.2845 4.6911C25.8044 3.21117 24.1288 2.06632 22.2298 1.25654C20.247 0.418848 18.1525 0 16.0021 0C13.8238 0 11.7293 0.418848 9.7744 1.25654C7.87537 2.06632 6.17184 3.21117 4.69171 4.6911C3.21159 6.17103 2.06659 7.87434 1.25671 9.77312C0.418903 11.7277 0 13.822 0 16C0 18.1501 0.418903 20.2443 1.25671 22.2269C2.06659 24.1257 3.21159 25.829 4.69171 27.3089C6.17184 28.7888 7.87537 29.9337 9.7744 30.7155C11.7572 31.5532 13.8517 31.9721 16.0021 31.9721C18.1525 31.9721 20.247 31.5532 22.2298 30.7155C24.1288 29.9058 25.8323 28.7609 27.3125 27.281C28.7926 25.801 29.9376 24.0977 30.7475 22.1989C31.5853 20.2164 32.0042 18.1222 32.0042 15.9721C32.0042 13.822 31.5574 11.7277 30.7195 9.77312ZM10.696 14.4921C11.3383 11.9232 13.6842 10.0524 16.4489 10.0524H27.5638C28.2899 11.4206 28.7367 12.9284 28.9043 14.4921H10.696ZM28.9043 17.5079C28.7367 19.0716 28.262 20.5794 27.5638 21.9476H16.4489C13.6842 21.9476 11.3662 20.0489 10.696 17.5079H28.9043ZM6.81415 6.81326C9.27172 4.35602 12.5392 3.01571 16.0021 3.01571C19.465 3.01571 22.7325 4.35602 25.19 6.81326C25.2738 6.89703 25.3297 6.95288 25.4134 7.03665H16.4489C14.0472 7.03665 11.8131 7.95811 10.1095 9.66143C8.76903 11.0017 7.9033 12.6771 7.62403 14.4921H3.09988C3.435 11.5881 4.71964 8.9075 6.81415 6.81326ZM16.0021 28.9843C12.5392 28.9843 9.27172 27.644 6.81415 25.1867C4.71964 23.0925 3.435 20.3839 3.09988 17.5079H7.62403C7.93123 19.3229 8.79696 20.9983 10.1095 22.3386C11.8131 24.0419 14.0472 24.9633 16.4489 24.9633H25.4134C25.3297 25.0471 25.2738 25.103 25.19 25.1867C22.7325 27.644 19.465 28.9843 16.0021 28.9843Z",
1828
+ fill: "black"
1829
+ }
1830
+ )
1831
+ ] }),
1832
+ /* @__PURE__ */ jsx17("defs", { children: /* @__PURE__ */ jsx17("clipPath", { id: "clip0_17_787", children: /* @__PURE__ */ jsx17("rect", { width: "187.892", height: "32", fill: "white" }) }) })
1833
+ ]
1834
+ }
1835
+ );
1836
+ var WorldIDWordmark_default = WorldIDWordmark;
1837
+
1838
+ // src/components/IDKitWidget/BaseWidget.tsx
1839
+ import { AnimatePresence as AnimatePresence2, motion as motion3 } from "framer-motion";
1840
+
1841
+ // src/components/Icons/ArrowLongLeftIcon.tsx
1842
+ import { jsx as jsx18 } from "react/jsx-runtime";
1843
+ var ArrowLongLeftIcon = (props) => /* @__PURE__ */ jsx18(
1844
+ "svg",
1845
+ {
1846
+ ...props,
1847
+ fill: "none",
1848
+ strokeWidth: 1.5,
1849
+ viewBox: "0 0 24 24",
1850
+ stroke: "currentColor",
1851
+ xmlns: "http://www.w3.org/2000/svg",
1852
+ children: /* @__PURE__ */ jsx18("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6.75 15.75L3 12m0 0l3.75-3.75M3 12h18" })
1853
+ }
1854
+ );
1855
+ var ArrowLongLeftIcon_default = ArrowLongLeftIcon;
1856
+
1857
+ // src/components/IDKitWidget/States/HostAppVerificationState.tsx
1858
+ import { memo } from "react";
1859
+ import { jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
1860
+ var HostAppVerificationState = () => {
1861
+ return /* @__PURE__ */ jsxs11("div", { className: "space-y-6", children: [
1862
+ /* @__PURE__ */ jsx19("div", { className: "flex justify-center", children: /* @__PURE__ */ jsx19(LoadingIcon_default, { className: "h-24 w-24" }) }),
1863
+ /* @__PURE__ */ jsx19("div", { className: "text-70868f mt-4", children: __("Transmitting verification to host app. Please wait...") })
1864
+ ] });
1865
+ };
1866
+ var HostAppVerificationState_default = memo(HostAppVerificationState);
1867
+
1868
+ // src/components/IDKitWidget/BaseWidget.tsx
1869
+ import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
1870
+ var getParams2 = ({ open, processing, onOpenChange, stage, setStage, theme, computed, setOptions }) => ({
1871
+ stage,
1872
+ theme,
1873
+ setStage,
1874
+ processing,
1875
+ setOptions,
1876
+ isOpen: open,
1877
+ onOpenChange,
1878
+ canGoBack: computed.canGoBack(stage)
1879
+ });
1880
+ var IDKitWidget = ({ children, ...config }) => {
1881
+ const {
1882
+ isOpen,
1883
+ onOpenChange,
1884
+ processing,
1885
+ stage,
1886
+ setStage,
1887
+ canGoBack,
1888
+ setOptions,
1889
+ theme: _theme
1890
+ } = idkit_default(getParams2, shallow2);
1891
+ const media = useMedia_default();
1892
+ useEffect5(() => {
1893
+ setOptions(config, "props" /* PROPS */);
1894
+ }, [config, setOptions]);
1895
+ const StageContent = useMemo(() => {
1896
+ switch (stage) {
1897
+ case "WORLD_ID" /* WORLD_ID */:
1898
+ return WorldIDState_default;
1899
+ case "SUCCESS" /* SUCCESS */:
1900
+ return SuccessState_default;
1901
+ case "ERROR" /* ERROR */:
1902
+ return ErrorState_default;
1903
+ case "PRIVACY" /* PRIVACY */:
1904
+ return PrivacyState_default;
1905
+ case "HOST_APP_VERIFICATION" /* HOST_APP_VERIFICATION */:
1906
+ return HostAppVerificationState_default;
1907
+ default:
1908
+ throw new Error(__("Invalid IDKitStage :stage.", { stage }));
1909
+ }
1910
+ }, [stage]);
1911
+ return /* @__PURE__ */ jsxs12(Dialog.Root, { open: isOpen, onOpenChange, children: [
1912
+ children?.({ open: () => onOpenChange(true) }),
1913
+ /* @__PURE__ */ jsx20(Dialog.Portal, { forceMount: true, children: /* @__PURE__ */ jsx20(Fragment3, { children: /* @__PURE__ */ jsx20(AnimatePresence2, { children: isOpen && /* @__PURE__ */ jsxs12(root.div, { mode: "open", id: "idkit-widget", children: [
1914
+ /* @__PURE__ */ jsx20(Styles_default, {}),
1915
+ /* @__PURE__ */ jsxs12(
1916
+ "div",
1917
+ {
1918
+ id: "modal",
1919
+ className: classNames(_theme == "dark" && "dark", "fixed z-10 font-sans"),
1920
+ children: [
1921
+ /* @__PURE__ */ jsx20(Dialog.Overlay, { asChild: true, children: /* @__PURE__ */ jsx20(
1922
+ motion3.div,
1923
+ {
1924
+ initial: { opacity: 0 },
1925
+ animate: { opacity: 1 },
1926
+ exit: { opacity: 0 },
1927
+ className: "fixed inset-0 bg-black/50 backdrop-blur-lg"
1928
+ }
1929
+ ) }),
1930
+ /* @__PURE__ */ jsx20("div", { className: "fixed inset-0 z-10 overflow-y-hidden md:overflow-y-auto", children: /* @__PURE__ */ jsx20("div", { className: "flex min-h-full items-end justify-center text-center md:items-center md:p-4", children: /* @__PURE__ */ jsx20(Dialog.Content, { asChild: true, children: /* @__PURE__ */ jsx20(
1931
+ motion3.div,
1932
+ {
1933
+ layout: media == "mobile" ? "position" : true,
1934
+ exit: media == "mobile" ? "initMob" : "init",
1935
+ initial: media == "mobile" ? "initMob" : "init",
1936
+ animate: media == "mobile" ? "animateMob" : "animate",
1937
+ variants: {
1938
+ init: { opacity: 0, scale: 0.9 },
1939
+ initMob: { translateY: "100%" },
1940
+ animate: { opacity: 1, scale: 1 },
1941
+ animateMob: { translateY: 0 }
1942
+ },
1943
+ transition: { layout: { duration: 0.15 } },
1944
+ className: "relative z-50 w-full rounded-t-2xl bg-white pt-6 shadow focus:outline-none focus-visible:ring focus-visible:ring-purple-500/75 dark:bg-0d151d md:max-w-md md:rounded-b-2xl",
1945
+ children: /* @__PURE__ */ jsxs12(Toast.Provider, { children: [
1946
+ /* @__PURE__ */ jsx20(Toast.Viewport, { className: "flex justify-center" }),
1947
+ /* @__PURE__ */ jsxs12("div", { className: "mx-6 mb-12 flex items-center justify-between", children: [
1948
+ /* @__PURE__ */ jsx20(
1949
+ "button",
1950
+ {
1951
+ onClick: () => setStage("WORLD_ID" /* WORLD_ID */),
1952
+ disabled: !canGoBack,
1953
+ className: classNames(
1954
+ !canGoBack && "invisible pointer-events-none",
1955
+ "dark:bg-d3dfea/15 flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:text-white"
1956
+ ),
1957
+ children: /* @__PURE__ */ jsx20(ArrowLongLeftIcon_default, { className: "w-4" })
1958
+ }
1959
+ ),
1960
+ /* @__PURE__ */ jsx20(Dialog.Close, { className: "flex h-8 w-8 items-center justify-center rounded-full bg-gray-100 dark:bg-d3dfea/15 dark:text-white", children: /* @__PURE__ */ jsx20(XMarkIcon_default, { className: "h-5 w-5" }) })
1961
+ ] }),
1962
+ /* @__PURE__ */ jsxs12("div", { className: "relative", children: [
1963
+ /* @__PURE__ */ jsx20(
1964
+ motion3.div,
1965
+ {
1966
+ className: "mx-6 mb-6",
1967
+ layout: "position",
1968
+ animate: {
1969
+ visibility: processing ? "hidden" : "visible"
1970
+ },
1971
+ transition: { layout: { duration: 0.15 } },
1972
+ children: /* @__PURE__ */ jsx20(StageContent, {})
1973
+ }
1974
+ ),
1975
+ /* @__PURE__ */ jsx20(AnimatePresence2, { children: processing && /* @__PURE__ */ jsx20(
1976
+ motion3.div,
1977
+ {
1978
+ className: "absolute inset-0 flex items-center justify-center pb-10",
1979
+ initial: { opacity: 0 },
1980
+ animate: { opacity: 1 },
1981
+ exit: { opacity: 0 },
1982
+ children: /* @__PURE__ */ jsx20(LoadingIcon_default, { className: "h-24 w-24" })
1983
+ }
1984
+ ) })
1985
+ ] }),
1986
+ /* @__PURE__ */ jsxs12("div", { className: "flex items-center justify-between px-5 py-3 md:rounded-b-2xl", children: [
1987
+ /* @__PURE__ */ jsxs12("p", { className: "flex items-center gap-1 text-sm text-9eafc0", children: [
1988
+ /* @__PURE__ */ jsx20("span", { children: __("Verified with") }),
1989
+ /* @__PURE__ */ jsx20(
1990
+ "a",
1991
+ {
1992
+ href: "https://worldcoin.org/world-id",
1993
+ target: "_blank",
1994
+ rel: "noreferrer",
1995
+ children: /* @__PURE__ */ jsx20(WorldIDWordmark_default, { className: "h-4 text-0d151d dark:text-white" })
1996
+ }
1997
+ )
1998
+ ] }),
1999
+ stage != "PRIVACY" /* PRIVACY */ ? /* @__PURE__ */ jsx20(
2000
+ "button",
2001
+ {
2002
+ onClick: () => setStage("PRIVACY" /* PRIVACY */),
2003
+ className: "text-sm text-9eafc0 hover:underline",
2004
+ children: __("Privacy")
2005
+ }
2006
+ ) : /* @__PURE__ */ jsxs12(
2007
+ "a",
2008
+ {
2009
+ target: "_blank",
2010
+ href: "https://docs.worldcoin.org/privacy",
2011
+ className: "text-sm text-9eafc0 hover:underline dark:text-9eafc0",
2012
+ rel: "noreferrer",
2013
+ children: [
2014
+ __("Learn More"),
2015
+ " \u2192"
2016
+ ]
2017
+ }
2018
+ )
2019
+ ] })
2020
+ ] })
2021
+ }
2022
+ ) }) }) })
2023
+ ]
2024
+ }
2025
+ )
2026
+ ] }) }) }) })
2027
+ ] });
2028
+ };
2029
+ var BaseWidget_default = IDKitWidget;
2030
+
2031
+ // src/components/IDKitWidget/index.tsx
2032
+ var IDKitWidget_default = memo2(BaseWidget_default);
2033
+
2034
+ // src/index.ts
2035
+ import { solidityEncode } from "@worldcoin/idkit-core/hashing";
2036
+
2037
+ // src/components/SignInWithWorldID.tsx
2038
+ import { useMemo as useMemo2 } from "react";
2039
+ import { useState as useState4 } from "react";
2040
+ import { useCallback as useCallback2 } from "react";
2041
+ import { jsx as jsx21 } from "react/jsx-runtime";
2042
+ var SignInWithWorldID = ({ onSuccess, app_id, nonce, theme, children, ...props }) => {
2043
+ const [token, setToken] = useState4("");
2044
+ const signal = useMemo2(() => {
2045
+ if (nonce)
2046
+ return nonce;
2047
+ return Date.now().toString();
2048
+ }, [nonce]);
2049
+ const handleVerify = useCallback2(
2050
+ async (proof) => {
2051
+ const response = await fetch("https://developer.worldcoin.org/api/v1/oidc/authorize", {
2052
+ method: "POST",
2053
+ headers: {
2054
+ "Content-Type": "application/json"
2055
+ },
2056
+ body: JSON.stringify({ ...proof, app_id, nonce: signal, response_type: "id_token" })
2057
+ });
2058
+ if (!response.ok) {
2059
+ if (response.status != 400) {
2060
+ throw new Error("Something went wrong when verifying your identity. Please try again.");
2061
+ }
2062
+ const error = await response.json();
2063
+ throw new Error(error.message);
2064
+ }
2065
+ const { jwt } = await response.json();
2066
+ setToken(jwt);
2067
+ },
2068
+ [app_id, signal]
2069
+ );
2070
+ const onIDKitSuccess = useCallback2(() => void onSuccess(token), [onSuccess, token]);
2071
+ return /* @__PURE__ */ jsx21(
2072
+ IDKitWidget_default,
2073
+ {
2074
+ ...props,
2075
+ action: "",
2076
+ autoClose: true,
2077
+ theme,
2078
+ app_id,
2079
+ signal,
2080
+ onSuccess: onIDKitSuccess,
2081
+ handleVerify,
2082
+ children: children ?? (({ open }) => /* @__PURE__ */ jsx21(SignInButton_default, { onClick: open, theme }))
2083
+ }
2084
+ );
2085
+ };
2086
+ var SignInWithWorldID_default = SignInWithWorldID;
2087
+ export {
2088
+ CredentialType,
2089
+ IDKitWidget_default as IDKitWidget,
2090
+ SignInButton_default as SignInButton,
2091
+ SignInWithWorldID_default as SignInWithWorldID,
2092
+ solidityEncode,
2093
+ useIDKit_default as useIDKit
2094
+ };