diff --git a/package.json b/package.json index 055d13f2c..18ce647e4 100644 --- a/package.json +++ b/package.json @@ -6,8 +6,8 @@ ], "type": "module", "scripts": { - "build": "cp README.md packages/react-grab/README.md && turbo run build --filter=react-grab --filter=@react-grab/cursor --filter=@react-grab/claude-code --filter=@react-grab/ami --filter=@react-grab/opencode --filter=@react-grab/codex --filter=@react-grab/gemini --filter=@react-grab/amp --filter=@react-grab/droid --filter=@react-grab/copilot --filter=@react-grab/cli --filter=@react-grab/utils && pnpm --filter grab build", - "dev": "turbo dev --filter=react-grab --filter=@react-grab/cursor --filter=@react-grab/claude-code --filter=@react-grab/ami --filter=@react-grab/opencode --filter=@react-grab/codex --filter=@react-grab/gemini --filter=@react-grab/amp --filter=@react-grab/droid --filter=@react-grab/copilot --filter=@react-grab/cli --filter=@react-grab/utils", + "build": "cp README.md packages/react-grab/README.md && turbo run build --filter=react-grab --filter=@react-grab/paper --filter=@react-grab/cursor --filter=@react-grab/claude-code --filter=@react-grab/ami --filter=@react-grab/opencode --filter=@react-grab/codex --filter=@react-grab/gemini --filter=@react-grab/amp --filter=@react-grab/droid --filter=@react-grab/copilot --filter=@react-grab/cli --filter=@react-grab/utils && pnpm --filter grab build", + "dev": "turbo dev --filter=react-grab --filter=@react-grab/paper --filter=@react-grab/cursor --filter=@react-grab/claude-code --filter=@react-grab/ami --filter=@react-grab/opencode --filter=@react-grab/codex --filter=@react-grab/gemini --filter=@react-grab/amp --filter=@react-grab/droid --filter=@react-grab/copilot --filter=@react-grab/cli --filter=@react-grab/utils", "test": "turbo run test --filter=react-grab --filter=@react-grab/cli", "typecheck": "pnpm --filter react-grab typecheck", "lint": "pnpm --filter react-grab lint", diff --git a/packages/paper/package.json b/packages/paper/package.json new file mode 100644 index 000000000..da40aecd3 --- /dev/null +++ b/packages/paper/package.json @@ -0,0 +1,23 @@ +{ + "name": "@react-grab/paper", + "version": "0.0.1", + "private": true, + "type": "module", + "files": [ + "dist" + ], + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs" + } + }, + "scripts": { + "dev": "tsup --watch", + "build": "tsup" + }, + "devDependencies": { + "tsup": "^8.4.0" + } +} diff --git a/packages/paper/paper-clipboard-text-html-content.html b/packages/paper/paper-clipboard-text-html-content.html new file mode 100644 index 000000000..903459be2 --- /dev/null +++ b/packages/paper/paper-clipboard-text-html-content.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/paper/src/constants.ts b/packages/paper/src/constants.ts new file mode 100644 index 000000000..c70e2a1b4 --- /dev/null +++ b/packages/paper/src/constants.ts @@ -0,0 +1,57 @@ +export const SKIPPED_TAGS = new Set([ + "SCRIPT", + "STYLE", + "NOSCRIPT", + "TEMPLATE", + "LINK", + "META", + "HEAD", + "IFRAME", + "OBJECT", + "EMBED", +]); + +export const TAG_LABELS: Record = { + H1: "Heading 1", + H2: "Heading 2", + H3: "Heading 3", + H4: "Heading 4", + H5: "Heading 5", + H6: "Heading 6", + P: "Paragraph", + BUTTON: "Button", + A: "Link", + IMG: "Image", + NAV: "Navigation", + HEADER: "Header", + FOOTER: "Footer", + MAIN: "Main", + SECTION: "Section", + ARTICLE: "Article", + ASIDE: "Aside", + UL: "List", + OL: "List", + LI: "List Item", + FORM: "Form", + INPUT: "Input", + TEXTAREA: "Textarea", + SELECT: "Select", + TABLE: "Table", + VIDEO: "Video", + FIGURE: "Figure", + FIGCAPTION: "Caption", + BLOCKQUOTE: "Quote", +}; + +export const INLINE_DISPLAY_VALUES = new Set([ + "inline", + "inline-block", + "inline-flex", +]); + +export const SHORT_TEXT_THRESHOLD_CHARS = 60; +export const DEFAULT_MAX_DEPTH = 50; +export const UNIQUE_ID_LENGTH = 26; + +export const UTILITY_CLASS_PATTERN = + /^(flex|grid|p[xytrbl]?-|m[xytrbl]?-|w-|h-|bg-|text-|border-|rounded|shadow|opacity-|gap-|space-|font-|leading-|tracking-|overflow-|z-|relative|absolute|fixed|sticky|hidden|block|inline|sr-only|col-|row-|items-|justify-|self-|order-|grow|shrink|basis-)/; diff --git a/packages/paper/src/dom-to-paper.ts b/packages/paper/src/dom-to-paper.ts new file mode 100644 index 000000000..6de5b0b49 --- /dev/null +++ b/packages/paper/src/dom-to-paper.ts @@ -0,0 +1,1105 @@ +import { + SKIPPED_TAGS, + TAG_LABELS, + INLINE_DISPLAY_VALUES, + UTILITY_CLASS_PATTERN, + SHORT_TEXT_THRESHOLD_CHARS, + DEFAULT_MAX_DEPTH, + UNIQUE_ID_LENGTH, +} from "./constants"; + +interface OklchValue { + mode: "oklch"; + l: number; + c: number; + h: number; + alpha?: number; +} + +interface PaperColor { + gamut: string; + mode: string; + value: OklchValue; +} + +interface PaperSolidFill { + type: "solid"; + color: PaperColor; + isVisible: boolean; +} + +interface PaperGradientStop { + position: number; + color: PaperColor; + midpoint: number; +} + +interface PaperGradientFill { + type: "gradient"; + stops: PaperGradientStop[]; + interpolation: string; + shape: string; + angle: number; + length: number; + isVisible: boolean; + center: { x: number; y: number }; +} + +type PaperFill = PaperSolidFill | PaperGradientFill; + +interface PaperBorder { + type: "color"; + color: PaperColor; + width: string; + style: string; + isVisible: boolean; +} + +interface PaperShadow { + color: PaperColor; + offsetX: string; + offsetY: string; + blur: string; + spread: string; + isVisible: boolean; +} + +interface PaperFont { + family: string; + style: string; + weight: number; + isItalic: boolean; +} + +interface PaperStyleMeta { + fill?: PaperFill[]; + borders?: Record; + outerShadow?: PaperShadow[]; + font?: PaperFont; +} + +interface PaperNode { + id: string; + label: string; + textValue: string; + component: "Frame" | "Text" | "Rectangle" | "SVG" | "SVGVisualElement"; + styles: Record; + "~": false; + labelIsModified?: boolean; + tag?: string; + styleMeta?: PaperStyleMeta; + props?: Record; + tempX?: number; + tempY?: number; +} + +interface PaperEmbedData { + id: string; + fileId: string; + topLevelNodeIds: string[]; + nodes: Record; + images: Record; + parentToChildrenIndex: Record; + oldIdToNewIdMap: Record; +} + +interface DomToPaperOptions { + maxDepth?: number; + getComponentName?: (element: Element) => string | null; +} + +// --------------------------------------------------------------------------- +// Color parsing — handles rgb, hex, lab, oklab, oklch, color(srgb) +// --------------------------------------------------------------------------- + +// HACK: Modern Chromium returns computed colors in lab()/oklch()/oklab() +// formats when the CSS source uses them. We parse all formats directly. + +interface ParsedColor { + red: number; + green: number; + blue: number; + alpha: number; +} + +const clamp01 = (value: number): number => Math.max(0, Math.min(1, value)); + +const delinearize = (channel: number): number => + channel <= 0.0031308 + ? 12.92 * channel + : 1.055 * Math.pow(channel, 1 / 2.4) - 0.055; + +const linearize = (channel: number): number => + channel <= 0.04045 + ? channel / 12.92 + : Math.pow((channel + 0.055) / 1.055, 2.4); + +const oklabToSrgb = ( + oklabL: number, + oklabA: number, + oklabB: number, +): { red: number; green: number; blue: number } => { + const lPrime = oklabL + 0.3963377774 * oklabA + 0.2158037573 * oklabB; + const mPrime = oklabL - 0.1055613458 * oklabA - 0.0638541728 * oklabB; + const sPrime = oklabL - 0.0894841775 * oklabA - 1.291485548 * oklabB; + + const lmsL = lPrime * lPrime * lPrime; + const lmsM = mPrime * mPrime * mPrime; + const lmsS = sPrime * sPrime * sPrime; + + return { + red: clamp01(delinearize(4.0767416621 * lmsL - 3.3077115913 * lmsM + 0.2309699292 * lmsS)), + green: clamp01(delinearize(-1.2684380046 * lmsL + 2.6097574011 * lmsM - 0.3413193965 * lmsS)), + blue: clamp01(delinearize(-0.0041960863 * lmsL - 0.7034186147 * lmsM + 1.707614701 * lmsS)), + }; +}; + +const cieLabToSrgb = ( + labL: number, + labA: number, + labB: number, +): { red: number; green: number; blue: number } => { + const fy = (labL + 16) / 116; + const fx = labA / 500 + fy; + const fz = fy - labB / 200; + + const EPSILON = 6 / 29; + const inverseFn = (fValue: number): number => + fValue > EPSILON + ? fValue * fValue * fValue + : 3 * EPSILON * EPSILON * (fValue - 4 / 29); + + const xyzX = 0.95047 * inverseFn(fx); + const xyzY = 1.0 * inverseFn(fy); + const xyzZ = 1.08883 * inverseFn(fz); + + return { + red: clamp01(delinearize(3.2404542 * xyzX - 1.5371385 * xyzY - 0.4985314 * xyzZ)), + green: clamp01(delinearize(-0.969266 * xyzX + 1.8760108 * xyzY + 0.041556 * xyzZ)), + blue: clamp01(delinearize(0.0556434 * xyzX - 0.2040259 * xyzY + 1.0572252 * xyzZ)), + }; +}; + +const parseAlpha = (raw: string | undefined): number => + raw !== undefined ? parseFloat(raw) : 1; + +const parseRgbColor = (cssColor: string): ParsedColor | null => { + const rgbMatch = cssColor.match( + /rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)/, + ); + if (rgbMatch) { + return { + red: parseFloat(rgbMatch[1]) / 255, + green: parseFloat(rgbMatch[2]) / 255, + blue: parseFloat(rgbMatch[3]) / 255, + alpha: parseAlpha(rgbMatch[4]), + }; + } + + const hexMatch = cssColor.match( + /^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i, + ); + if (hexMatch) { + return { + red: parseInt(hexMatch[1], 16) / 255, + green: parseInt(hexMatch[2], 16) / 255, + blue: parseInt(hexMatch[3], 16) / 255, + alpha: hexMatch[4] !== undefined ? parseInt(hexMatch[4], 16) / 255 : 1, + }; + } + + const oklabMatch = cssColor.match( + /oklab\(\s*([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/, + ); + if (oklabMatch) { + return { + ...oklabToSrgb(parseFloat(oklabMatch[1]), parseFloat(oklabMatch[2]), parseFloat(oklabMatch[3])), + alpha: parseAlpha(oklabMatch[4]), + }; + } + + const oklchMatch = cssColor.match( + /oklch\(\s*([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/, + ); + if (oklchMatch) { + const hueRad = (parseFloat(oklchMatch[3]) * Math.PI) / 180; + const chroma = parseFloat(oklchMatch[2]); + return { + ...oklabToSrgb(parseFloat(oklchMatch[1]), chroma * Math.cos(hueRad), chroma * Math.sin(hueRad)), + alpha: parseAlpha(oklchMatch[4]), + }; + } + + // HACK: must come AFTER oklab/oklch — "lab(" substring matches inside "oklab(" + const labMatch = cssColor.match( + /^lab\(\s*([\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/, + ); + if (labMatch) { + return { + ...cieLabToSrgb(parseFloat(labMatch[1]), parseFloat(labMatch[2]), parseFloat(labMatch[3])), + alpha: parseAlpha(labMatch[4]), + }; + } + + const colorSrgbMatch = cssColor.match( + /color\(\s*srgb\s+([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/, + ); + if (colorSrgbMatch) { + return { + red: clamp01(parseFloat(colorSrgbMatch[1])), + green: clamp01(parseFloat(colorSrgbMatch[2])), + blue: clamp01(parseFloat(colorSrgbMatch[3])), + alpha: parseAlpha(colorSrgbMatch[4]), + }; + } + + return null; +}; + +const channelToHex = (value: number): string => + Math.round(value * 255).toString(16).padStart(2, "0"); + +const cssColorToHex = (cssColor: string): string => { + const parsed = parseRgbColor(cssColor); + if (!parsed) return cssColor; + const hex = `#${channelToHex(parsed.red)}${channelToHex(parsed.green)}${channelToHex(parsed.blue)}`; + return parsed.alpha < 1 ? `${hex}${channelToHex(parsed.alpha)}` : hex; +}; + +const srgbToOklch = ( + red: number, + green: number, + blue: number, +): { lightness: number; chroma: number; hue: number } => { + const linearRed = linearize(red); + const linearGreen = linearize(green); + const linearBlue = linearize(blue); + + const cubeRootL = Math.cbrt(0.4122214708 * linearRed + 0.5363325363 * linearGreen + 0.0514459929 * linearBlue); + const cubeRootM = Math.cbrt(0.2119034982 * linearRed + 0.6806995451 * linearGreen + 0.1073969566 * linearBlue); + const cubeRootS = Math.cbrt(0.0883024619 * linearRed + 0.2817188376 * linearGreen + 0.6299787005 * linearBlue); + + const oklabL = 0.2104542553 * cubeRootL + 0.793617785 * cubeRootM - 0.0040720468 * cubeRootS; + const oklabA = 1.9779984951 * cubeRootL - 2.428592205 * cubeRootM + 0.4505937099 * cubeRootS; + const oklabB = 0.0259040371 * cubeRootL + 0.7827717662 * cubeRootM - 0.808675766 * cubeRootS; + + const chroma = Math.sqrt(oklabA * oklabA + oklabB * oklabB); + let hue = Math.atan2(oklabB, oklabA) * (180 / Math.PI); + if (hue < 0) hue += 360; + + return { lightness: oklabL, chroma, hue }; +}; + +const cssColorToPaper = (cssColor: string): PaperColor | null => { + const parsed = parseRgbColor(cssColor); + if (!parsed) return null; + const oklch = srgbToOklch(parsed.red, parsed.green, parsed.blue); + const value: OklchValue = { mode: "oklch", l: oklch.lightness, c: oklch.chroma, h: oklch.hue }; + if (parsed.alpha !== 1) value.alpha = parsed.alpha; + return { gamut: "rgb", mode: "hex", value }; +}; + +const isTransparentColor = (cssColor: string): boolean => { + if (cssColor === "transparent") return true; + const parsed = parseRgbColor(cssColor); + return parsed !== null && parsed.alpha === 0; +}; + +// --------------------------------------------------------------------------- +// Gradient, font, shadow parsing +// --------------------------------------------------------------------------- + +const DIRECTION_TO_ANGLE: Record = { + "to top": 0, "to right": 90, "to bottom": 180, "to left": 270, + "to top right": 45, "to bottom right": 135, + "to bottom left": 225, "to top left": 315, +}; + +const parseLinearGradient = (cssValue: string): PaperGradientFill | null => { + const gradientMatch = cssValue.match(/^linear-gradient\((.+)\)$/); + if (!gradientMatch) return null; + const body = gradientMatch[1]; + + let angle = 180; + let colorPart = body; + + const degreeMatch = body.match(/^([\d.]+)deg\s*,\s*/); + if (degreeMatch) { + angle = parseFloat(degreeMatch[1]); + colorPart = body.slice(degreeMatch[0].length); + } else { + for (const [direction, directionAngle] of Object.entries(DIRECTION_TO_ANGLE)) { + if (body.startsWith(direction + ",") || body.startsWith(direction + " ")) { + angle = directionAngle; + colorPart = body.slice(direction.length + 1).trim(); + break; + } + } + } + + const stops: PaperGradientStop[] = []; + const stopRegex = /(rgba?\([^)]+\))\s*([\d.]+%)?/g; + let stopMatch; + while ((stopMatch = stopRegex.exec(colorPart))) { + const color = cssColorToPaper(stopMatch[1]); + if (!color) continue; + stops.push({ position: stopMatch[2] ? parseFloat(stopMatch[2]) / 100 : -1, color, midpoint: 0.5 }); + } + + if (stops.length < 2) return null; + + if (stops.some((stop) => stop.position < 0)) { + stops.forEach((stop, stopIndex) => { + if (stop.position < 0) stop.position = stopIndex / (stops.length - 1); + }); + } + + return { + type: "gradient", stops, interpolation: "oklab", shape: "linear", + angle, length: 1, isVisible: true, center: { x: 0.5, y: 0.5 }, + }; +}; + +const MONOSPACE_INDICATORS = [ + "monospace", "courier", "menlo", "monaco", "consolas", + "fira code", "jetbrains", "source code", "ui-monospace", +]; + +const detectPaperFontFamily = (cssFontFamily: string): string => { + const lowerFont = cssFontFamily.toLowerCase(); + for (const indicator of MONOSPACE_INDICATORS) { + if (lowerFont.includes(indicator)) return "System Monospace"; + } + return "System Sans-Serif"; +}; + +const detectFontStyleName = (weight: number): string => { + if (weight >= 700) return "Bold"; + if (weight >= 500) return "Medium"; + if (weight >= 300) return "Regular"; + return "Light"; +}; + +const parseBoxShadows = (boxShadow: string): PaperShadow[] => { + if (boxShadow === "none") return []; + const shadows: PaperShadow[] = []; + + for (const rawShadow of boxShadow.split(/,(?![^(]*\))/)) { + const trimmed = rawShadow.trim(); + if (trimmed.startsWith("inset")) continue; + const match = trimmed.match( + /(rgba?\([^)]+\))\s+([-\d.]+px)\s+([-\d.]+px)\s+([-\d.]+px)(?:\s+([-\d.]+px))?/, + ); + if (!match) continue; + const shadowColor = cssColorToPaper(match[1]); + if (!shadowColor) continue; + shadows.push({ + color: shadowColor, + offsetX: match[2], offsetY: match[3], blur: match[4], + spread: match[5] ?? "0px", isVisible: true, + }); + } + + return shadows; +}; + +// --------------------------------------------------------------------------- +// Helpers +// --------------------------------------------------------------------------- + +const formatDimension = (cssValue: string): string | number => { + if (cssValue === "auto") return "fit-content"; + const pixelValue = parseFloat(cssValue); + if (isNaN(pixelValue)) return cssValue; + if (pixelValue === 0) return 0; + return cssValue; +}; + +const normalizeFlexValue = (rawValue: string): string => { + if (rawValue === "normal" || rawValue === "flex-start") return "start"; + if (rawValue === "flex-end") return "end"; + return rawValue; +}; + +const resolveBackgroundColor = (element: Element): string => { + let current: Element | null = element; + while (current) { + const backgroundColor = getComputedStyle(current).backgroundColor; + if (!isTransparentColor(backgroundColor)) return backgroundColor; + current = current.parentElement; + } + return "rgb(255, 255, 255)"; +}; + +const hasVisibleBoxDecoration = (element: Element): boolean => { + const computed = getComputedStyle(element); + return ( + !isTransparentColor(computed.backgroundColor) || + parseFloat(computed.borderTopWidth) > 0 || + parseFloat(computed.paddingTop) > 0 || + parseFloat(computed.paddingLeft) > 0 || + computed.backgroundImage !== "none" + ); +}; + +const formatLayerName = (raw: string): string => + raw + .replace(/[-_]/g, " ") + .replace(/([a-z])([A-Z])/g, "$1 $2") + .split(" ") + .map((word) => word.charAt(0).toUpperCase() + word.slice(1)) + .join(" ") + .trim() + .slice(0, 50); + +const getLayerName = (element: Element): string | null => { + if (element.id) return formatLayerName(element.id); + const ariaLabel = element.getAttribute("aria-label"); + if (ariaLabel) return ariaLabel.slice(0, 50); + const tagLabel = TAG_LABELS[element.tagName]; + if (tagLabel) return tagLabel; + const meaningfulClass = Array.from(element.classList).find( + (className) => className.length > 3 && !UTILITY_CLASS_PATTERN.test(className), + ); + if (meaningfulClass) return formatLayerName(meaningfulClass); + return null; +}; + +const CROCKFORD_BASE32 = "0123456789ABCDEFGHJKMNPQRSTVWXYZ"; + +const generateUniqueId = (): string => { + let generated = ""; + for (let index = 0; index < UNIQUE_ID_LENGTH; index++) { + generated += CROCKFORD_BASE32[Math.floor(Math.random() * CROCKFORD_BASE32.length)]; + } + return generated; +}; + +const BORDER_SIDES = ["Top", "Right", "Bottom", "Left"] as const; +const REPLACED_ELEMENT_TAGS = new Set(["img", "svg", "canvas", "video", "iframe"]); + +const SVG_VISUAL_TAGS = new Set([ + "path", "circle", "ellipse", "rect", "line", "polyline", "polygon", "use", +]); + +const BLOCK_DESCENDANT_SELECTOR = + "div, p, section, article, header, footer, main, nav, ul, ol, li, " + + "h1, h2, h3, h4, h5, h6, pre, blockquote, table, form, details, " + + "figure, button, input, select, textarea"; + +const isElementVisible = (computed: CSSStyleDeclaration): boolean => + computed.display !== "none" && + !(computed.visibility === "hidden" && computed.overflow === "hidden"); + +const extractFills = ( + computed: CSSStyleDeclaration, + domElement: Element, + isRootElement: boolean, +): PaperFill[] => { + const fills: PaperFill[] = []; + + const resolvedBackground = isRootElement + ? resolveBackgroundColor(domElement) + : computed.backgroundColor; + + if (!isTransparentColor(resolvedBackground)) { + const bgColor = cssColorToPaper(resolvedBackground); + if (bgColor) fills.push({ type: "solid", color: bgColor, isVisible: true }); + } + + const backgroundImage = computed.backgroundImage; + if (backgroundImage && backgroundImage !== "none") { + for (const segment of backgroundImage.split(/,(?![^(]*\))/)) { + const trimmed = segment.trim(); + if (trimmed.startsWith("linear-gradient")) { + const gradientFill = parseLinearGradient(trimmed); + if (gradientFill) fills.push(gradientFill); + } + } + } + + return fills; +}; + +// --------------------------------------------------------------------------- +// Main converter +// --------------------------------------------------------------------------- + +export const domToPaper = ( + rootElementOrElements: Node | Node[], + options: DomToPaperOptions = {}, +): string => { + const rootElements = Array.isArray(rootElementOrElements) + ? rootElementOrElements.filter((node): node is Element => node instanceof Element) + : rootElementOrElements instanceof Element + ? [rootElementOrElements] + : []; + if (rootElements.length === 0) return ""; + + const maxDepth = options.maxDepth ?? DEFAULT_MAX_DEPTH; + const getComponentName = options.getComponentName; + + let nodeSequenceCounter = 0; + const nodes: Record = {}; + const parentToChildrenIndex: Record = {}; + + const allocateNodeId = (): string => { + nodeSequenceCounter++; + return `${nodeSequenceCounter.toString(36).toUpperCase()}-0`; + }; + + const resolveLabel = (domElement: Element, fallback: string): { label: string; labelIsModified: boolean } => { + const customLabel = getComponentName?.(domElement) ?? getLayerName(domElement); + return { label: customLabel ?? fallback, labelIsModified: Boolean(customLabel) }; + }; + + const createTextNode = (textContent: string, contextElement: Element): string => { + const textNodeId = allocateNodeId(); + const computed = getComputedStyle(contextElement); + const styleMeta: PaperStyleMeta = {}; + + const colorHex = cssColorToHex(computed.color); + const textColor = cssColorToPaper(computed.color); + if (textColor) { + styleMeta.fill = [{ type: "solid", color: textColor, isVisible: true }]; + } + + const fontWeight = parseInt(computed.fontWeight) || 400; + const paperFontFamily = detectPaperFontFamily(computed.fontFamily); + styleMeta.font = { + family: paperFontFamily, + style: detectFontStyleName(fontWeight), + weight: fontWeight, + isItalic: computed.fontStyle === "italic", + }; + + const fontSizePx = parseFloat(computed.fontSize) || 16; + const rawLetterSpacing = parseFloat(computed.letterSpacing); + const lineHeightPx = parseFloat(computed.lineHeight); + + const shouldPreventWrap = + computed.whiteSpace === "nowrap" || + computed.whiteSpace === "pre" || + textContent.length < SHORT_TEXT_THRESHOLD_CHARS; + + const parentRect = contextElement.getBoundingClientRect(); + + const textStyles: Record = { + color: colorHex, + fontFamily: paperFontFamily, + fontSize: `${fontSizePx}px`, + fontWeight: `${fontWeight}`, + lineHeight: isNaN(lineHeightPx) ? "150%" : `${Math.round((lineHeightPx / fontSizePx) * 100)}%`, + whiteSpace: shouldPreventWrap ? "pre" : "pre-wrap", + width: shouldPreventWrap || parentRect.width <= 0 ? "fit-content" : `${Math.round(parentRect.width)}px`, + height: "fit-content", + flexShrink: "0", + letterSpacing: isNaN(rawLetterSpacing) ? "0em" : `${(rawLetterSpacing / fontSizePx).toFixed(2)}em`, + }; + + if (computed.fontStyle === "italic") textStyles.fontStyle = "italic"; + + const textAlign = computed.textAlign; + if (textAlign && textAlign !== "start" && textAlign !== "left") { + textStyles.textAlign = textAlign; + } + + nodes[textNodeId] = { + id: textNodeId, label: "Text", textValue: textContent, + component: "Text", styles: textStyles, "~": false, + labelIsModified: false, styleMeta, + }; + + return textNodeId; + }; + + const svgFillToPaperProp = ( + fillAttr: string | null, + contextElement: Element, + ): { color: PaperColor; isVisible: boolean } => { + if (!fillAttr || fillAttr === "none") { + return { color: cssColorToPaper("rgb(0, 0, 0)")!, isVisible: false }; + } + + const resolvedColor = fillAttr === "currentColor" + ? getComputedStyle(contextElement).color + : fillAttr; + + const paperColor = cssColorToPaper(resolvedColor) + ?? cssColorToPaper(getComputedStyle(contextElement).fill) + ?? cssColorToPaper("rgb(0, 0, 0)")!; + + return { color: paperColor, isVisible: true }; + }; + + const convertSvgChild = (svgChild: Element): string | null => { + const childTag = svgChild.tagName.toLowerCase(); + + if (childTag === "g") { + const groupId = allocateNodeId(); + const groupChildIds: string[] = []; + for (const grandchild of svgChild.children) { + const grandchildId = convertSvgChild(grandchild); + if (grandchildId) groupChildIds.push(grandchildId); + } + + const groupStyles: Record = {}; + const groupComputed = getComputedStyle(svgChild); + if (groupComputed.opacity !== "1") groupStyles.opacity = groupComputed.opacity; + + nodes[groupId] = { + id: groupId, label: "Shape", textValue: "", + component: "SVGVisualElement", tag: "g", + styles: groupStyles, "~": false, labelIsModified: false, props: {}, + }; + + if (groupChildIds.length > 0) parentToChildrenIndex[groupId] = groupChildIds; + return groupId; + } + + if (!SVG_VISUAL_TAGS.has(childTag)) return null; + + const childId = allocateNodeId(); + const childProps: Record = {}; + const childStyles: Record = {}; + + for (const attr of svgChild.attributes) { + if (attr.name === "fill") { + childProps.fill = svgFillToPaperProp(attr.value, svgChild); + } else if (attr.name === "stroke") { + const strokeColor = cssColorToPaper( + attr.value === "currentColor" ? getComputedStyle(svgChild).color : attr.value, + ); + if (strokeColor) { + childProps.stroke = { color: strokeColor, isVisible: attr.value !== "none" }; + } + } else if (attr.name !== "style" && attr.name !== "class") { + childProps[attr.name] = attr.value; + } + } + + const childComputed = getComputedStyle(svgChild); + + if (!childProps.fill) childProps.fill = svgFillToPaperProp(childComputed.fill, svgChild); + + if (!childProps.stroke && childComputed.stroke && childComputed.stroke !== "none") { + const strokeColor = cssColorToPaper(childComputed.stroke); + if (strokeColor) childProps.stroke = { color: strokeColor, isVisible: true }; + } + + if (!childProps["stroke-width"] && childComputed.strokeWidth && childComputed.strokeWidth !== "0") { + childProps["stroke-width"] = childComputed.strokeWidth; + } + if (!childProps["stroke-linecap"] && childComputed.strokeLinecap && childComputed.strokeLinecap !== "butt") { + childProps["stroke-linecap"] = childComputed.strokeLinecap; + } + if (!childProps["stroke-linejoin"] && childComputed.strokeLinejoin && childComputed.strokeLinejoin !== "miter") { + childProps["stroke-linejoin"] = childComputed.strokeLinejoin; + } + + if (childComputed.opacity !== "1") childStyles.opacity = childComputed.opacity; + + const SVG_LABEL_MAP: Record = { + path: "Path", circle: "Circle", ellipse: "Ellipse", + rect: "Rect", line: "Line", polyline: "Polyline", + polygon: "Polygon", use: "Use", + }; + + nodes[childId] = { + id: childId, label: SVG_LABEL_MAP[childTag] ?? "Shape", textValue: "", + component: "SVGVisualElement", tag: childTag, + styles: childStyles, "~": false, labelIsModified: false, props: childProps, + }; + + return childId; + }; + + const convertSvgRoot = (svgElement: SVGSVGElement, nodeId: string): string => { + const svgProps: Record = {}; + const widthAttr = svgElement.getAttribute("width"); + const heightAttr = svgElement.getAttribute("height"); + const viewBox = svgElement.getAttribute("viewBox"); + + if (widthAttr) svgProps.width = widthAttr; + if (heightAttr) svgProps.height = heightAttr; + if (viewBox) svgProps.viewBox = viewBox; + svgProps.xmlns = "http://www.w3.org/2000/svg"; + svgProps.preserveAspectRatio = svgElement.getAttribute("preserveAspectRatio") ?? "none"; + svgProps.fill = svgFillToPaperProp(svgElement.getAttribute("fill"), svgElement); + + const svgStyles: Record = {}; + const svgComputed = getComputedStyle(svgElement); + if (svgComputed.opacity !== "1") svgStyles.opacity = svgComputed.opacity; + + nodes[nodeId] = { + id: nodeId, label: "SVG", textValue: "", + component: "SVG", styles: svgStyles, "~": false, + labelIsModified: false, props: svgProps, + }; + + const childIds: string[] = []; + for (const child of svgElement.children) { + const childId = convertSvgChild(child); + if (childId) childIds.push(childId); + } + if (childIds.length > 0) parentToChildrenIndex[nodeId] = childIds; + + return nodeId; + }; + + const convertElement = ( + domElement: Element, + isRootElement = false, + depth = 0, + ): string => { + if (depth > maxDepth) return ""; + const nodeId = allocateNodeId(); + const computed = getComputedStyle(domElement); + const elementTag = domElement.tagName.toLowerCase(); + const isReplacedElement = REPLACED_ELEMENT_TAGS.has(elementTag); + + const paperStyles: Record = {}; + const styleMeta: PaperStyleMeta = {}; + + if (domElement instanceof SVGSVGElement) return convertSvgRoot(domElement, nodeId); + + if (isReplacedElement) { + const replacedRect = domElement.getBoundingClientRect(); + paperStyles.width = replacedRect.width; + paperStyles.height = replacedRect.height; + paperStyles.flexShrink = "0"; + if (computed.opacity !== "1") paperStyles.opacity = computed.opacity; + + const elementColor = computed.color; + if (elementColor && !isTransparentColor(elementColor)) { + paperStyles.backgroundColor = cssColorToHex(elementColor); + } + if (!isTransparentColor(computed.backgroundColor)) { + paperStyles.backgroundColor = cssColorToHex(computed.backgroundColor); + } + + const replacedFillColor = cssColorToPaper( + paperStyles.backgroundColor ? String(paperStyles.backgroundColor) : elementColor, + ); + const replacedStyleMeta: PaperStyleMeta = {}; + if (replacedFillColor) { + replacedStyleMeta.fill = [{ type: "solid", color: replacedFillColor, isVisible: true }]; + } + + const { label, labelIsModified } = resolveLabel(domElement, "Rectangle"); + nodes[nodeId] = { + id: nodeId, label, textValue: "", component: "Rectangle", + styles: paperStyles, "~": false, labelIsModified, props: {}, + ...(Object.keys(replacedStyleMeta).length > 0 && { styleMeta: replacedStyleMeta }), + }; + return nodeId; + } + + // Layout + paperStyles.display = "flex"; + const cssDisplay = computed.display; + + if (cssDisplay.includes("flex")) { + paperStyles.flexDirection = computed.flexDirection; + paperStyles.justifyContent = normalizeFlexValue(computed.justifyContent); + paperStyles.alignItems = normalizeFlexValue(computed.alignItems); + if (computed.flexWrap === "wrap" || computed.flexWrap === "wrap-reverse") { + paperStyles.flexWrap = "wrap"; + } + } else if (cssDisplay === "inline" || cssDisplay === "inline-block") { + paperStyles.flexDirection = "row"; + paperStyles.flexWrap = "wrap"; + paperStyles.justifyContent = "start"; + paperStyles.alignItems = "center"; + } else { + const visibleChildren = Array.from(domElement.children).filter((childEl) => { + const childComputed = getComputedStyle(childEl); + return childComputed.display !== "none" && childComputed.visibility !== "hidden"; + }); + const hasAnyBlockChild = visibleChildren.some((childEl) => { + const childDisp = getComputedStyle(childEl).display; + return !INLINE_DISPLAY_VALUES.has(childDisp) && childDisp !== "contents"; + }); + + if (hasAnyBlockChild) { + paperStyles.flexDirection = "column"; + paperStyles.justifyContent = "start"; + paperStyles.alignItems = "start"; + } else { + paperStyles.flexDirection = "row"; + paperStyles.flexWrap = "wrap"; + paperStyles.justifyContent = "start"; + paperStyles.alignItems = "center"; + } + } + + const cssGap = computed.gap; + paperStyles.gap = cssGap && cssGap !== "normal" && cssGap !== "0px" ? cssGap : 0; + + // Sizing + const boundingRect = domElement.getBoundingClientRect(); + paperStyles.width = `${boundingRect.width}px`; + paperStyles.height = isRootElement ? `${boundingRect.height}px` : "fit-content"; + + if (computed.minWidth !== "0px" && computed.minWidth !== "auto") paperStyles.minWidth = formatDimension(computed.minWidth); + if (computed.maxWidth !== "none") paperStyles.maxWidth = formatDimension(computed.maxWidth); + if (computed.minHeight !== "0px" && computed.minHeight !== "auto") paperStyles.minHeight = formatDimension(computed.minHeight); + if (computed.maxHeight !== "none") paperStyles.maxHeight = formatDimension(computed.maxHeight); + + // Border radius + const corners = [computed.borderTopLeftRadius, computed.borderTopRightRadius, computed.borderBottomRightRadius, computed.borderBottomLeftRadius]; + if (corners.some((corner) => corner !== "0px")) { + const allEqual = corners.every((corner) => corner === corners[0]); + paperStyles.borderRadius = allEqual ? corners[0] : corners.join(" "); + } + + // Padding + const padding = [computed.paddingTop, computed.paddingRight, computed.paddingBottom, computed.paddingLeft]; + if (padding[0] === padding[2] && padding[1] === padding[3]) { + paperStyles.paddingBlock = formatDimension(padding[0]); + paperStyles.paddingInline = formatDimension(padding[1]); + } else { + paperStyles.paddingTop = formatDimension(padding[0]); + paperStyles.paddingRight = formatDimension(padding[1]); + paperStyles.paddingBottom = formatDimension(padding[2]); + paperStyles.paddingLeft = formatDimension(padding[3]); + } + + // Flex child + if (!isRootElement) paperStyles.flexShrink = "0"; + if (computed.flexGrow !== "0") paperStyles.flexGrow = computed.flexGrow; + if (computed.flexBasis !== "auto" && computed.flexBasis !== "0px") paperStyles.flexBasis = computed.flexBasis; + const alignSelf = computed.alignSelf; + if (alignSelf && alignSelf !== "auto" && alignSelf !== "normal") paperStyles.alignSelf = normalizeFlexValue(alignSelf); + + // Overflow + if (["hidden", "clip", "scroll", "auto"].includes(computed.overflow)) { + paperStyles.overflow = "clip"; + } + + // Position + if (computed.position === "absolute" || computed.position === "fixed") { + paperStyles.position = "absolute"; + const absoluteLeft = parseFloat(computed.left); + const absoluteTop = parseFloat(computed.top); + if (!isNaN(absoluteLeft)) paperStyles.left = absoluteLeft; + if (!isNaN(absoluteTop)) paperStyles.top = absoluteTop; + } + + // Opacity + if (computed.opacity !== "1") paperStyles.opacity = computed.opacity; + + // Background + const resolvedBackground = isRootElement ? resolveBackgroundColor(domElement) : computed.backgroundColor; + if (!isTransparentColor(resolvedBackground)) { + paperStyles.backgroundColor = cssColorToHex(resolvedBackground); + } + + // Style meta (OKLCH fills, borders, shadows) + const fills = extractFills(computed, domElement, isRootElement); + if (fills.length > 0) styleMeta.fill = fills; + + const borderWidthValues = BORDER_SIDES.map((side) => + computed.getPropertyValue(`border-${side.toLowerCase()}-width`), + ); + + if (borderWidthValues.some((widthValue) => parseFloat(widthValue) > 0)) { + const allBordersIdentical = + borderWidthValues.every((widthValue) => widthValue === borderWidthValues[0]) && + BORDER_SIDES.every((side) => + computed.getPropertyValue(`border-${side.toLowerCase()}-color`) === computed.getPropertyValue("border-top-color"), + ); + + if (allBordersIdentical && parseFloat(borderWidthValues[0]) > 0) { + paperStyles.borderWidth = computed.getPropertyValue("border-top-width"); + paperStyles.borderStyle = computed.getPropertyValue("border-top-style"); + paperStyles.borderColor = cssColorToHex(computed.getPropertyValue("border-top-color")); + const borderColor = cssColorToPaper(computed.getPropertyValue("border-top-color")); + if (borderColor) { + styleMeta.borders = { + all: { type: "color", color: borderColor, width: paperStyles.borderWidth as string, style: paperStyles.borderStyle as string, isVisible: true }, + }; + } + } else { + const perSideBorders: Record = {}; + for (const side of BORDER_SIDES) { + const sideKey = side.toLowerCase(); + const sideWidth = computed.getPropertyValue(`border-${sideKey}-width`); + if (parseFloat(sideWidth) <= 0) continue; + paperStyles[`border${side}Width`] = sideWidth; + paperStyles[`border${side}Style`] = computed.getPropertyValue(`border-${sideKey}-style`); + paperStyles[`border${side}Color`] = cssColorToHex(computed.getPropertyValue(`border-${sideKey}-color`)); + const sideColor = cssColorToPaper(computed.getPropertyValue(`border-${sideKey}-color`)); + if (sideColor) { + perSideBorders[sideKey] = { type: "color", color: sideColor, width: sideWidth, style: computed.getPropertyValue(`border-${sideKey}-style`), isVisible: true }; + } + } + if (Object.keys(perSideBorders).length > 0) styleMeta.borders = perSideBorders; + } + } + + if (computed.boxShadow && computed.boxShadow !== "none") { + paperStyles.boxShadow = computed.boxShadow; + const parsedShadows = parseBoxShadows(computed.boxShadow); + if (parsedShadows.length > 0) styleMeta.outerShadow = parsedShadows; + } + + // Text-only elements without visual styling → promote to Text node + const hasElementChildren = Array.from(domElement.childNodes).some((childDomNode) => { + if (childDomNode.nodeType !== Node.ELEMENT_NODE) return false; + const childEl = childDomNode as Element; + if (SKIPPED_TAGS.has(childEl.tagName)) return false; + if (childEl.namespaceURI === "http://www.w3.org/2000/svg" && childEl.tagName !== "svg") return false; + return isElementVisible(getComputedStyle(childEl)); + }); + + const fullTextContent = (domElement.textContent ?? "").replace(/\s+/g, " ").trim(); + const hasVisualStyling = Object.keys(styleMeta).length > 0 || hasVisibleBoxDecoration(domElement); + + if (!hasElementChildren && fullTextContent && !hasVisualStyling) { + const textNodeId = createTextNode(fullTextContent, domElement); + const textNode = nodes[textNodeId]; + const { label, labelIsModified } = resolveLabel(domElement, "Text"); + if (label !== "Text") { + textNode.label = label; + textNode.labelIsModified = labelIsModified; + } + textNode.id = nodeId; + nodes[nodeId] = textNode; + delete nodes[textNodeId]; + return nodeId; + } + + // HACK: Skip trivial wrapper frames — single visible child, no visual styling, + // no padding/gap, no text content. Reduces nesting without losing information. + const visibleChildElements = Array.from(domElement.children).filter((childEl) => { + if (SKIPPED_TAGS.has(childEl.tagName)) return false; + return isElementVisible(getComputedStyle(childEl)); + }); + + const directTextContent = Array.from(domElement.childNodes) + .filter((childNode) => childNode.nodeType === Node.TEXT_NODE) + .map((childNode) => (childNode.textContent ?? "").trim()) + .join(""); + + const hasPaddingOrGap = + computed.paddingTop !== "0px" || computed.paddingRight !== "0px" || + computed.paddingBottom !== "0px" || computed.paddingLeft !== "0px" || + (computed.gap && computed.gap !== "normal" && computed.gap !== "0px"); + + if ( + visibleChildElements.length === 1 && + !hasVisualStyling && + !directTextContent && + !hasPaddingOrGap && + !cssDisplay.includes("flex") && + !isRootElement + ) { + return convertElement(visibleChildElements[0], false, depth); + } + + // Children + const childNodeIds: string[] = []; + let inlineTextBuffer = ""; + + const flushInlineTextBuffer = () => { + const normalizedText = inlineTextBuffer.replace(/\s+/g, " ").trim(); + if (normalizedText) { + childNodeIds.push(createTextNode(normalizedText, domElement)); + } + inlineTextBuffer = ""; + }; + + for (const childDomNode of domElement.childNodes) { + if (childDomNode.nodeType === Node.TEXT_NODE) { + inlineTextBuffer += childDomNode.textContent ?? ""; + continue; + } + if (childDomNode.nodeType !== Node.ELEMENT_NODE) continue; + + const childElement = childDomNode as Element; + if (SKIPPED_TAGS.has(childElement.tagName)) continue; + + const childComputed = getComputedStyle(childElement); + if (!isElementVisible(childComputed)) continue; + + if (childElement instanceof SVGElement && childElement.tagName === "svg") { + flushInlineTextBuffer(); + const childId = convertElement(childElement, false, depth + 1); + if (childId) childNodeIds.push(childId); + continue; + } + + if (childElement.namespaceURI === "http://www.w3.org/2000/svg") continue; + + const childDisplay = childComputed.display; + const isInlineChild = INLINE_DISPLAY_VALUES.has(childDisplay); + const isSimpleInline = + isInlineChild && + !hasVisibleBoxDecoration(childElement) && + !childElement.querySelector("svg") && + !childElement.querySelector("img") && + !childElement.querySelector(BLOCK_DESCENDANT_SELECTOR); + + if (isSimpleInline) { + flushInlineTextBuffer(); + const inlineText = (childElement.textContent ?? "").replace(/\s+/g, " ").trim(); + if (inlineText) childNodeIds.push(createTextNode(inlineText, childElement)); + } else { + flushInlineTextBuffer(); + const childId = convertElement(childElement, false, depth + 1); + if (childId) childNodeIds.push(childId); + } + } + + flushInlineTextBuffer(); + + if (childNodeIds.length > 0) parentToChildrenIndex[nodeId] = childNodeIds; + + const { label: frameLabel, labelIsModified } = resolveLabel(domElement, "Frame"); + const paperNode: PaperNode = { + id: nodeId, label: frameLabel, textValue: "", + component: "Frame", styles: paperStyles, "~": false, labelIsModified, + }; + + if (Object.keys(styleMeta).length > 0) paperNode.styleMeta = styleMeta; + + nodes[nodeId] = paperNode; + return nodeId; + }; + + const topLevelNodeIds: string[] = []; + const oldIdToNewIdMap: Record = {}; + + for (const rootElement of rootElements) { + const rootNodeId = convertElement(rootElement, true); + if (!rootNodeId) continue; + topLevelNodeIds.push(rootNodeId); + oldIdToNewIdMap[generateUniqueId()] = rootNodeId; + + const rootNode = nodes[rootNodeId]; + if (rootNode) { + const rootRect = rootElement.getBoundingClientRect(); + rootNode.tempX = Math.round(rootRect.left); + rootNode.tempY = Math.round(rootRect.top); + rootNode.styles.left = Math.round(rootRect.left); + rootNode.styles.top = Math.round(rootRect.top); + } + } + + if (topLevelNodeIds.length === 0) return ""; + + const embedData: PaperEmbedData = { + id: generateUniqueId(), + fileId: generateUniqueId(), + topLevelNodeIds, + nodes, + images: {}, + parentToChildrenIndex, + oldIdToNewIdMap, + }; + + return ``; +}; + +export type { DomToPaperOptions }; diff --git a/packages/paper/src/index.ts b/packages/paper/src/index.ts new file mode 100644 index 000000000..7a69c5a8e --- /dev/null +++ b/packages/paper/src/index.ts @@ -0,0 +1,11 @@ +export { domToPaper, type DomToPaperOptions } from "./dom-to-paper"; + +export const copyDomToPaper = async ( + nodeOrNodes: Node | Node[], + options: import("./dom-to-paper").DomToPaperOptions = {}, +): Promise => { + const { domToPaper } = await import("./dom-to-paper"); + const html = domToPaper(nodeOrNodes, options); + await navigator.clipboard.writeText(html); + return html; +}; diff --git a/packages/paper/test-paste.html b/packages/paper/test-paste.html new file mode 100644 index 000000000..2e22aacfe --- /dev/null +++ b/packages/paper/test-paste.html @@ -0,0 +1,164 @@ + + +Paper Paste Test + +

Click the button, then paste (Cmd+V) into Paper. You should see a dark frame with "Hello Paper!" text.

+ +

+
+
+
diff --git a/packages/paper/tsconfig.json b/packages/paper/tsconfig.json
new file mode 100644
index 000000000..9c3d6789d
--- /dev/null
+++ b/packages/paper/tsconfig.json
@@ -0,0 +1,15 @@
+{
+  "compilerOptions": {
+    "target": "ESNext",
+    "module": "ESNext",
+    "moduleResolution": "bundler",
+    "esModuleInterop": true,
+    "strict": true,
+    "skipLibCheck": true,
+    "declaration": true,
+    "outDir": "dist",
+    "rootDir": "src",
+    "lib": ["esnext", "dom", "dom.iterable"]
+  },
+  "include": ["src/**/*"]
+}
diff --git a/packages/paper/tsup.config.ts b/packages/paper/tsup.config.ts
new file mode 100644
index 000000000..41e218fda
--- /dev/null
+++ b/packages/paper/tsup.config.ts
@@ -0,0 +1,10 @@
+import { defineConfig } from "tsup";
+
+export default defineConfig({
+  entry: { index: "./src/index.ts" },
+  format: ["esm", "cjs"],
+  dts: true,
+  clean: true,
+  target: "es2022",
+  treeshake: true,
+});
diff --git a/packages/react-grab/package.json b/packages/react-grab/package.json
index 73cab3e89..090c8eba9 100644
--- a/packages/react-grab/package.json
+++ b/packages/react-grab/package.json
@@ -94,6 +94,7 @@
   },
   "dependencies": {
     "@medv/finder": "^4.0.2",
+    "@react-grab/paper": "workspace:*",
     "bippy": "^0.5.30",
     "solid-js": "^1.9.10"
   },
diff --git a/packages/react-grab/src/core/context.ts b/packages/react-grab/src/core/context.ts
index 36ce4b0a4..beb77c845 100644
--- a/packages/react-grab/src/core/context.ts
+++ b/packages/react-grab/src/core/context.ts
@@ -563,6 +563,8 @@ const formatPriorityAttrs = (
   return priorityAttrs.length > 0 ? ` ${priorityAttrs.join(" ")}` : "";
 };
 
+
+
 const getHTMLPreview = (element: Element): string => {
   const tagName = getTagName(element);
   if (!(element instanceof HTMLElement)) {
diff --git a/packages/react-grab/src/core/copy.ts b/packages/react-grab/src/core/copy.ts
index ac4a39dc1..52c68384d 100644
--- a/packages/react-grab/src/core/copy.ts
+++ b/packages/react-grab/src/core/copy.ts
@@ -1,7 +1,37 @@
+import {
+  getFiberFromHostInstance,
+  isCompositeFiber,
+  getDisplayName,
+} from "bippy";
+import { domToPaper } from "@react-grab/paper";
 import { copyContent, type ReactGrabEntry } from "../utils/copy-content.js";
 import { generateSnippet } from "../utils/generate-snippet.js";
 import { joinSnippets } from "../utils/join-snippets.js";
 
+const getReactComponentName = (element: Element): string | null => {
+  try {
+    const fiber = getFiberFromHostInstance(element);
+    if (!fiber) return null;
+
+    const parentFiber = fiber.return;
+    if (!parentFiber || !isCompositeFiber(parentFiber)) return null;
+
+    const componentName = getDisplayName(parentFiber);
+    if (!componentName) return null;
+
+    if (
+      element.parentElement &&
+      getFiberFromHostInstance(element.parentElement)?.return === parentFiber
+    ) {
+      return null;
+    }
+
+    return componentName;
+  } catch {
+    return null;
+  }
+};
+
 interface CopyOptions {
   maxContextLines?: number;
   getContent?: (elements: Element[]) => Promise | string;
@@ -72,9 +102,18 @@ export const tryCopyWithFallback = async (
         ? `${extraPrompt}\n\n${transformedContent}`
         : transformedContent;
 
+      let paperHtml: string | undefined;
+      try {
+        paperHtml = domToPaper(elements, {
+          getComponentName: getReactComponentName,
+        }) || undefined;
+      } catch (paperError) {
+        console.error("[react-grab] Paper conversion failed:", paperError);
+      }
       didCopy = copyContent(copiedContent, {
         componentName: options.componentName,
         entries,
+        paperHtml,
       });
     }
   } catch (error) {
diff --git a/packages/react-grab/src/utils/copy-content.ts b/packages/react-grab/src/utils/copy-content.ts
index ad3c5ee5b..2b441054d 100644
--- a/packages/react-grab/src/utils/copy-content.ts
+++ b/packages/react-grab/src/utils/copy-content.ts
@@ -16,6 +16,7 @@ interface CopyContentOptions {
   tagName?: string;
   commentText?: string;
   entries?: ReactGrabEntry[];
+  paperHtml?: string;
 }
 
 interface ReactGrabMetadata {
@@ -97,6 +98,7 @@ interface ClipboardData {
 const createClipboardData = (
   content: string,
   elementName: string,
+  paperHtml?: string,
 ): ClipboardData => {
   const mentionKey = String(Math.floor(Math.random() * 10000));
   const namespaceUuid = generateUuid();
@@ -126,7 +128,9 @@ const createClipboardData = (
 
   return {
     plainText: `@${displayName}\n\n${content}\n`,
-    htmlContent: `
${escapeHtml(content)}
`, + htmlContent: paperHtml + ? `${paperHtml}` + : `
${escapeHtml(content)}
`, lexicalData: JSON.stringify({ namespace: `chat-input${namespaceUuid}-pane`, nodes: [ @@ -150,6 +154,7 @@ export const copyContent = ( const { plainText, htmlContent, lexicalData } = createClipboardData( content, elementName, + options?.paperHtml, ); const entries = options?.entries ?? [ { diff --git a/packages/react-grab/tsup.config.ts b/packages/react-grab/tsup.config.ts index 34d0049ca..e29ad7e8d 100644 --- a/packages/react-grab/tsup.config.ts +++ b/packages/react-grab/tsup.config.ts @@ -50,7 +50,7 @@ const DEFAULT_OPTIONS: Options = { ".css": "text", }, minify: process.env.NODE_ENV === "production", - noExternal: ["clsx", "tailwind-merge", "solid-js", "bippy"], + noExternal: ["clsx", "tailwind-merge", "solid-js", "bippy", "@react-grab/paper"], onSuccess: process.env.COPY ? "pbcopy < ./dist/index.global.js" : undefined, outDir: "./dist", sourcemap: false, @@ -140,7 +140,7 @@ const reactBuildConfig: Options = { ".css": "text", }, minify: false, - noExternal: ["bippy", "solid-js", "clsx", "tailwind-merge"], + noExternal: ["bippy", "solid-js", "clsx", "tailwind-merge", "@react-grab/paper"], outDir: "./dist", platform: "neutral", sourcemap: false, diff --git a/packages/website/public/script.js b/packages/website/public/script.js index d9d882f2f..596d74265 100644 --- a/packages/website/public/script.js +++ b/packages/website/public/script.js @@ -6,65 +6,65 @@ this.globalThis=this.globalThis||{};this.globalThis.__REACT_GRAB_MODULE__=(funct * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ -var op=(e,t)=>e===t,nn=Symbol("solid-proxy"),rp=typeof Proxy=="function",Nr=Symbol("solid-track"),zi={equals:op},bc=Ec,Ft=1,Mr=2,yc={owned:null,cleanups:null,context:null,owner:null},ma={},$e=null,J=null,Fo=null,Ye=null,ft=null,Ct=null,Ui=0;function Tn(e,t){let n=Ye,o=$e,i=e.length===0,s=t===void 0?o:t,r=i?yc:{owned:null,cleanups:null,context:s?s.context:null,owner:s},c=i?e:()=>e(()=>Et(()=>Gn(r)));$e=r,Ye=null;try{return Ot(c,!0)}finally{Ye=n,$e=o;}}function U(e,t){t=t?Object.assign({},zi,t):zi;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},o=i=>(typeof i=="function"&&(i=i(n.value)),Cc(n,i));return [vc.bind(n),o]}function mc(e,t,n){let o=Ki(e,t,true,Ft);Ho(o);}function te(e,t,n){let o=Ki(e,t,false,Ft);Ho(o);}function be(e,t,n){bc=cp;let o=Ki(e,t,false,Ft);(o.user=true),Ct?Ct.push(o):Ho(o);}function se(e,t,n){n=n?Object.assign({},zi,n):zi;let o=Ki(e,t,true,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,Ho(o),vc.bind(o)}function ip(e){return e&&typeof e=="object"&&"then"in e}function ba(e,t,n){let o,i,s;typeof t=="function"?(o=e,i=t,s={}):(o=true,i=e,s=t||{});let r=null,c=ma,f=false,p="initialValue"in s,b=typeof o=="function"&&se(o),x=new Set,[H,M]=(s.storage||U)(s.initialValue),[Y,m]=U(void 0),[E,T]=U(void 0,{equals:false}),[C,R]=U(p?"ready":"unresolved");function X(L,A,y,h){return r===L&&(r=null,h!==void 0&&(p=true),(L===c||A===c)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(h,{value:A})),c=ma,fe(A,y)),A}function fe(L,A){Ot(()=>{A===void 0&&M(()=>L),R(A!==void 0?"errored":p?"ready":"unresolved"),m(A);for(let y of x.keys())y.decrement();x.clear();},false);}function j(){let L=Rr,A=H(),y=Y();if(y!==void 0&&!r)throw y;return Ye&&!Ye.user&&L,A}function le(L=true){if(L!==false&&f)return;f=false;let A=b?b():o;if(A==null||A===false){X(r,Et(H));return}let y,h=c!==ma?c:Et(()=>{try{return i(A,{value:H(),refetching:L})}catch(S){y=S;}});if(y!==void 0){X(r,void 0,Bi(y),A);return}else if(!ip(h))return X(r,h,void 0,A),h;return r=h,"v"in h?(h.s===1?X(r,h.v,void 0,A):X(r,void 0,Bi(h.v),A),h):(f=true,queueMicrotask(()=>f=false),Ot(()=>{R(p?"refreshing":"pending"),T();},false),h.then(S=>X(h,S,void 0,A),S=>X(h,void 0,Bi(S),A)))}Object.defineProperties(j,{state:{get:()=>C()},error:{get:()=>Y()},loading:{get(){let L=C();return L==="pending"||L==="refreshing"}},latest:{get(){if(!p)return j();let L=Y();if(L&&!r)throw L;return H()}}});let ue=$e;return b?mc(()=>(ue=$e,le(false))):le(false),[j,{refetch:L=>wc(ue,()=>le(L)),mutate:M}]}function ji(e){return Ot(e,false)}function Et(e){if(Ye===null)return e();let t=Ye;Ye=null;try{return Fo?Fo.untrack(e):e()}finally{Ye=t;}}function He(e,t,n){let o=Array.isArray(e),i,s=n&&n.defer;return r=>{let c;if(o){c=Array(e.length);for(let u=0;ut(c,i,r));return i=c,l}}function mt(e){be(()=>Et(e));}function Me(e){return $e===null||($e.cleanups===null?$e.cleanups=[e]:$e.cleanups.push(e)),e}function Wi(){return Ye}function wc(e,t){let n=$e,o=Ye;$e=e,Ye=null;try{return Ot(t,!0)}catch(i){Xi(i);}finally{$e=n,Ye=o;}}var[Cw,pc]=U(false);var Rr;function vc(){let e=J;if(this.sources&&(this.state))if((this.state)===Ft)Ho(this);else {let t=ft;ft=null,Ot(()=>Vi(this),false),ft=t;}if(Ye){let t=this.observers?this.observers.length:0;Ye.sources?(Ye.sources.push(this),Ye.sourceSlots.push(t)):(Ye.sources=[this],Ye.sourceSlots=[t]),this.observers?(this.observers.push(Ye),this.observerSlots.push(Ye.sources.length-1)):(this.observers=[Ye],this.observerSlots=[Ye.sources.length-1]);}return e&&J.sources.has(this)?this.tValue:this.value}function Cc(e,t,n){let o=e.value;if(!e.comparator||!e.comparator(o,t)){e.value=t;e.observers&&e.observers.length&&Ot(()=>{for(let i=0;i1e6)throw ft=[],new Error},false);}return t}function Ho(e){if(!e.fn)return;Gn(e);let t=Ui;gc(e,e.value,t);}function gc(e,t,n){let o,i=$e,s=Ye;Ye=$e=e;try{o=e.fn(t);}catch(r){return e.pure&&((e.state=Ft,e.owned&&e.owned.forEach(Gn),e.owned=null)),e.updatedAt=n+1,Xi(r)}finally{Ye=s,$e=i;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Cc(e,o):e.value=o,e.updatedAt=n);}function Ki(e,t,n,o=Ft,i){let s={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$e,context:$e?$e.context:null,pure:n};if($e===null||$e!==yc&&($e.owned?$e.owned.push(s):$e.owned=[s]),Fo);return s}function Ir(e){let t=J;if((e.state)===0)return;if((e.state)===Mr)return Vi(e);if(e.suspense&&Et(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;o--){if(e=n[o],t);if((e.state)===Ft)Ho(e);else if((e.state)===Mr){let i=ft;ft=null,Ot(()=>Vi(e,n[0]),false),ft=i;}}}function Ot(e,t){if(ft)return e();let n=false;t||(ft=[]),Ct?n=true:Ct=[],Ui++;try{let o=e();return ap(n),o}catch(o){n||(Ct=null),ft=null,Xi(o);}}function ap(e){if(ft&&(Ec(ft),ft=null),e)return;let n=Ct;Ct=null,n.length&&Ot(()=>bc(n),false);}function Ec(e){for(let t=0;t=0;t--)Gn(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Gn(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Bi(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function Xi(e,t=$e){let o=Bi(e);throw o;}var ha=Symbol("fallback");function Gi(e){for(let t=0;t1?[]:null;return Me(()=>Gi(s)),()=>{let l=e()||[],u=l.length,f,p;return l[Nr],Et(()=>{let x,H,M,Y,m,E,T,C,R;if(u===0)r!==0&&(Gi(s),s=[],o=[],i=[],r=0,c&&(c=[])),n.fallback&&(o=[ha],i[0]=Tn(X=>(s[0]=X,n.fallback())),r=1);else if(r===0){for(i=new Array(u),p=0;p=E&&C>=E&&o[T]===l[C];T--,C--)M[C]=i[T],Y[C]=s[T],c&&(m[C]=c[T]);for(x=new Map,H=new Array(C+1),p=C;p>=E;p--)R=l[p],f=x.get(R),H[p]=f===void 0?-1:f,x.set(R,p);for(f=E;f<=T;f++)R=o[f],p=x.get(R),p!==void 0&&p!==-1?(M[p]=i[f],Y[p]=s[f],c&&(m[p]=c[f]),p=H[p],x.set(R,p)):s[f]();for(p=E;pGi(s)),()=>{let u=e()||[],f=u.length;return u[Nr],Et(()=>{if(f===0)return c!==0&&(Gi(s),s=[],o=[],i=[],c=0,r=[]),n.fallback&&(o=[ha],i[0]=Tn(b=>(s[0]=b,n.fallback())),c=1),i;for(o[0]===ha&&(s[0](),s=[],o=[],i=[],c=0),l=0;lu[l]):l>=o.length&&(i[l]=Tn(p));for(;le(t||{}))}function Hi(){return true}var mp={get(e,t,n){return t===nn?n:e.get(t)},has(e,t){return t===nn?true:e.has(t)},set:Hi,deleteProperty:Hi,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:Hi,deleteProperty:Hi}},ownKeys(e){return e.keys()}};function pa(e){return (e=typeof e=="function"?e():e)?e:{}}function pp(){for(let e=0,t=this.length;e=0;c--){let l=pa(e[c])[r];if(l!==void 0)return l}},has(r){for(let c=e.length-1;c>=0;c--)if(r in pa(e[c]))return true;return false},keys(){let r=[];for(let c=0;c=0;r--){let c=e[r];if(!c)continue;let l=Object.getOwnPropertyNames(c);for(let u=l.length-1;u>=0;u--){let f=l[u];if(f==="__proto__"||f==="constructor")continue;let p=Object.getOwnPropertyDescriptor(c,f);if(!o[f])o[f]=p.get?{enumerable:true,configurable:true,get:pp.bind(n[f]=[p.get.bind(c)])}:p.value!==void 0?p:void 0;else {let b=n[f];b&&(p.get?b.push(p.get.bind(c)):p.value!==void 0&&b.push(()=>p.value));}}}let i={},s=Object.keys(o);for(let r=s.length-1;r>=0;r--){let c=s[r],l=o[c];l&&l.get?Object.defineProperty(i,c,l):i[c]=l?l.value:void 0;}return i}var gp=e=>`Stale read from <${e}>.`;function on(e){let t="fallback"in e&&{fallback:()=>e.fallback};return se(up(()=>e.each,e.children,t||void 0))}function Yi(e){let t="fallback"in e&&{fallback:()=>e.fallback};return se(dp(()=>e.each,e.children,t||void 0))}function ye(e){let t=e.keyed,n=se(()=>e.when,void 0,void 0),o=t?n:se(n,void 0,{equals:(i,s)=>!i==!s});return se(()=>{let i=o();if(i){let s=e.children;return typeof s=="function"&&s.length>0?Et(()=>s(t?i:()=>{if(!Et(o))throw gp("Show");return n()})):s}return e.fallback},void 0,void 0)}var bp=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],yp=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...bp]),wp=new Set(["innerHTML","textContent","innerText","children"]),xp=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),vp=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Cp(e,t){let n=vp[e];return typeof n=="object"?n[t]?n.$:void 0:n}var Ep=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var Be=e=>se(()=>e());function Ap(e,t,n){let o=n.length,i=t.length,s=o,r=0,c=0,l=t[i-1].nextSibling,u=null;for(;rf-c){let H=t[r];for(;c{i=s,t===document?e():z(t,e(),t.firstChild?null:void 0,n);},o.owner),()=>{i(),t.textContent="";}}function K(e,t,n,o){let i,s=()=>{let c=document.createElement("template");return c.innerHTML=e,c.content.firstChild},r=()=>(i||(i=s())).cloneNode(true);return r.cloneNode=r,r}function it(e,t=window.document){let n=t[Tc]||(t[Tc]=new Set);for(let o=0,i=e.length;oi.call(e,n[1],s));}else e.addEventListener(t,n,typeof n!="function"&&n);}function co(e,t,n={}){let o=Object.keys(t||{}),i=Object.keys(n),s,r;for(s=0,r=i.length;stypeof t.ref=="function"&&Ke(t.ref,e)),te(()=>kp(e,t,n,true,i,true)),i}function Ke(e,t,n){return Et(()=>e(t,n))}function z(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return Vo(e,t,o,n);te(i=>Vo(e,t(),i,n),o);}function kp(e,t,n,o,i={},s=false){t||(t={});for(let r in i)if(!(r in t)){if(r==="children")continue;i[r]=Pc(e,r,null,i[r],n,s,t);}for(let r in t){if(r==="children"){continue}let c=t[r];i[r]=Pc(e,r,c,i[r],n,s,t);}}function Op(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function _c(e,t,n){let o=t.trim().split(/\s+/);for(let i=0,s=o.length;iObject.defineProperty(e,"target",{configurable:true,value:l}),r=()=>{let l=t[n];if(l&&!t.disabled){let u=t[`${n}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),true},c=()=>{for(;r()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let l=e.composedPath();s(l[0]);for(let u=0;u{let l=t();for(;typeof l=="function";)l=l();n=Vo(e,l,n,o);}),()=>n;if(Array.isArray(t)){let l=[],u=n&&Array.isArray(n);if(ya(l,t,n,i))return te(()=>n=Vo(e,l,n,o,true)),()=>n;if(l.length===0){if(n=zo(e,n,o),c)return n}else u?n.length===0?kc(e,l,o):Ap(e,n,l):(n&&zo(e),kc(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(c)return n=zo(e,n,o,t);zo(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function ya(e,t,n,o){let i=false;for(let s=0,r=t.length;s=0;r--){let c=t[r];if(i!==c){let l=c.parentNode===e;!s&&!r?l?e.replaceChild(i,c):e.insertBefore(i,n):l&&c.remove();}else s=true;}}else e.insertBefore(i,n);return [i]}var Mc=`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */ -@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-yellow-500:oklch(79.5% .184 86.047);--color-black:#000;--color-white:#fff;--spacing:4px;--text-sm:14px;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0,0,.2,1);--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#404040\\]{background-color:#404040}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.text-black{color:var(--color-black)}.text-black\\/25{color:#00000040}@supports (color:color-mix(in lab, red, red)){.text-black\\/25{color:color-mix(in oklab,var(--color-black)25%,transparent)}}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.filter{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,)}.filter-\\[drop-shadow\\(0px_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\]{transition-property:top,left,width,height,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}.\\[scrollbar-color\\:transparent_transparent\\]{scrollbar-color:transparent transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.group-focus-within\\:invisible:is(:where(.group):focus-within *){visibility:hidden}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media (hover:hover){.group-hover\\:invisible:is(:where(.group):hover *){visibility:hidden}.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-\\[\\#B91C1C\\]:hover{color:#b91c1c}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-black\\/60:hover{color:#0009}@supports (color:color-mix(in lab, red, red)){.hover\\:text-black\\/60:hover{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.hover\\:opacity-100:hover{opacity:1}.hover\\:\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]:hover{scrollbar-color:#00000026 transparent}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`;var qi=Symbol("store-raw"),Uo=Symbol("store-node"),_n=Symbol("store-has"),Rc=Symbol("store-self");function Ic(e){let t=e[nn];if(!t&&(Object.defineProperty(e,nn,{value:t=new Proxy(e,Lp)}),!Array.isArray(e))){let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let i=0,s=n.length;ie[nn][t]),n}function Nc(e){Wi()&&Fr(Zi(e,Uo),Rc)();}function Np(e){return Nc(e),Reflect.ownKeys(e)}var Lp={get(e,t,n){if(t===qi)return e;if(t===nn)return n;if(t===Nr)return Nc(e),n;let o=Zi(e,Uo),i=o[t],s=i?i():e[t];if(t===Uo||t===_n||t==="__proto__")return s;if(!i){let r=Object.getOwnPropertyDescriptor(e,t);Wi()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(r&&r.get)&&(s=Fr(o,t,s)());}return jo(s)?Ic(s):s},has(e,t){return t===qi||t===nn||t===Nr||t===Uo||t===_n||t==="__proto__"?true:(Wi()&&Fr(Zi(e,_n),t)(),t in e)},set(){return true},deleteProperty(){return true},ownKeys:Np,getOwnPropertyDescriptor:Ip};function Ko(e,t,n,o=false){if(!o&&e[t]===n)return;let i=e[t],s=e.length;n===void 0?(delete e[t],e[_n]&&e[_n][t]&&i!==void 0&&e[_n][t].$()):(e[t]=n,e[_n]&&e[_n][t]&&i===void 0&&e[_n][t].$());let r=Zi(e,Uo),c;if((c=Fr(r,t,i))&&c.$(()=>n),Array.isArray(e)&&e.length!==s){for(let l=e.length;l1){o=t.shift();let r=typeof o,c=Array.isArray(e);if(Array.isArray(o)){for(let l=0;l1){Dr(e[o],t,[o].concat(n));return}i=e[o],n=[o].concat(n);}let s=t[0];typeof s=="function"&&(s=s(i,n),s===i)||o===void 0&&s==null||(s=Wo(s),o===void 0||jo(i)&&jo(s)&&!Array.isArray(s)?Lc(i,s):Ko(e,o,s));}function Qi(...[e,t]){let n=Wo(e||{}),o=Array.isArray(n),i=Ic(n);function s(...r){ji(()=>{o&&r.length===1?Dp(n,r[0]):Dr(n,r);});}return [i,s]}var Ji=new WeakMap,Dc={get(e,t){if(t===qi)return e;let n=e[t],o;return jo(n)?Ji.get(n)||(Ji.set(n,o=new Proxy(n,Dc)),o):n},set(e,t,n){return Ko(e,t,Wo(n)),true},deleteProperty(e,t){return Ko(e,t,void 0,true),true}};function Wt(e){return t=>{if(jo(t)){let n;(n=Ji.get(t))||Ji.set(t,n=new Proxy(t,Dc)),e(n);}return t}}var Fc="0.1.21";var Xo="210, 57, 192",$c=`rgba(${Xo}, 1)`,Hc=`rgba(${Xo}, 0.4)`,Bc=`rgba(${Xo}, 0.05)`,es=`rgba(${Xo}, 0.5)`,ts=`rgba(${Xo}, 0.08)`,zc=`rgba(${Xo}, 0.15)`,Vc=50,Un=8,Gc=4,Uc=.2,wa=50,xa=16,rn=4,$r=100,jc=15,Wc=3,va=["id","class","aria-label","data-testid","role","name","title"],Kc=5e3,Xc=["Meta","Control","Shift","Alt"],Ca=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),Hr="data-react-grab-frozen",Ea="data-react-grab-ignore",Br=.9,Yc=1e3,qc=2147483600,Zc=400,Jc=100,_e=16,Sa=500,Qc=300,eu=5,Aa=150,uo=14,Ta=28,Pn=150,tu=50,nu=78,ou=28,ru=1500,iu=.75,_a=32,zr=3,Vr=20,Pa=100,$t=1,ka=50,su=50,au=6,lu=3,Oa=2,cu=16,uu=100,du=50,Ma=.01,fu=1e3,mu=20,pu=2*1024*1024,Yo=100,Gr=200,jn=8,qo=8,mn=8,fo=11,gu=180,hu=280,bu=100,ht="bg-white",Kt={left:-9999,top:-9999},Zo={left:"left center",right:"right center",top:"center top",bottom:"center bottom"},yu='',wu=1e3,xu=229,Ra=-9999,Ia=new Set(["display","position","top","right","bottom","left","z-index","overflow","overflow-x","overflow-y","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","flex-direction","flex-wrap","justify-content","align-items","align-self","align-content","flex-grow","flex-shrink","flex-basis","order","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-template-areas","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-decoration-line","text-decoration-style","text-transform","text-overflow","text-shadow","white-space","word-break","overflow-wrap","vertical-align","color","background-color","background-image","background-position","background-size","background-repeat","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","box-shadow","opacity","transform","filter","backdrop-filter","object-fit","object-position"]);var Fp=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),$p=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return Fp(n)?n:null},vu=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let o=[];for(let i of n){let s=$p(i);if(s===null)return null;o.push(s);}return o},Cu=(e,t,n,o)=>e===1&&t===0&&n===0&&o===1,Hp=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Eu=e=>{if(!e||e==="none")return "none";if(e.charCodeAt(0)===109)if(e.charCodeAt(6)===51){let n=e.length-1,o=vu(e.slice(9,n),16);if(o)return o[12]=0,o[13]=0,o[14]=0,Hp(o)?"none":`matrix3d(${o[0]}, ${o[1]}, ${o[2]}, ${o[3]}, ${o[4]}, ${o[5]}, ${o[6]}, ${o[7]}, ${o[8]}, ${o[9]}, ${o[10]}, ${o[11]}, 0, 0, 0, ${o[15]})`}else {let n=e.length-1,o=vu(e.slice(7,n),6);if(o){let i=o[0],s=o[1],r=o[2],c=o[3];return Cu(i,s,r,c)?"none":`matrix(${i}, ${s}, ${r}, ${c}, 0, 0)`}}return "none"},Su=e=>e.isIdentity?"none":e.is2D?Cu(e.a,e.b,e.c,e.d)?"none":`matrix(${e.a}, ${e.b}, ${e.c}, ${e.d}, 0, 0)`:e.m11===1&&e.m12===0&&e.m13===0&&e.m14===0&&e.m21===0&&e.m22===1&&e.m23===0&&e.m24===0&&e.m31===0&&e.m32===0&&e.m33===1&&e.m34===0&&e.m44===1?"none":`matrix3d(${e.m11}, ${e.m12}, ${e.m13}, ${e.m14}, ${e.m21}, ${e.m22}, ${e.m23}, ${e.m24}, ${e.m31}, ${e.m32}, ${e.m33}, ${e.m34}, 0, 0, 0, ${e.m44})`;var Na=new WeakMap,Au=()=>{Na=new WeakMap;},zp=(e,t)=>{let n=t&&t!=="none",o=null,i=e.parentElement,s=0;for(;i&&i!==document.documentElement&&s=lu)return "none";i=i.parentElement,s++;}return o?(n&&(o=o.multiply(new DOMMatrix(t))),Su(o)):n?Eu(t):"none"},ze=e=>{let t=performance.now(),n=Na.get(e);if(n&&t-n.timestamp<16)return n.bounds;let o=e.getBoundingClientRect(),i=window.getComputedStyle(e),s=zp(e,i.transform),r;if(s!=="none"&&e instanceof HTMLElement){let c=e.offsetWidth,l=e.offsetHeight;if(c>0&&l>0){let u=o.left+o.width*.5,f=o.top+o.height*.5;r={borderRadius:i.borderRadius||"0px",height:l,transform:s,width:c,x:u-c*.5,y:f-l*.5};}else r={borderRadius:i.borderRadius||"0px",height:o.height,transform:s,width:o.width,x:o.left,y:o.top};}else r={borderRadius:i.borderRadius||"0px",height:o.height,transform:s,width:o.width,x:o.left,y:o.top};return Na.set(e,{bounds:r,timestamp:t}),r};var et=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e));var kn=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var ns=({currentPosition:e,previousBounds:t,nextBounds:n})=>{if(!t||!n)return e;let o=kn(t),i=kn(n),s=t.width/2,r=e.x-o.x,c=s>0?r/s:0,l=n.width/2;return {...e,x:i.x+c*l}};var Vp=e=>({current:{state:"idle"},wasActivatedByToggle:false,pendingCommentMode:false,hasAgentProvider:e.hasAgentProvider,keyHoldDuration:e.keyHoldDuration,pointer:{x:-1e3,y:-1e3},dragStart:{x:-1e3,y:-1e3},copyStart:{x:-1e3,y:-1e3},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,lastCopiedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:"",pendingClickData:null,replySessionId:null,viewportVersion:0,grabbedBoxes:[],labelInstances:[],agentSessions:new Map,sessionElements:new Map,isTouchMode:false,theme:e.theme,activationTimestamp:null,previouslyFocusedElement:null,isAgentConnected:false,supportsUndo:false,supportsFollowUp:false,dismissButtonText:void 0,pendingAbortSessionId:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null,selectedAgent:null}),Tu=e=>{let[t,n]=Qi(Vp(e)),o=()=>t.current.state==="active",i=()=>t.current.state==="holding",s={startHold:r=>{r!==void 0&&n("keyHoldDuration",r),n("current",{state:"holding",startedAt:Date.now()});},release:()=>{t.current.state==="holding"&&n("current",{state:"idle"});},activate:()=>{n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement);},deactivate:()=>{n(Wt(r=>{r.current={state:"idle"},r.wasActivatedByToggle=false,r.pendingCommentMode=false,r.inputText="",r.frozenElement=null,r.frozenElements=[],r.frozenDragRect=null,r.pendingClickData=null,r.replySessionId=null,r.pendingAbortSessionId=null,r.activationTimestamp=null,r.previouslyFocusedElement=null,r.contextMenuPosition=null,r.contextMenuElement=null,r.contextMenuClickOffset=null,r.selectedAgent=null,r.lastCopiedElement=null;}));},toggle:()=>{t.activationTimestamp!==null?s.deactivate():(n("wasActivatedByToggle",true),s.activate());},freeze:()=>{if(t.current.state==="active"){let r=t.frozenElement??t.detectedElement;r&&n("frozenElement",r),n("current",Wt(c=>{c.state==="active"&&(c.phase="frozen");}));}},unfreeze:()=>{t.current.state==="active"&&(n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null),n("current",Wt(r=>{r.state==="active"&&(r.phase="hovering");})));},startDrag:r=>{t.current.state==="active"&&(s.clearFrozenElement(),n("dragStart",{x:r.x+window.scrollX,y:r.y+window.scrollY}),n("current",Wt(c=>{c.state==="active"&&(c.phase="dragging");})));},endDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Wt(r=>{r.state==="active"&&(r.phase="justDragged");})));},cancelDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Wt(r=>{r.state==="active"&&(r.phase="hovering");})));},finishJustDragged:()=>{t.current.state==="active"&&t.current.phase==="justDragged"&&n("current",Wt(r=>{r.state==="active"&&(r.phase="hovering");}));},startCopy:()=>{let r=t.current.state==="active";n("current",{state:"copying",startedAt:Date.now(),wasActive:r});},completeCopy:r=>{n("pendingClickData",null),r&&n("lastCopiedElement",r);let c=t.current.state==="copying"?t.current.wasActive:false;n("current",{state:"justCopied",copiedAt:Date.now(),wasActive:c});},finishJustCopied:()=>{t.current.state==="justCopied"&&(t.current.wasActive&&!t.wasActivatedByToggle?n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false}):s.deactivate());},enterPromptMode:(r,c)=>{let l=ze(c),u=l.x+l.width/2;n("copyStart",r),n("copyOffsetFromCenterX",r.x-u),n("pointer",r),n("frozenElement",c),n("wasActivatedByToggle",true),t.current.state!=="active"?(n("current",{state:"active",phase:"frozen",isPromptMode:true,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement)):n("current",Wt(f=>{f.state==="active"&&(f.isPromptMode=true,f.phase="frozen");}));},exitPromptMode:()=>{t.current.state==="active"&&n("current",Wt(r=>{r.state==="active"&&(r.isPromptMode=false,r.isPendingDismiss=false);}));},setInputText:r=>{n("inputText",r);},clearInputText:()=>{n("inputText","");},setPendingDismiss:r=>{t.current.state==="active"&&n("current",Wt(c=>{c.state==="active"&&(c.isPendingDismiss=r);}));},setPointer:r=>{n("pointer",r);},setDetectedElement:r=>{n("detectedElement",r);},setFrozenElement:r=>{n("frozenElement",r),n("frozenElements",[r]),n("frozenDragRect",null);},setFrozenElements:r=>{n("frozenElements",r),n("frozenElement",r.length>0?r[0]:null),n("frozenDragRect",null);},setFrozenDragRect:r=>{n("frozenDragRect",r);},clearFrozenElement:()=>{n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null);},setCopyStart:(r,c)=>{let l=ze(c),u=l.x+l.width/2;n("copyStart",r),n("copyOffsetFromCenterX",r.x-u);},setLastGrabbed:r=>{n("lastGrabbedElement",r);},clearLastCopied:()=>{n("lastCopiedElement",null);},setWasActivatedByToggle:r=>{n("wasActivatedByToggle",r);},setPendingCommentMode:r=>{n("pendingCommentMode",r);},setTouchMode:r=>{n("isTouchMode",r);},setSelectionSource:(r,c)=>{n("selectionFilePath",r),n("selectionLineNumber",c);},setPendingClickData:r=>{n("pendingClickData",r);},clearReplySessionId:()=>{n("replySessionId",null);},incrementViewportVersion:()=>{n("viewportVersion",r=>r+1);},addGrabbedBox:r=>{n("grabbedBoxes",c=>[...c,r]);},removeGrabbedBox:r=>{n("grabbedBoxes",c=>c.filter(l=>l.id!==r));},clearGrabbedBoxes:()=>{n("grabbedBoxes",[]);},addLabelInstance:r=>{n("labelInstances",c=>[...c,r]);},updateLabelInstance:(r,c,l)=>{let u=t.labelInstances.findIndex(f=>f.id===r);u!==-1&&n("labelInstances",u,Wt(f=>{f.status=c,l!==void 0&&(f.errorMessage=l);}));},removeLabelInstance:r=>{n("labelInstances",c=>c.filter(l=>l.id!==r));},clearLabelInstances:()=>{n("labelInstances",[]);},setHasAgentProvider:r=>{n("hasAgentProvider",r);},setAgentCapabilities:r=>{n("supportsUndo",r.supportsUndo),n("supportsFollowUp",r.supportsFollowUp),n("dismissButtonText",r.dismissButtonText),n("isAgentConnected",r.isAgentConnected);},setPendingAbortSessionId:r=>{n("pendingAbortSessionId",r);},updateSessionBounds:()=>{let r=t.agentSessions;if(r.size===0)return;let c=new Map(r),l=false;for(let[u,f]of r){let p=t.sessionElements.get(u)??null;if(et(p)){let b=ze(p),x=f.selectionBounds[0],H=ns({currentPosition:f.position,previousBounds:x,nextBounds:b});c.set(u,{...f,selectionBounds:[b],position:H}),l=true;}}l&&n("agentSessions",c);},addAgentSession:(r,c,l)=>{let u=new Map(t.agentSessions);u.set(r,c),n("agentSessions",u);let f=new Map(t.sessionElements);f.set(r,l),n("sessionElements",f);},updateAgentSessionStatus:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,lastStatus:c}),n("agentSessions",u);},completeAgentSession:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,isStreaming:false,lastStatus:c??l.lastStatus}),n("agentSessions",u);},setAgentSessionError:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,isStreaming:false,error:c}),n("agentSessions",u);},removeAgentSession:r=>{let c=new Map(t.agentSessions);c.delete(r),n("agentSessions",c);let l=new Map(t.sessionElements);l.delete(r),n("sessionElements",l);},showContextMenu:(r,c)=>{let l=ze(c),u=l.x+l.width/2,f=l.y+l.height/2;n("contextMenuPosition",r),n("contextMenuElement",c),n("contextMenuClickOffset",{x:r.x-u,y:r.y-f});},hideContextMenu:()=>{n("contextMenuPosition",null),n("contextMenuElement",null),n("contextMenuClickOffset",null);},updateContextMenuPosition:()=>{let r=t.contextMenuElement,c=t.contextMenuClickOffset;if(!r||!c||!et(r))return;let l=ze(r),u=l.x+l.width/2,f=l.y+l.height/2;n("contextMenuPosition",{x:u+c.x,y:f+c.y});},setSelectedAgent:r=>{n("selectedAgent",r);}};return {store:t,setStore:n,actions:s,isActive:o,isHolding:i}};var pt=e=>(e.tagName||"").toLowerCase();var Gp=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox","combobox"],Up=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},St=e=>{if(document.designMode==="on")return true;let t=Up(e);if(!t)return false;if(t.isContentEditable)return true;let n=pt(t);return Gp.some(o=>o===n||o===t.role)},_u=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let n=t.selectionStart??0;return (t.selectionEnd??0)-n>0}return false},Pu=()=>{let e=window.getSelection();return e?e.toString().length>0:false};var os="data-react-grab",ku="react-grab-fonts",Wp="https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap",Kp=()=>{if(document.getElementById(ku)||!document.head)return;let e=document.createElement("link");e.id=ku,e.rel="stylesheet",e.href=Wp,document.head.appendChild(e);},Ou=e=>{Kp();let t=document.querySelector(`[${os}]`);if(t){let r=t.shadowRoot?.querySelector(`[${os}]`);if(r instanceof HTMLDivElement&&t.shadowRoot)return r}let n=document.createElement("div");n.setAttribute(os,"true"),n.style.zIndex=String(2147483647),n.style.position="fixed",n.style.inset="0",n.style.pointerEvents="none";let o=n.attachShadow({mode:"open"});{let r=document.createElement("style");r.textContent=e,o.appendChild(r);}let i=document.createElement("div");i.setAttribute(os,"true"),o.appendChild(i);let s=document.body??document.documentElement;return s.appendChild(n),setTimeout(()=>{s.appendChild(n);},fu),i};var La=typeof window<"u",Xp=e=>0,Yp=e=>{},Ve=La?(Object.getOwnPropertyDescriptor(Window.prototype,"requestAnimationFrame")?.value??window.requestAnimationFrame).bind(window):Xp,Ge=La?(Object.getOwnPropertyDescriptor(Window.prototype,"cancelAnimationFrame")?.value??window.cancelAnimationFrame).bind(window):Yp,Mu=()=>La?new Promise(e=>Ve(()=>e())):Promise.resolve();var Nu="0.5.30",ss=`bippy-${Nu}`,Ru=Object.defineProperty,qp=Object.prototype.hasOwnProperty,Ur=()=>{},Lu=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},as=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&"getFiberRoots"in e),Du=false,Iu,jr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>Du?true:(e&&typeof e.inject=="function"&&(Iu=e.inject.toString()),!!Iu?.includes("(injected)")),rs=new Set,mo=new Set,Fu=e=>{let t=new Map,n=0,o={_instrumentationIsActive:false,_instrumentationSource:ss,checkDCE:Lu,hasUnsupportedRendererAttached:false,inject(i){let s=++n;return t.set(s,i),mo.add(i),o._instrumentationIsActive||(o._instrumentationIsActive=true,rs.forEach(r=>r())),s},on:Ur,onCommitFiberRoot:Ur,onCommitFiberUnmount:Ur,onPostCommitFiberRoot:Ur,renderers:t,supportsFiber:true,supportsFlight:true};try{Ru(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return o},set(r){if(r&&typeof r=="object"){let c=o.renderers;o=r,c.size>0&&(c.forEach((l,u)=>{mo.add(l),r.renderers.set(u,l);}),is(e));}}});let i=window.hasOwnProperty,s=!1;Ru(window,"hasOwnProperty",{configurable:!0,value:function(...r){try{if(!s&&r[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,s=!0,-0}catch{}return i.apply(this,r)},writable:!0});}catch{is(e);}return o},is=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Lu,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=ss,t._instrumentationIsActive=!1;let n=as(t);if(n||(t.on=Ur),t.renderers.size){t._instrumentationIsActive=!0,rs.forEach(s=>s());return}let o=t.inject,i=jr(t);i&&!n&&(Du=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=s=>{let r=o(s);return mo.add(s),i&&t.renderers.set(r,s),t._instrumentationIsActive=!0,rs.forEach(c=>c()),r};}(t.renderers.size||t._instrumentationIsActive||jr())&&e?.();}catch{}},Da=()=>qp.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Wn=e=>Da()?(is(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Fu(e),$u=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Fa=()=>{try{$u()&&Wn();}catch{}};var ls=0,cs=1;var $a=5;var us=11,Ha=13,Hu=14,ds=15,Ba=16;var za=19;var Va=26,Ga=27,Ua=28,ja=30;var Jo=e=>{switch(e.tag){case cs:case us:case ls:case Hu:case ds:return true;default:return false}};function Qo(e,t,n=false){if(!e)return null;let o=t(e);if(o instanceof Promise)return (async()=>{if(await o===true)return e;let s=n?e.return:e.child;for(;s;){let r=await Ka(s,t,n);if(r)return r;s=n?null:s.sibling;}return null})();if(o===true)return e;let i=n?e.return:e.child;for(;i;){let s=Wa(i,t,n);if(s)return s;i=n?null:i.sibling;}return null}var Wa=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let o=n?e.return:e.child;for(;o;){let i=Wa(o,t,n);if(i)return i;o=n?null:o.sibling;}return null},Ka=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let o=n?e.return:e.child;for(;o;){let i=await Ka(o,t,n);if(i)return i;o=n?null:o.sibling;}return null};var Xa=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?Xa(t.type||t.render):null},Kn=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let o=Xa(t);return o&&(o.displayName||o.name)||null};var Xn=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return !!e?._instrumentationIsActive||as(e)||jr(e)};var po=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let o=n.findFiberByHostInstance?.(e);if(o)return o}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Ya=new Set;var ig=Object.create,Xu=Object.defineProperty,sg=Object.getOwnPropertyDescriptor,ag=Object.getOwnPropertyNames,lg=Object.getPrototypeOf,cg=Object.prototype.hasOwnProperty,ug=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),dg=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=ag(t),s=0,r=i.length,c;st[l]).bind(null,c),enumerable:!(o=sg(t,c))||o.enumerable});return e},fg=(e,t,n)=>(n=e==null?{}:ig(lg(e)),dg(Xu(n,"default",{value:e,enumerable:true}),e)),Bu=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,mg=["rsc://","file:///","webpack://","webpack-internal://","node:","turbopack://","metro://","/app-pages-browser/"],zu="about://React/",pg=["","eval",""],Yu=/\.(jsx|tsx|ts|js)$/,gg=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,hg=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,qu="(at Server)",bg=/(^|@)\S+:\d+/,Zu=/^\s*at .*(\S+:\d+|\(native\))/m,yg=/^(eval@)?(\[native code\])?$/;var ms=(e,t)=>{{let n=e.split(` -`),o=[];for(let i of n)if(/^\s*at\s+/.test(i)){let s=Vu(i,void 0)[0];s&&o.push(s);}else if(/^\s*in\s+/.test(i)){let s=i.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");o.push({functionName:s,source:i});}else if(i.match(bg)){let s=Gu(i,void 0)[0];s&&o.push(s);}return Ja(o,t)}},Ju=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=e.startsWith("(")&&/:\d+\)$/.test(e),n=t?e.slice(1,-1):e,o=/(.+?)(?::(\d+))?(?::(\d+))?$/,i=o.exec(n);return i?[i[1],i[2]||void 0,i[3]||void 0]:[n,void 0,void 0]},Ja=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var Vu=(e,t)=>Ja(e.split(` -`).filter(o=>!!o.match(Zu)),t).map(o=>{let i=o;i.includes("(eval ")&&(i=i.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=i.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=s.match(/ (\(.+\)$)/);s=r?s.replace(r[0],""):s;let c=Ju(r?r[1]:s),l=r&&s||void 0,u=["eval",""].includes(c[0])?void 0:c[0];return {functionName:l,fileName:u,lineNumber:c[1]?+c[1]:void 0,columnNumber:c[2]?+c[2]:void 0,source:i}});var Gu=(e,t)=>Ja(e.split(` -`).filter(o=>!o.match(yg)),t).map(o=>{let i=o;if(i.includes(" > eval")&&(i=i.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!i.includes("@")&&!i.includes(":"))return {functionName:i};{let s=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,r=i.match(s),c=r&&r[1]?r[1]:void 0,l=Ju(i.replace(s,""));return {functionName:c,fileName:l[0],lineNumber:l[1]?+l[1]:void 0,columnNumber:l[2]?+l[2]:void 0,source:i}}});var wg=ug((e,t)=>{(function(n,o){typeof e=="object"&&t!==void 0?o(e):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.sourcemapCodec={}));})(void 0,function(n){let o=44,i=59,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(64),c=new Uint8Array(128);for(let L=0;L>>=1,D&&(y=-2147483648|-y),A+y}function u(L,A,y){let h=A-y;h=h<0?-h<<1|1:h<<1;do{let S=h&31;h>>>=5,h>0&&(S|=32),L.write(r[S]);}while(h>0);return A}function f(L,A){return L.pos>=A?false:L.peek()!==o}let p=1024*16,b=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(L){return Buffer.from(L.buffer,L.byteOffset,L.byteLength).toString()}}:{decode(L){let A="";for(let y=0;y0?y+b.decode(A.subarray(0,h)):y}}class H{constructor(A){this.pos=0,this.buffer=A;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(A){let{buffer:y,pos:h}=this,S=y.indexOf(A,h);return S===-1?y.length:S}}let M=[];function Y(L){let{length:A}=L,y=new H(L),h=[],S=[],D=0;for(;y.pos0&&y.write(o),h[0]=u(y,D,h[0]),u(y,B,0),u(y,$,0);let W=S.length===6?1:0;u(y,W,0),S.length===6&&u(y,S[5],0);for(let V of N)u(y,V,0);for(A++;Aw||oe===w&&de>=v)break;A=E(L,A,y,h);}return y.write(o),h[0]=u(y,w,h[0]),u(y,v,0),A}function T(L){let{length:A}=L,y=new H(L),h=[],S=[],D=0,B=0,w=0,v=0,$=0,N=0,W=0,V=0;do{let oe=y.indexOf(";"),de=0;for(;y.pospe;Pe--){let ge=W;W=l(y,W),V=l(y,W===ge?V:0);let Te=l(y,0);ke.push([Te,W,V]);}}else ke=[[pe]];Se.push(ke);}while(f(y,oe))}ie.bindings=Se,h.push(ie),S.push(ie);}D++,y.pos=oe+1;}while(y.pos0&&y.write(o),h[1]=u(y,S[1],h[1]);let V=(S.length===6?1:0)|(N?2:0)|($?4:0);if(u(y,V,0),S.length===6){let{4:oe,5:de}=S;oe!==h[2]&&(h[3]=0),h[2]=u(y,oe,h[2]),h[3]=u(y,de,h[3]);}if(N){let{0:oe,1:de,2:I}=S.callsite;oe===h[4]?de!==h[5]&&(h[6]=0):(h[5]=0,h[6]=0),h[4]=u(y,oe,h[4]),h[5]=u(y,de,h[5]),h[6]=u(y,I,h[6]);}if(W)for(let oe of W){oe.length>1&&u(y,-oe.length,0);let de=oe[0][0];u(y,de,0);let I=D,G=B;for(let Q=1;Qw||de===w&&I>=v)break;A=R(L,A,y,h);}return h[0]0&&A.write(i),w.length===0)continue;let v=0;for(let $=0;$0&&A.write(o),v=u(A,N[0],v),N.length!==1&&(y=u(A,N[1],y),h=u(A,N[2],h),S=u(A,N[3],S),N.length!==4&&(D=u(A,N[4],D)));}}return A.flush()}n.decode=fe,n.decodeGeneratedRanges=T,n.decodeOriginalScopes=Y,n.encode=ue,n.encodeGeneratedRanges=C,n.encodeOriginalScopes=m,Object.defineProperty(n,"__esModule",{value:true});});}),Qu=fg(wg()),ed=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,xg=/^data:application\/json[^,]+base64,/,vg=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,td=typeof WeakRef<"u",Wr=new Map,fs=new Map,Cg=e=>td&&e instanceof WeakRef,Uu=(e,t,n,o)=>{if(n<0||n>=e.length)return null;let i=e[n];if(!i||i.length===0)return null;let s=null;for(let f of i)if(f[0]<=o)s=f;else break;if(!s||s.length<4)return null;let[,r,c,l]=s;if(r===void 0||c===void 0||l===void 0)return null;let u=t[r];return u?{columnNumber:l,fileName:u,lineNumber:c+1}:null},Eg=(e,t,n)=>{if(e.sections){let o=null;for(let r of e.sections)if(t>r.offset.line||t===r.offset.line&&n>=r.offset.column)o=r;else break;if(!o)return null;let i=t-o.offset.line,s=t===o.offset.line?n-o.offset.column:n;return Uu(o.map.mappings,o.map.sources,i,s)}return Uu(e.mappings,e.sources,t-1,n)},Sg=(e,t)=>{let n=t.split(` -`),o;for(let s=n.length-1;s>=0&&!o;s--){let r=n[s].match(vg);r&&(o=r[1]||r[2]);}if(!o)return null;let i=ed.test(o);if(!(xg.test(o)||i||o.startsWith("/"))){let s=e.split("/");s[s.length-1]=o,o=s.join("/");}return o},Ag=e=>({file:e.file,mappings:(0, Qu.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Tg=e=>{let t=e.sections.map(({map:o,offset:i})=>({map:{...o,mappings:(0, Qu.decode)(o.mappings)},offset:i})),n=new Set;for(let o of t)for(let i of o.map.sources)n.add(i);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},ju=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(ed);if(!n)return true;let o=n[0].toLowerCase();return o==="http:"||o==="https:"},_g=async(e,t=fetch)=>{if(!ju(e))return null;let n;try{let i=await t(e);if(!i.ok)return null;n=await i.text();}catch{return null}if(!n)return null;let o=Sg(e,n);if(!o||!ju(o))return null;try{let i=await t(o);if(!i.ok)return null;let s=await i.json();return "sections"in s?Tg(s):Ag(s)}catch{return null}},Pg=async(e,t=true,n)=>{if(t&&Wr.has(e)){let s=Wr.get(e);if(s==null)return null;if(Cg(s)){let r=s.deref();if(r)return r;Wr.delete(e);}else return s}if(t&&fs.has(e))return fs.get(e);let o=_g(e,n);t&&fs.set(e,o);let i=await o;return t&&fs.delete(e),t&&(i===null?Wr.set(e,null):Wr.set(e,td?new WeakRef(i):i)),i},kg=async(e,t=true,n)=>await Promise.all(e.map(async o=>{if(!o.fileName)return o;let i=await Pg(o.fileName,t,n);if(!i||typeof o.lineNumber!="number"||typeof o.columnNumber!="number")return o;let s=Eg(i,o.lineNumber,o.columnNumber);return s?{...o,source:s.fileName&&o.source?o.source.replace(o.fileName,s.fileName):o.source,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber,isSymbolicated:true}:o})),Qa=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",Og=()=>{let e=Wn();for(let t of [...Array.from(mo),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Wu=e=>{for(let t of mo){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},On=e=>` - in ${e}`,Mg=(e,t)=>{let n=On(e);return t&&(n+=` (at ${t})`),n},qa=false,Za=(e,t)=>{if(!e||qa)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,qa=true;let o=Og();Wu(null);let i=console.error,s=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let b;try{if(t){let x=function(){throw Error()};if(Object.defineProperty(x.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(x,[]);}catch(H){b=H;}Reflect.construct(e,[],x);}else {try{x.call();}catch(H){b=H;}e.call(x.prototype);}}else {try{throw Error()}catch(H){b=H;}let x=e();x&&typeof x.catch=="function"&&x.catch(()=>{});}}catch(x){if(x instanceof Error&&b instanceof Error&&typeof x.stack=="string")return [x.stack,b.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,p]=l.DetermineComponentFrameRoot();if(f&&p){let b=f.split(` -`),x=p.split(` -`),H=0,M=0;for(;H=1&&M>=0&&b[H]!==x[M];)M--;for(;H>=1&&M>=0;H--,M--)if(b[H]!==x[M]){if(H!==1||M!==1)do if(H--,M--,M<0||b[H]!==x[M]){let Y=` -${b[H].replace(" at new "," at ")}`,m=Kn(e);return m&&Y.includes("")&&(Y=Y.replace("",m)),Y}while(H>=1&&M>=0);break}}}finally{qa=false,Error.prepareStackTrace=n,Wu(o),console.error=i,console.warn=s;}let r=e?Kn(e):"";return r?On(r):""},Rg=(e,t)=>{let n=e.tag,o="";switch(n){case Ua:o=On("Activity");break;case cs:o=Za(e.type,true);break;case us:o=Za(e.type.render,false);break;case ls:case ds:o=Za(e.type,false);break;case $a:case Va:case Ga:o=On(e.type);break;case Ba:o=On("Lazy");break;case Ha:o=e.child!==t&&t!==null?On("Suspense Fallback"):On("Suspense");break;case za:o=On("SuspenseList");break;case ja:o=On("ViewTransition");break;default:return ""}return o},Ig=e=>{try{let t="",n=e,o=null;do{t+=Rg(n,o);let i=n._debugInfo;if(i&&Array.isArray(i))for(let s=i.length-1;s>=0;s--){let r=i[s];typeof r.name=="string"&&(t+=Mg(r.name,r.env));}o=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?` +var Ep=(e,t)=>()=>(e&&(t=e(e=0)),t);var Il,Xy,Uf,Yy,qy,Zy,Jy,Bn,br,Rl,jf,Qy,yi,$l,Ws,hr,ew,Ht,yr,tw,nw,ow,rw,iw,sw,wn,Nl,Yf,Wf,Kf,aw,Xf,Ll,Dl,lw,cw,uw,Fl,dw,Hl,qf=Ep(()=>{Il=new Set(["SCRIPT","STYLE","NOSCRIPT","TEMPLATE","LINK","META","HEAD","IFRAME","OBJECT","EMBED"]),Xy={H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",H5:"Heading 5",H6:"Heading 6",P:"Paragraph",BUTTON:"Button",A:"Link",IMG:"Image",NAV:"Navigation",HEADER:"Header",FOOTER:"Footer",MAIN:"Main",SECTION:"Section",ARTICLE:"Article",ASIDE:"Aside",UL:"List",OL:"List",LI:"List Item",FORM:"Form",INPUT:"Input",TEXTAREA:"Textarea",SELECT:"Select",TABLE:"Table",VIDEO:"Video",FIGURE:"Figure",FIGCAPTION:"Caption",BLOCKQUOTE:"Quote"},Uf=new Set(["inline","inline-block","inline-flex"]),Yy=60,qy=50,Zy=26,Jy=/^(flex|grid|p[xytrbl]?-|m[xytrbl]?-|w-|h-|bg-|text-|border-|rounded|shadow|opacity-|gap-|space-|font-|leading-|tracking-|overflow-|z-|relative|absolute|fixed|sticky|hidden|block|inline|sr-only|col-|row-|items-|justify-|self-|order-|grow|shrink|basis-)/,Bn=e=>Math.max(0,Math.min(1,e)),br=e=>e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055,Rl=e=>e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4),jf=(e,t,n)=>{let o=e+.3963377774*t+.2158037573*n,i=e-.1055613458*t-.0638541728*n,s=e-.0894841775*t-1.291485548*n,r=o*o*o,c=i*i*i,l=s*s*s;return {red:Bn(br(4.0767416621*r-3.3077115913*c+.2309699292*l)),green:Bn(br(-1.2684380046*r+2.6097574011*c-.3413193965*l)),blue:Bn(br(-0.0041960863*r-.7034186147*c+1.707614701*l))}},Qy=(e,t,n)=>{let o=(e+16)/116,i=t/500+o,s=o-n/200,r=6/29,c=m=>m>r?m*m*m:3*r*r*(m-4/29),l=.95047*c(i),u=1*c(o),f=1.08883*c(s);return {red:Bn(br(3.2404542*l-1.5371385*u-.4985314*f)),green:Bn(br(-0.969266*l+1.8760108*u+.041556*f)),blue:Bn(br(.0556434*l-.2040259*u+1.0572252*f))}},yi=e=>e!==void 0?parseFloat(e):1,$l=e=>{let t=e.match(/rgba?\(\s*([\d.]+)[,\s]+([\d.]+)[,\s]+([\d.]+)(?:\s*[,/]\s*([\d.]+))?\s*\)/);if(t)return {red:parseFloat(t[1])/255,green:parseFloat(t[2])/255,blue:parseFloat(t[3])/255,alpha:yi(t[4])};let n=e.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})?$/i);if(n)return {red:parseInt(n[1],16)/255,green:parseInt(n[2],16)/255,blue:parseInt(n[3],16)/255,alpha:n[4]!==void 0?parseInt(n[4],16)/255:1};let o=e.match(/oklab\(\s*([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/);if(o)return {...jf(parseFloat(o[1]),parseFloat(o[2]),parseFloat(o[3])),alpha:yi(o[4])};let i=e.match(/oklch\(\s*([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/);if(i){let c=parseFloat(i[3])*Math.PI/180,l=parseFloat(i[2]);return {...jf(parseFloat(i[1]),l*Math.cos(c),l*Math.sin(c)),alpha:yi(i[4])}}let s=e.match(/^lab\(\s*([\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/);if(s)return {...Qy(parseFloat(s[1]),parseFloat(s[2]),parseFloat(s[3])),alpha:yi(s[4])};let r=e.match(/color\(\s*srgb\s+([-\d.]+)\s+([-\d.]+)\s+([-\d.]+)(?:\s*\/\s*([\d.]+))?\s*\)/);return r?{red:Bn(parseFloat(r[1])),green:Bn(parseFloat(r[2])),blue:Bn(parseFloat(r[3])),alpha:yi(r[4])}:null},Ws=e=>Math.round(e*255).toString(16).padStart(2,"0"),hr=e=>{let t=$l(e);if(!t)return e;let n=`#${Ws(t.red)}${Ws(t.green)}${Ws(t.blue)}`;return t.alpha<1?`${n}${Ws(t.alpha)}`:n},ew=(e,t,n)=>{let o=Rl(e),i=Rl(t),s=Rl(n),r=Math.cbrt(.4122214708*o+.5363325363*i+.0514459929*s),c=Math.cbrt(.2119034982*o+.6806995451*i+.1073969566*s),l=Math.cbrt(.0883024619*o+.2817188376*i+.6299787005*s),u=.2104542553*r+.793617785*c-.0040720468*l,f=1.9779984951*r-2.428592205*c+.4505937099*l,m=.0259040371*r+.7827717662*c-.808675766*l,y=Math.sqrt(f*f+m*m),_=Math.atan2(m,f)*(180/Math.PI);return _<0&&(_+=360),{lightness:u,chroma:y,hue:_}},Ht=e=>{let t=$l(e);if(!t)return null;let n=ew(t.red,t.green,t.blue),o={mode:"oklch",l:n.lightness,c:n.chroma,h:n.hue};return t.alpha!==1&&(o.alpha=t.alpha),{gamut:"rgb",mode:"hex",value:o}},yr=e=>{if(e==="transparent")return true;let t=$l(e);return t!==null&&t.alpha===0},tw={"to top":0,"to right":90,"to bottom":180,"to left":270,"to top right":45,"to bottom right":135,"to bottom left":225,"to top left":315},nw=e=>{let t=e.match(/^linear-gradient\((.+)\)$/);if(!t)return null;let n=t[1],o=180,i=n,s=n.match(/^([\d.]+)deg\s*,\s*/);if(s)o=parseFloat(s[1]),i=n.slice(s[0].length);else for(let[u,f]of Object.entries(tw))if(n.startsWith(u+",")||n.startsWith(u+" ")){o=f,i=n.slice(u.length+1).trim();break}let r=[],c=/(rgba?\([^)]+\))\s*([\d.]+%)?/g,l;for(;l=c.exec(i);){let u=Ht(l[1]);u&&r.push({position:l[2]?parseFloat(l[2])/100:-1,color:u,midpoint:.5});}return r.length<2?null:(r.some(u=>u.position<0)&&r.forEach((u,f)=>{u.position<0&&(u.position=f/(r.length-1));}),{type:"gradient",stops:r,interpolation:"oklab",shape:"linear",angle:o,length:1,isVisible:true,center:{x:.5,y:.5}})},ow=["monospace","courier","menlo","monaco","consolas","fira code","jetbrains","source code","ui-monospace"],rw=e=>{let t=e.toLowerCase();for(let n of ow)if(t.includes(n))return "System Monospace";return "System Sans-Serif"},iw=e=>e>=700?"Bold":e>=500?"Medium":e>=300?"Regular":"Light",sw=e=>{if(e==="none")return [];let t=[];for(let n of e.split(/,(?![^(]*\))/)){let o=n.trim();if(o.startsWith("inset"))continue;let i=o.match(/(rgba?\([^)]+\))\s+([-\d.]+px)\s+([-\d.]+px)\s+([-\d.]+px)(?:\s+([-\d.]+px))?/);if(!i)continue;let s=Ht(i[1]);s&&t.push({color:s,offsetX:i[2],offsetY:i[3],blur:i[4],spread:i[5]??"0px",isVisible:true});}return t},wn=e=>{if(e==="auto")return "fit-content";let t=parseFloat(e);return isNaN(t)?e:t===0?0:e},Nl=e=>e==="normal"||e==="flex-start"?"start":e==="flex-end"?"end":e,Yf=e=>{let t=e;for(;t;){let n=getComputedStyle(t).backgroundColor;if(!yr(n))return n;t=t.parentElement;}return "rgb(255, 255, 255)"},Wf=e=>{let t=getComputedStyle(e);return !yr(t.backgroundColor)||parseFloat(t.borderTopWidth)>0||parseFloat(t.paddingTop)>0||parseFloat(t.paddingLeft)>0||t.backgroundImage!=="none"},Kf=e=>e.replace(/[-_]/g," ").replace(/([a-z])([A-Z])/g,"$1 $2").split(" ").map(t=>t.charAt(0).toUpperCase()+t.slice(1)).join(" ").trim().slice(0,50),aw=e=>{if(e.id)return Kf(e.id);let t=e.getAttribute("aria-label");if(t)return t.slice(0,50);let n=Xy[e.tagName];if(n)return n;let o=Array.from(e.classList).find(i=>i.length>3&&!Jy.test(i));return o?Kf(o):null},Xf="0123456789ABCDEFGHJKMNPQRSTVWXYZ",Ll=()=>{let e="";for(let t=0;te.display!=="none"&&!(e.visibility==="hidden"&&e.overflow==="hidden"),dw=(e,t,n)=>{let o=[],i=n?Yf(t):e.backgroundColor;if(!yr(i)){let r=Ht(i);r&&o.push({type:"solid",color:r,isVisible:true});}let s=e.backgroundImage;if(s&&s!=="none")for(let r of s.split(/,(?![^(]*\))/)){let c=r.trim();if(c.startsWith("linear-gradient")){let l=nw(c);l&&o.push(l);}}return o},Hl=(e,t={})=>{let n=Array.isArray(e)?e.filter(b=>b instanceof Element):e instanceof Element?[e]:[];if(n.length===0)return "";let o=t.maxDepth??qy,i=t.getComponentName,s=0,r={},c={},l=()=>(s++,`${s.toString(36).toUpperCase()}-0`),u=(b,C)=>{let x=i?.(b)??aw(b);return {label:x??C,labelIsModified:!!x}},f=(b,C)=>{let x=l(),S=getComputedStyle(C),E={},te=hr(S.color),K=Ht(S.color);K&&(E.fill=[{type:"solid",color:K,isVisible:true}]);let k=parseInt(S.fontWeight)||400,ne=rw(S.fontFamily);E.font={family:ne,style:iw(k),weight:k,isItalic:S.fontStyle==="italic"};let O=parseFloat(S.fontSize)||16,T=parseFloat(S.letterSpacing),w=parseFloat(S.lineHeight),g=S.whiteSpace==="nowrap"||S.whiteSpace==="pre"||b.length{if(!b||b==="none")return {color:Ht("rgb(0, 0, 0)"),isVisible:false};let x=b==="currentColor"?getComputedStyle(C).color:b;return {color:Ht(x)??Ht(getComputedStyle(C).fill)??Ht("rgb(0, 0, 0)"),isVisible:true}},y=b=>{let C=b.tagName.toLowerCase();if(C==="g"){let k=l(),ne=[];for(let w of b.children){let g=y(w);g&&ne.push(g);}let O={},T=getComputedStyle(b);return T.opacity!=="1"&&(O.opacity=T.opacity),r[k]={id:k,label:"Shape",textValue:"",component:"SVGVisualElement",tag:"g",styles:O,"~":false,labelIsModified:false,props:{}},ne.length>0&&(c[k]=ne),k}if(!cw.has(C))return null;let x=l(),S={},E={};for(let k of b.attributes)if(k.name==="fill")S.fill=m(k.value,b);else if(k.name==="stroke"){let ne=Ht(k.value==="currentColor"?getComputedStyle(b).color:k.value);ne&&(S.stroke={color:ne,isVisible:k.value!=="none"});}else k.name!=="style"&&k.name!=="class"&&(S[k.name]=k.value);let te=getComputedStyle(b);if(S.fill||(S.fill=m(te.fill,b)),!S.stroke&&te.stroke&&te.stroke!=="none"){let k=Ht(te.stroke);k&&(S.stroke={color:k,isVisible:true});}!S["stroke-width"]&&te.strokeWidth&&te.strokeWidth!=="0"&&(S["stroke-width"]=te.strokeWidth),!S["stroke-linecap"]&&te.strokeLinecap&&te.strokeLinecap!=="butt"&&(S["stroke-linecap"]=te.strokeLinecap),!S["stroke-linejoin"]&&te.strokeLinejoin&&te.strokeLinejoin!=="miter"&&(S["stroke-linejoin"]=te.strokeLinejoin),te.opacity!=="1"&&(E.opacity=te.opacity);let K={path:"Path",circle:"Circle",ellipse:"Ellipse",rect:"Rect",line:"Line",polyline:"Polyline",polygon:"Polygon",use:"Use"};return r[x]={id:x,label:K[C]??"Shape",textValue:"",component:"SVGVisualElement",tag:C,styles:E,"~":false,labelIsModified:false,props:S},x},_=(b,C)=>{let x={},S=b.getAttribute("width"),E=b.getAttribute("height"),te=b.getAttribute("viewBox");S&&(x.width=S),E&&(x.height=E),te&&(x.viewBox=te),x.xmlns="http://www.w3.org/2000/svg",x.preserveAspectRatio=b.getAttribute("preserveAspectRatio")??"none",x.fill=m(b.getAttribute("fill"),b);let K={},k=getComputedStyle(b);k.opacity!=="1"&&(K.opacity=k.opacity),r[C]={id:C,label:"SVG",textValue:"",component:"SVG",styles:K,"~":false,labelIsModified:false,props:x};let ne=[];for(let O of b.children){let T=y(O);T&&ne.push(T);}return ne.length>0&&(c[C]=ne),C},V=(b,C=false,x=0)=>{if(x>o)return "";let S=l(),E=getComputedStyle(b),te=b.tagName.toLowerCase(),K=lw.has(te),k={},ne={};if(b instanceof SVGSVGElement)return _(b,S);if(K){let U=b.getBoundingClientRect();k.width=U.width,k.height=U.height,k.flexShrink="0",E.opacity!=="1"&&(k.opacity=E.opacity);let X=E.color;X&&!yr(X)&&(k.backgroundColor=hr(X)),yr(E.backgroundColor)||(k.backgroundColor=hr(E.backgroundColor));let xe=Ht(k.backgroundColor?String(k.backgroundColor):X),ge={};xe&&(ge.fill=[{type:"solid",color:xe,isVisible:true}]);let{label:fe,labelIsModified:Se}=u(b,"Rectangle");return r[S]={id:S,label:fe,textValue:"",component:"Rectangle",styles:k,"~":false,labelIsModified:Se,props:{},...Object.keys(ge).length>0&&{styleMeta:ge}},S}k.display="flex";let O=E.display;O.includes("flex")?(k.flexDirection=E.flexDirection,k.justifyContent=Nl(E.justifyContent),k.alignItems=Nl(E.alignItems),(E.flexWrap==="wrap"||E.flexWrap==="wrap-reverse")&&(k.flexWrap="wrap")):O==="inline"||O==="inline-block"?(k.flexDirection="row",k.flexWrap="wrap",k.justifyContent="start",k.alignItems="center"):Array.from(b.children).filter(xe=>{let ge=getComputedStyle(xe);return ge.display!=="none"&&ge.visibility!=="hidden"}).some(xe=>{let ge=getComputedStyle(xe).display;return !Uf.has(ge)&&ge!=="contents"})?(k.flexDirection="column",k.justifyContent="start",k.alignItems="start"):(k.flexDirection="row",k.flexWrap="wrap",k.justifyContent="start",k.alignItems="center");let T=E.gap;k.gap=T&&T!=="normal"&&T!=="0px"?T:0;let w=b.getBoundingClientRect();k.width=`${w.width}px`,k.height=C?`${w.height}px`:"fit-content",E.minWidth!=="0px"&&E.minWidth!=="auto"&&(k.minWidth=wn(E.minWidth)),E.maxWidth!=="none"&&(k.maxWidth=wn(E.maxWidth)),E.minHeight!=="0px"&&E.minHeight!=="auto"&&(k.minHeight=wn(E.minHeight)),E.maxHeight!=="none"&&(k.maxHeight=wn(E.maxHeight));let g=[E.borderTopLeftRadius,E.borderTopRightRadius,E.borderBottomRightRadius,E.borderBottomLeftRadius];if(g.some(U=>U!=="0px")){let U=g.every(X=>X===g[0]);k.borderRadius=U?g[0]:g.join(" ");}let A=[E.paddingTop,E.paddingRight,E.paddingBottom,E.paddingLeft];A[0]===A[2]&&A[1]===A[3]?(k.paddingBlock=wn(A[0]),k.paddingInline=wn(A[1])):(k.paddingTop=wn(A[0]),k.paddingRight=wn(A[1]),k.paddingBottom=wn(A[2]),k.paddingLeft=wn(A[3])),C||(k.flexShrink="0"),E.flexGrow!=="0"&&(k.flexGrow=E.flexGrow),E.flexBasis!=="auto"&&E.flexBasis!=="0px"&&(k.flexBasis=E.flexBasis);let F=E.alignSelf;if(F&&F!=="auto"&&F!=="normal"&&(k.alignSelf=Nl(F)),["hidden","clip","scroll","auto"].includes(E.overflow)&&(k.overflow="clip"),E.position==="absolute"||E.position==="fixed"){k.position="absolute";let U=parseFloat(E.left),X=parseFloat(E.top);isNaN(U)||(k.left=U),isNaN(X)||(k.top=X);}E.opacity!=="1"&&(k.opacity=E.opacity);let H=C?Yf(b):E.backgroundColor;yr(H)||(k.backgroundColor=hr(H));let v=dw(E,b,C);v.length>0&&(ne.fill=v);let P=Dl.map(U=>E.getPropertyValue(`border-${U.toLowerCase()}-width`));if(P.some(U=>parseFloat(U)>0))if(P.every(X=>X===P[0])&&Dl.every(X=>E.getPropertyValue(`border-${X.toLowerCase()}-color`)===E.getPropertyValue("border-top-color"))&&parseFloat(P[0])>0){k.borderWidth=E.getPropertyValue("border-top-width"),k.borderStyle=E.getPropertyValue("border-top-style"),k.borderColor=hr(E.getPropertyValue("border-top-color"));let X=Ht(E.getPropertyValue("border-top-color"));X&&(ne.borders={all:{type:"color",color:X,width:k.borderWidth,style:k.borderStyle,isVisible:true}});}else {let X={};for(let xe of Dl){let ge=xe.toLowerCase(),fe=E.getPropertyValue(`border-${ge}-width`);if(parseFloat(fe)<=0)continue;k[`border${xe}Width`]=fe,k[`border${xe}Style`]=E.getPropertyValue(`border-${ge}-style`),k[`border${xe}Color`]=hr(E.getPropertyValue(`border-${ge}-color`));let Se=Ht(E.getPropertyValue(`border-${ge}-color`));Se&&(X[ge]={type:"color",color:Se,width:fe,style:E.getPropertyValue(`border-${ge}-style`),isVisible:true});}Object.keys(X).length>0&&(ne.borders=X);}if(E.boxShadow&&E.boxShadow!=="none"){k.boxShadow=E.boxShadow;let U=sw(E.boxShadow);U.length>0&&(ne.outerShadow=U);}let z=Array.from(b.childNodes).some(U=>{if(U.nodeType!==Node.ELEMENT_NODE)return false;let X=U;return Il.has(X.tagName)||X.namespaceURI==="http://www.w3.org/2000/svg"&&X.tagName!=="svg"?false:Fl(getComputedStyle(X))}),$=(b.textContent??"").replace(/\s+/g," ").trim(),q=Object.keys(ne).length>0||Wf(b);if(!z&&$&&!q){let U=f($,b),X=r[U],{label:xe,labelIsModified:ge}=u(b,"Text");return xe!=="Text"&&(X.label=xe,X.labelIsModified=ge),X.id=S,r[S]=X,delete r[U],S}let G=Array.from(b.children).filter(U=>Il.has(U.tagName)?false:Fl(getComputedStyle(U))),ae=Array.from(b.childNodes).filter(U=>U.nodeType===Node.TEXT_NODE).map(U=>(U.textContent??"").trim()).join(""),pe=E.paddingTop!=="0px"||E.paddingRight!=="0px"||E.paddingBottom!=="0px"||E.paddingLeft!=="0px"||E.gap&&E.gap!=="normal"&&E.gap!=="0px";if(G.length===1&&!q&&!ae&&!pe&&!O.includes("flex")&&!C)return V(G[0],false,x);let R=[],W="",Q=()=>{let U=W.replace(/\s+/g," ").trim();U&&R.push(f(U,b)),W="";};for(let U of b.childNodes){if(U.nodeType===Node.TEXT_NODE){W+=U.textContent??"";continue}if(U.nodeType!==Node.ELEMENT_NODE)continue;let X=U;if(Il.has(X.tagName))continue;let xe=getComputedStyle(X);if(!Fl(xe))continue;if(X instanceof SVGElement&&X.tagName==="svg"){Q();let Ue=V(X,false,x+1);Ue&&R.push(Ue);continue}if(X.namespaceURI==="http://www.w3.org/2000/svg")continue;let ge=xe.display;if(Uf.has(ge)&&!Wf(X)&&!X.querySelector("svg")&&!X.querySelector("img")&&!X.querySelector(uw)){Q();let Ue=(X.textContent??"").replace(/\s+/g," ").trim();Ue&&R.push(f(Ue,X));}else {Q();let Ue=V(X,false,x+1);Ue&&R.push(Ue);}}Q(),R.length>0&&(c[S]=R);let{label:_e,labelIsModified:he}=u(b,"Frame"),Ae={id:S,label:_e,textValue:"",component:"Frame",styles:k,"~":false,labelIsModified:he};return Object.keys(ne).length>0&&(Ae.styleMeta=ne),r[S]=Ae,S},L=[],J={};for(let b of n){let C=V(b,true);if(!C)continue;L.push(C),J[Ll()]=C;let x=r[C];if(x){let S=b.getBoundingClientRect();x.tempX=Math.round(S.left),x.tempY=Math.round(S.top),x.styles.left=Math.round(S.left),x.styles.top=Math.round(S.top);}}if(L.length===0)return "";let p={id:Ll(),fileId:Ll(),topLevelNodeIds:L,nodes:r,images:{},parentToChildrenIndex:c,oldIdToNewIdMap:J};return ``};});var _p=(e,t)=>e===t,on=Symbol("solid-proxy"),Pp=typeof Proxy=="function",Br=Symbol("solid-track"),Xi={equals:_p},Rc=Hc,Ft=1,Fr=2,Nc={owned:null,cleanups:null,context:null,owner:null},va={},$e=null,re=null,Vo=null,qe=null,ft=null,Ct=null,Zi=0;function Mn(e,t){let n=qe,o=$e,i=e.length===0,s=t===void 0?o:t,r=i?Nc:{owned:null,cleanups:null,context:s?s.context:null,owner:s},c=i?e:()=>e(()=>St(()=>Xn(r)));$e=r,qe=null;try{return Mt(c,!0)}finally{qe=n,$e=o;}}function Y(e,t){t=t?Object.assign({},Xi,t):Xi;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},o=i=>(typeof i=="function"&&(i=i(n.value)),$c(n,i));return [Fc.bind(n),o]}function kc(e,t,n){let o=es(e,t,true,Ft);Go(o);}function se(e,t,n){let o=es(e,t,false,Ft);Go(o);}function ye(e,t,n){Rc=Rp;let o=es(e,t,false,Ft);(o.user=true),Ct?Ct.push(o):Go(o);}function ue(e,t,n){n=n?Object.assign({},Xi,n):Xi;let o=es(e,t,true,0);return o.observers=null,o.observerSlots=null,o.comparator=n.equals||void 0,Go(o),Fc.bind(o)}function kp(e){return e&&typeof e=="object"&&"then"in e}function Aa(e,t,n){let o,i,s;typeof t=="function"?(o=e,i=t,s={}):(o=true,i=e,s=t||{});let r=null,c=va,f=false,m="initialValue"in s,y=typeof o=="function"&&ue(o),_=new Set,[V,L]=(s.storage||Y)(s.initialValue),[J,p]=Y(void 0),[b,C]=Y(void 0,{equals:false}),[x,S]=Y(m?"ready":"unresolved");function E(O,T,w,g){return r===O&&(r=null,g!==void 0&&(m=true),(O===c||T===c)&&s.onHydrated&&queueMicrotask(()=>s.onHydrated(g,{value:T})),c=va,te(T,w)),T}function te(O,T){Mt(()=>{T===void 0&&L(()=>O),S(T!==void 0?"errored":m?"ready":"unresolved"),p(T);for(let w of _.keys())w.decrement();_.clear();},false);}function K(){let O=$r,T=V(),w=J();if(w!==void 0&&!r)throw w;return qe&&!qe.user&&O,T}function k(O=true){if(O!==false&&f)return;f=false;let T=y?y():o;if(T==null||T===false){E(r,St(V));return}let w,g=c!==va?c:St(()=>{try{return i(T,{value:V(),refetching:O})}catch(A){w=A;}});if(w!==void 0){E(r,void 0,Ki(w),T);return}else if(!kp(g))return E(r,g,void 0,T),g;return r=g,"v"in g?(g.s===1?E(r,g.v,void 0,T):E(r,void 0,Ki(g.v),T),g):(f=true,queueMicrotask(()=>f=false),Mt(()=>{S(m?"refreshing":"pending"),C();},false),g.then(A=>E(g,A,void 0,T),A=>E(g,void 0,Ki(A),T)))}Object.defineProperties(K,{state:{get:()=>x()},error:{get:()=>J()},loading:{get(){let O=x();return O==="pending"||O==="refreshing"}},latest:{get(){if(!m)return K();let O=J();if(O&&!r)throw O;return V()}}});let ne=$e;return y?kc(()=>(ne=$e,k(false))):k(false),[K,{refetch:O=>Lc(ne,()=>k(O)),mutate:L}]}function Ji(e){return Mt(e,false)}function St(e){if(qe===null)return e();let t=qe;qe=null;try{return Vo?Vo.untrack(e):e()}finally{qe=t;}}function He(e,t,n){let o=Array.isArray(e),i,s=n&&n.defer;return r=>{let c;if(o){c=Array(e.length);for(let u=0;ut(c,i,r));return i=c,l}}function mt(e){ye(()=>St(e));}function Oe(e){return $e===null||($e.cleanups===null?$e.cleanups=[e]:$e.cleanups.push(e)),e}function Qi(){return qe}function Lc(e,t){let n=$e,o=qe;$e=e,qe=null;try{return Mt(t,!0)}catch(i){ts(i);}finally{$e=n,qe=o;}}var[f0,Mc]=Y(false);var $r;function Fc(){let e=re;if(this.sources&&(this.state))if((this.state)===Ft)Go(this);else {let t=ft;ft=null,Mt(()=>Yi(this),false),ft=t;}if(qe){let t=this.observers?this.observers.length:0;qe.sources?(qe.sources.push(this),qe.sourceSlots.push(t)):(qe.sources=[this],qe.sourceSlots=[t]),this.observers?(this.observers.push(qe),this.observerSlots.push(qe.sources.length-1)):(this.observers=[qe],this.observerSlots=[qe.sources.length-1]);}return e&&re.sources.has(this)?this.tValue:this.value}function $c(e,t,n){let o=e.value;if(!e.comparator||!e.comparator(o,t)){e.value=t;e.observers&&e.observers.length&&Mt(()=>{for(let i=0;i1e6)throw ft=[],new Error},false);}return t}function Go(e){if(!e.fn)return;Xn(e);let t=Zi;Oc(e,e.value,t);}function Oc(e,t,n){let o,i=$e,s=qe;qe=$e=e;try{o=e.fn(t);}catch(r){return e.pure&&((e.state=Ft,e.owned&&e.owned.forEach(Xn),e.owned=null)),e.updatedAt=n+1,ts(r)}finally{qe=s,$e=i;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?$c(e,o):e.value=o,e.updatedAt=n);}function es(e,t,n,o=Ft,i){let s={fn:e,state:o,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:$e,context:$e?$e.context:null,pure:n};if($e===null||$e!==Nc&&($e.owned?$e.owned.push(s):$e.owned=[s]),Vo);return s}function Hr(e){let t=re;if((e.state)===0)return;if((e.state)===Fr)return Yi(e);if(e.suspense&&St(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt=0;o--){if(e=n[o],t);if((e.state)===Ft)Go(e);else if((e.state)===Fr){let i=ft;ft=null,Mt(()=>Yi(e,n[0]),false),ft=i;}}}function Mt(e,t){if(ft)return e();let n=false;t||(ft=[]),Ct?n=true:Ct=[],Zi++;try{let o=e();return Op(n),o}catch(o){n||(Ct=null),ft=null,ts(o);}}function Op(e){if(ft&&(Hc(ft),ft=null),e)return;let n=Ct;Ct=null,n.length&&Mt(()=>Rc(n),false);}function Hc(e){for(let t=0;t=0;t--)Xn(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Xn(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Ki(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function ts(e,t=$e){let o=Ki(e);throw o;}var Ea=Symbol("fallback");function qi(e){for(let t=0;t1?[]:null;return Oe(()=>qi(s)),()=>{let l=e()||[],u=l.length,f,m;return l[Br],St(()=>{let _,V,L,J,p,b,C,x,S;if(u===0)r!==0&&(qi(s),s=[],o=[],i=[],r=0,c&&(c=[])),n.fallback&&(o=[Ea],i[0]=Mn(E=>(s[0]=E,n.fallback())),r=1);else if(r===0){for(i=new Array(u),m=0;m=b&&x>=b&&o[C]===l[x];C--,x--)L[x]=i[C],J[x]=s[C],c&&(p[x]=c[C]);for(_=new Map,V=new Array(x+1),m=x;m>=b;m--)S=l[m],f=_.get(S),V[m]=f===void 0?-1:f,_.set(S,m);for(f=b;f<=C;f++)S=o[f],m=_.get(S),m!==void 0&&m!==-1?(L[m]=i[f],J[m]=s[f],c&&(p[m]=c[f]),m=V[m],_.set(S,m)):s[f]();for(m=b;mqi(s)),()=>{let u=e()||[],f=u.length;return u[Br],St(()=>{if(f===0)return c!==0&&(qi(s),s=[],o=[],i=[],c=0,r=[]),n.fallback&&(o=[Ea],i[0]=Mn(y=>(s[0]=y,n.fallback())),c=1),i;for(o[0]===Ea&&(s[0](),s=[],o=[],i=[],c=0),l=0;lu[l]):l>=o.length&&(i[l]=Mn(m));for(;le(t||{}))}function Wi(){return true}var Fp={get(e,t,n){return t===on?n:e.get(t)},has(e,t){return t===on?true:e.has(t)},set:Wi,deleteProperty:Wi,getOwnPropertyDescriptor(e,t){return {configurable:true,enumerable:true,get(){return e.get(t)},set:Wi,deleteProperty:Wi}},ownKeys(e){return e.keys()}};function Ca(e){return (e=typeof e=="function"?e():e)?e:{}}function $p(){for(let e=0,t=this.length;e=0;c--){let l=Ca(e[c])[r];if(l!==void 0)return l}},has(r){for(let c=e.length-1;c>=0;c--)if(r in Ca(e[c]))return true;return false},keys(){let r=[];for(let c=0;c=0;r--){let c=e[r];if(!c)continue;let l=Object.getOwnPropertyNames(c);for(let u=l.length-1;u>=0;u--){let f=l[u];if(f==="__proto__"||f==="constructor")continue;let m=Object.getOwnPropertyDescriptor(c,f);if(!o[f])o[f]=m.get?{enumerable:true,configurable:true,get:$p.bind(n[f]=[m.get.bind(c)])}:m.value!==void 0?m:void 0;else {let y=n[f];y&&(m.get?y.push(m.get.bind(c)):m.value!==void 0&&y.push(()=>m.value));}}}let i={},s=Object.keys(o);for(let r=s.length-1;r>=0;r--){let c=s[r],l=o[c];l&&l.get?Object.defineProperty(i,c,l):i[c]=l?l.value:void 0;}return i}var Hp=e=>`Stale read from <${e}>.`;function rn(e){let t="fallback"in e&&{fallback:()=>e.fallback};return ue(Np(()=>e.each,e.children,t||void 0))}function ns(e){let t="fallback"in e&&{fallback:()=>e.fallback};return ue(Lp(()=>e.each,e.children,t||void 0))}function we(e){let t=e.keyed,n=ue(()=>e.when,void 0,void 0),o=t?n:ue(n,void 0,{equals:(i,s)=>!i==!s});return ue(()=>{let i=o();if(i){let s=e.children;return typeof s=="function"&&s.length>0?St(()=>s(t?i:()=>{if(!St(o))throw Hp("Show");return n()})):s}return e.fallback},void 0,void 0)}var Vp=["allowfullscreen","async","alpha","autofocus","autoplay","checked","controls","default","disabled","formnovalidate","hidden","indeterminate","inert","ismap","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","seamless","selected","adauctionheaders","browsingtopics","credentialless","defaultchecked","defaultmuted","defaultselected","defer","disablepictureinpicture","disableremoteplayback","preservespitch","shadowrootclonable","shadowrootcustomelementregistry","shadowrootdelegatesfocus","shadowrootserializable","sharedstoragewritable"],zp=new Set(["className","value","readOnly","noValidate","formNoValidate","isMap","noModule","playsInline","adAuctionHeaders","allowFullscreen","browsingTopics","defaultChecked","defaultMuted","defaultSelected","disablePictureInPicture","disableRemotePlayback","preservesPitch","shadowRootClonable","shadowRootCustomElementRegistry","shadowRootDelegatesFocus","shadowRootSerializable","sharedStorageWritable",...Vp]),Gp=new Set(["innerHTML","textContent","innerText","children"]),Up=Object.assign(Object.create(null),{className:"class",htmlFor:"for"}),jp=Object.assign(Object.create(null),{class:"className",novalidate:{$:"noValidate",FORM:1},formnovalidate:{$:"formNoValidate",BUTTON:1,INPUT:1},ismap:{$:"isMap",IMG:1},nomodule:{$:"noModule",SCRIPT:1},playsinline:{$:"playsInline",VIDEO:1},readonly:{$:"readOnly",INPUT:1,TEXTAREA:1},adauctionheaders:{$:"adAuctionHeaders",IFRAME:1},allowfullscreen:{$:"allowFullscreen",IFRAME:1},browsingtopics:{$:"browsingTopics",IMG:1},defaultchecked:{$:"defaultChecked",INPUT:1},defaultmuted:{$:"defaultMuted",AUDIO:1,VIDEO:1},defaultselected:{$:"defaultSelected",OPTION:1},disablepictureinpicture:{$:"disablePictureInPicture",VIDEO:1},disableremoteplayback:{$:"disableRemotePlayback",AUDIO:1,VIDEO:1},preservespitch:{$:"preservesPitch",AUDIO:1,VIDEO:1},shadowrootclonable:{$:"shadowRootClonable",TEMPLATE:1},shadowrootdelegatesfocus:{$:"shadowRootDelegatesFocus",TEMPLATE:1},shadowrootserializable:{$:"shadowRootSerializable",TEMPLATE:1},sharedstoragewritable:{$:"sharedStorageWritable",IFRAME:1,IMG:1}});function Wp(e,t){let n=jp[e];return typeof n=="object"?n[t]?n.$:void 0:n}var Kp=new Set(["beforeinput","click","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"]);var Be=e=>ue(()=>e());function Yp(e,t,n){let o=n.length,i=t.length,s=o,r=0,c=0,l=t[i-1].nextSibling,u=null;for(;rf-c){let V=t[r];for(;c{i=s,t===document?e():j(t,e(),t.firstChild?null:void 0,n);},o.owner),()=>{i(),t.textContent="";}}function Z(e,t,n,o){let i,s=()=>{let c=document.createElement("template");return c.innerHTML=e,c.content.firstChild},r=()=>(i||(i=s())).cloneNode(true);return r.cloneNode=r,r}function it(e,t=window.document){let n=t[zc]||(t[zc]=new Set);for(let o=0,i=e.length;oi.call(e,n[1],s));}else e.addEventListener(t,n,typeof n!="function"&&n);}function go(e,t,n={}){let o=Object.keys(t||{}),i=Object.keys(n),s,r;for(s=0,r=i.length;stypeof t.ref=="function"&&Xe(t.ref,e)),se(()=>Qp(e,t,n,true,i,true)),i}function Xe(e,t,n){return St(()=>e(t,n))}function j(e,t,n,o){if(n!==void 0&&!o&&(o=[]),typeof t!="function")return Wo(e,t,o,n);se(i=>Wo(e,t(),i,n),o);}function Qp(e,t,n,o,i={},s=false){t||(t={});for(let r in i)if(!(r in t)){if(r==="children")continue;i[r]=Uc(e,r,null,i[r],n,s,t);}for(let r in t){if(r==="children"){continue}let c=t[r];i[r]=Uc(e,r,c,i[r],n,s,t);}}function eg(e){return e.toLowerCase().replace(/-([a-z])/g,(t,n)=>n.toUpperCase())}function Gc(e,t,n){let o=t.trim().split(/\s+/);for(let i=0,s=o.length;iObject.defineProperty(e,"target",{configurable:true,value:l}),r=()=>{let l=t[n];if(l&&!t.disabled){let u=t[`${n}Data`];if(u!==void 0?l.call(t,u,e):l.call(t,e),e.cancelBubble)return}return t.host&&typeof t.host!="string"&&!t.host._$host&&t.contains(e.target)&&s(t.host),true},c=()=>{for(;r()&&(t=t._$host||t.parentNode||t.host););};if(Object.defineProperty(e,"currentTarget",{configurable:true,get(){return t||document}}),e.composedPath){let l=e.composedPath();s(l[0]);for(let u=0;u{let l=t();for(;typeof l=="function";)l=l();n=Wo(e,l,n,o);}),()=>n;if(Array.isArray(t)){let l=[],u=n&&Array.isArray(n);if(Ta(l,t,n,i))return se(()=>n=Wo(e,l,n,o,true)),()=>n;if(l.length===0){if(n=jo(e,n,o),c)return n}else u?n.length===0?jc(e,l,o):Yp(e,n,l):(n&&jo(e),jc(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(c)return n=jo(e,n,o,t);jo(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Ta(e,t,n,o){let i=false;for(let s=0,r=t.length;s=0;r--){let c=t[r];if(i!==c){let l=c.parentNode===e;!s&&!r?l?e.replaceChild(i,c):e.insertBefore(i,n):l&&c.remove();}else s=true;}}else e.insertBefore(i,n);return [i]}var Kc=`/*! tailwindcss v4.1.17 | MIT License | https://tailwindcss.com */ +@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial;--tw-duration:initial;--tw-ease:initial;--tw-contain-size:initial;--tw-contain-layout:initial;--tw-contain-paint:initial;--tw-contain-style:initial;--tw-content:""}}}@layer theme{:root,:host{--font-sans:"Geist",ui-sans-serif,system-ui,sans-serif;--font-mono:ui-monospace,SFMono-Regular,"SF Mono",Menlo,Consolas,"Liberation Mono",monospace;--color-yellow-500:oklch(79.5% .184 86.047);--color-black:#000;--color-white:#fff;--spacing:4px;--text-sm:14px;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--radius-sm:4px;--ease-out:cubic-bezier(0,0,.2,1);--animate-ping:ping 1s cubic-bezier(0,0,.2,1)infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1)infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--transition-fast:.1s;--transition-normal:.15s;--transition-slow:.2s}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.touch-hitbox{position:relative}.touch-hitbox:before{content:"";width:100%;min-width:44px;height:100%;min-height:44px;display:block;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.-top-0\\.5{top:calc(var(--spacing)*-.5)}.top-0{top:calc(var(--spacing)*0)}.top-0\\.5{top:calc(var(--spacing)*.5)}.top-1\\/2{top:50%}.top-full{top:100%}.-right-0\\.5{right:calc(var(--spacing)*-.5)}.right-full{right:100%}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing)*0)}.left-0\\.5{left:calc(var(--spacing)*.5)}.left-1\\.5{left:calc(var(--spacing)*1.5)}.left-1\\/2{left:50%}.left-2\\.5{left:calc(var(--spacing)*2.5)}.left-full{left:100%}.z-1{z-index:1}.z-10{z-index:10}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}.m-0{margin:calc(var(--spacing)*0)}.-mx-2{margin-inline:calc(var(--spacing)*-2)}.mx-0\\.5{margin-inline:calc(var(--spacing)*.5)}.-my-1\\.5{margin-block:calc(var(--spacing)*-1.5)}.my-0\\.5{margin-block:calc(var(--spacing)*.5)}.mt-0\\.5{margin-top:calc(var(--spacing)*.5)}.mt-2\\.5{margin-top:calc(var(--spacing)*2.5)}.mr-0\\.5{margin-right:calc(var(--spacing)*.5)}.mr-1\\.5{margin-right:calc(var(--spacing)*1.5)}.mr-2\\.5{margin-right:calc(var(--spacing)*2.5)}.mb-0\\.5{margin-bottom:calc(var(--spacing)*.5)}.mb-1{margin-bottom:calc(var(--spacing)*1)}.mb-1\\.5{margin-bottom:calc(var(--spacing)*1.5)}.mb-2\\.5{margin-bottom:calc(var(--spacing)*2.5)}.-ml-\\[2px\\]{margin-left:-2px}.ml-0\\.5{margin-left:calc(var(--spacing)*.5)}.ml-1{margin-left:calc(var(--spacing)*1)}.ml-2\\.5{margin-left:calc(var(--spacing)*2.5)}.ml-4{margin-left:calc(var(--spacing)*4)}.ml-auto{margin-left:auto}.line-clamp-5{-webkit-line-clamp:5;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.size-1\\.5{width:calc(var(--spacing)*1.5);height:calc(var(--spacing)*1.5)}.size-4{width:calc(var(--spacing)*4);height:calc(var(--spacing)*4)}.size-\\[18px\\]{width:18px;height:18px}.h-0{height:calc(var(--spacing)*0)}.h-1\\.5{height:calc(var(--spacing)*1.5)}.h-2{height:calc(var(--spacing)*2)}.h-2\\.5{height:calc(var(--spacing)*2.5)}.h-3{height:calc(var(--spacing)*3)}.h-4{height:calc(var(--spacing)*4)}.h-\\[17px\\]{height:17px}.h-fit{height:fit-content}.max-h-\\[240px\\]{max-height:240px}.min-h-0{min-height:calc(var(--spacing)*0)}.min-h-4{min-height:calc(var(--spacing)*4)}.w-0{width:calc(var(--spacing)*0)}.w-1\\.5{width:calc(var(--spacing)*1.5)}.w-2{width:calc(var(--spacing)*2)}.w-3\\.5{width:calc(var(--spacing)*3.5)}.w-4{width:calc(var(--spacing)*4)}.w-5{width:calc(var(--spacing)*5)}.w-\\[calc\\(100\\%\\+16px\\)\\]{width:calc(100% + 16px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.max-w-\\[280px\\]{max-width:280px}.max-w-full{max-width:100%}.min-w-0{min-width:calc(var(--spacing)*0)}.min-w-\\[100px\\]{min-width:100px}.min-w-\\[150px\\]{min-width:150px}.flex-1{flex:1}.flex-shrink,.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.flex-grow,.grow{flex-grow:1}.-translate-x-1\\/2{--tw-translate-x:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.-translate-y-1\\/2{--tw-translate-y:calc(calc(1/2*100%)*-1);translate:var(--tw-translate-x)var(--tw-translate-y)}.scale-75{--tw-scale-x:75%;--tw-scale-y:75%;--tw-scale-z:75%;scale:var(--tw-scale-x)var(--tw-scale-y)}.scale-100{--tw-scale-x:100%;--tw-scale-y:100%;--tw-scale-z:100%;scale:var(--tw-scale-x)var(--tw-scale-y)}.-rotate-90{rotate:-90deg}.rotate-0{rotate:none}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.interactive-scale{transition-property:transform;transition-duration:var(--transition-normal);transition-timing-function:cubic-bezier(.34,1.56,.64,1)}@media (hover:hover) and (pointer:fine){.interactive-scale:hover{transform:scale(1.05)}}.interactive-scale:active{transform:scale(.97)}.press-scale{transition-property:transform;transition-duration:var(--transition-fast);transition-timing-function:ease-out}.press-scale:active{transform:scale(.97)}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.animate-ping{animation:var(--animate-ping)}.animate-pulse{animation:var(--animate-pulse)}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-pointer{cursor:pointer}.resize{resize:both}.resize-none{resize:none}.grid-cols-\\[0fr\\]{grid-template-columns:0fr}.grid-cols-\\[1fr\\]{grid-template-columns:1fr}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.gap-0\\.5{gap:calc(var(--spacing)*.5)}.gap-1{gap:calc(var(--spacing)*1)}.gap-1\\.5{gap:calc(var(--spacing)*1.5)}.gap-2{gap:calc(var(--spacing)*2)}.gap-\\[5px\\]{gap:5px}.self-stretch{align-self:stretch}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-y-auto{overflow-y:auto}.rounded-\\[1px\\]{border-radius:1px}.rounded-\\[10px\\]{border-radius:10px}.rounded-full{border-radius:3.40282e38px}.rounded-sm{border-radius:var(--radius-sm)}.rounded-t-\\[10px\\]{border-top-left-radius:10px;border-top-right-radius:10px}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.rounded-l-\\[10px\\]{border-top-left-radius:10px;border-bottom-left-radius:10px}.rounded-l-none{border-top-left-radius:0;border-bottom-left-radius:0}.rounded-r-\\[10px\\]{border-top-right-radius:10px;border-bottom-right-radius:10px}.rounded-r-none{border-top-right-radius:0;border-bottom-right-radius:0}.rounded-b-\\[6px\\]{border-bottom-right-radius:6px;border-bottom-left-radius:6px}.rounded-b-\\[10px\\]{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.border{border-style:var(--tw-border-style);border-width:1px}.\\[border-width\\:0\\.5px\\]{border-width:.5px}.\\[border-top-width\\:0\\.5px\\]{border-top-width:.5px}.border-none{--tw-border-style:none;border-style:none}.border-solid{--tw-border-style:solid;border-style:solid}.border-\\[\\#B3B3B3\\]{border-color:#b3b3b3}.border-t-\\[\\#D9D9D9\\]{border-top-color:#d9d9d9}.bg-\\[\\#404040\\]{background-color:#404040}.bg-\\[\\#FEF2F2\\]{background-color:#fef2f2}.bg-black{background-color:var(--color-black)}.bg-black\\/5{background-color:#0000000d}@supports (color:color-mix(in lab, red, red)){.bg-black\\/5{background-color:color-mix(in oklab,var(--color-black)5%,transparent)}}.bg-black\\/25{background-color:#00000040}@supports (color:color-mix(in lab, red, red)){.bg-black\\/25{background-color:color-mix(in oklab,var(--color-black)25%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-0{padding:calc(var(--spacing)*0)}.px-0\\.25{padding-inline:calc(var(--spacing)*.25)}.px-1\\.5{padding-inline:calc(var(--spacing)*1.5)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-\\[3px\\]{padding-inline:3px}.py-0\\.5{padding-block:calc(var(--spacing)*.5)}.py-0\\.25{padding-block:calc(var(--spacing)*.25)}.py-1{padding-block:calc(var(--spacing)*1)}.py-1\\.5{padding-block:calc(var(--spacing)*1.5)}.py-2{padding-block:calc(var(--spacing)*2)}.py-px{padding-block:1px}.pt-1\\.5{padding-top:calc(var(--spacing)*1.5)}.pb-1{padding-bottom:calc(var(--spacing)*1)}.text-left{text-align:left}.font-sans{font-family:var(--font-sans)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-\\[10px\\]{font-size:10px}.text-\\[11px\\]{font-size:11px}.text-\\[12px\\]{font-size:12px}.text-\\[13px\\]{font-size:13px}.leading-3{--tw-leading:calc(var(--spacing)*3);line-height:calc(var(--spacing)*3)}.leading-3\\.5{--tw-leading:calc(var(--spacing)*3.5);line-height:calc(var(--spacing)*3.5)}.leading-4{--tw-leading:calc(var(--spacing)*4);line-height:calc(var(--spacing)*4)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.wrap-break-word{overflow-wrap:break-word}.text-ellipsis{text-overflow:ellipsis}.whitespace-nowrap{white-space:nowrap}.text-\\[\\#71717a\\]{color:#71717a}.text-\\[\\#B3B3B3\\]{color:#b3b3b3}.text-\\[\\#B91C1C\\]{color:#b91c1c}.text-\\[\\#B91C1C\\]\\/50{color:oklab(50.542% .168942 .0880134/.5)}.text-black{color:var(--color-black)}.text-black\\/25{color:#00000040}@supports (color:color-mix(in lab, red, red)){.text-black\\/25{color:color-mix(in oklab,var(--color-black)25%,transparent)}}.text-black\\/30{color:#0000004d}@supports (color:color-mix(in lab, red, red)){.text-black\\/30{color:color-mix(in oklab,var(--color-black)30%,transparent)}}.text-black\\/40{color:#0006}@supports (color:color-mix(in lab, red, red)){.text-black\\/40{color:color-mix(in oklab,var(--color-black)40%,transparent)}}.text-black\\/50{color:#00000080}@supports (color:color-mix(in lab, red, red)){.text-black\\/50{color:color-mix(in oklab,var(--color-black)50%,transparent)}}.text-black\\/60{color:#0009}@supports (color:color-mix(in lab, red, red)){.text-black\\/60{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.text-black\\/70{color:#000000b3}@supports (color:color-mix(in lab, red, red)){.text-black\\/70{color:color-mix(in oklab,var(--color-black)70%,transparent)}}.text-black\\/80{color:#000c}@supports (color:color-mix(in lab, red, red)){.text-black\\/80{color:color-mix(in oklab,var(--color-black)80%,transparent)}}.text-black\\/85{color:#000000d9}@supports (color:color-mix(in lab, red, red)){.text-black\\/85{color:color-mix(in oklab,var(--color-black)85%,transparent)}}.text-white{color:var(--color-white)}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,)var(--tw-slashed-zero,)var(--tw-numeric-figure,)var(--tw-numeric-spacing,)var(--tw-numeric-fraction,)}.antialiased{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);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,)}.filter{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,)}.filter-\\[drop-shadow\\(0px_1px_2px_\\#51515140\\)\\]{filter:drop-shadow(0 1px 2px #51515140)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,)var(--tw-backdrop-brightness,)var(--tw-backdrop-contrast,)var(--tw-backdrop-grayscale,)var(--tw-backdrop-hue-rotate,)var(--tw-backdrop-invert,)var(--tw-backdrop-opacity,)var(--tw-backdrop-saturate,)var(--tw-backdrop-sepia,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-columns\\,opacity\\]{transition-property:grid-template-columns,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\,opacity\\]{transition-property:grid-template-rows,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[opacity\\,transform\\]{transition-property:opacity,transform;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[top\\,left\\,width\\,height\\,opacity\\]{transition-property:top,left,width,height,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[transform\\,opacity\\]{transition-property:transform,opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-75{--tw-duration:75ms;transition-duration:75ms}.duration-100{--tw-duration:.1s;transition-duration:.1s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-out{--tw-ease:var(--ease-out);transition-timing-function:var(--ease-out)}.will-change-\\[opacity\\,transform\\]{will-change:opacity,transform}.contain-layout{--tw-contain-layout:layout;contain:var(--tw-contain-size,)var(--tw-contain-layout,)var(--tw-contain-paint,)var(--tw-contain-style,)}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\\[corner-shape\\:superellipse\\(1\\.25\\)\\]{corner-shape:superellipse(1.25)}.\\[font-synthesis\\:none\\]{font-synthesis:none}.\\[grid-area\\:1\\/1\\]{grid-area:1/1}.\\[scrollbar-color\\:transparent_transparent\\]{scrollbar-color:transparent transparent}.\\[scrollbar-width\\:thin\\]{scrollbar-width:thin}.group-focus-within\\:invisible:is(:where(.group):focus-within *){visibility:hidden}.group-focus-within\\:visible:is(:where(.group):focus-within *){visibility:visible}@media (hover:hover){.group-hover\\:invisible:is(:where(.group):hover *){visibility:hidden}.group-hover\\:visible:is(:where(.group):hover *){visibility:visible}}.before\\:\\!min-h-full:before{content:var(--tw-content);min-height:100%!important}.before\\:\\!min-w-full:before{content:var(--tw-content);min-width:100%!important}@media (hover:hover){.hover\\:bg-\\[\\#F5F5F5\\]:hover{background-color:#f5f5f5}.hover\\:bg-\\[\\#FEE2E2\\]:hover{background-color:#fee2e2}.hover\\:bg-black\\/10:hover{background-color:#0000001a}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-black\\/10:hover{background-color:color-mix(in oklab,var(--color-black)10%,transparent)}}.hover\\:text-\\[\\#B91C1C\\]:hover{color:#b91c1c}.hover\\:text-black:hover{color:var(--color-black)}.hover\\:text-black\\/60:hover{color:#0009}@supports (color:color-mix(in lab, red, red)){.hover\\:text-black\\/60:hover{color:color-mix(in oklab,var(--color-black)60%,transparent)}}.hover\\:opacity-100:hover{opacity:1}.hover\\:\\[scrollbar-color\\:rgba\\(0\\,0\\,0\\,0\\.15\\)_transparent\\]:hover{scrollbar-color:#00000026 transparent}}.disabled\\:cursor-default:disabled{cursor:default}.disabled\\:opacity-40:disabled{opacity:.4}}:host{all:initial;direction:ltr}@keyframes shake{0%,to{transform:translate(0)}15%{transform:translate(-3px)}30%{transform:translate(3px)}45%{transform:translate(-3px)}60%{transform:translate(3px)}75%{transform:translate(-2px)}90%{transform:translate(2px)}}@keyframes pop-in{0%{opacity:0;transform:scale(.9)}70%{opacity:1;transform:scale(1.02)}to{opacity:1;transform:scale(1)}}@keyframes pop-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.95)}}@keyframes slide-in-bottom{0%{opacity:0;transform:translateY(8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-top{0%{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:translateY(0)}}@keyframes slide-in-left{0%{opacity:0;transform:translate(-8px)}to{opacity:1;transform:translate(0)}}@keyframes slide-in-right{0%{opacity:0;transform:translate(8px)}to{opacity:1;transform:translate(0)}}@keyframes success-pop{0%{opacity:0;transform:scale(.9)}60%{opacity:1;transform:scale(1.1)}80%{transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes tooltip-fade-in{0%{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}@keyframes icon-loader-spin{0%{opacity:1}50%{opacity:.5}to{opacity:.2}}.icon-loader-bar{animation:.5s linear infinite icon-loader-spin}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.shimmer-text{color:#0000;background:linear-gradient(90deg,#71717a 0%,#a1a1aa 25%,#71717a 50%,#a1a1aa 75%,#71717a 100%) 0 0/200% 100%;-webkit-background-clip:text;background-clip:text;animation:2.5s linear infinite shimmer}@keyframes clock-flash{0%{transform:scale(1)}25%{transform:scale(1.2)}50%{transform:scale(.92)}75%{transform:scale(1.05)}to{transform:scale(1)}}.animate-clock-flash{will-change:transform;animation:.4s ease-out clock-flash}.animate-shake{will-change:transform;animation:.3s ease-out shake}.animate-pop-in{animation:pop-in var(--transition-normal)ease-out;will-change:transform,opacity}.animate-pop-out{animation:pop-out var(--transition-normal)ease-out forwards;will-change:transform,opacity}.animate-slide-in-bottom{animation:slide-in-bottom var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-top{animation:slide-in-top var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-left{animation:slide-in-left var(--transition-slow)ease-out;will-change:transform,opacity}.animate-slide-in-right{animation:slide-in-right var(--transition-slow)ease-out;will-change:transform,opacity}.animate-success-pop{will-change:transform,opacity;animation:.25s ease-out success-pop}.animate-tooltip-fade-in{animation:tooltip-fade-in var(--transition-fast)ease-out;will-change:transform,opacity}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-contain-size{syntax:"*";inherits:false}@property --tw-contain-layout{syntax:"*";inherits:false}@property --tw-contain-paint{syntax:"*";inherits:false}@property --tw-contain-style{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes ping{75%,to{opacity:0;transform:scale(2)}}@keyframes pulse{50%{opacity:.5}}`;var os=Symbol("store-raw"),Xo=Symbol("store-node"),On=Symbol("store-has"),Xc=Symbol("store-self");function Yc(e){let t=e[on];if(!t&&(Object.defineProperty(e,on,{value:t=new Proxy(e,ig)}),!Array.isArray(e))){let n=Object.keys(e),o=Object.getOwnPropertyDescriptors(e);for(let i=0,s=n.length;ie[on][t]),n}function qc(e){Qi()&&Gr(rs(e,Xo),Xc)();}function rg(e){return qc(e),Reflect.ownKeys(e)}var ig={get(e,t,n){if(t===os)return e;if(t===on)return n;if(t===Br)return qc(e),n;let o=rs(e,Xo),i=o[t],s=i?i():e[t];if(t===Xo||t===On||t==="__proto__")return s;if(!i){let r=Object.getOwnPropertyDescriptor(e,t);Qi()&&(typeof s!="function"||e.hasOwnProperty(t))&&!(r&&r.get)&&(s=Gr(o,t,s)());}return Yo(s)?Yc(s):s},has(e,t){return t===os||t===on||t===Br||t===Xo||t===On||t==="__proto__"?true:(Qi()&&Gr(rs(e,On),t)(),t in e)},set(){return true},deleteProperty(){return true},ownKeys:rg,getOwnPropertyDescriptor:og};function Zo(e,t,n,o=false){if(!o&&e[t]===n)return;let i=e[t],s=e.length;n===void 0?(delete e[t],e[On]&&e[On][t]&&i!==void 0&&e[On][t].$()):(e[t]=n,e[On]&&e[On][t]&&i===void 0&&e[On][t].$());let r=rs(e,Xo),c;if((c=Gr(r,t,i))&&c.$(()=>n),Array.isArray(e)&&e.length!==s){for(let l=e.length;l1){o=t.shift();let r=typeof o,c=Array.isArray(e);if(Array.isArray(o)){for(let l=0;l1){zr(e[o],t,[o].concat(n));return}i=e[o],n=[o].concat(n);}let s=t[0];typeof s=="function"&&(s=s(i,n),s===i)||o===void 0&&s==null||(s=qo(s),o===void 0||Yo(i)&&Yo(s)&&!Array.isArray(s)?Zc(i,s):Zo(e,o,s));}function ss(...[e,t]){let n=qo(e||{}),o=Array.isArray(n),i=Yc(n);function s(...r){Ji(()=>{o&&r.length===1?sg(n,r[0]):zr(n,r);});}return [i,s]}var is=new WeakMap,Jc={get(e,t){if(t===os)return e;let n=e[t],o;return Yo(n)?is.get(n)||(is.set(n,o=new Proxy(n,Jc)),o):n},set(e,t,n){return Zo(e,t,qo(n)),true},deleteProperty(e,t){return Zo(e,t,void 0,true),true}};function Kt(e){return t=>{if(Yo(t)){let n;(n=is.get(t))||is.set(t,n=new Proxy(t,Jc)),e(n);}return t}}var Qc="0.1.21";var Jo="210, 57, 192",eu=`rgba(${Jo}, 1)`,tu=`rgba(${Jo}, 0.4)`,nu=`rgba(${Jo}, 0.05)`,as=`rgba(${Jo}, 0.5)`,ls=`rgba(${Jo}, 0.08)`,ou=`rgba(${Jo}, 0.15)`,ru=50,Yn=8,iu=4,su=.2,_a=50,Pa=16,sn=4,Ur=100,au=15,lu=3,ka=["id","class","aria-label","data-testid","role","name","title"],cu=5e3,uu=["Meta","Control","Shift","Alt"],Ma=new Set(["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"]),jr="data-react-grab-frozen",Oa="data-react-grab-ignore",Wr=.9,du=1e3,fu=2147483600,mu=400,pu=100,ke=16,Ia=500,gu=300,hu=5,Ra=150,ho=14,Na=28,In=150,bu=50,yu=78,wu=28,xu=1500,vu=.75,La=32,Kr=3,Xr=20,Da=100,$t=1,Fa=50,Cu=50,Su=6,Eu=3,$a=2,Au=16,Tu=100,_u=50,Ha=.01,Pu=1e3,ku=20,Mu=2*1024*1024,Qo=100,Yr=200,qn=8,er=8,pn=8,bo=11,Ou=180,Iu=280,Ru=100,ht="bg-white",Xt={left:-9999,top:-9999},tr={left:"left center",right:"right center",top:"center top",bottom:"center bottom"},Nu='',Lu=1e3,Du=229,Ba=-9999,Va=new Set(["display","position","top","right","bottom","left","z-index","overflow","overflow-x","overflow-y","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","flex-direction","flex-wrap","justify-content","align-items","align-self","align-content","flex-grow","flex-shrink","flex-basis","order","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-template-areas","font-family","font-size","font-weight","font-style","line-height","letter-spacing","text-align","text-decoration-line","text-decoration-style","text-transform","text-overflow","text-shadow","white-space","word-break","overflow-wrap","vertical-align","color","background-color","background-image","background-position","background-size","background-repeat","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-left-radius","border-bottom-right-radius","box-shadow","opacity","transform","filter","backdrop-filter","object-fit","object-position"]);var ag=e=>typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e),lg=e=>{let t=e.trim();if(!t)return null;let n=parseFloat(t);return ag(n)?n:null},Fu=(e,t)=>{let n=e.split(",");if(n.length!==t)return null;let o=[];for(let i of n){let s=lg(i);if(s===null)return null;o.push(s);}return o},$u=(e,t,n,o)=>e===1&&t===0&&n===0&&o===1,cg=e=>e[0]===1&&e[1]===0&&e[2]===0&&e[3]===0&&e[4]===0&&e[5]===1&&e[6]===0&&e[7]===0&&e[8]===0&&e[9]===0&&e[10]===1&&e[11]===0&&e[15]===1,Hu=e=>{if(!e||e==="none")return "none";if(e.charCodeAt(0)===109)if(e.charCodeAt(6)===51){let n=e.length-1,o=Fu(e.slice(9,n),16);if(o)return o[12]=0,o[13]=0,o[14]=0,cg(o)?"none":`matrix3d(${o[0]}, ${o[1]}, ${o[2]}, ${o[3]}, ${o[4]}, ${o[5]}, ${o[6]}, ${o[7]}, ${o[8]}, ${o[9]}, ${o[10]}, ${o[11]}, 0, 0, 0, ${o[15]})`}else {let n=e.length-1,o=Fu(e.slice(7,n),6);if(o){let i=o[0],s=o[1],r=o[2],c=o[3];return $u(i,s,r,c)?"none":`matrix(${i}, ${s}, ${r}, ${c}, 0, 0)`}}return "none"},Bu=e=>e.isIdentity?"none":e.is2D?$u(e.a,e.b,e.c,e.d)?"none":`matrix(${e.a}, ${e.b}, ${e.c}, ${e.d}, 0, 0)`:e.m11===1&&e.m12===0&&e.m13===0&&e.m14===0&&e.m21===0&&e.m22===1&&e.m23===0&&e.m24===0&&e.m31===0&&e.m32===0&&e.m33===1&&e.m34===0&&e.m44===1?"none":`matrix3d(${e.m11}, ${e.m12}, ${e.m13}, ${e.m14}, ${e.m21}, ${e.m22}, ${e.m23}, ${e.m24}, ${e.m31}, ${e.m32}, ${e.m33}, ${e.m34}, 0, 0, 0, ${e.m44})`;var za=new WeakMap,Vu=()=>{za=new WeakMap;},dg=(e,t)=>{let n=t&&t!=="none",o=null,i=e.parentElement,s=0;for(;i&&i!==document.documentElement&&s=Eu)return "none";i=i.parentElement,s++;}return o?(n&&(o=o.multiply(new DOMMatrix(t))),Bu(o)):n?Hu(t):"none"},Ve=e=>{let t=performance.now(),n=za.get(e);if(n&&t-n.timestamp<16)return n.bounds;let o=e.getBoundingClientRect(),i=window.getComputedStyle(e),s=dg(e,i.transform),r;if(s!=="none"&&e instanceof HTMLElement){let c=e.offsetWidth,l=e.offsetHeight;if(c>0&&l>0){let u=o.left+o.width*.5,f=o.top+o.height*.5;r={borderRadius:i.borderRadius||"0px",height:l,transform:s,width:c,x:u-c*.5,y:f-l*.5};}else r={borderRadius:i.borderRadius||"0px",height:o.height,transform:s,width:o.width,x:o.left,y:o.top};}else r={borderRadius:i.borderRadius||"0px",height:o.height,transform:s,width:o.width,x:o.left,y:o.top};return za.set(e,{bounds:r,timestamp:t}),r};var tt=e=>!!(e?.isConnected??e?.ownerDocument?.contains(e));var Rn=e=>({x:e.x+e.width/2,y:e.y+e.height/2});var cs=({currentPosition:e,previousBounds:t,nextBounds:n})=>{if(!t||!n)return e;let o=Rn(t),i=Rn(n),s=t.width/2,r=e.x-o.x,c=s>0?r/s:0,l=n.width/2;return {...e,x:i.x+c*l}};var fg=e=>({current:{state:"idle"},wasActivatedByToggle:false,pendingCommentMode:false,hasAgentProvider:e.hasAgentProvider,keyHoldDuration:e.keyHoldDuration,pointer:{x:-1e3,y:-1e3},dragStart:{x:-1e3,y:-1e3},copyStart:{x:-1e3,y:-1e3},copyOffsetFromCenterX:0,detectedElement:null,frozenElement:null,frozenElements:[],frozenDragRect:null,lastGrabbedElement:null,lastCopiedElement:null,selectionFilePath:null,selectionLineNumber:null,inputText:"",pendingClickData:null,replySessionId:null,viewportVersion:0,grabbedBoxes:[],labelInstances:[],agentSessions:new Map,sessionElements:new Map,isTouchMode:false,theme:e.theme,activationTimestamp:null,previouslyFocusedElement:null,isAgentConnected:false,supportsUndo:false,supportsFollowUp:false,dismissButtonText:void 0,pendingAbortSessionId:null,contextMenuPosition:null,contextMenuElement:null,contextMenuClickOffset:null,selectedAgent:null}),zu=e=>{let[t,n]=ss(fg(e)),o=()=>t.current.state==="active",i=()=>t.current.state==="holding",s={startHold:r=>{r!==void 0&&n("keyHoldDuration",r),n("current",{state:"holding",startedAt:Date.now()});},release:()=>{t.current.state==="holding"&&n("current",{state:"idle"});},activate:()=>{n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement);},deactivate:()=>{n(Kt(r=>{r.current={state:"idle"},r.wasActivatedByToggle=false,r.pendingCommentMode=false,r.inputText="",r.frozenElement=null,r.frozenElements=[],r.frozenDragRect=null,r.pendingClickData=null,r.replySessionId=null,r.pendingAbortSessionId=null,r.activationTimestamp=null,r.previouslyFocusedElement=null,r.contextMenuPosition=null,r.contextMenuElement=null,r.contextMenuClickOffset=null,r.selectedAgent=null,r.lastCopiedElement=null;}));},toggle:()=>{t.activationTimestamp!==null?s.deactivate():(n("wasActivatedByToggle",true),s.activate());},freeze:()=>{if(t.current.state==="active"){let r=t.frozenElement??t.detectedElement;r&&n("frozenElement",r),n("current",Kt(c=>{c.state==="active"&&(c.phase="frozen");}));}},unfreeze:()=>{t.current.state==="active"&&(n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null),n("current",Kt(r=>{r.state==="active"&&(r.phase="hovering");})));},startDrag:r=>{t.current.state==="active"&&(s.clearFrozenElement(),n("dragStart",{x:r.x+window.scrollX,y:r.y+window.scrollY}),n("current",Kt(c=>{c.state==="active"&&(c.phase="dragging");})));},endDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Kt(r=>{r.state==="active"&&(r.phase="justDragged");})));},cancelDrag:()=>{t.current.state==="active"&&t.current.phase==="dragging"&&(n("dragStart",{x:-1e3,y:-1e3}),n("current",Kt(r=>{r.state==="active"&&(r.phase="hovering");})));},finishJustDragged:()=>{t.current.state==="active"&&t.current.phase==="justDragged"&&n("current",Kt(r=>{r.state==="active"&&(r.phase="hovering");}));},startCopy:()=>{let r=t.current.state==="active";n("current",{state:"copying",startedAt:Date.now(),wasActive:r});},completeCopy:r=>{n("pendingClickData",null),r&&n("lastCopiedElement",r);let c=t.current.state==="copying"?t.current.wasActive:false;n("current",{state:"justCopied",copiedAt:Date.now(),wasActive:c});},finishJustCopied:()=>{t.current.state==="justCopied"&&(t.current.wasActive&&!t.wasActivatedByToggle?n("current",{state:"active",phase:"hovering",isPromptMode:false,isPendingDismiss:false}):s.deactivate());},enterPromptMode:(r,c)=>{let l=Ve(c),u=l.x+l.width/2;n("copyStart",r),n("copyOffsetFromCenterX",r.x-u),n("pointer",r),n("frozenElement",c),n("wasActivatedByToggle",true),t.current.state!=="active"?(n("current",{state:"active",phase:"frozen",isPromptMode:true,isPendingDismiss:false}),n("activationTimestamp",Date.now()),n("previouslyFocusedElement",document.activeElement)):n("current",Kt(f=>{f.state==="active"&&(f.isPromptMode=true,f.phase="frozen");}));},exitPromptMode:()=>{t.current.state==="active"&&n("current",Kt(r=>{r.state==="active"&&(r.isPromptMode=false,r.isPendingDismiss=false);}));},setInputText:r=>{n("inputText",r);},clearInputText:()=>{n("inputText","");},setPendingDismiss:r=>{t.current.state==="active"&&n("current",Kt(c=>{c.state==="active"&&(c.isPendingDismiss=r);}));},setPointer:r=>{n("pointer",r);},setDetectedElement:r=>{n("detectedElement",r);},setFrozenElement:r=>{n("frozenElement",r),n("frozenElements",[r]),n("frozenDragRect",null);},setFrozenElements:r=>{n("frozenElements",r),n("frozenElement",r.length>0?r[0]:null),n("frozenDragRect",null);},setFrozenDragRect:r=>{n("frozenDragRect",r);},clearFrozenElement:()=>{n("frozenElement",null),n("frozenElements",[]),n("frozenDragRect",null);},setCopyStart:(r,c)=>{let l=Ve(c),u=l.x+l.width/2;n("copyStart",r),n("copyOffsetFromCenterX",r.x-u);},setLastGrabbed:r=>{n("lastGrabbedElement",r);},clearLastCopied:()=>{n("lastCopiedElement",null);},setWasActivatedByToggle:r=>{n("wasActivatedByToggle",r);},setPendingCommentMode:r=>{n("pendingCommentMode",r);},setTouchMode:r=>{n("isTouchMode",r);},setSelectionSource:(r,c)=>{n("selectionFilePath",r),n("selectionLineNumber",c);},setPendingClickData:r=>{n("pendingClickData",r);},clearReplySessionId:()=>{n("replySessionId",null);},incrementViewportVersion:()=>{n("viewportVersion",r=>r+1);},addGrabbedBox:r=>{n("grabbedBoxes",c=>[...c,r]);},removeGrabbedBox:r=>{n("grabbedBoxes",c=>c.filter(l=>l.id!==r));},clearGrabbedBoxes:()=>{n("grabbedBoxes",[]);},addLabelInstance:r=>{n("labelInstances",c=>[...c,r]);},updateLabelInstance:(r,c,l)=>{let u=t.labelInstances.findIndex(f=>f.id===r);u!==-1&&n("labelInstances",u,Kt(f=>{f.status=c,l!==void 0&&(f.errorMessage=l);}));},removeLabelInstance:r=>{n("labelInstances",c=>c.filter(l=>l.id!==r));},clearLabelInstances:()=>{n("labelInstances",[]);},setHasAgentProvider:r=>{n("hasAgentProvider",r);},setAgentCapabilities:r=>{n("supportsUndo",r.supportsUndo),n("supportsFollowUp",r.supportsFollowUp),n("dismissButtonText",r.dismissButtonText),n("isAgentConnected",r.isAgentConnected);},setPendingAbortSessionId:r=>{n("pendingAbortSessionId",r);},updateSessionBounds:()=>{let r=t.agentSessions;if(r.size===0)return;let c=new Map(r),l=false;for(let[u,f]of r){let m=t.sessionElements.get(u)??null;if(tt(m)){let y=Ve(m),_=f.selectionBounds[0],V=cs({currentPosition:f.position,previousBounds:_,nextBounds:y});c.set(u,{...f,selectionBounds:[y],position:V}),l=true;}}l&&n("agentSessions",c);},addAgentSession:(r,c,l)=>{let u=new Map(t.agentSessions);u.set(r,c),n("agentSessions",u);let f=new Map(t.sessionElements);f.set(r,l),n("sessionElements",f);},updateAgentSessionStatus:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,lastStatus:c}),n("agentSessions",u);},completeAgentSession:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,isStreaming:false,lastStatus:c??l.lastStatus}),n("agentSessions",u);},setAgentSessionError:(r,c)=>{let l=t.agentSessions.get(r);if(!l)return;let u=new Map(t.agentSessions);u.set(r,{...l,isStreaming:false,error:c}),n("agentSessions",u);},removeAgentSession:r=>{let c=new Map(t.agentSessions);c.delete(r),n("agentSessions",c);let l=new Map(t.sessionElements);l.delete(r),n("sessionElements",l);},showContextMenu:(r,c)=>{let l=Ve(c),u=l.x+l.width/2,f=l.y+l.height/2;n("contextMenuPosition",r),n("contextMenuElement",c),n("contextMenuClickOffset",{x:r.x-u,y:r.y-f});},hideContextMenu:()=>{n("contextMenuPosition",null),n("contextMenuElement",null),n("contextMenuClickOffset",null);},updateContextMenuPosition:()=>{let r=t.contextMenuElement,c=t.contextMenuClickOffset;if(!r||!c||!tt(r))return;let l=Ve(r),u=l.x+l.width/2,f=l.y+l.height/2;n("contextMenuPosition",{x:u+c.x,y:f+c.y});},setSelectedAgent:r=>{n("selectedAgent",r);}};return {store:t,setStore:n,actions:s,isActive:o,isHolding:i}};var pt=e=>(e.tagName||"").toLowerCase();var mg=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox","combobox"],pg=e=>{if(e.composed){let t=e.composedPath()[0];if(t instanceof HTMLElement)return t}else if(e.target instanceof HTMLElement)return e.target},Et=e=>{if(document.designMode==="on")return true;let t=pg(e);if(!t)return false;if(t.isContentEditable)return true;let n=pt(t);return mg.some(o=>o===n||o===t.role)},Gu=e=>{let t=e.target;if(t instanceof HTMLInputElement||t instanceof HTMLTextAreaElement){let n=t.selectionStart??0;return (t.selectionEnd??0)-n>0}return false},Uu=()=>{let e=window.getSelection();return e?e.toString().length>0:false};var us="data-react-grab",ju="react-grab-fonts",hg="https://fonts.googleapis.com/css2?family=Geist:wght@500&display=swap",bg=()=>{if(document.getElementById(ju)||!document.head)return;let e=document.createElement("link");e.id=ju,e.rel="stylesheet",e.href=hg,document.head.appendChild(e);},Wu=e=>{bg();let t=document.querySelector(`[${us}]`);if(t){let r=t.shadowRoot?.querySelector(`[${us}]`);if(r instanceof HTMLDivElement&&t.shadowRoot)return r}let n=document.createElement("div");n.setAttribute(us,"true"),n.style.zIndex=String(2147483647),n.style.position="fixed",n.style.inset="0",n.style.pointerEvents="none";let o=n.attachShadow({mode:"open"});{let r=document.createElement("style");r.textContent=e,o.appendChild(r);}let i=document.createElement("div");i.setAttribute(us,"true"),o.appendChild(i);let s=document.body??document.documentElement;return s.appendChild(n),setTimeout(()=>{s.appendChild(n);},Pu),i};var Ga=typeof window<"u",yg=e=>0,wg=e=>{},ze=Ga?(Object.getOwnPropertyDescriptor(Window.prototype,"requestAnimationFrame")?.value??window.requestAnimationFrame).bind(window):yg,Ge=Ga?(Object.getOwnPropertyDescriptor(Window.prototype,"cancelAnimationFrame")?.value??window.cancelAnimationFrame).bind(window):wg,Ku=()=>Ga?new Promise(e=>ze(()=>e())):Promise.resolve();var qu="0.5.30",ms=`bippy-${qu}`,Xu=Object.defineProperty,xg=Object.prototype.hasOwnProperty,qr=()=>{},Zu=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},ps=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>!!(e&&"getFiberRoots"in e),Ju=false,Yu,Zr=(e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__)=>Ju?true:(e&&typeof e.inject=="function"&&(Yu=e.inject.toString()),!!Yu?.includes("(injected)")),ds=new Set,yo=new Set,Qu=e=>{let t=new Map,n=0,o={_instrumentationIsActive:false,_instrumentationSource:ms,checkDCE:Zu,hasUnsupportedRendererAttached:false,inject(i){let s=++n;return t.set(s,i),yo.add(i),o._instrumentationIsActive||(o._instrumentationIsActive=true,ds.forEach(r=>r())),s},on:qr,onCommitFiberRoot:qr,onCommitFiberUnmount:qr,onPostCommitFiberRoot:qr,renderers:t,supportsFiber:true,supportsFlight:true};try{Xu(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return o},set(r){if(r&&typeof r=="object"){let c=o.renderers;o=r,c.size>0&&(c.forEach((l,u)=>{yo.add(l),r.renderers.set(u,l);}),fs(e));}}});let i=window.hasOwnProperty,s=!1;Xu(window,"hasOwnProperty",{configurable:!0,value:function(...r){try{if(!s&&r[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,s=!0,-0}catch{}return i.apply(this,r)},writable:!0});}catch{fs(e);}return o},fs=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Zu,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=ms,t._instrumentationIsActive=!1;let n=ps(t);if(n||(t.on=qr),t.renderers.size){t._instrumentationIsActive=!0,ds.forEach(s=>s());return}let o=t.inject,i=Zr(t);i&&!n&&(Ju=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=s=>{let r=o(s);return yo.add(s),i&&t.renderers.set(r,s),t._instrumentationIsActive=!0,ds.forEach(c=>c()),r};}(t.renderers.size||t._instrumentationIsActive||Zr())&&e?.();}catch{}},Ua=()=>xg.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Zn=e=>Ua()?(fs(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Qu(e),ed=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),ja=()=>{try{ed()&&Zn();}catch{}};var gs=0,hs=1;var Wa=5;var bs=11,Ka=13,td=14,ys=15,Xa=16;var Ya=19;var qa=26,Za=27,Ja=28,Qa=30;var Jn=e=>{switch(e.tag){case hs:case bs:case gs:case td:case ys:return true;default:return false}};function nr(e,t,n=false){if(!e)return null;let o=t(e);if(o instanceof Promise)return (async()=>{if(await o===true)return e;let s=n?e.return:e.child;for(;s;){let r=await tl(s,t,n);if(r)return r;s=n?null:s.sibling;}return null})();if(o===true)return e;let i=n?e.return:e.child;for(;i;){let s=el(i,t,n);if(s)return s;i=n?null:i.sibling;}return null}var el=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let o=n?e.return:e.child;for(;o;){let i=el(o,t,n);if(i)return i;o=n?null:o.sibling;}return null},tl=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let o=n?e.return:e.child;for(;o;){let i=await tl(o,t,n);if(i)return i;o=n?null:o.sibling;}return null};var nl=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?nl(t.type||t.render):null},hn=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let o=nl(t);return o&&(o.displayName||o.name)||null};var Qn=()=>{let e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return !!e?._instrumentationIsActive||ps(e)||Zr(e)};var bn=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t?.renderers)for(let n of t.renderers.values())try{let o=n.findFiberByHostInstance?.(e);if(o)return o}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},ol=new Set;var kg=Object.create,ud=Object.defineProperty,Mg=Object.getOwnPropertyDescriptor,Og=Object.getOwnPropertyNames,Ig=Object.getPrototypeOf,Rg=Object.prototype.hasOwnProperty,Ng=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Lg=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(var i=Og(t),s=0,r=i.length,c;st[l]).bind(null,c),enumerable:!(o=Mg(t,c))||o.enumerable});return e},Dg=(e,t,n)=>(n=e==null?{}:kg(Ig(e)),Lg(ud(n,"default",{value:e,enumerable:true}),e)),nd=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Fg=["rsc://","file:///","webpack://","webpack-internal://","node:","turbopack://","metro://","/app-pages-browser/"],od="about://React/",$g=["","eval",""],dd=/\.(jsx|tsx|ts|js)$/,Hg=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,Bg=/^\?[\w~.-]+(?:=[^&#]*)?(?:&[\w~.-]+(?:=[^&#]*)?)*$/,fd="(at Server)",Vg=/(^|@)\S+:\d+/,md=/^\s*at .*(\S+:\d+|\(native\))/m,zg=/^(eval@)?(\[native code\])?$/;var xs=(e,t)=>{{let n=e.split(` +`),o=[];for(let i of n)if(/^\s*at\s+/.test(i)){let s=rd(i,void 0)[0];s&&o.push(s);}else if(/^\s*in\s+/.test(i)){let s=i.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");o.push({functionName:s,source:i});}else if(i.match(Vg)){let s=id(i,void 0)[0];s&&o.push(s);}return sl(o,t)}},pd=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=e.startsWith("(")&&/:\d+\)$/.test(e),n=t?e.slice(1,-1):e,o=/(.+?)(?::(\d+))?(?::(\d+))?$/,i=o.exec(n);return i?[i[1],i[2]||void 0,i[3]||void 0]:[n,void 0,void 0]},sl=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var rd=(e,t)=>sl(e.split(` +`).filter(o=>!!o.match(md)),t).map(o=>{let i=o;i.includes("(eval ")&&(i=i.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let s=i.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),r=s.match(/ (\(.+\)$)/);s=r?s.replace(r[0],""):s;let c=pd(r?r[1]:s),l=r&&s||void 0,u=["eval",""].includes(c[0])?void 0:c[0];return {functionName:l,fileName:u,lineNumber:c[1]?+c[1]:void 0,columnNumber:c[2]?+c[2]:void 0,source:i}});var id=(e,t)=>sl(e.split(` +`).filter(o=>!o.match(zg)),t).map(o=>{let i=o;if(i.includes(" > eval")&&(i=i.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!i.includes("@")&&!i.includes(":"))return {functionName:i};{let s=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,r=i.match(s),c=r&&r[1]?r[1]:void 0,l=pd(i.replace(s,""));return {functionName:c,fileName:l[0],lineNumber:l[1]?+l[1]:void 0,columnNumber:l[2]?+l[2]:void 0,source:i}}});var Gg=Ng((e,t)=>{(function(n,o){typeof e=="object"&&t!==void 0?o(e):typeof define=="function"&&define.amd?define(["exports"],o):(n=typeof globalThis<"u"?globalThis:n||self,o(n.sourcemapCodec={}));})(void 0,function(n){let o=44,i=59,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=new Uint8Array(64),c=new Uint8Array(128);for(let O=0;O>>=1,F&&(w=-2147483648|-w),T+w}function u(O,T,w){let g=T-w;g=g<0?-g<<1|1:g<<1;do{let A=g&31;g>>>=5,g>0&&(A|=32),O.write(r[A]);}while(g>0);return T}function f(O,T){return O.pos>=T?false:O.peek()!==o}let m=1024*16,y=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(O){return Buffer.from(O.buffer,O.byteOffset,O.byteLength).toString()}}:{decode(O){let T="";for(let w=0;w0?w+y.decode(T.subarray(0,g)):w}}class V{constructor(T){this.pos=0,this.buffer=T;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(T){let{buffer:w,pos:g}=this,A=w.indexOf(T,g);return A===-1?w.length:A}}let L=[];function J(O){let{length:T}=O,w=new V(O),g=[],A=[],F=0;for(;w.pos0&&w.write(o),g[0]=u(w,F,g[0]),u(w,H,0),u(w,z,0);let q=A.length===6?1:0;u(w,q,0),A.length===6&&u(w,A[5],0);for(let G of $)u(w,G,0);for(T++;Tv||ae===v&&pe>=P)break;T=b(O,T,w,g);}return w.write(o),g[0]=u(w,v,g[0]),u(w,P,0),T}function C(O){let{length:T}=O,w=new V(O),g=[],A=[],F=0,H=0,v=0,P=0,z=0,$=0,q=0,G=0;do{let ae=w.indexOf(";"),pe=0;for(;w.posX;ge--){let fe=q;q=l(w,q),G=l(w,q===fe?G:0);let Se=l(w,0);xe.push([Se,q,G]);}}else xe=[[X]];Ae.push(xe);}while(f(w,ae))}U.bindings=Ae,g.push(U),A.push(U);}F++,w.pos=ae+1;}while(w.pos0&&w.write(o),g[1]=u(w,A[1],g[1]);let G=(A.length===6?1:0)|($?2:0)|(z?4:0);if(u(w,G,0),A.length===6){let{4:ae,5:pe}=A;ae!==g[2]&&(g[3]=0),g[2]=u(w,ae,g[2]),g[3]=u(w,pe,g[3]);}if($){let{0:ae,1:pe,2:R}=A.callsite;ae===g[4]?pe!==g[5]&&(g[6]=0):(g[5]=0,g[6]=0),g[4]=u(w,ae,g[4]),g[5]=u(w,pe,g[5]),g[6]=u(w,R,g[6]);}if(q)for(let ae of q){ae.length>1&&u(w,-ae.length,0);let pe=ae[0][0];u(w,pe,0);let R=F,W=H;for(let Q=1;Qv||pe===v&&R>=P)break;T=S(O,T,w,g);}return g[0]0&&T.write(i),v.length===0)continue;let P=0;for(let z=0;z0&&T.write(o),P=u(T,$[0],P),$.length!==1&&(w=u(T,$[1],w),g=u(T,$[2],g),A=u(T,$[3],A),$.length!==4&&(F=u(T,$[4],F)));}}return T.flush()}n.decode=te,n.decodeGeneratedRanges=C,n.decodeOriginalScopes=J,n.encode=ne,n.encodeGeneratedRanges=x,n.encodeOriginalScopes=p,Object.defineProperty(n,"__esModule",{value:true});});}),gd=Dg(Gg()),hd=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Ug=/^data:application\/json[^,]+base64,/,jg=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,bd=typeof WeakRef<"u",Jr=new Map,ws=new Map,Wg=e=>bd&&e instanceof WeakRef,sd=(e,t,n,o)=>{if(n<0||n>=e.length)return null;let i=e[n];if(!i||i.length===0)return null;let s=null;for(let f of i)if(f[0]<=o)s=f;else break;if(!s||s.length<4)return null;let[,r,c,l]=s;if(r===void 0||c===void 0||l===void 0)return null;let u=t[r];return u?{columnNumber:l,fileName:u,lineNumber:c+1}:null},Kg=(e,t,n)=>{if(e.sections){let o=null;for(let r of e.sections)if(t>r.offset.line||t===r.offset.line&&n>=r.offset.column)o=r;else break;if(!o)return null;let i=t-o.offset.line,s=t===o.offset.line?n-o.offset.column:n;return sd(o.map.mappings,o.map.sources,i,s)}return sd(e.mappings,e.sources,t-1,n)},Xg=(e,t)=>{let n=t.split(` +`),o;for(let s=n.length-1;s>=0&&!o;s--){let r=n[s].match(jg);r&&(o=r[1]||r[2]);}if(!o)return null;let i=hd.test(o);if(!(Ug.test(o)||i||o.startsWith("/"))){let s=e.split("/");s[s.length-1]=o,o=s.join("/");}return o},Yg=e=>({file:e.file,mappings:(0, gd.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),qg=e=>{let t=e.sections.map(({map:o,offset:i})=>({map:{...o,mappings:(0, gd.decode)(o.mappings)},offset:i})),n=new Set;for(let o of t)for(let i of o.map.sources)n.add(i);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},ad=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(hd);if(!n)return true;let o=n[0].toLowerCase();return o==="http:"||o==="https:"},Zg=async(e,t=fetch)=>{if(!ad(e))return null;let n;try{let i=await t(e);if(!i.ok)return null;n=await i.text();}catch{return null}if(!n)return null;let o=Xg(e,n);if(!o||!ad(o))return null;try{let i=await t(o);if(!i.ok)return null;let s=await i.json();return "sections"in s?qg(s):Yg(s)}catch{return null}},Jg=async(e,t=true,n)=>{if(t&&Jr.has(e)){let s=Jr.get(e);if(s==null)return null;if(Wg(s)){let r=s.deref();if(r)return r;Jr.delete(e);}else return s}if(t&&ws.has(e))return ws.get(e);let o=Zg(e,n);t&&ws.set(e,o);let i=await o;return t&&ws.delete(e),t&&(i===null?Jr.set(e,null):Jr.set(e,bd?new WeakRef(i):i)),i},Qg=async(e,t=true,n)=>await Promise.all(e.map(async o=>{if(!o.fileName)return o;let i=await Jg(o.fileName,t,n);if(!i||typeof o.lineNumber!="number"||typeof o.columnNumber!="number")return o;let s=Kg(i,o.lineNumber,o.columnNumber);return s?{...o,source:s.fileName&&o.source?o.source.replace(o.fileName,s.fileName):o.source,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber,isSymbolicated:true}:o})),al=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",eh=()=>{let e=Zn();for(let t of [...Array.from(yo),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},ld=e=>{for(let t of yo){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},Nn=e=>` + in ${e}`,th=(e,t)=>{let n=Nn(e);return t&&(n+=` (at ${t})`),n},rl=false,il=(e,t)=>{if(!e||rl)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,rl=true;let o=eh();ld(null);let i=console.error,s=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let y;try{if(t){let _=function(){throw Error()};if(Object.defineProperty(_.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_,[]);}catch(V){y=V;}Reflect.construct(e,[],_);}else {try{_.call();}catch(V){y=V;}e.call(_.prototype);}}else {try{throw Error()}catch(V){y=V;}let _=e();_&&typeof _.catch=="function"&&_.catch(()=>{});}}catch(_){if(_ instanceof Error&&y instanceof Error&&typeof _.stack=="string")return [_.stack,y.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[f,m]=l.DetermineComponentFrameRoot();if(f&&m){let y=f.split(` +`),_=m.split(` +`),V=0,L=0;for(;V=1&&L>=0&&y[V]!==_[L];)L--;for(;V>=1&&L>=0;V--,L--)if(y[V]!==_[L]){if(V!==1||L!==1)do if(V--,L--,L<0||y[V]!==_[L]){let J=` +${y[V].replace(" at new "," at ")}`,p=hn(e);return p&&J.includes("")&&(J=J.replace("",p)),J}while(V>=1&&L>=0);break}}}finally{rl=false,Error.prepareStackTrace=n,ld(o),console.error=i,console.warn=s;}let r=e?hn(e):"";return r?Nn(r):""},nh=(e,t)=>{let n=e.tag,o="";switch(n){case Ja:o=Nn("Activity");break;case hs:o=il(e.type,true);break;case bs:o=il(e.type.render,false);break;case gs:case ys:o=il(e.type,false);break;case Wa:case qa:case Za:o=Nn(e.type);break;case Xa:o=Nn("Lazy");break;case Ka:o=e.child!==t&&t!==null?Nn("Suspense Fallback"):Nn("Suspense");break;case Ya:o=Nn("SuspenseList");break;case Qa:o=Nn("ViewTransition");break;default:return ""}return o},oh=e=>{try{let t="",n=e,o=null;do{t+=nh(n,o);let i=n._debugInfo;if(i&&Array.isArray(i))for(let s=i.length-1;s>=0;s--){let r=i[s];typeof r.name=="string"&&(t+=th(r.name,r.env));}o=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?` Error generating stack: ${t.message} -${t.stack}`:""}},el=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame +${t.stack}`:""}},ll=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame `)&&(n=n.slice(29));let o=n.indexOf(` `);if(o!==-1&&(n=n.slice(o+1)),o=Math.max(n.indexOf("react_stack_bottom_frame"),n.indexOf("react-stack-bottom-frame")),o!==-1&&(o=n.lastIndexOf(` -`,o)),o!==-1)n=n.slice(0,o);else return "";return n},Ng=e=>!!(e.fileName?.startsWith("rsc://")&&e.functionName),Lg=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,Dg=e=>{let t=new Map;for(let n of e)for(let o of n.stackFrames){if(!Ng(o))continue;let i=o.functionName,s=t.get(i)??[];s.some(c=>Lg(c,o))||(s.push(o),t.set(i,s));}return t},Fg=(e,t,n)=>{if(!e.functionName)return {...e,isServer:true};let o=t.get(e.functionName);if(!o||o.length===0)return {...e,isServer:true};let i=n.get(e.functionName)??0,s=o[i%o.length];return n.set(e.functionName,i+1),{...e,isServer:true,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber,source:e.source?.replace(qu,`(${s.fileName}:${s.lineNumber}:${s.columnNumber})`)}},$g=e=>{let t=[];return Qo(e,n=>{if(!Qa(n))return;let o=typeof n.type=="string"?n.type:Kn(n.type)||"";t.push({componentName:o,stackFrames:ms(el(n._debugStack?.stack))});},true),t},nd=async(e,t=true,n)=>{let o=$g(e),i=ms(Ig(e)),s=Dg(o),r=new Map,c=i.map(u=>u.source?.includes(qu)??false?Fg(u,s,r):u),l=c.filter((u,f,p)=>{if(f===0)return true;let b=p[f-1];return u.functionName!==b.functionName});return kg(l,t,n)};var Ku=e=>e.split("/").filter(Boolean).length,Hg=e=>e.split("/").filter(Boolean)[0]??null,Bg=e=>{let t=e.indexOf("/",1);if(t===-1)return e;let n=e.slice(0,t);if(Ku(n)!==1)return e;let o=e.slice(t);if(!Yu.test(o)||Ku(o)<2)return e;let i=Hg(o);return !i||i.startsWith("@")||i.length>4?e:o},go=e=>{if(!e||pg.some(s=>s===e))return "";let t=e,n=t.startsWith("http://")||t.startsWith("https://");if(n)try{t=new URL(t).pathname;}catch{}if(n&&(t=Bg(t)),t.startsWith(zu)){let s=t.slice(zu.length),r=s.indexOf("/"),c=s.indexOf(":");t=r!==-1&&(c===-1||r{let t=go(e);return !(!t||!Yu.test(t)||gg.test(t))};var od=e=>e.length>0&&/^[A-Z]/.test(e);Fa();var ps=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;var zg=new Set(["_","$","motion.","styled.","chakra.","ark.","Primitive.","Slot."]),Vg=new Set(["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary","LoadableComponent","MotionDOMComponent"]),Gg=new Set(["Suspense","Fragment","StrictMode","Profiler","SuspenseList"]),tl,tr=e=>(e&&(tl=void 0),tl??=typeof document<"u"&&!!(document.getElementById("__NEXT_DATA__")||document.querySelector("nextjs-portal")),tl),id=e=>{if(Vg.has(e)||Gg.has(e))return true;for(let t of zg)if(e.startsWith(t))return true;return false},er=e=>!(e.length<=1||id(e)||!od(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),sd=["about://React/","rsc://React/"],Ug=e=>sd.some(t=>e.startsWith(t)),jg=e=>{for(let t of sd){if(!e.startsWith(t))continue;let n=e.indexOf("/",t.length),o=e.lastIndexOf("?");if(n>-1&&o>-1)return decodeURI(e.slice(n+1,o))}return e},Wg=async e=>{let t=[],n=[];for(let s=0;s",line1:r.lineNumber??null,column1:r.columnNumber??null,arguments:[]}));}if(n.length===0)return e;let o=new AbortController,i=setTimeout(()=>o.abort(),Kc);try{let s=await fetch("/__nextjs_original-stack-frames",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({frames:n,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),signal:o.signal});if(!s.ok)return e;let r=await s.json(),c=[...e];for(let l=0;l{let t=new Map;return Qo(e,n=>{if(!Qa(n))return false;let o=el(n._debugStack.stack);if(!o)return false;for(let i of ms(o))!i.functionName||!i.fileName||Ug(i.fileName)&&(t.has(i.functionName)||t.set(i.functionName,{...i,isServer:true}));return false},true),t},Xg=(e,t)=>{if(!t.some(i=>i.isServer&&!i.fileName&&i.functionName))return t;let o=Kg(e);return o.size===0?t:t.map(i=>{if(!i.isServer||i.fileName||!i.functionName)return i;let s=o.get(i.functionName);return s?{...i,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber}:i})},rd=new WeakMap,Yg=async e=>{try{let t=po(e);if(!t)return null;let n=await nd(t);if(tr()){let o=Xg(t,n);return await Wg(o)}return n}catch{return null}},Mn=e=>{if(!Xn())return Promise.resolve([]);let t=rd.get(e);if(t)return t;let n=Yg(e);return rd.set(e,n),n},nr=async e=>{if(!Xn())return null;let t=await Mn(e);if(!t)return null;for(let n of t)if(n.functionName&&er(n.functionName))return n.functionName;return null},nl=e=>{if(!e||e.length===0)return null;for(let t of e)if(t.fileName&&ho(t.fileName))return {filePath:go(t.fileName),lineNumber:t.lineNumber,componentName:t.functionName&&er(t.functionName)?t.functionName:null};return null},ad=e=>!(!e||id(e)||e.startsWith("Primitive.")||e==="SlotClone"||e==="Slot"),Kr=e=>{if(!Xn())return null;let t=po(e);if(!t)return null;let n=t.return;for(;n;){if(Jo(n)){let o=Kn(n.type);if(o&&ad(o))return o}n=n.return;}return null},qg=e=>e?e.some(t=>t.isServer||t.fileName&&ho(t.fileName)):false,Zg=(e,t)=>{if(!Xn())return [];let n=po(e);if(!n)return [];let o=[];return Qo(n,i=>{if(o.length>=t)return true;if(Jo(i)){let s=Kn(i.type);s&&ad(s)&&o.push(s);}return false},true),o},Jg=(e,t={})=>{let{maxLines:n=3}=t,o=tr(),i=[];for(let s of e){if(i.length>=n)break;let r=s.fileName&&ho(s.fileName);if(s.isServer&&!r&&(!s.functionName||er(s.functionName))){i.push(` +`,o)),o!==-1)n=n.slice(0,o);else return "";return n},rh=e=>!!(e.fileName?.startsWith("rsc://")&&e.functionName),ih=(e,t)=>e.fileName===t.fileName&&e.lineNumber===t.lineNumber&&e.columnNumber===t.columnNumber,sh=e=>{let t=new Map;for(let n of e)for(let o of n.stackFrames){if(!rh(o))continue;let i=o.functionName,s=t.get(i)??[];s.some(c=>ih(c,o))||(s.push(o),t.set(i,s));}return t},ah=(e,t,n)=>{if(!e.functionName)return {...e,isServer:true};let o=t.get(e.functionName);if(!o||o.length===0)return {...e,isServer:true};let i=n.get(e.functionName)??0,s=o[i%o.length];return n.set(e.functionName,i+1),{...e,isServer:true,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber,source:e.source?.replace(fd,`(${s.fileName}:${s.lineNumber}:${s.columnNumber})`)}},lh=e=>{let t=[];return nr(e,n=>{if(!al(n))return;let o=typeof n.type=="string"?n.type:hn(n.type)||"";t.push({componentName:o,stackFrames:xs(ll(n._debugStack?.stack))});},true),t},yd=async(e,t=true,n)=>{let o=lh(e),i=xs(oh(e)),s=sh(o),r=new Map,c=i.map(u=>u.source?.includes(fd)??false?ah(u,s,r):u),l=c.filter((u,f,m)=>{if(f===0)return true;let y=m[f-1];return u.functionName!==y.functionName});return Qg(l,t,n)};var cd=e=>e.split("/").filter(Boolean).length,ch=e=>e.split("/").filter(Boolean)[0]??null,uh=e=>{let t=e.indexOf("/",1);if(t===-1)return e;let n=e.slice(0,t);if(cd(n)!==1)return e;let o=e.slice(t);if(!dd.test(o)||cd(o)<2)return e;let i=ch(o);return !i||i.startsWith("@")||i.length>4?e:o},wo=e=>{if(!e||$g.some(s=>s===e))return "";let t=e,n=t.startsWith("http://")||t.startsWith("https://");if(n)try{t=new URL(t).pathname;}catch{}if(n&&(t=uh(t)),t.startsWith(od)){let s=t.slice(od.length),r=s.indexOf("/"),c=s.indexOf(":");t=r!==-1&&(c===-1||r{let t=wo(e);return !(!t||!dd.test(t)||Hg.test(t))};var wd=e=>e.length>0&&/^[A-Z]/.test(e);ja();var vs=(e,t)=>e.length>t?`${e.slice(0,t)}...`:e;var dh=new Set(["_","$","motion.","styled.","chakra.","ark.","Primitive.","Slot."]),fh=new Set(["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary","LoadableComponent","MotionDOMComponent"]),mh=new Set(["Suspense","Fragment","StrictMode","Profiler","SuspenseList"]),cl,rr=e=>(e&&(cl=void 0),cl??=typeof document<"u"&&!!(document.getElementById("__NEXT_DATA__")||document.querySelector("nextjs-portal")),cl),vd=e=>{if(fh.has(e)||mh.has(e))return true;for(let t of dh)if(e.startsWith(t))return true;return false},or=e=>!(e.length<=1||vd(e)||!wd(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),Cd=["about://React/","rsc://React/"],ph=e=>Cd.some(t=>e.startsWith(t)),gh=e=>{for(let t of Cd){if(!e.startsWith(t))continue;let n=e.indexOf("/",t.length),o=e.lastIndexOf("?");if(n>-1&&o>-1)return decodeURI(e.slice(n+1,o))}return e},hh=async e=>{let t=[],n=[];for(let s=0;s",line1:r.lineNumber??null,column1:r.columnNumber??null,arguments:[]}));}if(n.length===0)return e;let o=new AbortController,i=setTimeout(()=>o.abort(),cu);try{let s=await fetch("/__nextjs_original-stack-frames",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({frames:n,isServer:!0,isEdgeServer:!1,isAppDirectory:!0}),signal:o.signal});if(!s.ok)return e;let r=await s.json(),c=[...e];for(let l=0;l{let t=new Map;return nr(e,n=>{if(!al(n))return false;let o=ll(n._debugStack.stack);if(!o)return false;for(let i of xs(o))!i.functionName||!i.fileName||ph(i.fileName)&&(t.has(i.functionName)||t.set(i.functionName,{...i,isServer:true}));return false},true),t},yh=(e,t)=>{if(!t.some(i=>i.isServer&&!i.fileName&&i.functionName))return t;let o=bh(e);return o.size===0?t:t.map(i=>{if(!i.isServer||i.fileName||!i.functionName)return i;let s=o.get(i.functionName);return s?{...i,fileName:s.fileName,lineNumber:s.lineNumber,columnNumber:s.columnNumber}:i})},xd=new WeakMap,wh=async e=>{try{let t=bn(e);if(!t)return null;let n=await yd(t);if(rr()){let o=yh(t,n);return await hh(o)}return n}catch{return null}},Ln=e=>{if(!Qn())return Promise.resolve([]);let t=xd.get(e);if(t)return t;let n=wh(e);return xd.set(e,n),n},ir=async e=>{if(!Qn())return null;let t=await Ln(e);if(!t)return null;for(let n of t)if(n.functionName&&or(n.functionName))return n.functionName;return null},ul=e=>{if(!e||e.length===0)return null;for(let t of e)if(t.fileName&&xo(t.fileName))return {filePath:wo(t.fileName),lineNumber:t.lineNumber,componentName:t.functionName&&or(t.functionName)?t.functionName:null};return null},Sd=e=>!(!e||vd(e)||e.startsWith("Primitive.")||e==="SlotClone"||e==="Slot"),Qr=e=>{if(!Qn())return null;let t=bn(e);if(!t)return null;let n=t.return;for(;n;){if(Jn(n)){let o=hn(n.type);if(o&&Sd(o))return o}n=n.return;}return null},xh=e=>e?e.some(t=>t.isServer||t.fileName&&xo(t.fileName)):false,vh=(e,t)=>{if(!Qn())return [];let n=bn(e);if(!n)return [];let o=[];return nr(n,i=>{if(o.length>=t)return true;if(Jn(i)){let s=hn(i.type);s&&Sd(s)&&o.push(s);}return false},true),o},Ch=(e,t={})=>{let{maxLines:n=3}=t,o=rr(),i=[];for(let s of e){if(i.length>=n)break;let r=s.fileName&&xo(s.fileName);if(s.isServer&&!r&&(!s.functionName||or(s.functionName))){i.push(` in ${s.functionName||""} (at Server)`);continue}if(r){let c=` - in `,l=s.functionName&&er(s.functionName);l&&(c+=`${s.functionName} (at `),c+=go(s.fileName),o&&s.lineNumber&&s.columnNumber&&(c+=`:${s.lineNumber}:${s.columnNumber}`),l&&(c+=")"),i.push(c);}}return i.join("")},ol=async(e,t={})=>{let n=t.maxLines??3,o=await Mn(e);if(o&&qg(o))return Jg(o,t);let i=Zg(e,n);return i.length>0?i.map(s=>` - in ${s}`).join(""):""},gs=async(e,t={})=>{let n=eh(e),o=await ol(e,t);return o?`${n}${o}`:Qg(e)},Qg=e=>{let t=pt(e);if(!(e instanceof HTMLElement)){let s=cd(e,{truncate:false,maxAttrs:va.length});return `<${t}${s} />`}let n=e.innerText?.trim()??e.textContent?.trim()??"",o="";for(let{name:s,value:r}of e.attributes)o+=` ${s}="${r}"`;let i=ps(n,$r);return i.length>0?`<${t}${o}> + in `,l=s.functionName&&or(s.functionName);l&&(c+=`${s.functionName} (at `),c+=wo(s.fileName),o&&s.lineNumber&&s.columnNumber&&(c+=`:${s.lineNumber}:${s.columnNumber}`),l&&(c+=")"),i.push(c);}}return i.join("")},dl=async(e,t={})=>{let n=t.maxLines??3,o=await Ln(e);if(o&&xh(o))return Ch(o,t);let i=vh(e,n);return i.length>0?i.map(s=>` + in ${s}`).join(""):""},Cs=async(e,t={})=>{let n=Eh(e),o=await dl(e,t);return o?`${n}${o}`:Sh(e)},Sh=e=>{let t=pt(e);if(!(e instanceof HTMLElement)){let s=Ad(e,{truncate:false,maxAttrs:ka.length});return `<${t}${s} />`}let n=e.innerText?.trim()??e.textContent?.trim()??"",o="";for(let{name:s,value:r}of e.attributes)o+=` ${s}="${r}"`;let i=vs(n,Ur);return i.length>0?`<${t}${o}> ${i} -`:`<${t}${o} />`},ld=e=>ps(e,jc),cd=(e,t={})=>{let{truncate:n=true,maxAttrs:o=Wc}=t,i=[];for(let s of va){if(i.length>=o)break;let r=e.getAttribute(s);if(r){let c=n?ld(r):r;i.push(`${s}="${c}"`);}}return i.length>0?` ${i.join(" ")}`:""},eh=e=>{let t=pt(e);if(!(e instanceof HTMLElement)){let b=cd(e);return `<${t}${b} />`}let n=e.innerText?.trim()??e.textContent?.trim()??"",o="";for(let{name:b,value:x}of e.attributes)o+=` ${b}="${ld(x)}"`;let i=[],s=[],r=false,c=Array.from(e.childNodes);for(let b of c)b.nodeType!==Node.COMMENT_NODE&&(b.nodeType===Node.TEXT_NODE?b.textContent&&b.textContent.trim().length>0&&(r=true):b instanceof Element&&(r?s.push(b):i.push(b)));let l=b=>b.length===0?"":b.length<=2?b.map(x=>`<${pt(x)} ...>`).join(` - `):`(${b.length} elements)`,u="",f=l(i);f&&(u+=` +`:`<${t}${o} />`},Ed=e=>vs(e,au),Ad=(e,t={})=>{let{truncate:n=true,maxAttrs:o=lu}=t,i=[];for(let s of ka){if(i.length>=o)break;let r=e.getAttribute(s);if(r){let c=n?Ed(r):r;i.push(`${s}="${c}"`);}}return i.length>0?` ${i.join(" ")}`:""},Eh=e=>{let t=pt(e);if(!(e instanceof HTMLElement)){let y=Ad(e);return `<${t}${y} />`}let n=e.innerText?.trim()??e.textContent?.trim()??"",o="";for(let{name:y,value:_}of e.attributes)o+=` ${y}="${Ed(_)}"`;let i=[],s=[],r=false,c=Array.from(e.childNodes);for(let y of c)y.nodeType!==Node.COMMENT_NODE&&(y.nodeType===Node.TEXT_NODE?y.textContent&&y.textContent.trim().length>0&&(r=true):y instanceof Element&&(r?s.push(y):i.push(y)));let l=y=>y.length===0?"":y.length<=2?y.map(_=>`<${pt(_)} ...>`).join(` + `):`(${y.length} elements)`,u="",f=l(i);f&&(u+=` ${f}`),n.length>0&&(u+=` - ${ps(n,$r)}`);let p=l(s);return p&&(u+=` - ${p}`),u.length>0?`<${t}${o}>${u} -`:`<${t}${o} />`};var th="https://react-grab.com",ud=(e,t)=>{let n=t?`&line=${t}`:"";return `${th}/open-file?url=${encodeURIComponent(e)}${n}`};var nh=async(e,t)=>{let n=tr(),o=new URLSearchParams({file:e}),i=n?"line1":"line",s=n?"column1":"column";return t&&o.set(i,String(t)),o.set(s,"1"),(await fetch(`${n?"/__nextjs_launch-editor":"/__open-in-editor"}?${o}`)).ok},or=async(e,t,n)=>{if(await nh(e,t).catch(()=>false))return;let i=ud(e,t),s=n?n(i,e,t):i;window.open(s,"_blank","noopener,noreferrer");};var rr=(e,t,n)=>e+(t-e)*n;var rh=K(""),Yn={drag:{borderColor:Hc,fillColor:Bc,lerpFactor:.7},selection:{borderColor:es,fillColor:ts,lerpFactor:.95},grabbed:{borderColor:es,fillColor:ts,lerpFactor:.95},processing:{borderColor:es,fillColor:ts,lerpFactor:.95}},md=e=>{let t,n=null,o=0,i=0,s=1,r=null,c={crosshair:{canvas:null,context:null},drag:{canvas:null,context:null},selection:{canvas:null,context:null},grabbed:{canvas:null,context:null},processing:{canvas:null,context:null}},l={x:0,y:0},u=[],f=null,p=[],b=[],x=(h,S,D)=>{let B=new OffscreenCanvas(h*D,S*D),w=B.getContext("2d");return w&&w.scale(D,D),{canvas:B,context:w}},H=()=>{if(t){s=Math.max(window.devicePixelRatio||1,2),o=window.innerWidth,i=window.innerHeight,t.width=o*s,t.height=i*s,t.style.width=`${o}px`,t.style.height=`${i}px`,n=t.getContext("2d"),n&&n.scale(s,s);for(let h of Object.keys(c))c[h]=x(o,i,s);}},M=h=>{if(!h)return 0;let S=h.match(/^(\d+(?:\.\d+)?)/);return S?parseFloat(S[1]):0},Y=(h,S,D)=>({id:h,current:{x:S.x,y:S.y,width:S.width,height:S.height},target:{x:S.x,y:S.y,width:S.width,height:S.height},borderRadius:M(S.borderRadius),opacity:D?.opacity??1,targetOpacity:D?.targetOpacity??D?.opacity??1,createdAt:D?.createdAt,isInitialized:true}),m=(h,S,D)=>{h.target={x:S.x,y:S.y,width:S.width,height:S.height},h.borderRadius=M(S.borderRadius),D!==void 0&&(h.targetOpacity=D);},E=h=>h.boundsMultiple??[h.bounds],T=(h,S,D,B,w,v,$,N,W=1)=>{if(B<=0||w<=0)return;let V=Math.min(B/2,w/2),oe=Math.min(v,V);h.globalAlpha=W,h.beginPath(),oe>0?h.roundRect(S,D,B,w,oe):h.rect(S,D,B,w),h.fillStyle=$,h.fill(),h.strokeStyle=N,h.lineWidth=1,h.stroke(),h.globalAlpha=1;},C=()=>{let h=c.crosshair;if(!h.context)return;let S=h.context;S.clearRect(0,0,o,i),e.crosshairVisible&&(S.strokeStyle=$c,S.lineWidth=1,S.beginPath(),S.moveTo(l.x,0),S.lineTo(l.x,i),S.moveTo(0,l.y),S.lineTo(o,l.y),S.stroke());},R=()=>{let h=c.drag;if(!h.context)return;let S=h.context;if(S.clearRect(0,0,o,i),!e.dragVisible||!f)return;let D=Yn.drag;T(S,f.current.x,f.current.y,f.current.width,f.current.height,f.borderRadius,D.fillColor,D.borderColor);},X=()=>{let h=c.selection;if(!h.context)return;let S=h.context;if(S.clearRect(0,0,o,i),!e.selectionVisible)return;let D=Yn.selection;for(let B of u){let w=e.selectionIsFading?0:B.opacity;T(S,B.current.x,B.current.y,B.current.width,B.current.height,B.borderRadius,D.fillColor,D.borderColor,w);}},fe=()=>{let h=c.grabbed;if(!h.context)return;let S=h.context;S.clearRect(0,0,o,i);let D=Yn.grabbed;for(let B of p)T(S,B.current.x,B.current.y,B.current.width,B.current.height,B.borderRadius,D.fillColor,D.borderColor,B.opacity);},j=()=>{let h=c.processing;if(!h.context)return;let S=h.context;S.clearRect(0,0,o,i);let D=Yn.processing;for(let B of b)T(S,B.current.x,B.current.y,B.current.width,B.current.height,B.borderRadius,D.fillColor,D.borderColor,B.opacity);},le=()=>{if(!n||!t)return;n.setTransform(1,0,0,1,0,0),n.clearRect(0,0,t.width,t.height),n.setTransform(s,0,0,s,0,0),C(),R(),X(),fe(),j();let h=["crosshair","drag","selection","grabbed","processing"];for(let S of h){let D=c[S];D.canvas&&n.drawImage(D.canvas,0,0,o,i);}},ue=(h,S,D)=>{let B=rr(h.current.x,h.target.x,S),w=rr(h.current.y,h.target.y,S),v=rr(h.current.width,h.target.width,S),$=rr(h.current.height,h.target.height,S),N=Math.abs(B-h.target.x)<.5&&Math.abs(w-h.target.y)<.5&&Math.abs(v-h.target.width)<.5&&Math.abs($-h.target.height)<.5;h.current.x=N?h.target.x:B,h.current.y=N?h.target.y:w,h.current.width=N?h.target.width:v,h.current.height=N?h.target.height:$;let W=true;if(D?.interpolateOpacity){let V=rr(h.opacity,h.targetOpacity,S);W=Math.abs(V-h.targetOpacity)<.01,h.opacity=W?h.targetOpacity:V;}return !N||!W},L=()=>{let h=false;f?.isInitialized&&ue(f,Yn.drag.lerpFactor)&&(h=true);for(let D of u)D.isInitialized&&ue(D,Yn.selection.lerpFactor)&&(h=true);let S=Date.now();p=p.filter(D=>{let B=D.id.startsWith("label-");if(D.isInitialized&&ue(D,Yn.grabbed.lerpFactor,{interpolateOpacity:B})&&(h=true),D.createdAt){let w=S-D.createdAt,v=1600;if(w>=v)return false;if(w>1500){let $=(w-1500)/100;D.opacity=1-$,h=true;}return true}return B?!(Math.abs(D.opacity-D.targetOpacity)<.01&&D.targetOpacity===0):D.opacity>0});for(let D of b)D.isInitialized&&ue(D,Yn.processing.lerpFactor)&&(h=true);le(),h?r=Ve(L):r=null;},A=()=>{r===null&&(r=Ve(L));},y=()=>{H(),A();};return be(He(()=>[e.mouseX,e.mouseY],([h,S])=>{let D=h??0,B=S??0;l.x=D,l.y=B,A();})),be(He(()=>e.crosshairVisible,()=>{A();})),be(He(()=>[e.selectionVisible,e.selectionBounds,e.selectionBoundsMultiple,e.selectionIsFading,e.selectionShouldSnap],([h,S,D,,B])=>{if(!h||!S&&(!D||D.length===0)){u=[],A();return}u=(D&&D.length>0?D:S?[S]:[]).map((v,$)=>{let N=`selection-${$}`,W=u.find(V=>V.id===N);return W?(m(W,v),B&&(W.current={...W.target}),W):Y(N,v)}),A();})),be(He(()=>[e.dragVisible,e.dragBounds],([h,S])=>{if(!h||!S){f=null,A();return}f?m(f,S):f=Y("drag",S),A();})),be(He(()=>e.grabbedBoxes,h=>{let S=h??[],D=new Set(S.map(w=>w.id)),B=new Set(p.map(w=>w.id));for(let w of S)B.has(w.id)||p.push(Y(w.id,w.bounds,{createdAt:w.createdAt}));for(let w of p){let v=S.find($=>$.id===w.id);v&&m(w,v.bounds);}p=p.filter(w=>w.id.startsWith("label-")?true:D.has(w.id)),A();})),be(He(()=>e.agentSessions,h=>{if(!h||h.size===0){b=[],A();return}let S=[];for(let[D,B]of h)for(let w=0;wW.id===$);N?(m(N,v),S.push(N)):S.push(Y($,v));}b=S,A();})),be(He(()=>e.labelInstances,h=>{let S=h??[];for(let B of S){let w=E(B),v=B.status==="fading"?0:1;for(let $=0;$oe.id===W);V?m(V,N,v):p.push(Y(W,N,{opacity:1,targetOpacity:v}));}}let D=new Set;for(let B of S){let w=E(B);for(let v=0;vB.id.startsWith("label-")?D.has(B.id):true),A();})),mt(()=>{H(),A(),window.addEventListener("resize",y);let h=null,S=()=>{Math.max(window.devicePixelRatio||1,2)!==s&&(y(),D());},D=()=>{h&&h.removeEventListener("change",S),h=window.matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`),h.addEventListener("change",S);};D(),Me(()=>{window.removeEventListener("resize",y),h&&h.removeEventListener("change",S),r!==null&&Ge(r);});}),(()=>{var h=rh(),S=t;return typeof S=="function"?Ke(S,h):t=h,te(D=>we(h,"z-index",String(2147483645))),h})()};var bs=e=>{if(e<=0)return Un;let t=e*Uc;return Math.max(Gc,Math.min(Un,t))};function pd(e){var t,n,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t{let t=ah(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:o}=e;return {getClassGroupId:r=>{let c=r.split(ll);return c[0]===""&&c.length!==1&&c.shift(),yd(c,t)||sh(r)},getConflictingClassGroupIds:(r,c)=>{let l=n[r]||[];return c&&o[r]?[...l,...o[r]]:l}}},yd=(e,t)=>{if(e.length===0)return t.classGroupId;let n=e[0],o=t.nextPart.get(n),i=o?yd(e.slice(1),o):void 0;if(i)return i;if(t.validators.length===0)return;let s=e.join(ll);return t.validators.find(({validator:r})=>r(s))?.classGroupId},hd=/^\[(.+)\]$/,sh=e=>{if(hd.test(e)){let t=hd.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return "arbitrary.."+n}},ah=e=>{let{theme:t,prefix:n}=e,o={nextPart:new Map,validators:[]};return ch(Object.entries(e.classGroups),n).forEach(([s,r])=>{al(r,o,s,t);}),o},al=(e,t,n,o)=>{e.forEach(i=>{if(typeof i=="string"){let s=i===""?t:bd(t,i);s.classGroupId=n;return}if(typeof i=="function"){if(lh(i)){al(i(o),t,n,o);return}t.validators.push({validator:i,classGroupId:n});return}Object.entries(i).forEach(([s,r])=>{al(r,bd(t,s),n,o);});});},bd=(e,t)=>{let n=e;return t.split(ll).forEach(o=>{n.nextPart.has(o)||n.nextPart.set(o,{nextPart:new Map,validators:[]}),n=n.nextPart.get(o);}),n},lh=e=>e.isThemeGetter,ch=(e,t)=>t?e.map(([n,o])=>{let i=o.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([r,c])=>[t+r,c])):s);return [n,i]}):e,uh=e=>{if(e<1)return {get:()=>{},set:()=>{}};let t=0,n=new Map,o=new Map,i=(s,r)=>{n.set(s,r),t++,t>e&&(t=0,o=n,n=new Map);};return {get(s){let r=n.get(s);if(r!==void 0)return r;if((r=o.get(s))!==void 0)return i(s,r),r},set(s,r){n.has(s)?n.set(s,r):i(s,r);}}},wd="!",dh=e=>{let{separator:t,experimentalParseClassName:n}=e,o=t.length===1,i=t[0],s=t.length,r=c=>{let l=[],u=0,f=0,p;for(let Y=0;Yf?p-f:void 0;return {modifiers:l,hasImportantModifier:x,baseClassName:H,maybePostfixModifierPosition:M}};return n?c=>n({className:c,parseClassName:r}):r},fh=e=>{if(e.length<=1)return e;let t=[],n=[];return e.forEach(o=>{o[0]==="["?(t.push(...n.sort(),o),n=[]):n.push(o);}),t.push(...n.sort()),t},mh=e=>({cache:uh(e.cacheSize),parseClassName:dh(e),...ih(e)}),ph=/\s+/,gh=(e,t)=>{let{parseClassName:n,getClassGroupId:o,getConflictingClassGroupIds:i}=t,s=[],r=e.trim().split(ph),c="";for(let l=r.length-1;l>=0;l-=1){let u=r[l],{modifiers:f,hasImportantModifier:p,baseClassName:b,maybePostfixModifierPosition:x}=n(u),H=!!x,M=o(H?b.substring(0,x):b);if(!M){if(!H){c=u+(c.length>0?" "+c:c);continue}if(M=o(b),!M){c=u+(c.length>0?" "+c:c);continue}H=false;}let Y=fh(f).join(":"),m=p?Y+wd:Y,E=m+M;if(s.includes(E))continue;s.push(E);let T=i(M,H);for(let C=0;C0?" "+c:c);}return c};function hh(){let e=0,t,n,o="";for(;e{if(typeof e=="string")return e;let t,n="";for(let o=0;op(f),e());return n=mh(u),o=n.cache.get,i=n.cache.set,s=c,c(l)}function c(l){let u=o(l);if(u)return u;let f=gh(l,n);return i(l,f),f}return function(){return s(hh.apply(null,arguments))}}var ot=e=>{let t=n=>n[e]||[];return t.isThemeGetter=true,t},vd=/^\[(?:([a-z-]+):)?(.+)\]$/i,yh=/^\d+\/\d+$/,wh=new Set(["px","full","screen"]),xh=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vh=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Ch=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Eh=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Sh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rn=e=>ir(e)||wh.has(e)||yh.test(e),qn=e=>sr(e,"length",Rh),ir=e=>!!e&&!Number.isNaN(Number(e)),sl=e=>sr(e,"number",ir),Xr=e=>!!e&&Number.isInteger(Number(e)),Ah=e=>e.endsWith("%")&&ir(e.slice(0,-1)),Ie=e=>vd.test(e),Zn=e=>xh.test(e),Th=new Set(["length","size","percentage"]),_h=e=>sr(e,Th,Cd),Ph=e=>sr(e,"position",Cd),kh=new Set(["image","url"]),Oh=e=>sr(e,kh,Nh),Mh=e=>sr(e,"",Ih),Yr=()=>true,sr=(e,t,n)=>{let o=vd.exec(e);return o?o[1]?typeof t=="string"?o[1]===t:t.has(o[1]):n(o[2]):false},Rh=e=>vh.test(e)&&!Ch.test(e),Cd=()=>false,Ih=e=>Eh.test(e),Nh=e=>Sh.test(e);var Lh=()=>{let e=ot("colors"),t=ot("spacing"),n=ot("blur"),o=ot("brightness"),i=ot("borderColor"),s=ot("borderRadius"),r=ot("borderSpacing"),c=ot("borderWidth"),l=ot("contrast"),u=ot("grayscale"),f=ot("hueRotate"),p=ot("invert"),b=ot("gap"),x=ot("gradientColorStops"),H=ot("gradientColorStopPositions"),M=ot("inset"),Y=ot("margin"),m=ot("opacity"),E=ot("padding"),T=ot("saturate"),C=ot("scale"),R=ot("sepia"),X=ot("skew"),fe=ot("space"),j=ot("translate"),le=()=>["auto","contain","none"],ue=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",Ie,t],A=()=>[Ie,t],y=()=>["",Rn,qn],h=()=>["auto",ir,Ie],S=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],D=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],w=()=>["start","end","center","between","around","evenly","stretch"],v=()=>["","0",Ie],$=()=>["auto","avoid","all","avoid-page","page","left","right","column"],N=()=>[ir,Ie];return {cacheSize:500,separator:":",theme:{colors:[Yr],spacing:[Rn,qn],blur:["none","",Zn,Ie],brightness:N(),borderColor:[e],borderRadius:["none","","full",Zn,Ie],borderSpacing:A(),borderWidth:y(),contrast:N(),grayscale:v(),hueRotate:N(),invert:v(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Ah,qn],inset:L(),margin:L(),opacity:N(),padding:A(),saturate:N(),scale:N(),sepia:v(),skew:N(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",Ie]}],container:["container"],columns:[{columns:[Zn]}],"break-after":[{"break-after":$()}],"break-before":[{"break-before":$()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...S(),Ie]}],overflow:[{overflow:ue()}],"overflow-x":[{"overflow-x":ue()}],"overflow-y":[{"overflow-y":ue()}],overscroll:[{overscroll:le()}],"overscroll-x":[{"overscroll-x":le()}],"overscroll-y":[{"overscroll-y":le()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[M]}],"inset-x":[{"inset-x":[M]}],"inset-y":[{"inset-y":[M]}],start:[{start:[M]}],end:[{end:[M]}],top:[{top:[M]}],right:[{right:[M]}],bottom:[{bottom:[M]}],left:[{left:[M]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Xr,Ie]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Ie]}],grow:[{grow:v()}],shrink:[{shrink:v()}],order:[{order:["first","last","none",Xr,Ie]}],"grid-cols":[{"grid-cols":[Yr]}],"col-start-end":[{col:["auto",{span:["full",Xr,Ie]},Ie]}],"col-start":[{"col-start":h()}],"col-end":[{"col-end":h()}],"grid-rows":[{"grid-rows":[Yr]}],"row-start-end":[{row:["auto",{span:[Xr,Ie]},Ie]}],"row-start":[{"row-start":h()}],"row-end":[{"row-end":h()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Ie]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Ie]}],gap:[{gap:[b]}],"gap-x":[{"gap-x":[b]}],"gap-y":[{"gap-y":[b]}],"justify-content":[{justify:["normal",...w()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...w(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...w(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[E]}],px:[{px:[E]}],py:[{py:[E]}],ps:[{ps:[E]}],pe:[{pe:[E]}],pt:[{pt:[E]}],pr:[{pr:[E]}],pb:[{pb:[E]}],pl:[{pl:[E]}],m:[{m:[Y]}],mx:[{mx:[Y]}],my:[{my:[Y]}],ms:[{ms:[Y]}],me:[{me:[Y]}],mt:[{mt:[Y]}],mr:[{mr:[Y]}],mb:[{mb:[Y]}],ml:[{ml:[Y]}],"space-x":[{"space-x":[fe]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[fe]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Ie,t]}],"min-w":[{"min-w":[Ie,t,"min","max","fit"]}],"max-w":[{"max-w":[Ie,t,"none","full","min","max","fit","prose",{screen:[Zn]},Zn]}],h:[{h:[Ie,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Ie,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Ie,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Zn,qn]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",sl]}],"font-family":[{font:[Yr]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Ie]}],"line-clamp":[{"line-clamp":["none",ir,sl]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rn,Ie]}],"list-image":[{"list-image":["none",Ie]}],"list-style-type":[{list:["none","disc","decimal",Ie]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...D(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rn,qn]}],"underline-offset":[{"underline-offset":["auto",Rn,Ie]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ie]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ie]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...S(),Ph]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_h]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Oh]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[H]}],"gradient-via-pos":[{via:[H]}],"gradient-to-pos":[{to:[H]}],"gradient-from":[{from:[x]}],"gradient-via":[{via:[x]}],"gradient-to":[{to:[x]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...D(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:D()}],"border-color":[{border:[i]}],"border-color-x":[{"border-x":[i]}],"border-color-y":[{"border-y":[i]}],"border-color-s":[{"border-s":[i]}],"border-color-e":[{"border-e":[i]}],"border-color-t":[{"border-t":[i]}],"border-color-r":[{"border-r":[i]}],"border-color-b":[{"border-b":[i]}],"border-color-l":[{"border-l":[i]}],"divide-color":[{divide:[i]}],"outline-style":[{outline:["",...D()]}],"outline-offset":[{"outline-offset":[Rn,Ie]}],"outline-w":[{outline:[Rn,qn]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Rn,qn]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Zn,Mh]}],"shadow-color":[{shadow:[Yr]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[o]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Zn,Ie]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[p]}],saturate:[{saturate:[T]}],sepia:[{sepia:[R]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[o]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[R]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[r]}],"border-spacing-x":[{"border-spacing-x":[r]}],"border-spacing-y":[{"border-spacing-y":[r]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Ie]}],duration:[{duration:N()}],ease:[{ease:["linear","in","out","in-out",Ie]}],delay:[{delay:N()}],animate:[{animate:["none","spin","ping","pulse","bounce",Ie]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[C]}],"scale-x":[{"scale-x":[C]}],"scale-y":[{"scale-y":[C]}],rotate:[{rotate:[Xr,Ie]}],"translate-x":[{"translate-x":[j]}],"translate-y":[{"translate-y":[j]}],"skew-x":[{"skew-x":[X]}],"skew-y":[{"skew-y":[X]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Ie]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ie]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ie]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Rn,qn,sl]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}};var Ed=bh(Lh);var Ee=(...e)=>Ed(gd(e));var ys=e=>e.elementsCount&&e.elementsCount>1?{tagName:`${e.elementsCount} elements`,componentName:void 0}:{tagName:e.tagName||e.componentName||"element",componentName:e.tagName?e.componentName:void 0};var cl=null,In=()=>(cl===null&&(cl=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform)),cl);var Jn=e=>e==="Enter"?"\u21B5":In()?`\u2318${e}`:`Ctrl+${e.replace("\u21E7","Shift+")}`;var Dh=K(''),ws=e=>{let t=()=>e.size??12;return (()=>{var n=Dh();return te(o=>{var i=t(),s=t(),r=e.class;return i!==o.e&&ae(n,"width",o.e=i),s!==o.t&&ae(n,"height",o.t=s),r!==o.a&&ae(n,"class",o.a=r),o},{e:void 0,t:void 0,a:void 0}),n})()};var Fh=K(''),xs=e=>{let t=()=>e.size??12;return (()=>{var n=Fh();return te(o=>{var i=t(),s=t(),r=e.class;return i!==o.e&&ae(n,"width",o.e=i),s!==o.t&&ae(n,"height",o.t=s),r!==o.a&&ae(n,"class",o.a=r),o},{e:void 0,t:void 0,a:void 0}),n})()};var $h=K(''),Sd=e=>{let t=()=>e.size??16;return (()=>{var n=$h(),o=n.firstChild,i=o.nextSibling,s=i.nextSibling,r=s.nextSibling,c=r.nextSibling,l=c.nextSibling,u=l.nextSibling,f=u.nextSibling,p=f.nextSibling,b=p.nextSibling,x=b.nextSibling;x.nextSibling;return te(M=>{var Y=t(),m=t(),E=e.class;return Y!==M.e&&ae(n,"width",M.e=Y),m!==M.t&&ae(n,"height",M.t=m),E!==M.a&&ae(n,"class",M.a=E),M},{e:void 0,t:void 0,a:void 0}),n})()};var Hh=K('