<html lang="en">
<head></head>
<body>

<form id="mainForm" method="post" action="https://stackblitz.com/run" target="_self">
<input type="hidden" name="project[files][README.md]" value="# CRDT Collaborative Editor for RivetKit

Example project demonstrating real-time collaborative editing using Conflict-free Replicated Data Types (CRDTs) with [RivetKit](https://rivetkit.org).

[Learn More →](https://github.com/rivet-gg/rivetkit)

[Discord](https://rivet.gg/discord) — [Documentation](https://rivetkit.org) — [Issues](https://github.com/rivet-gg/rivetkit/issues)

## Getting Started

### Prerequisites

- Node.js 18+

### Installation

```sh
git clone https://github.com/rivet-gg/rivetkit
cd rivetkit/examples/crdt
npm install
```

### Development

```sh
npm run dev
```

Open your browser to `http://localhost:3000`

## Features

- **Real-time Collaborative Editing**: Multiple users can edit the same document simultaneously
- **Conflict Resolution**: Uses Yjs CRDTs to automatically resolve editing conflicts
- **Persistent State**: Document changes are automatically persisted
- **Multiple Documents**: Switch between different collaborative documents
- **Live Connection Status**: See when you&#39;re connected to the collaboration server

## How it works

This example demonstrates how to build a collaborative editor using:

1. **Yjs**: A high-performance CRDT implementation for building collaborative applications
2. **RivetKit Actors**: Manage document state and synchronize changes between clients
3. **Real-time Updates**: Use RivetKit&#39;s event system for instant synchronization
4. **Conflict-free Merging**: Yjs automatically handles concurrent edits without conflicts

## Usage

1. Start the development server
2. Open multiple browser tabs to `http://localhost:3000`
3. Start typing in any tab - changes will appear in real-time across all tabs
4. Try editing the same text simultaneously to see conflict resolution in action
5. Switch between different documents using the document ID field

## Architecture

- **Backend**: RivetKit actor that manages Yjs document state and broadcasts updates
- **Frontend**: React application with Yjs integration for local document management
- **Synchronization**: Binary diffs are sent between clients for efficient updates

## License

Apache 2.0">
<input type="hidden" name="project[files][package.json]" value="{&quot;name&quot;:&quot;example-crdt&quot;,&quot;version&quot;:&quot;0.9.9&quot;,&quot;private&quot;:true,&quot;type&quot;:&quot;module&quot;,&quot;scripts&quot;:{&quot;dev&quot;:&quot;concurrently \&quot;npm run dev:backend\&quot; \&quot;npm run dev:frontend\&quot;&quot;,&quot;dev:backend&quot;:&quot;tsx --watch src/backend/server.ts&quot;,&quot;dev:frontend&quot;:&quot;vite&quot;,&quot;build&quot;:&quot;vite build&quot;,&quot;check-types&quot;:&quot;tsc --noEmit&quot;,&quot;test&quot;:&quot;vitest run&quot;},&quot;devDependencies&quot;:{&quot;@types/node&quot;:&quot;^22.13.9&quot;,&quot;@types/react&quot;:&quot;^18.2.0&quot;,&quot;@types/react-dom&quot;:&quot;^18.2.0&quot;,&quot;@vitejs/plugin-react&quot;:&quot;^4.2.0&quot;,&quot;concurrently&quot;:&quot;^8.2.2&quot;,&quot;@rivetkit/actor&quot;:&quot;https://pkg.pr.new/rivet-gg/rivetkit/@rivetkit/actor@27b9131c5788cdf2007730353b43b33a296aedf3&quot;,&quot;tsx&quot;:&quot;^3.12.7&quot;,&quot;typescript&quot;:&quot;^5.5.2&quot;,&quot;vite&quot;:&quot;^5.0.0&quot;,&quot;vitest&quot;:&quot;^3.1.1&quot;},&quot;dependencies&quot;:{&quot;@rivetkit/react&quot;:&quot;https://pkg.pr.new/rivet-gg/rivetkit/@rivetkit/react@27b9131c5788cdf2007730353b43b33a296aedf3&quot;,&quot;react&quot;:&quot;^18.2.0&quot;,&quot;react-dom&quot;:&quot;^18.2.0&quot;,&quot;yjs&quot;:&quot;^13.6.20&quot;},&quot;stableVersion&quot;:&quot;0.8.0&quot;}">
<input type="hidden" name="project[files][tsconfig.json]" value="{
  &quot;compilerOptions&quot;: {
    &quot;target&quot;: &quot;esnext&quot;,
    &quot;lib&quot;: [&quot;esnext&quot;, &quot;dom&quot;],
    &quot;jsx&quot;: &quot;react-jsx&quot;,
    &quot;module&quot;: &quot;esnext&quot;,
    &quot;moduleResolution&quot;: &quot;bundler&quot;,
    &quot;types&quot;: [&quot;node&quot;, &quot;vite/client&quot;],
    &quot;resolveJsonModule&quot;: true,
    &quot;allowJs&quot;: true,
    &quot;checkJs&quot;: false,
    &quot;noEmit&quot;: true,
    &quot;isolatedModules&quot;: true,
    &quot;allowSyntheticDefaultImports&quot;: true,
    &quot;forceConsistentCasingInFileNames&quot;: true,
    &quot;strict&quot;: true,
    &quot;skipLibCheck&quot;: true
  },
  &quot;include&quot;: [&quot;src/**/*&quot;],
  &quot;exclude&quot;: [&quot;node_modules&quot;, &quot;dist&quot;]
}
">
<input type="hidden" name="project[files][turbo.json]" value="{
  &quot;$schema&quot;: &quot;https://turbo.build/schema.json&quot;,
  &quot;extends&quot;: [&quot;//&quot;]
}
">
<input type="hidden" name="project[files][vite.config.ts]" value="import react from &quot;@vitejs/plugin-react&quot;;
import { defineConfig } from &quot;vite&quot;;

export default defineConfig({
	plugins: [react()],
	root: &quot;src/frontend&quot;,
	server: {
		port: 3000,
	},
});
">
<input type="hidden" name="project[files][vitest.config.ts]" value="import { defineConfig } from &quot;vitest/config&quot;;

export default defineConfig({
	test: {
		include: [&quot;tests/**/*.test.ts&quot;],
	},
});
">
<input type="hidden" name="project[files][.turbo/turbo-build.log]" value="
&gt; example-crdt@0.9.9 build /home/runner/work/rivetkit/rivetkit/examples/crdt
&gt; vite build

[36mvite v5.4.19 [32mbuilding for production...[36m[39m
transforming...
[32m✓[39m 251 modules transformed.
rendering chunks...
computing gzip size...
[2mdist/[22m[32mindex.html                  [39m[1m[2m  3.55 kB[22m[1m[22m[2m │ gzip:   1.01 kB[22m
[2mdist/[22m[2massets/[22m[36mbrowser-Di5SkHYC.js  [39m[1m[2m  0.57 kB[22m[1m[22m[2m │ gzip:   0.40 kB[22m
[2mdist/[22m[2massets/[22m[36mindex-z2Dkjsn_.js    [39m[1m[2m  6.73 kB[22m[1m[22m[2m │ gzip:   2.84 kB[22m
[2mdist/[22m[2massets/[22m[36mindex-D0I_Gx-E.js    [39m[1m[2m347.73 kB[22m[1m[22m[2m │ gzip: 106.59 kB[22m
[32m✓ built in 11.87s[39m
">
<input type="hidden" name="project[files][tests/crdt.test.ts]" value="import { setupTest } from &quot;@rivetkit/actor/test&quot;;
import { expect, test, vi } from &quot;vitest&quot;;
import { registry } from &quot;../src/backend/registry&quot;;

// Mock Yjs to avoid complex binary operations in tests
vi.mock(&quot;yjs&quot;, () =&gt; ({
	Doc: vi.fn().mockImplementation(() =&gt; ({
		getText: vi.fn().mockReturnValue({
			toString: vi.fn().mockReturnValue(&quot;&quot;),
			observe: vi.fn(),
			delete: vi.fn(),
			insert: vi.fn(),
		}),
		transact: vi.fn((fn) =&gt; fn()),
		destroy: vi.fn(),
	})),
	applyUpdate: vi.fn(),
	encodeStateAsUpdate: vi.fn().mockReturnValue(new Uint8Array([1, 2, 3, 4])),
}));

test(&quot;CRDT document can handle initial state&quot;, async (ctx) =&gt; {
	const { client } = await setupTest(ctx, registry);
	const doc = client.yjsDocument.getOrCreate([&quot;test-doc&quot;]);

	// Test initial state
	const state = await doc.getState();
	expect(state).toMatchObject({
		docData: &quot;&quot;,
		lastModified: 0,
	});
});

test(&quot;CRDT document can apply updates&quot;, async (ctx) =&gt; {
	const { client } = await setupTest(ctx, registry);
	const doc = client.yjsDocument.getOrCreate([&quot;test-updates&quot;]);

	// Mock update data (Base64 encoded)
	const updateBase64 = btoa(&quot;mock-update-data&quot;);

	// Apply an update
	await doc.applyUpdate(updateBase64);

	// Verify state was updated
	const state = await doc.getState();
	expect(state.docData).not.toBe(&quot;&quot;);
	expect(state.lastModified).toBeGreaterThan(0);
});

test(&quot;CRDT document handles multiple updates&quot;, async (ctx) =&gt; {
	const { client } = await setupTest(ctx, registry);
	const doc = client.yjsDocument.getOrCreate([&quot;test-multiple&quot;]);

	const update1 = btoa(&quot;update-1&quot;);
	const update2 = btoa(&quot;update-2&quot;);
	const update3 = btoa(&quot;update-3&quot;);

	// Apply multiple updates
	await doc.applyUpdate(update1);
	const state1 = await doc.getState();
	const firstModified = state1.lastModified;

	await doc.applyUpdate(update2);
	const state2 = await doc.getState();
	const secondModified = state2.lastModified;

	await doc.applyUpdate(update3);
	const state3 = await doc.getState();
	const thirdModified = state3.lastModified;

	// Verify timestamps are increasing
	expect(secondModified).toBeGreaterThanOrEqual(firstModified);
	expect(thirdModified).toBeGreaterThanOrEqual(secondModified);

	// Verify state is updated
	expect(state3.docData).not.toBe(&quot;&quot;);
	expect(state3.lastModified).toBe(thirdModified);
});

test(&quot;CRDT document handles Base64 encoding correctly&quot;, async (ctx) =&gt; {
	const { client } = await setupTest(ctx, registry);
	const doc = client.yjsDocument.getOrCreate([&quot;test-encoding&quot;]);

	// Test with specific Base64 data
	const testData = &quot;Hello, collaborative world!&quot;;
	const updateBase64 = btoa(testData);

	await doc.applyUpdate(updateBase64);

	const state = await doc.getState();
	expect(state.docData).toBeTruthy();
	expect(state.lastModified).toBeGreaterThan(0);
});
">
<input type="hidden" name="project[files][src/backend/registry.ts]" value="import { actor, setup } from &quot;@rivetkit/actor&quot;;
import * as Y from &quot;yjs&quot;;
import { applyUpdate, encodeStateAsUpdate } from &quot;yjs&quot;;

export const yjsDocument = actor({
	onAuth: () =&gt; {},
	// Persistent state that survives restarts: https://rivet.gg/docs/actors/state
	state: {
		docData: &quot;&quot;, // Base64 encoded Yjs document
		lastModified: 0,
	},

	createVars: () =&gt; ({
		doc: new Y.Doc(),
	}),

	onStart: (c) =&gt; {
		if (c.state.docData) {
			const binary = atob(c.state.docData);
			const bytes = new Uint8Array(binary.length);
			for (let i = 0; i &lt; binary.length; i++) {
				bytes[i] = binary.charCodeAt(i);
			}
			applyUpdate(c.vars.doc, bytes);
		}
	},

	// Handle client connections: https://rivet.gg/docs/actors/connection-lifecycle
	onConnect: (c, conn) =&gt; {
		const update = encodeStateAsUpdate(c.vars.doc);
		const base64 = bufferToBase64(update);
		conn.send(&quot;initialState&quot;, { update: base64 });
	},

	actions: {
		// Callable functions from clients: https://rivet.gg/docs/actors/actions
		applyUpdate: (c, updateBase64: string) =&gt; {
			const binary = atob(updateBase64);
			const update = new Uint8Array(binary.length);
			for (let i = 0; i &lt; binary.length; i++) {
				update[i] = binary.charCodeAt(i);
			}

			applyUpdate(c.vars.doc, update);

			const fullState = encodeStateAsUpdate(c.vars.doc);
			// State changes are automatically persisted
			c.state.docData = bufferToBase64(fullState);
			c.state.lastModified = Date.now();

			// Send events to all connected clients: https://rivet.gg/docs/actors/events
			c.broadcast(&quot;update&quot;, { update: updateBase64 });
		},

		getState: (c) =&gt; ({
			docData: c.state.docData,
			lastModified: c.state.lastModified,
		}),
	},
});

function bufferToBase64(buffer: Uint8Array): string {
	let binary = &quot;&quot;;
	for (let i = 0; i &lt; buffer.byteLength; i++) {
		binary += String.fromCharCode(buffer[i]);
	}
	return btoa(binary);
}

// Register actors for use: https://rivet.gg/docs/setup
export const registry = setup({
	use: { yjsDocument },
});
">
<input type="hidden" name="project[files][src/backend/server.ts]" value="import { registry } from &quot;./registry&quot;;

registry.runServer({
	cors: {
		origin: &quot;http://localhost:5173&quot;,
	},
});
">
<input type="hidden" name="project[files][src/frontend/App.tsx]" value="import { createClient, createRivetKit } from &quot;@rivetkit/react&quot;;
import { useEffect, useRef, useState } from &quot;react&quot;;
import * as Y from &quot;yjs&quot;;
import { applyUpdate, encodeStateAsUpdate } from &quot;yjs&quot;;
import type { registry } from &quot;../backend/registry&quot;;

const client = createClient&lt;typeof registry&gt;(&quot;http://localhost:8080&quot;);
const { useActor } = createRivetKit(client);

function YjsEditor({ documentId }: { documentId: string }) {
	const yjsDocument = useActor({
		name: &quot;yjsDocument&quot;,
		key: [documentId],
	});

	const [isLoading, setIsLoading] = useState(true);
	const [text, setText] = useState(&quot;&quot;);

	const yDocRef = useRef&lt;Y.Doc | null&gt;(null);
	const updatingFromServer = useRef(false);
	const updatingFromLocal = useRef(false);
	const observationInitialized = useRef(false);

	useEffect(() =&gt; {
		const yDoc = new Y.Doc();
		yDocRef.current = yDoc;
		setIsLoading(false);

		return () =&gt; {
			yDoc.destroy();
		};
	}, [yjsDocument.connection]);

	useEffect(() =&gt; {
		const yDoc = yDocRef.current;
		if (!yDoc || observationInitialized.current) return;

		const yText = yDoc.getText(&quot;content&quot;);

		yText.observe(() =&gt; {
			if (!updatingFromServer.current) {
				setText(yText.toString());

				if (yjsDocument.connection &amp;&amp; !updatingFromLocal.current) {
					updatingFromLocal.current = true;

					const update = encodeStateAsUpdate(yDoc);
					const base64 = bufferToBase64(update);
					yjsDocument.connection.applyUpdate(base64).finally(() =&gt; {
						updatingFromLocal.current = false;
					});
				}
			}
		});

		observationInitialized.current = true;
	}, [yjsDocument.connection]);

	yjsDocument.useEvent(&quot;initialState&quot;, ({ update }: { update: string }) =&gt; {
		const yDoc = yDocRef.current;
		if (!yDoc) return;

		updatingFromServer.current = true;

		try {
			const binary = atob(update);
			const bytes = new Uint8Array(binary.length);
			for (let i = 0; i &lt; binary.length; i++) {
				bytes[i] = binary.charCodeAt(i);
			}

			applyUpdate(yDoc, bytes);

			const yText = yDoc.getText(&quot;content&quot;);
			setText(yText.toString());
		} catch (error) {
			console.error(&quot;Error applying initial update:&quot;, error);
		} finally {
			updatingFromServer.current = false;
		}
	});

	yjsDocument.useEvent(&quot;update&quot;, ({ update }: { update: string }) =&gt; {
		const yDoc = yDocRef.current;
		if (!yDoc) return;

		updatingFromServer.current = true;

		try {
			const binary = atob(update);
			const bytes = new Uint8Array(binary.length);
			for (let i = 0; i &lt; binary.length; i++) {
				bytes[i] = binary.charCodeAt(i);
			}

			applyUpdate(yDoc, bytes);

			const yText = yDoc.getText(&quot;content&quot;);
			setText(yText.toString());
		} catch (error) {
			console.error(&quot;Error applying update:&quot;, error);
		} finally {
			updatingFromServer.current = false;
		}
	});

	const handleTextChange = (e: React.ChangeEvent&lt;HTMLTextAreaElement&gt;) =&gt; {
		if (!yDocRef.current) return;

		const newText = e.target.value;
		const yText = yDocRef.current.getText(&quot;content&quot;);

		if (newText !== yText.toString()) {
			updatingFromLocal.current = true;

			yDocRef.current.transact(() =&gt; {
				yText.delete(0, yText.length);
				yText.insert(0, newText);
			});

			updatingFromLocal.current = false;
		}
	};

	if (isLoading) {
		return &lt;div className=&quot;loading&quot;&gt;Loading collaborative document...&lt;/div&gt;;
	}

	return (
		&lt;div className=&quot;editor-container&quot;&gt;
			&lt;div className=&quot;editor-header&quot;&gt;
				&lt;h3&gt;Document: {documentId}&lt;/h3&gt;
				&lt;div className={`connection-status ${yjsDocument.connection ? &#39;connected&#39; : &#39;disconnected&#39;}`}&gt;
					{yjsDocument.connection ? &#39;Connected&#39; : &#39;Disconnected&#39;}
				&lt;/div&gt;
			&lt;/div&gt;
			&lt;textarea
				value={text}
				onChange={handleTextChange}
				placeholder=&quot;Start typing... All changes are synchronized in real-time with other users!&quot;
				className=&quot;collaborative-textarea&quot;
			/&gt;
		&lt;/div&gt;
	);
}

export function App() {
	const [documentId, setDocumentId] = useState(&quot;shared-doc&quot;);
	const [inputDocId, setInputDocId] = useState(&quot;shared-doc&quot;);

	const switchDocument = () =&gt; {
		setDocumentId(inputDocId);
	};

	return (
		&lt;div className=&quot;app-container&quot;&gt;
			&lt;div className=&quot;header&quot;&gt;
				&lt;h1&gt;CRDT Collaborative Editor&lt;/h1&gt;
				&lt;p&gt;Real-time collaborative text editing powered by Yjs and RivetKit&lt;/p&gt;
			&lt;/div&gt;

			&lt;div className=&quot;info-box&quot;&gt;
				&lt;h4&gt;How it works&lt;/h4&gt;
				&lt;p&gt;
					This editor uses Conflict-free Replicated Data Types (CRDTs) with Yjs to enable 
					real-time collaborative editing. Open multiple browser tabs or share the URL 
					with others to see live collaboration in action!
				&lt;/p&gt;
			&lt;/div&gt;

			&lt;div className=&quot;document-controls&quot;&gt;
				&lt;label&gt;Document ID:&lt;/label&gt;
				&lt;input
					type=&quot;text&quot;
					value={inputDocId}
					onChange={(e) =&gt; setInputDocId(e.target.value)}
					placeholder=&quot;Enter document ID&quot;
				/&gt;
				&lt;button onClick={switchDocument}&gt;
					Switch Document
				&lt;/button&gt;
			&lt;/div&gt;

			&lt;YjsEditor key={documentId} documentId={documentId} /&gt;
		&lt;/div&gt;
	);
}

function bufferToBase64(buffer: Uint8Array): string {
	let binary = &quot;&quot;;
	for (let i = 0; i &lt; buffer.byteLength; i++) {
		binary += String.fromCharCode(buffer[i]);
	}
	return btoa(binary);
}">
<input type="hidden" name="project[files][src/frontend/index.html]" value="&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;title&gt;CRDT Collaborative Editor&lt;/title&gt;
    &lt;style&gt;
        body {
            font-family: -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .app-container {
            max-width: 1200px;
            margin: 0 auto;
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
        }
        .header h1 {
            color: #333;
            margin-bottom: 10px;
        }
        .header p {
            color: #666;
            font-size: 1.1em;
        }
        .document-controls {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
            display: flex;
            gap: 15px;
            align-items: center;
        }
        .document-controls label {
            font-weight: 500;
        }
        .document-controls input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }
        .document-controls button {
            padding: 8px 16px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        .document-controls button:hover {
            background: #0056b3;
        }
        .editor-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .editor-header {
            background: #f8f9fa;
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .editor-header h3 {
            margin: 0;
            color: #333;
        }
        .connection-status {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.9em;
            font-weight: 500;
        }
        .connection-status.connected {
            background: #d4edda;
            color: #155724;
        }
        .connection-status.disconnected {
            background: #f8d7da;
            color: #721c24;
        }
        .collaborative-textarea {
            width: 100%;
            min-height: 400px;
            padding: 20px;
            border: none;
            font-family: &#39;Monaco&#39;, &#39;Menlo&#39;, &#39;Ubuntu Mono&#39;, monospace;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
            outline: none;
        }
        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
            font-style: italic;
        }
        .info-box {
            background: #e3f2fd;
            border: 1px solid #2196f3;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }
        .info-box h4 {
            margin: 0 0 10px 0;
            color: #1976d2;
        }
        .info-box p {
            margin: 0;
            color: #333;
        }
    &lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;
    &lt;script type=&quot;module&quot; src=&quot;/main.tsx&quot;&gt;&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;">
<input type="hidden" name="project[files][src/frontend/main.tsx]" value="import { StrictMode } from &quot;react&quot;;
import { createRoot } from &quot;react-dom/client&quot;;
import { App } from &quot;./App&quot;;

const root = document.getElementById(&quot;root&quot;);
if (!root) throw new Error(&quot;Root element not found&quot;);

createRoot(root).render(
	&lt;StrictMode&gt;
		&lt;App /&gt;
	&lt;/StrictMode&gt;
);">
<input type="hidden" name="project[files][src/frontend/dist/index.html]" value="&lt;!DOCTYPE html&gt;
&lt;html lang=&quot;en&quot;&gt;
&lt;head&gt;
    &lt;meta charset=&quot;UTF-8&quot;&gt;
    &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0&quot;&gt;
    &lt;title&gt;CRDT Collaborative Editor&lt;/title&gt;
    &lt;style&gt;
        body {
            font-family: -apple-system, BlinkMacSystemFont, &#39;Segoe UI&#39;, Roboto, sans-serif;
            margin: 0;
            padding: 20px;
            background-color: #f5f5f5;
        }
        .app-container {
            max-width: 1200px;
            margin: 0 auto;
        }
        .header {
            text-align: center;
            margin-bottom: 30px;
        }
        .header h1 {
            color: #333;
            margin-bottom: 10px;
        }
        .header p {
            color: #666;
            font-size: 1.1em;
        }
        .document-controls {
            background: white;
            padding: 20px;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            margin-bottom: 20px;
            display: flex;
            gap: 15px;
            align-items: center;
        }
        .document-controls label {
            font-weight: 500;
        }
        .document-controls input {
            padding: 8px 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            font-size: 16px;
        }
        .document-controls button {
            padding: 8px 16px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 16px;
        }
        .document-controls button:hover {
            background: #0056b3;
        }
        .editor-container {
            background: white;
            border-radius: 8px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .editor-header {
            background: #f8f9fa;
            padding: 15px 20px;
            border-bottom: 1px solid #eee;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .editor-header h3 {
            margin: 0;
            color: #333;
        }
        .connection-status {
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.9em;
            font-weight: 500;
        }
        .connection-status.connected {
            background: #d4edda;
            color: #155724;
        }
        .connection-status.disconnected {
            background: #f8d7da;
            color: #721c24;
        }
        .collaborative-textarea {
            width: 100%;
            min-height: 400px;
            padding: 20px;
            border: none;
            font-family: &#39;Monaco&#39;, &#39;Menlo&#39;, &#39;Ubuntu Mono&#39;, monospace;
            font-size: 14px;
            line-height: 1.5;
            resize: vertical;
            outline: none;
        }
        .loading {
            text-align: center;
            padding: 40px;
            color: #666;
            font-style: italic;
        }
        .info-box {
            background: #e3f2fd;
            border: 1px solid #2196f3;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 20px;
        }
        .info-box h4 {
            margin: 0 0 10px 0;
            color: #1976d2;
        }
        .info-box p {
            margin: 0;
            color: #333;
        }
    &lt;/style&gt;
  &lt;script type=&quot;module&quot; crossorigin src=&quot;/assets/index-D0I_Gx-E.js&quot;&gt;&lt;/script&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div id=&quot;root&quot;&gt;&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;">
<input type="hidden" name="project[files][src/frontend/dist/assets/browser-Di5SkHYC.js]" value="import{g as a}from&quot;./index-D0I_Gx-E.js&quot;;function f(t,s){for(var o=0;o&lt;s.length;o++){const e=s[o];if(typeof e!=&quot;string&quot;&amp;&amp;!Array.isArray(e)){for(const r in e)if(r!==&quot;default&quot;&amp;&amp;!(r in t)){const n=Object.getOwnPropertyDescriptor(e,r);n&amp;&amp;Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=&gt;e[r]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:&quot;Module&quot;}))}var c=function(){throw new Error(&quot;ws does not work in the browser. Browser clients must use the native WebSocket object&quot;)};const i=a(c),u=f({__proto__:null,default:i},[c]);export{u as b};
">
<input type="hidden" name="project[files][src/frontend/dist/assets/index-D0I_Gx-E.js]" value="var W0=Object.defineProperty;var Nd=t=&gt;{throw TypeError(t)};var H0=(t,e,n)=&gt;e in t?W0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var Ht=(t,e,n)=&gt;H0(t,typeof e!=&quot;symbol&quot;?e+&quot;&quot;:e,n),Va=(t,e,n)=&gt;e.has(t)||Nd(&quot;Cannot &quot;+n);var x=(t,e,n)=&gt;(Va(t,e,&quot;read from private field&quot;),n?n.call(t):e.get(t)),ae=(t,e,n)=&gt;e.has(t)?Nd(&quot;Cannot add the same private member more than once&quot;):e instanceof WeakSet?e.add(t):e.set(t,n),ue=(t,e,n,r)=&gt;(Va(t,e,&quot;write to private field&quot;),r?r.call(t,n):e.set(t,n),n),re=(t,e,n)=&gt;(Va(t,e,&quot;access private method&quot;),n);(function(){const e=document.createElement(&quot;link&quot;).relList;if(e&amp;&amp;e.supports&amp;&amp;e.supports(&quot;modulepreload&quot;))return;for(const i of document.querySelectorAll(&#39;link[rel=&quot;modulepreload&quot;]&#39;))r(i);new MutationObserver(i=&gt;{for(const s of i)if(s.type===&quot;childList&quot;)for(const l of s.addedNodes)l.tagName===&quot;LINK&quot;&amp;&amp;l.rel===&quot;modulepreload&quot;&amp;&amp;r(l)}).observe(document,{childList:!0,subtree:!0});function n(i){const s={};return i.integrity&amp;&amp;(s.integrity=i.integrity),i.referrerPolicy&amp;&amp;(s.referrerPolicy=i.referrerPolicy),i.crossOrigin===&quot;use-credentials&quot;?s.credentials=&quot;include&quot;:i.crossOrigin===&quot;anonymous&quot;?s.credentials=&quot;omit&quot;:s.credentials=&quot;same-origin&quot;,s}function r(i){if(i.ep)return;i.ep=!0;const s=n(i);fetch(i.href,s)}})();function Jp(t){return t&amp;&amp;t.__esModule&amp;&amp;Object.prototype.hasOwnProperty.call(t,&quot;default&quot;)?t.default:t}var Gp={exports:{}},ga={},Yp={exports:{}},q={};/**
 * @license React
 * react.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var gl=Symbol.for(&quot;react.element&quot;),Z0=Symbol.for(&quot;react.portal&quot;),K0=Symbol.for(&quot;react.fragment&quot;),Q0=Symbol.for(&quot;react.strict_mode&quot;),J0=Symbol.for(&quot;react.profiler&quot;),G0=Symbol.for(&quot;react.provider&quot;),Y0=Symbol.for(&quot;react.context&quot;),X0=Symbol.for(&quot;react.forward_ref&quot;),q0=Symbol.for(&quot;react.suspense&quot;),ev=Symbol.for(&quot;react.memo&quot;),tv=Symbol.for(&quot;react.lazy&quot;),Id=Symbol.iterator;function nv(t){return t===null||typeof t!=&quot;object&quot;?null:(t=Id&amp;&amp;t[Id]||t[&quot;@@iterator&quot;],typeof t==&quot;function&quot;?t:null)}var Xp={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},qp=Object.assign,eg={};function Yi(t,e,n){this.props=t,this.context=e,this.refs=eg,this.updater=n||Xp}Yi.prototype.isReactComponent={};Yi.prototype.setState=function(t,e){if(typeof t!=&quot;object&quot;&amp;&amp;typeof t!=&quot;function&quot;&amp;&amp;t!=null)throw Error(&quot;setState(...): takes an object of state variables to update or a function which returns an object of state variables.&quot;);this.updater.enqueueSetState(this,t,e,&quot;setState&quot;)};Yi.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,&quot;forceUpdate&quot;)};function tg(){}tg.prototype=Yi.prototype;function uf(t,e,n){this.props=t,this.context=e,this.refs=eg,this.updater=n||Xp}var cf=uf.prototype=new tg;cf.constructor=uf;qp(cf,Yi.prototype);cf.isPureReactComponent=!0;var Dd=Array.isArray,ng=Object.prototype.hasOwnProperty,ff={current:null},rg={key:!0,ref:!0,__self:!0,__source:!0};function ig(t,e,n){var r,i={},s=null,l=null;if(e!=null)for(r in e.ref!==void 0&amp;&amp;(l=e.ref),e.key!==void 0&amp;&amp;(s=&quot;&quot;+e.key),e)ng.call(e,r)&amp;&amp;!rg.hasOwnProperty(r)&amp;&amp;(i[r]=e[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1&lt;o){for(var a=Array(o),u=0;u&lt;o;u++)a[u]=arguments[u+2];i.children=a}if(t&amp;&amp;t.defaultProps)for(r in o=t.defaultProps,o)i[r]===void 0&amp;&amp;(i[r]=o[r]);return{$$typeof:gl,type:t,key:s,ref:l,props:i,_owner:ff.current}}function rv(t,e){return{$$typeof:gl,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}function df(t){return typeof t==&quot;object&quot;&amp;&amp;t!==null&amp;&amp;t.$$typeof===gl}function iv(t){var e={&quot;=&quot;:&quot;=0&quot;,&quot;:&quot;:&quot;=2&quot;};return&quot;$&quot;+t.replace(/[=:]/g,function(n){return e[n]})}var Ld=/\/+/g;function Ba(t,e){return typeof t==&quot;object&quot;&amp;&amp;t!==null&amp;&amp;t.key!=null?iv(&quot;&quot;+t.key):e.toString(36)}function eo(t,e,n,r,i){var s=typeof t;(s===&quot;undefined&quot;||s===&quot;boolean&quot;)&amp;&amp;(t=null);var l=!1;if(t===null)l=!0;else switch(s){case&quot;string&quot;:case&quot;number&quot;:l=!0;break;case&quot;object&quot;:switch(t.$$typeof){case gl:case Z0:l=!0}}if(l)return l=t,i=i(l),t=r===&quot;&quot;?&quot;.&quot;+Ba(l,0):r,Dd(i)?(n=&quot;&quot;,t!=null&amp;&amp;(n=t.replace(Ld,&quot;$&amp;/&quot;)+&quot;/&quot;),eo(i,e,n,&quot;&quot;,function(u){return u})):i!=null&amp;&amp;(df(i)&amp;&amp;(i=rv(i,n+(!i.key||l&amp;&amp;l.key===i.key?&quot;&quot;:(&quot;&quot;+i.key).replace(Ld,&quot;$&amp;/&quot;)+&quot;/&quot;)+t)),e.push(i)),1;if(l=0,r=r===&quot;&quot;?&quot;.&quot;:r+&quot;:&quot;,Dd(t))for(var o=0;o&lt;t.length;o++){s=t[o];var a=r+Ba(s,o);l+=eo(s,e,n,a,i)}else if(a=nv(t),typeof a==&quot;function&quot;)for(t=a.call(t),o=0;!(s=t.next()).done;)s=s.value,a=r+Ba(s,o++),l+=eo(s,e,n,a,i);else if(s===&quot;object&quot;)throw e=String(t),Error(&quot;Objects are not valid as a React child (found: &quot;+(e===&quot;[object Object]&quot;?&quot;object with keys {&quot;+Object.keys(t).join(&quot;, &quot;)+&quot;}&quot;:e)+&quot;). If you meant to render a collection of children, use an array instead.&quot;);return l}function Tl(t,e,n){if(t==null)return t;var r=[],i=0;return eo(t,r,&quot;&quot;,&quot;&quot;,function(s){return e.call(n,s,i++)}),r}function sv(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&amp;&amp;(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&amp;&amp;(t._status=2,t._result=n)}),t._status===-1&amp;&amp;(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var tt={current:null},to={transition:null},lv={ReactCurrentDispatcher:tt,ReactCurrentBatchConfig:to,ReactCurrentOwner:ff};function sg(){throw Error(&quot;act(...) is not supported in production builds of React.&quot;)}q.Children={map:Tl,forEach:function(t,e,n){Tl(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Tl(t,function(){e++}),e},toArray:function(t){return Tl(t,function(e){return e})||[]},only:function(t){if(!df(t))throw Error(&quot;React.Children.only expected to receive a single React element child.&quot;);return t}};q.Component=Yi;q.Fragment=K0;q.Profiler=J0;q.PureComponent=uf;q.StrictMode=Q0;q.Suspense=q0;q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=lv;q.act=sg;q.cloneElement=function(t,e,n){if(t==null)throw Error(&quot;React.cloneElement(...): The argument must be a React element, but you passed &quot;+t+&quot;.&quot;);var r=qp({},t.props),i=t.key,s=t.ref,l=t._owner;if(e!=null){if(e.ref!==void 0&amp;&amp;(s=e.ref,l=ff.current),e.key!==void 0&amp;&amp;(i=&quot;&quot;+e.key),t.type&amp;&amp;t.type.defaultProps)var o=t.type.defaultProps;for(a in e)ng.call(e,a)&amp;&amp;!rg.hasOwnProperty(a)&amp;&amp;(r[a]=e[a]===void 0&amp;&amp;o!==void 0?o[a]:e[a])}var a=arguments.length-2;if(a===1)r.children=n;else if(1&lt;a){o=Array(a);for(var u=0;u&lt;a;u++)o[u]=arguments[u+2];r.children=o}return{$$typeof:gl,type:t.type,key:i,ref:s,props:r,_owner:l}};q.createContext=function(t){return t={$$typeof:Y0,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},t.Provider={$$typeof:G0,_context:t},t.Consumer=t};q.createElement=ig;q.createFactory=function(t){var e=ig.bind(null,t);return e.type=t,e};q.createRef=function(){return{current:null}};q.forwardRef=function(t){return{$$typeof:X0,render:t}};q.isValidElement=df;q.lazy=function(t){return{$$typeof:tv,_payload:{_status:-1,_result:t},_init:sv}};q.memo=function(t,e){return{$$typeof:ev,type:t,compare:e===void 0?null:e}};q.startTransition=function(t){var e=to.transition;to.transition={};try{t()}finally{to.transition=e}};q.unstable_act=sg;q.useCallback=function(t,e){return tt.current.useCallback(t,e)};q.useContext=function(t){return tt.current.useContext(t)};q.useDebugValue=function(){};q.useDeferredValue=function(t){return tt.current.useDeferredValue(t)};q.useEffect=function(t,e){return tt.current.useEffect(t,e)};q.useId=function(){return tt.current.useId()};q.useImperativeHandle=function(t,e,n){return tt.current.useImperativeHandle(t,e,n)};q.useInsertionEffect=function(t,e){return tt.current.useInsertionEffect(t,e)};q.useLayoutEffect=function(t,e){return tt.current.useLayoutEffect(t,e)};q.useMemo=function(t,e){return tt.current.useMemo(t,e)};q.useReducer=function(t,e,n){return tt.current.useReducer(t,e,n)};q.useRef=function(t){return tt.current.useRef(t)};q.useState=function(t){return tt.current.useState(t)};q.useSyncExternalStore=function(t,e,n){return tt.current.useSyncExternalStore(t,e,n)};q.useTransition=function(){return tt.current.useTransition()};q.version=&quot;18.3.1&quot;;Yp.exports=q;var Re=Yp.exports;/**
 * @license React
 * react-jsx-runtime.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ov=Re,av=Symbol.for(&quot;react.element&quot;),uv=Symbol.for(&quot;react.fragment&quot;),cv=Object.prototype.hasOwnProperty,fv=ov.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,dv={key:!0,ref:!0,__self:!0,__source:!0};function lg(t,e,n){var r,i={},s=null,l=null;n!==void 0&amp;&amp;(s=&quot;&quot;+n),e.key!==void 0&amp;&amp;(s=&quot;&quot;+e.key),e.ref!==void 0&amp;&amp;(l=e.ref);for(r in e)cv.call(e,r)&amp;&amp;!dv.hasOwnProperty(r)&amp;&amp;(i[r]=e[r]);if(t&amp;&amp;t.defaultProps)for(r in e=t.defaultProps,e)i[r]===void 0&amp;&amp;(i[r]=e[r]);return{$$typeof:av,type:t,key:s,ref:l,props:i,_owner:fv.current}}ga.Fragment=uv;ga.jsx=lg;ga.jsxs=lg;Gp.exports=ga;var Te=Gp.exports,og={exports:{}},kt={},ag={exports:{}},ug={};/**
 * @license React
 * scheduler.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(t){function e(E,I){var D=E.length;E.push(I);e:for(;0&lt;D;){var B=D-1&gt;&gt;&gt;1,H=E[B];if(0&lt;i(H,I))E[B]=I,E[D]=H,D=B;else break e}}function n(E){return E.length===0?null:E[0]}function r(E){if(E.length===0)return null;var I=E[0],D=E.pop();if(D!==I){E[0]=D;e:for(var B=0,H=E.length,cr=H&gt;&gt;&gt;1;B&lt;cr;){var fr=2*(B+1)-1,$a=E[fr],dr=fr+1,Ol=E[dr];if(0&gt;i($a,D))dr&lt;H&amp;&amp;0&gt;i(Ol,$a)?(E[B]=Ol,E[dr]=D,B=dr):(E[B]=$a,E[fr]=D,B=fr);else if(dr&lt;H&amp;&amp;0&gt;i(Ol,D))E[B]=Ol,E[dr]=D,B=dr;else break e}}return I}function i(E,I){var D=E.sortIndex-I.sortIndex;return D!==0?D:E.id-I.id}if(typeof performance==&quot;object&quot;&amp;&amp;typeof performance.now==&quot;function&quot;){var s=performance;t.unstable_now=function(){return s.now()}}else{var l=Date,o=l.now();t.unstable_now=function(){return l.now()-o}}var a=[],u=[],c=1,f=null,d=3,h=!1,y=!1,k=!1,F=typeof setTimeout==&quot;function&quot;?setTimeout:null,v=typeof clearTimeout==&quot;function&quot;?clearTimeout:null,g=typeof setImmediate&lt;&quot;u&quot;?setImmediate:null;typeof navigator&lt;&quot;u&quot;&amp;&amp;navigator.scheduling!==void 0&amp;&amp;navigator.scheduling.isInputPending!==void 0&amp;&amp;navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(E){for(var I=n(u);I!==null;){if(I.callback===null)r(u);else if(I.startTime&lt;=E)r(u),I.sortIndex=I.expirationTime,e(a,I);else break;I=n(u)}}function O(E){if(k=!1,m(E),!y)if(n(a)!==null)y=!0,R(L);else{var I=n(u);I!==null&amp;&amp;C(O,I.startTime-E)}}function L(E,I){y=!1,k&amp;&amp;(k=!1,v(V),V=-1),h=!0;var D=d;try{for(m(I),f=n(a);f!==null&amp;&amp;(!(f.expirationTime&gt;I)||E&amp;&amp;!rt());){var B=f.callback;if(typeof B==&quot;function&quot;){f.callback=null,d=f.priorityLevel;var H=B(f.expirationTime&lt;=I);I=t.unstable_now(),typeof H==&quot;function&quot;?f.callback=H:f===n(a)&amp;&amp;r(a),m(I)}else r(a);f=n(a)}if(f!==null)var cr=!0;else{var fr=n(u);fr!==null&amp;&amp;C(O,fr.startTime-I),cr=!1}return cr}finally{f=null,d=D,h=!1}}var U=!1,$=null,V=-1,he=5,G=-1;function rt(){return!(t.unstable_now()-G&lt;he)}function On(){if($!==null){var E=t.unstable_now();G=E;var I=!0;try{I=$(!0,E)}finally{I?w():(U=!1,$=null)}}else U=!1}var w;if(typeof g==&quot;function&quot;)w=function(){g(On)};else if(typeof MessageChannel&lt;&quot;u&quot;){var b=new MessageChannel,T=b.port2;b.port1.onmessage=On,w=function(){T.postMessage(null)}}else w=function(){F(On,0)};function R(E){$=E,U||(U=!0,w())}function C(E,I){V=F(function(){E(t.unstable_now())},I)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(E){E.callback=null},t.unstable_continueExecution=function(){y||h||(y=!0,R(L))},t.unstable_forceFrameRate=function(E){0&gt;E||125&lt;E?console.error(&quot;forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported&quot;):he=0&lt;E?Math.floor(1e3/E):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_getFirstCallbackNode=function(){return n(a)},t.unstable_next=function(E){switch(d){case 1:case 2:case 3:var I=3;break;default:I=d}var D=d;d=I;try{return E()}finally{d=D}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(E,I){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var D=d;d=E;try{return I()}finally{d=D}},t.unstable_scheduleCallback=function(E,I,D){var B=t.unstable_now();switch(typeof D==&quot;object&quot;&amp;&amp;D!==null?(D=D.delay,D=typeof D==&quot;number&quot;&amp;&amp;0&lt;D?B+D:B):D=B,E){case 1:var H=-1;break;case 2:H=250;break;case 5:H=1073741823;break;case 4:H=1e4;break;default:H=5e3}return H=D+H,E={id:c++,callback:I,priorityLevel:E,startTime:D,expirationTime:H,sortIndex:-1},D&gt;B?(E.sortIndex=D,e(u,E),n(a)===null&amp;&amp;E===n(u)&amp;&amp;(k?(v(V),V=-1):k=!0,C(O,D-B))):(E.sortIndex=H,e(a,E),y||h||(y=!0,R(L))),E},t.unstable_shouldYield=rt,t.unstable_wrapCallback=function(E){var I=d;return function(){var D=d;d=I;try{return E.apply(this,arguments)}finally{d=D}}}})(ug);ag.exports=ug;var hv=ag.exports;/**
 * @license React
 * react-dom.production.min.js
 *
 * Copyright (c) Facebook, Inc. and its affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var pv=Re,wt=hv;function A(t){for(var e=&quot;https://reactjs.org/docs/error-decoder.html?invariant=&quot;+t,n=1;n&lt;arguments.length;n++)e+=&quot;&amp;args[]=&quot;+encodeURIComponent(arguments[n]);return&quot;Minified React error #&quot;+t+&quot;; visit &quot;+e+&quot; for the full message or use the non-minified dev environment for full errors and additional helpful warnings.&quot;}var cg=new Set,Ps={};function Br(t,e){Ii(t,e),Ii(t+&quot;Capture&quot;,e)}function Ii(t,e){for(Ps[t]=e,t=0;t&lt;e.length;t++)cg.add(e[t])}var vn=!(typeof window&gt;&quot;u&quot;||typeof window.document&gt;&quot;u&quot;||typeof window.document.createElement&gt;&quot;u&quot;),Mu=Object.prototype.hasOwnProperty,gv=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,Md={},Pd={};function mv(t){return Mu.call(Pd,t)?!0:Mu.call(Md,t)?!1:gv.test(t)?Pd[t]=!0:(Md[t]=!0,!1)}function yv(t,e,n,r){if(n!==null&amp;&amp;n.type===0)return!1;switch(typeof e){case&quot;function&quot;:case&quot;symbol&quot;:return!0;case&quot;boolean&quot;:return r?!1:n!==null?!n.acceptsBooleans:(t=t.toLowerCase().slice(0,5),t!==&quot;data-&quot;&amp;&amp;t!==&quot;aria-&quot;);default:return!1}}function vv(t,e,n,r){if(e===null||typeof e&gt;&quot;u&quot;||yv(t,e,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1&gt;e}return!1}function nt(t,e,n,r,i,s,l){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=t,this.type=e,this.sanitizeURL=s,this.removeEmptyString=l}var Ze={};&quot;children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style&quot;.split(&quot; &quot;).forEach(function(t){Ze[t]=new nt(t,0,!1,t,null,!1,!1)});[[&quot;acceptCharset&quot;,&quot;accept-charset&quot;],[&quot;className&quot;,&quot;class&quot;],[&quot;htmlFor&quot;,&quot;for&quot;],[&quot;httpEquiv&quot;,&quot;http-equiv&quot;]].forEach(function(t){var e=t[0];Ze[e]=new nt(e,1,!1,t[1],null,!1,!1)});[&quot;contentEditable&quot;,&quot;draggable&quot;,&quot;spellCheck&quot;,&quot;value&quot;].forEach(function(t){Ze[t]=new nt(t,2,!1,t.toLowerCase(),null,!1,!1)});[&quot;autoReverse&quot;,&quot;externalResourcesRequired&quot;,&quot;focusable&quot;,&quot;preserveAlpha&quot;].forEach(function(t){Ze[t]=new nt(t,2,!1,t,null,!1,!1)});&quot;allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope&quot;.split(&quot; &quot;).forEach(function(t){Ze[t]=new nt(t,3,!1,t.toLowerCase(),null,!1,!1)});[&quot;checked&quot;,&quot;multiple&quot;,&quot;muted&quot;,&quot;selected&quot;].forEach(function(t){Ze[t]=new nt(t,3,!0,t,null,!1,!1)});[&quot;capture&quot;,&quot;download&quot;].forEach(function(t){Ze[t]=new nt(t,4,!1,t,null,!1,!1)});[&quot;cols&quot;,&quot;rows&quot;,&quot;size&quot;,&quot;span&quot;].forEach(function(t){Ze[t]=new nt(t,6,!1,t,null,!1,!1)});[&quot;rowSpan&quot;,&quot;start&quot;].forEach(function(t){Ze[t]=new nt(t,5,!1,t.toLowerCase(),null,!1,!1)});var hf=/[\-:]([a-z])/g;function pf(t){return t[1].toUpperCase()}&quot;accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height&quot;.split(&quot; &quot;).forEach(function(t){var e=t.replace(hf,pf);Ze[e]=new nt(e,1,!1,t,null,!1,!1)});&quot;xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type&quot;.split(&quot; &quot;).forEach(function(t){var e=t.replace(hf,pf);Ze[e]=new nt(e,1,!1,t,&quot;http://www.w3.org/1999/xlink&quot;,!1,!1)});[&quot;xml:base&quot;,&quot;xml:lang&quot;,&quot;xml:space&quot;].forEach(function(t){var e=t.replace(hf,pf);Ze[e]=new nt(e,1,!1,t,&quot;http://www.w3.org/XML/1998/namespace&quot;,!1,!1)});[&quot;tabIndex&quot;,&quot;crossOrigin&quot;].forEach(function(t){Ze[t]=new nt(t,1,!1,t.toLowerCase(),null,!1,!1)});Ze.xlinkHref=new nt(&quot;xlinkHref&quot;,1,!1,&quot;xlink:href&quot;,&quot;http://www.w3.org/1999/xlink&quot;,!0,!1);[&quot;src&quot;,&quot;href&quot;,&quot;action&quot;,&quot;formAction&quot;].forEach(function(t){Ze[t]=new nt(t,1,!1,t.toLowerCase(),null,!0,!0)});function gf(t,e,n,r){var i=Ze.hasOwnProperty(e)?Ze[e]:null;(i!==null?i.type!==0:r||!(2&lt;e.length)||e[0]!==&quot;o&quot;&amp;&amp;e[0]!==&quot;O&quot;||e[1]!==&quot;n&quot;&amp;&amp;e[1]!==&quot;N&quot;)&amp;&amp;(vv(e,n,i,r)&amp;&amp;(n=null),r||i===null?mv(e)&amp;&amp;(n===null?t.removeAttribute(e):t.setAttribute(e,&quot;&quot;+n)):i.mustUseProperty?t[i.propertyName]=n===null?i.type===3?!1:&quot;&quot;:n:(e=i.attributeName,r=i.attributeNamespace,n===null?t.removeAttribute(e):(i=i.type,n=i===3||i===4&amp;&amp;n===!0?&quot;&quot;:&quot;&quot;+n,r?t.setAttributeNS(r,e,n):t.setAttribute(e,n))))}var xn=pv.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Al=Symbol.for(&quot;react.element&quot;),Xr=Symbol.for(&quot;react.portal&quot;),qr=Symbol.for(&quot;react.fragment&quot;),mf=Symbol.for(&quot;react.strict_mode&quot;),Pu=Symbol.for(&quot;react.profiler&quot;),fg=Symbol.for(&quot;react.provider&quot;),dg=Symbol.for(&quot;react.context&quot;),yf=Symbol.for(&quot;react.forward_ref&quot;),Uu=Symbol.for(&quot;react.suspense&quot;),bu=Symbol.for(&quot;react.suspense_list&quot;),vf=Symbol.for(&quot;react.memo&quot;),Rn=Symbol.for(&quot;react.lazy&quot;),hg=Symbol.for(&quot;react.offscreen&quot;),Ud=Symbol.iterator;function is(t){return t===null||typeof t!=&quot;object&quot;?null:(t=Ud&amp;&amp;t[Ud]||t[&quot;@@iterator&quot;],typeof t==&quot;function&quot;?t:null)}var ke=Object.assign,Wa;function gs(t){if(Wa===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Wa=e&amp;&amp;e[1]||&quot;&quot;}return`
`+Wa+t}var Ha=!1;function Za(t,e){if(!t||Ha)return&quot;&quot;;Ha=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(e)if(e=function(){throw Error()},Object.defineProperty(e.prototype,&quot;props&quot;,{set:function(){throw Error()}}),typeof Reflect==&quot;object&quot;&amp;&amp;Reflect.construct){try{Reflect.construct(e,[])}catch(u){var r=u}Reflect.construct(t,[],e)}else{try{e.call()}catch(u){r=u}t.call(e.prototype)}else{try{throw Error()}catch(u){r=u}t()}}catch(u){if(u&amp;&amp;r&amp;&amp;typeof u.stack==&quot;string&quot;){for(var i=u.stack.split(`
`),s=r.stack.split(`
`),l=i.length-1,o=s.length-1;1&lt;=l&amp;&amp;0&lt;=o&amp;&amp;i[l]!==s[o];)o--;for(;1&lt;=l&amp;&amp;0&lt;=o;l--,o--)if(i[l]!==s[o]){if(l!==1||o!==1)do if(l--,o--,0&gt;o||i[l]!==s[o]){var a=`
`+i[l].replace(&quot; at new &quot;,&quot; at &quot;);return t.displayName&amp;&amp;a.includes(&quot;&lt;anonymous&gt;&quot;)&amp;&amp;(a=a.replace(&quot;&lt;anonymous&gt;&quot;,t.displayName)),a}while(1&lt;=l&amp;&amp;0&lt;=o);break}}}finally{Ha=!1,Error.prepareStackTrace=n}return(t=t?t.displayName||t.name:&quot;&quot;)?gs(t):&quot;&quot;}function wv(t){switch(t.tag){case 5:return gs(t.type);case 16:return gs(&quot;Lazy&quot;);case 13:return gs(&quot;Suspense&quot;);case 19:return gs(&quot;SuspenseList&quot;);case 0:case 2:case 15:return t=Za(t.type,!1),t;case 11:return t=Za(t.type.render,!1),t;case 1:return t=Za(t.type,!0),t;default:return&quot;&quot;}}function zu(t){if(t==null)return null;if(typeof t==&quot;function&quot;)return t.displayName||t.name||null;if(typeof t==&quot;string&quot;)return t;switch(t){case qr:return&quot;Fragment&quot;;case Xr:return&quot;Portal&quot;;case Pu:return&quot;Profiler&quot;;case mf:return&quot;StrictMode&quot;;case Uu:return&quot;Suspense&quot;;case bu:return&quot;SuspenseList&quot;}if(typeof t==&quot;object&quot;)switch(t.$$typeof){case dg:return(t.displayName||&quot;Context&quot;)+&quot;.Consumer&quot;;case fg:return(t._context.displayName||&quot;Context&quot;)+&quot;.Provider&quot;;case yf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||&quot;&quot;,t=t!==&quot;&quot;?&quot;ForwardRef(&quot;+t+&quot;)&quot;:&quot;ForwardRef&quot;),t;case vf:return e=t.displayName||null,e!==null?e:zu(t.type)||&quot;Memo&quot;;case Rn:e=t._payload,t=t._init;try{return zu(t(e))}catch{}}return null}function _v(t){var e=t.type;switch(t.tag){case 24:return&quot;Cache&quot;;case 9:return(e.displayName||&quot;Context&quot;)+&quot;.Consumer&quot;;case 10:return(e._context.displayName||&quot;Context&quot;)+&quot;.Provider&quot;;case 18:return&quot;DehydratedFragment&quot;;case 11:return t=e.render,t=t.displayName||t.name||&quot;&quot;,e.displayName||(t!==&quot;&quot;?&quot;ForwardRef(&quot;+t+&quot;)&quot;:&quot;ForwardRef&quot;);case 7:return&quot;Fragment&quot;;case 5:return e;case 4:return&quot;Portal&quot;;case 3:return&quot;Root&quot;;case 6:return&quot;Text&quot;;case 16:return zu(e);case 8:return e===mf?&quot;StrictMode&quot;:&quot;Mode&quot;;case 22:return&quot;Offscreen&quot;;case 12:return&quot;Profiler&quot;;case 21:return&quot;Scope&quot;;case 13:return&quot;Suspense&quot;;case 19:return&quot;SuspenseList&quot;;case 25:return&quot;TracingMarker&quot;;case 1:case 0:case 17:case 2:case 14:case 15:if(typeof e==&quot;function&quot;)return e.displayName||e.name||null;if(typeof e==&quot;string&quot;)return e}return null}function qn(t){switch(typeof t){case&quot;boolean&quot;:case&quot;number&quot;:case&quot;string&quot;:case&quot;undefined&quot;:return t;case&quot;object&quot;:return t;default:return&quot;&quot;}}function pg(t){var e=t.type;return(t=t.nodeName)&amp;&amp;t.toLowerCase()===&quot;input&quot;&amp;&amp;(e===&quot;checkbox&quot;||e===&quot;radio&quot;)}function kv(t){var e=pg(t)?&quot;checked&quot;:&quot;value&quot;,n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e),r=&quot;&quot;+t[e];if(!t.hasOwnProperty(e)&amp;&amp;typeof n&lt;&quot;u&quot;&amp;&amp;typeof n.get==&quot;function&quot;&amp;&amp;typeof n.set==&quot;function&quot;){var i=n.get,s=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return i.call(this)},set:function(l){r=&quot;&quot;+l,s.call(this,l)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(l){r=&quot;&quot;+l},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Rl(t){t._valueTracker||(t._valueTracker=kv(t))}function gg(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),r=&quot;&quot;;return t&amp;&amp;(r=pg(t)?t.checked?&quot;true&quot;:&quot;false&quot;:t.value),t=r,t!==n?(e.setValue(t),!0):!1}function Eo(t){if(t=t||(typeof document&lt;&quot;u&quot;?document:void 0),typeof t&gt;&quot;u&quot;)return null;try{return t.activeElement||t.body}catch{return t.body}}function ju(t,e){var n=e.checked;return ke({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??t._wrapperState.initialChecked})}function bd(t,e){var n=e.defaultValue==null?&quot;&quot;:e.defaultValue,r=e.checked!=null?e.checked:e.defaultChecked;n=qn(e.value!=null?e.value:n),t._wrapperState={initialChecked:r,initialValue:n,controlled:e.type===&quot;checkbox&quot;||e.type===&quot;radio&quot;?e.checked!=null:e.value!=null}}function mg(t,e){e=e.checked,e!=null&amp;&amp;gf(t,&quot;checked&quot;,e,!1)}function Fu(t,e){mg(t,e);var n=qn(e.value),r=e.type;if(n!=null)r===&quot;number&quot;?(n===0&amp;&amp;t.value===&quot;&quot;||t.value!=n)&amp;&amp;(t.value=&quot;&quot;+n):t.value!==&quot;&quot;+n&amp;&amp;(t.value=&quot;&quot;+n);else if(r===&quot;submit&quot;||r===&quot;reset&quot;){t.removeAttribute(&quot;value&quot;);return}e.hasOwnProperty(&quot;value&quot;)?$u(t,e.type,n):e.hasOwnProperty(&quot;defaultValue&quot;)&amp;&amp;$u(t,e.type,qn(e.defaultValue)),e.checked==null&amp;&amp;e.defaultChecked!=null&amp;&amp;(t.defaultChecked=!!e.defaultChecked)}function zd(t,e,n){if(e.hasOwnProperty(&quot;value&quot;)||e.hasOwnProperty(&quot;defaultValue&quot;)){var r=e.type;if(!(r!==&quot;submit&quot;&amp;&amp;r!==&quot;reset&quot;||e.value!==void 0&amp;&amp;e.value!==null))return;e=&quot;&quot;+t._wrapperState.initialValue,n||e===t.value||(t.value=e),t.defaultValue=e}n=t.name,n!==&quot;&quot;&amp;&amp;(t.name=&quot;&quot;),t.defaultChecked=!!t._wrapperState.initialChecked,n!==&quot;&quot;&amp;&amp;(t.name=n)}function $u(t,e,n){(e!==&quot;number&quot;||Eo(t.ownerDocument)!==t)&amp;&amp;(n==null?t.defaultValue=&quot;&quot;+t._wrapperState.initialValue:t.defaultValue!==&quot;&quot;+n&amp;&amp;(t.defaultValue=&quot;&quot;+n))}var ms=Array.isArray;function di(t,e,n,r){if(t=t.options,e){e={};for(var i=0;i&lt;n.length;i++)e[&quot;$&quot;+n[i]]=!0;for(n=0;n&lt;t.length;n++)i=e.hasOwnProperty(&quot;$&quot;+t[n].value),t[n].selected!==i&amp;&amp;(t[n].selected=i),i&amp;&amp;r&amp;&amp;(t[n].defaultSelected=!0)}else{for(n=&quot;&quot;+qn(n),e=null,i=0;i&lt;t.length;i++){if(t[i].value===n){t[i].selected=!0,r&amp;&amp;(t[i].defaultSelected=!0);return}e!==null||t[i].disabled||(e=t[i])}e!==null&amp;&amp;(e.selected=!0)}}function Vu(t,e){if(e.dangerouslySetInnerHTML!=null)throw Error(A(91));return ke({},e,{value:void 0,defaultValue:void 0,children:&quot;&quot;+t._wrapperState.initialValue})}function jd(t,e){var n=e.value;if(n==null){if(n=e.children,e=e.defaultValue,n!=null){if(e!=null)throw Error(A(92));if(ms(n)){if(1&lt;n.length)throw Error(A(93));n=n[0]}e=n}e==null&amp;&amp;(e=&quot;&quot;),n=e}t._wrapperState={initialValue:qn(n)}}function yg(t,e){var n=qn(e.value),r=qn(e.defaultValue);n!=null&amp;&amp;(n=&quot;&quot;+n,n!==t.value&amp;&amp;(t.value=n),e.defaultValue==null&amp;&amp;t.defaultValue!==n&amp;&amp;(t.defaultValue=n)),r!=null&amp;&amp;(t.defaultValue=&quot;&quot;+r)}function Fd(t){var e=t.textContent;e===t._wrapperState.initialValue&amp;&amp;e!==&quot;&quot;&amp;&amp;e!==null&amp;&amp;(t.value=e)}function vg(t){switch(t){case&quot;svg&quot;:return&quot;http://www.w3.org/2000/svg&quot;;case&quot;math&quot;:return&quot;http://www.w3.org/1998/Math/MathML&quot;;default:return&quot;http://www.w3.org/1999/xhtml&quot;}}function Bu(t,e){return t==null||t===&quot;http://www.w3.org/1999/xhtml&quot;?vg(e):t===&quot;http://www.w3.org/2000/svg&quot;&amp;&amp;e===&quot;foreignObject&quot;?&quot;http://www.w3.org/1999/xhtml&quot;:t}var Nl,wg=function(t){return typeof MSApp&lt;&quot;u&quot;&amp;&amp;MSApp.execUnsafeLocalFunction?function(e,n,r,i){MSApp.execUnsafeLocalFunction(function(){return t(e,n,r,i)})}:t}(function(t,e){if(t.namespaceURI!==&quot;http://www.w3.org/2000/svg&quot;||&quot;innerHTML&quot;in t)t.innerHTML=e;else{for(Nl=Nl||document.createElement(&quot;div&quot;),Nl.innerHTML=&quot;&lt;svg&gt;&quot;+e.valueOf().toString()+&quot;&lt;/svg&gt;&quot;,e=Nl.firstChild;t.firstChild;)t.removeChild(t.firstChild);for(;e.firstChild;)t.appendChild(e.firstChild)}});function Us(t,e){if(e){var n=t.firstChild;if(n&amp;&amp;n===t.lastChild&amp;&amp;n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var xs={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Sv=[&quot;Webkit&quot;,&quot;ms&quot;,&quot;Moz&quot;,&quot;O&quot;];Object.keys(xs).forEach(function(t){Sv.forEach(function(e){e=e+t.charAt(0).toUpperCase()+t.substring(1),xs[e]=xs[t]})});function _g(t,e,n){return e==null||typeof e==&quot;boolean&quot;||e===&quot;&quot;?&quot;&quot;:n||typeof e!=&quot;number&quot;||e===0||xs.hasOwnProperty(t)&amp;&amp;xs[t]?(&quot;&quot;+e).trim():e+&quot;px&quot;}function kg(t,e){t=t.style;for(var n in e)if(e.hasOwnProperty(n)){var r=n.indexOf(&quot;--&quot;)===0,i=_g(n,e[n],r);n===&quot;float&quot;&amp;&amp;(n=&quot;cssFloat&quot;),r?t.setProperty(n,i):t[n]=i}}var xv=ke({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wu(t,e){if(e){if(xv[t]&amp;&amp;(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(A(137,t));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(A(60));if(typeof e.dangerouslySetInnerHTML!=&quot;object&quot;||!(&quot;__html&quot;in e.dangerouslySetInnerHTML))throw Error(A(61))}if(e.style!=null&amp;&amp;typeof e.style!=&quot;object&quot;)throw Error(A(62))}}function Hu(t,e){if(t.indexOf(&quot;-&quot;)===-1)return typeof e.is==&quot;string&quot;;switch(t){case&quot;annotation-xml&quot;:case&quot;color-profile&quot;:case&quot;font-face&quot;:case&quot;font-face-src&quot;:case&quot;font-face-uri&quot;:case&quot;font-face-format&quot;:case&quot;font-face-name&quot;:case&quot;missing-glyph&quot;:return!1;default:return!0}}var Zu=null;function wf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&amp;&amp;(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ku=null,hi=null,pi=null;function $d(t){if(t=vl(t)){if(typeof Ku!=&quot;function&quot;)throw Error(A(280));var e=t.stateNode;e&amp;&amp;(e=_a(e),Ku(t.stateNode,t.type,e))}}function Sg(t){hi?pi?pi.push(t):pi=[t]:hi=t}function xg(){if(hi){var t=hi,e=pi;if(pi=hi=null,$d(t),e)for(t=0;t&lt;e.length;t++)$d(e[t])}}function Eg(t,e){return t(e)}function Cg(){}var Ka=!1;function Og(t,e,n){if(Ka)return t(e,n);Ka=!0;try{return Eg(t,e,n)}finally{Ka=!1,(hi!==null||pi!==null)&amp;&amp;(Cg(),xg())}}function bs(t,e){var n=t.stateNode;if(n===null)return null;var r=_a(n);if(r===null)return null;n=r[e];e:switch(e){case&quot;onClick&quot;:case&quot;onClickCapture&quot;:case&quot;onDoubleClick&quot;:case&quot;onDoubleClickCapture&quot;:case&quot;onMouseDown&quot;:case&quot;onMouseDownCapture&quot;:case&quot;onMouseMove&quot;:case&quot;onMouseMoveCapture&quot;:case&quot;onMouseUp&quot;:case&quot;onMouseUpCapture&quot;:case&quot;onMouseEnter&quot;:(r=!r.disabled)||(t=t.type,r=!(t===&quot;button&quot;||t===&quot;input&quot;||t===&quot;select&quot;||t===&quot;textarea&quot;)),t=!r;break e;default:t=!1}if(t)return null;if(n&amp;&amp;typeof n!=&quot;function&quot;)throw Error(A(231,e,typeof n));return n}var Qu=!1;if(vn)try{var ss={};Object.defineProperty(ss,&quot;passive&quot;,{get:function(){Qu=!0}}),window.addEventListener(&quot;test&quot;,ss,ss),window.removeEventListener(&quot;test&quot;,ss,ss)}catch{Qu=!1}function Ev(t,e,n,r,i,s,l,o,a){var u=Array.prototype.slice.call(arguments,3);try{e.apply(n,u)}catch(c){this.onError(c)}}var Es=!1,Co=null,Oo=!1,Ju=null,Cv={onError:function(t){Es=!0,Co=t}};function Ov(t,e,n,r,i,s,l,o,a){Es=!1,Co=null,Ev.apply(Cv,arguments)}function Tv(t,e,n,r,i,s,l,o,a){if(Ov.apply(this,arguments),Es){if(Es){var u=Co;Es=!1,Co=null}else throw Error(A(198));Oo||(Oo=!0,Ju=u)}}function Wr(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&amp;4098&amp;&amp;(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function Tg(t){if(t.tag===13){var e=t.memoizedState;if(e===null&amp;&amp;(t=t.alternate,t!==null&amp;&amp;(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function Vd(t){if(Wr(t)!==t)throw Error(A(188))}function Av(t){var e=t.alternate;if(!e){if(e=Wr(t),e===null)throw Error(A(188));return e!==t?null:t}for(var n=t,r=e;;){var i=n.return;if(i===null)break;var s=i.alternate;if(s===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return Vd(i),t;if(s===r)return Vd(i),e;s=s.sibling}throw Error(A(188))}if(n.return!==r.return)n=i,r=s;else{for(var l=!1,o=i.child;o;){if(o===n){l=!0,n=i,r=s;break}if(o===r){l=!0,r=i,n=s;break}o=o.sibling}if(!l){for(o=s.child;o;){if(o===n){l=!0,n=s,r=i;break}if(o===r){l=!0,r=s,n=i;break}o=o.sibling}if(!l)throw Error(A(189))}}if(n.alternate!==r)throw Error(A(190))}if(n.tag!==3)throw Error(A(188));return n.stateNode.current===n?t:e}function Ag(t){return t=Av(t),t!==null?Rg(t):null}function Rg(t){if(t.tag===5||t.tag===6)return t;for(t=t.child;t!==null;){var e=Rg(t);if(e!==null)return e;t=t.sibling}return null}var Ng=wt.unstable_scheduleCallback,Bd=wt.unstable_cancelCallback,Rv=wt.unstable_shouldYield,Nv=wt.unstable_requestPaint,Oe=wt.unstable_now,Iv=wt.unstable_getCurrentPriorityLevel,_f=wt.unstable_ImmediatePriority,Ig=wt.unstable_UserBlockingPriority,To=wt.unstable_NormalPriority,Dv=wt.unstable_LowPriority,Dg=wt.unstable_IdlePriority,ma=null,en=null;function Lv(t){if(en&amp;&amp;typeof en.onCommitFiberRoot==&quot;function&quot;)try{en.onCommitFiberRoot(ma,t,void 0,(t.current.flags&amp;128)===128)}catch{}}var $t=Math.clz32?Math.clz32:Uv,Mv=Math.log,Pv=Math.LN2;function Uv(t){return t&gt;&gt;&gt;=0,t===0?32:31-(Mv(t)/Pv|0)|0}var Il=64,Dl=4194304;function ys(t){switch(t&amp;-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t&amp;4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return t&amp;130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return t}}function Ao(t,e){var n=t.pendingLanes;if(n===0)return 0;var r=0,i=t.suspendedLanes,s=t.pingedLanes,l=n&amp;268435455;if(l!==0){var o=l&amp;~i;o!==0?r=ys(o):(s&amp;=l,s!==0&amp;&amp;(r=ys(s)))}else l=n&amp;~i,l!==0?r=ys(l):s!==0&amp;&amp;(r=ys(s));if(r===0)return 0;if(e!==0&amp;&amp;e!==r&amp;&amp;!(e&amp;i)&amp;&amp;(i=r&amp;-r,s=e&amp;-e,i&gt;=s||i===16&amp;&amp;(s&amp;4194240)!==0))return e;if(r&amp;4&amp;&amp;(r|=n&amp;16),e=t.entangledLanes,e!==0)for(t=t.entanglements,e&amp;=r;0&lt;e;)n=31-$t(e),i=1&lt;&lt;n,r|=t[n],e&amp;=~i;return r}function bv(t,e){switch(t){case 1:case 2:case 4:return e+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function zv(t,e){for(var n=t.suspendedLanes,r=t.pingedLanes,i=t.expirationTimes,s=t.pendingLanes;0&lt;s;){var l=31-$t(s),o=1&lt;&lt;l,a=i[l];a===-1?(!(o&amp;n)||o&amp;r)&amp;&amp;(i[l]=bv(o,e)):a&lt;=e&amp;&amp;(t.expiredLanes|=o),s&amp;=~o}}function Gu(t){return t=t.pendingLanes&amp;-1073741825,t!==0?t:t&amp;1073741824?1073741824:0}function Lg(){var t=Il;return Il&lt;&lt;=1,!(Il&amp;4194240)&amp;&amp;(Il=64),t}function Qa(t){for(var e=[],n=0;31&gt;n;n++)e.push(t);return e}function ml(t,e,n){t.pendingLanes|=e,e!==536870912&amp;&amp;(t.suspendedLanes=0,t.pingedLanes=0),t=t.eventTimes,e=31-$t(e),t[e]=n}function jv(t,e){var n=t.pendingLanes&amp;~e;t.pendingLanes=e,t.suspendedLanes=0,t.pingedLanes=0,t.expiredLanes&amp;=e,t.mutableReadLanes&amp;=e,t.entangledLanes&amp;=e,e=t.entanglements;var r=t.eventTimes;for(t=t.expirationTimes;0&lt;n;){var i=31-$t(n),s=1&lt;&lt;i;e[i]=0,r[i]=-1,t[i]=-1,n&amp;=~s}}function kf(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var r=31-$t(n),i=1&lt;&lt;r;i&amp;e|t[r]&amp;e&amp;&amp;(t[r]|=e),n&amp;=~i}}var ce=0;function Mg(t){return t&amp;=-t,1&lt;t?4&lt;t?t&amp;268435455?16:536870912:4:1}var Pg,Sf,Ug,bg,zg,Yu=!1,Ll=[],Bn=null,Wn=null,Hn=null,zs=new Map,js=new Map,Dn=[],Fv=&quot;mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit&quot;.split(&quot; &quot;);function Wd(t,e){switch(t){case&quot;focusin&quot;:case&quot;focusout&quot;:Bn=null;break;case&quot;dragenter&quot;:case&quot;dragleave&quot;:Wn=null;break;case&quot;mouseover&quot;:case&quot;mouseout&quot;:Hn=null;break;case&quot;pointerover&quot;:case&quot;pointerout&quot;:zs.delete(e.pointerId);break;case&quot;gotpointercapture&quot;:case&quot;lostpointercapture&quot;:js.delete(e.pointerId)}}function ls(t,e,n,r,i,s){return t===null||t.nativeEvent!==s?(t={blockedOn:e,domEventName:n,eventSystemFlags:r,nativeEvent:s,targetContainers:[i]},e!==null&amp;&amp;(e=vl(e),e!==null&amp;&amp;Sf(e)),t):(t.eventSystemFlags|=r,e=t.targetContainers,i!==null&amp;&amp;e.indexOf(i)===-1&amp;&amp;e.push(i),t)}function $v(t,e,n,r,i){switch(e){case&quot;focusin&quot;:return Bn=ls(Bn,t,e,n,r,i),!0;case&quot;dragenter&quot;:return Wn=ls(Wn,t,e,n,r,i),!0;case&quot;mouseover&quot;:return Hn=ls(Hn,t,e,n,r,i),!0;case&quot;pointerover&quot;:var s=i.pointerId;return zs.set(s,ls(zs.get(s)||null,t,e,n,r,i)),!0;case&quot;gotpointercapture&quot;:return s=i.pointerId,js.set(s,ls(js.get(s)||null,t,e,n,r,i)),!0}return!1}function jg(t){var e=vr(t.target);if(e!==null){var n=Wr(e);if(n!==null){if(e=n.tag,e===13){if(e=Tg(n),e!==null){t.blockedOn=e,zg(t.priority,function(){Ug(n)});return}}else if(e===3&amp;&amp;n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function no(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0&lt;e.length;){var n=Xu(t.domEventName,t.eventSystemFlags,e[0],t.nativeEvent);if(n===null){n=t.nativeEvent;var r=new n.constructor(n.type,n);Zu=r,n.target.dispatchEvent(r),Zu=null}else return e=vl(n),e!==null&amp;&amp;Sf(e),t.blockedOn=n,!1;e.shift()}return!0}function Hd(t,e,n){no(t)&amp;&amp;n.delete(e)}function Vv(){Yu=!1,Bn!==null&amp;&amp;no(Bn)&amp;&amp;(Bn=null),Wn!==null&amp;&amp;no(Wn)&amp;&amp;(Wn=null),Hn!==null&amp;&amp;no(Hn)&amp;&amp;(Hn=null),zs.forEach(Hd),js.forEach(Hd)}function os(t,e){t.blockedOn===e&amp;&amp;(t.blockedOn=null,Yu||(Yu=!0,wt.unstable_scheduleCallback(wt.unstable_NormalPriority,Vv)))}function Fs(t){function e(i){return os(i,t)}if(0&lt;Ll.length){os(Ll[0],t);for(var n=1;n&lt;Ll.length;n++){var r=Ll[n];r.blockedOn===t&amp;&amp;(r.blockedOn=null)}}for(Bn!==null&amp;&amp;os(Bn,t),Wn!==null&amp;&amp;os(Wn,t),Hn!==null&amp;&amp;os(Hn,t),zs.forEach(e),js.forEach(e),n=0;n&lt;Dn.length;n++)r=Dn[n],r.blockedOn===t&amp;&amp;(r.blockedOn=null);for(;0&lt;Dn.length&amp;&amp;(n=Dn[0],n.blockedOn===null);)jg(n),n.blockedOn===null&amp;&amp;Dn.shift()}var gi=xn.ReactCurrentBatchConfig,Ro=!0;function Bv(t,e,n,r){var i=ce,s=gi.transition;gi.transition=null;try{ce=1,xf(t,e,n,r)}finally{ce=i,gi.transition=s}}function Wv(t,e,n,r){var i=ce,s=gi.transition;gi.transition=null;try{ce=4,xf(t,e,n,r)}finally{ce=i,gi.transition=s}}function xf(t,e,n,r){if(Ro){var i=Xu(t,e,n,r);if(i===null)iu(t,e,r,No,n),Wd(t,r);else if($v(i,t,e,n,r))r.stopPropagation();else if(Wd(t,r),e&amp;4&amp;&amp;-1&lt;Fv.indexOf(t)){for(;i!==null;){var s=vl(i);if(s!==null&amp;&amp;Pg(s),s=Xu(t,e,n,r),s===null&amp;&amp;iu(t,e,r,No,n),s===i)break;i=s}i!==null&amp;&amp;r.stopPropagation()}else iu(t,e,r,null,n)}}var No=null;function Xu(t,e,n,r){if(No=null,t=wf(r),t=vr(t),t!==null)if(e=Wr(t),e===null)t=null;else if(n=e.tag,n===13){if(t=Tg(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&amp;&amp;(t=null);return No=t,null}function Fg(t){switch(t){case&quot;cancel&quot;:case&quot;click&quot;:case&quot;close&quot;:case&quot;contextmenu&quot;:case&quot;copy&quot;:case&quot;cut&quot;:case&quot;auxclick&quot;:case&quot;dblclick&quot;:case&quot;dragend&quot;:case&quot;dragstart&quot;:case&quot;drop&quot;:case&quot;focusin&quot;:case&quot;focusout&quot;:case&quot;input&quot;:case&quot;invalid&quot;:case&quot;keydown&quot;:case&quot;keypress&quot;:case&quot;keyup&quot;:case&quot;mousedown&quot;:case&quot;mouseup&quot;:case&quot;paste&quot;:case&quot;pause&quot;:case&quot;play&quot;:case&quot;pointercancel&quot;:case&quot;pointerdown&quot;:case&quot;pointerup&quot;:case&quot;ratechange&quot;:case&quot;reset&quot;:case&quot;resize&quot;:case&quot;seeked&quot;:case&quot;submit&quot;:case&quot;touchcancel&quot;:case&quot;touchend&quot;:case&quot;touchstart&quot;:case&quot;volumechange&quot;:case&quot;change&quot;:case&quot;selectionchange&quot;:case&quot;textInput&quot;:case&quot;compositionstart&quot;:case&quot;compositionend&quot;:case&quot;compositionupdate&quot;:case&quot;beforeblur&quot;:case&quot;afterblur&quot;:case&quot;beforeinput&quot;:case&quot;blur&quot;:case&quot;fullscreenchange&quot;:case&quot;focus&quot;:case&quot;hashchange&quot;:case&quot;popstate&quot;:case&quot;select&quot;:case&quot;selectstart&quot;:return 1;case&quot;drag&quot;:case&quot;dragenter&quot;:case&quot;dragexit&quot;:case&quot;dragleave&quot;:case&quot;dragover&quot;:case&quot;mousemove&quot;:case&quot;mouseout&quot;:case&quot;mouseover&quot;:case&quot;pointermove&quot;:case&quot;pointerout&quot;:case&quot;pointerover&quot;:case&quot;scroll&quot;:case&quot;toggle&quot;:case&quot;touchmove&quot;:case&quot;wheel&quot;:case&quot;mouseenter&quot;:case&quot;mouseleave&quot;:case&quot;pointerenter&quot;:case&quot;pointerleave&quot;:return 4;case&quot;message&quot;:switch(Iv()){case _f:return 1;case Ig:return 4;case To:case Dv:return 16;case Dg:return 536870912;default:return 16}default:return 16}}var jn=null,Ef=null,ro=null;function $g(){if(ro)return ro;var t,e=Ef,n=e.length,r,i=&quot;value&quot;in jn?jn.value:jn.textContent,s=i.length;for(t=0;t&lt;n&amp;&amp;e[t]===i[t];t++);var l=n-t;for(r=1;r&lt;=l&amp;&amp;e[n-r]===i[s-r];r++);return ro=i.slice(t,1&lt;r?1-r:void 0)}function io(t){var e=t.keyCode;return&quot;charCode&quot;in t?(t=t.charCode,t===0&amp;&amp;e===13&amp;&amp;(t=13)):t=e,t===10&amp;&amp;(t=13),32&lt;=t||t===13?t:0}function Ml(){return!0}function Zd(){return!1}function St(t){function e(n,r,i,s,l){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=s,this.target=l,this.currentTarget=null;for(var o in t)t.hasOwnProperty(o)&amp;&amp;(n=t[o],this[o]=n?n(s):s[o]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?Ml:Zd,this.isPropagationStopped=Zd,this}return ke(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&amp;&amp;(n.preventDefault?n.preventDefault():typeof n.returnValue!=&quot;unknown&quot;&amp;&amp;(n.returnValue=!1),this.isDefaultPrevented=Ml)},stopPropagation:function(){var n=this.nativeEvent;n&amp;&amp;(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!=&quot;unknown&quot;&amp;&amp;(n.cancelBubble=!0),this.isPropagationStopped=Ml)},persist:function(){},isPersistent:Ml}),e}var Xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Cf=St(Xi),yl=ke({},Xi,{view:0,detail:0}),Hv=St(yl),Ja,Ga,as,ya=ke({},yl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Of,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return&quot;movementX&quot;in t?t.movementX:(t!==as&amp;&amp;(as&amp;&amp;t.type===&quot;mousemove&quot;?(Ja=t.screenX-as.screenX,Ga=t.screenY-as.screenY):Ga=Ja=0,as=t),Ja)},movementY:function(t){return&quot;movementY&quot;in t?t.movementY:Ga}}),Kd=St(ya),Zv=ke({},ya,{dataTransfer:0}),Kv=St(Zv),Qv=ke({},yl,{relatedTarget:0}),Ya=St(Qv),Jv=ke({},Xi,{animationName:0,elapsedTime:0,pseudoElement:0}),Gv=St(Jv),Yv=ke({},Xi,{clipboardData:function(t){return&quot;clipboardData&quot;in t?t.clipboardData:window.clipboardData}}),Xv=St(Yv),qv=ke({},Xi,{data:0}),Qd=St(qv),ew={Esc:&quot;Escape&quot;,Spacebar:&quot; &quot;,Left:&quot;ArrowLeft&quot;,Up:&quot;ArrowUp&quot;,Right:&quot;ArrowRight&quot;,Down:&quot;ArrowDown&quot;,Del:&quot;Delete&quot;,Win:&quot;OS&quot;,Menu:&quot;ContextMenu&quot;,Apps:&quot;ContextMenu&quot;,Scroll:&quot;ScrollLock&quot;,MozPrintableKey:&quot;Unidentified&quot;},tw={8:&quot;Backspace&quot;,9:&quot;Tab&quot;,12:&quot;Clear&quot;,13:&quot;Enter&quot;,16:&quot;Shift&quot;,17:&quot;Control&quot;,18:&quot;Alt&quot;,19:&quot;Pause&quot;,20:&quot;CapsLock&quot;,27:&quot;Escape&quot;,32:&quot; &quot;,33:&quot;PageUp&quot;,34:&quot;PageDown&quot;,35:&quot;End&quot;,36:&quot;Home&quot;,37:&quot;ArrowLeft&quot;,38:&quot;ArrowUp&quot;,39:&quot;ArrowRight&quot;,40:&quot;ArrowDown&quot;,45:&quot;Insert&quot;,46:&quot;Delete&quot;,112:&quot;F1&quot;,113:&quot;F2&quot;,114:&quot;F3&quot;,115:&quot;F4&quot;,116:&quot;F5&quot;,117:&quot;F6&quot;,118:&quot;F7&quot;,119:&quot;F8&quot;,120:&quot;F9&quot;,121:&quot;F10&quot;,122:&quot;F11&quot;,123:&quot;F12&quot;,144:&quot;NumLock&quot;,145:&quot;ScrollLock&quot;,224:&quot;Meta&quot;},nw={Alt:&quot;altKey&quot;,Control:&quot;ctrlKey&quot;,Meta:&quot;metaKey&quot;,Shift:&quot;shiftKey&quot;};function rw(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=nw[t])?!!e[t]:!1}function Of(){return rw}var iw=ke({},yl,{key:function(t){if(t.key){var e=ew[t.key]||t.key;if(e!==&quot;Unidentified&quot;)return e}return t.type===&quot;keypress&quot;?(t=io(t),t===13?&quot;Enter&quot;:String.fromCharCode(t)):t.type===&quot;keydown&quot;||t.type===&quot;keyup&quot;?tw[t.keyCode]||&quot;Unidentified&quot;:&quot;&quot;},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Of,charCode:function(t){return t.type===&quot;keypress&quot;?io(t):0},keyCode:function(t){return t.type===&quot;keydown&quot;||t.type===&quot;keyup&quot;?t.keyCode:0},which:function(t){return t.type===&quot;keypress&quot;?io(t):t.type===&quot;keydown&quot;||t.type===&quot;keyup&quot;?t.keyCode:0}}),sw=St(iw),lw=ke({},ya,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jd=St(lw),ow=ke({},yl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Of}),aw=St(ow),uw=ke({},Xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),cw=St(uw),fw=ke({},ya,{deltaX:function(t){return&quot;deltaX&quot;in t?t.deltaX:&quot;wheelDeltaX&quot;in t?-t.wheelDeltaX:0},deltaY:function(t){return&quot;deltaY&quot;in t?t.deltaY:&quot;wheelDeltaY&quot;in t?-t.wheelDeltaY:&quot;wheelDelta&quot;in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),dw=St(fw),hw=[9,13,27,32],Tf=vn&amp;&amp;&quot;CompositionEvent&quot;in window,Cs=null;vn&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;(Cs=document.documentMode);var pw=vn&amp;&amp;&quot;TextEvent&quot;in window&amp;&amp;!Cs,Vg=vn&amp;&amp;(!Tf||Cs&amp;&amp;8&lt;Cs&amp;&amp;11&gt;=Cs),Gd=&quot; &quot;,Yd=!1;function Bg(t,e){switch(t){case&quot;keyup&quot;:return hw.indexOf(e.keyCode)!==-1;case&quot;keydown&quot;:return e.keyCode!==229;case&quot;keypress&quot;:case&quot;mousedown&quot;:case&quot;focusout&quot;:return!0;default:return!1}}function Wg(t){return t=t.detail,typeof t==&quot;object&quot;&amp;&amp;&quot;data&quot;in t?t.data:null}var ei=!1;function gw(t,e){switch(t){case&quot;compositionend&quot;:return Wg(e);case&quot;keypress&quot;:return e.which!==32?null:(Yd=!0,Gd);case&quot;textInput&quot;:return t=e.data,t===Gd&amp;&amp;Yd?null:t;default:return null}}function mw(t,e){if(ei)return t===&quot;compositionend&quot;||!Tf&amp;&amp;Bg(t,e)?(t=$g(),ro=Ef=jn=null,ei=!1,t):null;switch(t){case&quot;paste&quot;:return null;case&quot;keypress&quot;:if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&amp;&amp;e.altKey){if(e.char&amp;&amp;1&lt;e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case&quot;compositionend&quot;:return Vg&amp;&amp;e.locale!==&quot;ko&quot;?null:e.data;default:return null}}var yw={color:!0,date:!0,datetime:!0,&quot;datetime-local&quot;:!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xd(t){var e=t&amp;&amp;t.nodeName&amp;&amp;t.nodeName.toLowerCase();return e===&quot;input&quot;?!!yw[t.type]:e===&quot;textarea&quot;}function Hg(t,e,n,r){Sg(r),e=Io(e,&quot;onChange&quot;),0&lt;e.length&amp;&amp;(n=new Cf(&quot;onChange&quot;,&quot;change&quot;,null,n,r),t.push({event:n,listeners:e}))}var Os=null,$s=null;function vw(t){nm(t,0)}function va(t){var e=ri(t);if(gg(e))return t}function ww(t,e){if(t===&quot;change&quot;)return e}var Zg=!1;if(vn){var Xa;if(vn){var qa=&quot;oninput&quot;in document;if(!qa){var qd=document.createElement(&quot;div&quot;);qd.setAttribute(&quot;oninput&quot;,&quot;return;&quot;),qa=typeof qd.oninput==&quot;function&quot;}Xa=qa}else Xa=!1;Zg=Xa&amp;&amp;(!document.documentMode||9&lt;document.documentMode)}function eh(){Os&amp;&amp;(Os.detachEvent(&quot;onpropertychange&quot;,Kg),$s=Os=null)}function Kg(t){if(t.propertyName===&quot;value&quot;&amp;&amp;va($s)){var e=[];Hg(e,$s,t,wf(t)),Og(vw,e)}}function _w(t,e,n){t===&quot;focusin&quot;?(eh(),Os=e,$s=n,Os.attachEvent(&quot;onpropertychange&quot;,Kg)):t===&quot;focusout&quot;&amp;&amp;eh()}function kw(t){if(t===&quot;selectionchange&quot;||t===&quot;keyup&quot;||t===&quot;keydown&quot;)return va($s)}function Sw(t,e){if(t===&quot;click&quot;)return va(e)}function xw(t,e){if(t===&quot;input&quot;||t===&quot;change&quot;)return va(e)}function Ew(t,e){return t===e&amp;&amp;(t!==0||1/t===1/e)||t!==t&amp;&amp;e!==e}var Wt=typeof Object.is==&quot;function&quot;?Object.is:Ew;function Vs(t,e){if(Wt(t,e))return!0;if(typeof t!=&quot;object&quot;||t===null||typeof e!=&quot;object&quot;||e===null)return!1;var n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(r=0;r&lt;n.length;r++){var i=n[r];if(!Mu.call(e,i)||!Wt(t[i],e[i]))return!1}return!0}function th(t){for(;t&amp;&amp;t.firstChild;)t=t.firstChild;return t}function nh(t,e){var n=th(t);t=0;for(var r;n;){if(n.nodeType===3){if(r=t+n.textContent.length,t&lt;=e&amp;&amp;r&gt;=e)return{node:n,offset:e-t};t=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=th(n)}}function Qg(t,e){return t&amp;&amp;e?t===e?!0:t&amp;&amp;t.nodeType===3?!1:e&amp;&amp;e.nodeType===3?Qg(t,e.parentNode):&quot;contains&quot;in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&amp;16):!1:!1}function Jg(){for(var t=window,e=Eo();e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href==&quot;string&quot;}catch{n=!1}if(n)t=e.contentWindow;else break;e=Eo(t.document)}return e}function Af(t){var e=t&amp;&amp;t.nodeName&amp;&amp;t.nodeName.toLowerCase();return e&amp;&amp;(e===&quot;input&quot;&amp;&amp;(t.type===&quot;text&quot;||t.type===&quot;search&quot;||t.type===&quot;tel&quot;||t.type===&quot;url&quot;||t.type===&quot;password&quot;)||e===&quot;textarea&quot;||t.contentEditable===&quot;true&quot;)}function Cw(t){var e=Jg(),n=t.focusedElem,r=t.selectionRange;if(e!==n&amp;&amp;n&amp;&amp;n.ownerDocument&amp;&amp;Qg(n.ownerDocument.documentElement,n)){if(r!==null&amp;&amp;Af(n)){if(e=r.start,t=r.end,t===void 0&amp;&amp;(t=e),&quot;selectionStart&quot;in n)n.selectionStart=e,n.selectionEnd=Math.min(t,n.value.length);else if(t=(e=n.ownerDocument||document)&amp;&amp;e.defaultView||window,t.getSelection){t=t.getSelection();var i=n.textContent.length,s=Math.min(r.start,i);r=r.end===void 0?s:Math.min(r.end,i),!t.extend&amp;&amp;s&gt;r&amp;&amp;(i=r,r=s,s=i),i=nh(n,s);var l=nh(n,r);i&amp;&amp;l&amp;&amp;(t.rangeCount!==1||t.anchorNode!==i.node||t.anchorOffset!==i.offset||t.focusNode!==l.node||t.focusOffset!==l.offset)&amp;&amp;(e=e.createRange(),e.setStart(i.node,i.offset),t.removeAllRanges(),s&gt;r?(t.addRange(e),t.extend(l.node,l.offset)):(e.setEnd(l.node,l.offset),t.addRange(e)))}}for(e=[],t=n;t=t.parentNode;)t.nodeType===1&amp;&amp;e.push({element:t,left:t.scrollLeft,top:t.scrollTop});for(typeof n.focus==&quot;function&quot;&amp;&amp;n.focus(),n=0;n&lt;e.length;n++)t=e[n],t.element.scrollLeft=t.left,t.element.scrollTop=t.top}}var Ow=vn&amp;&amp;&quot;documentMode&quot;in document&amp;&amp;11&gt;=document.documentMode,ti=null,qu=null,Ts=null,ec=!1;function rh(t,e,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ec||ti==null||ti!==Eo(r)||(r=ti,&quot;selectionStart&quot;in r&amp;&amp;Af(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&amp;&amp;r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Ts&amp;&amp;Vs(Ts,r)||(Ts=r,r=Io(qu,&quot;onSelect&quot;),0&lt;r.length&amp;&amp;(e=new Cf(&quot;onSelect&quot;,&quot;select&quot;,null,e,n),t.push({event:e,listeners:r}),e.target=ti)))}function Pl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n[&quot;Webkit&quot;+t]=&quot;webkit&quot;+e,n[&quot;Moz&quot;+t]=&quot;moz&quot;+e,n}var ni={animationend:Pl(&quot;Animation&quot;,&quot;AnimationEnd&quot;),animationiteration:Pl(&quot;Animation&quot;,&quot;AnimationIteration&quot;),animationstart:Pl(&quot;Animation&quot;,&quot;AnimationStart&quot;),transitionend:Pl(&quot;Transition&quot;,&quot;TransitionEnd&quot;)},eu={},Gg={};vn&amp;&amp;(Gg=document.createElement(&quot;div&quot;).style,&quot;AnimationEvent&quot;in window||(delete ni.animationend.animation,delete ni.animationiteration.animation,delete ni.animationstart.animation),&quot;TransitionEvent&quot;in window||delete ni.transitionend.transition);function wa(t){if(eu[t])return eu[t];if(!ni[t])return t;var e=ni[t],n;for(n in e)if(e.hasOwnProperty(n)&amp;&amp;n in Gg)return eu[t]=e[n];return t}var Yg=wa(&quot;animationend&quot;),Xg=wa(&quot;animationiteration&quot;),qg=wa(&quot;animationstart&quot;),em=wa(&quot;transitionend&quot;),tm=new Map,ih=&quot;abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel&quot;.split(&quot; &quot;);function lr(t,e){tm.set(t,e),Br(e,[t])}for(var tu=0;tu&lt;ih.length;tu++){var nu=ih[tu],Tw=nu.toLowerCase(),Aw=nu[0].toUpperCase()+nu.slice(1);lr(Tw,&quot;on&quot;+Aw)}lr(Yg,&quot;onAnimationEnd&quot;);lr(Xg,&quot;onAnimationIteration&quot;);lr(qg,&quot;onAnimationStart&quot;);lr(&quot;dblclick&quot;,&quot;onDoubleClick&quot;);lr(&quot;focusin&quot;,&quot;onFocus&quot;);lr(&quot;focusout&quot;,&quot;onBlur&quot;);lr(em,&quot;onTransitionEnd&quot;);Ii(&quot;onMouseEnter&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]);Ii(&quot;onMouseLeave&quot;,[&quot;mouseout&quot;,&quot;mouseover&quot;]);Ii(&quot;onPointerEnter&quot;,[&quot;pointerout&quot;,&quot;pointerover&quot;]);Ii(&quot;onPointerLeave&quot;,[&quot;pointerout&quot;,&quot;pointerover&quot;]);Br(&quot;onChange&quot;,&quot;change click focusin focusout input keydown keyup selectionchange&quot;.split(&quot; &quot;));Br(&quot;onSelect&quot;,&quot;focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange&quot;.split(&quot; &quot;));Br(&quot;onBeforeInput&quot;,[&quot;compositionend&quot;,&quot;keypress&quot;,&quot;textInput&quot;,&quot;paste&quot;]);Br(&quot;onCompositionEnd&quot;,&quot;compositionend focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;));Br(&quot;onCompositionStart&quot;,&quot;compositionstart focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;));Br(&quot;onCompositionUpdate&quot;,&quot;compositionupdate focusout keydown keypress keyup mousedown&quot;.split(&quot; &quot;));var vs=&quot;abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting&quot;.split(&quot; &quot;),Rw=new Set(&quot;cancel close invalid load scroll toggle&quot;.split(&quot; &quot;).concat(vs));function sh(t,e,n){var r=t.type||&quot;unknown-event&quot;;t.currentTarget=n,Tv(r,e,void 0,t),t.currentTarget=null}function nm(t,e){e=(e&amp;4)!==0;for(var n=0;n&lt;t.length;n++){var r=t[n],i=r.event;r=r.listeners;e:{var s=void 0;if(e)for(var l=r.length-1;0&lt;=l;l--){var o=r[l],a=o.instance,u=o.currentTarget;if(o=o.listener,a!==s&amp;&amp;i.isPropagationStopped())break e;sh(i,o,u),s=a}else for(l=0;l&lt;r.length;l++){if(o=r[l],a=o.instance,u=o.currentTarget,o=o.listener,a!==s&amp;&amp;i.isPropagationStopped())break e;sh(i,o,u),s=a}}}if(Oo)throw t=Ju,Oo=!1,Ju=null,t}function pe(t,e){var n=e[sc];n===void 0&amp;&amp;(n=e[sc]=new Set);var r=t+&quot;__bubble&quot;;n.has(r)||(rm(e,t,2,!1),n.add(r))}function ru(t,e,n){var r=0;e&amp;&amp;(r|=4),rm(n,t,r,e)}var Ul=&quot;_reactListening&quot;+Math.random().toString(36).slice(2);function Bs(t){if(!t[Ul]){t[Ul]=!0,cg.forEach(function(n){n!==&quot;selectionchange&quot;&amp;&amp;(Rw.has(n)||ru(n,!1,t),ru(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Ul]||(e[Ul]=!0,ru(&quot;selectionchange&quot;,!1,e))}}function rm(t,e,n,r){switch(Fg(e)){case 1:var i=Bv;break;case 4:i=Wv;break;default:i=xf}n=i.bind(null,e,n,t),i=void 0,!Qu||e!==&quot;touchstart&quot;&amp;&amp;e!==&quot;touchmove&quot;&amp;&amp;e!==&quot;wheel&quot;||(i=!0),r?i!==void 0?t.addEventListener(e,n,{capture:!0,passive:i}):t.addEventListener(e,n,!0):i!==void 0?t.addEventListener(e,n,{passive:i}):t.addEventListener(e,n,!1)}function iu(t,e,n,r,i){var s=r;if(!(e&amp;1)&amp;&amp;!(e&amp;2)&amp;&amp;r!==null)e:for(;;){if(r===null)return;var l=r.tag;if(l===3||l===4){var o=r.stateNode.containerInfo;if(o===i||o.nodeType===8&amp;&amp;o.parentNode===i)break;if(l===4)for(l=r.return;l!==null;){var a=l.tag;if((a===3||a===4)&amp;&amp;(a=l.stateNode.containerInfo,a===i||a.nodeType===8&amp;&amp;a.parentNode===i))return;l=l.return}for(;o!==null;){if(l=vr(o),l===null)return;if(a=l.tag,a===5||a===6){r=s=l;continue e}o=o.parentNode}}r=r.return}Og(function(){var u=s,c=wf(n),f=[];e:{var d=tm.get(t);if(d!==void 0){var h=Cf,y=t;switch(t){case&quot;keypress&quot;:if(io(n)===0)break e;case&quot;keydown&quot;:case&quot;keyup&quot;:h=sw;break;case&quot;focusin&quot;:y=&quot;focus&quot;,h=Ya;break;case&quot;focusout&quot;:y=&quot;blur&quot;,h=Ya;break;case&quot;beforeblur&quot;:case&quot;afterblur&quot;:h=Ya;break;case&quot;click&quot;:if(n.button===2)break e;case&quot;auxclick&quot;:case&quot;dblclick&quot;:case&quot;mousedown&quot;:case&quot;mousemove&quot;:case&quot;mouseup&quot;:case&quot;mouseout&quot;:case&quot;mouseover&quot;:case&quot;contextmenu&quot;:h=Kd;break;case&quot;drag&quot;:case&quot;dragend&quot;:case&quot;dragenter&quot;:case&quot;dragexit&quot;:case&quot;dragleave&quot;:case&quot;dragover&quot;:case&quot;dragstart&quot;:case&quot;drop&quot;:h=Kv;break;case&quot;touchcancel&quot;:case&quot;touchend&quot;:case&quot;touchmove&quot;:case&quot;touchstart&quot;:h=aw;break;case Yg:case Xg:case qg:h=Gv;break;case em:h=cw;break;case&quot;scroll&quot;:h=Hv;break;case&quot;wheel&quot;:h=dw;break;case&quot;copy&quot;:case&quot;cut&quot;:case&quot;paste&quot;:h=Xv;break;case&quot;gotpointercapture&quot;:case&quot;lostpointercapture&quot;:case&quot;pointercancel&quot;:case&quot;pointerdown&quot;:case&quot;pointermove&quot;:case&quot;pointerout&quot;:case&quot;pointerover&quot;:case&quot;pointerup&quot;:h=Jd}var k=(e&amp;4)!==0,F=!k&amp;&amp;t===&quot;scroll&quot;,v=k?d!==null?d+&quot;Capture&quot;:null:d;k=[];for(var g=u,m;g!==null;){m=g;var O=m.stateNode;if(m.tag===5&amp;&amp;O!==null&amp;&amp;(m=O,v!==null&amp;&amp;(O=bs(g,v),O!=null&amp;&amp;k.push(Ws(g,O,m)))),F)break;g=g.return}0&lt;k.length&amp;&amp;(d=new h(d,y,null,n,c),f.push({event:d,listeners:k}))}}if(!(e&amp;7)){e:{if(d=t===&quot;mouseover&quot;||t===&quot;pointerover&quot;,h=t===&quot;mouseout&quot;||t===&quot;pointerout&quot;,d&amp;&amp;n!==Zu&amp;&amp;(y=n.relatedTarget||n.fromElement)&amp;&amp;(vr(y)||y[wn]))break e;if((h||d)&amp;&amp;(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,h?(y=n.relatedTarget||n.toElement,h=u,y=y?vr(y):null,y!==null&amp;&amp;(F=Wr(y),y!==F||y.tag!==5&amp;&amp;y.tag!==6)&amp;&amp;(y=null)):(h=null,y=u),h!==y)){if(k=Kd,O=&quot;onMouseLeave&quot;,v=&quot;onMouseEnter&quot;,g=&quot;mouse&quot;,(t===&quot;pointerout&quot;||t===&quot;pointerover&quot;)&amp;&amp;(k=Jd,O=&quot;onPointerLeave&quot;,v=&quot;onPointerEnter&quot;,g=&quot;pointer&quot;),F=h==null?d:ri(h),m=y==null?d:ri(y),d=new k(O,g+&quot;leave&quot;,h,n,c),d.target=F,d.relatedTarget=m,O=null,vr(c)===u&amp;&amp;(k=new k(v,g+&quot;enter&quot;,y,n,c),k.target=m,k.relatedTarget=F,O=k),F=O,h&amp;&amp;y)t:{for(k=h,v=y,g=0,m=k;m;m=Kr(m))g++;for(m=0,O=v;O;O=Kr(O))m++;for(;0&lt;g-m;)k=Kr(k),g--;for(;0&lt;m-g;)v=Kr(v),m--;for(;g--;){if(k===v||v!==null&amp;&amp;k===v.alternate)break t;k=Kr(k),v=Kr(v)}k=null}else k=null;h!==null&amp;&amp;lh(f,d,h,k,!1),y!==null&amp;&amp;F!==null&amp;&amp;lh(f,F,y,k,!0)}}e:{if(d=u?ri(u):window,h=d.nodeName&amp;&amp;d.nodeName.toLowerCase(),h===&quot;select&quot;||h===&quot;input&quot;&amp;&amp;d.type===&quot;file&quot;)var L=ww;else if(Xd(d))if(Zg)L=xw;else{L=kw;var U=_w}else(h=d.nodeName)&amp;&amp;h.toLowerCase()===&quot;input&quot;&amp;&amp;(d.type===&quot;checkbox&quot;||d.type===&quot;radio&quot;)&amp;&amp;(L=Sw);if(L&amp;&amp;(L=L(t,u))){Hg(f,L,n,c);break e}U&amp;&amp;U(t,d,u),t===&quot;focusout&quot;&amp;&amp;(U=d._wrapperState)&amp;&amp;U.controlled&amp;&amp;d.type===&quot;number&quot;&amp;&amp;$u(d,&quot;number&quot;,d.value)}switch(U=u?ri(u):window,t){case&quot;focusin&quot;:(Xd(U)||U.contentEditable===&quot;true&quot;)&amp;&amp;(ti=U,qu=u,Ts=null);break;case&quot;focusout&quot;:Ts=qu=ti=null;break;case&quot;mousedown&quot;:ec=!0;break;case&quot;contextmenu&quot;:case&quot;mouseup&quot;:case&quot;dragend&quot;:ec=!1,rh(f,n,c);break;case&quot;selectionchange&quot;:if(Ow)break;case&quot;keydown&quot;:case&quot;keyup&quot;:rh(f,n,c)}var $;if(Tf)e:{switch(t){case&quot;compositionstart&quot;:var V=&quot;onCompositionStart&quot;;break e;case&quot;compositionend&quot;:V=&quot;onCompositionEnd&quot;;break e;case&quot;compositionupdate&quot;:V=&quot;onCompositionUpdate&quot;;break e}V=void 0}else ei?Bg(t,n)&amp;&amp;(V=&quot;onCompositionEnd&quot;):t===&quot;keydown&quot;&amp;&amp;n.keyCode===229&amp;&amp;(V=&quot;onCompositionStart&quot;);V&amp;&amp;(Vg&amp;&amp;n.locale!==&quot;ko&quot;&amp;&amp;(ei||V!==&quot;onCompositionStart&quot;?V===&quot;onCompositionEnd&quot;&amp;&amp;ei&amp;&amp;($=$g()):(jn=c,Ef=&quot;value&quot;in jn?jn.value:jn.textContent,ei=!0)),U=Io(u,V),0&lt;U.length&amp;&amp;(V=new Qd(V,t,null,n,c),f.push({event:V,listeners:U}),$?V.data=$:($=Wg(n),$!==null&amp;&amp;(V.data=$)))),($=pw?gw(t,n):mw(t,n))&amp;&amp;(u=Io(u,&quot;onBeforeInput&quot;),0&lt;u.length&amp;&amp;(c=new Qd(&quot;onBeforeInput&quot;,&quot;beforeinput&quot;,null,n,c),f.push({event:c,listeners:u}),c.data=$))}nm(f,e)})}function Ws(t,e,n){return{instance:t,listener:e,currentTarget:n}}function Io(t,e){for(var n=e+&quot;Capture&quot;,r=[];t!==null;){var i=t,s=i.stateNode;i.tag===5&amp;&amp;s!==null&amp;&amp;(i=s,s=bs(t,n),s!=null&amp;&amp;r.unshift(Ws(t,s,i)),s=bs(t,e),s!=null&amp;&amp;r.push(Ws(t,s,i))),t=t.return}return r}function Kr(t){if(t===null)return null;do t=t.return;while(t&amp;&amp;t.tag!==5);return t||null}function lh(t,e,n,r,i){for(var s=e._reactName,l=[];n!==null&amp;&amp;n!==r;){var o=n,a=o.alternate,u=o.stateNode;if(a!==null&amp;&amp;a===r)break;o.tag===5&amp;&amp;u!==null&amp;&amp;(o=u,i?(a=bs(n,s),a!=null&amp;&amp;l.unshift(Ws(n,a,o))):i||(a=bs(n,s),a!=null&amp;&amp;l.push(Ws(n,a,o)))),n=n.return}l.length!==0&amp;&amp;t.push({event:e,listeners:l})}var Nw=/\r\n?/g,Iw=/\u0000|\uFFFD/g;function oh(t){return(typeof t==&quot;string&quot;?t:&quot;&quot;+t).replace(Nw,`
`).replace(Iw,&quot;&quot;)}function bl(t,e,n){if(e=oh(e),oh(t)!==e&amp;&amp;n)throw Error(A(425))}function Do(){}var tc=null,nc=null;function rc(t,e){return t===&quot;textarea&quot;||t===&quot;noscript&quot;||typeof e.children==&quot;string&quot;||typeof e.children==&quot;number&quot;||typeof e.dangerouslySetInnerHTML==&quot;object&quot;&amp;&amp;e.dangerouslySetInnerHTML!==null&amp;&amp;e.dangerouslySetInnerHTML.__html!=null}var ic=typeof setTimeout==&quot;function&quot;?setTimeout:void 0,Dw=typeof clearTimeout==&quot;function&quot;?clearTimeout:void 0,ah=typeof Promise==&quot;function&quot;?Promise:void 0,Lw=typeof queueMicrotask==&quot;function&quot;?queueMicrotask:typeof ah&lt;&quot;u&quot;?function(t){return ah.resolve(null).then(t).catch(Mw)}:ic;function Mw(t){setTimeout(function(){throw t})}function su(t,e){var n=e,r=0;do{var i=n.nextSibling;if(t.removeChild(n),i&amp;&amp;i.nodeType===8)if(n=i.data,n===&quot;/$&quot;){if(r===0){t.removeChild(i),Fs(e);return}r--}else n!==&quot;$&quot;&amp;&amp;n!==&quot;$?&quot;&amp;&amp;n!==&quot;$!&quot;||r++;n=i}while(n);Fs(e)}function Zn(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e===&quot;$&quot;||e===&quot;$!&quot;||e===&quot;$?&quot;)break;if(e===&quot;/$&quot;)return null}}return t}function uh(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n===&quot;$&quot;||n===&quot;$!&quot;||n===&quot;$?&quot;){if(e===0)return t;e--}else n===&quot;/$&quot;&amp;&amp;e++}t=t.previousSibling}return null}var qi=Math.random().toString(36).slice(2),Xt=&quot;__reactFiber$&quot;+qi,Hs=&quot;__reactProps$&quot;+qi,wn=&quot;__reactContainer$&quot;+qi,sc=&quot;__reactEvents$&quot;+qi,Pw=&quot;__reactListeners$&quot;+qi,Uw=&quot;__reactHandles$&quot;+qi;function vr(t){var e=t[Xt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[wn]||n[Xt]){if(n=e.alternate,e.child!==null||n!==null&amp;&amp;n.child!==null)for(t=uh(t);t!==null;){if(n=t[Xt])return n;t=uh(t)}return e}t=n,n=t.parentNode}return null}function vl(t){return t=t[Xt]||t[wn],!t||t.tag!==5&amp;&amp;t.tag!==6&amp;&amp;t.tag!==13&amp;&amp;t.tag!==3?null:t}function ri(t){if(t.tag===5||t.tag===6)return t.stateNode;throw Error(A(33))}function _a(t){return t[Hs]||null}var lc=[],ii=-1;function or(t){return{current:t}}function ye(t){0&gt;ii||(t.current=lc[ii],lc[ii]=null,ii--)}function de(t,e){ii++,lc[ii]=t.current,t.current=e}var er={},Ye=or(er),ot=or(!1),Dr=er;function Di(t,e){var n=t.type.contextTypes;if(!n)return er;var r=t.stateNode;if(r&amp;&amp;r.__reactInternalMemoizedUnmaskedChildContext===e)return r.__reactInternalMemoizedMaskedChildContext;var i={},s;for(s in n)i[s]=e[s];return r&amp;&amp;(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=e,t.__reactInternalMemoizedMaskedChildContext=i),i}function at(t){return t=t.childContextTypes,t!=null}function Lo(){ye(ot),ye(Ye)}function ch(t,e,n){if(Ye.current!==er)throw Error(A(168));de(Ye,e),de(ot,n)}function im(t,e,n){var r=t.stateNode;if(e=e.childContextTypes,typeof r.getChildContext!=&quot;function&quot;)return n;r=r.getChildContext();for(var i in r)if(!(i in e))throw Error(A(108,_v(t)||&quot;Unknown&quot;,i));return ke({},n,r)}function Mo(t){return t=(t=t.stateNode)&amp;&amp;t.__reactInternalMemoizedMergedChildContext||er,Dr=Ye.current,de(Ye,t),de(ot,ot.current),!0}function fh(t,e,n){var r=t.stateNode;if(!r)throw Error(A(169));n?(t=im(t,e,Dr),r.__reactInternalMemoizedMergedChildContext=t,ye(ot),ye(Ye),de(Ye,t)):ye(ot),de(ot,n)}var fn=null,ka=!1,lu=!1;function sm(t){fn===null?fn=[t]:fn.push(t)}function bw(t){ka=!0,sm(t)}function ar(){if(!lu&amp;&amp;fn!==null){lu=!0;var t=0,e=ce;try{var n=fn;for(ce=1;t&lt;n.length;t++){var r=n[t];do r=r(!0);while(r!==null)}fn=null,ka=!1}catch(i){throw fn!==null&amp;&amp;(fn=fn.slice(t+1)),Ng(_f,ar),i}finally{ce=e,lu=!1}}return null}var si=[],li=0,Po=null,Uo=0,xt=[],Et=0,Lr=null,pn=1,gn=&quot;&quot;;function pr(t,e){si[li++]=Uo,si[li++]=Po,Po=t,Uo=e}function lm(t,e,n){xt[Et++]=pn,xt[Et++]=gn,xt[Et++]=Lr,Lr=t;var r=pn;t=gn;var i=32-$t(r)-1;r&amp;=~(1&lt;&lt;i),n+=1;var s=32-$t(e)+i;if(30&lt;s){var l=i-i%5;s=(r&amp;(1&lt;&lt;l)-1).toString(32),r&gt;&gt;=l,i-=l,pn=1&lt;&lt;32-$t(e)+i|n&lt;&lt;i|r,gn=s+t}else pn=1&lt;&lt;s|n&lt;&lt;i|r,gn=t}function Rf(t){t.return!==null&amp;&amp;(pr(t,1),lm(t,1,0))}function Nf(t){for(;t===Po;)Po=si[--li],si[li]=null,Uo=si[--li],si[li]=null;for(;t===Lr;)Lr=xt[--Et],xt[Et]=null,gn=xt[--Et],xt[Et]=null,pn=xt[--Et],xt[Et]=null}var yt=null,gt=null,ve=!1,Ft=null;function om(t,e){var n=Nt(5,null,null,0);n.elementType=&quot;DELETED&quot;,n.stateNode=e,n.return=t,e=t.deletions,e===null?(t.deletions=[n],t.flags|=16):e.push(n)}function dh(t,e){switch(t.tag){case 5:var n=t.type;return e=e.nodeType!==1||n.toLowerCase()!==e.nodeName.toLowerCase()?null:e,e!==null?(t.stateNode=e,yt=t,gt=Zn(e.firstChild),!0):!1;case 6:return e=t.pendingProps===&quot;&quot;||e.nodeType!==3?null:e,e!==null?(t.stateNode=e,yt=t,gt=null,!0):!1;case 13:return e=e.nodeType!==8?null:e,e!==null?(n=Lr!==null?{id:pn,overflow:gn}:null,t.memoizedState={dehydrated:e,treeContext:n,retryLane:1073741824},n=Nt(18,null,null,0),n.stateNode=e,n.return=t,t.child=n,yt=t,gt=null,!0):!1;default:return!1}}function oc(t){return(t.mode&amp;1)!==0&amp;&amp;(t.flags&amp;128)===0}function ac(t){if(ve){var e=gt;if(e){var n=e;if(!dh(t,e)){if(oc(t))throw Error(A(418));e=Zn(n.nextSibling);var r=yt;e&amp;&amp;dh(t,e)?om(r,n):(t.flags=t.flags&amp;-4097|2,ve=!1,yt=t)}}else{if(oc(t))throw Error(A(418));t.flags=t.flags&amp;-4097|2,ve=!1,yt=t}}}function hh(t){for(t=t.return;t!==null&amp;&amp;t.tag!==5&amp;&amp;t.tag!==3&amp;&amp;t.tag!==13;)t=t.return;yt=t}function zl(t){if(t!==yt)return!1;if(!ve)return hh(t),ve=!0,!1;var e;if((e=t.tag!==3)&amp;&amp;!(e=t.tag!==5)&amp;&amp;(e=t.type,e=e!==&quot;head&quot;&amp;&amp;e!==&quot;body&quot;&amp;&amp;!rc(t.type,t.memoizedProps)),e&amp;&amp;(e=gt)){if(oc(t))throw am(),Error(A(418));for(;e;)om(t,e),e=Zn(e.nextSibling)}if(hh(t),t.tag===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(A(317));e:{for(t=t.nextSibling,e=0;t;){if(t.nodeType===8){var n=t.data;if(n===&quot;/$&quot;){if(e===0){gt=Zn(t.nextSibling);break e}e--}else n!==&quot;$&quot;&amp;&amp;n!==&quot;$!&quot;&amp;&amp;n!==&quot;$?&quot;||e++}t=t.nextSibling}gt=null}}else gt=yt?Zn(t.stateNode.nextSibling):null;return!0}function am(){for(var t=gt;t;)t=Zn(t.nextSibling)}function Li(){gt=yt=null,ve=!1}function If(t){Ft===null?Ft=[t]:Ft.push(t)}var zw=xn.ReactCurrentBatchConfig;function us(t,e,n){if(t=n.ref,t!==null&amp;&amp;typeof t!=&quot;function&quot;&amp;&amp;typeof t!=&quot;object&quot;){if(n._owner){if(n=n._owner,n){if(n.tag!==1)throw Error(A(309));var r=n.stateNode}if(!r)throw Error(A(147,t));var i=r,s=&quot;&quot;+t;return e!==null&amp;&amp;e.ref!==null&amp;&amp;typeof e.ref==&quot;function&quot;&amp;&amp;e.ref._stringRef===s?e.ref:(e=function(l){var o=i.refs;l===null?delete o[s]:o[s]=l},e._stringRef=s,e)}if(typeof t!=&quot;string&quot;)throw Error(A(284));if(!n._owner)throw Error(A(290,t))}return t}function jl(t,e){throw t=Object.prototype.toString.call(e),Error(A(31,t===&quot;[object Object]&quot;?&quot;object with keys {&quot;+Object.keys(e).join(&quot;, &quot;)+&quot;}&quot;:t))}function ph(t){var e=t._init;return e(t._payload)}function um(t){function e(v,g){if(t){var m=v.deletions;m===null?(v.deletions=[g],v.flags|=16):m.push(g)}}function n(v,g){if(!t)return null;for(;g!==null;)e(v,g),g=g.sibling;return null}function r(v,g){for(v=new Map;g!==null;)g.key!==null?v.set(g.key,g):v.set(g.index,g),g=g.sibling;return v}function i(v,g){return v=Gn(v,g),v.index=0,v.sibling=null,v}function s(v,g,m){return v.index=m,t?(m=v.alternate,m!==null?(m=m.index,m&lt;g?(v.flags|=2,g):m):(v.flags|=2,g)):(v.flags|=1048576,g)}function l(v){return t&amp;&amp;v.alternate===null&amp;&amp;(v.flags|=2),v}function o(v,g,m,O){return g===null||g.tag!==6?(g=hu(m,v.mode,O),g.return=v,g):(g=i(g,m),g.return=v,g)}function a(v,g,m,O){var L=m.type;return L===qr?c(v,g,m.props.children,O,m.key):g!==null&amp;&amp;(g.elementType===L||typeof L==&quot;object&quot;&amp;&amp;L!==null&amp;&amp;L.$$typeof===Rn&amp;&amp;ph(L)===g.type)?(O=i(g,m.props),O.ref=us(v,g,m),O.return=v,O):(O=fo(m.type,m.key,m.props,null,v.mode,O),O.ref=us(v,g,m),O.return=v,O)}function u(v,g,m,O){return g===null||g.tag!==4||g.stateNode.containerInfo!==m.containerInfo||g.stateNode.implementation!==m.implementation?(g=pu(m,v.mode,O),g.return=v,g):(g=i(g,m.children||[]),g.return=v,g)}function c(v,g,m,O,L){return g===null||g.tag!==7?(g=Tr(m,v.mode,O,L),g.return=v,g):(g=i(g,m),g.return=v,g)}function f(v,g,m){if(typeof g==&quot;string&quot;&amp;&amp;g!==&quot;&quot;||typeof g==&quot;number&quot;)return g=hu(&quot;&quot;+g,v.mode,m),g.return=v,g;if(typeof g==&quot;object&quot;&amp;&amp;g!==null){switch(g.$$typeof){case Al:return m=fo(g.type,g.key,g.props,null,v.mode,m),m.ref=us(v,null,g),m.return=v,m;case Xr:return g=pu(g,v.mode,m),g.return=v,g;case Rn:var O=g._init;return f(v,O(g._payload),m)}if(ms(g)||is(g))return g=Tr(g,v.mode,m,null),g.return=v,g;jl(v,g)}return null}function d(v,g,m,O){var L=g!==null?g.key:null;if(typeof m==&quot;string&quot;&amp;&amp;m!==&quot;&quot;||typeof m==&quot;number&quot;)return L!==null?null:o(v,g,&quot;&quot;+m,O);if(typeof m==&quot;object&quot;&amp;&amp;m!==null){switch(m.$$typeof){case Al:return m.key===L?a(v,g,m,O):null;case Xr:return m.key===L?u(v,g,m,O):null;case Rn:return L=m._init,d(v,g,L(m._payload),O)}if(ms(m)||is(m))return L!==null?null:c(v,g,m,O,null);jl(v,m)}return null}function h(v,g,m,O,L){if(typeof O==&quot;string&quot;&amp;&amp;O!==&quot;&quot;||typeof O==&quot;number&quot;)return v=v.get(m)||null,o(g,v,&quot;&quot;+O,L);if(typeof O==&quot;object&quot;&amp;&amp;O!==null){switch(O.$$typeof){case Al:return v=v.get(O.key===null?m:O.key)||null,a(g,v,O,L);case Xr:return v=v.get(O.key===null?m:O.key)||null,u(g,v,O,L);case Rn:var U=O._init;return h(v,g,m,U(O._payload),L)}if(ms(O)||is(O))return v=v.get(m)||null,c(g,v,O,L,null);jl(g,O)}return null}function y(v,g,m,O){for(var L=null,U=null,$=g,V=g=0,he=null;$!==null&amp;&amp;V&lt;m.length;V++){$.index&gt;V?(he=$,$=null):he=$.sibling;var G=d(v,$,m[V],O);if(G===null){$===null&amp;&amp;($=he);break}t&amp;&amp;$&amp;&amp;G.alternate===null&amp;&amp;e(v,$),g=s(G,g,V),U===null?L=G:U.sibling=G,U=G,$=he}if(V===m.length)return n(v,$),ve&amp;&amp;pr(v,V),L;if($===null){for(;V&lt;m.length;V++)$=f(v,m[V],O),$!==null&amp;&amp;(g=s($,g,V),U===null?L=$:U.sibling=$,U=$);return ve&amp;&amp;pr(v,V),L}for($=r(v,$);V&lt;m.length;V++)he=h($,v,V,m[V],O),he!==null&amp;&amp;(t&amp;&amp;he.alternate!==null&amp;&amp;$.delete(he.key===null?V:he.key),g=s(he,g,V),U===null?L=he:U.sibling=he,U=he);return t&amp;&amp;$.forEach(function(rt){return e(v,rt)}),ve&amp;&amp;pr(v,V),L}function k(v,g,m,O){var L=is(m);if(typeof L!=&quot;function&quot;)throw Error(A(150));if(m=L.call(m),m==null)throw Error(A(151));for(var U=L=null,$=g,V=g=0,he=null,G=m.next();$!==null&amp;&amp;!G.done;V++,G=m.next()){$.index&gt;V?(he=$,$=null):he=$.sibling;var rt=d(v,$,G.value,O);if(rt===null){$===null&amp;&amp;($=he);break}t&amp;&amp;$&amp;&amp;rt.alternate===null&amp;&amp;e(v,$),g=s(rt,g,V),U===null?L=rt:U.sibling=rt,U=rt,$=he}if(G.done)return n(v,$),ve&amp;&amp;pr(v,V),L;if($===null){for(;!G.done;V++,G=m.next())G=f(v,G.value,O),G!==null&amp;&amp;(g=s(G,g,V),U===null?L=G:U.sibling=G,U=G);return ve&amp;&amp;pr(v,V),L}for($=r(v,$);!G.done;V++,G=m.next())G=h($,v,V,G.value,O),G!==null&amp;&amp;(t&amp;&amp;G.alternate!==null&amp;&amp;$.delete(G.key===null?V:G.key),g=s(G,g,V),U===null?L=G:U.sibling=G,U=G);return t&amp;&amp;$.forEach(function(On){return e(v,On)}),ve&amp;&amp;pr(v,V),L}function F(v,g,m,O){if(typeof m==&quot;object&quot;&amp;&amp;m!==null&amp;&amp;m.type===qr&amp;&amp;m.key===null&amp;&amp;(m=m.props.children),typeof m==&quot;object&quot;&amp;&amp;m!==null){switch(m.$$typeof){case Al:e:{for(var L=m.key,U=g;U!==null;){if(U.key===L){if(L=m.type,L===qr){if(U.tag===7){n(v,U.sibling),g=i(U,m.props.children),g.return=v,v=g;break e}}else if(U.elementType===L||typeof L==&quot;object&quot;&amp;&amp;L!==null&amp;&amp;L.$$typeof===Rn&amp;&amp;ph(L)===U.type){n(v,U.sibling),g=i(U,m.props),g.ref=us(v,U,m),g.return=v,v=g;break e}n(v,U);break}else e(v,U);U=U.sibling}m.type===qr?(g=Tr(m.props.children,v.mode,O,m.key),g.return=v,v=g):(O=fo(m.type,m.key,m.props,null,v.mode,O),O.ref=us(v,g,m),O.return=v,v=O)}return l(v);case Xr:e:{for(U=m.key;g!==null;){if(g.key===U)if(g.tag===4&amp;&amp;g.stateNode.containerInfo===m.containerInfo&amp;&amp;g.stateNode.implementation===m.implementation){n(v,g.sibling),g=i(g,m.children||[]),g.return=v,v=g;break e}else{n(v,g);break}else e(v,g);g=g.sibling}g=pu(m,v.mode,O),g.return=v,v=g}return l(v);case Rn:return U=m._init,F(v,g,U(m._payload),O)}if(ms(m))return y(v,g,m,O);if(is(m))return k(v,g,m,O);jl(v,m)}return typeof m==&quot;string&quot;&amp;&amp;m!==&quot;&quot;||typeof m==&quot;number&quot;?(m=&quot;&quot;+m,g!==null&amp;&amp;g.tag===6?(n(v,g.sibling),g=i(g,m),g.return=v,v=g):(n(v,g),g=hu(m,v.mode,O),g.return=v,v=g),l(v)):n(v,g)}return F}var Mi=um(!0),cm=um(!1),bo=or(null),zo=null,oi=null,Df=null;function Lf(){Df=oi=zo=null}function Mf(t){var e=bo.current;ye(bo),t._currentValue=e}function uc(t,e,n){for(;t!==null;){var r=t.alternate;if((t.childLanes&amp;e)!==e?(t.childLanes|=e,r!==null&amp;&amp;(r.childLanes|=e)):r!==null&amp;&amp;(r.childLanes&amp;e)!==e&amp;&amp;(r.childLanes|=e),t===n)break;t=t.return}}function mi(t,e){zo=t,Df=oi=null,t=t.dependencies,t!==null&amp;&amp;t.firstContext!==null&amp;&amp;(t.lanes&amp;e&amp;&amp;(lt=!0),t.firstContext=null)}function Dt(t){var e=t._currentValue;if(Df!==t)if(t={context:t,memoizedValue:e,next:null},oi===null){if(zo===null)throw Error(A(308));oi=t,zo.dependencies={lanes:0,firstContext:t}}else oi=oi.next=t;return e}var wr=null;function Pf(t){wr===null?wr=[t]:wr.push(t)}function fm(t,e,n,r){var i=e.interleaved;return i===null?(n.next=n,Pf(e)):(n.next=i.next,i.next=n),e.interleaved=n,_n(t,r)}function _n(t,e){t.lanes|=e;var n=t.alternate;for(n!==null&amp;&amp;(n.lanes|=e),n=t,t=t.return;t!==null;)t.childLanes|=e,n=t.alternate,n!==null&amp;&amp;(n.childLanes|=e),n=t,t=t.return;return n.tag===3?n.stateNode:null}var Nn=!1;function Uf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function dm(t,e){t=t.updateQueue,e.updateQueue===t&amp;&amp;(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,effects:t.effects})}function mn(t,e){return{eventTime:t,lane:e,tag:0,payload:null,callback:null,next:null}}function Kn(t,e,n){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,se&amp;2){var i=r.pending;return i===null?e.next=e:(e.next=i.next,i.next=e),r.pending=e,_n(t,n)}return i=r.interleaved,i===null?(e.next=e,Pf(r)):(e.next=i.next,i.next=e),r.interleaved=e,_n(t,n)}function so(t,e,n){if(e=e.updateQueue,e!==null&amp;&amp;(e=e.shared,(n&amp;4194240)!==0)){var r=e.lanes;r&amp;=t.pendingLanes,n|=r,e.lanes=n,kf(t,n)}}function gh(t,e){var n=t.updateQueue,r=t.alternate;if(r!==null&amp;&amp;(r=r.updateQueue,n===r)){var i=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var l={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};s===null?i=s=l:s=s.next=l,n=n.next}while(n!==null);s===null?i=s=e:s=s.next=e}else i=s=e;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:s,shared:r.shared,effects:r.effects},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}function jo(t,e,n,r){var i=t.updateQueue;Nn=!1;var s=i.firstBaseUpdate,l=i.lastBaseUpdate,o=i.shared.pending;if(o!==null){i.shared.pending=null;var a=o,u=a.next;a.next=null,l===null?s=u:l.next=u,l=a;var c=t.alternate;c!==null&amp;&amp;(c=c.updateQueue,o=c.lastBaseUpdate,o!==l&amp;&amp;(o===null?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=a))}if(s!==null){var f=i.baseState;l=0,c=u=a=null,o=s;do{var d=o.lane,h=o.eventTime;if((r&amp;d)===d){c!==null&amp;&amp;(c=c.next={eventTime:h,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var y=t,k=o;switch(d=e,h=n,k.tag){case 1:if(y=k.payload,typeof y==&quot;function&quot;){f=y.call(h,f,d);break e}f=y;break e;case 3:y.flags=y.flags&amp;-65537|128;case 0:if(y=k.payload,d=typeof y==&quot;function&quot;?y.call(h,f,d):y,d==null)break e;f=ke({},f,d);break e;case 2:Nn=!0}}o.callback!==null&amp;&amp;o.lane!==0&amp;&amp;(t.flags|=64,d=i.effects,d===null?i.effects=[o]:d.push(o))}else h={eventTime:h,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},c===null?(u=c=h,a=f):c=c.next=h,l|=d;if(o=o.next,o===null){if(o=i.shared.pending,o===null)break;d=o,o=d.next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(!0);if(c===null&amp;&amp;(a=f),i.baseState=a,i.firstBaseUpdate=u,i.lastBaseUpdate=c,e=i.shared.interleaved,e!==null){i=e;do l|=i.lane,i=i.next;while(i!==e)}else s===null&amp;&amp;(i.shared.lanes=0);Pr|=l,t.lanes=l,t.memoizedState=f}}function mh(t,e,n){if(t=e.effects,e.effects=null,t!==null)for(e=0;e&lt;t.length;e++){var r=t[e],i=r.callback;if(i!==null){if(r.callback=null,r=n,typeof i!=&quot;function&quot;)throw Error(A(191,i));i.call(r)}}}var wl={},tn=or(wl),Zs=or(wl),Ks=or(wl);function _r(t){if(t===wl)throw Error(A(174));return t}function bf(t,e){switch(de(Ks,e),de(Zs,t),de(tn,wl),t=e.nodeType,t){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:Bu(null,&quot;&quot;);break;default:t=t===8?e.parentNode:e,e=t.namespaceURI||null,t=t.tagName,e=Bu(e,t)}ye(tn),de(tn,e)}function Pi(){ye(tn),ye(Zs),ye(Ks)}function hm(t){_r(Ks.current);var e=_r(tn.current),n=Bu(e,t.type);e!==n&amp;&amp;(de(Zs,t),de(tn,n))}function zf(t){Zs.current===t&amp;&amp;(ye(tn),ye(Zs))}var we=or(0);function Fo(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&amp;&amp;(n=n.dehydrated,n===null||n.data===&quot;$?&quot;||n.data===&quot;$!&quot;))return e}else if(e.tag===19&amp;&amp;e.memoizedProps.revealOrder!==void 0){if(e.flags&amp;128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var ou=[];function jf(){for(var t=0;t&lt;ou.length;t++)ou[t]._workInProgressVersionPrimary=null;ou.length=0}var lo=xn.ReactCurrentDispatcher,au=xn.ReactCurrentBatchConfig,Mr=0,_e=null,Le=null,Fe=null,$o=!1,As=!1,Qs=0,jw=0;function Ke(){throw Error(A(321))}function Ff(t,e){if(e===null)return!1;for(var n=0;n&lt;e.length&amp;&amp;n&lt;t.length;n++)if(!Wt(t[n],e[n]))return!1;return!0}function $f(t,e,n,r,i,s){if(Mr=s,_e=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,lo.current=t===null||t.memoizedState===null?Bw:Ww,t=n(r,i),As){s=0;do{if(As=!1,Qs=0,25&lt;=s)throw Error(A(301));s+=1,Fe=Le=null,e.updateQueue=null,lo.current=Hw,t=n(r,i)}while(As)}if(lo.current=Vo,e=Le!==null&amp;&amp;Le.next!==null,Mr=0,Fe=Le=_e=null,$o=!1,e)throw Error(A(300));return t}function Vf(){var t=Qs!==0;return Qs=0,t}function Jt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Fe===null?_e.memoizedState=Fe=t:Fe=Fe.next=t,Fe}function Lt(){if(Le===null){var t=_e.alternate;t=t!==null?t.memoizedState:null}else t=Le.next;var e=Fe===null?_e.memoizedState:Fe.next;if(e!==null)Fe=e,Le=t;else{if(t===null)throw Error(A(310));Le=t,t={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},Fe===null?_e.memoizedState=Fe=t:Fe=Fe.next=t}return Fe}function Js(t,e){return typeof e==&quot;function&quot;?e(t):e}function uu(t){var e=Lt(),n=e.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=t;var r=Le,i=r.baseQueue,s=n.pending;if(s!==null){if(i!==null){var l=i.next;i.next=s.next,s.next=l}r.baseQueue=i=s,n.pending=null}if(i!==null){s=i.next,r=r.baseState;var o=l=null,a=null,u=s;do{var c=u.lane;if((Mr&amp;c)===c)a!==null&amp;&amp;(a=a.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:t(r,u.action);else{var f={lane:c,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};a===null?(o=a=f,l=r):a=a.next=f,_e.lanes|=c,Pr|=c}u=u.next}while(u!==null&amp;&amp;u!==s);a===null?l=r:a.next=o,Wt(r,e.memoizedState)||(lt=!0),e.memoizedState=r,e.baseState=l,e.baseQueue=a,n.lastRenderedState=r}if(t=n.interleaved,t!==null){i=t;do s=i.lane,_e.lanes|=s,Pr|=s,i=i.next;while(i!==t)}else i===null&amp;&amp;(n.lanes=0);return[e.memoizedState,n.dispatch]}function cu(t){var e=Lt(),n=e.queue;if(n===null)throw Error(A(311));n.lastRenderedReducer=t;var r=n.dispatch,i=n.pending,s=e.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do s=t(s,l.action),l=l.next;while(l!==i);Wt(s,e.memoizedState)||(lt=!0),e.memoizedState=s,e.baseQueue===null&amp;&amp;(e.baseState=s),n.lastRenderedState=s}return[s,r]}function pm(){}function gm(t,e){var n=_e,r=Lt(),i=e(),s=!Wt(r.memoizedState,i);if(s&amp;&amp;(r.memoizedState=i,lt=!0),r=r.queue,Bf(vm.bind(null,n,r,t),[t]),r.getSnapshot!==e||s||Fe!==null&amp;&amp;Fe.memoizedState.tag&amp;1){if(n.flags|=2048,Gs(9,ym.bind(null,n,r,i,e),void 0,null),Ve===null)throw Error(A(349));Mr&amp;30||mm(n,e,i)}return i}function mm(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=_e.updateQueue,e===null?(e={lastEffect:null,stores:null},_e.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function ym(t,e,n,r){e.value=n,e.getSnapshot=r,wm(e)&amp;&amp;_m(t)}function vm(t,e,n){return n(function(){wm(e)&amp;&amp;_m(t)})}function wm(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!Wt(t,n)}catch{return!0}}function _m(t){var e=_n(t,1);e!==null&amp;&amp;Vt(e,t,1,-1)}function yh(t){var e=Jt();return typeof t==&quot;function&quot;&amp;&amp;(t=t()),e.memoizedState=e.baseState=t,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Js,lastRenderedState:t},e.queue=t,t=t.dispatch=Vw.bind(null,_e,t),[e.memoizedState,t]}function Gs(t,e,n,r){return t={tag:t,create:e,destroy:n,deps:r,next:null},e=_e.updateQueue,e===null?(e={lastEffect:null,stores:null},_e.updateQueue=e,e.lastEffect=t.next=t):(n=e.lastEffect,n===null?e.lastEffect=t.next=t:(r=n.next,n.next=t,t.next=r,e.lastEffect=t)),t}function km(){return Lt().memoizedState}function oo(t,e,n,r){var i=Jt();_e.flags|=t,i.memoizedState=Gs(1|e,n,void 0,r===void 0?null:r)}function Sa(t,e,n,r){var i=Lt();r=r===void 0?null:r;var s=void 0;if(Le!==null){var l=Le.memoizedState;if(s=l.destroy,r!==null&amp;&amp;Ff(r,l.deps)){i.memoizedState=Gs(e,n,s,r);return}}_e.flags|=t,i.memoizedState=Gs(1|e,n,s,r)}function vh(t,e){return oo(8390656,8,t,e)}function Bf(t,e){return Sa(2048,8,t,e)}function Sm(t,e){return Sa(4,2,t,e)}function xm(t,e){return Sa(4,4,t,e)}function Em(t,e){if(typeof e==&quot;function&quot;)return t=t(),e(t),function(){e(null)};if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Cm(t,e,n){return n=n!=null?n.concat([t]):null,Sa(4,4,Em.bind(null,e,t),n)}function Wf(){}function Om(t,e){var n=Lt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&amp;&amp;e!==null&amp;&amp;Ff(e,r[1])?r[0]:(n.memoizedState=[t,e],t)}function Tm(t,e){var n=Lt();e=e===void 0?null:e;var r=n.memoizedState;return r!==null&amp;&amp;e!==null&amp;&amp;Ff(e,r[1])?r[0]:(t=t(),n.memoizedState=[t,e],t)}function Am(t,e,n){return Mr&amp;21?(Wt(n,e)||(n=Lg(),_e.lanes|=n,Pr|=n,t.baseState=!0),e):(t.baseState&amp;&amp;(t.baseState=!1,lt=!0),t.memoizedState=n)}function Fw(t,e){var n=ce;ce=n!==0&amp;&amp;4&gt;n?n:4,t(!0);var r=au.transition;au.transition={};try{t(!1),e()}finally{ce=n,au.transition=r}}function Rm(){return Lt().memoizedState}function $w(t,e,n){var r=Jn(t);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Nm(t))Im(e,n);else if(n=fm(t,e,n,r),n!==null){var i=et();Vt(n,t,r,i),Dm(n,e,r)}}function Vw(t,e,n){var r=Jn(t),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Nm(t))Im(e,i);else{var s=t.alternate;if(t.lanes===0&amp;&amp;(s===null||s.lanes===0)&amp;&amp;(s=e.lastRenderedReducer,s!==null))try{var l=e.lastRenderedState,o=s(l,n);if(i.hasEagerState=!0,i.eagerState=o,Wt(o,l)){var a=e.interleaved;a===null?(i.next=i,Pf(e)):(i.next=a.next,a.next=i),e.interleaved=i;return}}catch{}finally{}n=fm(t,e,i,r),n!==null&amp;&amp;(i=et(),Vt(n,t,r,i),Dm(n,e,r))}}function Nm(t){var e=t.alternate;return t===_e||e!==null&amp;&amp;e===_e}function Im(t,e){As=$o=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function Dm(t,e,n){if(n&amp;4194240){var r=e.lanes;r&amp;=t.pendingLanes,n|=r,e.lanes=n,kf(t,n)}}var Vo={readContext:Dt,useCallback:Ke,useContext:Ke,useEffect:Ke,useImperativeHandle:Ke,useInsertionEffect:Ke,useLayoutEffect:Ke,useMemo:Ke,useReducer:Ke,useRef:Ke,useState:Ke,useDebugValue:Ke,useDeferredValue:Ke,useTransition:Ke,useMutableSource:Ke,useSyncExternalStore:Ke,useId:Ke,unstable_isNewReconciler:!1},Bw={readContext:Dt,useCallback:function(t,e){return Jt().memoizedState=[t,e===void 0?null:e],t},useContext:Dt,useEffect:vh,useImperativeHandle:function(t,e,n){return n=n!=null?n.concat([t]):null,oo(4194308,4,Em.bind(null,e,t),n)},useLayoutEffect:function(t,e){return oo(4194308,4,t,e)},useInsertionEffect:function(t,e){return oo(4,2,t,e)},useMemo:function(t,e){var n=Jt();return e=e===void 0?null:e,t=t(),n.memoizedState=[t,e],t},useReducer:function(t,e,n){var r=Jt();return e=n!==void 0?n(e):e,r.memoizedState=r.baseState=e,t={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:e},r.queue=t,t=t.dispatch=$w.bind(null,_e,t),[r.memoizedState,t]},useRef:function(t){var e=Jt();return t={current:t},e.memoizedState=t},useState:yh,useDebugValue:Wf,useDeferredValue:function(t){return Jt().memoizedState=t},useTransition:function(){var t=yh(!1),e=t[0];return t=Fw.bind(null,t[1]),Jt().memoizedState=t,[e,t]},useMutableSource:function(){},useSyncExternalStore:function(t,e,n){var r=_e,i=Jt();if(ve){if(n===void 0)throw Error(A(407));n=n()}else{if(n=e(),Ve===null)throw Error(A(349));Mr&amp;30||mm(r,e,n)}i.memoizedState=n;var s={value:n,getSnapshot:e};return i.queue=s,vh(vm.bind(null,r,s,t),[t]),r.flags|=2048,Gs(9,ym.bind(null,r,s,n,e),void 0,null),n},useId:function(){var t=Jt(),e=Ve.identifierPrefix;if(ve){var n=gn,r=pn;n=(r&amp;~(1&lt;&lt;32-$t(r)-1)).toString(32)+n,e=&quot;:&quot;+e+&quot;R&quot;+n,n=Qs++,0&lt;n&amp;&amp;(e+=&quot;H&quot;+n.toString(32)),e+=&quot;:&quot;}else n=jw++,e=&quot;:&quot;+e+&quot;r&quot;+n.toString(32)+&quot;:&quot;;return t.memoizedState=e},unstable_isNewReconciler:!1},Ww={readContext:Dt,useCallback:Om,useContext:Dt,useEffect:Bf,useImperativeHandle:Cm,useInsertionEffect:Sm,useLayoutEffect:xm,useMemo:Tm,useReducer:uu,useRef:km,useState:function(){return uu(Js)},useDebugValue:Wf,useDeferredValue:function(t){var e=Lt();return Am(e,Le.memoizedState,t)},useTransition:function(){var t=uu(Js)[0],e=Lt().memoizedState;return[t,e]},useMutableSource:pm,useSyncExternalStore:gm,useId:Rm,unstable_isNewReconciler:!1},Hw={readContext:Dt,useCallback:Om,useContext:Dt,useEffect:Bf,useImperativeHandle:Cm,useInsertionEffect:Sm,useLayoutEffect:xm,useMemo:Tm,useReducer:cu,useRef:km,useState:function(){return cu(Js)},useDebugValue:Wf,useDeferredValue:function(t){var e=Lt();return Le===null?e.memoizedState=t:Am(e,Le.memoizedState,t)},useTransition:function(){var t=cu(Js)[0],e=Lt().memoizedState;return[t,e]},useMutableSource:pm,useSyncExternalStore:gm,useId:Rm,unstable_isNewReconciler:!1};function bt(t,e){if(t&amp;&amp;t.defaultProps){e=ke({},e),t=t.defaultProps;for(var n in t)e[n]===void 0&amp;&amp;(e[n]=t[n]);return e}return e}function cc(t,e,n,r){e=t.memoizedState,n=n(r,e),n=n==null?e:ke({},e,n),t.memoizedState=n,t.lanes===0&amp;&amp;(t.updateQueue.baseState=n)}var xa={isMounted:function(t){return(t=t._reactInternals)?Wr(t)===t:!1},enqueueSetState:function(t,e,n){t=t._reactInternals;var r=et(),i=Jn(t),s=mn(r,i);s.payload=e,n!=null&amp;&amp;(s.callback=n),e=Kn(t,s,i),e!==null&amp;&amp;(Vt(e,t,i,r),so(e,t,i))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var r=et(),i=Jn(t),s=mn(r,i);s.tag=1,s.payload=e,n!=null&amp;&amp;(s.callback=n),e=Kn(t,s,i),e!==null&amp;&amp;(Vt(e,t,i,r),so(e,t,i))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=et(),r=Jn(t),i=mn(n,r);i.tag=2,e!=null&amp;&amp;(i.callback=e),e=Kn(t,i,r),e!==null&amp;&amp;(Vt(e,t,r,n),so(e,t,r))}};function wh(t,e,n,r,i,s,l){return t=t.stateNode,typeof t.shouldComponentUpdate==&quot;function&quot;?t.shouldComponentUpdate(r,s,l):e.prototype&amp;&amp;e.prototype.isPureReactComponent?!Vs(n,r)||!Vs(i,s):!0}function Lm(t,e,n){var r=!1,i=er,s=e.contextType;return typeof s==&quot;object&quot;&amp;&amp;s!==null?s=Dt(s):(i=at(e)?Dr:Ye.current,r=e.contextTypes,s=(r=r!=null)?Di(t,i):er),e=new e(n,s),t.memoizedState=e.state!==null&amp;&amp;e.state!==void 0?e.state:null,e.updater=xa,t.stateNode=e,e._reactInternals=t,r&amp;&amp;(t=t.stateNode,t.__reactInternalMemoizedUnmaskedChildContext=i,t.__reactInternalMemoizedMaskedChildContext=s),e}function _h(t,e,n,r){t=e.state,typeof e.componentWillReceiveProps==&quot;function&quot;&amp;&amp;e.componentWillReceiveProps(n,r),typeof e.UNSAFE_componentWillReceiveProps==&quot;function&quot;&amp;&amp;e.UNSAFE_componentWillReceiveProps(n,r),e.state!==t&amp;&amp;xa.enqueueReplaceState(e,e.state,null)}function fc(t,e,n,r){var i=t.stateNode;i.props=n,i.state=t.memoizedState,i.refs={},Uf(t);var s=e.contextType;typeof s==&quot;object&quot;&amp;&amp;s!==null?i.context=Dt(s):(s=at(e)?Dr:Ye.current,i.context=Di(t,s)),i.state=t.memoizedState,s=e.getDerivedStateFromProps,typeof s==&quot;function&quot;&amp;&amp;(cc(t,e,s,n),i.state=t.memoizedState),typeof e.getDerivedStateFromProps==&quot;function&quot;||typeof i.getSnapshotBeforeUpdate==&quot;function&quot;||typeof i.UNSAFE_componentWillMount!=&quot;function&quot;&amp;&amp;typeof i.componentWillMount!=&quot;function&quot;||(e=i.state,typeof i.componentWillMount==&quot;function&quot;&amp;&amp;i.componentWillMount(),typeof i.UNSAFE_componentWillMount==&quot;function&quot;&amp;&amp;i.UNSAFE_componentWillMount(),e!==i.state&amp;&amp;xa.enqueueReplaceState(i,i.state,null),jo(t,n,i,r),i.state=t.memoizedState),typeof i.componentDidMount==&quot;function&quot;&amp;&amp;(t.flags|=4194308)}function Ui(t,e){try{var n=&quot;&quot;,r=e;do n+=wv(r),r=r.return;while(r);var i=n}catch(s){i=`
Error generating stack: `+s.message+`
`+s.stack}return{value:t,source:e,stack:i,digest:null}}function fu(t,e,n){return{value:t,source:null,stack:n??null,digest:e??null}}function dc(t,e){try{console.error(e.value)}catch(n){setTimeout(function(){throw n})}}var Zw=typeof WeakMap==&quot;function&quot;?WeakMap:Map;function Mm(t,e,n){n=mn(-1,n),n.tag=3,n.payload={element:null};var r=e.value;return n.callback=function(){Wo||(Wo=!0,Sc=r),dc(t,e)},n}function Pm(t,e,n){n=mn(-1,n),n.tag=3;var r=t.type.getDerivedStateFromError;if(typeof r==&quot;function&quot;){var i=e.value;n.payload=function(){return r(i)},n.callback=function(){dc(t,e)}}var s=t.stateNode;return s!==null&amp;&amp;typeof s.componentDidCatch==&quot;function&quot;&amp;&amp;(n.callback=function(){dc(t,e),typeof r!=&quot;function&quot;&amp;&amp;(Qn===null?Qn=new Set([this]):Qn.add(this));var l=e.stack;this.componentDidCatch(e.value,{componentStack:l!==null?l:&quot;&quot;})}),n}function kh(t,e,n){var r=t.pingCache;if(r===null){r=t.pingCache=new Zw;var i=new Set;r.set(e,i)}else i=r.get(e),i===void 0&amp;&amp;(i=new Set,r.set(e,i));i.has(n)||(i.add(n),t=l_.bind(null,t,e,n),e.then(t,t))}function Sh(t){do{var e;if((e=t.tag===13)&amp;&amp;(e=t.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return t;t=t.return}while(t!==null);return null}function xh(t,e,n,r,i){return t.mode&amp;1?(t.flags|=65536,t.lanes=i,t):(t===e?t.flags|=65536:(t.flags|=128,n.flags|=131072,n.flags&amp;=-52805,n.tag===1&amp;&amp;(n.alternate===null?n.tag=17:(e=mn(-1,1),e.tag=2,Kn(n,e,1))),n.lanes|=1),t)}var Kw=xn.ReactCurrentOwner,lt=!1;function Xe(t,e,n,r){e.child=t===null?cm(e,null,n,r):Mi(e,t.child,n,r)}function Eh(t,e,n,r,i){n=n.render;var s=e.ref;return mi(e,i),r=$f(t,e,n,r,s,i),n=Vf(),t!==null&amp;&amp;!lt?(e.updateQueue=t.updateQueue,e.flags&amp;=-2053,t.lanes&amp;=~i,kn(t,e,i)):(ve&amp;&amp;n&amp;&amp;Rf(e),e.flags|=1,Xe(t,e,r,i),e.child)}function Ch(t,e,n,r,i){if(t===null){var s=n.type;return typeof s==&quot;function&quot;&amp;&amp;!Xf(s)&amp;&amp;s.defaultProps===void 0&amp;&amp;n.compare===null&amp;&amp;n.defaultProps===void 0?(e.tag=15,e.type=s,Um(t,e,s,r,i)):(t=fo(n.type,null,r,e,e.mode,i),t.ref=e.ref,t.return=e,e.child=t)}if(s=t.child,!(t.lanes&amp;i)){var l=s.memoizedProps;if(n=n.compare,n=n!==null?n:Vs,n(l,r)&amp;&amp;t.ref===e.ref)return kn(t,e,i)}return e.flags|=1,t=Gn(s,r),t.ref=e.ref,t.return=e,e.child=t}function Um(t,e,n,r,i){if(t!==null){var s=t.memoizedProps;if(Vs(s,r)&amp;&amp;t.ref===e.ref)if(lt=!1,e.pendingProps=r=s,(t.lanes&amp;i)!==0)t.flags&amp;131072&amp;&amp;(lt=!0);else return e.lanes=t.lanes,kn(t,e,i)}return hc(t,e,n,r,i)}function bm(t,e,n){var r=e.pendingProps,i=r.children,s=t!==null?t.memoizedState:null;if(r.mode===&quot;hidden&quot;)if(!(e.mode&amp;1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},de(ui,pt),pt|=n;else{if(!(n&amp;1073741824))return t=s!==null?s.baseLanes|n:n,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:t,cachePool:null,transitions:null},e.updateQueue=null,de(ui,pt),pt|=t,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=s!==null?s.baseLanes:n,de(ui,pt),pt|=r}else s!==null?(r=s.baseLanes|n,e.memoizedState=null):r=n,de(ui,pt),pt|=r;return Xe(t,e,i,n),e.child}function zm(t,e){var n=e.ref;(t===null&amp;&amp;n!==null||t!==null&amp;&amp;t.ref!==n)&amp;&amp;(e.flags|=512,e.flags|=2097152)}function hc(t,e,n,r,i){var s=at(n)?Dr:Ye.current;return s=Di(e,s),mi(e,i),n=$f(t,e,n,r,s,i),r=Vf(),t!==null&amp;&amp;!lt?(e.updateQueue=t.updateQueue,e.flags&amp;=-2053,t.lanes&amp;=~i,kn(t,e,i)):(ve&amp;&amp;r&amp;&amp;Rf(e),e.flags|=1,Xe(t,e,n,i),e.child)}function Oh(t,e,n,r,i){if(at(n)){var s=!0;Mo(e)}else s=!1;if(mi(e,i),e.stateNode===null)ao(t,e),Lm(e,n,r),fc(e,n,r,i),r=!0;else if(t===null){var l=e.stateNode,o=e.memoizedProps;l.props=o;var a=l.context,u=n.contextType;typeof u==&quot;object&quot;&amp;&amp;u!==null?u=Dt(u):(u=at(n)?Dr:Ye.current,u=Di(e,u));var c=n.getDerivedStateFromProps,f=typeof c==&quot;function&quot;||typeof l.getSnapshotBeforeUpdate==&quot;function&quot;;f||typeof l.UNSAFE_componentWillReceiveProps!=&quot;function&quot;&amp;&amp;typeof l.componentWillReceiveProps!=&quot;function&quot;||(o!==r||a!==u)&amp;&amp;_h(e,l,r,u),Nn=!1;var d=e.memoizedState;l.state=d,jo(e,r,l,i),a=e.memoizedState,o!==r||d!==a||ot.current||Nn?(typeof c==&quot;function&quot;&amp;&amp;(cc(e,n,c,r),a=e.memoizedState),(o=Nn||wh(e,n,o,r,d,a,u))?(f||typeof l.UNSAFE_componentWillMount!=&quot;function&quot;&amp;&amp;typeof l.componentWillMount!=&quot;function&quot;||(typeof l.componentWillMount==&quot;function&quot;&amp;&amp;l.componentWillMount(),typeof l.UNSAFE_componentWillMount==&quot;function&quot;&amp;&amp;l.UNSAFE_componentWillMount()),typeof l.componentDidMount==&quot;function&quot;&amp;&amp;(e.flags|=4194308)):(typeof l.componentDidMount==&quot;function&quot;&amp;&amp;(e.flags|=4194308),e.memoizedProps=r,e.memoizedState=a),l.props=r,l.state=a,l.context=u,r=o):(typeof l.componentDidMount==&quot;function&quot;&amp;&amp;(e.flags|=4194308),r=!1)}else{l=e.stateNode,dm(t,e),o=e.memoizedProps,u=e.type===e.elementType?o:bt(e.type,o),l.props=u,f=e.pendingProps,d=l.context,a=n.contextType,typeof a==&quot;object&quot;&amp;&amp;a!==null?a=Dt(a):(a=at(n)?Dr:Ye.current,a=Di(e,a));var h=n.getDerivedStateFromProps;(c=typeof h==&quot;function&quot;||typeof l.getSnapshotBeforeUpdate==&quot;function&quot;)||typeof l.UNSAFE_componentWillReceiveProps!=&quot;function&quot;&amp;&amp;typeof l.componentWillReceiveProps!=&quot;function&quot;||(o!==f||d!==a)&amp;&amp;_h(e,l,r,a),Nn=!1,d=e.memoizedState,l.state=d,jo(e,r,l,i);var y=e.memoizedState;o!==f||d!==y||ot.current||Nn?(typeof h==&quot;function&quot;&amp;&amp;(cc(e,n,h,r),y=e.memoizedState),(u=Nn||wh(e,n,u,r,d,y,a)||!1)?(c||typeof l.UNSAFE_componentWillUpdate!=&quot;function&quot;&amp;&amp;typeof l.componentWillUpdate!=&quot;function&quot;||(typeof l.componentWillUpdate==&quot;function&quot;&amp;&amp;l.componentWillUpdate(r,y,a),typeof l.UNSAFE_componentWillUpdate==&quot;function&quot;&amp;&amp;l.UNSAFE_componentWillUpdate(r,y,a)),typeof l.componentDidUpdate==&quot;function&quot;&amp;&amp;(e.flags|=4),typeof l.getSnapshotBeforeUpdate==&quot;function&quot;&amp;&amp;(e.flags|=1024)):(typeof l.componentDidUpdate!=&quot;function&quot;||o===t.memoizedProps&amp;&amp;d===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!=&quot;function&quot;||o===t.memoizedProps&amp;&amp;d===t.memoizedState||(e.flags|=1024),e.memoizedProps=r,e.memoizedState=y),l.props=r,l.state=y,l.context=a,r=u):(typeof l.componentDidUpdate!=&quot;function&quot;||o===t.memoizedProps&amp;&amp;d===t.memoizedState||(e.flags|=4),typeof l.getSnapshotBeforeUpdate!=&quot;function&quot;||o===t.memoizedProps&amp;&amp;d===t.memoizedState||(e.flags|=1024),r=!1)}return pc(t,e,n,r,s,i)}function pc(t,e,n,r,i,s){zm(t,e);var l=(e.flags&amp;128)!==0;if(!r&amp;&amp;!l)return i&amp;&amp;fh(e,n,!1),kn(t,e,s);r=e.stateNode,Kw.current=e;var o=l&amp;&amp;typeof n.getDerivedStateFromError!=&quot;function&quot;?null:r.render();return e.flags|=1,t!==null&amp;&amp;l?(e.child=Mi(e,t.child,null,s),e.child=Mi(e,null,o,s)):Xe(t,e,o,s),e.memoizedState=r.state,i&amp;&amp;fh(e,n,!0),e.child}function jm(t){var e=t.stateNode;e.pendingContext?ch(t,e.pendingContext,e.pendingContext!==e.context):e.context&amp;&amp;ch(t,e.context,!1),bf(t,e.containerInfo)}function Th(t,e,n,r,i){return Li(),If(i),e.flags|=256,Xe(t,e,n,r),e.child}var gc={dehydrated:null,treeContext:null,retryLane:0};function mc(t){return{baseLanes:t,cachePool:null,transitions:null}}function Fm(t,e,n){var r=e.pendingProps,i=we.current,s=!1,l=(e.flags&amp;128)!==0,o;if((o=l)||(o=t!==null&amp;&amp;t.memoizedState===null?!1:(i&amp;2)!==0),o?(s=!0,e.flags&amp;=-129):(t===null||t.memoizedState!==null)&amp;&amp;(i|=1),de(we,i&amp;1),t===null)return ac(e),t=e.memoizedState,t!==null&amp;&amp;(t=t.dehydrated,t!==null)?(e.mode&amp;1?t.data===&quot;$!&quot;?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(l=r.children,t=r.fallback,s?(r=e.mode,s=e.child,l={mode:&quot;hidden&quot;,children:l},!(r&amp;1)&amp;&amp;s!==null?(s.childLanes=0,s.pendingProps=l):s=Oa(l,r,0,null),t=Tr(t,r,n,null),s.return=e,t.return=e,s.sibling=t,e.child=s,e.child.memoizedState=mc(n),e.memoizedState=gc,t):Hf(e,l));if(i=t.memoizedState,i!==null&amp;&amp;(o=i.dehydrated,o!==null))return Qw(t,e,l,r,o,i,n);if(s){s=r.fallback,l=e.mode,i=t.child,o=i.sibling;var a={mode:&quot;hidden&quot;,children:r.children};return!(l&amp;1)&amp;&amp;e.child!==i?(r=e.child,r.childLanes=0,r.pendingProps=a,e.deletions=null):(r=Gn(i,a),r.subtreeFlags=i.subtreeFlags&amp;14680064),o!==null?s=Gn(o,s):(s=Tr(s,l,n,null),s.flags|=2),s.return=e,r.return=e,r.sibling=s,e.child=r,r=s,s=e.child,l=t.child.memoizedState,l=l===null?mc(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=t.childLanes&amp;~n,e.memoizedState=gc,r}return s=t.child,t=s.sibling,r=Gn(s,{mode:&quot;visible&quot;,children:r.children}),!(e.mode&amp;1)&amp;&amp;(r.lanes=n),r.return=e,r.sibling=null,t!==null&amp;&amp;(n=e.deletions,n===null?(e.deletions=[t],e.flags|=16):n.push(t)),e.child=r,e.memoizedState=null,r}function Hf(t,e){return e=Oa({mode:&quot;visible&quot;,children:e},t.mode,0,null),e.return=t,t.child=e}function Fl(t,e,n,r){return r!==null&amp;&amp;If(r),Mi(e,t.child,null,n),t=Hf(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Qw(t,e,n,r,i,s,l){if(n)return e.flags&amp;256?(e.flags&amp;=-257,r=fu(Error(A(422))),Fl(t,e,l,r)):e.memoizedState!==null?(e.child=t.child,e.flags|=128,null):(s=r.fallback,i=e.mode,r=Oa({mode:&quot;visible&quot;,children:r.children},i,0,null),s=Tr(s,i,l,null),s.flags|=2,r.return=e,s.return=e,r.sibling=s,e.child=r,e.mode&amp;1&amp;&amp;Mi(e,t.child,null,l),e.child.memoizedState=mc(l),e.memoizedState=gc,s);if(!(e.mode&amp;1))return Fl(t,e,l,null);if(i.data===&quot;$!&quot;){if(r=i.nextSibling&amp;&amp;i.nextSibling.dataset,r)var o=r.dgst;return r=o,s=Error(A(419)),r=fu(s,r,void 0),Fl(t,e,l,r)}if(o=(l&amp;t.childLanes)!==0,lt||o){if(r=Ve,r!==null){switch(l&amp;-l){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}i=i&amp;(r.suspendedLanes|l)?0:i,i!==0&amp;&amp;i!==s.retryLane&amp;&amp;(s.retryLane=i,_n(t,i),Vt(r,t,i,-1))}return Yf(),r=fu(Error(A(421))),Fl(t,e,l,r)}return i.data===&quot;$?&quot;?(e.flags|=128,e.child=t.child,e=o_.bind(null,t),i._reactRetry=e,null):(t=s.treeContext,gt=Zn(i.nextSibling),yt=e,ve=!0,Ft=null,t!==null&amp;&amp;(xt[Et++]=pn,xt[Et++]=gn,xt[Et++]=Lr,pn=t.id,gn=t.overflow,Lr=e),e=Hf(e,r.children),e.flags|=4096,e)}function Ah(t,e,n){t.lanes|=e;var r=t.alternate;r!==null&amp;&amp;(r.lanes|=e),uc(t.return,e,n)}function du(t,e,n,r,i){var s=t.memoizedState;s===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=r,s.tail=n,s.tailMode=i)}function $m(t,e,n){var r=e.pendingProps,i=r.revealOrder,s=r.tail;if(Xe(t,e,r.children,n),r=we.current,r&amp;2)r=r&amp;1|2,e.flags|=128;else{if(t!==null&amp;&amp;t.flags&amp;128)e:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&amp;&amp;Ah(t,n,e);else if(t.tag===19)Ah(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}r&amp;=1}if(de(we,r),!(e.mode&amp;1))e.memoizedState=null;else switch(i){case&quot;forwards&quot;:for(n=e.child,i=null;n!==null;)t=n.alternate,t!==null&amp;&amp;Fo(t)===null&amp;&amp;(i=n),n=n.sibling;n=i,n===null?(i=e.child,e.child=null):(i=n.sibling,n.sibling=null),du(e,!1,i,n,s);break;case&quot;backwards&quot;:for(n=null,i=e.child,e.child=null;i!==null;){if(t=i.alternate,t!==null&amp;&amp;Fo(t)===null){e.child=i;break}t=i.sibling,i.sibling=n,n=i,i=t}du(e,!0,n,null,s);break;case&quot;together&quot;:du(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function ao(t,e){!(e.mode&amp;1)&amp;&amp;t!==null&amp;&amp;(t.alternate=null,e.alternate=null,e.flags|=2)}function kn(t,e,n){if(t!==null&amp;&amp;(e.dependencies=t.dependencies),Pr|=e.lanes,!(n&amp;e.childLanes))return null;if(t!==null&amp;&amp;e.child!==t.child)throw Error(A(153));if(e.child!==null){for(t=e.child,n=Gn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=Gn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Jw(t,e,n){switch(e.tag){case 3:jm(e),Li();break;case 5:hm(e);break;case 1:at(e.type)&amp;&amp;Mo(e);break;case 4:bf(e,e.stateNode.containerInfo);break;case 10:var r=e.type._context,i=e.memoizedProps.value;de(bo,r._currentValue),r._currentValue=i;break;case 13:if(r=e.memoizedState,r!==null)return r.dehydrated!==null?(de(we,we.current&amp;1),e.flags|=128,null):n&amp;e.child.childLanes?Fm(t,e,n):(de(we,we.current&amp;1),t=kn(t,e,n),t!==null?t.sibling:null);de(we,we.current&amp;1);break;case 19:if(r=(n&amp;e.childLanes)!==0,t.flags&amp;128){if(r)return $m(t,e,n);e.flags|=128}if(i=e.memoizedState,i!==null&amp;&amp;(i.rendering=null,i.tail=null,i.lastEffect=null),de(we,we.current),r)break;return null;case 22:case 23:return e.lanes=0,bm(t,e,n)}return kn(t,e,n)}var Vm,yc,Bm,Wm;Vm=function(t,e){for(var n=e.child;n!==null;){if(n.tag===5||n.tag===6)t.appendChild(n.stateNode);else if(n.tag!==4&amp;&amp;n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}};yc=function(){};Bm=function(t,e,n,r){var i=t.memoizedProps;if(i!==r){t=e.stateNode,_r(tn.current);var s=null;switch(n){case&quot;input&quot;:i=ju(t,i),r=ju(t,r),s=[];break;case&quot;select&quot;:i=ke({},i,{value:void 0}),r=ke({},r,{value:void 0}),s=[];break;case&quot;textarea&quot;:i=Vu(t,i),r=Vu(t,r),s=[];break;default:typeof i.onClick!=&quot;function&quot;&amp;&amp;typeof r.onClick==&quot;function&quot;&amp;&amp;(t.onclick=Do)}Wu(n,r);var l;n=null;for(u in i)if(!r.hasOwnProperty(u)&amp;&amp;i.hasOwnProperty(u)&amp;&amp;i[u]!=null)if(u===&quot;style&quot;){var o=i[u];for(l in o)o.hasOwnProperty(l)&amp;&amp;(n||(n={}),n[l]=&quot;&quot;)}else u!==&quot;dangerouslySetInnerHTML&quot;&amp;&amp;u!==&quot;children&quot;&amp;&amp;u!==&quot;suppressContentEditableWarning&quot;&amp;&amp;u!==&quot;suppressHydrationWarning&quot;&amp;&amp;u!==&quot;autoFocus&quot;&amp;&amp;(Ps.hasOwnProperty(u)?s||(s=[]):(s=s||[]).push(u,null));for(u in r){var a=r[u];if(o=i!=null?i[u]:void 0,r.hasOwnProperty(u)&amp;&amp;a!==o&amp;&amp;(a!=null||o!=null))if(u===&quot;style&quot;)if(o){for(l in o)!o.hasOwnProperty(l)||a&amp;&amp;a.hasOwnProperty(l)||(n||(n={}),n[l]=&quot;&quot;);for(l in a)a.hasOwnProperty(l)&amp;&amp;o[l]!==a[l]&amp;&amp;(n||(n={}),n[l]=a[l])}else n||(s||(s=[]),s.push(u,n)),n=a;else u===&quot;dangerouslySetInnerHTML&quot;?(a=a?a.__html:void 0,o=o?o.__html:void 0,a!=null&amp;&amp;o!==a&amp;&amp;(s=s||[]).push(u,a)):u===&quot;children&quot;?typeof a!=&quot;string&quot;&amp;&amp;typeof a!=&quot;number&quot;||(s=s||[]).push(u,&quot;&quot;+a):u!==&quot;suppressContentEditableWarning&quot;&amp;&amp;u!==&quot;suppressHydrationWarning&quot;&amp;&amp;(Ps.hasOwnProperty(u)?(a!=null&amp;&amp;u===&quot;onScroll&quot;&amp;&amp;pe(&quot;scroll&quot;,t),s||o===a||(s=[])):(s=s||[]).push(u,a))}n&amp;&amp;(s=s||[]).push(&quot;style&quot;,n);var u=s;(e.updateQueue=u)&amp;&amp;(e.flags|=4)}};Wm=function(t,e,n,r){n!==r&amp;&amp;(e.flags|=4)};function cs(t,e){if(!ve)switch(t.tailMode){case&quot;hidden&quot;:e=t.tail;for(var n=null;e!==null;)e.alternate!==null&amp;&amp;(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case&quot;collapsed&quot;:n=t.tail;for(var r=null;n!==null;)n.alternate!==null&amp;&amp;(r=n),n=n.sibling;r===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null}}function Qe(t){var e=t.alternate!==null&amp;&amp;t.alternate.child===t.child,n=0,r=0;if(e)for(var i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&amp;14680064,r|=i.flags&amp;14680064,i.return=t,i=i.sibling;else for(i=t.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=t,i=i.sibling;return t.subtreeFlags|=r,t.childLanes=n,e}function Gw(t,e,n){var r=e.pendingProps;switch(Nf(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qe(e),null;case 1:return at(e.type)&amp;&amp;Lo(),Qe(e),null;case 3:return r=e.stateNode,Pi(),ye(ot),ye(Ye),jf(),r.pendingContext&amp;&amp;(r.context=r.pendingContext,r.pendingContext=null),(t===null||t.child===null)&amp;&amp;(zl(e)?e.flags|=4:t===null||t.memoizedState.isDehydrated&amp;&amp;!(e.flags&amp;256)||(e.flags|=1024,Ft!==null&amp;&amp;(Cc(Ft),Ft=null))),yc(t,e),Qe(e),null;case 5:zf(e);var i=_r(Ks.current);if(n=e.type,t!==null&amp;&amp;e.stateNode!=null)Bm(t,e,n,r,i),t.ref!==e.ref&amp;&amp;(e.flags|=512,e.flags|=2097152);else{if(!r){if(e.stateNode===null)throw Error(A(166));return Qe(e),null}if(t=_r(tn.current),zl(e)){r=e.stateNode,n=e.type;var s=e.memoizedProps;switch(r[Xt]=e,r[Hs]=s,t=(e.mode&amp;1)!==0,n){case&quot;dialog&quot;:pe(&quot;cancel&quot;,r),pe(&quot;close&quot;,r);break;case&quot;iframe&quot;:case&quot;object&quot;:case&quot;embed&quot;:pe(&quot;load&quot;,r);break;case&quot;video&quot;:case&quot;audio&quot;:for(i=0;i&lt;vs.length;i++)pe(vs[i],r);break;case&quot;source&quot;:pe(&quot;error&quot;,r);break;case&quot;img&quot;:case&quot;image&quot;:case&quot;link&quot;:pe(&quot;error&quot;,r),pe(&quot;load&quot;,r);break;case&quot;details&quot;:pe(&quot;toggle&quot;,r);break;case&quot;input&quot;:bd(r,s),pe(&quot;invalid&quot;,r);break;case&quot;select&quot;:r._wrapperState={wasMultiple:!!s.multiple},pe(&quot;invalid&quot;,r);break;case&quot;textarea&quot;:jd(r,s),pe(&quot;invalid&quot;,r)}Wu(n,s),i=null;for(var l in s)if(s.hasOwnProperty(l)){var o=s[l];l===&quot;children&quot;?typeof o==&quot;string&quot;?r.textContent!==o&amp;&amp;(s.suppressHydrationWarning!==!0&amp;&amp;bl(r.textContent,o,t),i=[&quot;children&quot;,o]):typeof o==&quot;number&quot;&amp;&amp;r.textContent!==&quot;&quot;+o&amp;&amp;(s.suppressHydrationWarning!==!0&amp;&amp;bl(r.textContent,o,t),i=[&quot;children&quot;,&quot;&quot;+o]):Ps.hasOwnProperty(l)&amp;&amp;o!=null&amp;&amp;l===&quot;onScroll&quot;&amp;&amp;pe(&quot;scroll&quot;,r)}switch(n){case&quot;input&quot;:Rl(r),zd(r,s,!0);break;case&quot;textarea&quot;:Rl(r),Fd(r);break;case&quot;select&quot;:case&quot;option&quot;:break;default:typeof s.onClick==&quot;function&quot;&amp;&amp;(r.onclick=Do)}r=i,e.updateQueue=r,r!==null&amp;&amp;(e.flags|=4)}else{l=i.nodeType===9?i:i.ownerDocument,t===&quot;http://www.w3.org/1999/xhtml&quot;&amp;&amp;(t=vg(n)),t===&quot;http://www.w3.org/1999/xhtml&quot;?n===&quot;script&quot;?(t=l.createElement(&quot;div&quot;),t.innerHTML=&quot;&lt;script&gt;&lt;\/script&gt;&quot;,t=t.removeChild(t.firstChild)):typeof r.is==&quot;string&quot;?t=l.createElement(n,{is:r.is}):(t=l.createElement(n),n===&quot;select&quot;&amp;&amp;(l=t,r.multiple?l.multiple=!0:r.size&amp;&amp;(l.size=r.size))):t=l.createElementNS(t,n),t[Xt]=e,t[Hs]=r,Vm(t,e,!1,!1),e.stateNode=t;e:{switch(l=Hu(n,r),n){case&quot;dialog&quot;:pe(&quot;cancel&quot;,t),pe(&quot;close&quot;,t),i=r;break;case&quot;iframe&quot;:case&quot;object&quot;:case&quot;embed&quot;:pe(&quot;load&quot;,t),i=r;break;case&quot;video&quot;:case&quot;audio&quot;:for(i=0;i&lt;vs.length;i++)pe(vs[i],t);i=r;break;case&quot;source&quot;:pe(&quot;error&quot;,t),i=r;break;case&quot;img&quot;:case&quot;image&quot;:case&quot;link&quot;:pe(&quot;error&quot;,t),pe(&quot;load&quot;,t),i=r;break;case&quot;details&quot;:pe(&quot;toggle&quot;,t),i=r;break;case&quot;input&quot;:bd(t,r),i=ju(t,r),pe(&quot;invalid&quot;,t);break;case&quot;option&quot;:i=r;break;case&quot;select&quot;:t._wrapperState={wasMultiple:!!r.multiple},i=ke({},r,{value:void 0}),pe(&quot;invalid&quot;,t);break;case&quot;textarea&quot;:jd(t,r),i=Vu(t,r),pe(&quot;invalid&quot;,t);break;default:i=r}Wu(n,i),o=i;for(s in o)if(o.hasOwnProperty(s)){var a=o[s];s===&quot;style&quot;?kg(t,a):s===&quot;dangerouslySetInnerHTML&quot;?(a=a?a.__html:void 0,a!=null&amp;&amp;wg(t,a)):s===&quot;children&quot;?typeof a==&quot;string&quot;?(n!==&quot;textarea&quot;||a!==&quot;&quot;)&amp;&amp;Us(t,a):typeof a==&quot;number&quot;&amp;&amp;Us(t,&quot;&quot;+a):s!==&quot;suppressContentEditableWarning&quot;&amp;&amp;s!==&quot;suppressHydrationWarning&quot;&amp;&amp;s!==&quot;autoFocus&quot;&amp;&amp;(Ps.hasOwnProperty(s)?a!=null&amp;&amp;s===&quot;onScroll&quot;&amp;&amp;pe(&quot;scroll&quot;,t):a!=null&amp;&amp;gf(t,s,a,l))}switch(n){case&quot;input&quot;:Rl(t),zd(t,r,!1);break;case&quot;textarea&quot;:Rl(t),Fd(t);break;case&quot;option&quot;:r.value!=null&amp;&amp;t.setAttribute(&quot;value&quot;,&quot;&quot;+qn(r.value));break;case&quot;select&quot;:t.multiple=!!r.multiple,s=r.value,s!=null?di(t,!!r.multiple,s,!1):r.defaultValue!=null&amp;&amp;di(t,!!r.multiple,r.defaultValue,!0);break;default:typeof i.onClick==&quot;function&quot;&amp;&amp;(t.onclick=Do)}switch(n){case&quot;button&quot;:case&quot;input&quot;:case&quot;select&quot;:case&quot;textarea&quot;:r=!!r.autoFocus;break e;case&quot;img&quot;:r=!0;break e;default:r=!1}}r&amp;&amp;(e.flags|=4)}e.ref!==null&amp;&amp;(e.flags|=512,e.flags|=2097152)}return Qe(e),null;case 6:if(t&amp;&amp;e.stateNode!=null)Wm(t,e,t.memoizedProps,r);else{if(typeof r!=&quot;string&quot;&amp;&amp;e.stateNode===null)throw Error(A(166));if(n=_r(Ks.current),_r(tn.current),zl(e)){if(r=e.stateNode,n=e.memoizedProps,r[Xt]=e,(s=r.nodeValue!==n)&amp;&amp;(t=yt,t!==null))switch(t.tag){case 3:bl(r.nodeValue,n,(t.mode&amp;1)!==0);break;case 5:t.memoizedProps.suppressHydrationWarning!==!0&amp;&amp;bl(r.nodeValue,n,(t.mode&amp;1)!==0)}s&amp;&amp;(e.flags|=4)}else r=(n.nodeType===9?n:n.ownerDocument).createTextNode(r),r[Xt]=e,e.stateNode=r}return Qe(e),null;case 13:if(ye(we),r=e.memoizedState,t===null||t.memoizedState!==null&amp;&amp;t.memoizedState.dehydrated!==null){if(ve&amp;&amp;gt!==null&amp;&amp;e.mode&amp;1&amp;&amp;!(e.flags&amp;128))am(),Li(),e.flags|=98560,s=!1;else if(s=zl(e),r!==null&amp;&amp;r.dehydrated!==null){if(t===null){if(!s)throw Error(A(318));if(s=e.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(A(317));s[Xt]=e}else Li(),!(e.flags&amp;128)&amp;&amp;(e.memoizedState=null),e.flags|=4;Qe(e),s=!1}else Ft!==null&amp;&amp;(Cc(Ft),Ft=null),s=!0;if(!s)return e.flags&amp;65536?e:null}return e.flags&amp;128?(e.lanes=n,e):(r=r!==null,r!==(t!==null&amp;&amp;t.memoizedState!==null)&amp;&amp;r&amp;&amp;(e.child.flags|=8192,e.mode&amp;1&amp;&amp;(t===null||we.current&amp;1?Me===0&amp;&amp;(Me=3):Yf())),e.updateQueue!==null&amp;&amp;(e.flags|=4),Qe(e),null);case 4:return Pi(),yc(t,e),t===null&amp;&amp;Bs(e.stateNode.containerInfo),Qe(e),null;case 10:return Mf(e.type._context),Qe(e),null;case 17:return at(e.type)&amp;&amp;Lo(),Qe(e),null;case 19:if(ye(we),s=e.memoizedState,s===null)return Qe(e),null;if(r=(e.flags&amp;128)!==0,l=s.rendering,l===null)if(r)cs(s,!1);else{if(Me!==0||t!==null&amp;&amp;t.flags&amp;128)for(t=e.child;t!==null;){if(l=Fo(t),l!==null){for(e.flags|=128,cs(s,!1),r=l.updateQueue,r!==null&amp;&amp;(e.updateQueue=r,e.flags|=4),e.subtreeFlags=0,r=n,n=e.child;n!==null;)s=n,t=r,s.flags&amp;=14680066,l=s.alternate,l===null?(s.childLanes=0,s.lanes=t,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,t=l.dependencies,s.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),n=n.sibling;return de(we,we.current&amp;1|2),e.child}t=t.sibling}s.tail!==null&amp;&amp;Oe()&gt;bi&amp;&amp;(e.flags|=128,r=!0,cs(s,!1),e.lanes=4194304)}else{if(!r)if(t=Fo(l),t!==null){if(e.flags|=128,r=!0,n=t.updateQueue,n!==null&amp;&amp;(e.updateQueue=n,e.flags|=4),cs(s,!0),s.tail===null&amp;&amp;s.tailMode===&quot;hidden&quot;&amp;&amp;!l.alternate&amp;&amp;!ve)return Qe(e),null}else 2*Oe()-s.renderingStartTime&gt;bi&amp;&amp;n!==1073741824&amp;&amp;(e.flags|=128,r=!0,cs(s,!1),e.lanes=4194304);s.isBackwards?(l.sibling=e.child,e.child=l):(n=s.last,n!==null?n.sibling=l:e.child=l,s.last=l)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Oe(),e.sibling=null,n=we.current,de(we,r?n&amp;1|2:n&amp;1),e):(Qe(e),null);case 22:case 23:return Gf(),r=e.memoizedState!==null,t!==null&amp;&amp;t.memoizedState!==null!==r&amp;&amp;(e.flags|=8192),r&amp;&amp;e.mode&amp;1?pt&amp;1073741824&amp;&amp;(Qe(e),e.subtreeFlags&amp;6&amp;&amp;(e.flags|=8192)):Qe(e),null;case 24:return null;case 25:return null}throw Error(A(156,e.tag))}function Yw(t,e){switch(Nf(e),e.tag){case 1:return at(e.type)&amp;&amp;Lo(),t=e.flags,t&amp;65536?(e.flags=t&amp;-65537|128,e):null;case 3:return Pi(),ye(ot),ye(Ye),jf(),t=e.flags,t&amp;65536&amp;&amp;!(t&amp;128)?(e.flags=t&amp;-65537|128,e):null;case 5:return zf(e),null;case 13:if(ye(we),t=e.memoizedState,t!==null&amp;&amp;t.dehydrated!==null){if(e.alternate===null)throw Error(A(340));Li()}return t=e.flags,t&amp;65536?(e.flags=t&amp;-65537|128,e):null;case 19:return ye(we),null;case 4:return Pi(),null;case 10:return Mf(e.type._context),null;case 22:case 23:return Gf(),null;case 24:return null;default:return null}}var $l=!1,Je=!1,Xw=typeof WeakSet==&quot;function&quot;?WeakSet:Set,P=null;function ai(t,e){var n=t.ref;if(n!==null)if(typeof n==&quot;function&quot;)try{n(null)}catch(r){Ee(t,e,r)}else n.current=null}function vc(t,e,n){try{n()}catch(r){Ee(t,e,r)}}var Rh=!1;function qw(t,e){if(tc=Ro,t=Jg(),Af(t)){if(&quot;selectionStart&quot;in t)var n={start:t.selectionStart,end:t.selectionEnd};else e:{n=(n=t.ownerDocument)&amp;&amp;n.defaultView||window;var r=n.getSelection&amp;&amp;n.getSelection();if(r&amp;&amp;r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var l=0,o=-1,a=-1,u=0,c=0,f=t,d=null;t:for(;;){for(var h;f!==n||i!==0&amp;&amp;f.nodeType!==3||(o=l+i),f!==s||r!==0&amp;&amp;f.nodeType!==3||(a=l+r),f.nodeType===3&amp;&amp;(l+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break t;if(d===n&amp;&amp;++u===i&amp;&amp;(o=l),d===s&amp;&amp;++c===r&amp;&amp;(a=l),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=o===-1||a===-1?null:{start:o,end:a}}else n=null}n=n||{start:0,end:0}}else n=null;for(nc={focusedElem:t,selectionRange:n},Ro=!1,P=e;P!==null;)if(e=P,t=e.child,(e.subtreeFlags&amp;1028)!==0&amp;&amp;t!==null)t.return=e,P=t;else for(;P!==null;){e=P;try{var y=e.alternate;if(e.flags&amp;1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var k=y.memoizedProps,F=y.memoizedState,v=e.stateNode,g=v.getSnapshotBeforeUpdate(e.elementType===e.type?k:bt(e.type,k),F);v.__reactInternalSnapshotBeforeUpdate=g}break;case 3:var m=e.stateNode.containerInfo;m.nodeType===1?m.textContent=&quot;&quot;:m.nodeType===9&amp;&amp;m.documentElement&amp;&amp;m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(A(163))}}catch(O){Ee(e,e.return,O)}if(t=e.sibling,t!==null){t.return=e.return,P=t;break}P=e.return}return y=Rh,Rh=!1,y}function Rs(t,e,n){var r=e.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&amp;t)===t){var s=i.destroy;i.destroy=void 0,s!==void 0&amp;&amp;vc(e,n,s)}i=i.next}while(i!==r)}}function Ea(t,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var n=e=e.next;do{if((n.tag&amp;t)===t){var r=n.create;n.destroy=r()}n=n.next}while(n!==e)}}function wc(t){var e=t.ref;if(e!==null){var n=t.stateNode;switch(t.tag){case 5:t=n;break;default:t=n}typeof e==&quot;function&quot;?e(t):e.current=t}}function Hm(t){var e=t.alternate;e!==null&amp;&amp;(t.alternate=null,Hm(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&amp;&amp;(e=t.stateNode,e!==null&amp;&amp;(delete e[Xt],delete e[Hs],delete e[sc],delete e[Pw],delete e[Uw])),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}function Zm(t){return t.tag===5||t.tag===3||t.tag===4}function Nh(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Zm(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&amp;&amp;t.tag!==6&amp;&amp;t.tag!==18;){if(t.flags&amp;2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&amp;2))return t.stateNode}}function _c(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.nodeType===8?n.parentNode.insertBefore(t,e):n.insertBefore(t,e):(n.nodeType===8?(e=n.parentNode,e.insertBefore(t,n)):(e=n,e.appendChild(t)),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=Do));else if(r!==4&amp;&amp;(t=t.child,t!==null))for(_c(t,e,n),t=t.sibling;t!==null;)_c(t,e,n),t=t.sibling}function kc(t,e,n){var r=t.tag;if(r===5||r===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(r!==4&amp;&amp;(t=t.child,t!==null))for(kc(t,e,n),t=t.sibling;t!==null;)kc(t,e,n),t=t.sibling}var Be=null,jt=!1;function Tn(t,e,n){for(n=n.child;n!==null;)Km(t,e,n),n=n.sibling}function Km(t,e,n){if(en&amp;&amp;typeof en.onCommitFiberUnmount==&quot;function&quot;)try{en.onCommitFiberUnmount(ma,n)}catch{}switch(n.tag){case 5:Je||ai(n,e);case 6:var r=Be,i=jt;Be=null,Tn(t,e,n),Be=r,jt=i,Be!==null&amp;&amp;(jt?(t=Be,n=n.stateNode,t.nodeType===8?t.parentNode.removeChild(n):t.removeChild(n)):Be.removeChild(n.stateNode));break;case 18:Be!==null&amp;&amp;(jt?(t=Be,n=n.stateNode,t.nodeType===8?su(t.parentNode,n):t.nodeType===1&amp;&amp;su(t,n),Fs(t)):su(Be,n.stateNode));break;case 4:r=Be,i=jt,Be=n.stateNode.containerInfo,jt=!0,Tn(t,e,n),Be=r,jt=i;break;case 0:case 11:case 14:case 15:if(!Je&amp;&amp;(r=n.updateQueue,r!==null&amp;&amp;(r=r.lastEffect,r!==null))){i=r=r.next;do{var s=i,l=s.destroy;s=s.tag,l!==void 0&amp;&amp;(s&amp;2||s&amp;4)&amp;&amp;vc(n,e,l),i=i.next}while(i!==r)}Tn(t,e,n);break;case 1:if(!Je&amp;&amp;(ai(n,e),r=n.stateNode,typeof r.componentWillUnmount==&quot;function&quot;))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(o){Ee(n,e,o)}Tn(t,e,n);break;case 21:Tn(t,e,n);break;case 22:n.mode&amp;1?(Je=(r=Je)||n.memoizedState!==null,Tn(t,e,n),Je=r):Tn(t,e,n);break;default:Tn(t,e,n)}}function Ih(t){var e=t.updateQueue;if(e!==null){t.updateQueue=null;var n=t.stateNode;n===null&amp;&amp;(n=t.stateNode=new Xw),e.forEach(function(r){var i=a_.bind(null,t,r);n.has(r)||(n.add(r),r.then(i,i))})}}function Ut(t,e){var n=e.deletions;if(n!==null)for(var r=0;r&lt;n.length;r++){var i=n[r];try{var s=t,l=e,o=l;e:for(;o!==null;){switch(o.tag){case 5:Be=o.stateNode,jt=!1;break e;case 3:Be=o.stateNode.containerInfo,jt=!0;break e;case 4:Be=o.stateNode.containerInfo,jt=!0;break e}o=o.return}if(Be===null)throw Error(A(160));Km(s,l,i),Be=null,jt=!1;var a=i.alternate;a!==null&amp;&amp;(a.return=null),i.return=null}catch(u){Ee(i,e,u)}}if(e.subtreeFlags&amp;12854)for(e=e.child;e!==null;)Qm(e,t),e=e.sibling}function Qm(t,e){var n=t.alternate,r=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(Ut(e,t),Zt(t),r&amp;4){try{Rs(3,t,t.return),Ea(3,t)}catch(k){Ee(t,t.return,k)}try{Rs(5,t,t.return)}catch(k){Ee(t,t.return,k)}}break;case 1:Ut(e,t),Zt(t),r&amp;512&amp;&amp;n!==null&amp;&amp;ai(n,n.return);break;case 5:if(Ut(e,t),Zt(t),r&amp;512&amp;&amp;n!==null&amp;&amp;ai(n,n.return),t.flags&amp;32){var i=t.stateNode;try{Us(i,&quot;&quot;)}catch(k){Ee(t,t.return,k)}}if(r&amp;4&amp;&amp;(i=t.stateNode,i!=null)){var s=t.memoizedProps,l=n!==null?n.memoizedProps:s,o=t.type,a=t.updateQueue;if(t.updateQueue=null,a!==null)try{o===&quot;input&quot;&amp;&amp;s.type===&quot;radio&quot;&amp;&amp;s.name!=null&amp;&amp;mg(i,s),Hu(o,l);var u=Hu(o,s);for(l=0;l&lt;a.length;l+=2){var c=a[l],f=a[l+1];c===&quot;style&quot;?kg(i,f):c===&quot;dangerouslySetInnerHTML&quot;?wg(i,f):c===&quot;children&quot;?Us(i,f):gf(i,c,f,u)}switch(o){case&quot;input&quot;:Fu(i,s);break;case&quot;textarea&quot;:yg(i,s);break;case&quot;select&quot;:var d=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var h=s.value;h!=null?di(i,!!s.multiple,h,!1):d!==!!s.multiple&amp;&amp;(s.defaultValue!=null?di(i,!!s.multiple,s.defaultValue,!0):di(i,!!s.multiple,s.multiple?[]:&quot;&quot;,!1))}i[Hs]=s}catch(k){Ee(t,t.return,k)}}break;case 6:if(Ut(e,t),Zt(t),r&amp;4){if(t.stateNode===null)throw Error(A(162));i=t.stateNode,s=t.memoizedProps;try{i.nodeValue=s}catch(k){Ee(t,t.return,k)}}break;case 3:if(Ut(e,t),Zt(t),r&amp;4&amp;&amp;n!==null&amp;&amp;n.memoizedState.isDehydrated)try{Fs(e.containerInfo)}catch(k){Ee(t,t.return,k)}break;case 4:Ut(e,t),Zt(t);break;case 13:Ut(e,t),Zt(t),i=t.child,i.flags&amp;8192&amp;&amp;(s=i.memoizedState!==null,i.stateNode.isHidden=s,!s||i.alternate!==null&amp;&amp;i.alternate.memoizedState!==null||(Qf=Oe())),r&amp;4&amp;&amp;Ih(t);break;case 22:if(c=n!==null&amp;&amp;n.memoizedState!==null,t.mode&amp;1?(Je=(u=Je)||c,Ut(e,t),Je=u):Ut(e,t),Zt(t),r&amp;8192){if(u=t.memoizedState!==null,(t.stateNode.isHidden=u)&amp;&amp;!c&amp;&amp;t.mode&amp;1)for(P=t,c=t.child;c!==null;){for(f=P=c;P!==null;){switch(d=P,h=d.child,d.tag){case 0:case 11:case 14:case 15:Rs(4,d,d.return);break;case 1:ai(d,d.return);var y=d.stateNode;if(typeof y.componentWillUnmount==&quot;function&quot;){r=d,n=d.return;try{e=r,y.props=e.memoizedProps,y.state=e.memoizedState,y.componentWillUnmount()}catch(k){Ee(r,n,k)}}break;case 5:ai(d,d.return);break;case 22:if(d.memoizedState!==null){Lh(f);continue}}h!==null?(h.return=d,P=h):Lh(f)}c=c.sibling}e:for(c=null,f=t;;){if(f.tag===5){if(c===null){c=f;try{i=f.stateNode,u?(s=i.style,typeof s.setProperty==&quot;function&quot;?s.setProperty(&quot;display&quot;,&quot;none&quot;,&quot;important&quot;):s.display=&quot;none&quot;):(o=f.stateNode,a=f.memoizedProps.style,l=a!=null&amp;&amp;a.hasOwnProperty(&quot;display&quot;)?a.display:null,o.style.display=_g(&quot;display&quot;,l))}catch(k){Ee(t,t.return,k)}}}else if(f.tag===6){if(c===null)try{f.stateNode.nodeValue=u?&quot;&quot;:f.memoizedProps}catch(k){Ee(t,t.return,k)}}else if((f.tag!==22&amp;&amp;f.tag!==23||f.memoizedState===null||f===t)&amp;&amp;f.child!==null){f.child.return=f,f=f.child;continue}if(f===t)break e;for(;f.sibling===null;){if(f.return===null||f.return===t)break e;c===f&amp;&amp;(c=null),f=f.return}c===f&amp;&amp;(c=null),f.sibling.return=f.return,f=f.sibling}}break;case 19:Ut(e,t),Zt(t),r&amp;4&amp;&amp;Ih(t);break;case 21:break;default:Ut(e,t),Zt(t)}}function Zt(t){var e=t.flags;if(e&amp;2){try{e:{for(var n=t.return;n!==null;){if(Zm(n)){var r=n;break e}n=n.return}throw Error(A(160))}switch(r.tag){case 5:var i=r.stateNode;r.flags&amp;32&amp;&amp;(Us(i,&quot;&quot;),r.flags&amp;=-33);var s=Nh(t);kc(t,s,i);break;case 3:case 4:var l=r.stateNode.containerInfo,o=Nh(t);_c(t,o,l);break;default:throw Error(A(161))}}catch(a){Ee(t,t.return,a)}t.flags&amp;=-3}e&amp;4096&amp;&amp;(t.flags&amp;=-4097)}function e_(t,e,n){P=t,Jm(t)}function Jm(t,e,n){for(var r=(t.mode&amp;1)!==0;P!==null;){var i=P,s=i.child;if(i.tag===22&amp;&amp;r){var l=i.memoizedState!==null||$l;if(!l){var o=i.alternate,a=o!==null&amp;&amp;o.memoizedState!==null||Je;o=$l;var u=Je;if($l=l,(Je=a)&amp;&amp;!u)for(P=i;P!==null;)l=P,a=l.child,l.tag===22&amp;&amp;l.memoizedState!==null?Mh(i):a!==null?(a.return=l,P=a):Mh(i);for(;s!==null;)P=s,Jm(s),s=s.sibling;P=i,$l=o,Je=u}Dh(t)}else i.subtreeFlags&amp;8772&amp;&amp;s!==null?(s.return=i,P=s):Dh(t)}}function Dh(t){for(;P!==null;){var e=P;if(e.flags&amp;8772){var n=e.alternate;try{if(e.flags&amp;8772)switch(e.tag){case 0:case 11:case 15:Je||Ea(5,e);break;case 1:var r=e.stateNode;if(e.flags&amp;4&amp;&amp;!Je)if(n===null)r.componentDidMount();else{var i=e.elementType===e.type?n.memoizedProps:bt(e.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=e.updateQueue;s!==null&amp;&amp;mh(e,s,r);break;case 3:var l=e.updateQueue;if(l!==null){if(n=null,e.child!==null)switch(e.child.tag){case 5:n=e.child.stateNode;break;case 1:n=e.child.stateNode}mh(e,l,n)}break;case 5:var o=e.stateNode;if(n===null&amp;&amp;e.flags&amp;4){n=o;var a=e.memoizedProps;switch(e.type){case&quot;button&quot;:case&quot;input&quot;:case&quot;select&quot;:case&quot;textarea&quot;:a.autoFocus&amp;&amp;n.focus();break;case&quot;img&quot;:a.src&amp;&amp;(n.src=a.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(e.memoizedState===null){var u=e.alternate;if(u!==null){var c=u.memoizedState;if(c!==null){var f=c.dehydrated;f!==null&amp;&amp;Fs(f)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(A(163))}Je||e.flags&amp;512&amp;&amp;wc(e)}catch(d){Ee(e,e.return,d)}}if(e===t){P=null;break}if(n=e.sibling,n!==null){n.return=e.return,P=n;break}P=e.return}}function Lh(t){for(;P!==null;){var e=P;if(e===t){P=null;break}var n=e.sibling;if(n!==null){n.return=e.return,P=n;break}P=e.return}}function Mh(t){for(;P!==null;){var e=P;try{switch(e.tag){case 0:case 11:case 15:var n=e.return;try{Ea(4,e)}catch(a){Ee(e,n,a)}break;case 1:var r=e.stateNode;if(typeof r.componentDidMount==&quot;function&quot;){var i=e.return;try{r.componentDidMount()}catch(a){Ee(e,i,a)}}var s=e.return;try{wc(e)}catch(a){Ee(e,s,a)}break;case 5:var l=e.return;try{wc(e)}catch(a){Ee(e,l,a)}}}catch(a){Ee(e,e.return,a)}if(e===t){P=null;break}var o=e.sibling;if(o!==null){o.return=e.return,P=o;break}P=e.return}}var t_=Math.ceil,Bo=xn.ReactCurrentDispatcher,Zf=xn.ReactCurrentOwner,It=xn.ReactCurrentBatchConfig,se=0,Ve=null,Ne=null,We=0,pt=0,ui=or(0),Me=0,Ys=null,Pr=0,Ca=0,Kf=0,Ns=null,it=null,Qf=0,bi=1/0,cn=null,Wo=!1,Sc=null,Qn=null,Vl=!1,Fn=null,Ho=0,Is=0,xc=null,uo=-1,co=0;function et(){return se&amp;6?Oe():uo!==-1?uo:uo=Oe()}function Jn(t){return t.mode&amp;1?se&amp;2&amp;&amp;We!==0?We&amp;-We:zw.transition!==null?(co===0&amp;&amp;(co=Lg()),co):(t=ce,t!==0||(t=window.event,t=t===void 0?16:Fg(t.type)),t):1}function Vt(t,e,n,r){if(50&lt;Is)throw Is=0,xc=null,Error(A(185));ml(t,n,r),(!(se&amp;2)||t!==Ve)&amp;&amp;(t===Ve&amp;&amp;(!(se&amp;2)&amp;&amp;(Ca|=n),Me===4&amp;&amp;Ln(t,We)),ut(t,r),n===1&amp;&amp;se===0&amp;&amp;!(e.mode&amp;1)&amp;&amp;(bi=Oe()+500,ka&amp;&amp;ar()))}function ut(t,e){var n=t.callbackNode;zv(t,e);var r=Ao(t,t===Ve?We:0);if(r===0)n!==null&amp;&amp;Bd(n),t.callbackNode=null,t.callbackPriority=0;else if(e=r&amp;-r,t.callbackPriority!==e){if(n!=null&amp;&amp;Bd(n),e===1)t.tag===0?bw(Ph.bind(null,t)):sm(Ph.bind(null,t)),Lw(function(){!(se&amp;6)&amp;&amp;ar()}),n=null;else{switch(Mg(r)){case 1:n=_f;break;case 4:n=Ig;break;case 16:n=To;break;case 536870912:n=Dg;break;default:n=To}n=ry(n,Gm.bind(null,t))}t.callbackPriority=e,t.callbackNode=n}}function Gm(t,e){if(uo=-1,co=0,se&amp;6)throw Error(A(327));var n=t.callbackNode;if(yi()&amp;&amp;t.callbackNode!==n)return null;var r=Ao(t,t===Ve?We:0);if(r===0)return null;if(r&amp;30||r&amp;t.expiredLanes||e)e=Zo(t,r);else{e=r;var i=se;se|=2;var s=Xm();(Ve!==t||We!==e)&amp;&amp;(cn=null,bi=Oe()+500,Or(t,e));do try{i_();break}catch(o){Ym(t,o)}while(!0);Lf(),Bo.current=s,se=i,Ne!==null?e=0:(Ve=null,We=0,e=Me)}if(e!==0){if(e===2&amp;&amp;(i=Gu(t),i!==0&amp;&amp;(r=i,e=Ec(t,i))),e===1)throw n=Ys,Or(t,0),Ln(t,r),ut(t,Oe()),n;if(e===6)Ln(t,r);else{if(i=t.current.alternate,!(r&amp;30)&amp;&amp;!n_(i)&amp;&amp;(e=Zo(t,r),e===2&amp;&amp;(s=Gu(t),s!==0&amp;&amp;(r=s,e=Ec(t,s))),e===1))throw n=Ys,Or(t,0),Ln(t,r),ut(t,Oe()),n;switch(t.finishedWork=i,t.finishedLanes=r,e){case 0:case 1:throw Error(A(345));case 2:gr(t,it,cn);break;case 3:if(Ln(t,r),(r&amp;130023424)===r&amp;&amp;(e=Qf+500-Oe(),10&lt;e)){if(Ao(t,0)!==0)break;if(i=t.suspendedLanes,(i&amp;r)!==r){et(),t.pingedLanes|=t.suspendedLanes&amp;i;break}t.timeoutHandle=ic(gr.bind(null,t,it,cn),e);break}gr(t,it,cn);break;case 4:if(Ln(t,r),(r&amp;4194240)===r)break;for(e=t.eventTimes,i=-1;0&lt;r;){var l=31-$t(r);s=1&lt;&lt;l,l=e[l],l&gt;i&amp;&amp;(i=l),r&amp;=~s}if(r=i,r=Oe()-r,r=(120&gt;r?120:480&gt;r?480:1080&gt;r?1080:1920&gt;r?1920:3e3&gt;r?3e3:4320&gt;r?4320:1960*t_(r/1960))-r,10&lt;r){t.timeoutHandle=ic(gr.bind(null,t,it,cn),r);break}gr(t,it,cn);break;case 5:gr(t,it,cn);break;default:throw Error(A(329))}}}return ut(t,Oe()),t.callbackNode===n?Gm.bind(null,t):null}function Ec(t,e){var n=Ns;return t.current.memoizedState.isDehydrated&amp;&amp;(Or(t,e).flags|=256),t=Zo(t,e),t!==2&amp;&amp;(e=it,it=n,e!==null&amp;&amp;Cc(e)),t}function Cc(t){it===null?it=t:it.push.apply(it,t)}function n_(t){for(var e=t;;){if(e.flags&amp;16384){var n=e.updateQueue;if(n!==null&amp;&amp;(n=n.stores,n!==null))for(var r=0;r&lt;n.length;r++){var i=n[r],s=i.getSnapshot;i=i.value;try{if(!Wt(s(),i))return!1}catch{return!1}}}if(n=e.child,e.subtreeFlags&amp;16384&amp;&amp;n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Ln(t,e){for(e&amp;=~Kf,e&amp;=~Ca,t.suspendedLanes|=e,t.pingedLanes&amp;=~e,t=t.expirationTimes;0&lt;e;){var n=31-$t(e),r=1&lt;&lt;n;t[n]=-1,e&amp;=~r}}function Ph(t){if(se&amp;6)throw Error(A(327));yi();var e=Ao(t,0);if(!(e&amp;1))return ut(t,Oe()),null;var n=Zo(t,e);if(t.tag!==0&amp;&amp;n===2){var r=Gu(t);r!==0&amp;&amp;(e=r,n=Ec(t,r))}if(n===1)throw n=Ys,Or(t,0),Ln(t,e),ut(t,Oe()),n;if(n===6)throw Error(A(345));return t.finishedWork=t.current.alternate,t.finishedLanes=e,gr(t,it,cn),ut(t,Oe()),null}function Jf(t,e){var n=se;se|=1;try{return t(e)}finally{se=n,se===0&amp;&amp;(bi=Oe()+500,ka&amp;&amp;ar())}}function Ur(t){Fn!==null&amp;&amp;Fn.tag===0&amp;&amp;!(se&amp;6)&amp;&amp;yi();var e=se;se|=1;var n=It.transition,r=ce;try{if(It.transition=null,ce=1,t)return t()}finally{ce=r,It.transition=n,se=e,!(se&amp;6)&amp;&amp;ar()}}function Gf(){pt=ui.current,ye(ui)}function Or(t,e){t.finishedWork=null,t.finishedLanes=0;var n=t.timeoutHandle;if(n!==-1&amp;&amp;(t.timeoutHandle=-1,Dw(n)),Ne!==null)for(n=Ne.return;n!==null;){var r=n;switch(Nf(r),r.tag){case 1:r=r.type.childContextTypes,r!=null&amp;&amp;Lo();break;case 3:Pi(),ye(ot),ye(Ye),jf();break;case 5:zf(r);break;case 4:Pi();break;case 13:ye(we);break;case 19:ye(we);break;case 10:Mf(r.type._context);break;case 22:case 23:Gf()}n=n.return}if(Ve=t,Ne=t=Gn(t.current,null),We=pt=e,Me=0,Ys=null,Kf=Ca=Pr=0,it=Ns=null,wr!==null){for(e=0;e&lt;wr.length;e++)if(n=wr[e],r=n.interleaved,r!==null){n.interleaved=null;var i=r.next,s=n.pending;if(s!==null){var l=s.next;s.next=i,r.next=l}n.pending=r}wr=null}return t}function Ym(t,e){do{var n=Ne;try{if(Lf(),lo.current=Vo,$o){for(var r=_e.memoizedState;r!==null;){var i=r.queue;i!==null&amp;&amp;(i.pending=null),r=r.next}$o=!1}if(Mr=0,Fe=Le=_e=null,As=!1,Qs=0,Zf.current=null,n===null||n.return===null){Me=1,Ys=e,Ne=null;break}e:{var s=t,l=n.return,o=n,a=e;if(e=We,o.flags|=32768,a!==null&amp;&amp;typeof a==&quot;object&quot;&amp;&amp;typeof a.then==&quot;function&quot;){var u=a,c=o,f=c.tag;if(!(c.mode&amp;1)&amp;&amp;(f===0||f===11||f===15)){var d=c.alternate;d?(c.updateQueue=d.updateQueue,c.memoizedState=d.memoizedState,c.lanes=d.lanes):(c.updateQueue=null,c.memoizedState=null)}var h=Sh(l);if(h!==null){h.flags&amp;=-257,xh(h,l,o,s,e),h.mode&amp;1&amp;&amp;kh(s,u,e),e=h,a=u;var y=e.updateQueue;if(y===null){var k=new Set;k.add(a),e.updateQueue=k}else y.add(a);break e}else{if(!(e&amp;1)){kh(s,u,e),Yf();break e}a=Error(A(426))}}else if(ve&amp;&amp;o.mode&amp;1){var F=Sh(l);if(F!==null){!(F.flags&amp;65536)&amp;&amp;(F.flags|=256),xh(F,l,o,s,e),If(Ui(a,o));break e}}s=a=Ui(a,o),Me!==4&amp;&amp;(Me=2),Ns===null?Ns=[s]:Ns.push(s),s=l;do{switch(s.tag){case 3:s.flags|=65536,e&amp;=-e,s.lanes|=e;var v=Mm(s,a,e);gh(s,v);break e;case 1:o=a;var g=s.type,m=s.stateNode;if(!(s.flags&amp;128)&amp;&amp;(typeof g.getDerivedStateFromError==&quot;function&quot;||m!==null&amp;&amp;typeof m.componentDidCatch==&quot;function&quot;&amp;&amp;(Qn===null||!Qn.has(m)))){s.flags|=65536,e&amp;=-e,s.lanes|=e;var O=Pm(s,o,e);gh(s,O);break e}}s=s.return}while(s!==null)}ey(n)}catch(L){e=L,Ne===n&amp;&amp;n!==null&amp;&amp;(Ne=n=n.return);continue}break}while(!0)}function Xm(){var t=Bo.current;return Bo.current=Vo,t===null?Vo:t}function Yf(){(Me===0||Me===3||Me===2)&amp;&amp;(Me=4),Ve===null||!(Pr&amp;268435455)&amp;&amp;!(Ca&amp;268435455)||Ln(Ve,We)}function Zo(t,e){var n=se;se|=2;var r=Xm();(Ve!==t||We!==e)&amp;&amp;(cn=null,Or(t,e));do try{r_();break}catch(i){Ym(t,i)}while(!0);if(Lf(),se=n,Bo.current=r,Ne!==null)throw Error(A(261));return Ve=null,We=0,Me}function r_(){for(;Ne!==null;)qm(Ne)}function i_(){for(;Ne!==null&amp;&amp;!Rv();)qm(Ne)}function qm(t){var e=ny(t.alternate,t,pt);t.memoizedProps=t.pendingProps,e===null?ey(t):Ne=e,Zf.current=null}function ey(t){var e=t;do{var n=e.alternate;if(t=e.return,e.flags&amp;32768){if(n=Yw(n,e),n!==null){n.flags&amp;=32767,Ne=n;return}if(t!==null)t.flags|=32768,t.subtreeFlags=0,t.deletions=null;else{Me=6,Ne=null;return}}else if(n=Gw(n,e,pt),n!==null){Ne=n;return}if(e=e.sibling,e!==null){Ne=e;return}Ne=e=t}while(e!==null);Me===0&amp;&amp;(Me=5)}function gr(t,e,n){var r=ce,i=It.transition;try{It.transition=null,ce=1,s_(t,e,n,r)}finally{It.transition=i,ce=r}return null}function s_(t,e,n,r){do yi();while(Fn!==null);if(se&amp;6)throw Error(A(327));n=t.finishedWork;var i=t.finishedLanes;if(n===null)return null;if(t.finishedWork=null,t.finishedLanes=0,n===t.current)throw Error(A(177));t.callbackNode=null,t.callbackPriority=0;var s=n.lanes|n.childLanes;if(jv(t,s),t===Ve&amp;&amp;(Ne=Ve=null,We=0),!(n.subtreeFlags&amp;2064)&amp;&amp;!(n.flags&amp;2064)||Vl||(Vl=!0,ry(To,function(){return yi(),null})),s=(n.flags&amp;15990)!==0,n.subtreeFlags&amp;15990||s){s=It.transition,It.transition=null;var l=ce;ce=1;var o=se;se|=4,Zf.current=null,qw(t,n),Qm(n,t),Cw(nc),Ro=!!tc,nc=tc=null,t.current=n,e_(n),Nv(),se=o,ce=l,It.transition=s}else t.current=n;if(Vl&amp;&amp;(Vl=!1,Fn=t,Ho=i),s=t.pendingLanes,s===0&amp;&amp;(Qn=null),Lv(n.stateNode),ut(t,Oe()),e!==null)for(r=t.onRecoverableError,n=0;n&lt;e.length;n++)i=e[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Wo)throw Wo=!1,t=Sc,Sc=null,t;return Ho&amp;1&amp;&amp;t.tag!==0&amp;&amp;yi(),s=t.pendingLanes,s&amp;1?t===xc?Is++:(Is=0,xc=t):Is=0,ar(),null}function yi(){if(Fn!==null){var t=Mg(Ho),e=It.transition,n=ce;try{if(It.transition=null,ce=16&gt;t?16:t,Fn===null)var r=!1;else{if(t=Fn,Fn=null,Ho=0,se&amp;6)throw Error(A(331));var i=se;for(se|=4,P=t.current;P!==null;){var s=P,l=s.child;if(P.flags&amp;16){var o=s.deletions;if(o!==null){for(var a=0;a&lt;o.length;a++){var u=o[a];for(P=u;P!==null;){var c=P;switch(c.tag){case 0:case 11:case 15:Rs(8,c,s)}var f=c.child;if(f!==null)f.return=c,P=f;else for(;P!==null;){c=P;var d=c.sibling,h=c.return;if(Hm(c),c===u){P=null;break}if(d!==null){d.return=h,P=d;break}P=h}}}var y=s.alternate;if(y!==null){var k=y.child;if(k!==null){y.child=null;do{var F=k.sibling;k.sibling=null,k=F}while(k!==null)}}P=s}}if(s.subtreeFlags&amp;2064&amp;&amp;l!==null)l.return=s,P=l;else e:for(;P!==null;){if(s=P,s.flags&amp;2048)switch(s.tag){case 0:case 11:case 15:Rs(9,s,s.return)}var v=s.sibling;if(v!==null){v.return=s.return,P=v;break e}P=s.return}}var g=t.current;for(P=g;P!==null;){l=P;var m=l.child;if(l.subtreeFlags&amp;2064&amp;&amp;m!==null)m.return=l,P=m;else e:for(l=g;P!==null;){if(o=P,o.flags&amp;2048)try{switch(o.tag){case 0:case 11:case 15:Ea(9,o)}}catch(L){Ee(o,o.return,L)}if(o===l){P=null;break e}var O=o.sibling;if(O!==null){O.return=o.return,P=O;break e}P=o.return}}if(se=i,ar(),en&amp;&amp;typeof en.onPostCommitFiberRoot==&quot;function&quot;)try{en.onPostCommitFiberRoot(ma,t)}catch{}r=!0}return r}finally{ce=n,It.transition=e}}return!1}function Uh(t,e,n){e=Ui(n,e),e=Mm(t,e,1),t=Kn(t,e,1),e=et(),t!==null&amp;&amp;(ml(t,1,e),ut(t,e))}function Ee(t,e,n){if(t.tag===3)Uh(t,t,n);else for(;e!==null;){if(e.tag===3){Uh(e,t,n);break}else if(e.tag===1){var r=e.stateNode;if(typeof e.type.getDerivedStateFromError==&quot;function&quot;||typeof r.componentDidCatch==&quot;function&quot;&amp;&amp;(Qn===null||!Qn.has(r))){t=Ui(n,t),t=Pm(e,t,1),e=Kn(e,t,1),t=et(),e!==null&amp;&amp;(ml(e,1,t),ut(e,t));break}}e=e.return}}function l_(t,e,n){var r=t.pingCache;r!==null&amp;&amp;r.delete(e),e=et(),t.pingedLanes|=t.suspendedLanes&amp;n,Ve===t&amp;&amp;(We&amp;n)===n&amp;&amp;(Me===4||Me===3&amp;&amp;(We&amp;130023424)===We&amp;&amp;500&gt;Oe()-Qf?Or(t,0):Kf|=n),ut(t,e)}function ty(t,e){e===0&amp;&amp;(t.mode&amp;1?(e=Dl,Dl&lt;&lt;=1,!(Dl&amp;130023424)&amp;&amp;(Dl=4194304)):e=1);var n=et();t=_n(t,e),t!==null&amp;&amp;(ml(t,e,n),ut(t,n))}function o_(t){var e=t.memoizedState,n=0;e!==null&amp;&amp;(n=e.retryLane),ty(t,n)}function a_(t,e){var n=0;switch(t.tag){case 13:var r=t.stateNode,i=t.memoizedState;i!==null&amp;&amp;(n=i.retryLane);break;case 19:r=t.stateNode;break;default:throw Error(A(314))}r!==null&amp;&amp;r.delete(e),ty(t,n)}var ny;ny=function(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps||ot.current)lt=!0;else{if(!(t.lanes&amp;n)&amp;&amp;!(e.flags&amp;128))return lt=!1,Jw(t,e,n);lt=!!(t.flags&amp;131072)}else lt=!1,ve&amp;&amp;e.flags&amp;1048576&amp;&amp;lm(e,Uo,e.index);switch(e.lanes=0,e.tag){case 2:var r=e.type;ao(t,e),t=e.pendingProps;var i=Di(e,Ye.current);mi(e,n),i=$f(null,e,r,t,i,n);var s=Vf();return e.flags|=1,typeof i==&quot;object&quot;&amp;&amp;i!==null&amp;&amp;typeof i.render==&quot;function&quot;&amp;&amp;i.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,at(r)?(s=!0,Mo(e)):s=!1,e.memoizedState=i.state!==null&amp;&amp;i.state!==void 0?i.state:null,Uf(e),i.updater=xa,e.stateNode=i,i._reactInternals=e,fc(e,r,t,n),e=pc(null,e,r,!0,s,n)):(e.tag=0,ve&amp;&amp;s&amp;&amp;Rf(e),Xe(null,e,i,n),e=e.child),e;case 16:r=e.elementType;e:{switch(ao(t,e),t=e.pendingProps,i=r._init,r=i(r._payload),e.type=r,i=e.tag=c_(r),t=bt(r,t),i){case 0:e=hc(null,e,r,t,n);break e;case 1:e=Oh(null,e,r,t,n);break e;case 11:e=Eh(null,e,r,t,n);break e;case 14:e=Ch(null,e,r,bt(r.type,t),n);break e}throw Error(A(306,r,&quot;&quot;))}return e;case 0:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bt(r,i),hc(t,e,r,i,n);case 1:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bt(r,i),Oh(t,e,r,i,n);case 3:e:{if(jm(e),t===null)throw Error(A(387));r=e.pendingProps,s=e.memoizedState,i=s.element,dm(t,e),jo(e,r,null,n);var l=e.memoizedState;if(r=l.element,s.isDehydrated)if(s={element:r,isDehydrated:!1,cache:l.cache,pendingSuspenseBoundaries:l.pendingSuspenseBoundaries,transitions:l.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&amp;256){i=Ui(Error(A(423)),e),e=Th(t,e,r,n,i);break e}else if(r!==i){i=Ui(Error(A(424)),e),e=Th(t,e,r,n,i);break e}else for(gt=Zn(e.stateNode.containerInfo.firstChild),yt=e,ve=!0,Ft=null,n=cm(e,null,r,n),e.child=n;n;)n.flags=n.flags&amp;-3|4096,n=n.sibling;else{if(Li(),r===i){e=kn(t,e,n);break e}Xe(t,e,r,n)}e=e.child}return e;case 5:return hm(e),t===null&amp;&amp;ac(e),r=e.type,i=e.pendingProps,s=t!==null?t.memoizedProps:null,l=i.children,rc(r,i)?l=null:s!==null&amp;&amp;rc(r,s)&amp;&amp;(e.flags|=32),zm(t,e),Xe(t,e,l,n),e.child;case 6:return t===null&amp;&amp;ac(e),null;case 13:return Fm(t,e,n);case 4:return bf(e,e.stateNode.containerInfo),r=e.pendingProps,t===null?e.child=Mi(e,null,r,n):Xe(t,e,r,n),e.child;case 11:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bt(r,i),Eh(t,e,r,i,n);case 7:return Xe(t,e,e.pendingProps,n),e.child;case 8:return Xe(t,e,e.pendingProps.children,n),e.child;case 12:return Xe(t,e,e.pendingProps.children,n),e.child;case 10:e:{if(r=e.type._context,i=e.pendingProps,s=e.memoizedProps,l=i.value,de(bo,r._currentValue),r._currentValue=l,s!==null)if(Wt(s.value,l)){if(s.children===i.children&amp;&amp;!ot.current){e=kn(t,e,n);break e}}else for(s=e.child,s!==null&amp;&amp;(s.return=e);s!==null;){var o=s.dependencies;if(o!==null){l=s.child;for(var a=o.firstContext;a!==null;){if(a.context===r){if(s.tag===1){a=mn(-1,n&amp;-n),a.tag=2;var u=s.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?a.next=a:(a.next=c.next,c.next=a),u.pending=a}}s.lanes|=n,a=s.alternate,a!==null&amp;&amp;(a.lanes|=n),uc(s.return,n,e),o.lanes|=n;break}a=a.next}}else if(s.tag===10)l=s.type===e.type?null:s.child;else if(s.tag===18){if(l=s.return,l===null)throw Error(A(341));l.lanes|=n,o=l.alternate,o!==null&amp;&amp;(o.lanes|=n),uc(l,n,e),l=s.sibling}else l=s.child;if(l!==null)l.return=s;else for(l=s;l!==null;){if(l===e){l=null;break}if(s=l.sibling,s!==null){s.return=l.return,l=s;break}l=l.return}s=l}Xe(t,e,i.children,n),e=e.child}return e;case 9:return i=e.type,r=e.pendingProps.children,mi(e,n),i=Dt(i),r=r(i),e.flags|=1,Xe(t,e,r,n),e.child;case 14:return r=e.type,i=bt(r,e.pendingProps),i=bt(r.type,i),Ch(t,e,r,i,n);case 15:return Um(t,e,e.type,e.pendingProps,n);case 17:return r=e.type,i=e.pendingProps,i=e.elementType===r?i:bt(r,i),ao(t,e),e.tag=1,at(r)?(t=!0,Mo(e)):t=!1,mi(e,n),Lm(e,r,i),fc(e,r,i,n),pc(null,e,r,!0,t,n);case 19:return $m(t,e,n);case 22:return bm(t,e,n)}throw Error(A(156,e.tag))};function ry(t,e){return Ng(t,e)}function u_(t,e,n,r){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Nt(t,e,n,r){return new u_(t,e,n,r)}function Xf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function c_(t){if(typeof t==&quot;function&quot;)return Xf(t)?1:0;if(t!=null){if(t=t.$$typeof,t===yf)return 11;if(t===vf)return 14}return 2}function Gn(t,e){var n=t.alternate;return n===null?(n=Nt(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&amp;14680064,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n}function fo(t,e,n,r,i,s){var l=2;if(r=t,typeof t==&quot;function&quot;)Xf(t)&amp;&amp;(l=1);else if(typeof t==&quot;string&quot;)l=5;else e:switch(t){case qr:return Tr(n.children,i,s,e);case mf:l=8,i|=8;break;case Pu:return t=Nt(12,n,e,i|2),t.elementType=Pu,t.lanes=s,t;case Uu:return t=Nt(13,n,e,i),t.elementType=Uu,t.lanes=s,t;case bu:return t=Nt(19,n,e,i),t.elementType=bu,t.lanes=s,t;case hg:return Oa(n,i,s,e);default:if(typeof t==&quot;object&quot;&amp;&amp;t!==null)switch(t.$$typeof){case fg:l=10;break e;case dg:l=9;break e;case yf:l=11;break e;case vf:l=14;break e;case Rn:l=16,r=null;break e}throw Error(A(130,t==null?t:typeof t,&quot;&quot;))}return e=Nt(l,n,e,i),e.elementType=t,e.type=r,e.lanes=s,e}function Tr(t,e,n,r){return t=Nt(7,t,r,e),t.lanes=n,t}function Oa(t,e,n,r){return t=Nt(22,t,r,e),t.elementType=hg,t.lanes=n,t.stateNode={isHidden:!1},t}function hu(t,e,n){return t=Nt(6,t,null,e),t.lanes=n,t}function pu(t,e,n){return e=Nt(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}function f_(t,e,n,r,i){this.tag=e,this.containerInfo=t,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Qa(0),this.expirationTimes=Qa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Qa(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function qf(t,e,n,r,i,s,l,o,a){return t=new f_(t,e,n,o,a),e===1?(e=1,s===!0&amp;&amp;(e|=8)):e=0,s=Nt(3,null,null,e),t.current=s,s.stateNode=t,s.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Uf(s),t}function d_(t,e,n){var r=3&lt;arguments.length&amp;&amp;arguments[3]!==void 0?arguments[3]:null;return{$$typeof:Xr,key:r==null?null:&quot;&quot;+r,children:t,containerInfo:e,implementation:n}}function iy(t){if(!t)return er;t=t._reactInternals;e:{if(Wr(t)!==t||t.tag!==1)throw Error(A(170));var e=t;do{switch(e.tag){case 3:e=e.stateNode.context;break e;case 1:if(at(e.type)){e=e.stateNode.__reactInternalMemoizedMergedChildContext;break e}}e=e.return}while(e!==null);throw Error(A(171))}if(t.tag===1){var n=t.type;if(at(n))return im(t,n,e)}return e}function sy(t,e,n,r,i,s,l,o,a){return t=qf(n,r,!0,t,i,s,l,o,a),t.context=iy(null),n=t.current,r=et(),i=Jn(n),s=mn(r,i),s.callback=e??null,Kn(n,s,i),t.current.lanes=i,ml(t,i,r),ut(t,r),t}function Ta(t,e,n,r){var i=e.current,s=et(),l=Jn(i);return n=iy(n),e.context===null?e.context=n:e.pendingContext=n,e=mn(s,l),e.payload={element:t},r=r===void 0?null:r,r!==null&amp;&amp;(e.callback=r),t=Kn(i,e,l),t!==null&amp;&amp;(Vt(t,i,l,s),so(t,i,l)),l}function Ko(t){if(t=t.current,!t.child)return null;switch(t.child.tag){case 5:return t.child.stateNode;default:return t.child.stateNode}}function bh(t,e){if(t=t.memoizedState,t!==null&amp;&amp;t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&amp;&amp;n&lt;e?n:e}}function ed(t,e){bh(t,e),(t=t.alternate)&amp;&amp;bh(t,e)}function h_(){return null}var ly=typeof reportError==&quot;function&quot;?reportError:function(t){console.error(t)};function td(t){this._internalRoot=t}Aa.prototype.render=td.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(A(409));Ta(t,e,null,null)};Aa.prototype.unmount=td.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;Ur(function(){Ta(null,t,null,null)}),e[wn]=null}};function Aa(t){this._internalRoot=t}Aa.prototype.unstable_scheduleHydration=function(t){if(t){var e=bg();t={blockedOn:null,target:t,priority:e};for(var n=0;n&lt;Dn.length&amp;&amp;e!==0&amp;&amp;e&lt;Dn[n].priority;n++);Dn.splice(n,0,t),n===0&amp;&amp;jg(t)}};function nd(t){return!(!t||t.nodeType!==1&amp;&amp;t.nodeType!==9&amp;&amp;t.nodeType!==11)}function Ra(t){return!(!t||t.nodeType!==1&amp;&amp;t.nodeType!==9&amp;&amp;t.nodeType!==11&amp;&amp;(t.nodeType!==8||t.nodeValue!==&quot; react-mount-point-unstable &quot;))}function zh(){}function p_(t,e,n,r,i){if(i){if(typeof r==&quot;function&quot;){var s=r;r=function(){var u=Ko(l);s.call(u)}}var l=sy(e,r,t,0,null,!1,!1,&quot;&quot;,zh);return t._reactRootContainer=l,t[wn]=l.current,Bs(t.nodeType===8?t.parentNode:t),Ur(),l}for(;i=t.lastChild;)t.removeChild(i);if(typeof r==&quot;function&quot;){var o=r;r=function(){var u=Ko(a);o.call(u)}}var a=qf(t,0,!1,null,null,!1,!1,&quot;&quot;,zh);return t._reactRootContainer=a,t[wn]=a.current,Bs(t.nodeType===8?t.parentNode:t),Ur(function(){Ta(e,a,n,r)}),a}function Na(t,e,n,r,i){var s=n._reactRootContainer;if(s){var l=s;if(typeof i==&quot;function&quot;){var o=i;i=function(){var a=Ko(l);o.call(a)}}Ta(e,l,t,i)}else l=p_(n,e,t,i,r);return Ko(l)}Pg=function(t){switch(t.tag){case 3:var e=t.stateNode;if(e.current.memoizedState.isDehydrated){var n=ys(e.pendingLanes);n!==0&amp;&amp;(kf(e,n|1),ut(e,Oe()),!(se&amp;6)&amp;&amp;(bi=Oe()+500,ar()))}break;case 13:Ur(function(){var r=_n(t,1);if(r!==null){var i=et();Vt(r,t,1,i)}}),ed(t,1)}};Sf=function(t){if(t.tag===13){var e=_n(t,134217728);if(e!==null){var n=et();Vt(e,t,134217728,n)}ed(t,134217728)}};Ug=function(t){if(t.tag===13){var e=Jn(t),n=_n(t,e);if(n!==null){var r=et();Vt(n,t,e,r)}ed(t,e)}};bg=function(){return ce};zg=function(t,e){var n=ce;try{return ce=t,e()}finally{ce=n}};Ku=function(t,e,n){switch(e){case&quot;input&quot;:if(Fu(t,n),e=n.name,n.type===&quot;radio&quot;&amp;&amp;e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(&quot;input[name=&quot;+JSON.stringify(&quot;&quot;+e)+&#39;][type=&quot;radio&quot;]&#39;),e=0;e&lt;n.length;e++){var r=n[e];if(r!==t&amp;&amp;r.form===t.form){var i=_a(r);if(!i)throw Error(A(90));gg(r),Fu(r,i)}}}break;case&quot;textarea&quot;:yg(t,n);break;case&quot;select&quot;:e=n.value,e!=null&amp;&amp;di(t,!!n.multiple,e,!1)}};Eg=Jf;Cg=Ur;var g_={usingClientEntryPoint:!1,Events:[vl,ri,_a,Sg,xg,Jf]},fs={findFiberByHostInstance:vr,bundleType:0,version:&quot;18.3.1&quot;,rendererPackageName:&quot;react-dom&quot;},m_={bundleType:fs.bundleType,version:fs.version,rendererPackageName:fs.rendererPackageName,rendererConfig:fs.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:xn.ReactCurrentDispatcher,findHostInstanceByFiber:function(t){return t=Ag(t),t===null?null:t.stateNode},findFiberByHostInstance:fs.findFiberByHostInstance||h_,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:&quot;18.3.1-next-f1338f8080-20240426&quot;};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&lt;&quot;u&quot;){var Bl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Bl.isDisabled&amp;&amp;Bl.supportsFiber)try{ma=Bl.inject(m_),en=Bl}catch{}}kt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=g_;kt.createPortal=function(t,e){var n=2&lt;arguments.length&amp;&amp;arguments[2]!==void 0?arguments[2]:null;if(!nd(e))throw Error(A(200));return d_(t,e,null,n)};kt.createRoot=function(t,e){if(!nd(t))throw Error(A(299));var n=!1,r=&quot;&quot;,i=ly;return e!=null&amp;&amp;(e.unstable_strictMode===!0&amp;&amp;(n=!0),e.identifierPrefix!==void 0&amp;&amp;(r=e.identifierPrefix),e.onRecoverableError!==void 0&amp;&amp;(i=e.onRecoverableError)),e=qf(t,1,!1,null,null,n,!1,r,i),t[wn]=e.current,Bs(t.nodeType===8?t.parentNode:t),new td(e)};kt.findDOMNode=function(t){if(t==null)return null;if(t.nodeType===1)return t;var e=t._reactInternals;if(e===void 0)throw typeof t.render==&quot;function&quot;?Error(A(188)):(t=Object.keys(t).join(&quot;,&quot;),Error(A(268,t)));return t=Ag(e),t=t===null?null:t.stateNode,t};kt.flushSync=function(t){return Ur(t)};kt.hydrate=function(t,e,n){if(!Ra(e))throw Error(A(200));return Na(null,t,e,!0,n)};kt.hydrateRoot=function(t,e,n){if(!nd(t))throw Error(A(405));var r=n!=null&amp;&amp;n.hydratedSources||null,i=!1,s=&quot;&quot;,l=ly;if(n!=null&amp;&amp;(n.unstable_strictMode===!0&amp;&amp;(i=!0),n.identifierPrefix!==void 0&amp;&amp;(s=n.identifierPrefix),n.onRecoverableError!==void 0&amp;&amp;(l=n.onRecoverableError)),e=sy(e,null,t,1,n??null,i,!1,s,l),t[wn]=e.current,Bs(t),r)for(t=0;t&lt;r.length;t++)n=r[t],i=n._getVersion,i=i(n._source),e.mutableSourceEagerHydrationData==null?e.mutableSourceEagerHydrationData=[n,i]:e.mutableSourceEagerHydrationData.push(n,i);return new Aa(e)};kt.render=function(t,e,n){if(!Ra(e))throw Error(A(200));return Na(null,t,e,!1,n)};kt.unmountComponentAtNode=function(t){if(!Ra(t))throw Error(A(40));return t._reactRootContainer?(Ur(function(){Na(null,null,t,!1,function(){t._reactRootContainer=null,t[wn]=null})}),!0):!1};kt.unstable_batchedUpdates=Jf;kt.unstable_renderSubtreeIntoContainer=function(t,e,n,r){if(!Ra(n))throw Error(A(200));if(t==null||t._reactInternals===void 0)throw Error(A(38));return Na(t,e,n,!1,r)};kt.version=&quot;18.3.1-next-f1338f8080-20240426&quot;;function oy(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&gt;&quot;u&quot;||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=&quot;function&quot;))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(oy)}catch(t){console.error(t)}}oy(),og.exports=kt;var y_=og.exports,ay,jh=y_;ay=jh.createRoot,jh.hydrateRoot;const vi=new WeakMap,ho=new WeakMap,Qo={current:[]};let gu=!1;const Wl=new Set,Fh=new Map;function uy(t){const e=Array.from(t).sort((n,r)=&gt;n instanceof Yn&amp;&amp;n.options.deps.includes(r)?1:r instanceof Yn&amp;&amp;r.options.deps.includes(n)?-1:0);for(const n of e){if(Qo.current.includes(n))continue;Qo.current.push(n),n.recompute();const r=ho.get(n);if(r)for(const i of r){const s=vi.get(i);s&amp;&amp;uy(s)}}}function v_(t){t.listeners.forEach(e=&gt;e({prevVal:t.prevState,currentVal:t.state}))}function w_(t){t.listeners.forEach(e=&gt;e({prevVal:t.prevState,currentVal:t.state}))}function __(t){if(Wl.add(t),!gu)try{for(gu=!0;Wl.size&gt;0;){const e=Array.from(Wl);Wl.clear();for(const n of e){const r=Fh.get(n)??n.prevState;n.prevState=r,v_(n)}for(const n of e){const r=vi.get(n);r&amp;&amp;(Qo.current.push(n),uy(r))}for(const n of e){const r=vi.get(n);if(r)for(const i of r)w_(i)}}}finally{gu=!1,Qo.current=[],Fh.clear()}}function k_(t){return typeof t==&quot;function&quot;}class Oc{constructor(e,n){this.listeners=new Set,this.subscribe=r=&gt;{var i,s;this.listeners.add(r);const l=(s=(i=this.options)==null?void 0:i.onSubscribe)==null?void 0:s.call(i,r,this);return()=&gt;{this.listeners.delete(r),l==null||l()}},this.prevState=e,this.state=e,this.options=n}setState(e){var n,r,i;this.prevState=this.state,(n=this.options)!=null&amp;&amp;n.updateFn?this.state=this.options.updateFn(this.prevState)(e):k_(e)?this.state=e(this.prevState):this.state=e,(i=(r=this.options)==null?void 0:r.onUpdate)==null||i.call(r),__(this)}}class Yn{constructor(e){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=&gt;{const n=[],r=[];for(const i of this.options.deps)n.push(i.prevState),r.push(i.state);return this.lastSeenDepValues=r,{prevDepVals:n,currDepVals:r,prevVal:this.prevState??void 0}},this.recompute=()=&gt;{var n,r;this.prevState=this.state;const{prevDepVals:i,currDepVals:s,prevVal:l}=this.getDepVals();this.state=this.options.fn({prevDepVals:i,currDepVals:s,prevVal:l}),(r=(n=this.options).onUpdate)==null||r.call(n)},this.checkIfRecalculationNeededDeeply=()=&gt;{for(const s of this.options.deps)s instanceof Yn&amp;&amp;s.checkIfRecalculationNeededDeeply();let n=!1;const r=this.lastSeenDepValues,{currDepVals:i}=this.getDepVals();for(let s=0;s&lt;i.length;s++)if(i[s]!==r[s]){n=!0;break}n&amp;&amp;this.recompute()},this.mount=()=&gt;(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=&gt;{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=&gt;{var r,i;this.listeners.add(n);const s=(i=(r=this.options).onSubscribe)==null?void 0:i.call(r,n,this);return()=&gt;{this.listeners.delete(n),s==null||s()}},this.options=e,this.state=e.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(e=this.options.deps){for(const n of e)if(n instanceof Yn)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof Oc){let r=vi.get(n);r||(r=new Set,vi.set(n,r)),r.add(this);let i=ho.get(this);i||(i=new Set,ho.set(this,i)),i.add(n)}}unregisterFromGraph(e=this.options.deps){for(const n of e)if(n instanceof Yn)this.unregisterFromGraph(n.options.deps);else if(n instanceof Oc){const r=vi.get(n);r&amp;&amp;r.delete(this);const i=ho.get(this);i&amp;&amp;i.delete(n)}}}class S_{constructor(e){const{eager:n,fn:r,...i}=e;this._derived=new Yn({...i,fn:()=&gt;{},onUpdate(){r()}}),n&amp;&amp;r()}mount(){return this._derived.mount()}}function x_(t,e={}){const n=new Oc({actors:{}}),r=e.hashFunction||E_,i=new Map;function s(l){const o=r(l),a=i.get(o);if(a)return{...a,state:a.state};const u=new Yn({fn:({currDepVals:[y]})=&gt;y.actors[o],deps:[n]});function c(){async function y(){const k=n.state.actors[o];try{const F=t.getOrCreate(k.opts.name,k.opts.key,{params:k.opts.params,createInRegion:k.opts.createInRegion,createWithInput:k.opts.createWithInput}),v=F.connect();await F.resolve(),n.setState(g=&gt;({...g,actors:{...g.actors,[o]:{...g.actors[o],isConnected:!0,isConnecting:!1,handle:F,connection:v,isError:!1,error:null}}}))}catch(F){n.setState(v=&gt;({...v,actors:{...v.actors,[o]:{...v.actors[o],isError:!0,isConnecting:!1,error:F}}}))}}n.setState(k=&gt;(k.actors[o].isConnecting=!0,k.actors[o].isError=!1,k.actors[o].error=null,y(),k))}const f=new S_({fn:()=&gt;{const y=n.state.actors[o];JSON.stringify(n.prevState.actors[o].opts)===JSON.stringify(n.state.actors[o].opts)&amp;&amp;!y.isConnected&amp;&amp;!y.isConnecting&amp;&amp;!y.isError&amp;&amp;y.opts.enabled&amp;&amp;c()},deps:[u]});n.setState(y=&gt;y.actors[o]?y:{...y,actors:{...y.actors,[o]:{hash:o,isConnected:!1,isConnecting:!1,connection:null,handle:null,isError:!1,error:null,opts:l}}});function d(y){n.setState(k=&gt;{const F=k.actors[o];if(!F)throw new Error(`Actor with key &quot;${o}&quot; does not exist.`);let v;return typeof y==&quot;function&quot;?v=y(F):v=y,{...k,actors:{...k.actors,[o]:v}}})}const h=()=&gt;{const y=u.mount(),k=f.mount();return()=&gt;{y(),k()}};return i.set(o,{state:u,key:o,mount:h,setState:d,create:c,addEventListener}),{mount:h,setState:d,state:u,create:c,key:o}}return{getOrCreateActor:s,store:n}}function E_({name:t,key:e,params:n}){return JSON.stringify({name:t,key:e,params:n})}var cy={exports:{}},fy={},dy={exports:{}},hy={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zi=Re;function C_(t,e){return t===e&amp;&amp;(t!==0||1/t===1/e)||t!==t&amp;&amp;e!==e}var O_=typeof Object.is==&quot;function&quot;?Object.is:C_,T_=zi.useState,A_=zi.useEffect,R_=zi.useLayoutEffect,N_=zi.useDebugValue;function I_(t,e){var n=e(),r=T_({inst:{value:n,getSnapshot:e}}),i=r[0].inst,s=r[1];return R_(function(){i.value=n,i.getSnapshot=e,mu(i)&amp;&amp;s({inst:i})},[t,n,e]),A_(function(){return mu(i)&amp;&amp;s({inst:i}),t(function(){mu(i)&amp;&amp;s({inst:i})})},[t]),N_(n),n}function mu(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!O_(t,n)}catch{return!0}}function D_(t,e){return e()}var L_=typeof window&gt;&quot;u&quot;||typeof window.document&gt;&quot;u&quot;||typeof window.document.createElement&gt;&quot;u&quot;?D_:I_;hy.useSyncExternalStore=zi.useSyncExternalStore!==void 0?zi.useSyncExternalStore:L_;dy.exports=hy;var M_=dy.exports;/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Ia=Re,P_=M_;function U_(t,e){return t===e&amp;&amp;(t!==0||1/t===1/e)||t!==t&amp;&amp;e!==e}var b_=typeof Object.is==&quot;function&quot;?Object.is:U_,z_=P_.useSyncExternalStore,j_=Ia.useRef,F_=Ia.useEffect,$_=Ia.useMemo,V_=Ia.useDebugValue;fy.useSyncExternalStoreWithSelector=function(t,e,n,r,i){var s=j_(null);if(s.current===null){var l={hasValue:!1,value:null};s.current=l}else l=s.current;s=$_(function(){function a(h){if(!u){if(u=!0,c=h,h=r(h),i!==void 0&amp;&amp;l.hasValue){var y=l.value;if(i(y,h))return f=y}return f=h}if(y=f,b_(c,h))return y;var k=r(h);return i!==void 0&amp;&amp;i(y,k)?(c=h,y):(c=h,f=k)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return a(e())},d===null?void 0:function(){return a(d())}]},[e,n,r,i]);var o=z_(t,s[0],s[1]);return F_(function(){l.hasValue=!0,l.value=o},[o]),V_(o),o};cy.exports=fy;var B_=cy.exports;function $h(t,e=n=&gt;n){return B_.useSyncExternalStoreWithSelector(t.subscribe,()=&gt;t.state,()=&gt;t.state,e,W_)}function W_(t,e){if(Object.is(t,e))return!0;if(typeof t!=&quot;object&quot;||t===null||typeof e!=&quot;object&quot;||e===null)return!1;if(t instanceof Map&amp;&amp;e instanceof Map){if(t.size!==e.size)return!1;for(const[r,i]of t)if(!e.has(r)||!Object.is(i,e.get(r)))return!1;return!0}if(t instanceof Set&amp;&amp;e instanceof Set){if(t.size!==e.size)return!1;for(const r of t)if(!e.has(r))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(let r=0;r&lt;n.length;r++)if(!Object.prototype.hasOwnProperty.call(e,n[r])||!Object.is(t[n[r]],e[n[r]]))return!1;return!0}const H_=&quot;modulepreload&quot;,Z_=function(t){return&quot;/&quot;+t},Vh={},py=function(e,n,r){let i=Promise.resolve();if(n&amp;&amp;n.length&gt;0){document.getElementsByTagName(&quot;link&quot;);const l=document.querySelector(&quot;meta[property=csp-nonce]&quot;),o=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute(&quot;nonce&quot;));i=Promise.allSettled(n.map(a=&gt;{if(a=Z_(a),a in Vh)return;Vh[a]=!0;const u=a.endsWith(&quot;.css&quot;),c=u?&#39;[rel=&quot;stylesheet&quot;]&#39;:&quot;&quot;;if(document.querySelector(`link[href=&quot;${a}&quot;]${c}`))return;const f=document.createElement(&quot;link&quot;);if(f.rel=u?&quot;stylesheet&quot;:H_,u||(f.as=&quot;script&quot;),f.crossOrigin=&quot;&quot;,f.href=a,o&amp;&amp;f.setAttribute(&quot;nonce&quot;,o),document.head.appendChild(f),u)return new Promise((d,h)=&gt;{f.addEventListener(&quot;load&quot;,d),f.addEventListener(&quot;error&quot;,()=&gt;h(new Error(`Unable to preload CSS for ${a}`)))})}))}function s(l){const o=new Event(&quot;vite:preloadError&quot;,{cancelable:!0});if(o.payload=l,window.dispatchEvent(o),!o.defaultPrevented)throw l}return i.then(l=&gt;{for(const o of l||[])o.status===&quot;rejected&quot;&amp;&amp;s(o.reason);return e().catch(s)})};var K_=&quot;internal_error&quot;,Q_=class extends Error{constructor(n,r,i){super(r,{cause:i==null?void 0:i.cause});Ht(this,&quot;__type&quot;,&quot;ActorError&quot;);Ht(this,&quot;public&quot;);Ht(this,&quot;metadata&quot;);Ht(this,&quot;statusCode&quot;,500);this.code=n,this.public=(i==null?void 0:i.public)??!1,this.metadata=i==null?void 0:i.metadata,i!=null&amp;&amp;i.public&amp;&amp;(this.statusCode=400)}static isActorError(n){return typeof n==&quot;object&quot;&amp;&amp;n.__type===&quot;ActorError&quot;}toString(){return this.message}serializeForHttp(){return{type:this.code,message:this.message,metadata:this.metadata}}},J_=class extends Q_{constructor(t){super(K_,t)}},G_=class extends J_{constructor(t){super(`Unreachable case: ${t}`)}},Y_={};function Ct(t){throw new Error(`Unreachable case: ${t}`)}function Bh(t){if(t instanceof Error)return typeof process&lt;&quot;u&quot;&amp;&amp;Jo(&quot;_RIVETKIT_ERROR_STACK&quot;)===&quot;1&quot;?`${t.name}: ${t.message}${t.stack?`
${t.stack}`:&quot;&quot;}`:`${t.name}: ${t.message}`;if(typeof t==&quot;string&quot;)return t;if(typeof t==&quot;object&quot;&amp;&amp;t!==null)try{return`${JSON.stringify(t)}`}catch{return&quot;[cannot stringify error]&quot;}else return`Unknown error: ${X_(t)}`}function X_(t){return t&amp;&amp;typeof t==&quot;object&quot;&amp;&amp;&quot;message&quot;in t&amp;&amp;typeof t.message==&quot;string&quot;?t.message:String(t)}var q_={version:&quot;0.9.9&quot;},e1=q_.version,yu;function po(){if(yu!==void 0)return yu;let t=`RivetKit/${e1}`;const e=typeof navigator&lt;&quot;u&quot;?navigator:void 0;return e!=null&amp;&amp;e.userAgent&amp;&amp;(t+=` ${e.userAgent}`),yu=t,t}function Jo(t){if(typeof Deno&lt;&quot;u&quot;)return Deno.env.get(t);if(typeof process&lt;&quot;u&quot;)return Y_[t]}var hr={TRACE:0,DEBUG:1,INFO:2,WARN:3,ERROR:4,CRITICAL:5},gy={0:&quot;TRACE&quot;,1:&quot;DEBUG&quot;,2:&quot;INFO&quot;,3:&quot;WARN&quot;,4:&quot;ERROR&quot;,5:&quot;CRITICAL&quot;};function t1(...t){let e=&quot;&quot;;for(let n=0;n&lt;t.length;n++){const[r,i]=t[n];let s=!1,l;i==null?(s=!0,l=&quot;&quot;):l=i.toString(),l.length&gt;512&amp;&amp;r!==&quot;msg&quot;&amp;&amp;r!==&quot;error&quot;&amp;&amp;(l=`${l.slice(0,512)}...`);const o=l.indexOf(&quot; &quot;)&gt;-1||l.indexOf(&quot;=&quot;)&gt;-1,a=l.indexOf(&#39;&quot;&#39;)&gt;-1||l.indexOf(&quot;\\&quot;)&gt;-1;l=l.replace(/\n/g,&quot;\\n&quot;),a&amp;&amp;(l=l.replace(/[&quot;\\]/g,&quot;\\$&amp;&quot;)),(o||a)&amp;&amp;(l=`&quot;${l}&quot;`),l===&quot;&quot;&amp;&amp;!s&amp;&amp;(l=&#39;&quot;&quot;&#39;),e+=`${r}=${l}`,n!==t.length-1&amp;&amp;(e+=&quot; &quot;)}return e}function n1(t){const e=t.getUTCFullYear(),n=String(t.getUTCMonth()+1).padStart(2,&quot;0&quot;),r=String(t.getUTCDate()).padStart(2,&quot;0&quot;),i=String(t.getUTCHours()).padStart(2,&quot;0&quot;),s=String(t.getUTCMinutes()).padStart(2,&quot;0&quot;),l=String(t.getUTCSeconds()).padStart(2,&quot;0&quot;),o=String(t.getUTCMilliseconds()).padStart(3,&quot;0&quot;);return`${e}-${n}-${r}T${i}:${s}:${l}.${o}Z`}function r1(t){if(typeof t==&quot;string&quot;||typeof t==&quot;number&quot;||typeof t==&quot;boolean&quot;||t===null||t===void 0)return t;if(t instanceof Error)return String(t);try{return JSON.stringify(t)}catch{return&quot;[cannot stringify]&quot;}}var Gi,my,yy,Bp,i1=(Bp=class{constructor(t,e){ae(this,Gi);Ht(this,&quot;name&quot;);Ht(this,&quot;level&quot;);this.name=t,this.level=e}log(t,e,...n){const r={msg:e,args:n,level:t,loggerName:this.name,datetime:new Date,levelName:gy[t]};re(this,Gi,my).call(this,t)&amp;&amp;re(this,Gi,yy).call(this,r)}trace(t,...e){this.log(hr.TRACE,t,...e)}debug(t,...e){this.log(hr.DEBUG,t,...e)}info(t,...e){this.log(hr.INFO,t,...e)}warn(t,...e){this.log(hr.WARN,t,...e)}error(t,...e){this.log(hr.ERROR,t,...e)}critical(t,...e){this.log(hr.CRITICAL,t,...e)}},Gi=new WeakSet,my=function(t){return t&gt;=hr[this.level]},yy=function(t){console.log(s1(t))},Bp),vu={};function vy(t=&quot;default&quot;){const n=Jo(&quot;_LOG_LEVEL&quot;)??&quot;INFO&quot;;return vu[t]||(vu[t]=new i1(t,n)),vu[t]}function s1(t){const e=[];for(let i=0;i&lt;t.args.length;i++){const s=t.args[i];if(s&amp;&amp;typeof s==&quot;object&quot;)for(const l in s){const o=s[l];Wh(l,o,e)}else Wh(`arg${i}`,s,e)}const n=Jo(&quot;_LOG_TIMESTAMP&quot;)===&quot;1&quot;,r=Jo(&quot;_LOG_TARGET&quot;)===&quot;1&quot;;return t1(...n?[[&quot;ts&quot;,n1(new Date)]]:[],[&quot;level&quot;,gy[t.level]],...r?[[&quot;target&quot;,t.loggerName]]:[],[&quot;msg&quot;,t.msg],...e)}function Wh(t,e,n){n.push([t,r1(e)])}let Tc;try{Tc=new TextDecoder}catch{}let z,Ar,S=0;const l1=105,o1=57342,a1=57343,Hh=57337,Zh=6,Qr={};let ds=11281e4,an=1681e4,ee={},Ce,Go,Yo=0,Xs=0,Pe,Ot,Ie=[],Ac=[],st,qe,ws,Kh={useRecords:!1,mapsAsObjects:!0},qs=!1,wy=2;try{new Function(&quot;&quot;)}catch{wy=1/0}let _y=class Rc{constructor(e){if(e&amp;&amp;((e.keyMap||e._keyMap)&amp;&amp;!e.useRecords&amp;&amp;(e.useRecords=!1,e.mapsAsObjects=!0),e.useRecords===!1&amp;&amp;e.mapsAsObjects===void 0&amp;&amp;(e.mapsAsObjects=!0),e.getStructures&amp;&amp;(e.getShared=e.getStructures),e.getShared&amp;&amp;!e.structures&amp;&amp;((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[n,r]of Object.entries(e.keyMap))this.mapKey.set(r,n)}Object.assign(this,e)}decodeKey(e){return this.keyMap&amp;&amp;this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&amp;&amp;this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let n=new Map;for(let[r,i]of Object.entries(e))n.set(this._keyMap.hasOwnProperty(r)?this._keyMap[r]:r,i);return n}decodeKeys(e){if(!this._keyMap||e.constructor.name!=&quot;Map&quot;)return e;if(!this._mapKey){this._mapKey=new Map;for(let[r,i]of Object.entries(this._keyMap))this._mapKey.set(i,r)}let n={};return e.forEach((r,i)=&gt;n[Tt(this._mapKey.has(i)?this._mapKey.get(i):i)]=r),n}mapDecode(e,n){let r=this.decode(e);if(this._keyMap)switch(r.constructor.name){case&quot;Array&quot;:return r.map(i=&gt;this.decodeKeys(i))}return r}decode(e,n){if(z)return Ey(()=&gt;(Lc(),this?this.decode(e,n):Rc.prototype.decode.call(Kh,e,n)));Ar=n&gt;-1?n:e.length,S=0,Xs=0,Go=null,Pe=null,z=e;try{qe=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(r){throw z=null,e instanceof Uint8Array?r:new Error(&quot;Source must be a Uint8Array or Buffer but was a &quot;+(e&amp;&amp;typeof e==&quot;object&quot;?e.constructor.name:typeof e))}if(this instanceof Rc){if(ee=this,st=this.sharedValues&amp;&amp;(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return Ce=this.structures,Hl();(!Ce||Ce.length&gt;0)&amp;&amp;(Ce=[])}else ee=Kh,(!Ce||Ce.length&gt;0)&amp;&amp;(Ce=[]),st=null;return Hl()}decodeMultiple(e,n){let r,i=0;try{let s=e.length;qs=!0;let l=this?this.decode(e,s):sd.decode(e,s);if(n){if(n(l)===!1)return;for(;S&lt;s;)if(i=S,n(Hl())===!1)return}else{for(r=[l];S&lt;s;)i=S,r.push(Hl());return r}}catch(s){throw s.lastPosition=i,s.values=r,s}finally{qs=!1,Lc()}}};function Hl(){try{let t=te();if(Pe){if(S&gt;=Pe.postBundlePosition){let e=new Error(&quot;Unexpected bundle position&quot;);throw e.incomplete=!0,e}S=Pe.postBundlePosition,Pe=null}if(S==Ar)Ce=null,z=null,Ot&amp;&amp;(Ot=null);else if(S&gt;Ar){let e=new Error(&quot;Unexpected end of CBOR data&quot;);throw e.incomplete=!0,e}else if(!qs)throw new Error(&quot;Data read, but end of buffer not reached&quot;);return t}catch(t){throw Lc(),(t instanceof RangeError||t.message.startsWith(&quot;Unexpected end of buffer&quot;))&amp;&amp;(t.incomplete=!0),t}}function te(){let t=z[S++],e=t&gt;&gt;5;if(t=t&amp;31,t&gt;23)switch(t){case 24:t=z[S++];break;case 25:if(e==7)return d1();t=qe.getUint16(S),S+=2;break;case 26:if(e==7){let n=qe.getFloat32(S);if(ee.useFloat32&gt;2){let r=id[(z[S]&amp;127)&lt;&lt;1|z[S+1]&gt;&gt;7];return S+=4,(r*n+(n&gt;0?.5:-.5)&gt;&gt;0)/r}return S+=4,n}t=qe.getUint32(S),S+=4;break;case 27:if(e==7){let n=qe.getFloat64(S);return S+=8,n}if(e&gt;1){if(qe.getUint32(S)&gt;0)throw new Error(&quot;JavaScript does not support arrays, maps, or strings with length over 4294967295&quot;);t=qe.getUint32(S+4)}else ee.int64AsNumber?(t=qe.getUint32(S)*4294967296,t+=qe.getUint32(S+4)):t=qe.getBigUint64(S);S+=8;break;case 31:switch(e){case 2:case 3:throw new Error(&quot;Indefinite length not supported for byte or text strings&quot;);case 4:let n=[],r,i=0;for(;(r=te())!=Qr;){if(i&gt;=ds)throw new Error(`Array length exceeds ${ds}`);n[i++]=r}return e==4?n:e==3?n.join(&quot;&quot;):Buffer.concat(n);case 5:let s;if(ee.mapsAsObjects){let l={},o=0;if(ee.keyMap)for(;(s=te())!=Qr;){if(o++&gt;=an)throw new Error(`Property count exceeds ${an}`);l[Tt(ee.decodeKey(s))]=te()}else for(;(s=te())!=Qr;){if(o++&gt;=an)throw new Error(`Property count exceeds ${an}`);l[Tt(s)]=te()}return l}else{ws&amp;&amp;(ee.mapsAsObjects=!0,ws=!1);let l=new Map;if(ee.keyMap){let o=0;for(;(s=te())!=Qr;){if(o++&gt;=an)throw new Error(`Map size exceeds ${an}`);l.set(ee.decodeKey(s),te())}}else{let o=0;for(;(s=te())!=Qr;){if(o++&gt;=an)throw new Error(`Map size exceeds ${an}`);l.set(s,te())}}return l}case 7:return Qr;default:throw new Error(&quot;Invalid major type for indefinite length &quot;+e)}default:throw new Error(&quot;Unknown token &quot;+t)}switch(e){case 0:return t;case 1:return~t;case 2:return f1(t);case 3:if(Xs&gt;=S)return Go.slice(S-Yo,(S+=t)-Yo);if(Xs==0&amp;&amp;Ar&lt;140&amp;&amp;t&lt;32){let i=t&lt;16?ky(t):c1(t);if(i!=null)return i}return u1(t);case 4:if(t&gt;=ds)throw new Error(`Array length exceeds ${ds}`);let n=new Array(t);for(let i=0;i&lt;t;i++)n[i]=te();return n;case 5:if(t&gt;=an)throw new Error(`Map size exceeds ${ds}`);if(ee.mapsAsObjects){let i={};if(ee.keyMap)for(let s=0;s&lt;t;s++)i[Tt(ee.decodeKey(te()))]=te();else for(let s=0;s&lt;t;s++)i[Tt(te())]=te();return i}else{ws&amp;&amp;(ee.mapsAsObjects=!0,ws=!1);let i=new Map;if(ee.keyMap)for(let s=0;s&lt;t;s++)i.set(ee.decodeKey(te()),te());else for(let s=0;s&lt;t;s++)i.set(te(),te());return i}case 6:if(t&gt;=Hh){let i=Ce[t&amp;8191];if(i)return i.read||(i.read=Nc(i)),i.read();if(t&lt;65536){if(t==a1){let s=ci(),l=te(),o=te();Dc(l,o);let a={};if(ee.keyMap)for(let u=2;u&lt;s;u++){let c=ee.decodeKey(o[u-2]);a[Tt(c)]=te()}else for(let u=2;u&lt;s;u++){let c=o[u-2];a[Tt(c)]=te()}return a}else if(t==o1){let s=ci(),l=te();for(let o=2;o&lt;s;o++)Dc(l++,te());return te()}else if(t==Hh)return v1();if(ee.getShared&amp;&amp;(rd(),i=Ce[t&amp;8191],i))return i.read||(i.read=Nc(i)),i.read()}}let r=Ie[t];if(r)return r.handlesRead?r(te):r(te());{let i=te();for(let s=0;s&lt;Ac.length;s++){let l=Ac[s](t,i);if(l!==void 0)return l}return new br(i,t)}case 7:switch(t){case 20:return!1;case 21:return!0;case 22:return null;case 23:return;case 31:default:let i=(st||mr())[t];if(i!==void 0)return i;throw new Error(&quot;Unknown token &quot;+t)}default:if(isNaN(t)){let i=new Error(&quot;Unexpected end of CBOR data&quot;);throw i.incomplete=!0,i}throw new Error(&quot;Unknown CBOR token &quot;+t)}}const Qh=/^[a-zA-Z_$][a-zA-Z\d_$]*$/;function Nc(t){if(!t)throw new Error(&quot;Structure is required in record definition&quot;);function e(){let n=z[S++];if(n=n&amp;31,n&gt;23)switch(n){case 24:n=z[S++];break;case 25:n=qe.getUint16(S),S+=2;break;case 26:n=qe.getUint32(S),S+=4;break;default:throw new Error(&quot;Expected array header, but got &quot;+z[S-1])}let r=this.compiledReader;for(;r;){if(r.propertyCount===n)return r(te);r=r.next}if(this.slowReads++&gt;=wy){let s=this.length==n?this:this.slice(0,n);return r=ee.keyMap?new Function(&quot;r&quot;,&quot;return {&quot;+s.map(l=&gt;ee.decodeKey(l)).map(l=&gt;Qh.test(l)?Tt(l)+&quot;:r()&quot;:&quot;[&quot;+JSON.stringify(l)+&quot;]:r()&quot;).join(&quot;,&quot;)+&quot;}&quot;):new Function(&quot;r&quot;,&quot;return {&quot;+s.map(l=&gt;Qh.test(l)?Tt(l)+&quot;:r()&quot;:&quot;[&quot;+JSON.stringify(l)+&quot;]:r()&quot;).join(&quot;,&quot;)+&quot;}&quot;),this.compiledReader&amp;&amp;(r.next=this.compiledReader),r.propertyCount=n,this.compiledReader=r,r(te)}let i={};if(ee.keyMap)for(let s=0;s&lt;n;s++)i[Tt(ee.decodeKey(this[s]))]=te();else for(let s=0;s&lt;n;s++)i[Tt(this[s])]=te();return i}return t.slowReads=0,e}function Tt(t){if(typeof t==&quot;string&quot;)return t===&quot;__proto__&quot;?&quot;__proto_&quot;:t;if(typeof t==&quot;number&quot;||typeof t==&quot;boolean&quot;||typeof t==&quot;bigint&quot;)return t.toString();if(t==null)return t+&quot;&quot;;throw new Error(&quot;Invalid property name type &quot;+typeof t)}let u1=Ic;function Ic(t){let e;if(t&lt;16&amp;&amp;(e=ky(t)))return e;if(t&gt;64&amp;&amp;Tc)return Tc.decode(z.subarray(S,S+=t));const n=S+t,r=[];for(e=&quot;&quot;;S&lt;n;){const i=z[S++];if(!(i&amp;128))r.push(i);else if((i&amp;224)===192){const s=z[S++]&amp;63;r.push((i&amp;31)&lt;&lt;6|s)}else if((i&amp;240)===224){const s=z[S++]&amp;63,l=z[S++]&amp;63;r.push((i&amp;31)&lt;&lt;12|s&lt;&lt;6|l)}else if((i&amp;248)===240){const s=z[S++]&amp;63,l=z[S++]&amp;63,o=z[S++]&amp;63;let a=(i&amp;7)&lt;&lt;18|s&lt;&lt;12|l&lt;&lt;6|o;a&gt;65535&amp;&amp;(a-=65536,r.push(a&gt;&gt;&gt;10&amp;1023|55296),a=56320|a&amp;1023),r.push(a)}else r.push(i);r.length&gt;=4096&amp;&amp;(e+=ze.apply(String,r),r.length=0)}return r.length&gt;0&amp;&amp;(e+=ze.apply(String,r)),e}let ze=String.fromCharCode;function c1(t){let e=S,n=new Array(t);for(let r=0;r&lt;t;r++){const i=z[S++];if((i&amp;128)&gt;0){S=e;return}n[r]=i}return ze.apply(String,n)}function ky(t){if(t&lt;4)if(t&lt;2){if(t===0)return&quot;&quot;;{let e=z[S++];if((e&amp;128)&gt;1){S-=1;return}return ze(e)}}else{let e=z[S++],n=z[S++];if((e&amp;128)&gt;0||(n&amp;128)&gt;0){S-=2;return}if(t&lt;3)return ze(e,n);let r=z[S++];if((r&amp;128)&gt;0){S-=3;return}return ze(e,n,r)}else{let e=z[S++],n=z[S++],r=z[S++],i=z[S++];if((e&amp;128)&gt;0||(n&amp;128)&gt;0||(r&amp;128)&gt;0||(i&amp;128)&gt;0){S-=4;return}if(t&lt;6){if(t===4)return ze(e,n,r,i);{let s=z[S++];if((s&amp;128)&gt;0){S-=5;return}return ze(e,n,r,i,s)}}else if(t&lt;8){let s=z[S++],l=z[S++];if((s&amp;128)&gt;0||(l&amp;128)&gt;0){S-=6;return}if(t&lt;7)return ze(e,n,r,i,s,l);let o=z[S++];if((o&amp;128)&gt;0){S-=7;return}return ze(e,n,r,i,s,l,o)}else{let s=z[S++],l=z[S++],o=z[S++],a=z[S++];if((s&amp;128)&gt;0||(l&amp;128)&gt;0||(o&amp;128)&gt;0||(a&amp;128)&gt;0){S-=8;return}if(t&lt;10){if(t===8)return ze(e,n,r,i,s,l,o,a);{let u=z[S++];if((u&amp;128)&gt;0){S-=9;return}return ze(e,n,r,i,s,l,o,a,u)}}else if(t&lt;12){let u=z[S++],c=z[S++];if((u&amp;128)&gt;0||(c&amp;128)&gt;0){S-=10;return}if(t&lt;11)return ze(e,n,r,i,s,l,o,a,u,c);let f=z[S++];if((f&amp;128)&gt;0){S-=11;return}return ze(e,n,r,i,s,l,o,a,u,c,f)}else{let u=z[S++],c=z[S++],f=z[S++],d=z[S++];if((u&amp;128)&gt;0||(c&amp;128)&gt;0||(f&amp;128)&gt;0||(d&amp;128)&gt;0){S-=12;return}if(t&lt;14){if(t===12)return ze(e,n,r,i,s,l,o,a,u,c,f,d);{let h=z[S++];if((h&amp;128)&gt;0){S-=13;return}return ze(e,n,r,i,s,l,o,a,u,c,f,d,h)}}else{let h=z[S++],y=z[S++];if((h&amp;128)&gt;0||(y&amp;128)&gt;0){S-=14;return}if(t&lt;15)return ze(e,n,r,i,s,l,o,a,u,c,f,d,h,y);let k=z[S++];if((k&amp;128)&gt;0){S-=15;return}return ze(e,n,r,i,s,l,o,a,u,c,f,d,h,y,k)}}}}}function f1(t){return ee.copyBuffers?Uint8Array.prototype.slice.call(z,S,S+=t):z.subarray(S,S+=t)}let Sy=new Float32Array(1),Zl=new Uint8Array(Sy.buffer,0,4);function d1(){let t=z[S++],e=z[S++],n=(t&amp;127)&gt;&gt;2;if(n===31)return e||t&amp;3?NaN:t&amp;128?-1/0:1/0;if(n===0){let r=((t&amp;3)&lt;&lt;8|e)/16777216;return t&amp;128?-r:r}return Zl[3]=t&amp;128|(n&gt;&gt;1)+56,Zl[2]=(t&amp;7)&lt;&lt;5|e&gt;&gt;3,Zl[1]=e&lt;&lt;5,Zl[0]=0,Sy[0]}new Array(4096);class br{constructor(e,n){this.value=e,this.tag=n}}Ie[0]=t=&gt;new Date(t);Ie[1]=t=&gt;new Date(Math.round(t*1e3));Ie[2]=t=&gt;{let e=BigInt(0);for(let n=0,r=t.byteLength;n&lt;r;n++)e=BigInt(t[n])+(e&lt;&lt;BigInt(8));return e};Ie[3]=t=&gt;BigInt(-1)-Ie[2](t);Ie[4]=t=&gt;+(t[1]+&quot;e&quot;+t[0]);Ie[5]=t=&gt;t[1]*Math.exp(t[0]*Math.log(2));const Dc=(t,e)=&gt;{t=t-57344;let n=Ce[t];n&amp;&amp;n.isShared&amp;&amp;((Ce.restoreStructures||(Ce.restoreStructures=[]))[t]=n),Ce[t]=e,e.read=Nc(e)};Ie[l1]=t=&gt;{let e=t.length,n=t[1];Dc(t[0],n);let r={};for(let i=2;i&lt;e;i++){let s=n[i-2];r[Tt(s)]=t[i]}return r};Ie[14]=t=&gt;Pe?Pe[0].slice(Pe.position0,Pe.position0+=t):new br(t,14);Ie[15]=t=&gt;Pe?Pe[1].slice(Pe.position1,Pe.position1+=t):new br(t,15);let h1={Error,RegExp};Ie[27]=t=&gt;(h1[t[0]]||Error)(t[1],t[2]);const xy=t=&gt;{if(z[S++]!=132){let n=new Error(&quot;Packed values structure must be followed by a 4 element array&quot;);throw z.length&lt;S&amp;&amp;(n.incomplete=!0),n}let e=t();if(!e||!e.length){let n=new Error(&quot;Packed values structure must be followed by a 4 element array&quot;);throw n.incomplete=!0,n}return st=st?e.concat(st.slice(e.length)):e,st.prefixes=t(),st.suffixes=t(),t()};xy.handlesRead=!0;Ie[51]=xy;Ie[Zh]=t=&gt;{if(!st)if(ee.getShared)rd();else return new br(t,Zh);if(typeof t==&quot;number&quot;)return st[16+(t&gt;=0?2*t:-2*t-1)];let e=new Error(&quot;No support for non-integer packed references yet&quot;);throw t===void 0&amp;&amp;(e.incomplete=!0),e};Ie[28]=t=&gt;{Ot||(Ot=new Map,Ot.id=0);let e=Ot.id++,n=S,r=z[S],i;r&gt;&gt;5==4?i=[]:i={};let s={target:i};Ot.set(e,s);let l=t();return s.used?(Object.getPrototypeOf(i)!==Object.getPrototypeOf(l)&amp;&amp;(S=n,i=l,Ot.set(e,{target:i}),l=t()),Object.assign(i,l)):(s.target=l,l)};Ie[28].handlesRead=!0;Ie[29]=t=&gt;{let e=Ot.get(t);return e.used=!0,e.target};Ie[258]=t=&gt;new Set(t);(Ie[259]=t=&gt;(ee.mapsAsObjects&amp;&amp;(ee.mapsAsObjects=!1,ws=!0),t())).handlesRead=!0;function Jr(t,e){return typeof t==&quot;string&quot;?t+e:t instanceof Array?t.concat(e):Object.assign({},t,e)}function mr(){if(!st)if(ee.getShared)rd();else throw new Error(&quot;No packed values available&quot;);return st}const p1=1399353956;Ac.push((t,e)=&gt;{if(t&gt;=225&amp;&amp;t&lt;=255)return Jr(mr().prefixes[t-224],e);if(t&gt;=28704&amp;&amp;t&lt;=32767)return Jr(mr().prefixes[t-28672],e);if(t&gt;=1879052288&amp;&amp;t&lt;=2147483647)return Jr(mr().prefixes[t-1879048192],e);if(t&gt;=216&amp;&amp;t&lt;=223)return Jr(e,mr().suffixes[t-216]);if(t&gt;=27647&amp;&amp;t&lt;=28671)return Jr(e,mr().suffixes[t-27639]);if(t&gt;=1811940352&amp;&amp;t&lt;=1879048191)return Jr(e,mr().suffixes[t-1811939328]);if(t==p1)return{packedValues:st,structures:Ce.slice(0),version:e};if(t==55799)return e});const g1=new Uint8Array(new Uint16Array([1]).buffer)[0]==1,Jh=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array&gt;&quot;u&quot;?{name:&quot;BigUint64Array&quot;}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array&gt;&quot;u&quot;?{name:&quot;BigInt64Array&quot;}:BigInt64Array,Float32Array,Float64Array],m1=[64,68,69,70,71,72,77,78,79,85,86];for(let t=0;t&lt;Jh.length;t++)y1(Jh[t],m1[t]);function y1(t,e){let n=&quot;get&quot;+t.name.slice(0,-5),r;typeof t==&quot;function&quot;?r=t.BYTES_PER_ELEMENT:t=null;for(let i=0;i&lt;2;i++){if(!i&amp;&amp;r==1)continue;let s=r==2?1:r==4?2:r==8?3:0;Ie[i?e:e-4]=r==1||i==g1?l=&gt;{if(!t)throw new Error(&quot;Could not find typed array for code &quot;+e);return!ee.copyBuffers&amp;&amp;(r===1||r===2&amp;&amp;!(l.byteOffset&amp;1)||r===4&amp;&amp;!(l.byteOffset&amp;3)||r===8&amp;&amp;!(l.byteOffset&amp;7))?new t(l.buffer,l.byteOffset,l.byteLength&gt;&gt;s):new t(Uint8Array.prototype.slice.call(l,0).buffer)}:l=&gt;{if(!t)throw new Error(&quot;Could not find typed array for code &quot;+e);let o=new DataView(l.buffer,l.byteOffset,l.byteLength),a=l.length&gt;&gt;s,u=new t(a),c=o[n];for(let f=0;f&lt;a;f++)u[f]=c.call(o,f&lt;&lt;s,i);return u}}}function v1(){let t=ci(),e=S+te();for(let r=2;r&lt;t;r++){let i=ci();S+=i}let n=S;return S=e,Pe=[Ic(ci()),Ic(ci())],Pe.position0=0,Pe.position1=0,Pe.postBundlePosition=S,S=n,te()}function ci(){let t=z[S++]&amp;31;if(t&gt;23)switch(t){case 24:t=z[S++];break;case 25:t=qe.getUint16(S),S+=2;break;case 26:t=qe.getUint32(S),S+=4;break}return t}function rd(){if(ee.getShared){let t=Ey(()=&gt;(z=null,ee.getShared()))||{},e=t.structures||[];ee.sharedVersion=t.version,st=ee.sharedValues=t.packedValues,Ce===!0?ee.structures=Ce=e:Ce.splice.apply(Ce,[0,e.length].concat(e))}}function Ey(t){let e=Ar,n=S,r=Yo,i=Xs,s=Go,l=Ot,o=Pe,a=new Uint8Array(z.slice(0,Ar)),u=Ce,c=ee,f=qs,d=t();return Ar=e,S=n,Yo=r,Xs=i,Go=s,Ot=l,Pe=o,z=a,qs=f,Ce=u,ee=c,qe=new DataView(z.buffer,z.byteOffset,z.byteLength),d}function Lc(){z=null,Ot=null,Ce=null}const id=new Array(147);for(let t=0;t&lt;256;t++)id[t]=+(&quot;1e&quot;+Math.floor(45.15-t*.30103));let sd=new _y({useRecords:!1});const Ds=sd.decode;sd.decodeMultiple;let go;try{go=new TextEncoder}catch{}let Mc,Cy;const Da=typeof globalThis==&quot;object&quot;&amp;&amp;globalThis.Buffer,_l=typeof Da&lt;&quot;u&quot;,wu=_l?Da.allocUnsafeSlow:Uint8Array,Gh=_l?Da:Uint8Array,Yh=256,Xh=_l?4294967296:2144337920;let _u,_,me,p=0,An,De=null;const w1=61440,_1=/[\u0080-\uFFFF]/,ct=Symbol(&quot;record-id&quot;);let k1=class extends _y{constructor(e){super(e),this.offset=0;let n,r,i,s,l;e=e||{};let o=Gh.prototype.utf8Write?function(w,b,T){return _.utf8Write(w,b,T)}:go&amp;&amp;go.encodeInto?function(w,b){return go.encodeInto(w,_.subarray(b)).written}:!1,a=this,u=e.structures||e.saveStructures,c=e.maxSharedStructures;if(c==null&amp;&amp;(c=u?128:0),c&gt;8190)throw new Error(&quot;Maximum maxSharedStructure is 8190&quot;);let f=e.sequential;f&amp;&amp;(c=0),this.structures||(this.structures=[]),this.saveStructures&amp;&amp;(this.saveShared=this.saveStructures);let d,h,y=e.sharedValues,k;if(y){k=Object.create(null);for(let w=0,b=y.length;w&lt;b;w++)k[y[w]]=w}let F=[],v=0,g=0;this.mapEncode=function(w,b){if(this._keyMap&amp;&amp;!this._mapped)switch(w.constructor.name){case&quot;Array&quot;:w=w.map(T=&gt;this.encodeKeys(T));break}return this.encode(w,b)},this.encode=function(w,b){if(_||(_=new wu(8192),me=new DataView(_.buffer,0,8192),p=0),An=_.length-10,An-p&lt;2048?(_=new wu(_.length),me=new DataView(_.buffer,0,_.length),An=_.length-10,p=0):b===tp&amp;&amp;(p=p+7&amp;2147483640),n=p,a.useSelfDescribedHeader&amp;&amp;(me.setUint32(p,3654940416),p+=3),l=a.structuredClone?new Map:null,a.bundleStrings&amp;&amp;typeof w!=&quot;string&quot;?(De=[],De.size=1/0):De=null,r=a.structures,r){if(r.uninitialized){let R=a.getShared()||{};a.structures=r=R.structures||[],a.sharedVersion=R.version;let C=a.sharedValues=R.packedValues;if(C){k={};for(let E=0,I=C.length;E&lt;I;E++)k[C[E]]=E}}let T=r.length;if(T&gt;c&amp;&amp;!f&amp;&amp;(T=c),!r.transitions){r.transitions=Object.create(null);for(let R=0;R&lt;T;R++){let C=r[R];if(!C)continue;let E,I=r.transitions;for(let D=0,B=C.length;D&lt;B;D++){I[ct]===void 0&amp;&amp;(I[ct]=R);let H=C[D];E=I[H],E||(E=I[H]=Object.create(null)),I=E}I[ct]=R|1048576}}f||(r.nextId=T)}if(i&amp;&amp;(i=!1),s=r||[],h=k,e.pack){let T=new Map;if(T.values=[],T.encoder=a,T.maxValues=e.maxPrivatePackedValues||(k?16:1/0),T.objectMap=k||!1,T.samplingPackedValues=d,mo(w,T),T.values.length&gt;0){_[p++]=216,_[p++]=51,Gt(4);let R=T.values;m(R),Gt(0),Gt(0),h=Object.create(k||null);for(let C=0,E=R.length;C&lt;E;C++)h[R[C]]=C}}_u=b&amp;Su;try{if(_u)return;if(m(w),De&amp;&amp;ep(n,m),a.offset=p,l&amp;&amp;l.idsToInsert){p+=l.idsToInsert.length*2,p&gt;An&amp;&amp;L(p),a.offset=p;let T=E1(_.subarray(n,p),l.idsToInsert);return l=null,T}return b&amp;tp?(_.start=n,_.end=p,_):_.subarray(n,p)}finally{if(r){if(g&lt;10&amp;&amp;g++,r.length&gt;c&amp;&amp;(r.length=c),v&gt;1e4)r.transitions=null,g=0,v=0,F.length&gt;0&amp;&amp;(F=[]);else if(F.length&gt;0&amp;&amp;!f){for(let T=0,R=F.length;T&lt;R;T++)F[T][ct]=void 0;F=[]}}if(i&amp;&amp;a.saveShared){a.structures.length&gt;c&amp;&amp;(a.structures=a.structures.slice(0,c));let T=_.subarray(n,p);return a.updateSharedData()===!1?a.encode(w):T}b&amp;C1&amp;&amp;(p=n)}},this.findCommonStringsToPack=()=&gt;(d=new Map,k||(k=Object.create(null)),w=&gt;{let b=w&amp;&amp;w.threshold||4,T=this.pack?w.maxPrivatePackedValues||16:0;y||(y=this.sharedValues=[]);for(let[R,C]of d)C.count&gt;b&amp;&amp;(k[R]=T++,y.push(R),i=!0);for(;this.saveShared&amp;&amp;this.updateSharedData()===!1;);d=null});const m=w=&gt;{p&gt;An&amp;&amp;(_=L(p));var b=typeof w,T;if(b===&quot;string&quot;){if(h){let I=h[w];if(I&gt;=0){I&lt;16?_[p++]=I+224:(_[p++]=198,I&amp;1?m(15-I&gt;&gt;1):m(I-16&gt;&gt;1));return}else if(d&amp;&amp;!e.pack){let D=d.get(w);D?D.count++:d.set(w,{count:1})}}let R=w.length;if(De&amp;&amp;R&gt;=4&amp;&amp;R&lt;1024){if((De.size+=R)&gt;w1){let D,B=(De[0]?De[0].length*3+De[1].length:0)+10;p+B&gt;An&amp;&amp;(_=L(p+B)),_[p++]=217,_[p++]=223,_[p++]=249,_[p++]=De.position?132:130,_[p++]=26,D=p-n,p+=4,De.position&amp;&amp;ep(n,m),De=[&quot;&quot;,&quot;&quot;],De.size=0,De.position=D}let I=_1.test(w);De[I?0:1]+=w,_[p++]=I?206:207,m(R);return}let C;R&lt;32?C=1:R&lt;256?C=2:R&lt;65536?C=3:C=5;let E=R*3;if(p+E&gt;An&amp;&amp;(_=L(p+E)),R&lt;64||!o){let I,D,B,H=p+C;for(I=0;I&lt;R;I++)D=w.charCodeAt(I),D&lt;128?_[H++]=D:D&lt;2048?(_[H++]=D&gt;&gt;6|192,_[H++]=D&amp;63|128):(D&amp;64512)===55296&amp;&amp;((B=w.charCodeAt(I+1))&amp;64512)===56320?(D=65536+((D&amp;1023)&lt;&lt;10)+(B&amp;1023),I++,_[H++]=D&gt;&gt;18|240,_[H++]=D&gt;&gt;12&amp;63|128,_[H++]=D&gt;&gt;6&amp;63|128,_[H++]=D&amp;63|128):(_[H++]=D&gt;&gt;12|224,_[H++]=D&gt;&gt;6&amp;63|128,_[H++]=D&amp;63|128);T=H-p-C}else T=o(w,p+C,E);T&lt;24?_[p++]=96|T:T&lt;256?(C&lt;2&amp;&amp;_.copyWithin(p+2,p+1,p+1+T),_[p++]=120,_[p++]=T):T&lt;65536?(C&lt;3&amp;&amp;_.copyWithin(p+3,p+2,p+2+T),_[p++]=121,_[p++]=T&gt;&gt;8,_[p++]=T&amp;255):(C&lt;5&amp;&amp;_.copyWithin(p+5,p+3,p+3+T),_[p++]=122,me.setUint32(p,T),p+=4),p+=T}else if(b===&quot;number&quot;)if(!this.alwaysUseFloat&amp;&amp;w&gt;&gt;&gt;0===w)w&lt;24?_[p++]=w:w&lt;256?(_[p++]=24,_[p++]=w):w&lt;65536?(_[p++]=25,_[p++]=w&gt;&gt;8,_[p++]=w&amp;255):(_[p++]=26,me.setUint32(p,w),p+=4);else if(!this.alwaysUseFloat&amp;&amp;w&gt;&gt;0===w)w&gt;=-24?_[p++]=31-w:w&gt;=-256?(_[p++]=56,_[p++]=~w):w&gt;=-65536?(_[p++]=57,me.setUint16(p,~w),p+=2):(_[p++]=58,me.setUint32(p,~w),p+=4);else{let R;if((R=this.useFloat32)&gt;0&amp;&amp;w&lt;4294967296&amp;&amp;w&gt;=-2147483648){_[p++]=250,me.setFloat32(p,w);let C;if(R&lt;4||(C=w*id[(_[p]&amp;127)&lt;&lt;1|_[p+1]&gt;&gt;7])&gt;&gt;0===C){p+=4;return}else p--}_[p++]=251,me.setFloat64(p,w),p+=8}else if(b===&quot;object&quot;)if(!w)_[p++]=246;else{if(l){let C=l.get(w);if(C){if(_[p++]=216,_[p++]=29,_[p++]=25,!C.references){let E=l.idsToInsert||(l.idsToInsert=[]);C.references=[],E.push(C)}C.references.push(p-n),p+=2;return}else l.set(w,{offset:p-n})}let R=w.constructor;if(R===Object)O(w);else if(R===Array){T=w.length,T&lt;24?_[p++]=128|T:Gt(T);for(let C=0;C&lt;T;C++)m(w[C])}else if(R===Map)if((this.mapsAsObjects?this.useTag259ForMaps!==!1:this.useTag259ForMaps)&amp;&amp;(_[p++]=217,_[p++]=1,_[p++]=3),T=w.size,T&lt;24?_[p++]=160|T:T&lt;256?(_[p++]=184,_[p++]=T):T&lt;65536?(_[p++]=185,_[p++]=T&gt;&gt;8,_[p++]=T&amp;255):(_[p++]=186,me.setUint32(p,T),p+=4),a.keyMap)for(let[C,E]of w)m(a.encodeKey(C)),m(E);else for(let[C,E]of w)m(C),m(E);else{for(let C=0,E=Mc.length;C&lt;E;C++){let I=Cy[C];if(w instanceof I){let D=Mc[C],B=D.tag;B==null&amp;&amp;(B=D.getTag&amp;&amp;D.getTag.call(this,w)),B&lt;24?_[p++]=192|B:B&lt;256?(_[p++]=216,_[p++]=B):B&lt;65536?(_[p++]=217,_[p++]=B&gt;&gt;8,_[p++]=B&amp;255):B&gt;-1&amp;&amp;(_[p++]=218,me.setUint32(p,B),p+=4),D.encode.call(this,w,m,L);return}}if(w[Symbol.iterator]){if(_u){let C=new Error(&quot;Iterable should be serialized as iterator&quot;);throw C.iteratorNotHandled=!0,C}_[p++]=159;for(let C of w)m(C);_[p++]=255;return}if(w[Symbol.asyncIterator]||ku(w)){let C=new Error(&quot;Iterable/blob should be serialized as iterator&quot;);throw C.iteratorNotHandled=!0,C}if(this.useToJSON&amp;&amp;w.toJSON){const C=w.toJSON();if(C!==w)return m(C)}O(w)}}else if(b===&quot;boolean&quot;)_[p++]=w?245:244;else if(b===&quot;bigint&quot;){if(w&lt;BigInt(1)&lt;&lt;BigInt(64)&amp;&amp;w&gt;=0)_[p++]=27,me.setBigUint64(p,w);else if(w&gt;-(BigInt(1)&lt;&lt;BigInt(64))&amp;&amp;w&lt;0)_[p++]=59,me.setBigUint64(p,-w-BigInt(1));else if(this.largeBigIntToFloat)_[p++]=251,me.setFloat64(p,Number(w));else{w&gt;=BigInt(0)?_[p++]=194:(_[p++]=195,w=BigInt(-1)-w);let R=[];for(;w;)R.push(Number(w&amp;BigInt(255))),w&gt;&gt;=BigInt(8);Pc(new Uint8Array(R.reverse()),L);return}p+=8}else if(b===&quot;undefined&quot;)_[p++]=247;else throw new Error(&quot;Unknown type: &quot;+b)},O=this.useRecords===!1?this.variableMapSize?w=&gt;{let b=Object.keys(w),T=Object.values(w),R=b.length;if(R&lt;24?_[p++]=160|R:R&lt;256?(_[p++]=184,_[p++]=R):R&lt;65536?(_[p++]=185,_[p++]=R&gt;&gt;8,_[p++]=R&amp;255):(_[p++]=186,me.setUint32(p,R),p+=4),a.keyMap)for(let C=0;C&lt;R;C++)m(a.encodeKey(b[C])),m(T[C]);else for(let C=0;C&lt;R;C++)m(b[C]),m(T[C])}:w=&gt;{_[p++]=185;let b=p-n;p+=2;let T=0;if(a.keyMap)for(let R in w)(typeof w.hasOwnProperty!=&quot;function&quot;||w.hasOwnProperty(R))&amp;&amp;(m(a.encodeKey(R)),m(w[R]),T++);else for(let R in w)(typeof w.hasOwnProperty!=&quot;function&quot;||w.hasOwnProperty(R))&amp;&amp;(m(R),m(w[R]),T++);_[b+++n]=T&gt;&gt;8,_[b+n]=T&amp;255}:(w,b)=&gt;{let T,R=s.transitions||(s.transitions=Object.create(null)),C=0,E=0,I,D;if(this.keyMap){D=Object.keys(w).map(H=&gt;this.encodeKey(H)),E=D.length;for(let H=0;H&lt;E;H++){let cr=D[H];T=R[cr],T||(T=R[cr]=Object.create(null),C++),R=T}}else for(let H in w)(typeof w.hasOwnProperty!=&quot;function&quot;||w.hasOwnProperty(H))&amp;&amp;(T=R[H],T||(R[ct]&amp;1048576&amp;&amp;(I=R[ct]&amp;65535),T=R[H]=Object.create(null),C++),R=T,E++);let B=R[ct];if(B!==void 0)B&amp;=65535,_[p++]=217,_[p++]=B&gt;&gt;8|224,_[p++]=B&amp;255;else if(D||(D=R.__keys__||(R.__keys__=Object.keys(w))),I===void 0?(B=s.nextId++,B||(B=0,s.nextId=1),B&gt;=Yh&amp;&amp;(s.nextId=(B=c)+1)):B=I,s[B]=D,B&lt;c){_[p++]=217,_[p++]=B&gt;&gt;8|224,_[p++]=B&amp;255,R=s.transitions;for(let H=0;H&lt;E;H++)(R[ct]===void 0||R[ct]&amp;1048576)&amp;&amp;(R[ct]=B),R=R[D[H]];R[ct]=B|1048576,i=!0}else{if(R[ct]=B,me.setUint32(p,3655335680),p+=3,C&amp;&amp;(v+=g*C),F.length&gt;=Yh-c&amp;&amp;(F.shift()[ct]=void 0),F.push(R),Gt(E+2),m(57344+B),m(D),b)return;for(let H in w)(typeof w.hasOwnProperty!=&quot;function&quot;||w.hasOwnProperty(H))&amp;&amp;m(w[H]);return}if(E&lt;24?_[p++]=128|E:Gt(E),!b)for(let H in w)(typeof w.hasOwnProperty!=&quot;function&quot;||w.hasOwnProperty(H))&amp;&amp;m(w[H])},L=w=&gt;{let b;if(w&gt;16777216){if(w-n&gt;Xh)throw new Error(&quot;Encoded buffer would be larger than maximum buffer size&quot;);b=Math.min(Xh,Math.round(Math.max((w-n)*(w&gt;67108864?1.25:2),4194304)/4096)*4096)}else b=(Math.max(w-n&lt;&lt;2,_.length-1)&gt;&gt;12)+1&lt;&lt;12;let T=new wu(b);return me=new DataView(T.buffer,0,b),_.copy?_.copy(T,0,n,w):T.set(_.slice(n,w)),p-=n,n=0,An=T.length-10,_=T};let U=100,$=1e3;this.encodeAsIterable=function(w,b){return rt(w,b,V)},this.encodeAsAsyncIterable=function(w,b){return rt(w,b,On)};function*V(w,b,T){let R=w.constructor;if(R===Object){let C=a.useRecords!==!1;C?O(w,!0):qh(Object.keys(w).length,160);for(let E in w){let I=w[E];C||m(E),I&amp;&amp;typeof I==&quot;object&quot;?b[E]?yield*V(I,b[E]):yield*he(I,b,E):m(I)}}else if(R===Array){let C=w.length;Gt(C);for(let E=0;E&lt;C;E++){let I=w[E];I&amp;&amp;(typeof I==&quot;object&quot;||p-n&gt;U)?b.element?yield*V(I,b.element):yield*he(I,b,&quot;element&quot;):m(I)}}else if(w[Symbol.iterator]&amp;&amp;!w.buffer){_[p++]=159;for(let C of w)C&amp;&amp;(typeof C==&quot;object&quot;||p-n&gt;U)?b.element?yield*V(C,b.element):yield*he(C,b,&quot;element&quot;):m(C);_[p++]=255}else ku(w)?(qh(w.size,64),yield _.subarray(n,p),yield w,G()):w[Symbol.asyncIterator]?(_[p++]=159,yield _.subarray(n,p),yield w,G(),_[p++]=255):m(w);T&amp;&amp;p&gt;n?yield _.subarray(n,p):p-n&gt;U&amp;&amp;(yield _.subarray(n,p),G())}function*he(w,b,T){let R=p-n;try{m(w),p-n&gt;U&amp;&amp;(yield _.subarray(n,p),G())}catch(C){if(C.iteratorNotHandled)b[T]={},p=n+R,yield*V.call(this,w,b[T]);else throw C}}function G(){U=$,a.encode(null,Su)}function rt(w,b,T){return b&amp;&amp;b.chunkThreshold?U=$=b.chunkThreshold:U=100,w&amp;&amp;typeof w==&quot;object&quot;?(a.encode(null,Su),T(w,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(w)]}async function*On(w,b){for(let T of V(w,b,!0)){let R=T.constructor;if(R===Gh||R===Uint8Array)yield T;else if(ku(T)){let C=T.stream().getReader(),E;for(;!(E=await C.read()).done;)yield E.value}else if(T[Symbol.asyncIterator])for await(let C of T)G(),C?yield*On(C,b.async||(b.async={})):yield a.encode(C);else yield T}}}useBuffer(e){_=e,me=new DataView(_.buffer,_.byteOffset,_.byteLength),p=0}clearSharedData(){this.structures&amp;&amp;(this.structures=[]),this.sharedValues&amp;&amp;(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let n=this.structures.slice(0),r=new Oy(n,this.sharedValues,this.sharedVersion),i=this.saveShared(r,s=&gt;(s&amp;&amp;s.version||0)==e);return i===!1?(r=this.getShared()||{},this.structures=r.structures||[],this.sharedValues=r.packedValues,this.sharedVersion=r.version,this.structures.nextId=this.structures.length):n.forEach((s,l)=&gt;this.structures[l]=s),i}};function qh(t,e){t&lt;24?_[p++]=e|t:t&lt;256?(_[p++]=e|24,_[p++]=t):t&lt;65536?(_[p++]=e|25,_[p++]=t&gt;&gt;8,_[p++]=t&amp;255):(_[p++]=e|26,me.setUint32(p,t),p+=4)}class Oy{constructor(e,n,r){this.structures=e,this.packedValues=n,this.version=r}}function Gt(t){t&lt;24?_[p++]=128|t:t&lt;256?(_[p++]=152,_[p++]=t):t&lt;65536?(_[p++]=153,_[p++]=t&gt;&gt;8,_[p++]=t&amp;255):(_[p++]=154,me.setUint32(p,t),p+=4)}const S1=typeof Blob&gt;&quot;u&quot;?function(){}:Blob;function ku(t){if(t instanceof S1)return!0;let e=t[Symbol.toStringTag];return e===&quot;Blob&quot;||e===&quot;File&quot;}function mo(t,e){switch(typeof t){case&quot;string&quot;:if(t.length&gt;3){if(e.objectMap[t]&gt;-1||e.values.length&gt;=e.maxValues)return;let r=e.get(t);if(r)++r.count==2&amp;&amp;e.values.push(t);else if(e.set(t,{count:1}),e.samplingPackedValues){let i=e.samplingPackedValues.get(t);i?i.count++:e.samplingPackedValues.set(t,{count:1})}}break;case&quot;object&quot;:if(t)if(t instanceof Array)for(let r=0,i=t.length;r&lt;i;r++)mo(t[r],e);else{let r=!e.encoder.useRecords;for(var n in t)t.hasOwnProperty(n)&amp;&amp;(r&amp;&amp;mo(n,e),mo(t[n],e))}break;case&quot;function&quot;:console.log(t)}}const x1=new Uint8Array(new Uint16Array([1]).buffer)[0]==1;Cy=[Date,Set,Error,RegExp,br,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,typeof BigUint64Array&gt;&quot;u&quot;?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,typeof BigInt64Array&gt;&quot;u&quot;?function(){}:BigInt64Array,Float32Array,Float64Array,Oy];Mc=[{tag:1,encode(t,e){let n=t.getTime()/1e3;(this.useTimestamp32||t.getMilliseconds()===0)&amp;&amp;n&gt;=0&amp;&amp;n&lt;4294967296?(_[p++]=26,me.setUint32(p,n),p+=4):(_[p++]=251,me.setFloat64(p,n),p+=8)}},{tag:258,encode(t,e){let n=Array.from(t);e(n)}},{tag:27,encode(t,e){e([t.name,t.message])}},{tag:27,encode(t,e){e([&quot;RegExp&quot;,t.source,t.flags])}},{getTag(t){return t.tag},encode(t,e){e(t.value)}},{encode(t,e,n){Pc(t,n)}},{getTag(t){if(t.constructor===Uint8Array&amp;&amp;(this.tagUint8Array||_l&amp;&amp;this.tagUint8Array!==!1))return 64},encode(t,e,n){Pc(t,n)}},Kt(68,1),Kt(69,2),Kt(70,4),Kt(71,8),Kt(72,1),Kt(77,2),Kt(78,4),Kt(79,8),Kt(85,4),Kt(86,8),{encode(t,e){let n=t.packedValues||[],r=t.structures||[];if(n.values.length&gt;0){_[p++]=216,_[p++]=51,Gt(4);let i=n.values;e(i),Gt(0),Gt(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let s=0,l=i.length;s&lt;l;s++)packedObjectMap[i[s]]=s}if(r){me.setUint32(p,3655335424),p+=3;let i=r.slice(0);i.unshift(57344),i.push(new br(t.version,1399353956)),e(i)}else e(new br(t.version,1399353956))}}];function Kt(t,e){return!x1&amp;&amp;e&gt;1&amp;&amp;(t-=4),{tag:t,encode:function(r,i){let s=r.byteLength,l=r.byteOffset||0,o=r.buffer||r;i(_l?Da.from(o,l,s):new Uint8Array(o,l,s))}}}function Pc(t,e){let n=t.byteLength;n&lt;24?_[p++]=64+n:n&lt;256?(_[p++]=88,_[p++]=n):n&lt;65536?(_[p++]=89,_[p++]=n&gt;&gt;8,_[p++]=n&amp;255):(_[p++]=90,me.setUint32(p,n),p+=4),p+n&gt;=_.length&amp;&amp;e(p+n),_.set(t.buffer?t:new Uint8Array(t),p),p+=n}function E1(t,e){let n,r=e.length*2,i=t.length-r;e.sort((s,l)=&gt;s.offset&gt;l.offset?1:-1);for(let s=0;s&lt;e.length;s++){let l=e[s];l.id=s;for(let o of l.references)t[o++]=s&gt;&gt;8,t[o]=s&amp;255}for(;n=e.pop();){let s=n.offset;t.copyWithin(s+r,s,i),r-=2;let l=s+r;t[l++]=216,t[l++]=28,i=s}return t}function ep(t,e){me.setUint32(De.position+t,p-De.position-t+1);let n=De;De=null,e(n[0]),e(n[1])}let ld=new k1({useRecords:!1});const Ty=ld.encode;ld.encodeAsIterable;ld.encodeAsAsyncIterable;const tp=512,C1=1024,Su=2048;var oe;(function(t){t.assertEqual=i=&gt;{};function e(i){}t.assertIs=e;function n(i){throw new Error}t.assertNever=n,t.arrayToEnum=i=&gt;{const s={};for(const l of i)s[l]=l;return s},t.getValidEnumValues=i=&gt;{const s=t.objectKeys(i).filter(o=&gt;typeof i[i[o]]!=&quot;number&quot;),l={};for(const o of s)l[o]=i[o];return t.objectValues(l)},t.objectValues=i=&gt;t.objectKeys(i).map(function(s){return i[s]}),t.objectKeys=typeof Object.keys==&quot;function&quot;?i=&gt;Object.keys(i):i=&gt;{const s=[];for(const l in i)Object.prototype.hasOwnProperty.call(i,l)&amp;&amp;s.push(l);return s},t.find=(i,s)=&gt;{for(const l of i)if(s(l))return l},t.isInteger=typeof Number.isInteger==&quot;function&quot;?i=&gt;Number.isInteger(i):i=&gt;typeof i==&quot;number&quot;&amp;&amp;Number.isFinite(i)&amp;&amp;Math.floor(i)===i;function r(i,s=&quot; | &quot;){return i.map(l=&gt;typeof l==&quot;string&quot;?`&#39;${l}&#39;`:l).join(s)}t.joinValues=r,t.jsonStringifyReplacer=(i,s)=&gt;typeof s==&quot;bigint&quot;?s.toString():s})(oe||(oe={}));var np;(function(t){t.mergeShapes=(e,n)=&gt;({...e,...n})})(np||(np={}));const j=oe.arrayToEnum([&quot;string&quot;,&quot;nan&quot;,&quot;number&quot;,&quot;integer&quot;,&quot;float&quot;,&quot;boolean&quot;,&quot;date&quot;,&quot;bigint&quot;,&quot;symbol&quot;,&quot;function&quot;,&quot;undefined&quot;,&quot;null&quot;,&quot;array&quot;,&quot;object&quot;,&quot;unknown&quot;,&quot;promise&quot;,&quot;void&quot;,&quot;never&quot;,&quot;map&quot;,&quot;set&quot;]),In=t=&gt;{switch(typeof t){case&quot;undefined&quot;:return j.undefined;case&quot;string&quot;:return j.string;case&quot;number&quot;:return Number.isNaN(t)?j.nan:j.number;case&quot;boolean&quot;:return j.boolean;case&quot;function&quot;:return j.function;case&quot;bigint&quot;:return j.bigint;case&quot;symbol&quot;:return j.symbol;case&quot;object&quot;:return Array.isArray(t)?j.array:t===null?j.null:t.then&amp;&amp;typeof t.then==&quot;function&quot;&amp;&amp;t.catch&amp;&amp;typeof t.catch==&quot;function&quot;?j.promise:typeof Map&lt;&quot;u&quot;&amp;&amp;t instanceof Map?j.map:typeof Set&lt;&quot;u&quot;&amp;&amp;t instanceof Set?j.set:typeof Date&lt;&quot;u&quot;&amp;&amp;t instanceof Date?j.date:j.object;default:return j.unknown}},N=oe.arrayToEnum([&quot;invalid_type&quot;,&quot;invalid_literal&quot;,&quot;custom&quot;,&quot;invalid_union&quot;,&quot;invalid_union_discriminator&quot;,&quot;invalid_enum_value&quot;,&quot;unrecognized_keys&quot;,&quot;invalid_arguments&quot;,&quot;invalid_return_type&quot;,&quot;invalid_date&quot;,&quot;invalid_string&quot;,&quot;too_small&quot;,&quot;too_big&quot;,&quot;invalid_intersection_types&quot;,&quot;not_multiple_of&quot;,&quot;not_finite&quot;]);class Sn extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=&gt;{this.issues=[...this.issues,r]},this.addIssues=(r=[])=&gt;{this.issues=[...this.issues,...r]};const n=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,n):this.__proto__=n,this.name=&quot;ZodError&quot;,this.issues=e}format(e){const n=e||function(s){return s.message},r={_errors:[]},i=s=&gt;{for(const l of s.issues)if(l.code===&quot;invalid_union&quot;)l.unionErrors.map(i);else if(l.code===&quot;invalid_return_type&quot;)i(l.returnTypeError);else if(l.code===&quot;invalid_arguments&quot;)i(l.argumentsError);else if(l.path.length===0)r._errors.push(n(l));else{let o=r,a=0;for(;a&lt;l.path.length;){const u=l.path[a];a===l.path.length-1?(o[u]=o[u]||{_errors:[]},o[u]._errors.push(n(l))):o[u]=o[u]||{_errors:[]},o=o[u],a++}}};return i(this),r}static assert(e){if(!(e instanceof Sn))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,oe.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=n=&gt;n.message){const n={},r=[];for(const i of this.issues)if(i.path.length&gt;0){const s=i.path[0];n[s]=n[s]||[],n[s].push(e(i))}else r.push(e(i));return{formErrors:r,fieldErrors:n}}get formErrors(){return this.flatten()}}Sn.create=t=&gt;new Sn(t);const Uc=(t,e)=&gt;{let n;switch(t.code){case N.invalid_type:t.received===j.undefined?n=&quot;Required&quot;:n=`Expected ${t.expected}, received ${t.received}`;break;case N.invalid_literal:n=`Invalid literal value, expected ${JSON.stringify(t.expected,oe.jsonStringifyReplacer)}`;break;case N.unrecognized_keys:n=`Unrecognized key(s) in object: ${oe.joinValues(t.keys,&quot;, &quot;)}`;break;case N.invalid_union:n=&quot;Invalid input&quot;;break;case N.invalid_union_discriminator:n=`Invalid discriminator value. Expected ${oe.joinValues(t.options)}`;break;case N.invalid_enum_value:n=`Invalid enum value. Expected ${oe.joinValues(t.options)}, received &#39;${t.received}&#39;`;break;case N.invalid_arguments:n=&quot;Invalid function arguments&quot;;break;case N.invalid_return_type:n=&quot;Invalid function return type&quot;;break;case N.invalid_date:n=&quot;Invalid date&quot;;break;case N.invalid_string:typeof t.validation==&quot;object&quot;?&quot;includes&quot;in t.validation?(n=`Invalid input: must include &quot;${t.validation.includes}&quot;`,typeof t.validation.position==&quot;number&quot;&amp;&amp;(n=`${n} at one or more positions greater than or equal to ${t.validation.position}`)):&quot;startsWith&quot;in t.validation?n=`Invalid input: must start with &quot;${t.validation.startsWith}&quot;`:&quot;endsWith&quot;in t.validation?n=`Invalid input: must end with &quot;${t.validation.endsWith}&quot;`:oe.assertNever(t.validation):t.validation!==&quot;regex&quot;?n=`Invalid ${t.validation}`:n=&quot;Invalid&quot;;break;case N.too_small:t.type===&quot;array&quot;?n=`Array must contain ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;at least&quot;:&quot;more than&quot;} ${t.minimum} element(s)`:t.type===&quot;string&quot;?n=`String must contain ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;at least&quot;:&quot;over&quot;} ${t.minimum} character(s)`:t.type===&quot;number&quot;?n=`Number must be ${t.exact?&quot;exactly equal to &quot;:t.inclusive?&quot;greater than or equal to &quot;:&quot;greater than &quot;}${t.minimum}`:t.type===&quot;bigint&quot;?n=`Number must be ${t.exact?&quot;exactly equal to &quot;:t.inclusive?&quot;greater than or equal to &quot;:&quot;greater than &quot;}${t.minimum}`:t.type===&quot;date&quot;?n=`Date must be ${t.exact?&quot;exactly equal to &quot;:t.inclusive?&quot;greater than or equal to &quot;:&quot;greater than &quot;}${new Date(Number(t.minimum))}`:n=&quot;Invalid input&quot;;break;case N.too_big:t.type===&quot;array&quot;?n=`Array must contain ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;at most&quot;:&quot;less than&quot;} ${t.maximum} element(s)`:t.type===&quot;string&quot;?n=`String must contain ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;at most&quot;:&quot;under&quot;} ${t.maximum} character(s)`:t.type===&quot;number&quot;?n=`Number must be ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;less than or equal to&quot;:&quot;less than&quot;} ${t.maximum}`:t.type===&quot;bigint&quot;?n=`BigInt must be ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;less than or equal to&quot;:&quot;less than&quot;} ${t.maximum}`:t.type===&quot;date&quot;?n=`Date must be ${t.exact?&quot;exactly&quot;:t.inclusive?&quot;smaller than or equal to&quot;:&quot;smaller than&quot;} ${new Date(Number(t.maximum))}`:n=&quot;Invalid input&quot;;break;case N.custom:n=&quot;Invalid input&quot;;break;case N.invalid_intersection_types:n=&quot;Intersection results could not be merged&quot;;break;case N.not_multiple_of:n=`Number must be a multiple of ${t.multipleOf}`;break;case N.not_finite:n=&quot;Number must be finite&quot;;break;default:n=e.defaultError,oe.assertNever(t)}return{message:n}};let O1=Uc;function T1(){return O1}const A1=t=&gt;{const{data:e,path:n,errorMaps:r,issueData:i}=t,s=[...n,...i.path||[]],l={...i,path:s};if(i.message!==void 0)return{...i,path:s,message:i.message};let o=&quot;&quot;;const a=r.filter(u=&gt;!!u).slice().reverse();for(const u of a)o=u(l,{data:e,defaultError:o}).message;return{...i,path:s,message:o}};function M(t,e){const n=T1(),r=A1({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,n,n===Uc?void 0:Uc].filter(i=&gt;!!i)});t.common.issues.push(r)}class _t{constructor(){this.value=&quot;valid&quot;}dirty(){this.value===&quot;valid&quot;&amp;&amp;(this.value=&quot;dirty&quot;)}abort(){this.value!==&quot;aborted&quot;&amp;&amp;(this.value=&quot;aborted&quot;)}static mergeArray(e,n){const r=[];for(const i of n){if(i.status===&quot;aborted&quot;)return K;i.status===&quot;dirty&quot;&amp;&amp;e.dirty(),r.push(i.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,n){const r=[];for(const i of n){const s=await i.key,l=await i.value;r.push({key:s,value:l})}return _t.mergeObjectSync(e,r)}static mergeObjectSync(e,n){const r={};for(const i of n){const{key:s,value:l}=i;if(s.status===&quot;aborted&quot;||l.status===&quot;aborted&quot;)return K;s.status===&quot;dirty&quot;&amp;&amp;e.dirty(),l.status===&quot;dirty&quot;&amp;&amp;e.dirty(),s.value!==&quot;__proto__&quot;&amp;&amp;(typeof l.value&lt;&quot;u&quot;||i.alwaysSet)&amp;&amp;(r[s.value]=l.value)}return{status:e.value,value:r}}}const K=Object.freeze({status:&quot;aborted&quot;}),_s=t=&gt;({status:&quot;dirty&quot;,value:t}),Pt=t=&gt;({status:&quot;valid&quot;,value:t}),rp=t=&gt;t.status===&quot;aborted&quot;,ip=t=&gt;t.status===&quot;dirty&quot;,ji=t=&gt;t.status===&quot;valid&quot;,Xo=t=&gt;typeof Promise&lt;&quot;u&quot;&amp;&amp;t instanceof Promise;var W;(function(t){t.errToObj=e=&gt;typeof e==&quot;string&quot;?{message:e}:e||{},t.toString=e=&gt;typeof e==&quot;string&quot;?e:e==null?void 0:e.message})(W||(W={}));class tr{constructor(e,n,r,i){this._cachedPath=[],this.parent=e,this.data=n,this._path=r,this._key=i}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const sp=(t,e)=&gt;{if(ji(e))return{success:!0,data:e.value};if(!t.common.issues.length)throw new Error(&quot;Validation failed but no issues detected.&quot;);return{success:!1,get error(){if(this._error)return this._error;const n=new Sn(t.common.issues);return this._error=n,this._error}}};function X(t){if(!t)return{};const{errorMap:e,invalid_type_error:n,required_error:r,description:i}=t;if(e&amp;&amp;(n||r))throw new Error(`Can&#39;t use &quot;invalid_type_error&quot; or &quot;required_error&quot; in conjunction with custom error map.`);return e?{errorMap:e,description:i}:{errorMap:(l,o)=&gt;{const{message:a}=t;return l.code===&quot;invalid_enum_value&quot;?{message:a??o.defaultError}:typeof o.data&gt;&quot;u&quot;?{message:a??r??o.defaultError}:l.code!==&quot;invalid_type&quot;?{message:o.defaultError}:{message:a??n??o.defaultError}},description:i}}class le{get description(){return this._def.description}_getType(e){return In(e.data)}_getOrReturnCtx(e,n){return n||{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new _t,ctx:{common:e.parent.common,data:e.data,parsedType:In(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const n=this._parse(e);if(Xo(n))throw new Error(&quot;Synchronous parse encountered promise.&quot;);return n}_parseAsync(e){const n=this._parse(e);return Promise.resolve(n)}parse(e,n){const r=this.safeParse(e,n);if(r.success)return r.data;throw r.error}safeParse(e,n){const r={common:{issues:[],async:(n==null?void 0:n.async)??!1,contextualErrorMap:n==null?void 0:n.errorMap},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:In(e)},i=this._parseSync({data:e,path:r.path,parent:r});return sp(r,i)}&quot;~validate&quot;(e){var r,i;const n={common:{issues:[],async:!!this[&quot;~standard&quot;].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:In(e)};if(!this[&quot;~standard&quot;].async)try{const s=this._parseSync({data:e,path:[],parent:n});return ji(s)?{value:s.value}:{issues:n.common.issues}}catch(s){(i=(r=s==null?void 0:s.message)==null?void 0:r.toLowerCase())!=null&amp;&amp;i.includes(&quot;encountered&quot;)&amp;&amp;(this[&quot;~standard&quot;].async=!0),n.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:n}).then(s=&gt;ji(s)?{value:s.value}:{issues:n.common.issues})}async parseAsync(e,n){const r=await this.safeParseAsync(e,n);if(r.success)return r.data;throw r.error}async safeParseAsync(e,n){const r={common:{issues:[],contextualErrorMap:n==null?void 0:n.errorMap,async:!0},path:(n==null?void 0:n.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:In(e)},i=this._parse({data:e,path:r.path,parent:r}),s=await(Xo(i)?i:Promise.resolve(i));return sp(r,s)}refine(e,n){const r=i=&gt;typeof n==&quot;string&quot;||typeof n&gt;&quot;u&quot;?{message:n}:typeof n==&quot;function&quot;?n(i):n;return this._refinement((i,s)=&gt;{const l=e(i),o=()=&gt;s.addIssue({code:N.custom,...r(i)});return typeof Promise&lt;&quot;u&quot;&amp;&amp;l instanceof Promise?l.then(a=&gt;a?!0:(o(),!1)):l?!0:(o(),!1)})}refinement(e,n){return this._refinement((r,i)=&gt;e(r)?!0:(i.addIssue(typeof n==&quot;function&quot;?n(r,i):n),!1))}_refinement(e){return new Vi({schema:this,typeName:Q.ZodEffects,effect:{type:&quot;refinement&quot;,refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this[&quot;~standard&quot;]={version:1,vendor:&quot;zod&quot;,validate:n=&gt;this[&quot;~validate&quot;](n)}}optional(){return Xn.create(this,this._def)}nullable(){return Bi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return nn.create(this)}promise(){return na.create(this,this._def)}or(e){return ea.create([this,e],this._def)}and(e){return ta.create(this,e,this._def)}transform(e){return new Vi({...X(this._def),schema:this,typeName:Q.ZodEffects,effect:{type:&quot;transform&quot;,transform:e}})}default(e){const n=typeof e==&quot;function&quot;?e:()=&gt;e;return new Fc({...X(this._def),innerType:this,defaultValue:n,typeName:Q.ZodDefault})}brand(){return new Y1({typeName:Q.ZodBranded,type:this,...X(this._def)})}catch(e){const n=typeof e==&quot;function&quot;?e:()=&gt;e;return new $c({...X(this._def),innerType:this,catchValue:n,typeName:Q.ZodCatch})}describe(e){const n=this.constructor;return new n({...this._def,description:e})}pipe(e){return od.create(this,e)}readonly(){return Vc.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const R1=/^c[^\s-]{8,}$/i,N1=/^[0-9a-z]+$/,I1=/^[0-9A-HJKMNP-TV-Z]{26}$/i,D1=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,L1=/^[a-z0-9_-]{21}$/i,M1=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,P1=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,U1=/^(?!\.)(?!.*\.\.)([A-Z0-9_&#39;+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,b1=&quot;^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$&quot;;let xu;const z1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,j1=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,F1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,$1=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,V1=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,B1=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,Ay=&quot;((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))&quot;,W1=new RegExp(`^${Ay}$`);function Ry(t){let e=&quot;[0-5]\\d&quot;;t.precision?e=`${e}\\.\\d{${t.precision}}`:t.precision==null&amp;&amp;(e=`${e}(\\.\\d+)?`);const n=t.precision?&quot;+&quot;:&quot;?&quot;;return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${n}`}function H1(t){return new RegExp(`^${Ry(t)}$`)}function Z1(t){let e=`${Ay}T${Ry(t)}`;const n=[];return n.push(t.local?&quot;Z?&quot;:&quot;Z&quot;),t.offset&amp;&amp;n.push(&quot;([+-]\\d{2}:?\\d{2})&quot;),e=`${e}(${n.join(&quot;|&quot;)})`,new RegExp(`^${e}$`)}function K1(t,e){return!!((e===&quot;v4&quot;||!e)&amp;&amp;z1.test(t)||(e===&quot;v6&quot;||!e)&amp;&amp;F1.test(t))}function Q1(t,e){if(!M1.test(t))return!1;try{const[n]=t.split(&quot;.&quot;);if(!n)return!1;const r=n.replace(/-/g,&quot;+&quot;).replace(/_/g,&quot;/&quot;).padEnd(n.length+(4-n.length%4)%4,&quot;=&quot;),i=JSON.parse(atob(r));return!(typeof i!=&quot;object&quot;||i===null||&quot;typ&quot;in i&amp;&amp;(i==null?void 0:i.typ)!==&quot;JWT&quot;||!i.alg||e&amp;&amp;i.alg!==e)}catch{return!1}}function J1(t,e){return!!((e===&quot;v4&quot;||!e)&amp;&amp;j1.test(t)||(e===&quot;v6&quot;||!e)&amp;&amp;$1.test(t))}class $n extends le{_parse(e){if(this._def.coerce&amp;&amp;(e.data=String(e.data)),this._getType(e)!==j.string){const s=this._getOrReturnCtx(e);return M(s,{code:N.invalid_type,expected:j.string,received:s.parsedType}),K}const r=new _t;let i;for(const s of this._def.checks)if(s.kind===&quot;min&quot;)e.data.length&lt;s.value&amp;&amp;(i=this._getOrReturnCtx(e,i),M(i,{code:N.too_small,minimum:s.value,type:&quot;string&quot;,inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind===&quot;max&quot;)e.data.length&gt;s.value&amp;&amp;(i=this._getOrReturnCtx(e,i),M(i,{code:N.too_big,maximum:s.value,type:&quot;string&quot;,inclusive:!0,exact:!1,message:s.message}),r.dirty());else if(s.kind===&quot;length&quot;){const l=e.data.length&gt;s.value,o=e.data.length&lt;s.value;(l||o)&amp;&amp;(i=this._getOrReturnCtx(e,i),l?M(i,{code:N.too_big,maximum:s.value,type:&quot;string&quot;,inclusive:!0,exact:!0,message:s.message}):o&amp;&amp;M(i,{code:N.too_small,minimum:s.value,type:&quot;string&quot;,inclusive:!0,exact:!0,message:s.message}),r.dirty())}else if(s.kind===&quot;email&quot;)U1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;email&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;emoji&quot;)xu||(xu=new RegExp(b1,&quot;u&quot;)),xu.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;emoji&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;uuid&quot;)D1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;uuid&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;nanoid&quot;)L1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;nanoid&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;cuid&quot;)R1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;cuid&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;cuid2&quot;)N1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;cuid2&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;ulid&quot;)I1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;ulid&quot;,code:N.invalid_string,message:s.message}),r.dirty());else if(s.kind===&quot;url&quot;)try{new URL(e.data)}catch{i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;url&quot;,code:N.invalid_string,message:s.message}),r.dirty()}else s.kind===&quot;regex&quot;?(s.regex.lastIndex=0,s.regex.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;regex&quot;,code:N.invalid_string,message:s.message}),r.dirty())):s.kind===&quot;trim&quot;?e.data=e.data.trim():s.kind===&quot;includes&quot;?e.data.includes(s.value,s.position)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:{includes:s.value,position:s.position},message:s.message}),r.dirty()):s.kind===&quot;toLowerCase&quot;?e.data=e.data.toLowerCase():s.kind===&quot;toUpperCase&quot;?e.data=e.data.toUpperCase():s.kind===&quot;startsWith&quot;?e.data.startsWith(s.value)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:{startsWith:s.value},message:s.message}),r.dirty()):s.kind===&quot;endsWith&quot;?e.data.endsWith(s.value)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:{endsWith:s.value},message:s.message}),r.dirty()):s.kind===&quot;datetime&quot;?Z1(s).test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:&quot;datetime&quot;,message:s.message}),r.dirty()):s.kind===&quot;date&quot;?W1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:&quot;date&quot;,message:s.message}),r.dirty()):s.kind===&quot;time&quot;?H1(s).test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{code:N.invalid_string,validation:&quot;time&quot;,message:s.message}),r.dirty()):s.kind===&quot;duration&quot;?P1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;duration&quot;,code:N.invalid_string,message:s.message}),r.dirty()):s.kind===&quot;ip&quot;?K1(e.data,s.version)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;ip&quot;,code:N.invalid_string,message:s.message}),r.dirty()):s.kind===&quot;jwt&quot;?Q1(e.data,s.alg)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;jwt&quot;,code:N.invalid_string,message:s.message}),r.dirty()):s.kind===&quot;cidr&quot;?J1(e.data,s.version)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;cidr&quot;,code:N.invalid_string,message:s.message}),r.dirty()):s.kind===&quot;base64&quot;?V1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;base64&quot;,code:N.invalid_string,message:s.message}),r.dirty()):s.kind===&quot;base64url&quot;?B1.test(e.data)||(i=this._getOrReturnCtx(e,i),M(i,{validation:&quot;base64url&quot;,code:N.invalid_string,message:s.message}),r.dirty()):oe.assertNever(s);return{status:r.value,value:e.data}}_regex(e,n,r){return this.refinement(i=&gt;e.test(i),{validation:n,code:N.invalid_string,...W.errToObj(r)})}_addCheck(e){return new $n({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:&quot;email&quot;,...W.errToObj(e)})}url(e){return this._addCheck({kind:&quot;url&quot;,...W.errToObj(e)})}emoji(e){return this._addCheck({kind:&quot;emoji&quot;,...W.errToObj(e)})}uuid(e){return this._addCheck({kind:&quot;uuid&quot;,...W.errToObj(e)})}nanoid(e){return this._addCheck({kind:&quot;nanoid&quot;,...W.errToObj(e)})}cuid(e){return this._addCheck({kind:&quot;cuid&quot;,...W.errToObj(e)})}cuid2(e){return this._addCheck({kind:&quot;cuid2&quot;,...W.errToObj(e)})}ulid(e){return this._addCheck({kind:&quot;ulid&quot;,...W.errToObj(e)})}base64(e){return this._addCheck({kind:&quot;base64&quot;,...W.errToObj(e)})}base64url(e){return this._addCheck({kind:&quot;base64url&quot;,...W.errToObj(e)})}jwt(e){return this._addCheck({kind:&quot;jwt&quot;,...W.errToObj(e)})}ip(e){return this._addCheck({kind:&quot;ip&quot;,...W.errToObj(e)})}cidr(e){return this._addCheck({kind:&quot;cidr&quot;,...W.errToObj(e)})}datetime(e){return typeof e==&quot;string&quot;?this._addCheck({kind:&quot;datetime&quot;,precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:&quot;datetime&quot;,precision:typeof(e==null?void 0:e.precision)&gt;&quot;u&quot;?null:e==null?void 0:e.precision,offset:(e==null?void 0:e.offset)??!1,local:(e==null?void 0:e.local)??!1,...W.errToObj(e==null?void 0:e.message)})}date(e){return this._addCheck({kind:&quot;date&quot;,message:e})}time(e){return typeof e==&quot;string&quot;?this._addCheck({kind:&quot;time&quot;,precision:null,message:e}):this._addCheck({kind:&quot;time&quot;,precision:typeof(e==null?void 0:e.precision)&gt;&quot;u&quot;?null:e==null?void 0:e.precision,...W.errToObj(e==null?void 0:e.message)})}duration(e){return this._addCheck({kind:&quot;duration&quot;,...W.errToObj(e)})}regex(e,n){return this._addCheck({kind:&quot;regex&quot;,regex:e,...W.errToObj(n)})}includes(e,n){return this._addCheck({kind:&quot;includes&quot;,value:e,position:n==null?void 0:n.position,...W.errToObj(n==null?void 0:n.message)})}startsWith(e,n){return this._addCheck({kind:&quot;startsWith&quot;,value:e,...W.errToObj(n)})}endsWith(e,n){return this._addCheck({kind:&quot;endsWith&quot;,value:e,...W.errToObj(n)})}min(e,n){return this._addCheck({kind:&quot;min&quot;,value:e,...W.errToObj(n)})}max(e,n){return this._addCheck({kind:&quot;max&quot;,value:e,...W.errToObj(n)})}length(e,n){return this._addCheck({kind:&quot;length&quot;,value:e,...W.errToObj(n)})}nonempty(e){return this.min(1,W.errToObj(e))}trim(){return new $n({...this._def,checks:[...this._def.checks,{kind:&quot;trim&quot;}]})}toLowerCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:&quot;toLowerCase&quot;}]})}toUpperCase(){return new $n({...this._def,checks:[...this._def.checks,{kind:&quot;toUpperCase&quot;}]})}get isDatetime(){return!!this._def.checks.find(e=&gt;e.kind===&quot;datetime&quot;)}get isDate(){return!!this._def.checks.find(e=&gt;e.kind===&quot;date&quot;)}get isTime(){return!!this._def.checks.find(e=&gt;e.kind===&quot;time&quot;)}get isDuration(){return!!this._def.checks.find(e=&gt;e.kind===&quot;duration&quot;)}get isEmail(){return!!this._def.checks.find(e=&gt;e.kind===&quot;email&quot;)}get isURL(){return!!this._def.checks.find(e=&gt;e.kind===&quot;url&quot;)}get isEmoji(){return!!this._def.checks.find(e=&gt;e.kind===&quot;emoji&quot;)}get isUUID(){return!!this._def.checks.find(e=&gt;e.kind===&quot;uuid&quot;)}get isNANOID(){return!!this._def.checks.find(e=&gt;e.kind===&quot;nanoid&quot;)}get isCUID(){return!!this._def.checks.find(e=&gt;e.kind===&quot;cuid&quot;)}get isCUID2(){return!!this._def.checks.find(e=&gt;e.kind===&quot;cuid2&quot;)}get isULID(){return!!this._def.checks.find(e=&gt;e.kind===&quot;ulid&quot;)}get isIP(){return!!this._def.checks.find(e=&gt;e.kind===&quot;ip&quot;)}get isCIDR(){return!!this._def.checks.find(e=&gt;e.kind===&quot;cidr&quot;)}get isBase64(){return!!this._def.checks.find(e=&gt;e.kind===&quot;base64&quot;)}get isBase64url(){return!!this._def.checks.find(e=&gt;e.kind===&quot;base64url&quot;)}get minLength(){let e=null;for(const n of this._def.checks)n.kind===&quot;min&quot;&amp;&amp;(e===null||n.value&gt;e)&amp;&amp;(e=n.value);return e}get maxLength(){let e=null;for(const n of this._def.checks)n.kind===&quot;max&quot;&amp;&amp;(e===null||n.value&lt;e)&amp;&amp;(e=n.value);return e}}$n.create=t=&gt;new $n({checks:[],typeName:Q.ZodString,coerce:(t==null?void 0:t.coerce)??!1,...X(t)});function G1(t,e){const n=(t.toString().split(&quot;.&quot;)[1]||&quot;&quot;).length,r=(e.toString().split(&quot;.&quot;)[1]||&quot;&quot;).length,i=n&gt;r?n:r,s=Number.parseInt(t.toFixed(i).replace(&quot;.&quot;,&quot;&quot;)),l=Number.parseInt(e.toFixed(i).replace(&quot;.&quot;,&quot;&quot;));return s%l/10**i}class Fi extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&amp;&amp;(e.data=Number(e.data)),this._getType(e)!==j.number){const s=this._getOrReturnCtx(e);return M(s,{code:N.invalid_type,expected:j.number,received:s.parsedType}),K}let r;const i=new _t;for(const s of this._def.checks)s.kind===&quot;int&quot;?oe.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),M(r,{code:N.invalid_type,expected:&quot;integer&quot;,received:&quot;float&quot;,message:s.message}),i.dirty()):s.kind===&quot;min&quot;?(s.inclusive?e.data&lt;s.value:e.data&lt;=s.value)&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.too_small,minimum:s.value,type:&quot;number&quot;,inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind===&quot;max&quot;?(s.inclusive?e.data&gt;s.value:e.data&gt;=s.value)&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.too_big,maximum:s.value,type:&quot;number&quot;,inclusive:s.inclusive,exact:!1,message:s.message}),i.dirty()):s.kind===&quot;multipleOf&quot;?G1(e.data,s.value)!==0&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):s.kind===&quot;finite&quot;?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),M(r,{code:N.not_finite,message:s.message}),i.dirty()):oe.assertNever(s);return{status:i.value,value:e.data}}gte(e,n){return this.setLimit(&quot;min&quot;,e,!0,W.toString(n))}gt(e,n){return this.setLimit(&quot;min&quot;,e,!1,W.toString(n))}lte(e,n){return this.setLimit(&quot;max&quot;,e,!0,W.toString(n))}lt(e,n){return this.setLimit(&quot;max&quot;,e,!1,W.toString(n))}setLimit(e,n,r,i){return new Fi({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:W.toString(i)}]})}_addCheck(e){return new Fi({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:&quot;int&quot;,message:W.toString(e)})}positive(e){return this._addCheck({kind:&quot;min&quot;,value:0,inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:&quot;max&quot;,value:0,inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:&quot;max&quot;,value:0,inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:&quot;min&quot;,value:0,inclusive:!0,message:W.toString(e)})}multipleOf(e,n){return this._addCheck({kind:&quot;multipleOf&quot;,value:e,message:W.toString(n)})}finite(e){return this._addCheck({kind:&quot;finite&quot;,message:W.toString(e)})}safe(e){return this._addCheck({kind:&quot;min&quot;,inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:W.toString(e)})._addCheck({kind:&quot;max&quot;,inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:W.toString(e)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===&quot;min&quot;&amp;&amp;(e===null||n.value&gt;e)&amp;&amp;(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===&quot;max&quot;&amp;&amp;(e===null||n.value&lt;e)&amp;&amp;(e=n.value);return e}get isInt(){return!!this._def.checks.find(e=&gt;e.kind===&quot;int&quot;||e.kind===&quot;multipleOf&quot;&amp;&amp;oe.isInteger(e.value))}get isFinite(){let e=null,n=null;for(const r of this._def.checks){if(r.kind===&quot;finite&quot;||r.kind===&quot;int&quot;||r.kind===&quot;multipleOf&quot;)return!0;r.kind===&quot;min&quot;?(n===null||r.value&gt;n)&amp;&amp;(n=r.value):r.kind===&quot;max&quot;&amp;&amp;(e===null||r.value&lt;e)&amp;&amp;(e=r.value)}return Number.isFinite(n)&amp;&amp;Number.isFinite(e)}}Fi.create=t=&gt;new Fi({checks:[],typeName:Q.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...X(t)});class el extends le{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==j.bigint)return this._getInvalidInput(e);let r;const i=new _t;for(const s of this._def.checks)s.kind===&quot;min&quot;?(s.inclusive?e.data&lt;s.value:e.data&lt;=s.value)&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.too_small,type:&quot;bigint&quot;,minimum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind===&quot;max&quot;?(s.inclusive?e.data&gt;s.value:e.data&gt;=s.value)&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.too_big,type:&quot;bigint&quot;,maximum:s.value,inclusive:s.inclusive,message:s.message}),i.dirty()):s.kind===&quot;multipleOf&quot;?e.data%s.value!==BigInt(0)&amp;&amp;(r=this._getOrReturnCtx(e,r),M(r,{code:N.not_multiple_of,multipleOf:s.value,message:s.message}),i.dirty()):oe.assertNever(s);return{status:i.value,value:e.data}}_getInvalidInput(e){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:j.bigint,received:n.parsedType}),K}gte(e,n){return this.setLimit(&quot;min&quot;,e,!0,W.toString(n))}gt(e,n){return this.setLimit(&quot;min&quot;,e,!1,W.toString(n))}lte(e,n){return this.setLimit(&quot;max&quot;,e,!0,W.toString(n))}lt(e,n){return this.setLimit(&quot;max&quot;,e,!1,W.toString(n))}setLimit(e,n,r,i){return new el({...this._def,checks:[...this._def.checks,{kind:e,value:n,inclusive:r,message:W.toString(i)}]})}_addCheck(e){return new el({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:&quot;min&quot;,value:BigInt(0),inclusive:!1,message:W.toString(e)})}negative(e){return this._addCheck({kind:&quot;max&quot;,value:BigInt(0),inclusive:!1,message:W.toString(e)})}nonpositive(e){return this._addCheck({kind:&quot;max&quot;,value:BigInt(0),inclusive:!0,message:W.toString(e)})}nonnegative(e){return this._addCheck({kind:&quot;min&quot;,value:BigInt(0),inclusive:!0,message:W.toString(e)})}multipleOf(e,n){return this._addCheck({kind:&quot;multipleOf&quot;,value:e,message:W.toString(n)})}get minValue(){let e=null;for(const n of this._def.checks)n.kind===&quot;min&quot;&amp;&amp;(e===null||n.value&gt;e)&amp;&amp;(e=n.value);return e}get maxValue(){let e=null;for(const n of this._def.checks)n.kind===&quot;max&quot;&amp;&amp;(e===null||n.value&lt;e)&amp;&amp;(e=n.value);return e}}el.create=t=&gt;new el({checks:[],typeName:Q.ZodBigInt,coerce:(t==null?void 0:t.coerce)??!1,...X(t)});class bc extends le{_parse(e){if(this._def.coerce&amp;&amp;(e.data=!!e.data),this._getType(e)!==j.boolean){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.boolean,received:r.parsedType}),K}return Pt(e.data)}}bc.create=t=&gt;new bc({typeName:Q.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...X(t)});class qo extends le{_parse(e){if(this._def.coerce&amp;&amp;(e.data=new Date(e.data)),this._getType(e)!==j.date){const s=this._getOrReturnCtx(e);return M(s,{code:N.invalid_type,expected:j.date,received:s.parsedType}),K}if(Number.isNaN(e.data.getTime())){const s=this._getOrReturnCtx(e);return M(s,{code:N.invalid_date}),K}const r=new _t;let i;for(const s of this._def.checks)s.kind===&quot;min&quot;?e.data.getTime()&lt;s.value&amp;&amp;(i=this._getOrReturnCtx(e,i),M(i,{code:N.too_small,message:s.message,inclusive:!0,exact:!1,minimum:s.value,type:&quot;date&quot;}),r.dirty()):s.kind===&quot;max&quot;?e.data.getTime()&gt;s.value&amp;&amp;(i=this._getOrReturnCtx(e,i),M(i,{code:N.too_big,message:s.message,inclusive:!0,exact:!1,maximum:s.value,type:&quot;date&quot;}),r.dirty()):oe.assertNever(s);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new qo({...this._def,checks:[...this._def.checks,e]})}min(e,n){return this._addCheck({kind:&quot;min&quot;,value:e.getTime(),message:W.toString(n)})}max(e,n){return this._addCheck({kind:&quot;max&quot;,value:e.getTime(),message:W.toString(n)})}get minDate(){let e=null;for(const n of this._def.checks)n.kind===&quot;min&quot;&amp;&amp;(e===null||n.value&gt;e)&amp;&amp;(e=n.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const n of this._def.checks)n.kind===&quot;max&quot;&amp;&amp;(e===null||n.value&lt;e)&amp;&amp;(e=n.value);return e!=null?new Date(e):null}}qo.create=t=&gt;new qo({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Q.ZodDate,...X(t)});class lp extends le{_parse(e){if(this._getType(e)!==j.symbol){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.symbol,received:r.parsedType}),K}return Pt(e.data)}}lp.create=t=&gt;new lp({typeName:Q.ZodSymbol,...X(t)});class op extends le{_parse(e){if(this._getType(e)!==j.undefined){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.undefined,received:r.parsedType}),K}return Pt(e.data)}}op.create=t=&gt;new op({typeName:Q.ZodUndefined,...X(t)});class ap extends le{_parse(e){if(this._getType(e)!==j.null){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.null,received:r.parsedType}),K}return Pt(e.data)}}ap.create=t=&gt;new ap({typeName:Q.ZodNull,...X(t)});class up extends le{constructor(){super(...arguments),this._any=!0}_parse(e){return Pt(e.data)}}up.create=t=&gt;new up({typeName:Q.ZodAny,...X(t)});class zc extends le{constructor(){super(...arguments),this._unknown=!0}_parse(e){return Pt(e.data)}}zc.create=t=&gt;new zc({typeName:Q.ZodUnknown,...X(t)});class nr extends le{_parse(e){const n=this._getOrReturnCtx(e);return M(n,{code:N.invalid_type,expected:j.never,received:n.parsedType}),K}}nr.create=t=&gt;new nr({typeName:Q.ZodNever,...X(t)});class cp extends le{_parse(e){if(this._getType(e)!==j.undefined){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.void,received:r.parsedType}),K}return Pt(e.data)}}cp.create=t=&gt;new cp({typeName:Q.ZodVoid,...X(t)});class nn extends le{_parse(e){const{ctx:n,status:r}=this._processInputParams(e),i=this._def;if(n.parsedType!==j.array)return M(n,{code:N.invalid_type,expected:j.array,received:n.parsedType}),K;if(i.exactLength!==null){const l=n.data.length&gt;i.exactLength.value,o=n.data.length&lt;i.exactLength.value;(l||o)&amp;&amp;(M(n,{code:l?N.too_big:N.too_small,minimum:o?i.exactLength.value:void 0,maximum:l?i.exactLength.value:void 0,type:&quot;array&quot;,inclusive:!0,exact:!0,message:i.exactLength.message}),r.dirty())}if(i.minLength!==null&amp;&amp;n.data.length&lt;i.minLength.value&amp;&amp;(M(n,{code:N.too_small,minimum:i.minLength.value,type:&quot;array&quot;,inclusive:!0,exact:!1,message:i.minLength.message}),r.dirty()),i.maxLength!==null&amp;&amp;n.data.length&gt;i.maxLength.value&amp;&amp;(M(n,{code:N.too_big,maximum:i.maxLength.value,type:&quot;array&quot;,inclusive:!0,exact:!1,message:i.maxLength.message}),r.dirty()),n.common.async)return Promise.all([...n.data].map((l,o)=&gt;i.type._parseAsync(new tr(n,l,n.path,o)))).then(l=&gt;_t.mergeArray(r,l));const s=[...n.data].map((l,o)=&gt;i.type._parseSync(new tr(n,l,n.path,o)));return _t.mergeArray(r,s)}get element(){return this._def.type}min(e,n){return new nn({...this._def,minLength:{value:e,message:W.toString(n)}})}max(e,n){return new nn({...this._def,maxLength:{value:e,message:W.toString(n)}})}length(e,n){return new nn({...this._def,exactLength:{value:e,message:W.toString(n)}})}nonempty(e){return this.min(1,e)}}nn.create=(t,e)=&gt;new nn({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Q.ZodArray,...X(e)});function Gr(t){if(t instanceof Ae){const e={};for(const n in t.shape){const r=t.shape[n];e[n]=Xn.create(Gr(r))}return new Ae({...t._def,shape:()=&gt;e})}else return t instanceof nn?new nn({...t._def,type:Gr(t.element)}):t instanceof Xn?Xn.create(Gr(t.unwrap())):t instanceof Bi?Bi.create(Gr(t.unwrap())):t instanceof zr?zr.create(t.items.map(e=&gt;Gr(e))):t}class Ae extends le{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),n=oe.objectKeys(e);return this._cached={shape:e,keys:n},this._cached}_parse(e){if(this._getType(e)!==j.object){const u=this._getOrReturnCtx(e);return M(u,{code:N.invalid_type,expected:j.object,received:u.parsedType}),K}const{status:r,ctx:i}=this._processInputParams(e),{shape:s,keys:l}=this._getCached(),o=[];if(!(this._def.catchall instanceof nr&amp;&amp;this._def.unknownKeys===&quot;strip&quot;))for(const u in i.data)l.includes(u)||o.push(u);const a=[];for(const u of l){const c=s[u],f=i.data[u];a.push({key:{status:&quot;valid&quot;,value:u},value:c._parse(new tr(i,f,i.path,u)),alwaysSet:u in i.data})}if(this._def.catchall instanceof nr){const u=this._def.unknownKeys;if(u===&quot;passthrough&quot;)for(const c of o)a.push({key:{status:&quot;valid&quot;,value:c},value:{status:&quot;valid&quot;,value:i.data[c]}});else if(u===&quot;strict&quot;)o.length&gt;0&amp;&amp;(M(i,{code:N.unrecognized_keys,keys:o}),r.dirty());else if(u!==&quot;strip&quot;)throw new Error(&quot;Internal ZodObject error: invalid unknownKeys value.&quot;)}else{const u=this._def.catchall;for(const c of o){const f=i.data[c];a.push({key:{status:&quot;valid&quot;,value:c},value:u._parse(new tr(i,f,i.path,c)),alwaysSet:c in i.data})}}return i.common.async?Promise.resolve().then(async()=&gt;{const u=[];for(const c of a){const f=await c.key,d=await c.value;u.push({key:f,value:d,alwaysSet:c.alwaysSet})}return u}).then(u=&gt;_t.mergeObjectSync(r,u)):_t.mergeObjectSync(r,a)}get shape(){return this._def.shape()}strict(e){return W.errToObj,new Ae({...this._def,unknownKeys:&quot;strict&quot;,...e!==void 0?{errorMap:(n,r)=&gt;{var s,l;const i=((l=(s=this._def).errorMap)==null?void 0:l.call(s,n,r).message)??r.defaultError;return n.code===&quot;unrecognized_keys&quot;?{message:W.errToObj(e).message??i}:{message:i}}}:{}})}strip(){return new Ae({...this._def,unknownKeys:&quot;strip&quot;})}passthrough(){return new Ae({...this._def,unknownKeys:&quot;passthrough&quot;})}extend(e){return new Ae({...this._def,shape:()=&gt;({...this._def.shape(),...e})})}merge(e){return new Ae({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=&gt;({...this._def.shape(),...e._def.shape()}),typeName:Q.ZodObject})}setKey(e,n){return this.augment({[e]:n})}catchall(e){return new Ae({...this._def,catchall:e})}pick(e){const n={};for(const r of oe.objectKeys(e))e[r]&amp;&amp;this.shape[r]&amp;&amp;(n[r]=this.shape[r]);return new Ae({...this._def,shape:()=&gt;n})}omit(e){const n={};for(const r of oe.objectKeys(this.shape))e[r]||(n[r]=this.shape[r]);return new Ae({...this._def,shape:()=&gt;n})}deepPartial(){return Gr(this)}partial(e){const n={};for(const r of oe.objectKeys(this.shape)){const i=this.shape[r];e&amp;&amp;!e[r]?n[r]=i:n[r]=i.optional()}return new Ae({...this._def,shape:()=&gt;n})}required(e){const n={};for(const r of oe.objectKeys(this.shape))if(e&amp;&amp;!e[r])n[r]=this.shape[r];else{let s=this.shape[r];for(;s instanceof Xn;)s=s._def.innerType;n[r]=s}return new Ae({...this._def,shape:()=&gt;n})}keyof(){return Ny(oe.objectKeys(this.shape))}}Ae.create=(t,e)=&gt;new Ae({shape:()=&gt;t,unknownKeys:&quot;strip&quot;,catchall:nr.create(),typeName:Q.ZodObject,...X(e)});Ae.strictCreate=(t,e)=&gt;new Ae({shape:()=&gt;t,unknownKeys:&quot;strict&quot;,catchall:nr.create(),typeName:Q.ZodObject,...X(e)});Ae.lazycreate=(t,e)=&gt;new Ae({shape:t,unknownKeys:&quot;strip&quot;,catchall:nr.create(),typeName:Q.ZodObject,...X(e)});class ea extends le{_parse(e){const{ctx:n}=this._processInputParams(e),r=this._def.options;function i(s){for(const o of s)if(o.result.status===&quot;valid&quot;)return o.result;for(const o of s)if(o.result.status===&quot;dirty&quot;)return n.common.issues.push(...o.ctx.common.issues),o.result;const l=s.map(o=&gt;new Sn(o.ctx.common.issues));return M(n,{code:N.invalid_union,unionErrors:l}),K}if(n.common.async)return Promise.all(r.map(async s=&gt;{const l={...n,common:{...n.common,issues:[]},parent:null};return{result:await s._parseAsync({data:n.data,path:n.path,parent:l}),ctx:l}})).then(i);{let s;const l=[];for(const a of r){const u={...n,common:{...n.common,issues:[]},parent:null},c=a._parseSync({data:n.data,path:n.path,parent:u});if(c.status===&quot;valid&quot;)return c;c.status===&quot;dirty&quot;&amp;&amp;!s&amp;&amp;(s={result:c,ctx:u}),u.common.issues.length&amp;&amp;l.push(u.common.issues)}if(s)return n.common.issues.push(...s.ctx.common.issues),s.result;const o=l.map(a=&gt;new Sn(a));return M(n,{code:N.invalid_union,unionErrors:o}),K}}get options(){return this._def.options}}ea.create=(t,e)=&gt;new ea({options:t,typeName:Q.ZodUnion,...X(e)});function jc(t,e){const n=In(t),r=In(e);if(t===e)return{valid:!0,data:t};if(n===j.object&amp;&amp;r===j.object){const i=oe.objectKeys(e),s=oe.objectKeys(t).filter(o=&gt;i.indexOf(o)!==-1),l={...t,...e};for(const o of s){const a=jc(t[o],e[o]);if(!a.valid)return{valid:!1};l[o]=a.data}return{valid:!0,data:l}}else if(n===j.array&amp;&amp;r===j.array){if(t.length!==e.length)return{valid:!1};const i=[];for(let s=0;s&lt;t.length;s++){const l=t[s],o=e[s],a=jc(l,o);if(!a.valid)return{valid:!1};i.push(a.data)}return{valid:!0,data:i}}else return n===j.date&amp;&amp;r===j.date&amp;&amp;+t==+e?{valid:!0,data:t}:{valid:!1}}class ta extends le{_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=(s,l)=&gt;{if(rp(s)||rp(l))return K;const o=jc(s.value,l.value);return o.valid?((ip(s)||ip(l))&amp;&amp;n.dirty(),{status:n.value,value:o.data}):(M(r,{code:N.invalid_intersection_types}),K)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([s,l])=&gt;i(s,l)):i(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}ta.create=(t,e,n)=&gt;new ta({left:t,right:e,typeName:Q.ZodIntersection,...X(n)});class zr extends le{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==j.array)return M(r,{code:N.invalid_type,expected:j.array,received:r.parsedType}),K;if(r.data.length&lt;this._def.items.length)return M(r,{code:N.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:&quot;array&quot;}),K;!this._def.rest&amp;&amp;r.data.length&gt;this._def.items.length&amp;&amp;(M(r,{code:N.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:&quot;array&quot;}),n.dirty());const s=[...r.data].map((l,o)=&gt;{const a=this._def.items[o]||this._def.rest;return a?a._parse(new tr(r,l,r.path,o)):null}).filter(l=&gt;!!l);return r.common.async?Promise.all(s).then(l=&gt;_t.mergeArray(n,l)):_t.mergeArray(n,s)}get items(){return this._def.items}rest(e){return new zr({...this._def,rest:e})}}zr.create=(t,e)=&gt;{if(!Array.isArray(t))throw new Error(&quot;You must pass an array of schemas to z.tuple([ ... ])&quot;);return new zr({items:t,typeName:Q.ZodTuple,rest:null,...X(e)})};class fp extends le{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==j.map)return M(r,{code:N.invalid_type,expected:j.map,received:r.parsedType}),K;const i=this._def.keyType,s=this._def.valueType,l=[...r.data.entries()].map(([o,a],u)=&gt;({key:i._parse(new tr(r,o,r.path,[u,&quot;key&quot;])),value:s._parse(new tr(r,a,r.path,[u,&quot;value&quot;]))}));if(r.common.async){const o=new Map;return Promise.resolve().then(async()=&gt;{for(const a of l){const u=await a.key,c=await a.value;if(u.status===&quot;aborted&quot;||c.status===&quot;aborted&quot;)return K;(u.status===&quot;dirty&quot;||c.status===&quot;dirty&quot;)&amp;&amp;n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}})}else{const o=new Map;for(const a of l){const u=a.key,c=a.value;if(u.status===&quot;aborted&quot;||c.status===&quot;aborted&quot;)return K;(u.status===&quot;dirty&quot;||c.status===&quot;dirty&quot;)&amp;&amp;n.dirty(),o.set(u.value,c.value)}return{status:n.value,value:o}}}}fp.create=(t,e,n)=&gt;new fp({valueType:e,keyType:t,typeName:Q.ZodMap,...X(n)});class tl extends le{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.parsedType!==j.set)return M(r,{code:N.invalid_type,expected:j.set,received:r.parsedType}),K;const i=this._def;i.minSize!==null&amp;&amp;r.data.size&lt;i.minSize.value&amp;&amp;(M(r,{code:N.too_small,minimum:i.minSize.value,type:&quot;set&quot;,inclusive:!0,exact:!1,message:i.minSize.message}),n.dirty()),i.maxSize!==null&amp;&amp;r.data.size&gt;i.maxSize.value&amp;&amp;(M(r,{code:N.too_big,maximum:i.maxSize.value,type:&quot;set&quot;,inclusive:!0,exact:!1,message:i.maxSize.message}),n.dirty());const s=this._def.valueType;function l(a){const u=new Set;for(const c of a){if(c.status===&quot;aborted&quot;)return K;c.status===&quot;dirty&quot;&amp;&amp;n.dirty(),u.add(c.value)}return{status:n.value,value:u}}const o=[...r.data.values()].map((a,u)=&gt;s._parse(new tr(r,a,r.path,u)));return r.common.async?Promise.all(o).then(a=&gt;l(a)):l(o)}min(e,n){return new tl({...this._def,minSize:{value:e,message:W.toString(n)}})}max(e,n){return new tl({...this._def,maxSize:{value:e,message:W.toString(n)}})}size(e,n){return this.min(e,n).max(e,n)}nonempty(e){return this.min(1,e)}}tl.create=(t,e)=&gt;new tl({valueType:t,minSize:null,maxSize:null,typeName:Q.ZodSet,...X(e)});class dp extends le{get schema(){return this._def.getter()}_parse(e){const{ctx:n}=this._processInputParams(e);return this._def.getter()._parse({data:n.data,path:n.path,parent:n})}}dp.create=(t,e)=&gt;new dp({getter:t,typeName:Q.ZodLazy,...X(e)});class hp extends le{_parse(e){if(e.data!==this._def.value){const n=this._getOrReturnCtx(e);return M(n,{received:n.data,code:N.invalid_literal,expected:this._def.value}),K}return{status:&quot;valid&quot;,value:e.data}}get value(){return this._def.value}}hp.create=(t,e)=&gt;new hp({value:t,typeName:Q.ZodLiteral,...X(e)});function Ny(t,e){return new $i({values:t,typeName:Q.ZodEnum,...X(e)})}class $i extends le{_parse(e){if(typeof e.data!=&quot;string&quot;){const n=this._getOrReturnCtx(e),r=this._def.values;return M(n,{expected:oe.joinValues(r),received:n.parsedType,code:N.invalid_type}),K}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const n=this._getOrReturnCtx(e),r=this._def.values;return M(n,{received:n.data,code:N.invalid_enum_value,options:r}),K}return Pt(e.data)}get options(){return this._def.values}get enum(){const e={};for(const n of this._def.values)e[n]=n;return e}get Values(){const e={};for(const n of this._def.values)e[n]=n;return e}get Enum(){const e={};for(const n of this._def.values)e[n]=n;return e}extract(e,n=this._def){return $i.create(e,{...this._def,...n})}exclude(e,n=this._def){return $i.create(this.options.filter(r=&gt;!e.includes(r)),{...this._def,...n})}}$i.create=Ny;class pp extends le{_parse(e){const n=oe.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==j.string&amp;&amp;r.parsedType!==j.number){const i=oe.objectValues(n);return M(r,{expected:oe.joinValues(i),received:r.parsedType,code:N.invalid_type}),K}if(this._cache||(this._cache=new Set(oe.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const i=oe.objectValues(n);return M(r,{received:r.data,code:N.invalid_enum_value,options:i}),K}return Pt(e.data)}get enum(){return this._def.values}}pp.create=(t,e)=&gt;new pp({values:t,typeName:Q.ZodNativeEnum,...X(e)});class na extends le{unwrap(){return this._def.type}_parse(e){const{ctx:n}=this._processInputParams(e);if(n.parsedType!==j.promise&amp;&amp;n.common.async===!1)return M(n,{code:N.invalid_type,expected:j.promise,received:n.parsedType}),K;const r=n.parsedType===j.promise?n.data:Promise.resolve(n.data);return Pt(r.then(i=&gt;this._def.type.parseAsync(i,{path:n.path,errorMap:n.common.contextualErrorMap})))}}na.create=(t,e)=&gt;new na({type:t,typeName:Q.ZodPromise,...X(e)});class Vi extends le{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Q.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:n,ctx:r}=this._processInputParams(e),i=this._def.effect||null,s={addIssue:l=&gt;{M(r,l),l.fatal?n.abort():n.dirty()},get path(){return r.path}};if(s.addIssue=s.addIssue.bind(s),i.type===&quot;preprocess&quot;){const l=i.transform(r.data,s);if(r.common.async)return Promise.resolve(l).then(async o=&gt;{if(n.value===&quot;aborted&quot;)return K;const a=await this._def.schema._parseAsync({data:o,path:r.path,parent:r});return a.status===&quot;aborted&quot;?K:a.status===&quot;dirty&quot;||n.value===&quot;dirty&quot;?_s(a.value):a});{if(n.value===&quot;aborted&quot;)return K;const o=this._def.schema._parseSync({data:l,path:r.path,parent:r});return o.status===&quot;aborted&quot;?K:o.status===&quot;dirty&quot;||n.value===&quot;dirty&quot;?_s(o.value):o}}if(i.type===&quot;refinement&quot;){const l=o=&gt;{const a=i.refinement(o,s);if(r.common.async)return Promise.resolve(a);if(a instanceof Promise)throw new Error(&quot;Async refinement encountered during synchronous parse operation. Use .parseAsync instead.&quot;);return o};if(r.common.async===!1){const o=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return o.status===&quot;aborted&quot;?K:(o.status===&quot;dirty&quot;&amp;&amp;n.dirty(),l(o.value),{status:n.value,value:o.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(o=&gt;o.status===&quot;aborted&quot;?K:(o.status===&quot;dirty&quot;&amp;&amp;n.dirty(),l(o.value).then(()=&gt;({status:n.value,value:o.value}))))}if(i.type===&quot;transform&quot;)if(r.common.async===!1){const l=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!ji(l))return K;const o=i.transform(l.value,s);if(o instanceof Promise)throw new Error(&quot;Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.&quot;);return{status:n.value,value:o}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(l=&gt;ji(l)?Promise.resolve(i.transform(l.value,s)).then(o=&gt;({status:n.value,value:o})):K);oe.assertNever(i)}}Vi.create=(t,e,n)=&gt;new Vi({schema:t,typeName:Q.ZodEffects,effect:e,...X(n)});Vi.createWithPreprocess=(t,e,n)=&gt;new Vi({schema:e,effect:{type:&quot;preprocess&quot;,transform:t},typeName:Q.ZodEffects,...X(n)});class Xn extends le{_parse(e){return this._getType(e)===j.undefined?Pt(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Xn.create=(t,e)=&gt;new Xn({innerType:t,typeName:Q.ZodOptional,...X(e)});class Bi extends le{_parse(e){return this._getType(e)===j.null?Pt(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}Bi.create=(t,e)=&gt;new Bi({innerType:t,typeName:Q.ZodNullable,...X(e)});class Fc extends le{_parse(e){const{ctx:n}=this._processInputParams(e);let r=n.data;return n.parsedType===j.undefined&amp;&amp;(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:n.path,parent:n})}removeDefault(){return this._def.innerType}}Fc.create=(t,e)=&gt;new Fc({innerType:t,typeName:Q.ZodDefault,defaultValue:typeof e.default==&quot;function&quot;?e.default:()=&gt;e.default,...X(e)});class $c extends le{_parse(e){const{ctx:n}=this._processInputParams(e),r={...n,common:{...n.common,issues:[]}},i=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return Xo(i)?i.then(s=&gt;({status:&quot;valid&quot;,value:s.status===&quot;valid&quot;?s.value:this._def.catchValue({get error(){return new Sn(r.common.issues)},input:r.data})})):{status:&quot;valid&quot;,value:i.status===&quot;valid&quot;?i.value:this._def.catchValue({get error(){return new Sn(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}$c.create=(t,e)=&gt;new $c({innerType:t,typeName:Q.ZodCatch,catchValue:typeof e.catch==&quot;function&quot;?e.catch:()=&gt;e.catch,...X(e)});class gp extends le{_parse(e){if(this._getType(e)!==j.nan){const r=this._getOrReturnCtx(e);return M(r,{code:N.invalid_type,expected:j.nan,received:r.parsedType}),K}return{status:&quot;valid&quot;,value:e.data}}}gp.create=t=&gt;new gp({typeName:Q.ZodNaN,...X(t)});class Y1 extends le{_parse(e){const{ctx:n}=this._processInputParams(e),r=n.data;return this._def.type._parse({data:r,path:n.path,parent:n})}unwrap(){return this._def.type}}class od extends le{_parse(e){const{status:n,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=&gt;{const s=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return s.status===&quot;aborted&quot;?K:s.status===&quot;dirty&quot;?(n.dirty(),_s(s.value)):this._def.out._parseAsync({data:s.value,path:r.path,parent:r})})();{const i=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return i.status===&quot;aborted&quot;?K:i.status===&quot;dirty&quot;?(n.dirty(),{status:&quot;dirty&quot;,value:i.value}):this._def.out._parseSync({data:i.value,path:r.path,parent:r})}}static create(e,n){return new od({in:e,out:n,typeName:Q.ZodPipeline})}}class Vc extends le{_parse(e){const n=this._def.innerType._parse(e),r=i=&gt;(ji(i)&amp;&amp;(i.value=Object.freeze(i.value)),i);return Xo(n)?n.then(i=&gt;r(i)):r(n)}unwrap(){return this._def.innerType}}Vc.create=(t,e)=&gt;new Vc({innerType:t,typeName:Q.ZodReadonly,...X(e)});var Q;(function(t){t.ZodString=&quot;ZodString&quot;,t.ZodNumber=&quot;ZodNumber&quot;,t.ZodNaN=&quot;ZodNaN&quot;,t.ZodBigInt=&quot;ZodBigInt&quot;,t.ZodBoolean=&quot;ZodBoolean&quot;,t.ZodDate=&quot;ZodDate&quot;,t.ZodSymbol=&quot;ZodSymbol&quot;,t.ZodUndefined=&quot;ZodUndefined&quot;,t.ZodNull=&quot;ZodNull&quot;,t.ZodAny=&quot;ZodAny&quot;,t.ZodUnknown=&quot;ZodUnknown&quot;,t.ZodNever=&quot;ZodNever&quot;,t.ZodVoid=&quot;ZodVoid&quot;,t.ZodArray=&quot;ZodArray&quot;,t.ZodObject=&quot;ZodObject&quot;,t.ZodUnion=&quot;ZodUnion&quot;,t.ZodDiscriminatedUnion=&quot;ZodDiscriminatedUnion&quot;,t.ZodIntersection=&quot;ZodIntersection&quot;,t.ZodTuple=&quot;ZodTuple&quot;,t.ZodRecord=&quot;ZodRecord&quot;,t.ZodMap=&quot;ZodMap&quot;,t.ZodSet=&quot;ZodSet&quot;,t.ZodFunction=&quot;ZodFunction&quot;,t.ZodLazy=&quot;ZodLazy&quot;,t.ZodLiteral=&quot;ZodLiteral&quot;,t.ZodEnum=&quot;ZodEnum&quot;,t.ZodEffects=&quot;ZodEffects&quot;,t.ZodNativeEnum=&quot;ZodNativeEnum&quot;,t.ZodOptional=&quot;ZodOptional&quot;,t.ZodNullable=&quot;ZodNullable&quot;,t.ZodDefault=&quot;ZodDefault&quot;,t.ZodCatch=&quot;ZodCatch&quot;,t.ZodPromise=&quot;ZodPromise&quot;,t.ZodBranded=&quot;ZodBranded&quot;,t.ZodPipeline=&quot;ZodPipeline&quot;,t.ZodReadonly=&quot;ZodReadonly&quot;})(Q||(Q={}));const Iy=$n.create,X1=Fi.create,q1=bc.create,ad=zc.create;nr.create;const Dy=nn.create,Rr=Ae.create,ek=ea.create;ta.create;zr.create;const Ly=$i.create;na.create;Xn.create;Bi.create;var tk=&quot;actor-runtime&quot;;function nk(){return vy(tk)}function mp(t){throw nk().error(&quot;unreachable&quot;,{value:`${t}`,stack:new Error().stack}),new G_(t)}Ly([&quot;json&quot;,&quot;cbor&quot;]);Rr({a:Dy(ad())});Rr({o:ad()});var rk=Rr({i:X1().int(),n:Iy(),a:Dy(ad())}),ik=Rr({e:Iy(),s:q1()});Rr({b:ek([Rr({ar:rk}),Rr({sr:ik})])});Ly([&quot;websocket&quot;,&quot;sse&quot;]);var Kl=&quot;X-RivetKit-Query&quot;,hs=&quot;X-RivetKit-Encoding&quot;,Ql=&quot;X-RivetKit-Conn-Params&quot;,sk=&quot;X-RivetKit-Actor&quot;,lk=&quot;X-RivetKit-Conn&quot;,ok=&quot;X-RivetKit-Conn-Token&quot;,ak=&quot;actor-client&quot;;function Z(){return vy(ak)}var Jl=null;async function uk(){return Jl!==null||(Jl=(async()=&gt;{let t;if(typeof WebSocket&lt;&quot;u&quot;)t=WebSocket,Z().debug(&quot;using native websocket&quot;);else try{t=(await py(()=&gt;import(&quot;./browser-Di5SkHYC.js&quot;).then(n=&gt;n.b),[])).default,Z().debug(&quot;using websocket from npm&quot;)}catch{t=class{constructor(){throw new Error(&#39;WebSocket support requires installing the &quot;ws&quot; peer dependency.&#39;)}},Z().debug(&quot;using mock websocket&quot;)}return t})()),Jl}var ck=function(t,e,n,r,i,s,l,o){if(!t){var a;if(e===void 0)a=new Error(&quot;Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.&quot;);else{var u=[n,r,i,s,l,o],c=0;a=new Error(e.replace(/%s/g,function(){return u[c++]})),a.name=&quot;Invariant Violation&quot;}throw a.framesToPop=1,a}},fk=ck;const dk=Jp(fk);/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */var hk=function(){var t=function(e,n){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&amp;&amp;function(r,i){r.__proto__=i}||function(r,i){for(var s in i)i.hasOwnProperty(s)&amp;&amp;(r[s]=i[s])},t(e,n)};return function(e,n){t(e,n);function r(){this.constructor=e}e.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}(),pk=Object.prototype.hasOwnProperty;function Bc(t,e){return pk.call(t,e)}function Wc(t){if(Array.isArray(t)){for(var e=new Array(t.length),n=0;n&lt;e.length;n++)e[n]=&quot;&quot;+n;return e}if(Object.keys)return Object.keys(t);var r=[];for(var i in t)Bc(t,i)&amp;&amp;r.push(i);return r}function mt(t){switch(typeof t){case&quot;object&quot;:return JSON.parse(JSON.stringify(t));case&quot;undefined&quot;:return null;default:return t}}function Hc(t){for(var e=0,n=t.length,r;e&lt;n;){if(r=t.charCodeAt(e),r&gt;=48&amp;&amp;r&lt;=57){e++;continue}return!1}return!0}function yr(t){return t.indexOf(&quot;/&quot;)===-1&amp;&amp;t.indexOf(&quot;~&quot;)===-1?t:t.replace(/~/g,&quot;~0&quot;).replace(/\//g,&quot;~1&quot;)}function My(t){return t.replace(/~1/g,&quot;/&quot;).replace(/~0/g,&quot;~&quot;)}function Zc(t){if(t===void 0)return!0;if(t){if(Array.isArray(t)){for(var e=0,n=t.length;e&lt;n;e++)if(Zc(t[e]))return!0}else if(typeof t==&quot;object&quot;){for(var r=Wc(t),i=r.length,s=0;s&lt;i;s++)if(Zc(t[r[s]]))return!0}}return!1}function yp(t,e){var n=[t];for(var r in e){var i=typeof e[r]==&quot;object&quot;?JSON.stringify(e[r],null,2):e[r];typeof i&lt;&quot;u&quot;&amp;&amp;n.push(r+&quot;: &quot;+i)}return n.join(`
`)}var Py=function(t){hk(e,t);function e(n,r,i,s,l){var o=this.constructor,a=t.call(this,yp(n,{name:r,index:i,operation:s,tree:l}))||this;return a.name=r,a.index=i,a.operation=s,a.tree=l,Object.setPrototypeOf(a,o.prototype),a.message=yp(n,{name:r,index:i,operation:s,tree:l}),a}return e}(Error),xe=Py,gk=mt,fi={add:function(t,e,n){return t[e]=this.value,{newDocument:n}},remove:function(t,e,n){var r=t[e];return delete t[e],{newDocument:n,removed:r}},replace:function(t,e,n){var r=t[e];return t[e]=this.value,{newDocument:n,removed:r}},move:function(t,e,n){var r=ra(n,this.path);r&amp;&amp;(r=mt(r));var i=Nr(n,{op:&quot;remove&quot;,path:this.from}).removed;return Nr(n,{op:&quot;add&quot;,path:this.path,value:i}),{newDocument:n,removed:r}},copy:function(t,e,n){var r=ra(n,this.from);return Nr(n,{op:&quot;add&quot;,path:this.path,value:mt(r)}),{newDocument:n}},test:function(t,e,n){return{newDocument:n,test:nl(t[e],this.value)}},_get:function(t,e,n){return this.value=t[e],{newDocument:n}}},mk={add:function(t,e,n){return Hc(e)?t.splice(e,0,this.value):t[e]=this.value,{newDocument:n,index:e}},remove:function(t,e,n){var r=t.splice(e,1);return{newDocument:n,removed:r[0]}},replace:function(t,e,n){var r=t[e];return t[e]=this.value,{newDocument:n,removed:r}},move:fi.move,copy:fi.copy,test:fi.test,_get:fi._get};function ra(t,e){if(e==&quot;&quot;)return t;var n={op:&quot;_get&quot;,path:e};return Nr(t,n),n.value}function Nr(t,e,n,r,i,s){if(n===void 0&amp;&amp;(n=!1),r===void 0&amp;&amp;(r=!0),i===void 0&amp;&amp;(i=!0),s===void 0&amp;&amp;(s=0),n&amp;&amp;(typeof n==&quot;function&quot;?n(e,0,t,e.path):ia(e,0)),e.path===&quot;&quot;){var l={newDocument:t};if(e.op===&quot;add&quot;)return l.newDocument=e.value,l;if(e.op===&quot;replace&quot;)return l.newDocument=e.value,l.removed=t,l;if(e.op===&quot;move&quot;||e.op===&quot;copy&quot;)return l.newDocument=ra(t,e.from),e.op===&quot;move&quot;&amp;&amp;(l.removed=t),l;if(e.op===&quot;test&quot;){if(l.test=nl(t,e.value),l.test===!1)throw new xe(&quot;Test operation failed&quot;,&quot;TEST_OPERATION_FAILED&quot;,s,e,t);return l.newDocument=t,l}else{if(e.op===&quot;remove&quot;)return l.removed=t,l.newDocument=null,l;if(e.op===&quot;_get&quot;)return e.value=t,l;if(n)throw new xe(&quot;Operation `op` property is not one of operations defined in RFC-6902&quot;,&quot;OPERATION_OP_INVALID&quot;,s,e,t);return l}}else{r||(t=mt(t));var o=e.path||&quot;&quot;,a=o.split(&quot;/&quot;),u=t,c=1,f=a.length,d=void 0,h=void 0,y=void 0;for(typeof n==&quot;function&quot;?y=n:y=ia;;){if(h=a[c],h&amp;&amp;h.indexOf(&quot;~&quot;)!=-1&amp;&amp;(h=My(h)),i&amp;&amp;(h==&quot;__proto__&quot;||h==&quot;prototype&quot;&amp;&amp;c&gt;0&amp;&amp;a[c-1]==&quot;constructor&quot;))throw new TypeError(&quot;JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README&quot;);if(n&amp;&amp;d===void 0&amp;&amp;(u[h]===void 0?d=a.slice(0,c).join(&quot;/&quot;):c==f-1&amp;&amp;(d=e.path),d!==void 0&amp;&amp;y(e,0,t,d)),c++,Array.isArray(u)){if(h===&quot;-&quot;)h=u.length;else{if(n&amp;&amp;!Hc(h))throw new xe(&quot;Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index&quot;,&quot;OPERATION_PATH_ILLEGAL_ARRAY_INDEX&quot;,s,e,t);Hc(h)&amp;&amp;(h=~~h)}if(c&gt;=f){if(n&amp;&amp;e.op===&quot;add&quot;&amp;&amp;h&gt;u.length)throw new xe(&quot;The specified index MUST NOT be greater than the number of elements in the array&quot;,&quot;OPERATION_VALUE_OUT_OF_BOUNDS&quot;,s,e,t);var l=mk[e.op].call(e,u,h,t);if(l.test===!1)throw new xe(&quot;Test operation failed&quot;,&quot;TEST_OPERATION_FAILED&quot;,s,e,t);return l}}else if(c&gt;=f){var l=fi[e.op].call(e,u,h,t);if(l.test===!1)throw new xe(&quot;Test operation failed&quot;,&quot;TEST_OPERATION_FAILED&quot;,s,e,t);return l}if(u=u[h],n&amp;&amp;c&lt;f&amp;&amp;(!u||typeof u!=&quot;object&quot;))throw new xe(&quot;Cannot perform operation at the desired path&quot;,&quot;OPERATION_PATH_UNRESOLVABLE&quot;,s,e,t)}}}function ud(t,e,n,r,i){if(r===void 0&amp;&amp;(r=!0),i===void 0&amp;&amp;(i=!0),n&amp;&amp;!Array.isArray(e))throw new xe(&quot;Patch sequence must be an array&quot;,&quot;SEQUENCE_NOT_AN_ARRAY&quot;);r||(t=mt(t));for(var s=new Array(e.length),l=0,o=e.length;l&lt;o;l++)s[l]=Nr(t,e[l],n,!0,i,l),t=s[l].newDocument;return s.newDocument=t,s}function yk(t,e,n){var r=Nr(t,e);if(r.test===!1)throw new xe(&quot;Test operation failed&quot;,&quot;TEST_OPERATION_FAILED&quot;,n,e,t);return r.newDocument}function ia(t,e,n,r){if(typeof t!=&quot;object&quot;||t===null||Array.isArray(t))throw new xe(&quot;Operation is not an object&quot;,&quot;OPERATION_NOT_AN_OBJECT&quot;,e,t,n);if(fi[t.op]){if(typeof t.path!=&quot;string&quot;)throw new xe(&quot;Operation `path` property is not a string&quot;,&quot;OPERATION_PATH_INVALID&quot;,e,t,n);if(t.path.indexOf(&quot;/&quot;)!==0&amp;&amp;t.path.length&gt;0)throw new xe(&#39;Operation `path` property must start with &quot;/&quot;&#39;,&quot;OPERATION_PATH_INVALID&quot;,e,t,n);if((t.op===&quot;move&quot;||t.op===&quot;copy&quot;)&amp;&amp;typeof t.from!=&quot;string&quot;)throw new xe(&quot;Operation `from` property is not present (applicable in `move` and `copy` operations)&quot;,&quot;OPERATION_FROM_REQUIRED&quot;,e,t,n);if((t.op===&quot;add&quot;||t.op===&quot;replace&quot;||t.op===&quot;test&quot;)&amp;&amp;t.value===void 0)throw new xe(&quot;Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)&quot;,&quot;OPERATION_VALUE_REQUIRED&quot;,e,t,n);if((t.op===&quot;add&quot;||t.op===&quot;replace&quot;||t.op===&quot;test&quot;)&amp;&amp;Zc(t.value))throw new xe(&quot;Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)&quot;,&quot;OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED&quot;,e,t,n);if(n){if(t.op==&quot;add&quot;){var i=t.path.split(&quot;/&quot;).length,s=r.split(&quot;/&quot;).length;if(i!==s+1&amp;&amp;i!==s)throw new xe(&quot;Cannot perform an `add` operation at the desired path&quot;,&quot;OPERATION_PATH_CANNOT_ADD&quot;,e,t,n)}else if(t.op===&quot;replace&quot;||t.op===&quot;remove&quot;||t.op===&quot;_get&quot;){if(t.path!==r)throw new xe(&quot;Cannot perform the operation at a path that does not exist&quot;,&quot;OPERATION_PATH_UNRESOLVABLE&quot;,e,t,n)}else if(t.op===&quot;move&quot;||t.op===&quot;copy&quot;){var l={op:&quot;_get&quot;,path:t.from,value:void 0},o=Uy([l],n);if(o&amp;&amp;o.name===&quot;OPERATION_PATH_UNRESOLVABLE&quot;)throw new xe(&quot;Cannot perform the operation from a path that does not exist&quot;,&quot;OPERATION_FROM_UNRESOLVABLE&quot;,e,t,n)}}}else throw new xe(&quot;Operation `op` property is not one of operations defined in RFC-6902&quot;,&quot;OPERATION_OP_INVALID&quot;,e,t,n)}function Uy(t,e,n){try{if(!Array.isArray(t))throw new xe(&quot;Patch sequence must be an array&quot;,&quot;SEQUENCE_NOT_AN_ARRAY&quot;);if(e)ud(mt(e),mt(t),n||!0);else{n=n||ia;for(var r=0;r&lt;t.length;r++)n(t[r],r,e,void 0)}}catch(i){if(i instanceof xe)return i;throw i}}function nl(t,e){if(t===e)return!0;if(t&amp;&amp;e&amp;&amp;typeof t==&quot;object&quot;&amp;&amp;typeof e==&quot;object&quot;){var n=Array.isArray(t),r=Array.isArray(e),i,s,l;if(n&amp;&amp;r){if(s=t.length,s!=e.length)return!1;for(i=s;i--!==0;)if(!nl(t[i],e[i]))return!1;return!0}if(n!=r)return!1;var o=Object.keys(t);if(s=o.length,s!==Object.keys(e).length)return!1;for(i=s;i--!==0;)if(!e.hasOwnProperty(o[i]))return!1;for(i=s;i--!==0;)if(l=o[i],!nl(t[l],e[l]))return!1;return!0}return t!==t&amp;&amp;e!==e}const vk=Object.freeze(Object.defineProperty({__proto__:null,JsonPatchError:xe,_areEquals:nl,applyOperation:Nr,applyPatch:ud,applyReducer:yk,deepClone:gk,getValueByPointer:ra,validate:Uy,validator:ia},Symbol.toStringTag,{value:&quot;Module&quot;}));/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */var cd=new WeakMap,wk=function(){function t(e){this.observers=new Map,this.obj=e}return t}(),_k=function(){function t(e,n){this.callback=e,this.observer=n}return t}();function kk(t){return cd.get(t)}function Sk(t,e){return t.observers.get(e)}function xk(t,e){t.observers.delete(e.callback)}function Ek(t,e){e.unobserve()}function Ck(t,e){var n=[],r,i=kk(t);if(!i)i=new wk(t),cd.set(t,i);else{var s=Sk(i,e);r=s&amp;&amp;s.observer}if(r)return r;if(r={},i.value=mt(t),e){r.callback=e,r.next=null;var l=function(){Kc(r)},o=function(){clearTimeout(r.next),r.next=setTimeout(l)};typeof window&lt;&quot;u&quot;&amp;&amp;(window.addEventListener(&quot;mouseup&quot;,o),window.addEventListener(&quot;keyup&quot;,o),window.addEventListener(&quot;mousedown&quot;,o),window.addEventListener(&quot;keydown&quot;,o),window.addEventListener(&quot;change&quot;,o))}return r.patches=n,r.object=t,r.unobserve=function(){Kc(r),clearTimeout(r.next),xk(i,r),typeof window&lt;&quot;u&quot;&amp;&amp;(window.removeEventListener(&quot;mouseup&quot;,o),window.removeEventListener(&quot;keyup&quot;,o),window.removeEventListener(&quot;mousedown&quot;,o),window.removeEventListener(&quot;keydown&quot;,o),window.removeEventListener(&quot;change&quot;,o))},i.observers.set(e,new _k(e,r)),r}function Kc(t,e){e===void 0&amp;&amp;(e=!1);var n=cd.get(t.object);fd(n.value,t.object,t.patches,&quot;&quot;,e),t.patches.length&amp;&amp;ud(n.value,t.patches);var r=t.patches;return r.length&gt;0&amp;&amp;(t.patches=[],t.callback&amp;&amp;t.callback(r)),r}function fd(t,e,n,r,i){if(e!==t){typeof e.toJSON==&quot;function&quot;&amp;&amp;(e=e.toJSON());for(var s=Wc(e),l=Wc(t),o=!1,a=l.length-1;a&gt;=0;a--){var u=l[a],c=t[u];if(Bc(e,u)&amp;&amp;!(e[u]===void 0&amp;&amp;c!==void 0&amp;&amp;Array.isArray(e)===!1)){var f=e[u];typeof c==&quot;object&quot;&amp;&amp;c!=null&amp;&amp;typeof f==&quot;object&quot;&amp;&amp;f!=null&amp;&amp;Array.isArray(c)===Array.isArray(f)?fd(c,f,n,r+&quot;/&quot;+yr(u),i):c!==f&amp;&amp;(i&amp;&amp;n.push({op:&quot;test&quot;,path:r+&quot;/&quot;+yr(u),value:mt(c)}),n.push({op:&quot;replace&quot;,path:r+&quot;/&quot;+yr(u),value:mt(f)}))}else Array.isArray(t)===Array.isArray(e)?(i&amp;&amp;n.push({op:&quot;test&quot;,path:r+&quot;/&quot;+yr(u),value:mt(c)}),n.push({op:&quot;remove&quot;,path:r+&quot;/&quot;+yr(u)}),o=!0):(i&amp;&amp;n.push({op:&quot;test&quot;,path:r,value:t}),n.push({op:&quot;replace&quot;,path:r,value:e}))}if(!(!o&amp;&amp;s.length==l.length))for(var a=0;a&lt;s.length;a++){var u=s[a];!Bc(t,u)&amp;&amp;e[u]!==void 0&amp;&amp;n.push({op:&quot;add&quot;,path:r+&quot;/&quot;+yr(u),value:mt(e[u])})}}}function Ok(t,e,n){n===void 0&amp;&amp;(n=!1);var r=[];return fd(t,e,r,&quot;&quot;,n),r}const Tk=Object.freeze(Object.defineProperty({__proto__:null,compare:Ok,generate:Kc,observe:Ck,unobserve:Ek},Symbol.toStringTag,{value:&quot;Module&quot;}));Object.assign({},vk,Tk,{JsonPatchError:Py,deepClone:mt,escapePathComponent:yr,unescapePathComponent:My});new Set(&quot;.\\+*[^]$()&quot;);var by={};function Mt(t,e){typeof e==&quot;boolean&quot;&amp;&amp;(e={forever:e}),this._originalTimeouts=JSON.parse(JSON.stringify(t)),this._timeouts=t,this._options=e||{},this._maxRetryTime=e&amp;&amp;e.maxRetryTime||1/0,this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._operationStart=null,this._timer=null,this._options.forever&amp;&amp;(this._cachedTimeouts=this._timeouts.slice(0))}var Ak=Mt;Mt.prototype.reset=function(){this._attempts=1,this._timeouts=this._originalTimeouts.slice(0)};Mt.prototype.stop=function(){this._timeout&amp;&amp;clearTimeout(this._timeout),this._timer&amp;&amp;clearTimeout(this._timer),this._timeouts=[],this._cachedTimeouts=null};Mt.prototype.retry=function(t){if(this._timeout&amp;&amp;clearTimeout(this._timeout),!t)return!1;var e=new Date().getTime();if(t&amp;&amp;e-this._operationStart&gt;=this._maxRetryTime)return this._errors.push(t),this._errors.unshift(new Error(&quot;RetryOperation timeout occurred&quot;)),!1;this._errors.push(t);var n=this._timeouts.shift();if(n===void 0)if(this._cachedTimeouts)this._errors.splice(0,this._errors.length-1),n=this._cachedTimeouts.slice(-1);else return!1;var r=this;return this._timer=setTimeout(function(){r._attempts++,r._operationTimeoutCb&amp;&amp;(r._timeout=setTimeout(function(){r._operationTimeoutCb(r._attempts)},r._operationTimeout),r._options.unref&amp;&amp;r._timeout.unref()),r._fn(r._attempts)},n),this._options.unref&amp;&amp;this._timer.unref(),!0};Mt.prototype.attempt=function(t,e){this._fn=t,e&amp;&amp;(e.timeout&amp;&amp;(this._operationTimeout=e.timeout),e.cb&amp;&amp;(this._operationTimeoutCb=e.cb));var n=this;this._operationTimeoutCb&amp;&amp;(this._timeout=setTimeout(function(){n._operationTimeoutCb()},n._operationTimeout)),this._operationStart=new Date().getTime(),this._fn(this._attempts)};Mt.prototype.try=function(t){console.log(&quot;Using RetryOperation.try() is deprecated&quot;),this.attempt(t)};Mt.prototype.start=function(t){console.log(&quot;Using RetryOperation.start() is deprecated&quot;),this.attempt(t)};Mt.prototype.start=Mt.prototype.try;Mt.prototype.errors=function(){return this._errors};Mt.prototype.attempts=function(){return this._attempts};Mt.prototype.mainError=function(){if(this._errors.length===0)return null;for(var t={},e=null,n=0,r=0;r&lt;this._errors.length;r++){var i=this._errors[r],s=i.message,l=(t[s]||0)+1;t[s]=l,l&gt;=n&amp;&amp;(e=i,n=l)}return e};(function(t){var e=Ak;t.operation=function(n){var r=t.timeouts(n);return new e(r,{forever:n&amp;&amp;(n.forever||n.retries===1/0),unref:n&amp;&amp;n.unref,maxRetryTime:n&amp;&amp;n.maxRetryTime})},t.timeouts=function(n){if(n instanceof Array)return[].concat(n);var r={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var i in n)r[i]=n[i];if(r.minTimeout&gt;r.maxTimeout)throw new Error(&quot;minTimeout is greater than maxTimeout&quot;);for(var s=[],l=0;l&lt;r.retries;l++)s.push(this.createTimeout(l,r));return n&amp;&amp;n.forever&amp;&amp;!s.length&amp;&amp;s.push(this.createTimeout(l,r)),s.sort(function(o,a){return o-a}),s},t.createTimeout=function(n,r){var i=r.randomize?Math.random()+1:1,s=Math.round(i*Math.max(r.minTimeout,1)*Math.pow(r.factor,n));return s=Math.min(s,r.maxTimeout),s},t.wrap=function(n,r,i){if(r instanceof Array&amp;&amp;(i=r,r=null),!i){i=[];for(var s in n)typeof n[s]==&quot;function&quot;&amp;&amp;i.push(s)}for(var l=0;l&lt;i.length;l++){var o=i[l],a=n[o];n[o]=(function(c){var f=t.operation(r),d=Array.prototype.slice.call(arguments,1),h=d.pop();d.push(function(y){f.retry(y)||(y&amp;&amp;(arguments[0]=f.mainError()),h.apply(this,arguments))}),f.attempt(function(){c.apply(n,d)})}).bind(n,a),n[o].options=r}}})(by);var Rk=by;const Nk=Jp(Rk),Ik=Object.prototype.toString,Dk=t=&gt;Ik.call(t)===&quot;[object Error]&quot;,Lk=new Set([&quot;network error&quot;,&quot;Failed to fetch&quot;,&quot;NetworkError when attempting to fetch resource.&quot;,&quot;The Internet connection appears to be offline.&quot;,&quot;Load failed&quot;,&quot;Network request failed&quot;,&quot;fetch failed&quot;,&quot;terminated&quot;]);function Mk(t){return t&amp;&amp;Dk(t)&amp;&amp;t.name===&quot;TypeError&quot;&amp;&amp;typeof t.message==&quot;string&quot;?t.message===&quot;Load failed&quot;?t.stack===void 0:Lk.has(t.message):!1}class Pk extends Error{constructor(e){super(),e instanceof Error?(this.originalError=e,{message:e}=e):(this.originalError=new Error(e),this.originalError.stack=this.stack),this.name=&quot;AbortError&quot;,this.message=e}}const vp=(t,e,n)=&gt;{const r=n.retries-(e-1);return t.attemptNumber=e,t.retriesLeft=r,t};async function Uk(t,e){return new Promise((n,r)=&gt;{e={...e},e.onFailedAttempt??(e.onFailedAttempt=()=&gt;{}),e.shouldRetry??(e.shouldRetry=()=&gt;!0),e.retries??(e.retries=10);const i=Nk.operation(e),s=()=&gt;{var o;i.stop(),r((o=e.signal)==null?void 0:o.reason)};e.signal&amp;&amp;!e.signal.aborted&amp;&amp;e.signal.addEventListener(&quot;abort&quot;,s,{once:!0});const l=()=&gt;{var o;(o=e.signal)==null||o.removeEventListener(&quot;abort&quot;,s),i.stop()};i.attempt(async o=&gt;{try{const a=await t(o);l(),n(a)}catch(a){try{if(!(a instanceof Error))throw new TypeError(`Non-error was thrown: &quot;${a}&quot;. You should only throw errors.`);if(a instanceof Pk)throw a.originalError;if(a instanceof TypeError&amp;&amp;!Mk(a))throw a;if(vp(a,o,e),await e.shouldRetry(a)||(i.stop(),r(a)),await e.onFailedAttempt(a),!i.retry(a))throw i.mainError()}catch(u){vp(u,o,e),l(),r(u)}}})})}var La=class extends Error{},ks=class extends La{},sa=class extends La{constructor(e,n,r){super(n);Ht(this,&quot;__type&quot;,&quot;ActorError&quot;);this.code=e,this.metadata=r}},Eu=class extends La{constructor(t,e){super(`HTTP request error: ${t}`,{cause:e==null?void 0:e.cause})}},bk=class extends La{constructor(){super(&quot;Attempting to interact with a disposed actor connection.&quot;)}};async function zk(t,e,n,r,i){let s,l=i||{};if(typeof r==&quot;string&quot;)s=r;else if(r instanceof URL)s=r.pathname+r.search;else if(r instanceof Request){const o=new URL(r.url);s=o.pathname+o.search;const a=new Headers(r.headers),u=new Headers((i==null?void 0:i.headers)||{}),c=new Headers(a);for(const[f,d]of u)c.set(f,d);l={method:r.method,body:r.body,mode:r.mode,credentials:r.credentials,redirect:r.redirect,referrer:r.referrer,referrerPolicy:r.referrerPolicy,integrity:r.integrity,keepalive:r.keepalive,signal:r.signal,...l,headers:c},l.body&amp;&amp;(l.duplex=&quot;half&quot;)}else throw new TypeError(&quot;Invalid input type for fetch&quot;);return await t.rawHttpRequest(void 0,e,&quot;json&quot;,n,s,l,void 0)}async function jk(t,e,n,r,i){return await t.rawWebSocket(void 0,e,&quot;json&quot;,n,r||&quot;&quot;,i,void 0)}var xi,dn,kr,Se,hn,Wp,Fk=(Wp=class{constructor(t,e,n,r,i){ae(this,xi);ae(this,dn);ae(this,kr);ae(this,Se);ae(this,hn);ue(this,xi,t),ue(this,dn,e),ue(this,kr,r),ue(this,Se,i),ue(this,hn,n)}async action(t){return await x(this,dn).action(void 0,x(this,Se),x(this,kr),x(this,hn),t.name,t.args,{signal:t.signal})}connect(){Z().debug(&quot;establishing connection from handle&quot;,{query:x(this,Se)});const t=new Wk(x(this,xi),x(this,dn),x(this,hn),x(this,kr),x(this,Se));return x(this,xi)[zy](t)}async fetch(t,e){return zk(x(this,dn),x(this,Se),x(this,hn),t,e)}async websocket(t,e){return jk(x(this,dn),x(this,Se),x(this,hn),t,e)}async resolve({signal:t}={}){if(&quot;getForKey&quot;in x(this,Se)||&quot;getOrCreateForKey&quot;in x(this,Se)){let e;&quot;getForKey&quot;in x(this,Se)?e=x(this,Se).getForKey.name:&quot;getOrCreateForKey&quot;in x(this,Se)?e=x(this,Se).getOrCreateForKey.name:mp(x(this,Se));const n=await x(this,dn).resolveActorId(void 0,x(this,Se),x(this,kr),x(this,hn),t?{signal:t}:void 0);return ue(this,Se,{getForId:{actorId:n,name:e}}),n}else{if(&quot;getForId&quot;in x(this,Se))return x(this,Se).getForId.actorId;&quot;create&quot;in x(this,Se)?dk(!1,&quot;actorQuery cannot be create&quot;):mp(x(this,Se))}}},xi=new WeakMap,dn=new WeakMap,kr=new WeakMap,Se=new WeakMap,hn=new WeakMap,Wp),yo=Symbol(&quot;actorConns&quot;),zy=Symbol(&quot;createActorConnProxy&quot;),Ls=Symbol(&quot;transport&quot;),Hp,Zp,fl,Ei,Ci,Sr,Ss,Kp,$k=(Kp=class{constructor(t,e){ae(this,Sr);ae(this,fl,!1);Ht(this,Zp,new Set);ae(this,Ei);ae(this,Ci);Ht(this,Hp);ue(this,Ei,t),ue(this,Ci,(e==null?void 0:e.encoding)??&quot;cbor&quot;),this[Ls]=(e==null?void 0:e.transport)??&quot;websocket&quot;}getForId(t,e,n){Z().debug(&quot;get handle to actor with id&quot;,{name:t,actorId:e,params:n==null?void 0:n.params});const r={getForId:{name:t,actorId:e}},i=re(this,Sr,Ss).call(this,n==null?void 0:n.params,r);return ps(i)}get(t,e,n){const r=typeof e==&quot;string&quot;?[e]:e||[];Z().debug(&quot;get handle to actor&quot;,{name:t,key:r,parameters:n==null?void 0:n.params});const i={getForKey:{name:t,key:r}},s=re(this,Sr,Ss).call(this,n==null?void 0:n.params,i);return ps(s)}getOrCreate(t,e,n){const r=typeof e==&quot;string&quot;?[e]:e||[];Z().debug(&quot;get or create handle to actor&quot;,{name:t,key:r,parameters:n==null?void 0:n.params,createInRegion:n==null?void 0:n.createInRegion});const i={getOrCreateForKey:{name:t,key:r,input:n==null?void 0:n.createWithInput,region:n==null?void 0:n.createInRegion}},s=re(this,Sr,Ss).call(this,n==null?void 0:n.params,i);return ps(s)}async create(t,e,n){const r=typeof e==&quot;string&quot;?[e]:e||[],i={create:{...n,name:t,key:r}};Z().debug(&quot;create actor handle&quot;,{name:t,key:r,parameters:n==null?void 0:n.params,create:i.create});const s=await x(this,Ei).resolveActorId(void 0,i,x(this,Ci),n==null?void 0:n.params,n!=null&amp;&amp;n.signal?{signal:n.signal}:void 0);Z().debug(&quot;created actor with ID&quot;,{name:t,key:r,actorId:s});const l={getForId:{name:t,actorId:s}},o=re(this,Sr,Ss).call(this,n==null?void 0:n.params,l);return ps(o)}[(Zp=yo,Hp=Ls,zy)](t){return this[yo].add(t),t[Fy](),ps(t)}async dispose(){if(x(this,fl)){Z().warn(&quot;client already disconnected&quot;);return}ue(this,fl,!0),Z().debug(&quot;disposing client&quot;);const t=[];for(const e of this[yo].values())t.push(e.dispose());await Promise.all(t)}},fl=new WeakMap,Ei=new WeakMap,Ci=new WeakMap,Sr=new WeakSet,Ss=function(t,e){return new Fk(this,x(this,Ei),t,x(this,Ci),e)},Kp);function Vk(t,e){const n=new $k(t,e);return new Proxy(n,{get:(r,i,s)=&gt;{if(typeof i==&quot;symbol&quot;||i in r){const l=Reflect.get(r,i,s);return typeof l==&quot;function&quot;?l.bind(r):l}if(typeof i==&quot;string&quot;)return{get:(l,o)=&gt;r.get(i,l,o),getOrCreate:(l,o)=&gt;r.getOrCreate(i,l,o),getForId:(l,o)=&gt;r.getForId(i,l,o),create:async(l,o={})=&gt;await r.create(i,l,o)}}})}function ps(t){const e=new Map;return new Proxy(t,{get(n,r,i){if(typeof r==&quot;symbol&quot;)return Reflect.get(n,r,i);if(r===&quot;constructor&quot;||r in n){const s=Reflect.get(n,r,i);return typeof s==&quot;function&quot;?s.bind(n):s}if(typeof r==&quot;string&quot;){if(r===&quot;then&quot;)return;let s=e.get(r);return s||(s=(...l)=&gt;n.action({name:r,args:l}),e.set(r,s)),s}},has(n,r){return typeof r==&quot;string&quot;?!0:Reflect.has(n,r)},getPrototypeOf(n){return Reflect.getPrototypeOf(n)},ownKeys(n){return Reflect.ownKeys(n)},getOwnPropertyDescriptor(n,r){const i=Reflect.getOwnPropertyDescriptor(n,r);if(i)return i;if(typeof r==&quot;string&quot;)return{configurable:!0,enumerable:!1,writable:!1,value:(...s)=&gt;n.action({name:r,args:s})}}})}function Bk(t){if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer||t instanceof Uint8Array)return t.byteLength;if(typeof t==&quot;string&quot;)return t.length;Ct(t)}async function wp(t){Z().debug(&quot;sending http request&quot;,{url:t.url,encoding:t.encoding});let e,n;(t.method===&quot;POST&quot;||t.method===&quot;PUT&quot;)&amp;&amp;(t.encoding===&quot;json&quot;?(e=&quot;application/json&quot;,n=JSON.stringify(t.body)):t.encoding===&quot;cbor&quot;?(e=&quot;application/octet-stream&quot;,n=Ty(t.body)):Ct(t.encoding));let r;try{r=await(t.customFetch??fetch)(new Request(t.url,{method:t.method,headers:{...t.headers,...e?{&quot;Content-Type&quot;:e}:{},&quot;User-Agent&quot;:po()},body:n,credentials:&quot;include&quot;,signal:t.signal}))}catch(s){throw new Eu(`Request failed: ${s}`,{cause:s})}if(!r.ok){const s=await r.arrayBuffer();let l;try{if(t.encoding===&quot;json&quot;){const o=new TextDecoder().decode(s);l=JSON.parse(o)}else if(t.encoding===&quot;cbor&quot;){const o=new Uint8Array(s);l=Ds(o)}else Ct(t.encoding)}catch{const a=new TextDecoder(&quot;utf-8&quot;,{fatal:!1}).decode(s);throw new Eu(`${r.statusText} (${r.status}):
${a}`)}throw new sa(l.c,l.m,l.md)}if(t.skipParseResponse)return;let i;try{if(t.encoding===&quot;json&quot;)i=await r.json();else if(t.encoding===&quot;cbor&quot;){const s=await r.arrayBuffer(),l=new Uint8Array(s);i=Ds(l)}else Ct(t.encoding)}catch(s){throw new Eu(`Failed to parse response: ${s}`,{cause:s})}return i}function jy(t,e){if(t===&quot;json&quot;)return JSON.stringify(e);if(t===&quot;cbor&quot;)return Ty(e);Ct(t)}var Fy=Symbol(&quot;connect&quot;),Pn,dl,Oi,xr,Er,Ti,ge,Un,bn,Yt,Ai,hl,pl,ht,zn,Cr,Ri,zt,Ni,J,Qc,$y,Vy,By,Wy,Jc,Gc,Yc,Xc,Hy,Zy,qc,vo,Ky,Qy,wo,Qp,Wk=(Qp=class{constructor(t,e,n,r,i){ae(this,J);ae(this,Pn,!1);ae(this,dl,new AbortController);ae(this,Oi,!1);ae(this,xr);ae(this,Er);ae(this,Ti);ae(this,ge);ae(this,Un,[]);ae(this,bn,new Map);ae(this,Yt,new Map);ae(this,Ai,new Set);ae(this,hl,0);ae(this,pl);ae(this,ht);ae(this,zn);ae(this,Cr);ae(this,Ri);ae(this,zt);ae(this,Ni);this.client=t,this.driver=e,this.params=n,this.encodingKind=r,this.actorQuery=i,ue(this,zn,t),ue(this,Cr,e),ue(this,Ri,n),ue(this,zt,r),ue(this,Ni,i),ue(this,pl,setInterval(()=&gt;6e4))}async action(t){Z().debug(&quot;action&quot;,{name:t.name,args:t.args});const e=x(this,hl);ue(this,hl,x(this,hl)+1);const{promise:n,resolve:r,reject:i}=Promise.withResolvers();x(this,bn).set(e,{name:t.name,resolve:r,reject:i}),re(this,J,vo).call(this,{b:{ar:{i:e,n:t.name,a:t.args}}});const{i:s,o:l}=await n;if(s!==e)throw new Error(`Request ID ${e} does not match response ID ${s}`);return l}[Fy](){re(this,J,Qc).call(this)}on(t,e){return re(this,J,qc).call(this,t,e,!1)}once(t,e){return re(this,J,qc).call(this,t,e,!0)}onError(t){return x(this,Ai).add(t),()=&gt;{x(this,Ai).delete(t)}}async dispose(){if(x(this,Pn)){Z().warn(&quot;connection already disconnected&quot;);return}if(ue(this,Pn,!0),Z().debug(&quot;disposing actor&quot;),clearInterval(x(this,pl)),x(this,dl).abort(),x(this,zn)[yo].delete(this),x(this,ge))if(&quot;websocket&quot;in x(this,ge)){const{promise:t,resolve:e}=Promise.withResolvers();x(this,ge).websocket.addEventListener(&quot;close&quot;,()=&gt;{Z().debug(&quot;ws closed&quot;),e(void 0)}),x(this,ge).websocket.close(),await t}else&quot;sse&quot;in x(this,ge)?x(this,ge).sse.close():Ct(x(this,ge));ue(this,ge,void 0)}},Pn=new WeakMap,dl=new WeakMap,Oi=new WeakMap,xr=new WeakMap,Er=new WeakMap,Ti=new WeakMap,ge=new WeakMap,Un=new WeakMap,bn=new WeakMap,Yt=new WeakMap,Ai=new WeakMap,hl=new WeakMap,pl=new WeakMap,ht=new WeakMap,zn=new WeakMap,Cr=new WeakMap,Ri=new WeakMap,zt=new WeakMap,Ni=new WeakMap,J=new WeakSet,Qc=async function(){ue(this,Oi,!0);try{await Uk(re(this,J,$y).bind(this),{forever:!0,minTimeout:250,maxTimeout:3e4,onFailedAttempt:t=&gt;{Z().warn(&quot;failed to reconnect&quot;,{attempt:t.attemptNumber,error:Bh(t)})},signal:x(this,dl).signal})}catch(t){if(t.name===&quot;AbortError&quot;){Z().info(&quot;connection retry aborted&quot;);return}else throw t}ue(this,Oi,!1)},$y=async function(){try{if(x(this,ht))throw new Error(&quot;#onOpenPromise already defined&quot;);ue(this,ht,Promise.withResolvers()),x(this,zn)[Ls]===&quot;websocket&quot;?await re(this,J,Vy).call(this):x(this,zn)[Ls]===&quot;sse&quot;?await re(this,J,By).call(this):Ct(x(this,zn)[Ls]),await x(this,ht).promise}finally{ue(this,ht,void 0)}},Vy=async function({signal:t}={}){const e=await x(this,Cr).connectWebSocket(void 0,x(this,Ni),x(this,zt),x(this,Ri),t?{signal:t}:void 0);ue(this,ge,{websocket:e}),e.addEventListener(&quot;open&quot;,()=&gt;{Z().debug(&quot;websocket open&quot;)}),e.addEventListener(&quot;message&quot;,async n=&gt;{re(this,J,Jc).call(this,n.data)}),e.addEventListener(&quot;close&quot;,n=&gt;{re(this,J,Gc).call(this,n)}),e.addEventListener(&quot;error&quot;,n=&gt;{re(this,J,Yc).call(this)})},By=async function({signal:t}={}){const e=await x(this,Cr).connectSse(void 0,x(this,Ni),x(this,zt),x(this,Ri),t?{signal:t}:void 0);ue(this,ge,{sse:e}),e.onopen=()=&gt;{Z().debug(&quot;eventsource open&quot;)},e.onmessage=n=&gt;{re(this,J,Jc).call(this,n.data)},e.onerror=n=&gt;{e.readyState===e.CLOSED?re(this,J,Gc).call(this,new Event(&quot;error&quot;)):re(this,J,Yc).call(this)}},Wy=function(){Z().debug(&quot;socket open&quot;,{messageQueueLength:x(this,Un).length}),x(this,ht)?x(this,ht).resolve(void 0):Z().warn(&quot;#onOpenPromise is undefined&quot;);for(const e of x(this,Yt).keys())re(this,J,wo).call(this,e,!0);const t=x(this,Un);ue(this,Un,[]);for(const e of t)re(this,J,vo).call(this,e)},Jc=async function(t){var e;Z().trace(&quot;received message&quot;,{dataType:typeof t,isBlob:t instanceof Blob,isArrayBuffer:t instanceof ArrayBuffer});const n=await re(this,J,Qy).call(this,t);if(Z().trace(&quot;parsed message&quot;,{response:JSON.stringify(n).substring(0,100)+&quot;...&quot;}),&quot;i&quot;in n.b)ue(this,xr,n.b.i.ai),ue(this,Er,n.b.i.ci),ue(this,Ti,n.b.i.ct),Z().trace(&quot;received init message&quot;,{actorId:x(this,xr),connectionId:x(this,Er)}),re(this,J,Wy).call(this);else if(&quot;e&quot;in n.b){const{c:r,m:i,md:s,ai:l}=n.b.e;if(l){const o=re(this,J,Xc).call(this,l);Z().warn(&quot;action error&quot;,{actionId:l,actionName:o==null?void 0:o.name,code:r,message:i,metadata:s}),o.reject(new sa(r,i,s))}else{Z().warn(&quot;connection error&quot;,{code:r,message:i,metadata:s});const o=new sa(r,i,s);x(this,ht)&amp;&amp;x(this,ht).reject(o);for(const[a,u]of x(this,bn).entries())u.reject(o),x(this,bn).delete(a);re(this,J,Zy).call(this,o)}}else if(&quot;ar&quot;in n.b){const{i:r,o:i}=n.b.ar;Z().trace(&quot;received action response&quot;,{actionId:r,outputType:i});const s=re(this,J,Xc).call(this,r);Z().trace(&quot;resolving action promise&quot;,{actionId:r,actionName:s==null?void 0:s.name}),s.resolve(n.b.ar)}else&quot;ev&quot;in n.b?(Z().trace(&quot;received event&quot;,{name:n.b.ev.n,argsCount:(e=n.b.ev.a)==null?void 0:e.length}),re(this,J,Hy).call(this,n.b.ev)):Ct(n.b)},Gc=function(t){x(this,ht)&amp;&amp;x(this,ht).reject(new Error(&quot;Closed&quot;));const e=t;e.wasClean?Z().info(&quot;socket closed&quot;,{code:e.code,reason:e.reason,wasClean:e.wasClean}):Z().warn(&quot;socket closed&quot;,{code:e.code,reason:e.reason,wasClean:e.wasClean}),ue(this,ge,void 0),!x(this,Pn)&amp;&amp;!x(this,Oi)&amp;&amp;re(this,J,Qc).call(this)},Yc=function(){x(this,Pn)||Z().warn(&quot;socket error&quot;)},Xc=function(t){const e=x(this,bn).get(t);if(!e)throw new ks(`No in flight response for ${t}`);return x(this,bn).delete(t),e},Hy=function(t){const{n:e,a:n}=t,r=x(this,Yt).get(e);if(r){for(const i of[...r])i.callback(...n),i.once&amp;&amp;r.delete(i);r.size===0&amp;&amp;x(this,Yt).delete(e)}},Zy=function(t){for(const e of[...x(this,Ai)])try{e(t)}catch(n){Z().error(&quot;Error in connection error handler&quot;,{error:Bh(n)})}},qc=function(t,e,n){const r={callback:e,once:n};let i=x(this,Yt).get(t);return i===void 0&amp;&amp;(i=new Set,x(this,Yt).set(t,i),re(this,J,wo).call(this,t,!0)),i.add(r),()=&gt;{const s=x(this,Yt).get(t);s&amp;&amp;(s.delete(r),s.size===0&amp;&amp;(x(this,Yt).delete(t),re(this,J,wo).call(this,t,!1)))}},vo=function(t,e){if(x(this,Pn))throw new bk;let n=!1;if(!x(this,ge))n=!0;else if(&quot;websocket&quot;in x(this,ge))if(x(this,ge).websocket.readyState===1)try{const r=jy(x(this,zt),t);x(this,ge).websocket.send(r),Z().trace(&quot;sent websocket message&quot;,{len:Bk(r)})}catch(r){Z().warn(&quot;failed to send message, added to queue&quot;,{error:r}),n=!0}else n=!0;else&quot;sse&quot;in x(this,ge)?x(this,ge).sse.readyState===1?re(this,J,Ky).call(this,t,e):n=!0:Ct(x(this,ge));!(e!=null&amp;&amp;e.ephemeral)&amp;&amp;n&amp;&amp;(x(this,Un).push(t),Z().debug(&quot;queued connection message&quot;))},Ky=async function(t,e){try{if(!x(this,xr)||!x(this,Er)||!x(this,Ti))throw new ks(&quot;Missing connection ID or token.&quot;);Z().trace(&quot;sent http message&quot;,{message:JSON.stringify(t).substring(0,100)+&quot;...&quot;});const n=await x(this,Cr).sendHttpMessage(void 0,x(this,xr),x(this,zt),x(this,Er),x(this,Ti),t,e!=null&amp;&amp;e.signal?{signal:e.signal}:void 0);if(!n.ok)throw new ks(`Publish message over HTTP error (${n.statusText}):
${await n.text()}`);await n.json()}catch(n){Z().warn(&quot;failed to send message, added to queue&quot;,{error:n}),e!=null&amp;&amp;e.ephemeral||x(this,Un).unshift(t)}},Qy=async function(t){if(x(this,zt)===&quot;json&quot;){if(typeof t!=&quot;string&quot;)throw new Error(&quot;received non-string for json parse&quot;);return JSON.parse(t)}else if(x(this,zt)===&quot;cbor&quot;){if(x(this,ge))if(&quot;sse&quot;in x(this,ge))if(typeof t==&quot;string&quot;){const e=atob(t);t=new Uint8Array([...e].map(n=&gt;n.charCodeAt(0)))}else throw new ks(`Expected data to be a string for SSE, got ${t}.`);else&quot;websocket&quot;in x(this,ge)||Ct(x(this,ge));else throw new Error(&quot;Cannot parse message when no transport defined&quot;);if(t instanceof Blob)return Ds(new Uint8Array(await t.arrayBuffer()));if(t instanceof ArrayBuffer)return Ds(new Uint8Array(t));if(t instanceof Uint8Array)return Ds(t);throw new Error(`received non-binary type for cbor parse: ${typeof t}`)}else Ct(x(this,zt))},wo=function(t,e){re(this,J,vo).call(this,{b:{sr:{e:t,s:e}}},{ephemeral:!0})},Qp),Gl=null;async function Hk(){return Gl!==null||(Gl=(async()=&gt;{let t;try{t=(await py(()=&gt;import(&quot;./index-z2Dkjsn_.js&quot;),[])).EventSource,Z().debug(&quot;using eventsource from npm&quot;)}catch{t=class{constructor(){throw new Error(&#39;EventSource support requires installing the &quot;eventsource&quot; peer dependency.&#39;)}},Z().debug(&quot;using mock eventsource&quot;)}return t})()),Gl}function Zk(t){const e=(async()=&gt;{const[r,i]=await Promise.all([uk(),Hk()]);return{WebSocket:r,EventSource:i}})();return{action:async(r,i,s,l,o,a,u)=&gt;(Z().debug(&quot;actor handle action&quot;,{name:o,args:a,query:i}),(await wp({url:`${t}/registry/actors/actions/${encodeURIComponent(o)}`,method:&quot;POST&quot;,headers:{[hs]:s,[Kl]:JSON.stringify(i),...l!==void 0?{[Ql]:JSON.stringify(l)}:{}},body:{a},encoding:s,signal:u==null?void 0:u.signal})).o),resolveActorId:async(r,i,s,l)=&gt;{Z().debug(&quot;resolving actor ID&quot;,{query:i});try{const o=await wp({url:`${t}/registry/actors/resolve`,method:&quot;POST&quot;,headers:{[hs]:s,[Kl]:JSON.stringify(i),...l!==void 0?{[Ql]:JSON.stringify(l)}:{}},body:{},encoding:s});return Z().debug(&quot;resolved actor ID&quot;,{actorId:o.i}),o.i}catch(o){throw Z().error(&quot;failed to resolve actor ID&quot;,{error:o}),o instanceof sa?o:new ks(`Failed to resolve actor ID: ${String(o)}`)}},connectWebSocket:async(r,i,s,l)=&gt;{const{WebSocket:o}=await e,u=`${t.replace(/^http:/,&quot;ws:&quot;).replace(/^https:/,&quot;wss:&quot;)}/registry/actors/connect/websocket`,c=[`query.${encodeURIComponent(JSON.stringify(i))}`,`encoding.${s}`];l&amp;&amp;c.push(`conn_params.${encodeURIComponent(JSON.stringify(l))}`),c.push(&quot;rivetkit&quot;),Z().debug(&quot;connecting to websocket&quot;,{url:u});const f=new o(u,c);if(s===&quot;cbor&quot;)f.binaryType=&quot;arraybuffer&quot;;else if(s===&quot;json&quot;)try{f.binaryType=&quot;blob&quot;}catch{}else Ct(s);return f},connectSse:async(r,i,s,l)=&gt;{const{EventSource:o}=await e,a=`${t}/registry/actors/connect/sse`;return Z().debug(&quot;connecting to sse&quot;,{url:a}),new o(a,{fetch:(c,f)=&gt;fetch(c,{...f,headers:{...f==null?void 0:f.headers,&quot;User-Agent&quot;:po(),[hs]:s,[Kl]:JSON.stringify(i),...l!==void 0?{[Ql]:JSON.stringify(l)}:{}},credentials:&quot;include&quot;})})},sendHttpMessage:async(r,i,s,l,o,a)=&gt;{const u=jy(s,a);return await fetch(`${t}/registry/actors/message`,{method:&quot;POST&quot;,headers:{&quot;User-Agent&quot;:po(),[hs]:s,[sk]:i,[lk]:l,[ok]:o},body:u,credentials:&quot;include&quot;})},rawHttpRequest:async(r,i,s,l,o,a)=&gt;{const u=o.startsWith(&quot;/&quot;)?o.slice(1):o,c=`${t}/registry/actors/raw/http/${u}`;Z().debug(&quot;rewriting http url&quot;,{from:o,to:c});const f=new Headers(a.headers);return f.set(&quot;User-Agent&quot;,po()),f.set(Kl,JSON.stringify(i)),f.set(hs,s),l!==void 0&amp;&amp;f.set(Ql,JSON.stringify(l)),await fetch(c,{...a,headers:f})},rawWebSocket:async(r,i,s,l,o,a)=&gt;{const{WebSocket:u}=await e,c=t.replace(/^http:/,&quot;ws:&quot;).replace(/^https:/,&quot;wss:&quot;),f=o.startsWith(&quot;/&quot;)?o.slice(1):o,d=`${c}/registry/actors/raw/websocket/${f}`;Z().debug(&quot;rewriting websocket url&quot;,{from:o,to:d});const h=[];return h.push(`query.${encodeURIComponent(JSON.stringify(i))}`),h.push(`encoding.${s}`),l&amp;&amp;h.push(`conn_params.${encodeURIComponent(JSON.stringify(l))}`),h.push(&quot;rivetkit&quot;),a&amp;&amp;(Array.isArray(a)?h.push(...a):h.push(a)),Z().debug(&quot;opening raw websocket&quot;,{url:d}),new u(d,h)}}}function Kk(t,e){const n=Zk(t);return Vk(n,e)}function Qk(t,e={}){const{getOrCreateActor:n}=x_(t,e);function r(i){const{mount:s,setState:l,state:o}=n(i);Re.useEffect(()=&gt;{l(c=&gt;(c.opts={...i,enabled:i.enabled??!0},c))},[i,l]),Re.useEffect(()=&gt;s(),[s]);const a=$h(o)||{};function u(c,f){const d=Re.useRef(f),h=$h(o)||{};Re.useEffect(()=&gt;{d.current=f},[f]),Re.useEffect(()=&gt;{if(!(h!=null&amp;&amp;h.connection))return;function y(...k){d.current(...k)}return h.connection.on(c,y)},[h.connection,h.isConnected,h.hash,c])}return{...a,useEvent:u}}return{useActor:r}}const Bt=()=&gt;new Map,ef=t=&gt;{const e=Bt();return t.forEach((n,r)=&gt;{e.set(r,n)}),e},ur=(t,e,n)=&gt;{let r=t.get(e);return r===void 0&amp;&amp;t.set(e,r=n()),r},Jk=(t,e)=&gt;{const n=[];for(const[r,i]of t)n.push(e(i,r));return n},Gk=(t,e)=&gt;{for(const[n,r]of t)if(e(r,n))return!0;return!1},Wi=()=&gt;new Set,Cu=t=&gt;t[t.length-1],Yk=(t,e)=&gt;{for(let n=0;n&lt;e.length;n++)t.push(e[n])},jr=Array.from,Xk=Array.isArray;class qk{constructor(){this._observers=Bt()}on(e,n){return ur(this._observers,e,Wi).add(n),n}once(e,n){const r=(...i)=&gt;{this.off(e,r),n(...i)};this.on(e,r)}off(e,n){const r=this._observers.get(e);r!==void 0&amp;&amp;(r.delete(n),r.size===0&amp;&amp;this._observers.delete(e))}emit(e,n){return jr((this._observers.get(e)||Bt()).values()).forEach(r=&gt;r(...n))}destroy(){this._observers=Bt()}}const rr=Math.floor,_o=Math.abs,Jy=(t,e)=&gt;t&lt;e?t:e,Hr=(t,e)=&gt;t&gt;e?t:e,Gy=t=&gt;t!==0?t&lt;0:1/t&lt;0,_p=1,kp=2,Ou=4,Tu=8,rl=32,yn=64,vt=128,Ma=31,tf=63,Ir=127,eS=2147483647,Yy=Number.MAX_SAFE_INTEGER,tS=Number.isInteger||(t=&gt;typeof t==&quot;number&quot;&amp;&amp;isFinite(t)&amp;&amp;rr(t)===t),nS=t=&gt;t.toLowerCase(),rS=/^\s*/g,iS=t=&gt;t.replace(rS,&quot;&quot;),sS=/([A-Z])/g,Sp=(t,e)=&gt;iS(t.replace(sS,n=&gt;`${e}${nS(n)}`)),lS=t=&gt;{const e=unescape(encodeURIComponent(t)),n=e.length,r=new Uint8Array(n);for(let i=0;i&lt;n;i++)r[i]=e.codePointAt(i);return r},il=typeof TextEncoder&lt;&quot;u&quot;?new TextEncoder:null,oS=t=&gt;il.encode(t),aS=il?oS:lS;let Ms=typeof TextDecoder&gt;&quot;u&quot;?null:new TextDecoder(&quot;utf-8&quot;,{fatal:!0,ignoreBOM:!0});Ms&amp;&amp;Ms.decode(new Uint8Array).length===1&amp;&amp;(Ms=null);class kl{constructor(){this.cpos=0,this.cbuf=new Uint8Array(100),this.bufs=[]}}const Pa=()=&gt;new kl,uS=t=&gt;{let e=t.cpos;for(let n=0;n&lt;t.bufs.length;n++)e+=t.bufs[n].length;return e},qt=t=&gt;{const e=new Uint8Array(uS(t));let n=0;for(let r=0;r&lt;t.bufs.length;r++){const i=t.bufs[r];e.set(i,n),n+=i.length}return e.set(new Uint8Array(t.cbuf.buffer,0,t.cpos),n),e},cS=(t,e)=&gt;{const n=t.cbuf.length;n-t.cpos&lt;e&amp;&amp;(t.bufs.push(new Uint8Array(t.cbuf.buffer,0,t.cpos)),t.cbuf=new Uint8Array(Hr(n,e)*2),t.cpos=0)},je=(t,e)=&gt;{const n=t.cbuf.length;t.cpos===n&amp;&amp;(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(n*2),t.cpos=0),t.cbuf[t.cpos++]=e},nf=je,ie=(t,e)=&gt;{for(;e&gt;Ir;)je(t,vt|Ir&amp;e),e=rr(e/128);je(t,Ir&amp;e)},dd=(t,e)=&gt;{const n=Gy(e);for(n&amp;&amp;(e=-e),je(t,(e&gt;tf?vt:0)|(n?yn:0)|tf&amp;e),e=rr(e/64);e&gt;0;)je(t,(e&gt;Ir?vt:0)|Ir&amp;e),e=rr(e/128)},rf=new Uint8Array(3e4),fS=rf.length/3,dS=(t,e)=&gt;{if(e.length&lt;fS){const n=il.encodeInto(e,rf).written||0;ie(t,n);for(let r=0;r&lt;n;r++)je(t,rf[r])}else ft(t,aS(e))},hS=(t,e)=&gt;{const n=unescape(encodeURIComponent(e)),r=n.length;ie(t,r);for(let i=0;i&lt;r;i++)je(t,n.codePointAt(i))},wi=il&amp;&amp;il.encodeInto?dS:hS,Ua=(t,e)=&gt;{const n=t.cbuf.length,r=t.cpos,i=Jy(n-r,e.length),s=e.length-i;t.cbuf.set(e.subarray(0,i),r),t.cpos+=i,s&gt;0&amp;&amp;(t.bufs.push(t.cbuf),t.cbuf=new Uint8Array(Hr(n*2,s)),t.cbuf.set(e.subarray(i)),t.cpos=s)},ft=(t,e)=&gt;{ie(t,e.byteLength),Ua(t,e)},hd=(t,e)=&gt;{cS(t,e);const n=new DataView(t.cbuf.buffer,t.cpos,e);return t.cpos+=e,n},pS=(t,e)=&gt;hd(t,4).setFloat32(0,e,!1),gS=(t,e)=&gt;hd(t,8).setFloat64(0,e,!1),mS=(t,e)=&gt;hd(t,8).setBigInt64(0,e,!1),xp=new DataView(new ArrayBuffer(4)),yS=t=&gt;(xp.setFloat32(0,t),xp.getFloat32(0)===t),sl=(t,e)=&gt;{switch(typeof e){case&quot;string&quot;:je(t,119),wi(t,e);break;case&quot;number&quot;:tS(e)&amp;&amp;_o(e)&lt;=eS?(je(t,125),dd(t,e)):yS(e)?(je(t,124),pS(t,e)):(je(t,123),gS(t,e));break;case&quot;bigint&quot;:je(t,122),mS(t,e);break;case&quot;object&quot;:if(e===null)je(t,126);else if(Xk(e)){je(t,117),ie(t,e.length);for(let n=0;n&lt;e.length;n++)sl(t,e[n])}else if(e instanceof Uint8Array)je(t,116),ft(t,e);else{je(t,118);const n=Object.keys(e);ie(t,n.length);for(let r=0;r&lt;n.length;r++){const i=n[r];wi(t,i),sl(t,e[i])}}break;case&quot;boolean&quot;:je(t,e?120:121);break;default:je(t,127)}};class Ep extends kl{constructor(e){super(),this.w=e,this.s=null,this.count=0}write(e){this.s===e?this.count++:(this.count&gt;0&amp;&amp;ie(this,this.count-1),this.count=1,this.w(this,e),this.s=e)}}const Cp=t=&gt;{t.count&gt;0&amp;&amp;(dd(t.encoder,t.count===1?t.s:-t.s),t.count&gt;1&amp;&amp;ie(t.encoder,t.count-2))};class ko{constructor(){this.encoder=new kl,this.s=0,this.count=0}write(e){this.s===e?this.count++:(Cp(this),this.count=1,this.s=e)}toUint8Array(){return Cp(this),qt(this.encoder)}}const Op=t=&gt;{if(t.count&gt;0){const e=t.diff*2+(t.count===1?0:1);dd(t.encoder,e),t.count&gt;1&amp;&amp;ie(t.encoder,t.count-2)}};class Au{constructor(){this.encoder=new kl,this.s=0,this.count=0,this.diff=0}write(e){this.diff===e-this.s?(this.s=e,this.count++):(Op(this),this.count=1,this.diff=e-this.s,this.s=e)}toUint8Array(){return Op(this),qt(this.encoder)}}class vS{constructor(){this.sarr=[],this.s=&quot;&quot;,this.lensE=new ko}write(e){this.s+=e,this.s.length&gt;19&amp;&amp;(this.sarr.push(this.s),this.s=&quot;&quot;),this.lensE.write(e.length)}toUint8Array(){const e=new kl;return this.sarr.push(this.s),this.s=&quot;&quot;,wi(e,this.sarr.join(&quot;&quot;)),Ua(e,this.lensE.toUint8Array()),qt(e)}}const ir=t=&gt;new Error(t),rn=()=&gt;{throw ir(&quot;Method unimplemented&quot;)},sn=()=&gt;{throw ir(&quot;Unexpected case&quot;)},Xy=ir(&quot;Unexpected end of array&quot;),qy=ir(&quot;Integer out of Range&quot;);class ba{constructor(e){this.arr=e,this.pos=0}}const es=t=&gt;new ba(t),wS=t=&gt;t.pos!==t.arr.length,_S=(t,e)=&gt;{const n=new Uint8Array(t.arr.buffer,t.pos+t.arr.byteOffset,e);return t.pos+=e,n},dt=t=&gt;_S(t,Y(t)),Hi=t=&gt;t.arr[t.pos++],Y=t=&gt;{let e=0,n=1;const r=t.arr.length;for(;t.pos&lt;r;){const i=t.arr[t.pos++];if(e=e+(i&amp;Ir)*n,n*=128,i&lt;vt)return e;if(e&gt;Yy)throw qy}throw Xy},pd=t=&gt;{let e=t.arr[t.pos++],n=e&amp;tf,r=64;const i=(e&amp;yn)&gt;0?-1:1;if(!(e&amp;vt))return i*n;const s=t.arr.length;for(;t.pos&lt;s;){if(e=t.arr[t.pos++],n=n+(e&amp;Ir)*r,r*=128,e&lt;vt)return i*n;if(n&gt;Yy)throw qy}throw Xy},kS=t=&gt;{let e=Y(t);if(e===0)return&quot;&quot;;{let n=String.fromCodePoint(Hi(t));if(--e&lt;100)for(;e--;)n+=String.fromCodePoint(Hi(t));else for(;e&gt;0;){const r=e&lt;1e4?e:1e4,i=t.arr.subarray(t.pos,t.pos+r);t.pos+=r,n+=String.fromCodePoint.apply(null,i),e-=r}return decodeURIComponent(escape(n))}},SS=t=&gt;Ms.decode(dt(t)),_i=Ms?SS:kS,gd=(t,e)=&gt;{const n=new DataView(t.arr.buffer,t.arr.byteOffset+t.pos,e);return t.pos+=e,n},xS=t=&gt;gd(t,4).getFloat32(0,!1),ES=t=&gt;gd(t,8).getFloat64(0,!1),CS=t=&gt;gd(t,8).getBigInt64(0,!1),OS=[t=&gt;{},t=&gt;null,pd,xS,ES,CS,t=&gt;!1,t=&gt;!0,_i,t=&gt;{const e=Y(t),n={};for(let r=0;r&lt;e;r++){const i=_i(t);n[i]=ll(t)}return n},t=&gt;{const e=Y(t),n=[];for(let r=0;r&lt;e;r++)n.push(ll(t));return n},dt],ll=t=&gt;OS[127-Hi(t)](t);class Tp extends ba{constructor(e,n){super(e),this.reader=n,this.s=null,this.count=0}read(){return this.count===0&amp;&amp;(this.s=this.reader(this),wS(this)?this.count=Y(this)+1:this.count=-1),this.count--,this.s}}class So extends ba{constructor(e){super(e),this.s=0,this.count=0}read(){if(this.count===0){this.s=pd(this);const e=Gy(this.s);this.count=1,e&amp;&amp;(this.s=-this.s,this.count=Y(this)+2)}return this.count--,this.s}}class Ru extends ba{constructor(e){super(e),this.s=0,this.count=0,this.diff=0}read(){if(this.count===0){const e=pd(this),n=e&amp;1;this.diff=rr(e/2),this.count=1,n&amp;&amp;(this.count=Y(this)+2)}return this.s+=this.diff,this.count--,this.s}}class TS{constructor(e){this.decoder=new So(e),this.str=_i(this.decoder),this.spos=0}read(){const e=this.spos+this.decoder.read(),n=this.str.slice(this.spos,e);return this.spos=e,n}}const AS=crypto.getRandomValues.bind(crypto),e0=()=&gt;AS(new Uint32Array(1))[0],RS=&quot;10000000-1000-4000-8000&quot;+-1e11,NS=()=&gt;RS.replace(/[018]/g,t=&gt;(t^e0()&amp;15&gt;&gt;t/4).toString(16)),Ap=t=&gt;new Promise(t);Promise.all.bind(Promise);const Rp=t=&gt;t===void 0?null:t;class IS{constructor(){this.map=new Map}setItem(e,n){this.map.set(e,n)}getItem(e){return this.map.get(e)}}let t0=new IS,DS=!0;try{typeof localStorage&lt;&quot;u&quot;&amp;&amp;localStorage&amp;&amp;(t0=localStorage,DS=!1)}catch{}const LS=t0,MS=Object.assign,PS=Object.keys,US=(t,e)=&gt;{for(const n in t)e(t[n],n)},Np=t=&gt;PS(t).length,bS=t=&gt;{for(const e in t)return!1;return!0},zS=(t,e)=&gt;{for(const n in t)if(!e(t[n],n))return!1;return!0},jS=(t,e)=&gt;Object.prototype.hasOwnProperty.call(t,e),FS=(t,e)=&gt;t===e||Np(t)===Np(e)&amp;&amp;zS(t,(n,r)=&gt;(n!==void 0||jS(e,r))&amp;&amp;e[r]===n),$S=Object.freeze,n0=t=&gt;{for(const e in t){const n=t[e];(typeof n==&quot;object&quot;||typeof n==&quot;function&quot;)&amp;&amp;n0(t[e])}return $S(t)},md=(t,e,n=0)=&gt;{try{for(;n&lt;t.length;n++)t[n](...e)}finally{n&lt;t.length&amp;&amp;md(t,e,n+1)}},VS=t=&gt;t,BS=(t,e)=&gt;e.includes(t);var r0={};const ol=typeof process&lt;&quot;u&quot;&amp;&amp;process.release&amp;&amp;/node|io\.js/.test(process.release.name)&amp;&amp;Object.prototype.toString.call(typeof process&lt;&quot;u&quot;?process:0)===&quot;[object process]&quot;;let Qt;const WS=()=&gt;{if(Qt===void 0)if(ol){Qt=Bt();const t=process.argv;let e=null;for(let n=0;n&lt;t.length;n++){const r=t[n];r[0]===&quot;-&quot;?(e!==null&amp;&amp;Qt.set(e,&quot;&quot;),e=r):e!==null&amp;&amp;(Qt.set(e,r),e=null)}e!==null&amp;&amp;Qt.set(e,&quot;&quot;)}else typeof location==&quot;object&quot;?(Qt=Bt(),(location.search||&quot;?&quot;).slice(1).split(&quot;&amp;&quot;).forEach(t=&gt;{if(t.length!==0){const[e,n]=t.split(&quot;=&quot;);Qt.set(`--${Sp(e,&quot;-&quot;)}`,n),Qt.set(`-${Sp(e,&quot;-&quot;)}`,n)}})):Qt=Bt();return Qt},sf=t=&gt;WS().has(t),la=t=&gt;Rp(ol?r0[t.toUpperCase().replaceAll(&quot;-&quot;,&quot;_&quot;)]:LS.getItem(t)),i0=t=&gt;sf(&quot;--&quot;+t)||la(t)!==null;i0(&quot;production&quot;);const HS=ol&amp;&amp;BS(r0.FORCE_COLOR,[&quot;true&quot;,&quot;1&quot;,&quot;2&quot;]),ZS=HS||!sf(&quot;--no-colors&quot;)&amp;&amp;!i0(&quot;no-color&quot;)&amp;&amp;(!ol||process.stdout.isTTY)&amp;&amp;(!ol||sf(&quot;--color&quot;)||la(&quot;COLORTERM&quot;)!==null||(la(&quot;TERM&quot;)||&quot;&quot;).includes(&quot;color&quot;)),KS=t=&gt;new Uint8Array(t),QS=t=&gt;{const e=KS(t.byteLength);return e.set(t),e};class JS{constructor(e,n){this.left=e,this.right=n}}const un=(t,e)=&gt;new JS(t,e);typeof DOMParser&lt;&quot;u&quot;&amp;&amp;new DOMParser;const GS=t=&gt;Jk(t,(e,n)=&gt;`${n}:${e};`).join(&quot;&quot;),En=Symbol,s0=En(),l0=En(),YS=En(),XS=En(),qS=En(),o0=En(),ex=En(),yd=En(),tx=En(),nx=t=&gt;{var i;t.length===1&amp;&amp;((i=t[0])==null?void 0:i.constructor)===Function&amp;&amp;(t=t[0]());const e=[],n=[];let r=0;for(;r&lt;t.length;r++){const s=t[r];if(s===void 0)break;if(s.constructor===String||s.constructor===Number)e.push(s);else if(s.constructor===Object)break}for(r&gt;0&amp;&amp;n.push(e.join(&quot;&quot;));r&lt;t.length;r++){const s=t[r];s instanceof Symbol||n.push(s)}return n},rx={[s0]:un(&quot;font-weight&quot;,&quot;bold&quot;),[l0]:un(&quot;font-weight&quot;,&quot;normal&quot;),[YS]:un(&quot;color&quot;,&quot;blue&quot;),[qS]:un(&quot;color&quot;,&quot;green&quot;),[XS]:un(&quot;color&quot;,&quot;grey&quot;),[o0]:un(&quot;color&quot;,&quot;red&quot;),[ex]:un(&quot;color&quot;,&quot;purple&quot;),[yd]:un(&quot;color&quot;,&quot;orange&quot;),[tx]:un(&quot;color&quot;,&quot;black&quot;)},ix=t=&gt;{var l;t.length===1&amp;&amp;((l=t[0])==null?void 0:l.constructor)===Function&amp;&amp;(t=t[0]());const e=[],n=[],r=Bt();let i=[],s=0;for(;s&lt;t.length;s++){const o=t[s],a=rx[o];if(a!==void 0)r.set(a.left,a.right);else{if(o===void 0)break;if(o.constructor===String||o.constructor===Number){const u=GS(r);s&gt;0||u.length&gt;0?(e.push(&quot;%c&quot;+o),n.push(u)):e.push(o)}else break}}for(s&gt;0&amp;&amp;(i=n,i.unshift(e.join(&quot;&quot;)));s&lt;t.length;s++){const o=t[s];o instanceof Symbol||i.push(o)}return i},a0=ZS?ix:nx,sx=(...t)=&gt;{console.log(...a0(t)),u0.forEach(e=&gt;e.print(t))},lx=(...t)=&gt;{console.warn(...a0(t)),t.unshift(yd),u0.forEach(e=&gt;e.print(t))},u0=Wi(),c0=t=&gt;({[Symbol.iterator](){return this},next:t}),ox=(t,e)=&gt;c0(()=&gt;{let n;do n=t.next();while(!n.done&amp;&amp;!e(n.value));return n}),Nu=(t,e)=&gt;c0(()=&gt;{const{done:n,value:r}=t.next();return{done:n,value:n?void 0:e(r)}});class vd{constructor(e,n){this.clock=e,this.len=n}}class Sl{constructor(){this.clients=new Map}}const f0=(t,e,n)=&gt;e.clients.forEach((r,i)=&gt;{const s=t.doc.store.clients.get(i);if(s!=null){const l=s[s.length-1],o=l.id.clock+l.length;for(let a=0,u=r[a];a&lt;r.length&amp;&amp;u.clock&lt;o;u=r[++a])k0(t,s,u.clock,u.len,n)}}),ax=(t,e)=&gt;{let n=0,r=t.length-1;for(;n&lt;=r;){const i=rr((n+r)/2),s=t[i],l=s.clock;if(l&lt;=e){if(e&lt;l+s.len)return i;n=i+1}else r=i-1}return null},d0=(t,e)=&gt;{const n=t.clients.get(e.client);return n!==void 0&amp;&amp;ax(n,e.clock)!==null},wd=t=&gt;{t.clients.forEach(e=&gt;{e.sort((i,s)=&gt;i.clock-s.clock);let n,r;for(n=1,r=1;n&lt;e.length;n++){const i=e[r-1],s=e[n];i.clock+i.len&gt;=s.clock?i.len=Hr(i.len,s.clock+s.len-i.clock):(r&lt;n&amp;&amp;(e[r]=s),r++)}e.length=r})},ux=t=&gt;{const e=new Sl;for(let n=0;n&lt;t.length;n++)t[n].clients.forEach((r,i)=&gt;{if(!e.clients.has(i)){const s=r.slice();for(let l=n+1;l&lt;t.length;l++)Yk(s,t[l].clients.get(i)||[]);e.clients.set(i,s)}});return wd(e),e},oa=(t,e,n,r)=&gt;{ur(t.clients,e,()=&gt;[]).push(new vd(n,r))},cx=()=&gt;new Sl,fx=t=&gt;{const e=cx();return t.clients.forEach((n,r)=&gt;{const i=[];for(let s=0;s&lt;n.length;s++){const l=n[s];if(l.deleted){const o=l.id.clock;let a=l.length;if(s+1&lt;n.length)for(let u=n[s+1];s+1&lt;n.length&amp;&amp;u.deleted;u=n[++s+1])a+=u.length;i.push(new vd(o,a))}}i.length&gt;0&amp;&amp;e.clients.set(r,i)}),e},ts=(t,e)=&gt;{ie(t.restEncoder,e.clients.size),jr(e.clients.entries()).sort((n,r)=&gt;r[0]-n[0]).forEach(([n,r])=&gt;{t.resetDsCurVal(),ie(t.restEncoder,n);const i=r.length;ie(t.restEncoder,i);for(let s=0;s&lt;i;s++){const l=r[s];t.writeDsClock(l.clock),t.writeDsLen(l.len)}})},_d=t=&gt;{const e=new Sl,n=Y(t.restDecoder);for(let r=0;r&lt;n;r++){t.resetDsCurVal();const i=Y(t.restDecoder),s=Y(t.restDecoder);if(s&gt;0){const l=ur(e.clients,i,()=&gt;[]);for(let o=0;o&lt;s;o++)l.push(new vd(t.readDsClock(),t.readDsLen()))}}return e},Ip=(t,e,n)=&gt;{const r=new Sl,i=Y(t.restDecoder);for(let s=0;s&lt;i;s++){t.resetDsCurVal();const l=Y(t.restDecoder),o=Y(t.restDecoder),a=n.clients.get(l)||[],u=$e(n,l);for(let c=0;c&lt;o;c++){const f=t.readDsClock(),d=f+t.readDsLen();if(f&lt;u){u&lt;d&amp;&amp;oa(r,l,u,d-u);let h=ln(a,f),y=a[h];for(!y.deleted&amp;&amp;y.id.clock&lt;f&amp;&amp;(a.splice(h+1,0,pa(e,y,f-y.id.clock)),h++);h&lt;a.length&amp;&amp;(y=a[h++],y.id.clock&lt;d);)y.deleted||(d&lt;y.id.clock+y.length&amp;&amp;a.splice(h,0,pa(e,y,d-y.id.clock)),y.delete(e))}else oa(r,l,f,d-f)}}if(r.clients.size&gt;0){const s=new Fr;return ie(s.restEncoder,0),ts(s,r),s.toUint8Array()}return null},h0=e0;class ns extends qk{constructor({guid:e=NS(),collectionid:n=null,gc:r=!0,gcFilter:i=()=&gt;!0,meta:s=null,autoLoad:l=!1,shouldLoad:o=!0}={}){super(),this.gc=r,this.gcFilter=i,this.clientID=h0(),this.guid=e,this.collectionid=n,this.share=new Map,this.store=new w0,this._transaction=null,this._transactionCleanups=[],this.subdocs=new Set,this._item=null,this.shouldLoad=o,this.autoLoad=l,this.meta=s,this.isLoaded=!1,this.isSynced=!1,this.isDestroyed=!1,this.whenLoaded=Ap(u=&gt;{this.on(&quot;load&quot;,()=&gt;{this.isLoaded=!0,u(this)})});const a=()=&gt;Ap(u=&gt;{const c=f=&gt;{(f===void 0||f===!0)&amp;&amp;(this.off(&quot;sync&quot;,c),u())};this.on(&quot;sync&quot;,c)});this.on(&quot;sync&quot;,u=&gt;{u===!1&amp;&amp;this.isSynced&amp;&amp;(this.whenSynced=a()),this.isSynced=u===void 0||u===!0,this.isSynced&amp;&amp;!this.isLoaded&amp;&amp;this.emit(&quot;load&quot;,[this])}),this.whenSynced=a()}load(){const e=this._item;e!==null&amp;&amp;!this.shouldLoad&amp;&amp;fe(e.parent.doc,n=&gt;{n.subdocsLoaded.add(this)},null,!0),this.shouldLoad=!0}getSubdocs(){return this.subdocs}getSubdocGuids(){return new Set(jr(this.subdocs).map(e=&gt;e.guid))}transact(e,n=null){return fe(this,e,n)}get(e,n=He){const r=ur(this.share,e,()=&gt;{const s=new n;return s._integrate(this,null),s}),i=r.constructor;if(n!==He&amp;&amp;i!==n)if(i===He){const s=new n;s._map=r._map,r._map.forEach(l=&gt;{for(;l!==null;l=l.left)l.parent=s}),s._start=r._start;for(let l=s._start;l!==null;l=l.right)l.parent=s;return s._length=r._length,this.share.set(e,s),s._integrate(this,null),s}else throw new Error(`Type with the name ${e} has already been defined with a different constructor`);return r}getArray(e=&quot;&quot;){return this.get(e,Si)}getText(e=&quot;&quot;){return this.get(e,Qi)}getMap(e=&quot;&quot;){return this.get(e,Ki)}getXmlElement(e=&quot;&quot;){return this.get(e,Ji)}getXmlFragment(e=&quot;&quot;){return this.get(e,$r)}toJSON(){const e={};return this.share.forEach((n,r)=&gt;{e[r]=n.toJSON()}),e}destroy(){this.isDestroyed=!0,jr(this.subdocs).forEach(n=&gt;n.destroy());const e=this._item;if(e!==null){this._item=null;const n=e.content;n.doc=new ns({guid:this.guid,...n.opts,shouldLoad:!1}),n.doc._item=e,fe(e.parent.doc,r=&gt;{const i=n.doc;e.deleted||r.subdocsAdded.add(i),r.subdocsRemoved.add(this)},null,!0)}this.emit(&quot;destroyed&quot;,[!0]),this.emit(&quot;destroy&quot;,[this]),super.destroy()}}class p0{constructor(e){this.restDecoder=e}resetDsCurVal(){}readDsClock(){return Y(this.restDecoder)}readDsLen(){return Y(this.restDecoder)}}class g0 extends p0{readLeftID(){return ne(Y(this.restDecoder),Y(this.restDecoder))}readRightID(){return ne(Y(this.restDecoder),Y(this.restDecoder))}readClient(){return Y(this.restDecoder)}readInfo(){return Hi(this.restDecoder)}readString(){return _i(this.restDecoder)}readParentInfo(){return Y(this.restDecoder)===1}readTypeRef(){return Y(this.restDecoder)}readLen(){return Y(this.restDecoder)}readAny(){return ll(this.restDecoder)}readBuf(){return QS(dt(this.restDecoder))}readJSON(){return JSON.parse(_i(this.restDecoder))}readKey(){return _i(this.restDecoder)}}class dx{constructor(e){this.dsCurrVal=0,this.restDecoder=e}resetDsCurVal(){this.dsCurrVal=0}readDsClock(){return this.dsCurrVal+=Y(this.restDecoder),this.dsCurrVal}readDsLen(){const e=Y(this.restDecoder)+1;return this.dsCurrVal+=e,e}}class Zi extends dx{constructor(e){super(e),this.keys=[],Y(e),this.keyClockDecoder=new Ru(dt(e)),this.clientDecoder=new So(dt(e)),this.leftClockDecoder=new Ru(dt(e)),this.rightClockDecoder=new Ru(dt(e)),this.infoDecoder=new Tp(dt(e),Hi),this.stringDecoder=new TS(dt(e)),this.parentInfoDecoder=new Tp(dt(e),Hi),this.typeRefDecoder=new So(dt(e)),this.lenDecoder=new So(dt(e))}readLeftID(){return new ki(this.clientDecoder.read(),this.leftClockDecoder.read())}readRightID(){return new ki(this.clientDecoder.read(),this.rightClockDecoder.read())}readClient(){return this.clientDecoder.read()}readInfo(){return this.infoDecoder.read()}readString(){return this.stringDecoder.read()}readParentInfo(){return this.parentInfoDecoder.read()===1}readTypeRef(){return this.typeRefDecoder.read()}readLen(){return this.lenDecoder.read()}readAny(){return ll(this.restDecoder)}readBuf(){return dt(this.restDecoder)}readJSON(){return ll(this.restDecoder)}readKey(){const e=this.keyClockDecoder.read();if(e&lt;this.keys.length)return this.keys[e];{const n=this.stringDecoder.read();return this.keys.push(n),n}}}class hx{constructor(){this.restEncoder=Pa()}toUint8Array(){return qt(this.restEncoder)}resetDsCurVal(){}writeDsClock(e){ie(this.restEncoder,e)}writeDsLen(e){ie(this.restEncoder,e)}}class xl extends hx{writeLeftID(e){ie(this.restEncoder,e.client),ie(this.restEncoder,e.clock)}writeRightID(e){ie(this.restEncoder,e.client),ie(this.restEncoder,e.clock)}writeClient(e){ie(this.restEncoder,e)}writeInfo(e){nf(this.restEncoder,e)}writeString(e){wi(this.restEncoder,e)}writeParentInfo(e){ie(this.restEncoder,e?1:0)}writeTypeRef(e){ie(this.restEncoder,e)}writeLen(e){ie(this.restEncoder,e)}writeAny(e){sl(this.restEncoder,e)}writeBuf(e){ft(this.restEncoder,e)}writeJSON(e){wi(this.restEncoder,JSON.stringify(e))}writeKey(e){wi(this.restEncoder,e)}}class px{constructor(){this.restEncoder=Pa(),this.dsCurrVal=0}toUint8Array(){return qt(this.restEncoder)}resetDsCurVal(){this.dsCurrVal=0}writeDsClock(e){const n=e-this.dsCurrVal;this.dsCurrVal=e,ie(this.restEncoder,n)}writeDsLen(e){e===0&amp;&amp;sn(),ie(this.restEncoder,e-1),this.dsCurrVal+=e}}class Fr extends px{constructor(){super(),this.keyMap=new Map,this.keyClock=0,this.keyClockEncoder=new Au,this.clientEncoder=new ko,this.leftClockEncoder=new Au,this.rightClockEncoder=new Au,this.infoEncoder=new Ep(nf),this.stringEncoder=new vS,this.parentInfoEncoder=new Ep(nf),this.typeRefEncoder=new ko,this.lenEncoder=new ko}toUint8Array(){const e=Pa();return ie(e,0),ft(e,this.keyClockEncoder.toUint8Array()),ft(e,this.clientEncoder.toUint8Array()),ft(e,this.leftClockEncoder.toUint8Array()),ft(e,this.rightClockEncoder.toUint8Array()),ft(e,qt(this.infoEncoder)),ft(e,this.stringEncoder.toUint8Array()),ft(e,qt(this.parentInfoEncoder)),ft(e,this.typeRefEncoder.toUint8Array()),ft(e,this.lenEncoder.toUint8Array()),Ua(e,qt(this.restEncoder)),qt(e)}writeLeftID(e){this.clientEncoder.write(e.client),this.leftClockEncoder.write(e.clock)}writeRightID(e){this.clientEncoder.write(e.client),this.rightClockEncoder.write(e.clock)}writeClient(e){this.clientEncoder.write(e)}writeInfo(e){this.infoEncoder.write(e)}writeString(e){this.stringEncoder.write(e)}writeParentInfo(e){this.parentInfoEncoder.write(e?1:0)}writeTypeRef(e){this.typeRefEncoder.write(e)}writeLen(e){this.lenEncoder.write(e)}writeAny(e){sl(this.restEncoder,e)}writeBuf(e){ft(this.restEncoder,e)}writeJSON(e){sl(this.restEncoder,e)}writeKey(e){const n=this.keyMap.get(e);n===void 0?(this.keyClockEncoder.write(this.keyClock++),this.stringEncoder.write(e)):this.keyClockEncoder.write(n)}}const gx=(t,e,n,r)=&gt;{r=Hr(r,e[0].id.clock);const i=ln(e,r);ie(t.restEncoder,e.length-i),t.writeClient(n),ie(t.restEncoder,r);const s=e[i];s.write(t,r-s.id.clock);for(let l=i+1;l&lt;e.length;l++)e[l].write(t,0)},kd=(t,e,n)=&gt;{const r=new Map;n.forEach((i,s)=&gt;{$e(e,s)&gt;i&amp;&amp;r.set(s,i)}),Sd(e).forEach((i,s)=&gt;{n.has(s)||r.set(s,0)}),ie(t.restEncoder,r.size),jr(r.entries()).sort((i,s)=&gt;s[0]-i[0]).forEach(([i,s])=&gt;{gx(t,e.clients.get(i),i,s)})},mx=(t,e)=&gt;{const n=Bt(),r=Y(t.restDecoder);for(let i=0;i&lt;r;i++){const s=Y(t.restDecoder),l=new Array(s),o=t.readClient();let a=Y(t.restDecoder);n.set(o,{i:0,refs:l});for(let u=0;u&lt;s;u++){const c=t.readInfo();switch(Ma&amp;c){case 0:{const f=t.readLen();l[u]=new At(ne(o,a),f),a+=f;break}case 10:{const f=Y(t.restDecoder);l[u]=new Rt(ne(o,a),f),a+=f;break}default:{const f=(c&amp;(yn|vt))===0,d=new Ue(ne(o,a),null,(c&amp;vt)===vt?t.readLeftID():null,null,(c&amp;yn)===yn?t.readRightID():null,f?t.readParentInfo()?e.get(t.readString()):t.readLeftID():null,f&amp;&amp;(c&amp;rl)===rl?t.readString():null,F0(t,c));l[u]=d,a+=d.length}}}}return n},yx=(t,e,n)=&gt;{const r=[];let i=jr(n.keys()).sort((h,y)=&gt;h-y);if(i.length===0)return null;const s=()=&gt;{if(i.length===0)return null;let h=n.get(i[i.length-1]);for(;h.refs.length===h.i;)if(i.pop(),i.length&gt;0)h=n.get(i[i.length-1]);else return null;return h};let l=s();if(l===null)return null;const o=new w0,a=new Map,u=(h,y)=&gt;{const k=a.get(h);(k==null||k&gt;y)&amp;&amp;a.set(h,y)};let c=l.refs[l.i++];const f=new Map,d=()=&gt;{for(const h of r){const y=h.id.client,k=n.get(y);k?(k.i--,o.clients.set(y,k.refs.slice(k.i)),n.delete(y),k.i=0,k.refs=[]):o.clients.set(y,[h]),i=i.filter(F=&gt;F!==y)}r.length=0};for(;;){if(c.constructor!==Rt){const y=ur(f,c.id.client,()=&gt;$e(e,c.id.client))-c.id.clock;if(y&lt;0)r.push(c),u(c.id.client,c.id.clock-1),d();else{const k=c.getMissing(t,e);if(k!==null){r.push(c);const F=n.get(k)||{refs:[],i:0};if(F.refs.length===F.i)u(k,$e(e,k)),d();else{c=F.refs[F.i++];continue}}else(y===0||y&lt;c.length)&amp;&amp;(c.integrate(t,y),f.set(c.id.client,c.id.clock+c.length))}}if(r.length&gt;0)c=r.pop();else if(l!==null&amp;&amp;l.i&lt;l.refs.length)c=l.refs[l.i++];else{if(l=s(),l===null)break;c=l.refs[l.i++]}}if(o.clients.size&gt;0){const h=new Fr;return kd(h,o,new Map),ie(h.restEncoder,0),{missing:a,update:h.toUint8Array()}}return null},vx=(t,e)=&gt;kd(t,e.doc.store,e.beforeState),wx=(t,e,n,r=new Zi(t))=&gt;fe(e,i=&gt;{i.local=!1;let s=!1;const l=i.doc,o=l.store,a=mx(r,l),u=yx(i,o,a),c=o.pendingStructs;if(c){for(const[d,h]of c.missing)if(h&lt;$e(o,d)){s=!0;break}if(u){for(const[d,h]of u.missing){const y=c.missing.get(d);(y==null||y&gt;h)&amp;&amp;c.missing.set(d,h)}c.update=aa([c.update,u.update])}}else o.pendingStructs=u;const f=Ip(r,i,o);if(o.pendingDs){const d=new Zi(es(o.pendingDs));Y(d.restDecoder);const h=Ip(d,i,o);f&amp;&amp;h?o.pendingDs=aa([f,h]):o.pendingDs=f||h}else o.pendingDs=f;if(s){const d=o.pendingStructs.update;o.pendingStructs=null,m0(i.doc,d)}},n,!1),m0=(t,e,n,r=Zi)=&gt;{const i=es(e);wx(i,t,n,new r(i))},Dp=(t,e,n)=&gt;m0(t,e,n,g0),_x=(t,e,n=new Map)=&gt;{kd(t,e.store,n),ts(t,fx(e.store))},kx=(t,e=new Uint8Array([0]),n=new Fr)=&gt;{const r=y0(e);_x(n,t,r);const i=[n.toUint8Array()];if(t.store.pendingDs&amp;&amp;i.push(t.store.pendingDs),t.store.pendingStructs&amp;&amp;i.push(Mx(t.store.pendingStructs.update,e)),i.length&gt;1){if(n.constructor===xl)return Dx(i.map((s,l)=&gt;l===0?s:Ux(s)));if(n.constructor===Fr)return aa(i)}return i[0]},Sx=(t,e)=&gt;kx(t,e,new xl),xx=t=&gt;{const e=new Map,n=Y(t.restDecoder);for(let r=0;r&lt;n;r++){const i=Y(t.restDecoder),s=Y(t.restDecoder);e.set(i,s)}return e},y0=t=&gt;xx(new p0(es(t)));class Ex{constructor(){this.l=[]}}const Lp=()=&gt;new Ex,Mp=(t,e)=&gt;t.l.push(e),Pp=(t,e)=&gt;{const n=t.l,r=n.length;t.l=n.filter(i=&gt;e!==i),r===t.l.length&amp;&amp;console.error(&quot;[yjs] Tried to remove event handler that doesn&#39;t exist.&quot;)},v0=(t,e,n)=&gt;md(t.l,[e,n]);class ki{constructor(e,n){this.client=e,this.clock=n}}const Yl=(t,e)=&gt;t===e||t!==null&amp;&amp;e!==null&amp;&amp;t.client===e.client&amp;&amp;t.clock===e.clock,ne=(t,e)=&gt;new ki(t,e),Cx=t=&gt;{for(const[e,n]of t.doc.share.entries())if(n===t)return e;throw sn()},Yr=(t,e)=&gt;e===void 0?!t.deleted:e.sv.has(t.id.client)&amp;&amp;(e.sv.get(t.id.client)||0)&gt;t.id.clock&amp;&amp;!d0(e.ds,t.id),lf=(t,e)=&gt;{const n=ur(t.meta,lf,Wi),r=t.doc.store;n.has(e)||(e.sv.forEach((i,s)=&gt;{i&lt;$e(r,s)&amp;&amp;sr(t,ne(s,i))}),f0(t,e.ds,i=&gt;{}),n.add(e))};class w0{constructor(){this.clients=new Map,this.pendingStructs=null,this.pendingDs=null}}const Sd=t=&gt;{const e=new Map;return t.clients.forEach((n,r)=&gt;{const i=n[n.length-1];e.set(r,i.id.clock+i.length)}),e},$e=(t,e)=&gt;{const n=t.clients.get(e);if(n===void 0)return 0;const r=n[n.length-1];return r.id.clock+r.length},_0=(t,e)=&gt;{let n=t.clients.get(e.id.client);if(n===void 0)n=[],t.clients.set(e.id.client,n);else{const r=n[n.length-1];if(r.id.clock+r.length!==e.id.clock)throw sn()}n.push(e)},ln=(t,e)=&gt;{let n=0,r=t.length-1,i=t[r],s=i.id.clock;if(s===e)return r;let l=rr(e/(s+i.length-1)*r);for(;n&lt;=r;){if(i=t[l],s=i.id.clock,s&lt;=e){if(e&lt;s+i.length)return l;n=l+1}else r=l-1;l=rr((n+r)/2)}throw sn()},Ox=(t,e)=&gt;{const n=t.clients.get(e.client);return n[ln(n,e.clock)]},Iu=Ox,of=(t,e,n)=&gt;{const r=ln(e,n),i=e[r];return i.id.clock&lt;n&amp;&amp;i instanceof Ue?(e.splice(r+1,0,pa(t,i,n-i.id.clock)),r+1):r},sr=(t,e)=&gt;{const n=t.doc.store.clients.get(e.client);return n[of(t,n,e.clock)]},Up=(t,e,n)=&gt;{const r=e.clients.get(n.client),i=ln(r,n.clock),s=r[i];return n.clock!==s.id.clock+s.length-1&amp;&amp;s.constructor!==At&amp;&amp;r.splice(i+1,0,pa(t,s,n.clock-s.id.clock+1)),s},Tx=(t,e,n)=&gt;{const r=t.clients.get(e.id.client);r[ln(r,e.id.clock)]=n},k0=(t,e,n,r,i)=&gt;{if(r===0)return;const s=n+r;let l=of(t,e,n),o;do o=e[l++],s&lt;o.id.clock+o.length&amp;&amp;of(t,e,s),i(o);while(l&lt;e.length&amp;&amp;e[l].id.clock&lt;s)};class Ax{constructor(e,n,r){this.doc=e,this.deleteSet=new Sl,this.beforeState=Sd(e.store),this.afterState=new Map,this.changed=new Map,this.changedParentTypes=new Map,this._mergeStructs=[],this.origin=n,this.meta=new Map,this.local=r,this.subdocsAdded=new Set,this.subdocsRemoved=new Set,this.subdocsLoaded=new Set,this._needFormattingCleanup=!1}}const bp=(t,e)=&gt;e.deleteSet.clients.size===0&amp;&amp;!Gk(e.afterState,(n,r)=&gt;e.beforeState.get(r)!==n)?!1:(wd(e.deleteSet),vx(t,e),ts(t,e.deleteSet),!0),zp=(t,e,n)=&gt;{const r=e._item;(r===null||r.id.clock&lt;(t.beforeState.get(r.id.client)||0)&amp;&amp;!r.deleted)&amp;&amp;ur(t.changed,e,Wi).add(n)},xo=(t,e)=&gt;{let n=t[e],r=t[e-1],i=e;for(;i&gt;0;n=r,r=t[--i-1]){if(r.deleted===n.deleted&amp;&amp;r.constructor===n.constructor&amp;&amp;r.mergeWith(n)){n instanceof Ue&amp;&amp;n.parentSub!==null&amp;&amp;n.parent._map.get(n.parentSub)===n&amp;&amp;n.parent._map.set(n.parentSub,r);continue}break}const s=e-i;return s&amp;&amp;t.splice(e+1-s,s),s},Rx=(t,e,n)=&gt;{for(const[r,i]of t.clients.entries()){const s=e.clients.get(r);for(let l=i.length-1;l&gt;=0;l--){const o=i[l],a=o.clock+o.len;for(let u=ln(s,o.clock),c=s[u];u&lt;s.length&amp;&amp;c.id.clock&lt;a;c=s[++u]){const f=s[u];if(o.clock+o.len&lt;=f.id.clock)break;f instanceof Ue&amp;&amp;f.deleted&amp;&amp;!f.keep&amp;&amp;n(f)&amp;&amp;f.gc(e,!1)}}}},Nx=(t,e)=&gt;{t.clients.forEach((n,r)=&gt;{const i=e.clients.get(r);for(let s=n.length-1;s&gt;=0;s--){const l=n[s],o=Jy(i.length-1,1+ln(i,l.clock+l.len-1));for(let a=o,u=i[a];a&gt;0&amp;&amp;u.id.clock&gt;=l.clock;u=i[a])a-=1+xo(i,a)}})},S0=(t,e)=&gt;{if(e&lt;t.length){const n=t[e],r=n.doc,i=r.store,s=n.deleteSet,l=n._mergeStructs;try{wd(s),n.afterState=Sd(n.doc.store),r.emit(&quot;beforeObserverCalls&quot;,[n,r]);const o=[];n.changed.forEach((a,u)=&gt;o.push(()=&gt;{(u._item===null||!u._item.deleted)&amp;&amp;u._callObserver(n,a)})),o.push(()=&gt;{n.changedParentTypes.forEach((a,u)=&gt;{u._dEH.l.length&gt;0&amp;&amp;(u._item===null||!u._item.deleted)&amp;&amp;(a=a.filter(c=&gt;c.target._item===null||!c.target._item.deleted),a.forEach(c=&gt;{c.currentTarget=u,c._path=null}),a.sort((c,f)=&gt;c.path.length-f.path.length),v0(u._dEH,a,n))})}),o.push(()=&gt;r.emit(&quot;afterTransaction&quot;,[n,r])),md(o,[]),n._needFormattingCleanup&amp;&amp;Gx(n)}finally{r.gc&amp;&amp;Rx(s,i,r.gcFilter),Nx(s,i),n.afterState.forEach((c,f)=&gt;{const d=n.beforeState.get(f)||0;if(d!==c){const h=i.clients.get(f),y=Hr(ln(h,d),1);for(let k=h.length-1;k&gt;=y;)k-=1+xo(h,k)}});for(let c=l.length-1;c&gt;=0;c--){const{client:f,clock:d}=l[c].id,h=i.clients.get(f),y=ln(h,d);y+1&lt;h.length&amp;&amp;xo(h,y+1)&gt;1||y&gt;0&amp;&amp;xo(h,y)}if(!n.local&amp;&amp;n.afterState.get(r.clientID)!==n.beforeState.get(r.clientID)&amp;&amp;(sx(yd,s0,&quot;[yjs] &quot;,l0,o0,&quot;Changed the client-id because another client seems to be using it.&quot;),r.clientID=h0()),r.emit(&quot;afterTransactionCleanup&quot;,[n,r]),r._observers.has(&quot;update&quot;)){const c=new xl;bp(c,n)&amp;&amp;r.emit(&quot;update&quot;,[c.toUint8Array(),n.origin,r,n])}if(r._observers.has(&quot;updateV2&quot;)){const c=new Fr;bp(c,n)&amp;&amp;r.emit(&quot;updateV2&quot;,[c.toUint8Array(),n.origin,r,n])}const{subdocsAdded:o,subdocsLoaded:a,subdocsRemoved:u}=n;(o.size&gt;0||u.size&gt;0||a.size&gt;0)&amp;&amp;(o.forEach(c=&gt;{c.clientID=r.clientID,c.collectionid==null&amp;&amp;(c.collectionid=r.collectionid),r.subdocs.add(c)}),u.forEach(c=&gt;r.subdocs.delete(c)),r.emit(&quot;subdocs&quot;,[{loaded:a,added:o,removed:u},r,n]),u.forEach(c=&gt;c.destroy())),t.length&lt;=e+1?(r._transactionCleanups=[],r.emit(&quot;afterAllTransactions&quot;,[r,t])):S0(t,e+1)}}},fe=(t,e,n=null,r=!0)=&gt;{const i=t._transactionCleanups;let s=!1,l=null;t._transaction===null&amp;&amp;(s=!0,t._transaction=new Ax(t,n,r),i.push(t._transaction),i.length===1&amp;&amp;t.emit(&quot;beforeAllTransactions&quot;,[t]),t.emit(&quot;beforeTransaction&quot;,[t._transaction,t]));try{l=e(t._transaction)}finally{if(s){const o=t._transaction===i[0];t._transaction=null,o&amp;&amp;S0(i,0)}}return l};function*Ix(t){const e=Y(t.restDecoder);for(let n=0;n&lt;e;n++){const r=Y(t.restDecoder),i=t.readClient();let s=Y(t.restDecoder);for(let l=0;l&lt;r;l++){const o=t.readInfo();if(o===10){const a=Y(t.restDecoder);yield new Rt(ne(i,s),a),s+=a}else if(Ma&amp;o){const a=(o&amp;(yn|vt))===0,u=new Ue(ne(i,s),null,(o&amp;vt)===vt?t.readLeftID():null,null,(o&amp;yn)===yn?t.readRightID():null,a?t.readParentInfo()?t.readString():t.readLeftID():null,a&amp;&amp;(o&amp;rl)===rl?t.readString():null,F0(t,o));yield u,s+=u.length}else{const a=t.readLen();yield new At(ne(i,s),a),s+=a}}}}class xd{constructor(e,n){this.gen=Ix(e),this.curr=null,this.done=!1,this.filterSkips=n,this.next()}next(){do this.curr=this.gen.next().value||null;while(this.filterSkips&amp;&amp;this.curr!==null&amp;&amp;this.curr.constructor===Rt);return this.curr}}class Ed{constructor(e){this.currClient=0,this.startClock=0,this.written=0,this.encoder=e,this.clientStructs=[]}}const Dx=t=&gt;aa(t,g0,xl),Lx=(t,e)=&gt;{if(t.constructor===At){const{client:n,clock:r}=t.id;return new At(ne(n,r+e),t.length-e)}else if(t.constructor===Rt){const{client:n,clock:r}=t.id;return new Rt(ne(n,r+e),t.length-e)}else{const n=t,{client:r,clock:i}=n.id;return new Ue(ne(r,i+e),null,ne(r,i+e-1),null,n.rightOrigin,n.parent,n.parentSub,n.content.splice(e))}},aa=(t,e=Zi,n=Fr)=&gt;{if(t.length===1)return t[0];const r=t.map(c=&gt;new e(es(c)));let i=r.map(c=&gt;new xd(c,!0)),s=null;const l=new n,o=new Ed(l);for(;i=i.filter(d=&gt;d.curr!==null),i.sort((d,h)=&gt;{if(d.curr.id.client===h.curr.id.client){const y=d.curr.id.clock-h.curr.id.clock;return y===0?d.curr.constructor===h.curr.constructor?0:d.curr.constructor===Rt?1:-1:y}else return h.curr.id.client-d.curr.id.client}),i.length!==0;){const c=i[0],f=c.curr.id.client;if(s!==null){let d=c.curr,h=!1;for(;d!==null&amp;&amp;d.id.clock+d.length&lt;=s.struct.id.clock+s.struct.length&amp;&amp;d.id.client&gt;=s.struct.id.client;)d=c.next(),h=!0;if(d===null||d.id.client!==f||h&amp;&amp;d.id.clock&gt;s.struct.id.clock+s.struct.length)continue;if(f!==s.struct.id.client)Mn(o,s.struct,s.offset),s={struct:d,offset:0},c.next();else if(s.struct.id.clock+s.struct.length&lt;d.id.clock)if(s.struct.constructor===Rt)s.struct.length=d.id.clock+d.length-s.struct.id.clock;else{Mn(o,s.struct,s.offset);const y=d.id.clock-s.struct.id.clock-s.struct.length;s={struct:new Rt(ne(f,s.struct.id.clock+s.struct.length),y),offset:0}}else{const y=s.struct.id.clock+s.struct.length-d.id.clock;y&gt;0&amp;&amp;(s.struct.constructor===Rt?s.struct.length-=y:d=Lx(d,y)),s.struct.mergeWith(d)||(Mn(o,s.struct,s.offset),s={struct:d,offset:0},c.next())}}else s={struct:c.curr,offset:0},c.next();for(let d=c.curr;d!==null&amp;&amp;d.id.client===f&amp;&amp;d.id.clock===s.struct.id.clock+s.struct.length&amp;&amp;d.constructor!==Rt;d=c.next())Mn(o,s.struct,s.offset),s={struct:d,offset:0}}s!==null&amp;&amp;(Mn(o,s.struct,s.offset),s=null),Cd(o);const a=r.map(c=&gt;_d(c)),u=ux(a);return ts(l,u),l.toUint8Array()},Mx=(t,e,n=Zi,r=Fr)=&gt;{const i=y0(e),s=new r,l=new Ed(s),o=new n(es(t)),a=new xd(o,!1);for(;a.curr;){const c=a.curr,f=c.id.client,d=i.get(f)||0;if(a.curr.constructor===Rt){a.next();continue}if(c.id.clock+c.length&gt;d)for(Mn(l,c,Hr(d-c.id.clock,0)),a.next();a.curr&amp;&amp;a.curr.id.client===f;)Mn(l,a.curr,0),a.next();else for(;a.curr&amp;&amp;a.curr.id.client===f&amp;&amp;a.curr.id.clock+a.curr.length&lt;=d;)a.next()}Cd(l);const u=_d(o);return ts(s,u),s.toUint8Array()},x0=t=&gt;{t.written&gt;0&amp;&amp;(t.clientStructs.push({written:t.written,restEncoder:qt(t.encoder.restEncoder)}),t.encoder.restEncoder=Pa(),t.written=0)},Mn=(t,e,n)=&gt;{t.written&gt;0&amp;&amp;t.currClient!==e.id.client&amp;&amp;x0(t),t.written===0&amp;&amp;(t.currClient=e.id.client,t.encoder.writeClient(e.id.client),ie(t.encoder.restEncoder,e.id.clock+n)),e.write(t.encoder,n),t.written++},Cd=t=&gt;{x0(t);const e=t.encoder.restEncoder;ie(e,t.clientStructs.length);for(let n=0;n&lt;t.clientStructs.length;n++){const r=t.clientStructs[n];ie(e,r.written),Ua(e,r.restEncoder)}},Px=(t,e,n,r)=&gt;{const i=new n(es(t)),s=new xd(i,!1),l=new r,o=new Ed(l);for(let u=s.curr;u!==null;u=s.next())Mn(o,e(u),0);Cd(o);const a=_d(i);return ts(l,a),l.toUint8Array()},Ux=t=&gt;Px(t,VS,Zi,xl),jp=&quot;You must not compute changes after the event-handler fired.&quot;;class za{constructor(e,n){this.target=e,this.currentTarget=e,this.transaction=n,this._changes=null,this._keys=null,this._delta=null,this._path=null}get path(){return this._path||(this._path=bx(this.currentTarget,this.target))}deletes(e){return d0(this.transaction.deleteSet,e.id)}get keys(){if(this._keys===null){if(this.transaction.doc._transactionCleanups.length===0)throw ir(jp);const e=new Map,n=this.target;this.transaction.changed.get(n).forEach(i=&gt;{if(i!==null){const s=n._map.get(i);let l,o;if(this.adds(s)){let a=s.left;for(;a!==null&amp;&amp;this.adds(a);)a=a.left;if(this.deletes(s))if(a!==null&amp;&amp;this.deletes(a))l=&quot;delete&quot;,o=Cu(a.content.getContent());else return;else a!==null&amp;&amp;this.deletes(a)?(l=&quot;update&quot;,o=Cu(a.content.getContent())):(l=&quot;add&quot;,o=void 0)}else if(this.deletes(s))l=&quot;delete&quot;,o=Cu(s.content.getContent());else return;e.set(i,{action:l,oldValue:o})}}),this._keys=e}return this._keys}get delta(){return this.changes.delta}adds(e){return e.id.clock&gt;=(this.transaction.beforeState.get(e.id.client)||0)}get changes(){let e=this._changes;if(e===null){if(this.transaction.doc._transactionCleanups.length===0)throw ir(jp);const n=this.target,r=Wi(),i=Wi(),s=[];if(e={added:r,deleted:i,delta:s,keys:this.keys},this.transaction.changed.get(n).has(null)){let o=null;const a=()=&gt;{o&amp;&amp;s.push(o)};for(let u=n._start;u!==null;u=u.right)u.deleted?this.deletes(u)&amp;&amp;!this.adds(u)&amp;&amp;((o===null||o.delete===void 0)&amp;&amp;(a(),o={delete:0}),o.delete+=u.length,i.add(u)):this.adds(u)?((o===null||o.insert===void 0)&amp;&amp;(a(),o={insert:[]}),o.insert=o.insert.concat(u.content.getContent()),r.add(u)):((o===null||o.retain===void 0)&amp;&amp;(a(),o={retain:0}),o.retain+=u.length);o!==null&amp;&amp;o.retain===void 0&amp;&amp;a()}this._changes=e}return e}}const bx=(t,e)=&gt;{const n=[];for(;e._item!==null&amp;&amp;e!==t;){if(e._item.parentSub!==null)n.unshift(e._item.parentSub);else{let r=0,i=e._item.parent._start;for(;i!==e._item&amp;&amp;i!==null;)!i.deleted&amp;&amp;i.countable&amp;&amp;(r+=i.length),i=i.right;n.unshift(r)}e=e._item.parent}return n},Ge=()=&gt;{lx(&quot;Invalid access: Add Yjs type to a document before reading data.&quot;)},E0=80;let Od=0;class zx{constructor(e,n){e.marker=!0,this.p=e,this.index=n,this.timestamp=Od++}}const jx=t=&gt;{t.timestamp=Od++},C0=(t,e,n)=&gt;{t.p.marker=!1,t.p=e,e.marker=!0,t.index=n,t.timestamp=Od++},Fx=(t,e,n)=&gt;{if(t.length&gt;=E0){const r=t.reduce((i,s)=&gt;i.timestamp&lt;s.timestamp?i:s);return C0(r,e,n),r}else{const r=new zx(e,n);return t.push(r),r}},ja=(t,e)=&gt;{if(t._start===null||e===0||t._searchMarker===null)return null;const n=t._searchMarker.length===0?null:t._searchMarker.reduce((s,l)=&gt;_o(e-s.index)&lt;_o(e-l.index)?s:l);let r=t._start,i=0;for(n!==null&amp;&amp;(r=n.p,i=n.index,jx(n));r.right!==null&amp;&amp;i&lt;e;){if(!r.deleted&amp;&amp;r.countable){if(e&lt;i+r.length)break;i+=r.length}r=r.right}for(;r.left!==null&amp;&amp;i&gt;e;)r=r.left,!r.deleted&amp;&amp;r.countable&amp;&amp;(i-=r.length);for(;r.left!==null&amp;&amp;r.left.id.client===r.id.client&amp;&amp;r.left.id.clock+r.left.length===r.id.clock;)r=r.left,!r.deleted&amp;&amp;r.countable&amp;&amp;(i-=r.length);return n!==null&amp;&amp;_o(n.index-i)&lt;r.parent.length/E0?(C0(n,r,i),n):Fx(t._searchMarker,r,i)},al=(t,e,n)=&gt;{for(let r=t.length-1;r&gt;=0;r--){const i=t[r];if(n&gt;0){let s=i.p;for(s.marker=!1;s&amp;&amp;(s.deleted||!s.countable);)s=s.left,s&amp;&amp;!s.deleted&amp;&amp;s.countable&amp;&amp;(i.index-=s.length);if(s===null||s.marker===!0){t.splice(r,1);continue}i.p=s,s.marker=!0}(e&lt;i.index||n&gt;0&amp;&amp;e===i.index)&amp;&amp;(i.index=Hr(e,i.index+n))}},Fa=(t,e,n)=&gt;{const r=t,i=e.changedParentTypes;for(;ur(i,t,()=&gt;[]).push(n),t._item!==null;)t=t._item.parent;v0(r._eH,n,e)};class He{constructor(){this._item=null,this._map=new Map,this._start=null,this.doc=null,this._length=0,this._eH=Lp(),this._dEH=Lp(),this._searchMarker=null}get parent(){return this._item?this._item.parent:null}_integrate(e,n){this.doc=e,this._item=n}_copy(){throw rn()}clone(){throw rn()}_write(e){}get _first(){let e=this._start;for(;e!==null&amp;&amp;e.deleted;)e=e.right;return e}_callObserver(e,n){!e.local&amp;&amp;this._searchMarker&amp;&amp;(this._searchMarker.length=0)}observe(e){Mp(this._eH,e)}observeDeep(e){Mp(this._dEH,e)}unobserve(e){Pp(this._eH,e)}unobserveDeep(e){Pp(this._dEH,e)}toJSON(){}}const O0=(t,e,n)=&gt;{t.doc??Ge(),e&lt;0&amp;&amp;(e=t._length+e),n&lt;0&amp;&amp;(n=t._length+n);let r=n-e;const i=[];let s=t._start;for(;s!==null&amp;&amp;r&gt;0;){if(s.countable&amp;&amp;!s.deleted){const l=s.content.getContent();if(l.length&lt;=e)e-=l.length;else{for(let o=e;o&lt;l.length&amp;&amp;r&gt;0;o++)i.push(l[o]),r--;e=0}}s=s.right}return i},T0=t=&gt;{t.doc??Ge();const e=[];let n=t._start;for(;n!==null;){if(n.countable&amp;&amp;!n.deleted){const r=n.content.getContent();for(let i=0;i&lt;r.length;i++)e.push(r[i])}n=n.right}return e},ul=(t,e)=&gt;{let n=0,r=t._start;for(t.doc??Ge();r!==null;){if(r.countable&amp;&amp;!r.deleted){const i=r.content.getContent();for(let s=0;s&lt;i.length;s++)e(i[s],n++,t)}r=r.right}},A0=(t,e)=&gt;{const n=[];return ul(t,(r,i)=&gt;{n.push(e(r,i,t))}),n},$x=t=&gt;{let e=t._start,n=null,r=0;return{[Symbol.iterator](){return this},next:()=&gt;{if(n===null){for(;e!==null&amp;&amp;e.deleted;)e=e.right;if(e===null)return{done:!0,value:void 0};n=e.content.getContent(),r=0,e=e.right}const i=n[r++];return n.length&lt;=r&amp;&amp;(n=null),{done:!1,value:i}}}},R0=(t,e)=&gt;{t.doc??Ge();const n=ja(t,e);let r=t._start;for(n!==null&amp;&amp;(r=n.p,e-=n.index);r!==null;r=r.right)if(!r.deleted&amp;&amp;r.countable){if(e&lt;r.length)return r.content.getContent()[e];e-=r.length}},ua=(t,e,n,r)=&gt;{let i=n;const s=t.doc,l=s.clientID,o=s.store,a=n===null?e._start:n.right;let u=[];const c=()=&gt;{u.length&gt;0&amp;&amp;(i=new Ue(ne(l,$e(o,l)),i,i&amp;&amp;i.lastId,a,a&amp;&amp;a.id,e,null,new Vr(u)),i.integrate(t,0),u=[])};r.forEach(f=&gt;{if(f===null)u.push(f);else switch(f.constructor){case Number:case Object:case Boolean:case Array:case String:u.push(f);break;default:switch(c(),f.constructor){case Uint8Array:case ArrayBuffer:i=new Ue(ne(l,$e(o,l)),i,i&amp;&amp;i.lastId,a,a&amp;&amp;a.id,e,null,new El(new Uint8Array(f))),i.integrate(t,0);break;case ns:i=new Ue(ne(l,$e(o,l)),i,i&amp;&amp;i.lastId,a,a&amp;&amp;a.id,e,null,new Cl(f)),i.integrate(t,0);break;default:if(f instanceof He)i=new Ue(ne(l,$e(o,l)),i,i&amp;&amp;i.lastId,a,a&amp;&amp;a.id,e,null,new Cn(f)),i.integrate(t,0);else throw new Error(&quot;Unexpected content type in insert operation&quot;)}}}),c()},N0=()=&gt;ir(&quot;Length exceeded!&quot;),I0=(t,e,n,r)=&gt;{if(n&gt;e._length)throw N0();if(n===0)return e._searchMarker&amp;&amp;al(e._searchMarker,n,r.length),ua(t,e,null,r);const i=n,s=ja(e,n);let l=e._start;for(s!==null&amp;&amp;(l=s.p,n-=s.index,n===0&amp;&amp;(l=l.prev,n+=l&amp;&amp;l.countable&amp;&amp;!l.deleted?l.length:0));l!==null;l=l.right)if(!l.deleted&amp;&amp;l.countable){if(n&lt;=l.length){n&lt;l.length&amp;&amp;sr(t,ne(l.id.client,l.id.clock+n));break}n-=l.length}return e._searchMarker&amp;&amp;al(e._searchMarker,i,r.length),ua(t,e,l,r)},Vx=(t,e,n)=&gt;{let i=(e._searchMarker||[]).reduce((s,l)=&gt;l.index&gt;s.index?l:s,{index:0,p:e._start}).p;if(i)for(;i.right;)i=i.right;return ua(t,e,i,n)},D0=(t,e,n,r)=&gt;{if(r===0)return;const i=n,s=r,l=ja(e,n);let o=e._start;for(l!==null&amp;&amp;(o=l.p,n-=l.index);o!==null&amp;&amp;n&gt;0;o=o.right)!o.deleted&amp;&amp;o.countable&amp;&amp;(n&lt;o.length&amp;&amp;sr(t,ne(o.id.client,o.id.clock+n)),n-=o.length);for(;r&gt;0&amp;&amp;o!==null;)o.deleted||(r&lt;o.length&amp;&amp;sr(t,ne(o.id.client,o.id.clock+r)),o.delete(t),r-=o.length),o=o.right;if(r&gt;0)throw N0();e._searchMarker&amp;&amp;al(e._searchMarker,i,-s+r)},ca=(t,e,n)=&gt;{const r=e._map.get(n);r!==void 0&amp;&amp;r.delete(t)},Td=(t,e,n,r)=&gt;{const i=e._map.get(n)||null,s=t.doc,l=s.clientID;let o;if(r==null)o=new Vr([r]);else switch(r.constructor){case Number:case Object:case Boolean:case Array:case String:case Date:case BigInt:o=new Vr([r]);break;case Uint8Array:o=new El(r);break;case ns:o=new Cl(r);break;default:if(r instanceof He)o=new Cn(r);else throw new Error(&quot;Unexpected content type&quot;)}new Ue(ne(l,$e(s.store,l)),i,i&amp;&amp;i.lastId,null,null,e,n,o).integrate(t,0)},Ad=(t,e)=&gt;{t.doc??Ge();const n=t._map.get(e);return n!==void 0&amp;&amp;!n.deleted?n.content.getContent()[n.length-1]:void 0},L0=t=&gt;{const e={};return t.doc??Ge(),t._map.forEach((n,r)=&gt;{n.deleted||(e[r]=n.content.getContent()[n.length-1])}),e},M0=(t,e)=&gt;{t.doc??Ge();const n=t._map.get(e);return n!==void 0&amp;&amp;!n.deleted},Bx=(t,e)=&gt;{const n={};return t._map.forEach((r,i)=&gt;{let s=r;for(;s!==null&amp;&amp;(!e.sv.has(s.id.client)||s.id.clock&gt;=(e.sv.get(s.id.client)||0));)s=s.left;s!==null&amp;&amp;Yr(s,e)&amp;&amp;(n[i]=s.content.getContent()[s.length-1])}),n},Xl=t=&gt;(t.doc??Ge(),ox(t._map.entries(),e=&gt;!e[1].deleted));class Wx extends za{}class Si extends He{constructor(){super(),this._prelimContent=[],this._searchMarker=[]}static from(e){const n=new Si;return n.push(e),n}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new Si}clone(){const e=new Si;return e.insert(0,this.toArray().map(n=&gt;n instanceof He?n.clone():n)),e}get length(){return this.doc??Ge(),this._length}_callObserver(e,n){super._callObserver(e,n),Fa(this,e,new Wx(this,e))}insert(e,n){this.doc!==null?fe(this.doc,r=&gt;{I0(r,this,e,n)}):this._prelimContent.splice(e,0,...n)}push(e){this.doc!==null?fe(this.doc,n=&gt;{Vx(n,this,e)}):this._prelimContent.push(...e)}unshift(e){this.insert(0,e)}delete(e,n=1){this.doc!==null?fe(this.doc,r=&gt;{D0(r,this,e,n)}):this._prelimContent.splice(e,n)}get(e){return R0(this,e)}toArray(){return T0(this)}slice(e=0,n=this.length){return O0(this,e,n)}toJSON(){return this.map(e=&gt;e instanceof He?e.toJSON():e)}map(e){return A0(this,e)}forEach(e){ul(this,e)}[Symbol.iterator](){return $x(this)}_write(e){e.writeTypeRef(gE)}}const Hx=t=&gt;new Si;class Zx extends za{constructor(e,n,r){super(e,n),this.keysChanged=r}}class Ki extends He{constructor(e){super(),this._prelimContent=null,e===void 0?this._prelimContent=new Map:this._prelimContent=new Map(e)}_integrate(e,n){super._integrate(e,n),this._prelimContent.forEach((r,i)=&gt;{this.set(i,r)}),this._prelimContent=null}_copy(){return new Ki}clone(){const e=new Ki;return this.forEach((n,r)=&gt;{e.set(r,n instanceof He?n.clone():n)}),e}_callObserver(e,n){Fa(this,e,new Zx(this,e,n))}toJSON(){this.doc??Ge();const e={};return this._map.forEach((n,r)=&gt;{if(!n.deleted){const i=n.content.getContent()[n.length-1];e[r]=i instanceof He?i.toJSON():i}}),e}get size(){return[...Xl(this)].length}keys(){return Nu(Xl(this),e=&gt;e[0])}values(){return Nu(Xl(this),e=&gt;e[1].content.getContent()[e[1].length-1])}entries(){return Nu(Xl(this),e=&gt;[e[0],e[1].content.getContent()[e[1].length-1]])}forEach(e){this.doc??Ge(),this._map.forEach((n,r)=&gt;{n.deleted||e(n.content.getContent()[n.length-1],r,this)})}[Symbol.iterator](){return this.entries()}delete(e){this.doc!==null?fe(this.doc,n=&gt;{ca(n,this,e)}):this._prelimContent.delete(e)}set(e,n){return this.doc!==null?fe(this.doc,r=&gt;{Td(r,this,e,n)}):this._prelimContent.set(e,n),n}get(e){return Ad(this,e)}has(e){return M0(this,e)}clear(){this.doc!==null?fe(this.doc,e=&gt;{this.forEach(function(n,r,i){ca(e,i,r)})}):this._prelimContent.clear()}_write(e){e.writeTypeRef(mE)}}const Kx=t=&gt;new Ki,Vn=(t,e)=&gt;t===e||typeof t==&quot;object&quot;&amp;&amp;typeof e==&quot;object&quot;&amp;&amp;t&amp;&amp;e&amp;&amp;FS(t,e);class af{constructor(e,n,r,i){this.left=e,this.right=n,this.index=r,this.currentAttributes=i}forward(){switch(this.right===null&amp;&amp;sn(),this.right.content.constructor){case be:this.right.deleted||rs(this.currentAttributes,this.right.content);break;default:this.right.deleted||(this.index+=this.right.length);break}this.left=this.right,this.right=this.right.right}}const Fp=(t,e,n)=&gt;{for(;e.right!==null&amp;&amp;n&gt;0;){switch(e.right.content.constructor){case be:e.right.deleted||rs(e.currentAttributes,e.right.content);break;default:e.right.deleted||(n&lt;e.right.length&amp;&amp;sr(t,ne(e.right.id.client,e.right.id.clock+n)),e.index+=e.right.length,n-=e.right.length);break}e.left=e.right,e.right=e.right.right}return e},ql=(t,e,n,r)=&gt;{const i=new Map,s=r?ja(e,n):null;if(s){const l=new af(s.p.left,s.p,s.index,i);return Fp(t,l,n-s.index)}else{const l=new af(null,e._start,0,i);return Fp(t,l,n)}},P0=(t,e,n,r)=&gt;{for(;n.right!==null&amp;&amp;(n.right.deleted===!0||n.right.content.constructor===be&amp;&amp;Vn(r.get(n.right.content.key),n.right.content.value));)n.right.deleted||r.delete(n.right.content.key),n.forward();const i=t.doc,s=i.clientID;r.forEach((l,o)=&gt;{const a=n.left,u=n.right,c=new Ue(ne(s,$e(i.store,s)),a,a&amp;&amp;a.lastId,u,u&amp;&amp;u.id,e,null,new be(o,l));c.integrate(t,0),n.right=c,n.forward()})},rs=(t,e)=&gt;{const{key:n,value:r}=e;r===null?t.delete(n):t.set(n,r)},U0=(t,e)=&gt;{for(;t.right!==null;){if(!(t.right.deleted||t.right.content.constructor===be&amp;&amp;Vn(e[t.right.content.key]??null,t.right.content.value)))break;t.forward()}},b0=(t,e,n,r)=&gt;{const i=t.doc,s=i.clientID,l=new Map;for(const o in r){const a=r[o],u=n.currentAttributes.get(o)??null;if(!Vn(u,a)){l.set(o,u);const{left:c,right:f}=n;n.right=new Ue(ne(s,$e(i.store,s)),c,c&amp;&amp;c.lastId,f,f&amp;&amp;f.id,e,null,new be(o,a)),n.right.integrate(t,0),n.forward()}}return l},Du=(t,e,n,r,i)=&gt;{n.currentAttributes.forEach((d,h)=&gt;{i[h]===void 0&amp;&amp;(i[h]=null)});const s=t.doc,l=s.clientID;U0(n,i);const o=b0(t,e,n,i),a=r.constructor===String?new on(r):r instanceof He?new Cn(r):new Zr(r);let{left:u,right:c,index:f}=n;e._searchMarker&amp;&amp;al(e._searchMarker,n.index,a.getLength()),c=new Ue(ne(l,$e(s.store,l)),u,u&amp;&amp;u.lastId,c,c&amp;&amp;c.id,e,null,a),c.integrate(t,0),n.right=c,n.index=f,n.forward(),P0(t,e,n,o)},$p=(t,e,n,r,i)=&gt;{const s=t.doc,l=s.clientID;U0(n,i);const o=b0(t,e,n,i);e:for(;n.right!==null&amp;&amp;(r&gt;0||o.size&gt;0&amp;&amp;(n.right.deleted||n.right.content.constructor===be));){if(!n.right.deleted)switch(n.right.content.constructor){case be:{const{key:a,value:u}=n.right.content,c=i[a];if(c!==void 0){if(Vn(c,u))o.delete(a);else{if(r===0)break e;o.set(a,u)}n.right.delete(t)}else n.currentAttributes.set(a,u);break}default:r&lt;n.right.length&amp;&amp;sr(t,ne(n.right.id.client,n.right.id.clock+r)),r-=n.right.length;break}n.forward()}if(r&gt;0){let a=&quot;&quot;;for(;r&gt;0;r--)a+=`
`;n.right=new Ue(ne(l,$e(s.store,l)),n.left,n.left&amp;&amp;n.left.lastId,n.right,n.right&amp;&amp;n.right.id,e,null,new on(a)),n.right.integrate(t,0),n.forward()}P0(t,e,n,o)},z0=(t,e,n,r,i)=&gt;{let s=e;const l=Bt();for(;s&amp;&amp;(!s.countable||s.deleted);){if(!s.deleted&amp;&amp;s.content.constructor===be){const u=s.content;l.set(u.key,u)}s=s.right}let o=0,a=!1;for(;e!==s;){if(n===e&amp;&amp;(a=!0),!e.deleted){const u=e.content;switch(u.constructor){case be:{const{key:c,value:f}=u,d=r.get(c)??null;(l.get(c)!==u||d===f)&amp;&amp;(e.delete(t),o++,!a&amp;&amp;(i.get(c)??null)===f&amp;&amp;d!==f&amp;&amp;(d===null?i.delete(c):i.set(c,d))),!a&amp;&amp;!e.deleted&amp;&amp;rs(i,u);break}}}e=e.right}return o},Qx=(t,e)=&gt;{for(;e&amp;&amp;e.right&amp;&amp;(e.right.deleted||!e.right.countable);)e=e.right;const n=new Set;for(;e&amp;&amp;(e.deleted||!e.countable);){if(!e.deleted&amp;&amp;e.content.constructor===be){const r=e.content.key;n.has(r)?e.delete(t):n.add(r)}e=e.left}},Jx=t=&gt;{let e=0;return fe(t.doc,n=&gt;{let r=t._start,i=t._start,s=Bt();const l=ef(s);for(;i;){if(i.deleted===!1)switch(i.content.constructor){case be:rs(l,i.content);break;default:e+=z0(n,r,i,s,l),s=ef(l),r=i;break}i=i.right}}),e},Gx=t=&gt;{const e=new Set,n=t.doc;for(const[r,i]of t.afterState.entries()){const s=t.beforeState.get(r)||0;i!==s&amp;&amp;k0(t,n.store.clients.get(r),s,i,l=&gt;{!l.deleted&amp;&amp;l.content.constructor===be&amp;&amp;l.constructor!==At&amp;&amp;e.add(l.parent)})}fe(n,r=&gt;{f0(t,t.deleteSet,i=&gt;{if(i instanceof At||!i.parent._hasFormatting||e.has(i.parent))return;const s=i.parent;i.content.constructor===be?e.add(s):Qx(r,i)});for(const i of e)Jx(i)})},Vp=(t,e,n)=&gt;{const r=n,i=ef(e.currentAttributes),s=e.right;for(;n&gt;0&amp;&amp;e.right!==null;){if(e.right.deleted===!1)switch(e.right.content.constructor){case Cn:case Zr:case on:n&lt;e.right.length&amp;&amp;sr(t,ne(e.right.id.client,e.right.id.clock+n)),n-=e.right.length,e.right.delete(t);break}e.forward()}s&amp;&amp;z0(t,s,e.right,i,e.currentAttributes);const l=(e.left||e.right).parent;return l._searchMarker&amp;&amp;al(l._searchMarker,e.index,-r+n),e};class Yx extends za{constructor(e,n,r){super(e,n),this.childListChanged=!1,this.keysChanged=new Set,r.forEach(i=&gt;{i===null?this.childListChanged=!0:this.keysChanged.add(i)})}get changes(){if(this._changes===null){const e={keys:this.keys,delta:this.delta,added:new Set,deleted:new Set};this._changes=e}return this._changes}get delta(){if(this._delta===null){const e=this.target.doc,n=[];fe(e,r=&gt;{const i=new Map,s=new Map;let l=this.target._start,o=null;const a={};let u=&quot;&quot;,c=0,f=0;const d=()=&gt;{if(o!==null){let h=null;switch(o){case&quot;delete&quot;:f&gt;0&amp;&amp;(h={delete:f}),f=0;break;case&quot;insert&quot;:(typeof u==&quot;object&quot;||u.length&gt;0)&amp;&amp;(h={insert:u},i.size&gt;0&amp;&amp;(h.attributes={},i.forEach((y,k)=&gt;{y!==null&amp;&amp;(h.attributes[k]=y)}))),u=&quot;&quot;;break;case&quot;retain&quot;:c&gt;0&amp;&amp;(h={retain:c},bS(a)||(h.attributes=MS({},a))),c=0;break}h&amp;&amp;n.push(h),o=null}};for(;l!==null;){switch(l.content.constructor){case Cn:case Zr:this.adds(l)?this.deletes(l)||(d(),o=&quot;insert&quot;,u=l.content.getContent()[0],d()):this.deletes(l)?(o!==&quot;delete&quot;&amp;&amp;(d(),o=&quot;delete&quot;),f+=1):l.deleted||(o!==&quot;retain&quot;&amp;&amp;(d(),o=&quot;retain&quot;),c+=1);break;case on:this.adds(l)?this.deletes(l)||(o!==&quot;insert&quot;&amp;&amp;(d(),o=&quot;insert&quot;),u+=l.content.str):this.deletes(l)?(o!==&quot;delete&quot;&amp;&amp;(d(),o=&quot;delete&quot;),f+=l.length):l.deleted||(o!==&quot;retain&quot;&amp;&amp;(d(),o=&quot;retain&quot;),c+=l.length);break;case be:{const{key:h,value:y}=l.content;if(this.adds(l)){if(!this.deletes(l)){const k=i.get(h)??null;Vn(k,y)?y!==null&amp;&amp;l.delete(r):(o===&quot;retain&quot;&amp;&amp;d(),Vn(y,s.get(h)??null)?delete a[h]:a[h]=y)}}else if(this.deletes(l)){s.set(h,y);const k=i.get(h)??null;Vn(k,y)||(o===&quot;retain&quot;&amp;&amp;d(),a[h]=k)}else if(!l.deleted){s.set(h,y);const k=a[h];k!==void 0&amp;&amp;(Vn(k,y)?k!==null&amp;&amp;l.delete(r):(o===&quot;retain&quot;&amp;&amp;d(),y===null?delete a[h]:a[h]=y))}l.deleted||(o===&quot;insert&quot;&amp;&amp;d(),rs(i,l.content));break}}l=l.right}for(d();n.length&gt;0;){const h=n[n.length-1];if(h.retain!==void 0&amp;&amp;h.attributes===void 0)n.pop();else break}}),this._delta=n}return this._delta}}class Qi extends He{constructor(e){super(),this._pending=e!==void 0?[()=&gt;this.insert(0,e)]:[],this._searchMarker=[],this._hasFormatting=!1}get length(){return this.doc??Ge(),this._length}_integrate(e,n){super._integrate(e,n);try{this._pending.forEach(r=&gt;r())}catch(r){console.error(r)}this._pending=null}_copy(){return new Qi}clone(){const e=new Qi;return e.applyDelta(this.toDelta()),e}_callObserver(e,n){super._callObserver(e,n);const r=new Yx(this,e,n);Fa(this,e,r),!e.local&amp;&amp;this._hasFormatting&amp;&amp;(e._needFormattingCleanup=!0)}toString(){this.doc??Ge();let e=&quot;&quot;,n=this._start;for(;n!==null;)!n.deleted&amp;&amp;n.countable&amp;&amp;n.content.constructor===on&amp;&amp;(e+=n.content.str),n=n.right;return e}toJSON(){return this.toString()}applyDelta(e,{sanitize:n=!0}={}){this.doc!==null?fe(this.doc,r=&gt;{const i=new af(null,this._start,0,new Map);for(let s=0;s&lt;e.length;s++){const l=e[s];if(l.insert!==void 0){const o=!n&amp;&amp;typeof l.insert==&quot;string&quot;&amp;&amp;s===e.length-1&amp;&amp;i.right===null&amp;&amp;l.insert.slice(-1)===`
`?l.insert.slice(0,-1):l.insert;(typeof o!=&quot;string&quot;||o.length&gt;0)&amp;&amp;Du(r,this,i,o,l.attributes||{})}else l.retain!==void 0?$p(r,this,i,l.retain,l.attributes||{}):l.delete!==void 0&amp;&amp;Vp(r,i,l.delete)}}):this._pending.push(()=&gt;this.applyDelta(e))}toDelta(e,n,r){this.doc??Ge();const i=[],s=new Map,l=this.doc;let o=&quot;&quot;,a=this._start;function u(){if(o.length&gt;0){const f={};let d=!1;s.forEach((y,k)=&gt;{d=!0,f[k]=y});const h={insert:o};d&amp;&amp;(h.attributes=f),i.push(h),o=&quot;&quot;}}const c=()=&gt;{for(;a!==null;){if(Yr(a,e)||n!==void 0&amp;&amp;Yr(a,n))switch(a.content.constructor){case on:{const f=s.get(&quot;ychange&quot;);e!==void 0&amp;&amp;!Yr(a,e)?(f===void 0||f.user!==a.id.client||f.type!==&quot;removed&quot;)&amp;&amp;(u(),s.set(&quot;ychange&quot;,r?r(&quot;removed&quot;,a.id):{type:&quot;removed&quot;})):n!==void 0&amp;&amp;!Yr(a,n)?(f===void 0||f.user!==a.id.client||f.type!==&quot;added&quot;)&amp;&amp;(u(),s.set(&quot;ychange&quot;,r?r(&quot;added&quot;,a.id):{type:&quot;added&quot;})):f!==void 0&amp;&amp;(u(),s.delete(&quot;ychange&quot;)),o+=a.content.str;break}case Cn:case Zr:{u();const f={insert:a.content.getContent()[0]};if(s.size&gt;0){const d={};f.attributes=d,s.forEach((h,y)=&gt;{d[y]=h})}i.push(f);break}case be:Yr(a,e)&amp;&amp;(u(),rs(s,a.content));break}a=a.right}u()};return e||n?fe(l,f=&gt;{e&amp;&amp;lf(f,e),n&amp;&amp;lf(f,n),c()},&quot;cleanup&quot;):c(),i}insert(e,n,r){if(n.length&lt;=0)return;const i=this.doc;i!==null?fe(i,s=&gt;{const l=ql(s,this,e,!r);r||(r={},l.currentAttributes.forEach((o,a)=&gt;{r[a]=o})),Du(s,this,l,n,r)}):this._pending.push(()=&gt;this.insert(e,n,r))}insertEmbed(e,n,r){const i=this.doc;i!==null?fe(i,s=&gt;{const l=ql(s,this,e,!r);Du(s,this,l,n,r||{})}):this._pending.push(()=&gt;this.insertEmbed(e,n,r||{}))}delete(e,n){if(n===0)return;const r=this.doc;r!==null?fe(r,i=&gt;{Vp(i,ql(i,this,e,!0),n)}):this._pending.push(()=&gt;this.delete(e,n))}format(e,n,r){if(n===0)return;const i=this.doc;i!==null?fe(i,s=&gt;{const l=ql(s,this,e,!1);l.right!==null&amp;&amp;$p(s,this,l,n,r)}):this._pending.push(()=&gt;this.format(e,n,r))}removeAttribute(e){this.doc!==null?fe(this.doc,n=&gt;{ca(n,this,e)}):this._pending.push(()=&gt;this.removeAttribute(e))}setAttribute(e,n){this.doc!==null?fe(this.doc,r=&gt;{Td(r,this,e,n)}):this._pending.push(()=&gt;this.setAttribute(e,n))}getAttribute(e){return Ad(this,e)}getAttributes(){return L0(this)}_write(e){e.writeTypeRef(yE)}}const Xx=t=&gt;new Qi;class Lu{constructor(e,n=()=&gt;!0){this._filter=n,this._root=e,this._currentNode=e._start,this._firstCall=!0,e.doc??Ge()}[Symbol.iterator](){return this}next(){let e=this._currentNode,n=e&amp;&amp;e.content&amp;&amp;e.content.type;if(e!==null&amp;&amp;(!this._firstCall||e.deleted||!this._filter(n)))do if(n=e.content.type,!e.deleted&amp;&amp;(n.constructor===Ji||n.constructor===$r)&amp;&amp;n._start!==null)e=n._start;else for(;e!==null;){const r=e.next;if(r!==null){e=r;break}else e.parent===this._root?e=null:e=e.parent._item}while(e!==null&amp;&amp;(e.deleted||!this._filter(e.content.type)));return this._firstCall=!1,e===null?{value:void 0,done:!0}:(this._currentNode=e,{value:e.content.type,done:!1})}}class $r extends He{constructor(){super(),this._prelimContent=[]}get firstChild(){const e=this._first;return e?e.content.getContent()[0]:null}_integrate(e,n){super._integrate(e,n),this.insert(0,this._prelimContent),this._prelimContent=null}_copy(){return new $r}clone(){const e=new $r;return e.insert(0,this.toArray().map(n=&gt;n instanceof He?n.clone():n)),e}get length(){return this.doc??Ge(),this._prelimContent===null?this._length:this._prelimContent.length}createTreeWalker(e){return new Lu(this,e)}querySelector(e){e=e.toUpperCase();const r=new Lu(this,i=&gt;i.nodeName&amp;&amp;i.nodeName.toUpperCase()===e).next();return r.done?null:r.value}querySelectorAll(e){return e=e.toUpperCase(),jr(new Lu(this,n=&gt;n.nodeName&amp;&amp;n.nodeName.toUpperCase()===e))}_callObserver(e,n){Fa(this,e,new tE(this,n,e))}toString(){return A0(this,e=&gt;e.toString()).join(&quot;&quot;)}toJSON(){return this.toString()}toDOM(e=document,n={},r){const i=e.createDocumentFragment();return r!==void 0&amp;&amp;r._createAssociation(i,this),ul(this,s=&gt;{i.insertBefore(s.toDOM(e,n,r),null)}),i}insert(e,n){this.doc!==null?fe(this.doc,r=&gt;{I0(r,this,e,n)}):this._prelimContent.splice(e,0,...n)}insertAfter(e,n){if(this.doc!==null)fe(this.doc,r=&gt;{const i=e&amp;&amp;e instanceof He?e._item:e;ua(r,this,i,n)});else{const r=this._prelimContent,i=e===null?0:r.findIndex(s=&gt;s===e)+1;if(i===0&amp;&amp;e!==null)throw ir(&quot;Reference item not found&quot;);r.splice(i,0,...n)}}delete(e,n=1){this.doc!==null?fe(this.doc,r=&gt;{D0(r,this,e,n)}):this._prelimContent.splice(e,n)}toArray(){return T0(this)}push(e){this.insert(this.length,e)}unshift(e){this.insert(0,e)}get(e){return R0(this,e)}slice(e=0,n=this.length){return O0(this,e,n)}forEach(e){ul(this,e)}_write(e){e.writeTypeRef(wE)}}const qx=t=&gt;new $r;class Ji extends $r{constructor(e=&quot;UNDEFINED&quot;){super(),this.nodeName=e,this._prelimAttrs=new Map}get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_integrate(e,n){super._integrate(e,n),this._prelimAttrs.forEach((r,i)=&gt;{this.setAttribute(i,r)}),this._prelimAttrs=null}_copy(){return new Ji(this.nodeName)}clone(){const e=new Ji(this.nodeName),n=this.getAttributes();return US(n,(r,i)=&gt;{typeof r==&quot;string&quot;&amp;&amp;e.setAttribute(i,r)}),e.insert(0,this.toArray().map(r=&gt;r instanceof He?r.clone():r)),e}toString(){const e=this.getAttributes(),n=[],r=[];for(const o in e)r.push(o);r.sort();const i=r.length;for(let o=0;o&lt;i;o++){const a=r[o];n.push(a+&#39;=&quot;&#39;+e[a]+&#39;&quot;&#39;)}const s=this.nodeName.toLocaleLowerCase(),l=n.length&gt;0?&quot; &quot;+n.join(&quot; &quot;):&quot;&quot;;return`&lt;${s}${l}&gt;${super.toString()}&lt;/${s}&gt;`}removeAttribute(e){this.doc!==null?fe(this.doc,n=&gt;{ca(n,this,e)}):this._prelimAttrs.delete(e)}setAttribute(e,n){this.doc!==null?fe(this.doc,r=&gt;{Td(r,this,e,n)}):this._prelimAttrs.set(e,n)}getAttribute(e){return Ad(this,e)}hasAttribute(e){return M0(this,e)}getAttributes(e){return e?Bx(this,e):L0(this)}toDOM(e=document,n={},r){const i=e.createElement(this.nodeName),s=this.getAttributes();for(const l in s){const o=s[l];typeof o==&quot;string&quot;&amp;&amp;i.setAttribute(l,o)}return ul(this,l=&gt;{i.appendChild(l.toDOM(e,n,r))}),r!==void 0&amp;&amp;r._createAssociation(i,this),i}_write(e){e.writeTypeRef(vE),e.writeKey(this.nodeName)}}const eE=t=&gt;new Ji(t.readKey());class tE extends za{constructor(e,n,r){super(e,r),this.childListChanged=!1,this.attributesChanged=new Set,n.forEach(i=&gt;{i===null?this.childListChanged=!0:this.attributesChanged.add(i)})}}class fa extends Ki{constructor(e){super(),this.hookName=e}_copy(){return new fa(this.hookName)}clone(){const e=new fa(this.hookName);return this.forEach((n,r)=&gt;{e.set(r,n)}),e}toDOM(e=document,n={},r){const i=n[this.hookName];let s;return i!==void 0?s=i.createDom(this):s=document.createElement(this.hookName),s.setAttribute(&quot;data-yjs-hook&quot;,this.hookName),r!==void 0&amp;&amp;r._createAssociation(s,this),s}_write(e){e.writeTypeRef(_E),e.writeKey(this.hookName)}}const nE=t=&gt;new fa(t.readKey());class da extends Qi{get nextSibling(){const e=this._item?this._item.next:null;return e?e.content.type:null}get prevSibling(){const e=this._item?this._item.prev:null;return e?e.content.type:null}_copy(){return new da}clone(){const e=new da;return e.applyDelta(this.toDelta()),e}toDOM(e=document,n,r){const i=e.createTextNode(this.toString());return r!==void 0&amp;&amp;r._createAssociation(i,this),i}toString(){return this.toDelta().map(e=&gt;{const n=[];for(const i in e.attributes){const s=[];for(const l in e.attributes[i])s.push({key:l,value:e.attributes[i][l]});s.sort((l,o)=&gt;l.key&lt;o.key?-1:1),n.push({nodeName:i,attrs:s})}n.sort((i,s)=&gt;i.nodeName&lt;s.nodeName?-1:1);let r=&quot;&quot;;for(let i=0;i&lt;n.length;i++){const s=n[i];r+=`&lt;${s.nodeName}`;for(let l=0;l&lt;s.attrs.length;l++){const o=s.attrs[l];r+=` ${o.key}=&quot;${o.value}&quot;`}r+=&quot;&gt;&quot;}r+=e.insert;for(let i=n.length-1;i&gt;=0;i--)r+=`&lt;/${n[i].nodeName}&gt;`;return r}).join(&quot;&quot;)}toJSON(){return this.toString()}_write(e){e.writeTypeRef(kE)}}const rE=t=&gt;new da;class Rd{constructor(e,n){this.id=e,this.length=n}get deleted(){throw rn()}mergeWith(e){return!1}write(e,n,r){throw rn()}integrate(e,n){throw rn()}}const iE=0;class At extends Rd{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,n){n&gt;0&amp;&amp;(this.id.clock+=n,this.length-=n),_0(e.doc.store,this)}write(e,n){e.writeInfo(iE),e.writeLen(this.length-n)}getMissing(e,n){return null}}class El{constructor(e){this.content=e}getLength(){return 1}getContent(){return[this.content]}isCountable(){return!0}copy(){return new El(this.content)}splice(e){throw rn()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeBuf(this.content)}getRef(){return 3}}const sE=t=&gt;new El(t.readBuf());class cl{constructor(e){this.len=e}getLength(){return this.len}getContent(){return[]}isCountable(){return!1}copy(){return new cl(this.len)}splice(e){const n=new cl(this.len-e);return this.len=e,n}mergeWith(e){return this.len+=e.len,!0}integrate(e,n){oa(e.deleteSet,n.id.client,n.id.clock,this.len),n.markDeleted()}delete(e){}gc(e){}write(e,n){e.writeLen(this.len-n)}getRef(){return 1}}const lE=t=&gt;new cl(t.readLen()),j0=(t,e)=&gt;new ns({guid:t,...e,shouldLoad:e.shouldLoad||e.autoLoad||!1});class Cl{constructor(e){e._item&amp;&amp;console.error(&quot;This document was already integrated as a sub-document. You should create a second instance instead with the same guid.&quot;),this.doc=e;const n={};this.opts=n,e.gc||(n.gc=!1),e.autoLoad&amp;&amp;(n.autoLoad=!0),e.meta!==null&amp;&amp;(n.meta=e.meta)}getLength(){return 1}getContent(){return[this.doc]}isCountable(){return!0}copy(){return new Cl(j0(this.doc.guid,this.opts))}splice(e){throw rn()}mergeWith(e){return!1}integrate(e,n){this.doc._item=n,e.subdocsAdded.add(this.doc),this.doc.shouldLoad&amp;&amp;e.subdocsLoaded.add(this.doc)}delete(e){e.subdocsAdded.has(this.doc)?e.subdocsAdded.delete(this.doc):e.subdocsRemoved.add(this.doc)}gc(e){}write(e,n){e.writeString(this.doc.guid),e.writeAny(this.opts)}getRef(){return 9}}const oE=t=&gt;new Cl(j0(t.readString(),t.readAny()));class Zr{constructor(e){this.embed=e}getLength(){return 1}getContent(){return[this.embed]}isCountable(){return!0}copy(){return new Zr(this.embed)}splice(e){throw rn()}mergeWith(e){return!1}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeJSON(this.embed)}getRef(){return 5}}const aE=t=&gt;new Zr(t.readJSON());class be{constructor(e,n){this.key=e,this.value=n}getLength(){return 1}getContent(){return[]}isCountable(){return!1}copy(){return new be(this.key,this.value)}splice(e){throw rn()}mergeWith(e){return!1}integrate(e,n){const r=n.parent;r._searchMarker=null,r._hasFormatting=!0}delete(e){}gc(e){}write(e,n){e.writeKey(this.key),e.writeJSON(this.value)}getRef(){return 6}}const uE=t=&gt;new be(t.readKey(),t.readJSON());class ha{constructor(e){this.arr=e}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new ha(this.arr)}splice(e){const n=new ha(this.arr.slice(e));return this.arr=this.arr.slice(0,e),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){const r=this.arr.length;e.writeLen(r-n);for(let i=n;i&lt;r;i++){const s=this.arr[i];e.writeString(s===void 0?&quot;undefined&quot;:JSON.stringify(s))}}getRef(){return 2}}const cE=t=&gt;{const e=t.readLen(),n=[];for(let r=0;r&lt;e;r++){const i=t.readString();i===&quot;undefined&quot;?n.push(void 0):n.push(JSON.parse(i))}return new ha(n)},fE=la(&quot;node_env&quot;)===&quot;development&quot;;class Vr{constructor(e){this.arr=e,fE&amp;&amp;n0(e)}getLength(){return this.arr.length}getContent(){return this.arr}isCountable(){return!0}copy(){return new Vr(this.arr)}splice(e){const n=new Vr(this.arr.slice(e));return this.arr=this.arr.slice(0,e),n}mergeWith(e){return this.arr=this.arr.concat(e.arr),!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){const r=this.arr.length;e.writeLen(r-n);for(let i=n;i&lt;r;i++){const s=this.arr[i];e.writeAny(s)}}getRef(){return 8}}const dE=t=&gt;{const e=t.readLen(),n=[];for(let r=0;r&lt;e;r++)n.push(t.readAny());return new Vr(n)};class on{constructor(e){this.str=e}getLength(){return this.str.length}getContent(){return this.str.split(&quot;&quot;)}isCountable(){return!0}copy(){return new on(this.str)}splice(e){const n=new on(this.str.slice(e));this.str=this.str.slice(0,e);const r=this.str.charCodeAt(e-1);return r&gt;=55296&amp;&amp;r&lt;=56319&amp;&amp;(this.str=this.str.slice(0,e-1)+&quot;�&quot;,n.str=&quot;�&quot;+n.str.slice(1)),n}mergeWith(e){return this.str+=e.str,!0}integrate(e,n){}delete(e){}gc(e){}write(e,n){e.writeString(n===0?this.str:this.str.slice(n))}getRef(){return 4}}const hE=t=&gt;new on(t.readString()),pE=[Hx,Kx,Xx,eE,qx,nE,rE],gE=0,mE=1,yE=2,vE=3,wE=4,_E=5,kE=6;class Cn{constructor(e){this.type=e}getLength(){return 1}getContent(){return[this.type]}isCountable(){return!0}copy(){return new Cn(this.type._copy())}splice(e){throw rn()}mergeWith(e){return!1}integrate(e,n){this.type._integrate(e.doc,n)}delete(e){let n=this.type._start;for(;n!==null;)n.deleted?n.id.clock&lt;(e.beforeState.get(n.id.client)||0)&amp;&amp;e._mergeStructs.push(n):n.delete(e),n=n.right;this.type._map.forEach(r=&gt;{r.deleted?r.id.clock&lt;(e.beforeState.get(r.id.client)||0)&amp;&amp;e._mergeStructs.push(r):r.delete(e)}),e.changed.delete(this.type)}gc(e){let n=this.type._start;for(;n!==null;)n.gc(e,!0),n=n.right;this.type._start=null,this.type._map.forEach(r=&gt;{for(;r!==null;)r.gc(e,!0),r=r.left}),this.type._map=new Map}write(e,n){this.type._write(e)}getRef(){return 7}}const SE=t=&gt;new Cn(pE[t.readTypeRef()](t)),pa=(t,e,n)=&gt;{const{client:r,clock:i}=e.id,s=new Ue(ne(r,i+n),e,ne(r,i+n-1),e.right,e.rightOrigin,e.parent,e.parentSub,e.content.splice(n));return e.deleted&amp;&amp;s.markDeleted(),e.keep&amp;&amp;(s.keep=!0),e.redone!==null&amp;&amp;(s.redone=ne(e.redone.client,e.redone.clock+n)),e.right=s,s.right!==null&amp;&amp;(s.right.left=s),t._mergeStructs.push(s),s.parentSub!==null&amp;&amp;s.right===null&amp;&amp;s.parent._map.set(s.parentSub,s),e.length=n,s};class Ue extends Rd{constructor(e,n,r,i,s,l,o,a){super(e,a.getLength()),this.origin=r,this.left=n,this.right=i,this.rightOrigin=s,this.parent=l,this.parentSub=o,this.redone=null,this.content=a,this.info=this.content.isCountable()?kp:0}set marker(e){(this.info&amp;Tu)&gt;0!==e&amp;&amp;(this.info^=Tu)}get marker(){return(this.info&amp;Tu)&gt;0}get keep(){return(this.info&amp;_p)&gt;0}set keep(e){this.keep!==e&amp;&amp;(this.info^=_p)}get countable(){return(this.info&amp;kp)&gt;0}get deleted(){return(this.info&amp;Ou)&gt;0}set deleted(e){this.deleted!==e&amp;&amp;(this.info^=Ou)}markDeleted(){this.info|=Ou}getMissing(e,n){if(this.origin&amp;&amp;this.origin.client!==this.id.client&amp;&amp;this.origin.clock&gt;=$e(n,this.origin.client))return this.origin.client;if(this.rightOrigin&amp;&amp;this.rightOrigin.client!==this.id.client&amp;&amp;this.rightOrigin.clock&gt;=$e(n,this.rightOrigin.client))return this.rightOrigin.client;if(this.parent&amp;&amp;this.parent.constructor===ki&amp;&amp;this.id.client!==this.parent.client&amp;&amp;this.parent.clock&gt;=$e(n,this.parent.client))return this.parent.client;if(this.origin&amp;&amp;(this.left=Up(e,n,this.origin),this.origin=this.left.lastId),this.rightOrigin&amp;&amp;(this.right=sr(e,this.rightOrigin),this.rightOrigin=this.right.id),this.left&amp;&amp;this.left.constructor===At||this.right&amp;&amp;this.right.constructor===At)this.parent=null;else if(!this.parent)this.left&amp;&amp;this.left.constructor===Ue?(this.parent=this.left.parent,this.parentSub=this.left.parentSub):this.right&amp;&amp;this.right.constructor===Ue&amp;&amp;(this.parent=this.right.parent,this.parentSub=this.right.parentSub);else if(this.parent.constructor===ki){const r=Iu(n,this.parent);r.constructor===At?this.parent=null:this.parent=r.content.type}return null}integrate(e,n){if(n&gt;0&amp;&amp;(this.id.clock+=n,this.left=Up(e,e.doc.store,ne(this.id.client,this.id.clock-1)),this.origin=this.left.lastId,this.content=this.content.splice(n),this.length-=n),this.parent){if(!this.left&amp;&amp;(!this.right||this.right.left!==null)||this.left&amp;&amp;this.left.right!==this.right){let r=this.left,i;if(r!==null)i=r.right;else if(this.parentSub!==null)for(i=this.parent._map.get(this.parentSub)||null;i!==null&amp;&amp;i.left!==null;)i=i.left;else i=this.parent._start;const s=new Set,l=new Set;for(;i!==null&amp;&amp;i!==this.right;){if(l.add(i),s.add(i),Yl(this.origin,i.origin)){if(i.id.client&lt;this.id.client)r=i,s.clear();else if(Yl(this.rightOrigin,i.rightOrigin))break}else if(i.origin!==null&amp;&amp;l.has(Iu(e.doc.store,i.origin)))s.has(Iu(e.doc.store,i.origin))||(r=i,s.clear());else break;i=i.right}this.left=r}if(this.left!==null){const r=this.left.right;this.right=r,this.left.right=this}else{let r;if(this.parentSub!==null)for(r=this.parent._map.get(this.parentSub)||null;r!==null&amp;&amp;r.left!==null;)r=r.left;else r=this.parent._start,this.parent._start=this;this.right=r}this.right!==null?this.right.left=this:this.parentSub!==null&amp;&amp;(this.parent._map.set(this.parentSub,this),this.left!==null&amp;&amp;this.left.delete(e)),this.parentSub===null&amp;&amp;this.countable&amp;&amp;!this.deleted&amp;&amp;(this.parent._length+=this.length),_0(e.doc.store,this),this.content.integrate(e,this),zp(e,this.parent,this.parentSub),(this.parent._item!==null&amp;&amp;this.parent._item.deleted||this.parentSub!==null&amp;&amp;this.right!==null)&amp;&amp;this.delete(e)}else new At(this.id,this.length).integrate(e,0)}get next(){let e=this.right;for(;e!==null&amp;&amp;e.deleted;)e=e.right;return e}get prev(){let e=this.left;for(;e!==null&amp;&amp;e.deleted;)e=e.left;return e}get lastId(){return this.length===1?this.id:ne(this.id.client,this.id.clock+this.length-1)}mergeWith(e){if(this.constructor===e.constructor&amp;&amp;Yl(e.origin,this.lastId)&amp;&amp;this.right===e&amp;&amp;Yl(this.rightOrigin,e.rightOrigin)&amp;&amp;this.id.client===e.id.client&amp;&amp;this.id.clock+this.length===e.id.clock&amp;&amp;this.deleted===e.deleted&amp;&amp;this.redone===null&amp;&amp;e.redone===null&amp;&amp;this.content.constructor===e.content.constructor&amp;&amp;this.content.mergeWith(e.content)){const n=this.parent._searchMarker;return n&amp;&amp;n.forEach(r=&gt;{r.p===e&amp;&amp;(r.p=this,!this.deleted&amp;&amp;this.countable&amp;&amp;(r.index-=this.length))}),e.keep&amp;&amp;(this.keep=!0),this.right=e.right,this.right!==null&amp;&amp;(this.right.left=this),this.length+=e.length,!0}return!1}delete(e){if(!this.deleted){const n=this.parent;this.countable&amp;&amp;this.parentSub===null&amp;&amp;(n._length-=this.length),this.markDeleted(),oa(e.deleteSet,this.id.client,this.id.clock,this.length),zp(e,n,this.parentSub),this.content.delete(e)}}gc(e,n){if(!this.deleted)throw sn();this.content.gc(e),n?Tx(e,this,new At(this.id,this.length)):this.content=new cl(this.length)}write(e,n){const r=n&gt;0?ne(this.id.client,this.id.clock+n-1):this.origin,i=this.rightOrigin,s=this.parentSub,l=this.content.getRef()&amp;Ma|(r===null?0:vt)|(i===null?0:yn)|(s===null?0:rl);if(e.writeInfo(l),r!==null&amp;&amp;e.writeLeftID(r),i!==null&amp;&amp;e.writeRightID(i),r===null&amp;&amp;i===null){const o=this.parent;if(o._item!==void 0){const a=o._item;if(a===null){const u=Cx(o);e.writeParentInfo(!0),e.writeString(u)}else e.writeParentInfo(!1),e.writeLeftID(a.id)}else o.constructor===String?(e.writeParentInfo(!0),e.writeString(o)):o.constructor===ki?(e.writeParentInfo(!1),e.writeLeftID(o)):sn();s!==null&amp;&amp;e.writeString(s)}this.content.write(e,n)}}const F0=(t,e)=&gt;xE[e&amp;Ma](t),xE=[()=&gt;{sn()},lE,cE,sE,hE,aE,uE,SE,dE,oE,()=&gt;{sn()}],EE=10;class Rt extends Rd{get deleted(){return!0}delete(){}mergeWith(e){return this.constructor!==e.constructor?!1:(this.length+=e.length,!0)}integrate(e,n){sn()}write(e,n){e.writeInfo(EE),ie(e.restEncoder,this.length-n)}getMissing(e,n){return null}}const $0=typeof globalThis&lt;&quot;u&quot;?globalThis:typeof window&lt;&quot;u&quot;?window:typeof global&lt;&quot;u&quot;?global:{},V0=&quot;__ $YJS$ __&quot;;$0[V0]===!0&amp;&amp;console.error(&quot;Yjs was already imported. This breaks constructor checks and will lead to issues! - https://github.com/yjs/yjs/issues/438&quot;);$0[V0]=!0;const CE=Kk(&quot;http://localhost:8080&quot;),{useActor:OE}=Qk(CE);function TE({documentId:t}){const e=OE({name:&quot;yjsDocument&quot;,key:[t]}),[n,r]=Re.useState(!0),[i,s]=Re.useState(&quot;&quot;),l=Re.useRef(null),o=Re.useRef(!1),a=Re.useRef(!1),u=Re.useRef(!1);Re.useEffect(()=&gt;{const f=new ns;return l.current=f,r(!1),()=&gt;{f.destroy()}},[e.connection]),Re.useEffect(()=&gt;{const f=l.current;if(!f||u.current)return;const d=f.getText(&quot;content&quot;);d.observe(()=&gt;{if(!o.current&amp;&amp;(s(d.toString()),e.connection&amp;&amp;!a.current)){a.current=!0;const h=Sx(f),y=RE(h);e.connection.applyUpdate(y).finally(()=&gt;{a.current=!1})}}),u.current=!0},[e.connection]),e.useEvent(&quot;initialState&quot;,({update:f})=&gt;{const d=l.current;if(d){o.current=!0;try{const h=atob(f),y=new Uint8Array(h.length);for(let F=0;F&lt;h.length;F++)y[F]=h.charCodeAt(F);Dp(d,y);const k=d.getText(&quot;content&quot;);s(k.toString())}catch(h){console.error(&quot;Error applying initial update:&quot;,h)}finally{o.current=!1}}}),e.useEvent(&quot;update&quot;,({update:f})=&gt;{const d=l.current;if(d){o.current=!0;try{const h=atob(f),y=new Uint8Array(h.length);for(let F=0;F&lt;h.length;F++)y[F]=h.charCodeAt(F);Dp(d,y);const k=d.getText(&quot;content&quot;);s(k.toString())}catch(h){console.error(&quot;Error applying update:&quot;,h)}finally{o.current=!1}}});const c=f=&gt;{if(!l.current)return;const d=f.target.value,h=l.current.getText(&quot;content&quot;);d!==h.toString()&amp;&amp;(a.current=!0,l.current.transact(()=&gt;{h.delete(0,h.length),h.insert(0,d)}),a.current=!1)};return n?Te.jsx(&quot;div&quot;,{className:&quot;loading&quot;,children:&quot;Loading collaborative document...&quot;}):Te.jsxs(&quot;div&quot;,{className:&quot;editor-container&quot;,children:[Te.jsxs(&quot;div&quot;,{className:&quot;editor-header&quot;,children:[Te.jsxs(&quot;h3&quot;,{children:[&quot;Document: &quot;,t]}),Te.jsx(&quot;div&quot;,{className:`connection-status ${e.connection?&quot;connected&quot;:&quot;disconnected&quot;}`,children:e.connection?&quot;Connected&quot;:&quot;Disconnected&quot;})]}),Te.jsx(&quot;textarea&quot;,{value:i,onChange:c,placeholder:&quot;Start typing... All changes are synchronized in real-time with other users!&quot;,className:&quot;collaborative-textarea&quot;})]})}function AE(){const[t,e]=Re.useState(&quot;shared-doc&quot;),[n,r]=Re.useState(&quot;shared-doc&quot;),i=()=&gt;{e(n)};return Te.jsxs(&quot;div&quot;,{className:&quot;app-container&quot;,children:[Te.jsxs(&quot;div&quot;,{className:&quot;header&quot;,children:[Te.jsx(&quot;h1&quot;,{children:&quot;CRDT Collaborative Editor&quot;}),Te.jsx(&quot;p&quot;,{children:&quot;Real-time collaborative text editing powered by Yjs and RivetKit&quot;})]}),Te.jsxs(&quot;div&quot;,{className:&quot;info-box&quot;,children:[Te.jsx(&quot;h4&quot;,{children:&quot;How it works&quot;}),Te.jsx(&quot;p&quot;,{children:&quot;This editor uses Conflict-free Replicated Data Types (CRDTs) with Yjs to enable real-time collaborative editing. Open multiple browser tabs or share the URL with others to see live collaboration in action!&quot;})]}),Te.jsxs(&quot;div&quot;,{className:&quot;document-controls&quot;,children:[Te.jsx(&quot;label&quot;,{children:&quot;Document ID:&quot;}),Te.jsx(&quot;input&quot;,{type:&quot;text&quot;,value:n,onChange:s=&gt;r(s.target.value),placeholder:&quot;Enter document ID&quot;}),Te.jsx(&quot;button&quot;,{onClick:i,children:&quot;Switch Document&quot;})]}),Te.jsx(TE,{documentId:t},t)]})}function RE(t){let e=&quot;&quot;;for(let n=0;n&lt;t.byteLength;n++)e+=String.fromCharCode(t[n]);return btoa(e)}const B0=document.getElementById(&quot;root&quot;);if(!B0)throw new Error(&quot;Root element not found&quot;);ay(B0).render(Te.jsx(Re.StrictMode,{children:Te.jsx(AE,{})}));export{Jp as g};
">
<input type="hidden" name="project[files][src/frontend/dist/assets/index-z2Dkjsn_.js]" value="class V extends Error{constructor(e,s){super(e),this.name=&quot;ParseError&quot;,this.type=s.type,this.field=s.field,this.value=s.value,this.line=s.line}}function A(t){}function et(t){if(typeof t==&quot;function&quot;)throw new TypeError(&quot;`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?&quot;);const{onEvent:e=A,onError:s=A,onRetry:i=A,onComment:l}=t;let r=&quot;&quot;,d=!0,u,E=&quot;&quot;,f=&quot;&quot;;function $(a){const h=d?a.replace(/^\xEF\xBB\xBF/,&quot;&quot;):a,[m,P]=st(`${r}${h}`);for(const D of m)W(D);r=P,d=!1}function W(a){if(a===&quot;&quot;){U();return}if(a.startsWith(&quot;:&quot;)){l&amp;&amp;l(a.slice(a.startsWith(&quot;: &quot;)?2:1));return}const h=a.indexOf(&quot;:&quot;);if(h!==-1){const m=a.slice(0,h),P=a[h+1]===&quot; &quot;?2:1,D=a.slice(h+P);S(m,D,a);return}S(a,&quot;&quot;,a)}function S(a,h,m){switch(a){case&quot;event&quot;:f=h;break;case&quot;data&quot;:E=`${E}${h}
`;break;case&quot;id&quot;:u=h.includes(&quot;\0&quot;)?void 0:h;break;case&quot;retry&quot;:/^\d+$/.test(h)?i(parseInt(h,10)):s(new V(`Invalid \`retry\` value: &quot;${h}&quot;`,{type:&quot;invalid-retry&quot;,value:h,line:m}));break;default:s(new V(`Unknown field &quot;${a.length&gt;20?`${a.slice(0,20)}…`:a}&quot;`,{type:&quot;unknown-field&quot;,field:a,value:h,line:m}));break}}function U(){E.length&gt;0&amp;&amp;e({id:u,event:f||void 0,data:E.endsWith(`
`)?E.slice(0,-1):E}),u=void 0,E=&quot;&quot;,f=&quot;&quot;}function T(a={}){r&amp;&amp;a.consume&amp;&amp;W(r),d=!0,u=void 0,E=&quot;&quot;,f=&quot;&quot;,r=&quot;&quot;}return{feed:$,reset:T}}function st(t){const e=[];let s=&quot;&quot;,i=0;for(;i&lt;t.length;){const l=t.indexOf(&quot;\r&quot;,i),r=t.indexOf(`
`,i);let d=-1;if(l!==-1&amp;&amp;r!==-1?d=Math.min(l,r):l!==-1?d=l:r!==-1&amp;&amp;(d=r),d===-1){s=t.slice(i);break}else{const u=t.slice(i,d);e.push(u),i=d+1,t[i-1]===&quot;\r&quot;&amp;&amp;t[i]===`
`&amp;&amp;i++}}return[e,s]}class X extends Event{constructor(e,s){var i,l;super(e),this.code=(i=s==null?void 0:s.code)!=null?i:void 0,this.message=(l=s==null?void 0:s.message)!=null?l:void 0}[Symbol.for(&quot;nodejs.util.inspect.custom&quot;)](e,s,i){return i(Y(this),s)}[Symbol.for(&quot;Deno.customInspect&quot;)](e,s){return e(Y(this),s)}}function nt(t){const e=globalThis.DOMException;return typeof e==&quot;function&quot;?new e(t,&quot;SyntaxError&quot;):new SyntaxError(t)}function F(t){return t instanceof Error?&quot;errors&quot;in t&amp;&amp;Array.isArray(t.errors)?t.errors.map(F).join(&quot;, &quot;):&quot;cause&quot;in t&amp;&amp;t.cause instanceof Error?`${t}: ${F(t.cause)}`:t.message:`${t}`}function Y(t){return{type:t.type,message:t.message,code:t.code,defaultPrevented:t.defaultPrevented,cancelable:t.cancelable,timeStamp:t.timeStamp}}var tt=t=&gt;{throw TypeError(t)},Q=(t,e,s)=&gt;e.has(t)||tt(&quot;Cannot &quot;+s),n=(t,e,s)=&gt;(Q(t,e,&quot;read from private field&quot;),s?s.call(t):e.get(t)),c=(t,e,s)=&gt;e.has(t)?tt(&quot;Cannot add the same private member more than once&quot;):e instanceof WeakSet?e.add(t):e.set(t,s),o=(t,e,s,i)=&gt;(Q(t,e,&quot;write to private field&quot;),e.set(t,s),s),w=(t,e,s)=&gt;(Q(t,e,&quot;access private method&quot;),s),p,_,y,I,R,L,b,N,g,C,k,x,M,v,B,q,H,Z,j,z,O,J,K;class G extends EventTarget{constructor(e,s){var i,l;super(),c(this,v),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,c(this,p),c(this,_),c(this,y),c(this,I),c(this,R),c(this,L),c(this,b),c(this,N,null),c(this,g),c(this,C),c(this,k,null),c(this,x,null),c(this,M,null),c(this,q,async r=&gt;{var d;n(this,C).reset();const{body:u,redirected:E,status:f,headers:$}=r;if(f===204){w(this,v,O).call(this,&quot;Server sent HTTP 204, not reconnecting&quot;,204),this.close();return}if(E?o(this,y,new URL(r.url)):o(this,y,void 0),f!==200){w(this,v,O).call(this,`Non-200 status code (${f})`,f);return}if(!($.get(&quot;content-type&quot;)||&quot;&quot;).startsWith(&quot;text/event-stream&quot;)){w(this,v,O).call(this,&#39;Invalid content type, expected &quot;text/event-stream&quot;&#39;,f);return}if(n(this,p)===this.CLOSED)return;o(this,p,this.OPEN);const W=new Event(&quot;open&quot;);if((d=n(this,M))==null||d.call(this,W),this.dispatchEvent(W),typeof u!=&quot;object&quot;||!u||!(&quot;getReader&quot;in u)){w(this,v,O).call(this,&quot;Invalid response body, expected a web ReadableStream&quot;,f),this.close();return}const S=new TextDecoder,U=u.getReader();let T=!0;do{const{done:a,value:h}=await U.read();h&amp;&amp;n(this,C).feed(S.decode(h,{stream:!a})),a&amp;&amp;(T=!1,n(this,C).reset(),w(this,v,J).call(this))}while(T)}),c(this,H,r=&gt;{o(this,g,void 0),!(r.name===&quot;AbortError&quot;||r.type===&quot;aborted&quot;)&amp;&amp;w(this,v,J).call(this,F(r))}),c(this,j,r=&gt;{typeof r.id==&quot;string&quot;&amp;&amp;o(this,N,r.id);const d=new MessageEvent(r.event||&quot;message&quot;,{data:r.data,origin:n(this,y)?n(this,y).origin:n(this,_).origin,lastEventId:r.id||&quot;&quot;});n(this,x)&amp;&amp;(!r.event||r.event===&quot;message&quot;)&amp;&amp;n(this,x).call(this,d),this.dispatchEvent(d)}),c(this,z,r=&gt;{o(this,L,r)}),c(this,K,()=&gt;{o(this,b,void 0),n(this,p)===this.CONNECTING&amp;&amp;w(this,v,B).call(this)});try{if(e instanceof URL)o(this,_,e);else if(typeof e==&quot;string&quot;)o(this,_,new URL(e,it()));else throw new Error(&quot;Invalid URL&quot;)}catch{throw nt(&quot;An invalid or illegal string was specified&quot;)}o(this,C,et({onEvent:n(this,j),onRetry:n(this,z)})),o(this,p,this.CONNECTING),o(this,L,3e3),o(this,R,(i=s==null?void 0:s.fetch)!=null?i:globalThis.fetch),o(this,I,(l=s==null?void 0:s.withCredentials)!=null?l:!1),w(this,v,B).call(this)}get readyState(){return n(this,p)}get url(){return n(this,_).href}get withCredentials(){return n(this,I)}get onerror(){return n(this,k)}set onerror(e){o(this,k,e)}get onmessage(){return n(this,x)}set onmessage(e){o(this,x,e)}get onopen(){return n(this,M)}set onopen(e){o(this,M,e)}addEventListener(e,s,i){const l=s;super.addEventListener(e,l,i)}removeEventListener(e,s,i){const l=s;super.removeEventListener(e,l,i)}close(){n(this,b)&amp;&amp;clearTimeout(n(this,b)),n(this,p)!==this.CLOSED&amp;&amp;(n(this,g)&amp;&amp;n(this,g).abort(),o(this,p,this.CLOSED),o(this,g,void 0))}}p=new WeakMap,_=new WeakMap,y=new WeakMap,I=new WeakMap,R=new WeakMap,L=new WeakMap,b=new WeakMap,N=new WeakMap,g=new WeakMap,C=new WeakMap,k=new WeakMap,x=new WeakMap,M=new WeakMap,v=new WeakSet,B=function(){o(this,p,this.CONNECTING),o(this,g,new AbortController),n(this,R)(n(this,_),w(this,v,Z).call(this)).then(n(this,q)).catch(n(this,H))},q=new WeakMap,H=new WeakMap,Z=function(){var t;const e={mode:&quot;cors&quot;,redirect:&quot;follow&quot;,headers:{Accept:&quot;text/event-stream&quot;,...n(this,N)?{&quot;Last-Event-ID&quot;:n(this,N)}:void 0},cache:&quot;no-store&quot;,signal:(t=n(this,g))==null?void 0:t.signal};return&quot;window&quot;in globalThis&amp;&amp;(e.credentials=this.withCredentials?&quot;include&quot;:&quot;same-origin&quot;),e},j=new WeakMap,z=new WeakMap,O=function(t,e){var s;n(this,p)!==this.CLOSED&amp;&amp;o(this,p,this.CLOSED);const i=new X(&quot;error&quot;,{code:e,message:t});(s=n(this,k))==null||s.call(this,i),this.dispatchEvent(i)},J=function(t,e){var s;if(n(this,p)===this.CLOSED)return;o(this,p,this.CONNECTING);const i=new X(&quot;error&quot;,{code:e,message:t});(s=n(this,k))==null||s.call(this,i),this.dispatchEvent(i),o(this,b,setTimeout(n(this,K),n(this,L)))},K=new WeakMap,G.CONNECTING=0,G.OPEN=1,G.CLOSED=2;function it(){const t=&quot;document&quot;in globalThis?globalThis.document:void 0;return t&amp;&amp;typeof t==&quot;object&quot;&amp;&amp;&quot;baseURI&quot;in t&amp;&amp;typeof t.baseURI==&quot;string&quot;?t.baseURI:void 0}export{X as ErrorEvent,G as EventSource};
">
<input type="hidden" name="project[description]" value="generated by https://pkg.pr.new">
<input type="hidden" name="project[template]" value="node">
<input type="hidden" name="project[title]" value="example-crdt">
</form>
<script>document.getElementById("mainForm").submit();</script>

</body></html>