@latticexyz/entrykit 2.2.22-a397ec2827f0b55f9f5b685a660295467d32c0c5 → 2.2.22-a5fdfa8a665caabc57fedd4bf34a8199c6c1ad10

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.
@@ -22,7 +22,7 @@ import { forwardRef, useEffect, useRef, useState } from "react";
22
22
  import ReactDOM from "react-dom";
23
23
 
24
24
  // ../../node_modules/.pnpm/tailwindcss@3.4.13/node_modules/tailwindcss/tailwind.css?inline
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';
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 {\n height: 0.75rem;\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-\\[230px\\] {\n max-height: 230px;\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 {\n width: 0.75rem;\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-700 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(64 64 64 / 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.overflow-y-auto {\n overflow-y: auto;\n}\n\n.whitespace-nowrap {\n white-space: nowrap;\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-neutral-300 {\n --tw-border-opacity: 1;\n border-color: rgb(212 212 212 / var(--tw-border-opacity));\n}\n\n.border-neutral-700 {\n --tw-border-opacity: 1;\n border-color: rgb(64 64 64 / var(--tw-border-opacity));\n}\n\n.border-transparent {\n border-color: transparent;\n}\n\n.border-white\\/50 {\n border-color: rgb(255 255 255 / 0.5);\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-green-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(22 163 74 / 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-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity));\n}\n\n.bg-transparent {\n background-color: transparent;\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-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / 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-300 {\n --tw-text-opacity: 1;\n color: rgb(212 212 212 / 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-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\\/50 {\n color: rgb(255 255 255 / 0.5);\n}\n\n.text-white\\/80 {\n color: rgb(255 255 255 / 0.8);\n}\n\n.underline {\n text-decoration-line: underline;\n}\n\n.decoration-neutral-500 {\n text-decoration-color: #737373;\n}\n\n.underline-offset-4 {\n text-underline-offset: 4px;\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-500::placeholder {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / 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-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\\:decoration-orange-500:hover {\n text-decoration-color: #f97316;\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-neutral-700:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(64 64 64 / 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\\:inline-block {\n display: inline-block;\n}\n\n.group:hover .group-hover\\:hidden {\n display: none;\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-500 {\n --tw-text-opacity: 1;\n color: rgb(115 115 115 / 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-900[data-state="checked"] {\n --tw-bg-opacity: 1;\n background-color: rgb(23 23 23 / 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\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';
26
26
 
27
27
  // src/ui/Shadow.tsx
28
28
  import { useResizeObserver } from "usehooks-ts";
@@ -47,9 +47,7 @@ function useFrame() {
47
47
  import { useMediaQuery } from "usehooks-ts";
48
48
 
49
49
  // src/EntryKitConfigProvider.tsx
50
- import "@rainbow-me/rainbowkit/styles.css";
51
50
  import { createContext as createContext2, useContext as useContext2 } from "react";
52
- import { RainbowKitProvider, midnightTheme } from "@rainbow-me/rainbowkit";
53
51
  import { useChains } from "wagmi";
54
52
 
55
53
  // src/getBundlerTransport.ts
@@ -141,8 +139,11 @@ var debug2 = debug.extend("quarry");
141
139
 
142
140
  // src/quarry/transports/userOpExecutor.ts
143
141
  import { setBalance } from "viem/actions";
144
- function userOpExecutor({ executor }) {
145
- return () => {
142
+ function userOpExecutor({
143
+ executor,
144
+ fallbackDefaultTransport
145
+ }) {
146
+ return (opts) => {
146
147
  debug2("using a local user op executor", executor.account.address);
147
148
  if (executor.chain.id === 31337) {
148
149
  debug2("setting executor balance");
@@ -177,7 +178,9 @@ function userOpExecutor({ executor }) {
177
178
  if (method === "eth_estimateUserOperationGas") {
178
179
  return await estimateUserOperationGas(params);
179
180
  }
180
- throw new Error(`userOpExecutor: method "${method}" not supported`);
181
+ debug2(`userOpExecutor: method "${method}" not overridden, falling back to fallback transport`);
182
+ const { request: fallbackRequest } = fallbackDefaultTransport(opts);
183
+ return fallbackRequest({ method, params });
181
184
  };
182
185
  return createTransport({
183
186
  key: "userOpExecutor",
@@ -188,154 +191,13 @@ function userOpExecutor({ executor }) {
188
191
  };
189
192
  }
190
193
 
191
- // src/quarry/transports/methods/getUserOperationReceipt.ts
192
- import {
193
- decodeEventLog,
194
- encodeEventTopics,
195
- numberToHex as numberToHex2,
196
- parseEventLogs as parseEventLogs2,
197
- zeroAddress
198
- } from "viem";
199
- import { entryPoint07Abi as entryPoint07Abi2 } from "viem/account-abstraction";
200
- var userOperationRevertReasonAbi = [
201
- entryPoint07Abi2.find(
202
- (item) => item.type === "event" && item.name === "UserOperationRevertReason"
203
- )
204
- ];
205
- var userOperationEventTopic = encodeEventTopics({
206
- abi: entryPoint07Abi2,
207
- eventName: "UserOperationEvent"
208
- });
209
- function getUserOperationReceipt(userOpHash, receipt) {
210
- const userOperationRevertReasonTopicEvent = encodeEventTopics({
211
- abi: userOperationRevertReasonAbi
212
- })[0];
213
- let entryPoint = zeroAddress;
214
- let revertReason = void 0;
215
- let startIndex = -1;
216
- let endIndex = -1;
217
- receipt.logs.forEach((log, index) => {
218
- if (log?.topics[0] === userOperationEventTopic[0]) {
219
- if (log.topics[1] === userOpHash) {
220
- endIndex = index;
221
- entryPoint = log.address;
222
- } else if (endIndex === -1) {
223
- startIndex = index;
224
- }
225
- }
226
- if (log?.topics[0] === userOperationRevertReasonTopicEvent) {
227
- if (log.topics[1] === userOpHash) {
228
- const decodedLog = decodeEventLog({
229
- abi: userOperationRevertReasonAbi,
230
- data: log.data,
231
- topics: log.topics
232
- });
233
- revertReason = decodedLog.args.revertReason;
234
- }
235
- }
236
- });
237
- if (endIndex === -1) {
238
- throw new Error("fatal: no UserOperationEvent in logs");
239
- }
240
- const logs = receipt.logs.slice(startIndex + 1, endIndex);
241
- const userOperationEvent = parseEventLogs2({
242
- abi: entryPoint07Abi2,
243
- eventName: "UserOperationEvent",
244
- args: {
245
- userOpHash
246
- },
247
- logs: receipt.logs
248
- })[0];
249
- let paymaster = userOperationEvent.args.paymaster;
250
- paymaster = paymaster === zeroAddress ? void 0 : paymaster;
251
- return {
252
- userOpHash,
253
- entryPoint,
254
- sender: userOperationEvent.args.sender,
255
- nonce: numberToHex2(userOperationEvent.args.nonce),
256
- paymaster,
257
- actualGasUsed: numberToHex2(userOperationEvent.args.actualGasUsed),
258
- actualGasCost: numberToHex2(userOperationEvent.args.actualGasCost),
259
- success: userOperationEvent.args.success,
260
- reason: revertReason,
261
- logs,
262
- receipt
263
- };
264
- }
265
-
266
- // src/quarry/transports/wiresaw.ts
267
- function wiresaw(transport) {
268
- return (opts) => {
269
- const { request: originalRequest, ...rest } = transport.wiresaw(opts);
270
- let chainId = null;
271
- const transactionHashes = {};
272
- const transactionReceipts = {};
273
- return {
274
- ...rest,
275
- async request(req) {
276
- if (req.method === "eth_chainId") {
277
- if (chainId != null) return chainId;
278
- return chainId = await originalRequest(req);
279
- }
280
- if (req.method === "eth_estimateGas") {
281
- return originalRequest({ ...req, method: "wiresaw_estimateGas" });
282
- }
283
- if (req.method === "eth_call") {
284
- return originalRequest({ ...req, method: "wiresaw_call" });
285
- }
286
- if (req.method === "eth_getTransactionCount") {
287
- return originalRequest({ ...req, method: "wiresaw_getTransactionCount" });
288
- }
289
- if (req.method === "eth_getTransactionReceipt") {
290
- const transactionHash = req.params[0];
291
- const receipt = transactionReceipts[transactionHash] ?? await originalRequest(req);
292
- transactionReceipts[transactionHash] ??= receipt;
293
- return receipt;
294
- }
295
- if (req.method === "eth_sendUserOperation") {
296
- const { userOpHash, txHash } = await originalRequest({
297
- ...req,
298
- method: "wiresaw_sendUserOperation"
299
- });
300
- transactionHashes[userOpHash] = txHash;
301
- return userOpHash;
302
- }
303
- if (req.method === "eth_getUserOperationReceipt") {
304
- const userOpHash = req.params[0];
305
- const knownTransactionHash = transactionHashes[userOpHash];
306
- if (knownTransactionHash) {
307
- const transactionReceipt = transactionReceipts[knownTransactionHash] ?? await originalRequest({
308
- ...req,
309
- params: [knownTransactionHash],
310
- method: "eth_getTransactionReceipt"
311
- });
312
- transactionReceipts[knownTransactionHash] ??= transactionReceipt;
313
- return transactionReceipt && getUserOperationReceipt(userOpHash, transactionReceipt);
314
- }
315
- const { request: fallbackRequest } = transport.fallbackBundler(opts);
316
- return fallbackRequest(req);
317
- }
318
- if (req.method === "eth_estimateUserOperationGas") {
319
- const { request: fallbackRequest } = transport.fallbackBundler(opts);
320
- return fallbackRequest(req);
321
- }
322
- return originalRequest(req);
323
- }
324
- };
325
- };
326
- }
327
-
328
194
  // src/getBundlerTransport.ts
195
+ import { wiresaw } from "@latticexyz/common/internal";
329
196
  function getBundlerTransport(chain) {
330
- const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
331
- const wiresawWebSocketUrl = chain.rpcUrls.wiresaw?.webSocket?.[0];
332
- if (wiresawWebSocketUrl) {
333
- return wiresaw({ wiresaw: webSocket(wiresawWebSocketUrl), fallbackBundler: http(bundlerHttpUrl) });
334
- }
335
- const wiresawHttpUrl = chain.rpcUrls.wiresaw?.http[0];
336
- if (wiresawHttpUrl) {
337
- return wiresaw({ wiresaw: http(wiresawHttpUrl), fallbackBundler: http(bundlerHttpUrl) });
197
+ if ("wiresaw" in chain.rpcUrls) {
198
+ return wiresaw();
338
199
  }
200
+ const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
339
201
  if (bundlerHttpUrl) {
340
202
  return http(bundlerHttpUrl);
341
203
  }
@@ -346,13 +208,15 @@ function getBundlerTransport(chain) {
346
208
  transport: fallback([webSocket(), http()]),
347
209
  account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
348
210
  pollingInterval: 10
349
- }).extend(transactionQueue())
211
+ }).extend(transactionQueue()),
212
+ fallbackDefaultTransport: http()
350
213
  });
351
214
  }
352
215
  throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
353
216
  }
354
217
 
355
218
  // src/EntryKitConfigProvider.tsx
219
+ import { ConnectKitProvider } from "connectkit";
356
220
  import { jsx as jsx2 } from "react/jsx-runtime";
357
221
  var Context2 = createContext2(null);
358
222
  function EntryKitConfigProvider({ config, children }) {
@@ -363,14 +227,14 @@ function EntryKitConfigProvider({ config, children }) {
363
227
  if (!chain) throw new Error(`Could not find configured chain for chain ID ${config.chainId}.`);
364
228
  getBundlerTransport(chain);
365
229
  return /* @__PURE__ */ jsx2(
366
- RainbowKitProvider,
230
+ ConnectKitProvider,
367
231
  {
368
- initialChain: 0,
369
- appInfo: {
370
- appName: config.appName
371
- // TODO: learn more and disclaimer
232
+ theme: "midnight",
233
+ options: {
234
+ // Prevent Wagmi trying to switch chains after connection
235
+ // https://github.com/wevm/wagmi/blob/f5b717ccf8a5b283263cadc984ba00b354bcefae/packages/core/src/connectors/injected.ts#L174-L182
236
+ initialChainId: 0
372
237
  },
373
- theme: midnightTheme({ borderRadius: "none" }),
374
238
  children: /* @__PURE__ */ jsx2(Context2.Provider, { value: { ...config, chain }, children })
375
239
  }
376
240
  );
@@ -421,7 +285,9 @@ var Shadow = forwardRef(function Shadow2({ mode, children }, forwardedRef) {
421
285
  inset: "0",
422
286
  width: "100%",
423
287
  height: "100%",
424
- zIndex: "2147483646"
288
+ // one less than ConnectKit's modal z-index
289
+ // so that ConnectKit can overlap properly
290
+ zIndex: "2147483645"
425
291
  } : frameSize.width && frameSize.height ? {
426
292
  all: "unset",
427
293
  display: "inline-grid",
@@ -520,14 +386,11 @@ function useAccountModal() {
520
386
  }
521
387
 
522
388
  // src/AccountModal.tsx
523
- import { twMerge as twMerge19 } from "tailwind-merge";
389
+ import { twMerge as twMerge20 } from "tailwind-merge";
524
390
 
525
391
  // src/AccountModalContent.tsx
526
392
  import { useAccount as useAccount8, useConnectorClient } from "wagmi";
527
393
 
528
- // src/ConnectWallet.tsx
529
- import { useAccount } from "wagmi";
530
-
531
394
  // src/ui/Button.tsx
532
395
  import { twMerge as twMerge3 } from "tailwind-merge";
533
396
 
@@ -593,7 +456,7 @@ var Button = ({ pending, variant, type, className, children, disabled, ...props
593
456
  };
594
457
 
595
458
  // src/ConnectWallet.tsx
596
- import { useConnectModal } from "@rainbow-me/rainbowkit";
459
+ import { useModal } from "connectkit";
597
460
 
598
461
  // src/icons/Logo.tsx
599
462
  import { twMerge as twMerge4 } from "tailwind-merge";
@@ -653,7 +516,7 @@ function AppInfo() {
653
516
  return /* @__PURE__ */ jsxs6("div", { className: "flex-grow flex flex-col items-center justify-center gap-2", children: [
654
517
  /* @__PURE__ */ jsx8("div", { className: "w-16 h-16 m-2", children: !appIconLoading ? hasAppIcon ? /* @__PURE__ */ jsx8("img", { src: appIcon, className: "w-full h-full object-cover" }) : (
655
518
  // TODO: swap with favicon
656
- /* @__PURE__ */ jsx8(Logo, { className: "w-full h-full text-orange-500 dark:bg-neutral-800" })
519
+ /* @__PURE__ */ jsx8(Logo, { className: "w-full h-full text-orange-500 bg-neutral-800" })
657
520
  ) : null }),
658
521
  /* @__PURE__ */ jsx8("div", { className: "text-2xl text-white text-center", children: appName })
659
522
  ] });
@@ -661,18 +524,17 @@ function AppInfo() {
661
524
 
662
525
  // src/ConnectWallet.tsx
663
526
  import { twMerge as twMerge5 } from "tailwind-merge";
664
- import { useEffect as useEffect3, useState as useState2 } from "react";
527
+ import { useEffect as useEffect3, useRef as useRef2 } from "react";
665
528
  import { jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
666
529
  function ConnectWallet() {
667
- const userAccount = useAccount();
668
- const { openConnectModal, connectModalOpen } = useConnectModal();
669
- const [hasAutoOpened, setHasAutoOpened] = useState2(false);
530
+ const { open, setOpen } = useModal();
531
+ const hasAutoOpenedRef = useRef2(false);
670
532
  useEffect3(() => {
671
- if (!connectModalOpen && !hasAutoOpened) {
672
- openConnectModal?.();
673
- setHasAutoOpened(true);
533
+ if (!open && !hasAutoOpenedRef.current) {
534
+ setOpen(true);
535
+ hasAutoOpenedRef.current = true;
674
536
  }
675
- }, [connectModalOpen, hasAutoOpened, openConnectModal]);
537
+ }, [open, setOpen]);
676
538
  return /* @__PURE__ */ jsxs7(
677
539
  "div",
678
540
  {
@@ -684,8 +546,7 @@ function ConnectWallet() {
684
546
  {
685
547
  variant: "secondary",
686
548
  className: "self-auto flex justify-center",
687
- disabled: userAccount.status === "connecting",
688
- onClick: openConnectModal,
549
+ onClick: () => setOpen(true),
689
550
  autoFocus: true,
690
551
  children: "Connect wallet"
691
552
  },
@@ -697,8 +558,8 @@ function ConnectWallet() {
697
558
  }
698
559
 
699
560
  // src/onboarding/ConnectedSteps.tsx
700
- import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef4, useState as useState6 } from "react";
701
- import { twMerge as twMerge17 } from "tailwind-merge";
561
+ import { useEffect as useEffect15, useMemo as useMemo4, useRef as useRef5, useState as useState5 } from "react";
562
+ import { twMerge as twMerge18 } from "tailwind-merge";
702
563
 
703
564
  // src/onboarding/usePrerequisites.ts
704
565
  import { useClient as useClient6, useConfig } from "wagmi";
@@ -732,7 +593,7 @@ import { useClient } from "wagmi";
732
593
  import { queryOptions, skipToken, useQuery as useQuery2 } from "@tanstack/react-query";
733
594
 
734
595
  // src/quarry/getAllowance.ts
735
- import { numberToHex as numberToHex3 } from "viem";
596
+ import { numberToHex as numberToHex2 } from "viem";
736
597
 
737
598
  // src/quarry/common.ts
738
599
  import { defineStore } from "@latticexyz/store";
@@ -743,7 +604,8 @@ var paymasterAbi = parseAbi([
743
604
  "error BalanceSystem_BalanceTooHigh(address user, uint256 balance, uint256 max)",
744
605
  "error BalanceSystem_InsufficientBalance(address user, uint256 amount, uint256 balance)",
745
606
  "function registerSpender(address spender)",
746
- "function depositTo(address to) payable"
607
+ "function depositTo(address to) payable",
608
+ "function withdrawTo(address to, uint256 amount)"
747
609
  ]);
748
610
  var paymasterConfig = defineStore({
749
611
  namespaces: {
@@ -836,7 +698,7 @@ async function setAllowanceSlot({ client, userAddress, allowance }) {
836
698
  {
837
699
  address: paymaster.address,
838
700
  index: slot,
839
- value: numberToHex3(allowance, { size: 32 })
701
+ value: numberToHex2(allowance, { size: 32 })
840
702
  }
841
703
  );
842
704
  }
@@ -1317,8 +1179,12 @@ function EthIcon({ className, ...props }) {
1317
1179
  import { formatEther } from "viem";
1318
1180
  function formatBalance(wei) {
1319
1181
  const formatted = formatEther(wei);
1320
- const magnitude = Math.floor(parseFloat(formatted)).toString().length;
1321
- return parseFloat(formatted).toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
1182
+ const parsed = parseFloat(formatted);
1183
+ if (parsed > 0 && parsed < 1e-5) {
1184
+ return "<0.00001";
1185
+ }
1186
+ const magnitude = Math.floor(parsed).toString().length;
1187
+ return parsed.toLocaleString("en-US", { maximumFractionDigits: Math.max(0, 6 - magnitude) });
1322
1188
  }
1323
1189
 
1324
1190
  // src/ui/Balance.tsx
@@ -1403,6 +1269,7 @@ import { resourceToHex as resourceToHex2 } from "@latticexyz/common";
1403
1269
  import IBaseWorldAbi from "@latticexyz/world/out/IBaseWorld.sol/IBaseWorld.abi.json";
1404
1270
 
1405
1271
  // src/utils/callWithSignature.ts
1272
+ import { parseErc6492Signature } from "viem";
1406
1273
  import { writeContract as viem_writeContract } from "viem/actions";
1407
1274
  import { getAction as getAction3 } from "viem/utils";
1408
1275
 
@@ -1457,7 +1324,13 @@ async function callWithSignature({
1457
1324
  sessionClient,
1458
1325
  ...opts
1459
1326
  }) {
1460
- const signature = await signCall(opts);
1327
+ const rawSignature = await signCall(opts);
1328
+ const { address, signature } = parseErc6492Signature(rawSignature);
1329
+ if (address != null) {
1330
+ throw new Error(
1331
+ "ERC-6492 signatures, like from Coinbase Smart Wallet, are not yet supported. Try using a different wallet?"
1332
+ );
1333
+ }
1461
1334
  return getAction3(
1462
1335
  sessionClient,
1463
1336
  viem_writeContract,
@@ -1760,7 +1633,7 @@ function Session({ isActive, isExpanded, userClient, registerSpender, registerDe
1760
1633
  }
1761
1634
 
1762
1635
  // src/onboarding/GasBalance.tsx
1763
- import { useEffect as useEffect9, useState as useState3 } from "react";
1636
+ import { useEffect as useEffect9, useState as useState2 } from "react";
1764
1637
  import { parseEther as parseEther4 } from "viem";
1765
1638
  import { useQueryClient as useQueryClient6 } from "@tanstack/react-query";
1766
1639
  import { useBalance as useBalance2, useWatchBlockNumber } from "wagmi";
@@ -2069,9 +1942,9 @@ function useSetBalance() {
2069
1942
  }
2070
1943
 
2071
1944
  // src/errors/usePrevious.ts
2072
- import { useEffect as useEffect8, useRef as useRef2 } from "react";
1945
+ import { useEffect as useEffect8, useRef as useRef3 } from "react";
2073
1946
  function usePrevious(value, initialValue) {
2074
- const ref = useRef2();
1947
+ const ref = useRef3();
2075
1948
  useEffect8(() => {
2076
1949
  ref.current = { value };
2077
1950
  }, [value]);
@@ -2132,7 +2005,7 @@ import { Fragment, jsx as jsx19, jsxs as jsxs14 } from "react/jsx-runtime";
2132
2005
  function GasBalance({ isActive, isExpanded, sessionAddress }) {
2133
2006
  const queryClient = useQueryClient6();
2134
2007
  const { chain } = useEntryKitConfig();
2135
- const [copied, setCopied] = useState3(false);
2008
+ const [copied, setCopied] = useState2(false);
2136
2009
  const balance = useShowQueryError(useBalance2({ chainId: chain.id, address: sessionAddress }));
2137
2010
  const prevBalance = usePrevious(balance.data);
2138
2011
  useWatchBlockNumber({ onBlockNumber: () => balance.refetch() });
@@ -2216,24 +2089,28 @@ function GasBalance({ isActive, isExpanded, sessionAddress }) {
2216
2089
  ] });
2217
2090
  }
2218
2091
 
2092
+ // src/onboarding/quarry/GasBalance.tsx
2093
+ import { useEffect as useEffect14 } from "react";
2094
+ import { useQueryClient as useQueryClient9 } from "@tanstack/react-query";
2095
+
2219
2096
  // src/onboarding/deposit/DepositFormContainer.tsx
2220
- import { useState as useState5 } from "react";
2097
+ import { useState as useState4 } from "react";
2221
2098
  import { useChains as useChains4, useChainId } from "wagmi";
2222
2099
 
2223
2100
  // src/onboarding/deposit/DepositViaTransferForm.tsx
2224
- import { useAccount as useAccount5, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2101
+ import { useAccount as useAccount4, useWriteContract, usePrepareTransactionRequest, usePublicClient } from "wagmi";
2225
2102
  import { encodeFunctionData as encodeFunctionData2 } from "viem";
2226
- import { useMutation as useMutation4, useQuery as useQuery11 } from "@tanstack/react-query";
2103
+ import { useMutation as useMutation4, useQuery as useQuery12 } from "@tanstack/react-query";
2227
2104
 
2228
2105
  // src/onboarding/deposit/DepositForm.tsx
2229
- import { useEffect as useEffect11, useRef as useRef3 } from "react";
2230
- import { useAccount as useAccount4, useBalance as useBalance5, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2106
+ import { useEffect as useEffect11, useRef as useRef4 } from "react";
2107
+ import { useAccount as useAccount3, useBalance as useBalance4, useWatchBlockNumber as useWatchBlockNumber2 } from "wagmi";
2231
2108
  import { useIsMounted } from "usehooks-ts";
2232
2109
  import { twMerge as twMerge15 } from "tailwind-merge";
2233
2110
 
2234
2111
  // src/onboarding/deposit/ChainSelect.tsx
2235
2112
  import { useEffect as useEffect10, useMemo as useMemo2 } from "react";
2236
- import { useAccount as useAccount2, useSwitchChain } from "wagmi";
2113
+ import { useSwitchChain } from "wagmi";
2237
2114
  import { twMerge as twMerge12 } from "tailwind-merge";
2238
2115
  import * as Select from "@radix-ui/react-select";
2239
2116
 
@@ -2298,8 +2175,7 @@ function Input({ asChild, className, ...props }) {
2298
2175
  className: twMerge9(
2299
2176
  "p-2.5 gap-1 border text-lg font-medium transition",
2300
2177
  "outline-none ring-2 ring-transparent focus-within:ring-orange-500 focus-within:border-transparent",
2301
- "bg-white border-neutral-300 text-black placeholder:text-neutral-400",
2302
- "dark:bg-neutral-900 dark:border-neutral-700 dark:text-white dark:placeholder:text-neutral-500",
2178
+ "bg-neutral-900 border-neutral-700 text-white placeholder:text-neutral-500",
2303
2179
  className
2304
2180
  ),
2305
2181
  ...props
@@ -2307,42 +2183,34 @@ function Input({ asChild, className, ...props }) {
2307
2183
  );
2308
2184
  }
2309
2185
 
2310
- // src/onboarding/deposit/ChainBalance.tsx
2311
- import { useBalance as useBalance3 } from "wagmi";
2312
- import { Fragment as Fragment2, jsx as jsx23 } from "react/jsx-runtime";
2313
- function ChainBalance({ chainId, address }) {
2314
- const balance = useBalance3({ chainId, address });
2315
- return /* @__PURE__ */ jsx23(Fragment2, { children: balance.data ? /* @__PURE__ */ jsx23(Balance, { wei: balance.data.value }) : /* @__PURE__ */ jsx23(PendingIcon, {}) });
2316
- }
2317
-
2318
2186
  // src/onboarding/deposit/ChainIcon.tsx
2319
2187
  import { twMerge as twMerge11 } from "tailwind-merge";
2320
2188
 
2321
2189
  // src/onboarding/deposit/PreloadedImage.tsx
2322
2190
  import { twMerge as twMerge10 } from "tailwind-merge";
2323
- import { jsx as jsx24 } from "react/jsx-runtime";
2191
+ import { jsx as jsx23 } from "react/jsx-runtime";
2324
2192
  function PreloadedImage({ url, fallback: fallback2, className }) {
2325
2193
  const { isSuccess, isLoading } = usePreloadImage(url);
2326
- 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 });
2194
+ return /* @__PURE__ */ jsx23("span", { className: twMerge10("inline-flex w-full h-full items-center justify-center overflow-clip", className), children: !isLoading ? isSuccess ? /* @__PURE__ */ jsx23("img", { src: url, className: "w-full h-full object-cover" }) : fallback2 : null });
2327
2195
  }
2328
2196
 
2329
2197
  // src/onboarding/deposit/ChainIcon.tsx
2330
2198
  import { forwardRef as forwardRef2 } from "react";
2331
- import { jsx as jsx25 } from "react/jsx-runtime";
2199
+ import { jsx as jsx24 } from "react/jsx-runtime";
2332
2200
  var ChainIcon = forwardRef2(function ChainIcon2({ name, url, className }, forwardedRef) {
2333
- return /* @__PURE__ */ jsx25(
2201
+ return /* @__PURE__ */ jsx24(
2334
2202
  "span",
2335
2203
  {
2336
2204
  ref: forwardedRef,
2337
2205
  className: twMerge11("flex-shrink-0 inline-flex w-6 aspect-square rounded-full overflow-clip", className),
2338
- children: url ? /* @__PURE__ */ jsx25(PreloadedImage, { url }) : (
2206
+ children: url ? /* @__PURE__ */ jsx24(PreloadedImage, { url }) : (
2339
2207
  // TODO: better placeholder
2340
- /* @__PURE__ */ jsx25(
2208
+ /* @__PURE__ */ jsx24(
2341
2209
  "span",
2342
2210
  {
2343
2211
  className: twMerge11(
2344
2212
  "inline-flex items-center justify-center w-full h-full rounded-full",
2345
- "border-2 border-dashed border-black/20 dark:border-white/50 opacity-50"
2213
+ "border-2 border-dashed border-white/50 opacity-50"
2346
2214
  ),
2347
2215
  children: name?.slice(0, 1)
2348
2216
  }
@@ -2386,12 +2254,36 @@ function useRelay() {
2386
2254
  });
2387
2255
  }
2388
2256
 
2257
+ // src/onboarding/deposit/useChainBalances.ts
2258
+ import { useAccount, useConfig as useWagmiConfig } from "wagmi";
2259
+ import { getBalance as getBalance2 } from "wagmi/actions";
2260
+ import { useQuery as useQuery11, skipToken as skipToken8 } from "@tanstack/react-query";
2261
+ import { isNotNull } from "@latticexyz/common/utils";
2262
+ function useChainBalances({ chains }) {
2263
+ const { address: userAddress } = useAccount();
2264
+ const wagmiConfig = useWagmiConfig();
2265
+ const chainIds = chains.map((chain) => chain.id);
2266
+ return useQuery11({
2267
+ queryKey: ["chainBalances", chainIds, userAddress],
2268
+ queryFn: userAddress ? async () => {
2269
+ const chainBalances = await Promise.allSettled(
2270
+ chains.map(async (chain) => {
2271
+ const balance = await getBalance2(wagmiConfig, { chainId: chain.id, address: userAddress });
2272
+ return { chain, balance };
2273
+ })
2274
+ );
2275
+ return chainBalances.map((result) => result.status === "fulfilled" ? result.value : null).filter(isNotNull);
2276
+ } : skipToken8,
2277
+ refetchInterval: 1e3 * 60,
2278
+ retry: 1
2279
+ });
2280
+ }
2281
+
2389
2282
  // src/onboarding/deposit/ChainSelect.tsx
2390
- import { Fragment as Fragment3, jsx as jsx26, jsxs as jsxs15 } from "react/jsx-runtime";
2283
+ import { Fragment as Fragment2, jsx as jsx25, jsxs as jsxs15 } from "react/jsx-runtime";
2391
2284
  function ChainSelect({ value, onChange }) {
2392
2285
  const theme = useTheme();
2393
2286
  const { frame } = useFrame();
2394
- const userAccount = useAccount2();
2395
2287
  const { chains, switchChain } = useSwitchChain();
2396
2288
  const relay = useRelay();
2397
2289
  const relayChains = relay.data?.chains;
@@ -2405,27 +2297,33 @@ function ChainSelect({ value, onChange }) {
2405
2297
  }).filter((c) => c.relayChain);
2406
2298
  }, [chains, relayChains]);
2407
2299
  const selectedChain = sourceChains.find((c) => c.id === value);
2300
+ const { data: chainsBalances, isLoading } = useShowQueryError(useChainBalances({ chains: sourceChains }));
2301
+ const renderedChains = useMemo2(() => {
2302
+ if (!chainsBalances) return [];
2303
+ const chainsWithBalance = chainsBalances.filter(({ balance }) => balance.value > 0n).map(({ chain, balance }) => ({ chain, balance: balance.value }));
2304
+ return chainsWithBalance.length > 0 ? chainsWithBalance : sourceChains.map((chain) => ({ chain, balance: 0n }));
2305
+ }, [chainsBalances, sourceChains]);
2408
2306
  useEffect10(() => {
2409
- if (sourceChains.length > 0 && !selectedChain) {
2410
- const defaultChain = sourceChains[0];
2307
+ if (renderedChains.length > 0 && (!selectedChain || !renderedChains.find((c) => c.chain.id === selectedChain?.id))) {
2308
+ const defaultChain = renderedChains[0].chain;
2411
2309
  onChange(defaultChain.id);
2412
2310
  switchChain({ chainId: defaultChain.id });
2413
2311
  }
2414
- }, [value, selectedChain, sourceChains, onChange, switchChain]);
2312
+ }, [value, selectedChain, renderedChains, onChange, switchChain]);
2415
2313
  return /* @__PURE__ */ jsxs15(
2416
2314
  Select.Root,
2417
2315
  {
2418
2316
  value: value.toString(),
2419
2317
  onValueChange: (value2) => {
2420
2318
  if (value2) {
2421
- const chain = sourceChains.find((chain2) => chain2.id.toString() === value2);
2319
+ const chain = renderedChains.find((item) => item.chain.id.toString() === value2)?.chain;
2422
2320
  if (!chain) throw new Error(`Unknown chain selected: ${value2}`);
2423
2321
  onChange(chain.id);
2424
2322
  }
2425
2323
  },
2426
2324
  children: [
2427
- /* @__PURE__ */ jsx26(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2428
- /* @__PURE__ */ jsx26(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx26(
2325
+ /* @__PURE__ */ jsx25(Input, { asChild: true, children: /* @__PURE__ */ jsxs15(Select.Trigger, { className: "group inline-flex items-center justify-center", children: [
2326
+ /* @__PURE__ */ jsx25(Select.Value, { asChild: true, children: /* @__PURE__ */ jsx25(
2429
2327
  ChainIcon,
2430
2328
  {
2431
2329
  id: selectedChain?.id,
@@ -2434,42 +2332,45 @@ function ChainSelect({ value, onChange }) {
2434
2332
  className: "w-8"
2435
2333
  }
2436
2334
  ) }),
2437
- /* @__PURE__ */ jsx26(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment3, { children: [
2438
- /* @__PURE__ */ jsx26(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2439
- /* @__PURE__ */ jsx26(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2335
+ /* @__PURE__ */ jsx25(Select.Icon, { asChild: true, children: /* @__PURE__ */ jsxs15(Fragment2, { children: [
2336
+ /* @__PURE__ */ jsx25(ChevronDownIcon, { className: "text-sm -mr-1 group-aria-expanded:hidden" }),
2337
+ /* @__PURE__ */ jsx25(ChevronUpIcon, { className: "text-sm -mr-1 hidden group-aria-expanded:inline" })
2440
2338
  ] }) })
2441
2339
  ] }) }),
2442
- 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(
2443
- Select.Group,
2340
+ frame.contentDocument ? /* @__PURE__ */ jsx25(Select.Portal, { container: frame.contentDocument.body, children: /* @__PURE__ */ jsx25(
2341
+ Select.Content,
2444
2342
  {
2445
- className: twMerge12(
2446
- "flex flex-col border divide-y",
2447
- "bg-neutral-100 text-neutral-700 border-neutral-300 divide-neutral-300",
2448
- "dark:bg-neutral-800 dark:text-neutral-300 dark:border-neutral-700 dark:divide-neutral-700"
2449
- ),
2450
- children: sourceChains.map((chain) => (
2451
- // TODO: figure out why up/down arrow jump to top/bottom rather than cycling through items
2452
- /* @__PURE__ */ jsxs15(
2453
- Select.Item,
2454
- {
2455
- value: chain.id.toString(),
2456
- className: twMerge12(
2457
- "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2458
- // TODO: different style for checked/active state
2459
- "text-black focus:bg-white data-[state=checked]:bg-neutral-200",
2460
- "dark:text-white dark:focus:bg-neutral-700 dark:data-[state=checked]:bg-neutral-900"
2461
- ),
2462
- children: [
2463
- /* @__PURE__ */ jsx26(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2464
- /* @__PURE__ */ jsx26("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2465
- /* @__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 }) })
2466
- ]
2467
- },
2468
- chain.id
2469
- )
2470
- ))
2343
+ position: "popper",
2344
+ className: "w-[352px] max-h-[230px] overflow-y-auto mt-1 animate-in fade-in slide-in-from-top-2",
2345
+ children: /* @__PURE__ */ jsx25(Select.Viewport, { children: /* @__PURE__ */ jsx25(
2346
+ Select.Group,
2347
+ {
2348
+ className: twMerge12(
2349
+ "flex flex-col border divide-y",
2350
+ "bg-neutral-800 text-neutral-300 border-neutral-700 divide-neutral-700"
2351
+ ),
2352
+ children: isLoading ? /* @__PURE__ */ jsx25("div", { className: "flex items-center justify-center p-4", children: /* @__PURE__ */ jsx25(PendingIcon, { className: "h-6 w-6 animate-spin text-gray-400" }) }) : renderedChains.map(({ chain, balance }) => {
2353
+ return /* @__PURE__ */ jsxs15(
2354
+ Select.Item,
2355
+ {
2356
+ value: chain.id.toString(),
2357
+ className: twMerge12(
2358
+ "group flex p-2.5 gap-2.5 items-center cursor-pointer outline-none",
2359
+ "text-white focus:bg-neutral-700 data-[state=checked]:bg-neutral-900"
2360
+ ),
2361
+ children: [
2362
+ /* @__PURE__ */ jsx25(ChainIcon, { id: chain.id, name: chain.name, url: chain.relayChain?.icon?.[theme] }),
2363
+ /* @__PURE__ */ jsx25("span", { className: "flex-grow flex-shrink-0", children: chain.name }),
2364
+ /* @__PURE__ */ jsx25("span", { className: "flex-shrink-0 font-mono text-sm text-neutral-400", children: /* @__PURE__ */ jsx25(Balance, { wei: balance }) })
2365
+ ]
2366
+ },
2367
+ chain.id
2368
+ );
2369
+ })
2370
+ }
2371
+ ) })
2471
2372
  }
2472
- ) }) }) }) : null
2373
+ ) }) : null
2473
2374
  ]
2474
2375
  }
2475
2376
  );
@@ -2479,18 +2380,14 @@ function ChainSelect({ value, onChange }) {
2479
2380
  import { formatEther as formatEther3, parseEther as parseEther5 } from "viem";
2480
2381
  import { twMerge as twMerge13 } from "tailwind-merge";
2481
2382
  import { forwardRef as forwardRef3 } from "react";
2482
- import { jsx as jsx27, jsxs as jsxs16 } from "react/jsx-runtime";
2383
+ import { jsx as jsx26, jsxs as jsxs16 } from "react/jsx-runtime";
2483
2384
  var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange }, forwardedRef) {
2484
- return /* @__PURE__ */ jsx27(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2485
- /* @__PURE__ */ jsx27(
2385
+ return /* @__PURE__ */ jsx26(Input, { asChild: true, className: "w-full cursor-text flex items-center", children: /* @__PURE__ */ jsxs16("label", { children: [
2386
+ /* @__PURE__ */ jsx26(
2486
2387
  "input",
2487
2388
  {
2488
2389
  ref: forwardedRef,
2489
- className: twMerge13(
2490
- "peer flex-grow outline-none bg-transparent",
2491
- "placeholder:text-neutral-400",
2492
- "dark:placeholder:text-neutral-500"
2493
- ),
2390
+ className: twMerge13("peer flex-grow outline-none bg-transparent", "placeholder:text-neutral-500"),
2494
2391
  placeholder: "0.005",
2495
2392
  required: true,
2496
2393
  autoFocus: true,
@@ -2511,33 +2408,23 @@ var AmountInput = forwardRef3(function AmountInput2({ initialAmount, onChange },
2511
2408
  }
2512
2409
  }
2513
2410
  ),
2514
- /* @__PURE__ */ jsx27(
2515
- "span",
2516
- {
2517
- className: twMerge13(
2518
- "flex-shrink-0 text-2xl",
2519
- "peer-placeholder-shown:text-neutral-400",
2520
- "dark:peer-placeholder-shown:text-neutral-500"
2521
- ),
2522
- children: /* @__PURE__ */ jsx27(EthIcon, {})
2523
- }
2524
- )
2411
+ /* @__PURE__ */ jsx26("span", { className: twMerge13("flex-shrink-0 text-2xl", "peer-placeholder-shown:text-neutral-500"), children: /* @__PURE__ */ jsx26(EthIcon, {}) })
2525
2412
  ] }) });
2526
2413
  });
2527
2414
 
2528
2415
  // src/onboarding/deposit/SubmitButton.tsx
2529
- import { useAccount as useAccount3, useBalance as useBalance4, useSwitchChain as useSwitchChain2 } from "wagmi";
2416
+ import { useAccount as useAccount2, useBalance as useBalance3, useSwitchChain as useSwitchChain2 } from "wagmi";
2530
2417
  import { twMerge as twMerge14 } from "tailwind-merge";
2531
2418
  import { parseEther as parseEther6 } from "viem";
2532
- import { jsx as jsx28, jsxs as jsxs17 } from "react/jsx-runtime";
2419
+ import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2533
2420
  var MAX_DEPOSIT_AMOUNT = "0.1";
2534
2421
  function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2535
- const { chainId: userChainId, address: userAddress } = useAccount3();
2536
- const { data: userBalance } = useBalance4({ address: userAddress });
2422
+ const { chainId: userChainId, address: userAddress } = useAccount2();
2423
+ const { data: userBalance } = useBalance3({ address: userAddress });
2537
2424
  const shouldSwitchChain = chainId != null && chainId !== userChainId;
2538
2425
  const switchChain = useSwitchChain2();
2539
2426
  if (shouldSwitchChain) {
2540
- return /* @__PURE__ */ jsx28(
2427
+ return /* @__PURE__ */ jsx27(
2541
2428
  Button,
2542
2429
  {
2543
2430
  type: "button",
@@ -2556,16 +2443,16 @@ function SubmitButton({ amount, chainId, className, ...buttonProps }) {
2556
2443
  " ETH"
2557
2444
  ] });
2558
2445
  } else if (amount > (userBalance?.value ?? 0n)) {
2559
- return /* @__PURE__ */ jsx28(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2446
+ return /* @__PURE__ */ jsx27(Button, { type: "button", className: twMerge14("w-full", className), disabled: true, children: "Insufficient balance" });
2560
2447
  }
2561
2448
  }
2562
- return /* @__PURE__ */ jsx28(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2449
+ return /* @__PURE__ */ jsx27(Button, { type: "submit", className: twMerge14("w-full", className), ...buttonProps });
2563
2450
  }
2564
2451
 
2565
2452
  // src/icons/WarningIcon.tsx
2566
- import { jsx as jsx29 } from "react/jsx-runtime";
2453
+ import { jsx as jsx28 } from "react/jsx-runtime";
2567
2454
  function WarningIcon(props) {
2568
- return /* @__PURE__ */ jsx29(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx29(
2455
+ return /* @__PURE__ */ jsx28(IconSVG, { fill: "none", ...props, children: /* @__PURE__ */ jsx28(
2569
2456
  "path",
2570
2457
  {
2571
2458
  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",
@@ -2586,7 +2473,7 @@ function formatGas(wei) {
2586
2473
  }
2587
2474
 
2588
2475
  // src/onboarding/deposit/DepositForm.tsx
2589
- import { Fragment as Fragment4, jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
2476
+ import { Fragment as Fragment3, jsx as jsx29, jsxs as jsxs18 } from "react/jsx-runtime";
2590
2477
  function DepositForm({
2591
2478
  sourceChain,
2592
2479
  setSourceChainId,
@@ -2597,10 +2484,10 @@ function DepositForm({
2597
2484
  onSubmit,
2598
2485
  submitButton
2599
2486
  }) {
2600
- const amountInputRef = useRef3(null);
2487
+ const amountInputRef = useRef4(null);
2601
2488
  const isMounted = useIsMounted();
2602
- const { address: userAddress, chainId: userChainId } = useAccount4();
2603
- const balance = useShowQueryError(useBalance5({ chainId: sourceChain.id, address: userAddress }));
2489
+ const { address: userAddress, chainId: userChainId } = useAccount3();
2490
+ const balance = useShowQueryError(useBalance4({ chainId: sourceChain.id, address: userAddress }));
2604
2491
  const quarryBalance = useShowQueryError(useBalance(userAddress));
2605
2492
  useWatchBlockNumber2({
2606
2493
  onBlockNumber: () => {
@@ -2635,33 +2522,32 @@ function DepositForm({
2635
2522
  },
2636
2523
  children: [
2637
2524
  /* @__PURE__ */ jsxs18("div", { className: "flex gap-2", children: [
2638
- /* @__PURE__ */ jsx30(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2639
- /* @__PURE__ */ jsx30(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2525
+ /* @__PURE__ */ jsx29(ChainSelect, { value: sourceChain.id, onChange: setSourceChainId }),
2526
+ /* @__PURE__ */ jsx29(AmountInput, { ref: amountInputRef, initialAmount: amount, onChange: setAmount })
2640
2527
  ] }),
2641
2528
  /* @__PURE__ */ jsxs18(
2642
2529
  "dl",
2643
2530
  {
2644
2531
  className: twMerge15(
2645
2532
  "grid grid-cols-2 divide-y text-sm leading-loose [&_>_:is(dt,dd)]:px-1 [&_>_dd]:text-right",
2646
- "divide-neutral-200 text-neutral-500",
2647
- "dark:divide-neutral-700 dark:text-neutral-400"
2533
+ "divide-neutral-700 text-neutral-400"
2648
2534
  ),
2649
2535
  children: [
2650
- /* @__PURE__ */ jsx30("dt", { children: "Available to deposit" }),
2651
- /* @__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 }),
2652
- /* @__PURE__ */ jsx30("dt", { children: "Gas balance after deposit" }),
2653
- /* @__PURE__ */ jsx30("dd", { children: /* @__PURE__ */ jsx30(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2654
- /* @__PURE__ */ jsx30("dt", { children: "Estimated fee" }),
2655
- /* @__PURE__ */ jsx30("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment4, { children: [
2536
+ /* @__PURE__ */ jsx29("dt", { children: "Available to deposit" }),
2537
+ /* @__PURE__ */ jsx29("dd", { children: balance.isSuccess ? /* @__PURE__ */ jsx29(Balance, { wei: balance.data.value }) : balance.isError ? /* @__PURE__ */ jsx29("span", { title: String(balance.error), children: /* @__PURE__ */ jsx29(WarningIcon, { className: "inline-block text-amber-500" }) }) : balance.isLoading ? /* @__PURE__ */ jsx29(PendingIcon, { className: "inline-block text-xs" }) : null }),
2538
+ /* @__PURE__ */ jsx29("dt", { children: "Gas balance after deposit" }),
2539
+ /* @__PURE__ */ jsx29("dd", { children: /* @__PURE__ */ jsx29(Balance, { wei: (quarryBalance.data ?? 0n) + (amount ?? 0n) }) }),
2540
+ /* @__PURE__ */ jsx29("dt", { children: "Estimated fee" }),
2541
+ /* @__PURE__ */ jsx29("dd", { children: estimatedFee.fee ? /* @__PURE__ */ jsxs18(Fragment3, { children: [
2656
2542
  formatGas(estimatedFee.fee),
2657
2543
  " gwei"
2658
- ] }) : 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 }),
2659
- /* @__PURE__ */ jsx30("dt", { children: "Time to deposit" }),
2660
- /* @__PURE__ */ jsx30("dd", { children: estimatedTime })
2544
+ ] }) : estimatedFee.error ? /* @__PURE__ */ jsx29("span", { title: String(estimatedFee.error), children: /* @__PURE__ */ jsx29(WarningIcon, { className: "inline-block text-amber-500" }) }) : estimatedFee.isLoading ? /* @__PURE__ */ jsx29(PendingIcon, { className: "inline-block text-xs" }) : null }),
2545
+ /* @__PURE__ */ jsx29("dt", { children: "Time to deposit" }),
2546
+ /* @__PURE__ */ jsx29("dd", { children: estimatedTime })
2661
2547
  ]
2662
2548
  }
2663
2549
  ),
2664
- hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx30(SubmitButton, { disabled: true, children: "Not enough funds" })
2550
+ hasMinimumBalance ? submitButton : /* @__PURE__ */ jsx29(SubmitButton, { disabled: true, children: "Not enough funds" })
2665
2551
  ]
2666
2552
  }
2667
2553
  );
@@ -2715,18 +2601,18 @@ function useDeposits() {
2715
2601
  }
2716
2602
 
2717
2603
  // src/onboarding/deposit/DepositViaTransferForm.tsx
2718
- import { jsx as jsx31 } from "react/jsx-runtime";
2604
+ import { jsx as jsx30 } from "react/jsx-runtime";
2719
2605
  function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2720
2606
  const { chain } = useEntryKitConfig();
2721
2607
  const paymaster = getPaymaster(chain);
2722
2608
  const publicClient = usePublicClient();
2723
- const { address: userAddress } = useAccount5();
2609
+ const { address: userAddress } = useAccount4();
2724
2610
  const { writeContractAsync } = useWriteContract();
2725
2611
  const { addDeposit } = useDeposits();
2726
2612
  if (!userAddress) {
2727
2613
  throw new Error("User address not found");
2728
2614
  }
2729
- const { data: gasPrice } = useQuery11({
2615
+ const { data: gasPrice } = useQuery12({
2730
2616
  queryKey: ["gasPrice", sourceChain.id],
2731
2617
  queryFn: async () => {
2732
2618
  if (!publicClient) throw new Error("Public client not available");
@@ -2783,7 +2669,7 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2783
2669
  }
2784
2670
  });
2785
2671
  const estimatedFee = prepareData?.gas && gasPrice ? prepareData.gas * gasPrice : void 0;
2786
- return /* @__PURE__ */ jsx31(
2672
+ return /* @__PURE__ */ jsx30(
2787
2673
  DepositForm,
2788
2674
  {
2789
2675
  sourceChain,
@@ -2799,7 +2685,7 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2799
2685
  onSubmit: async () => {
2800
2686
  await deposit.mutateAsync();
2801
2687
  },
2802
- submitButton: /* @__PURE__ */ jsx31(
2688
+ submitButton: /* @__PURE__ */ jsx30(
2803
2689
  SubmitButton,
2804
2690
  {
2805
2691
  variant: "primary",
@@ -2816,19 +2702,19 @@ function DepositViaTransferForm({ amount, setAmount, sourceChain, setSourceChain
2816
2702
 
2817
2703
  // src/onboarding/deposit/DepositViaRelayForm.tsx
2818
2704
  import { encodeFunctionData as encodeFunctionData3 } from "viem";
2819
- import { useAccount as useAccount6, useWalletClient } from "wagmi";
2820
- import { useMutation as useMutation5, useQuery as useQuery12 } from "@tanstack/react-query";
2821
- import { jsx as jsx32 } from "react/jsx-runtime";
2705
+ import { useAccount as useAccount5, useWalletClient } from "wagmi";
2706
+ import { useMutation as useMutation5, useQuery as useQuery13 } from "@tanstack/react-query";
2707
+ import { jsx as jsx31 } from "react/jsx-runtime";
2822
2708
  var ETH_ADDRESS = "0x0000000000000000000000000000000000000000";
2823
2709
  function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId }) {
2824
2710
  const { chain, chainId: destinationChainId } = useEntryKitConfig();
2825
2711
  const paymaster = getPaymaster(chain);
2826
2712
  const { data: wallet } = useWalletClient();
2827
- const { address: userAddress } = useAccount6();
2713
+ const { address: userAddress } = useAccount5();
2828
2714
  const { addDeposit } = useDeposits();
2829
2715
  const { data: relay } = useRelay();
2830
2716
  const relayClient = relay?.client;
2831
- const quote = useQuery12({
2717
+ const quote = useQuery13({
2832
2718
  queryKey: ["relayBridgeQuote", sourceChain.id, amount?.toString()],
2833
2719
  queryFn: async () => {
2834
2720
  if (!relayClient) throw new Error("No Relay client found.");
@@ -2904,7 +2790,7 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2904
2790
  const gasFee = BigInt(fees?.gas?.amount ?? 0);
2905
2791
  const relayerFee = BigInt(fees?.relayer?.amount ?? 0);
2906
2792
  const fee = gasFee + relayerFee;
2907
- return /* @__PURE__ */ jsx32(
2793
+ return /* @__PURE__ */ jsx31(
2908
2794
  DepositForm,
2909
2795
  {
2910
2796
  sourceChain,
@@ -2921,7 +2807,7 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2921
2807
  if (!quote.data || !amount) return;
2922
2808
  await deposit.mutateAsync({ quote: quote.data, amount });
2923
2809
  },
2924
- submitButton: /* @__PURE__ */ jsx32(
2810
+ submitButton: /* @__PURE__ */ jsx31(
2925
2811
  SubmitButton,
2926
2812
  {
2927
2813
  variant: "primary",
@@ -2938,19 +2824,19 @@ function DepositViaRelayForm({ amount, setAmount, sourceChain, setSourceChainId
2938
2824
 
2939
2825
  // src/onboarding/deposit/Deposits.tsx
2940
2826
  import { useEffect as useEffect13 } from "react";
2941
- import { useQuery as useQuery15, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
2827
+ import { useQuery as useQuery16, useQueryClient as useQueryClient7 } from "@tanstack/react-query";
2942
2828
 
2943
2829
  // src/onboarding/deposit/TransferDepositStatus.tsx
2944
- import { useQuery as useQuery13 } from "@tanstack/react-query";
2830
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
2945
2831
 
2946
2832
  // src/onboarding/deposit/DepositStatus.tsx
2947
- import { useEffect as useEffect12, useState as useState4 } from "react";
2833
+ import { useEffect as useEffect12, useState as useState3 } from "react";
2948
2834
  import { twMerge as twMerge16 } from "tailwind-merge";
2949
2835
 
2950
2836
  // src/icons/CloseIcon.tsx
2951
- import { jsx as jsx33 } from "react/jsx-runtime";
2837
+ import { jsx as jsx32 } from "react/jsx-runtime";
2952
2838
  function CloseIcon(props) {
2953
- return /* @__PURE__ */ jsx33(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx33(
2839
+ return /* @__PURE__ */ jsx32(IconSVG, { strokeWidth: "2", stroke: "currentColor", ...props, children: /* @__PURE__ */ jsx32(
2954
2840
  "path",
2955
2841
  {
2956
2842
  d: "M6 18L18 6M6 6L18 18",
@@ -2964,18 +2850,18 @@ function CloseIcon(props) {
2964
2850
  }
2965
2851
 
2966
2852
  // src/onboarding/deposit/DepositStatus.tsx
2967
- import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
2853
+ import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
2968
2854
  function DepositStatus({ status, progress, children, onDismiss }) {
2969
- const [appear, setAppear] = useState4(false);
2855
+ const [appear, setAppear] = useState3(false);
2970
2856
  useEffect12(() => {
2971
2857
  setAppear(true);
2972
2858
  }, []);
2973
- 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: [
2859
+ return /* @__PURE__ */ jsxs19("div", { className: "group bg-neutral-900 flex flex-col animate-in fade-in slide-in-from-bottom-2 animate-out fade-out", children: [
2974
2860
  /* @__PURE__ */ jsxs19("div", { className: "py-1 text-sm flex items-center gap-2", children: [
2975
- /* @__PURE__ */ jsx34("div", { className: "flex-grow", children }),
2861
+ /* @__PURE__ */ jsx33("div", { className: "flex-grow", children }),
2976
2862
  /* @__PURE__ */ jsxs19("div", { className: "flex-shrink-0 grid", children: [
2977
- /* @__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" }) }),
2978
- /* @__PURE__ */ jsx34(
2863
+ /* @__PURE__ */ jsx33("span", { className: "col-start-1 row-start-1 transition opacity-100 group-hover:opacity-0 group-hover:pointer-events-none", children: status === "success" ? /* @__PURE__ */ jsx33(CheckIcon, { className: "text-green-600" }) : status === "error" ? /* @__PURE__ */ jsx33(WarningIcon, { className: "text-amber-500" }) : /* @__PURE__ */ jsx33(PendingIcon, { className: "text-neutral-500 transition" }) }),
2864
+ /* @__PURE__ */ jsx33(
2979
2865
  "button",
2980
2866
  {
2981
2867
  type: "button",
@@ -2983,22 +2869,21 @@ function DepositStatus({ status, progress, children, onDismiss }) {
2983
2869
  "col-start-1 row-start-1 flex items-center justify-center transition",
2984
2870
  "opacity-0 pointer-events-none",
2985
2871
  "group-hover:opacity-100 group-hover:pointer-events-auto",
2986
- "text-neutral-400 hover:text-black",
2987
- "dark:text-neutral-500 dark:hover:text-white"
2872
+ "text-neutral-500 hover:text-white"
2988
2873
  ),
2989
2874
  title: "Dismiss",
2990
2875
  onClick: onDismiss,
2991
- children: /* @__PURE__ */ jsx34(CloseIcon, {})
2876
+ children: /* @__PURE__ */ jsx33(CloseIcon, {})
2992
2877
  }
2993
2878
  )
2994
2879
  ] })
2995
2880
  ] }),
2996
- /* @__PURE__ */ jsx34("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx34(
2881
+ /* @__PURE__ */ jsx33("div", { className: "w-full h-[2px] -mt-full overflow-clip", children: /* @__PURE__ */ jsx33(
2997
2882
  "div",
2998
2883
  {
2999
2884
  className: twMerge16(
3000
2885
  "w-full h-full transition ease-linear",
3001
- 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",
2886
+ status === "success" ? "bg-green-600" : status === "error" ? "bg-red-600" : "bg-blue-600",
3002
2887
  status === "pending" ? "opacity-100" : "opacity-0"
3003
2888
  ),
3004
2889
  style: status === "pending" ? {
@@ -3013,7 +2898,7 @@ function DepositStatus({ status, progress, children, onDismiss }) {
3013
2898
 
3014
2899
  // src/onboarding/deposit/TransferDepositStatus.tsx
3015
2900
  import { useChains as useChains2 } from "wagmi";
3016
- import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs20 } from "react/jsx-runtime";
2901
+ import { Fragment as Fragment4, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
3017
2902
  function TransferDepositStatus({
3018
2903
  amount,
3019
2904
  chainL1Id,
@@ -3025,11 +2910,11 @@ function TransferDepositStatus({
3025
2910
  }) {
3026
2911
  const chains = useChains2();
3027
2912
  const chain = chains.find((chain2) => chain2.id === chainL1Id);
3028
- const receipt = useQuery13({
2913
+ const receipt = useQuery14({
3029
2914
  queryKey: ["transferDepositStatus", hash],
3030
2915
  queryFn: () => receiptPromise
3031
2916
  });
3032
- return /* @__PURE__ */ jsx35(
2917
+ return /* @__PURE__ */ jsx34(
3033
2918
  DepositStatus,
3034
2919
  {
3035
2920
  status: receipt.status,
@@ -3041,10 +2926,10 @@ function TransferDepositStatus({
3041
2926
  children: (() => {
3042
2927
  const blockExplorer = chain.blockExplorers?.default.url;
3043
2928
  if (receipt.status === "pending") {
3044
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2929
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
3045
2930
  "Confirming deposit on",
3046
2931
  " ",
3047
- /* @__PURE__ */ jsx35(
2932
+ /* @__PURE__ */ jsx34(
3048
2933
  "a",
3049
2934
  {
3050
2935
  href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
@@ -3057,10 +2942,10 @@ function TransferDepositStatus({
3057
2942
  ] });
3058
2943
  }
3059
2944
  if (receipt.status === "error") {
3060
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2945
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
3061
2946
  "Could not find deposit on",
3062
2947
  " ",
3063
- /* @__PURE__ */ jsx35(
2948
+ /* @__PURE__ */ jsx34(
3064
2949
  "a",
3065
2950
  {
3066
2951
  href: blockExplorer ? `${blockExplorer}/tx/${hash}` : void 0,
@@ -3072,10 +2957,10 @@ function TransferDepositStatus({
3072
2957
  "."
3073
2958
  ] });
3074
2959
  }
3075
- return /* @__PURE__ */ jsxs20(Fragment5, { children: [
2960
+ return /* @__PURE__ */ jsxs20(Fragment4, { children: [
3076
2961
  "Successfully",
3077
2962
  " ",
3078
- /* @__PURE__ */ jsx35(
2963
+ /* @__PURE__ */ jsx34(
3079
2964
  "a",
3080
2965
  {
3081
2966
  href: blockExplorer ? `${blockExplorer}/tx/${receipt.data.transactionHash}` : void 0,
@@ -3085,7 +2970,7 @@ function TransferDepositStatus({
3085
2970
  }
3086
2971
  ),
3087
2972
  " ",
3088
- /* @__PURE__ */ jsx35(Balance, { wei: amount })
2973
+ /* @__PURE__ */ jsx34(Balance, { wei: amount })
3089
2974
  ] });
3090
2975
  })()
3091
2976
  }
@@ -3093,9 +2978,9 @@ function TransferDepositStatus({
3093
2978
  }
3094
2979
 
3095
2980
  // src/onboarding/deposit/RelayDepositStatus.tsx
3096
- import { useQuery as useQuery14 } from "@tanstack/react-query";
2981
+ import { useQuery as useQuery15 } from "@tanstack/react-query";
3097
2982
  import { useChains as useChains3 } from "wagmi";
3098
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
2983
+ import { Fragment as Fragment5, jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
3099
2984
  function RelayDepositStatus({
3100
2985
  amount,
3101
2986
  chainL1Id,
@@ -3108,11 +2993,11 @@ function RelayDepositStatus({
3108
2993
  const chains = useChains3();
3109
2994
  const chainL1 = chains.find((chain) => chain.id === chainL1Id);
3110
2995
  const chainL2 = chains.find((chain) => chain.id === chainL2Id);
3111
- const deposit = useQuery14({
2996
+ const deposit = useQuery15({
3112
2997
  queryKey: ["relayDepositPromise", chainL1Id, chainL2Id, amount.toString(), start.toISOString()],
3113
2998
  queryFn: () => depositPromise
3114
2999
  });
3115
- return /* @__PURE__ */ jsx36(
3000
+ return /* @__PURE__ */ jsx35(
3116
3001
  DepositStatus,
3117
3002
  {
3118
3003
  status: deposit.status,
@@ -3123,22 +3008,22 @@ function RelayDepositStatus({
3123
3008
  onDismiss,
3124
3009
  children: (() => {
3125
3010
  if (deposit.status === "pending") {
3126
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3011
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
3127
3012
  "Relay bridge deposit pending on ",
3128
3013
  chainL1.name,
3129
3014
  "\u2026"
3130
3015
  ] });
3131
3016
  }
3132
3017
  if (deposit.status === "error") {
3133
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3018
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
3134
3019
  "Relay bridge deposit to ",
3135
3020
  chainL2.name,
3136
3021
  " failed."
3137
3022
  ] });
3138
3023
  }
3139
- return /* @__PURE__ */ jsxs21(Fragment6, { children: [
3024
+ return /* @__PURE__ */ jsxs21(Fragment5, { children: [
3140
3025
  "Successfully bridged ",
3141
- /* @__PURE__ */ jsx36(Balance, { wei: amount }),
3026
+ /* @__PURE__ */ jsx35(Balance, { wei: amount }),
3142
3027
  " to ",
3143
3028
  chainL2.name,
3144
3029
  "!"
@@ -3149,15 +3034,15 @@ function RelayDepositStatus({
3149
3034
  }
3150
3035
 
3151
3036
  // src/onboarding/deposit/Deposits.tsx
3152
- import { useAccount as useAccount7, useClient as useClient11 } from "wagmi";
3153
- import { jsx as jsx37 } from "react/jsx-runtime";
3037
+ import { useAccount as useAccount6, useClient as useClient11 } from "wagmi";
3038
+ import { jsx as jsx36 } from "react/jsx-runtime";
3154
3039
  function Deposits() {
3155
3040
  const queryClient = useQueryClient7();
3156
3041
  const { chainId } = useEntryKitConfig();
3157
3042
  const client = useClient11({ chainId });
3158
- const { address: userAddress } = useAccount7();
3043
+ const { address: userAddress } = useAccount6();
3159
3044
  const { deposits, removeDeposit } = useDeposits();
3160
- const { data: isComplete } = useQuery15({
3045
+ const { data: isComplete } = useQuery16({
3161
3046
  queryKey: ["depositsComplete", deposits.map((deposit) => deposit.uid)],
3162
3047
  queryFn: async () => {
3163
3048
  if (!deposits.length) return false;
@@ -3172,26 +3057,26 @@ function Deposits() {
3172
3057
  }
3173
3058
  }, [client?.uid, isComplete, queryClient, userAddress]);
3174
3059
  if (!deposits.length) return null;
3175
- return /* @__PURE__ */ jsx37("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3060
+ return /* @__PURE__ */ jsx36("div", { className: "flex flex-col gap-1 mt-4", children: deposits.map((deposit) => {
3176
3061
  if (deposit.type === "transfer") {
3177
- return /* @__PURE__ */ jsx37(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3062
+ return /* @__PURE__ */ jsx36(TransferDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3178
3063
  } else if (deposit.type === "relay") {
3179
- return /* @__PURE__ */ jsx37(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3064
+ return /* @__PURE__ */ jsx36(RelayDepositStatus, { ...deposit, onDismiss: () => removeDeposit(deposit.uid) }, deposit.uid);
3180
3065
  }
3181
3066
  }) });
3182
3067
  }
3183
3068
 
3184
3069
  // src/onboarding/deposit/DepositFormContainer.tsx
3185
- import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
3070
+ import { jsx as jsx37, jsxs as jsxs22 } from "react/jsx-runtime";
3186
3071
  function DepositFormContainer() {
3187
3072
  const { chainId: destinationChainId } = useEntryKitConfig();
3188
3073
  const chainId = useChainId();
3189
3074
  const chains = useChains4();
3190
- const [amount, setAmount] = useState5(void 0);
3191
- const [sourceChainId, setSourceChainId] = useState5(chainId);
3075
+ const [amount, setAmount] = useState4(void 0);
3076
+ const [sourceChainId, setSourceChainId] = useState4(chainId);
3192
3077
  const sourceChain = chains.find(({ id }) => id === sourceChainId);
3193
3078
  return /* @__PURE__ */ jsxs22("div", { className: "pt-10 pb-2", children: [
3194
- destinationChainId === sourceChainId ? /* @__PURE__ */ jsx38(
3079
+ destinationChainId === sourceChainId ? /* @__PURE__ */ jsx37(
3195
3080
  DepositViaTransferForm,
3196
3081
  {
3197
3082
  amount,
@@ -3199,7 +3084,7 @@ function DepositFormContainer() {
3199
3084
  sourceChain,
3200
3085
  setSourceChainId
3201
3086
  }
3202
- ) : /* @__PURE__ */ jsx38(
3087
+ ) : /* @__PURE__ */ jsx37(
3203
3088
  DepositViaRelayForm,
3204
3089
  {
3205
3090
  amount,
@@ -3208,14 +3093,14 @@ function DepositFormContainer() {
3208
3093
  setSourceChainId
3209
3094
  }
3210
3095
  ),
3211
- /* @__PURE__ */ jsx38(Deposits, {})
3096
+ /* @__PURE__ */ jsx37(Deposits, {})
3212
3097
  ] });
3213
3098
  }
3214
3099
 
3215
3100
  // src/icons/ArrowLeftIcon.tsx
3216
- import { jsx as jsx39 } from "react/jsx-runtime";
3101
+ import { jsx as jsx38 } from "react/jsx-runtime";
3217
3102
  function ArrowLeftIcon(props) {
3218
- return /* @__PURE__ */ jsx39(IconSVG, { ...props, children: /* @__PURE__ */ jsx39(
3103
+ return /* @__PURE__ */ jsx38(IconSVG, { ...props, children: /* @__PURE__ */ jsx38(
3219
3104
  "path",
3220
3105
  {
3221
3106
  d: "M19 12H5M12 19l-7-7 7-7",
@@ -3228,12 +3113,91 @@ function ArrowLeftIcon(props) {
3228
3113
  ) });
3229
3114
  }
3230
3115
 
3231
- // src/onboarding/quarry/GasBalance.tsx
3232
- import { useEffect as useEffect14 } from "react";
3116
+ // src/onboarding/quarry/WithdrawGasBalanceButton.tsx
3117
+ import { getAction as getAction6 } from "viem/utils";
3118
+ import { waitForTransactionReceipt as waitForTransactionReceipt3 } from "viem/actions";
3119
+ import { useAccount as useAccount7, useClient as useClient12, useSwitchChain as useSwitchChain3, useWriteContract as useWriteContract2 } from "wagmi";
3120
+ import { twMerge as twMerge17 } from "tailwind-merge";
3121
+ import { useMutation as useMutation6 } from "@tanstack/react-query";
3233
3122
  import { useQueryClient as useQueryClient8 } from "@tanstack/react-query";
3234
- import { Fragment as Fragment7, jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
3235
- function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress }) {
3123
+ import { jsx as jsx39, jsxs as jsxs23 } from "react/jsx-runtime";
3124
+ function WithdrawGasBalanceButton({ userAddress }) {
3125
+ const { writeContractAsync } = useWriteContract2();
3126
+ const { switchChain } = useSwitchChain3();
3127
+ const { chain, chainId } = useEntryKitConfig();
3128
+ const { chainId: userChainId } = useAccount7();
3236
3129
  const queryClient = useQueryClient8();
3130
+ const client = useClient12({ chainId });
3131
+ const paymaster = getPaymaster(chain);
3132
+ const balance = useShowQueryError(useBalance(userAddress));
3133
+ const shouldSwitchChain = chainId != null && chainId !== userChainId;
3134
+ const withdraw = useMutation6({
3135
+ mutationKey: ["withdraw", userAddress],
3136
+ mutationFn: async () => {
3137
+ if (!client) throw new Error("Client not ready.");
3138
+ if (!paymaster) throw new Error("Paymaster not found");
3139
+ if (!balance.data) throw new Error("No gas balance to withdraw.");
3140
+ try {
3141
+ const hash = await writeContractAsync({
3142
+ address: paymaster.address,
3143
+ abi: paymasterAbi,
3144
+ functionName: "withdrawTo",
3145
+ args: [userAddress, balance.data],
3146
+ chainId
3147
+ });
3148
+ await getAction6(client, waitForTransactionReceipt3, "waitForTransactionReceipt")({ hash });
3149
+ await Promise.all([
3150
+ queryClient.invalidateQueries({ queryKey: ["balance"] }),
3151
+ queryClient.invalidateQueries({ queryKey: ["getPrerequisites"] })
3152
+ ]);
3153
+ } catch (error2) {
3154
+ console.error("Error while withdrawing", error2);
3155
+ throw error2;
3156
+ }
3157
+ }
3158
+ });
3159
+ if (balance.data == null || balance.data === 0n) {
3160
+ return null;
3161
+ }
3162
+ return /* @__PURE__ */ jsx39(
3163
+ "button",
3164
+ {
3165
+ onClick: () => {
3166
+ if (shouldSwitchChain) {
3167
+ return switchChain({ chainId });
3168
+ }
3169
+ withdraw.mutate();
3170
+ },
3171
+ className: twMerge17(
3172
+ "text-sm font-medium text-white/50 group whitespace-nowrap",
3173
+ withdraw.isPending ? "opacity-50 pointer-events-none" : "cursor-pointer hover:text-white"
3174
+ ),
3175
+ disabled: withdraw.isPending,
3176
+ children: /* @__PURE__ */ jsxs23("span", { className: "inline-block", children: [
3177
+ /* @__PURE__ */ jsxs23(
3178
+ "span",
3179
+ {
3180
+ className: twMerge17(
3181
+ "inline-flex items-center gap-1 underline decoration-neutral-500 underline-offset-4",
3182
+ !withdraw.isPending && "hover:decoration-orange-500",
3183
+ shouldSwitchChain && "group-hover:hidden"
3184
+ ),
3185
+ children: [
3186
+ withdraw.isPending && /* @__PURE__ */ jsx39(PendingIcon, { className: "w-3 h-3" }),
3187
+ "Withdraw"
3188
+ ]
3189
+ }
3190
+ ),
3191
+ shouldSwitchChain && /* @__PURE__ */ jsx39("span", { className: "hidden group-hover:inline-block underline decoration-neutral-500 underline-offset-4 hover:decoration-orange-500", children: "Switch chain" })
3192
+ ] })
3193
+ }
3194
+ );
3195
+ }
3196
+
3197
+ // src/onboarding/quarry/GasBalance.tsx
3198
+ import { jsx as jsx40, jsxs as jsxs24 } from "react/jsx-runtime";
3199
+ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress }) {
3200
+ const queryClient = useQueryClient9();
3237
3201
  const balance = useShowQueryError(useBalance(userAddress));
3238
3202
  const prevBalance = usePrevious(balance.data || 0n);
3239
3203
  useEffect14(() => {
@@ -3243,7 +3207,7 @@ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress
3243
3207
  }
3244
3208
  }, [balance.data, prevBalance, setFocused, queryClient, userAddress]);
3245
3209
  if (isFocused) {
3246
- return /* @__PURE__ */ jsxs23(Fragment7, { children: [
3210
+ return /* @__PURE__ */ jsxs24("div", { children: [
3247
3211
  isFocused && /* @__PURE__ */ jsx40("div", { className: "absolute top-0 left-0", children: /* @__PURE__ */ jsx40(
3248
3212
  "div",
3249
3213
  {
@@ -3255,23 +3219,26 @@ function GasBalance2({ isActive, isExpanded, isFocused, setFocused, userAddress
3255
3219
  /* @__PURE__ */ jsx40(DepositFormContainer, {})
3256
3220
  ] });
3257
3221
  }
3258
- return /* @__PURE__ */ jsxs23("div", { className: "flex flex-col gap-4", children: [
3259
- /* @__PURE__ */ jsxs23("div", { className: "flex justify-between gap-4", children: [
3260
- /* @__PURE__ */ jsxs23("div", { children: [
3222
+ return /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-4", children: [
3223
+ /* @__PURE__ */ jsxs24("div", { className: "flex justify-between gap-4", children: [
3224
+ /* @__PURE__ */ jsxs24("div", { children: [
3261
3225
  /* @__PURE__ */ jsx40("div", { children: "Gas balance" }),
3262
3226
  /* @__PURE__ */ jsx40("div", { className: "font-mono text-white", children: balance.data != null ? /* @__PURE__ */ jsx40(Balance, { wei: balance.data }) : /* @__PURE__ */ jsx40(PendingIcon, { className: "text-sm" }) })
3263
3227
  ] }),
3264
- /* @__PURE__ */ jsx40(
3265
- Button,
3266
- {
3267
- variant: isActive ? "primary" : "tertiary",
3268
- className: "flex-shrink-0 text-sm p-1 w-28",
3269
- autoFocus: isActive || isExpanded,
3270
- pending: balance.status === "pending",
3271
- onClick: () => setFocused(true),
3272
- children: "Top up"
3273
- }
3274
- )
3228
+ /* @__PURE__ */ jsxs24("div", { className: "flex flex-col gap-1 justify-center items-center", children: [
3229
+ /* @__PURE__ */ jsx40(
3230
+ Button,
3231
+ {
3232
+ variant: isActive ? "primary" : "tertiary",
3233
+ className: "flex-shrink-0 text-sm p-1 w-28",
3234
+ autoFocus: isActive || isExpanded,
3235
+ pending: balance.status === "pending",
3236
+ onClick: () => setFocused(true),
3237
+ children: "Top up"
3238
+ }
3239
+ ),
3240
+ /* @__PURE__ */ jsx40(WithdrawGasBalanceButton, { userAddress })
3241
+ ] })
3275
3242
  ] }),
3276
3243
  isExpanded ? /* @__PURE__ */ jsx40("p", { className: "text-sm", children: "Your gas balance is used to pay for onchain computation." }) : null
3277
3244
  ] });
@@ -3282,7 +3249,7 @@ import { jsx as jsx41 } from "react/jsx-runtime";
3282
3249
  function ConnectedSteps({ userClient, initialUserAddress }) {
3283
3250
  const { chain } = useEntryKitConfig();
3284
3251
  const paymaster = getPaymaster(chain);
3285
- const [focusedId, setFocusedId] = useState6(null);
3252
+ const [focusedId, setFocusedId] = useState5(null);
3286
3253
  const userAddress = userClient.account.address;
3287
3254
  const { data: prerequisites, error: prerequisitesError } = usePrerequisites(userAddress);
3288
3255
  useEffect15(() => {
@@ -3292,7 +3259,7 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3292
3259
  }, [prerequisitesError]);
3293
3260
  const { closeAccountModal } = useAccountModal();
3294
3261
  const isNewConnection = userAddress !== initialUserAddress;
3295
- const initialPrerequisites = useRef4(prerequisites);
3262
+ const initialPrerequisites = useRef5(prerequisites);
3296
3263
  useEffect15(() => {
3297
3264
  if (prerequisites == null) return;
3298
3265
  if (initialPrerequisites.current == null) {
@@ -3362,7 +3329,7 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3362
3329
  userAddress,
3363
3330
  userClient
3364
3331
  ]);
3365
- const [selectedStepId] = useState6(null);
3332
+ const [selectedStepId] = useState5(null);
3366
3333
  const nextStep = steps.find((step) => step.content != null && !step.isComplete);
3367
3334
  const completedSteps = steps.filter((step) => step.isComplete);
3368
3335
  const activeStep = (selectedStepId != null ? steps.find((step) => step.id === selectedStepId) : null) ?? nextStep ?? (completedSteps.length < steps.length ? completedSteps.at(-1) : null);
@@ -3370,9 +3337,9 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3370
3337
  return /* @__PURE__ */ jsx41(
3371
3338
  "div",
3372
3339
  {
3373
- className: twMerge17(
3340
+ className: twMerge18(
3374
3341
  "px-8 flex flex-col",
3375
- focusedId && "divide-y divide-neutral-800",
3342
+ "divide-y divide-neutral-800",
3376
3343
  "animate-in animate-duration-300 fade-in slide-in-from-bottom-8"
3377
3344
  ),
3378
3345
  children: steps.map((step, i) => {
@@ -3392,20 +3359,20 @@ function ConnectedSteps({ userClient, initialUserAddress }) {
3392
3359
  }
3393
3360
  return null;
3394
3361
  }
3395
- 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);
3362
+ return /* @__PURE__ */ jsx41("div", { className: twMerge18("py-8 flex flex-col justify-center", isActive ? "flex-grow" : null), children: /* @__PURE__ */ jsx41("div", { className: twMerge18("flex flex-col", isDisabled ? "opacity-30 pointer-events-none" : null), children: content }) }, step.id);
3396
3363
  })
3397
3364
  }
3398
3365
  );
3399
3366
  }
3400
3367
 
3401
3368
  // src/AccountModalContent.tsx
3402
- import { useRef as useRef5 } from "react";
3369
+ import { useRef as useRef6 } from "react";
3403
3370
  import { jsx as jsx42 } from "react/jsx-runtime";
3404
3371
  function AccountModalContent() {
3405
3372
  const { chainId } = useEntryKitConfig();
3406
3373
  const userClient = useConnectorClient({ chainId });
3407
3374
  const { address: userAddress } = useAccount8();
3408
- const initialUserAddress = useRef5(userAddress);
3375
+ const initialUserAddress = useRef6(userAddress);
3409
3376
  if (userClient.status !== "success") {
3410
3377
  return /* @__PURE__ */ jsx42(ConnectWallet, {});
3411
3378
  }
@@ -3419,19 +3386,19 @@ import { ErrorBoundary } from "react-error-boundary";
3419
3386
  // src/errors/ErrorOverlay.tsx
3420
3387
  import { wait } from "@latticexyz/common/utils";
3421
3388
  import { useEffect as useEffect16 } from "react";
3422
- import { twMerge as twMerge18 } from "tailwind-merge";
3423
- import { Fragment as Fragment8, jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
3389
+ import { twMerge as twMerge19 } from "tailwind-merge";
3390
+ import { Fragment as Fragment6, jsx as jsx43, jsxs as jsxs25 } from "react/jsx-runtime";
3424
3391
  function ErrorOverlay({ error: error2, retry, dismiss }) {
3425
3392
  useEffect16(() => {
3426
3393
  if (error2) {
3427
3394
  console.error(error2);
3428
3395
  }
3429
3396
  }, [error2]);
3430
- return /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3397
+ return /* @__PURE__ */ jsxs25("div", { className: "pointer-events-none absolute inset-0 overflow-clip", children: [
3431
3398
  /* @__PURE__ */ jsx43(
3432
3399
  "div",
3433
3400
  {
3434
- className: twMerge18(
3401
+ className: twMerge19(
3435
3402
  "absolute inset-0 bg-blue-700/60",
3436
3403
  "transition duration-300",
3437
3404
  error2 ? "opacity-100 pointer-events-auto" : "opacity-0"
@@ -3441,24 +3408,24 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
3441
3408
  /* @__PURE__ */ jsx43(
3442
3409
  "div",
3443
3410
  {
3444
- className: twMerge18(
3411
+ className: twMerge19(
3445
3412
  "absolute inset-0 pb-8",
3446
3413
  "transition duration-300",
3447
3414
  error2 ? "translate-y-0 opacity-100 pointer-events-auto" : "-translate-y-4 opacity-0"
3448
3415
  ),
3449
- children: error2 ? /* @__PURE__ */ jsx43(Fragment8, { children: /* @__PURE__ */ jsxs24("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3450
- /* @__PURE__ */ jsxs24("div", { className: "space-y-6 px-8 pt-8", children: [
3416
+ children: error2 ? /* @__PURE__ */ jsx43(Fragment6, { children: /* @__PURE__ */ jsxs25("div", { className: "w-full max-h-full bg-blue-700 text-white/80 overflow-auto", children: [
3417
+ /* @__PURE__ */ jsxs25("div", { className: "space-y-6 px-8 pt-8", children: [
3451
3418
  /* @__PURE__ */ jsx43("div", { className: "text-white text-lg font-bold", children: "Oops! It broke :(" }),
3452
3419
  /* @__PURE__ */ jsx43("div", { className: "font-mono text-xs whitespace-pre-wrap", children: error2.message.trim() }),
3453
3420
  /* @__PURE__ */ jsx43("div", { className: "text-sm", children: "See the console for more info." })
3454
3421
  ] }),
3455
- /* @__PURE__ */ jsxs24("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3422
+ /* @__PURE__ */ jsxs25("div", { className: "pointer-events-none sticky bottom-0 left-0 -mt-2", children: [
3456
3423
  /* @__PURE__ */ jsx43("div", { className: "w-full h-12 bg-gradient-to-b from-transparent to-blue-700" }),
3457
- retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs24(
3424
+ retry ? /* @__PURE__ */ jsx43("div", { className: "bg-blue-700 text-center", children: /* @__PURE__ */ jsxs25(
3458
3425
  "button",
3459
3426
  {
3460
3427
  type: "button",
3461
- className: twMerge18(
3428
+ className: twMerge19(
3462
3429
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
3463
3430
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
3464
3431
  "text-white text-sm font-medium",
@@ -3481,7 +3448,7 @@ function ErrorOverlay({ error: error2, retry, dismiss }) {
3481
3448
  "button",
3482
3449
  {
3483
3450
  type: "button",
3484
- className: twMerge18(
3451
+ className: twMerge19(
3485
3452
  "pointer-events-auto group w-24 p-1 -translate-y-2 transition",
3486
3453
  "bg-blue-600 hover:bg-blue-500 aria-busy:bg-blue-500",
3487
3454
  "text-white text-sm font-medium",
@@ -3513,13 +3480,13 @@ function ErrorsOverlay() {
3513
3480
  }
3514
3481
 
3515
3482
  // src/AccountModal.tsx
3516
- import { jsx as jsx46, jsxs as jsxs25 } from "react/jsx-runtime";
3483
+ import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
3517
3484
  function AccountModal() {
3518
3485
  const { accountModalOpen, toggleAccountModal } = useAccountModal();
3519
- return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs25(
3486
+ return /* @__PURE__ */ jsx46(Modal, { open: accountModalOpen, onOpenChange: toggleAccountModal, children: accountModalOpen ? /* @__PURE__ */ jsxs26(
3520
3487
  "div",
3521
3488
  {
3522
- className: twMerge19(
3489
+ className: twMerge20(
3523
3490
  "relative py-2 ring-1",
3524
3491
  "bg-neutral-900 text-neutral-400 ring-neutral-700/50",
3525
3492
  "links:font-medium links:underline links:underline-offset-4",
@@ -3527,11 +3494,11 @@ function AccountModal() {
3527
3494
  "links:decoration-neutral-500 hover:links:decoration-orange-500"
3528
3495
  ),
3529
3496
  children: [
3530
- /* @__PURE__ */ jsxs25(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3497
+ /* @__PURE__ */ jsxs26(ErrorBoundary, { FallbackComponent: ErrorFallback, children: [
3531
3498
  /* @__PURE__ */ jsx46(AccountModalContent, {}),
3532
3499
  /* @__PURE__ */ jsx46(ErrorsOverlay, {})
3533
3500
  ] }),
3534
- /* @__PURE__ */ jsxs25(
3501
+ /* @__PURE__ */ jsxs26(
3535
3502
  "a",
3536
3503
  {
3537
3504
  href: "https://mud.dev",
@@ -3547,7 +3514,7 @@ function AccountModal() {
3547
3514
  /* @__PURE__ */ jsx46("div", { className: "absolute top-0 right-0", children: /* @__PURE__ */ jsx46(
3548
3515
  DialogClose,
3549
3516
  {
3550
- className: twMerge19(
3517
+ className: twMerge20(
3551
3518
  "pointer-events-auto leading-none p-2 transition",
3552
3519
  "text-white/20 hover:text-white/40"
3553
3520
  ),
@@ -3561,9 +3528,9 @@ function AccountModal() {
3561
3528
  }
3562
3529
 
3563
3530
  // src/EntryKitProvider.tsx
3564
- import { jsx as jsx47, jsxs as jsxs26 } from "react/jsx-runtime";
3531
+ import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
3565
3532
  function EntryKitProvider({ config, children }) {
3566
- return /* @__PURE__ */ jsxs26(EntryKitConfigProvider, { config, children: [
3533
+ return /* @__PURE__ */ jsxs27(EntryKitConfigProvider, { config, children: [
3567
3534
  children,
3568
3535
  /* @__PURE__ */ jsx47(AccountModal, {})
3569
3536
  ] });
@@ -3571,21 +3538,21 @@ function EntryKitProvider({ config, children }) {
3571
3538
 
3572
3539
  // src/AccountButton.tsx
3573
3540
  import { useAccount as useAccount9 } from "wagmi";
3574
- import { twMerge as twMerge21 } from "tailwind-merge";
3541
+ import { twMerge as twMerge22 } from "tailwind-merge";
3575
3542
 
3576
3543
  // src/AccountName.tsx
3577
- import { twMerge as twMerge20 } from "tailwind-merge";
3578
- import { Fragment as Fragment9, jsx as jsx48, jsxs as jsxs27 } from "react/jsx-runtime";
3544
+ import { twMerge as twMerge21 } from "tailwind-merge";
3545
+ import { Fragment as Fragment7, jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
3579
3546
  function AccountName({ address }) {
3580
3547
  const { data: ens } = useENS(address);
3581
3548
  const avatar = usePreloadImage(ens?.avatar);
3582
- return /* @__PURE__ */ jsxs27(Fragment9, { children: [
3583
- /* @__PURE__ */ jsxs27("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3549
+ return /* @__PURE__ */ jsxs28(Fragment7, { children: [
3550
+ /* @__PURE__ */ jsxs28("span", { className: "flex-shrink-0 w-6 h-6 -my-1 -mx-0.5 grid place-items-center", children: [
3584
3551
  /* @__PURE__ */ jsx48(
3585
3552
  "img",
3586
3553
  {
3587
3554
  src: ens?.avatar && avatar.isSuccess ? ens.avatar : void 0,
3588
- className: twMerge20(
3555
+ className: twMerge21(
3589
3556
  "col-start-1 row-start-1",
3590
3557
  "inline-flex w-full h-full rounded-full bg-black/10 dark:bg-white/10 bg-cover bg-no-repeat bg-center",
3591
3558
  "transtion duration-300",
@@ -3596,7 +3563,7 @@ function AccountName({ address }) {
3596
3563
  /* @__PURE__ */ jsx48(
3597
3564
  Logo,
3598
3565
  {
3599
- className: twMerge20(
3566
+ className: twMerge21(
3600
3567
  "col-start-1 row-start-1 text-orange-500",
3601
3568
  "transition duration-300",
3602
3569
  ens && (!ens.avatar || avatar.isError) ? "opacity-100" : "opacity-0"
@@ -3609,24 +3576,24 @@ function AccountName({ address }) {
3609
3576
  }
3610
3577
 
3611
3578
  // src/AccountButton.tsx
3612
- import { useRef as useRef6 } from "react";
3613
- import { jsx as jsx49, jsxs as jsxs28 } from "react/jsx-runtime";
3614
- var containerClassNames = twMerge21(
3579
+ import { useRef as useRef7 } from "react";
3580
+ import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
3581
+ var containerClassNames = twMerge22(
3615
3582
  "w-48 p-3 inline-flex outline-none transition",
3616
3583
  "border border-transparent",
3617
3584
  "text-base leading-none"
3618
3585
  );
3619
- var secondaryClassNames = twMerge21(
3586
+ var secondaryClassNames = twMerge22(
3620
3587
  "bg-neutral-100 border-neutral-300 text-black",
3621
3588
  "dark:bg-neutral-800 dark:border-neutral-700 dark:text-white"
3622
3589
  );
3623
- var secondaryInteractiveClassNames = twMerge21(
3590
+ var secondaryInteractiveClassNames = twMerge22(
3624
3591
  "cursor-pointer outline-none hover:bg-neutral-200 data-[highlighted]:bg-neutral-200 dark:hover:bg-neutral-700"
3625
3592
  );
3626
3593
  function AccountButton() {
3627
3594
  const { openAccountModal, accountModalOpen } = useAccountModal();
3628
3595
  const { status, address: userAddress } = useAccount9();
3629
- const initialUserAddress = useRef6(userAddress);
3596
+ const initialUserAddress = useRef7(userAddress);
3630
3597
  const prereqs = usePrerequisites(userAddress);
3631
3598
  const isConnected = status === "connected" || status === "reconnecting" && userAddress;
3632
3599
  const isNewConnection = userAddress !== initialUserAddress.current;
@@ -3642,16 +3609,16 @@ function AccountButton() {
3642
3609
  "button",
3643
3610
  {
3644
3611
  type: "button",
3645
- className: twMerge21(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3612
+ className: twMerge22(containerClassNames, secondaryClassNames, secondaryInteractiveClassNames),
3646
3613
  onClick: openAccountModal,
3647
3614
  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 })
3648
3615
  },
3649
3616
  "connected"
3650
- ) : /* @__PURE__ */ jsxs28(
3617
+ ) : /* @__PURE__ */ jsxs29(
3651
3618
  "button",
3652
3619
  {
3653
3620
  type: "button",
3654
- className: twMerge21(
3621
+ className: twMerge22(
3655
3622
  containerClassNames,
3656
3623
  "group",
3657
3624
  "items-center justify-center gap-2.5",
@@ -3662,11 +3629,11 @@ function AccountButton() {
3662
3629
  "aria-busy": accountModalOpen,
3663
3630
  onClick: openAccountModal,
3664
3631
  children: [
3665
- /* @__PURE__ */ jsxs28("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3632
+ /* @__PURE__ */ jsxs29("span", { className: "pointer-events-none inline-grid place-items-center -ml-3", children: [
3666
3633
  /* @__PURE__ */ jsx49(
3667
3634
  "span",
3668
3635
  {
3669
- className: twMerge21(
3636
+ className: twMerge22(
3670
3637
  "col-start-1 row-start-1 leading-none",
3671
3638
  "scale-100 opacity-100 transition duration-300",
3672
3639
  "group-aria-busy:scale-125 group-aria-busy:opacity-0"
@@ -3678,7 +3645,7 @@ function AccountButton() {
3678
3645
  "span",
3679
3646
  {
3680
3647
  "aria-hidden": true,
3681
- className: twMerge21(
3648
+ className: twMerge22(
3682
3649
  "col-start-1 row-start-1",
3683
3650
  "scale-50 opacity-0 transition duration-300 delay-50",
3684
3651
  "group-aria-busy:scale-100 group-aria-busy:opacity-100"
@@ -3709,44 +3676,379 @@ function useSessionClientReady() {
3709
3676
  }
3710
3677
 
3711
3678
  // src/createWagmiConfig.ts
3712
- import { connectorsForWallets } from "@rainbow-me/rainbowkit";
3713
3679
  import { createConfig } from "wagmi";
3680
+ import { getDefaultConfig } from "connectkit";
3681
+ import { injected, coinbaseWallet, safe } from "wagmi/connectors";
3714
3682
 
3715
- // src/getWallets.ts
3716
- import { getDefaultWallets } from "@rainbow-me/rainbowkit";
3717
- function getWallets(_config) {
3718
- const { wallets: defaultWallets } = getDefaultWallets();
3719
- return [
3720
- // TODO: passkey wallet
3721
- ...defaultWallets
3722
- ];
3683
+ // src/connectors/walletConnect.ts
3684
+ import { ChainNotConfiguredError, ProviderNotFoundError, createConnector } from "wagmi";
3685
+ import {
3686
+ SwitchChainError,
3687
+ UserRejectedRequestError,
3688
+ getAddress,
3689
+ numberToHex as numberToHex3
3690
+ } from "viem";
3691
+ walletConnect.type = "walletConnect";
3692
+ function walletConnect(parameters) {
3693
+ const isNewChainsStale = parameters.isNewChainsStale ?? true;
3694
+ let provider_;
3695
+ let providerPromise;
3696
+ const NAMESPACE = "eip155";
3697
+ let accountsChanged;
3698
+ let chainChanged;
3699
+ let connect;
3700
+ let displayUri;
3701
+ let sessionDelete;
3702
+ let disconnect;
3703
+ return createConnector((config) => ({
3704
+ id: "walletConnect",
3705
+ name: "WalletConnect",
3706
+ type: walletConnect.type,
3707
+ async setup() {
3708
+ const provider = await this.getProvider().catch(() => null);
3709
+ if (!provider) return;
3710
+ if (!connect) {
3711
+ connect = this.onConnect.bind(this);
3712
+ provider.on("connect", connect);
3713
+ }
3714
+ if (!sessionDelete) {
3715
+ sessionDelete = this.onSessionDelete.bind(this);
3716
+ provider.on("session_delete", sessionDelete);
3717
+ }
3718
+ },
3719
+ async connect({ chainId, ...rest } = {}) {
3720
+ try {
3721
+ const provider = await this.getProvider();
3722
+ if (!provider) throw new ProviderNotFoundError();
3723
+ if (!displayUri) {
3724
+ displayUri = this.onDisplayUri;
3725
+ provider.on("display_uri", displayUri);
3726
+ }
3727
+ let targetChainId = chainId;
3728
+ if (!targetChainId) {
3729
+ const state = await config.storage?.getItem("state") ?? {};
3730
+ const isChainSupported = config.chains.some((x) => x.id === state.chainId);
3731
+ if (isChainSupported) targetChainId = state.chainId;
3732
+ else targetChainId = config.chains[0]?.id;
3733
+ }
3734
+ if (!targetChainId) throw new Error("No chains found on connector.");
3735
+ const isChainsStale = await this.isChainsStale();
3736
+ if (provider.session && isChainsStale) await provider.disconnect();
3737
+ if (!provider.session || isChainsStale) {
3738
+ const optionalChains = config.chains.filter((chain) => chain.id !== targetChainId).map((optionalChain) => optionalChain.id);
3739
+ await provider.connect({
3740
+ optionalChains: [targetChainId, ...optionalChains],
3741
+ ..."pairingTopic" in rest ? { pairingTopic: rest.pairingTopic } : {}
3742
+ });
3743
+ this.setRequestedChainsIds(config.chains.map((x) => x.id));
3744
+ }
3745
+ const accounts = (await provider.enable()).map((x) => getAddress(x));
3746
+ let currentChainId = await this.getChainId();
3747
+ if (chainId && currentChainId !== chainId) {
3748
+ const chain = await this.switchChain({ chainId }).catch((error2) => {
3749
+ if (error2.code === UserRejectedRequestError.code) throw error2;
3750
+ return { id: currentChainId };
3751
+ });
3752
+ currentChainId = chain?.id ?? currentChainId;
3753
+ }
3754
+ if (displayUri) {
3755
+ provider.removeListener("display_uri", displayUri);
3756
+ displayUri = void 0;
3757
+ }
3758
+ if (connect) {
3759
+ provider.removeListener("connect", connect);
3760
+ connect = void 0;
3761
+ }
3762
+ if (!accountsChanged) {
3763
+ accountsChanged = this.onAccountsChanged.bind(this);
3764
+ provider.on("accountsChanged", accountsChanged);
3765
+ }
3766
+ if (!chainChanged) {
3767
+ chainChanged = this.onChainChanged.bind(this);
3768
+ provider.on("chainChanged", chainChanged);
3769
+ }
3770
+ if (!disconnect) {
3771
+ disconnect = this.onDisconnect.bind(this);
3772
+ provider.on("disconnect", disconnect);
3773
+ }
3774
+ if (!sessionDelete) {
3775
+ sessionDelete = this.onSessionDelete.bind(this);
3776
+ provider.on("session_delete", sessionDelete);
3777
+ }
3778
+ return { accounts, chainId: currentChainId };
3779
+ } catch (error2) {
3780
+ if (/(user rejected|connection request reset)/i.test(error2?.message)) {
3781
+ throw new UserRejectedRequestError(error2);
3782
+ }
3783
+ throw error2;
3784
+ }
3785
+ },
3786
+ async disconnect() {
3787
+ const provider = await this.getProvider();
3788
+ try {
3789
+ await provider?.disconnect();
3790
+ } catch (error2) {
3791
+ if (!/No matching key/i.test(error2.message)) throw error2;
3792
+ } finally {
3793
+ if (chainChanged) {
3794
+ provider?.removeListener("chainChanged", chainChanged);
3795
+ chainChanged = void 0;
3796
+ }
3797
+ if (disconnect) {
3798
+ provider?.removeListener("disconnect", disconnect);
3799
+ disconnect = void 0;
3800
+ }
3801
+ if (!connect) {
3802
+ connect = this.onConnect.bind(this);
3803
+ provider?.on("connect", connect);
3804
+ }
3805
+ if (accountsChanged) {
3806
+ provider?.removeListener("accountsChanged", accountsChanged);
3807
+ accountsChanged = void 0;
3808
+ }
3809
+ if (sessionDelete) {
3810
+ provider?.removeListener("session_delete", sessionDelete);
3811
+ sessionDelete = void 0;
3812
+ }
3813
+ this.setRequestedChainsIds([]);
3814
+ }
3815
+ },
3816
+ async getAccounts() {
3817
+ const provider = await this.getProvider();
3818
+ return provider.accounts.map((x) => getAddress(x));
3819
+ },
3820
+ async getProvider() {
3821
+ async function initProvider() {
3822
+ const optionalChains = config.chains.map((x) => x.id);
3823
+ if (!optionalChains.length) return;
3824
+ const { EthereumProvider } = await import("@walletconnect/ethereum-provider");
3825
+ return await EthereumProvider.init({
3826
+ ...parameters,
3827
+ disableProviderPing: true,
3828
+ optionalChains,
3829
+ projectId: parameters.projectId,
3830
+ rpcMap: Object.fromEntries(
3831
+ config.chains.map((chain) => {
3832
+ const [url] = extractRpcUrls({
3833
+ chain,
3834
+ transports: config.transports
3835
+ });
3836
+ return [chain.id, url];
3837
+ })
3838
+ ),
3839
+ showQrModal: parameters.showQrModal ?? true
3840
+ });
3841
+ }
3842
+ if (!provider_) {
3843
+ if (!providerPromise) providerPromise = initProvider();
3844
+ provider_ = await providerPromise;
3845
+ provider_?.events.setMaxListeners(Number.POSITIVE_INFINITY);
3846
+ }
3847
+ return provider_;
3848
+ },
3849
+ async getChainId() {
3850
+ const provider = await this.getProvider();
3851
+ return provider.chainId;
3852
+ },
3853
+ async isAuthorized() {
3854
+ try {
3855
+ const [accounts, provider] = await Promise.all([this.getAccounts(), this.getProvider()]);
3856
+ if (!accounts.length) return false;
3857
+ const isChainsStale = await this.isChainsStale();
3858
+ if (isChainsStale && provider.session) {
3859
+ await provider.disconnect().catch(() => {
3860
+ });
3861
+ return false;
3862
+ }
3863
+ return true;
3864
+ } catch {
3865
+ return false;
3866
+ }
3867
+ },
3868
+ async switchChain({ addEthereumChainParameter, chainId }) {
3869
+ const provider = await this.getProvider();
3870
+ if (!provider) throw new ProviderNotFoundError();
3871
+ const chain = config.chains.find((x) => x.id === chainId);
3872
+ if (!chain) throw new SwitchChainError(new ChainNotConfiguredError());
3873
+ try {
3874
+ await Promise.all([
3875
+ new Promise((resolve) => {
3876
+ const listener2 = ({ chainId: currentChainId }) => {
3877
+ if (currentChainId === chainId) {
3878
+ config.emitter.off("change", listener2);
3879
+ resolve();
3880
+ }
3881
+ };
3882
+ config.emitter.on("change", listener2);
3883
+ }),
3884
+ provider.request({
3885
+ method: "wallet_switchEthereumChain",
3886
+ params: [{ chainId: numberToHex3(chainId) }]
3887
+ })
3888
+ ]);
3889
+ const requestedChains = await this.getRequestedChainsIds();
3890
+ this.setRequestedChainsIds([...requestedChains, chainId]);
3891
+ return chain;
3892
+ } catch (err) {
3893
+ const error2 = err;
3894
+ if (/(user rejected)/i.test(error2.message)) throw new UserRejectedRequestError(error2);
3895
+ try {
3896
+ let blockExplorerUrls;
3897
+ if (addEthereumChainParameter?.blockExplorerUrls)
3898
+ blockExplorerUrls = addEthereumChainParameter.blockExplorerUrls;
3899
+ else blockExplorerUrls = chain.blockExplorers?.default.url ? [chain.blockExplorers?.default.url] : [];
3900
+ let rpcUrls;
3901
+ if (addEthereumChainParameter?.rpcUrls?.length) rpcUrls = addEthereumChainParameter.rpcUrls;
3902
+ else rpcUrls = [...chain.rpcUrls.default.http];
3903
+ const addEthereumChain = {
3904
+ blockExplorerUrls,
3905
+ chainId: numberToHex3(chainId),
3906
+ chainName: addEthereumChainParameter?.chainName ?? chain.name,
3907
+ iconUrls: addEthereumChainParameter?.iconUrls,
3908
+ nativeCurrency: addEthereumChainParameter?.nativeCurrency ?? chain.nativeCurrency,
3909
+ rpcUrls
3910
+ };
3911
+ await provider.request({
3912
+ method: "wallet_addEthereumChain",
3913
+ params: [addEthereumChain]
3914
+ });
3915
+ const requestedChains = await this.getRequestedChainsIds();
3916
+ this.setRequestedChainsIds([...requestedChains, chainId]);
3917
+ return chain;
3918
+ } catch (error3) {
3919
+ throw new UserRejectedRequestError(error3);
3920
+ }
3921
+ }
3922
+ },
3923
+ onAccountsChanged(accounts) {
3924
+ if (accounts.length === 0) this.onDisconnect();
3925
+ else
3926
+ config.emitter.emit("change", {
3927
+ accounts: accounts.map((x) => getAddress(x))
3928
+ });
3929
+ },
3930
+ onChainChanged(chain) {
3931
+ const chainId = Number(chain);
3932
+ config.emitter.emit("change", { chainId });
3933
+ },
3934
+ async onConnect(connectInfo) {
3935
+ const chainId = Number(connectInfo.chainId);
3936
+ const accounts = await this.getAccounts();
3937
+ config.emitter.emit("connect", { accounts, chainId });
3938
+ },
3939
+ async onDisconnect(_error) {
3940
+ this.setRequestedChainsIds([]);
3941
+ config.emitter.emit("disconnect");
3942
+ const provider = await this.getProvider();
3943
+ if (accountsChanged) {
3944
+ provider.removeListener("accountsChanged", accountsChanged);
3945
+ accountsChanged = void 0;
3946
+ }
3947
+ if (chainChanged) {
3948
+ provider.removeListener("chainChanged", chainChanged);
3949
+ chainChanged = void 0;
3950
+ }
3951
+ if (disconnect) {
3952
+ provider.removeListener("disconnect", disconnect);
3953
+ disconnect = void 0;
3954
+ }
3955
+ if (sessionDelete) {
3956
+ provider.removeListener("session_delete", sessionDelete);
3957
+ sessionDelete = void 0;
3958
+ }
3959
+ if (!connect) {
3960
+ connect = this.onConnect.bind(this);
3961
+ provider.on("connect", connect);
3962
+ }
3963
+ },
3964
+ onDisplayUri(uri) {
3965
+ config.emitter.emit("message", { type: "display_uri", data: uri });
3966
+ },
3967
+ onSessionDelete() {
3968
+ this.onDisconnect();
3969
+ },
3970
+ getNamespaceChainsIds() {
3971
+ if (!provider_) return [];
3972
+ const chainIds = provider_.session?.namespaces[NAMESPACE]?.accounts?.map(
3973
+ (account) => Number.parseInt(account.split(":")[1] || "")
3974
+ );
3975
+ return chainIds ?? [];
3976
+ },
3977
+ async getRequestedChainsIds() {
3978
+ return await config.storage?.getItem(this.requestedChainsStorageKey) ?? [];
3979
+ },
3980
+ /**
3981
+ * Checks if the target chains match the chains that were
3982
+ * initially requested by the connector for the WalletConnect session.
3983
+ * If there is a mismatch, this means that the chains on the connector
3984
+ * are considered stale, and need to be revalidated at a later point (via
3985
+ * connection).
3986
+ *
3987
+ * There may be a scenario where a dapp adds a chain to the
3988
+ * connector later on, however, this chain will not have been approved or rejected
3989
+ * by the wallet. In this case, the chain is considered stale.
3990
+ */
3991
+ async isChainsStale() {
3992
+ if (!isNewChainsStale) return false;
3993
+ const connectorChains = config.chains.map((x) => x.id);
3994
+ const namespaceChains = this.getNamespaceChainsIds();
3995
+ if (namespaceChains.length && !namespaceChains.some((id) => connectorChains.includes(id))) return false;
3996
+ const requestedChains = await this.getRequestedChainsIds();
3997
+ return !connectorChains.every((id) => requestedChains.includes(id));
3998
+ },
3999
+ async setRequestedChainsIds(chains) {
4000
+ await config.storage?.setItem(this.requestedChainsStorageKey, chains);
4001
+ },
4002
+ get requestedChainsStorageKey() {
4003
+ return `${this.id}.requestedChains`;
4004
+ }
4005
+ }));
4006
+ }
4007
+ function extractRpcUrls(parameters) {
4008
+ const { chain } = parameters;
4009
+ const fallbackUrl = chain.rpcUrls.default.http[0];
4010
+ if (!parameters.transports) return [fallbackUrl];
4011
+ const transport = parameters.transports?.[chain.id]?.({ chain });
4012
+ const transports = transport?.value?.transports || [transport];
4013
+ return transports.map(({ value }) => value?.url || fallbackUrl);
3723
4014
  }
3724
4015
 
3725
4016
  // src/createWagmiConfig.ts
3726
4017
  function createWagmiConfig(config) {
3727
- const wallets = getWallets(config);
3728
- const connectors = connectorsForWallets(wallets, {
3729
- appName: config.appName,
3730
- projectId: config.walletConnectProjectId
3731
- });
3732
- return createConfig({
3733
- connectors,
4018
+ const connectors = [];
4019
+ const shouldUseSafeConnector = !(typeof window === "undefined") && window?.parent !== window;
4020
+ if (shouldUseSafeConnector) {
4021
+ connectors.push(
4022
+ safe({
4023
+ allowedDomains: [/gnosis-safe.io$/, /app.safe.global$/]
4024
+ })
4025
+ );
4026
+ }
4027
+ connectors.push(
4028
+ injected({ target: "metaMask" }),
4029
+ coinbaseWallet({
4030
+ appName: config.appName,
4031
+ overrideIsMetaMask: false
4032
+ })
4033
+ );
4034
+ if (config.walletConnectProjectId) {
4035
+ connectors.push(
4036
+ walletConnect({
4037
+ showQrModal: false,
4038
+ projectId: config.walletConnectProjectId
4039
+ })
4040
+ );
4041
+ }
4042
+ const configParams = getDefaultConfig({
3734
4043
  chains: config.chains,
3735
4044
  transports: config.transports,
3736
- pollingInterval: config.pollingInterval
3737
- });
3738
- }
3739
-
3740
- // src/getConnectors.ts
3741
- import { connectorsForWallets as connectorsForWallets2 } from "@rainbow-me/rainbowkit";
3742
- function getConnectors({
3743
- wallets,
3744
- ...config
3745
- }) {
3746
- return connectorsForWallets2(wallets ?? getWallets(config), {
4045
+ pollingInterval: config.pollingInterval,
3747
4046
  appName: config.appName,
3748
- projectId: config.walletConnectProjectId
4047
+ walletConnectProjectId: config.walletConnectProjectId,
4048
+ enableFamily: false,
4049
+ connectors
3749
4050
  });
4051
+ return createConfig(configParams);
3750
4052
  }
3751
4053
 
3752
4054
  // src/validateSigner.ts
@@ -3797,8 +4099,6 @@ export {
3797
4099
  EntryKitProvider,
3798
4100
  createWagmiConfig,
3799
4101
  defineConfig,
3800
- getConnectors,
3801
- getWallets,
3802
4102
  internal_validateSigner,
3803
4103
  useAccountModal,
3804
4104
  useEntryKitConfig,