@latticexyz/entrykit 2.2.21-f4db683f90214b03bb8d68635a3825cc9bf58263 → 2.2.22-01a4d064e5fd8e579d54bb3aa8997f225c6960d3

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.
@@ -8,14 +8,21 @@ function defineConfig(input) {
8
8
  }
9
9
 
10
10
  // src/ui/Modal.tsx
11
- import { Root as DialogRoot, DialogPortal, DialogContent } from "@radix-ui/react-dialog";
11
+ import { useEffect as useEffect2 } from "react";
12
+ import {
13
+ Root as DialogRoot,
14
+ DialogPortal,
15
+ DialogContent,
16
+ DialogTitle,
17
+ DialogDescription
18
+ } from "@radix-ui/react-dialog";
12
19
 
13
20
  // src/ui/Shadow.tsx
14
21
  import { forwardRef, useEffect, useRef, useState } from "react";
15
22
  import ReactDOM from "react-dom";
16
23
 
17
24
  // ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/tailwind.css?inline
18
- var tailwind_default = '*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. 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)\n2. 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)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type=\'button\']),\ninput:where([type=\'reset\']),\ninput:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n\n.grid-cols-2.divide-y > :not([hidden]) ~ :not([hidden]):nth-child(-n + 2) {\n border-top-width: 0;\n border-bottom-width: 0;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0px;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.col-start-1 {\n grid-column-start: 1;\n}\n\n.row-start-1 {\n grid-row-start: 1;\n}\n\n.m-0 {\n margin: 0px;\n}\n\n.m-2 {\n margin: 0.5rem;\n}\n\n.-mx-0\\.5 {\n margin-left: -0.125rem;\n margin-right: -0.125rem;\n}\n\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n\n.-my-\\[0\\.125em\\] {\n margin-top: -0.125em;\n margin-bottom: -0.125em;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-3 {\n margin-left: -0.75rem;\n}\n\n.-mt-2 {\n margin-top: -0.5rem;\n}\n\n.block {\n display: block;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.inline-grid {\n display: inline-grid;\n}\n\n.contents {\n display: contents;\n}\n\n.hidden {\n display: none;\n}\n\n.h-12 {\n height: 3rem;\n}\n\n.h-16 {\n height: 4rem;\n}\n\n.h-4 {\n height: 1rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-64 {\n height: 16rem;\n}\n\n.h-\\[1\\.25em\\] {\n height: 1.25em;\n}\n\n.h-\\[1em\\] {\n height: 1em;\n}\n\n.h-full {\n height: 100%;\n}\n\n.max-h-full {\n max-height: 100%;\n}\n\n.min-h-\\[22rem\\] {\n min-height: 22rem;\n}\n\n.min-h-\\[26rem\\] {\n min-height: 26rem;\n}\n\n.w-16 {\n width: 4rem;\n}\n\n.w-24 {\n width: 6rem;\n}\n\n.w-28 {\n width: 7rem;\n}\n\n.w-4 {\n width: 1rem;\n}\n\n.w-48 {\n width: 12rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-\\[0\\.6em\\] {\n width: 0.6em;\n}\n\n.w-\\[1\\.25em\\] {\n width: 1.25em;\n}\n\n.w-full {\n width: 100%;\n}\n\n.max-w-\\[26rem\\] {\n max-width: 26rem;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.-translate-y-2 {\n --tw-translate-y: -0.5rem;\n 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));\n}\n\n.-translate-y-4 {\n --tw-translate-y: -1rem;\n 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));\n}\n\n.translate-x-2 {\n --tw-translate-x: 0.5rem;\n 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));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n 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));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.scale-50 {\n --tw-scale-x: .5;\n --tw-scale-y: .5;\n 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));\n}\n\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.grid-cols-\\[1fr_auto_1fr\\] {\n grid-template-columns: 1fr auto 1fr;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.place-items-center {\n place-items: center;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-1 {\n gap: 0.25rem;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.gap-2\\.5 {\n gap: 0.625rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.gap-6 {\n gap: 1.5rem;\n}\n\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n\n.divide-neutral-800 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(38 38 38 / var(--tw-divide-opacity));\n}\n\n.self-auto {\n align-self: auto;\n}\n\n.self-center {\n align-self: center;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-clip {\n overflow: clip;\n}\n\n.whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-4 {\n border-width: 4px;\n}\n\n.border-neutral-300 {\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700\\/60 {\n background-color: rgb(29 78 216 / 0.6);\n}\n\n.bg-neutral-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800\\/85 {\n background-color: rgb(38 38 38 / 0.85);\n}\n\n.bg-neutral-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-orange-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 115 22 / var(--tw-bg-opacity));\n}\n\n.bg-orange-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n\n.from-transparent {\n --tw-gradient-from: transparent var(--tw-gradient-from-position);\n --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n}\n\n.to-blue-700 {\n --tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position);\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.bg-center {\n background-position: center;\n}\n\n.bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-1 {\n padding: 0.25rem;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.p-6 {\n padding: 1.5rem;\n}\n\n.p-\\[\\.75em\\] {\n padding: .75em;\n}\n\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-8 {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.pt-8 {\n padding-top: 2rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n}\n\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n\n.text-\\[\\.75em\\] {\n font-size: .75em;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.leading-none {\n line-height: 1;\n}\n\n.tracking-\\[-1ch\\] {\n letter-spacing: -1ch;\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity));\n}\n\n.text-transparent {\n color: transparent;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/20 {\n color: rgb(255 255 255 / 0.2);\n}\n\n.text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-25 {\n opacity: 0.25;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-neutral-700\\/50 {\n --tw-ring-color: rgb(64 64 64 / 0.5);\n}\n\n.filter {\n 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);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n@keyframes enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n\n@keyframes exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n\n.animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n\n.fade-in {\n --tw-enter-opacity: 0;\n}\n\n.slide-in-from-bottom-16 {\n --tw-enter-translate-y: 4rem;\n}\n\n.slide-in-from-bottom-8 {\n --tw-enter-translate-y: 2rem;\n}\n\n.animate-duration-300 {\n animation-duration: 300ms;\n}\n\n@property --tw-border-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@property --tw-conic-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@keyframes border-gradient {\n\n to {\n --tw-border-gradient-angle: 360deg;\n }\n}\n\n.after\\:select-none::after {\n content: var(--tw-content);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.after\\:content-\\[\\\'\\2026\\\'\\]::after {\n --tw-content: \'\u2026\';\n content: var(--tw-content);\n}\n\n.hover\\:bg-blue-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-neutral-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-orange-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white\\/40:hover {\n color: rgb(255 255 255 / 0.4);\n}\n\n.hover\\:brightness-125:hover {\n --tw-brightness: brightness(1.25);\n 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);\n}\n\n.focus\\:border-orange-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(249 115 22 / var(--tw-border-opacity));\n}\n\n.focus\\:border-yellow-400:focus {\n --tw-border-opacity: 1;\n border-color: rgb(250 204 21 / var(--tw-border-opacity));\n}\n\n.active\\:bg-orange-600:active {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.active\\:brightness-150:active {\n --tw-brightness: brightness(1.5);\n 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);\n}\n\n.group:hover .group-hover\\:rotate-90 {\n --tw-rotate: 90deg;\n 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));\n}\n\n.aria-busy\\:pointer-events-none[aria-busy="true"] {\n pointer-events: none;\n}\n\n.aria-busy\\:bg-blue-500[aria-busy="true"] {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.aria-disabled\\:pointer-events-none[aria-disabled="true"] {\n pointer-events: none;\n}\n\n.aria-disabled\\:opacity-50[aria-disabled="true"] {\n opacity: 0.5;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:inline {\n display: inline;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:hidden {\n display: none;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:translate-x-0 {\n --tw-translate-x: 0px;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-125 {\n --tw-scale-x: 1.25;\n --tw-scale-y: 1.25;\n 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));\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:opacity-100 {\n opacity: 1;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-0 {\n opacity: 0;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-100 {\n opacity: 1;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:duration-300 {\n transition-duration: 300ms;\n}\n\n.data-\\[highlighted\\]\\:bg-neutral-200[data-highlighted] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.links\\:font-medium a[href]:not(.links-unset) {\n font-weight: 500;\n}\n\n.links\\:text-white a[href]:not(.links-unset) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.links\\:underline a[href]:not(.links-unset) {\n text-decoration-line: underline;\n}\n\n.links\\:decoration-neutral-500 a[href]:not(.links-unset) {\n text-decoration-color: #737373;\n}\n\n.links\\:underline-offset-4 a[href]:not(.links-unset) {\n text-underline-offset: 4px;\n}\n\n.hover\\:links\\:decoration-orange-500 a[href]:not(.links-unset):hover {\n text-decoration-color: #f97316;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:items-center {\n align-items: center;\n }\n}\n\n.dark\\:border-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.dark\\:bg-neutral-800:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-white\\/10:where([data-theme="dark"], [data-theme="dark"] *) {\n background-color: rgb(255 255 255 / 0.1);\n}\n\n.dark\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:hover\\:bg-neutral-700:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n';
25
+ var tailwind_default = '*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.13 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: \'\';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user\'s configured `sans` font-family by default.\n5. Use the user\'s configured `sans` font-feature-settings by default.\n6. Use the user\'s configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user\'s configured `mono` font-family by default.\n2. Use the user\'s configured `mono` font-feature-settings by default.\n3. Use the user\'s configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. 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)\n2. 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)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type=\'button\']),\ninput:where([type=\'reset\']),\ninput:where([type=\'submit\']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type=\'search\'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user\'s configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role="button"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don\'t get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n.container {\n width: 100%;\n}\n\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n\n.grid-cols-2.divide-y > :not([hidden]) ~ :not([hidden]):nth-child(-n + 2) {\n border-top-width: 0;\n border-bottom-width: 0;\n}\n\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n\n.pointer-events-none {\n pointer-events: none;\n}\n\n.pointer-events-auto {\n pointer-events: auto;\n}\n\n.fixed {\n position: fixed;\n}\n\n.absolute {\n position: absolute;\n}\n\n.relative {\n position: relative;\n}\n\n.sticky {\n position: sticky;\n}\n\n.inset-0 {\n inset: 0px;\n}\n\n.bottom-0 {\n bottom: 0px;\n}\n\n.left-0 {\n left: 0px;\n}\n\n.right-0 {\n right: 0px;\n}\n\n.top-0 {\n top: 0px;\n}\n\n.col-start-1 {\n grid-column-start: 1;\n}\n\n.row-start-1 {\n grid-row-start: 1;\n}\n\n.m-0 {\n margin: 0px;\n}\n\n.m-2 {\n margin: 0.5rem;\n}\n\n.-mx-0\\.5 {\n margin-left: -0.125rem;\n margin-right: -0.125rem;\n}\n\n.-my-1 {\n margin-top: -0.25rem;\n margin-bottom: -0.25rem;\n}\n\n.-my-\\[0\\.125em\\] {\n margin-top: -0.125em;\n margin-bottom: -0.125em;\n}\n\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n\n.-ml-3 {\n margin-left: -0.75rem;\n}\n\n.-mr-1 {\n margin-right: -0.25rem;\n}\n\n.-mt-2 {\n margin-top: -0.5rem;\n}\n\n.mt-1 {\n margin-top: 0.25rem;\n}\n\n.mt-4 {\n margin-top: 1rem;\n}\n\n.block {\n display: block;\n}\n\n.inline-block {\n display: inline-block;\n}\n\n.flex {\n display: flex;\n}\n\n.inline-flex {\n display: inline-flex;\n}\n\n.table {\n display: table;\n}\n\n.grid {\n display: grid;\n}\n\n.inline-grid {\n display: inline-grid;\n}\n\n.contents {\n display: contents;\n}\n\n.hidden {\n display: none;\n}\n\n.aspect-square {\n aspect-ratio: 1 / 1;\n}\n\n.h-10 {\n height: 2.5rem;\n}\n\n.h-12 {\n height: 3rem;\n}\n\n.h-16 {\n height: 4rem;\n}\n\n.h-3\\.5 {\n height: 0.875rem;\n}\n\n.h-4 {\n height: 1rem;\n}\n\n.h-6 {\n height: 1.5rem;\n}\n\n.h-64 {\n height: 16rem;\n}\n\n.h-\\[1\\.25em\\] {\n height: 1.25em;\n}\n\n.h-\\[1em\\] {\n height: 1em;\n}\n\n.h-\\[2px\\] {\n height: 2px;\n}\n\n.h-full {\n height: 100%;\n}\n\n.max-h-full {\n max-height: 100%;\n}\n\n.w-10 {\n width: 2.5rem;\n}\n\n.w-16 {\n width: 4rem;\n}\n\n.w-24 {\n width: 6rem;\n}\n\n.w-28 {\n width: 7rem;\n}\n\n.w-3\\.5 {\n width: 0.875rem;\n}\n\n.w-4 {\n width: 1rem;\n}\n\n.w-48 {\n width: 12rem;\n}\n\n.w-6 {\n width: 1.5rem;\n}\n\n.w-60 {\n width: 15rem;\n}\n\n.w-8 {\n width: 2rem;\n}\n\n.w-\\[0\\.6em\\] {\n width: 0.6em;\n}\n\n.w-\\[1\\.25em\\] {\n width: 1.25em;\n}\n\n.w-\\[352px\\] {\n width: 352px;\n}\n\n.w-full {\n width: 100%;\n}\n\n.max-w-\\[26rem\\] {\n max-width: 26rem;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n\n.flex-grow {\n flex-grow: 1;\n}\n\n.-translate-y-2 {\n --tw-translate-y: -0.5rem;\n 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));\n}\n\n.-translate-y-4 {\n --tw-translate-y: -1rem;\n 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));\n}\n\n.translate-x-2 {\n --tw-translate-x: 0.5rem;\n 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));\n}\n\n.translate-y-0 {\n --tw-translate-y: 0px;\n 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));\n}\n\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.scale-50 {\n --tw-scale-x: .5;\n --tw-scale-y: .5;\n 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));\n}\n\n.transform {\n 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));\n}\n\n@keyframes spin {\n\n to {\n transform: rotate(360deg);\n }\n}\n\n.animate-spin {\n animation: spin 1s linear infinite;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.cursor-text {\n cursor: text;\n}\n\n.grid-cols-2 {\n grid-template-columns: repeat(2, minmax(0, 1fr));\n}\n\n.grid-cols-\\[1fr_auto_1fr\\] {\n grid-template-columns: 1fr auto 1fr;\n}\n\n.flex-col {\n flex-direction: column;\n}\n\n.place-items-center {\n place-items: center;\n}\n\n.items-end {\n align-items: flex-end;\n}\n\n.items-center {\n align-items: center;\n}\n\n.justify-end {\n justify-content: flex-end;\n}\n\n.justify-center {\n justify-content: center;\n}\n\n.justify-between {\n justify-content: space-between;\n}\n\n.gap-1 {\n gap: 0.25rem;\n}\n\n.gap-2 {\n gap: 0.5rem;\n}\n\n.gap-2\\.5 {\n gap: 0.625rem;\n}\n\n.gap-4 {\n gap: 1rem;\n}\n\n.gap-5 {\n gap: 1.25rem;\n}\n\n.gap-6 {\n gap: 1.5rem;\n}\n\n.space-y-6 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));\n}\n\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n\n.divide-neutral-200 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(229 229 229 / var(--tw-divide-opacity));\n}\n\n.divide-neutral-300 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-divide-opacity));\n}\n\n.divide-neutral-800 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(38 38 38 / var(--tw-divide-opacity));\n}\n\n.self-auto {\n align-self: auto;\n}\n\n.self-center {\n align-self: center;\n}\n\n.overflow-auto {\n overflow: auto;\n}\n\n.overflow-clip {\n overflow: clip;\n}\n\n.whitespace-pre-wrap {\n white-space: pre-wrap;\n}\n\n.rounded-full {\n border-radius: 9999px;\n}\n\n.border {\n border-width: 1px;\n}\n\n.border-2 {\n border-width: 2px;\n}\n\n.border-4 {\n border-width: 4px;\n}\n\n.border-dashed {\n border-style: dashed;\n}\n\n.border-black\\/20 {\n border-color: rgb(0 0 0 / 0.2);\n}\n\n.border-neutral-300 {\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.bg-black\\/10 {\n background-color: rgb(0 0 0 / 0.1);\n}\n\n.bg-blue-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity));\n}\n\n.bg-blue-700\\/60 {\n background-color: rgb(29 78 216 / 0.6);\n}\n\n.bg-green-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(34 197 94 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(245 245 245 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-neutral-800\\/85 {\n background-color: rgb(38 38 38 / 0.85);\n}\n\n.bg-neutral-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.bg-orange-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 115 22 / var(--tw-bg-opacity));\n}\n\n.bg-orange-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.bg-red-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: transparent;\n}\n\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.bg-gradient-to-b {\n background-image: linear-gradient(to bottom, var(--tw-gradient-stops));\n}\n\n.from-transparent {\n --tw-gradient-from: transparent var(--tw-gradient-from-position);\n --tw-gradient-to: rgb(0 0 0 / 0) var(--tw-gradient-to-position);\n --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);\n}\n\n.to-blue-700 {\n --tw-gradient-to: #1d4ed8 var(--tw-gradient-to-position);\n}\n\n.bg-cover {\n background-size: cover;\n}\n\n.bg-center {\n background-position: center;\n}\n\n.bg-no-repeat {\n background-repeat: no-repeat;\n}\n\n.object-cover {\n object-fit: cover;\n}\n\n.p-1 {\n padding: 0.25rem;\n}\n\n.p-2 {\n padding: 0.5rem;\n}\n\n.p-2\\.5 {\n padding: 0.625rem;\n}\n\n.p-3 {\n padding: 0.75rem;\n}\n\n.p-4 {\n padding: 1rem;\n}\n\n.p-6 {\n padding: 1.5rem;\n}\n\n.p-\\[\\.75em\\] {\n padding: .75em;\n}\n\n.px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n}\n\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n\n.py-8 {\n padding-top: 2rem;\n padding-bottom: 2rem;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem;\n}\n\n.pb-8 {\n padding-bottom: 2rem;\n}\n\n.pt-10 {\n padding-top: 2.5rem;\n}\n\n.pt-8 {\n padding-top: 2rem;\n}\n\n.text-left {\n text-align: left;\n}\n\n.text-center {\n text-align: center;\n}\n\n.font-mono {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;\n}\n\n.text-2xl {\n font-size: 1.5rem;\n line-height: 2rem;\n}\n\n.text-\\[\\.75em\\] {\n font-size: .75em;\n}\n\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n\n.font-bold {\n font-weight: 700;\n}\n\n.font-medium {\n font-weight: 500;\n}\n\n.leading-loose {\n line-height: 2;\n}\n\n.leading-none {\n line-height: 1;\n}\n\n.tracking-\\[-1ch\\] {\n letter-spacing: -1ch;\n}\n\n.text-amber-500 {\n --tw-text-opacity: 1;\n color: rgb(245 158 11 / var(--tw-text-opacity));\n}\n\n.text-black {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.text-green-600 {\n --tw-text-opacity: 1;\n color: rgb(22 163 74 / var(--tw-text-opacity));\n}\n\n.text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.text-neutral-500 {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.text-neutral-700 {\n --tw-text-opacity: 1;\n color: rgb(64 64 64 / var(--tw-text-opacity));\n}\n\n.text-orange-500 {\n --tw-text-opacity: 1;\n color: rgb(249 115 22 / var(--tw-text-opacity));\n}\n\n.text-transparent {\n color: transparent;\n}\n\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.text-white\\/20 {\n color: rgb(255 255 255 / 0.2);\n}\n\n.text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n\n.opacity-0 {\n opacity: 0;\n}\n\n.opacity-100 {\n opacity: 1;\n}\n\n.opacity-25 {\n opacity: 0.25;\n}\n\n.opacity-30 {\n opacity: 0.3;\n}\n\n.opacity-50 {\n opacity: 0.5;\n}\n\n.opacity-75 {\n opacity: 0.75;\n}\n\n.outline-none {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n\n.ring-neutral-700\\/50 {\n --tw-ring-color: rgb(64 64 64 / 0.5);\n}\n\n.ring-transparent {\n --tw-ring-color: transparent;\n}\n\n.filter {\n 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);\n}\n\n.transition {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.transition-colors {\n transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n\n.duration-100 {\n transition-duration: 100ms;\n}\n\n.duration-300 {\n transition-duration: 300ms;\n}\n\n.ease-linear {\n transition-timing-function: linear;\n}\n\n@keyframes enter {\n\n from {\n opacity: var(--tw-enter-opacity, 1);\n transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0) scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0));\n }\n}\n\n@keyframes exit {\n\n to {\n opacity: var(--tw-exit-opacity, 1);\n transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0) scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0));\n }\n}\n\n.animate-in {\n animation-name: enter;\n animation-duration: 150ms;\n --tw-enter-opacity: initial;\n --tw-enter-scale: initial;\n --tw-enter-rotate: initial;\n --tw-enter-translate-x: initial;\n --tw-enter-translate-y: initial;\n}\n\n.animate-out {\n animation-name: exit;\n animation-duration: 150ms;\n --tw-exit-opacity: initial;\n --tw-exit-scale: initial;\n --tw-exit-rotate: initial;\n --tw-exit-translate-x: initial;\n --tw-exit-translate-y: initial;\n}\n\n.fade-in {\n --tw-enter-opacity: 0;\n}\n\n.fade-out {\n --tw-exit-opacity: 0;\n}\n\n.slide-in-from-bottom-16 {\n --tw-enter-translate-y: 4rem;\n}\n\n.slide-in-from-bottom-2 {\n --tw-enter-translate-y: 0.5rem;\n}\n\n.slide-in-from-bottom-8 {\n --tw-enter-translate-y: 2rem;\n}\n\n.slide-in-from-top-2 {\n --tw-enter-translate-y: -0.5rem;\n}\n\n.animate-duration-300 {\n animation-duration: 300ms;\n}\n\n.ease-linear {\n animation-timing-function: linear;\n}\n\n@property --tw-border-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@property --tw-conic-gradient-angle {\n syntax: \'<angle>\';\n inherits: true;\n initial-value: 0deg;\n}\n\n@keyframes border-gradient {\n\n to {\n --tw-border-gradient-angle: 360deg;\n }\n}\n\n.placeholder\\:text-neutral-400::placeholder {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.after\\:select-none::after {\n content: var(--tw-content);\n -webkit-user-select: none;\n user-select: none;\n}\n\n.after\\:content-\\[\\\'\\2026\\\'\\]::after {\n --tw-content: \'\u2026\';\n content: var(--tw-content);\n}\n\n.focus-within\\:border-transparent:focus-within {\n border-color: transparent;\n}\n\n.focus-within\\:ring-orange-500:focus-within {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(249 115 22 / var(--tw-ring-opacity));\n}\n\n.hover\\:bg-blue-500:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-neutral-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.hover\\:bg-orange-400:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(251 146 60 / var(--tw-bg-opacity));\n}\n\n.hover\\:text-black:hover {\n --tw-text-opacity: 1;\n color: rgb(0 0 0 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.hover\\:text-white\\/40:hover {\n color: rgb(255 255 255 / 0.4);\n}\n\n.hover\\:text-white\\/80:hover {\n color: rgb(255 255 255 / 0.8);\n}\n\n.hover\\:brightness-125:hover {\n --tw-brightness: brightness(1.25);\n 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);\n}\n\n.focus\\:border-orange-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(249 115 22 / var(--tw-border-opacity));\n}\n\n.focus\\:border-yellow-400:focus {\n --tw-border-opacity: 1;\n border-color: rgb(250 204 21 / var(--tw-border-opacity));\n}\n\n.focus\\:bg-white:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n\n.active\\:bg-orange-600:active {\n --tw-bg-opacity: 1;\n background-color: rgb(234 88 12 / var(--tw-bg-opacity));\n}\n\n.active\\:brightness-150:active {\n --tw-brightness: brightness(1.5);\n 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);\n}\n\n.group:hover .group-hover\\:pointer-events-none {\n pointer-events: none;\n}\n\n.group:hover .group-hover\\:pointer-events-auto {\n pointer-events: auto;\n}\n\n.group:hover .group-hover\\:rotate-90 {\n --tw-rotate: 90deg;\n 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));\n}\n\n.group:hover .group-hover\\:opacity-0 {\n opacity: 0;\n}\n\n.group:hover .group-hover\\:opacity-100 {\n opacity: 1;\n}\n\n.peer:placeholder-shown ~ .peer-placeholder-shown\\:text-neutral-400 {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.aria-busy\\:pointer-events-none[aria-busy="true"] {\n pointer-events: none;\n}\n\n.aria-busy\\:bg-blue-500[aria-busy="true"] {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n\n.aria-disabled\\:pointer-events-none[aria-disabled="true"] {\n pointer-events: none;\n}\n\n.aria-disabled\\:opacity-50[aria-disabled="true"] {\n opacity: 0.5;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:inline {\n display: inline;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:hidden {\n display: none;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:translate-x-0 {\n --tw-translate-x: 0px;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n 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));\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:scale-125 {\n --tw-scale-x: 1.25;\n --tw-scale-y: 1.25;\n 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));\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:opacity-100 {\n opacity: 1;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-0 {\n opacity: 0;\n}\n\n.group[aria-busy="true"] .group-aria-busy\\:opacity-100 {\n opacity: 1;\n}\n\n.group\\/button[aria-busy="true"] .group-aria-busy\\/button\\:duration-300 {\n transition-duration: 300ms;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:inline {\n display: inline;\n}\n\n.group[aria-expanded="true"] .group-aria-expanded\\:hidden {\n display: none;\n}\n\n.data-\\[highlighted\\]\\:bg-neutral-200[data-highlighted] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.data-\\[state\\=checked\\]\\:bg-neutral-200[data-state="checked"] {\n --tw-bg-opacity: 1;\n background-color: rgb(229 229 229 / var(--tw-bg-opacity));\n}\n\n.links\\:font-medium a[href]:not(.links-unset) {\n font-weight: 500;\n}\n\n.links\\:text-white a[href]:not(.links-unset) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.links\\:underline a[href]:not(.links-unset) {\n text-decoration-line: underline;\n}\n\n.links\\:decoration-neutral-500 a[href]:not(.links-unset) {\n text-decoration-color: #737373;\n}\n\n.links\\:underline-offset-4 a[href]:not(.links-unset) {\n text-underline-offset: 4px;\n}\n\n.hover\\:links\\:decoration-orange-500 a[href]:not(.links-unset):hover {\n text-decoration-color: #f97316;\n}\n\n@media (min-width: 640px) {\n\n .sm\\:items-center {\n align-items: center;\n }\n}\n\n.dark\\:divide-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-divide-opacity));\n}\n\n.dark\\:border-neutral-700:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.dark\\:border-white\\/50:where([data-theme="dark"], [data-theme="dark"] *) {\n border-color: rgb(255 255 255 / 0.5);\n}\n\n.dark\\:bg-blue-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-green-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(22 163 74 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-neutral-800:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(38 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-neutral-900:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-red-600:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n\n.dark\\:bg-white\\/10:where([data-theme="dark"], [data-theme="dark"] *) {\n background-color: rgb(255 255 255 / 0.1);\n}\n\n.dark\\:text-neutral-300:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / var(--tw-text-opacity));\n}\n\n.dark\\:text-neutral-400:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(163 163 163 / var(--tw-text-opacity));\n}\n\n.dark\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:text-white:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:placeholder\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *)::placeholder {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:hover\\:bg-neutral-700:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.dark\\:hover\\:text-white:hover:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n\n.dark\\:focus\\:bg-neutral-700:focus:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / var(--tw-bg-opacity));\n}\n\n.peer:placeholder-shown ~ .dark\\:peer-placeholder-shown\\:text-neutral-500:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / var(--tw-text-opacity));\n}\n\n.dark\\:data-\\[state\\=checked\\]\\:bg-neutral-900[data-state="checked"]:where([data-theme="dark"], [data-theme="dark"] *) {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / var(--tw-bg-opacity));\n}\n\n.\\[\\&_\\>_\\:is\\(dt\\2c dd\\)\\]\\:px-1 > :is(dt,dd) {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n\n.\\[\\&_\\>_dd\\]\\:text-right > dd {\n text-align: right;\n}\n';
19
26
 
20
27
  // src/ui/Shadow.tsx
21
28
  import { useResizeObserver } from "usehooks-ts";
@@ -30,6 +37,11 @@ function FrameProvider({ frame, children }) {
30
37
  if (value) throw new Error("`FrameProvider` can only be used once.");
31
38
  return /* @__PURE__ */ jsx(Context.Provider, { value: { frame }, children });
32
39
  }
40
+ function useFrame() {
41
+ const value = useContext(Context);
42
+ if (!value) throw new Error("`useFrame` can only be used within a `FrameProvider`.");
43
+ return value;
44
+ }
33
45
 
34
46
  // src/useTheme.ts
35
47
  import { useMediaQuery } from "usehooks-ts";
@@ -129,8 +141,11 @@ var debug2 = debug.extend("quarry");
129
141
 
130
142
  // src/quarry/transports/userOpExecutor.ts
131
143
  import { setBalance } from "viem/actions";
132
- function userOpExecutor({ executor }) {
133
- return () => {
144
+ function userOpExecutor({
145
+ executor,
146
+ fallbackEth
147
+ }) {
148
+ return (opts) => {
134
149
  debug2("using a local user op executor", executor.account.address);
135
150
  if (executor.chain.id === 31337) {
136
151
  debug2("setting executor balance");
@@ -165,7 +180,9 @@ function userOpExecutor({ executor }) {
165
180
  if (method === "eth_estimateUserOperationGas") {
166
181
  return await estimateUserOperationGas(params);
167
182
  }
168
- throw new Error(`userOpExecutor: method "${method}" not supported`);
183
+ debug2(`userOpExecutor: method "${method}" not overridden, falling back to fallback transport`);
184
+ const { request: fallbackRequest } = fallbackEth(opts);
185
+ return fallbackRequest({ method, params });
169
186
  };
170
187
  return createTransport({
171
188
  key: "userOpExecutor",
@@ -177,20 +194,41 @@ function userOpExecutor({ executor }) {
177
194
  }
178
195
 
179
196
  // src/getBundlerTransport.ts
197
+ import { wiresaw } from "@latticexyz/common/internal";
180
198
  function getBundlerTransport(chain) {
199
+ const ethRpcUrl = chain.rpcUrls.default.http[0];
181
200
  const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
182
- const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
183
- executor: createClient({
184
- chain,
185
- transport: fallback([webSocket(), http()]),
186
- account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
187
- pollingInterval: 10
188
- }).extend(transactionQueue())
189
- }) : null;
190
- if (!bundlerTransport) {
191
- throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
201
+ const wiresawWebSocketUrl = chain.rpcUrls.wiresaw?.webSocket?.[0];
202
+ if (wiresawWebSocketUrl) {
203
+ return wiresaw({
204
+ wiresaw: webSocket(wiresawWebSocketUrl),
205
+ fallbackBundler: http(bundlerHttpUrl),
206
+ fallbackEth: http(ethRpcUrl)
207
+ });
208
+ }
209
+ const wiresawHttpUrl = chain.rpcUrls.wiresaw?.http[0];
210
+ if (wiresawHttpUrl) {
211
+ return wiresaw({
212
+ wiresaw: http(wiresawHttpUrl),
213
+ fallbackBundler: http(bundlerHttpUrl),
214
+ fallbackEth: http(ethRpcUrl)
215
+ });
216
+ }
217
+ if (bundlerHttpUrl) {
218
+ return http(bundlerHttpUrl);
219
+ }
220
+ if (chain.id === 31337) {
221
+ return userOpExecutor({
222
+ executor: createClient({
223
+ chain,
224
+ transport: fallback([webSocket(), http()]),
225
+ account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
226
+ pollingInterval: 10
227
+ }).extend(transactionQueue()),
228
+ fallbackEth: http(ethRpcUrl)
229
+ });
192
230
  }
193
- return bundlerTransport;
231
+ throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
194
232
  }
195
233
 
196
234
  // src/EntryKitConfigProvider.tsx
@@ -300,6 +338,19 @@ var Shadow = forwardRef(function Shadow2({ mode, children }, forwardedRef) {
300
338
  import { twMerge } from "tailwind-merge";
301
339
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
302
340
  function Modal({ open, onOpenChange, children }) {
341
+ useEffect2(() => {
342
+ function onKeyDown(event) {
343
+ if (event.defaultPrevented) return;
344
+ if (event.key === "Escape" && open) {
345
+ event.preventDefault();
346
+ onOpenChange?.(false);
347
+ }
348
+ }
349
+ window.addEventListener("keydown", onKeyDown);
350
+ return () => {
351
+ window.removeEventListener("keydown", onKeyDown);
352
+ };
353
+ }, [onOpenChange, open]);
303
354
  return /* @__PURE__ */ jsx4(DialogRoot, { open, onOpenChange, children: /* @__PURE__ */ jsx4(DialogPortal, { children: /* @__PURE__ */ jsxs2(Shadow, { mode: "modal", children: [
304
355
  /* @__PURE__ */ jsx4("div", { className: twMerge("fixed inset-0", "bg-neutral-800/85", "animate-in animate-duration-300 fade-in") }),
305
356
  /* @__PURE__ */ jsx4(
@@ -310,17 +361,11 @@ function Modal({ open, onOpenChange, children }) {
310
361
  "grid items-end sm:items-center",
311
362
  "animate-in animate-duration-300 fade-in slide-in-from-bottom-16"
312
363
  ),
313
- children: /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsx4(
314
- DialogContent,
315
- {
316
- className: "outline-none w-full max-w-[26rem] mx-auto",
317
- "aria-describedby": void 0,
318
- onOpenAutoFocus: (event) => {
319
- event.preventDefault();
320
- },
321
- children
322
- }
323
- ) })
364
+ children: /* @__PURE__ */ jsx4("div", { children: /* @__PURE__ */ jsxs2(DialogContent, { className: "outline-none w-full max-w-[26rem] mx-auto", children: [
365
+ /* @__PURE__ */ jsx4(DialogTitle, { className: "sr-only", children: "EntryKit" }),
366
+ /* @__PURE__ */ jsx4(DialogDescription, { className: "sr-only", children: "Sign in to this app" }),
367
+ children
368
+ ] }) })
324
369
  }
325
370
  )
326
371
  ] }) }) });
@@ -354,10 +399,10 @@ function useAccountModal() {
354
399
  }
355
400
 
356
401
  // src/AccountModal.tsx
357
- import { twMerge as twMerge10 } from "tailwind-merge";
402
+ import { twMerge as twMerge19 } from "tailwind-merge";
358
403
 
359
404
  // src/AccountModalContent.tsx
360
- import { useAccount as useAccount2, useConnectorClient } from "wagmi";
405
+ import { useAccount as useAccount8, useConnectorClient } from "wagmi";
361
406
 
362
407
  // src/ConnectWallet.tsx
363
408
  import { useAccount } from "wagmi";
@@ -495,13 +540,13 @@ function AppInfo() {
495
540
 
496
541
  // src/ConnectWallet.tsx
497
542
  import { twMerge as twMerge5 } from "tailwind-merge";
498
- import { useEffect as useEffect2, useState as useState2 } from "react";
543
+ import { useEffect as useEffect3, useState as useState2 } from "react";
499
544
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
500
545
  function ConnectWallet() {
501
546
  const userAccount = useAccount();
502
547
  const { openConnectModal, connectModalOpen } = useConnectModal();
503
548
  const [hasAutoOpened, setHasAutoOpened] = useState2(false);
504
- useEffect2(() => {
549
+ useEffect3(() => {
505
550
  if (!connectModalOpen && !hasAutoOpened) {
506
551
  openConnectModal?.();
507
552
  setHasAutoOpened(true);
@@ -531,16 +576,39 @@ function ConnectWallet() {
531
576
  }
532
577
 
533
578
  // src/onboarding/ConnectedSteps.tsx
534
- import { useEffect as useEffect7, useMemo as useMemo2, useRef as useRef2, useState as useState3 } from "react";
535
- import { twMerge as twMerge7 } from "tailwind-merge";
579
+ import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef4, useState as useState6 } from "react";
580
+ import { twMerge as twMerge17 } from "tailwind-merge";
536
581
 
537
- // src/onboarding/common.ts
538
- import { parseEther as parseEther2 } from "viem";
539
- var minGasBalance = parseEther2("0.01");
582
+ // src/onboarding/usePrerequisites.ts
583
+ import { useClient as useClient6, useConfig } from "wagmi";
584
+ import { getBalanceQueryOptions as getBalanceQueryOptions2 } from "wagmi/query";
585
+ import { queryOptions as queryOptions6, skipToken as skipToken6, useQuery as useQuery7, useQueryClient } from "@tanstack/react-query";
586
+
587
+ // src/getPaymaster.ts
588
+ function getPaymaster(chain) {
589
+ const contracts = chain.contracts ?? {};
590
+ if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
591
+ if ("address" in contracts.quarryPaymaster) {
592
+ return {
593
+ type: "quarry",
594
+ address: contracts.quarryPaymaster.address,
595
+ isGasPass: !!chain.rpcUrls.quarryPassIssuer?.http?.[0]
596
+ };
597
+ }
598
+ }
599
+ if ("paymaster" in contracts && contracts.paymaster != null) {
600
+ if ("address" in contracts.paymaster) {
601
+ return {
602
+ type: "simple",
603
+ address: contracts.paymaster.address
604
+ };
605
+ }
606
+ }
607
+ }
540
608
 
541
609
  // src/onboarding/quarry/useAllowance.ts
542
610
  import { useClient } from "wagmi";
543
- import { queryOptions, useQuery as useQuery2 } from "@tanstack/react-query";
611
+ import { queryOptions, skipToken, useQuery as useQuery2 } from "@tanstack/react-query";
544
612
 
545
613
  // src/quarry/getAllowance.ts
546
614
  import { numberToHex as numberToHex2 } from "viem";
@@ -551,7 +619,10 @@ import { parseAbi } from "viem";
551
619
  var paymasterAbi = parseAbi([
552
620
  "error SpenderSystem_AlreadyRegistered(address spender, address user)",
553
621
  "error SpenderSystem_HasOwnBalance(address spender)",
554
- "function registerSpender(address spender)"
622
+ "error BalanceSystem_BalanceTooHigh(address user, uint256 balance, uint256 max)",
623
+ "error BalanceSystem_InsufficientBalance(address user, uint256 amount, uint256 balance)",
624
+ "function registerSpender(address spender)",
625
+ "function depositTo(address to) payable"
555
626
  ]);
556
627
  var paymasterConfig = defineStore({
557
628
  namespaces: {
@@ -565,6 +636,13 @@ var paymasterConfig = defineStore({
565
636
  },
566
637
  key: ["user"]
567
638
  },
639
+ Balance: {
640
+ schema: {
641
+ user: "address",
642
+ balance: "uint256"
643
+ },
644
+ key: ["user"]
645
+ },
568
646
  Grantor: {
569
647
  schema: {
570
648
  grantor: "address",
@@ -614,29 +692,6 @@ var paymasterTables = paymasterConfig.namespaces.root.tables;
614
692
  import { getRecord, getStaticDataLocation } from "@latticexyz/store/internal";
615
693
  import { getKeyTuple } from "@latticexyz/protocol-parser/internal";
616
694
  import { setStorageAt } from "viem/actions";
617
-
618
- // src/getPaymaster.ts
619
- function getPaymaster(chain) {
620
- const contracts = chain.contracts ?? {};
621
- if ("quarryPaymaster" in contracts && contracts.quarryPaymaster != null) {
622
- if ("address" in contracts.quarryPaymaster) {
623
- return {
624
- type: "quarry",
625
- address: contracts.quarryPaymaster.address
626
- };
627
- }
628
- }
629
- if ("paymaster" in contracts && contracts.paymaster != null) {
630
- if ("address" in contracts.paymaster) {
631
- return {
632
- type: "simple",
633
- address: contracts.paymaster.address
634
- };
635
- }
636
- }
637
- }
638
-
639
- // src/quarry/getAllowance.ts
640
695
  async function getAllowance({ client, userAddress }) {
641
696
  const paymaster = getPaymaster(client.chain);
642
697
  if (paymaster?.type !== "quarry") return null;
@@ -670,13 +725,10 @@ function getAllowanceQueryOptions({
670
725
  client,
671
726
  userAddress
672
727
  }) {
673
- const queryKey = ["getAllowance", client?.uid, userAddress];
674
- return queryOptions(
675
- client && userAddress ? {
676
- queryKey,
677
- queryFn: () => getAllowance({ client, userAddress })
678
- } : { queryKey, enabled: false }
679
- );
728
+ return queryOptions({
729
+ queryKey: ["getAllowance", client?.uid, userAddress],
730
+ queryFn: client && userAddress ? () => getAllowance({ client, userAddress }) : skipToken
731
+ });
680
732
  }
681
733
  function useAllowance(userAddress) {
682
734
  const { chainId } = useEntryKitConfig();
@@ -686,7 +738,7 @@ function useAllowance(userAddress) {
686
738
 
687
739
  // src/onboarding/quarry/useSpender.ts
688
740
  import { useClient as useClient2 } from "wagmi";
689
- import { queryOptions as queryOptions2, useQuery as useQuery3 } from "@tanstack/react-query";
741
+ import { queryOptions as queryOptions2, skipToken as skipToken2, useQuery as useQuery3 } from "@tanstack/react-query";
690
742
 
691
743
  // src/onboarding/quarry/getSpender.ts
692
744
  import { getRecord as getRecord2 } from "@latticexyz/store/internal";
@@ -708,18 +760,15 @@ function getSpenderQueryOptions({
708
760
  userAddress,
709
761
  sessionAddress
710
762
  }) {
711
- const queryKey = ["getSpender", client?.uid, userAddress, sessionAddress];
712
- return queryOptions2(
713
- client && userAddress && sessionAddress ? {
714
- queryKey,
715
- queryFn: () => getSpender({ client, userAddress, sessionAddress })
716
- } : { queryKey, enabled: false }
717
- );
763
+ return queryOptions2({
764
+ queryKey: ["getSpender", client?.uid, userAddress, sessionAddress],
765
+ queryFn: client && userAddress && sessionAddress ? () => getSpender({ client, userAddress, sessionAddress }) : skipToken2
766
+ });
718
767
  }
719
768
 
720
769
  // src/onboarding/useDelegation.ts
721
770
  import { useClient as useClient3 } from "wagmi";
722
- import { queryOptions as queryOptions3, useQuery as useQuery4 } from "@tanstack/react-query";
771
+ import { queryOptions as queryOptions3, skipToken as skipToken3, useQuery as useQuery4 } from "@tanstack/react-query";
723
772
 
724
773
  // src/onboarding/getDelegation.ts
725
774
  import { getRecord as getRecord3 } from "@latticexyz/store/internal";
@@ -738,12 +787,19 @@ var worldAbi = parseAbi2([
738
787
  ]);
739
788
 
740
789
  // src/onboarding/getDelegation.ts
741
- async function getDelegation({ client, worldAddress, userAddress, sessionAddress }) {
790
+ async function getDelegation({
791
+ client,
792
+ worldAddress,
793
+ userAddress,
794
+ sessionAddress,
795
+ // TODO: move everything to latest instead of pending
796
+ blockTag = "pending"
797
+ }) {
742
798
  const record = await getRecord3(client, {
743
799
  address: worldAddress,
744
800
  table: worldTables.UserDelegationControl,
745
801
  key: { delegator: userAddress, delegatee: sessionAddress },
746
- blockTag: "pending"
802
+ blockTag
747
803
  });
748
804
  return record.delegationControlId === unlimitedDelegationControlId;
749
805
  }
@@ -755,22 +811,15 @@ function getDelegationQueryOptions({
755
811
  userAddress,
756
812
  sessionAddress
757
813
  }) {
758
- const queryKey = ["getDelegation", client?.uid, worldAddress, userAddress, sessionAddress];
759
- return queryOptions3(
760
- client && userAddress && sessionAddress ? {
761
- queryKey,
762
- queryFn: () => getDelegation({ client, worldAddress, userAddress, sessionAddress })
763
- } : { queryKey, enabled: false }
764
- );
814
+ return queryOptions3({
815
+ queryKey: ["getDelegation", client?.uid, worldAddress, userAddress, sessionAddress],
816
+ queryFn: client && userAddress && sessionAddress ? () => getDelegation({ client, worldAddress, userAddress, sessionAddress }) : skipToken3
817
+ });
765
818
  }
766
819
 
767
- // src/onboarding/usePrerequisites.ts
768
- import { queryOptions as queryOptions5, useQuery as useQuery6, useQueryClient } from "@tanstack/react-query";
769
- import { useClient as useClient5, useConfig } from "wagmi";
770
-
771
820
  // src/useSessionAccount.ts
772
821
  import { useClient as useClient4 } from "wagmi";
773
- import { queryOptions as queryOptions4, useQuery as useQuery5 } from "@tanstack/react-query";
822
+ import { queryOptions as queryOptions4, skipToken as skipToken4, useQuery as useQuery5 } from "@tanstack/react-query";
774
823
 
775
824
  // src/getSessionAccount.ts
776
825
  import { toSimpleSmartAccount } from "permissionless/accounts";
@@ -834,20 +883,50 @@ function getSessionAccountQueryOptions({
834
883
  client,
835
884
  userAddress
836
885
  }) {
837
- const queryKey = ["getSessionAccount", client?.uid, userAddress];
838
- return queryOptions4(
839
- client && userAddress ? {
840
- queryKey,
841
- queryFn: () => getSessionAccount({ client, userAddress }),
842
- staleTime: Infinity,
843
- // TODO: replace with function to retry only connection errors
844
- retry: false
845
- } : { queryKey, enabled: false }
846
- );
886
+ return queryOptions4({
887
+ queryKey: ["getSessionAccount", client?.uid, userAddress],
888
+ queryFn: client && userAddress ? () => getSessionAccount({ client, userAddress }) : skipToken4,
889
+ staleTime: Infinity,
890
+ // TODO: replace with function to retry only connection errors
891
+ retry: false
892
+ });
893
+ }
894
+
895
+ // src/onboarding/quarry/useBalance.ts
896
+ import { useClient as useClient5 } from "wagmi";
897
+ import { queryOptions as queryOptions5, skipToken as skipToken5, useQuery as useQuery6 } from "@tanstack/react-query";
898
+
899
+ // src/quarry/getBalance.ts
900
+ import { getRecord as getRecord4 } from "@latticexyz/store/internal";
901
+ async function getBalance({ client, userAddress }) {
902
+ const paymaster = getPaymaster(client.chain);
903
+ if (paymaster?.type !== "quarry") return null;
904
+ const record = await getRecord4(client, {
905
+ address: paymaster.address,
906
+ table: paymasterTables.Balance,
907
+ key: { user: userAddress },
908
+ blockTag: "pending"
909
+ });
910
+ return record.balance;
911
+ }
912
+
913
+ // src/onboarding/quarry/useBalance.ts
914
+ function getBalanceQueryOptions({
915
+ client,
916
+ userAddress
917
+ }) {
918
+ return queryOptions5({
919
+ queryKey: ["getBalance", client?.uid, userAddress],
920
+ queryFn: client && userAddress ? () => getBalance({ client, userAddress }) : skipToken5
921
+ });
922
+ }
923
+ function useBalance(userAddress) {
924
+ const { chainId } = useEntryKitConfig();
925
+ const client = useClient5({ chainId });
926
+ return useQuery6(getBalanceQueryOptions({ client, userAddress }));
847
927
  }
848
928
 
849
929
  // src/onboarding/usePrerequisites.ts
850
- import { getBalanceQueryOptions } from "wagmi/query";
851
930
  function getPrequisitesQueryOptions({
852
931
  queryClient,
853
932
  config,
@@ -855,46 +934,46 @@ function getPrequisitesQueryOptions({
855
934
  userAddress,
856
935
  worldAddress
857
936
  }) {
858
- const queryKey = ["getPrerequisites", client?.uid, userAddress];
859
- return queryOptions5(
860
- client && userAddress ? {
861
- queryKey,
862
- async queryFn() {
863
- const paymaster = getPaymaster(client.chain);
864
- const {
865
- account: { address: sessionAddress }
866
- } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
867
- const [sessionBalance, allowance, spender, hasDelegation] = await Promise.all([
868
- !paymaster ? queryClient.fetchQuery(
869
- getBalanceQueryOptions(config, { chainId: client.chain.id, address: sessionAddress })
870
- ) : null,
871
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })) : null,
872
- paymaster?.type === "quarry" ? queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })) : null,
873
- queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress }))
874
- ]);
875
- const hasAllowance = allowance == null || allowance >= minGasBalance;
876
- const isSpender = spender == null ? true : spender;
877
- const hasGasBalance = sessionBalance == null || sessionBalance.value >= minGasBalance;
878
- return {
879
- sessionAddress,
880
- hasAllowance,
881
- isSpender,
882
- hasGasBalance,
883
- hasDelegation,
884
- // we intentionally don't enforce an allowance/gas balance here
885
- complete: isSpender && hasDelegation
886
- };
887
- },
888
- retry: false
889
- } : { queryKey, enabled: false }
890
- );
937
+ return queryOptions6({
938
+ queryKey: ["getPrerequisites", client?.uid, userAddress],
939
+ queryFn: client && userAddress ? async () => {
940
+ const paymaster = getPaymaster(client.chain);
941
+ const {
942
+ account: { address: sessionAddress }
943
+ } = await queryClient.fetchQuery(getSessionAccountQueryOptions({ client, userAddress }));
944
+ const [sessionBalance, allowance, spender, quarryBalance, hasDelegation] = await Promise.all([
945
+ !paymaster ? queryClient.fetchQuery(
946
+ getBalanceQueryOptions2(config, { chainId: client.chain.id, address: sessionAddress })
947
+ ) : null,
948
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getAllowanceQueryOptions({ client, userAddress })) : null,
949
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getSpenderQueryOptions({ client, userAddress, sessionAddress })) : null,
950
+ paymaster?.type === "quarry" ? queryClient.fetchQuery(getBalanceQueryOptions({ client, userAddress })) : null,
951
+ queryClient.fetchQuery(getDelegationQueryOptions({ client, worldAddress, userAddress, sessionAddress }))
952
+ ]);
953
+ const hasAllowance = allowance == null || allowance > 0n;
954
+ const isSpender = spender == null ? true : spender;
955
+ const hasGasBalance = sessionBalance == null || sessionBalance.value > 0n;
956
+ const hasQuarryGasBalance = quarryBalance == null || quarryBalance > 0n;
957
+ return {
958
+ sessionAddress,
959
+ hasAllowance,
960
+ isSpender,
961
+ hasGasBalance,
962
+ hasQuarryGasBalance,
963
+ hasDelegation,
964
+ // we intentionally don't enforce an allowance/gas balance here
965
+ complete: isSpender && hasDelegation
966
+ };
967
+ } : skipToken6,
968
+ retry: false
969
+ });
891
970
  }
892
971
  function usePrerequisites(userAddress) {
893
972
  const queryClient = useQueryClient();
894
973
  const config = useConfig();
895
974
  const { chainId, worldAddress } = useEntryKitConfig();
896
- const client = useClient5({ chainId });
897
- const prereqs = useQuery6(
975
+ const client = useClient6({ chainId });
976
+ const prereqs = useQuery7(
898
977
  getPrequisitesQueryOptions({
899
978
  queryClient,
900
979
  config,
@@ -911,10 +990,10 @@ function usePrerequisites(userAddress) {
911
990
  import { useDisconnect } from "wagmi";
912
991
 
913
992
  // src/useENS.ts
914
- import { useQuery as useQuery7 } from "@tanstack/react-query";
993
+ import { useQuery as useQuery8 } from "@tanstack/react-query";
915
994
  function useENS(address) {
916
995
  const normalizedAddress = address?.toLowerCase();
917
- return useQuery7({
996
+ return useQuery8({
918
997
  enabled: !!normalizedAddress,
919
998
  queryKey: ["ens", normalizedAddress],
920
999
  queryFn: async () => {
@@ -992,10 +1071,10 @@ function removeError(error2) {
992
1071
  }
993
1072
 
994
1073
  // src/errors/useShowMutationError.ts
995
- import { useEffect as useEffect3 } from "react";
1074
+ import { useEffect as useEffect4 } from "react";
996
1075
  function useShowMutationError(result) {
997
1076
  const { error: error2, reset } = result;
998
- useEffect3(() => {
1077
+ useEffect4(() => {
999
1078
  if (!error2) return;
1000
1079
  return addError({ error: error2, dismiss: reset });
1001
1080
  }, [error2, reset]);
@@ -1033,8 +1112,11 @@ function Wallet({ isActive, isExpanded, userAddress }) {
1033
1112
  ] });
1034
1113
  }
1035
1114
 
1036
- // src/onboarding/quarry/useClaimGasPass.ts
1115
+ // src/onboarding/quarry/Allowance.tsx
1037
1116
  import { parseEther as parseEther3 } from "viem";
1117
+
1118
+ // src/onboarding/quarry/useClaimGasPass.ts
1119
+ import { parseEther as parseEther2 } from "viem";
1038
1120
  import { useMutation, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
1039
1121
 
1040
1122
  // src/quarry/transports/quarryPassIssuer.ts
@@ -1064,11 +1146,11 @@ async function claimGasPass({ chain, userAddress }) {
1064
1146
  }
1065
1147
 
1066
1148
  // src/onboarding/quarry/useClaimGasPass.ts
1067
- import { useClient as useClient6 } from "wagmi";
1149
+ import { useClient as useClient7 } from "wagmi";
1068
1150
  function useClaimGasPass() {
1069
1151
  const queryClient = useQueryClient2();
1070
1152
  const { chain } = useEntryKitConfig();
1071
- const client = useClient6({ chainId: chain.id });
1153
+ const client = useClient7({ chainId: chain.id });
1072
1154
  const mutationKey = ["claimGasPass", chain.id];
1073
1155
  return useMutation({
1074
1156
  retry: 0,
@@ -1076,7 +1158,7 @@ function useClaimGasPass() {
1076
1158
  mutationFn: async (userAddress) => {
1077
1159
  if (chain.id === 31337) {
1078
1160
  if (!client) throw new Error("No client?");
1079
- await setAllowanceSlot({ client, userAddress, allowance: parseEther3("1") });
1161
+ await setAllowanceSlot({ client, userAddress, allowance: parseEther2("1") });
1080
1162
  } else {
1081
1163
  await claimGasPass({ chain, userAddress });
1082
1164
  }
@@ -1130,13 +1212,13 @@ function Balance({ wei }) {
1130
1212
  }
1131
1213
 
1132
1214
  // src/onboarding/quarry/Allowance.tsx
1133
- import { useEffect as useEffect5 } from "react";
1215
+ import { useEffect as useEffect6 } from "react";
1134
1216
 
1135
1217
  // src/errors/useShowQueryError.ts
1136
- import { useEffect as useEffect4 } from "react";
1218
+ import { useEffect as useEffect5 } from "react";
1137
1219
  function useShowQueryError(result) {
1138
1220
  const { error: error2, refetch } = result;
1139
- useEffect4(() => {
1221
+ useEffect5(() => {
1140
1222
  if (!error2) return;
1141
1223
  return addError({ error: error2, retry: refetch, dismiss: () => {
1142
1224
  } });
@@ -1149,9 +1231,9 @@ import { jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1149
1231
  function Allowance({ isActive, isExpanded, userAddress }) {
1150
1232
  const allowance = useShowQueryError(useAllowance(userAddress));
1151
1233
  const claimGasPass2 = useShowMutationError(useClaimGasPass());
1152
- useEffect5(() => {
1234
+ useEffect6(() => {
1153
1235
  const timer = setTimeout(() => {
1154
- if (isActive && claimGasPass2.status === "idle" && allowance.isSuccess && allowance.data != null && allowance.data < minGasBalance) {
1236
+ if (isActive && claimGasPass2.status === "idle" && allowance.isSuccess && allowance.data != null && allowance.data < parseEther3("0.01")) {
1155
1237
  claimGasPass2.mutate(userAddress);
1156
1238
  }
1157
1239
  });
@@ -1179,6 +1261,9 @@ function Allowance({ isActive, isExpanded, userAddress }) {
1179
1261
  ] });
1180
1262
  }
1181
1263
 
1264
+ // src/onboarding/Session.tsx
1265
+ import { useEffect as useEffect7 } from "react";
1266
+
1182
1267
  // src/onboarding/useSetupSession.ts
1183
1268
  import { encodeFunctionData } from "viem";
1184
1269
  import { useMutation as useMutation2, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
@@ -1192,7 +1277,7 @@ function defineCall(call) {
1192
1277
  }
1193
1278
 
1194
1279
  // src/onboarding/useSetupSession.ts
1195
- import { useClient as useClient7 } from "wagmi";
1280
+ import { useClient as useClient8 } from "wagmi";
1196
1281
  import { resourceToHex as resourceToHex2 } from "@latticexyz/common";
1197
1282
  import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json";
1198
1283
 
@@ -1204,7 +1289,7 @@ import { getAction as getAction3 } from "viem/utils";
1204
1289
  import { toHex } from "viem";
1205
1290
  import { signTypedData } from "viem/actions";
1206
1291
  import { callWithSignatureTypes } from "@latticexyz/world-module-callwithsignature/internal";
1207
- import { getRecord as getRecord4 } from "@latticexyz/store/internal";
1292
+ import { getRecord as getRecord5 } from "@latticexyz/store/internal";
1208
1293
  import moduleConfig from "@latticexyz/world-module-callwithsignature/mud.config";
1209
1294
  import { hexToResource } from "@latticexyz/common";
1210
1295
  import { getAction as getAction2 } from "viem/utils";
@@ -1216,7 +1301,7 @@ async function signCall({
1216
1301
  nonce: initialNonce,
1217
1302
  client
1218
1303
  }) {
1219
- const nonce = initialNonce ?? (client ? (await getRecord4(client, {
1304
+ const nonce = initialNonce ?? (client ? (await getRecord5(client, {
1220
1305
  address: worldAddress,
1221
1306
  table: moduleConfig.tables.CallWithSignatureNonces,
1222
1307
  key: { signer: userClient.account.address },
@@ -1269,7 +1354,7 @@ import { systemsConfig as worldSystemsConfig } from "@latticexyz/world/mud.confi
1269
1354
  function useSetupSession({ userClient }) {
1270
1355
  const queryClient = useQueryClient3();
1271
1356
  const { chainId, worldAddress } = useEntryKitConfig();
1272
- const client = useClient7({ chainId });
1357
+ const client = useClient8({ chainId });
1273
1358
  const mutationKey = ["setupSession", client?.chain.id, userClient.account.address];
1274
1359
  return useMutation2({
1275
1360
  retry: 0,
@@ -1375,20 +1460,18 @@ function useSetupSession({ userClient }) {
1375
1460
  });
1376
1461
  }
1377
1462
 
1378
- // src/onboarding/Session.tsx
1379
- import { useEffect as useEffect6 } from "react";
1380
-
1381
1463
  // src/useSessionClient.ts
1382
- import { useClient as useClient8 } from "wagmi";
1464
+ import { useClient as useClient9 } from "wagmi";
1383
1465
  import {
1384
- queryOptions as queryOptions6,
1385
- useQuery as useQuery8,
1466
+ queryOptions as queryOptions7,
1467
+ skipToken as skipToken7,
1468
+ useQuery as useQuery9,
1386
1469
  useQueryClient as useQueryClient4
1387
1470
  } from "@tanstack/react-query";
1388
1471
 
1389
1472
  // src/getSessionClient.ts
1390
1473
  import { smartAccountActions } from "permissionless";
1391
- import { callFrom } from "@latticexyz/world/internal";
1474
+ import { callFrom, sendUserOperationFrom } from "@latticexyz/world/internal";
1392
1475
 
1393
1476
  // src/createBundlerClient.ts
1394
1477
  import {
@@ -1420,7 +1503,7 @@ function createFeeEstimator(client) {
1420
1503
  if (client.chain.id === 31337) {
1421
1504
  return async () => ({ maxFeePerGas: 100000n, maxPriorityFeePerGas: 0n });
1422
1505
  }
1423
- if ([690, 17069, 17420].includes(client.chain.id)) {
1506
+ if ([690, 17069, 17420, 695569].includes(client.chain.id)) {
1424
1507
  return () => getAction5(client, estimateFeesPerGas, "estimateFeesPerGas")({ chain: client.chain });
1425
1508
  }
1426
1509
  }
@@ -1447,6 +1530,12 @@ async function getSessionClient({
1447
1530
  delegatorAddress: userAddress,
1448
1531
  publicClient: client
1449
1532
  })
1533
+ ).extend(
1534
+ sendUserOperationFrom({
1535
+ worldAddress,
1536
+ delegatorAddress: userAddress,
1537
+ publicClient: client
1538
+ })
1450
1539
  ).extend(() => ({ userAddress, worldAddress, internal_signer: sessionSigner }));
1451
1540
  return sessionClient;
1452
1541
  }
@@ -1461,32 +1550,29 @@ function getSessionClientQueryOptions({
1461
1550
  userAddress,
1462
1551
  worldAddress
1463
1552
  }) {
1464
- const queryKey = ["getSessionClient", client?.uid, userAddress, worldAddress];
1465
- return queryOptions6(
1466
- userAddress ? {
1467
- queryKey,
1468
- async queryFn() {
1469
- const { account: sessionAccount, signer: sessionSigner } = await queryClient.fetchQuery(
1470
- getSessionAccountQueryOptions({ client, userAddress })
1471
- );
1472
- return await getSessionClient({
1473
- sessionAccount,
1474
- sessionSigner,
1475
- userAddress,
1476
- worldAddress
1477
- });
1478
- },
1479
- staleTime: Infinity,
1480
- // TODO: replace with function to retry only connection errors
1481
- retry: false
1482
- } : { queryKey, enabled: false }
1483
- );
1553
+ return queryOptions7({
1554
+ queryKey: ["getSessionClient", client?.uid, userAddress, worldAddress],
1555
+ queryFn: userAddress ? async () => {
1556
+ const { account: sessionAccount, signer: sessionSigner } = await queryClient.fetchQuery(
1557
+ getSessionAccountQueryOptions({ client, userAddress })
1558
+ );
1559
+ return await getSessionClient({
1560
+ sessionAccount,
1561
+ sessionSigner,
1562
+ userAddress,
1563
+ worldAddress
1564
+ });
1565
+ } : skipToken7,
1566
+ staleTime: Infinity,
1567
+ // TODO: replace with function to retry only connection errors
1568
+ retry: false
1569
+ });
1484
1570
  }
1485
1571
  function useSessionClient(userAddress) {
1486
1572
  const queryClient = useQueryClient4();
1487
1573
  const { chainId, worldAddress } = useEntryKitConfig();
1488
- const client = useClient8({ chainId });
1489
- return useQuery8(
1574
+ const client = useClient9({ chainId });
1575
+ return useQuery9(
1490
1576
  getSessionClientQueryOptions({
1491
1577
  queryClient,
1492
1578
  client,
@@ -1502,9 +1588,11 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1502
1588
  const sessionClient = useShowQueryError(useSessionClient(userClient.account.address));
1503
1589
  const setup = useShowMutationError(useSetupSession({ userClient }));
1504
1590
  const hasSession = !registerDelegation && !registerDelegation;
1505
- useEffect6(() => {
1591
+ const { data: prerequisites } = usePrerequisites(userClient.account.address);
1592
+ const { hasAllowance, hasGasBalance, hasQuarryGasBalance } = prerequisites ?? {};
1593
+ useEffect7(() => {
1506
1594
  const timer = setTimeout(() => {
1507
- if (isActive && setup.status === "idle" && sessionClient.data && !hasSession) {
1595
+ if (isActive && setup.status === "idle" && sessionClient.data && !hasSession && (hasAllowance || hasGasBalance || hasQuarryGasBalance)) {
1508
1596
  setup.mutate({
1509
1597
  sessionClient: sessionClient.data,
1510
1598
  registerSpender,
@@ -1513,7 +1601,17 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1513
1601
  }
1514
1602
  });
1515
1603
  return () => clearTimeout(timer);
1516
- }, [hasSession, isActive, registerDelegation, registerSpender, sessionClient, setup]);
1604
+ }, [
1605
+ hasSession,
1606
+ isActive,
1607
+ registerDelegation,
1608
+ registerSpender,
1609
+ sessionClient,
1610
+ setup,
1611
+ hasAllowance,
1612
+ hasGasBalance,
1613
+ hasQuarryGasBalance
1614
+ ]);
1517
1615
  return /* @__PURE__ */ jsxs13("div", { className: "flex flex-col gap-4", children: [
1518
1616
  /* @__PURE__ */ jsxs13("div", { className: "flex justify-between gap-4", children: [
1519
1617
  /* @__PURE__ */ jsxs13("div", { children: [
@@ -1541,7 +1639,10 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1541
1639
  }
1542
1640
 
1543
1641
  // src/onboarding/GasBalance.tsx
1544
- import { useBalance, useWatchBlockNumber } from "wagmi";
1642
+ import { useEffect as useEffect9, useState as useState3 } from "react";
1643
+ import { parseEther as parseEther4 } from "viem";
1644
+ import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
1645
+ import { useBalance as useBalance2, useWatchBlockNumber } from "wagmi";
1545
1646
 
1546
1647
  // src/data/relayChains.json
1547
1648
  var relayChains_default = {
@@ -1560,9 +1661,15 @@ var relayChains_default = {
1560
1661
  "111": {
1561
1662
  bridgeUrl: "https://testnets.relay.link/bridge/bob"
1562
1663
  },
1664
+ "130": {
1665
+ bridgeUrl: "https://relay.link/bridge/unichain"
1666
+ },
1563
1667
  "137": {
1564
1668
  bridgeUrl: "https://relay.link/bridge/polygon"
1565
1669
  },
1670
+ "146": {
1671
+ bridgeUrl: "https://relay.link/bridge/sonic"
1672
+ },
1566
1673
  "185": {
1567
1674
  bridgeUrl: "https://relay.link/bridge/mint"
1568
1675
  },
@@ -1581,6 +1688,9 @@ var relayChains_default = {
1581
1688
  "690": {
1582
1689
  bridgeUrl: "https://relay.link/bridge/redstone"
1583
1690
  },
1691
+ "747": {
1692
+ bridgeUrl: "https://relay.link/bridge/flow-evm"
1693
+ },
1584
1694
  "919": {
1585
1695
  bridgeUrl: "https://testnets.relay.link/bridge/mode-testnet"
1586
1696
  },
@@ -1596,18 +1706,30 @@ var relayChains_default = {
1596
1706
  "1329": {
1597
1707
  bridgeUrl: "https://relay.link/bridge/sei"
1598
1708
  },
1709
+ "1424": {
1710
+ bridgeUrl: "https://relay.link/bridge/perennial"
1711
+ },
1712
+ "1514": {
1713
+ bridgeUrl: "https://relay.link/bridge/story"
1714
+ },
1599
1715
  "1625": {
1600
1716
  bridgeUrl: "https://relay.link/bridge/gravity"
1601
1717
  },
1602
1718
  "1868": {
1603
1719
  bridgeUrl: "https://relay.link/bridge/soneium"
1604
1720
  },
1721
+ "1923": {
1722
+ bridgeUrl: "https://relay.link/bridge/swellchain"
1723
+ },
1605
1724
  "1993": {
1606
1725
  bridgeUrl: "https://testnets.relay.link/bridge/b3"
1607
1726
  },
1608
1727
  "1996": {
1609
1728
  bridgeUrl: "https://relay.link/bridge/sanko"
1610
1729
  },
1730
+ "2187": {
1731
+ bridgeUrl: "https://relay.link/bridge/game7"
1732
+ },
1611
1733
  "2741": {
1612
1734
  bridgeUrl: "https://relay.link/bridge/abstract"
1613
1735
  },
@@ -1677,6 +1799,9 @@ var relayChains_default = {
1677
1799
  "42170": {
1678
1800
  bridgeUrl: "https://relay.link/bridge/arbitrum-nova"
1679
1801
  },
1802
+ "42220": {
1803
+ bridgeUrl: "https://relay.link/bridge/celo"
1804
+ },
1680
1805
  "43114": {
1681
1806
  bridgeUrl: "https://relay.link/bridge/avalanche"
1682
1807
  },
@@ -1707,12 +1832,18 @@ var relayChains_default = {
1707
1832
  "80002": {
1708
1833
  bridgeUrl: "https://testnets.relay.link/bridge/amoy"
1709
1834
  },
1835
+ "80094": {
1836
+ bridgeUrl: "https://relay.link/bridge/berachain"
1837
+ },
1710
1838
  "81457": {
1711
1839
  bridgeUrl: "https://relay.link/bridge/blast"
1712
1840
  },
1713
1841
  "84532": {
1714
1842
  bridgeUrl: "https://testnets.relay.link/bridge/base-sepolia"
1715
1843
  },
1844
+ "167000": {
1845
+ bridgeUrl: "https://relay.link/bridge/taiko"
1846
+ },
1716
1847
  "167009": {
1717
1848
  bridgeUrl: "https://testnets.relay.link/bridge/hekla"
1718
1849
  },
@@ -1728,6 +1859,9 @@ var relayChains_default = {
1728
1859
  "660279": {
1729
1860
  bridgeUrl: "https://relay.link/bridge/xai"
1730
1861
  },
1862
+ "695569": {
1863
+ bridgeUrl: "https://testnets.relay.link/bridge/pyrope"
1864
+ },
1731
1865
  "911867": {
1732
1866
  bridgeUrl: "https://testnets.relay.link/bridge/odyssey"
1733
1867
  },
@@ -1740,6 +1874,9 @@ var relayChains_default = {
1740
1874
  "3397901": {
1741
1875
  bridgeUrl: "https://testnets.relay.link/bridge/funki-testnet"
1742
1876
  },
1877
+ "3441006": {
1878
+ bridgeUrl: "https://testnets.relay.link/bridge/manta-pacific-testnet"
1879
+ },
1743
1880
  "4457845": {
1744
1881
  bridgeUrl: "https://testnets.relay.link/bridge/zero-sepolia"
1745
1882
  },
@@ -1767,6 +1904,9 @@ var relayChains_default = {
1767
1904
  "792703809": {
1768
1905
  bridgeUrl: "https://relay.link/bridge/solana"
1769
1906
  },
1907
+ "845320008": {
1908
+ bridgeUrl: "https://testnets.relay.link/bridge/lordchain-testnet"
1909
+ },
1770
1910
  "888888888": {
1771
1911
  bridgeUrl: "https://relay.link/bridge/ancient8"
1772
1912
  },
@@ -1787,11 +1927,11 @@ var relayChains_default = {
1787
1927
  // src/onboarding/useSetBalance.ts
1788
1928
  import { useQueryClient as useQueryClient5, useMutation as useMutation3 } from "@tanstack/react-query";
1789
1929
  import { setBalance as setBalance2 } from "viem/actions";
1790
- import { useClient as useClient9 } from "wagmi";
1930
+ import { useClient as useClient10 } from "wagmi";
1791
1931
  function useSetBalance() {
1792
1932
  const queryClient = useQueryClient5();
1793
1933
  const { chainId } = useEntryKitConfig();
1794
- const client = useClient9({ chainId });
1934
+ const client = useClient10({ chainId });
1795
1935
  return useMutation3({
1796
1936
  retry: 0,
1797
1937
  mutationKey: ["setBalance", chainId],
@@ -1807,21 +1947,93 @@ function useSetBalance() {
1807
1947
  });
1808
1948
  }
1809
1949
 
1950
+ // src/errors/usePrevious.ts
1951
+ import { useEffect as useEffect8, useRef as useRef2 } from "react";
1952
+ function usePrevious(value, initialValue) {
1953
+ const ref = useRef2();
1954
+ useEffect8(() => {
1955
+ ref.current = { value };
1956
+ }, [value]);
1957
+ return ref.current ? ref.current.value : initialValue;
1958
+ }
1959
+
1960
+ // src/icons/IconSVG.tsx
1961
+ import { twMerge as twMerge7 } from "tailwind-merge";
1962
+ import { jsx as jsx16 } from "react/jsx-runtime";
1963
+ function IconSVG({ className, children, ...props }) {
1964
+ return /* @__PURE__ */ jsx16(
1965
+ "svg",
1966
+ {
1967
+ xmlns: "http://www.w3.org/2000/svg",
1968
+ viewBox: "0 0 24 24",
1969
+ fill: "currentColor",
1970
+ className: twMerge7("-my-[0.125em] h-[1.25em] w-[1.25em]", className),
1971
+ ...props,
1972
+ children
1973
+ }
1974
+ );
1975
+ }
1976
+
1977
+ // src/icons/CopyIcon.tsx
1978
+ import { jsx as jsx17 } from "react/jsx-runtime";
1979
+ function CopyIcon(props) {
1980
+ return /* @__PURE__ */ jsx17(IconSVG, { ...props, children: /* @__PURE__ */ jsx17(
1981
+ "path",
1982
+ {
1983
+ d: "M8 5H6C4.89543 5 4 5.89543 4 7V19C4 20.1046 4.89543 21 6 21H16C17.1046 21 18 20.1046 18 19V18M8 5C8 6.10457 8.89543 7 10 7H12C13.1046 7 14 6.10457 14 5M8 5C8 3.89543 8.89543 3 10 3H12C13.1046 3 14 3.89543 14 5M14 5H16C17.1046 5 18 5.89543 18 7V10M20 14H10M10 14L13 11M10 14L13 17",
1984
+ fill: "none",
1985
+ stroke: "currentColor",
1986
+ strokeWidth: "2",
1987
+ strokeLinecap: "round",
1988
+ strokeLinejoin: "round"
1989
+ }
1990
+ ) });
1991
+ }
1992
+
1993
+ // src/icons/CheckIcon.tsx
1994
+ import { jsx as jsx18 } from "react/jsx-runtime";
1995
+ function CheckIcon(props) {
1996
+ return /* @__PURE__ */ jsx18(IconSVG, { ...props, children: /* @__PURE__ */ jsx18(
1997
+ "path",
1998
+ {
1999
+ d: "M5 13L9 17L19 7",
2000
+ fill: "none",
2001
+ stroke: "currentColor",
2002
+ strokeWidth: "2",
2003
+ strokeLinecap: "round",
2004
+ strokeLinejoin: "round"
2005
+ }
2006
+ ) });
2007
+ }
2008
+
1810
2009
  // src/onboarding/GasBalance.tsx
1811
- import { Fragment, jsx as jsx16, jsxs as jsxs14 } from "react/jsx-runtime";
2010
+ import { Fragment, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
1812
2011
  function GasBalance({ isActive, isExpanded, sessionAddress }) {
2012
+ const queryClient = useQueryClient6();
1813
2013
  const { chain } = useEntryKitConfig();
1814
- const balance = useShowQueryError(useBalance({ chainId: chain.id, address: sessionAddress }));
2014
+ const [copied, setCopied] = useState3(false);
2015
+ const balance = useShowQueryError(useBalance2({ chainId: chain.id, address: sessionAddress }));
2016
+ const prevBalance = usePrevious(balance.data);
1815
2017
  useWatchBlockNumber({ onBlockNumber: () => balance.refetch() });
1816
2018
  const setBalance3 = useShowMutationError(useSetBalance());
1817
2019
  const relayChain = relayChains_default[chain.id];
2020
+ const handleCopy = () => {
2021
+ navigator.clipboard.writeText(sessionAddress);
2022
+ setCopied(true);
2023
+ setTimeout(() => setCopied(false), 2e3);
2024
+ };
2025
+ useEffect9(() => {
2026
+ if (balance.data != null && prevBalance?.value === 0n && balance.data.value > 0n) {
2027
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] });
2028
+ }
2029
+ }, [balance.data, prevBalance, setBalance3, sessionAddress, queryClient]);
1818
2030
  return /* @__PURE__ */ jsxs14("div", { className: "flex flex-col gap-4", children: [
1819
2031
  /* @__PURE__ */ jsxs14("div", { className: "flex justify-between gap-4", children: [
1820
2032
  /* @__PURE__ */ jsxs14("div", { children: [
1821
- /* @__PURE__ */ jsx16("div", { children: "Gas balance" }),
1822
- /* @__PURE__ */ jsx16("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx16(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx16(PendingIcon, { className: "text-sm" }) })
2033
+ /* @__PURE__ */ jsx19("div", { children: "Gas balance" }),
2034
+ /* @__PURE__ */ jsx19("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx19(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx19(PendingIcon, { className: "text-sm" }) })
1823
2035
  ] }),
1824
- chain.id === 31337 ? /* @__PURE__ */ jsx16(
2036
+ chain.id === 31337 ? /* @__PURE__ */ jsx19(
1825
2037
  Button,
1826
2038
  {
1827
2039
  variant: isActive ? "primary" : "tertiary",
@@ -1830,19 +2042,19 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1830
2042
  pending: balance.status === "pending" || setBalance3.status === "pending",
1831
2043
  onClick: () => setBalance3.mutate({
1832
2044
  address: sessionAddress,
1833
- value: minGasBalance + (balance.data?.value ?? 0n)
2045
+ value: parseEther4("0.01") + (balance.data?.value ?? 0n)
1834
2046
  }),
1835
2047
  children: "Top up"
1836
2048
  }
1837
2049
  ) : relayChain != null ? (
1838
2050
  // TODO: convert this to a <ButtonLink>
1839
- /* @__PURE__ */ jsx16(
2051
+ /* @__PURE__ */ jsx19(
1840
2052
  "a",
1841
2053
  {
1842
- href: `${relayChain.bridgeUrl}?${new URLSearchParams({ toAddress: sessionAddress })}`,
2054
+ href: `${relayChain.bridgeUrl}?${new URLSearchParams({ toAddress: sessionAddress, amount: "0.01" })}`,
1843
2055
  target: "_blank",
1844
2056
  rel: "noopener noreferrer",
1845
- children: /* @__PURE__ */ jsx16(
2057
+ children: /* @__PURE__ */ jsx19(
1846
2058
  Button,
1847
2059
  {
1848
2060
  variant: isActive ? "primary" : "tertiary",
@@ -1857,11 +2069,23 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1857
2069
  ) : null
1858
2070
  ] }),
1859
2071
  isExpanded ? /* @__PURE__ */ jsxs14(Fragment, { children: [
1860
- /* @__PURE__ */ jsx16("p", { className: "text-sm", children: "Your session's gas balance is used to pay for onchain computation." }),
2072
+ /* @__PURE__ */ jsx19("p", { className: "text-sm", children: "Your session's gas balance is used to pay for onchain computation." }),
1861
2073
  /* @__PURE__ */ jsxs14("p", { className: "text-sm", children: [
1862
2074
  "Send funds to",
1863
2075
  " ",
1864
- /* @__PURE__ */ jsx16("span", { className: "font-mono text-white", children: /* @__PURE__ */ jsx16(TruncatedHex, { hex: sessionAddress }) }),
2076
+ /* @__PURE__ */ jsxs14(
2077
+ "span",
2078
+ {
2079
+ className: "inline-flex items-center gap-1 font-mono text-white cursor-pointer hover:text-white/80 transition-colors",
2080
+ onClick: handleCopy,
2081
+ title: "Click to copy",
2082
+ children: [
2083
+ /* @__PURE__ */ jsx19(TruncatedHex, { hex: sessionAddress }),
2084
+ " ",
2085
+ copied ? /* @__PURE__ */ jsx19(CheckIcon, { className: "w-3.5 h-3.5" }) : /* @__PURE__ */ jsx19(CopyIcon, { className: "w-3.5 h-3.5" })
2086
+ ]
2087
+ }
2088
+ ),
1865
2089
  " ",
1866
2090
  "on ",
1867
2091
  chain.name,
@@ -1871,34 +2095,1096 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
1871
2095
  ] });
1872
2096
  }
1873
2097
 
1874
- // src/onboarding/ConnectedSteps.tsx
1875
- import { jsx as jsx17 } from "react/jsx-runtime";
1876
- function ConnectedSteps({ userClient, initialUserAddress }) {
1877
- const { chain } = useEntryKitConfig();
1878
- const paymaster = getPaymaster(chain);
1879
- const userAddress = userClient.account.address;
1880
- const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
1881
- useEffect7(() => {
1882
- if (prerequisitesError) {
1883
- console.error("Could not get prerequisites", prerequisitesError);
1884
- }
1885
- }, [prerequisitesError]);
1886
- const { closeAccountModal } = useAccountModal();
1887
- const isNewConnection = userAddress !== initialUserAddress;
1888
- const initialPrerequisites = useRef2(prerequisites);
1889
- useEffect7(() => {
1890
- if (prerequisites == null) return;
1891
- if (initialPrerequisites.current == null) {
1892
- initialPrerequisites.current = prerequisites;
2098
+ // src/onboarding/deposit/DepositFormContainer.tsx
2099
+ import { useState as useState5 } from "react";
2100
+ import { useChains as useChains4, useChainId } from "wagmi";
2101
+
2102
+ // src/onboarding/deposit/DepositViaTransferForm.tsx
2103
+ import { useAccount as useAccount5, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2104
+ import { encodeFunctionData as encodeFunctionData2 } from "viem";
2105
+ import { useMutation as useMutation4, useQuery as useQuery11 } from "@tanstack/react-query";
2106
+
2107
+ // src/onboarding/deposit/DepositForm.tsx
2108
+ import { useEffect as useEffect11, useRef as useRef3 } from "react";
2109
+ import { useAccount as useAccount4, useBalance as useBalance5, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2110
+ import { useIsMounted } from "usehooks-ts";
2111
+ import { twMerge as twMerge15 } from "tailwind-merge";
2112
+
2113
+ // src/onboarding/deposit/ChainSelect.tsx
2114
+ import { useEffect as useEffect10, useMemo as useMemo2 } from "react";
2115
+ import { useAccount as useAccount2, useSwitchChain } from "wagmi";
2116
+ import { twMerge as twMerge12 } from "tailwind-merge";
2117
+ import * as Select from "@radix-ui/react-select";
2118
+
2119
+ // src/icons/ChevronUpIcon.tsx
2120
+ import { jsx as jsx20 } from "react/jsx-runtime";
2121
+ function ChevronUpIcon(props) {
2122
+ return /* @__PURE__ */ jsx20(IconSVG, { viewBox: "0 0 20 20", ...props, children: /* @__PURE__ */ jsx20(
2123
+ "path",
2124
+ {
2125
+ d: "M14.7071 12.7071C14.3166 13.0976 13.6834 13.0976 13.2929 12.7071L10 9.41421L6.70711 12.7071C6.31658 13.0976 5.68342 13.0976 5.29289 12.7071C4.90237 12.3166 4.90237 11.6834 5.29289 11.2929L9.29289 7.29289C9.68342 6.90237 10.3166 6.90237 10.7071 7.29289L14.7071 11.2929C15.0976 11.6834 15.0976 12.3166 14.7071 12.7071Z",
2126
+ fillRule: "evenodd",
2127
+ clipRule: "evenodd"
1893
2128
  }
1894
- if (prerequisites.complete) {
1895
- if (isNewConnection || !initialPrerequisites.current.complete) {
1896
- closeAccountModal();
1897
- }
2129
+ ) });
2130
+ }
2131
+
2132
+ // src/icons/ChevronDownIcon.tsx
2133
+ import { jsx as jsx21 } from "react/jsx-runtime";
2134
+ function ChevronDownIcon(props) {
2135
+ return /* @__PURE__ */ jsx21(IconSVG, { viewBox: "0 0 20 20", ...props, children: /* @__PURE__ */ jsx21(
2136
+ "path",
2137
+ {
2138
+ d: "M5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289L10 10.5858L13.2929 7.29289C13.6834 6.90237 14.3166 6.90237 14.7071 7.29289C15.0976 7.68342 15.0976 8.31658 14.7071 8.70711L10.7071 12.7071C10.3166 13.0976 9.68342 13.0976 9.29289 12.7071L5.29289 8.70711C4.90237 8.31658 4.90237 7.68342 5.29289 7.29289Z",
2139
+ fillRule: "evenodd",
2140
+ clipRule: "evenodd"
1898
2141
  }
1899
- }, [closeAccountModal, isNewConnection, prerequisites]);
1900
- const { sessionAddress, hasAllowance, isSpender, hasDelegation, hasGasBalance } = prerequisites ?? {};
1901
- const steps = useMemo2(() => {
2142
+ ) });
2143
+ }
2144
+
2145
+ // src/ui/Slot.tsx
2146
+ import { isValidElement, cloneElement, Children } from "react";
2147
+ import { twMerge as twMerge8 } from "tailwind-merge";
2148
+ function Slot({
2149
+ children,
2150
+ ...props
2151
+ }) {
2152
+ if (isValidElement(children)) {
2153
+ return cloneElement(children, {
2154
+ ...props,
2155
+ ...children.props,
2156
+ style: {
2157
+ ...props.style,
2158
+ ...children.props.style
2159
+ },
2160
+ className: twMerge8(props.className, children.props.className)
2161
+ });
2162
+ }
2163
+ if (Children.count(children) > 1) {
2164
+ Children.only(null);
2165
+ }
2166
+ return null;
2167
+ }
2168
+
2169
+ // src/ui/Input.tsx
2170
+ import { twMerge as twMerge9 } from "tailwind-merge";
2171
+ import { jsx as jsx22 } from "react/jsx-runtime";
2172
+ function Input({ asChild, className, ...props }) {
2173
+ const Child = asChild ? Slot : "input";
2174
+ return /* @__PURE__ */ jsx22(
2175
+ Child,
2176
+ {
2177
+ className: twMerge9(
2178
+ "p-2.5 gap-1 border text-lg font-medium transition",
2179
+ "outline-none ring-2 ring-transparent focus-within:ring-orange-500 focus-within:border-transparent",
2180
+ "bg-white border-neutral-300 text-black placeholder:text-neutral-400",
2181
+ "dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:placeholder:text-neutral-500",
2182
+ className
2183
+ ),
2184
+ ...props
2185
+ }
2186
+ );
2187
+ }
2188
+
2189
+ // src/onboarding/deposit/ChainBalance.tsx
2190
+ import { useBalance as useBalance3 } from "wagmi";
2191
+ import { Fragment as Fragment2, jsx as jsx23 } from "react/jsx-runtime";
2192
+ function ChainBalance({ chainId, address }) {
2193
+ const balance = useBalance3({ chainId, address });
2194
+ return /* @__PURE__ */ jsx23(Fragment2, { children: balance.data ? /* @__PURE__ */ jsx23(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx23(PendingIcon, {}) });
2195
+ }
2196
+
2197
+ // src/onboarding/deposit/ChainIcon.tsx
2198
+ import { twMerge as twMerge11 } from "tailwind-merge";
2199
+
2200
+ // src/onboarding/deposit/PreloadedImage.tsx
2201
+ import { twMerge as twMerge10 } from "tailwind-merge";
2202
+ import { jsx as jsx24 } from "react/jsx-runtime";
2203
+ function PreloadedImage({ url, fallback: fallback2, className }) {
2204
+ const { isSuccess, isLoading } = usePreloadImage(url);
2205
+ return /* @__PURE__ */ jsx24("span", { className: twMerge10("inline-flex w-full h-full items-center justify-center overflow-clip", className), children: !isLoading ? isSuccess ? /* @__PURE__ */ jsx24("img", { src: url, className: "w-full h-full object-cover" }) : fallback2 : null });
2206
+ }
2207
+
2208
+ // src/onboarding/deposit/ChainIcon.tsx
2209
+ import { forwardRef as forwardRef2 } from "react";
2210
+ import { jsx as jsx25 } from "react/jsx-runtime";
2211
+ var ChainIcon = forwardRef2(function ChainIcon2({ name, url, className }, forwardedRef) {
2212
+ return /* @__PURE__ */ jsx25(
2213
+ "span",
2214
+ {
2215
+ ref: forwardedRef,
2216
+ className: twMerge11("flex-shrink-0 inline-flex w-6 aspect-square rounded-full overflow-clip", className),
2217
+ children: url ? /* @__PURE__ */ jsx25(PreloadedImage, { url }) : (
2218
+ // TODO: better placeholder
2219
+ /* @__PURE__ */ jsx25(
2220
+ "span",
2221
+ {
2222
+ className: twMerge11(
2223
+ "inline-flex items-center justify-center w-full h-full rounded-full",
2224
+ "border-2 border-dashed border-black/20 dark:border-white/50 opacity-50"
2225
+ ),
2226
+ children: name?.slice(0, 1)
2227
+ }
2228
+ )
2229
+ )
2230
+ }
2231
+ );
2232
+ });
2233
+
2234
+ // src/onboarding/deposit/useRelay.ts
2235
+ import {
2236
+ MAINNET_RELAY_API,
2237
+ TESTNET_RELAY_API,
2238
+ fetchChainConfigs,
2239
+ createClient as createClient2,
2240
+ LogLevel
2241
+ } from "@reservoir0x/relay-sdk";
2242
+ import { useQuery as useQuery10 } from "@tanstack/react-query";
2243
+ function useRelay() {
2244
+ const { chain } = useEntryKitConfig();
2245
+ const appOrigin = location.host;
2246
+ const baseApiUrl = chain.testnet ? TESTNET_RELAY_API : MAINNET_RELAY_API;
2247
+ return useQuery10({
2248
+ queryKey: ["relayChains", baseApiUrl, appOrigin],
2249
+ queryFn: async () => {
2250
+ debug("fetching relay chains from", baseApiUrl);
2251
+ const chains = await fetchChainConfigs(baseApiUrl);
2252
+ debug("got relay chains", chains);
2253
+ const client = createClient2({
2254
+ baseApiUrl,
2255
+ source: appOrigin,
2256
+ chains,
2257
+ logLevel: LogLevel.Verbose
2258
+ });
2259
+ return { client, chains };
2260
+ },
2261
+ refetchOnMount: false,
2262
+ refetchOnReconnect: false,
2263
+ refetchOnWindowFocus: false,
2264
+ staleTime: Infinity
2265
+ });
2266
+ }
2267
+
2268
+ // src/onboarding/deposit/ChainSelect.tsx
2269
+ import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
2270
+ function ChainSelect({ value, onChange }) {
2271
+ const theme = useTheme();
2272
+ const { frame } = useFrame();
2273
+ const userAccount = useAccount2();
2274
+ const { chains, switchChain } = useSwitchChain();
2275
+ const relay = useRelay();
2276
+ const relayChains = relay.data?.chains;
2277
+ const sourceChains = useMemo2(() => {
2278
+ return chains.map((sourceChain) => {
2279
+ const relayChain = relayChains?.find((c) => c.id === sourceChain.id);
2280
+ return {
2281
+ ...sourceChain,
2282
+ relayChain
2283
+ };
2284
+ }).filter((c) => c.relayChain);
2285
+ }, [chains, relayChains]);
2286
+ const selectedChain = sourceChains.find((c) => c.id === value);
2287
+ useEffect10(() => {
2288
+ if (sourceChains.length > 0 && !selectedChain) {
2289
+ const defaultChain = sourceChains[0];
2290
+ onChange(defaultChain.id);
2291
+ switchChain({ chainId: defaultChain.id });
2292
+ }
2293
+ }, [value, selectedChain, sourceChains, onChange, switchChain]);
2294
+ return /* @__PURE__ */ jsxs15(
2295
+ Select.Root,
2296
+ {
2297
+ value: value.toString(),
2298
+ onValueChange: (value2) => {
2299
+ if (value2) {
2300
+ const chain = sourceChains.find((chain2) => chain2.id.toString() === value2);
2301
+ if (!chain) throw new Error(`Unknown chain selected: ${value2}`);
2302
+ onChange(chain.id);
2303
+ }
2304
+ },
2305
+ children: [
2306
+ /* @__PURE__ */ jsx26(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2307
+ /* @__PURE__ */ jsx26(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx26(
2308
+ ChainIcon,
2309
+ {
2310
+ id: selectedChain?.id,
2311
+ name: selectedChain?.name,
2312
+ url: selectedChain?.relayChain?.icon?.[theme],
2313
+ className: "w-8"
2314
+ }
2315
+ ) }),
2316
+ /* @__PURE__ */ jsx26(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
2317
+ /* @__PURE__ */ jsx26(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2318
+ /* @__PURE__ */ jsx26(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2319
+ ] }) })
2320
+ ] }) }),
2321
+ frame.contentDocument ? /* @__PURE__ */ jsx26(Select.Portal, { container: frame.contentDocument.body, children: /* @__PURE__ */ jsx26(Select.Content, { position: "popper", className: "w-[352px] mt-1 animate-in fade-in slide-in-from-top-2", children: /* @__PURE__ */ jsx26(Select.Viewport, { children: /* @__PURE__ */ jsx26(
2322
+ Select.Group,
2323
+ {
2324
+ className: twMerge12(
2325
+ "flex flex-col border divide-y",
2326
+ "bg-neutral-100 text-neutral-700 border-neutral-300 divide-neutral-300",
2327
+ "dark:bg-neutral-800 dark:text-neutral-300 dark:border-neutral-700 dark:divide-neutral-700"
2328
+ ),
2329
+ children: sourceChains.map((chain) => (
2330
+ // TODO: figure out why up/down arrow jump to top/bottom rather than cycling through items
2331
+ /* @__PURE__ */ jsxs15(
2332
+ Select.Item,
2333
+ {
2334
+ value: chain.id.toString(),
2335
+ className: twMerge12(
2336
+ "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2337
+ // TODO: different style for checked/active state
2338
+ "text-black focus:bg-white data-[state=checked]:bg-neutral-200",
2339
+ "dark:text-white dark:focus:bg-neutral-700 dark:data-[state=checked]:bg-neutral-900"
2340
+ ),
2341
+ children: [
2342
+ /* @__PURE__ */ jsx26(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2343
+ /* @__PURE__ */ jsx26("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2344
+ /* @__PURE__ */ jsx26("span", { className: "flex-shrink-0 font-mono text-sm text-neutral-500 dark:text-neutral-400", children: /* @__PURE__ */ jsx26(ChainBalance, { chainId: chain.id, address: userAccount.address }) })
2345
+ ]
2346
+ },
2347
+ chain.id
2348
+ )
2349
+ ))
2350
+ }
2351
+ ) }) }) }) : null
2352
+ ]
2353
+ }
2354
+ );
2355
+ }
2356
+
2357
+ // src/onboarding/deposit/AmountInput.tsx
2358
+ import { formatEther as formatEther3, parseEther as parseEther5 } from "viem";
2359
+ import { twMerge as twMerge13 } from "tailwind-merge";
2360
+ import { forwardRef as forwardRef3 } from "react";
2361
+ import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2362
+ var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange }, forwardedRef) {
2363
+ return /* @__PURE__ */ jsx27(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2364
+ /* @__PURE__ */ jsx27(
2365
+ "input",
2366
+ {
2367
+ ref: forwardedRef,
2368
+ className: twMerge13(
2369
+ "peer flex-grow outline-none bg-transparent",
2370
+ "placeholder:text-neutral-400",
2371
+ "dark:placeholder:text-neutral-500"
2372
+ ),
2373
+ placeholder: "0.005",
2374
+ required: true,
2375
+ autoFocus: true,
2376
+ defaultValue: initialAmount == null ? "" : formatEther3(initialAmount),
2377
+ onChange: (event) => {
2378
+ const input = event.currentTarget;
2379
+ if (input.value.trim() === "") {
2380
+ input.setCustomValidity("");
2381
+ onChange(void 0);
2382
+ return;
2383
+ }
2384
+ const value = input.value.trim().replace(/\.$/, ".0");
2385
+ if (!/^\d*(\.\d+)?$/.test(value)) {
2386
+ return input.setCustomValidity("Invalid amount.");
2387
+ }
2388
+ input.setCustomValidity("");
2389
+ onChange(parseEther5(value));
2390
+ }
2391
+ }
2392
+ ),
2393
+ /* @__PURE__ */ jsx27(
2394
+ "span",
2395
+ {
2396
+ className: twMerge13(
2397
+ "flex-shrink-0 text-2xl",
2398
+ "peer-placeholder-shown:text-neutral-400",
2399
+ "dark:peer-placeholder-shown:text-neutral-500"
2400
+ ),
2401
+ children: /* @__PURE__ */ jsx27(EthIcon, {})
2402
+ }
2403
+ )
2404
+ ] }) });
2405
+ });
2406
+
2407
+ // src/onboarding/deposit/SubmitButton.tsx
2408
+ import { useAccount as useAccount3, useBalance as useBalance4, useSwitchChain as useSwitchChain2 } from "wagmi";
2409
+ import { twMerge as twMerge14 } from "tailwind-merge";
2410
+ import { parseEther as parseEther6 } from "viem";
2411
+ import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2412
+ var MAX_DEPOSIT_AMOUNT = "0.1";
2413
+ function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2414
+ const { chainId: userChainId, address: userAddress } = useAccount3();
2415
+ const { data: userBalance } = useBalance4({ address: userAddress });
2416
+ const shouldSwitchChain = chainId != null && chainId !== userChainId;
2417
+ const switchChain = useSwitchChain2();
2418
+ if (shouldSwitchChain) {
2419
+ return /* @__PURE__ */ jsx28(
2420
+ Button,
2421
+ {
2422
+ type: "button",
2423
+ variant: "primary",
2424
+ className: twMerge14("w-full", className),
2425
+ pending: switchChain.isPending,
2426
+ onClick: () => switchChain.switchChain({ chainId }),
2427
+ children: "Switch chain"
2428
+ }
2429
+ );
2430
+ } else if (amount) {
2431
+ if (amount > parseEther6(MAX_DEPOSIT_AMOUNT)) {
2432
+ return /* @__PURE__ */ jsxs17(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: [
2433
+ "Max amount is ",
2434
+ MAX_DEPOSIT_AMOUNT,
2435
+ " ETH"
2436
+ ] });
2437
+ } else if (amount > (userBalance?.value ?? 0n)) {
2438
+ return /* @__PURE__ */ jsx28(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2439
+ }
2440
+ }
2441
+ return /* @__PURE__ */ jsx28(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2442
+ }
2443
+
2444
+ // src/icons/WarningIcon.tsx
2445
+ import { jsx as jsx29 } from "react/jsx-runtime";
2446
+ function WarningIcon(props) {
2447
+ return /* @__PURE__ */ jsx29(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx29(
2448
+ "path",
2449
+ {
2450
+ d: "M12 9V11M12 15H12.01M5.07183 19H18.9282C20.4678 19 21.4301 17.3333 20.6603 16L13.7321 4C12.9623 2.66667 11.0378 2.66667 10.268 4L3.33978 16C2.56998 17.3333 3.53223 19 5.07183 19Z",
2451
+ stroke: "currentColor",
2452
+ strokeWidth: "2",
2453
+ strokeLinecap: "round",
2454
+ strokeLinejoin: "round"
2455
+ }
2456
+ ) });
2457
+ }
2458
+
2459
+ // src/formatGas.ts
2460
+ import { formatGwei } from "viem";
2461
+ function formatGas(wei) {
2462
+ const formatted = formatGwei(wei);
2463
+ const magnitude = Math.floor(parseFloat(formatted)).toString().length;
2464
+ return parseFloat(formatted).toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
2465
+ }
2466
+
2467
+ // src/onboarding/deposit/DepositForm.tsx
2468
+ import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
2469
+ function DepositForm({
2470
+ sourceChain,
2471
+ setSourceChainId,
2472
+ amount,
2473
+ setAmount,
2474
+ estimatedFee,
2475
+ estimatedTime,
2476
+ onSubmit,
2477
+ submitButton
2478
+ }) {
2479
+ const amountInputRef = useRef3(null);
2480
+ const isMounted = useIsMounted();
2481
+ const { address: userAddress, chainId: userChainId } = useAccount4();
2482
+ const balance = useShowQueryError(useBalance5({ chainId: sourceChain.id, address: userAddress }));
2483
+ const quarryBalance = useShowQueryError(useBalance(userAddress));
2484
+ useWatchBlockNumber2({
2485
+ onBlockNumber: () => {
2486
+ balance.refetch();
2487
+ quarryBalance.refetch();
2488
+ }
2489
+ });
2490
+ const minimumBalance = amount != null ? amount + (estimatedFee?.fee ?? 0n) : void 0;
2491
+ const hasMinimumBalance = balance.data != null ? balance.data.value > (minimumBalance ?? 0n) : void 0;
2492
+ useEffect11(() => {
2493
+ amountInputRef.current?.focus();
2494
+ }, [userChainId]);
2495
+ return /* @__PURE__ */ jsxs18(
2496
+ "form",
2497
+ {
2498
+ className: "flex flex-col gap-5",
2499
+ onSubmit: async (event) => {
2500
+ event.preventDefault();
2501
+ try {
2502
+ await onSubmit();
2503
+ if (isMounted()) {
2504
+ setAmount(void 0);
2505
+ if (amountInputRef.current) {
2506
+ amountInputRef.current.value = "";
2507
+ }
2508
+ }
2509
+ } catch (error2) {
2510
+ console.error("Error during deposit", error2);
2511
+ } finally {
2512
+ amountInputRef.current?.focus();
2513
+ }
2514
+ },
2515
+ children: [
2516
+ /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
2517
+ /* @__PURE__ */ jsx30(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2518
+ /* @__PURE__ */ jsx30(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2519
+ ] }),
2520
+ /* @__PURE__ */ jsxs18(
2521
+ "dl",
2522
+ {
2523
+ className: twMerge15(
2524
+ "grid grid-cols-2 divide-y text-sm leading-loose [&_>_:is(dt,dd)]:px-1 [&_>_dd]:text-right",
2525
+ "divide-neutral-200 text-neutral-500",
2526
+ "dark:divide-neutral-700 dark:text-neutral-400"
2527
+ ),
2528
+ children: [
2529
+ /* @__PURE__ */ jsx30("dt", { children: "Available to deposit" }),
2530
+ /* @__PURE__ */ jsx30("dd", { children: balance.isSuccess ? /* @__PURE__ */ jsx30(Balance, { wei: balance.data.value }) : balance.isError ? /* @__PURE__ */ jsx30("span", { title: String(balance.error), children: /* @__PURE__ */ jsx30(WarningIcon, { className: "inline-block text-amber-500" }) }) : balance.isLoading ? /* @__PURE__ */ jsx30(PendingIcon, { className: "inline-block text-xs" }) : null }),
2531
+ /* @__PURE__ */ jsx30("dt", { children: "Gas balance after deposit" }),
2532
+ /* @__PURE__ */ jsx30("dd", { children: /* @__PURE__ */ jsx30(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2533
+ /* @__PURE__ */ jsx30("dt", { children: "Estimated fee" }),
2534
+ /* @__PURE__ */ jsx30("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment4, { children: [
2535
+ formatGas(estimatedFee.fee),
2536
+ " gwei"
2537
+ ] }) : estimatedFee.error ? /* @__PURE__ */ jsx30("span", { title: String(estimatedFee.error), children: /* @__PURE__ */ jsx30(WarningIcon, { className: "inline-block text-amber-500" }) }) : estimatedFee.isLoading ? /* @__PURE__ */ jsx30(PendingIcon, { className: "inline-block text-xs" }) : null }),
2538
+ /* @__PURE__ */ jsx30("dt", { children: "Time to deposit" }),
2539
+ /* @__PURE__ */ jsx30("dd", { children: estimatedTime })
2540
+ ]
2541
+ }
2542
+ ),
2543
+ hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx30(SubmitButton, { disabled: true, children: "Not enough funds" })
2544
+ ]
2545
+ }
2546
+ );
2547
+ }
2548
+
2549
+ // src/onboarding/deposit/useDeposits.ts
2550
+ import { createStore as createStore4 } from "zustand/vanilla";
2551
+ import { useStore as useStore2 } from "zustand";
2552
+ import { useCallback as useCallback2, useMemo as useMemo3 } from "react";
2553
+ var store4 = createStore4(() => ({
2554
+ count: 0,
2555
+ deposits: []
2556
+ }));
2557
+ function useDeposits() {
2558
+ const deposits = useStore2(store4, (state) => state.deposits);
2559
+ const addDeposit = useCallback2((transaction) => {
2560
+ store4.setState((state) => {
2561
+ if (transaction.type === "relay") {
2562
+ const existingDeposit = state.deposits.find(
2563
+ (deposit) => deposit.type === "relay" && deposit.requestId === transaction.requestId
2564
+ );
2565
+ if (existingDeposit) {
2566
+ return state;
2567
+ }
2568
+ }
2569
+ return {
2570
+ count: state.count + 1,
2571
+ deposits: [
2572
+ ...state.deposits,
2573
+ {
2574
+ ...transaction,
2575
+ uid: `deposit-${state.count}`
2576
+ }
2577
+ ]
2578
+ };
2579
+ });
2580
+ }, []);
2581
+ const removeDeposit = useCallback2((uid) => {
2582
+ store4.setState((state) => ({
2583
+ deposits: state.deposits.filter((deposit) => deposit.uid !== uid)
2584
+ }));
2585
+ }, []);
2586
+ return useMemo3(
2587
+ () => ({
2588
+ deposits,
2589
+ addDeposit,
2590
+ removeDeposit
2591
+ }),
2592
+ [addDeposit, deposits, removeDeposit]
2593
+ );
2594
+ }
2595
+
2596
+ // src/onboarding/deposit/DepositViaTransferForm.tsx
2597
+ import { jsx as jsx31 } from "react/jsx-runtime";
2598
+ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2599
+ const { chain } = useEntryKitConfig();
2600
+ const paymaster = getPaymaster(chain);
2601
+ const publicClient = usePublicClient();
2602
+ const { address: userAddress } = useAccount5();
2603
+ const { writeContractAsync } = useWriteContract();
2604
+ const { addDeposit } = useDeposits();
2605
+ if (!userAddress) {
2606
+ throw new Error("User address not found");
2607
+ }
2608
+ const { data: gasPrice } = useQuery11({
2609
+ queryKey: ["gasPrice", sourceChain.id],
2610
+ queryFn: async () => {
2611
+ if (!publicClient) throw new Error("Public client not available");
2612
+ return publicClient.getGasPrice();
2613
+ },
2614
+ refetchInterval: 15e3,
2615
+ enabled: !!publicClient
2616
+ });
2617
+ const { data: prepareData, error: prepareError } = usePrepareTransactionRequest({
2618
+ to: paymaster?.address,
2619
+ data: encodeFunctionData2({
2620
+ abi: paymasterAbi,
2621
+ functionName: "depositTo",
2622
+ args: [userAddress]
2623
+ }),
2624
+ value: amount
2625
+ });
2626
+ const deposit = useMutation4({
2627
+ mutationKey: ["depositViaTransfer", amount?.toString()],
2628
+ mutationFn: async () => {
2629
+ if (!paymaster) throw new Error("Paymaster not found");
2630
+ if (!publicClient) throw new Error("Public client not found");
2631
+ if (!amount) throw new Error("Amount cannot be 0");
2632
+ try {
2633
+ const hash = await writeContractAsync({
2634
+ address: paymaster.address,
2635
+ abi: paymasterAbi,
2636
+ functionName: "depositTo",
2637
+ args: [userAddress],
2638
+ value: amount
2639
+ });
2640
+ const receipt = publicClient.waitForTransactionReceipt({ hash }).then((receipt2) => {
2641
+ if (receipt2.status === "reverted") {
2642
+ throw new Error("Transfer transaction reverted.");
2643
+ }
2644
+ return receipt2;
2645
+ });
2646
+ const pendingDeposit = {
2647
+ type: "transfer",
2648
+ amount,
2649
+ chainL1Id: sourceChain.id,
2650
+ chainL2Id: chain.id,
2651
+ hash,
2652
+ receipt,
2653
+ start: /* @__PURE__ */ new Date(),
2654
+ estimatedTime: 1e3 * 12,
2655
+ isComplete: receipt.then(() => void 0)
2656
+ };
2657
+ addDeposit(pendingDeposit);
2658
+ } catch (error2) {
2659
+ console.error("Error while depositing via bridge", error2);
2660
+ throw error2;
2661
+ }
2662
+ }
2663
+ });
2664
+ const estimatedFee = prepareData?.gas && gasPrice ? prepareData.gas * gasPrice : void 0;
2665
+ return /* @__PURE__ */ jsx31(
2666
+ DepositForm,
2667
+ {
2668
+ sourceChain,
2669
+ setSourceChainId,
2670
+ amount,
2671
+ setAmount,
2672
+ estimatedFee: {
2673
+ fee: estimatedFee,
2674
+ isLoading: !prepareData && !prepareError || !gasPrice,
2675
+ error: prepareError instanceof Error ? prepareError : void 0
2676
+ },
2677
+ estimatedTime: "A few seconds",
2678
+ onSubmit: async () => {
2679
+ await deposit.mutateAsync();
2680
+ },
2681
+ submitButton: /* @__PURE__ */ jsx31(
2682
+ SubmitButton,
2683
+ {
2684
+ variant: "primary",
2685
+ amount,
2686
+ chainId: sourceChain.id,
2687
+ disabled: !!prepareError || !amount || !userAddress,
2688
+ pending: deposit.isPending,
2689
+ children: "Deposit"
2690
+ }
2691
+ )
2692
+ }
2693
+ );
2694
+ }
2695
+
2696
+ // src/onboarding/deposit/DepositViaRelayForm.tsx
2697
+ import { encodeFunctionData as encodeFunctionData3 } from "viem";
2698
+ import { useAccount as useAccount6, useWalletClient } from "wagmi";
2699
+ import { useMutation as useMutation5, useQuery as useQuery12 } from "@tanstack/react-query";
2700
+ import { jsx as jsx32 } from "react/jsx-runtime";
2701
+ var ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
2702
+ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2703
+ const { chain, chainId: destinationChainId } = useEntryKitConfig();
2704
+ const paymaster = getPaymaster(chain);
2705
+ const { data: wallet } = useWalletClient();
2706
+ const { address: userAddress } = useAccount6();
2707
+ const { addDeposit } = useDeposits();
2708
+ const { data: relay } = useRelay();
2709
+ const relayClient = relay?.client;
2710
+ const quote = useQuery12({
2711
+ queryKey: ["relayBridgeQuote", sourceChain.id, amount?.toString()],
2712
+ queryFn: async () => {
2713
+ if (!relayClient) throw new Error("No Relay client found.");
2714
+ if (!userAddress) throw new Error("No user address found.");
2715
+ const result = await relayClient.actions.getQuote({
2716
+ chainId: sourceChain.id,
2717
+ toChainId: destinationChainId,
2718
+ currency: ETH_ADDRESS,
2719
+ toCurrency: ETH_ADDRESS,
2720
+ amount: amount?.toString(),
2721
+ tradeType: "EXACT_OUTPUT",
2722
+ recipient: paymaster?.address,
2723
+ wallet,
2724
+ txs: [
2725
+ {
2726
+ to: paymaster?.address,
2727
+ data: encodeFunctionData3({
2728
+ abi: paymasterAbi,
2729
+ functionName: "depositTo",
2730
+ args: [userAddress]
2731
+ }),
2732
+ value: amount?.toString()
2733
+ }
2734
+ ]
2735
+ });
2736
+ if (!result) {
2737
+ throw new Error("Failed to get relay quote");
2738
+ }
2739
+ return result;
2740
+ },
2741
+ retry: 1,
2742
+ refetchInterval: 15e3,
2743
+ enabled: !!amount && !!userAddress && !!relayClient
2744
+ });
2745
+ const deposit = useMutation5({
2746
+ mutationKey: ["depositViaRelay", sourceChain.id, amount?.toString()],
2747
+ mutationFn: async ({ quote: quote2, amount: amount2 }) => {
2748
+ if (!relayClient) throw new Error("No Relay client found.");
2749
+ if (!wallet) throw new Error("No wallet found.");
2750
+ try {
2751
+ return new Promise((resolve) => {
2752
+ const pendingDeposit = relayClient.actions.execute({
2753
+ quote: quote2,
2754
+ wallet,
2755
+ onProgress(progress) {
2756
+ const currentStep = progress.currentStep;
2757
+ const requestId = currentStep?.requestId;
2758
+ const currentState = currentStep?.items[0]?.progressState;
2759
+ if (requestId && currentState === "validating") {
2760
+ addDeposit({
2761
+ type: "relay",
2762
+ requestId,
2763
+ amount: amount2,
2764
+ chainL1Id: sourceChain.id,
2765
+ chainL2Id: destinationChainId,
2766
+ start: /* @__PURE__ */ new Date(),
2767
+ estimatedTime: 1e3 * 30,
2768
+ depositPromise: pendingDeposit,
2769
+ isComplete: pendingDeposit.then(() => void 0)
2770
+ });
2771
+ resolve(void 0);
2772
+ }
2773
+ }
2774
+ });
2775
+ });
2776
+ } catch (error2) {
2777
+ console.error("Error while depositing via Relay", error2);
2778
+ throw error2;
2779
+ }
2780
+ }
2781
+ });
2782
+ const fees = quote.data?.fees;
2783
+ const gasFee = BigInt(fees?.gas?.amount ?? 0);
2784
+ const relayerFee = BigInt(fees?.relayer?.amount ?? 0);
2785
+ const fee = gasFee + relayerFee;
2786
+ return /* @__PURE__ */ jsx32(
2787
+ DepositForm,
2788
+ {
2789
+ sourceChain,
2790
+ setSourceChainId,
2791
+ amount,
2792
+ setAmount,
2793
+ estimatedFee: {
2794
+ fee: fee != null ? BigInt(fee) : void 0,
2795
+ isLoading: quote.isLoading,
2796
+ error: quote.error instanceof Error ? quote.error : void 0
2797
+ },
2798
+ estimatedTime: "A few seconds",
2799
+ onSubmit: async () => {
2800
+ if (!quote.data || !amount) return;
2801
+ await deposit.mutateAsync({ quote: quote.data, amount });
2802
+ },
2803
+ submitButton: /* @__PURE__ */ jsx32(
2804
+ SubmitButton,
2805
+ {
2806
+ variant: "primary",
2807
+ amount,
2808
+ chainId: sourceChain.id,
2809
+ disabled: quote.isError || !amount,
2810
+ pending: deposit.isPending,
2811
+ children: "Deposit"
2812
+ }
2813
+ )
2814
+ }
2815
+ );
2816
+ }
2817
+
2818
+ // src/onboarding/deposit/Deposits.tsx
2819
+ import { useEffect as useEffect13 } from "react";
2820
+ import { useQuery as useQuery15, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
2821
+
2822
+ // src/onboarding/deposit/TransferDepositStatus.tsx
2823
+ import { useQuery as useQuery13 } from "@tanstack/react-query";
2824
+
2825
+ // src/onboarding/deposit/DepositStatus.tsx
2826
+ import { useEffect as useEffect12, useState as useState4 } from "react";
2827
+ import { twMerge as twMerge16 } from "tailwind-merge";
2828
+
2829
+ // src/icons/CloseIcon.tsx
2830
+ import { jsx as jsx33 } from "react/jsx-runtime";
2831
+ function CloseIcon(props) {
2832
+ return /* @__PURE__ */ jsx33(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx33(
2833
+ "path",
2834
+ {
2835
+ d: "M6 18L18 6M6 6L18 18",
2836
+ fill: "none",
2837
+ stroke: "currentColor",
2838
+ strokeWidth: "2",
2839
+ strokeLinecap: "round",
2840
+ strokeLinejoin: "round"
2841
+ }
2842
+ ) });
2843
+ }
2844
+
2845
+ // src/onboarding/deposit/DepositStatus.tsx
2846
+ import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
2847
+ function DepositStatus({ status, progress, children, onDismiss }) {
2848
+ const [appear, setAppear] = useState4(false);
2849
+ useEffect12(() => {
2850
+ setAppear(true);
2851
+ }, []);
2852
+ return /* @__PURE__ */ jsxs19("div", { className: "group bg-white dark:bg-neutral-900 flex flex-col animate-in fade-in slide-in-from-bottom-2 animate-out fade-out", children: [
2853
+ /* @__PURE__ */ jsxs19("div", { className: "py-1 text-sm flex items-center gap-2", children: [
2854
+ /* @__PURE__ */ jsx34("div", { className: "flex-grow", children }),
2855
+ /* @__PURE__ */ jsxs19("div", { className: "flex-shrink-0 grid", children: [
2856
+ /* @__PURE__ */ jsx34("span", { className: "col-start-1 row-start-1 transition opacity-100 group-hover:opacity-0 group-hover:pointer-events-none", children: status === "success" ? /* @__PURE__ */ jsx34(CheckIcon, { className: "text-green-600" }) : status === "error" ? /* @__PURE__ */ jsx34(WarningIcon, { className: "text-amber-500" }) : /* @__PURE__ */ jsx34(PendingIcon, { className: "text-neutral-400 dark:text-neutral-500 transition" }) }),
2857
+ /* @__PURE__ */ jsx34(
2858
+ "button",
2859
+ {
2860
+ type: "button",
2861
+ className: twMerge16(
2862
+ "col-start-1 row-start-1 flex items-center justify-center transition",
2863
+ "opacity-0 pointer-events-none",
2864
+ "group-hover:opacity-100 group-hover:pointer-events-auto",
2865
+ "text-neutral-400 hover:text-black",
2866
+ "dark:text-neutral-500 dark:hover:text-white"
2867
+ ),
2868
+ title: "Dismiss",
2869
+ onClick: onDismiss,
2870
+ children: /* @__PURE__ */ jsx34(CloseIcon, {})
2871
+ }
2872
+ )
2873
+ ] })
2874
+ ] }),
2875
+ /* @__PURE__ */ jsx34("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx34(
2876
+ "div",
2877
+ {
2878
+ className: twMerge16(
2879
+ "w-full h-full transition ease-linear",
2880
+ status === "success" ? "bg-green-500 dark:bg-green-600" : status === "error" ? "bg-red-500 dark:bg-red-600" : "bg-blue-500 dark:bg-blue-600",
2881
+ status === "pending" ? "opacity-100" : "opacity-0"
2882
+ ),
2883
+ style: status === "pending" ? {
2884
+ transform: appear ? `translateX(0)` : "translate(-100%)",
2885
+ transitionDuration: `${progress.duration}ms`,
2886
+ transitionDelay: `-${Math.min(progress.duration, progress.elapsed)}ms`
2887
+ } : void 0
2888
+ }
2889
+ ) })
2890
+ ] });
2891
+ }
2892
+
2893
+ // src/onboarding/deposit/TransferDepositStatus.tsx
2894
+ import { useChains as useChains2 } from "wagmi";
2895
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
2896
+ function TransferDepositStatus({
2897
+ amount,
2898
+ chainL1Id,
2899
+ hash,
2900
+ receipt: receiptPromise,
2901
+ start,
2902
+ estimatedTime,
2903
+ onDismiss
2904
+ }) {
2905
+ const chains = useChains2();
2906
+ const chain = chains.find((chain2) => chain2.id === chainL1Id);
2907
+ const receipt = useQuery13({
2908
+ queryKey: ["transferDepositStatus", hash],
2909
+ queryFn: () => receiptPromise
2910
+ });
2911
+ return /* @__PURE__ */ jsx35(
2912
+ DepositStatus,
2913
+ {
2914
+ status: receipt.status,
2915
+ progress: {
2916
+ duration: estimatedTime,
2917
+ elapsed: Math.min(estimatedTime, Date.now() - start.getTime())
2918
+ },
2919
+ onDismiss,
2920
+ children: (() => {
2921
+ const blockExplorer = chain.blockExplorers?.default.url;
2922
+ if (receipt.status === "pending") {
2923
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2924
+ "Confirming deposit on",
2925
+ " ",
2926
+ /* @__PURE__ */ jsx35(
2927
+ "a",
2928
+ {
2929
+ href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
2930
+ target: "_blank",
2931
+ rel: "noreferrer noopener",
2932
+ children: chain.name
2933
+ }
2934
+ ),
2935
+ "\u2026"
2936
+ ] });
2937
+ }
2938
+ if (receipt.status === "error") {
2939
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2940
+ "Could not find deposit on",
2941
+ " ",
2942
+ /* @__PURE__ */ jsx35(
2943
+ "a",
2944
+ {
2945
+ href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
2946
+ target: "_blank",
2947
+ rel: "noreferrer noopener",
2948
+ children: chain.name
2949
+ }
2950
+ ),
2951
+ "."
2952
+ ] });
2953
+ }
2954
+ return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2955
+ "Successfully",
2956
+ " ",
2957
+ /* @__PURE__ */ jsx35(
2958
+ "a",
2959
+ {
2960
+ href: blockExplorer ? `${blockExplorer}/tx/${receipt.data.transactionHash}` : void 0,
2961
+ target: "_blank",
2962
+ rel: "noreferrer noopener",
2963
+ children: "deposited"
2964
+ }
2965
+ ),
2966
+ " ",
2967
+ /* @__PURE__ */ jsx35(Balance, { wei: amount })
2968
+ ] });
2969
+ })()
2970
+ }
2971
+ );
2972
+ }
2973
+
2974
+ // src/onboarding/deposit/RelayDepositStatus.tsx
2975
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
2976
+ import { useChains as useChains3 } from "wagmi";
2977
+ import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
2978
+ function RelayDepositStatus({
2979
+ amount,
2980
+ chainL1Id,
2981
+ chainL2Id,
2982
+ start,
2983
+ estimatedTime,
2984
+ depositPromise,
2985
+ onDismiss
2986
+ }) {
2987
+ const chains = useChains3();
2988
+ const chainL1 = chains.find((chain) => chain.id === chainL1Id);
2989
+ const chainL2 = chains.find((chain) => chain.id === chainL2Id);
2990
+ const deposit = useQuery14({
2991
+ queryKey: ["relayDepositPromise", chainL1Id, chainL2Id, amount.toString(), start.toISOString()],
2992
+ queryFn: () => depositPromise
2993
+ });
2994
+ return /* @__PURE__ */ jsx36(
2995
+ DepositStatus,
2996
+ {
2997
+ status: deposit.status,
2998
+ progress: {
2999
+ duration: estimatedTime,
3000
+ elapsed: Math.min(estimatedTime, Date.now() - start.getTime())
3001
+ },
3002
+ onDismiss,
3003
+ children: (() => {
3004
+ if (deposit.status === "pending") {
3005
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3006
+ "Relay bridge deposit pending on ",
3007
+ chainL1.name,
3008
+ "\u2026"
3009
+ ] });
3010
+ }
3011
+ if (deposit.status === "error") {
3012
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3013
+ "Relay bridge deposit to ",
3014
+ chainL2.name,
3015
+ " failed."
3016
+ ] });
3017
+ }
3018
+ return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3019
+ "Successfully bridged ",
3020
+ /* @__PURE__ */ jsx36(Balance, { wei: amount }),
3021
+ " to ",
3022
+ chainL2.name,
3023
+ "!"
3024
+ ] });
3025
+ })()
3026
+ }
3027
+ );
3028
+ }
3029
+
3030
+ // src/onboarding/deposit/Deposits.tsx
3031
+ import { useAccount as useAccount7, useClient as useClient11 } from "wagmi";
3032
+ import { jsx as jsx37 } from "react/jsx-runtime";
3033
+ function Deposits() {
3034
+ const queryClient = useQueryClient7();
3035
+ const { chainId } = useEntryKitConfig();
3036
+ const client = useClient11({ chainId });
3037
+ const { address: userAddress } = useAccount7();
3038
+ const { deposits, removeDeposit } = useDeposits();
3039
+ const { data: isComplete } = useQuery15({
3040
+ queryKey: ["depositsComplete", deposits.map((deposit) => deposit.uid)],
3041
+ queryFn: async () => {
3042
+ if (!deposits.length) return false;
3043
+ await Promise.all(deposits.map((deposit) => deposit.isComplete));
3044
+ return true;
3045
+ }
3046
+ });
3047
+ useEffect13(() => {
3048
+ if (isComplete) {
3049
+ queryClient.invalidateQueries({ queryKey: ["balance"] });
3050
+ queryClient.invalidateQueries({ queryKey: ["getBalance", client?.uid, userAddress] });
3051
+ }
3052
+ }, [client?.uid, isComplete, queryClient, userAddress]);
3053
+ if (!deposits.length) return null;
3054
+ return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3055
+ if (deposit.type === "transfer") {
3056
+ return /* @__PURE__ */ jsx37(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3057
+ } else if (deposit.type === "relay") {
3058
+ return /* @__PURE__ */ jsx37(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3059
+ }
3060
+ }) });
3061
+ }
3062
+
3063
+ // src/onboarding/deposit/DepositFormContainer.tsx
3064
+ import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
3065
+ function DepositFormContainer() {
3066
+ const { chainId: destinationChainId } = useEntryKitConfig();
3067
+ const chainId = useChainId();
3068
+ const chains = useChains4();
3069
+ const [amount, setAmount] = useState5(void 0);
3070
+ const [sourceChainId, setSourceChainId] = useState5(chainId);
3071
+ const sourceChain = chains.find(({ id }) => id === sourceChainId);
3072
+ return /* @__PURE__ */ jsxs22("div", { className: "pt-10 pb-2", children: [
3073
+ destinationChainId === sourceChainId ? /* @__PURE__ */ jsx38(
3074
+ DepositViaTransferForm,
3075
+ {
3076
+ amount,
3077
+ setAmount,
3078
+ sourceChain,
3079
+ setSourceChainId
3080
+ }
3081
+ ) : /* @__PURE__ */ jsx38(
3082
+ DepositViaRelayForm,
3083
+ {
3084
+ amount,
3085
+ setAmount,
3086
+ sourceChain,
3087
+ setSourceChainId
3088
+ }
3089
+ ),
3090
+ /* @__PURE__ */ jsx38(Deposits, {})
3091
+ ] });
3092
+ }
3093
+
3094
+ // src/icons/ArrowLeftIcon.tsx
3095
+ import { jsx as jsx39 } from "react/jsx-runtime";
3096
+ function ArrowLeftIcon(props) {
3097
+ return /* @__PURE__ */ jsx39(IconSVG, { ...props, children: /* @__PURE__ */ jsx39(
3098
+ "path",
3099
+ {
3100
+ d: "M19 12H5M12 19l-7-7 7-7",
3101
+ fill: "none",
3102
+ stroke: "currentColor",
3103
+ strokeWidth: "2",
3104
+ strokeLinecap: "round",
3105
+ strokeLinejoin: "round"
3106
+ }
3107
+ ) });
3108
+ }
3109
+
3110
+ // src/onboarding/quarry/GasBalance.tsx
3111
+ import { useEffect as useEffect14 } from "react";
3112
+ import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
3113
+ import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
3114
+ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress }) {
3115
+ const queryClient = useQueryClient8();
3116
+ const balance = useShowQueryError(useBalance(userAddress));
3117
+ const prevBalance = usePrevious(balance.data || 0n);
3118
+ useEffect14(() => {
3119
+ if (balance.data != null && prevBalance === 0n && balance.data > 0n) {
3120
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] });
3121
+ setFocused(false);
3122
+ }
3123
+ }, [balance.data, prevBalance, setFocused, queryClient, userAddress]);
3124
+ if (isFocused) {
3125
+ return /* @__PURE__ */ jsxs23(Fragment7, { children: [
3126
+ isFocused && /* @__PURE__ */ jsx40("div", { className: "absolute top-0 left-0", children: /* @__PURE__ */ jsx40(
3127
+ "div",
3128
+ {
3129
+ className: "flex items-center justify-center w-10 h-10 text-white/20 hover:text-white/40 cursor-pointer",
3130
+ onClick: () => setFocused(false),
3131
+ children: /* @__PURE__ */ jsx40(ArrowLeftIcon, { className: "m-0" })
3132
+ }
3133
+ ) }),
3134
+ /* @__PURE__ */ jsx40(DepositFormContainer, {})
3135
+ ] });
3136
+ }
3137
+ return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4", children: [
3138
+ /* @__PURE__ */ jsxs23("div", { className: "flex justify-between gap-4", children: [
3139
+ /* @__PURE__ */ jsxs23("div", { children: [
3140
+ /* @__PURE__ */ jsx40("div", { children: "Gas balance" }),
3141
+ /* @__PURE__ */ jsx40("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx40(Balance, { wei: balance.data }) : /* @__PURE__ */ jsx40(PendingIcon, { className: "text-sm" }) })
3142
+ ] }),
3143
+ /* @__PURE__ */ jsx40(
3144
+ Button,
3145
+ {
3146
+ variant: isActive ? "primary" : "tertiary",
3147
+ className: "flex-shrink-0 text-sm p-1 w-28",
3148
+ autoFocus: isActive || isExpanded,
3149
+ pending: balance.status === "pending",
3150
+ onClick: () => setFocused(true),
3151
+ children: "Top up"
3152
+ }
3153
+ )
3154
+ ] }),
3155
+ isExpanded ? /* @__PURE__ */ jsx40("p", { className: "text-sm", children: "Your gas balance is used to pay for onchain computation." }) : null
3156
+ ] });
3157
+ }
3158
+
3159
+ // src/onboarding/ConnectedSteps.tsx
3160
+ import { jsx as jsx41 } from "react/jsx-runtime";
3161
+ function ConnectedSteps({ userClient, initialUserAddress }) {
3162
+ const { chain } = useEntryKitConfig();
3163
+ const paymaster = getPaymaster(chain);
3164
+ const [focusedId, setFocusedId] = useState6(null);
3165
+ const userAddress = userClient.account.address;
3166
+ const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
3167
+ useEffect15(() => {
3168
+ if (prerequisitesError) {
3169
+ console.error("Could not get prerequisites", prerequisitesError);
3170
+ }
3171
+ }, [prerequisitesError]);
3172
+ const { closeAccountModal } = useAccountModal();
3173
+ const isNewConnection = userAddress !== initialUserAddress;
3174
+ const initialPrerequisites = useRef4(prerequisites);
3175
+ useEffect15(() => {
3176
+ if (prerequisites == null) return;
3177
+ if (initialPrerequisites.current == null) {
3178
+ initialPrerequisites.current = prerequisites;
3179
+ }
3180
+ if (prerequisites.complete) {
3181
+ if (isNewConnection || !initialPrerequisites.current.complete) {
3182
+ closeAccountModal();
3183
+ }
3184
+ }
3185
+ }, [closeAccountModal, isNewConnection, prerequisites]);
3186
+ const { sessionAddress, hasAllowance, isSpender, hasDelegation, hasGasBalance, hasQuarryGasBalance } = prerequisites ?? {};
3187
+ const steps = useMemo4(() => {
1902
3188
  if (!userAddress) {
1903
3189
  return [
1904
3190
  {
@@ -1912,7 +3198,7 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
1912
3198
  {
1913
3199
  id: "wallet",
1914
3200
  isComplete: true,
1915
- content: (props) => /* @__PURE__ */ jsx17(Wallet, { ...props, userAddress })
3201
+ content: (props) => /* @__PURE__ */ jsx41(Wallet, { ...props, userAddress })
1916
3202
  }
1917
3203
  ];
1918
3204
  if (!paymaster) {
@@ -1920,142 +3206,138 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
1920
3206
  steps2.push({
1921
3207
  id: "gasBalance",
1922
3208
  isComplete: !!hasGasBalance,
1923
- content: (props) => /* @__PURE__ */ jsx17(GasBalance, { ...props, sessionAddress })
3209
+ content: (props) => /* @__PURE__ */ jsx41(GasBalance, { ...props, sessionAddress })
1924
3210
  });
1925
3211
  }
1926
3212
  } else if (paymaster.type === "quarry") {
1927
- steps2.push({
1928
- id: "allowance",
1929
- isComplete: !!hasAllowance,
1930
- content: (props) => /* @__PURE__ */ jsx17(Allowance, { ...props, userAddress })
1931
- });
3213
+ if (paymaster.isGasPass) {
3214
+ steps2.push({
3215
+ id: "allowance",
3216
+ isComplete: !!hasAllowance,
3217
+ content: (props) => /* @__PURE__ */ jsx41(Allowance, { ...props, userAddress })
3218
+ });
3219
+ } else {
3220
+ steps2.push({
3221
+ id: "gasBalanceQuarry",
3222
+ isComplete: !!hasQuarryGasBalance,
3223
+ content: (props) => /* @__PURE__ */ jsx41(GasBalance2, { ...props, userAddress })
3224
+ });
3225
+ }
1932
3226
  }
1933
3227
  steps2.push({
1934
3228
  id: "session",
1935
3229
  isComplete: !!isSpender && !!hasDelegation,
1936
- content: (props) => /* @__PURE__ */ jsx17(Session, { ...props, userClient, registerSpender: !isSpender, registerDelegation: !hasDelegation })
3230
+ content: (props) => /* @__PURE__ */ jsx41(Session, { ...props, userClient, registerSpender: !isSpender, registerDelegation: !hasDelegation })
1937
3231
  });
1938
3232
  return steps2;
1939
- }, [hasAllowance, hasDelegation, hasGasBalance, isSpender, paymaster, sessionAddress, userAddress, userClient]);
1940
- const [selectedStepId] = useState3(null);
3233
+ }, [
3234
+ hasAllowance,
3235
+ hasDelegation,
3236
+ hasGasBalance,
3237
+ hasQuarryGasBalance,
3238
+ isSpender,
3239
+ paymaster,
3240
+ sessionAddress,
3241
+ userAddress,
3242
+ userClient
3243
+ ]);
3244
+ const [selectedStepId] = useState6(null);
1941
3245
  const nextStep = steps.find((step) => step.content != null && !step.isComplete);
1942
3246
  const completedSteps = steps.filter((step) => step.isComplete);
1943
3247
  const activeStep = (selectedStepId != null ? steps.find((step) => step.id === selectedStepId) : null) ?? nextStep ?? (completedSteps.length < steps.length ? completedSteps.at(-1) : null);
1944
3248
  const activeStepIndex = activeStep ? steps.indexOf(activeStep) : -1;
1945
- return /* @__PURE__ */ jsx17(
3249
+ return /* @__PURE__ */ jsx41(
1946
3250
  "div",
1947
3251
  {
1948
- className: twMerge7(
1949
- // steps.length === 2 ? "min-h-[22rem]" : "min-h-[26rem]",
1950
- "px-8 flex flex-col divide-y divide-neutral-800",
3252
+ className: twMerge17(
3253
+ "px-8 flex flex-col",
3254
+ focusedId && "divide-y divide-neutral-800",
1951
3255
  "animate-in animate-duration-300 fade-in slide-in-from-bottom-8"
1952
3256
  ),
1953
3257
  children: steps.map((step, i) => {
1954
3258
  const isActive = step === activeStep;
1955
3259
  const isExpanded = isActive || completedSteps.length === steps.length;
1956
3260
  const isDisabled = !step.isComplete && activeStepIndex !== -1 && i > activeStepIndex;
1957
- return /* @__PURE__ */ jsx17("div", { className: twMerge7("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx17("div", { className: twMerge7("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: step.content({ isActive, isExpanded }) }) }, step.id);
3261
+ const isFocused = focusedId === step.id;
3262
+ const content = step.content({
3263
+ isActive,
3264
+ isExpanded,
3265
+ isFocused,
3266
+ setFocused: (focused) => setFocusedId(focused ? step.id : null)
3267
+ });
3268
+ if (focusedId) {
3269
+ if (step.id === focusedId) {
3270
+ return content;
3271
+ }
3272
+ return null;
3273
+ }
3274
+ return /* @__PURE__ */ jsx41("div", { className: twMerge17("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx41("div", { className: twMerge17("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: content }) }, step.id);
1958
3275
  })
1959
3276
  }
1960
3277
  );
1961
3278
  }
1962
3279
 
1963
3280
  // src/AccountModalContent.tsx
1964
- import { useRef as useRef3 } from "react";
1965
- import { jsx as jsx18 } from "react/jsx-runtime";
3281
+ import { useRef as useRef5 } from "react";
3282
+ import { jsx as jsx42 } from "react/jsx-runtime";
1966
3283
  function AccountModalContent() {
1967
3284
  const { chainId } = useEntryKitConfig();
1968
3285
  const userClient = useConnectorClient({ chainId });
1969
- const { address: userAddress } = useAccount2();
1970
- const initialUserAddress = useRef3(userAddress);
3286
+ const { address: userAddress } = useAccount8();
3287
+ const initialUserAddress = useRef5(userAddress);
1971
3288
  if (userClient.status !== "success") {
1972
- return /* @__PURE__ */ jsx18(ConnectWallet, {});
3289
+ return /* @__PURE__ */ jsx42(ConnectWallet, {});
1973
3290
  }
1974
- return /* @__PURE__ */ jsx18(ConnectedSteps, { userClient: userClient.data, initialUserAddress: initialUserAddress.current });
1975
- }
1976
-
1977
- // src/AccountModal.tsx
1978
- import { DialogClose, DialogTitle } from "@radix-ui/react-dialog";
1979
-
1980
- // src/icons/IconSVG.tsx
1981
- import { twMerge as twMerge8 } from "tailwind-merge";
1982
- import { jsx as jsx19 } from "react/jsx-runtime";
1983
- function IconSVG({ className, children, ...props }) {
1984
- return /* @__PURE__ */ jsx19(
1985
- "svg",
1986
- {
1987
- xmlns: "http://www.w3.org/2000/svg",
1988
- viewBox: "0 0 24 24",
1989
- fill: "currentColor",
1990
- className: twMerge8("-my-[0.125em] h-[1.25em] w-[1.25em]", className),
1991
- ...props,
1992
- children
1993
- }
1994
- );
1995
- }
1996
-
1997
- // src/icons/CloseIcon.tsx
1998
- import { jsx as jsx20 } from "react/jsx-runtime";
1999
- function CloseIcon(props) {
2000
- return /* @__PURE__ */ jsx20(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx20(
2001
- "path",
2002
- {
2003
- d: "M6 18L18 6M6 6L18 18",
2004
- fill: "none",
2005
- stroke: "currentColor",
2006
- strokeWidth: "2",
2007
- strokeLinecap: "round",
2008
- strokeLinejoin: "round"
2009
- }
2010
- ) });
3291
+ return /* @__PURE__ */ jsx42(ConnectedSteps, { userClient: userClient.data, initialUserAddress: initialUserAddress.current });
2011
3292
  }
2012
3293
 
2013
3294
  // src/AccountModal.tsx
3295
+ import { DialogClose } from "@radix-ui/react-dialog";
2014
3296
  import { ErrorBoundary } from "react-error-boundary";
2015
3297
 
2016
3298
  // src/errors/ErrorOverlay.tsx
2017
3299
  import { wait } from "@latticexyz/common/utils";
2018
- import { useEffect as useEffect8 } from "react";
2019
- import { twMerge as twMerge9 } from "tailwind-merge";
2020
- import { Fragment as Fragment2, jsx as jsx21, jsxs as jsxs15 } from "react/jsx-runtime";
3300
+ import { useEffect as useEffect16 } from "react";
3301
+ import { twMerge as twMerge18 } from "tailwind-merge";
3302
+ import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
2021
3303
  function ErrorOverlay({ error: error2, retry, dismiss }) {
2022
- useEffect8(() => {
3304
+ useEffect16(() => {
2023
3305
  if (error2) {
2024
3306
  console.error(error2);
2025
3307
  }
2026
3308
  }, [error2]);
2027
- return /* @__PURE__ */ jsxs15("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
2028
- /* @__PURE__ */ jsx21(
3309
+ return /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3310
+ /* @__PURE__ */ jsx43(
2029
3311
  "div",
2030
3312
  {
2031
- className: twMerge9(
3313
+ className: twMerge18(
2032
3314
  "absolute inset-0 bg-blue-700/60",
2033
3315
  "transition duration-300",
2034
3316
  error2 ? "opacity-100 pointer-events-auto" : "opacity-0"
2035
3317
  )
2036
3318
  }
2037
3319
  ),
2038
- /* @__PURE__ */ jsx21(
3320
+ /* @__PURE__ */ jsx43(
2039
3321
  "div",
2040
3322
  {
2041
- className: twMerge9(
3323
+ className: twMerge18(
2042
3324
  "absolute inset-0 pb-8",
2043
3325
  "transition duration-300",
2044
3326
  error2 ? "translate-y-0 opacity-100 pointer-events-auto" : "-translate-y-4 opacity-0"
2045
3327
  ),
2046
- children: error2 ? /* @__PURE__ */ jsx21(Fragment2, { children: /* @__PURE__ */ jsxs15("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
2047
- /* @__PURE__ */ jsxs15("div", { className: "space-y-6 px-8 pt-8", children: [
2048
- /* @__PURE__ */ jsx21("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
2049
- /* @__PURE__ */ jsx21("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
2050
- /* @__PURE__ */ jsx21("div", { className: "text-sm", children: "See the console for more info." })
3328
+ children: error2 ? /* @__PURE__ */ jsx43(Fragment8, { children: /* @__PURE__ */ jsxs24("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3329
+ /* @__PURE__ */ jsxs24("div", { className: "space-y-6 px-8 pt-8", children: [
3330
+ /* @__PURE__ */ jsx43("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
3331
+ /* @__PURE__ */ jsx43("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
3332
+ /* @__PURE__ */ jsx43("div", { className: "text-sm", children: "See the console for more info." })
2051
3333
  ] }),
2052
- /* @__PURE__ */ jsxs15("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
2053
- /* @__PURE__ */ jsx21("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
2054
- retry ? /* @__PURE__ */ jsx21("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs15(
3334
+ /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3335
+ /* @__PURE__ */ jsx43("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
3336
+ retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs24(
2055
3337
  "button",
2056
3338
  {
2057
3339
  type: "button",
2058
- className: twMerge9(
3340
+ className: twMerge18(
2059
3341
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
2060
3342
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
2061
3343
  "text-white text-sm font-medium",
@@ -2070,15 +3352,15 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
2070
3352
  }
2071
3353
  },
2072
3354
  children: [
2073
- /* @__PURE__ */ jsx21("span", { className: "group-aria-busy:hidden", children: "Retry" }),
2074
- /* @__PURE__ */ jsx21("span", { className: "hidden group-aria-busy:inline", children: "Retrying\u2026" })
3355
+ /* @__PURE__ */ jsx43("span", { className: "group-aria-busy:hidden", children: "Retry" }),
3356
+ /* @__PURE__ */ jsx43("span", { className: "hidden group-aria-busy:inline", children: "Retrying\u2026" })
2075
3357
  ]
2076
3358
  }
2077
- ) }) : dismiss ? /* @__PURE__ */ jsx21("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsx21(
3359
+ ) }) : dismiss ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsx43(
2078
3360
  "button",
2079
3361
  {
2080
3362
  type: "button",
2081
- className: twMerge9(
3363
+ className: twMerge18(
2082
3364
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
2083
3365
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
2084
3366
  "text-white text-sm font-medium",
@@ -2096,96 +3378,93 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
2096
3378
  }
2097
3379
 
2098
3380
  // src/errors/ErrorFallback.tsx
2099
- import { jsx as jsx22 } from "react/jsx-runtime";
3381
+ import { jsx as jsx44 } from "react/jsx-runtime";
2100
3382
  function ErrorFallback({ error: error2, resetErrorBoundary }) {
2101
- return /* @__PURE__ */ jsx22("div", { className: "h-64", children: /* @__PURE__ */ jsx22(ErrorOverlay, { error: error2, retry: resetErrorBoundary }) });
3383
+ return /* @__PURE__ */ jsx44("div", { className: "h-64", children: /* @__PURE__ */ jsx44(ErrorOverlay, { error: error2, retry: resetErrorBoundary }) });
2102
3384
  }
2103
3385
 
2104
3386
  // src/errors/ErrorsOverlay.tsx
2105
- import { useStore as useStore2 } from "zustand";
2106
- import { jsx as jsx23 } from "react/jsx-runtime";
3387
+ import { useStore as useStore3 } from "zustand";
3388
+ import { jsx as jsx45 } from "react/jsx-runtime";
2107
3389
  function ErrorsOverlay() {
2108
- const error2 = useStore2(store3, (state) => state.errors.at(0));
2109
- return /* @__PURE__ */ jsx23(ErrorOverlay, { error: error2?.error, retry: error2?.retry, dismiss: error2?.dismiss });
3390
+ const error2 = useStore3(store3, (state) => state.errors.at(0));
3391
+ return /* @__PURE__ */ jsx45(ErrorOverlay, { error: error2?.error, retry: error2?.retry, dismiss: error2?.dismiss });
2110
3392
  }
2111
3393
 
2112
3394
  // src/AccountModal.tsx
2113
- import { jsx as jsx24, jsxs as jsxs16 } from "react/jsx-runtime";
3395
+ import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
2114
3396
  function AccountModal() {
2115
3397
  const { accountModalOpen, toggleAccountModal } = useAccountModal();
2116
- return /* @__PURE__ */ jsxs16(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: [
2117
- /* @__PURE__ */ jsx24(DialogTitle, { className: "sr-only", children: "Connect with EntryKit" }),
2118
- accountModalOpen ? /* @__PURE__ */ jsxs16(
2119
- "div",
2120
- {
2121
- className: twMerge10(
2122
- "relative py-2 ring-1",
2123
- "bg-neutral-900 text-neutral-400 ring-neutral-700/50",
2124
- "links:font-medium links:underline links:underline-offset-4",
2125
- "links:text-white",
2126
- "links:decoration-neutral-500 hover:links:decoration-orange-500"
3398
+ return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs25(
3399
+ "div",
3400
+ {
3401
+ className: twMerge19(
3402
+ "relative py-2 ring-1",
3403
+ "bg-neutral-900 text-neutral-400 ring-neutral-700/50",
3404
+ "links:font-medium links:underline links:underline-offset-4",
3405
+ "links:text-white",
3406
+ "links:decoration-neutral-500 hover:links:decoration-orange-500"
3407
+ ),
3408
+ children: [
3409
+ /* @__PURE__ */ jsxs25(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3410
+ /* @__PURE__ */ jsx46(AccountModalContent, {}),
3411
+ /* @__PURE__ */ jsx46(ErrorsOverlay, {})
3412
+ ] }),
3413
+ /* @__PURE__ */ jsxs25(
3414
+ "a",
3415
+ {
3416
+ href: "https://mud.dev",
3417
+ target: "_blank",
3418
+ rel: "noreferrer noopener",
3419
+ className: "group self-center p-3 flex items-center justify-center gap-2 links-unset text-sm font-mono transition text-neutral-400 hover:text-white",
3420
+ children: [
3421
+ /* @__PURE__ */ jsx46("span", { className: "block w-4 h-4", children: /* @__PURE__ */ jsx46(Logo, { className: "w-full h-full text-orange-500 group-hover:rotate-90 transition duration-300" }) }),
3422
+ /* @__PURE__ */ jsx46("span", { children: "Powered by MUD" })
3423
+ ]
3424
+ }
2127
3425
  ),
2128
- children: [
2129
- /* @__PURE__ */ jsx24("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx24(
2130
- DialogClose,
2131
- {
2132
- className: twMerge10(
2133
- "pointer-events-auto leading-none p-2 transition",
2134
- "text-white/20 hover:text-white/40"
2135
- ),
2136
- title: "Close",
2137
- children: /* @__PURE__ */ jsx24(CloseIcon, { className: "m-0" })
2138
- }
2139
- ) }),
2140
- /* @__PURE__ */ jsxs16(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
2141
- /* @__PURE__ */ jsx24(AccountModalContent, {}),
2142
- /* @__PURE__ */ jsx24(ErrorsOverlay, {})
2143
- ] }),
2144
- /* @__PURE__ */ jsxs16(
2145
- "a",
2146
- {
2147
- href: "https://mud.dev",
2148
- target: "_blank",
2149
- rel: "noreferrer noopener",
2150
- className: "group self-center p-3 flex items-center justify-center gap-2 links-unset text-sm font-mono transition text-neutral-400 hover:text-white",
2151
- children: [
2152
- /* @__PURE__ */ jsx24("span", { className: "block w-4 h-4", children: /* @__PURE__ */ jsx24(Logo, { className: "w-full h-full text-orange-500 group-hover:rotate-90 transition duration-300" }) }),
2153
- /* @__PURE__ */ jsx24("span", { children: "Powered by MUD" })
2154
- ]
2155
- }
2156
- )
2157
- ]
2158
- }
2159
- ) : null
2160
- ] });
3426
+ /* @__PURE__ */ jsx46("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx46(
3427
+ DialogClose,
3428
+ {
3429
+ className: twMerge19(
3430
+ "pointer-events-auto leading-none p-2 transition",
3431
+ "text-white/20 hover:text-white/40"
3432
+ ),
3433
+ title: "Close",
3434
+ children: /* @__PURE__ */ jsx46(CloseIcon, { className: "m-0" })
3435
+ }
3436
+ ) })
3437
+ ]
3438
+ }
3439
+ ) : null });
2161
3440
  }
2162
3441
 
2163
3442
  // src/EntryKitProvider.tsx
2164
- import { jsx as jsx25, jsxs as jsxs17 } from "react/jsx-runtime";
3443
+ import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
2165
3444
  function EntryKitProvider({ config, children }) {
2166
- return /* @__PURE__ */ jsxs17(EntryKitConfigProvider, { config, children: [
3445
+ return /* @__PURE__ */ jsxs26(EntryKitConfigProvider, { config, children: [
2167
3446
  children,
2168
- /* @__PURE__ */ jsx25(AccountModal, {})
3447
+ /* @__PURE__ */ jsx47(AccountModal, {})
2169
3448
  ] });
2170
3449
  }
2171
3450
 
2172
3451
  // src/AccountButton.tsx
2173
- import { useAccount as useAccount3 } from "wagmi";
2174
- import { twMerge as twMerge12 } from "tailwind-merge";
3452
+ import { useAccount as useAccount9 } from "wagmi";
3453
+ import { twMerge as twMerge21 } from "tailwind-merge";
2175
3454
 
2176
3455
  // src/AccountName.tsx
2177
- import { twMerge as twMerge11 } from "tailwind-merge";
2178
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs18 } from "react/jsx-runtime";
3456
+ import { twMerge as twMerge20 } from "tailwind-merge";
3457
+ import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
2179
3458
  function AccountName({ address }) {
2180
3459
  const { data: ens } = useENS(address);
2181
3460
  const avatar = usePreloadImage(ens?.avatar);
2182
- return /* @__PURE__ */ jsxs18(Fragment3, { children: [
2183
- /* @__PURE__ */ jsxs18("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
2184
- /* @__PURE__ */ jsx26(
3461
+ return /* @__PURE__ */ jsxs27(Fragment9, { children: [
3462
+ /* @__PURE__ */ jsxs27("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3463
+ /* @__PURE__ */ jsx48(
2185
3464
  "img",
2186
3465
  {
2187
3466
  src: ens?.avatar && avatar.isSuccess ? ens.avatar : void 0,
2188
- className: twMerge11(
3467
+ className: twMerge20(
2189
3468
  "col-start-1 row-start-1",
2190
3469
  "inline-flex w-full h-full rounded-full bg-black/10 dark:bg-white/10 bg-cover bg-no-repeat bg-center",
2191
3470
  "transtion duration-300",
@@ -2193,10 +3472,10 @@ function AccountName({ address }) {
2193
3472
  )
2194
3473
  }
2195
3474
  ),
2196
- /* @__PURE__ */ jsx26(
3475
+ /* @__PURE__ */ jsx48(
2197
3476
  Logo,
2198
3477
  {
2199
- className: twMerge11(
3478
+ className: twMerge20(
2200
3479
  "col-start-1 row-start-1 text-orange-500",
2201
3480
  "transition duration-300",
2202
3481
  ens && (!ens.avatar || avatar.isError) ? "opacity-100" : "opacity-0"
@@ -2204,29 +3483,29 @@ function AccountName({ address }) {
2204
3483
  }
2205
3484
  )
2206
3485
  ] }),
2207
- /* @__PURE__ */ jsx26("span", { className: "flex-grow", children: ens?.name ?? /* @__PURE__ */ jsx26(TruncatedHex, { hex: address }) })
3486
+ /* @__PURE__ */ jsx48("span", { className: "flex-grow", children: ens?.name ?? /* @__PURE__ */ jsx48(TruncatedHex, { hex: address }) })
2208
3487
  ] });
2209
3488
  }
2210
3489
 
2211
3490
  // src/AccountButton.tsx
2212
- import { useRef as useRef4 } from "react";
2213
- import { jsx as jsx27, jsxs as jsxs19 } from "react/jsx-runtime";
2214
- var containerClassNames = twMerge12(
3491
+ import { useRef as useRef6 } from "react";
3492
+ import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3493
+ var containerClassNames = twMerge21(
2215
3494
  "w-48 p-3 inline-flex outline-none transition",
2216
3495
  "border border-transparent",
2217
3496
  "text-base leading-none"
2218
3497
  );
2219
- var secondaryClassNames = twMerge12(
3498
+ var secondaryClassNames = twMerge21(
2220
3499
  "bg-neutral-100 border-neutral-300 text-black",
2221
3500
  "dark:bg-neutral-800 dark:border-neutral-700 dark:text-white"
2222
3501
  );
2223
- var secondaryInteractiveClassNames = twMerge12(
3502
+ var secondaryInteractiveClassNames = twMerge21(
2224
3503
  "cursor-pointer outline-none hover:bg-neutral-200 data-[highlighted]:bg-neutral-200 dark:hover:bg-neutral-700"
2225
3504
  );
2226
3505
  function AccountButton() {
2227
3506
  const { openAccountModal, accountModalOpen } = useAccountModal();
2228
- const { status, address: userAddress } = useAccount3();
2229
- const initialUserAddress = useRef4(userAddress);
3507
+ const { status, address: userAddress } = useAccount9();
3508
+ const initialUserAddress = useRef6(userAddress);
2230
3509
  const prereqs = usePrerequisites(userAddress);
2231
3510
  const isConnected = status === "connected" || status === "reconnecting" && userAddress;
2232
3511
  const isNewConnection = userAddress !== initialUserAddress.current;
@@ -2238,20 +3517,20 @@ function AccountButton() {
2238
3517
  }
2239
3518
  return "Sign in";
2240
3519
  })();
2241
- return /* @__PURE__ */ jsx27(Shadow, { mode: "child", children: isSignedIn ? /* @__PURE__ */ jsx27(
3520
+ return /* @__PURE__ */ jsx49(Shadow, { mode: "child", children: isSignedIn ? /* @__PURE__ */ jsx49(
2242
3521
  "button",
2243
3522
  {
2244
3523
  type: "button",
2245
- className: twMerge12(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3524
+ className: twMerge21(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
2246
3525
  onClick: openAccountModal,
2247
- children: /* @__PURE__ */ jsx27("span", { className: "flex-grow inline-flex gap-2.5 items-center text-left font-medium", children: userAddress ? /* @__PURE__ */ jsx27(AccountName, { address: userAddress }) : null })
3526
+ children: /* @__PURE__ */ jsx49("span", { className: "flex-grow inline-flex gap-2.5 items-center text-left font-medium", children: userAddress ? /* @__PURE__ */ jsx49(AccountName, { address: userAddress }) : null })
2248
3527
  },
2249
3528
  "connected"
2250
- ) : /* @__PURE__ */ jsxs19(
3529
+ ) : /* @__PURE__ */ jsxs28(
2251
3530
  "button",
2252
3531
  {
2253
3532
  type: "button",
2254
- className: twMerge12(
3533
+ className: twMerge21(
2255
3534
  containerClassNames,
2256
3535
  "group",
2257
3536
  "items-center justify-center gap-2.5",
@@ -2262,32 +3541,32 @@ function AccountButton() {
2262
3541
  "aria-busy": accountModalOpen,
2263
3542
  onClick: openAccountModal,
2264
3543
  children: [
2265
- /* @__PURE__ */ jsxs19("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
2266
- /* @__PURE__ */ jsx27(
3544
+ /* @__PURE__ */ jsxs28("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3545
+ /* @__PURE__ */ jsx49(
2267
3546
  "span",
2268
3547
  {
2269
- className: twMerge12(
3548
+ className: twMerge21(
2270
3549
  "col-start-1 row-start-1 leading-none",
2271
3550
  "scale-100 opacity-100 transition duration-300",
2272
3551
  "group-aria-busy:scale-125 group-aria-busy:opacity-0"
2273
3552
  ),
2274
- children: /* @__PURE__ */ jsx27(Logo, {})
3553
+ children: /* @__PURE__ */ jsx49(Logo, {})
2275
3554
  }
2276
3555
  ),
2277
- /* @__PURE__ */ jsx27(
3556
+ /* @__PURE__ */ jsx49(
2278
3557
  "span",
2279
3558
  {
2280
3559
  "aria-hidden": true,
2281
- className: twMerge12(
3560
+ className: twMerge21(
2282
3561
  "col-start-1 row-start-1",
2283
3562
  "scale-50 opacity-0 transition duration-300 delay-50",
2284
3563
  "group-aria-busy:scale-100 group-aria-busy:opacity-100"
2285
3564
  ),
2286
- children: /* @__PURE__ */ jsx27(PendingIcon, {})
3565
+ children: /* @__PURE__ */ jsx49(PendingIcon, {})
2287
3566
  }
2288
3567
  )
2289
3568
  ] }),
2290
- /* @__PURE__ */ jsx27("span", { className: "font-medium", children: buttonLabel })
3569
+ /* @__PURE__ */ jsx49("span", { className: "font-medium", children: buttonLabel })
2291
3570
  ]
2292
3571
  },
2293
3572
  "sign in"
@@ -2348,6 +3627,50 @@ function getConnectors({
2348
3627
  projectId: config.walletConnectProjectId
2349
3628
  });
2350
3629
  }
3630
+
3631
+ // src/validateSigner.ts
3632
+ import { readContract } from "viem/actions";
3633
+ async function internal_validateSigner({
3634
+ client,
3635
+ worldAddress,
3636
+ userAddress,
3637
+ sessionAddress,
3638
+ signerAddress
3639
+ }) {
3640
+ const ownerAddress = await readContract(client, {
3641
+ address: sessionAddress,
3642
+ abi: simpleAccountAbi,
3643
+ functionName: "owner"
3644
+ });
3645
+ if (ownerAddress.toLowerCase() !== signerAddress.toLowerCase()) {
3646
+ throw new Error(`Session account owner (${ownerAddress}) does not match message signer (${signerAddress}).`);
3647
+ }
3648
+ const hasDelegation = await getDelegation({
3649
+ client,
3650
+ worldAddress,
3651
+ sessionAddress,
3652
+ userAddress,
3653
+ blockTag: "latest"
3654
+ });
3655
+ if (!hasDelegation) {
3656
+ throw new Error(`Session account (${sessionAddress}) does not have delegation for user account (${userAddress}).`);
3657
+ }
3658
+ }
3659
+ var simpleAccountAbi = [
3660
+ {
3661
+ inputs: [],
3662
+ name: "owner",
3663
+ outputs: [
3664
+ {
3665
+ internalType: "address",
3666
+ name: "",
3667
+ type: "address"
3668
+ }
3669
+ ],
3670
+ stateMutability: "view",
3671
+ type: "function"
3672
+ }
3673
+ ];
2351
3674
  export {
2352
3675
  AccountButton,
2353
3676
  EntryKitProvider,
@@ -2355,6 +3678,7 @@ export {
2355
3678
  defineConfig,
2356
3679
  getConnectors,
2357
3680
  getWallets,
3681
+ internal_validateSigner,
2358
3682
  useAccountModal,
2359
3683
  useEntryKitConfig,
2360
3684
  useSessionClientReady as useSessionClient