Reset main-custom branch to upstream/main

All important runner changes have landed upstream.

Bug: 358290763
Change-Id: Ib47f6838618e9c0081f60f3b60d52b1ce149b2af
Reviewed-on: https://chromium-review.googlesource.com/c/external/github.com/WebKit/JetStream/+/7094856
Reviewed-by: Marja Hölttä <marja@chromium.org>
This commit is contained in:
Camillo Bruni 2025-10-29 09:27:33 +01:00
parent 12a84634a9
commit 0368cebd22
116 changed files with 297422 additions and 4253 deletions

View file

@ -10,8 +10,8 @@ on:
workflow_dispatch:
jobs:
build:
name: Build
test:
name: Test
runs-on: macos-latest
env:
GITHUB_ACTIONS_OUTPUT: ""
@ -28,10 +28,10 @@ jobs:
run: brew install --cask firefox
- name: Checkout Branch
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Setup Node
uses: actions/setup-node@v4
uses: actions/setup-node@v5
with:
node-version-file: package.json
cache: npm
@ -49,3 +49,30 @@ jobs:
run: |
echo "Running in $BROWSER"
npm run test:${{ matrix.browser }}
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
fetch-depth: ${{ github.event_name == 'pull_request' && 2 || 0 }}
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: package.json
cache: npm
- name: Install Node Packages
run: npm ci
- name: Run Build
run: |
if ${{ github.event_name == 'pull_request' }}; then
npm run test:build -- --diff="HEAD^...HEAD"
else
npm run test:build -- --diff="${{ github.event.before }}...${{ github.event.after }}"
fi

View file

@ -1,286 +0,0 @@
/*
* Copyright 2017 Sam Thorogood. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
/**
* @fileoverview Polyfill for TextEncoder and TextDecoder.
*
* You probably want `text.min.js`, and not this file directly.
*/
//JSC
const global = (0,eval)("this");
(function(scope) {
'use strict';
// fail early
if (scope['TextEncoder'] && scope['TextDecoder']) {
return false;
}
// used for FastTextDecoder
const validUtfLabels = ['utf-8', 'utf8', 'unicode-1-1-utf-8'];
/**
* @constructor
*/
function FastTextEncoder() {
// This does not accept an encoding, and always uses UTF-8:
// https://www.w3.org/TR/encoding/#dom-textencoder
}
Object.defineProperty(FastTextEncoder.prototype, 'encoding', {value: 'utf-8'});
/**
* @param {string} string
* @param {{stream: boolean}=} options
* @return {!Uint8Array}
*/
FastTextEncoder.prototype['encode'] = function(string, options={stream: false}) {
if (options.stream) {
throw new Error(`Failed to encode: the 'stream' option is unsupported.`);
}
let pos = 0;
const len = string.length;
let at = 0; // output position
let tlen = Math.max(32, len + (len >>> 1) + 7); // 1.5x size
let target = new Uint8Array((tlen >>> 3) << 3); // ... but at 8 byte offset
while (pos < len) {
let value = string.charCodeAt(pos++);
if (value >= 0xd800 && value <= 0xdbff) {
// high surrogate
if (pos < len) {
const extra = string.charCodeAt(pos);
if ((extra & 0xfc00) === 0xdc00) {
++pos;
value = ((value & 0x3ff) << 10) + (extra & 0x3ff) + 0x10000;
}
}
if (value >= 0xd800 && value <= 0xdbff) {
continue; // drop lone surrogate
}
}
// expand the buffer if we couldn't write 4 bytes
if (at + 4 > target.length) {
tlen += 8; // minimum extra
tlen *= (1.0 + (pos / string.length) * 2); // take 2x the remaining
tlen = (tlen >>> 3) << 3; // 8 byte offset
const update = new Uint8Array(tlen);
update.set(target);
target = update;
}
if ((value & 0xffffff80) === 0) { // 1-byte
target[at++] = value; // ASCII
continue;
} else if ((value & 0xfffff800) === 0) { // 2-byte
target[at++] = ((value >>> 6) & 0x1f) | 0xc0;
} else if ((value & 0xffff0000) === 0) { // 3-byte
target[at++] = ((value >>> 12) & 0x0f) | 0xe0;
target[at++] = ((value >>> 6) & 0x3f) | 0x80;
} else if ((value & 0xffe00000) === 0) { // 4-byte
target[at++] = ((value >>> 18) & 0x07) | 0xf0;
target[at++] = ((value >>> 12) & 0x3f) | 0x80;
target[at++] = ((value >>> 6) & 0x3f) | 0x80;
} else {
continue; // out of range
}
target[at++] = (value & 0x3f) | 0x80;
}
// Use subarray if slice isn't supported (IE11). This will use more memory
// because the original array still exists.
return target.slice ? target.slice(0, at) : target.subarray(0, at);
}
/**
* @constructor
* @param {string=} utfLabel
* @param {{fatal: boolean}=} options
*/
function FastTextDecoder(utfLabel='utf-8', options={fatal: false}) {
if (validUtfLabels.indexOf(utfLabel.toLowerCase()) === -1) {
throw new RangeError(
`Failed to construct 'TextDecoder': The encoding label provided ('${utfLabel}') is invalid.`);
}
// if (options.fatal) {
// throw new Error(`Failed to construct 'TextDecoder': the 'fatal' option is unsupported.`);
// }
}
Object.defineProperty(FastTextDecoder.prototype, 'encoding', {value: 'utf-8'});
Object.defineProperty(FastTextDecoder.prototype, 'fatal', {value: false});
Object.defineProperty(FastTextDecoder.prototype, 'ignoreBOM', {value: false});
/**
* @param {!Uint8Array} bytes
* @return {string}
*/
function decodeBuffer(bytes) {
return Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('utf-8');
}
/**
* @param {!Uint8Array} bytes
* @return {string}
*/
function decodeSyncXHR(bytes) {
const b = new Blob([bytes], {type: 'text/plain;charset=UTF-8'});
const u = URL.createObjectURL(b);
// This hack will fail in non-Edgium Edge because sync XHRs are disabled (and
// possibly in other places), so ensure there's a fallback call.
try {
const x = new XMLHttpRequest();
x.open('GET', u, false);
x.send();
return x.responseText;
} catch (e) {
return decodeFallback(bytes);
} finally {
URL.revokeObjectURL(u);
}
}
/**
* @param {!Uint8Array} bytes
* @return {string}
*/
function decodeFallback(bytes) {
let inputIndex = 0;
// Create a working buffer for UTF-16 code points, but don't generate one
// which is too large for small input sizes. UTF-8 to UCS-16 conversion is
// going to be at most 1:1, if all code points are ASCII. The other extreme
// is 4-byte UTF-8, which results in two UCS-16 points, but this is still 50%
// fewer entries in the output.
const pendingSize = Math.min(256 * 256, bytes.length + 1);
const pending = new Uint16Array(pendingSize);
const chunks = [];
let pendingIndex = 0;
for (;;) {
const more = inputIndex < bytes.length;
// If there's no more data or there'd be no room for two UTF-16 values,
// create a chunk. This isn't done at the end by simply slicing the data
// into equal sized chunks as we might hit a surrogate pair.
if (!more || (pendingIndex >= pendingSize - 1)) {
// nb. .apply and friends are *really slow*. Low-hanging fruit is to
// expand this to literally pass pending[0], pending[1], ... etc, but
// the output code expands pretty fast in this case.
chunks.push(String.fromCharCode.apply(null, pending.subarray(0, pendingIndex)));
if (!more) {
return chunks.join('');
}
// Move the buffer forward and create another chunk.
bytes = bytes.subarray(inputIndex);
inputIndex = 0;
pendingIndex = 0;
}
// The native TextDecoder will generate "REPLACEMENT CHARACTER" where the
// input data is invalid. Here, we blindly parse the data even if it's
// wrong: e.g., if a 3-byte sequence doesn't have two valid continuations.
const byte1 = bytes[inputIndex++];
if ((byte1 & 0x80) === 0) { // 1-byte or null
pending[pendingIndex++] = byte1;
} else if ((byte1 & 0xe0) === 0xc0) { // 2-byte
const byte2 = bytes[inputIndex++] & 0x3f;
pending[pendingIndex++] = ((byte1 & 0x1f) << 6) | byte2;
} else if ((byte1 & 0xf0) === 0xe0) { // 3-byte
const byte2 = bytes[inputIndex++] & 0x3f;
const byte3 = bytes[inputIndex++] & 0x3f;
pending[pendingIndex++] = ((byte1 & 0x1f) << 12) | (byte2 << 6) | byte3;
} else if ((byte1 & 0xf8) === 0xf0) { // 4-byte
const byte2 = bytes[inputIndex++] & 0x3f;
const byte3 = bytes[inputIndex++] & 0x3f;
const byte4 = bytes[inputIndex++] & 0x3f;
// this can be > 0xffff, so possibly generate surrogates
let codepoint = ((byte1 & 0x07) << 0x12) | (byte2 << 0x0c) | (byte3 << 0x06) | byte4;
if (codepoint > 0xffff) {
// codepoint &= ~0x10000;
codepoint -= 0x10000;
pending[pendingIndex++] = (codepoint >>> 10) & 0x3ff | 0xd800;
codepoint = 0xdc00 | codepoint & 0x3ff;
}
pending[pendingIndex++] = codepoint;
} else {
// invalid initial byte
}
}
}
// Decoding a string is pretty slow, but use alternative options where possible.
let decodeImpl = decodeFallback;
if (typeof Buffer === 'function' && Buffer.from) {
// Buffer.from was added in Node v5.10.0 (2015-11-17).
decodeImpl = decodeBuffer;
} else if (typeof Blob === 'function' && typeof URL === 'function' && typeof URL.createObjectURL === 'function') {
// Blob and URL.createObjectURL are available from IE10, Safari 6, Chrome 19
// (all released in 2012), Firefox 19 (2013), ...
decodeImpl = decodeSyncXHR;
}
/**
* @param {(!ArrayBuffer|!ArrayBufferView)} buffer
* @param {{stream: boolean}=} options
* @return {string}
*/
FastTextDecoder.prototype['decode'] = function(buffer, options={stream: false}) {
if (options['stream']) {
throw new Error(`Failed to decode: the 'stream' option is unsupported.`);
}
if (!buffer)
return;
let bytes;
if (buffer instanceof Uint8Array) {
// Accept Uint8Array instances as-is.
bytes = buffer;
} else if (buffer.buffer instanceof ArrayBuffer) {
// Look for ArrayBufferView, which isn't a real type, but basically
// represents all the valid TypedArray types plus DataView. They all have
// ".buffer" as an instance of ArrayBuffer.
bytes = new Uint8Array(buffer.buffer);
} else {
// The only other valid argument here is that "buffer" is an ArrayBuffer.
// We also try to convert anything else passed to a Uint8Array, as this
// catches anything that's array-like. Native code would throw here.
bytes = new Uint8Array(buffer);
}
return decodeImpl(/** @type {!Uint8Array} */ (bytes));
}
scope['TextEncoder'] = FastTextEncoder;
scope['TextDecoder'] = FastTextDecoder;
}(typeof window !== 'undefined' ? window : (typeof global !== 'undefined' ? global : this)));

File diff suppressed because one or more lines are too long

Binary file not shown.

View file

@ -1,424 +0,0 @@
// Copyright (c) 2024, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
//
// Runner V8/JSShell script for testing dart2wasm, takes ".wasm" files as
// arguments.
//
// Run as follows on D8:
//
// $> d8 run_wasm.js \
// -- /abs/path/to/<dart_module>.mjs <dart_module>.wasm [<ffi_module>.wasm] \
// [-- Dart commandline arguments...]
//
// Run as follows on JSC:
//
// $> jsc run_wasm.js -- <dart_module>.mjs <dart_module>.wasm [<ffi_module>.wasm] \
// [-- Dart commandline arguments...]
//
// Run as follows on JSShell:
//
// $> js run_wasm.js \
// /abs/path/to/<dart_module>.mjs <dart_module>.wasm [<ffi_module>.wasm] \
// [-- Dart commandline arguments...]
//
// (Notice the missing -- here!)
//
// Please note we require an absolute path for the JS runtime. This is a
// workaround for a discrepancy in D8. Specifically, `import`(used to load .mjs
// files) searches for imports relative to run_wasm.js, but `readbuffer`(used to
// read in .wasm files) searches relative to CWD. A path relative to
// `run_wasm.js` will also work.
//
// Or with the `run_dart2wasm_d8` helper script:
//
// $> sdk/bin/run_dart2wasm_d8 <dart_module>.wasm [<ffi_module>.wasm]
//
// If an FFI module is specified, it will be instantiated first, and its
// exports will be supplied as imports to the Dart module under the 'ffi'
// module name.
const jsRuntimeArg = 0;
const wasmArg = 1;
const ffiArg = 2;
// This script is intended to be used by D8, JSShell or JSC. We distinguish
// them by the functions they offer to read files:
//
// Engine | Shell | FileRead | Arguments
// --------------------------------------------------------------
// V8 | D8 | readbuffer | arguments (arg0 arg1)
// JavaScriptCore | JSC | readFile | arguments (arg0 arg1)
// SpiderMonkey | JSShell | readRelativeToScript | scriptArgs (-- arg0 arg1)
//
const isD8 = (typeof readbuffer === "function");
const isJSC = (typeof readFile === "function");
const isJSShell = (typeof readRelativeToScript === "function");
if (isD8) {
// D8's performance.measure is API incompatible with the browser version.
//
// (see also dart2js's `sdk/**/js_runtime/lib/preambles/d8.js`)
delete performance.measure;
}
function readFileContentsAsBytes(filename) {
var buffer;
if (isJSC) {
buffer = readFile(filename, "binary");
} else if (isD8) {
buffer = readbuffer(filename);
} else {
buffer = readRelativeToScript(filename, "binary");
}
return new Uint8Array(buffer, 0, buffer.byteLength);
}
var args = (isD8 || isJSC) ? arguments : scriptArgs;
var dartArgs = [];
const argsSplit = args.indexOf("--");
if (argsSplit != -1) {
dartArgs = args.slice(argsSplit + 1);
args = args.slice(0, argsSplit);
}
// d8's `setTimeout` doesn't work as expected (it doesn't wait before calling
// the callback), and d8 also doesn't have `setInterval` and `queueMicrotask`.
// So we define our own event loop with these functions.
//
// The code below is copied form dart2js, with some modifications:
// sdk/lib/_internal/js_runtime/lib/preambles/d8.js
(function(self, scriptArguments) {
// Using strict mode to avoid accidentally defining global variables.
"use strict"; // Should be first statement of this function.
// Task queue as cyclic list queue.
var taskQueue = new Array(8); // Length is power of 2.
var head = 0;
var tail = 0;
var mask = taskQueue.length - 1;
function addTask(elem) {
taskQueue[head] = elem;
head = (head + 1) & mask;
if (head == tail) _growTaskQueue();
}
function removeTask() {
if (head == tail) return;
var result = taskQueue[tail];
taskQueue[tail] = undefined;
tail = (tail + 1) & mask;
return result;
}
function _growTaskQueue() {
// head == tail.
var length = taskQueue.length;
var split = head;
taskQueue.length = length * 2;
if (split * 2 < length) { // split < length / 2
for (var i = 0; i < split; i++) {
taskQueue[length + i] = taskQueue[i];
taskQueue[i] = undefined;
}
head += length;
} else {
for (var i = split; i < length; i++) {
taskQueue[length + i] = taskQueue[i];
taskQueue[i] = undefined;
}
tail += length;
}
mask = taskQueue.length - 1;
}
// Mapping from timer id to timer function.
// The timer id is written on the function as .$timerId.
// That field is cleared when the timer is cancelled, but it is not returned
// from the queue until its time comes.
var timerIds = {};
var timerIdCounter = 1; // Counter used to assign ids.
// Zero-timer queue as simple array queue using push/shift.
var zeroTimerQueue = [];
function addTimer(f, ms) {
ms = Math.max(0, ms);
var id = timerIdCounter++;
// A callback can be scheduled at most once.
// (console.assert is only available on D8)
if (isD8) console.assert(f.$timerId === undefined);
f.$timerId = id;
timerIds[id] = f;
if (ms == 0 && !isNextTimerDue()) {
zeroTimerQueue.push(f);
} else {
addDelayedTimer(f, ms);
}
return id;
}
function nextZeroTimer() {
while (zeroTimerQueue.length > 0) {
var action = zeroTimerQueue.shift();
if (action.$timerId !== undefined) return action;
}
}
function nextEvent() {
var action = removeTask();
if (action) {
return action;
}
do {
action = nextZeroTimer();
if (action) break;
var nextList = nextDelayedTimerQueue();
if (!nextList) {
return;
}
var newTime = nextList.shift();
advanceTimeTo(newTime);
zeroTimerQueue = nextList;
} while (true)
var id = action.$timerId;
clearTimerId(action, id);
return action;
}
// Mocking time.
var timeOffset = 0;
var now = function() {
// Install the mock Date object only once.
// Following calls to "now" will just use the new (mocked) Date.now
// method directly.
installMockDate();
now = Date.now;
return Date.now();
};
var originalDate = Date;
var originalNow = originalDate.now;
function advanceTimeTo(time) {
var now = originalNow();
if (timeOffset < time - now) {
timeOffset = time - now;
}
}
function installMockDate() {
var NewDate = function Date(Y, M, D, h, m, s, ms) {
if (this instanceof Date) {
// Assume a construct call.
switch (arguments.length) {
case 0: return new originalDate(originalNow() + timeOffset);
case 1: return new originalDate(Y);
case 2: return new originalDate(Y, M);
case 3: return new originalDate(Y, M, D);
case 4: return new originalDate(Y, M, D, h);
case 5: return new originalDate(Y, M, D, h, m);
case 6: return new originalDate(Y, M, D, h, m, s);
default: return new originalDate(Y, M, D, h, m, s, ms);
}
}
return new originalDate(originalNow() + timeOffset).toString();
};
NewDate.UTC = originalDate.UTC;
NewDate.parse = originalDate.parse;
NewDate.now = function now() { return originalNow() + timeOffset; };
NewDate.prototype = originalDate.prototype;
originalDate.prototype.constructor = NewDate;
Date = NewDate;
}
// Heap priority queue with key index.
// Each entry is list of [timeout, callback1 ... callbackn].
var timerHeap = [];
var timerIndex = {};
function addDelayedTimer(f, ms) {
var timeout = now() + ms;
var timerList = timerIndex[timeout];
if (timerList == null) {
timerList = [timeout, f];
timerIndex[timeout] = timerList;
var index = timerHeap.length;
timerHeap.length += 1;
bubbleUp(index, timeout, timerList);
} else {
timerList.push(f);
}
}
function isNextTimerDue() {
if (timerHeap.length == 0) return false;
var head = timerHeap[0];
return head[0] < originalNow() + timeOffset;
}
function nextDelayedTimerQueue() {
if (timerHeap.length == 0) return null;
var result = timerHeap[0];
var last = timerHeap.pop();
if (timerHeap.length > 0) {
bubbleDown(0, last[0], last);
}
return result;
}
function bubbleUp(index, key, value) {
while (index != 0) {
var parentIndex = (index - 1) >> 1;
var parent = timerHeap[parentIndex];
var parentKey = parent[0];
if (key > parentKey) break;
timerHeap[index] = parent;
index = parentIndex;
}
timerHeap[index] = value;
}
function bubbleDown(index, key, value) {
while (true) {
var leftChildIndex = index * 2 + 1;
if (leftChildIndex >= timerHeap.length) break;
var minChildIndex = leftChildIndex;
var minChild = timerHeap[leftChildIndex];
var minChildKey = minChild[0];
var rightChildIndex = leftChildIndex + 1;
if (rightChildIndex < timerHeap.length) {
var rightChild = timerHeap[rightChildIndex];
var rightKey = rightChild[0];
if (rightKey < minChildKey) {
minChildIndex = rightChildIndex;
minChild = rightChild;
minChildKey = rightKey;
}
}
if (minChildKey > key) break;
timerHeap[index] = minChild;
index = minChildIndex;
}
timerHeap[index] = value;
}
function addInterval(f, ms) {
ms = Math.max(0, ms);
var id = timerIdCounter++;
function repeat() {
// Reactivate with the same id.
repeat.$timerId = id;
timerIds[id] = repeat;
addDelayedTimer(repeat, ms);
f();
}
repeat.$timerId = id;
timerIds[id] = repeat;
addDelayedTimer(repeat, ms);
return id;
}
function cancelTimer(id) {
var f = timerIds[id];
if (f == null) return;
clearTimerId(f, id);
}
function clearTimerId(f, id) {
f.$timerId = undefined;
delete timerIds[id];
}
async function eventLoop(action) {
while (action) {
try {
await action();
} catch (e) {
// JSC doesn't report/print uncaught async exceptions for some reason.
if (isJSC) {
print('Error: ' + e);
print('Stack: ' + e.stack);
}
if (typeof onerror == "function") {
onerror(e, null, -1);
} else {
throw e;
}
}
action = nextEvent();
}
}
// Global properties. "self" refers to the global object, so adding a
// property to "self" defines a global variable.
self.self = self;
self.dartMainRunner = function(main, ignored_args) {
// Initialize.
var action = async function() { await main(scriptArguments, null); }
eventLoop(action);
};
self.setTimeout = addTimer;
self.clearTimeout = cancelTimer;
self.setInterval = addInterval;
self.clearInterval = cancelTimer;
self.queueMicrotask = addTask;
self.readFileContentsAsBytes = readFileContentsAsBytes;
self.location = {}
self.location.href = 'file://' + args[wasmArg];
// Signals `Stopwatch._initTicker` to use `Date.now` to get ticks instead of
// `performance.now`, as it's not available in d8.
self.dartUseDateNowForTicks = true;
})(this, []);
// We would like this itself to be a ES module rather than a script, but
// unfortunately d8 does not return a failed error code if an unhandled
// exception occurs asynchronously in an ES module.
const main = async () => {
const dart2wasm = await import(args[jsRuntimeArg]);
/// Returns whether the `js-string` built-in is supported.
function detectImportedStrings() {
let bytes = [
0, 97, 115, 109, 1, 0, 0, 0, 1, 4, 1, 96, 0,
0, 2, 23, 1, 14, 119, 97, 115, 109, 58, 106, 115, 45,
115, 116, 114, 105, 110, 103, 4, 99, 97, 115, 116, 0, 0
];
return !WebAssembly.validate(
new Uint8Array(bytes), {builtins: ['js-string']});
}
function compile(filename, withJsStringBuiltins) {
// Create a Wasm module from the binary Wasm file.
return WebAssembly.compile(
readFileContentsAsBytes(filename),
withJsStringBuiltins ? {builtins: ['js-string']} : {}
);
}
globalThis.window ??= globalThis;
let importObject = {};
// Is an FFI module specified?
if (args.length > 2) {
// Instantiate FFI module.
var ffiInstance = await WebAssembly.instantiate(await compile(args[ffiArg], false), {});
// Make its exports available as imports under the 'ffi' module name.
importObject.ffi = ffiInstance.exports;
}
// Instantiate the Dart module, importing from the global scope.
var dartInstance = await dart2wasm.instantiate(
compile(args[wasmArg], detectImportedStrings()),
Promise.resolve(importObject),
);
// Call `main`. If tasks are placed into the event loop (by scheduling tasks
// explicitly or awaiting Futures), these will automatically keep the script
// alive even after `main` returns.
await dart2wasm.invoke(dartInstance, ...dartArgs);
};
dartMainRunner(main, []);

View file

@ -59,11 +59,73 @@ body {
font-size: 1.6rem;
font-weight: 400;
line-height: 1.4;
background-repeat: no-repeat;
background-position: center -5vw;
background-size: 100vw;
padding-bottom: 0px;
background-image: url('clouds.svg');
overflow-y: hidden;
height: 100%;
}
table {
border-spacing: 0;
}
body.nonDefaultParams {
filter: hue-rotate(152deg);
}
.nonDefaultParams .summary {
display: none;
}
#non-default-params {
display: none;
text-align: center;
& h2 {
text-align: center;
}
& p {
text-align: center;
}
}
.nonDefaultParams #non-default-params {
display: block;
}
#non-standard-params-table {
border-collapse: collapse;
text-align: left;
display: inline-block;
margin-top: var(--gap);
}
#non-standard-params-table tr {
padding: 2px;
}
#non-standard-params-table thead th {
border-bottom: 1px solid var(--foreground);
}
#non-standard-params-table tbody td {
font-weight: normal;
text-align: left;
}
#non-standard-params-table thead th,
#non-standard-params-table tbody td {
padding: 0.1em 0.3em;
}
#non-standard-params-table tbody td:nth-child(2) {
color: var(--highlight);
}
.overflow-scroll {
overflow-y: auto;
}
@ -113,10 +175,16 @@ img {
background-position: center;
background-image: url('JetStream3Logo.svg');
color: transparent;
animation: swingin 350ms ease-out forwards;
will-change: transform, opacity;
height: 75px;
}
#jetstreams {
background-image: url('jetstreams.svg');
background-repeat: no-repeat;
background-size: contain;
background-position: center;
padding: 2rem 0;
margin: -2rem 0;
}

View file

@ -134,19 +134,18 @@ function uiFriendlyDuration(time) {
return `${time.toFixed(2)} ms`;
}
const LABEL_PADDING = 45;
function shellFriendlyLabel(label) {
const namePadding = 40;
return `${label}:`.padEnd(namePadding);
return `${label}`.padEnd(LABEL_PADDING);
}
const valuePadding = 10;
const VALUE_PADDING = 11;
function shellFriendlyDuration(time) {
return `${uiFriendlyDuration(time)}`.padStart(valuePadding);
return `${uiFriendlyDuration(time)} `.padStart(VALUE_PADDING);
}
function shellFriendlyScore(time) {
return `${uiFriendlyScore(time)} # `.padStart(valuePadding);
return `${uiFriendlyScore(time)} pts`.padStart(VALUE_PADDING);
}
@ -303,11 +302,11 @@ class Driver {
}
}
const totalScore = geomeanScore(allScores);
console.assert(totalScore > 0, `Invalid total score: ${totalScore}`);
const overallScore = geomeanScore(allScores);
console.assert(overallScore > 0, `Invalid total score: ${overallScore}`);
if (isInBrowser) {
let summaryHtml = `<div class="score">${uiFriendlyScore(totalScore)}</div>
let summaryHtml = `<div class="score">${uiFriendlyScore(overallScore)}</div>
<label>Score</label>`;
summaryHtml += `<div class="benchmark benchmark-done">`;
for (let [category, scores] of categoryScores) {
@ -330,20 +329,20 @@ class Driver {
summaryElement.onclick = displayCategoryScores;
statusElement.innerHTML = "";
} else if (!JetStreamParams.dumpJSONResults) {
console.log("Total:");
console.log("Overall:");
for (let [category, scores] of categoryScores) {
console.log(
shellFriendlyLabel(`${category}-Score`),
shellFriendlyLabel(`Overall ${category}-Score`),
shellFriendlyScore(geomeanScore(scores)));
}
for (let [category, times] of categoryTimes) {
console.log(
shellFriendlyLabel(`${category}-Time`),
shellFriendlyLabel(`Overall ${category}-Time`),
shellFriendlyDuration(geomeanScore(times)));
}
console.log("");
console.log(shellFriendlyLabel("Total-Score"), shellFriendlyScore(totalScore));
console.log(shellFriendlyLabel("Total-Time"), shellFriendlyDuration(totalTime));
console.log(shellFriendlyLabel("Overall Score"), shellFriendlyScore(overallScore));
console.log(shellFriendlyLabel("Overall Wall-Time"), shellFriendlyDuration(totalTime));
console.log("");
}
@ -836,8 +835,8 @@ class Benchmark {
allTimes() {
const allTimes = this.subTimes();
allTimes["Wall"] = this.wallTime;
allTimes["Total"] = this.totalTime;
allTimes["Wall"] = this.wallTime;
return allTimes;
}
@ -1844,7 +1843,7 @@ let BENCHMARKS = [
"./ARES-6/Air/payload-typescript-scanIdentifier.js",
"./ARES-6/Air/benchmark.js",
],
tags: ["Default", "ARES"],
tags: ["default", "js", "ARES"],
}),
new DefaultBenchmark({
name: "Basic",
@ -1859,7 +1858,7 @@ let BENCHMARKS = [
"./ARES-6/Basic/state.js",
"./ARES-6/Basic/benchmark.js",
],
tags: ["Default", "ARES"],
tags: ["default", "js", "ARES"],
}),
new DefaultBenchmark({
name: "ML",
@ -1868,7 +1867,7 @@ let BENCHMARKS = [
"./ARES-6/ml/benchmark.js",
],
iterations: 60,
tags: ["Default", "ARES"],
tags: ["default", "js", "ARES"],
}),
new AsyncBenchmark({
name: "Babylon",
@ -1882,7 +1881,7 @@ let BENCHMARKS = [
inspectorBlob: "./ARES-6/Babylon/inspector-blob.js",
babylonBlob: "./ARES-6/Babylon/babylon-blob.js",
},
tags: ["Default", "ARES"],
tags: ["default", "js", "ARES"],
allowUtf16: true,
}),
// CDJS
@ -1904,7 +1903,7 @@ let BENCHMARKS = [
],
iterations: 60,
worstCaseCount: 3,
tags: ["Default", "CDJS"],
tags: ["default", "js", ],
}),
// CodeLoad
new AsyncBenchmark({
@ -1915,7 +1914,7 @@ let BENCHMARKS = [
preload: {
inspectorPayloadBlob: "./code-load/inspector-payload-minified.js",
},
tags: ["Default", "CodeLoad"],
tags: ["default", "js", "inspector", "codeload"],
}),
new AsyncBenchmark({
name: "multi-inspector-code-load",
@ -1925,7 +1924,7 @@ let BENCHMARKS = [
preload: {
inspectorPayloadBlob: "./code-load/inspector-payload-minified.js",
},
tags: ["Default", "CodeLoad"],
tags: ["default", "js", "inspector", "codeload"],
}),
// Octane
new DefaultBenchmark({
@ -1934,7 +1933,7 @@ let BENCHMARKS = [
"./Octane/box2d.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "octane-code-load",
@ -1942,7 +1941,7 @@ let BENCHMARKS = [
"./Octane/code-first-load.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "codeload", "Octane"],
}),
new DefaultBenchmark({
name: "crypto",
@ -1950,7 +1949,7 @@ let BENCHMARKS = [
"./Octane/crypto.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "delta-blue",
@ -1958,7 +1957,7 @@ let BENCHMARKS = [
"./Octane/deltablue.js"
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "earley-boyer",
@ -1966,7 +1965,7 @@ let BENCHMARKS = [
"./Octane/earley-boyer.js"
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "gbemu",
@ -1975,7 +1974,7 @@ let BENCHMARKS = [
"./Octane/gbemu-part2.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "mandreel",
@ -1984,7 +1983,7 @@ let BENCHMARKS = [
],
iterations: 80,
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "navier-stokes",
@ -1992,7 +1991,7 @@ let BENCHMARKS = [
"./Octane/navier-stokes.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "pdfjs",
@ -2000,22 +1999,22 @@ let BENCHMARKS = [
"./Octane/pdfjs.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "raytrace",
files: [
"./Octane/raytrace.js",
],
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "regexp",
name: "regexp-octane",
files: [
"./Octane/regexp.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "regexp", "Octane"],
}),
new DefaultBenchmark({
name: "richards",
@ -2023,7 +2022,7 @@ let BENCHMARKS = [
"./Octane/richards.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "splay",
@ -2031,7 +2030,7 @@ let BENCHMARKS = [
"./Octane/splay.js",
],
deterministicRandom: true,
tags: ["Default", "Octane"],
tags: ["default", "js", "Octane"],
}),
new DefaultBenchmark({
name: "typescript-octane",
@ -2043,7 +2042,7 @@ let BENCHMARKS = [
iterations: 15,
worstCaseCount: 2,
deterministicRandom: true,
tags: ["Octane", "typescript"],
tags: ["Octane", "js", "typescript"],
}),
// RexBench
new DefaultBenchmark({
@ -2055,7 +2054,7 @@ let BENCHMARKS = [
"./RexBench/FlightPlanner/expectations.js",
"./RexBench/FlightPlanner/benchmark.js",
],
tags: ["Default", "RexBench"],
tags: ["default", "js", "RexBench"],
}),
new DefaultBenchmark({
name: "OfflineAssembler",
@ -2073,7 +2072,7 @@ let BENCHMARKS = [
"./RexBench/OfflineAssembler/benchmark.js",
],
iterations: 80,
tags: ["Default", "RexBench"],
tags: ["default", "js", "RexBench"],
}),
new DefaultBenchmark({
name: "UniPoker",
@ -2085,7 +2084,7 @@ let BENCHMARKS = [
deterministicRandom: true,
// FIXME: UniPoker should not access isInBrowser.
exposeBrowserTest: true,
tags: ["Default", "RexBench"],
tags: ["default", "js", "RexBench"],
}),
new DefaultBenchmark({
name: "validatorjs",
@ -2095,7 +2094,7 @@ let BENCHMARKS = [
"./validatorjs/dist/bundle.es6.min.js",
"./validatorjs/benchmark.js",
],
tags: ["Default", "regexp"],
tags: ["default", "js", "regexp"],
}),
// Simple
new DefaultBenchmark({
@ -2103,21 +2102,21 @@ let BENCHMARKS = [
files: [
"./simple/hash-map.js",
],
tags: ["Default", "Simple"],
tags: ["default", "js", "Simple"],
}),
new AsyncBenchmark({
name: "doxbee-promise",
files: [
"./simple/doxbee-promise.js",
],
tags: ["Default", "Simple"],
tags: ["default", "js", "promise", "Simple"],
}),
new AsyncBenchmark({
name: "doxbee-async",
files: [
"./simple/doxbee-async.js",
],
tags: ["Default", "Simple"],
tags: ["default", "js", "Simple"],
}),
// SeaMonster
new DefaultBenchmark({
@ -2125,14 +2124,14 @@ let BENCHMARKS = [
files: [
"./SeaMonster/ai-astar.js"
],
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "SeaMonster"],
}),
new DefaultBenchmark({
name: "gaussian-blur",
files: [
"./SeaMonster/gaussian-blur.js",
],
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "SeaMonster"],
}),
new DefaultBenchmark({
name: "stanford-crypto-aes",
@ -2140,7 +2139,7 @@ let BENCHMARKS = [
"./SeaMonster/sjlc.js",
"./SeaMonster/stanford-crypto-aes.js",
],
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "SeaMonster"],
}),
new DefaultBenchmark({
name: "stanford-crypto-pbkdf2",
@ -2148,7 +2147,7 @@ let BENCHMARKS = [
"./SeaMonster/sjlc.js",
"./SeaMonster/stanford-crypto-pbkdf2.js"
],
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "SeaMonster"],
}),
new DefaultBenchmark({
name: "stanford-crypto-sha256",
@ -2156,7 +2155,7 @@ let BENCHMARKS = [
"./SeaMonster/sjlc.js",
"./SeaMonster/stanford-crypto-sha256.js",
],
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "SeaMonster"],
}),
new DefaultBenchmark({
name: "json-stringify-inspector",
@ -2166,7 +2165,7 @@ let BENCHMARKS = [
],
iterations: 20,
worstCaseCount: 2,
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "json", "inspector", "SeaMonster"],
}),
new DefaultBenchmark({
name: "json-parse-inspector",
@ -2176,7 +2175,7 @@ let BENCHMARKS = [
],
iterations: 20,
worstCaseCount: 2,
tags: ["Default", "SeaMonster"],
tags: ["default", "js", "json", "inspector", "SeaMonster"],
}),
// BigInt
new AsyncBenchmark({
@ -2189,7 +2188,7 @@ let BENCHMARKS = [
iterations: 4,
worstCaseCount: 1,
deterministicRandom: true,
tags: ["BigIntNoble"],
tags: ["js", "bigint", "BigIntNoble"],
}),
new AsyncBenchmark({
name: "bigint-noble-secp256k1",
@ -2199,7 +2198,7 @@ let BENCHMARKS = [
"./bigint/noble-benchmark.js",
],
deterministicRandom: true,
tags: ["BigIntNoble"],
tags: ["js", "bigint", "BigIntNoble"],
}),
new AsyncBenchmark({
name: "bigint-noble-ed25519",
@ -2210,7 +2209,7 @@ let BENCHMARKS = [
],
iterations: 30,
deterministicRandom: true,
tags: ["Default", "BigIntNoble"],
tags: ["default", "js", "bigint", "BigIntNoble"],
}),
new DefaultBenchmark({
name: "bigint-paillier",
@ -2222,7 +2221,7 @@ let BENCHMARKS = [
iterations: 10,
worstCaseCount: 2,
deterministicRandom: true,
tags: ["BigIntMisc"],
tags: ["js", "bigint", "BigIntMisc"],
}),
new DefaultBenchmark({
name: "bigint-bigdenary",
@ -2232,7 +2231,7 @@ let BENCHMARKS = [
],
iterations: 160,
worstCaseCount: 16,
tags: ["BigIntMisc"],
tags: ["js", "bigint", "BigIntMisc"],
}),
// Proxy
new AsyncBenchmark({
@ -2244,7 +2243,7 @@ let BENCHMARKS = [
],
iterations: defaultIterationCount * 3,
worstCaseCount: defaultWorstCaseCount * 3,
tags: ["Default", "Proxy"],
tags: ["default", "js", "Proxy"],
}),
new AsyncBenchmark({
name: "proxy-vue",
@ -2253,19 +2252,37 @@ let BENCHMARKS = [
"./proxy/vue-bundle.js",
"./proxy/vue-benchmark.js",
],
tags: ["Default", "Proxy"],
tags: ["default", "js", "Proxy"],
}),
new AsyncBenchmark({
name: "jsdom-d3-startup",
files: [
"./utils/StartupBenchmark.js",
"./jsdom-d3-startup/benchmark.js",
],
preload: {
// Unminified sources for profiling.
// BUNDLE: "./jsdom-d3-startup/dist/bundle.js",
BUNDLE: "./jsdom-d3-startup/dist/bundle.min.js",
US_DATA: "./jsdom-d3-startup/data/counties-albers-10m.json",
AIRPORTS: "./jsdom-d3-startup/data/airports.csv",
},
tags: ["default", "js", "d3", "startup", "jsdom"],
iterations: 15,
worstCaseCount: 2,
}),
new AsyncBenchmark({
name: "web-ssr",
files: [
"./utils/StartupBenchmark.js",
"./web-ssr/benchmark.js",
],
preload: {
// Debug Sources for nicer profiling.
// BUNDLE_BLOB: "./web-ssr/dist/bundle.js",
BUNDLE_BLOB: "./web-ssr/dist/bundle.min.js",
// BUNDLE: "./web-ssr/dist/bundle.js",
BUNDLE: "./web-ssr/dist/bundle.min.js",
},
tags: ["Default", "web", "ssr"],
tags: ["default", "js", "web", "ssr"],
iterations: 30,
}),
// Class fields
@ -2274,14 +2291,14 @@ let BENCHMARKS = [
files: [
"./class-fields/raytrace-public-class-fields.js",
],
tags: ["Default", "ClassFields"],
tags: ["default", "js", "ClassFields"],
}),
new DefaultBenchmark({
name: "raytrace-private-class-fields",
files: [
"./class-fields/raytrace-private-class-fields.js",
],
tags: ["Default", "ClassFields"],
tags: ["default", "js", "ClassFields"],
}),
new AsyncBenchmark({
name: "typescript-lib",
@ -2299,7 +2316,7 @@ let BENCHMARKS = [
},
iterations: 1,
worstCaseCount: 0,
tags: ["Default", "typescript"],
tags: ["default", "js", "typescript"],
}),
// Generators
new AsyncBenchmark({
@ -2310,7 +2327,7 @@ let BENCHMARKS = [
iterations: 80,
worstCaseCount: 6,
deterministicRandom: true,
tags: ["Default", "Generators"],
tags: ["default", "js", "Generators"],
}),
new DefaultBenchmark({
name: "sync-fs",
@ -2320,21 +2337,21 @@ let BENCHMARKS = [
iterations: 80,
worstCaseCount: 6,
deterministicRandom: true,
tags: ["Default", "Generators"],
tags: ["default", "js", "Generators"],
}),
new DefaultBenchmark({
name: "lazy-collections",
files: [
"./generators/lazy-collections.js",
],
tags: ["Default", "Generators"],
tags: ["default", "js", "Generators"],
}),
new DefaultBenchmark({
name: "js-tokens",
files: [
"./generators/js-tokens.js",
],
tags: ["Default", "Generators"],
tags: ["default", "js", "Generators"],
}),
new DefaultBenchmark({
name: "threejs",
@ -2343,7 +2360,7 @@ let BENCHMARKS = [
"./threejs/benchmark.js",
],
deterministicRandom: true,
tags: ["Default", "ThreeJs"],
tags: ["default", "js"],
}),
// Wasm
new WasmEMCCBenchmark({
@ -2398,7 +2415,7 @@ let BENCHMARKS = [
wasmBinary: "./wasm/TSF/build/tsf.wasm",
},
iterations: 50,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
new WasmEMCCBenchmark({
name: "richards-wasm",
@ -2410,7 +2427,7 @@ let BENCHMARKS = [
wasmBinary: "./wasm/richards/build/richards.wasm",
},
iterations: 50,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
new WasmEMCCBenchmark({
name: "sqlite3-wasm",
@ -2424,7 +2441,7 @@ let BENCHMARKS = [
},
iterations: 30,
worstCaseCount: 2,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
new WasmEMCCBenchmark({
name: "Dart-flute-complex-wasm",
@ -2455,7 +2472,7 @@ let BENCHMARKS = [
},
iterations: 30,
worstCaseCount: 2,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
new WasmEMCCBenchmark({
name: "Kotlin-compose-wasm",
@ -2475,7 +2492,7 @@ let BENCHMARKS = [
},
iterations: 15,
worstCaseCount: 2,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
new AsyncBenchmark({
name: "transformersjs-bert-wasm",
@ -2497,7 +2514,7 @@ let BENCHMARKS = [
},
iterations: 30,
allowUtf16: true,
tags: ["Default", "Wasm", "transformersjs"],
tags: ["default", "Wasm", "transformersjs"],
}),
new AsyncBenchmark({
name: "transformersjs-whisper-wasm",
@ -2525,7 +2542,7 @@ let BENCHMARKS = [
iterations: 5,
worstCaseCount: 1,
allowUtf16: true,
tags: ["Default", "Wasm", "transformersjs"],
tags: ["default", "Wasm", "transformersjs"],
}),
new WasmLegacyBenchmark({
name: "tfjs-wasm",
@ -2584,7 +2601,7 @@ let BENCHMARKS = [
worstCaseCount: 3,
deterministicRandom: true,
allowUtf16: true,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
// WorkerTests
new AsyncBenchmark({
@ -2622,7 +2639,7 @@ let BENCHMARKS = [
stringUnpackCode: "./worker/bomb-subtests/string-unpack-code.js",
regexpDNA: "./worker/bomb-subtests/regexp-dna.js",
},
tags: ["Default", "WorkerTests"],
tags: ["default", "js", "WorkerTests"],
}),
new AsyncBenchmark({
name: "segmentation",
@ -2634,7 +2651,7 @@ let BENCHMARKS = [
},
iterations: 36,
worstCaseCount: 3,
tags: ["Default", "WorkerTests"],
tags: ["default", "js", "WorkerTests"],
}),
// WSL
new WSLBenchmark({
@ -2789,7 +2806,7 @@ let BENCHMARKS = [
"./WSL/WrapChecker.js",
"./WSL/Test.js",
],
tags: ["Default", "WSL"],
tags: ["default", "js", "WSL"],
}),
// 8bitbench
new WasmEMCCBenchmark({
@ -2805,7 +2822,7 @@ let BENCHMARKS = [
},
iterations: 15,
worstCaseCount: 2,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
// zlib-wasm
new WasmEMCCBenchmark({
@ -2818,7 +2835,7 @@ let BENCHMARKS = [
wasmBinary: "./wasm/zlib/build/zlib.wasm",
},
iterations: 40,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
// .NET
new AsyncBenchmark({
@ -2830,7 +2847,7 @@ let BENCHMARKS = [
preload: dotnetPreloads("interp"),
iterations: 10,
worstCaseCount: 2,
tags: ["Default", "Wasm", "dotnet"],
tags: ["default", "Wasm", "dotnet"],
}),
new AsyncBenchmark({
name: "dotnet-aot-wasm",
@ -2841,7 +2858,7 @@ let BENCHMARKS = [
preload: dotnetPreloads("aot"),
iterations: 15,
worstCaseCount: 2,
tags: ["Default", "Wasm", "dotnet"],
tags: ["default", "Wasm", "dotnet"],
}),
// J2CL
new AsyncBenchmark({
@ -2854,13 +2871,13 @@ let BENCHMARKS = [
wasmBinary: "./wasm/j2cl-box2d/build/Box2dBenchmark_j2wasm_binary.wasm",
},
iterations: 40,
tags: ["Default", "Wasm"],
tags: ["default", "Wasm"],
}),
];
const PRISM_JS_FILES = [
"./startup-helper/StartupBenchmark.js",
"./utils/StartupBenchmark.js",
"./prismjs/benchmark.js",
];
const PRISM_JS_PRELOADS = {
@ -2874,7 +2891,7 @@ const PRISM_JS_PRELOADS = {
SAMPLE_SQL: "./prismjs/data/sample.sql",
SAMPLE_TS: "./prismjs/data/sample.ts",
};
const PRISM_JS_TAGS = ["parser", "regexp", "startup", "prismjs"];
const PRISM_JS_TAGS = ["js", "parser", "regexp", "startup", "prismjs"];
BENCHMARKS.push(
new AsyncBenchmark({
name: "prismjs-startup-es6",
@ -2885,7 +2902,7 @@ BENCHMARKS.push(
BUNDLE: "./prismjs/dist/bundle.es6.min.js",
...PRISM_JS_PRELOADS,
},
tags: ["Default", ...PRISM_JS_TAGS, "es6"],
tags: ["default", ...PRISM_JS_TAGS, "es6"],
}),
new AsyncBenchmark({
name: "prismjs-startup-es5",
@ -2907,6 +2924,7 @@ const INTL_TESTS = [
"NumberFormat",
"PluralRules",
];
const INTL_TAGS = ["js", "internationalization"]
const INTL_BENCHMARKS = [];
for (const test of INTL_TESTS) {
const benchmark = new AsyncBenchmark({
@ -2919,14 +2937,14 @@ for (const test of INTL_TESTS) {
iterations: 2,
worstCaseCount: 1,
deterministicRandom: true,
tags: ["Javascript", "intl"],
tags: INTL_TAGS,
});
INTL_BENCHMARKS.push(benchmark);
}
BENCHMARKS.push(
new GroupedBenchmark({
name: "intl",
tags: ["Javascript", "intl"],
tags: INTL_TAGS,
}, INTL_BENCHMARKS));
@ -2958,7 +2976,7 @@ for (const test of SUNSPIDER_TESTS) {
}
BENCHMARKS.push(new GroupedBenchmark({
name: "Sunspider",
tags: ["Default", "SunSpider"],
tags: ["default", "js", "SunSpider"],
}, SUNSPIDER_BENCHMARKS))
// WTB (Web Tooling Benchmark) tests
@ -3006,7 +3024,7 @@ const WPT_FILES = [
for (const [name, enabled] of Object.entries(WTB_TESTS)) {
const tags = ["WTB"];
const tags = ["js", "WTB"];
if (enabled)
tags.push("Default");
BENCHMARKS.push(new AsyncBenchmark({

View file

@ -225,7 +225,7 @@ class Benchmark {
this.height = 450;
this.radius = 15;
const rand = (function() {
const randUint32 = (function() {
let seed = 49734321;
return function() {
// Robert Jenkins' 32 bit integer hash function.
@ -235,13 +235,13 @@ class Benchmark {
seed = ((seed + 0xd3a2646c) ^ (seed << 9)) & 0xffffffff;
seed = ((seed + 0xfd7046c5) + (seed << 3)) & 0xffffffff;
seed = ((seed ^ 0xb55a4f09) ^ (seed >>> 16)) & 0xffffffff;
return (seed & 0xfffffff) / 0x10000000;
return (seed & 0xfffffff);
};
})();
const buffer = new Uint32Array(this.width * this.height);
for (let i = 0; i < buffer.length; ++i)
buffer[i] = rand();
buffer[i] = randUint32();
this.buffer = buffer;
}

57
TypeScript/dist/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,57 @@
typescript
Apache-2.0
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
You must give any other recipients of the Work or Derivative Works a copy of this License; and
You must cause any modified files to carry prominent notices stating that You changed the files; and
You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS

View file

@ -13,6 +13,7 @@
"@types/node": "^24.2.0",
"ansi-styles": "^6.2.1",
"glob": "^11.0.3",
"license-webpack-plugin": "^4.0.2",
"path-browserify": "^1.0.1",
"typescript": "^5.9.2",
"undici-types": "^7.13.0",
@ -1248,6 +1249,23 @@
"node": ">=0.10.0"
}
},
"node_modules/license-webpack-plugin": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz",
"integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==",
"license": "ISC",
"dependencies": {
"webpack-sources": "^3.0.0"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
},
"webpack-sources": {
"optional": true
}
}
},
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",

View file

@ -19,6 +19,7 @@
"@types/node": "^24.2.0",
"ansi-styles": "^6.2.1",
"glob": "^11.0.3",
"license-webpack-plugin": "^4.0.2",
"path-browserify": "^1.0.1",
"typescript": "^5.9.2",
"undici-types": "^7.13.0",

View file

@ -2,6 +2,7 @@ import path from "path";
import { fileURLToPath } from "url";
import TerserPlugin from "terser-webpack-plugin";
import UnicodeEscapePlugin from "@dapplets/unicode-escape-webpack-plugin";
import { LicenseWebpackPlugin } from "license-webpack-plugin";
import * as PathBrowserify from "path-browserify";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@ -24,6 +25,10 @@ const commonConfig = {
new UnicodeEscapePlugin({
test: /\.(js|jsx|ts|tsx)$/, // Escape Unicode in JavaScript and TypeScript files
}),
new LicenseWebpackPlugin({
perChunkOutput: true,
outputFilename: "LICENSE.txt",
}),
],
optimization: {
minimizer: [

12
cli.js
View file

@ -21,27 +21,27 @@
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
*/
load("./shell-config.js");
load("./utils/shell-config.js");
const CLI_PARAMS = {
__proto__: null,
help: { help: "Print this help message.", param: "help" },
"iteration-count": {
help: "Set the default iteration count.",
param: "iterationCount",
param: "testIterationCount",
},
"worst-case-count": {
help: "Set the default worst-case count.",
param: "worstCaseCount",
param: "testWorstCaseCount",
},
"dump-json-results": {
help: "Print summary json to the console.",
param: "dumpJSONResults",
},
"dump-test-list": {
help: "Print test list instead of running.",
help: "Print the selected test list instead of running.",
param: "dumpTestList",
},
ramification: {
@ -120,7 +120,7 @@ if (cliArgs.length) {
if (cliParams.size)
globalThis.JetStreamParamsSource = cliParams;
load("./params.js");
load("./utils/params.js");
async function runJetStream() {

View file

@ -36,7 +36,9 @@
const isInBrowser = true;
const isD8 = false;
const isSpiderMonkey = false;
globalThis.JetStreamParamsSource = new URLSearchParams(globalThis?.location?.search);
if (globalThis?.location?.search) {
globalThis.JetStreamParamsSource = new URLSearchParams(globalThis?.location?.search);
}
globalThis.allIsGood = true;
window.onerror = function(e) {
if (e == "Script error.") {
@ -49,6 +51,9 @@
}
async function initialize() {
if (!JetStreamParams.isDefault) {
showNonDefaultParams();
}
if (globalThis.allIsGood) {
try {
await JetStream.initialize();
@ -64,9 +69,21 @@
statusElement.innerHTML = "<h2>ERROR</h2><p>Errors were encountered during page load. Refusing to run a partial benchmark suite.</p>";
}
}
function showNonDefaultParams() {
document.body.classList.add("nonDefaultParams");
const body = document.querySelector("#non-standard-params-table tbody");
for (const [key, value] of Object.entries(JetStreamParams.nonDefaultParams)) {
const defaultValue = DefaultJetStreamParams[key]
const row = body.insertRow();
row.insertCell().textContent = key;
row.insertCell().textContent = JSON.stringify(value);
row.insertCell().textContent = JSON.stringify(defaultValue);
}
}
</script>
<script src="params.js"></script>
<script src="utils/params.js"></script>
<script src="JetStreamDriver.js"></script>
</head>
@ -79,6 +96,23 @@
<main>
<p class="summary">JetStream 3 is a JavaScript and WebAssembly benchmark suite focused on the most advanced web applications. It rewards browsers that start up quickly, execute code quickly, and run smoothly. For more information, read the <a href="in-depth.html">in-depth analysis</a>. Bigger scores are better.</p>
<div id="non-default-params">
<h2>Non-standard Parameters</h2>
<p>
JetStream ran with non-standard parameters.<br />
The results are likely not comparable to default runs.
</p>
<table id="non-standard-params-table">
<thead>
<tr>
<th>Param</th>
<th>Value</th>
<th>Default</th>
</tr>
</thead>
<tbody></tbody>
</table>
</div>
<p class="summary" id="mode-description"></p>
<div id="result-summary"></div>

View file

@ -52,4 +52,4 @@ class Benchmark {
`Invalid totalLength = ${this.totalLength}, expected >= ${expectedMinTotalLength}`
);
}
}
}

View file

@ -0,0 +1,25 @@
# JSDOM D3 Startup Benchmark
The benchmark reads airport and US geography data, then uses D3 to create a Voronoi diagram of the airports overlaid on a map of the US.
It uses jsdom to simulate a browser environment for D3 to render to an SVG element.
## JetStream integration
- We use a custom `./build/build/cache-buster-comment-plugin.cjs` which injects a known comment into every function in the bundle
- The JetStream benchmark replaces these comments with a unique string per iteration
- Each benchmark iteration includes parse and top-level eval time
## Setup
```bash
# Install node deps from package-lock.json
npm ci --include=dev;
# Bundle sources to dist/*.
npm run build
# Use build:dev for non-minified sources.
npm run build:dev
```
# Testing
```bash
# Run the basic node benchmark implementation for development.
npm run test
```

View file

@ -0,0 +1,20 @@
import { performance } from 'perf_hooks';
import fs from 'fs';
import * as d3 from 'd3';
import { runTest } from './src/test.mjs';
async function main() {
const usData = JSON.parse(fs.readFileSync('./data/counties-albers-10m.json', 'utf-8'));
const airportsData = fs.readFileSync('./data/airports.csv', 'utf-8');
const startTime = performance.now();
const svg = await runTest(airportsData, usData);
const endTime = performance.now();
// console.log(svg); // The SVG output
console.log(`Execution time: ${endTime - startTime} ms`);
}
main();

View file

@ -0,0 +1,75 @@
/*
* Copyright (C) 2025 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
// Load D3 and data loading utilities for d8
const EXPECTED_LAST_RESULT_LENGTH = 691366;
const EXPECTED_LAST_RESULT_HASH = 144487595;
globalThis.clearTimeout = () => { };
class Benchmark extends StartupBenchmark {
lastResult;
totalHash = 0xdeadbeef;
currentIteration = 0;
constructor({iterationCount}) {
super({
iterationCount,
expectedCacheCommentCount: 10028,
sourceCodeReuseCount: 2,
});
}
async init() {
await super.init();
this.airportsCsvString = (await JetStream.getString(JetStream.preload.AIRPORTS));
console.assert(this.airportsCsvString.length == 145493, `Expected this.airportsCsvString.length to be 141490 but got ${this.airportsCsvString.length}`);
this.usDataJsonString = await JetStream.getString(JetStream.preload.US_DATA);
console.assert(this.usDataJsonString.length == 2880996, `Expected this.usData.length to be 2880996 but got ${this.usDataJsonString.length}`);
this.usData = JSON.parse(this.usDataJsonString);
}
runIteration() {
let iterationSourceCode = this.iterationSourceCodes[this.currentIteration];
if (!iterationSourceCode)
throw new Error(`Could not find source for iteration ${this.currentIteration}`);
// Module in sourceCode it assigned to the ReactRenderTest variable.
let D3Test;
eval(iterationSourceCode);
const html = D3Test.runTest(this.airportsCsvString, this.usData);
const htmlHash = this.quickHash(html);
this.lastResult = { html, htmlHash };
this.totalHash ^= this.lastResult.htmlHash;
this.currentIteration++;
}
validate() {
if (this.lastResult.html.length != EXPECTED_LAST_RESULT_LENGTH)
throw new Error(`Expected this.lastResult.html.length to be ${EXPECTED_LAST_RESULT_LENGTH} but got ${this.lastResult.length}`);
if (this.lastResult.htmlHash != EXPECTED_LAST_RESULT_HASH)
throw new Error(`Expected this.lastResult.htmlHash to be ${EXPECTED_LAST_RESULT_HASH} but got ${this.lastResult.htmlHash}`);
}
}

View file

@ -0,0 +1,29 @@
// Babel plugin that adds CACHE_BUST_COMMENT to every function body.
const CACHE_BUST_COMMENT = "ThouShaltNotCache";
module.exports = function({ types: t }) {
return {
visitor: {
Function(path) {
const bodyPath = path.get("body");
// Handle arrow functions: () => "value"
// Convert them to block statements: () => { return "value"; }
if (!bodyPath.isBlockStatement()) {
const newBody = t.blockStatement([t.returnStatement(bodyPath.node)]);
path.set("body", newBody);
}
// Handle empty function bodies: function foo() {}
// Add an empty statement so we have a first node to attach the comment to.
if (path.get("body.body").length === 0) {
path.get("body").pushContainer("body", t.emptyStatement());
}
const firstNode = path.node.body.body[0];
t.addComment(firstNode, "leading", CACHE_BUST_COMMENT);
}
},
};
};

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,28 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
Source: https://ourairports.com/data/
Source: https://github.com/davidmegginson/ourairports-data

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,16 @@
Copyright 2013-2019 Michael Bostock
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
THIS SOFTWARE.
https://github.com/topojson/us-atlas

2845
jsdom-d3-startup/dist/LICENSE.txt vendored Normal file

File diff suppressed because it is too large Load diff

20051
jsdom-d3-startup/dist/bundle.js vendored Normal file

File diff suppressed because one or more lines are too long

1
jsdom-d3-startup/dist/bundle.js.map vendored Normal file

File diff suppressed because one or more lines are too long

20061
jsdom-d3-startup/dist/bundle.min.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

3546
jsdom-d3-startup/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,29 @@
{
"scripts": {
"test": "node benchmark-node.mjs",
"clean": "rm -rf dist/*",
"prebuild": "npm run clean",
"build": "webpack",
"build:dev": "npm run prebuild && webpack --mode development"
},
"dependencies": {
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1",
"assert": "^2.1.0",
"babel-loader": "^10.0.0",
"buffer": "^6.0.3",
"d3": "^7.9.0",
"jsdom": "^26.1.0",
"license-webpack-plugin": "^4.0.2",
"os-browserify": "^0.3.0",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"stream-browserify": "^3.0.0",
"stream-http": "^3.2.0",
"text-encoding": "^0.7.0",
"topojson-client": "^3.1.0",
"url": "^0.11.4",
"util": "^0.12.5",
"webpack": "^5.101.0",
"webpack-cli": "^6.0.1"
}
}

View file

@ -0,0 +1,20 @@
exports.TextEncoder = class TextEncoder {
encode(str) {
const arr = new Uint8Array(str.length);
for (let i = 0; i < str.length; i++) {
arr[i] = str.charCodeAt(i);
}
return arr;
}
};
exports.TextDecoder = class TextDecoder {
decode(arr) {
let str = '';
for (let i = 0; i < arr.length; i++) {
str += String.fromCharCode(arr[i]);
}
return str;
}
};

View file

@ -0,0 +1,72 @@
import { JSDOM } from "jsdom";
import * as d3 from "d3";
import * as topojson from "topojson-client";
export function runTest(airportsData, usData) {
const airports = d3.csvParse(airportsData, d3.autoType);
// Setup jsdom
const dom = new JSDOM(`<!DOCTYPE html><body></body>`);
const document = dom.window.document;
const body = d3.select(document.body);
const width = 975;
const height = 610;
const svg = body.append("svg")
.attr("width", width)
.attr("height", height)
.attr("viewBox", [0, 0, 975, 610])
.attr("style", "width: 100%; height: auto; height: intrinsic;");
const path = d3.geoPath();
const states = topojson.feature(usData, usData.objects.states);
svg.append("path")
.datum(topojson.mesh(usData, usData.objects.states, (a, b) => a !== b))
.attr("fill", "none")
.attr("stroke", "currentColor")
.attr("stroke-linejoin", "round")
.attr("d", path);
const delaunay = d3.Delaunay.from(airports, d => d.longitude, d => d.latitude);
const voronoi = delaunay.voronoi([0, 0, width, height]);
svg.append("g")
.attr("fill", "none")
.attr("stroke", "currentColor")
.attr("stroke-opacity", 0.2)
.selectAll("path")
.data(airports)
.join("path")
.attr("d", (d, i) => voronoi.renderCell(i))
.append("title")
.text(d => `${d.name}
${d.city}, ${d.state}`);
svg.append("path")
.datum(states)
.attr("fill", "none")
.attr("d", path);
svg.append("g")
.attr("font-family", "sans-serif")
.attr("font-size", 10)
.attr("text-anchor", "middle")
.selectAll("text")
.data(airports)
.join("text")
.attr("transform", d => `translate(${d.longitude},${d.latitude})`)
.call(text => text.append("tspan")
.attr("y", "-0.7em")
.attr("font-weight", "bold")
.text(d => d.iata))
.call(text => text.append("tspan")
.attr("x", 0)
.attr("y", "0.7em")
.attr("fill-opacity", 0.7)
.text(d => d.name));
return body.html();
}

View file

@ -0,0 +1,102 @@
import path from "path";
import webpack from "webpack";
import TerserPlugin from "terser-webpack-plugin";
import UnicodeEscapePlugin from "@dapplets/unicode-escape-webpack-plugin";
import { LicenseWebpackPlugin } from "license-webpack-plugin";
import { fileURLToPath } from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function createConfig({ filename, minify }) {
return {
mode: "production",
devtool: "source-map",
target: "web",
entry: "./src/test.mjs",
output: {
path: path.resolve(__dirname, "dist"),
filename: filename,
library: {
name: "D3Test",
type: "globalThis",
},
libraryTarget: "assign",
},
plugins: [
new webpack.ProvidePlugin({
TextEncoder: [path.resolve(__dirname, "src/mock/text-encoding-mock.js"), "TextEncoder"],
TextDecoder: [path.resolve(__dirname, "src/mock/text-encoding-mock.js"), "TextDecoder"],
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
new webpack.BannerPlugin({
banner: `For license information, please see ${filename}.LICENSE.txt`,
}),
new UnicodeEscapePlugin({
test: /\.(js|jsx|ts|tsx)$/, // Escape Unicode in JavaScript and TypeScript files
}),
new LicenseWebpackPlugin({
perChunkOutput: true,
outputFilename: "LICENSE.txt",
}),
],
module: {
rules: [
{
test: /\.c?js$/,
exclude: path.resolve(__dirname, "src/data"),
use: {
loader: "babel-loader",
options: {
plugins: [ "../utils/BabelCacheBuster.mjs" ],
},
},
},
]
},
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
mangle: minify,
format: {
// Keep this comment for cache-busting.
comments: /ThouShaltNotCache/i,
},
},
}),
],
},
resolve: {
fallback: {
"assert": "assert/",
"buffer": "buffer/",
"canvas": false,
"child_process": false,
"crypto": false,
"fs": false,
"http": "stream-http",
"https": false,
"net": false,
"os": "os-browserify/browser",
"path": "path-browserify",
"stream": "stream-browserify",
"tls": false,
"url": "url/",
"util": "util/",
"vm": false,
"zlib": false,
},
},
performance: {
hints: false
},
};
};
export default [
createConfig({ filename: "bundle.min.js", minify: true }),
createConfig({ filename: "bundle.js", minify: false })
];

7
mobx/benchmark-node.mjs Normal file
View file

@ -0,0 +1,7 @@
import { runTest } from "./src/test.mjs";
const then = performance.now();
runTest();
const duration = performance.now() - then;
console.log(`Duration : ${duration.toFixed(2)}ms`);

52
mobx/benchmark.js Normal file
View file

@ -0,0 +1,52 @@
/*
* Copyright (C) 2025 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
const EXPECTED_LOG_LENGTH = 6824;
class Benchmark extends StartupBenchmark {
lastResult;
constructor(iterationCount) {
super({
iterationCount,
expectedCacheCommentCount: 464,
sourceCodeReuseCount: 8,
});
}
runIteration(iteration) {
// Module is loaded into PrismJSBenchmark
let MobXBenchmark;
eval(this.iterationSourceCodes[iteration]);
this.lastResult = MobXBenchmark.runTest();
}
validate() {
console.assert(
this.lastResult.length === EXPECTED_LOG_LENGTH,
`Expected this.lastResult.length to be ${EXPECTED_LOG_LENGTH}, but got ${this.lastResult.length}`
);
}
}

930
mobx/dist/bundle.es5.js vendored Normal file
View file

@ -0,0 +1,930 @@
!function(){var __webpack_require__={d:function(exports,definition){for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})}};__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=function(obj,prop){return Object.prototype.hasOwnProperty.call(obj,prop)},__webpack_require__.r=function(exports){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})};var __webpack_exports__={};!function(){"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{runTest:function(){return runTest}});function die(error){
/*ThouShaltNotCache*/
for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];throw new Error("number"==typeof error?"[MobX] minified error nr: "+error+(args.length?" "+args.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+error)}var mockGlobal={};function getGlobal(){
/*ThouShaltNotCache*/
return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:mockGlobal}var mobx_esm_assign=Object.assign,getDescriptor=Object.getOwnPropertyDescriptor,defineProperty=Object.defineProperty,objectPrototype=Object.prototype,EMPTY_ARRAY=[];Object.freeze(EMPTY_ARRAY);var EMPTY_OBJECT={};Object.freeze(EMPTY_OBJECT);var hasProxy="undefined"!=typeof Proxy,plainObjectString=Object.toString();function assertProxies(){
/*ThouShaltNotCache*/
hasProxy||die("Proxy not available")}function once(func){
/*ThouShaltNotCache*/
var invoked=!1;return function(){
/*ThouShaltNotCache*/
if(!invoked)return invoked=!0,func.apply(this,arguments)}}var noop=function(){};function isFunction(fn){
/*ThouShaltNotCache*/
return"function"==typeof fn}function isStringish(value){switch(typeof value){case"string":case"symbol":case"number":return!0}return!1}function isObject(value){
/*ThouShaltNotCache*/
return null!==value&&"object"==typeof value}function isPlainObject(value){
/*ThouShaltNotCache*/
if(!isObject(value))return!1;var proto=Object.getPrototypeOf(value);if(null==proto)return!0;var protoConstructor=Object.hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof protoConstructor&&protoConstructor.toString()===plainObjectString}function isGenerator(obj){
/*ThouShaltNotCache*/
var constructor=null==obj?void 0:obj.constructor;return!!constructor&&("GeneratorFunction"===constructor.name||"GeneratorFunction"===constructor.displayName)}function addHiddenProp(object,propName,value){
/*ThouShaltNotCache*/
defineProperty(object,propName,{enumerable:!1,writable:!0,configurable:!0,value:value})}function addHiddenFinalProp(object,propName,value){
/*ThouShaltNotCache*/
defineProperty(object,propName,{enumerable:!1,writable:!1,configurable:!0,value:value})}function createInstanceofPredicate(name,theClass){
/*ThouShaltNotCache*/
var propName="isMobX"+name;return theClass.prototype[propName]=!0,function(x){
/*ThouShaltNotCache*/
return isObject(x)&&!0===x[propName]}}function isES6Map(thing){
/*ThouShaltNotCache*/
return null!=thing&&"[object Map]"===Object.prototype.toString.call(thing)}function isES6Set(thing){
/*ThouShaltNotCache*/
return null!=thing&&"[object Set]"===Object.prototype.toString.call(thing)}var hasGetOwnPropertySymbols=void 0!==Object.getOwnPropertySymbols;var ownKeys="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:hasGetOwnPropertySymbols?function(obj){
/*ThouShaltNotCache*/
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj))}:Object.getOwnPropertyNames;function toPrimitive(value){
/*ThouShaltNotCache*/
return null===value?null:"object"==typeof value?""+value:value}function hasProp(target,prop){
/*ThouShaltNotCache*/
return objectPrototype.hasOwnProperty.call(target,prop)}var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(target){
/*ThouShaltNotCache*/
var res={};return ownKeys(target).forEach(function(key){
/*ThouShaltNotCache*/
res[key]=getDescriptor(target,key)}),res};function getFlag(flags,mask){
/*ThouShaltNotCache*/
return!!(flags&mask)}function setFlag(flags,mask,newValue){
/*ThouShaltNotCache*/
return newValue?flags|=mask:flags&=~mask,flags}function _arrayLikeToArray(r,a){
/*ThouShaltNotCache*/
(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _defineProperties(e,r){
/*ThouShaltNotCache*/
for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){
/*ThouShaltNotCache*/
return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _createForOfIteratorHelperLoose(r,e){
/*ThouShaltNotCache*/
var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,a){
/*ThouShaltNotCache*/
if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){
/*ThouShaltNotCache*/
return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _extends(){
/*ThouShaltNotCache*/
return _extends=Object.assign?Object.assign.bind():function(n){
/*ThouShaltNotCache*/
for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _inheritsLoose(t,o){
/*ThouShaltNotCache*/
t.prototype=Object.create(o.prototype),t.prototype.constructor=t,_setPrototypeOf(t,o)}function _setPrototypeOf(t,e){
/*ThouShaltNotCache*/
return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){
/*ThouShaltNotCache*/
return t.__proto__=e,t},_setPrototypeOf(t,e)}function _toPropertyKey(t){
/*ThouShaltNotCache*/
var i=function(t,r){
/*ThouShaltNotCache*/
if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}var storedAnnotationsSymbol=Symbol("mobx-stored-annotations");function createDecoratorAnnotation(annotation){return Object.assign(
/*ThouShaltNotCache*/
function(target,property){
/*ThouShaltNotCache*/
if(is20223Decorator(property))return annotation.decorate_20223_(target,property);storeAnnotation(target,property,annotation)},annotation)}function storeAnnotation(prototype,key,annotation){
/*ThouShaltNotCache*/
hasProp(prototype,storedAnnotationsSymbol)||addHiddenProp(prototype,storedAnnotationsSymbol,_extends({},prototype[storedAnnotationsSymbol])),function(annotation){
/*ThouShaltNotCache*/
return annotation.annotationType_===OVERRIDE}(annotation)||(prototype[storedAnnotationsSymbol][key]=annotation)}function is20223Decorator(context){
/*ThouShaltNotCache*/
return"object"==typeof context&&"string"==typeof context.kind}var $mobx=Symbol("mobx administration"),Atom=function(){
/*ThouShaltNotCache*/
function Atom(name_){
/*ThouShaltNotCache*/
void 0===name_&&(name_="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=name_}var _proto=Atom.prototype;return _proto.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.reportObserved=function(){
/*ThouShaltNotCache*/
return reportObserved(this)},_proto.reportChanged=function(){
/*ThouShaltNotCache*/
startBatch(),propagateChanged(this),endBatch()},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_},_createClass(Atom,[{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.isBeingObservedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.isBeingObservedMask_,newValue)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.isPendingUnobservationMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.isPendingUnobservationMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.diffValueMask_,1===newValue)}}])}();Atom.isBeingObservedMask_=1,Atom.isPendingUnobservationMask_=2,Atom.diffValueMask_=4;var isAtom=createInstanceofPredicate("Atom",Atom);function createAtom(name,onBecomeObservedHandler,onBecomeUnobservedHandler){
/*ThouShaltNotCache*/
void 0===onBecomeObservedHandler&&(onBecomeObservedHandler=noop),void 0===onBecomeUnobservedHandler&&(onBecomeUnobservedHandler=noop);var arg3,atom=new Atom(name);return onBecomeObservedHandler!==noop&&interceptHook(ON_BECOME_OBSERVED,atom,onBecomeObservedHandler,arg3),onBecomeUnobservedHandler!==noop&&onBecomeUnobserved(atom,onBecomeUnobservedHandler),atom}var comparer={identity:function(a,b){
/*ThouShaltNotCache*/
return a===b},structural:function(a,b){
/*ThouShaltNotCache*/
return deepEqual(a,b)},default:function(a,b){
/*ThouShaltNotCache*/
return Object.is?Object.is(a,b):a===b?0!==a||1/a==1/b:a!=a&&b!=b},shallow:function(a,b){
/*ThouShaltNotCache*/
return deepEqual(a,b,1)}};function deepEnhancer(v,_,name){
/*ThouShaltNotCache*/
return isObservable(v)?v:Array.isArray(v)?observable.array(v,{name:name}):isPlainObject(v)?observable.object(v,void 0,{name:name}):isES6Map(v)?observable.map(v,{name:name}):isES6Set(v)?observable.set(v,{name:name}):"function"!=typeof v||isAction(v)||isFlow(v)?v:isGenerator(v)?flow(v):autoAction(name,v)}function referenceEnhancer(newValue){
/*ThouShaltNotCache*/
return newValue}var OVERRIDE="override";function createActionAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$1,extend_:extend_$1,decorate_20223_:decorate_20223_$1}}function make_$1(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_;if(null!=(_this$options_=this.options_)&&_this$options_.bound)return null===this.extend_(adm,key,descriptor,!1)?0:1;if(source===adm.target_)return null===this.extend_(adm,key,descriptor,!1)?0:2;if(isAction(descriptor.value))return 1;var actionDescriptor=createActionDescriptor(adm,this,key,descriptor,!1);return defineProperty(source,key,actionDescriptor),2}function extend_$1(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var actionDescriptor=createActionDescriptor(adm,this,key,descriptor);return adm.defineProperty_(key,actionDescriptor,proxyTrap)}function decorate_20223_$1(mthd,context){var _this$options_2,kind=context.kind,name=context.name,addInitializer=context.addInitializer,ann=this,_createAction=function(m){
/*ThouShaltNotCache*/
var _ann$options_$name,_ann$options_,_ann$options_$autoAct,_ann$options_2;return createAction(null!=(_ann$options_$name=null==(_ann$options_=ann.options_)?void 0:_ann$options_.name)?_ann$options_$name:name.toString(),m,null!=(_ann$options_$autoAct=null==(_ann$options_2=ann.options_)?void 0:_ann$options_2.autoAction)&&_ann$options_$autoAct)};return"field"==kind?function(initMthd){
/*ThouShaltNotCache*/
var _ann$options_3,mthd=initMthd;return isAction(mthd)||(mthd=_createAction(mthd)),null!=(_ann$options_3=ann.options_)&&_ann$options_3.bound&&((mthd=mthd.bind(this)).isMobxAction=!0),mthd}:"method"==kind?(isAction(mthd)||(mthd=_createAction(mthd)),null!=(_this$options_2=this.options_)&&_this$options_2.bound&&addInitializer(function(){
/*ThouShaltNotCache*/
var bound=this[name].bind(this);bound.isMobxAction=!0,this[name]=bound}),mthd):void die("Cannot apply '"+ann.annotationType_+"' to '"+String(name)+"' (kind: "+kind+"):\n'"+ann.annotationType_+"' can only be used on properties with a function value.")}function createActionDescriptor(adm,annotation,key,descriptor,safeDescriptors){
/*ThouShaltNotCache*/
var _annotation$options_,_annotation$options_$,_annotation$options_2,_annotation$options_$2,_annotation$options_3,_annotation$options_4,_adm$proxy_2,_ref2;void 0===safeDescriptors&&(safeDescriptors=globalState.safeDescriptors),_ref2=descriptor,annotation.annotationType_,_ref2.value;var _adm$proxy_,value=descriptor.value;null!=(_annotation$options_=annotation.options_)&&_annotation$options_.bound&&(value=value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_));return{value:createAction(null!=(_annotation$options_$=null==(_annotation$options_2=annotation.options_)?void 0:_annotation$options_2.name)?_annotation$options_$:key.toString(),value,null!=(_annotation$options_$2=null==(_annotation$options_3=annotation.options_)?void 0:_annotation$options_3.autoAction)&&_annotation$options_$2,null!=(_annotation$options_4=annotation.options_)&&_annotation$options_4.bound?null!=(_adm$proxy_2=adm.proxy_)?_adm$proxy_2:adm.target_:void 0),configurable:!safeDescriptors||adm.isPlainObject_,enumerable:!1,writable:!safeDescriptors}}function createFlowAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$2,extend_:extend_$2,decorate_20223_:decorate_20223_$2}}function make_$2(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_;if(source===adm.target_)return null===this.extend_(adm,key,descriptor,!1)?0:2;if(null!=(_this$options_=this.options_)&&_this$options_.bound&&(!hasProp(adm.target_,key)||!isFlow(adm.target_[key]))&&null===this.extend_(adm,key,descriptor,!1))return 0;if(isFlow(descriptor.value))return 1;var flowDescriptor=createFlowDescriptor(adm,this,key,descriptor,!1,!1);return defineProperty(source,key,flowDescriptor),2}function extend_$2(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_2,flowDescriptor=createFlowDescriptor(adm,this,key,descriptor,null==(_this$options_2=this.options_)?void 0:_this$options_2.bound);return adm.defineProperty_(key,flowDescriptor,proxyTrap)}function decorate_20223_$2(mthd,context){
/*ThouShaltNotCache*/
var _this$options_3;var name=context.name,addInitializer=context.addInitializer;return isFlow(mthd)||(mthd=flow(mthd)),null!=(_this$options_3=this.options_)&&_this$options_3.bound&&addInitializer(function(){
/*ThouShaltNotCache*/
var bound=this[name].bind(this);bound.isMobXFlow=!0,this[name]=bound}),mthd}function createFlowDescriptor(adm,annotation,key,descriptor,bound,safeDescriptors){var _ref2;
/*ThouShaltNotCache*/
void 0===safeDescriptors&&(safeDescriptors=globalState.safeDescriptors),_ref2=descriptor,annotation.annotationType_,_ref2.value;var _adm$proxy_,value=descriptor.value;(isFlow(value)||(value=flow(value)),bound)&&((value=value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_)).isMobXFlow=!0);return{value:value,configurable:!safeDescriptors||adm.isPlainObject_,enumerable:!1,writable:!safeDescriptors}}function createComputedAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$3,extend_:extend_$3,decorate_20223_:decorate_20223_$3}}function make_$3(adm,key,descriptor){
/*ThouShaltNotCache*/
return null===this.extend_(adm,key,descriptor,!1)?0:1}function extend_$3(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
return function(adm,_ref,key,_ref2){
/*ThouShaltNotCache*/
_ref.annotationType_,_ref2.get;0}(0,this,0,descriptor),adm.defineComputedProperty_(key,_extends({},this.options_,{get:descriptor.get,set:descriptor.set}),proxyTrap)}function decorate_20223_$3(get,context){var ann=this,key=context.name;return(0,context.addInitializer)(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(this)[$mobx],options=_extends({},ann.options_,{get:get,context:this});options.name||(options.name="ObservableObject."+key.toString()),adm.values_.set(key,new ComputedValue(options))}),function(){
/*ThouShaltNotCache*/
return this[$mobx].getObservablePropValue_(key)}}function createObservableAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$4,extend_:extend_$4,decorate_20223_:decorate_20223_$4}}function make_$4(adm,key,descriptor){
/*ThouShaltNotCache*/
return null===this.extend_(adm,key,descriptor,!1)?0:1}function extend_$4(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_$enhanc,_this$options_;return function(adm,_ref){
/*ThouShaltNotCache*/
_ref.annotationType_;0}(0,this),adm.defineObservableProperty_(key,descriptor.value,null!=(_this$options_$enhanc=null==(_this$options_=this.options_)?void 0:_this$options_.enhancer)?_this$options_$enhanc:deepEnhancer,proxyTrap)}function decorate_20223_$4(desc,context){var ann=this,kind=context.kind,name=context.name,initializedObjects=new WeakSet;function initializeObservable(target,value){
/*ThouShaltNotCache*/
var _ann$options_$enhance,_ann$options_,adm=asObservableObject(target)[$mobx],observable=new ObservableValue(value,null!=(_ann$options_$enhance=null==(_ann$options_=ann.options_)?void 0:_ann$options_.enhancer)?_ann$options_$enhance:deepEnhancer,"ObservableObject."+name.toString(),!1);adm.values_.set(name,observable),initializedObjects.add(target)}if("accessor"==kind)return{get:function(){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,desc.get.call(this)),this[$mobx].getObservablePropValue_(name)},set:function(value){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,value),this[$mobx].setObservablePropValue_(name,value)},init:function(value){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,value),value}}}var AUTO="true",autoAnnotation=createAutoAnnotation();function createAutoAnnotation(options){
/*ThouShaltNotCache*/
return{annotationType_:AUTO,options_:options,make_:make_$5,extend_:extend_$5,decorate_20223_:decorate_20223_$5}}function make_$5(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_3,_this$options_4,_this$options_2,_this$options_;if(descriptor.get)return computed.make_(adm,key,descriptor,source);if(descriptor.set){var set=createAction(key.toString(),descriptor.set);return source===adm.target_?null===adm.defineProperty_(key,{configurable:!globalState.safeDescriptors||adm.isPlainObject_,set:set})?0:2:(defineProperty(source,key,{configurable:!0,set:set}),2)}if(source!==adm.target_&&"function"==typeof descriptor.value)return isGenerator(descriptor.value)?(null!=(_this$options_=this.options_)&&_this$options_.autoBind?flow.bound:flow).make_(adm,key,descriptor,source):(null!=(_this$options_2=this.options_)&&_this$options_2.autoBind?autoAction.bound:autoAction).make_(adm,key,descriptor,source);var _adm$proxy_,observableAnnotation=!1===(null==(_this$options_3=this.options_)?void 0:_this$options_3.deep)?observable.ref:observable;"function"==typeof descriptor.value&&null!=(_this$options_4=this.options_)&&_this$options_4.autoBind&&(descriptor.value=descriptor.value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_));return observableAnnotation.make_(adm,key,descriptor,source)}function extend_$5(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_5,_this$options_6,_adm$proxy_2;if(descriptor.get)return computed.extend_(adm,key,descriptor,proxyTrap);if(descriptor.set)return adm.defineProperty_(key,{configurable:!globalState.safeDescriptors||adm.isPlainObject_,set:createAction(key.toString(),descriptor.set)},proxyTrap);"function"==typeof descriptor.value&&null!=(_this$options_5=this.options_)&&_this$options_5.autoBind&&(descriptor.value=descriptor.value.bind(null!=(_adm$proxy_2=adm.proxy_)?_adm$proxy_2:adm.target_));return(!1===(null==(_this$options_6=this.options_)?void 0:_this$options_6.deep)?observable.ref:observable).extend_(adm,key,descriptor,proxyTrap)}function decorate_20223_$5(desc,context){
/*ThouShaltNotCache*/
die("'"+this.annotationType_+"' cannot be used as a decorator")}var defaultCreateObservableOptions={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function asCreateObservableOptions(thing){
/*ThouShaltNotCache*/
return thing||defaultCreateObservableOptions}Object.freeze(defaultCreateObservableOptions);var observableAnnotation=createObservableAnnotation("observable"),observableRefAnnotation=createObservableAnnotation("observable.ref",{enhancer:referenceEnhancer}),observableShallowAnnotation=createObservableAnnotation("observable.shallow",{enhancer:function(v,_,name){
/*ThouShaltNotCache*/
return null==v||isObservableObject(v)||isObservableArray(v)||isObservableMap(v)||isObservableSet(v)?v:Array.isArray(v)?observable.array(v,{name:name,deep:!1}):isPlainObject(v)?observable.object(v,void 0,{name:name,deep:!1}):isES6Map(v)?observable.map(v,{name:name,deep:!1}):isES6Set(v)?observable.set(v,{name:name,deep:!1}):void 0}}),observableStructAnnotation=createObservableAnnotation("observable.struct",{enhancer:function(v,oldValue){return deepEqual(v,oldValue)?oldValue:v}}),observableDecoratorAnnotation=createDecoratorAnnotation(observableAnnotation);function getEnhancerFromOptions(options){
/*ThouShaltNotCache*/
return!0===options.deep?deepEnhancer:!1===options.deep?referenceEnhancer:(annotation=options.defaultDecorator)&&null!=(_annotation$options_$=null==(_annotation$options_=annotation.options_)?void 0:_annotation$options_.enhancer)?_annotation$options_$:deepEnhancer;var annotation,_annotation$options_$,_annotation$options_}function createObservable(v,arg2,arg3){
/*ThouShaltNotCache*/
return is20223Decorator(arg2)?observableAnnotation.decorate_20223_(v,arg2):isStringish(arg2)?void storeAnnotation(v,arg2,observableAnnotation):isObservable(v)?v:isPlainObject(v)?observable.object(v,arg2,arg3):Array.isArray(v)?observable.array(v,arg2):isES6Map(v)?observable.map(v,arg2):isES6Set(v)?observable.set(v,arg2):"object"==typeof v&&null!==v?v:observable.box(v,arg2)}mobx_esm_assign(createObservable,observableDecoratorAnnotation);var _getDescriptor$config,_getDescriptor,observable=mobx_esm_assign(createObservable,{box:function(value,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableValue(value,getEnhancerFromOptions(o),o.name,!0,o.equals)},array:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return(!1===globalState.useProxies||!1===o.proxy?createLegacyArray:createObservableArray)(initialValues,getEnhancerFromOptions(o),o.name)},map:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableMap(initialValues,getEnhancerFromOptions(o),o.name)},set:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableSet(initialValues,getEnhancerFromOptions(o),o.name)},object:function(props,decorators,options){
/*ThouShaltNotCache*/
return initObservable(function(){
/*ThouShaltNotCache*/
return extendObservable(!1===globalState.useProxies||!1===(null==options?void 0:options.proxy)?asObservableObject({},options):function(target,options){
/*ThouShaltNotCache*/
var _target$$mobx,_target$$mobx$proxy_;return assertProxies(),target=asObservableObject(target,options),null!=(_target$$mobx$proxy_=(_target$$mobx=target[$mobx]).proxy_)?_target$$mobx$proxy_:_target$$mobx.proxy_=new Proxy(target,objectProxyTraps)}({},options),props,decorators)})},ref:createDecoratorAnnotation(observableRefAnnotation),shallow:createDecoratorAnnotation(observableShallowAnnotation),deep:observableDecoratorAnnotation,struct:createDecoratorAnnotation(observableStructAnnotation)}),computedAnnotation=createComputedAnnotation("computed"),computedStructAnnotation=createComputedAnnotation("computed.struct",{equals:comparer.structural}),computed=function(arg1,arg2){
/*ThouShaltNotCache*/
if(is20223Decorator(arg2))return computedAnnotation.decorate_20223_(arg1,arg2);if(isStringish(arg2))return storeAnnotation(arg1,arg2,computedAnnotation);if(isPlainObject(arg1))return createDecoratorAnnotation(createComputedAnnotation("computed",arg1));var opts=isPlainObject(arg2)?arg2:{};return opts.get=arg1,opts.name||(opts.name=arg1.name||""),new ComputedValue(opts)};Object.assign(computed,computedAnnotation),computed.struct=createDecoratorAnnotation(computedStructAnnotation);var currentActionId=0,nextActionId=1,isFunctionNameConfigurable=null!=(_getDescriptor$config=null==(_getDescriptor=getDescriptor(function(){},"name"))?void 0:_getDescriptor.configurable)&&_getDescriptor$config,tmpNameDescriptor={value:"action",configurable:!0,writable:!1,enumerable:!1};function createAction(actionName,fn,autoAction,ref){function res(){
/*ThouShaltNotCache*/
return executeAction(actionName,autoAction,fn,ref||this,arguments)}
/*ThouShaltNotCache*/
return void 0===autoAction&&(autoAction=!1),res.isMobxAction=!0,res.toString=function(){
/*ThouShaltNotCache*/
return fn.toString()},isFunctionNameConfigurable&&(tmpNameDescriptor.value=actionName,defineProperty(res,"name",tmpNameDescriptor)),res}function executeAction(actionName,canRunAsDerivation,fn,scope,args){
/*ThouShaltNotCache*/
var runInfo=function(actionName,canRunAsDerivation){
/*ThouShaltNotCache*/
var notifySpy_=!1,startTime_=0;0;var prevDerivation_=globalState.trackingDerivation,runAsAction=!canRunAsDerivation||!prevDerivation_;startBatch();var prevAllowStateChanges_=globalState.allowStateChanges;runAsAction&&(untrackedStart(),prevAllowStateChanges_=allowStateChangesStart(!0));var prevAllowStateReads_=allowStateReadsStart(!0),runInfo={runAsAction_:runAsAction,prevDerivation_:prevDerivation_,prevAllowStateChanges_:prevAllowStateChanges_,prevAllowStateReads_:prevAllowStateReads_,notifySpy_:notifySpy_,startTime_:startTime_,actionId_:nextActionId++,parentActionId_:currentActionId};return currentActionId=runInfo.actionId_,runInfo}(0,canRunAsDerivation);try{return fn.apply(scope,args)}catch(err){throw runInfo.error_=err,err}finally{!function(runInfo){
/*ThouShaltNotCache*/
currentActionId!==runInfo.actionId_&&die(30);currentActionId=runInfo.parentActionId_,void 0!==runInfo.error_&&(globalState.suppressReactionErrors=!0);allowStateChangesEnd(runInfo.prevAllowStateChanges_),allowStateReadsEnd(runInfo.prevAllowStateReads_),endBatch(),runInfo.runAsAction_&&untrackedEnd(runInfo.prevDerivation_);0;globalState.suppressReactionErrors=!1}(runInfo)}}function allowStateChanges(allowStateChanges,func){
/*ThouShaltNotCache*/
var prev=allowStateChangesStart(allowStateChanges);try{return func()}finally{allowStateChangesEnd(prev)}}function allowStateChangesStart(allowStateChanges){
/*ThouShaltNotCache*/
var prev=globalState.allowStateChanges;return globalState.allowStateChanges=allowStateChanges,prev}function allowStateChangesEnd(prev){
/*ThouShaltNotCache*/
globalState.allowStateChanges=prev}var ObservableValue=function(_Atom){
/*ThouShaltNotCache*/
function ObservableValue(value,enhancer,name_,notifySpy,equals){
/*ThouShaltNotCache*/
var _this;return void 0===name_&&(name_="ObservableValue"),void 0===notifySpy&&(notifySpy=!0),void 0===equals&&(equals=comparer.default),(_this=_Atom.call(this,name_)||this).enhancer=void 0,_this.name_=void 0,_this.equals=void 0,_this.hasUnreportedChange_=!1,_this.interceptors_=void 0,_this.changeListeners_=void 0,_this.value_=void 0,_this.dehancer=void 0,_this.enhancer=enhancer,_this.name_=name_,_this.equals=equals,_this.value_=enhancer(value,void 0,name_),_this}_inheritsLoose(ObservableValue,_Atom);var _proto=ObservableValue.prototype;return _proto.dehanceValue=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.set=function(newValue){
/*ThouShaltNotCache*/
this.value_;if((newValue=this.prepareNewValue_(newValue))!==globalState.UNCHANGED){0,this.setNewValue_(newValue)}},_proto.prepareNewValue_=function(newValue){if(
/*ThouShaltNotCache*/
checkIfStateModificationsAreAllowed(this),hasInterceptors(this)){var change=interceptChange(this,{object:this,type:UPDATE,newValue:newValue});if(!change)return globalState.UNCHANGED;newValue=change.newValue}return newValue=this.enhancer(newValue,this.value_,this.name_),this.equals(this.value_,newValue)?globalState.UNCHANGED:newValue},_proto.setNewValue_=function(newValue){
/*ThouShaltNotCache*/
var oldValue=this.value_;this.value_=newValue,this.reportChanged(),hasListeners(this)&&notifyListeners(this,{type:UPDATE,object:this,newValue:newValue,oldValue:oldValue})},_proto.get=function(){
/*ThouShaltNotCache*/
return this.reportObserved(),this.dehanceValue(this.value_)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
return fireImmediately&&listener({observableKind:"value",debugObjectName:this.name_,object:this,type:UPDATE,newValue:this.value_,oldValue:void 0}),registerListener(this,listener)},_proto.raw=function(){
/*ThouShaltNotCache*/
return this.value_},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return this.get()},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.value_+"]"},_proto.valueOf=function(){
/*ThouShaltNotCache*/
return toPrimitive(this.get())},_proto[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},ObservableValue}(Atom),ComputedValue=function(){
/*ThouShaltNotCache*/
function ComputedValue(options){
/*ThouShaltNotCache*/
this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new CaughtException(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=TraceMode.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,options.get||die(31),this.derivation=options.get,this.name_=options.name||"ComputedValue",options.set&&(this.setter_=createAction("ComputedValue-setter",options.set)),this.equals_=options.equals||(options.compareStructural||options.struct?comparer.structural:comparer.default),this.scope_=options.context,this.requiresReaction_=options.requiresReaction,this.keepAlive_=!!options.keepAlive}var _proto=ComputedValue.prototype;return _proto.onBecomeStale_=function(){
/*ThouShaltNotCache*/
!function(observable){
/*ThouShaltNotCache*/
if(observable.lowestObserverState_!==IDerivationState_.UP_TO_DATE_)return;observable.lowestObserverState_=IDerivationState_.POSSIBLY_STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(d.dependenciesState_=IDerivationState_.POSSIBLY_STALE_,d.onBecomeStale_())})}(this)},_proto.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.get=function(){if(
/*ThouShaltNotCache*/
this.isComputing&&die(32,this.name_,this.derivation),0!==globalState.inBatch||0!==this.observers_.size||this.keepAlive_){if(reportObserved(this),shouldCompute(this)){var prevTrackingContext=globalState.trackingContext;this.keepAlive_&&!prevTrackingContext&&(globalState.trackingContext=this),this.trackAndCompute()&&function(observable){
/*ThouShaltNotCache*/
if(observable.lowestObserverState_===IDerivationState_.STALE_)return;observable.lowestObserverState_=IDerivationState_.STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.POSSIBLY_STALE_?d.dependenciesState_=IDerivationState_.STALE_:d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(observable.lowestObserverState_=IDerivationState_.UP_TO_DATE_)})}(this),globalState.trackingContext=prevTrackingContext}}else shouldCompute(this)&&(this.warnAboutUntrackedRead_(),startBatch(),this.value_=this.computeValue_(!1),endBatch());var result=this.value_;if(isCaughtException(result))throw result.cause;return result},_proto.set=function(value){
/*ThouShaltNotCache*/
if(this.setter_){this.isRunningSetter&&die(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,value)}finally{this.isRunningSetter=!1}}else die(34,this.name_)},_proto.trackAndCompute=function(){
/*ThouShaltNotCache*/
var oldValue=this.value_,wasSuspended=this.dependenciesState_===IDerivationState_.NOT_TRACKING_,newValue=this.computeValue_(!0),changed=wasSuspended||isCaughtException(oldValue)||isCaughtException(newValue)||!this.equals_(oldValue,newValue);return changed&&(this.value_=newValue),changed},_proto.computeValue_=function(track){
/*ThouShaltNotCache*/
this.isComputing=!0;var res,prev=allowStateChangesStart(!1);if(track)res=trackDerivedFunction(this,this.derivation,this.scope_);else if(!0===globalState.disableErrorBoundaries)res=this.derivation.call(this.scope_);else try{res=this.derivation.call(this.scope_)}catch(e){res=new CaughtException(e)}return allowStateChangesEnd(prev),this.isComputing=!1,res},_proto.suspend_=function(){
/*ThouShaltNotCache*/
this.keepAlive_||(clearObserving(this),this.value_=void 0)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
var _this=this,firstTime=!0,prevValue=void 0;return autorun(function(){
/*ThouShaltNotCache*/
var newValue=_this.get();if(!firstTime||fireImmediately){var prevU=untrackedStart();listener({observableKind:"computed",debugObjectName:_this.name_,type:UPDATE,object:_this,newValue:newValue,oldValue:prevValue}),untrackedEnd(prevU)}firstTime=!1,prevValue=newValue})},_proto.warnAboutUntrackedRead_=function(){},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.derivation.toString()+"]"},_proto.valueOf=function(){
/*ThouShaltNotCache*/
return toPrimitive(this.get())},_proto[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},_createClass(ComputedValue,[{key:"isComputing",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isComputingMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isComputingMask_,newValue)}},{key:"isRunningSetter",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isRunningSetterMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isRunningSetterMask_,newValue)}},{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isBeingObservedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isBeingObservedMask_,newValue)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isPendingUnobservationMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isPendingUnobservationMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.diffValueMask_,1===newValue)}}])}();ComputedValue.isComputingMask_=1,ComputedValue.isRunningSetterMask_=2,ComputedValue.isBeingObservedMask_=4,ComputedValue.isPendingUnobservationMask_=8,ComputedValue.diffValueMask_=16;var IDerivationState_,TraceMode,isComputedValue=createInstanceofPredicate("ComputedValue",ComputedValue);!function(IDerivationState_){
/*ThouShaltNotCache*/
IDerivationState_[IDerivationState_.NOT_TRACKING_=-1]="NOT_TRACKING_",IDerivationState_[IDerivationState_.UP_TO_DATE_=0]="UP_TO_DATE_",IDerivationState_[IDerivationState_.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",IDerivationState_[IDerivationState_.STALE_=2]="STALE_"}(IDerivationState_||(IDerivationState_={})),function(TraceMode){
/*ThouShaltNotCache*/
TraceMode[TraceMode.NONE=0]="NONE",TraceMode[TraceMode.LOG=1]="LOG",TraceMode[TraceMode.BREAK=2]="BREAK"}(TraceMode||(TraceMode={}));var CaughtException=function(cause){
/*ThouShaltNotCache*/
this.cause=void 0,this.cause=cause};function isCaughtException(e){
/*ThouShaltNotCache*/
return e instanceof CaughtException}function shouldCompute(derivation){
/*ThouShaltNotCache*/
switch(derivation.dependenciesState_){case IDerivationState_.UP_TO_DATE_:return!1;case IDerivationState_.NOT_TRACKING_:case IDerivationState_.STALE_:return!0;case IDerivationState_.POSSIBLY_STALE_:for(var prevAllowStateReads=allowStateReadsStart(!0),prevUntracked=untrackedStart(),obs=derivation.observing_,l=obs.length,i=0;i<l;i++){var obj=obs[i];if(isComputedValue(obj)){if(globalState.disableErrorBoundaries)obj.get();else try{obj.get()}catch(e){return untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!0}if(derivation.dependenciesState_===IDerivationState_.STALE_)return untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!0}}return changeDependenciesStateTo0(derivation),untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!1}}function checkIfStateModificationsAreAllowed(atom){}function trackDerivedFunction(derivation,f,context){
/*ThouShaltNotCache*/
var prevAllowStateReads=allowStateReadsStart(!0);changeDependenciesStateTo0(derivation),derivation.newObserving_=new Array(0===derivation.runId_?100:derivation.observing_.length),derivation.unboundDepsCount_=0,derivation.runId_=++globalState.runId;var result,prevTracking=globalState.trackingDerivation;if(globalState.trackingDerivation=derivation,globalState.inBatch++,!0===globalState.disableErrorBoundaries)result=f.call(context);else try{result=f.call(context)}catch(e){result=new CaughtException(e)}return globalState.inBatch--,globalState.trackingDerivation=prevTracking,function(derivation){for(
/*ThouShaltNotCache*/
var prevObserving=derivation.observing_,observing=derivation.observing_=derivation.newObserving_,lowestNewObservingDerivationState=IDerivationState_.UP_TO_DATE_,i0=0,l=derivation.unboundDepsCount_,i=0;i<l;i++){var dep=observing[i];0===dep.diffValue&&(dep.diffValue=1,i0!==i&&(observing[i0]=dep),i0++),dep.dependenciesState_>lowestNewObservingDerivationState&&(lowestNewObservingDerivationState=dep.dependenciesState_)}observing.length=i0,derivation.newObserving_=null,l=prevObserving.length;for(;l--;){var _dep=prevObserving[l];0===_dep.diffValue&&removeObserver(_dep,derivation),_dep.diffValue=0}for(;i0--;){var _dep2=observing[i0];1===_dep2.diffValue&&(_dep2.diffValue=0,addObserver(_dep2,derivation))}lowestNewObservingDerivationState!==IDerivationState_.UP_TO_DATE_&&(derivation.dependenciesState_=lowestNewObservingDerivationState,derivation.onBecomeStale_())}(derivation),allowStateReadsEnd(prevAllowStateReads),result}function clearObserving(derivation){
/*ThouShaltNotCache*/
var obs=derivation.observing_;derivation.observing_=[];for(var i=obs.length;i--;)removeObserver(obs[i],derivation);derivation.dependenciesState_=IDerivationState_.NOT_TRACKING_}function untracked(action){
/*ThouShaltNotCache*/
var prev=untrackedStart();try{return action()}finally{untrackedEnd(prev)}}function untrackedStart(){
/*ThouShaltNotCache*/
var prev=globalState.trackingDerivation;return globalState.trackingDerivation=null,prev}function untrackedEnd(prev){
/*ThouShaltNotCache*/
globalState.trackingDerivation=prev}function allowStateReadsStart(allowStateReads){
/*ThouShaltNotCache*/
var prev=globalState.allowStateReads;return globalState.allowStateReads=allowStateReads,prev}function allowStateReadsEnd(prev){
/*ThouShaltNotCache*/
globalState.allowStateReads=prev}function changeDependenciesStateTo0(derivation){
/*ThouShaltNotCache*/
if(derivation.dependenciesState_!==IDerivationState_.UP_TO_DATE_){derivation.dependenciesState_=IDerivationState_.UP_TO_DATE_;for(var obs=derivation.observing_,i=obs.length;i--;)obs[i].lowestObserverState_=IDerivationState_.UP_TO_DATE_}}var MobXGlobals=function(){
/*ThouShaltNotCache*/
this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},canMergeGlobalState=!0,isolateCalled=!1,globalState=function(){
/*ThouShaltNotCache*/
var global=getGlobal();return global.__mobxInstanceCount>0&&!global.__mobxGlobals&&(canMergeGlobalState=!1),global.__mobxGlobals&&global.__mobxGlobals.version!==(new MobXGlobals).version&&(canMergeGlobalState=!1),canMergeGlobalState?global.__mobxGlobals?(global.__mobxInstanceCount+=1,global.__mobxGlobals.UNCHANGED||(global.__mobxGlobals.UNCHANGED={}),global.__mobxGlobals):(global.__mobxInstanceCount=1,global.__mobxGlobals=new MobXGlobals):(setTimeout(function(){
/*ThouShaltNotCache*/
isolateCalled||die(35)},1),new MobXGlobals)}();function addObserver(observable,node){
/*ThouShaltNotCache*/
observable.observers_.add(node),observable.lowestObserverState_>node.dependenciesState_&&(observable.lowestObserverState_=node.dependenciesState_)}function removeObserver(observable,node){
/*ThouShaltNotCache*/
observable.observers_.delete(node),0===observable.observers_.size&&queueForUnobservation(observable)}function queueForUnobservation(observable){
/*ThouShaltNotCache*/
!1===observable.isPendingUnobservation&&(observable.isPendingUnobservation=!0,globalState.pendingUnobservations.push(observable))}function startBatch(){
/*ThouShaltNotCache*/
globalState.inBatch++}function endBatch(){
/*ThouShaltNotCache*/
if(0===--globalState.inBatch){runReactions();for(var list=globalState.pendingUnobservations,i=0;i<list.length;i++){var observable=list[i];observable.isPendingUnobservation=!1,0===observable.observers_.size&&(observable.isBeingObserved&&(observable.isBeingObserved=!1,observable.onBUO()),observable instanceof ComputedValue&&observable.suspend_())}globalState.pendingUnobservations=[]}}function reportObserved(observable){var derivation=globalState.trackingDerivation;return null!==derivation?(derivation.runId_!==observable.lastAccessedBy_&&(observable.lastAccessedBy_=derivation.runId_,derivation.newObserving_[derivation.unboundDepsCount_++]=observable,!observable.isBeingObserved&&globalState.trackingContext&&(observable.isBeingObserved=!0,observable.onBO())),observable.isBeingObserved):(0===observable.observers_.size&&globalState.inBatch>0&&queueForUnobservation(observable),!1)}function propagateChanged(observable){
/*ThouShaltNotCache*/
observable.lowestObserverState_!==IDerivationState_.STALE_&&(observable.lowestObserverState_=IDerivationState_.STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&d.onBecomeStale_(),d.dependenciesState_=IDerivationState_.STALE_}))}var Reaction=function(){
/*ThouShaltNotCache*/
function Reaction(name_,onInvalidate_,errorHandler_,requiresObservable_){
/*ThouShaltNotCache*/
void 0===name_&&(name_="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=TraceMode.NONE,this.name_=name_,this.onInvalidate_=onInvalidate_,this.errorHandler_=errorHandler_,this.requiresObservable_=requiresObservable_}var _proto=Reaction.prototype;return _proto.onBecomeStale_=function(){
/*ThouShaltNotCache*/
this.schedule_()},_proto.schedule_=function(){
/*ThouShaltNotCache*/
this.isScheduled||(this.isScheduled=!0,globalState.pendingReactions.push(this),runReactions())},_proto.runReaction_=function(){
/*ThouShaltNotCache*/
if(!this.isDisposed){startBatch(),this.isScheduled=!1;var prev=globalState.trackingContext;if(globalState.trackingContext=this,shouldCompute(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}globalState.trackingContext=prev,endBatch()}},_proto.track=function(fn){
/*ThouShaltNotCache*/
if(!this.isDisposed){startBatch();0,this.isRunning=!0;var prevReaction=globalState.trackingContext;globalState.trackingContext=this;var result=trackDerivedFunction(this,fn,void 0);globalState.trackingContext=prevReaction,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&clearObserving(this),isCaughtException(result)&&this.reportExceptionInDerivation_(result.cause),endBatch()}},_proto.reportExceptionInDerivation_=function(error){
/*ThouShaltNotCache*/
var _this=this;if(this.errorHandler_)this.errorHandler_(error,this);else{if(globalState.disableErrorBoundaries)throw error;var message="[mobx] uncaught error in '"+this+"'";globalState.suppressReactionErrors||console.error(message,error),globalState.globalReactionErrorHandlers.forEach(function(f){
/*ThouShaltNotCache*/
return f(error,_this)})}},_proto.dispose=function(){
/*ThouShaltNotCache*/
this.isDisposed||(this.isDisposed=!0,this.isRunning||(startBatch(),clearObserving(this),endBatch()))},_proto.getDisposer_=function(abortSignal){
/*ThouShaltNotCache*/
var _this2=this,dispose=function dispose(){
/*ThouShaltNotCache*/
_this2.dispose(),null==abortSignal||null==abortSignal.removeEventListener||abortSignal.removeEventListener("abort",dispose)};return null==abortSignal||null==abortSignal.addEventListener||abortSignal.addEventListener("abort",dispose),dispose[$mobx]=this,dispose},_proto.toString=function(){
/*ThouShaltNotCache*/
return"Reaction["+this.name_+"]"},_proto.trace=function(enterBreakPoint){
/*ThouShaltNotCache*/
void 0===enterBreakPoint&&(enterBreakPoint=!1)},_createClass(Reaction,[{key:"isDisposed",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isDisposedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isDisposedMask_,newValue)}},{key:"isScheduled",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isScheduledMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isScheduledMask_,newValue)}},{key:"isTrackPending",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isTrackPendingMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isTrackPendingMask_,newValue)}},{key:"isRunning",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isRunningMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isRunningMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.diffValueMask_,1===newValue)}}])}();Reaction.isDisposedMask_=1,Reaction.isScheduledMask_=2,Reaction.isTrackPendingMask_=4,Reaction.isRunningMask_=8,Reaction.diffValueMask_=16;var MAX_REACTION_ITERATIONS=100,reactionScheduler=function(f){
/*ThouShaltNotCache*/
return f()};function runReactions(){
/*ThouShaltNotCache*/
globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){
/*ThouShaltNotCache*/
globalState.isRunningReactions=!0;for(var allReactions=globalState.pendingReactions,iterations=0;allReactions.length>0;){++iterations===MAX_REACTION_ITERATIONS&&(console.error("[mobx] cycle in reaction: "+allReactions[0]),allReactions.splice(0));for(var remainingReactions=allReactions.splice(0),i=0,l=remainingReactions.length;i<l;i++)remainingReactions[i].runReaction_()}globalState.isRunningReactions=!1}var isReaction=createInstanceofPredicate("Reaction",Reaction);var actionAnnotation=createActionAnnotation("action"),actionBoundAnnotation=createActionAnnotation("action.bound",{bound:!0}),autoActionAnnotation=createActionAnnotation("autoAction",{autoAction:!0}),autoActionBoundAnnotation=createActionAnnotation("autoAction.bound",{autoAction:!0,bound:!0});function createActionFactory(autoAction){return function(arg1,arg2){
/*ThouShaltNotCache*/
return isFunction(arg1)?createAction(arg1.name||"<unnamed action>",arg1,autoAction):isFunction(arg2)?createAction(arg1,arg2,autoAction):is20223Decorator(arg2)?(autoAction?autoActionAnnotation:actionAnnotation).decorate_20223_(arg1,arg2):isStringish(arg2)?storeAnnotation(arg1,arg2,autoAction?autoActionAnnotation:actionAnnotation):isStringish(arg1)?createDecoratorAnnotation(createActionAnnotation(autoAction?"autoAction":"action",{name:arg1,autoAction:autoAction})):void 0}}var action=createActionFactory(!1);Object.assign(action,actionAnnotation);var autoAction=createActionFactory(!0);function isAction(thing){
/*ThouShaltNotCache*/
return isFunction(thing)&&!0===thing.isMobxAction}function autorun(view,opts){
/*ThouShaltNotCache*/
var _opts$name,_opts,_opts2,_opts3;void 0===opts&&(opts=EMPTY_OBJECT);var reaction,name=null!=(_opts$name=null==(_opts=opts)?void 0:_opts.name)?_opts$name:"Autorun";if(!opts.scheduler&&!opts.delay)reaction=new Reaction(name,function(){
/*ThouShaltNotCache*/
this.track(reactionRunner)},opts.onError,opts.requiresObservable);else{var scheduler=createSchedulerFromOptions(opts),isScheduled=!1;reaction=new Reaction(name,function(){
/*ThouShaltNotCache*/
isScheduled||(isScheduled=!0,scheduler(function(){
/*ThouShaltNotCache*/
isScheduled=!1,reaction.isDisposed||reaction.track(reactionRunner)}))},opts.onError,opts.requiresObservable)}function reactionRunner(){
/*ThouShaltNotCache*/
view(reaction)}return null!=(_opts2=opts)&&null!=(_opts2=_opts2.signal)&&_opts2.aborted||reaction.schedule_(),reaction.getDisposer_(null==(_opts3=opts)?void 0:_opts3.signal)}Object.assign(autoAction,autoActionAnnotation),action.bound=createDecoratorAnnotation(actionBoundAnnotation),autoAction.bound=createDecoratorAnnotation(autoActionBoundAnnotation);var run=function(f){
/*ThouShaltNotCache*/
return f()};function createSchedulerFromOptions(opts){
/*ThouShaltNotCache*/
return opts.scheduler?opts.scheduler:opts.delay?function(f){
/*ThouShaltNotCache*/
return setTimeout(f,opts.delay)}:run}var ON_BECOME_OBSERVED="onBO",ON_BECOME_UNOBSERVED="onBUO";function onBecomeUnobserved(thing,arg2,arg3){
/*ThouShaltNotCache*/
return interceptHook(ON_BECOME_UNOBSERVED,thing,arg2,arg3)}function interceptHook(hook,thing,arg2,arg3){
/*ThouShaltNotCache*/
var atom="function"==typeof arg3?getAtom(thing,arg2):getAtom(thing),cb=isFunction(arg3)?arg3:arg2,listenersKey=hook+"L";return atom[listenersKey]?atom[listenersKey].add(cb):atom[listenersKey]=new Set([cb]),function(){
/*ThouShaltNotCache*/
var hookListeners=atom[listenersKey];hookListeners&&(hookListeners.delete(cb),0===hookListeners.size&&delete atom[listenersKey])}}function extendObservable(target,properties,annotations,options){var descriptors=getOwnPropertyDescriptors(properties);return initObservable(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(target,options)[$mobx];ownKeys(descriptors).forEach(function(key){
/*ThouShaltNotCache*/
adm.extend_(key,descriptors[key],!annotations||(!(key in annotations)||annotations[key]))})}),target}var generatorId=0;function FlowCancellationError(){
/*ThouShaltNotCache*/
this.message="FLOW_CANCELLED"}FlowCancellationError.prototype=Object.create(Error.prototype);var flowAnnotation=createFlowAnnotation("flow"),flowBoundAnnotation=createFlowAnnotation("flow.bound",{bound:!0}),flow=Object.assign(function(arg1,arg2){
/*ThouShaltNotCache*/
if(is20223Decorator(arg2))return flowAnnotation.decorate_20223_(arg1,arg2);if(isStringish(arg2))return storeAnnotation(arg1,arg2,flowAnnotation);var generator=arg1,name=generator.name||"<unnamed flow>",res=function(){
/*ThouShaltNotCache*/
var rejector,args=arguments,runId=++generatorId,gen=action(name+" - runid: "+runId+" - init",generator).apply(this,args),pendingPromise=void 0,promise=new Promise(function(resolve,reject){
/*ThouShaltNotCache*/
var stepId=0;function onFulfilled(res){var ret;
/*ThouShaltNotCache*/
pendingPromise=void 0;try{ret=action(name+" - runid: "+runId+" - yield "+stepId++,gen.next).call(gen,res)}catch(e){return reject(e)}next(ret)}function onRejected(err){var ret;
/*ThouShaltNotCache*/
pendingPromise=void 0;try{ret=action(name+" - runid: "+runId+" - yield "+stepId++,gen.throw).call(gen,err)}catch(e){return reject(e)}next(ret)}function next(ret){
/*ThouShaltNotCache*/
if(!isFunction(null==ret?void 0:ret.then))return ret.done?resolve(ret.value):(pendingPromise=Promise.resolve(ret.value)).then(onFulfilled,onRejected);ret.then(next,reject)}rejector=reject,onFulfilled(void 0)});return promise.cancel=action(name+" - runid: "+runId+" - cancel",function(){
/*ThouShaltNotCache*/
try{pendingPromise&&cancelPromise(pendingPromise);var _res=gen.return(void 0),yieldedPromise=Promise.resolve(_res.value);yieldedPromise.then(noop,noop),cancelPromise(yieldedPromise),rejector(new FlowCancellationError)}catch(e){rejector(e)}}),promise};return res.isMobXFlow=!0,res},flowAnnotation);function cancelPromise(promise){
/*ThouShaltNotCache*/
isFunction(promise.cancel)&&promise.cancel()}function isFlow(fn){
/*ThouShaltNotCache*/
return!0===(null==fn?void 0:fn.isMobXFlow)}function _isObservable(value,property){
/*ThouShaltNotCache*/
return!!value&&(void 0!==property?!!isObservableObject(value)&&value[$mobx].values_.has(property):isObservableObject(value)||!!value[$mobx]||isAtom(value)||isReaction(value)||isComputedValue(value))}function isObservable(value){return _isObservable(value)}function transaction(action,thisArg){
/*ThouShaltNotCache*/
void 0===thisArg&&(thisArg=void 0),startBatch();try{return action.apply(thisArg)}finally{endBatch()}}function getAdm(target){
/*ThouShaltNotCache*/
return target[$mobx]}flow.bound=createDecoratorAnnotation(flowBoundAnnotation);var objectProxyTraps={has:function(target,name){return getAdm(target).has_(name)},get:function(target,name){
/*ThouShaltNotCache*/
return getAdm(target).get_(name)},set:function(target,name,value){
/*ThouShaltNotCache*/
var _getAdm$set_;return!!isStringish(name)&&(null==(_getAdm$set_=getAdm(target).set_(name,value,!0))||_getAdm$set_)},deleteProperty:function(target,name){
/*ThouShaltNotCache*/
var _getAdm$delete_;return!!isStringish(name)&&(null==(_getAdm$delete_=getAdm(target).delete_(name,!0))||_getAdm$delete_)},defineProperty:function(target,name,descriptor){
/*ThouShaltNotCache*/
var _getAdm$definePropert;return null==(_getAdm$definePropert=getAdm(target).defineProperty_(name,descriptor))||_getAdm$definePropert},ownKeys:function(target){return getAdm(target).ownKeys_()},preventExtensions:function(target){
/*ThouShaltNotCache*/
die(13)}};function hasInterceptors(interceptable){
/*ThouShaltNotCache*/
return void 0!==interceptable.interceptors_&&interceptable.interceptors_.length>0}function registerInterceptor(interceptable,handler){
/*ThouShaltNotCache*/
var interceptors=interceptable.interceptors_||(interceptable.interceptors_=[]);return interceptors.push(handler),once(function(){
/*ThouShaltNotCache*/
var idx=interceptors.indexOf(handler);-1!==idx&&interceptors.splice(idx,1)})}function interceptChange(interceptable,change){
/*ThouShaltNotCache*/
var prevU=untrackedStart();try{for(var interceptors=[].concat(interceptable.interceptors_||[]),i=0,l=interceptors.length;i<l&&((change=interceptors[i](change))&&!change.type&&die(14),change);i++);return change}finally{untrackedEnd(prevU)}}function hasListeners(listenable){
/*ThouShaltNotCache*/
return void 0!==listenable.changeListeners_&&listenable.changeListeners_.length>0}function registerListener(listenable,handler){
/*ThouShaltNotCache*/
var listeners=listenable.changeListeners_||(listenable.changeListeners_=[]);return listeners.push(handler),once(function(){
/*ThouShaltNotCache*/
var idx=listeners.indexOf(handler);-1!==idx&&listeners.splice(idx,1)})}function notifyListeners(listenable,change){
/*ThouShaltNotCache*/
var prevU=untrackedStart(),listeners=listenable.changeListeners_;if(listeners){for(var i=0,l=(listeners=listeners.slice()).length;i<l;i++)listeners[i](change);untrackedEnd(prevU)}}function makeObservable(target,annotations,options){
/*ThouShaltNotCache*/
return initObservable(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(target,options)[$mobx];null!=annotations||(annotations=function(target){
/*ThouShaltNotCache*/
return hasProp(target,storedAnnotationsSymbol)||addHiddenProp(target,storedAnnotationsSymbol,_extends({},target[storedAnnotationsSymbol])),target[storedAnnotationsSymbol]}(target)),ownKeys(annotations).forEach(function(key){
/*ThouShaltNotCache*/
return adm.make_(key,annotations[key])})}),target}var UPDATE="update",arrayTraps={get:function(target,name){
/*ThouShaltNotCache*/
var adm=target[$mobx];return name===$mobx?adm:"length"===name?adm.getArrayLength_():"string"!=typeof name||isNaN(name)?hasProp(arrayExtensions,name)?arrayExtensions[name]:target[name]:adm.get_(parseInt(name))},set:function(target,name,value){
/*ThouShaltNotCache*/
var adm=target[$mobx];return"length"===name&&adm.setArrayLength_(value),"symbol"==typeof name||isNaN(name)?target[name]=value:adm.set_(parseInt(name),value),!0},preventExtensions:function(){
/*ThouShaltNotCache*/
die(15)}},ObservableArrayAdministration=function(){
/*ThouShaltNotCache*/
function ObservableArrayAdministration(name,enhancer,owned_,legacyMode_){
/*ThouShaltNotCache*/
void 0===name&&(name="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=owned_,this.legacyMode_=legacyMode_,this.atom_=new Atom(name),this.enhancer_=function(newV,oldV){
/*ThouShaltNotCache*/
return enhancer(newV,oldV,"ObservableArray[..]")}}var _proto=ObservableArrayAdministration.prototype;return _proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.dehanceValues_=function(values){
/*ThouShaltNotCache*/
return void 0!==this.dehancer&&values.length>0?values.map(this.dehancer):values},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
return void 0===fireImmediately&&(fireImmediately=!1),fireImmediately&&listener({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),registerListener(this,listener)},_proto.getArrayLength_=function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.values_.length},_proto.setArrayLength_=function(newLength){
/*ThouShaltNotCache*/
("number"!=typeof newLength||isNaN(newLength)||newLength<0)&&die("Out of range: "+newLength);var currentLength=this.values_.length;if(newLength!==currentLength)if(newLength>currentLength){for(var newItems=new Array(newLength-currentLength),i=0;i<newLength-currentLength;i++)newItems[i]=void 0;this.spliceWithArray_(currentLength,0,newItems)}else this.spliceWithArray_(newLength,currentLength-newLength)},_proto.updateArrayLength_=function(oldLength,delta){
/*ThouShaltNotCache*/
oldLength!==this.lastKnownLength_&&die(16),this.lastKnownLength_+=delta,this.legacyMode_&&delta>0&&reserveArrayBuffer(oldLength+delta+1)},_proto.spliceWithArray_=function(index,deleteCount,newItems){
/*ThouShaltNotCache*/
var _this=this;this.atom_;var length=this.values_.length;if(void 0===index?index=0:index>length?index=length:index<0&&(index=Math.max(0,length+index)),deleteCount=1===arguments.length?length-index:null==deleteCount?0:Math.max(0,Math.min(deleteCount,length-index)),void 0===newItems&&(newItems=EMPTY_ARRAY),hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_,type:"splice",index:index,removedCount:deleteCount,added:newItems});if(!change)return EMPTY_ARRAY;deleteCount=change.removedCount,newItems=change.added}if(newItems=0===newItems.length?newItems:newItems.map(function(v){
/*ThouShaltNotCache*/
return _this.enhancer_(v,void 0)}),this.legacyMode_){var lengthDelta=newItems.length-deleteCount;this.updateArrayLength_(length,lengthDelta)}var res=this.spliceItemsIntoValues_(index,deleteCount,newItems);return 0===deleteCount&&0===newItems.length||this.notifyArraySplice_(index,newItems,res),this.dehanceValues_(res)},_proto.spliceItemsIntoValues_=function(index,deleteCount,newItems){var _this$values_;
/*ThouShaltNotCache*/
if(newItems.length<1e4)return(_this$values_=this.values_).splice.apply(_this$values_,[index,deleteCount].concat(newItems));var res=this.values_.slice(index,index+deleteCount),oldItems=this.values_.slice(index+deleteCount);this.values_.length+=newItems.length-deleteCount;for(var i=0;i<newItems.length;i++)this.values_[index+i]=newItems[i];for(var _i=0;_i<oldItems.length;_i++)this.values_[index+newItems.length+_i]=oldItems[_i];return res},_proto.notifyArrayChildUpdate_=function(index,newValue,oldValue){
/*ThouShaltNotCache*/
var notifySpy=!this.owned_&&!1,notify=hasListeners(this),change=notify||notifySpy?{observableKind:"array",object:this.proxy_,type:UPDATE,debugObjectName:this.atom_.name_,index:index,newValue:newValue,oldValue:oldValue}:null;this.atom_.reportChanged(),notify&&notifyListeners(this,change)},_proto.notifyArraySplice_=function(index,added,removed){
/*ThouShaltNotCache*/
var notifySpy=!this.owned_&&!1,notify=hasListeners(this),change=notify||notifySpy?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:index,removed:removed,added:added,removedCount:removed.length,addedCount:added.length}:null;this.atom_.reportChanged(),notify&&notifyListeners(this,change)},_proto.get_=function(index){
/*ThouShaltNotCache*/
if(!(this.legacyMode_&&index>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[index]);console.warn("[mobx] Out of bounds read: "+index)},_proto.set_=function(index,newValue){
/*ThouShaltNotCache*/
var values=this.values_;if(this.legacyMode_&&index>values.length&&die(17,index,values.length),index<values.length){this.atom_;var oldValue=values[index];if(hasInterceptors(this)){var change=interceptChange(this,{type:UPDATE,object:this.proxy_,index:index,newValue:newValue});if(!change)return;newValue=change.newValue}(newValue=this.enhancer_(newValue,oldValue))!==oldValue&&(values[index]=newValue,this.notifyArrayChildUpdate_(index,newValue,oldValue))}else{for(var newItems=new Array(index+1-values.length),i=0;i<newItems.length-1;i++)newItems[i]=void 0;newItems[newItems.length-1]=newValue,this.spliceWithArray_(values.length,0,newItems)}},ObservableArrayAdministration}();function createObservableArray(initialValues,enhancer,name,owned){
/*ThouShaltNotCache*/
return void 0===name&&(name="ObservableArray"),void 0===owned&&(owned=!1),assertProxies(),initObservable(function(){
/*ThouShaltNotCache*/
var adm=new ObservableArrayAdministration(name,enhancer,owned,!1);addHiddenFinalProp(adm.values_,$mobx,adm);var proxy=new Proxy(adm.values_,arrayTraps);return adm.proxy_=proxy,initialValues&&initialValues.length&&adm.spliceWithArray_(0,0,initialValues),proxy})}var arrayExtensions={clear:function(){
/*ThouShaltNotCache*/
return this.splice(0)},replace:function(newItems){
/*ThouShaltNotCache*/
var adm=this[$mobx];return adm.spliceWithArray_(0,adm.values_.length,newItems)},toJSON:function(){
/*ThouShaltNotCache*/
return this.slice()},splice:function(index,deleteCount){
/*ThouShaltNotCache*/
for(var _len=arguments.length,newItems=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++)newItems[_key-2]=arguments[_key];var adm=this[$mobx];switch(arguments.length){case 0:return[];case 1:return adm.spliceWithArray_(index);case 2:return adm.spliceWithArray_(index,deleteCount)}return adm.spliceWithArray_(index,deleteCount,newItems)},spliceWithArray:function(index,deleteCount,newItems){
/*ThouShaltNotCache*/
return this[$mobx].spliceWithArray_(index,deleteCount,newItems)},push:function(){for(
/*ThouShaltNotCache*/
var adm=this[$mobx],_len2=arguments.length,items=new Array(_len2),_key2=0;_key2<_len2;_key2++)items[_key2]=arguments[_key2];return adm.spliceWithArray_(adm.values_.length,0,items),adm.values_.length},pop:function(){
/*ThouShaltNotCache*/
return this.splice(Math.max(this[$mobx].values_.length-1,0),1)[0]},shift:function(){
/*ThouShaltNotCache*/
return this.splice(0,1)[0]},unshift:function(){for(
/*ThouShaltNotCache*/
var adm=this[$mobx],_len3=arguments.length,items=new Array(_len3),_key3=0;_key3<_len3;_key3++)items[_key3]=arguments[_key3];return adm.spliceWithArray_(0,0,items),adm.values_.length},reverse:function(){
/*ThouShaltNotCache*/
return globalState.trackingDerivation&&die(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){
/*ThouShaltNotCache*/
globalState.trackingDerivation&&die(37,"sort");var copy=this.slice();return copy.sort.apply(copy,arguments),this.replace(copy),this},remove:function(value){
/*ThouShaltNotCache*/
var adm=this[$mobx],idx=adm.dehanceValues_(adm.values_).indexOf(value);return idx>-1&&(this.splice(idx,1),!0)}};function addArrayExtension(funcName,funcFactory){
/*ThouShaltNotCache*/
"function"==typeof Array.prototype[funcName]&&(arrayExtensions[funcName]=funcFactory(funcName))}function simpleFunc(funcName){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var adm=this[$mobx];adm.atom_.reportObserved();var dehancedValues=adm.dehanceValues_(adm.values_);return dehancedValues[funcName].apply(dehancedValues,arguments)}}function mapLikeFunc(funcName){
/*ThouShaltNotCache*/
return function(callback,thisArg){
/*ThouShaltNotCache*/
var _this2=this,adm=this[$mobx];return adm.atom_.reportObserved(),adm.dehanceValues_(adm.values_)[funcName](function(element,index){
/*ThouShaltNotCache*/
return callback.call(thisArg,element,index,_this2)})}}function reduceLikeFunc(funcName){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var _this3=this,adm=this[$mobx];adm.atom_.reportObserved();var dehancedValues=adm.dehanceValues_(adm.values_),callback=arguments[0];return arguments[0]=function(accumulator,currentValue,index){
/*ThouShaltNotCache*/
return callback(accumulator,currentValue,index,_this3)},dehancedValues[funcName].apply(dehancedValues,arguments)}}addArrayExtension("at",simpleFunc),addArrayExtension("concat",simpleFunc),addArrayExtension("flat",simpleFunc),addArrayExtension("includes",simpleFunc),addArrayExtension("indexOf",simpleFunc),addArrayExtension("join",simpleFunc),addArrayExtension("lastIndexOf",simpleFunc),addArrayExtension("slice",simpleFunc),addArrayExtension("toString",simpleFunc),addArrayExtension("toLocaleString",simpleFunc),addArrayExtension("toSorted",simpleFunc),addArrayExtension("toSpliced",simpleFunc),addArrayExtension("with",simpleFunc),addArrayExtension("every",mapLikeFunc),addArrayExtension("filter",mapLikeFunc),addArrayExtension("find",mapLikeFunc),addArrayExtension("findIndex",mapLikeFunc),addArrayExtension("findLast",mapLikeFunc),addArrayExtension("findLastIndex",mapLikeFunc),addArrayExtension("flatMap",mapLikeFunc),addArrayExtension("forEach",mapLikeFunc),addArrayExtension("map",mapLikeFunc),addArrayExtension("some",mapLikeFunc),addArrayExtension("toReversed",mapLikeFunc),addArrayExtension("reduce",reduceLikeFunc),addArrayExtension("reduceRight",reduceLikeFunc);var isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(thing){
/*ThouShaltNotCache*/
return isObject(thing)&&isObservableArrayAdministration(thing[$mobx])}var ObservableMapMarker={},ADD="add",ObservableMap=function(){
/*ThouShaltNotCache*/
function ObservableMap(initialData,enhancer_,name_){
/*ThouShaltNotCache*/
var _this=this;void 0===enhancer_&&(enhancer_=deepEnhancer),void 0===name_&&(name_="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[$mobx]=ObservableMapMarker,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=enhancer_,this.name_=name_,isFunction(Map)||die(18),initObservable(function(){
/*ThouShaltNotCache*/
_this.keysAtom_=createAtom("ObservableMap.keys()"),_this.data_=new Map,_this.hasMap_=new Map,initialData&&_this.merge(initialData)})}var _proto=ObservableMap.prototype;return _proto.has_=function(key){
/*ThouShaltNotCache*/
return this.data_.has(key)},_proto.has=function(key){
/*ThouShaltNotCache*/
var _this2=this;if(!globalState.trackingDerivation)return this.has_(key);var entry=this.hasMap_.get(key);if(!entry){var newEntry=entry=new ObservableValue(this.has_(key),referenceEnhancer,"ObservableMap.key?",!1);this.hasMap_.set(key,newEntry),onBecomeUnobserved(newEntry,function(){
/*ThouShaltNotCache*/
return _this2.hasMap_.delete(key)})}return entry.get()},_proto.set=function(key,value){
/*ThouShaltNotCache*/
var hasKey=this.has_(key);if(hasInterceptors(this)){var change=interceptChange(this,{type:hasKey?UPDATE:ADD,object:this,newValue:value,name:key});if(!change)return this;value=change.newValue}return hasKey?this.updateValue_(key,value):this.addValue_(key,value),this},_proto.delete=function(key){
/*ThouShaltNotCache*/
var _this3=this;if((this.keysAtom_,hasInterceptors(this))&&!interceptChange(this,{type:"delete",object:this,name:key}))return!1;if(this.has_(key)){var notify=hasListeners(this),_change=notify?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(key).value_,name:key}:null;return transaction(function(){
/*ThouShaltNotCache*/
var _this3$hasMap_$get;_this3.keysAtom_.reportChanged(),null==(_this3$hasMap_$get=_this3.hasMap_.get(key))||_this3$hasMap_$get.setNewValue_(!1),_this3.data_.get(key).setNewValue_(void 0),_this3.data_.delete(key)}),notify&&notifyListeners(this,_change),!0}return!1},_proto.updateValue_=function(key,newValue){
/*ThouShaltNotCache*/
var observable=this.data_.get(key);if((newValue=observable.prepareNewValue_(newValue))!==globalState.UNCHANGED){var notify=hasListeners(this),change=notify?{observableKind:"map",debugObjectName:this.name_,type:UPDATE,object:this,oldValue:observable.value_,name:key,newValue:newValue}:null;0,observable.setNewValue_(newValue),notify&&notifyListeners(this,change)}},_proto.addValue_=function(key,newValue){
/*ThouShaltNotCache*/
var _this4=this;this.keysAtom_,transaction(function(){
/*ThouShaltNotCache*/
var _this4$hasMap_$get,observable=new ObservableValue(newValue,_this4.enhancer_,"ObservableMap.key",!1);_this4.data_.set(key,observable),newValue=observable.value_,null==(_this4$hasMap_$get=_this4.hasMap_.get(key))||_this4$hasMap_$get.setNewValue_(!0),_this4.keysAtom_.reportChanged()});var notify=hasListeners(this),change=notify?{observableKind:"map",debugObjectName:this.name_,type:ADD,object:this,name:key,newValue:newValue}:null;notify&&notifyListeners(this,change)},_proto.get=function(key){
/*ThouShaltNotCache*/
return this.has(key)?this.dehanceValue_(this.data_.get(key).get()):this.dehanceValue_(void 0)},_proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.keys=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.keys()},_proto.values=function(){
/*ThouShaltNotCache*/
var self=this,keys=this.keys();return makeIterableForMap({next:function(){
/*ThouShaltNotCache*/
var _keys$next=keys.next(),done=_keys$next.done,value=_keys$next.value;return{done:done,value:done?void 0:self.get(value)}}})},_proto.entries=function(){
/*ThouShaltNotCache*/
var self=this,keys=this.keys();return makeIterableForMap({next:function(){
/*ThouShaltNotCache*/
var _keys$next2=keys.next(),done=_keys$next2.done,value=_keys$next2.value;return{done:done,value:done?void 0:[value,self.get(value)]}}})},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.entries()},_proto.forEach=function(callback,thisArg){
/*ThouShaltNotCache*/
for(var _step,_iterator=_createForOfIteratorHelperLoose(this);!(_step=_iterator()).done;){var _step$value=_step.value,key=_step$value[0],value=_step$value[1];callback.call(thisArg,value,key,this)}},_proto.merge=function(other){
/*ThouShaltNotCache*/
var _this5=this;return isObservableMap(other)&&(other=new Map(other)),transaction(function(){var thing,mapProto,objectProto;
/*ThouShaltNotCache*/
isPlainObject(other)?function(object){
/*ThouShaltNotCache*/
var keys=Object.keys(object);if(!hasGetOwnPropertySymbols)return keys;var symbols=Object.getOwnPropertySymbols(object);return symbols.length?[].concat(keys,symbols.filter(function(s){
/*ThouShaltNotCache*/
return objectPrototype.propertyIsEnumerable.call(object,s)})):keys}(other).forEach(function(key){
/*ThouShaltNotCache*/
return _this5.set(key,other[key])}):Array.isArray(other)?other.forEach(function(_ref){
/*ThouShaltNotCache*/
var key=_ref[0],value=_ref[1];return _this5.set(key,value)}):isES6Map(other)?(thing=other,mapProto=Object.getPrototypeOf(thing),objectProto=Object.getPrototypeOf(mapProto),null!==Object.getPrototypeOf(objectProto)&&die(19,other),other.forEach(function(value,key){
/*ThouShaltNotCache*/
return _this5.set(key,value)})):null!=other&&die(20,other)}),this},_proto.clear=function(){
/*ThouShaltNotCache*/
var _this6=this;transaction(function(){
/*ThouShaltNotCache*/
untracked(function(){
/*ThouShaltNotCache*/
for(var _step2,_iterator2=_createForOfIteratorHelperLoose(_this6.keys());!(_step2=_iterator2()).done;){var key=_step2.value;_this6.delete(key)}})})},_proto.replace=function(values){
/*ThouShaltNotCache*/
var _this7=this;return transaction(function(){for(
/*ThouShaltNotCache*/
var _step3,replacementMap=function(dataStructure){
/*ThouShaltNotCache*/
if(isES6Map(dataStructure)||isObservableMap(dataStructure))return dataStructure;if(Array.isArray(dataStructure))return new Map(dataStructure);if(isPlainObject(dataStructure)){var map=new Map;for(var key in dataStructure)map.set(key,dataStructure[key]);return map}return die(21,dataStructure)}(values),orderedData=new Map,keysReportChangedCalled=!1,_iterator3=_createForOfIteratorHelperLoose(_this7.data_.keys());!(_step3=_iterator3()).done;){var key=_step3.value;if(!replacementMap.has(key))if(_this7.delete(key))keysReportChangedCalled=!0;else{var value=_this7.data_.get(key);orderedData.set(key,value)}}for(var _step4,_iterator4=_createForOfIteratorHelperLoose(replacementMap.entries());!(_step4=_iterator4()).done;){var _step4$value=_step4.value,_key=_step4$value[0],_value=_step4$value[1],keyExisted=_this7.data_.has(_key);if(_this7.set(_key,_value),_this7.data_.has(_key)){var _value2=_this7.data_.get(_key);orderedData.set(_key,_value2),keyExisted||(keysReportChangedCalled=!0)}}if(!keysReportChangedCalled)if(_this7.data_.size!==orderedData.size)_this7.keysAtom_.reportChanged();else for(var iter1=_this7.data_.keys(),iter2=orderedData.keys(),next1=iter1.next(),next2=iter2.next();!next1.done;){if(next1.value!==next2.value){_this7.keysAtom_.reportChanged();break}next1=iter1.next(),next2=iter2.next()}_this7.data_=orderedData}),this},_proto.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableMap]"},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},_proto.observe_=function(listener,fireImmediately){return registerListener(this,listener)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_createClass(ObservableMap,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Map"}}])}(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap);function makeIterableForMap(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.toStringTag]="MapIterator",makeIterable(iterator)}var ObservableSetMarker={},ObservableSet=function(){
/*ThouShaltNotCache*/
function ObservableSet(initialData,enhancer,name_){
/*ThouShaltNotCache*/
var _this=this;void 0===enhancer&&(enhancer=deepEnhancer),void 0===name_&&(name_="ObservableSet"),this.name_=void 0,this[$mobx]=ObservableSetMarker,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=name_,isFunction(Set)||die(22),this.enhancer_=function(newV,oldV){
/*ThouShaltNotCache*/
return enhancer(newV,oldV,name_)},initObservable(function(){
/*ThouShaltNotCache*/
_this.atom_=createAtom(_this.name_),initialData&&_this.replace(initialData)})}var _proto=ObservableSet.prototype;return _proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.clear=function(){
/*ThouShaltNotCache*/
var _this2=this;transaction(function(){
/*ThouShaltNotCache*/
untracked(function(){
/*ThouShaltNotCache*/
for(var _step,_iterator=_createForOfIteratorHelperLoose(_this2.data_.values());!(_step=_iterator()).done;){var value=_step.value;_this2.delete(value)}})})},_proto.forEach=function(callbackFn,thisArg){
/*ThouShaltNotCache*/
for(var _step2,_iterator2=_createForOfIteratorHelperLoose(this);!(_step2=_iterator2()).done;){var value=_step2.value;callbackFn.call(thisArg,value,value,this)}},_proto.add=function(value){
/*ThouShaltNotCache*/
var _this3=this;if(this.atom_,hasInterceptors(this)){var change=interceptChange(this,{type:ADD,object:this,newValue:value});if(!change)return this;value=change.newValue}if(!this.has(value)){transaction(function(){
/*ThouShaltNotCache*/
_this3.data_.add(_this3.enhancer_(value,void 0)),_this3.atom_.reportChanged()});var notify=hasListeners(this),_change=notify?{observableKind:"set",debugObjectName:this.name_,type:ADD,object:this,newValue:value}:null;false,notify&&notifyListeners(this,_change)}return this},_proto.delete=function(value){
/*ThouShaltNotCache*/
var _this4=this;if(hasInterceptors(this)&&!interceptChange(this,{type:"delete",object:this,oldValue:value}))return!1;if(this.has(value)){var notify=hasListeners(this),_change2=notify?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:value}:null;return transaction(function(){
/*ThouShaltNotCache*/
_this4.atom_.reportChanged(),_this4.data_.delete(value)}),notify&&notifyListeners(this,_change2),!0}return!1},_proto.has=function(value){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(value))},_proto.entries=function(){
/*ThouShaltNotCache*/
var values=this.values();return makeIterableForSet({next:function(){
/*ThouShaltNotCache*/
var _values$next=values.next(),value=_values$next.value,done=_values$next.done;return done?{value:void 0,done:done}:{value:[value,value],done:done}}})},_proto.keys=function(){
/*ThouShaltNotCache*/
return this.values()},_proto.values=function(){
/*ThouShaltNotCache*/
this.atom_.reportObserved();var self=this,values=this.data_.values();return makeIterableForSet({next:function(){
/*ThouShaltNotCache*/
var _values$next2=values.next(),value=_values$next2.value,done=_values$next2.done;return done?{value:void 0,done:done}:{value:self.dehanceValue_(value),done:done}}})},_proto.intersection=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.intersection(this):new Set(this).intersection(otherSet)},_proto.union=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.union(this):new Set(this).union(otherSet)},_proto.difference=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).difference(otherSet)},_proto.symmetricDifference=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.symmetricDifference(this):new Set(this).symmetricDifference(otherSet)},_proto.isSubsetOf=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).isSubsetOf(otherSet)},_proto.isSupersetOf=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).isSupersetOf(otherSet)},_proto.isDisjointFrom=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.isDisjointFrom(this):new Set(this).isDisjointFrom(otherSet)},_proto.replace=function(other){
/*ThouShaltNotCache*/
var _this5=this;return isObservableSet(other)&&(other=new Set(other)),transaction(function(){
/*ThouShaltNotCache*/
Array.isArray(other)||isES6Set(other)?(_this5.clear(),other.forEach(function(value){
/*ThouShaltNotCache*/
return _this5.add(value)})):null!=other&&die("Cannot initialize set from "+other)}),this},_proto.observe_=function(listener,fireImmediately){return registerListener(this,listener)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},_proto.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableSet]"},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.values()},_createClass(ObservableSet,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Set"}}])}(),isObservableSet=createInstanceofPredicate("ObservableSet",ObservableSet);function makeIterableForSet(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.toStringTag]="SetIterator",makeIterable(iterator)}var descriptorCache=Object.create(null),ObservableObjectAdministration=function(){
/*ThouShaltNotCache*/
function ObservableObjectAdministration(target_,values_,name_,defaultAnnotation_){
/*ThouShaltNotCache*/
void 0===values_&&(values_=new Map),void 0===defaultAnnotation_&&(defaultAnnotation_=autoAnnotation),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=target_,this.values_=values_,this.name_=name_,this.defaultAnnotation_=defaultAnnotation_,this.keysAtom_=new Atom("ObservableObject.keys"),this.isPlainObject_=isPlainObject(this.target_)}var _proto=ObservableObjectAdministration.prototype;return _proto.getObservablePropValue_=function(key){
/*ThouShaltNotCache*/
return this.values_.get(key).get()},_proto.setObservablePropValue_=function(key,newValue){
/*ThouShaltNotCache*/
var observable=this.values_.get(key);if(observable instanceof ComputedValue)return observable.set(newValue),!0;if(hasInterceptors(this)){var change=interceptChange(this,{type:UPDATE,object:this.proxy_||this.target_,name:key,newValue:newValue});if(!change)return null;newValue=change.newValue}if((newValue=observable.prepareNewValue_(newValue))!==globalState.UNCHANGED){var notify=hasListeners(this),_change=notify?{type:UPDATE,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:observable.value_,name:key,newValue:newValue}:null;0,observable.setNewValue_(newValue),notify&&notifyListeners(this,_change)}return!0},_proto.get_=function(key){
/*ThouShaltNotCache*/
return globalState.trackingDerivation&&!hasProp(this.target_,key)&&this.has_(key),this.target_[key]},_proto.set_=function(key,value,proxyTrap){
/*ThouShaltNotCache*/
return void 0===proxyTrap&&(proxyTrap=!1),hasProp(this.target_,key)?this.values_.has(key)?this.setObservablePropValue_(key,value):proxyTrap?Reflect.set(this.target_,key,value):(this.target_[key]=value,!0):this.extend_(key,{value:value,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,proxyTrap)},_proto.has_=function(key){
/*ThouShaltNotCache*/
if(!globalState.trackingDerivation)return key in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var entry=this.pendingKeys_.get(key);return entry||(entry=new ObservableValue(key in this.target_,referenceEnhancer,"ObservableObject.key?",!1),this.pendingKeys_.set(key,entry)),entry.get()},_proto.make_=function(key,annotation){if(
/*ThouShaltNotCache*/
!0===annotation&&(annotation=this.defaultAnnotation_),!1!==annotation){if(assertAnnotable(this,annotation,key),!(key in this.target_)){var _this$target_$storedA;if(null!=(_this$target_$storedA=this.target_[storedAnnotationsSymbol])&&_this$target_$storedA[key])return;die(1,annotation.annotationType_,this.name_+"."+key.toString())}for(var source=this.target_;source&&source!==objectPrototype;){var descriptor=getDescriptor(source,key);if(descriptor){var outcome=annotation.make_(this,key,descriptor,source);if(0===outcome)return;if(1===outcome)break}source=Object.getPrototypeOf(source)}recordAnnotationApplied(this,annotation,key)}},_proto.extend_=function(key,descriptor,annotation,proxyTrap){if(
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),!0===annotation&&(annotation=this.defaultAnnotation_),!1===annotation)return this.defineProperty_(key,descriptor,proxyTrap);assertAnnotable(this,annotation,key);var outcome=annotation.extend_(this,key,descriptor,proxyTrap);return outcome&&recordAnnotationApplied(this,annotation,key),outcome},_proto.defineProperty_=function(key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:descriptor.value});if(!change)return null;var newValue=change.newValue;descriptor.value!==newValue&&(descriptor=_extends({},descriptor,{value:newValue}))}if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);this.notifyPropertyAddition_(key,descriptor.value)}finally{endBatch()}return!0},_proto.defineObservableProperty_=function(key,value,enhancer,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:value});if(!change)return null;value=change.newValue}var cachedDescriptor=getCachedObservablePropDescriptor(key),descriptor={configurable:!globalState.safeDescriptors||this.isPlainObject_,enumerable:!0,get:cachedDescriptor.get,set:cachedDescriptor.set};if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);var observable=new ObservableValue(value,enhancer,"ObservableObject.key",!1);this.values_.set(key,observable),this.notifyPropertyAddition_(key,observable.value_)}finally{endBatch()}return!0},_proto.defineComputedProperty_=function(key,options,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this))if(!interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:void 0}))return null;options.name||(options.name="ObservableObject.key"),options.context=this.proxy_||this.target_;var cachedDescriptor=getCachedObservablePropDescriptor(key),descriptor={configurable:!globalState.safeDescriptors||this.isPlainObject_,enumerable:!1,get:cachedDescriptor.get,set:cachedDescriptor.set};if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);this.values_.set(key,new ComputedValue(options)),this.notifyPropertyAddition_(key,void 0)}finally{endBatch()}return!0},_proto.delete_=function(key,proxyTrap){if(
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_,!hasProp(this.target_,key))return!0;if(hasInterceptors(this)&&!interceptChange(this,{object:this.proxy_||this.target_,name:key,type:"remove"}))return null;try{var _this$pendingKeys_;startBatch();var _getDescriptor,notify=hasListeners(this),observable=this.values_.get(key),value=void 0;if(!observable&&notify)value=null==(_getDescriptor=getDescriptor(this.target_,key))?void 0:_getDescriptor.value;if(proxyTrap){if(!Reflect.deleteProperty(this.target_,key))return!1}else delete this.target_[key];if(observable&&(this.values_.delete(key),observable instanceof ObservableValue&&(value=observable.value_),propagateChanged(observable)),this.keysAtom_.reportChanged(),null==(_this$pendingKeys_=this.pendingKeys_)||null==(_this$pendingKeys_=_this$pendingKeys_.get(key))||_this$pendingKeys_.set(key in this.target_),notify){var _change2={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:value,name:key};0,notify&&notifyListeners(this,_change2)}}finally{endBatch()}return!0},_proto.observe_=function(callback,fireImmediately){return registerListener(this,callback)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.notifyPropertyAddition_=function(key,value){
/*ThouShaltNotCache*/
var _this$pendingKeys_2,notify=hasListeners(this);if(notify){var change=notify?{type:ADD,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:key,newValue:value}:null;0,notify&&notifyListeners(this,change)}null==(_this$pendingKeys_2=this.pendingKeys_)||null==(_this$pendingKeys_2=_this$pendingKeys_2.get(key))||_this$pendingKeys_2.set(!0),this.keysAtom_.reportChanged()},_proto.ownKeys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),ownKeys(this.target_)},_proto.keys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),Object.keys(this.target_)},ObservableObjectAdministration}();function asObservableObject(target,options){
/*ThouShaltNotCache*/
var _options$name;if(hasProp(target,$mobx))return target;var name=null!=(_options$name=null==options?void 0:options.name)?_options$name:"ObservableObject",adm=new ObservableObjectAdministration(target,new Map,String(name),function(options){
/*ThouShaltNotCache*/
var _options$defaultDecor;return options?null!=(_options$defaultDecor=options.defaultDecorator)?_options$defaultDecor:createAutoAnnotation(options):void 0}(options));return addHiddenProp(target,$mobx,adm),target}var isObservableObjectAdministration=createInstanceofPredicate("ObservableObjectAdministration",ObservableObjectAdministration);function getCachedObservablePropDescriptor(key){
/*ThouShaltNotCache*/
return descriptorCache[key]||(descriptorCache[key]={get:function(){
/*ThouShaltNotCache*/
return this[$mobx].getObservablePropValue_(key)},set:function(value){
/*ThouShaltNotCache*/
return this[$mobx].setObservablePropValue_(key,value)}})}function isObservableObject(thing){
/*ThouShaltNotCache*/
return!!isObject(thing)&&isObservableObjectAdministration(thing[$mobx])}function recordAnnotationApplied(adm,annotation,key){
/*ThouShaltNotCache*/
var _adm$target_$storedAn;null==(_adm$target_$storedAn=adm.target_[storedAnnotationsSymbol])||delete _adm$target_$storedAn[key]}function assertAnnotable(adm,annotation,key){}var ctor,proto,ENTRY_0=createArrayEntryDescriptor(0),safariPrototypeSetterInheritanceBug=function(){
/*ThouShaltNotCache*/
var v=!1,p={};return Object.defineProperty(p,"0",{set:function(){
/*ThouShaltNotCache*/
v=!0}}),Object.create(p)[0]=1,!1===v}(),OBSERVABLE_ARRAY_BUFFER_SIZE=0,StubArray=function(){};ctor=StubArray,proto=Array.prototype,
/*ThouShaltNotCache*/
Object.setPrototypeOf?Object.setPrototypeOf(ctor.prototype,proto):void 0!==ctor.prototype.__proto__?ctor.prototype.__proto__=proto:ctor.prototype=proto;var LegacyObservableArray=function(_StubArray){
/*ThouShaltNotCache*/
function LegacyObservableArray(initialValues,enhancer,name,owned){
/*ThouShaltNotCache*/
var _this;return void 0===name&&(name="ObservableArray"),void 0===owned&&(owned=!1),_this=_StubArray.call(this)||this,initObservable(function(){
/*ThouShaltNotCache*/
var adm=new ObservableArrayAdministration(name,enhancer,owned,!0);adm.proxy_=_this,addHiddenFinalProp(_this,$mobx,adm),initialValues&&initialValues.length&&_this.spliceWithArray(0,0,initialValues),safariPrototypeSetterInheritanceBug&&Object.defineProperty(_this,"0",ENTRY_0)}),_this}_inheritsLoose(LegacyObservableArray,_StubArray);var _proto=LegacyObservableArray.prototype;return _proto.concat=function(){
/*ThouShaltNotCache*/
this[$mobx].atom_.reportObserved();for(var _len=arguments.length,arrays=new Array(_len),_key=0;_key<_len;_key++)arrays[_key]=arguments[_key];return Array.prototype.concat.apply(this.slice(),arrays.map(function(a){
/*ThouShaltNotCache*/
return isObservableArray(a)?a.slice():a}))},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
var self=this,nextIndex=0;return makeIterable({next:function(){
/*ThouShaltNotCache*/
return nextIndex<self.length?{value:self[nextIndex++],done:!1}:{done:!0,value:void 0}}})},_createClass(LegacyObservableArray,[{key:"length",get:function(){
/*ThouShaltNotCache*/
return this[$mobx].getArrayLength_()},set:function(newLength){
/*ThouShaltNotCache*/
this[$mobx].setArrayLength_(newLength)}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Array"}}])}(StubArray);function createArrayEntryDescriptor(index){
/*ThouShaltNotCache*/
return{enumerable:!1,configurable:!0,get:function(){
/*ThouShaltNotCache*/
return this[$mobx].get_(index)},set:function(value){
/*ThouShaltNotCache*/
this[$mobx].set_(index,value)}}}function createArrayBufferItem(index){
/*ThouShaltNotCache*/
defineProperty(LegacyObservableArray.prototype,""+index,createArrayEntryDescriptor(index))}function reserveArrayBuffer(max){
/*ThouShaltNotCache*/
if(max>OBSERVABLE_ARRAY_BUFFER_SIZE){for(var index=OBSERVABLE_ARRAY_BUFFER_SIZE;index<max+100;index++)createArrayBufferItem(index);OBSERVABLE_ARRAY_BUFFER_SIZE=max}}function createLegacyArray(initialValues,enhancer,name){
/*ThouShaltNotCache*/
return new LegacyObservableArray(initialValues,enhancer,name)}function getAtom(thing,property){
/*ThouShaltNotCache*/
if("object"==typeof thing&&null!==thing){if(isObservableArray(thing))return void 0!==property&&die(23),thing[$mobx].atom_;if(isObservableSet(thing))return thing.atom_;if(isObservableMap(thing)){if(void 0===property)return thing.keysAtom_;var observable=thing.data_.get(property)||thing.hasMap_.get(property);return observable||die(25,property,getDebugName(thing)),observable}if(isObservableObject(thing)){if(!property)return die(26);var _observable=thing[$mobx].values_.get(property);return _observable||die(27,property,getDebugName(thing)),_observable}if(isAtom(thing)||isComputedValue(thing)||isReaction(thing))return thing}else if(isFunction(thing)&&isReaction(thing[$mobx]))return thing[$mobx];die(28)}function getAdministration(thing,property){
/*ThouShaltNotCache*/
return thing||die(29),void 0!==property?getAdministration(getAtom(thing,property)):isAtom(thing)||isComputedValue(thing)||isReaction(thing)||isObservableMap(thing)||isObservableSet(thing)?thing:thing[$mobx]?thing[$mobx]:void die(24,thing)}function getDebugName(thing,property){
/*ThouShaltNotCache*/
var named;if(void 0!==property)named=getAtom(thing,property);else{if(isAction(thing))return thing.name;named=isObservableObject(thing)||isObservableMap(thing)||isObservableSet(thing)?getAdministration(thing):getAtom(thing)}return named.name_}function initObservable(cb){
/*ThouShaltNotCache*/
var derivation=untrackedStart(),allowStateChanges=allowStateChangesStart(!0);startBatch();try{return cb()}finally{endBatch(),allowStateChangesEnd(allowStateChanges),untrackedEnd(derivation)}}Object.entries(arrayExtensions).forEach(function(_ref){
/*ThouShaltNotCache*/
var prop=_ref[0],fn=_ref[1];"concat"!==prop&&addHiddenProp(LegacyObservableArray.prototype,prop,fn)}),reserveArrayBuffer(1e3);var _getGlobal$Iterator,mobx_esm_toString=objectPrototype.toString;function deepEqual(a,b,depth){
/*ThouShaltNotCache*/
return void 0===depth&&(depth=-1),eq(a,b,depth)}function eq(a,b,depth,aStack,bStack){
/*ThouShaltNotCache*/
if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return!1;if(a!=a)return b!=b;var type=typeof a;if("function"!==type&&"object"!==type&&"object"!=typeof b)return!1;var className=mobx_esm_toString.call(a);if(className!==mobx_esm_toString.call(b))return!1;switch(className){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!=+a?+b!=+b:0===+a?1/+a==1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(a)===Symbol.valueOf.call(b);case"[object Map]":case"[object Set]":depth>=0&&depth++}a=unwrap(a),b=unwrap(b);var areArrays="[object Array]"===className;if(!areArrays){if("object"!=typeof a||"object"!=typeof b)return!1;var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(isFunction(aCtor)&&aCtor instanceof aCtor&&isFunction(bCtor)&&bCtor instanceof bCtor)&&"constructor"in a&&"constructor"in b)return!1}if(0===depth)return!1;depth<0&&(depth=-1),bStack=bStack||[];for(var length=(aStack=aStack||[]).length;length--;)if(aStack[length]===a)return bStack[length]===b;if(aStack.push(a),bStack.push(b),areArrays){if((length=a.length)!==b.length)return!1;for(;length--;)if(!eq(a[length],b[length],depth-1,aStack,bStack))return!1}else{var keys=Object.keys(a),_length=keys.length;if(Object.keys(b).length!==_length)return!1;for(var i=0;i<_length;i++){var key=keys[i];if(!hasProp(b,key)||!eq(a[key],b[key],depth-1,aStack,bStack))return!1}}return aStack.pop(),bStack.pop(),!0}function unwrap(a){
/*ThouShaltNotCache*/
return isObservableArray(a)?a.slice():isES6Map(a)||isObservableMap(a)||isES6Set(a)||isObservableSet(a)?Array.from(a.entries()):a}var maybeIteratorPrototype=(null==(_getGlobal$Iterator=getGlobal().Iterator)?void 0:_getGlobal$Iterator.prototype)||{};function makeIterable(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.iterator]=getSelf,Object.assign(Object.create(maybeIteratorPrototype),iterator)}function getSelf(){
/*ThouShaltNotCache*/
return this}["Symbol","Map","Set"].forEach(function(m){void 0===getGlobal()[m]&&die("MobX requires global '"+m+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(listener){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:getDebugName},$mobx:$mobx});class Person{id;name;lastMessage=null;rooms=new Set;status="Online";constructor(id,name){
/*ThouShaltNotCache*/
makeObservable(this,{name:observable,lastMessage:observable,rooms:observable,status:observable,setName:action,setLastMessage:action,addRoom:action,removeRoom:action,setStatus:action}),this.id=id,this.name=name}setName(name){
/*ThouShaltNotCache*/
this.name=name}setLastMessage(message){
/*ThouShaltNotCache*/
this.lastMessage=message}addRoom(room){
/*ThouShaltNotCache*/
this.rooms.add(room)}removeRoom(room){
/*ThouShaltNotCache*/
this.rooms.delete(room)}setStatus(status){
/*ThouShaltNotCache*/
this.status=status,this.rooms.forEach(room=>{
/*ThouShaltNotCache*/
room.addStatusUpdate(this,status)})}}class Room{name;people=new Map;messages=[];roomUpdates=[];constructor(name){
/*ThouShaltNotCache*/
makeObservable(this,{name:observable,people:observable,messages:observable,roomUpdates:observable,messageCount:computed,peopleCount:computed,lastMessage:computed,members:computed,addPerson:action,removePerson:action,addMessage:action,addStatusUpdate:action,dispose:action}),this.name=name}get messageCount(){
/*ThouShaltNotCache*/
return this.messages.length}get peopleCount(){
/*ThouShaltNotCache*/
return this.people.size}get lastMessage(){
/*ThouShaltNotCache*/
return 0===this.messages.length?null:this.messages[this.messages.length-1]}get members(){
/*ThouShaltNotCache*/
return Array.from(this.people.values())}addPerson(person){
/*ThouShaltNotCache*/
this.people.has(person.id)||(this.people.set(person.id,person),person.addRoom(this))}removePerson(personId){
/*ThouShaltNotCache*/
const person=this.people.get(personId);person&&(person.removeRoom(this),this.people.delete(personId))}addMessage(message){
/*ThouShaltNotCache*/
this.messages.push(message),message.author.setLastMessage(message)}addStatusUpdate(person,status){
/*ThouShaltNotCache*/
this.roomUpdates.push(`${person.name} is now ${status}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(notifications){
/*ThouShaltNotCache*/
this.people.forEach(person=>person.removeRoom(this)),notifications&&notifications.removeRoom(this.name)}}class Message{static _nextId=0;id;text;author;timestamp;static nextId(){
/*ThouShaltNotCache*/
return Message._nextId++}constructor(text,author){
/*ThouShaltNotCache*/
makeObservable(this,{text:observable,updateText:action}),this.id=Message.nextId(),this.text=text,this.author=author,this.timestamp=new Date}updateText(text){
/*ThouShaltNotCache*/
this.text=text}}class Notifications{lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(rooms){
/*ThouShaltNotCache*/
makeObservable(this,{lastMessages:observable,updateLastMessage:action,addRoom:action,removeRoom:action}),rooms.forEach(room=>this.addRoom(room))}addRoom(room){
/*ThouShaltNotCache*/
const disposer=function(expression,effect,opts){
/*ThouShaltNotCache*/
var _opts$name2,_opts4,_opts5;void 0===opts&&(opts=EMPTY_OBJECT);var errorHandler,baseFn,value,name=null!=(_opts$name2=opts.name)?_opts$name2:"Reaction",effectAction=action(name,opts.onError?(errorHandler=opts.onError,baseFn=effect,function(){
/*ThouShaltNotCache*/
try{return baseFn.apply(this,arguments)}catch(e){errorHandler.call(this,e)}}):effect),runSync=!opts.scheduler&&!opts.delay,scheduler=createSchedulerFromOptions(opts),firstTime=!0,isScheduled=!1,equals=opts.compareStructural?comparer.structural:opts.equals||comparer.default,r=new Reaction(name,function(){
/*ThouShaltNotCache*/
firstTime||runSync?reactionRunner():isScheduled||(isScheduled=!0,scheduler(reactionRunner))},opts.onError,opts.requiresObservable);function reactionRunner(){if(
/*ThouShaltNotCache*/
isScheduled=!1,!r.isDisposed){var changed=!1,oldValue=value;r.track(function(){
/*ThouShaltNotCache*/
var nextValue=allowStateChanges(!1,function(){
/*ThouShaltNotCache*/
return expression(r)});changed=firstTime||!equals(value,nextValue),value=nextValue}),(firstTime&&opts.fireImmediately||!firstTime&&changed)&&effectAction(value,oldValue,r),firstTime=!1}}return null!=(_opts4=opts)&&null!=(_opts4=_opts4.signal)&&_opts4.aborted||r.schedule_(),r.getDisposer_(null==(_opts5=opts)?void 0:_opts5.signal)}(()=>room.lastMessage,message=>{
/*ThouShaltNotCache*/
message&&this.updateLastMessage(room.name,message)});this.roomDisposers.set(room.name,disposer)}removeRoom(roomName){
/*ThouShaltNotCache*/
this.roomDisposers.has(roomName)&&(this.roomDisposers.get(roomName)(),this.roomDisposers.delete(roomName),this.lastMessages.delete(roomName))}updateLastMessage(roomName,message){
/*ThouShaltNotCache*/
this.lastMessages.set(roomName,message)}}function assert(condition){
/*ThouShaltNotCache*/
if(!condition)throw new Error("Assertion failure")}function runTest(){
/*ThouShaltNotCache*/
const logs=[],customLog=(...args)=>logs.push(args.join(" ")),techRoom=new Room("Tech Talk"),generalRoom=new Room("General Chat"),largeRoom=new Room("Large Meeting Room"),alice=new Person(1,"Alice"),bob=new Person(2,"Bob");techRoom.addPerson(alice),techRoom.addPerson(bob),generalRoom.addPerson(alice);const rooms=[techRoom,generalRoom,largeRoom],notifications=new Notifications(rooms);customLog("\n--- Setting up Large Meeting Room ---");const largeRoomMembers=[];for(let i=3;i<203;i++){const person=new Person(i,`Person ${i}`);largeRoomMembers.push(person),largeRoom.addPerson(person)}customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`),largeRoom.addPerson(alice),largeRoom.addPerson(bob),customLog("[INFO] Added Alice and Bob to the Large Meeting Room."),assert(3===alice.rooms.size),assert(alice.rooms.has(techRoom)&&alice.rooms.has(generalRoom)&&alice.rooms.has(largeRoom)),assert(2===bob.rooms.size&&bob.rooms.has(techRoom)&&bob.rooms.has(largeRoom)),customLog("[PASS] Verified Person.rooms associations with Set.");const notificationsDisposer=autorun(()=>{
/*ThouShaltNotCache*/
customLog("\n--- Global Notifications (Last Messages) ---"),0===notifications.lastMessages.size?customLog("No messages yet."):notifications.lastMessages.forEach((message,roomName)=>{
/*ThouShaltNotCache*/
customLog(`[${roomName}] "${message.text}" - ${message.author.name}`)}),customLog("------------------------------------------")}),roomUpdatesDisposer=autorun(()=>{
/*ThouShaltNotCache*/
rooms.forEach(room=>{
/*ThouShaltNotCache*/
room.roomUpdates.length>0&&customLog(`[${room.name} Update] ${room.roomUpdates[room.roomUpdates.length-1]}`)})});customLog("\n--- Status Update Scenario ---"),alice.setStatus("Away"),assert(techRoom.roomUpdates.includes("Alice is now Away")),assert(generalRoom.roomUpdates.includes("Alice is now Away")),assert(largeRoom.roomUpdates.includes("Alice is now Away")),customLog("[PASS] Verified that status updates are sent to all of Alice's rooms."),bob.setStatus("Busy"),assert(techRoom.roomUpdates.includes("Bob is now Busy")),assert(!generalRoom.roomUpdates.includes("Bob is now Busy")),assert(largeRoom.roomUpdates.includes("Bob is now Busy")),customLog("[PASS] Verified that status updates are only sent to Bob's rooms."),customLog("\n--- Sending Messages & Verifying Notifications ---");const msg1=new Message("First message to Tech Talk!",alice);techRoom.addMessage(msg1),assert(notifications.lastMessages.get("Tech Talk")===msg1),customLog("[PASS] Verified Tech Talk notification.");for(let i=0;i<20;i++){const msg2=new Message(`ping ${i}`,alice);generalRoom.addMessage(msg2),assert(notifications.lastMessages.get("General Chat")===msg2)}customLog("[PASS] Verified General Chat notification.");for(let i=0;i<=5;i++)for(const member of largeRoomMembers){const msg=new Message(`Hi, I am ${member.name}`,member);largeRoom.addMessage(msg),assert(largeRoom.lastMessage==msg),assert(notifications.lastMessages.get("Large Meeting Room")===msg)}customLog("[PASS] Verified Large Meeting Room notification.");for(let i=0;i<20;i++){const msg4=new Message(`ping ${i}`,bob);techRoom.addMessage(msg4),assert(notifications.lastMessages.get("Tech Talk")===msg4)}customLog("[PASS] Verified Tech Talk notification update.");const tempRooms=[];for(let i=0;i<10;i++){const roomId=`General Chat ${i}`,tempRoom=new Room(roomId);tempRooms.push(tempRoom),notifications.addRoom(tempRoom);for(const person of largeRoomMembers.slice(0,10))tempRoom.addPerson(person);for(const person of tempRoom.members.slice(0,5)){const msg=new Message(`ping ${i}`,person);tempRoom.addMessage(msg),assert(notifications.lastMessages.get(roomId)===msg)}}return tempRooms.forEach(room=>room.dispose(notifications)),notificationsDisposer(),roomUpdatesDisposer(),techRoom.dispose(notifications),generalRoom.dispose(notifications),largeRoom.dispose(notifications),logs}}(),MobXBenchmark=__webpack_exports__}();
//# sourceMappingURL=bundle.es5.js.map

1
mobx/dist/bundle.es5.js.map vendored Normal file

File diff suppressed because one or more lines are too long

930
mobx/dist/bundle.es5.min.js vendored Normal file
View file

@ -0,0 +1,930 @@
!function(){var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};!function(){"use strict";e.r(t),e.d(t,{runTest:function(){return br}});function n(e){
/*ThouShaltNotCache*/
for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var r={};function i(){
/*ThouShaltNotCache*/
return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:r}var o=Object.assign,s=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=Object.prototype,c=[];Object.freeze(c);var l={};Object.freeze(l);var h="undefined"!=typeof Proxy,f=Object.toString();function d(){
/*ThouShaltNotCache*/
h||n("Proxy not available")}function _(e){
/*ThouShaltNotCache*/
var t=!1;return function(){
/*ThouShaltNotCache*/
if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function p(e){
/*ThouShaltNotCache*/
return"function"==typeof e}function g(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function b(e){
/*ThouShaltNotCache*/
return null!==e&&"object"==typeof e}function y(e){
/*ThouShaltNotCache*/
if(!b(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===f}function m(e){
/*ThouShaltNotCache*/
var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function O(e,t,n){
/*ThouShaltNotCache*/
a(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function w(e,t,n){
/*ThouShaltNotCache*/
a(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function S(e,t){
/*ThouShaltNotCache*/
var n="isMobX"+e;return t.prototype[n]=!0,function(e){
/*ThouShaltNotCache*/
return b(e)&&!0===e[n]}}function A(e){
/*ThouShaltNotCache*/
return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function k(e){
/*ThouShaltNotCache*/
return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var j=void 0!==Object.getOwnPropertySymbols;var x="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:j?function(e){
/*ThouShaltNotCache*/
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function M(e){
/*ThouShaltNotCache*/
return null===e?null:"object"==typeof e?""+e:e}function P(e,t){
/*ThouShaltNotCache*/
return u.hasOwnProperty.call(e,t)}var T=Object.getOwnPropertyDescriptors||function(e){
/*ThouShaltNotCache*/
var t={};return x(e).forEach(function(n){
/*ThouShaltNotCache*/
t[n]=s(e,n)}),t};function V(e,t){
/*ThouShaltNotCache*/
return!!(e&t)}function E(e,t,n){
/*ThouShaltNotCache*/
return n?e|=t:e&=~t,e}function R(e,t){
/*ThouShaltNotCache*/
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){
/*ThouShaltNotCache*/
for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function D(e,t,n){
/*ThouShaltNotCache*/
return t&&C(e.prototype,t),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t){
/*ThouShaltNotCache*/
var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){
/*ThouShaltNotCache*/
if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){
/*ThouShaltNotCache*/
return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(){
/*ThouShaltNotCache*/
return L=Object.assign?Object.assign.bind():function(e){
/*ThouShaltNotCache*/
for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function B(e,t){
/*ThouShaltNotCache*/
e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U(e,t)}function U(e,t){
/*ThouShaltNotCache*/
return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){
/*ThouShaltNotCache*/
return e.__proto__=t,e},U(e,t)}function I(e){
/*ThouShaltNotCache*/
var t=function(e,t){
/*ThouShaltNotCache*/
if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}var K=Symbol("mobx-stored-annotations");function G(e){return Object.assign(
/*ThouShaltNotCache*/
function(t,n){
/*ThouShaltNotCache*/
if(z(n))return e.decorate_20223_(t,n);q(t,n,e)},e)}function q(e,t,n){
/*ThouShaltNotCache*/
P(e,K)||O(e,K,L({},e[K])),function(e){
/*ThouShaltNotCache*/
return e.annotationType_===Q}(n)||(e[K][t]=n)}function z(e){
/*ThouShaltNotCache*/
return"object"==typeof e&&"string"==typeof e.kind}var H=Symbol("mobx administration"),W=function(){
/*ThouShaltNotCache*/
function e(e){
/*ThouShaltNotCache*/
void 0===e&&(e="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ye.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.reportObserved=function(){
/*ThouShaltNotCache*/
return mt(this)},t.reportChanged=function(){
/*ThouShaltNotCache*/
bt(),Ot(this),yt()},t.toString=function(){
/*ThouShaltNotCache*/
return this.name_},D(e,[{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isBeingObservedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isPendingUnobservationMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();W.isBeingObservedMask_=1,W.isPendingUnobservationMask_=2,W.diffValueMask_=4;var $=S("Atom",W);function F(e,t,n){
/*ThouShaltNotCache*/
void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new W(e);return t!==v&&Ht(Gt,i,t,r),n!==v&&zt(i,n),i}var X={identity:function(e,t){
/*ThouShaltNotCache*/
return e===t},structural:function(e,t){
/*ThouShaltNotCache*/
return ar(e,t)},default:function(e,t){
/*ThouShaltNotCache*/
return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){
/*ThouShaltNotCache*/
return ar(e,t,1)}};function Y(e,t,n){
/*ThouShaltNotCache*/
return tn(e)?e:Array.isArray(e)?Ce.array(e,{name:n}):y(e)?Ce.object(e,void 0,{name:n}):A(e)?Ce.map(e,{name:n}):k(e)?Ce.set(e,{name:n}):"function"!=typeof e||Bt(e)||Zt(e)?e:m(e)?Jt(e):Lt(n,e)}function J(e){
/*ThouShaltNotCache*/
return e}var Q="override";function Z(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:ee,extend_:te,decorate_20223_:ne}}function ee(e,t,n,r){
/*ThouShaltNotCache*/
var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Bt(n.value))return 1;var o=re(e,this,t,n,!1);return a(r,t,o),2}function te(e,t,n,r){
/*ThouShaltNotCache*/
var i=re(e,this,t,n);return e.defineProperty_(t,i,r)}function ne(e,t){var r,i=t.kind,o=t.name,s=t.addInitializer,a=this,u=function(e){
/*ThouShaltNotCache*/
var t,n,r,i;return qe(null!=(t=null==(n=a.options_)?void 0:n.name)?t:o.toString(),e,null!=(r=null==(i=a.options_)?void 0:i.autoAction)&&r)};return"field"==i?function(e){
/*ThouShaltNotCache*/
var t,n=e;return Bt(n)||(n=u(n)),null!=(t=a.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==i?(Bt(e)||(e=u(e)),null!=(r=this.options_)&&r.bound&&s(function(){
/*ThouShaltNotCache*/
var e=this,t=e[o].bind(e);t.isMobxAction=!0,e[o]=t}),e):void n("Cannot apply '"+a.annotationType_+"' to '"+String(o)+"' (kind: "+i+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}function re(e,t,n,r,i){
/*ThouShaltNotCache*/
var o,s,a,u,c,l,h,f;void 0===i&&(i=_t.safeDescriptors),f=r,t.annotationType_,f.value;var d,_=r.value;null!=(o=t.options_)&&o.bound&&(_=_.bind(null!=(d=e.proxy_)?d:e.target_));return{value:qe(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),_,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u,null!=(l=t.options_)&&l.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ie(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:oe,extend_:se,decorate_20223_:ae}}function oe(e,t,n,r){
/*ThouShaltNotCache*/
var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!P(e.target_,t)||!Zt(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Zt(n.value))return 1;var o=ue(e,this,t,n,!1,!1);return a(r,t,o),2}function se(e,t,n,r){
/*ThouShaltNotCache*/
var i,o=ue(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,r)}function ae(e,t){
/*ThouShaltNotCache*/
var n;var r=t.name,i=t.addInitializer;return Zt(e)||(e=Jt(e)),null!=(n=this.options_)&&n.bound&&i(function(){
/*ThouShaltNotCache*/
var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function ue(e,t,n,r,i,o){var s;
/*ThouShaltNotCache*/
void 0===o&&(o=_t.safeDescriptors),s=r,t.annotationType_,s.value;var a,u=r.value;(Zt(u)||(u=Jt(u)),i)&&((u=u.bind(null!=(a=e.proxy_)?a:e.target_)).isMobXFlow=!0);return{value:u,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ce(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:le,extend_:he,decorate_20223_:fe}}function le(e,t,n){
/*ThouShaltNotCache*/
return null===this.extend_(e,t,n,!1)?0:1}function he(e,t,n,r){
/*ThouShaltNotCache*/
return function(e,t,n,r){
/*ThouShaltNotCache*/
t.annotationType_,r.get;0}(0,this,0,n),e.defineComputedProperty_(t,L({},this.options_,{get:n.get,set:n.set}),r)}function fe(e,t){var n=this,r=t.name;return(0,t.addInitializer)(function(){
/*ThouShaltNotCache*/
var t=Bn(this)[H],i=L({},n.options_,{get:e,context:this});i.name||(i.name="ObservableObject."+r.toString()),t.values_.set(r,new Xe(i))}),function(){
/*ThouShaltNotCache*/
return this[H].getObservablePropValue_(r)}}function de(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:_e,extend_:ve,decorate_20223_:pe}}function _e(e,t,n){
/*ThouShaltNotCache*/
return null===this.extend_(e,t,n,!1)?0:1}function ve(e,t,n,r){
/*ThouShaltNotCache*/
var i,o;return function(e,t){
/*ThouShaltNotCache*/
t.annotationType_;0}(0,this),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:Y,r)}function pe(e,t){var n=this,r=t.kind,i=t.name,o=new WeakSet;function s(e,t){
/*ThouShaltNotCache*/
var r,s,a=Bn(e)[H],u=new Fe(t,null!=(r=null==(s=n.options_)?void 0:s.enhancer)?r:Y,"ObservableObject."+i.toString(),!1);a.values_.set(i,u),o.add(e)}if("accessor"==r)return{get:function(){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e.get.call(this)),this[H].getObservablePropValue_(i)},set:function(e){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e),this[H].setObservablePropValue_(i,e)},init:function(e){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e),e}}}var ge="true",be=ye();function ye(e){
/*ThouShaltNotCache*/
return{annotationType_:ge,options_:e,make_:me,extend_:Oe,decorate_20223_:we}}function me(e,t,n,r){
/*ThouShaltNotCache*/
var i,o,s,u;if(n.get)return Be.make_(e,t,n,r);if(n.set){var c=qe(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:c})?0:2:(a(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&"function"==typeof n.value)return m(n.value)?(null!=(u=this.options_)&&u.autoBind?Jt.bound:Jt).make_(e,t,n,r):(null!=(s=this.options_)&&s.autoBind?Lt.bound:Lt).make_(e,t,n,r);var l,h=!1===(null==(i=this.options_)?void 0:i.deep)?Ce.ref:Ce;"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(l=e.proxy_)?l:e.target_));return h.make_(e,t,n,r)}function Oe(e,t,n,r){
/*ThouShaltNotCache*/
var i,o,s;if(n.get)return Be.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:qe(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(s=e.proxy_)?s:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Ce.ref:Ce).extend_(e,t,n,r)}function we(e,t){
/*ThouShaltNotCache*/
n("'"+this.annotationType_+"' cannot be used as a decorator")}var Se={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Ae(e){
/*ThouShaltNotCache*/
return e||Se}Object.freeze(Se);var ke=de("observable"),je=de("observable.ref",{enhancer:J}),xe=de("observable.shallow",{enhancer:function(e,t,n){
/*ThouShaltNotCache*/
return null==e||Kn(e)||An(e)||Pn(e)||Rn(e)?e:Array.isArray(e)?Ce.array(e,{name:n,deep:!1}):y(e)?Ce.object(e,void 0,{name:n,deep:!1}):A(e)?Ce.map(e,{name:n,deep:!1}):k(e)?Ce.set(e,{name:n,deep:!1}):void 0}}),Me=de("observable.struct",{enhancer:function(e,t){return ar(e,t)?t:e}}),Pe=G(ke);function Te(e){
/*ThouShaltNotCache*/
return!0===e.deep?Y:!1===e.deep?J:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:Y;var t,n,r}function Ve(e,t,n){
/*ThouShaltNotCache*/
return z(t)?ke.decorate_20223_(e,t):g(t)?void q(e,t,ke):tn(e)?e:y(e)?Ce.object(e,t,n):Array.isArray(e)?Ce.array(e,t):A(e)?Ce.map(e,t):k(e)?Ce.set(e,t):"object"==typeof e&&null!==e?e:Ce.box(e,t)}o(Ve,Pe);var Ee,Re,Ce=o(Ve,{box:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new Fe(e,Te(n),n.name,!0,n.equals)},array:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return(!1===_t.useProxies||!1===n.proxy?er:gn)(e,Te(n),n.name)},map:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new Mn(e,Te(n),n.name)},set:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new En(e,Te(n),n.name)},object:function(e,t,n){
/*ThouShaltNotCache*/
return ir(function(){
/*ThouShaltNotCache*/
return Wt(!1===_t.useProxies||!1===(null==n?void 0:n.proxy)?Bn({},n):function(e,t){
/*ThouShaltNotCache*/
var n,r;return d(),e=Bn(e,t),null!=(r=(n=e[H]).proxy_)?r:n.proxy_=new Proxy(e,on)}({},n),e,t)})},ref:G(je),shallow:G(xe),deep:Pe,struct:G(Me)}),De="computed",Ne=ce(De),Le=ce("computed.struct",{equals:X.structural}),Be=function(e,t){
/*ThouShaltNotCache*/
if(z(t))return Ne.decorate_20223_(e,t);if(g(t))return q(e,t,Ne);if(y(e))return G(ce(De,e));var n=y(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Xe(n)};Object.assign(Be,Ne),Be.struct=G(Le);var Ue=0,Ie=1,Ke=null!=(Ee=null==(Re=s(function(){},"name"))?void 0:Re.configurable)&&Ee,Ge={value:"action",configurable:!0,writable:!1,enumerable:!1};function qe(e,t,n,r){function i(){
/*ThouShaltNotCache*/
return ze(e,n,t,r||this,arguments)}
/*ThouShaltNotCache*/
return void 0===n&&(n=!1),i.isMobxAction=!0,i.toString=function(){
/*ThouShaltNotCache*/
return t.toString()},Ke&&(Ge.value=e,a(i,"name",Ge)),i}function ze(e,t,r,i,o){
/*ThouShaltNotCache*/
var s=function(e,t){
/*ThouShaltNotCache*/
var n=!1,r=0;0;var i=_t.trackingDerivation,o=!t||!i;bt();var s=_t.allowStateChanges;o&&(st(),s=We(!0));var a=ut(!0),u={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:s,prevAllowStateReads_:a,notifySpy_:n,startTime_:r,actionId_:Ie++,parentActionId_:Ue};return Ue=u.actionId_,u}(0,t);try{return r.apply(i,o)}catch(e){throw s.error_=e,e}finally{!function(e){
/*ThouShaltNotCache*/
Ue!==e.actionId_&&n(30);Ue=e.parentActionId_,void 0!==e.error_&&(_t.suppressReactionErrors=!0);$e(e.prevAllowStateChanges_),ct(e.prevAllowStateReads_),yt(),e.runAsAction_&&at(e.prevDerivation_);0;_t.suppressReactionErrors=!1}(s)}}function He(e,t){
/*ThouShaltNotCache*/
var n=We(e);try{return t()}finally{$e(n)}}function We(e){
/*ThouShaltNotCache*/
var t=_t.allowStateChanges;return _t.allowStateChanges=e,t}function $e(e){
/*ThouShaltNotCache*/
_t.allowStateChanges=e}var Fe=function(e){
/*ThouShaltNotCache*/
function t(t,n,r,i,o){
/*ThouShaltNotCache*/
var s;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=X.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=o,s.value_=n(t,void 0,r),s}B(t,e);var n=t.prototype;return n.dehanceValue=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){
/*ThouShaltNotCache*/
this.value_;if((e=this.prepareNewValue_(e))!==_t.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(
/*ThouShaltNotCache*/
nt(this),sn(this)){var t=un(this,{object:this,type:_n,newValue:e});if(!t)return _t.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?_t.UNCHANGED:e},n.setNewValue_=function(e){
/*ThouShaltNotCache*/
var t=this.value_;this.value_=e,this.reportChanged(),cn(this)&&hn(this,{type:_n,object:this,newValue:e,oldValue:t})},n.get=function(){
/*ThouShaltNotCache*/
return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},n.observe_=function(e,t){
/*ThouShaltNotCache*/
return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:_n,newValue:this.value_,oldValue:void 0}),ln(this,e)},n.raw=function(){
/*ThouShaltNotCache*/
return this.value_},n.toJSON=function(){
/*ThouShaltNotCache*/
return this.get()},n.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.value_+"]"},n.valueOf=function(){
/*ThouShaltNotCache*/
return M(this.get())},n[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},t}(W),Xe=function(){
/*ThouShaltNotCache*/
function e(e){
/*ThouShaltNotCache*/
this.dependenciesState_=Ye.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ye.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ze(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Je.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||n(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=qe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?X.structural:X.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){
/*ThouShaltNotCache*/
!function(e){
/*ThouShaltNotCache*/
if(e.lowestObserverState_!==Ye.UP_TO_DATE_)return;e.lowestObserverState_=Ye.POSSIBLY_STALE_,e.observers_.forEach(function(e){
/*ThouShaltNotCache*/
e.dependenciesState_===Ye.UP_TO_DATE_&&(e.dependenciesState_=Ye.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.get=function(){if(
/*ThouShaltNotCache*/
this.isComputing&&n(32,this.name_,this.derivation),0!==_t.inBatch||0!==this.observers_.size||this.keepAlive_){if(mt(this),tt(this)){var e=_t.trackingContext;this.keepAlive_&&!e&&(_t.trackingContext=this),this.trackAndCompute()&&function(e){
/*ThouShaltNotCache*/
if(e.lowestObserverState_===Ye.STALE_)return;e.lowestObserverState_=Ye.STALE_,e.observers_.forEach(function(t){
/*ThouShaltNotCache*/
t.dependenciesState_===Ye.POSSIBLY_STALE_?t.dependenciesState_=Ye.STALE_:t.dependenciesState_===Ye.UP_TO_DATE_&&(e.lowestObserverState_=Ye.UP_TO_DATE_)})}(this),_t.trackingContext=e}}else tt(this)&&(this.warnAboutUntrackedRead_(),bt(),this.value_=this.computeValue_(!1),yt());var t=this.value_;if(et(t))throw t.cause;return t},t.set=function(e){
/*ThouShaltNotCache*/
if(this.setter_){this.isRunningSetter&&n(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else n(34,this.name_)},t.trackAndCompute=function(){
/*ThouShaltNotCache*/
var e=this.value_,t=this.dependenciesState_===Ye.NOT_TRACKING_,n=this.computeValue_(!0),r=t||et(e)||et(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){
/*ThouShaltNotCache*/
this.isComputing=!0;var t,n=We(!1);if(e)t=rt(this,this.derivation,this.scope_);else if(!0===_t.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Ze(e)}return $e(n),this.isComputing=!1,t},t.suspend_=function(){
/*ThouShaltNotCache*/
this.keepAlive_||(it(this),this.value_=void 0)},t.observe_=function(e,t){
/*ThouShaltNotCache*/
var n=this,r=!0,i=void 0;return Ut(function(){
/*ThouShaltNotCache*/
var o=n.get();if(!r||t){var s=st();e({observableKind:"computed",debugObjectName:n.name_,type:_n,object:n,newValue:o,oldValue:i}),at(s)}r=!1,i=o})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){
/*ThouShaltNotCache*/
return M(this.get())},t[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},D(e,[{key:"isComputing",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isComputingMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isRunningSetterMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isBeingObservedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isPendingUnobservationMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();Xe.isComputingMask_=1,Xe.isRunningSetterMask_=2,Xe.isBeingObservedMask_=4,Xe.isPendingUnobservationMask_=8,Xe.diffValueMask_=16;var Ye,Je,Qe=S("ComputedValue",Xe);!function(e){
/*ThouShaltNotCache*/
e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Ye||(Ye={})),function(e){
/*ThouShaltNotCache*/
e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Je||(Je={}));var Ze=function(e){
/*ThouShaltNotCache*/
this.cause=void 0,this.cause=e};function et(e){
/*ThouShaltNotCache*/
return e instanceof Ze}function tt(e){
/*ThouShaltNotCache*/
switch(e.dependenciesState_){case Ye.UP_TO_DATE_:return!1;case Ye.NOT_TRACKING_:case Ye.STALE_:return!0;case Ye.POSSIBLY_STALE_:for(var t=ut(!0),n=st(),r=e.observing_,i=r.length,o=0;o<i;o++){var s=r[o];if(Qe(s)){if(_t.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return at(n),ct(t),!0}if(e.dependenciesState_===Ye.STALE_)return at(n),ct(t),!0}}return lt(e),at(n),ct(t),!1}}function nt(e){}function rt(e,t,n){
/*ThouShaltNotCache*/
var r=ut(!0);lt(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++_t.runId;var i,o=_t.trackingDerivation;if(_t.trackingDerivation=e,_t.inBatch++,!0===_t.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Ze(e)}return _t.inBatch--,_t.trackingDerivation=o,function(e){for(
/*ThouShaltNotCache*/
var t=e.observing_,n=e.observing_=e.newObserving_,r=Ye.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,s=0;s<o;s++){var a=n[s];0===a.diffValue&&(a.diffValue=1,i!==s&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var u=t[o];0===u.diffValue&&pt(u,e),u.diffValue=0}for(;i--;){var c=n[i];1===c.diffValue&&(c.diffValue=0,vt(c,e))}r!==Ye.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),ct(r),i}function it(e){
/*ThouShaltNotCache*/
var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)pt(t[n],e);e.dependenciesState_=Ye.NOT_TRACKING_}function ot(e){
/*ThouShaltNotCache*/
var t=st();try{return e()}finally{at(t)}}function st(){
/*ThouShaltNotCache*/
var e=_t.trackingDerivation;return _t.trackingDerivation=null,e}function at(e){
/*ThouShaltNotCache*/
_t.trackingDerivation=e}function ut(e){
/*ThouShaltNotCache*/
var t=_t.allowStateReads;return _t.allowStateReads=e,t}function ct(e){
/*ThouShaltNotCache*/
_t.allowStateReads=e}function lt(e){
/*ThouShaltNotCache*/
if(e.dependenciesState_!==Ye.UP_TO_DATE_){e.dependenciesState_=Ye.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ye.UP_TO_DATE_}}var ht=function(){
/*ThouShaltNotCache*/
this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},ft=!0,dt=!1,_t=function(){
/*ThouShaltNotCache*/
var e=i();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ft=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ht).version&&(ft=!1),ft?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ht):(setTimeout(function(){
/*ThouShaltNotCache*/
dt||n(35)},1),new ht)}();function vt(e,t){
/*ThouShaltNotCache*/
e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function pt(e,t){
/*ThouShaltNotCache*/
e.observers_.delete(t),0===e.observers_.size&&gt(e)}function gt(e){
/*ThouShaltNotCache*/
!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,_t.pendingUnobservations.push(e))}function bt(){
/*ThouShaltNotCache*/
_t.inBatch++}function yt(){
/*ThouShaltNotCache*/
if(0===--_t.inBatch){kt();for(var e=_t.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Xe&&n.suspend_())}_t.pendingUnobservations=[]}}function mt(e){var t=_t.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&_t.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&_t.inBatch>0&&gt(e),!1)}function Ot(e){
/*ThouShaltNotCache*/
e.lowestObserverState_!==Ye.STALE_&&(e.lowestObserverState_=Ye.STALE_,e.observers_.forEach(function(e){
/*ThouShaltNotCache*/
e.dependenciesState_===Ye.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ye.STALE_}))}var wt=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ye.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Je.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){
/*ThouShaltNotCache*/
this.schedule_()},t.schedule_=function(){
/*ThouShaltNotCache*/
this.isScheduled||(this.isScheduled=!0,_t.pendingReactions.push(this),kt())},t.runReaction_=function(){
/*ThouShaltNotCache*/
if(!this.isDisposed){bt(),this.isScheduled=!1;var e=_t.trackingContext;if(_t.trackingContext=this,tt(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}_t.trackingContext=e,yt()}},t.track=function(e){
/*ThouShaltNotCache*/
if(!this.isDisposed){bt();0,this.isRunning=!0;var t=_t.trackingContext;_t.trackingContext=this;var n=rt(this,e,void 0);_t.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&it(this),et(n)&&this.reportExceptionInDerivation_(n.cause),yt()}},t.reportExceptionInDerivation_=function(e){
/*ThouShaltNotCache*/
var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(_t.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";_t.suppressReactionErrors||console.error(n,e),_t.globalReactionErrorHandlers.forEach(function(n){
/*ThouShaltNotCache*/
return n(e,t)})}},t.dispose=function(){
/*ThouShaltNotCache*/
this.isDisposed||(this.isDisposed=!0,this.isRunning||(bt(),it(this),yt()))},t.getDisposer_=function(e){
/*ThouShaltNotCache*/
var t=this,n=function n(){
/*ThouShaltNotCache*/
t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[H]=this,n},t.toString=function(){
/*ThouShaltNotCache*/
return"Reaction["+this.name_+"]"},t.trace=function(e){
/*ThouShaltNotCache*/
void 0===e&&(e=!1)},D(e,[{key:"isDisposed",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isDisposedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isScheduledMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isTrackPendingMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isRunningMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();wt.isDisposedMask_=1,wt.isScheduledMask_=2,wt.isTrackPendingMask_=4,wt.isRunningMask_=8,wt.diffValueMask_=16;var St=100,At=function(e){
/*ThouShaltNotCache*/
return e()};function kt(){
/*ThouShaltNotCache*/
_t.inBatch>0||_t.isRunningReactions||At(jt)}function jt(){
/*ThouShaltNotCache*/
_t.isRunningReactions=!0;for(var e=_t.pendingReactions,t=0;e.length>0;){++t===St&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}_t.isRunningReactions=!1}var xt=S("Reaction",wt);var Mt="action",Pt="autoAction",Tt="<unnamed action>",Vt=Z(Mt),Et=Z("action.bound",{bound:!0}),Rt=Z(Pt,{autoAction:!0}),Ct=Z("autoAction.bound",{autoAction:!0,bound:!0});function Dt(e){return function(t,n){
/*ThouShaltNotCache*/
return p(t)?qe(t.name||Tt,t,e):p(n)?qe(t,n,e):z(n)?(e?Rt:Vt).decorate_20223_(t,n):g(n)?q(t,n,e?Rt:Vt):g(t)?G(Z(e?Pt:Mt,{name:t,autoAction:e})):void 0}}var Nt=Dt(!1);Object.assign(Nt,Vt);var Lt=Dt(!0);function Bt(e){
/*ThouShaltNotCache*/
return p(e)&&!0===e.isMobxAction}function Ut(e,t){
/*ThouShaltNotCache*/
var n,r,i,o;void 0===t&&(t=l);var s,a=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)s=new wt(a,function(){
/*ThouShaltNotCache*/
this.track(h)},t.onError,t.requiresObservable);else{var u=Kt(t),c=!1;s=new wt(a,function(){
/*ThouShaltNotCache*/
c||(c=!0,u(function(){
/*ThouShaltNotCache*/
c=!1,s.isDisposed||s.track(h)}))},t.onError,t.requiresObservable)}function h(){
/*ThouShaltNotCache*/
e(s)}return null!=(i=t)&&null!=(i=i.signal)&&i.aborted||s.schedule_(),s.getDisposer_(null==(o=t)?void 0:o.signal)}Object.assign(Lt,Rt),Nt.bound=G(Et),Lt.bound=G(Ct);var It=function(e){
/*ThouShaltNotCache*/
return e()};function Kt(e){
/*ThouShaltNotCache*/
return e.scheduler?e.scheduler:e.delay?function(t){
/*ThouShaltNotCache*/
return setTimeout(t,e.delay)}:It}var Gt="onBO",qt="onBUO";function zt(e,t,n){
/*ThouShaltNotCache*/
return Ht(qt,e,t,n)}function Ht(e,t,n,r){
/*ThouShaltNotCache*/
var i="function"==typeof r?tr(t,n):tr(t),o=p(r)?r:n,s=e+"L";return i[s]?i[s].add(o):i[s]=new Set([o]),function(){
/*ThouShaltNotCache*/
var e=i[s];e&&(e.delete(o),0===e.size&&delete i[s])}}function Wt(e,t,n,r){var i=T(t);return ir(function(){
/*ThouShaltNotCache*/
var t=Bn(e,r)[H];x(i).forEach(function(e){
/*ThouShaltNotCache*/
t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}var $t=0;function Ft(){
/*ThouShaltNotCache*/
this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var Xt=ie("flow"),Yt=ie("flow.bound",{bound:!0}),Jt=Object.assign(function(e,t){
/*ThouShaltNotCache*/
if(z(t))return Xt.decorate_20223_(e,t);if(g(t))return q(e,t,Xt);var n=e,r=n.name||"<unnamed flow>",i=function(){
/*ThouShaltNotCache*/
var e,t=arguments,i=++$t,o=Nt(r+" - runid: "+i+" - init",n).apply(this,t),s=void 0,a=new Promise(function(t,n){
/*ThouShaltNotCache*/
var a=0;function u(e){var t;
/*ThouShaltNotCache*/
s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.next).call(o,e)}catch(e){return n(e)}l(t)}function c(e){var t;
/*ThouShaltNotCache*/
s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.throw).call(o,e)}catch(e){return n(e)}l(t)}function l(e){
/*ThouShaltNotCache*/
if(!p(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)});return a.cancel=Nt(r+" - runid: "+i+" - cancel",function(){
/*ThouShaltNotCache*/
try{s&&Qt(s);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(v,v),Qt(n),e(new Ft)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},Xt);function Qt(e){
/*ThouShaltNotCache*/
p(e.cancel)&&e.cancel()}function Zt(e){
/*ThouShaltNotCache*/
return!0===(null==e?void 0:e.isMobXFlow)}function en(e,t){
/*ThouShaltNotCache*/
return!!e&&(void 0!==t?!!Kn(e)&&e[H].values_.has(t):Kn(e)||!!e[H]||$(e)||xt(e)||Qe(e))}function tn(e){return en(e)}function nn(e,t){
/*ThouShaltNotCache*/
void 0===t&&(t=void 0),bt();try{return e.apply(t)}finally{yt()}}function rn(e){
/*ThouShaltNotCache*/
return e[H]}Jt.bound=G(Yt);var on={has:function(e,t){return rn(e).has_(t)},get:function(e,t){
/*ThouShaltNotCache*/
return rn(e).get_(t)},set:function(e,t,n){
/*ThouShaltNotCache*/
var r;return!!g(t)&&(null==(r=rn(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){
/*ThouShaltNotCache*/
var n;return!!g(t)&&(null==(n=rn(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){
/*ThouShaltNotCache*/
var r;return null==(r=rn(e).defineProperty_(t,n))||r},ownKeys:function(e){return rn(e).ownKeys_()},preventExtensions:function(e){
/*ThouShaltNotCache*/
n(13)}};function sn(e){
/*ThouShaltNotCache*/
return void 0!==e.interceptors_&&e.interceptors_.length>0}function an(e,t){
/*ThouShaltNotCache*/
var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),_(function(){
/*ThouShaltNotCache*/
var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function un(e,t){
/*ThouShaltNotCache*/
var r=st();try{for(var i=[].concat(e.interceptors_||[]),o=0,s=i.length;o<s&&((t=i[o](t))&&!t.type&&n(14),t);o++);return t}finally{at(r)}}function cn(e){
/*ThouShaltNotCache*/
return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function ln(e,t){
/*ThouShaltNotCache*/
var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),_(function(){
/*ThouShaltNotCache*/
var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function hn(e,t){
/*ThouShaltNotCache*/
var n=st(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);at(n)}}function fn(e,t,n){
/*ThouShaltNotCache*/
return ir(function(){
/*ThouShaltNotCache*/
var r=Bn(e,n)[H];null!=t||(t=function(e){
/*ThouShaltNotCache*/
return P(e,K)||O(e,K,L({},e[K])),e[K]}(e)),x(t).forEach(function(e){
/*ThouShaltNotCache*/
return r.make_(e,t[e])})}),e}var dn="splice",_n="update",vn={get:function(e,t){
/*ThouShaltNotCache*/
var n=e[H];return t===H?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?P(bn,t)?bn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){
/*ThouShaltNotCache*/
var r=e[H];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){
/*ThouShaltNotCache*/
n(15)}},pn=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new W(e),this.enhancer_=function(e,n){
/*ThouShaltNotCache*/
return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.observe_=function(e,t){
/*ThouShaltNotCache*/
return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ln(this,e)},t.getArrayLength_=function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){
/*ThouShaltNotCache*/
("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i<e-t;i++)r[i]=void 0;this.spliceWithArray_(t,0,r)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){
/*ThouShaltNotCache*/
e!==this.lastKnownLength_&&n(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){
/*ThouShaltNotCache*/
var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=c),sn(this)){var o=un(this,{object:this.proxy_,type:dn,index:e,removedCount:t,added:n});if(!o)return c;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){
/*ThouShaltNotCache*/
return r.enhancer_(e,void 0)}),this.legacyMode_){var s=n.length-t;this.updateArrayLength_(i,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;
/*ThouShaltNotCache*/
if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<o.length;a++)this.values_[e+n.length+a]=o[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){
/*ThouShaltNotCache*/
var r=!this.owned_&&!1,i=cn(this),o=i||r?{observableKind:"array",object:this.proxy_,type:_n,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&hn(this,o)},t.notifyArraySplice_=function(e,t,n){
/*ThouShaltNotCache*/
var r=!this.owned_&&!1,i=cn(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:dn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&hn(this,o)},t.get_=function(e){
/*ThouShaltNotCache*/
if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){
/*ThouShaltNotCache*/
var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e<r.length){this.atom_;var i=r[e];if(sn(this)){var o=un(this,{type:_n,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,i))!==i&&(r[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var s=new Array(e+1-r.length),a=0;a<s.length-1;a++)s[a]=void 0;s[s.length-1]=t,this.spliceWithArray_(r.length,0,s)}},e}();function gn(e,t,n,r){
/*ThouShaltNotCache*/
return void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),d(),ir(function(){
/*ThouShaltNotCache*/
var i=new pn(n,t,r,!1);w(i.values_,H,i);var o=new Proxy(i.values_,vn);return i.proxy_=o,e&&e.length&&i.spliceWithArray_(0,0,e),o})}var bn={clear:function(){
/*ThouShaltNotCache*/
return this.splice(0)},replace:function(e){
/*ThouShaltNotCache*/
var t=this[H];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){
/*ThouShaltNotCache*/
return this.slice()},splice:function(e,t){
/*ThouShaltNotCache*/
for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[H];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){
/*ThouShaltNotCache*/
return this[H].spliceWithArray_(e,t,n)},push:function(){for(
/*ThouShaltNotCache*/
var e=this[H],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){
/*ThouShaltNotCache*/
return this.splice(Math.max(this[H].values_.length-1,0),1)[0]},shift:function(){
/*ThouShaltNotCache*/
return this.splice(0,1)[0]},unshift:function(){for(
/*ThouShaltNotCache*/
var e=this[H],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){
/*ThouShaltNotCache*/
return _t.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){
/*ThouShaltNotCache*/
_t.trackingDerivation&&n(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){
/*ThouShaltNotCache*/
var t=this[H],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function yn(e,t){
/*ThouShaltNotCache*/
"function"==typeof Array.prototype[e]&&(bn[e]=t(e))}function mn(e){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var t=this[H];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function On(e){
/*ThouShaltNotCache*/
return function(t,n){
/*ThouShaltNotCache*/
var r=this,i=this[H];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){
/*ThouShaltNotCache*/
return t.call(n,e,i,r)})}}function wn(e){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var t=this,n=this[H];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){
/*ThouShaltNotCache*/
return i(e,n,r,t)},r[e].apply(r,arguments)}}yn("at",mn),yn("concat",mn),yn("flat",mn),yn("includes",mn),yn("indexOf",mn),yn("join",mn),yn("lastIndexOf",mn),yn("slice",mn),yn("toString",mn),yn("toLocaleString",mn),yn("toSorted",mn),yn("toSpliced",mn),yn("with",mn),yn("every",On),yn("filter",On),yn("find",On),yn("findIndex",On),yn("findLast",On),yn("findLastIndex",On),yn("flatMap",On),yn("forEach",On),yn("map",On),yn("some",On),yn("toReversed",On),yn("reduce",wn),yn("reduceRight",wn);var Sn=S("ObservableArrayAdministration",pn);function An(e){
/*ThouShaltNotCache*/
return b(e)&&Sn(e[H])}var kn={},jn="add",xn="delete",Mn=function(){
/*ThouShaltNotCache*/
function e(e,t,r){
/*ThouShaltNotCache*/
var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[H]=kn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=r,p(Map)||n(18),ir(function(){
/*ThouShaltNotCache*/
i.keysAtom_=F("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){
/*ThouShaltNotCache*/
return this.data_.has(e)},t.has=function(e){
/*ThouShaltNotCache*/
var t=this;if(!_t.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Fe(this.has_(e),J,"ObservableMap.key?",!1);this.hasMap_.set(e,r),zt(r,function(){
/*ThouShaltNotCache*/
return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){
/*ThouShaltNotCache*/
var n=this.has_(e);if(sn(this)){var r=un(this,{type:n?_n:jn,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){
/*ThouShaltNotCache*/
var t=this;if((this.keysAtom_,sn(this))&&!un(this,{type:xn,object:this,name:e}))return!1;if(this.has_(e)){var n=cn(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:xn,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return nn(function(){
/*ThouShaltNotCache*/
var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.updateValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:_n,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&hn(this,i)}},t.addValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this;this.keysAtom_,nn(function(){
/*ThouShaltNotCache*/
var r,i=new Fe(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:jn,object:this,name:e,newValue:t}:null;r&&hn(this,i)},t.get=function(e){
/*ThouShaltNotCache*/
return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){
/*ThouShaltNotCache*/
var e=this,t=this.keys();return Tn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){
/*ThouShaltNotCache*/
var e=this,t=this.keys();return Tn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.entries()},t.forEach=function(e,t){
/*ThouShaltNotCache*/
for(var n,r=N(this);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];e.call(t,s,o,this)}},t.merge=function(e){
/*ThouShaltNotCache*/
var t=this;return Pn(e)&&(e=new Map(e)),nn(function(){var r,i,o;
/*ThouShaltNotCache*/
y(e)?function(e){
/*ThouShaltNotCache*/
var t=Object.keys(e);if(!j)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){
/*ThouShaltNotCache*/
return u.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){
/*ThouShaltNotCache*/
return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){
/*ThouShaltNotCache*/
var n=e[0],r=e[1];return t.set(n,r)}):A(e)?(r=e,i=Object.getPrototypeOf(r),o=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(o)&&n(19,e),e.forEach(function(e,n){
/*ThouShaltNotCache*/
return t.set(n,e)})):null!=e&&n(20,e)}),this},t.clear=function(){
/*ThouShaltNotCache*/
var e=this;nn(function(){
/*ThouShaltNotCache*/
ot(function(){
/*ThouShaltNotCache*/
for(var t,n=N(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){
/*ThouShaltNotCache*/
var t=this;return nn(function(){for(
/*ThouShaltNotCache*/
var r,i=function(e){
/*ThouShaltNotCache*/
if(A(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(y(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,s=!1,a=N(t.data_.keys());!(r=a()).done;){var u=r.value;if(!i.has(u))if(t.delete(u))s=!0;else{var c=t.data_.get(u);o.set(u,c)}}for(var l,h=N(i.entries());!(l=h()).done;){var f=l.value,d=f[0],_=f[1],v=t.data_.has(d);if(t.set(d,_),t.data_.has(d)){var p=t.data_.get(d);o.set(d,p),v||(s=!0)}}if(!s)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),b=o.keys(),m=g.next(),O=b.next();!m.done;){if(m.value!==O.value){t.keysAtom_.reportChanged();break}m=g.next(),O=b.next()}t.data_=o}),this},t.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableMap]"},t.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},D(e,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Map"}}])}(),Pn=S("ObservableMap",Mn);function Tn(e){
/*ThouShaltNotCache*/
return e[Symbol.toStringTag]="MapIterator",hr(e)}var Vn={},En=function(){
/*ThouShaltNotCache*/
function e(e,t,r){
/*ThouShaltNotCache*/
var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[H]=Vn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,p(Set)||n(22),this.enhancer_=function(e,n){
/*ThouShaltNotCache*/
return t(e,n,r)},ir(function(){
/*ThouShaltNotCache*/
i.atom_=F(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){
/*ThouShaltNotCache*/
var e=this;nn(function(){
/*ThouShaltNotCache*/
ot(function(){
/*ThouShaltNotCache*/
for(var t,n=N(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){
/*ThouShaltNotCache*/
for(var n,r=N(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){
/*ThouShaltNotCache*/
var t=this;if(this.atom_,sn(this)){var n=un(this,{type:jn,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){nn(function(){
/*ThouShaltNotCache*/
t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r=!1,i=cn(this),o=i?{observableKind:"set",debugObjectName:this.name_,type:jn,object:this,newValue:e}:null;r,i&&hn(this,o)}return this},t.delete=function(e){
/*ThouShaltNotCache*/
var t=this;if(sn(this)&&!un(this,{type:xn,object:this,oldValue:e}))return!1;if(this.has(e)){var n=cn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:xn,object:this,oldValue:e}:null;return nn(function(){
/*ThouShaltNotCache*/
t.atom_.reportChanged(),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.has=function(e){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){
/*ThouShaltNotCache*/
var e=this.values();return Cn({next:function(){
/*ThouShaltNotCache*/
var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){
/*ThouShaltNotCache*/
return this.values()},t.values=function(){
/*ThouShaltNotCache*/
this.atom_.reportObserved();var e=this,t=this.data_.values();return Cn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){
/*ThouShaltNotCache*/
return new Set(this).difference(e)},t.symmetricDifference=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){
/*ThouShaltNotCache*/
return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){
/*ThouShaltNotCache*/
return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){
/*ThouShaltNotCache*/
var t=this;return Rn(e)&&(e=new Set(e)),nn(function(){
/*ThouShaltNotCache*/
Array.isArray(e)||k(e)?(t.clear(),e.forEach(function(e){
/*ThouShaltNotCache*/
return t.add(e)})):null!=e&&n("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},t.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableSet]"},t[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.values()},D(e,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Set"}}])}(),Rn=S("ObservableSet",En);function Cn(e){
/*ThouShaltNotCache*/
return e[Symbol.toStringTag]="SetIterator",hr(e)}var Dn=Object.create(null),Nn="remove",Ln=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===t&&(t=new Map),void 0===r&&(r=be),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new W("ObservableObject.keys"),this.isPlainObject_=y(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){
/*ThouShaltNotCache*/
return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this.values_.get(e);if(n instanceof Xe)return n.set(t),!0;if(sn(this)){var r=un(this,{type:_n,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var i=cn(this),o=i?{type:_n,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&hn(this,o)}return!0},t.get_=function(e){
/*ThouShaltNotCache*/
return _t.trackingDerivation&&!P(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){
/*ThouShaltNotCache*/
return void 0===n&&(n=!1),P(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){
/*ThouShaltNotCache*/
if(!_t.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Fe(e in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(
/*ThouShaltNotCache*/
!0===t&&(t=this.defaultAnnotation_),!1!==t){if(qn(this,t,e),!(e in this.target_)){var r;if(null!=(r=this.target_[K])&&r[e])return;n(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==u;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Gn(this,t,e)}},t.extend_=function(e,t,n,r){if(
/*ThouShaltNotCache*/
void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);qn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Gn(this,n,e),i},t.defineProperty_=function(e,t,n){
/*ThouShaltNotCache*/
void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=L({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{yt()}return!0},t.defineObservableProperty_=function(e,t,n,r){
/*ThouShaltNotCache*/
void 0===r&&(r=!1),this.keysAtom_;try{bt();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t});if(!o)return null;t=o.newValue}var s=In(e),u={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,u))return!1}else a(this.target_,e,u);var c=new Fe(t,n,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{yt()}return!0},t.defineComputedProperty_=function(e,t,n){
/*ThouShaltNotCache*/
void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=In(e),o={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new Xe(t)),this.notifyPropertyAddition_(e,void 0)}finally{yt()}return!0},t.delete_=function(e,t){if(
/*ThouShaltNotCache*/
void 0===t&&(t=!1),this.keysAtom_,!P(this.target_,e))return!0;if(sn(this)&&!un(this,{object:this.proxy_||this.target_,name:e,type:Nn}))return null;try{var n;bt();var r,i=cn(this),o=this.values_.get(e),a=void 0;if(!o&&i)a=null==(r=s(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o&&(this.values_.delete(e),o instanceof Fe&&(a=o.value_),Ot(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i){var u={type:Nn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};0,i&&hn(this,u)}}finally{yt()}return!0},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.notifyPropertyAddition_=function(e,t){
/*ThouShaltNotCache*/
var n,r=cn(this);if(r){var i=r?{type:jn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,r&&hn(this,i)}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),x(this.target_)},t.keys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Bn(e,t){
/*ThouShaltNotCache*/
var n;if(P(e,H))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Ln(e,new Map,String(r),function(e){
/*ThouShaltNotCache*/
var t;return e?null!=(t=e.defaultDecorator)?t:ye(e):void 0}(t));return O(e,H,i),e}var Un=S("ObservableObjectAdministration",Ln);function In(e){
/*ThouShaltNotCache*/
return Dn[e]||(Dn[e]={get:function(){
/*ThouShaltNotCache*/
return this[H].getObservablePropValue_(e)},set:function(t){
/*ThouShaltNotCache*/
return this[H].setObservablePropValue_(e,t)}})}function Kn(e){
/*ThouShaltNotCache*/
return!!b(e)&&Un(e[H])}function Gn(e,t,n){
/*ThouShaltNotCache*/
var r;null==(r=e.target_[K])||delete r[n]}function qn(e,t,n){}var zn,Hn,Wn=Jn(0),$n=function(){
/*ThouShaltNotCache*/
var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){
/*ThouShaltNotCache*/
e=!0}}),Object.create(t)[0]=1,!1===e}(),Fn=0,Xn=function(){};zn=Xn,Hn=Array.prototype,
/*ThouShaltNotCache*/
Object.setPrototypeOf?Object.setPrototypeOf(zn.prototype,Hn):void 0!==zn.prototype.__proto__?zn.prototype.__proto__=Hn:zn.prototype=Hn;var Yn=function(e){
/*ThouShaltNotCache*/
function t(t,n,r,i){
/*ThouShaltNotCache*/
var o;return void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this,ir(function(){
/*ThouShaltNotCache*/
var e=new pn(r,n,i,!0);e.proxy_=o,w(o,H,e),t&&t.length&&o.spliceWithArray(0,0,t),$n&&Object.defineProperty(o,"0",Wn)}),o}B(t,e);var n=t.prototype;return n.concat=function(){
/*ThouShaltNotCache*/
this[H].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){
/*ThouShaltNotCache*/
return An(e)?e.slice():e}))},n[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
var e=this,t=0;return hr({next:function(){
/*ThouShaltNotCache*/
return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},D(t,[{key:"length",get:function(){
/*ThouShaltNotCache*/
return this[H].getArrayLength_()},set:function(e){
/*ThouShaltNotCache*/
this[H].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Array"}}])}(Xn);function Jn(e){
/*ThouShaltNotCache*/
return{enumerable:!1,configurable:!0,get:function(){
/*ThouShaltNotCache*/
return this[H].get_(e)},set:function(t){
/*ThouShaltNotCache*/
this[H].set_(e,t)}}}function Qn(e){
/*ThouShaltNotCache*/
a(Yn.prototype,""+e,Jn(e))}function Zn(e){
/*ThouShaltNotCache*/
if(e>Fn){for(var t=Fn;t<e+100;t++)Qn(t);Fn=e}}function er(e,t,n){
/*ThouShaltNotCache*/
return new Yn(e,t,n)}function tr(e,t){
/*ThouShaltNotCache*/
if("object"==typeof e&&null!==e){if(An(e))return void 0!==t&&n(23),e[H].atom_;if(Rn(e))return e.atom_;if(Pn(e)){if(void 0===t)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||n(25,t,rr(e)),r}if(Kn(e)){if(!t)return n(26);var i=e[H].values_.get(t);return i||n(27,t,rr(e)),i}if($(e)||Qe(e)||xt(e))return e}else if(p(e)&&xt(e[H]))return e[H];n(28)}function nr(e,t){
/*ThouShaltNotCache*/
return e||n(29),void 0!==t?nr(tr(e,t)):$(e)||Qe(e)||xt(e)||Pn(e)||Rn(e)?e:e[H]?e[H]:void n(24,e)}function rr(e,t){
/*ThouShaltNotCache*/
var n;if(void 0!==t)n=tr(e,t);else{if(Bt(e))return e.name;n=Kn(e)||Pn(e)||Rn(e)?nr(e):tr(e)}return n.name_}function ir(e){
/*ThouShaltNotCache*/
var t=st(),n=We(!0);bt();try{return e()}finally{yt(),$e(n),at(t)}}Object.entries(bn).forEach(function(e){
/*ThouShaltNotCache*/
var t=e[0],n=e[1];"concat"!==t&&O(Yn.prototype,t,n)}),Zn(1e3);var or,sr=u.toString;function ar(e,t,n){
/*ThouShaltNotCache*/
return void 0===n&&(n=-1),ur(e,t,n)}function ur(e,t,n,r,i){
/*ThouShaltNotCache*/
if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var s=sr.call(e);if(s!==sr.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=cr(e),t=cr(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(p(u)&&u instanceof u&&p(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return i[l]===t;if(r.push(e),i.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!ur(e[l],t[l],n-1,r,i))return!1}else{var h=Object.keys(e),f=h.length;if(Object.keys(t).length!==f)return!1;for(var d=0;d<f;d++){var _=h[d];if(!P(t,_)||!ur(e[_],t[_],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function cr(e){
/*ThouShaltNotCache*/
return An(e)?e.slice():A(e)||Pn(e)||k(e)||Rn(e)?Array.from(e.entries()):e}var lr=(null==(or=i().Iterator)?void 0:or.prototype)||{};function hr(e){
/*ThouShaltNotCache*/
return e[Symbol.iterator]=fr,Object.assign(Object.create(lr),e)}function fr(){
/*ThouShaltNotCache*/
return this}["Symbol","Map","Set"].forEach(function(e){void 0===i()[e]&&n("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:rr},$mobx:H});class dr{id;name;lastMessage=null;rooms=new Set;status="Online";constructor(e,t){
/*ThouShaltNotCache*/
fn(this,{name:Ce,lastMessage:Ce,rooms:Ce,status:Ce,setName:Nt,setLastMessage:Nt,addRoom:Nt,removeRoom:Nt,setStatus:Nt}),this.id=e,this.name=t}setName(e){
/*ThouShaltNotCache*/
this.name=e}setLastMessage(e){
/*ThouShaltNotCache*/
this.lastMessage=e}addRoom(e){
/*ThouShaltNotCache*/
this.rooms.add(e)}removeRoom(e){
/*ThouShaltNotCache*/
this.rooms.delete(e)}setStatus(e){
/*ThouShaltNotCache*/
this.status=e,this.rooms.forEach(t=>{
/*ThouShaltNotCache*/
t.addStatusUpdate(this,e)})}}class _r{name;people=new Map;messages=[];roomUpdates=[];constructor(e){
/*ThouShaltNotCache*/
fn(this,{name:Ce,people:Ce,messages:Ce,roomUpdates:Ce,messageCount:Be,peopleCount:Be,lastMessage:Be,members:Be,addPerson:Nt,removePerson:Nt,addMessage:Nt,addStatusUpdate:Nt,dispose:Nt}),this.name=e}get messageCount(){
/*ThouShaltNotCache*/
return this.messages.length}get peopleCount(){
/*ThouShaltNotCache*/
return this.people.size}get lastMessage(){
/*ThouShaltNotCache*/
return 0===this.messages.length?null:this.messages[this.messages.length-1]}get members(){
/*ThouShaltNotCache*/
return Array.from(this.people.values())}addPerson(e){
/*ThouShaltNotCache*/
this.people.has(e.id)||(this.people.set(e.id,e),e.addRoom(this))}removePerson(e){
/*ThouShaltNotCache*/
const t=this.people.get(e);t&&(t.removeRoom(this),this.people.delete(e))}addMessage(e){
/*ThouShaltNotCache*/
this.messages.push(e),e.author.setLastMessage(e)}addStatusUpdate(e,t){
/*ThouShaltNotCache*/
this.roomUpdates.push(`${e.name} is now ${t}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(e){
/*ThouShaltNotCache*/
this.people.forEach(e=>e.removeRoom(this)),e&&e.removeRoom(this.name)}}class vr{static _nextId=0;id;text;author;timestamp;static nextId(){
/*ThouShaltNotCache*/
return vr._nextId++}constructor(e,t){
/*ThouShaltNotCache*/
fn(this,{text:Ce,updateText:Nt}),this.id=vr.nextId(),this.text=e,this.author=t,this.timestamp=new Date}updateText(e){
/*ThouShaltNotCache*/
this.text=e}}class pr{lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(e){
/*ThouShaltNotCache*/
fn(this,{lastMessages:Ce,updateLastMessage:Nt,addRoom:Nt,removeRoom:Nt}),e.forEach(e=>this.addRoom(e))}addRoom(e){
/*ThouShaltNotCache*/
const t=function(e,t,n){
/*ThouShaltNotCache*/
var r,i,o;void 0===n&&(n=l);var s,a,u,c=null!=(r=n.name)?r:"Reaction",h=Nt(c,n.onError?(s=n.onError,a=t,function(){
/*ThouShaltNotCache*/
try{return a.apply(this,arguments)}catch(e){s.call(this,e)}}):t),f=!n.scheduler&&!n.delay,d=Kt(n),_=!0,v=!1,p=n.compareStructural?X.structural:n.equals||X.default,g=new wt(c,function(){
/*ThouShaltNotCache*/
_||f?b():v||(v=!0,d(b))},n.onError,n.requiresObservable);function b(){if(
/*ThouShaltNotCache*/
v=!1,!g.isDisposed){var t=!1,r=u;g.track(function(){
/*ThouShaltNotCache*/
var n=He(!1,function(){
/*ThouShaltNotCache*/
return e(g)});t=_||!p(u,n),u=n}),(_&&n.fireImmediately||!_&&t)&&h(u,r,g),_=!1}}return null!=(i=n)&&null!=(i=i.signal)&&i.aborted||g.schedule_(),g.getDisposer_(null==(o=n)?void 0:o.signal)}(()=>e.lastMessage,t=>{
/*ThouShaltNotCache*/
t&&this.updateLastMessage(e.name,t)});this.roomDisposers.set(e.name,t)}removeRoom(e){
/*ThouShaltNotCache*/
this.roomDisposers.has(e)&&(this.roomDisposers.get(e)(),this.roomDisposers.delete(e),this.lastMessages.delete(e))}updateLastMessage(e,t){
/*ThouShaltNotCache*/
this.lastMessages.set(e,t)}}function gr(e){
/*ThouShaltNotCache*/
if(!e)throw new Error("Assertion failure")}function br(){
/*ThouShaltNotCache*/
const e=[],t=(...t)=>e.push(t.join(" ")),n=new _r("Tech Talk"),r=new _r("General Chat"),i=new _r("Large Meeting Room"),o=new dr(1,"Alice"),s=new dr(2,"Bob");n.addPerson(o),n.addPerson(s),r.addPerson(o);const a=[n,r,i],u=new pr(a);t("\n--- Setting up Large Meeting Room ---");const c=[];for(let e=3;e<203;e++){const t=new dr(e,`Person ${e}`);c.push(t),i.addPerson(t)}t(`[INFO] Added ${i.peopleCount} members to the large room.`),i.addPerson(o),i.addPerson(s),t("[INFO] Added Alice and Bob to the Large Meeting Room."),gr(3===o.rooms.size),gr(o.rooms.has(n)&&o.rooms.has(r)&&o.rooms.has(i)),gr(2===s.rooms.size&&s.rooms.has(n)&&s.rooms.has(i)),t("[PASS] Verified Person.rooms associations with Set.");const l=Ut(()=>{
/*ThouShaltNotCache*/
t("\n--- Global Notifications (Last Messages) ---"),0===u.lastMessages.size?t("No messages yet."):u.lastMessages.forEach((e,n)=>{
/*ThouShaltNotCache*/
t(`[${n}] "${e.text}" - ${e.author.name}`)}),t("------------------------------------------")}),h=Ut(()=>{
/*ThouShaltNotCache*/
a.forEach(e=>{
/*ThouShaltNotCache*/
e.roomUpdates.length>0&&t(`[${e.name} Update] ${e.roomUpdates[e.roomUpdates.length-1]}`)})});t("\n--- Status Update Scenario ---"),o.setStatus("Away"),gr(n.roomUpdates.includes("Alice is now Away")),gr(r.roomUpdates.includes("Alice is now Away")),gr(i.roomUpdates.includes("Alice is now Away")),t("[PASS] Verified that status updates are sent to all of Alice's rooms."),s.setStatus("Busy"),gr(n.roomUpdates.includes("Bob is now Busy")),gr(!r.roomUpdates.includes("Bob is now Busy")),gr(i.roomUpdates.includes("Bob is now Busy")),t("[PASS] Verified that status updates are only sent to Bob's rooms."),t("\n--- Sending Messages & Verifying Notifications ---");const f=new vr("First message to Tech Talk!",o);n.addMessage(f),gr(u.lastMessages.get("Tech Talk")===f),t("[PASS] Verified Tech Talk notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,o);r.addMessage(t),gr(u.lastMessages.get("General Chat")===t)}t("[PASS] Verified General Chat notification.");for(let e=0;e<=5;e++)for(const e of c){const t=new vr(`Hi, I am ${e.name}`,e);i.addMessage(t),gr(i.lastMessage==t),gr(u.lastMessages.get("Large Meeting Room")===t)}t("[PASS] Verified Large Meeting Room notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,s);n.addMessage(t),gr(u.lastMessages.get("Tech Talk")===t)}t("[PASS] Verified Tech Talk notification update.");const d=[];for(let e=0;e<10;e++){const t=`General Chat ${e}`,n=new _r(t);d.push(n),u.addRoom(n);for(const e of c.slice(0,10))n.addPerson(e);for(const r of n.members.slice(0,5)){const i=new vr(`ping ${e}`,r);n.addMessage(i),gr(u.lastMessages.get(t)===i)}}return d.forEach(e=>e.dispose(u)),l(),h(),n.dispose(u),r.dispose(u),i.dispose(u),e}}(),MobXBenchmark=t}();
//# sourceMappingURL=bundle.es5.min.js.map

1
mobx/dist/bundle.es5.min.js.map vendored Normal file

File diff suppressed because one or more lines are too long

930
mobx/dist/bundle.es6.js vendored Normal file
View file

@ -0,0 +1,930 @@
(()=>{var __webpack_require__={d:(exports,definition)=>{for(var key in definition)__webpack_require__.o(definition,key)&&!__webpack_require__.o(exports,key)&&Object.defineProperty(exports,key,{enumerable:!0,get:definition[key]})}};__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(obj,prop)=>Object.prototype.hasOwnProperty.call(obj,prop),__webpack_require__.r=exports=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(exports,"__esModule",{value:!0})};var __webpack_exports__={};(()=>{"use strict";__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{runTest:()=>runTest});function die(error){
/*ThouShaltNotCache*/
for(var _len=arguments.length,args=new Array(_len>1?_len-1:0),_key=1;_key<_len;_key++)args[_key-1]=arguments[_key];throw new Error("number"==typeof error?"[MobX] minified error nr: "+error+(args.length?" "+args.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+error)}var mockGlobal={};function getGlobal(){
/*ThouShaltNotCache*/
return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:mockGlobal}var mobx_esm_assign=Object.assign,getDescriptor=Object.getOwnPropertyDescriptor,defineProperty=Object.defineProperty,objectPrototype=Object.prototype,EMPTY_ARRAY=[];Object.freeze(EMPTY_ARRAY);var EMPTY_OBJECT={};Object.freeze(EMPTY_OBJECT);var hasProxy="undefined"!=typeof Proxy,plainObjectString=Object.toString();function assertProxies(){
/*ThouShaltNotCache*/
hasProxy||die("Proxy not available")}function once(func){
/*ThouShaltNotCache*/
var invoked=!1;return function(){
/*ThouShaltNotCache*/
if(!invoked)return invoked=!0,func.apply(this,arguments)}}var noop=function(){};function isFunction(fn){
/*ThouShaltNotCache*/
return"function"==typeof fn}function isStringish(value){switch(typeof value){case"string":case"symbol":case"number":return!0}return!1}function isObject(value){
/*ThouShaltNotCache*/
return null!==value&&"object"==typeof value}function isPlainObject(value){
/*ThouShaltNotCache*/
if(!isObject(value))return!1;var proto=Object.getPrototypeOf(value);if(null==proto)return!0;var protoConstructor=Object.hasOwnProperty.call(proto,"constructor")&&proto.constructor;return"function"==typeof protoConstructor&&protoConstructor.toString()===plainObjectString}function isGenerator(obj){
/*ThouShaltNotCache*/
var constructor=null==obj?void 0:obj.constructor;return!!constructor&&("GeneratorFunction"===constructor.name||"GeneratorFunction"===constructor.displayName)}function addHiddenProp(object,propName,value){
/*ThouShaltNotCache*/
defineProperty(object,propName,{enumerable:!1,writable:!0,configurable:!0,value})}function addHiddenFinalProp(object,propName,value){
/*ThouShaltNotCache*/
defineProperty(object,propName,{enumerable:!1,writable:!1,configurable:!0,value})}function createInstanceofPredicate(name,theClass){
/*ThouShaltNotCache*/
var propName="isMobX"+name;return theClass.prototype[propName]=!0,function(x){
/*ThouShaltNotCache*/
return isObject(x)&&!0===x[propName]}}function isES6Map(thing){
/*ThouShaltNotCache*/
return null!=thing&&"[object Map]"===Object.prototype.toString.call(thing)}function isES6Set(thing){
/*ThouShaltNotCache*/
return null!=thing&&"[object Set]"===Object.prototype.toString.call(thing)}var hasGetOwnPropertySymbols=void 0!==Object.getOwnPropertySymbols;var ownKeys="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:hasGetOwnPropertySymbols?function(obj){
/*ThouShaltNotCache*/
return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj))}:Object.getOwnPropertyNames;function toPrimitive(value){
/*ThouShaltNotCache*/
return null===value?null:"object"==typeof value?""+value:value}function hasProp(target,prop){
/*ThouShaltNotCache*/
return objectPrototype.hasOwnProperty.call(target,prop)}var getOwnPropertyDescriptors=Object.getOwnPropertyDescriptors||function(target){
/*ThouShaltNotCache*/
var res={};return ownKeys(target).forEach(function(key){
/*ThouShaltNotCache*/
res[key]=getDescriptor(target,key)}),res};function getFlag(flags,mask){
/*ThouShaltNotCache*/
return!!(flags&mask)}function setFlag(flags,mask,newValue){
/*ThouShaltNotCache*/
return newValue?flags|=mask:flags&=~mask,flags}function _arrayLikeToArray(r,a){
/*ThouShaltNotCache*/
(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n}function _defineProperties(e,r){
/*ThouShaltNotCache*/
for(var t=0;t<r.length;t++){var o=r[t];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,_toPropertyKey(o.key),o)}}function _createClass(e,r,t){
/*ThouShaltNotCache*/
return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _createForOfIteratorHelperLoose(r,e){
/*ThouShaltNotCache*/
var t="undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(t)return(t=t.call(r)).next.bind(t);if(Array.isArray(r)||(t=function(r,a){
/*ThouShaltNotCache*/
if(r){if("string"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return"Object"===t&&r.constructor&&(t=r.constructor.name),"Map"===t||"Set"===t?Array.from(r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0}}(r))||e&&r&&"number"==typeof r.length){t&&(r=t);var o=0;return function(){
/*ThouShaltNotCache*/
return o>=r.length?{done:!0}:{done:!1,value:r[o++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _extends(){
/*ThouShaltNotCache*/
return _extends=Object.assign?Object.assign.bind():function(n){
/*ThouShaltNotCache*/
for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)({}).hasOwnProperty.call(t,r)&&(n[r]=t[r])}return n},_extends.apply(null,arguments)}function _inheritsLoose(t,o){
/*ThouShaltNotCache*/
t.prototype=Object.create(o.prototype),t.prototype.constructor=t,_setPrototypeOf(t,o)}function _setPrototypeOf(t,e){
/*ThouShaltNotCache*/
return _setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){
/*ThouShaltNotCache*/
return t.__proto__=e,t},_setPrototypeOf(t,e)}function _toPropertyKey(t){
/*ThouShaltNotCache*/
var i=function(t,r){
/*ThouShaltNotCache*/
if("object"!=typeof t||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var i=e.call(t,r||"default");if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==typeof i?i:i+""}var storedAnnotationsSymbol=Symbol("mobx-stored-annotations");function createDecoratorAnnotation(annotation){return Object.assign(
/*ThouShaltNotCache*/
function(target,property){
/*ThouShaltNotCache*/
if(is20223Decorator(property))return annotation.decorate_20223_(target,property);storeAnnotation(target,property,annotation)},annotation)}function storeAnnotation(prototype,key,annotation){
/*ThouShaltNotCache*/
hasProp(prototype,storedAnnotationsSymbol)||addHiddenProp(prototype,storedAnnotationsSymbol,_extends({},prototype[storedAnnotationsSymbol])),function(annotation){
/*ThouShaltNotCache*/
return annotation.annotationType_===OVERRIDE}(annotation)||(prototype[storedAnnotationsSymbol][key]=annotation)}function is20223Decorator(context){
/*ThouShaltNotCache*/
return"object"==typeof context&&"string"==typeof context.kind}var $mobx=Symbol("mobx administration"),Atom=function(){
/*ThouShaltNotCache*/
function Atom(name_){
/*ThouShaltNotCache*/
void 0===name_&&(name_="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=name_}var _proto=Atom.prototype;return _proto.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.reportObserved=function(){
/*ThouShaltNotCache*/
return reportObserved(this)},_proto.reportChanged=function(){
/*ThouShaltNotCache*/
startBatch(),propagateChanged(this),endBatch()},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_},_createClass(Atom,[{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.isBeingObservedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.isBeingObservedMask_,newValue)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.isPendingUnobservationMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.isPendingUnobservationMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Atom.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Atom.diffValueMask_,1===newValue)}}])}();Atom.isBeingObservedMask_=1,Atom.isPendingUnobservationMask_=2,Atom.diffValueMask_=4;var isAtom=createInstanceofPredicate("Atom",Atom);function createAtom(name,onBecomeObservedHandler,onBecomeUnobservedHandler){
/*ThouShaltNotCache*/
void 0===onBecomeObservedHandler&&(onBecomeObservedHandler=noop),void 0===onBecomeUnobservedHandler&&(onBecomeUnobservedHandler=noop);var arg3,atom=new Atom(name);return onBecomeObservedHandler!==noop&&interceptHook(ON_BECOME_OBSERVED,atom,onBecomeObservedHandler,arg3),onBecomeUnobservedHandler!==noop&&onBecomeUnobserved(atom,onBecomeUnobservedHandler),atom}var comparer={identity:function(a,b){
/*ThouShaltNotCache*/
return a===b},structural:function(a,b){
/*ThouShaltNotCache*/
return deepEqual(a,b)},default:function(a,b){
/*ThouShaltNotCache*/
return Object.is?Object.is(a,b):a===b?0!==a||1/a==1/b:a!=a&&b!=b},shallow:function(a,b){
/*ThouShaltNotCache*/
return deepEqual(a,b,1)}};function deepEnhancer(v,_,name){
/*ThouShaltNotCache*/
return isObservable(v)?v:Array.isArray(v)?observable.array(v,{name}):isPlainObject(v)?observable.object(v,void 0,{name}):isES6Map(v)?observable.map(v,{name}):isES6Set(v)?observable.set(v,{name}):"function"!=typeof v||isAction(v)||isFlow(v)?v:isGenerator(v)?flow(v):autoAction(name,v)}function referenceEnhancer(newValue){
/*ThouShaltNotCache*/
return newValue}var OVERRIDE="override";function createActionAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$1,extend_:extend_$1,decorate_20223_:decorate_20223_$1}}function make_$1(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_;if(null!=(_this$options_=this.options_)&&_this$options_.bound)return null===this.extend_(adm,key,descriptor,!1)?0:1;if(source===adm.target_)return null===this.extend_(adm,key,descriptor,!1)?0:2;if(isAction(descriptor.value))return 1;var actionDescriptor=createActionDescriptor(adm,this,key,descriptor,!1);return defineProperty(source,key,actionDescriptor),2}function extend_$1(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var actionDescriptor=createActionDescriptor(adm,this,key,descriptor);return adm.defineProperty_(key,actionDescriptor,proxyTrap)}function decorate_20223_$1(mthd,context){var _this$options_2,kind=context.kind,name=context.name,addInitializer=context.addInitializer,ann=this,_createAction=function(m){
/*ThouShaltNotCache*/
var _ann$options_$name,_ann$options_,_ann$options_$autoAct,_ann$options_2;return createAction(null!=(_ann$options_$name=null==(_ann$options_=ann.options_)?void 0:_ann$options_.name)?_ann$options_$name:name.toString(),m,null!=(_ann$options_$autoAct=null==(_ann$options_2=ann.options_)?void 0:_ann$options_2.autoAction)&&_ann$options_$autoAct)};return"field"==kind?function(initMthd){
/*ThouShaltNotCache*/
var _ann$options_3,mthd=initMthd;return isAction(mthd)||(mthd=_createAction(mthd)),null!=(_ann$options_3=ann.options_)&&_ann$options_3.bound&&((mthd=mthd.bind(this)).isMobxAction=!0),mthd}:"method"==kind?(isAction(mthd)||(mthd=_createAction(mthd)),null!=(_this$options_2=this.options_)&&_this$options_2.bound&&addInitializer(function(){
/*ThouShaltNotCache*/
var bound=this[name].bind(this);bound.isMobxAction=!0,this[name]=bound}),mthd):void die("Cannot apply '"+ann.annotationType_+"' to '"+String(name)+"' (kind: "+kind+"):\n'"+ann.annotationType_+"' can only be used on properties with a function value.")}function createActionDescriptor(adm,annotation,key,descriptor,safeDescriptors){
/*ThouShaltNotCache*/
var _annotation$options_,_annotation$options_$,_annotation$options_2,_annotation$options_$2,_annotation$options_3,_annotation$options_4,_adm$proxy_2,_ref2;void 0===safeDescriptors&&(safeDescriptors=globalState.safeDescriptors),_ref2=descriptor,annotation.annotationType_,_ref2.value;var _adm$proxy_,value=descriptor.value;null!=(_annotation$options_=annotation.options_)&&_annotation$options_.bound&&(value=value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_));return{value:createAction(null!=(_annotation$options_$=null==(_annotation$options_2=annotation.options_)?void 0:_annotation$options_2.name)?_annotation$options_$:key.toString(),value,null!=(_annotation$options_$2=null==(_annotation$options_3=annotation.options_)?void 0:_annotation$options_3.autoAction)&&_annotation$options_$2,null!=(_annotation$options_4=annotation.options_)&&_annotation$options_4.bound?null!=(_adm$proxy_2=adm.proxy_)?_adm$proxy_2:adm.target_:void 0),configurable:!safeDescriptors||adm.isPlainObject_,enumerable:!1,writable:!safeDescriptors}}function createFlowAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$2,extend_:extend_$2,decorate_20223_:decorate_20223_$2}}function make_$2(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_;if(source===adm.target_)return null===this.extend_(adm,key,descriptor,!1)?0:2;if(null!=(_this$options_=this.options_)&&_this$options_.bound&&(!hasProp(adm.target_,key)||!isFlow(adm.target_[key]))&&null===this.extend_(adm,key,descriptor,!1))return 0;if(isFlow(descriptor.value))return 1;var flowDescriptor=createFlowDescriptor(adm,this,key,descriptor,!1,!1);return defineProperty(source,key,flowDescriptor),2}function extend_$2(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_2,flowDescriptor=createFlowDescriptor(adm,this,key,descriptor,null==(_this$options_2=this.options_)?void 0:_this$options_2.bound);return adm.defineProperty_(key,flowDescriptor,proxyTrap)}function decorate_20223_$2(mthd,context){
/*ThouShaltNotCache*/
var _this$options_3;var name=context.name,addInitializer=context.addInitializer;return isFlow(mthd)||(mthd=flow(mthd)),null!=(_this$options_3=this.options_)&&_this$options_3.bound&&addInitializer(function(){
/*ThouShaltNotCache*/
var bound=this[name].bind(this);bound.isMobXFlow=!0,this[name]=bound}),mthd}function createFlowDescriptor(adm,annotation,key,descriptor,bound,safeDescriptors){var _ref2;
/*ThouShaltNotCache*/
void 0===safeDescriptors&&(safeDescriptors=globalState.safeDescriptors),_ref2=descriptor,annotation.annotationType_,_ref2.value;var _adm$proxy_,value=descriptor.value;(isFlow(value)||(value=flow(value)),bound)&&((value=value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_)).isMobXFlow=!0);return{value,configurable:!safeDescriptors||adm.isPlainObject_,enumerable:!1,writable:!safeDescriptors}}function createComputedAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$3,extend_:extend_$3,decorate_20223_:decorate_20223_$3}}function make_$3(adm,key,descriptor){
/*ThouShaltNotCache*/
return null===this.extend_(adm,key,descriptor,!1)?0:1}function extend_$3(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
return function(adm,_ref,key,_ref2){
/*ThouShaltNotCache*/
_ref.annotationType_,_ref2.get;0}(0,this,0,descriptor),adm.defineComputedProperty_(key,_extends({},this.options_,{get:descriptor.get,set:descriptor.set}),proxyTrap)}function decorate_20223_$3(get,context){var ann=this,key=context.name;return(0,context.addInitializer)(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(this)[$mobx],options=_extends({},ann.options_,{get,context:this});options.name||(options.name="ObservableObject."+key.toString()),adm.values_.set(key,new ComputedValue(options))}),function(){
/*ThouShaltNotCache*/
return this[$mobx].getObservablePropValue_(key)}}function createObservableAnnotation(name,options){
/*ThouShaltNotCache*/
return{annotationType_:name,options_:options,make_:make_$4,extend_:extend_$4,decorate_20223_:decorate_20223_$4}}function make_$4(adm,key,descriptor){
/*ThouShaltNotCache*/
return null===this.extend_(adm,key,descriptor,!1)?0:1}function extend_$4(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_$enhanc,_this$options_;return function(adm,_ref){
/*ThouShaltNotCache*/
_ref.annotationType_;0}(0,this),adm.defineObservableProperty_(key,descriptor.value,null!=(_this$options_$enhanc=null==(_this$options_=this.options_)?void 0:_this$options_.enhancer)?_this$options_$enhanc:deepEnhancer,proxyTrap)}function decorate_20223_$4(desc,context){var ann=this,kind=context.kind,name=context.name,initializedObjects=new WeakSet;function initializeObservable(target,value){
/*ThouShaltNotCache*/
var _ann$options_$enhance,_ann$options_,adm=asObservableObject(target)[$mobx],observable=new ObservableValue(value,null!=(_ann$options_$enhance=null==(_ann$options_=ann.options_)?void 0:_ann$options_.enhancer)?_ann$options_$enhance:deepEnhancer,"ObservableObject."+name.toString(),!1);adm.values_.set(name,observable),initializedObjects.add(target)}if("accessor"==kind)return{get:function(){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,desc.get.call(this)),this[$mobx].getObservablePropValue_(name)},set:function(value){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,value),this[$mobx].setObservablePropValue_(name,value)},init:function(value){
/*ThouShaltNotCache*/
return initializedObjects.has(this)||initializeObservable(this,value),value}}}var AUTO="true",autoAnnotation=createAutoAnnotation();function createAutoAnnotation(options){
/*ThouShaltNotCache*/
return{annotationType_:AUTO,options_:options,make_:make_$5,extend_:extend_$5,decorate_20223_:decorate_20223_$5}}function make_$5(adm,key,descriptor,source){
/*ThouShaltNotCache*/
var _this$options_3,_this$options_4,_this$options_2,_this$options_;if(descriptor.get)return computed.make_(adm,key,descriptor,source);if(descriptor.set){var set=createAction(key.toString(),descriptor.set);return source===adm.target_?null===adm.defineProperty_(key,{configurable:!globalState.safeDescriptors||adm.isPlainObject_,set})?0:2:(defineProperty(source,key,{configurable:!0,set}),2)}if(source!==adm.target_&&"function"==typeof descriptor.value)return isGenerator(descriptor.value)?(null!=(_this$options_=this.options_)&&_this$options_.autoBind?flow.bound:flow).make_(adm,key,descriptor,source):(null!=(_this$options_2=this.options_)&&_this$options_2.autoBind?autoAction.bound:autoAction).make_(adm,key,descriptor,source);var _adm$proxy_,observableAnnotation=!1===(null==(_this$options_3=this.options_)?void 0:_this$options_3.deep)?observable.ref:observable;"function"==typeof descriptor.value&&null!=(_this$options_4=this.options_)&&_this$options_4.autoBind&&(descriptor.value=descriptor.value.bind(null!=(_adm$proxy_=adm.proxy_)?_adm$proxy_:adm.target_));return observableAnnotation.make_(adm,key,descriptor,source)}function extend_$5(adm,key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
var _this$options_5,_this$options_6,_adm$proxy_2;if(descriptor.get)return computed.extend_(adm,key,descriptor,proxyTrap);if(descriptor.set)return adm.defineProperty_(key,{configurable:!globalState.safeDescriptors||adm.isPlainObject_,set:createAction(key.toString(),descriptor.set)},proxyTrap);"function"==typeof descriptor.value&&null!=(_this$options_5=this.options_)&&_this$options_5.autoBind&&(descriptor.value=descriptor.value.bind(null!=(_adm$proxy_2=adm.proxy_)?_adm$proxy_2:adm.target_));return(!1===(null==(_this$options_6=this.options_)?void 0:_this$options_6.deep)?observable.ref:observable).extend_(adm,key,descriptor,proxyTrap)}function decorate_20223_$5(desc,context){
/*ThouShaltNotCache*/
die("'"+this.annotationType_+"' cannot be used as a decorator")}var defaultCreateObservableOptions={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function asCreateObservableOptions(thing){
/*ThouShaltNotCache*/
return thing||defaultCreateObservableOptions}Object.freeze(defaultCreateObservableOptions);var observableAnnotation=createObservableAnnotation("observable"),observableRefAnnotation=createObservableAnnotation("observable.ref",{enhancer:referenceEnhancer}),observableShallowAnnotation=createObservableAnnotation("observable.shallow",{enhancer:function(v,_,name){
/*ThouShaltNotCache*/
return null==v||isObservableObject(v)||isObservableArray(v)||isObservableMap(v)||isObservableSet(v)?v:Array.isArray(v)?observable.array(v,{name,deep:!1}):isPlainObject(v)?observable.object(v,void 0,{name,deep:!1}):isES6Map(v)?observable.map(v,{name,deep:!1}):isES6Set(v)?observable.set(v,{name,deep:!1}):void 0}}),observableStructAnnotation=createObservableAnnotation("observable.struct",{enhancer:function(v,oldValue){return deepEqual(v,oldValue)?oldValue:v}}),observableDecoratorAnnotation=createDecoratorAnnotation(observableAnnotation);function getEnhancerFromOptions(options){
/*ThouShaltNotCache*/
return!0===options.deep?deepEnhancer:!1===options.deep?referenceEnhancer:(annotation=options.defaultDecorator)&&null!=(_annotation$options_$=null==(_annotation$options_=annotation.options_)?void 0:_annotation$options_.enhancer)?_annotation$options_$:deepEnhancer;var annotation,_annotation$options_$,_annotation$options_}function createObservable(v,arg2,arg3){
/*ThouShaltNotCache*/
return is20223Decorator(arg2)?observableAnnotation.decorate_20223_(v,arg2):isStringish(arg2)?void storeAnnotation(v,arg2,observableAnnotation):isObservable(v)?v:isPlainObject(v)?observable.object(v,arg2,arg3):Array.isArray(v)?observable.array(v,arg2):isES6Map(v)?observable.map(v,arg2):isES6Set(v)?observable.set(v,arg2):"object"==typeof v&&null!==v?v:observable.box(v,arg2)}mobx_esm_assign(createObservable,observableDecoratorAnnotation);var _getDescriptor$config,_getDescriptor,observable=mobx_esm_assign(createObservable,{box:function(value,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableValue(value,getEnhancerFromOptions(o),o.name,!0,o.equals)},array:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return(!1===globalState.useProxies||!1===o.proxy?createLegacyArray:createObservableArray)(initialValues,getEnhancerFromOptions(o),o.name)},map:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableMap(initialValues,getEnhancerFromOptions(o),o.name)},set:function(initialValues,options){
/*ThouShaltNotCache*/
var o=asCreateObservableOptions(options);return new ObservableSet(initialValues,getEnhancerFromOptions(o),o.name)},object:function(props,decorators,options){
/*ThouShaltNotCache*/
return initObservable(function(){
/*ThouShaltNotCache*/
return extendObservable(!1===globalState.useProxies||!1===(null==options?void 0:options.proxy)?asObservableObject({},options):function(target,options){
/*ThouShaltNotCache*/
var _target$$mobx,_target$$mobx$proxy_;return assertProxies(),target=asObservableObject(target,options),null!=(_target$$mobx$proxy_=(_target$$mobx=target[$mobx]).proxy_)?_target$$mobx$proxy_:_target$$mobx.proxy_=new Proxy(target,objectProxyTraps)}({},options),props,decorators)})},ref:createDecoratorAnnotation(observableRefAnnotation),shallow:createDecoratorAnnotation(observableShallowAnnotation),deep:observableDecoratorAnnotation,struct:createDecoratorAnnotation(observableStructAnnotation)}),computedAnnotation=createComputedAnnotation("computed"),computedStructAnnotation=createComputedAnnotation("computed.struct",{equals:comparer.structural}),computed=function(arg1,arg2){
/*ThouShaltNotCache*/
if(is20223Decorator(arg2))return computedAnnotation.decorate_20223_(arg1,arg2);if(isStringish(arg2))return storeAnnotation(arg1,arg2,computedAnnotation);if(isPlainObject(arg1))return createDecoratorAnnotation(createComputedAnnotation("computed",arg1));var opts=isPlainObject(arg2)?arg2:{};return opts.get=arg1,opts.name||(opts.name=arg1.name||""),new ComputedValue(opts)};Object.assign(computed,computedAnnotation),computed.struct=createDecoratorAnnotation(computedStructAnnotation);var currentActionId=0,nextActionId=1,isFunctionNameConfigurable=null!=(_getDescriptor$config=null==(_getDescriptor=getDescriptor(function(){},"name"))?void 0:_getDescriptor.configurable)&&_getDescriptor$config,tmpNameDescriptor={value:"action",configurable:!0,writable:!1,enumerable:!1};function createAction(actionName,fn,autoAction,ref){function res(){
/*ThouShaltNotCache*/
return executeAction(actionName,autoAction,fn,ref||this,arguments)}
/*ThouShaltNotCache*/
return void 0===autoAction&&(autoAction=!1),res.isMobxAction=!0,res.toString=function(){
/*ThouShaltNotCache*/
return fn.toString()},isFunctionNameConfigurable&&(tmpNameDescriptor.value=actionName,defineProperty(res,"name",tmpNameDescriptor)),res}function executeAction(actionName,canRunAsDerivation,fn,scope,args){
/*ThouShaltNotCache*/
var runInfo=function(actionName,canRunAsDerivation){
/*ThouShaltNotCache*/
var notifySpy_=!1,startTime_=0;0;var prevDerivation_=globalState.trackingDerivation,runAsAction=!canRunAsDerivation||!prevDerivation_;startBatch();var prevAllowStateChanges_=globalState.allowStateChanges;runAsAction&&(untrackedStart(),prevAllowStateChanges_=allowStateChangesStart(!0));var prevAllowStateReads_=allowStateReadsStart(!0),runInfo={runAsAction_:runAsAction,prevDerivation_,prevAllowStateChanges_,prevAllowStateReads_,notifySpy_,startTime_,actionId_:nextActionId++,parentActionId_:currentActionId};return currentActionId=runInfo.actionId_,runInfo}(0,canRunAsDerivation);try{return fn.apply(scope,args)}catch(err){throw runInfo.error_=err,err}finally{!function(runInfo){
/*ThouShaltNotCache*/
currentActionId!==runInfo.actionId_&&die(30);currentActionId=runInfo.parentActionId_,void 0!==runInfo.error_&&(globalState.suppressReactionErrors=!0);allowStateChangesEnd(runInfo.prevAllowStateChanges_),allowStateReadsEnd(runInfo.prevAllowStateReads_),endBatch(),runInfo.runAsAction_&&untrackedEnd(runInfo.prevDerivation_);0;globalState.suppressReactionErrors=!1}(runInfo)}}function allowStateChanges(allowStateChanges,func){
/*ThouShaltNotCache*/
var prev=allowStateChangesStart(allowStateChanges);try{return func()}finally{allowStateChangesEnd(prev)}}function allowStateChangesStart(allowStateChanges){
/*ThouShaltNotCache*/
var prev=globalState.allowStateChanges;return globalState.allowStateChanges=allowStateChanges,prev}function allowStateChangesEnd(prev){
/*ThouShaltNotCache*/
globalState.allowStateChanges=prev}var ObservableValue=function(_Atom){
/*ThouShaltNotCache*/
function ObservableValue(value,enhancer,name_,notifySpy,equals){
/*ThouShaltNotCache*/
var _this;return void 0===name_&&(name_="ObservableValue"),void 0===notifySpy&&(notifySpy=!0),void 0===equals&&(equals=comparer.default),(_this=_Atom.call(this,name_)||this).enhancer=void 0,_this.name_=void 0,_this.equals=void 0,_this.hasUnreportedChange_=!1,_this.interceptors_=void 0,_this.changeListeners_=void 0,_this.value_=void 0,_this.dehancer=void 0,_this.enhancer=enhancer,_this.name_=name_,_this.equals=equals,_this.value_=enhancer(value,void 0,name_),_this}_inheritsLoose(ObservableValue,_Atom);var _proto=ObservableValue.prototype;return _proto.dehanceValue=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.set=function(newValue){
/*ThouShaltNotCache*/
this.value_;if((newValue=this.prepareNewValue_(newValue))!==globalState.UNCHANGED){0,this.setNewValue_(newValue)}},_proto.prepareNewValue_=function(newValue){if(
/*ThouShaltNotCache*/
checkIfStateModificationsAreAllowed(this),hasInterceptors(this)){var change=interceptChange(this,{object:this,type:UPDATE,newValue});if(!change)return globalState.UNCHANGED;newValue=change.newValue}return newValue=this.enhancer(newValue,this.value_,this.name_),this.equals(this.value_,newValue)?globalState.UNCHANGED:newValue},_proto.setNewValue_=function(newValue){
/*ThouShaltNotCache*/
var oldValue=this.value_;this.value_=newValue,this.reportChanged(),hasListeners(this)&&notifyListeners(this,{type:UPDATE,object:this,newValue,oldValue})},_proto.get=function(){
/*ThouShaltNotCache*/
return this.reportObserved(),this.dehanceValue(this.value_)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
return fireImmediately&&listener({observableKind:"value",debugObjectName:this.name_,object:this,type:UPDATE,newValue:this.value_,oldValue:void 0}),registerListener(this,listener)},_proto.raw=function(){
/*ThouShaltNotCache*/
return this.value_},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return this.get()},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.value_+"]"},_proto.valueOf=function(){
/*ThouShaltNotCache*/
return toPrimitive(this.get())},_proto[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},ObservableValue}(Atom),ComputedValue=function(){
/*ThouShaltNotCache*/
function ComputedValue(options){
/*ThouShaltNotCache*/
this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=IDerivationState_.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new CaughtException(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=TraceMode.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,options.get||die(31),this.derivation=options.get,this.name_=options.name||"ComputedValue",options.set&&(this.setter_=createAction("ComputedValue-setter",options.set)),this.equals_=options.equals||(options.compareStructural||options.struct?comparer.structural:comparer.default),this.scope_=options.context,this.requiresReaction_=options.requiresReaction,this.keepAlive_=!!options.keepAlive}var _proto=ComputedValue.prototype;return _proto.onBecomeStale_=function(){
/*ThouShaltNotCache*/
!function(observable){
/*ThouShaltNotCache*/
if(observable.lowestObserverState_!==IDerivationState_.UP_TO_DATE_)return;observable.lowestObserverState_=IDerivationState_.POSSIBLY_STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(d.dependenciesState_=IDerivationState_.POSSIBLY_STALE_,d.onBecomeStale_())})}(this)},_proto.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(listener){
/*ThouShaltNotCache*/
return listener()})},_proto.get=function(){if(
/*ThouShaltNotCache*/
this.isComputing&&die(32,this.name_,this.derivation),0!==globalState.inBatch||0!==this.observers_.size||this.keepAlive_){if(reportObserved(this),shouldCompute(this)){var prevTrackingContext=globalState.trackingContext;this.keepAlive_&&!prevTrackingContext&&(globalState.trackingContext=this),this.trackAndCompute()&&function(observable){
/*ThouShaltNotCache*/
if(observable.lowestObserverState_===IDerivationState_.STALE_)return;observable.lowestObserverState_=IDerivationState_.STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.POSSIBLY_STALE_?d.dependenciesState_=IDerivationState_.STALE_:d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&(observable.lowestObserverState_=IDerivationState_.UP_TO_DATE_)})}(this),globalState.trackingContext=prevTrackingContext}}else shouldCompute(this)&&(this.warnAboutUntrackedRead_(),startBatch(),this.value_=this.computeValue_(!1),endBatch());var result=this.value_;if(isCaughtException(result))throw result.cause;return result},_proto.set=function(value){
/*ThouShaltNotCache*/
if(this.setter_){this.isRunningSetter&&die(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,value)}finally{this.isRunningSetter=!1}}else die(34,this.name_)},_proto.trackAndCompute=function(){
/*ThouShaltNotCache*/
var oldValue=this.value_,wasSuspended=this.dependenciesState_===IDerivationState_.NOT_TRACKING_,newValue=this.computeValue_(!0),changed=wasSuspended||isCaughtException(oldValue)||isCaughtException(newValue)||!this.equals_(oldValue,newValue);return changed&&(this.value_=newValue),changed},_proto.computeValue_=function(track){
/*ThouShaltNotCache*/
this.isComputing=!0;var res,prev=allowStateChangesStart(!1);if(track)res=trackDerivedFunction(this,this.derivation,this.scope_);else if(!0===globalState.disableErrorBoundaries)res=this.derivation.call(this.scope_);else try{res=this.derivation.call(this.scope_)}catch(e){res=new CaughtException(e)}return allowStateChangesEnd(prev),this.isComputing=!1,res},_proto.suspend_=function(){
/*ThouShaltNotCache*/
this.keepAlive_||(clearObserving(this),this.value_=void 0)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
var _this=this,firstTime=!0,prevValue=void 0;return autorun(function(){
/*ThouShaltNotCache*/
var newValue=_this.get();if(!firstTime||fireImmediately){var prevU=untrackedStart();listener({observableKind:"computed",debugObjectName:_this.name_,type:UPDATE,object:_this,newValue,oldValue:prevValue}),untrackedEnd(prevU)}firstTime=!1,prevValue=newValue})},_proto.warnAboutUntrackedRead_=function(){},_proto.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.derivation.toString()+"]"},_proto.valueOf=function(){
/*ThouShaltNotCache*/
return toPrimitive(this.get())},_proto[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},_createClass(ComputedValue,[{key:"isComputing",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isComputingMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isComputingMask_,newValue)}},{key:"isRunningSetter",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isRunningSetterMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isRunningSetterMask_,newValue)}},{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isBeingObservedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isBeingObservedMask_,newValue)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.isPendingUnobservationMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.isPendingUnobservationMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,ComputedValue.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,ComputedValue.diffValueMask_,1===newValue)}}])}();ComputedValue.isComputingMask_=1,ComputedValue.isRunningSetterMask_=2,ComputedValue.isBeingObservedMask_=4,ComputedValue.isPendingUnobservationMask_=8,ComputedValue.diffValueMask_=16;var IDerivationState_,TraceMode,isComputedValue=createInstanceofPredicate("ComputedValue",ComputedValue);!function(IDerivationState_){
/*ThouShaltNotCache*/
IDerivationState_[IDerivationState_.NOT_TRACKING_=-1]="NOT_TRACKING_",IDerivationState_[IDerivationState_.UP_TO_DATE_=0]="UP_TO_DATE_",IDerivationState_[IDerivationState_.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",IDerivationState_[IDerivationState_.STALE_=2]="STALE_"}(IDerivationState_||(IDerivationState_={})),function(TraceMode){
/*ThouShaltNotCache*/
TraceMode[TraceMode.NONE=0]="NONE",TraceMode[TraceMode.LOG=1]="LOG",TraceMode[TraceMode.BREAK=2]="BREAK"}(TraceMode||(TraceMode={}));var CaughtException=function(cause){
/*ThouShaltNotCache*/
this.cause=void 0,this.cause=cause};function isCaughtException(e){
/*ThouShaltNotCache*/
return e instanceof CaughtException}function shouldCompute(derivation){
/*ThouShaltNotCache*/
switch(derivation.dependenciesState_){case IDerivationState_.UP_TO_DATE_:return!1;case IDerivationState_.NOT_TRACKING_:case IDerivationState_.STALE_:return!0;case IDerivationState_.POSSIBLY_STALE_:for(var prevAllowStateReads=allowStateReadsStart(!0),prevUntracked=untrackedStart(),obs=derivation.observing_,l=obs.length,i=0;i<l;i++){var obj=obs[i];if(isComputedValue(obj)){if(globalState.disableErrorBoundaries)obj.get();else try{obj.get()}catch(e){return untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!0}if(derivation.dependenciesState_===IDerivationState_.STALE_)return untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!0}}return changeDependenciesStateTo0(derivation),untrackedEnd(prevUntracked),allowStateReadsEnd(prevAllowStateReads),!1}}function checkIfStateModificationsAreAllowed(atom){}function trackDerivedFunction(derivation,f,context){
/*ThouShaltNotCache*/
var prevAllowStateReads=allowStateReadsStart(!0);changeDependenciesStateTo0(derivation),derivation.newObserving_=new Array(0===derivation.runId_?100:derivation.observing_.length),derivation.unboundDepsCount_=0,derivation.runId_=++globalState.runId;var result,prevTracking=globalState.trackingDerivation;if(globalState.trackingDerivation=derivation,globalState.inBatch++,!0===globalState.disableErrorBoundaries)result=f.call(context);else try{result=f.call(context)}catch(e){result=new CaughtException(e)}return globalState.inBatch--,globalState.trackingDerivation=prevTracking,function(derivation){for(
/*ThouShaltNotCache*/
var prevObserving=derivation.observing_,observing=derivation.observing_=derivation.newObserving_,lowestNewObservingDerivationState=IDerivationState_.UP_TO_DATE_,i0=0,l=derivation.unboundDepsCount_,i=0;i<l;i++){var dep=observing[i];0===dep.diffValue&&(dep.diffValue=1,i0!==i&&(observing[i0]=dep),i0++),dep.dependenciesState_>lowestNewObservingDerivationState&&(lowestNewObservingDerivationState=dep.dependenciesState_)}observing.length=i0,derivation.newObserving_=null,l=prevObserving.length;for(;l--;){var _dep=prevObserving[l];0===_dep.diffValue&&removeObserver(_dep,derivation),_dep.diffValue=0}for(;i0--;){var _dep2=observing[i0];1===_dep2.diffValue&&(_dep2.diffValue=0,addObserver(_dep2,derivation))}lowestNewObservingDerivationState!==IDerivationState_.UP_TO_DATE_&&(derivation.dependenciesState_=lowestNewObservingDerivationState,derivation.onBecomeStale_())}(derivation),allowStateReadsEnd(prevAllowStateReads),result}function clearObserving(derivation){
/*ThouShaltNotCache*/
var obs=derivation.observing_;derivation.observing_=[];for(var i=obs.length;i--;)removeObserver(obs[i],derivation);derivation.dependenciesState_=IDerivationState_.NOT_TRACKING_}function untracked(action){
/*ThouShaltNotCache*/
var prev=untrackedStart();try{return action()}finally{untrackedEnd(prev)}}function untrackedStart(){
/*ThouShaltNotCache*/
var prev=globalState.trackingDerivation;return globalState.trackingDerivation=null,prev}function untrackedEnd(prev){
/*ThouShaltNotCache*/
globalState.trackingDerivation=prev}function allowStateReadsStart(allowStateReads){
/*ThouShaltNotCache*/
var prev=globalState.allowStateReads;return globalState.allowStateReads=allowStateReads,prev}function allowStateReadsEnd(prev){
/*ThouShaltNotCache*/
globalState.allowStateReads=prev}function changeDependenciesStateTo0(derivation){
/*ThouShaltNotCache*/
if(derivation.dependenciesState_!==IDerivationState_.UP_TO_DATE_){derivation.dependenciesState_=IDerivationState_.UP_TO_DATE_;for(var obs=derivation.observing_,i=obs.length;i--;)obs[i].lowestObserverState_=IDerivationState_.UP_TO_DATE_}}var MobXGlobals=function(){
/*ThouShaltNotCache*/
this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},canMergeGlobalState=!0,isolateCalled=!1,globalState=function(){
/*ThouShaltNotCache*/
var global=getGlobal();return global.__mobxInstanceCount>0&&!global.__mobxGlobals&&(canMergeGlobalState=!1),global.__mobxGlobals&&global.__mobxGlobals.version!==(new MobXGlobals).version&&(canMergeGlobalState=!1),canMergeGlobalState?global.__mobxGlobals?(global.__mobxInstanceCount+=1,global.__mobxGlobals.UNCHANGED||(global.__mobxGlobals.UNCHANGED={}),global.__mobxGlobals):(global.__mobxInstanceCount=1,global.__mobxGlobals=new MobXGlobals):(setTimeout(function(){
/*ThouShaltNotCache*/
isolateCalled||die(35)},1),new MobXGlobals)}();function addObserver(observable,node){
/*ThouShaltNotCache*/
observable.observers_.add(node),observable.lowestObserverState_>node.dependenciesState_&&(observable.lowestObserverState_=node.dependenciesState_)}function removeObserver(observable,node){
/*ThouShaltNotCache*/
observable.observers_.delete(node),0===observable.observers_.size&&queueForUnobservation(observable)}function queueForUnobservation(observable){
/*ThouShaltNotCache*/
!1===observable.isPendingUnobservation&&(observable.isPendingUnobservation=!0,globalState.pendingUnobservations.push(observable))}function startBatch(){
/*ThouShaltNotCache*/
globalState.inBatch++}function endBatch(){
/*ThouShaltNotCache*/
if(0===--globalState.inBatch){runReactions();for(var list=globalState.pendingUnobservations,i=0;i<list.length;i++){var observable=list[i];observable.isPendingUnobservation=!1,0===observable.observers_.size&&(observable.isBeingObserved&&(observable.isBeingObserved=!1,observable.onBUO()),observable instanceof ComputedValue&&observable.suspend_())}globalState.pendingUnobservations=[]}}function reportObserved(observable){var derivation=globalState.trackingDerivation;return null!==derivation?(derivation.runId_!==observable.lastAccessedBy_&&(observable.lastAccessedBy_=derivation.runId_,derivation.newObserving_[derivation.unboundDepsCount_++]=observable,!observable.isBeingObserved&&globalState.trackingContext&&(observable.isBeingObserved=!0,observable.onBO())),observable.isBeingObserved):(0===observable.observers_.size&&globalState.inBatch>0&&queueForUnobservation(observable),!1)}function propagateChanged(observable){
/*ThouShaltNotCache*/
observable.lowestObserverState_!==IDerivationState_.STALE_&&(observable.lowestObserverState_=IDerivationState_.STALE_,observable.observers_.forEach(function(d){
/*ThouShaltNotCache*/
d.dependenciesState_===IDerivationState_.UP_TO_DATE_&&d.onBecomeStale_(),d.dependenciesState_=IDerivationState_.STALE_}))}var Reaction=function(){
/*ThouShaltNotCache*/
function Reaction(name_,onInvalidate_,errorHandler_,requiresObservable_){
/*ThouShaltNotCache*/
void 0===name_&&(name_="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=IDerivationState_.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=TraceMode.NONE,this.name_=name_,this.onInvalidate_=onInvalidate_,this.errorHandler_=errorHandler_,this.requiresObservable_=requiresObservable_}var _proto=Reaction.prototype;return _proto.onBecomeStale_=function(){
/*ThouShaltNotCache*/
this.schedule_()},_proto.schedule_=function(){
/*ThouShaltNotCache*/
this.isScheduled||(this.isScheduled=!0,globalState.pendingReactions.push(this),runReactions())},_proto.runReaction_=function(){
/*ThouShaltNotCache*/
if(!this.isDisposed){startBatch(),this.isScheduled=!1;var prev=globalState.trackingContext;if(globalState.trackingContext=this,shouldCompute(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}globalState.trackingContext=prev,endBatch()}},_proto.track=function(fn){
/*ThouShaltNotCache*/
if(!this.isDisposed){startBatch();0,this.isRunning=!0;var prevReaction=globalState.trackingContext;globalState.trackingContext=this;var result=trackDerivedFunction(this,fn,void 0);globalState.trackingContext=prevReaction,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&clearObserving(this),isCaughtException(result)&&this.reportExceptionInDerivation_(result.cause),endBatch()}},_proto.reportExceptionInDerivation_=function(error){
/*ThouShaltNotCache*/
var _this=this;if(this.errorHandler_)this.errorHandler_(error,this);else{if(globalState.disableErrorBoundaries)throw error;var message="[mobx] uncaught error in '"+this+"'";globalState.suppressReactionErrors||console.error(message,error),globalState.globalReactionErrorHandlers.forEach(function(f){
/*ThouShaltNotCache*/
return f(error,_this)})}},_proto.dispose=function(){
/*ThouShaltNotCache*/
this.isDisposed||(this.isDisposed=!0,this.isRunning||(startBatch(),clearObserving(this),endBatch()))},_proto.getDisposer_=function(abortSignal){
/*ThouShaltNotCache*/
var _this2=this,dispose=function dispose(){
/*ThouShaltNotCache*/
_this2.dispose(),null==abortSignal||null==abortSignal.removeEventListener||abortSignal.removeEventListener("abort",dispose)};return null==abortSignal||null==abortSignal.addEventListener||abortSignal.addEventListener("abort",dispose),dispose[$mobx]=this,dispose},_proto.toString=function(){
/*ThouShaltNotCache*/
return"Reaction["+this.name_+"]"},_proto.trace=function(enterBreakPoint){
/*ThouShaltNotCache*/
void 0===enterBreakPoint&&(enterBreakPoint=!1)},_createClass(Reaction,[{key:"isDisposed",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isDisposedMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isDisposedMask_,newValue)}},{key:"isScheduled",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isScheduledMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isScheduledMask_,newValue)}},{key:"isTrackPending",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isTrackPendingMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isTrackPendingMask_,newValue)}},{key:"isRunning",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.isRunningMask_)},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.isRunningMask_,newValue)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return getFlag(this.flags_,Reaction.diffValueMask_)?1:0},set:function(newValue){
/*ThouShaltNotCache*/
this.flags_=setFlag(this.flags_,Reaction.diffValueMask_,1===newValue)}}])}();Reaction.isDisposedMask_=1,Reaction.isScheduledMask_=2,Reaction.isTrackPendingMask_=4,Reaction.isRunningMask_=8,Reaction.diffValueMask_=16;var MAX_REACTION_ITERATIONS=100,reactionScheduler=function(f){
/*ThouShaltNotCache*/
return f()};function runReactions(){
/*ThouShaltNotCache*/
globalState.inBatch>0||globalState.isRunningReactions||reactionScheduler(runReactionsHelper)}function runReactionsHelper(){
/*ThouShaltNotCache*/
globalState.isRunningReactions=!0;for(var allReactions=globalState.pendingReactions,iterations=0;allReactions.length>0;){++iterations===MAX_REACTION_ITERATIONS&&(console.error("[mobx] cycle in reaction: "+allReactions[0]),allReactions.splice(0));for(var remainingReactions=allReactions.splice(0),i=0,l=remainingReactions.length;i<l;i++)remainingReactions[i].runReaction_()}globalState.isRunningReactions=!1}var isReaction=createInstanceofPredicate("Reaction",Reaction);var actionAnnotation=createActionAnnotation("action"),actionBoundAnnotation=createActionAnnotation("action.bound",{bound:!0}),autoActionAnnotation=createActionAnnotation("autoAction",{autoAction:!0}),autoActionBoundAnnotation=createActionAnnotation("autoAction.bound",{autoAction:!0,bound:!0});function createActionFactory(autoAction){return function(arg1,arg2){
/*ThouShaltNotCache*/
return isFunction(arg1)?createAction(arg1.name||"<unnamed action>",arg1,autoAction):isFunction(arg2)?createAction(arg1,arg2,autoAction):is20223Decorator(arg2)?(autoAction?autoActionAnnotation:actionAnnotation).decorate_20223_(arg1,arg2):isStringish(arg2)?storeAnnotation(arg1,arg2,autoAction?autoActionAnnotation:actionAnnotation):isStringish(arg1)?createDecoratorAnnotation(createActionAnnotation(autoAction?"autoAction":"action",{name:arg1,autoAction})):void 0}}var action=createActionFactory(!1);Object.assign(action,actionAnnotation);var autoAction=createActionFactory(!0);function isAction(thing){
/*ThouShaltNotCache*/
return isFunction(thing)&&!0===thing.isMobxAction}function autorun(view,opts){
/*ThouShaltNotCache*/
var _opts$name,_opts,_opts2,_opts3;void 0===opts&&(opts=EMPTY_OBJECT);var reaction,name=null!=(_opts$name=null==(_opts=opts)?void 0:_opts.name)?_opts$name:"Autorun";if(!opts.scheduler&&!opts.delay)reaction=new Reaction(name,function(){
/*ThouShaltNotCache*/
this.track(reactionRunner)},opts.onError,opts.requiresObservable);else{var scheduler=createSchedulerFromOptions(opts),isScheduled=!1;reaction=new Reaction(name,function(){
/*ThouShaltNotCache*/
isScheduled||(isScheduled=!0,scheduler(function(){
/*ThouShaltNotCache*/
isScheduled=!1,reaction.isDisposed||reaction.track(reactionRunner)}))},opts.onError,opts.requiresObservable)}function reactionRunner(){
/*ThouShaltNotCache*/
view(reaction)}return null!=(_opts2=opts)&&null!=(_opts2=_opts2.signal)&&_opts2.aborted||reaction.schedule_(),reaction.getDisposer_(null==(_opts3=opts)?void 0:_opts3.signal)}Object.assign(autoAction,autoActionAnnotation),action.bound=createDecoratorAnnotation(actionBoundAnnotation),autoAction.bound=createDecoratorAnnotation(autoActionBoundAnnotation);var run=function(f){
/*ThouShaltNotCache*/
return f()};function createSchedulerFromOptions(opts){
/*ThouShaltNotCache*/
return opts.scheduler?opts.scheduler:opts.delay?function(f){
/*ThouShaltNotCache*/
return setTimeout(f,opts.delay)}:run}var ON_BECOME_OBSERVED="onBO",ON_BECOME_UNOBSERVED="onBUO";function onBecomeUnobserved(thing,arg2,arg3){
/*ThouShaltNotCache*/
return interceptHook(ON_BECOME_UNOBSERVED,thing,arg2,arg3)}function interceptHook(hook,thing,arg2,arg3){
/*ThouShaltNotCache*/
var atom="function"==typeof arg3?getAtom(thing,arg2):getAtom(thing),cb=isFunction(arg3)?arg3:arg2,listenersKey=hook+"L";return atom[listenersKey]?atom[listenersKey].add(cb):atom[listenersKey]=new Set([cb]),function(){
/*ThouShaltNotCache*/
var hookListeners=atom[listenersKey];hookListeners&&(hookListeners.delete(cb),0===hookListeners.size&&delete atom[listenersKey])}}function extendObservable(target,properties,annotations,options){var descriptors=getOwnPropertyDescriptors(properties);return initObservable(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(target,options)[$mobx];ownKeys(descriptors).forEach(function(key){
/*ThouShaltNotCache*/
adm.extend_(key,descriptors[key],!annotations||(!(key in annotations)||annotations[key]))})}),target}var generatorId=0;function FlowCancellationError(){
/*ThouShaltNotCache*/
this.message="FLOW_CANCELLED"}FlowCancellationError.prototype=Object.create(Error.prototype);var flowAnnotation=createFlowAnnotation("flow"),flowBoundAnnotation=createFlowAnnotation("flow.bound",{bound:!0}),flow=Object.assign(function(arg1,arg2){
/*ThouShaltNotCache*/
if(is20223Decorator(arg2))return flowAnnotation.decorate_20223_(arg1,arg2);if(isStringish(arg2))return storeAnnotation(arg1,arg2,flowAnnotation);var generator=arg1,name=generator.name||"<unnamed flow>",res=function(){
/*ThouShaltNotCache*/
var rejector,args=arguments,runId=++generatorId,gen=action(name+" - runid: "+runId+" - init",generator).apply(this,args),pendingPromise=void 0,promise=new Promise(function(resolve,reject){
/*ThouShaltNotCache*/
var stepId=0;function onFulfilled(res){var ret;
/*ThouShaltNotCache*/
pendingPromise=void 0;try{ret=action(name+" - runid: "+runId+" - yield "+stepId++,gen.next).call(gen,res)}catch(e){return reject(e)}next(ret)}function onRejected(err){var ret;
/*ThouShaltNotCache*/
pendingPromise=void 0;try{ret=action(name+" - runid: "+runId+" - yield "+stepId++,gen.throw).call(gen,err)}catch(e){return reject(e)}next(ret)}function next(ret){
/*ThouShaltNotCache*/
if(!isFunction(null==ret?void 0:ret.then))return ret.done?resolve(ret.value):(pendingPromise=Promise.resolve(ret.value)).then(onFulfilled,onRejected);ret.then(next,reject)}rejector=reject,onFulfilled(void 0)});return promise.cancel=action(name+" - runid: "+runId+" - cancel",function(){
/*ThouShaltNotCache*/
try{pendingPromise&&cancelPromise(pendingPromise);var _res=gen.return(void 0),yieldedPromise=Promise.resolve(_res.value);yieldedPromise.then(noop,noop),cancelPromise(yieldedPromise),rejector(new FlowCancellationError)}catch(e){rejector(e)}}),promise};return res.isMobXFlow=!0,res},flowAnnotation);function cancelPromise(promise){
/*ThouShaltNotCache*/
isFunction(promise.cancel)&&promise.cancel()}function isFlow(fn){
/*ThouShaltNotCache*/
return!0===(null==fn?void 0:fn.isMobXFlow)}function _isObservable(value,property){
/*ThouShaltNotCache*/
return!!value&&(void 0!==property?!!isObservableObject(value)&&value[$mobx].values_.has(property):isObservableObject(value)||!!value[$mobx]||isAtom(value)||isReaction(value)||isComputedValue(value))}function isObservable(value){return _isObservable(value)}function transaction(action,thisArg){
/*ThouShaltNotCache*/
void 0===thisArg&&(thisArg=void 0),startBatch();try{return action.apply(thisArg)}finally{endBatch()}}function getAdm(target){
/*ThouShaltNotCache*/
return target[$mobx]}flow.bound=createDecoratorAnnotation(flowBoundAnnotation);var objectProxyTraps={has:function(target,name){return getAdm(target).has_(name)},get:function(target,name){
/*ThouShaltNotCache*/
return getAdm(target).get_(name)},set:function(target,name,value){
/*ThouShaltNotCache*/
var _getAdm$set_;return!!isStringish(name)&&(null==(_getAdm$set_=getAdm(target).set_(name,value,!0))||_getAdm$set_)},deleteProperty:function(target,name){
/*ThouShaltNotCache*/
var _getAdm$delete_;return!!isStringish(name)&&(null==(_getAdm$delete_=getAdm(target).delete_(name,!0))||_getAdm$delete_)},defineProperty:function(target,name,descriptor){
/*ThouShaltNotCache*/
var _getAdm$definePropert;return null==(_getAdm$definePropert=getAdm(target).defineProperty_(name,descriptor))||_getAdm$definePropert},ownKeys:function(target){return getAdm(target).ownKeys_()},preventExtensions:function(target){
/*ThouShaltNotCache*/
die(13)}};function hasInterceptors(interceptable){
/*ThouShaltNotCache*/
return void 0!==interceptable.interceptors_&&interceptable.interceptors_.length>0}function registerInterceptor(interceptable,handler){
/*ThouShaltNotCache*/
var interceptors=interceptable.interceptors_||(interceptable.interceptors_=[]);return interceptors.push(handler),once(function(){
/*ThouShaltNotCache*/
var idx=interceptors.indexOf(handler);-1!==idx&&interceptors.splice(idx,1)})}function interceptChange(interceptable,change){
/*ThouShaltNotCache*/
var prevU=untrackedStart();try{for(var interceptors=[].concat(interceptable.interceptors_||[]),i=0,l=interceptors.length;i<l&&((change=interceptors[i](change))&&!change.type&&die(14),change);i++);return change}finally{untrackedEnd(prevU)}}function hasListeners(listenable){
/*ThouShaltNotCache*/
return void 0!==listenable.changeListeners_&&listenable.changeListeners_.length>0}function registerListener(listenable,handler){
/*ThouShaltNotCache*/
var listeners=listenable.changeListeners_||(listenable.changeListeners_=[]);return listeners.push(handler),once(function(){
/*ThouShaltNotCache*/
var idx=listeners.indexOf(handler);-1!==idx&&listeners.splice(idx,1)})}function notifyListeners(listenable,change){
/*ThouShaltNotCache*/
var prevU=untrackedStart(),listeners=listenable.changeListeners_;if(listeners){for(var i=0,l=(listeners=listeners.slice()).length;i<l;i++)listeners[i](change);untrackedEnd(prevU)}}function makeObservable(target,annotations,options){
/*ThouShaltNotCache*/
return initObservable(function(){
/*ThouShaltNotCache*/
var adm=asObservableObject(target,options)[$mobx];null!=annotations||(annotations=function(target){
/*ThouShaltNotCache*/
return hasProp(target,storedAnnotationsSymbol)||addHiddenProp(target,storedAnnotationsSymbol,_extends({},target[storedAnnotationsSymbol])),target[storedAnnotationsSymbol]}(target)),ownKeys(annotations).forEach(function(key){
/*ThouShaltNotCache*/
return adm.make_(key,annotations[key])})}),target}var UPDATE="update",arrayTraps={get:function(target,name){
/*ThouShaltNotCache*/
var adm=target[$mobx];return name===$mobx?adm:"length"===name?adm.getArrayLength_():"string"!=typeof name||isNaN(name)?hasProp(arrayExtensions,name)?arrayExtensions[name]:target[name]:adm.get_(parseInt(name))},set:function(target,name,value){
/*ThouShaltNotCache*/
var adm=target[$mobx];return"length"===name&&adm.setArrayLength_(value),"symbol"==typeof name||isNaN(name)?target[name]=value:adm.set_(parseInt(name),value),!0},preventExtensions:function(){
/*ThouShaltNotCache*/
die(15)}},ObservableArrayAdministration=function(){
/*ThouShaltNotCache*/
function ObservableArrayAdministration(name,enhancer,owned_,legacyMode_){
/*ThouShaltNotCache*/
void 0===name&&(name="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=owned_,this.legacyMode_=legacyMode_,this.atom_=new Atom(name),this.enhancer_=function(newV,oldV){
/*ThouShaltNotCache*/
return enhancer(newV,oldV,"ObservableArray[..]")}}var _proto=ObservableArrayAdministration.prototype;return _proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.dehanceValues_=function(values){
/*ThouShaltNotCache*/
return void 0!==this.dehancer&&values.length>0?values.map(this.dehancer):values},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.observe_=function(listener,fireImmediately){
/*ThouShaltNotCache*/
return void 0===fireImmediately&&(fireImmediately=!1),fireImmediately&&listener({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),registerListener(this,listener)},_proto.getArrayLength_=function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.values_.length},_proto.setArrayLength_=function(newLength){
/*ThouShaltNotCache*/
("number"!=typeof newLength||isNaN(newLength)||newLength<0)&&die("Out of range: "+newLength);var currentLength=this.values_.length;if(newLength!==currentLength)if(newLength>currentLength){for(var newItems=new Array(newLength-currentLength),i=0;i<newLength-currentLength;i++)newItems[i]=void 0;this.spliceWithArray_(currentLength,0,newItems)}else this.spliceWithArray_(newLength,currentLength-newLength)},_proto.updateArrayLength_=function(oldLength,delta){
/*ThouShaltNotCache*/
oldLength!==this.lastKnownLength_&&die(16),this.lastKnownLength_+=delta,this.legacyMode_&&delta>0&&reserveArrayBuffer(oldLength+delta+1)},_proto.spliceWithArray_=function(index,deleteCount,newItems){
/*ThouShaltNotCache*/
var _this=this;this.atom_;var length=this.values_.length;if(void 0===index?index=0:index>length?index=length:index<0&&(index=Math.max(0,length+index)),deleteCount=1===arguments.length?length-index:null==deleteCount?0:Math.max(0,Math.min(deleteCount,length-index)),void 0===newItems&&(newItems=EMPTY_ARRAY),hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_,type:"splice",index,removedCount:deleteCount,added:newItems});if(!change)return EMPTY_ARRAY;deleteCount=change.removedCount,newItems=change.added}if(newItems=0===newItems.length?newItems:newItems.map(function(v){
/*ThouShaltNotCache*/
return _this.enhancer_(v,void 0)}),this.legacyMode_){var lengthDelta=newItems.length-deleteCount;this.updateArrayLength_(length,lengthDelta)}var res=this.spliceItemsIntoValues_(index,deleteCount,newItems);return 0===deleteCount&&0===newItems.length||this.notifyArraySplice_(index,newItems,res),this.dehanceValues_(res)},_proto.spliceItemsIntoValues_=function(index,deleteCount,newItems){var _this$values_;
/*ThouShaltNotCache*/
if(newItems.length<1e4)return(_this$values_=this.values_).splice.apply(_this$values_,[index,deleteCount].concat(newItems));var res=this.values_.slice(index,index+deleteCount),oldItems=this.values_.slice(index+deleteCount);this.values_.length+=newItems.length-deleteCount;for(var i=0;i<newItems.length;i++)this.values_[index+i]=newItems[i];for(var _i=0;_i<oldItems.length;_i++)this.values_[index+newItems.length+_i]=oldItems[_i];return res},_proto.notifyArrayChildUpdate_=function(index,newValue,oldValue){
/*ThouShaltNotCache*/
var notifySpy=!this.owned_&&!1,notify=hasListeners(this),change=notify||notifySpy?{observableKind:"array",object:this.proxy_,type:UPDATE,debugObjectName:this.atom_.name_,index,newValue,oldValue}:null;this.atom_.reportChanged(),notify&&notifyListeners(this,change)},_proto.notifyArraySplice_=function(index,added,removed){
/*ThouShaltNotCache*/
var notifySpy=!this.owned_&&!1,notify=hasListeners(this),change=notify||notifySpy?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index,removed,added,removedCount:removed.length,addedCount:added.length}:null;this.atom_.reportChanged(),notify&&notifyListeners(this,change)},_proto.get_=function(index){
/*ThouShaltNotCache*/
if(!(this.legacyMode_&&index>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[index]);console.warn("[mobx] Out of bounds read: "+index)},_proto.set_=function(index,newValue){
/*ThouShaltNotCache*/
var values=this.values_;if(this.legacyMode_&&index>values.length&&die(17,index,values.length),index<values.length){this.atom_;var oldValue=values[index];if(hasInterceptors(this)){var change=interceptChange(this,{type:UPDATE,object:this.proxy_,index,newValue});if(!change)return;newValue=change.newValue}(newValue=this.enhancer_(newValue,oldValue))!==oldValue&&(values[index]=newValue,this.notifyArrayChildUpdate_(index,newValue,oldValue))}else{for(var newItems=new Array(index+1-values.length),i=0;i<newItems.length-1;i++)newItems[i]=void 0;newItems[newItems.length-1]=newValue,this.spliceWithArray_(values.length,0,newItems)}},ObservableArrayAdministration}();function createObservableArray(initialValues,enhancer,name,owned){
/*ThouShaltNotCache*/
return void 0===name&&(name="ObservableArray"),void 0===owned&&(owned=!1),assertProxies(),initObservable(function(){
/*ThouShaltNotCache*/
var adm=new ObservableArrayAdministration(name,enhancer,owned,!1);addHiddenFinalProp(adm.values_,$mobx,adm);var proxy=new Proxy(adm.values_,arrayTraps);return adm.proxy_=proxy,initialValues&&initialValues.length&&adm.spliceWithArray_(0,0,initialValues),proxy})}var arrayExtensions={clear:function(){
/*ThouShaltNotCache*/
return this.splice(0)},replace:function(newItems){
/*ThouShaltNotCache*/
var adm=this[$mobx];return adm.spliceWithArray_(0,adm.values_.length,newItems)},toJSON:function(){
/*ThouShaltNotCache*/
return this.slice()},splice:function(index,deleteCount){
/*ThouShaltNotCache*/
for(var _len=arguments.length,newItems=new Array(_len>2?_len-2:0),_key=2;_key<_len;_key++)newItems[_key-2]=arguments[_key];var adm=this[$mobx];switch(arguments.length){case 0:return[];case 1:return adm.spliceWithArray_(index);case 2:return adm.spliceWithArray_(index,deleteCount)}return adm.spliceWithArray_(index,deleteCount,newItems)},spliceWithArray:function(index,deleteCount,newItems){
/*ThouShaltNotCache*/
return this[$mobx].spliceWithArray_(index,deleteCount,newItems)},push:function(){for(
/*ThouShaltNotCache*/
var adm=this[$mobx],_len2=arguments.length,items=new Array(_len2),_key2=0;_key2<_len2;_key2++)items[_key2]=arguments[_key2];return adm.spliceWithArray_(adm.values_.length,0,items),adm.values_.length},pop:function(){
/*ThouShaltNotCache*/
return this.splice(Math.max(this[$mobx].values_.length-1,0),1)[0]},shift:function(){
/*ThouShaltNotCache*/
return this.splice(0,1)[0]},unshift:function(){for(
/*ThouShaltNotCache*/
var adm=this[$mobx],_len3=arguments.length,items=new Array(_len3),_key3=0;_key3<_len3;_key3++)items[_key3]=arguments[_key3];return adm.spliceWithArray_(0,0,items),adm.values_.length},reverse:function(){
/*ThouShaltNotCache*/
return globalState.trackingDerivation&&die(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){
/*ThouShaltNotCache*/
globalState.trackingDerivation&&die(37,"sort");var copy=this.slice();return copy.sort.apply(copy,arguments),this.replace(copy),this},remove:function(value){
/*ThouShaltNotCache*/
var adm=this[$mobx],idx=adm.dehanceValues_(adm.values_).indexOf(value);return idx>-1&&(this.splice(idx,1),!0)}};function addArrayExtension(funcName,funcFactory){
/*ThouShaltNotCache*/
"function"==typeof Array.prototype[funcName]&&(arrayExtensions[funcName]=funcFactory(funcName))}function simpleFunc(funcName){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var adm=this[$mobx];adm.atom_.reportObserved();var dehancedValues=adm.dehanceValues_(adm.values_);return dehancedValues[funcName].apply(dehancedValues,arguments)}}function mapLikeFunc(funcName){
/*ThouShaltNotCache*/
return function(callback,thisArg){
/*ThouShaltNotCache*/
var _this2=this,adm=this[$mobx];return adm.atom_.reportObserved(),adm.dehanceValues_(adm.values_)[funcName](function(element,index){
/*ThouShaltNotCache*/
return callback.call(thisArg,element,index,_this2)})}}function reduceLikeFunc(funcName){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var _this3=this,adm=this[$mobx];adm.atom_.reportObserved();var dehancedValues=adm.dehanceValues_(adm.values_),callback=arguments[0];return arguments[0]=function(accumulator,currentValue,index){
/*ThouShaltNotCache*/
return callback(accumulator,currentValue,index,_this3)},dehancedValues[funcName].apply(dehancedValues,arguments)}}addArrayExtension("at",simpleFunc),addArrayExtension("concat",simpleFunc),addArrayExtension("flat",simpleFunc),addArrayExtension("includes",simpleFunc),addArrayExtension("indexOf",simpleFunc),addArrayExtension("join",simpleFunc),addArrayExtension("lastIndexOf",simpleFunc),addArrayExtension("slice",simpleFunc),addArrayExtension("toString",simpleFunc),addArrayExtension("toLocaleString",simpleFunc),addArrayExtension("toSorted",simpleFunc),addArrayExtension("toSpliced",simpleFunc),addArrayExtension("with",simpleFunc),addArrayExtension("every",mapLikeFunc),addArrayExtension("filter",mapLikeFunc),addArrayExtension("find",mapLikeFunc),addArrayExtension("findIndex",mapLikeFunc),addArrayExtension("findLast",mapLikeFunc),addArrayExtension("findLastIndex",mapLikeFunc),addArrayExtension("flatMap",mapLikeFunc),addArrayExtension("forEach",mapLikeFunc),addArrayExtension("map",mapLikeFunc),addArrayExtension("some",mapLikeFunc),addArrayExtension("toReversed",mapLikeFunc),addArrayExtension("reduce",reduceLikeFunc),addArrayExtension("reduceRight",reduceLikeFunc);var isObservableArrayAdministration=createInstanceofPredicate("ObservableArrayAdministration",ObservableArrayAdministration);function isObservableArray(thing){
/*ThouShaltNotCache*/
return isObject(thing)&&isObservableArrayAdministration(thing[$mobx])}var ObservableMapMarker={},ADD="add",ObservableMap=function(){
/*ThouShaltNotCache*/
function ObservableMap(initialData,enhancer_,name_){
/*ThouShaltNotCache*/
var _this=this;void 0===enhancer_&&(enhancer_=deepEnhancer),void 0===name_&&(name_="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[$mobx]=ObservableMapMarker,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=enhancer_,this.name_=name_,isFunction(Map)||die(18),initObservable(function(){
/*ThouShaltNotCache*/
_this.keysAtom_=createAtom("ObservableMap.keys()"),_this.data_=new Map,_this.hasMap_=new Map,initialData&&_this.merge(initialData)})}var _proto=ObservableMap.prototype;return _proto.has_=function(key){
/*ThouShaltNotCache*/
return this.data_.has(key)},_proto.has=function(key){
/*ThouShaltNotCache*/
var _this2=this;if(!globalState.trackingDerivation)return this.has_(key);var entry=this.hasMap_.get(key);if(!entry){var newEntry=entry=new ObservableValue(this.has_(key),referenceEnhancer,"ObservableMap.key?",!1);this.hasMap_.set(key,newEntry),onBecomeUnobserved(newEntry,function(){
/*ThouShaltNotCache*/
return _this2.hasMap_.delete(key)})}return entry.get()},_proto.set=function(key,value){
/*ThouShaltNotCache*/
var hasKey=this.has_(key);if(hasInterceptors(this)){var change=interceptChange(this,{type:hasKey?UPDATE:ADD,object:this,newValue:value,name:key});if(!change)return this;value=change.newValue}return hasKey?this.updateValue_(key,value):this.addValue_(key,value),this},_proto.delete=function(key){
/*ThouShaltNotCache*/
var _this3=this;if((this.keysAtom_,hasInterceptors(this))&&!interceptChange(this,{type:"delete",object:this,name:key}))return!1;if(this.has_(key)){var notify=hasListeners(this),_change=notify?{observableKind:"map",debugObjectName:this.name_,type:"delete",object:this,oldValue:this.data_.get(key).value_,name:key}:null;return transaction(function(){
/*ThouShaltNotCache*/
var _this3$hasMap_$get;_this3.keysAtom_.reportChanged(),null==(_this3$hasMap_$get=_this3.hasMap_.get(key))||_this3$hasMap_$get.setNewValue_(!1),_this3.data_.get(key).setNewValue_(void 0),_this3.data_.delete(key)}),notify&&notifyListeners(this,_change),!0}return!1},_proto.updateValue_=function(key,newValue){
/*ThouShaltNotCache*/
var observable=this.data_.get(key);if((newValue=observable.prepareNewValue_(newValue))!==globalState.UNCHANGED){var notify=hasListeners(this),change=notify?{observableKind:"map",debugObjectName:this.name_,type:UPDATE,object:this,oldValue:observable.value_,name:key,newValue}:null;0,observable.setNewValue_(newValue),notify&&notifyListeners(this,change)}},_proto.addValue_=function(key,newValue){
/*ThouShaltNotCache*/
var _this4=this;this.keysAtom_,transaction(function(){
/*ThouShaltNotCache*/
var _this4$hasMap_$get,observable=new ObservableValue(newValue,_this4.enhancer_,"ObservableMap.key",!1);_this4.data_.set(key,observable),newValue=observable.value_,null==(_this4$hasMap_$get=_this4.hasMap_.get(key))||_this4$hasMap_$get.setNewValue_(!0),_this4.keysAtom_.reportChanged()});var notify=hasListeners(this),change=notify?{observableKind:"map",debugObjectName:this.name_,type:ADD,object:this,name:key,newValue}:null;notify&&notifyListeners(this,change)},_proto.get=function(key){
/*ThouShaltNotCache*/
return this.has(key)?this.dehanceValue_(this.data_.get(key).get()):this.dehanceValue_(void 0)},_proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.keys=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.keys()},_proto.values=function(){
/*ThouShaltNotCache*/
var self=this,keys=this.keys();return makeIterableForMap({next:function(){
/*ThouShaltNotCache*/
var _keys$next=keys.next(),done=_keys$next.done,value=_keys$next.value;return{done,value:done?void 0:self.get(value)}}})},_proto.entries=function(){
/*ThouShaltNotCache*/
var self=this,keys=this.keys();return makeIterableForMap({next:function(){
/*ThouShaltNotCache*/
var _keys$next2=keys.next(),done=_keys$next2.done,value=_keys$next2.value;return{done,value:done?void 0:[value,self.get(value)]}}})},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.entries()},_proto.forEach=function(callback,thisArg){
/*ThouShaltNotCache*/
for(var _step,_iterator=_createForOfIteratorHelperLoose(this);!(_step=_iterator()).done;){var _step$value=_step.value,key=_step$value[0],value=_step$value[1];callback.call(thisArg,value,key,this)}},_proto.merge=function(other){
/*ThouShaltNotCache*/
var _this5=this;return isObservableMap(other)&&(other=new Map(other)),transaction(function(){var thing,mapProto,objectProto;
/*ThouShaltNotCache*/
isPlainObject(other)?function(object){
/*ThouShaltNotCache*/
var keys=Object.keys(object);if(!hasGetOwnPropertySymbols)return keys;var symbols=Object.getOwnPropertySymbols(object);return symbols.length?[].concat(keys,symbols.filter(function(s){
/*ThouShaltNotCache*/
return objectPrototype.propertyIsEnumerable.call(object,s)})):keys}(other).forEach(function(key){
/*ThouShaltNotCache*/
return _this5.set(key,other[key])}):Array.isArray(other)?other.forEach(function(_ref){
/*ThouShaltNotCache*/
var key=_ref[0],value=_ref[1];return _this5.set(key,value)}):isES6Map(other)?(thing=other,mapProto=Object.getPrototypeOf(thing),objectProto=Object.getPrototypeOf(mapProto),null!==Object.getPrototypeOf(objectProto)&&die(19,other),other.forEach(function(value,key){
/*ThouShaltNotCache*/
return _this5.set(key,value)})):null!=other&&die(20,other)}),this},_proto.clear=function(){
/*ThouShaltNotCache*/
var _this6=this;transaction(function(){
/*ThouShaltNotCache*/
untracked(function(){
/*ThouShaltNotCache*/
for(var _step2,_iterator2=_createForOfIteratorHelperLoose(_this6.keys());!(_step2=_iterator2()).done;){var key=_step2.value;_this6.delete(key)}})})},_proto.replace=function(values){
/*ThouShaltNotCache*/
var _this7=this;return transaction(function(){for(
/*ThouShaltNotCache*/
var _step3,replacementMap=function(dataStructure){
/*ThouShaltNotCache*/
if(isES6Map(dataStructure)||isObservableMap(dataStructure))return dataStructure;if(Array.isArray(dataStructure))return new Map(dataStructure);if(isPlainObject(dataStructure)){var map=new Map;for(var key in dataStructure)map.set(key,dataStructure[key]);return map}return die(21,dataStructure)}(values),orderedData=new Map,keysReportChangedCalled=!1,_iterator3=_createForOfIteratorHelperLoose(_this7.data_.keys());!(_step3=_iterator3()).done;){var key=_step3.value;if(!replacementMap.has(key))if(_this7.delete(key))keysReportChangedCalled=!0;else{var value=_this7.data_.get(key);orderedData.set(key,value)}}for(var _step4,_iterator4=_createForOfIteratorHelperLoose(replacementMap.entries());!(_step4=_iterator4()).done;){var _step4$value=_step4.value,_key=_step4$value[0],_value=_step4$value[1],keyExisted=_this7.data_.has(_key);if(_this7.set(_key,_value),_this7.data_.has(_key)){var _value2=_this7.data_.get(_key);orderedData.set(_key,_value2),keyExisted||(keysReportChangedCalled=!0)}}if(!keysReportChangedCalled)if(_this7.data_.size!==orderedData.size)_this7.keysAtom_.reportChanged();else for(var iter1=_this7.data_.keys(),iter2=orderedData.keys(),next1=iter1.next(),next2=iter2.next();!next1.done;){if(next1.value!==next2.value){_this7.keysAtom_.reportChanged();break}next1=iter1.next(),next2=iter2.next()}_this7.data_=orderedData}),this},_proto.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableMap]"},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},_proto.observe_=function(listener,fireImmediately){return registerListener(this,listener)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_createClass(ObservableMap,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Map"}}])}(),isObservableMap=createInstanceofPredicate("ObservableMap",ObservableMap);function makeIterableForMap(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.toStringTag]="MapIterator",makeIterable(iterator)}var ObservableSetMarker={},ObservableSet=function(){
/*ThouShaltNotCache*/
function ObservableSet(initialData,enhancer,name_){
/*ThouShaltNotCache*/
var _this=this;void 0===enhancer&&(enhancer=deepEnhancer),void 0===name_&&(name_="ObservableSet"),this.name_=void 0,this[$mobx]=ObservableSetMarker,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=name_,isFunction(Set)||die(22),this.enhancer_=function(newV,oldV){
/*ThouShaltNotCache*/
return enhancer(newV,oldV,name_)},initObservable(function(){
/*ThouShaltNotCache*/
_this.atom_=createAtom(_this.name_),initialData&&_this.replace(initialData)})}var _proto=ObservableSet.prototype;return _proto.dehanceValue_=function(value){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(value):value},_proto.clear=function(){
/*ThouShaltNotCache*/
var _this2=this;transaction(function(){
/*ThouShaltNotCache*/
untracked(function(){
/*ThouShaltNotCache*/
for(var _step,_iterator=_createForOfIteratorHelperLoose(_this2.data_.values());!(_step=_iterator()).done;){var value=_step.value;_this2.delete(value)}})})},_proto.forEach=function(callbackFn,thisArg){
/*ThouShaltNotCache*/
for(var _step2,_iterator2=_createForOfIteratorHelperLoose(this);!(_step2=_iterator2()).done;){var value=_step2.value;callbackFn.call(thisArg,value,value,this)}},_proto.add=function(value){
/*ThouShaltNotCache*/
var _this3=this;if(this.atom_,hasInterceptors(this)){var change=interceptChange(this,{type:ADD,object:this,newValue:value});if(!change)return this;value=change.newValue}if(!this.has(value)){transaction(function(){
/*ThouShaltNotCache*/
_this3.data_.add(_this3.enhancer_(value,void 0)),_this3.atom_.reportChanged()});var notify=hasListeners(this),_change=notify?{observableKind:"set",debugObjectName:this.name_,type:ADD,object:this,newValue:value}:null;false,notify&&notifyListeners(this,_change)}return this},_proto.delete=function(value){
/*ThouShaltNotCache*/
var _this4=this;if(hasInterceptors(this)&&!interceptChange(this,{type:"delete",object:this,oldValue:value}))return!1;if(this.has(value)){var notify=hasListeners(this),_change2=notify?{observableKind:"set",debugObjectName:this.name_,type:"delete",object:this,oldValue:value}:null;return transaction(function(){
/*ThouShaltNotCache*/
_this4.atom_.reportChanged(),_this4.data_.delete(value)}),notify&&notifyListeners(this,_change2),!0}return!1},_proto.has=function(value){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(value))},_proto.entries=function(){
/*ThouShaltNotCache*/
var values=this.values();return makeIterableForSet({next:function(){
/*ThouShaltNotCache*/
var _values$next=values.next(),value=_values$next.value,done=_values$next.done;return done?{value:void 0,done}:{value:[value,value],done}}})},_proto.keys=function(){
/*ThouShaltNotCache*/
return this.values()},_proto.values=function(){
/*ThouShaltNotCache*/
this.atom_.reportObserved();var self=this,values=this.data_.values();return makeIterableForSet({next:function(){
/*ThouShaltNotCache*/
var _values$next2=values.next(),value=_values$next2.value,done=_values$next2.done;return done?{value:void 0,done}:{value:self.dehanceValue_(value),done}}})},_proto.intersection=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.intersection(this):new Set(this).intersection(otherSet)},_proto.union=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.union(this):new Set(this).union(otherSet)},_proto.difference=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).difference(otherSet)},_proto.symmetricDifference=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.symmetricDifference(this):new Set(this).symmetricDifference(otherSet)},_proto.isSubsetOf=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).isSubsetOf(otherSet)},_proto.isSupersetOf=function(otherSet){
/*ThouShaltNotCache*/
return new Set(this).isSupersetOf(otherSet)},_proto.isDisjointFrom=function(otherSet){
/*ThouShaltNotCache*/
return isES6Set(otherSet)&&!isObservableSet(otherSet)?otherSet.isDisjointFrom(this):new Set(this).isDisjointFrom(otherSet)},_proto.replace=function(other){
/*ThouShaltNotCache*/
var _this5=this;return isObservableSet(other)&&(other=new Set(other)),transaction(function(){
/*ThouShaltNotCache*/
Array.isArray(other)||isES6Set(other)?(_this5.clear(),other.forEach(function(value){
/*ThouShaltNotCache*/
return _this5.add(value)})):null!=other&&die("Cannot initialize set from "+other)}),this},_proto.observe_=function(listener,fireImmediately){return registerListener(this,listener)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},_proto.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableSet]"},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.values()},_createClass(ObservableSet,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Set"}}])}(),isObservableSet=createInstanceofPredicate("ObservableSet",ObservableSet);function makeIterableForSet(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.toStringTag]="SetIterator",makeIterable(iterator)}var descriptorCache=Object.create(null),ObservableObjectAdministration=function(){
/*ThouShaltNotCache*/
function ObservableObjectAdministration(target_,values_,name_,defaultAnnotation_){
/*ThouShaltNotCache*/
void 0===values_&&(values_=new Map),void 0===defaultAnnotation_&&(defaultAnnotation_=autoAnnotation),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=target_,this.values_=values_,this.name_=name_,this.defaultAnnotation_=defaultAnnotation_,this.keysAtom_=new Atom("ObservableObject.keys"),this.isPlainObject_=isPlainObject(this.target_)}var _proto=ObservableObjectAdministration.prototype;return _proto.getObservablePropValue_=function(key){
/*ThouShaltNotCache*/
return this.values_.get(key).get()},_proto.setObservablePropValue_=function(key,newValue){
/*ThouShaltNotCache*/
var observable=this.values_.get(key);if(observable instanceof ComputedValue)return observable.set(newValue),!0;if(hasInterceptors(this)){var change=interceptChange(this,{type:UPDATE,object:this.proxy_||this.target_,name:key,newValue});if(!change)return null;newValue=change.newValue}if((newValue=observable.prepareNewValue_(newValue))!==globalState.UNCHANGED){var notify=hasListeners(this),_change=notify?{type:UPDATE,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:observable.value_,name:key,newValue}:null;0,observable.setNewValue_(newValue),notify&&notifyListeners(this,_change)}return!0},_proto.get_=function(key){
/*ThouShaltNotCache*/
return globalState.trackingDerivation&&!hasProp(this.target_,key)&&this.has_(key),this.target_[key]},_proto.set_=function(key,value,proxyTrap){
/*ThouShaltNotCache*/
return void 0===proxyTrap&&(proxyTrap=!1),hasProp(this.target_,key)?this.values_.has(key)?this.setObservablePropValue_(key,value):proxyTrap?Reflect.set(this.target_,key,value):(this.target_[key]=value,!0):this.extend_(key,{value,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,proxyTrap)},_proto.has_=function(key){
/*ThouShaltNotCache*/
if(!globalState.trackingDerivation)return key in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var entry=this.pendingKeys_.get(key);return entry||(entry=new ObservableValue(key in this.target_,referenceEnhancer,"ObservableObject.key?",!1),this.pendingKeys_.set(key,entry)),entry.get()},_proto.make_=function(key,annotation){if(
/*ThouShaltNotCache*/
!0===annotation&&(annotation=this.defaultAnnotation_),!1!==annotation){if(assertAnnotable(this,annotation,key),!(key in this.target_)){var _this$target_$storedA;if(null!=(_this$target_$storedA=this.target_[storedAnnotationsSymbol])&&_this$target_$storedA[key])return;die(1,annotation.annotationType_,this.name_+"."+key.toString())}for(var source=this.target_;source&&source!==objectPrototype;){var descriptor=getDescriptor(source,key);if(descriptor){var outcome=annotation.make_(this,key,descriptor,source);if(0===outcome)return;if(1===outcome)break}source=Object.getPrototypeOf(source)}recordAnnotationApplied(this,annotation,key)}},_proto.extend_=function(key,descriptor,annotation,proxyTrap){if(
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),!0===annotation&&(annotation=this.defaultAnnotation_),!1===annotation)return this.defineProperty_(key,descriptor,proxyTrap);assertAnnotable(this,annotation,key);var outcome=annotation.extend_(this,key,descriptor,proxyTrap);return outcome&&recordAnnotationApplied(this,annotation,key),outcome},_proto.defineProperty_=function(key,descriptor,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:descriptor.value});if(!change)return null;var newValue=change.newValue;descriptor.value!==newValue&&(descriptor=_extends({},descriptor,{value:newValue}))}if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);this.notifyPropertyAddition_(key,descriptor.value)}finally{endBatch()}return!0},_proto.defineObservableProperty_=function(key,value,enhancer,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this)){var change=interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:value});if(!change)return null;value=change.newValue}var cachedDescriptor=getCachedObservablePropDescriptor(key),descriptor={configurable:!globalState.safeDescriptors||this.isPlainObject_,enumerable:!0,get:cachedDescriptor.get,set:cachedDescriptor.set};if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);var observable=new ObservableValue(value,enhancer,"ObservableObject.key",!1);this.values_.set(key,observable),this.notifyPropertyAddition_(key,observable.value_)}finally{endBatch()}return!0},_proto.defineComputedProperty_=function(key,options,proxyTrap){
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_;try{startBatch();var deleteOutcome=this.delete_(key);if(!deleteOutcome)return deleteOutcome;if(hasInterceptors(this))if(!interceptChange(this,{object:this.proxy_||this.target_,name:key,type:ADD,newValue:void 0}))return null;options.name||(options.name="ObservableObject.key"),options.context=this.proxy_||this.target_;var cachedDescriptor=getCachedObservablePropDescriptor(key),descriptor={configurable:!globalState.safeDescriptors||this.isPlainObject_,enumerable:!1,get:cachedDescriptor.get,set:cachedDescriptor.set};if(proxyTrap){if(!Reflect.defineProperty(this.target_,key,descriptor))return!1}else defineProperty(this.target_,key,descriptor);this.values_.set(key,new ComputedValue(options)),this.notifyPropertyAddition_(key,void 0)}finally{endBatch()}return!0},_proto.delete_=function(key,proxyTrap){if(
/*ThouShaltNotCache*/
void 0===proxyTrap&&(proxyTrap=!1),this.keysAtom_,!hasProp(this.target_,key))return!0;if(hasInterceptors(this)&&!interceptChange(this,{object:this.proxy_||this.target_,name:key,type:"remove"}))return null;try{var _this$pendingKeys_;startBatch();var _getDescriptor,notify=hasListeners(this),observable=this.values_.get(key),value=void 0;if(!observable&&notify)value=null==(_getDescriptor=getDescriptor(this.target_,key))?void 0:_getDescriptor.value;if(proxyTrap){if(!Reflect.deleteProperty(this.target_,key))return!1}else delete this.target_[key];if(observable&&(this.values_.delete(key),observable instanceof ObservableValue&&(value=observable.value_),propagateChanged(observable)),this.keysAtom_.reportChanged(),null==(_this$pendingKeys_=this.pendingKeys_)||null==(_this$pendingKeys_=_this$pendingKeys_.get(key))||_this$pendingKeys_.set(key in this.target_),notify){var _change2={type:"remove",observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:value,name:key};0,notify&&notifyListeners(this,_change2)}}finally{endBatch()}return!0},_proto.observe_=function(callback,fireImmediately){return registerListener(this,callback)},_proto.intercept_=function(handler){
/*ThouShaltNotCache*/
return registerInterceptor(this,handler)},_proto.notifyPropertyAddition_=function(key,value){
/*ThouShaltNotCache*/
var _this$pendingKeys_2,notify=hasListeners(this);if(notify){var change=notify?{type:ADD,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:key,newValue:value}:null;0,notify&&notifyListeners(this,change)}null==(_this$pendingKeys_2=this.pendingKeys_)||null==(_this$pendingKeys_2=_this$pendingKeys_2.get(key))||_this$pendingKeys_2.set(!0),this.keysAtom_.reportChanged()},_proto.ownKeys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),ownKeys(this.target_)},_proto.keys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),Object.keys(this.target_)},ObservableObjectAdministration}();function asObservableObject(target,options){
/*ThouShaltNotCache*/
var _options$name;if(hasProp(target,$mobx))return target;var name=null!=(_options$name=null==options?void 0:options.name)?_options$name:"ObservableObject",adm=new ObservableObjectAdministration(target,new Map,String(name),function(options){
/*ThouShaltNotCache*/
var _options$defaultDecor;return options?null!=(_options$defaultDecor=options.defaultDecorator)?_options$defaultDecor:createAutoAnnotation(options):void 0}(options));return addHiddenProp(target,$mobx,adm),target}var isObservableObjectAdministration=createInstanceofPredicate("ObservableObjectAdministration",ObservableObjectAdministration);function getCachedObservablePropDescriptor(key){
/*ThouShaltNotCache*/
return descriptorCache[key]||(descriptorCache[key]={get:function(){
/*ThouShaltNotCache*/
return this[$mobx].getObservablePropValue_(key)},set:function(value){
/*ThouShaltNotCache*/
return this[$mobx].setObservablePropValue_(key,value)}})}function isObservableObject(thing){
/*ThouShaltNotCache*/
return!!isObject(thing)&&isObservableObjectAdministration(thing[$mobx])}function recordAnnotationApplied(adm,annotation,key){
/*ThouShaltNotCache*/
var _adm$target_$storedAn;null==(_adm$target_$storedAn=adm.target_[storedAnnotationsSymbol])||delete _adm$target_$storedAn[key]}function assertAnnotable(adm,annotation,key){}var ctor,proto,ENTRY_0=createArrayEntryDescriptor(0),safariPrototypeSetterInheritanceBug=function(){
/*ThouShaltNotCache*/
var v=!1,p={};return Object.defineProperty(p,"0",{set:function(){
/*ThouShaltNotCache*/
v=!0}}),Object.create(p)[0]=1,!1===v}(),OBSERVABLE_ARRAY_BUFFER_SIZE=0,StubArray=function(){};ctor=StubArray,proto=Array.prototype,
/*ThouShaltNotCache*/
Object.setPrototypeOf?Object.setPrototypeOf(ctor.prototype,proto):void 0!==ctor.prototype.__proto__?ctor.prototype.__proto__=proto:ctor.prototype=proto;var LegacyObservableArray=function(_StubArray){
/*ThouShaltNotCache*/
function LegacyObservableArray(initialValues,enhancer,name,owned){
/*ThouShaltNotCache*/
var _this;return void 0===name&&(name="ObservableArray"),void 0===owned&&(owned=!1),_this=_StubArray.call(this)||this,initObservable(function(){
/*ThouShaltNotCache*/
var adm=new ObservableArrayAdministration(name,enhancer,owned,!0);adm.proxy_=_this,addHiddenFinalProp(_this,$mobx,adm),initialValues&&initialValues.length&&_this.spliceWithArray(0,0,initialValues),safariPrototypeSetterInheritanceBug&&Object.defineProperty(_this,"0",ENTRY_0)}),_this}_inheritsLoose(LegacyObservableArray,_StubArray);var _proto=LegacyObservableArray.prototype;return _proto.concat=function(){
/*ThouShaltNotCache*/
this[$mobx].atom_.reportObserved();for(var _len=arguments.length,arrays=new Array(_len),_key=0;_key<_len;_key++)arrays[_key]=arguments[_key];return Array.prototype.concat.apply(this.slice(),arrays.map(function(a){
/*ThouShaltNotCache*/
return isObservableArray(a)?a.slice():a}))},_proto[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
var self=this,nextIndex=0;return makeIterable({next:function(){
/*ThouShaltNotCache*/
return nextIndex<self.length?{value:self[nextIndex++],done:!1}:{done:!0,value:void 0}}})},_createClass(LegacyObservableArray,[{key:"length",get:function(){
/*ThouShaltNotCache*/
return this[$mobx].getArrayLength_()},set:function(newLength){
/*ThouShaltNotCache*/
this[$mobx].setArrayLength_(newLength)}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Array"}}])}(StubArray);function createArrayEntryDescriptor(index){
/*ThouShaltNotCache*/
return{enumerable:!1,configurable:!0,get:function(){
/*ThouShaltNotCache*/
return this[$mobx].get_(index)},set:function(value){
/*ThouShaltNotCache*/
this[$mobx].set_(index,value)}}}function createArrayBufferItem(index){
/*ThouShaltNotCache*/
defineProperty(LegacyObservableArray.prototype,""+index,createArrayEntryDescriptor(index))}function reserveArrayBuffer(max){
/*ThouShaltNotCache*/
if(max>OBSERVABLE_ARRAY_BUFFER_SIZE){for(var index=OBSERVABLE_ARRAY_BUFFER_SIZE;index<max+100;index++)createArrayBufferItem(index);OBSERVABLE_ARRAY_BUFFER_SIZE=max}}function createLegacyArray(initialValues,enhancer,name){
/*ThouShaltNotCache*/
return new LegacyObservableArray(initialValues,enhancer,name)}function getAtom(thing,property){
/*ThouShaltNotCache*/
if("object"==typeof thing&&null!==thing){if(isObservableArray(thing))return void 0!==property&&die(23),thing[$mobx].atom_;if(isObservableSet(thing))return thing.atom_;if(isObservableMap(thing)){if(void 0===property)return thing.keysAtom_;var observable=thing.data_.get(property)||thing.hasMap_.get(property);return observable||die(25,property,getDebugName(thing)),observable}if(isObservableObject(thing)){if(!property)return die(26);var _observable=thing[$mobx].values_.get(property);return _observable||die(27,property,getDebugName(thing)),_observable}if(isAtom(thing)||isComputedValue(thing)||isReaction(thing))return thing}else if(isFunction(thing)&&isReaction(thing[$mobx]))return thing[$mobx];die(28)}function getAdministration(thing,property){
/*ThouShaltNotCache*/
return thing||die(29),void 0!==property?getAdministration(getAtom(thing,property)):isAtom(thing)||isComputedValue(thing)||isReaction(thing)||isObservableMap(thing)||isObservableSet(thing)?thing:thing[$mobx]?thing[$mobx]:void die(24,thing)}function getDebugName(thing,property){
/*ThouShaltNotCache*/
var named;if(void 0!==property)named=getAtom(thing,property);else{if(isAction(thing))return thing.name;named=isObservableObject(thing)||isObservableMap(thing)||isObservableSet(thing)?getAdministration(thing):getAtom(thing)}return named.name_}function initObservable(cb){
/*ThouShaltNotCache*/
var derivation=untrackedStart(),allowStateChanges=allowStateChangesStart(!0);startBatch();try{return cb()}finally{endBatch(),allowStateChangesEnd(allowStateChanges),untrackedEnd(derivation)}}Object.entries(arrayExtensions).forEach(function(_ref){
/*ThouShaltNotCache*/
var prop=_ref[0],fn=_ref[1];"concat"!==prop&&addHiddenProp(LegacyObservableArray.prototype,prop,fn)}),reserveArrayBuffer(1e3);var _getGlobal$Iterator,mobx_esm_toString=objectPrototype.toString;function deepEqual(a,b,depth){
/*ThouShaltNotCache*/
return void 0===depth&&(depth=-1),eq(a,b,depth)}function eq(a,b,depth,aStack,bStack){
/*ThouShaltNotCache*/
if(a===b)return 0!==a||1/a==1/b;if(null==a||null==b)return!1;if(a!=a)return b!=b;var type=typeof a;if("function"!==type&&"object"!==type&&"object"!=typeof b)return!1;var className=mobx_esm_toString.call(a);if(className!==mobx_esm_toString.call(b))return!1;switch(className){case"[object RegExp]":case"[object String]":return""+a==""+b;case"[object Number]":return+a!=+a?+b!=+b:0===+a?1/+a==1/b:+a===+b;case"[object Date]":case"[object Boolean]":return+a===+b;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(a)===Symbol.valueOf.call(b);case"[object Map]":case"[object Set]":depth>=0&&depth++}a=unwrap(a),b=unwrap(b);var areArrays="[object Array]"===className;if(!areArrays){if("object"!=typeof a||"object"!=typeof b)return!1;var aCtor=a.constructor,bCtor=b.constructor;if(aCtor!==bCtor&&!(isFunction(aCtor)&&aCtor instanceof aCtor&&isFunction(bCtor)&&bCtor instanceof bCtor)&&"constructor"in a&&"constructor"in b)return!1}if(0===depth)return!1;depth<0&&(depth=-1),bStack=bStack||[];for(var length=(aStack=aStack||[]).length;length--;)if(aStack[length]===a)return bStack[length]===b;if(aStack.push(a),bStack.push(b),areArrays){if((length=a.length)!==b.length)return!1;for(;length--;)if(!eq(a[length],b[length],depth-1,aStack,bStack))return!1}else{var keys=Object.keys(a),_length=keys.length;if(Object.keys(b).length!==_length)return!1;for(var i=0;i<_length;i++){var key=keys[i];if(!hasProp(b,key)||!eq(a[key],b[key],depth-1,aStack,bStack))return!1}}return aStack.pop(),bStack.pop(),!0}function unwrap(a){
/*ThouShaltNotCache*/
return isObservableArray(a)?a.slice():isES6Map(a)||isObservableMap(a)||isES6Set(a)||isObservableSet(a)?Array.from(a.entries()):a}var maybeIteratorPrototype=(null==(_getGlobal$Iterator=getGlobal().Iterator)?void 0:_getGlobal$Iterator.prototype)||{};function makeIterable(iterator){
/*ThouShaltNotCache*/
return iterator[Symbol.iterator]=getSelf,Object.assign(Object.create(maybeIteratorPrototype),iterator)}function getSelf(){
/*ThouShaltNotCache*/
return this}["Symbol","Map","Set"].forEach(function(m){void 0===getGlobal()[m]&&die("MobX requires global '"+m+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(listener){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName},$mobx});class Person{id;name;lastMessage=null;rooms=new Set;status="Online";constructor(id,name){
/*ThouShaltNotCache*/
makeObservable(this,{name:observable,lastMessage:observable,rooms:observable,status:observable,setName:action,setLastMessage:action,addRoom:action,removeRoom:action,setStatus:action}),this.id=id,this.name=name}setName(name){
/*ThouShaltNotCache*/
this.name=name}setLastMessage(message){
/*ThouShaltNotCache*/
this.lastMessage=message}addRoom(room){
/*ThouShaltNotCache*/
this.rooms.add(room)}removeRoom(room){
/*ThouShaltNotCache*/
this.rooms.delete(room)}setStatus(status){
/*ThouShaltNotCache*/
this.status=status,this.rooms.forEach(room=>{
/*ThouShaltNotCache*/
room.addStatusUpdate(this,status)})}}class Room{name;people=new Map;messages=[];roomUpdates=[];constructor(name){
/*ThouShaltNotCache*/
makeObservable(this,{name:observable,people:observable,messages:observable,roomUpdates:observable,messageCount:computed,peopleCount:computed,lastMessage:computed,members:computed,addPerson:action,removePerson:action,addMessage:action,addStatusUpdate:action,dispose:action}),this.name=name}get messageCount(){
/*ThouShaltNotCache*/
return this.messages.length}get peopleCount(){
/*ThouShaltNotCache*/
return this.people.size}get lastMessage(){
/*ThouShaltNotCache*/
return 0===this.messages.length?null:this.messages[this.messages.length-1]}get members(){
/*ThouShaltNotCache*/
return Array.from(this.people.values())}addPerson(person){
/*ThouShaltNotCache*/
this.people.has(person.id)||(this.people.set(person.id,person),person.addRoom(this))}removePerson(personId){
/*ThouShaltNotCache*/
const person=this.people.get(personId);person&&(person.removeRoom(this),this.people.delete(personId))}addMessage(message){
/*ThouShaltNotCache*/
this.messages.push(message),message.author.setLastMessage(message)}addStatusUpdate(person,status){
/*ThouShaltNotCache*/
this.roomUpdates.push(`${person.name} is now ${status}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(notifications){
/*ThouShaltNotCache*/
this.people.forEach(person=>person.removeRoom(this)),notifications&&notifications.removeRoom(this.name)}}class Message{static _nextId=0;id;text;author;timestamp;static nextId(){
/*ThouShaltNotCache*/
return Message._nextId++}constructor(text,author){
/*ThouShaltNotCache*/
makeObservable(this,{text:observable,updateText:action}),this.id=Message.nextId(),this.text=text,this.author=author,this.timestamp=new Date}updateText(text){
/*ThouShaltNotCache*/
this.text=text}}class Notifications{lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(rooms){
/*ThouShaltNotCache*/
makeObservable(this,{lastMessages:observable,updateLastMessage:action,addRoom:action,removeRoom:action}),rooms.forEach(room=>this.addRoom(room))}addRoom(room){
/*ThouShaltNotCache*/
const disposer=function(expression,effect,opts){
/*ThouShaltNotCache*/
var _opts$name2,_opts4,_opts5;void 0===opts&&(opts=EMPTY_OBJECT);var errorHandler,baseFn,value,name=null!=(_opts$name2=opts.name)?_opts$name2:"Reaction",effectAction=action(name,opts.onError?(errorHandler=opts.onError,baseFn=effect,function(){
/*ThouShaltNotCache*/
try{return baseFn.apply(this,arguments)}catch(e){errorHandler.call(this,e)}}):effect),runSync=!opts.scheduler&&!opts.delay,scheduler=createSchedulerFromOptions(opts),firstTime=!0,isScheduled=!1,equals=opts.compareStructural?comparer.structural:opts.equals||comparer.default,r=new Reaction(name,function(){
/*ThouShaltNotCache*/
firstTime||runSync?reactionRunner():isScheduled||(isScheduled=!0,scheduler(reactionRunner))},opts.onError,opts.requiresObservable);function reactionRunner(){if(
/*ThouShaltNotCache*/
isScheduled=!1,!r.isDisposed){var changed=!1,oldValue=value;r.track(function(){
/*ThouShaltNotCache*/
var nextValue=allowStateChanges(!1,function(){
/*ThouShaltNotCache*/
return expression(r)});changed=firstTime||!equals(value,nextValue),value=nextValue}),(firstTime&&opts.fireImmediately||!firstTime&&changed)&&effectAction(value,oldValue,r),firstTime=!1}}return null!=(_opts4=opts)&&null!=(_opts4=_opts4.signal)&&_opts4.aborted||r.schedule_(),r.getDisposer_(null==(_opts5=opts)?void 0:_opts5.signal)}(()=>room.lastMessage,message=>{
/*ThouShaltNotCache*/
message&&this.updateLastMessage(room.name,message)});this.roomDisposers.set(room.name,disposer)}removeRoom(roomName){
/*ThouShaltNotCache*/
this.roomDisposers.has(roomName)&&(this.roomDisposers.get(roomName)(),this.roomDisposers.delete(roomName),this.lastMessages.delete(roomName))}updateLastMessage(roomName,message){
/*ThouShaltNotCache*/
this.lastMessages.set(roomName,message)}}function assert(condition){
/*ThouShaltNotCache*/
if(!condition)throw new Error("Assertion failure")}function runTest(){
/*ThouShaltNotCache*/
const logs=[],customLog=(...args)=>logs.push(args.join(" ")),techRoom=new Room("Tech Talk"),generalRoom=new Room("General Chat"),largeRoom=new Room("Large Meeting Room"),alice=new Person(1,"Alice"),bob=new Person(2,"Bob");techRoom.addPerson(alice),techRoom.addPerson(bob),generalRoom.addPerson(alice);const rooms=[techRoom,generalRoom,largeRoom],notifications=new Notifications(rooms);customLog("\n--- Setting up Large Meeting Room ---");const largeRoomMembers=[];for(let i=3;i<203;i++){const person=new Person(i,`Person ${i}`);largeRoomMembers.push(person),largeRoom.addPerson(person)}customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`),largeRoom.addPerson(alice),largeRoom.addPerson(bob),customLog("[INFO] Added Alice and Bob to the Large Meeting Room."),assert(3===alice.rooms.size),assert(alice.rooms.has(techRoom)&&alice.rooms.has(generalRoom)&&alice.rooms.has(largeRoom)),assert(2===bob.rooms.size&&bob.rooms.has(techRoom)&&bob.rooms.has(largeRoom)),customLog("[PASS] Verified Person.rooms associations with Set.");const notificationsDisposer=autorun(()=>{
/*ThouShaltNotCache*/
customLog("\n--- Global Notifications (Last Messages) ---"),0===notifications.lastMessages.size?customLog("No messages yet."):notifications.lastMessages.forEach((message,roomName)=>{
/*ThouShaltNotCache*/
customLog(`[${roomName}] "${message.text}" - ${message.author.name}`)}),customLog("------------------------------------------")}),roomUpdatesDisposer=autorun(()=>{
/*ThouShaltNotCache*/
rooms.forEach(room=>{
/*ThouShaltNotCache*/
room.roomUpdates.length>0&&customLog(`[${room.name} Update] ${room.roomUpdates[room.roomUpdates.length-1]}`)})});customLog("\n--- Status Update Scenario ---"),alice.setStatus("Away"),assert(techRoom.roomUpdates.includes("Alice is now Away")),assert(generalRoom.roomUpdates.includes("Alice is now Away")),assert(largeRoom.roomUpdates.includes("Alice is now Away")),customLog("[PASS] Verified that status updates are sent to all of Alice's rooms."),bob.setStatus("Busy"),assert(techRoom.roomUpdates.includes("Bob is now Busy")),assert(!generalRoom.roomUpdates.includes("Bob is now Busy")),assert(largeRoom.roomUpdates.includes("Bob is now Busy")),customLog("[PASS] Verified that status updates are only sent to Bob's rooms."),customLog("\n--- Sending Messages & Verifying Notifications ---");const msg1=new Message("First message to Tech Talk!",alice);techRoom.addMessage(msg1),assert(notifications.lastMessages.get("Tech Talk")===msg1),customLog("[PASS] Verified Tech Talk notification.");for(let i=0;i<20;i++){const msg2=new Message(`ping ${i}`,alice);generalRoom.addMessage(msg2),assert(notifications.lastMessages.get("General Chat")===msg2)}customLog("[PASS] Verified General Chat notification.");for(let i=0;i<=5;i++)for(const member of largeRoomMembers){const msg=new Message(`Hi, I am ${member.name}`,member);largeRoom.addMessage(msg),assert(largeRoom.lastMessage==msg),assert(notifications.lastMessages.get("Large Meeting Room")===msg)}customLog("[PASS] Verified Large Meeting Room notification.");for(let i=0;i<20;i++){const msg4=new Message(`ping ${i}`,bob);techRoom.addMessage(msg4),assert(notifications.lastMessages.get("Tech Talk")===msg4)}customLog("[PASS] Verified Tech Talk notification update.");const tempRooms=[];for(let i=0;i<10;i++){const roomId=`General Chat ${i}`,tempRoom=new Room(roomId);tempRooms.push(tempRoom),notifications.addRoom(tempRoom);for(const person of largeRoomMembers.slice(0,10))tempRoom.addPerson(person);for(const person of tempRoom.members.slice(0,5)){const msg=new Message(`ping ${i}`,person);tempRoom.addMessage(msg),assert(notifications.lastMessages.get(roomId)===msg)}}return tempRooms.forEach(room=>room.dispose(notifications)),notificationsDisposer(),roomUpdatesDisposer(),techRoom.dispose(notifications),generalRoom.dispose(notifications),largeRoom.dispose(notifications),logs}})(),MobXBenchmark=__webpack_exports__})();
//# sourceMappingURL=bundle.es6.js.map

1
mobx/dist/bundle.es6.js.map vendored Normal file

File diff suppressed because one or more lines are too long

930
mobx/dist/bundle.es6.min.js vendored Normal file
View file

@ -0,0 +1,930 @@
(()=>{var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var t={};(()=>{"use strict";e.r(t),e.d(t,{runTest:()=>br});function n(e){
/*ThouShaltNotCache*/
for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("number"==typeof e?"[MobX] minified error nr: "+e+(n.length?" "+n.map(String).join(","):"")+". Find the full error at: https://github.com/mobxjs/mobx/blob/main/packages/mobx/src/errors.ts":"[MobX] "+e)}var r={};function i(){
/*ThouShaltNotCache*/
return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:r}var o=Object.assign,s=Object.getOwnPropertyDescriptor,a=Object.defineProperty,u=Object.prototype,c=[];Object.freeze(c);var l={};Object.freeze(l);var h="undefined"!=typeof Proxy,f=Object.toString();function d(){
/*ThouShaltNotCache*/
h||n("Proxy not available")}function _(e){
/*ThouShaltNotCache*/
var t=!1;return function(){
/*ThouShaltNotCache*/
if(!t)return t=!0,e.apply(this,arguments)}}var v=function(){};function p(e){
/*ThouShaltNotCache*/
return"function"==typeof e}function g(e){switch(typeof e){case"string":case"symbol":case"number":return!0}return!1}function b(e){
/*ThouShaltNotCache*/
return null!==e&&"object"==typeof e}function y(e){
/*ThouShaltNotCache*/
if(!b(e))return!1;var t=Object.getPrototypeOf(e);if(null==t)return!0;var n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n.toString()===f}function m(e){
/*ThouShaltNotCache*/
var t=null==e?void 0:e.constructor;return!!t&&("GeneratorFunction"===t.name||"GeneratorFunction"===t.displayName)}function O(e,t,n){
/*ThouShaltNotCache*/
a(e,t,{enumerable:!1,writable:!0,configurable:!0,value:n})}function w(e,t,n){
/*ThouShaltNotCache*/
a(e,t,{enumerable:!1,writable:!1,configurable:!0,value:n})}function S(e,t){
/*ThouShaltNotCache*/
var n="isMobX"+e;return t.prototype[n]=!0,function(e){
/*ThouShaltNotCache*/
return b(e)&&!0===e[n]}}function A(e){
/*ThouShaltNotCache*/
return null!=e&&"[object Map]"===Object.prototype.toString.call(e)}function k(e){
/*ThouShaltNotCache*/
return null!=e&&"[object Set]"===Object.prototype.toString.call(e)}var j=void 0!==Object.getOwnPropertySymbols;var x="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:j?function(e){
/*ThouShaltNotCache*/
return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames;function M(e){
/*ThouShaltNotCache*/
return null===e?null:"object"==typeof e?""+e:e}function P(e,t){
/*ThouShaltNotCache*/
return u.hasOwnProperty.call(e,t)}var T=Object.getOwnPropertyDescriptors||function(e){
/*ThouShaltNotCache*/
var t={};return x(e).forEach(function(n){
/*ThouShaltNotCache*/
t[n]=s(e,n)}),t};function V(e,t){
/*ThouShaltNotCache*/
return!!(e&t)}function E(e,t,n){
/*ThouShaltNotCache*/
return n?e|=t:e&=~t,e}function R(e,t){
/*ThouShaltNotCache*/
(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function C(e,t){
/*ThouShaltNotCache*/
for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,I(r.key),r)}}function D(e,t,n){
/*ThouShaltNotCache*/
return t&&C(e.prototype,t),n&&C(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function N(e,t){
/*ThouShaltNotCache*/
var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){
/*ThouShaltNotCache*/
if(e){if("string"==typeof e)return R(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?R(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0;return function(){
/*ThouShaltNotCache*/
return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function L(){
/*ThouShaltNotCache*/
return L=Object.assign?Object.assign.bind():function(e){
/*ThouShaltNotCache*/
for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},L.apply(null,arguments)}function B(e,t){
/*ThouShaltNotCache*/
e.prototype=Object.create(t.prototype),e.prototype.constructor=e,U(e,t)}function U(e,t){
/*ThouShaltNotCache*/
return U=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){
/*ThouShaltNotCache*/
return e.__proto__=t,e},U(e,t)}function I(e){
/*ThouShaltNotCache*/
var t=function(e,t){
/*ThouShaltNotCache*/
if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}var K=Symbol("mobx-stored-annotations");function G(e){return Object.assign(
/*ThouShaltNotCache*/
function(t,n){
/*ThouShaltNotCache*/
if(z(n))return e.decorate_20223_(t,n);q(t,n,e)},e)}function q(e,t,n){
/*ThouShaltNotCache*/
P(e,K)||O(e,K,L({},e[K])),function(e){
/*ThouShaltNotCache*/
return e.annotationType_===Q}(n)||(e[K][t]=n)}function z(e){
/*ThouShaltNotCache*/
return"object"==typeof e&&"string"==typeof e.kind}var H=Symbol("mobx administration"),W=function(){
/*ThouShaltNotCache*/
function e(e){
/*ThouShaltNotCache*/
void 0===e&&(e="Atom"),this.name_=void 0,this.flags_=0,this.observers_=new Set,this.lastAccessedBy_=0,this.lowestObserverState_=Ye.NOT_TRACKING_,this.onBOL=void 0,this.onBUOL=void 0,this.name_=e}var t=e.prototype;return t.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.reportObserved=function(){
/*ThouShaltNotCache*/
return mt(this)},t.reportChanged=function(){
/*ThouShaltNotCache*/
bt(),Ot(this),yt()},t.toString=function(){
/*ThouShaltNotCache*/
return this.name_},D(e,[{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isBeingObservedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isPendingUnobservationMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();W.isBeingObservedMask_=1,W.isPendingUnobservationMask_=2,W.diffValueMask_=4;var $=S("Atom",W);function F(e,t,n){
/*ThouShaltNotCache*/
void 0===t&&(t=v),void 0===n&&(n=v);var r,i=new W(e);return t!==v&&Ht(Gt,i,t,r),n!==v&&zt(i,n),i}var X={identity:function(e,t){
/*ThouShaltNotCache*/
return e===t},structural:function(e,t){
/*ThouShaltNotCache*/
return ar(e,t)},default:function(e,t){
/*ThouShaltNotCache*/
return Object.is?Object.is(e,t):e===t?0!==e||1/e==1/t:e!=e&&t!=t},shallow:function(e,t){
/*ThouShaltNotCache*/
return ar(e,t,1)}};function Y(e,t,n){
/*ThouShaltNotCache*/
return tn(e)?e:Array.isArray(e)?Ce.array(e,{name:n}):y(e)?Ce.object(e,void 0,{name:n}):A(e)?Ce.map(e,{name:n}):k(e)?Ce.set(e,{name:n}):"function"!=typeof e||Bt(e)||Zt(e)?e:m(e)?Jt(e):Lt(n,e)}function J(e){
/*ThouShaltNotCache*/
return e}var Q="override";function Z(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:ee,extend_:te,decorate_20223_:ne}}function ee(e,t,n,r){
/*ThouShaltNotCache*/
var i;if(null!=(i=this.options_)&&i.bound)return null===this.extend_(e,t,n,!1)?0:1;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(Bt(n.value))return 1;var o=re(e,this,t,n,!1);return a(r,t,o),2}function te(e,t,n,r){
/*ThouShaltNotCache*/
var i=re(e,this,t,n);return e.defineProperty_(t,i,r)}function ne(e,t){var r,i=t.kind,o=t.name,s=t.addInitializer,a=this,u=function(e){
/*ThouShaltNotCache*/
var t,n,r,i;return qe(null!=(t=null==(n=a.options_)?void 0:n.name)?t:o.toString(),e,null!=(r=null==(i=a.options_)?void 0:i.autoAction)&&r)};return"field"==i?function(e){
/*ThouShaltNotCache*/
var t,n=e;return Bt(n)||(n=u(n)),null!=(t=a.options_)&&t.bound&&((n=n.bind(this)).isMobxAction=!0),n}:"method"==i?(Bt(e)||(e=u(e)),null!=(r=this.options_)&&r.bound&&s(function(){
/*ThouShaltNotCache*/
var e=this,t=e[o].bind(e);t.isMobxAction=!0,e[o]=t}),e):void n("Cannot apply '"+a.annotationType_+"' to '"+String(o)+"' (kind: "+i+"):\n'"+a.annotationType_+"' can only be used on properties with a function value.")}function re(e,t,n,r,i){
/*ThouShaltNotCache*/
var o,s,a,u,c,l,h,f;void 0===i&&(i=_t.safeDescriptors),f=r,t.annotationType_,f.value;var d,_=r.value;null!=(o=t.options_)&&o.bound&&(_=_.bind(null!=(d=e.proxy_)?d:e.target_));return{value:qe(null!=(s=null==(a=t.options_)?void 0:a.name)?s:n.toString(),_,null!=(u=null==(c=t.options_)?void 0:c.autoAction)&&u,null!=(l=t.options_)&&l.bound?null!=(h=e.proxy_)?h:e.target_:void 0),configurable:!i||e.isPlainObject_,enumerable:!1,writable:!i}}function ie(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:oe,extend_:se,decorate_20223_:ae}}function oe(e,t,n,r){
/*ThouShaltNotCache*/
var i;if(r===e.target_)return null===this.extend_(e,t,n,!1)?0:2;if(null!=(i=this.options_)&&i.bound&&(!P(e.target_,t)||!Zt(e.target_[t]))&&null===this.extend_(e,t,n,!1))return 0;if(Zt(n.value))return 1;var o=ue(e,this,t,n,!1,!1);return a(r,t,o),2}function se(e,t,n,r){
/*ThouShaltNotCache*/
var i,o=ue(e,this,t,n,null==(i=this.options_)?void 0:i.bound);return e.defineProperty_(t,o,r)}function ae(e,t){
/*ThouShaltNotCache*/
var n;var r=t.name,i=t.addInitializer;return Zt(e)||(e=Jt(e)),null!=(n=this.options_)&&n.bound&&i(function(){
/*ThouShaltNotCache*/
var e=this,t=e[r].bind(e);t.isMobXFlow=!0,e[r]=t}),e}function ue(e,t,n,r,i,o){var s;
/*ThouShaltNotCache*/
void 0===o&&(o=_t.safeDescriptors),s=r,t.annotationType_,s.value;var a,u=r.value;(Zt(u)||(u=Jt(u)),i)&&((u=u.bind(null!=(a=e.proxy_)?a:e.target_)).isMobXFlow=!0);return{value:u,configurable:!o||e.isPlainObject_,enumerable:!1,writable:!o}}function ce(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:le,extend_:he,decorate_20223_:fe}}function le(e,t,n){
/*ThouShaltNotCache*/
return null===this.extend_(e,t,n,!1)?0:1}function he(e,t,n,r){
/*ThouShaltNotCache*/
return function(e,t,n,r){
/*ThouShaltNotCache*/
t.annotationType_,r.get;0}(0,this,0,n),e.defineComputedProperty_(t,L({},this.options_,{get:n.get,set:n.set}),r)}function fe(e,t){var n=this,r=t.name;return(0,t.addInitializer)(function(){
/*ThouShaltNotCache*/
var t=Bn(this)[H],i=L({},n.options_,{get:e,context:this});i.name||(i.name="ObservableObject."+r.toString()),t.values_.set(r,new Xe(i))}),function(){
/*ThouShaltNotCache*/
return this[H].getObservablePropValue_(r)}}function de(e,t){
/*ThouShaltNotCache*/
return{annotationType_:e,options_:t,make_:_e,extend_:ve,decorate_20223_:pe}}function _e(e,t,n){
/*ThouShaltNotCache*/
return null===this.extend_(e,t,n,!1)?0:1}function ve(e,t,n,r){
/*ThouShaltNotCache*/
var i,o;return function(e,t){
/*ThouShaltNotCache*/
t.annotationType_;0}(0,this),e.defineObservableProperty_(t,n.value,null!=(i=null==(o=this.options_)?void 0:o.enhancer)?i:Y,r)}function pe(e,t){var n=this,r=t.kind,i=t.name,o=new WeakSet;function s(e,t){
/*ThouShaltNotCache*/
var r,s,a=Bn(e)[H],u=new Fe(t,null!=(r=null==(s=n.options_)?void 0:s.enhancer)?r:Y,"ObservableObject."+i.toString(),!1);a.values_.set(i,u),o.add(e)}if("accessor"==r)return{get:function(){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e.get.call(this)),this[H].getObservablePropValue_(i)},set:function(e){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e),this[H].setObservablePropValue_(i,e)},init:function(e){
/*ThouShaltNotCache*/
return o.has(this)||s(this,e),e}}}var ge="true",be=ye();function ye(e){
/*ThouShaltNotCache*/
return{annotationType_:ge,options_:e,make_:me,extend_:Oe,decorate_20223_:we}}function me(e,t,n,r){
/*ThouShaltNotCache*/
var i,o,s,u;if(n.get)return Be.make_(e,t,n,r);if(n.set){var c=qe(t.toString(),n.set);return r===e.target_?null===e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:c})?0:2:(a(r,t,{configurable:!0,set:c}),2)}if(r!==e.target_&&"function"==typeof n.value)return m(n.value)?(null!=(u=this.options_)&&u.autoBind?Jt.bound:Jt).make_(e,t,n,r):(null!=(s=this.options_)&&s.autoBind?Lt.bound:Lt).make_(e,t,n,r);var l,h=!1===(null==(i=this.options_)?void 0:i.deep)?Ce.ref:Ce;"function"==typeof n.value&&null!=(o=this.options_)&&o.autoBind&&(n.value=n.value.bind(null!=(l=e.proxy_)?l:e.target_));return h.make_(e,t,n,r)}function Oe(e,t,n,r){
/*ThouShaltNotCache*/
var i,o,s;if(n.get)return Be.extend_(e,t,n,r);if(n.set)return e.defineProperty_(t,{configurable:!_t.safeDescriptors||e.isPlainObject_,set:qe(t.toString(),n.set)},r);"function"==typeof n.value&&null!=(i=this.options_)&&i.autoBind&&(n.value=n.value.bind(null!=(s=e.proxy_)?s:e.target_));return(!1===(null==(o=this.options_)?void 0:o.deep)?Ce.ref:Ce).extend_(e,t,n,r)}function we(e,t){
/*ThouShaltNotCache*/
n("'"+this.annotationType_+"' cannot be used as a decorator")}var Se={deep:!0,name:void 0,defaultDecorator:void 0,proxy:!0};function Ae(e){
/*ThouShaltNotCache*/
return e||Se}Object.freeze(Se);var ke=de("observable"),je=de("observable.ref",{enhancer:J}),xe=de("observable.shallow",{enhancer:function(e,t,n){
/*ThouShaltNotCache*/
return null==e||Kn(e)||An(e)||Pn(e)||Rn(e)?e:Array.isArray(e)?Ce.array(e,{name:n,deep:!1}):y(e)?Ce.object(e,void 0,{name:n,deep:!1}):A(e)?Ce.map(e,{name:n,deep:!1}):k(e)?Ce.set(e,{name:n,deep:!1}):void 0}}),Me=de("observable.struct",{enhancer:function(e,t){return ar(e,t)?t:e}}),Pe=G(ke);function Te(e){
/*ThouShaltNotCache*/
return!0===e.deep?Y:!1===e.deep?J:(t=e.defaultDecorator)&&null!=(n=null==(r=t.options_)?void 0:r.enhancer)?n:Y;var t,n,r}function Ve(e,t,n){
/*ThouShaltNotCache*/
return z(t)?ke.decorate_20223_(e,t):g(t)?void q(e,t,ke):tn(e)?e:y(e)?Ce.object(e,t,n):Array.isArray(e)?Ce.array(e,t):A(e)?Ce.map(e,t):k(e)?Ce.set(e,t):"object"==typeof e&&null!==e?e:Ce.box(e,t)}o(Ve,Pe);var Ee,Re,Ce=o(Ve,{box:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new Fe(e,Te(n),n.name,!0,n.equals)},array:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return(!1===_t.useProxies||!1===n.proxy?er:gn)(e,Te(n),n.name)},map:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new Mn(e,Te(n),n.name)},set:function(e,t){
/*ThouShaltNotCache*/
var n=Ae(t);return new En(e,Te(n),n.name)},object:function(e,t,n){
/*ThouShaltNotCache*/
return ir(function(){
/*ThouShaltNotCache*/
return Wt(!1===_t.useProxies||!1===(null==n?void 0:n.proxy)?Bn({},n):function(e,t){
/*ThouShaltNotCache*/
var n,r;return d(),e=Bn(e,t),null!=(r=(n=e[H]).proxy_)?r:n.proxy_=new Proxy(e,on)}({},n),e,t)})},ref:G(je),shallow:G(xe),deep:Pe,struct:G(Me)}),De="computed",Ne=ce(De),Le=ce("computed.struct",{equals:X.structural}),Be=function(e,t){
/*ThouShaltNotCache*/
if(z(t))return Ne.decorate_20223_(e,t);if(g(t))return q(e,t,Ne);if(y(e))return G(ce(De,e));var n=y(t)?t:{};return n.get=e,n.name||(n.name=e.name||""),new Xe(n)};Object.assign(Be,Ne),Be.struct=G(Le);var Ue=0,Ie=1,Ke=null!=(Ee=null==(Re=s(function(){},"name"))?void 0:Re.configurable)&&Ee,Ge={value:"action",configurable:!0,writable:!1,enumerable:!1};function qe(e,t,n,r){function i(){
/*ThouShaltNotCache*/
return ze(e,n,t,r||this,arguments)}
/*ThouShaltNotCache*/
return void 0===n&&(n=!1),i.isMobxAction=!0,i.toString=function(){
/*ThouShaltNotCache*/
return t.toString()},Ke&&(Ge.value=e,a(i,"name",Ge)),i}function ze(e,t,r,i,o){
/*ThouShaltNotCache*/
var s=function(e,t){
/*ThouShaltNotCache*/
var n=!1,r=0;0;var i=_t.trackingDerivation,o=!t||!i;bt();var s=_t.allowStateChanges;o&&(st(),s=We(!0));var a=ut(!0),u={runAsAction_:o,prevDerivation_:i,prevAllowStateChanges_:s,prevAllowStateReads_:a,notifySpy_:n,startTime_:r,actionId_:Ie++,parentActionId_:Ue};return Ue=u.actionId_,u}(0,t);try{return r.apply(i,o)}catch(e){throw s.error_=e,e}finally{!function(e){
/*ThouShaltNotCache*/
Ue!==e.actionId_&&n(30);Ue=e.parentActionId_,void 0!==e.error_&&(_t.suppressReactionErrors=!0);$e(e.prevAllowStateChanges_),ct(e.prevAllowStateReads_),yt(),e.runAsAction_&&at(e.prevDerivation_);0;_t.suppressReactionErrors=!1}(s)}}function He(e,t){
/*ThouShaltNotCache*/
var n=We(e);try{return t()}finally{$e(n)}}function We(e){
/*ThouShaltNotCache*/
var t=_t.allowStateChanges;return _t.allowStateChanges=e,t}function $e(e){
/*ThouShaltNotCache*/
_t.allowStateChanges=e}var Fe=function(e){
/*ThouShaltNotCache*/
function t(t,n,r,i,o){
/*ThouShaltNotCache*/
var s;return void 0===r&&(r="ObservableValue"),void 0===i&&(i=!0),void 0===o&&(o=X.default),(s=e.call(this,r)||this).enhancer=void 0,s.name_=void 0,s.equals=void 0,s.hasUnreportedChange_=!1,s.interceptors_=void 0,s.changeListeners_=void 0,s.value_=void 0,s.dehancer=void 0,s.enhancer=n,s.name_=r,s.equals=o,s.value_=n(t,void 0,r),s}B(t,e);var n=t.prototype;return n.dehanceValue=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},n.set=function(e){
/*ThouShaltNotCache*/
this.value_;if((e=this.prepareNewValue_(e))!==_t.UNCHANGED){0,this.setNewValue_(e)}},n.prepareNewValue_=function(e){if(
/*ThouShaltNotCache*/
nt(this),sn(this)){var t=un(this,{object:this,type:_n,newValue:e});if(!t)return _t.UNCHANGED;e=t.newValue}return e=this.enhancer(e,this.value_,this.name_),this.equals(this.value_,e)?_t.UNCHANGED:e},n.setNewValue_=function(e){
/*ThouShaltNotCache*/
var t=this.value_;this.value_=e,this.reportChanged(),cn(this)&&hn(this,{type:_n,object:this,newValue:e,oldValue:t})},n.get=function(){
/*ThouShaltNotCache*/
return this.reportObserved(),this.dehanceValue(this.value_)},n.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},n.observe_=function(e,t){
/*ThouShaltNotCache*/
return t&&e({observableKind:"value",debugObjectName:this.name_,object:this,type:_n,newValue:this.value_,oldValue:void 0}),ln(this,e)},n.raw=function(){
/*ThouShaltNotCache*/
return this.value_},n.toJSON=function(){
/*ThouShaltNotCache*/
return this.get()},n.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.value_+"]"},n.valueOf=function(){
/*ThouShaltNotCache*/
return M(this.get())},n[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},t}(W),Xe=function(){
/*ThouShaltNotCache*/
function e(e){
/*ThouShaltNotCache*/
this.dependenciesState_=Ye.NOT_TRACKING_,this.observing_=[],this.newObserving_=null,this.observers_=new Set,this.runId_=0,this.lastAccessedBy_=0,this.lowestObserverState_=Ye.UP_TO_DATE_,this.unboundDepsCount_=0,this.value_=new Ze(null),this.name_=void 0,this.triggeredBy_=void 0,this.flags_=0,this.derivation=void 0,this.setter_=void 0,this.isTracing_=Je.NONE,this.scope_=void 0,this.equals_=void 0,this.requiresReaction_=void 0,this.keepAlive_=void 0,this.onBOL=void 0,this.onBUOL=void 0,e.get||n(31),this.derivation=e.get,this.name_=e.name||"ComputedValue",e.set&&(this.setter_=qe("ComputedValue-setter",e.set)),this.equals_=e.equals||(e.compareStructural||e.struct?X.structural:X.default),this.scope_=e.context,this.requiresReaction_=e.requiresReaction,this.keepAlive_=!!e.keepAlive}var t=e.prototype;return t.onBecomeStale_=function(){
/*ThouShaltNotCache*/
!function(e){
/*ThouShaltNotCache*/
if(e.lowestObserverState_!==Ye.UP_TO_DATE_)return;e.lowestObserverState_=Ye.POSSIBLY_STALE_,e.observers_.forEach(function(e){
/*ThouShaltNotCache*/
e.dependenciesState_===Ye.UP_TO_DATE_&&(e.dependenciesState_=Ye.POSSIBLY_STALE_,e.onBecomeStale_())})}(this)},t.onBO=function(){
/*ThouShaltNotCache*/
this.onBOL&&this.onBOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.onBUO=function(){
/*ThouShaltNotCache*/
this.onBUOL&&this.onBUOL.forEach(function(e){
/*ThouShaltNotCache*/
return e()})},t.get=function(){if(
/*ThouShaltNotCache*/
this.isComputing&&n(32,this.name_,this.derivation),0!==_t.inBatch||0!==this.observers_.size||this.keepAlive_){if(mt(this),tt(this)){var e=_t.trackingContext;this.keepAlive_&&!e&&(_t.trackingContext=this),this.trackAndCompute()&&function(e){
/*ThouShaltNotCache*/
if(e.lowestObserverState_===Ye.STALE_)return;e.lowestObserverState_=Ye.STALE_,e.observers_.forEach(function(t){
/*ThouShaltNotCache*/
t.dependenciesState_===Ye.POSSIBLY_STALE_?t.dependenciesState_=Ye.STALE_:t.dependenciesState_===Ye.UP_TO_DATE_&&(e.lowestObserverState_=Ye.UP_TO_DATE_)})}(this),_t.trackingContext=e}}else tt(this)&&(this.warnAboutUntrackedRead_(),bt(),this.value_=this.computeValue_(!1),yt());var t=this.value_;if(et(t))throw t.cause;return t},t.set=function(e){
/*ThouShaltNotCache*/
if(this.setter_){this.isRunningSetter&&n(33,this.name_),this.isRunningSetter=!0;try{this.setter_.call(this.scope_,e)}finally{this.isRunningSetter=!1}}else n(34,this.name_)},t.trackAndCompute=function(){
/*ThouShaltNotCache*/
var e=this.value_,t=this.dependenciesState_===Ye.NOT_TRACKING_,n=this.computeValue_(!0),r=t||et(e)||et(n)||!this.equals_(e,n);return r&&(this.value_=n),r},t.computeValue_=function(e){
/*ThouShaltNotCache*/
this.isComputing=!0;var t,n=We(!1);if(e)t=rt(this,this.derivation,this.scope_);else if(!0===_t.disableErrorBoundaries)t=this.derivation.call(this.scope_);else try{t=this.derivation.call(this.scope_)}catch(e){t=new Ze(e)}return $e(n),this.isComputing=!1,t},t.suspend_=function(){
/*ThouShaltNotCache*/
this.keepAlive_||(it(this),this.value_=void 0)},t.observe_=function(e,t){
/*ThouShaltNotCache*/
var n=this,r=!0,i=void 0;return Ut(function(){
/*ThouShaltNotCache*/
var o=n.get();if(!r||t){var s=st();e({observableKind:"computed",debugObjectName:n.name_,type:_n,object:n,newValue:o,oldValue:i}),at(s)}r=!1,i=o})},t.warnAboutUntrackedRead_=function(){},t.toString=function(){
/*ThouShaltNotCache*/
return this.name_+"["+this.derivation.toString()+"]"},t.valueOf=function(){
/*ThouShaltNotCache*/
return M(this.get())},t[Symbol.toPrimitive]=function(){
/*ThouShaltNotCache*/
return this.valueOf()},D(e,[{key:"isComputing",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isComputingMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isComputingMask_,t)}},{key:"isRunningSetter",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isRunningSetterMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isRunningSetterMask_,t)}},{key:"isBeingObserved",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isBeingObservedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isBeingObservedMask_,t)}},{key:"isPendingUnobservation",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isPendingUnobservationMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isPendingUnobservationMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();Xe.isComputingMask_=1,Xe.isRunningSetterMask_=2,Xe.isBeingObservedMask_=4,Xe.isPendingUnobservationMask_=8,Xe.diffValueMask_=16;var Ye,Je,Qe=S("ComputedValue",Xe);!function(e){
/*ThouShaltNotCache*/
e[e.NOT_TRACKING_=-1]="NOT_TRACKING_",e[e.UP_TO_DATE_=0]="UP_TO_DATE_",e[e.POSSIBLY_STALE_=1]="POSSIBLY_STALE_",e[e.STALE_=2]="STALE_"}(Ye||(Ye={})),function(e){
/*ThouShaltNotCache*/
e[e.NONE=0]="NONE",e[e.LOG=1]="LOG",e[e.BREAK=2]="BREAK"}(Je||(Je={}));var Ze=function(e){
/*ThouShaltNotCache*/
this.cause=void 0,this.cause=e};function et(e){
/*ThouShaltNotCache*/
return e instanceof Ze}function tt(e){
/*ThouShaltNotCache*/
switch(e.dependenciesState_){case Ye.UP_TO_DATE_:return!1;case Ye.NOT_TRACKING_:case Ye.STALE_:return!0;case Ye.POSSIBLY_STALE_:for(var t=ut(!0),n=st(),r=e.observing_,i=r.length,o=0;o<i;o++){var s=r[o];if(Qe(s)){if(_t.disableErrorBoundaries)s.get();else try{s.get()}catch(e){return at(n),ct(t),!0}if(e.dependenciesState_===Ye.STALE_)return at(n),ct(t),!0}}return lt(e),at(n),ct(t),!1}}function nt(e){}function rt(e,t,n){
/*ThouShaltNotCache*/
var r=ut(!0);lt(e),e.newObserving_=new Array(0===e.runId_?100:e.observing_.length),e.unboundDepsCount_=0,e.runId_=++_t.runId;var i,o=_t.trackingDerivation;if(_t.trackingDerivation=e,_t.inBatch++,!0===_t.disableErrorBoundaries)i=t.call(n);else try{i=t.call(n)}catch(e){i=new Ze(e)}return _t.inBatch--,_t.trackingDerivation=o,function(e){for(
/*ThouShaltNotCache*/
var t=e.observing_,n=e.observing_=e.newObserving_,r=Ye.UP_TO_DATE_,i=0,o=e.unboundDepsCount_,s=0;s<o;s++){var a=n[s];0===a.diffValue&&(a.diffValue=1,i!==s&&(n[i]=a),i++),a.dependenciesState_>r&&(r=a.dependenciesState_)}n.length=i,e.newObserving_=null,o=t.length;for(;o--;){var u=t[o];0===u.diffValue&&pt(u,e),u.diffValue=0}for(;i--;){var c=n[i];1===c.diffValue&&(c.diffValue=0,vt(c,e))}r!==Ye.UP_TO_DATE_&&(e.dependenciesState_=r,e.onBecomeStale_())}(e),ct(r),i}function it(e){
/*ThouShaltNotCache*/
var t=e.observing_;e.observing_=[];for(var n=t.length;n--;)pt(t[n],e);e.dependenciesState_=Ye.NOT_TRACKING_}function ot(e){
/*ThouShaltNotCache*/
var t=st();try{return e()}finally{at(t)}}function st(){
/*ThouShaltNotCache*/
var e=_t.trackingDerivation;return _t.trackingDerivation=null,e}function at(e){
/*ThouShaltNotCache*/
_t.trackingDerivation=e}function ut(e){
/*ThouShaltNotCache*/
var t=_t.allowStateReads;return _t.allowStateReads=e,t}function ct(e){
/*ThouShaltNotCache*/
_t.allowStateReads=e}function lt(e){
/*ThouShaltNotCache*/
if(e.dependenciesState_!==Ye.UP_TO_DATE_){e.dependenciesState_=Ye.UP_TO_DATE_;for(var t=e.observing_,n=t.length;n--;)t[n].lowestObserverState_=Ye.UP_TO_DATE_}}var ht=function(){
/*ThouShaltNotCache*/
this.version=6,this.UNCHANGED={},this.trackingDerivation=null,this.trackingContext=null,this.runId=0,this.mobxGuid=0,this.inBatch=0,this.pendingUnobservations=[],this.pendingReactions=[],this.isRunningReactions=!1,this.allowStateChanges=!1,this.allowStateReads=!0,this.enforceActions=!0,this.spyListeners=[],this.globalReactionErrorHandlers=[],this.computedRequiresReaction=!1,this.reactionRequiresObservable=!1,this.observableRequiresReaction=!1,this.disableErrorBoundaries=!1,this.suppressReactionErrors=!1,this.useProxies=!0,this.verifyProxies=!1,this.safeDescriptors=!0},ft=!0,dt=!1,_t=function(){
/*ThouShaltNotCache*/
var e=i();return e.__mobxInstanceCount>0&&!e.__mobxGlobals&&(ft=!1),e.__mobxGlobals&&e.__mobxGlobals.version!==(new ht).version&&(ft=!1),ft?e.__mobxGlobals?(e.__mobxInstanceCount+=1,e.__mobxGlobals.UNCHANGED||(e.__mobxGlobals.UNCHANGED={}),e.__mobxGlobals):(e.__mobxInstanceCount=1,e.__mobxGlobals=new ht):(setTimeout(function(){
/*ThouShaltNotCache*/
dt||n(35)},1),new ht)}();function vt(e,t){
/*ThouShaltNotCache*/
e.observers_.add(t),e.lowestObserverState_>t.dependenciesState_&&(e.lowestObserverState_=t.dependenciesState_)}function pt(e,t){
/*ThouShaltNotCache*/
e.observers_.delete(t),0===e.observers_.size&&gt(e)}function gt(e){
/*ThouShaltNotCache*/
!1===e.isPendingUnobservation&&(e.isPendingUnobservation=!0,_t.pendingUnobservations.push(e))}function bt(){
/*ThouShaltNotCache*/
_t.inBatch++}function yt(){
/*ThouShaltNotCache*/
if(0===--_t.inBatch){kt();for(var e=_t.pendingUnobservations,t=0;t<e.length;t++){var n=e[t];n.isPendingUnobservation=!1,0===n.observers_.size&&(n.isBeingObserved&&(n.isBeingObserved=!1,n.onBUO()),n instanceof Xe&&n.suspend_())}_t.pendingUnobservations=[]}}function mt(e){var t=_t.trackingDerivation;return null!==t?(t.runId_!==e.lastAccessedBy_&&(e.lastAccessedBy_=t.runId_,t.newObserving_[t.unboundDepsCount_++]=e,!e.isBeingObserved&&_t.trackingContext&&(e.isBeingObserved=!0,e.onBO())),e.isBeingObserved):(0===e.observers_.size&&_t.inBatch>0&&gt(e),!1)}function Ot(e){
/*ThouShaltNotCache*/
e.lowestObserverState_!==Ye.STALE_&&(e.lowestObserverState_=Ye.STALE_,e.observers_.forEach(function(e){
/*ThouShaltNotCache*/
e.dependenciesState_===Ye.UP_TO_DATE_&&e.onBecomeStale_(),e.dependenciesState_=Ye.STALE_}))}var wt=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===e&&(e="Reaction"),this.name_=void 0,this.onInvalidate_=void 0,this.errorHandler_=void 0,this.requiresObservable_=void 0,this.observing_=[],this.newObserving_=[],this.dependenciesState_=Ye.NOT_TRACKING_,this.runId_=0,this.unboundDepsCount_=0,this.flags_=0,this.isTracing_=Je.NONE,this.name_=e,this.onInvalidate_=t,this.errorHandler_=n,this.requiresObservable_=r}var t=e.prototype;return t.onBecomeStale_=function(){
/*ThouShaltNotCache*/
this.schedule_()},t.schedule_=function(){
/*ThouShaltNotCache*/
this.isScheduled||(this.isScheduled=!0,_t.pendingReactions.push(this),kt())},t.runReaction_=function(){
/*ThouShaltNotCache*/
if(!this.isDisposed){bt(),this.isScheduled=!1;var e=_t.trackingContext;if(_t.trackingContext=this,tt(this)){this.isTrackPending=!0;try{this.onInvalidate_()}catch(e){this.reportExceptionInDerivation_(e)}}_t.trackingContext=e,yt()}},t.track=function(e){
/*ThouShaltNotCache*/
if(!this.isDisposed){bt();0,this.isRunning=!0;var t=_t.trackingContext;_t.trackingContext=this;var n=rt(this,e,void 0);_t.trackingContext=t,this.isRunning=!1,this.isTrackPending=!1,this.isDisposed&&it(this),et(n)&&this.reportExceptionInDerivation_(n.cause),yt()}},t.reportExceptionInDerivation_=function(e){
/*ThouShaltNotCache*/
var t=this;if(this.errorHandler_)this.errorHandler_(e,this);else{if(_t.disableErrorBoundaries)throw e;var n="[mobx] uncaught error in '"+this+"'";_t.suppressReactionErrors||console.error(n,e),_t.globalReactionErrorHandlers.forEach(function(n){
/*ThouShaltNotCache*/
return n(e,t)})}},t.dispose=function(){
/*ThouShaltNotCache*/
this.isDisposed||(this.isDisposed=!0,this.isRunning||(bt(),it(this),yt()))},t.getDisposer_=function(e){
/*ThouShaltNotCache*/
var t=this,n=function n(){
/*ThouShaltNotCache*/
t.dispose(),null==e||null==e.removeEventListener||e.removeEventListener("abort",n)};return null==e||null==e.addEventListener||e.addEventListener("abort",n),n[H]=this,n},t.toString=function(){
/*ThouShaltNotCache*/
return"Reaction["+this.name_+"]"},t.trace=function(e){
/*ThouShaltNotCache*/
void 0===e&&(e=!1)},D(e,[{key:"isDisposed",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isDisposedMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isDisposedMask_,t)}},{key:"isScheduled",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isScheduledMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isScheduledMask_,t)}},{key:"isTrackPending",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isTrackPendingMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isTrackPendingMask_,t)}},{key:"isRunning",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.isRunningMask_)},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.isRunningMask_,t)}},{key:"diffValue",get:function(){
/*ThouShaltNotCache*/
return V(this.flags_,e.diffValueMask_)?1:0},set:function(t){
/*ThouShaltNotCache*/
this.flags_=E(this.flags_,e.diffValueMask_,1===t)}}])}();wt.isDisposedMask_=1,wt.isScheduledMask_=2,wt.isTrackPendingMask_=4,wt.isRunningMask_=8,wt.diffValueMask_=16;var St=100,At=function(e){
/*ThouShaltNotCache*/
return e()};function kt(){
/*ThouShaltNotCache*/
_t.inBatch>0||_t.isRunningReactions||At(jt)}function jt(){
/*ThouShaltNotCache*/
_t.isRunningReactions=!0;for(var e=_t.pendingReactions,t=0;e.length>0;){++t===St&&(console.error("[mobx] cycle in reaction: "+e[0]),e.splice(0));for(var n=e.splice(0),r=0,i=n.length;r<i;r++)n[r].runReaction_()}_t.isRunningReactions=!1}var xt=S("Reaction",wt);var Mt="action",Pt="autoAction",Tt="<unnamed action>",Vt=Z(Mt),Et=Z("action.bound",{bound:!0}),Rt=Z(Pt,{autoAction:!0}),Ct=Z("autoAction.bound",{autoAction:!0,bound:!0});function Dt(e){return function(t,n){
/*ThouShaltNotCache*/
return p(t)?qe(t.name||Tt,t,e):p(n)?qe(t,n,e):z(n)?(e?Rt:Vt).decorate_20223_(t,n):g(n)?q(t,n,e?Rt:Vt):g(t)?G(Z(e?Pt:Mt,{name:t,autoAction:e})):void 0}}var Nt=Dt(!1);Object.assign(Nt,Vt);var Lt=Dt(!0);function Bt(e){
/*ThouShaltNotCache*/
return p(e)&&!0===e.isMobxAction}function Ut(e,t){
/*ThouShaltNotCache*/
var n,r,i,o;void 0===t&&(t=l);var s,a=null!=(n=null==(r=t)?void 0:r.name)?n:"Autorun";if(!t.scheduler&&!t.delay)s=new wt(a,function(){
/*ThouShaltNotCache*/
this.track(h)},t.onError,t.requiresObservable);else{var u=Kt(t),c=!1;s=new wt(a,function(){
/*ThouShaltNotCache*/
c||(c=!0,u(function(){
/*ThouShaltNotCache*/
c=!1,s.isDisposed||s.track(h)}))},t.onError,t.requiresObservable)}function h(){
/*ThouShaltNotCache*/
e(s)}return null!=(i=t)&&null!=(i=i.signal)&&i.aborted||s.schedule_(),s.getDisposer_(null==(o=t)?void 0:o.signal)}Object.assign(Lt,Rt),Nt.bound=G(Et),Lt.bound=G(Ct);var It=function(e){
/*ThouShaltNotCache*/
return e()};function Kt(e){
/*ThouShaltNotCache*/
return e.scheduler?e.scheduler:e.delay?function(t){
/*ThouShaltNotCache*/
return setTimeout(t,e.delay)}:It}var Gt="onBO",qt="onBUO";function zt(e,t,n){
/*ThouShaltNotCache*/
return Ht(qt,e,t,n)}function Ht(e,t,n,r){
/*ThouShaltNotCache*/
var i="function"==typeof r?tr(t,n):tr(t),o=p(r)?r:n,s=e+"L";return i[s]?i[s].add(o):i[s]=new Set([o]),function(){
/*ThouShaltNotCache*/
var e=i[s];e&&(e.delete(o),0===e.size&&delete i[s])}}function Wt(e,t,n,r){var i=T(t);return ir(function(){
/*ThouShaltNotCache*/
var t=Bn(e,r)[H];x(i).forEach(function(e){
/*ThouShaltNotCache*/
t.extend_(e,i[e],!n||(!(e in n)||n[e]))})}),e}var $t=0;function Ft(){
/*ThouShaltNotCache*/
this.message="FLOW_CANCELLED"}Ft.prototype=Object.create(Error.prototype);var Xt=ie("flow"),Yt=ie("flow.bound",{bound:!0}),Jt=Object.assign(function(e,t){
/*ThouShaltNotCache*/
if(z(t))return Xt.decorate_20223_(e,t);if(g(t))return q(e,t,Xt);var n=e,r=n.name||"<unnamed flow>",i=function(){
/*ThouShaltNotCache*/
var e,t=arguments,i=++$t,o=Nt(r+" - runid: "+i+" - init",n).apply(this,t),s=void 0,a=new Promise(function(t,n){
/*ThouShaltNotCache*/
var a=0;function u(e){var t;
/*ThouShaltNotCache*/
s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.next).call(o,e)}catch(e){return n(e)}l(t)}function c(e){var t;
/*ThouShaltNotCache*/
s=void 0;try{t=Nt(r+" - runid: "+i+" - yield "+a++,o.throw).call(o,e)}catch(e){return n(e)}l(t)}function l(e){
/*ThouShaltNotCache*/
if(!p(null==e?void 0:e.then))return e.done?t(e.value):(s=Promise.resolve(e.value)).then(u,c);e.then(l,n)}e=n,u(void 0)});return a.cancel=Nt(r+" - runid: "+i+" - cancel",function(){
/*ThouShaltNotCache*/
try{s&&Qt(s);var t=o.return(void 0),n=Promise.resolve(t.value);n.then(v,v),Qt(n),e(new Ft)}catch(t){e(t)}}),a};return i.isMobXFlow=!0,i},Xt);function Qt(e){
/*ThouShaltNotCache*/
p(e.cancel)&&e.cancel()}function Zt(e){
/*ThouShaltNotCache*/
return!0===(null==e?void 0:e.isMobXFlow)}function en(e,t){
/*ThouShaltNotCache*/
return!!e&&(void 0!==t?!!Kn(e)&&e[H].values_.has(t):Kn(e)||!!e[H]||$(e)||xt(e)||Qe(e))}function tn(e){return en(e)}function nn(e,t){
/*ThouShaltNotCache*/
void 0===t&&(t=void 0),bt();try{return e.apply(t)}finally{yt()}}function rn(e){
/*ThouShaltNotCache*/
return e[H]}Jt.bound=G(Yt);var on={has:function(e,t){return rn(e).has_(t)},get:function(e,t){
/*ThouShaltNotCache*/
return rn(e).get_(t)},set:function(e,t,n){
/*ThouShaltNotCache*/
var r;return!!g(t)&&(null==(r=rn(e).set_(t,n,!0))||r)},deleteProperty:function(e,t){
/*ThouShaltNotCache*/
var n;return!!g(t)&&(null==(n=rn(e).delete_(t,!0))||n)},defineProperty:function(e,t,n){
/*ThouShaltNotCache*/
var r;return null==(r=rn(e).defineProperty_(t,n))||r},ownKeys:function(e){return rn(e).ownKeys_()},preventExtensions:function(e){
/*ThouShaltNotCache*/
n(13)}};function sn(e){
/*ThouShaltNotCache*/
return void 0!==e.interceptors_&&e.interceptors_.length>0}function an(e,t){
/*ThouShaltNotCache*/
var n=e.interceptors_||(e.interceptors_=[]);return n.push(t),_(function(){
/*ThouShaltNotCache*/
var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function un(e,t){
/*ThouShaltNotCache*/
var r=st();try{for(var i=[].concat(e.interceptors_||[]),o=0,s=i.length;o<s&&((t=i[o](t))&&!t.type&&n(14),t);o++);return t}finally{at(r)}}function cn(e){
/*ThouShaltNotCache*/
return void 0!==e.changeListeners_&&e.changeListeners_.length>0}function ln(e,t){
/*ThouShaltNotCache*/
var n=e.changeListeners_||(e.changeListeners_=[]);return n.push(t),_(function(){
/*ThouShaltNotCache*/
var e=n.indexOf(t);-1!==e&&n.splice(e,1)})}function hn(e,t){
/*ThouShaltNotCache*/
var n=st(),r=e.changeListeners_;if(r){for(var i=0,o=(r=r.slice()).length;i<o;i++)r[i](t);at(n)}}function fn(e,t,n){
/*ThouShaltNotCache*/
return ir(function(){
/*ThouShaltNotCache*/
var r=Bn(e,n)[H];null!=t||(t=function(e){
/*ThouShaltNotCache*/
return P(e,K)||O(e,K,L({},e[K])),e[K]}(e)),x(t).forEach(function(e){
/*ThouShaltNotCache*/
return r.make_(e,t[e])})}),e}var dn="splice",_n="update",vn={get:function(e,t){
/*ThouShaltNotCache*/
var n=e[H];return t===H?n:"length"===t?n.getArrayLength_():"string"!=typeof t||isNaN(t)?P(bn,t)?bn[t]:e[t]:n.get_(parseInt(t))},set:function(e,t,n){
/*ThouShaltNotCache*/
var r=e[H];return"length"===t&&r.setArrayLength_(n),"symbol"==typeof t||isNaN(t)?e[t]=n:r.set_(parseInt(t),n),!0},preventExtensions:function(){
/*ThouShaltNotCache*/
n(15)}},pn=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===e&&(e="ObservableArray"),this.owned_=void 0,this.legacyMode_=void 0,this.atom_=void 0,this.values_=[],this.interceptors_=void 0,this.changeListeners_=void 0,this.enhancer_=void 0,this.dehancer=void 0,this.proxy_=void 0,this.lastKnownLength_=0,this.owned_=n,this.legacyMode_=r,this.atom_=new W(e),this.enhancer_=function(e,n){
/*ThouShaltNotCache*/
return t(e,n,"ObservableArray[..]")}}var t=e.prototype;return t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.dehanceValues_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer&&e.length>0?e.map(this.dehancer):e},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.observe_=function(e,t){
/*ThouShaltNotCache*/
return void 0===t&&(t=!1),t&&e({observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:"splice",index:0,added:this.values_.slice(),addedCount:this.values_.length,removed:[],removedCount:0}),ln(this,e)},t.getArrayLength_=function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.values_.length},t.setArrayLength_=function(e){
/*ThouShaltNotCache*/
("number"!=typeof e||isNaN(e)||e<0)&&n("Out of range: "+e);var t=this.values_.length;if(e!==t)if(e>t){for(var r=new Array(e-t),i=0;i<e-t;i++)r[i]=void 0;this.spliceWithArray_(t,0,r)}else this.spliceWithArray_(e,t-e)},t.updateArrayLength_=function(e,t){
/*ThouShaltNotCache*/
e!==this.lastKnownLength_&&n(16),this.lastKnownLength_+=t,this.legacyMode_&&t>0&&Zn(e+t+1)},t.spliceWithArray_=function(e,t,n){
/*ThouShaltNotCache*/
var r=this;this.atom_;var i=this.values_.length;if(void 0===e?e=0:e>i?e=i:e<0&&(e=Math.max(0,i+e)),t=1===arguments.length?i-e:null==t?0:Math.max(0,Math.min(t,i-e)),void 0===n&&(n=c),sn(this)){var o=un(this,{object:this.proxy_,type:dn,index:e,removedCount:t,added:n});if(!o)return c;t=o.removedCount,n=o.added}if(n=0===n.length?n:n.map(function(e){
/*ThouShaltNotCache*/
return r.enhancer_(e,void 0)}),this.legacyMode_){var s=n.length-t;this.updateArrayLength_(i,s)}var a=this.spliceItemsIntoValues_(e,t,n);return 0===t&&0===n.length||this.notifyArraySplice_(e,n,a),this.dehanceValues_(a)},t.spliceItemsIntoValues_=function(e,t,n){var r;
/*ThouShaltNotCache*/
if(n.length<1e4)return(r=this.values_).splice.apply(r,[e,t].concat(n));var i=this.values_.slice(e,e+t),o=this.values_.slice(e+t);this.values_.length+=n.length-t;for(var s=0;s<n.length;s++)this.values_[e+s]=n[s];for(var a=0;a<o.length;a++)this.values_[e+n.length+a]=o[a];return i},t.notifyArrayChildUpdate_=function(e,t,n){
/*ThouShaltNotCache*/
var r=!this.owned_&&!1,i=cn(this),o=i||r?{observableKind:"array",object:this.proxy_,type:_n,debugObjectName:this.atom_.name_,index:e,newValue:t,oldValue:n}:null;this.atom_.reportChanged(),i&&hn(this,o)},t.notifyArraySplice_=function(e,t,n){
/*ThouShaltNotCache*/
var r=!this.owned_&&!1,i=cn(this),o=i||r?{observableKind:"array",object:this.proxy_,debugObjectName:this.atom_.name_,type:dn,index:e,removed:n,added:t,removedCount:n.length,addedCount:t.length}:null;this.atom_.reportChanged(),i&&hn(this,o)},t.get_=function(e){
/*ThouShaltNotCache*/
if(!(this.legacyMode_&&e>=this.values_.length))return this.atom_.reportObserved(),this.dehanceValue_(this.values_[e]);console.warn("[mobx] Out of bounds read: "+e)},t.set_=function(e,t){
/*ThouShaltNotCache*/
var r=this.values_;if(this.legacyMode_&&e>r.length&&n(17,e,r.length),e<r.length){this.atom_;var i=r[e];if(sn(this)){var o=un(this,{type:_n,object:this.proxy_,index:e,newValue:t});if(!o)return;t=o.newValue}(t=this.enhancer_(t,i))!==i&&(r[e]=t,this.notifyArrayChildUpdate_(e,t,i))}else{for(var s=new Array(e+1-r.length),a=0;a<s.length-1;a++)s[a]=void 0;s[s.length-1]=t,this.spliceWithArray_(r.length,0,s)}},e}();function gn(e,t,n,r){
/*ThouShaltNotCache*/
return void 0===n&&(n="ObservableArray"),void 0===r&&(r=!1),d(),ir(function(){
/*ThouShaltNotCache*/
var i=new pn(n,t,r,!1);w(i.values_,H,i);var o=new Proxy(i.values_,vn);return i.proxy_=o,e&&e.length&&i.spliceWithArray_(0,0,e),o})}var bn={clear:function(){
/*ThouShaltNotCache*/
return this.splice(0)},replace:function(e){
/*ThouShaltNotCache*/
var t=this[H];return t.spliceWithArray_(0,t.values_.length,e)},toJSON:function(){
/*ThouShaltNotCache*/
return this.slice()},splice:function(e,t){
/*ThouShaltNotCache*/
for(var n=arguments.length,r=new Array(n>2?n-2:0),i=2;i<n;i++)r[i-2]=arguments[i];var o=this[H];switch(arguments.length){case 0:return[];case 1:return o.spliceWithArray_(e);case 2:return o.spliceWithArray_(e,t)}return o.spliceWithArray_(e,t,r)},spliceWithArray:function(e,t,n){
/*ThouShaltNotCache*/
return this[H].spliceWithArray_(e,t,n)},push:function(){for(
/*ThouShaltNotCache*/
var e=this[H],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(e.values_.length,0,n),e.values_.length},pop:function(){
/*ThouShaltNotCache*/
return this.splice(Math.max(this[H].values_.length-1,0),1)[0]},shift:function(){
/*ThouShaltNotCache*/
return this.splice(0,1)[0]},unshift:function(){for(
/*ThouShaltNotCache*/
var e=this[H],t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return e.spliceWithArray_(0,0,n),e.values_.length},reverse:function(){
/*ThouShaltNotCache*/
return _t.trackingDerivation&&n(37,"reverse"),this.replace(this.slice().reverse()),this},sort:function(){
/*ThouShaltNotCache*/
_t.trackingDerivation&&n(37,"sort");var e=this.slice();return e.sort.apply(e,arguments),this.replace(e),this},remove:function(e){
/*ThouShaltNotCache*/
var t=this[H],n=t.dehanceValues_(t.values_).indexOf(e);return n>-1&&(this.splice(n,1),!0)}};function yn(e,t){
/*ThouShaltNotCache*/
"function"==typeof Array.prototype[e]&&(bn[e]=t(e))}function mn(e){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var t=this[H];t.atom_.reportObserved();var n=t.dehanceValues_(t.values_);return n[e].apply(n,arguments)}}function On(e){
/*ThouShaltNotCache*/
return function(t,n){
/*ThouShaltNotCache*/
var r=this,i=this[H];return i.atom_.reportObserved(),i.dehanceValues_(i.values_)[e](function(e,i){
/*ThouShaltNotCache*/
return t.call(n,e,i,r)})}}function wn(e){
/*ThouShaltNotCache*/
return function(){
/*ThouShaltNotCache*/
var t=this,n=this[H];n.atom_.reportObserved();var r=n.dehanceValues_(n.values_),i=arguments[0];return arguments[0]=function(e,n,r){
/*ThouShaltNotCache*/
return i(e,n,r,t)},r[e].apply(r,arguments)}}yn("at",mn),yn("concat",mn),yn("flat",mn),yn("includes",mn),yn("indexOf",mn),yn("join",mn),yn("lastIndexOf",mn),yn("slice",mn),yn("toString",mn),yn("toLocaleString",mn),yn("toSorted",mn),yn("toSpliced",mn),yn("with",mn),yn("every",On),yn("filter",On),yn("find",On),yn("findIndex",On),yn("findLast",On),yn("findLastIndex",On),yn("flatMap",On),yn("forEach",On),yn("map",On),yn("some",On),yn("toReversed",On),yn("reduce",wn),yn("reduceRight",wn);var Sn=S("ObservableArrayAdministration",pn);function An(e){
/*ThouShaltNotCache*/
return b(e)&&Sn(e[H])}var kn={},jn="add",xn="delete",Mn=function(){
/*ThouShaltNotCache*/
function e(e,t,r){
/*ThouShaltNotCache*/
var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableMap"),this.enhancer_=void 0,this.name_=void 0,this[H]=kn,this.data_=void 0,this.hasMap_=void 0,this.keysAtom_=void 0,this.interceptors_=void 0,this.changeListeners_=void 0,this.dehancer=void 0,this.enhancer_=t,this.name_=r,p(Map)||n(18),ir(function(){
/*ThouShaltNotCache*/
i.keysAtom_=F("ObservableMap.keys()"),i.data_=new Map,i.hasMap_=new Map,e&&i.merge(e)})}var t=e.prototype;return t.has_=function(e){
/*ThouShaltNotCache*/
return this.data_.has(e)},t.has=function(e){
/*ThouShaltNotCache*/
var t=this;if(!_t.trackingDerivation)return this.has_(e);var n=this.hasMap_.get(e);if(!n){var r=n=new Fe(this.has_(e),J,"ObservableMap.key?",!1);this.hasMap_.set(e,r),zt(r,function(){
/*ThouShaltNotCache*/
return t.hasMap_.delete(e)})}return n.get()},t.set=function(e,t){
/*ThouShaltNotCache*/
var n=this.has_(e);if(sn(this)){var r=un(this,{type:n?_n:jn,object:this,newValue:t,name:e});if(!r)return this;t=r.newValue}return n?this.updateValue_(e,t):this.addValue_(e,t),this},t.delete=function(e){
/*ThouShaltNotCache*/
var t=this;if((this.keysAtom_,sn(this))&&!un(this,{type:xn,object:this,name:e}))return!1;if(this.has_(e)){var n=cn(this),r=n?{observableKind:"map",debugObjectName:this.name_,type:xn,object:this,oldValue:this.data_.get(e).value_,name:e}:null;return nn(function(){
/*ThouShaltNotCache*/
var n;t.keysAtom_.reportChanged(),null==(n=t.hasMap_.get(e))||n.setNewValue_(!1),t.data_.get(e).setNewValue_(void 0),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.updateValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this.data_.get(e);if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:_n,object:this,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),r&&hn(this,i)}},t.addValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this;this.keysAtom_,nn(function(){
/*ThouShaltNotCache*/
var r,i=new Fe(t,n.enhancer_,"ObservableMap.key",!1);n.data_.set(e,i),t=i.value_,null==(r=n.hasMap_.get(e))||r.setNewValue_(!0),n.keysAtom_.reportChanged()});var r=cn(this),i=r?{observableKind:"map",debugObjectName:this.name_,type:jn,object:this,name:e,newValue:t}:null;r&&hn(this,i)},t.get=function(e){
/*ThouShaltNotCache*/
return this.has(e)?this.dehanceValue_(this.data_.get(e).get()):this.dehanceValue_(void 0)},t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.keys=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.keys()},t.values=function(){
/*ThouShaltNotCache*/
var e=this,t=this.keys();return Tn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:e.get(i)}}})},t.entries=function(){
/*ThouShaltNotCache*/
var e=this,t=this.keys();return Tn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.done,i=n.value;return{done:r,value:r?void 0:[i,e.get(i)]}}})},t[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.entries()},t.forEach=function(e,t){
/*ThouShaltNotCache*/
for(var n,r=N(this);!(n=r()).done;){var i=n.value,o=i[0],s=i[1];e.call(t,s,o,this)}},t.merge=function(e){
/*ThouShaltNotCache*/
var t=this;return Pn(e)&&(e=new Map(e)),nn(function(){var r,i,o;
/*ThouShaltNotCache*/
y(e)?function(e){
/*ThouShaltNotCache*/
var t=Object.keys(e);if(!j)return t;var n=Object.getOwnPropertySymbols(e);return n.length?[].concat(t,n.filter(function(t){
/*ThouShaltNotCache*/
return u.propertyIsEnumerable.call(e,t)})):t}(e).forEach(function(n){
/*ThouShaltNotCache*/
return t.set(n,e[n])}):Array.isArray(e)?e.forEach(function(e){
/*ThouShaltNotCache*/
var n=e[0],r=e[1];return t.set(n,r)}):A(e)?(r=e,i=Object.getPrototypeOf(r),o=Object.getPrototypeOf(i),null!==Object.getPrototypeOf(o)&&n(19,e),e.forEach(function(e,n){
/*ThouShaltNotCache*/
return t.set(n,e)})):null!=e&&n(20,e)}),this},t.clear=function(){
/*ThouShaltNotCache*/
var e=this;nn(function(){
/*ThouShaltNotCache*/
ot(function(){
/*ThouShaltNotCache*/
for(var t,n=N(e.keys());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.replace=function(e){
/*ThouShaltNotCache*/
var t=this;return nn(function(){for(
/*ThouShaltNotCache*/
var r,i=function(e){
/*ThouShaltNotCache*/
if(A(e)||Pn(e))return e;if(Array.isArray(e))return new Map(e);if(y(e)){var t=new Map;for(var r in e)t.set(r,e[r]);return t}return n(21,e)}(e),o=new Map,s=!1,a=N(t.data_.keys());!(r=a()).done;){var u=r.value;if(!i.has(u))if(t.delete(u))s=!0;else{var c=t.data_.get(u);o.set(u,c)}}for(var l,h=N(i.entries());!(l=h()).done;){var f=l.value,d=f[0],_=f[1],v=t.data_.has(d);if(t.set(d,_),t.data_.has(d)){var p=t.data_.get(d);o.set(d,p),v||(s=!0)}}if(!s)if(t.data_.size!==o.size)t.keysAtom_.reportChanged();else for(var g=t.data_.keys(),b=o.keys(),m=g.next(),O=b.next();!m.done;){if(m.value!==O.value){t.keysAtom_.reportChanged();break}m=g.next(),O=b.next()}t.data_=o}),this},t.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableMap]"},t.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},D(e,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Map"}}])}(),Pn=S("ObservableMap",Mn);function Tn(e){
/*ThouShaltNotCache*/
return e[Symbol.toStringTag]="MapIterator",hr(e)}var Vn={},En=function(){
/*ThouShaltNotCache*/
function e(e,t,r){
/*ThouShaltNotCache*/
var i=this;void 0===t&&(t=Y),void 0===r&&(r="ObservableSet"),this.name_=void 0,this[H]=Vn,this.data_=new Set,this.atom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.dehancer=void 0,this.enhancer_=void 0,this.name_=r,p(Set)||n(22),this.enhancer_=function(e,n){
/*ThouShaltNotCache*/
return t(e,n,r)},ir(function(){
/*ThouShaltNotCache*/
i.atom_=F(i.name_),e&&i.replace(e)})}var t=e.prototype;return t.dehanceValue_=function(e){
/*ThouShaltNotCache*/
return void 0!==this.dehancer?this.dehancer(e):e},t.clear=function(){
/*ThouShaltNotCache*/
var e=this;nn(function(){
/*ThouShaltNotCache*/
ot(function(){
/*ThouShaltNotCache*/
for(var t,n=N(e.data_.values());!(t=n()).done;){var r=t.value;e.delete(r)}})})},t.forEach=function(e,t){
/*ThouShaltNotCache*/
for(var n,r=N(this);!(n=r()).done;){var i=n.value;e.call(t,i,i,this)}},t.add=function(e){
/*ThouShaltNotCache*/
var t=this;if(this.atom_,sn(this)){var n=un(this,{type:jn,object:this,newValue:e});if(!n)return this;e=n.newValue}if(!this.has(e)){nn(function(){
/*ThouShaltNotCache*/
t.data_.add(t.enhancer_(e,void 0)),t.atom_.reportChanged()});var r=!1,i=cn(this),o=i?{observableKind:"set",debugObjectName:this.name_,type:jn,object:this,newValue:e}:null;r,i&&hn(this,o)}return this},t.delete=function(e){
/*ThouShaltNotCache*/
var t=this;if(sn(this)&&!un(this,{type:xn,object:this,oldValue:e}))return!1;if(this.has(e)){var n=cn(this),r=n?{observableKind:"set",debugObjectName:this.name_,type:xn,object:this,oldValue:e}:null;return nn(function(){
/*ThouShaltNotCache*/
t.atom_.reportChanged(),t.data_.delete(e)}),n&&hn(this,r),!0}return!1},t.has=function(e){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.has(this.dehanceValue_(e))},t.entries=function(){
/*ThouShaltNotCache*/
var e=this.values();return Cn({next:function(){
/*ThouShaltNotCache*/
var t=e.next(),n=t.value,r=t.done;return r?{value:void 0,done:r}:{value:[n,n],done:r}}})},t.keys=function(){
/*ThouShaltNotCache*/
return this.values()},t.values=function(){
/*ThouShaltNotCache*/
this.atom_.reportObserved();var e=this,t=this.data_.values();return Cn({next:function(){
/*ThouShaltNotCache*/
var n=t.next(),r=n.value,i=n.done;return i?{value:void 0,done:i}:{value:e.dehanceValue_(r),done:i}}})},t.intersection=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.intersection(this):new Set(this).intersection(e)},t.union=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.union(this):new Set(this).union(e)},t.difference=function(e){
/*ThouShaltNotCache*/
return new Set(this).difference(e)},t.symmetricDifference=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.symmetricDifference(this):new Set(this).symmetricDifference(e)},t.isSubsetOf=function(e){
/*ThouShaltNotCache*/
return new Set(this).isSubsetOf(e)},t.isSupersetOf=function(e){
/*ThouShaltNotCache*/
return new Set(this).isSupersetOf(e)},t.isDisjointFrom=function(e){
/*ThouShaltNotCache*/
return k(e)&&!Rn(e)?e.isDisjointFrom(this):new Set(this).isDisjointFrom(e)},t.replace=function(e){
/*ThouShaltNotCache*/
var t=this;return Rn(e)&&(e=new Set(e)),nn(function(){
/*ThouShaltNotCache*/
Array.isArray(e)||k(e)?(t.clear(),e.forEach(function(e){
/*ThouShaltNotCache*/
return t.add(e)})):null!=e&&n("Cannot initialize set from "+e)}),this},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.toJSON=function(){
/*ThouShaltNotCache*/
return Array.from(this)},t.toString=function(){
/*ThouShaltNotCache*/
return"[object ObservableSet]"},t[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
return this.values()},D(e,[{key:"size",get:function(){
/*ThouShaltNotCache*/
return this.atom_.reportObserved(),this.data_.size}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Set"}}])}(),Rn=S("ObservableSet",En);function Cn(e){
/*ThouShaltNotCache*/
return e[Symbol.toStringTag]="SetIterator",hr(e)}var Dn=Object.create(null),Nn="remove",Ln=function(){
/*ThouShaltNotCache*/
function e(e,t,n,r){
/*ThouShaltNotCache*/
void 0===t&&(t=new Map),void 0===r&&(r=be),this.target_=void 0,this.values_=void 0,this.name_=void 0,this.defaultAnnotation_=void 0,this.keysAtom_=void 0,this.changeListeners_=void 0,this.interceptors_=void 0,this.proxy_=void 0,this.isPlainObject_=void 0,this.appliedAnnotations_=void 0,this.pendingKeys_=void 0,this.target_=e,this.values_=t,this.name_=n,this.defaultAnnotation_=r,this.keysAtom_=new W("ObservableObject.keys"),this.isPlainObject_=y(this.target_)}var t=e.prototype;return t.getObservablePropValue_=function(e){
/*ThouShaltNotCache*/
return this.values_.get(e).get()},t.setObservablePropValue_=function(e,t){
/*ThouShaltNotCache*/
var n=this.values_.get(e);if(n instanceof Xe)return n.set(t),!0;if(sn(this)){var r=un(this,{type:_n,object:this.proxy_||this.target_,name:e,newValue:t});if(!r)return null;t=r.newValue}if((t=n.prepareNewValue_(t))!==_t.UNCHANGED){var i=cn(this),o=i?{type:_n,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,oldValue:n.value_,name:e,newValue:t}:null;0,n.setNewValue_(t),i&&hn(this,o)}return!0},t.get_=function(e){
/*ThouShaltNotCache*/
return _t.trackingDerivation&&!P(this.target_,e)&&this.has_(e),this.target_[e]},t.set_=function(e,t,n){
/*ThouShaltNotCache*/
return void 0===n&&(n=!1),P(this.target_,e)?this.values_.has(e)?this.setObservablePropValue_(e,t):n?Reflect.set(this.target_,e,t):(this.target_[e]=t,!0):this.extend_(e,{value:t,enumerable:!0,writable:!0,configurable:!0},this.defaultAnnotation_,n)},t.has_=function(e){
/*ThouShaltNotCache*/
if(!_t.trackingDerivation)return e in this.target_;this.pendingKeys_||(this.pendingKeys_=new Map);var t=this.pendingKeys_.get(e);return t||(t=new Fe(e in this.target_,J,"ObservableObject.key?",!1),this.pendingKeys_.set(e,t)),t.get()},t.make_=function(e,t){if(
/*ThouShaltNotCache*/
!0===t&&(t=this.defaultAnnotation_),!1!==t){if(qn(this,t,e),!(e in this.target_)){var r;if(null!=(r=this.target_[K])&&r[e])return;n(1,t.annotationType_,this.name_+"."+e.toString())}for(var i=this.target_;i&&i!==u;){var o=s(i,e);if(o){var a=t.make_(this,e,o,i);if(0===a)return;if(1===a)break}i=Object.getPrototypeOf(i)}Gn(this,t,e)}},t.extend_=function(e,t,n,r){if(
/*ThouShaltNotCache*/
void 0===r&&(r=!1),!0===n&&(n=this.defaultAnnotation_),!1===n)return this.defineProperty_(e,t,r);qn(this,n,e);var i=n.extend_(this,e,t,r);return i&&Gn(this,n,e),i},t.defineProperty_=function(e,t,n){
/*ThouShaltNotCache*/
void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this)){var i=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t.value});if(!i)return null;var o=i.newValue;t.value!==o&&(t=L({},t,{value:o}))}if(n){if(!Reflect.defineProperty(this.target_,e,t))return!1}else a(this.target_,e,t);this.notifyPropertyAddition_(e,t.value)}finally{yt()}return!0},t.defineObservableProperty_=function(e,t,n,r){
/*ThouShaltNotCache*/
void 0===r&&(r=!1),this.keysAtom_;try{bt();var i=this.delete_(e);if(!i)return i;if(sn(this)){var o=un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:t});if(!o)return null;t=o.newValue}var s=In(e),u={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!0,get:s.get,set:s.set};if(r){if(!Reflect.defineProperty(this.target_,e,u))return!1}else a(this.target_,e,u);var c=new Fe(t,n,"ObservableObject.key",!1);this.values_.set(e,c),this.notifyPropertyAddition_(e,c.value_)}finally{yt()}return!0},t.defineComputedProperty_=function(e,t,n){
/*ThouShaltNotCache*/
void 0===n&&(n=!1),this.keysAtom_;try{bt();var r=this.delete_(e);if(!r)return r;if(sn(this))if(!un(this,{object:this.proxy_||this.target_,name:e,type:jn,newValue:void 0}))return null;t.name||(t.name="ObservableObject.key"),t.context=this.proxy_||this.target_;var i=In(e),o={configurable:!_t.safeDescriptors||this.isPlainObject_,enumerable:!1,get:i.get,set:i.set};if(n){if(!Reflect.defineProperty(this.target_,e,o))return!1}else a(this.target_,e,o);this.values_.set(e,new Xe(t)),this.notifyPropertyAddition_(e,void 0)}finally{yt()}return!0},t.delete_=function(e,t){if(
/*ThouShaltNotCache*/
void 0===t&&(t=!1),this.keysAtom_,!P(this.target_,e))return!0;if(sn(this)&&!un(this,{object:this.proxy_||this.target_,name:e,type:Nn}))return null;try{var n;bt();var r,i=cn(this),o=this.values_.get(e),a=void 0;if(!o&&i)a=null==(r=s(this.target_,e))?void 0:r.value;if(t){if(!Reflect.deleteProperty(this.target_,e))return!1}else delete this.target_[e];if(o&&(this.values_.delete(e),o instanceof Fe&&(a=o.value_),Ot(o)),this.keysAtom_.reportChanged(),null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(e in this.target_),i){var u={type:Nn,observableKind:"object",object:this.proxy_||this.target_,debugObjectName:this.name_,oldValue:a,name:e};0,i&&hn(this,u)}}finally{yt()}return!0},t.observe_=function(e,t){return ln(this,e)},t.intercept_=function(e){
/*ThouShaltNotCache*/
return an(this,e)},t.notifyPropertyAddition_=function(e,t){
/*ThouShaltNotCache*/
var n,r=cn(this);if(r){var i=r?{type:jn,observableKind:"object",debugObjectName:this.name_,object:this.proxy_||this.target_,name:e,newValue:t}:null;0,r&&hn(this,i)}null==(n=this.pendingKeys_)||null==(n=n.get(e))||n.set(!0),this.keysAtom_.reportChanged()},t.ownKeys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),x(this.target_)},t.keys_=function(){
/*ThouShaltNotCache*/
return this.keysAtom_.reportObserved(),Object.keys(this.target_)},e}();function Bn(e,t){
/*ThouShaltNotCache*/
var n;if(P(e,H))return e;var r=null!=(n=null==t?void 0:t.name)?n:"ObservableObject",i=new Ln(e,new Map,String(r),function(e){
/*ThouShaltNotCache*/
var t;return e?null!=(t=e.defaultDecorator)?t:ye(e):void 0}(t));return O(e,H,i),e}var Un=S("ObservableObjectAdministration",Ln);function In(e){
/*ThouShaltNotCache*/
return Dn[e]||(Dn[e]={get:function(){
/*ThouShaltNotCache*/
return this[H].getObservablePropValue_(e)},set:function(t){
/*ThouShaltNotCache*/
return this[H].setObservablePropValue_(e,t)}})}function Kn(e){
/*ThouShaltNotCache*/
return!!b(e)&&Un(e[H])}function Gn(e,t,n){
/*ThouShaltNotCache*/
var r;null==(r=e.target_[K])||delete r[n]}function qn(e,t,n){}var zn,Hn,Wn=Jn(0),$n=function(){
/*ThouShaltNotCache*/
var e=!1,t={};return Object.defineProperty(t,"0",{set:function(){
/*ThouShaltNotCache*/
e=!0}}),Object.create(t)[0]=1,!1===e}(),Fn=0,Xn=function(){};zn=Xn,Hn=Array.prototype,
/*ThouShaltNotCache*/
Object.setPrototypeOf?Object.setPrototypeOf(zn.prototype,Hn):void 0!==zn.prototype.__proto__?zn.prototype.__proto__=Hn:zn.prototype=Hn;var Yn=function(e){
/*ThouShaltNotCache*/
function t(t,n,r,i){
/*ThouShaltNotCache*/
var o;return void 0===r&&(r="ObservableArray"),void 0===i&&(i=!1),o=e.call(this)||this,ir(function(){
/*ThouShaltNotCache*/
var e=new pn(r,n,i,!0);e.proxy_=o,w(o,H,e),t&&t.length&&o.spliceWithArray(0,0,t),$n&&Object.defineProperty(o,"0",Wn)}),o}B(t,e);var n=t.prototype;return n.concat=function(){
/*ThouShaltNotCache*/
this[H].atom_.reportObserved();for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Array.prototype.concat.apply(this.slice(),t.map(function(e){
/*ThouShaltNotCache*/
return An(e)?e.slice():e}))},n[Symbol.iterator]=function(){
/*ThouShaltNotCache*/
var e=this,t=0;return hr({next:function(){
/*ThouShaltNotCache*/
return t<e.length?{value:e[t++],done:!1}:{done:!0,value:void 0}}})},D(t,[{key:"length",get:function(){
/*ThouShaltNotCache*/
return this[H].getArrayLength_()},set:function(e){
/*ThouShaltNotCache*/
this[H].setArrayLength_(e)}},{key:Symbol.toStringTag,get:function(){
/*ThouShaltNotCache*/
return"Array"}}])}(Xn);function Jn(e){
/*ThouShaltNotCache*/
return{enumerable:!1,configurable:!0,get:function(){
/*ThouShaltNotCache*/
return this[H].get_(e)},set:function(t){
/*ThouShaltNotCache*/
this[H].set_(e,t)}}}function Qn(e){
/*ThouShaltNotCache*/
a(Yn.prototype,""+e,Jn(e))}function Zn(e){
/*ThouShaltNotCache*/
if(e>Fn){for(var t=Fn;t<e+100;t++)Qn(t);Fn=e}}function er(e,t,n){
/*ThouShaltNotCache*/
return new Yn(e,t,n)}function tr(e,t){
/*ThouShaltNotCache*/
if("object"==typeof e&&null!==e){if(An(e))return void 0!==t&&n(23),e[H].atom_;if(Rn(e))return e.atom_;if(Pn(e)){if(void 0===t)return e.keysAtom_;var r=e.data_.get(t)||e.hasMap_.get(t);return r||n(25,t,rr(e)),r}if(Kn(e)){if(!t)return n(26);var i=e[H].values_.get(t);return i||n(27,t,rr(e)),i}if($(e)||Qe(e)||xt(e))return e}else if(p(e)&&xt(e[H]))return e[H];n(28)}function nr(e,t){
/*ThouShaltNotCache*/
return e||n(29),void 0!==t?nr(tr(e,t)):$(e)||Qe(e)||xt(e)||Pn(e)||Rn(e)?e:e[H]?e[H]:void n(24,e)}function rr(e,t){
/*ThouShaltNotCache*/
var n;if(void 0!==t)n=tr(e,t);else{if(Bt(e))return e.name;n=Kn(e)||Pn(e)||Rn(e)?nr(e):tr(e)}return n.name_}function ir(e){
/*ThouShaltNotCache*/
var t=st(),n=We(!0);bt();try{return e()}finally{yt(),$e(n),at(t)}}Object.entries(bn).forEach(function(e){
/*ThouShaltNotCache*/
var t=e[0],n=e[1];"concat"!==t&&O(Yn.prototype,t,n)}),Zn(1e3);var or,sr=u.toString;function ar(e,t,n){
/*ThouShaltNotCache*/
return void 0===n&&(n=-1),ur(e,t,n)}function ur(e,t,n,r,i){
/*ThouShaltNotCache*/
if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;if("function"!==o&&"object"!==o&&"object"!=typeof t)return!1;var s=sr.call(e);if(s!==sr.call(t))return!1;switch(s){case"[object RegExp]":case"[object String]":return""+e==""+t;case"[object Number]":return+e!=+e?+t!=+t:0===+e?1/+e==1/t:+e===+t;case"[object Date]":case"[object Boolean]":return+e===+t;case"[object Symbol]":return"undefined"!=typeof Symbol&&Symbol.valueOf.call(e)===Symbol.valueOf.call(t);case"[object Map]":case"[object Set]":n>=0&&n++}e=cr(e),t=cr(t);var a="[object Array]"===s;if(!a){if("object"!=typeof e||"object"!=typeof t)return!1;var u=e.constructor,c=t.constructor;if(u!==c&&!(p(u)&&u instanceof u&&p(c)&&c instanceof c)&&"constructor"in e&&"constructor"in t)return!1}if(0===n)return!1;n<0&&(n=-1),i=i||[];for(var l=(r=r||[]).length;l--;)if(r[l]===e)return i[l]===t;if(r.push(e),i.push(t),a){if((l=e.length)!==t.length)return!1;for(;l--;)if(!ur(e[l],t[l],n-1,r,i))return!1}else{var h=Object.keys(e),f=h.length;if(Object.keys(t).length!==f)return!1;for(var d=0;d<f;d++){var _=h[d];if(!P(t,_)||!ur(e[_],t[_],n-1,r,i))return!1}}return r.pop(),i.pop(),!0}function cr(e){
/*ThouShaltNotCache*/
return An(e)?e.slice():A(e)||Pn(e)||k(e)||Rn(e)?Array.from(e.entries()):e}var lr=(null==(or=i().Iterator)?void 0:or.prototype)||{};function hr(e){
/*ThouShaltNotCache*/
return e[Symbol.iterator]=fr,Object.assign(Object.create(lr),e)}function fr(){
/*ThouShaltNotCache*/
return this}["Symbol","Map","Set"].forEach(function(e){void 0===i()[e]&&n("MobX requires global '"+e+"' to be available or polyfilled")}),"object"==typeof __MOBX_DEVTOOLS_GLOBAL_HOOK__&&__MOBX_DEVTOOLS_GLOBAL_HOOK__.injectMobx({spy:function(e){return console.warn("[mobx.spy] Is a no-op in production builds"),function(){}},extras:{getDebugName:rr},$mobx:H});class dr{id;name;lastMessage=null;rooms=new Set;status="Online";constructor(e,t){
/*ThouShaltNotCache*/
fn(this,{name:Ce,lastMessage:Ce,rooms:Ce,status:Ce,setName:Nt,setLastMessage:Nt,addRoom:Nt,removeRoom:Nt,setStatus:Nt}),this.id=e,this.name=t}setName(e){
/*ThouShaltNotCache*/
this.name=e}setLastMessage(e){
/*ThouShaltNotCache*/
this.lastMessage=e}addRoom(e){
/*ThouShaltNotCache*/
this.rooms.add(e)}removeRoom(e){
/*ThouShaltNotCache*/
this.rooms.delete(e)}setStatus(e){
/*ThouShaltNotCache*/
this.status=e,this.rooms.forEach(t=>{
/*ThouShaltNotCache*/
t.addStatusUpdate(this,e)})}}class _r{name;people=new Map;messages=[];roomUpdates=[];constructor(e){
/*ThouShaltNotCache*/
fn(this,{name:Ce,people:Ce,messages:Ce,roomUpdates:Ce,messageCount:Be,peopleCount:Be,lastMessage:Be,members:Be,addPerson:Nt,removePerson:Nt,addMessage:Nt,addStatusUpdate:Nt,dispose:Nt}),this.name=e}get messageCount(){
/*ThouShaltNotCache*/
return this.messages.length}get peopleCount(){
/*ThouShaltNotCache*/
return this.people.size}get lastMessage(){
/*ThouShaltNotCache*/
return 0===this.messages.length?null:this.messages[this.messages.length-1]}get members(){
/*ThouShaltNotCache*/
return Array.from(this.people.values())}addPerson(e){
/*ThouShaltNotCache*/
this.people.has(e.id)||(this.people.set(e.id,e),e.addRoom(this))}removePerson(e){
/*ThouShaltNotCache*/
const t=this.people.get(e);t&&(t.removeRoom(this),this.people.delete(e))}addMessage(e){
/*ThouShaltNotCache*/
this.messages.push(e),e.author.setLastMessage(e)}addStatusUpdate(e,t){
/*ThouShaltNotCache*/
this.roomUpdates.push(`${e.name} is now ${t}`),this.roomUpdates.length>20&&(this.roomUpdates=this.roomUpdates.slice(10))}dispose(e){
/*ThouShaltNotCache*/
this.people.forEach(e=>e.removeRoom(this)),e&&e.removeRoom(this.name)}}class vr{static _nextId=0;id;text;author;timestamp;static nextId(){
/*ThouShaltNotCache*/
return vr._nextId++}constructor(e,t){
/*ThouShaltNotCache*/
fn(this,{text:Ce,updateText:Nt}),this.id=vr.nextId(),this.text=e,this.author=t,this.timestamp=new Date}updateText(e){
/*ThouShaltNotCache*/
this.text=e}}class pr{lastMessages=new Map;lastMessage;roomDisposers=new Map;constructor(e){
/*ThouShaltNotCache*/
fn(this,{lastMessages:Ce,updateLastMessage:Nt,addRoom:Nt,removeRoom:Nt}),e.forEach(e=>this.addRoom(e))}addRoom(e){
/*ThouShaltNotCache*/
const t=function(e,t,n){
/*ThouShaltNotCache*/
var r,i,o;void 0===n&&(n=l);var s,a,u,c=null!=(r=n.name)?r:"Reaction",h=Nt(c,n.onError?(s=n.onError,a=t,function(){
/*ThouShaltNotCache*/
try{return a.apply(this,arguments)}catch(e){s.call(this,e)}}):t),f=!n.scheduler&&!n.delay,d=Kt(n),_=!0,v=!1,p=n.compareStructural?X.structural:n.equals||X.default,g=new wt(c,function(){
/*ThouShaltNotCache*/
_||f?b():v||(v=!0,d(b))},n.onError,n.requiresObservable);function b(){if(
/*ThouShaltNotCache*/
v=!1,!g.isDisposed){var t=!1,r=u;g.track(function(){
/*ThouShaltNotCache*/
var n=He(!1,function(){
/*ThouShaltNotCache*/
return e(g)});t=_||!p(u,n),u=n}),(_&&n.fireImmediately||!_&&t)&&h(u,r,g),_=!1}}return null!=(i=n)&&null!=(i=i.signal)&&i.aborted||g.schedule_(),g.getDisposer_(null==(o=n)?void 0:o.signal)}(()=>e.lastMessage,t=>{
/*ThouShaltNotCache*/
t&&this.updateLastMessage(e.name,t)});this.roomDisposers.set(e.name,t)}removeRoom(e){
/*ThouShaltNotCache*/
this.roomDisposers.has(e)&&(this.roomDisposers.get(e)(),this.roomDisposers.delete(e),this.lastMessages.delete(e))}updateLastMessage(e,t){
/*ThouShaltNotCache*/
this.lastMessages.set(e,t)}}function gr(e){
/*ThouShaltNotCache*/
if(!e)throw new Error("Assertion failure")}function br(){
/*ThouShaltNotCache*/
const e=[],t=(...t)=>e.push(t.join(" ")),n=new _r("Tech Talk"),r=new _r("General Chat"),i=new _r("Large Meeting Room"),o=new dr(1,"Alice"),s=new dr(2,"Bob");n.addPerson(o),n.addPerson(s),r.addPerson(o);const a=[n,r,i],u=new pr(a);t("\n--- Setting up Large Meeting Room ---");const c=[];for(let e=3;e<203;e++){const t=new dr(e,`Person ${e}`);c.push(t),i.addPerson(t)}t(`[INFO] Added ${i.peopleCount} members to the large room.`),i.addPerson(o),i.addPerson(s),t("[INFO] Added Alice and Bob to the Large Meeting Room."),gr(3===o.rooms.size),gr(o.rooms.has(n)&&o.rooms.has(r)&&o.rooms.has(i)),gr(2===s.rooms.size&&s.rooms.has(n)&&s.rooms.has(i)),t("[PASS] Verified Person.rooms associations with Set.");const l=Ut(()=>{
/*ThouShaltNotCache*/
t("\n--- Global Notifications (Last Messages) ---"),0===u.lastMessages.size?t("No messages yet."):u.lastMessages.forEach((e,n)=>{
/*ThouShaltNotCache*/
t(`[${n}] "${e.text}" - ${e.author.name}`)}),t("------------------------------------------")}),h=Ut(()=>{
/*ThouShaltNotCache*/
a.forEach(e=>{
/*ThouShaltNotCache*/
e.roomUpdates.length>0&&t(`[${e.name} Update] ${e.roomUpdates[e.roomUpdates.length-1]}`)})});t("\n--- Status Update Scenario ---"),o.setStatus("Away"),gr(n.roomUpdates.includes("Alice is now Away")),gr(r.roomUpdates.includes("Alice is now Away")),gr(i.roomUpdates.includes("Alice is now Away")),t("[PASS] Verified that status updates are sent to all of Alice's rooms."),s.setStatus("Busy"),gr(n.roomUpdates.includes("Bob is now Busy")),gr(!r.roomUpdates.includes("Bob is now Busy")),gr(i.roomUpdates.includes("Bob is now Busy")),t("[PASS] Verified that status updates are only sent to Bob's rooms."),t("\n--- Sending Messages & Verifying Notifications ---");const f=new vr("First message to Tech Talk!",o);n.addMessage(f),gr(u.lastMessages.get("Tech Talk")===f),t("[PASS] Verified Tech Talk notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,o);r.addMessage(t),gr(u.lastMessages.get("General Chat")===t)}t("[PASS] Verified General Chat notification.");for(let e=0;e<=5;e++)for(const e of c){const t=new vr(`Hi, I am ${e.name}`,e);i.addMessage(t),gr(i.lastMessage==t),gr(u.lastMessages.get("Large Meeting Room")===t)}t("[PASS] Verified Large Meeting Room notification.");for(let e=0;e<20;e++){const t=new vr(`ping ${e}`,s);n.addMessage(t),gr(u.lastMessages.get("Tech Talk")===t)}t("[PASS] Verified Tech Talk notification update.");const d=[];for(let e=0;e<10;e++){const t=`General Chat ${e}`,n=new _r(t);d.push(n),u.addRoom(n);for(const e of c.slice(0,10))n.addPerson(e);for(const r of n.members.slice(0,5)){const i=new vr(`ping ${e}`,r);n.addMessage(i),gr(u.lastMessages.get(t)===i)}}return d.forEach(e=>e.dispose(u)),l(),h(),n.dispose(u),r.dispose(u),i.dispose(u),e}})(),MobXBenchmark=t})();
//# sourceMappingURL=bundle.es6.min.js.map

1
mobx/dist/bundle.es6.min.js.map vendored Normal file

File diff suppressed because one or more lines are too long

4603
mobx/package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

21
mobx/package.json Normal file
View file

@ -0,0 +1,21 @@
{
"name": "mobx",
"version": "1.0.0",
"scripts": {
"test": "node ./benchmark-node.mjs",
"clean": "rm -rf dist/*",
"build": "webpack"
},
"license": "See LICENSE files",
"dependencies": {
"mobx": "^6.13.7"
},
"devDependencies": {
"@babel/core": "^7.28.3",
"babel-loader": "^10.0.0",
"generate-license-file-webpack-plugin": "^4.1.0",
"terser-webpack-plugin": "^5.3.14",
"webpack": "^5.101.3",
"webpack-cli": "^6.0.1"
}
}

29
mobx/src/Message.mjs Normal file
View file

@ -0,0 +1,29 @@
import { makeObservable, observable, action } from 'mobx';
export class Message {
static _nextId = 0;
id;
text;
author; // Person
timestamp;
static nextId() {
return Message._nextId++;
}
constructor(text, author) {
makeObservable(this, {
text: observable,
updateText: action,
});
this.id = Message.nextId();
this.text = text;
this.author = author;
this.timestamp = new Date();
}
updateText(text) {
this.text = text;
}
}

View file

@ -0,0 +1,41 @@
import { makeObservable, observable, action, reaction } from 'mobx';
export class Notifications {
lastMessages = new Map(); // Map<string, Message>
lastMessage; roomDisposers = new Map(); // Map<string, Function>
constructor(rooms) {
makeObservable(this, {
lastMessages: observable,
updateLastMessage: action,
addRoom: action,
removeRoom: action,
});
rooms.forEach(room => this.addRoom(room));
}
addRoom(room) {
const disposer = reaction(
() => room.lastMessage,
(message) => {
if (message) {
this.updateLastMessage(room.name, message);
}
}
);
this.roomDisposers.set(room.name, disposer);
}
removeRoom(roomName) {
if (this.roomDisposers.has(roomName)) {
this.roomDisposers.get(roomName)(); // Dispose the reaction
this.roomDisposers.delete(roomName);
this.lastMessages.delete(roomName);
}
}
updateLastMessage(roomName, message) {
this.lastMessages.set(roomName, message);
}
}

48
mobx/src/Person.mjs Normal file
View file

@ -0,0 +1,48 @@
import { makeObservable, observable, action } from 'mobx';
export class Person {
id;
name;
lastMessage = null;
rooms = new Set();
status = 'Online';
constructor(id, name) {
makeObservable(this, {
name: observable,
lastMessage: observable,
rooms: observable,
status: observable,
setName: action,
setLastMessage: action,
addRoom: action,
removeRoom: action,
setStatus: action,
});
this.id = id;
this.name = name;
}
setName(name) {
this.name = name;
}
setLastMessage(message) {
this.lastMessage = message;
}
addRoom(room) {
this.rooms.add(room);
}
removeRoom(room) {
this.rooms.delete(room);
}
setStatus(status) {
this.status = status;
this.rooms.forEach(room => {
room.addStatusUpdate(this, status);
});
}
}

81
mobx/src/Room.mjs Normal file
View file

@ -0,0 +1,81 @@
import { makeObservable, observable, computed, action } from 'mobx';
const MAX_ROOM_UPDATES = 10;
export class Room {
name;
people = new Map();
messages = [];
roomUpdates = [];
constructor(name) {
makeObservable(this, {
name: observable,
people: observable,
messages: observable,
roomUpdates: observable,
messageCount: computed,
peopleCount: computed,
lastMessage: computed,
members: computed,
addPerson: action,
removePerson: action,
addMessage: action,
addStatusUpdate: action,
dispose: action,
});
this.name = name;
}
get messageCount() {
return this.messages.length;
}
get peopleCount() {
return this.people.size;
}
get lastMessage() {
if (this.messages.length === 0) {
return null;
}
return this.messages[this.messages.length - 1];
}
get members() {
return Array.from(this.people.values());
}
addPerson(person) {
if (!this.people.has(person.id)) {
this.people.set(person.id, person);
person.addRoom(this);
}
}
removePerson(personId) {
const person = this.people.get(personId);
if (person) {
person.removeRoom(this);
this.people.delete(personId);
}
}
addMessage(message) {
this.messages.push(message);
message.author.setLastMessage(message);
}
addStatusUpdate(person, status) {
this.roomUpdates.push(`${person.name} is now ${status}`);
if (this.roomUpdates.length > MAX_ROOM_UPDATES * 2)
this.roomUpdates = this.roomUpdates.slice(MAX_ROOM_UPDATES);
}
dispose(notifications) {
this.people.forEach(person => person.removeRoom(this));
if (notifications) {
notifications.removeRoom(this.name);
}
}
}

163
mobx/src/test.mjs Normal file
View file

@ -0,0 +1,163 @@
import { autorun } from "mobx";
import { Person } from "./Person.mjs";
import { Room } from "./Room.mjs";
import { Message } from "./Message.mjs";
import { Notifications } from "./Notifications.mjs";
function assert(condition) {
if (!condition) throw new Error("Assertion failure");
}
export function runTest() {
const logs = [];
const customLog = (...args) => logs.push(args.join(" "));
// --- Setup ---
const techRoom = new Room("Tech Talk");
const generalRoom = new Room("General Chat");
const largeRoom = new Room("Large Meeting Room");
const alice = new Person(1, "Alice");
const bob = new Person(2, "Bob");
techRoom.addPerson(alice);
techRoom.addPerson(bob);
generalRoom.addPerson(alice);
const rooms = [techRoom, generalRoom, largeRoom];
const notifications = new Notifications(rooms);
// --- Large Room Setup ---
customLog("\n--- Setting up Large Meeting Room ---");
const largeRoomMembers = [];
for (let i = 3; i < 203; i++) {
const person = new Person(i, `Person ${i}`);
largeRoomMembers.push(person);
largeRoom.addPerson(person);
}
customLog(`[INFO] Added ${largeRoom.peopleCount} members to the large room.`);
// Add Alice and Bob to the large room
largeRoom.addPerson(alice);
largeRoom.addPerson(bob);
customLog("[INFO] Added Alice and Bob to the Large Meeting Room.");
// Verify Person.rooms with Set
assert(alice.rooms.size === 3);
assert(
alice.rooms.has(techRoom) &&
alice.rooms.has(generalRoom) &&
alice.rooms.has(largeRoom)
);
assert(
bob.rooms.size === 2 && bob.rooms.has(techRoom) && bob.rooms.has(largeRoom)
);
customLog("[PASS] Verified Person.rooms associations with Set.");
// --- autorun for global notifications ---
const notificationsDisposer = autorun(() => {
customLog("\n--- Global Notifications (Last Messages) ---");
if (notifications.lastMessages.size === 0) {
customLog("No messages yet.");
} else {
notifications.lastMessages.forEach((message, roomName) => {
customLog(`[${roomName}] "${message.text}" - ${message.author.name}`);
});
}
customLog("------------------------------------------");
});
// --- autorun for room updates ---
const roomUpdatesDisposer = autorun(() => {
rooms.forEach((room) => {
if (room.roomUpdates.length > 0) {
customLog(
`[${room.name} Update] ${
room.roomUpdates[room.roomUpdates.length - 1]
}`
);
}
});
});
// --- Status Update Scenario ---
customLog("\n--- Status Update Scenario ---");
alice.setStatus("Away");
assert(techRoom.roomUpdates.includes("Alice is now Away"));
assert(generalRoom.roomUpdates.includes("Alice is now Away"));
assert(largeRoom.roomUpdates.includes("Alice is now Away"));
customLog(
"[PASS] Verified that status updates are sent to all of Alice's rooms."
);
bob.setStatus("Busy");
assert(techRoom.roomUpdates.includes("Bob is now Busy"));
assert(!generalRoom.roomUpdates.includes("Bob is now Busy"));
assert(largeRoom.roomUpdates.includes("Bob is now Busy"));
customLog(
"[PASS] Verified that status updates are only sent to Bob's rooms."
);
// --- Messaging and Verification ---
customLog("\n--- Sending Messages & Verifying Notifications ---");
// Message 1: Tech Room
const msg1 = new Message("First message to Tech Talk!", alice);
techRoom.addMessage(msg1);
assert(notifications.lastMessages.get("Tech Talk") === msg1);
customLog("[PASS] Verified Tech Talk notification.");
// Message 2: General Chat
for (let i = 0; i < 20; i++) {
const msg2 = new Message(`ping ${i}`, alice);
generalRoom.addMessage(msg2);
assert(notifications.lastMessages.get("General Chat") === msg2);
}
customLog("[PASS] Verified General Chat notification.");
// Message 3: Large Meeting Room
for (let i = 0; i <= 5; i++) {
for (const member of largeRoomMembers) {
const msg = new Message(`Hi, I am ${member.name}`, member);
largeRoom.addMessage(msg);
assert(largeRoom.lastMessage == msg);
assert(notifications.lastMessages.get("Large Meeting Room") === msg);
}
}
customLog("[PASS] Verified Large Meeting Room notification.");
// Message 4: Tech Room again
for (let i = 0; i < 20; i++) {
const msg4 = new Message(`ping ${i}`, bob);
techRoom.addMessage(msg4);
assert(notifications.lastMessages.get("Tech Talk") === msg4);
}
customLog("[PASS] Verified Tech Talk notification update.");
const tempRooms = [];
for (let i = 0; i < 10; i++) {
const roomId = `General Chat ${i}`;
const tempRoom = new Room(roomId);
tempRooms.push(tempRoom);
notifications.addRoom(tempRoom);
for (const person of largeRoomMembers.slice(0, 10)) {
tempRoom.addPerson(person);
}
for (const person of tempRoom.members.slice(0, 5)) {
const msg = new Message(`ping ${i}`, person);
tempRoom.addMessage(msg);
assert(notifications.lastMessages.get(roomId) === msg);
}
}
tempRooms.forEach((room) => room.dispose(notifications));
// --- Clean up ---
notificationsDisposer();
roomUpdatesDisposer(); // Added disposer for room updates
techRoom.dispose(notifications);
generalRoom.dispose(notifications);
largeRoom.dispose(notifications);
return logs;
}

64
mobx/webpack.config.mjs Normal file
View file

@ -0,0 +1,64 @@
import path from "path";
import { fileURLToPath } from "url";
import TerserPlugin from "terser-webpack-plugin";
import { LicenseFilePlugin } from "generate-license-file-webpack-plugin";
import CacheBusterCommentPlugin from "../startup-helper/BabelCacheBuster.mjs";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
function config({ filename, minify, target }) {
return {
entry: "./src/test.mjs",
mode: "production",
devtool: "source-map",
target: ["web", target],
output: {
path: path.resolve(__dirname, "dist"),
filename: filename,
library: {
name: "MobXBenchmark",
type: "globalThis",
},
libraryTarget: "assign",
chunkFormat: "commonjs",
},
module: {
rules: [
{
test: /\.m?js$/,
use: {
loader: "babel-loader",
options: {
plugins: [CacheBusterCommentPlugin],
},
},
},
],
},
plugins: [new LicenseFilePlugin({
outputFileName: "LICENSE.txt",
})],
optimization: {
minimizer: [
new TerserPlugin({
terserOptions: {
mangle: minify,
format: {
// Keep this comment for cache-busting.
comments: /ThouShaltNotCache/i,
},
},
}),
],
},
};
}
export default [
config({ filename: "bundle.es6.min.js", minify: true, target: "es6" }),
config({ filename: "bundle.es6.js", minify: false, target: "es6" }),
config({ filename: "bundle.es5.min.js", minify: true, target: "es5" }),
config({ filename: "bundle.es5.js", minify: false, target: "es5" }),
];

19
package-lock.json generated
View file

@ -25,7 +25,7 @@
"jsvu": "^2.5.1",
"local-web-server": "^5.4.0",
"prettier": "^2.8.8",
"selenium-webdriver": "^4.35.0"
"selenium-webdriver": "^4.36.0"
},
"engines": {
"node": ">=22.0.0",
@ -5386,9 +5386,9 @@
"dev": true
},
"node_modules/selenium-webdriver": {
"version": "4.35.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.35.0.tgz",
"integrity": "sha512-Baaeiuyu7BIIsSYf0SI7Mi55gsNmdI00KM0Hcofw1RnAY+0QEVpdh5yAxueDxgTZS8vcbGZFU0NJ6Qc1riIrLg==",
"version": "4.36.0",
"resolved": "https://registry.npmjs.org/selenium-webdriver/-/selenium-webdriver-4.36.0.tgz",
"integrity": "sha512-rZGqjXiqNVL6QNqKNEk5DPaIMPbvApcmAS9QsXyt5wT3sfTSHGCh4AX/YKeDTOwei1BOZDlPOKBd82WCosUt9w==",
"dev": true,
"funding": [
{
@ -5404,8 +5404,8 @@
"dependencies": {
"@bazel/runfiles": "^6.3.1",
"jszip": "^3.10.1",
"tmp": "^0.2.3",
"ws": "^8.18.2"
"tmp": "^0.2.5",
"ws": "^8.18.3"
},
"engines": {
"node": ">= 20.0.0"
@ -6076,10 +6076,11 @@
}
},
"node_modules/tmp": {
"version": "0.2.3",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz",
"integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==",
"version": "0.2.5",
"resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.5.tgz",
"integrity": "sha512-voyz6MApa1rQGUxT3E+BK7/ROe8itEx7vD8/HEvt4xwXucvQ5G5oeEiHkmHZJuBO21RpOf+YYm9MOivj709jow==",
"dev": true,
"license": "MIT",
"engines": {
"node": ">=14.14"
}

View file

@ -15,14 +15,15 @@
},
"license": "SEE LICENSE IN LICENSE",
"scripts": {
"server": "node tests/server.mjs",
"compress": "node utils/compress.mjs",
"decompress": "node utils/compress.mjs --decompress --keep ",
"lint:check": "eslint **/*.{js,mjs,jsx,ts,tsx}",
"pretty:check": "prettier --check ./",
"pretty:format": "prettier --write ./",
"format:check": "npm run pretty:check && npm run lint:check",
"test:prepare": "npm run decompress -- --quiet",
"prepare": "node utils/version-check.mjs",
"server": "npm run prepare --silent && node tests/server.mjs",
"compress": "npm run prepare --silent && node utils/compress.mjs",
"decompress": "npm run prepare --silent && node utils/compress.mjs --decompress --keep ",
"lint:check": "npm run prepare --silent && eslint **/*.{js,mjs,jsx,ts,tsx}",
"pretty:check": "npm run prepare --silent && prettier --check ./",
"pretty:format": "npm run prepare --silent && prettier --write ./",
"format:check": "npm run prepare --silent && npm run pretty:check && npm run lint:check",
"test:prepare": "npm run prepare --silent && npm run decompress -- --quiet",
"test:chrome": "npm run test:prepare && node tests/run-browser.mjs --browser chrome",
"test:firefox": "npm run test:prepare && node tests/run-browser.mjs --browser firefox",
"test:safari": "npm run test:prepare && node tests/run-browser.mjs --browser safari",
@ -30,7 +31,8 @@
"test:shell": "npm run test:prepare && npm run test:v8 && npm run test:jsc && npm run test:spidermonkey",
"test:v8": "npm run test:prepare && node tests/run-shell.mjs --shell v8",
"test:jsc": "npm run test:prepare && node tests/run-shell.mjs --shell jsc",
"test:spidermonkey": "npm run test:prepare && node tests/run-shell.mjs --shell spidermonkey"
"test:spidermonkey": "npm run test:prepare && node tests/run-shell.mjs --shell spidermonkey",
"test:build": "npm run test:prepare && node tests/run-build.mjs"
},
"devDependencies": {
"@actions/core": "^1.11.1",
@ -46,7 +48,7 @@
"jsvu": "^2.5.1",
"local-web-server": "^5.4.0",
"prettier": "^2.8.8",
"selenium-webdriver": "^4.35.0"
"selenium-webdriver": "^4.36.0"
},
"dependencies": {
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1"

23
prismjs/dist/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,23 @@
prismjs
MIT
MIT LICENSE
Copyright (c) 2012 Lea Verou
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.es5.js.LICENSE.txt */
!function(){var __webpack_modules__={19:function(){!function(Prism){
/*ThouShaltNotCache*/
var inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(pattern){

View file

@ -1,8 +0,0 @@
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.es5.min.js.LICENSE.txt */
!function(){var e={19:function(){!function(e){
/*ThouShaltNotCache*/
var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){

View file

@ -1,8 +0,0 @@
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.es6.js.LICENSE.txt */
(()=>{var __webpack_modules__={19:()=>{!function(Prism){
/*ThouShaltNotCache*/
var inner=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function createInline(pattern){

View file

@ -1,8 +0,0 @@
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.es6.min.js.LICENSE.txt */
(()=>{var e={19:()=>{!function(e){
/*ThouShaltNotCache*/
var t=/(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;function n(e){

View file

@ -1,8 +0,0 @@
/**
* Prism: Lightweight, robust, elegant syntax highlighting
*
* @license MIT <https://opensource.org/licenses/MIT>
* @author Lea Verou <https://lea.verou.me>
* @namespace
* @public
*/

File diff suppressed because one or more lines are too long

View file

@ -12,6 +12,7 @@
"@babel/core": "^7.28.3",
"@dapplets/unicode-escape-webpack-plugin": "github:dapplets/unicode-escape-webpack-plugin",
"babel-loader": "^10.0.0",
"license-webpack-plugin": "^4.0.2",
"prismjs": "^1.30.0",
"terser-webpack-plugin": "^5.3.14",
"webpack": "^5.101.3",
@ -1170,6 +1171,23 @@
"node": ">=0.10.0"
}
},
"node_modules/license-webpack-plugin": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz",
"integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==",
"license": "ISC",
"dependencies": {
"webpack-sources": "^3.0.0"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
},
"webpack-sources": {
"optional": true
}
}
},
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",

View file

@ -5,6 +5,7 @@
"scripts": {
"test": "node ./benchmark-node.mjs",
"clean": "rm -rf dist/*",
"prebuild": "npm run clean",
"build": "webpack"
},
"author": "",
@ -14,6 +15,7 @@
"@babel/core": "^7.28.3",
"@dapplets/unicode-escape-webpack-plugin": "github:dapplets/unicode-escape-webpack-plugin",
"babel-loader": "^10.0.0",
"license-webpack-plugin": "^4.0.2",
"prismjs": "^1.30.0",
"terser-webpack-plugin": "^5.3.14",
"webpack": "^5.101.3",

View file

@ -1,8 +1,9 @@
import path from "path";
import { fileURLToPath } from "url";
import TerserPlugin from "terser-webpack-plugin";
import CacheBusterCommentPlugin from "../startup-helper/BabelCacheBuster.mjs";
import CacheBusterCommentPlugin from "../utils/BabelCacheBuster.mjs";
import UnicodeEscapePlugin from "@dapplets/unicode-escape-webpack-plugin";
import { LicenseWebpackPlugin } from "license-webpack-plugin";
const __dirname = path.dirname(fileURLToPath(import.meta.url));
@ -39,6 +40,10 @@ function config({ filename, minify, target }) {
new UnicodeEscapePlugin({
test: /\.(js|jsx|ts|tsx)$/, // Escape Unicode in JavaScript and TypeScript files
}),
new LicenseWebpackPlugin({
perChunkOutput: true,
outputFilename: "LICENSE.txt",
})
],
resolve: {
fallback: {},
@ -46,6 +51,7 @@ function config({ filename, minify, target }) {
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
mangle: minify,
format: {

View file

@ -49,7 +49,6 @@ module.exports = async function doxbee(stream, idOrPath) {
const previousId = file ? file.version : null;
const version = {
userAccountId: fakes.userAccount.id,
date: new Date(),
blobId: blobId,
creatorId: fakes.userAccount.id,
previousId: previousId

View file

@ -55,7 +55,6 @@ module.exports = function doxbee(stream, idOrPath) {
const previousId = file ? file.version : null;
version = {
userAccountId: fakes.userAccount.id,
date: new Date(),
blobId: blobId,
creatorId: fakes.userAccount.id,
previousId: previousId
@ -65,8 +64,8 @@ module.exports = function doxbee(stream, idOrPath) {
})
.then(_ => {
if (!file) {
const splitPath = idOrPath.split("/");
const fileName = splitPath[splitPath.length - 1];
const splitPath = idOrPath.lastIndexOf("/") + 1;
const fileName = idOrPath.substring(splitPath);
const newId = fakes.uuid.v1();
return fakes.self
.createQuery(idOrPath, {

View file

@ -1,8 +1,32 @@
import { styleText } from "node:util";
import core from "@actions/core";
import commandLineUsage from "command-line-usage";
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
export const GITHUB_ACTIONS_OUTPUT = "GITHUB_ACTIONS_OUTPUT" in process.env;
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
import core from "@actions/core";
import { spawn } from "child_process";
import commandLineUsage from "command-line-usage";
import { styleText } from "node:util";
export const GITHUB_ACTIONS_OUTPUT = ("GITHUB_ACTIONS_OUTPUT" in process.env) || ("GITHUB_EVENT_PATH" in process.env);
export function logInfo(...args) {
const text = args.join(" ")
@ -30,6 +54,16 @@ export function logError(...args) {
}
}
export function logCommand(...args) {
const cmd = args.join(" ");
if (GITHUB_ACTIONS_OUTPUT) {
core.notice(styleText("blue", cmd));
} else {
console.log(styleText("blue", cmd));
}
}
export async function logGroup(name, body) {
if (GITHUB_ACTIONS_OUTPUT) {
core.startGroup(name);
@ -80,3 +114,49 @@ export async function runTest(label, testFunction) {
}
return true;
}
export async function sh(binary, ...args) {
const cmd = `${binary} ${args.join(" ")}`;
if (GITHUB_ACTIONS_OUTPUT)
core.startGroup(binary);
logCommand(cmd);
try {
return await spawnCaptureStdout(binary, args);
} catch(e) {
logError(e.stdoutString);
throw e;
} finally {
if (GITHUB_ACTIONS_OUTPUT)
core.endGroup();
}
}
const SPAWN_OPTIONS = Object.freeze({
stdio: ["inherit", "pipe", "inherit"]
});
async function spawnCaptureStdout(binary, args, options={}) {
options = Object.assign(options, SPAWN_OPTIONS);
const childProcess = spawn(binary, args, options);
childProcess.stdout.pipe(process.stdout);
return new Promise((resolve, reject) => {
childProcess.stdoutString = "";
childProcess.stdio[1].on("data", (data) => {
childProcess.stdoutString += data.toString();
});
childProcess.on("close", (code) => {
if (code === 0) {
resolve(childProcess);
} else {
// Reject the Promise with an Error on failure
const error = new Error(`Command failed with exit code ${code}: ${binary} ${args.join(" ")}`);
error.process = childProcess;
error.stdout = childProcess.stdoutString;
error.exitCode = code;
reject(error);
}
});
childProcess.on("error", reject);
})
}

View file

@ -1,18 +1,49 @@
#! /usr/bin/env node
/* eslint-disable-next-line no-unused-vars */
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
import serve from "./server.mjs";
import { Builder, Capabilities } from "selenium-webdriver";
import { Builder, Capabilities, logging } from "selenium-webdriver";
import commandLineArgs from "command-line-args";
import { promises as fs } from "fs";
import path from "path";
import os from "os";
import {logInfo, logError, printHelp, runTest} from "./helper.mjs";
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
const optionDefinitions = [
{ name: "browser", type: String, description: "Set the browser to test, choices are [safari, firefox, chrome, edge]. By default the $BROWSER env variable is used." },
{ name: "port", type: Number, defaultValue: 8010, description: "Set the test-server port, The default value is 8010." },
{ name: "help", alias: "h", description: "Print this help text." },
];
const options = commandLineArgs(optionDefinitions);
if ("help" in options)
@ -26,6 +57,7 @@ let capabilities;
switch (BROWSER) {
case "safari":
capabilities = Capabilities.safari();
capabilities.set("safari:diagnose", true);
break;
case "firefox": {
@ -78,6 +110,7 @@ async function runEnd2EndTest(name, params) {
async function testEnd2End(params) {
const driver = await new Builder().withCapabilities(capabilities).build();
const sessionId = (await driver.getSession()).getId();
const driverCapabilities = await driver.getCapabilities();
logInfo(`Browser: ${driverCapabilities.getBrowserName()} ${driverCapabilities.getBrowserVersion()}`);
const urlParams = Object.assign({
@ -85,6 +118,7 @@ async function testEnd2End(params) {
iterationCount: 3
}, params);
let results;
let success = true;
try {
const url = new URL(`http://localhost:${PORT}/index.html`);
url.search = new URLSearchParams(urlParams).toString();
@ -102,9 +136,15 @@ async function testEnd2End(params) {
results = await benchmarkResults(driver);
// FIXME: validate results;
} catch(e) {
success = false;
throw e;
} finally {
driver.quit();
await driver.quit();
if (BROWSER === "safari")
await sleep(1000);
if (!success) {
await printLogs(sessionId);
}
}
}
@ -128,7 +168,6 @@ class JetStreamTestError extends Error {
super(`Tests failed: ${errors.map(e => e.stack).join(", ")}`);
this.errors = errors;
}
}
const UPDATE_INTERVAL = 250;
@ -163,4 +202,28 @@ function logIncrementalResult(previousResults, benchmarkResults) {
}
}
function printLogs(sessionId) {
if (BROWSER === "safari" && sessionId)
return printSafariLogs(sessionId);
}
async function printSafariLogs(sessionId) {
const sessionLogDir = path.join(os.homedir(), "Library", "Logs", "com.apple.WebDriver", sessionId);
try {
const files = await fs.readdir(sessionLogDir);
const logFiles = files.filter(f => f.startsWith("safaridriver.") && f.endsWith(".txt"));
if (logFiles.length === 0) {
logInfo(`No safaridriver log files found in session directory: ${sessionLogDir}`);
return;
}
for (const file of logFiles) {
const logPath = path.join(sessionLogDir, file);
const logContent = await fs.readFile(logPath, "utf8");
logGroup(`SafariDriver Log: ${file}`, () => console.log(logContent));
}
} catch (err) {
logError("Error reading SafariDriver logs:", err);
}
}
setImmediate(runTests);

104
tests/run-build.mjs Normal file
View file

@ -0,0 +1,104 @@
#! /usr/bin/env node
import commandLineArgs from "command-line-args";
import fs from "fs";
import { fileURLToPath } from "url";
import path from "path";
import { logError, logCommand, printHelp, runTest, sh, logInfo } from "./helper.mjs";
const FILE_PATH = fileURLToPath(import.meta.url);
const SRC_DIR = path.dirname(path.dirname(FILE_PATH));
const optionDefinitions = [
{ name: "help", alias: "h", description: "Print this help text." },
{ name: "diff", type: String, description: "A git commit range to determine which builds to run (e.g. main...HEAD)." },
];
const options = commandLineArgs(optionDefinitions);
if ("help" in options)
printHelp(optionDefinitions);
if (options.diff) {
const { stdoutString } = await sh("git", "diff", "--name-only", options.diff);
const changedDirs = new Set();
const changedFiles = stdoutString.trim().split("\n");
for (const file of changedFiles) {
let currentDir = path.dirname(file)
while (currentDir !== ".") {
changedDirs.add(path.join(SRC_DIR, currentDir));
currentDir = path.dirname(currentDir);
}
}
options.changedDirs = changedDirs;
} else {
options.changedDirs = undefined;
}
async function findPackageJsonFiles(dir, accumulator=[]) {
const dirEntries = fs.readdirSync(dir, { withFileTypes: true });
for (const dirent of dirEntries) {
if (dirent.name === "node_modules" || dirent.name === ".git")
continue;
const fullPath = path.join(dir, dirent.name);
if (dirent.isDirectory())
findPackageJsonFiles(fullPath, accumulator);
else if (dirent.name === "package.json")
accumulator.push(fullPath)
}
return accumulator;
}
async function runBuilds() {
const packageJsonFiles = await findPackageJsonFiles(SRC_DIR);
let success = true;
logInfo(`Found ${packageJsonFiles.length} package.json files`);
let filteredPackageJsonFiles = packageJsonFiles;
if (options.changedDirs?.size === 0) {
logInfo("No file changes detected, skipping all");
}
if (options.changedDirs?.size > 0) {
filteredPackageJsonFiles = packageJsonFiles.filter(file => {
const dir = path.dirname(file);
return options.changedDirs.has(dir);
});
logInfo(`Found ${filteredPackageJsonFiles.length} modified package.json files to build`);
}
for (const file of filteredPackageJsonFiles) {
const content = fs.readFileSync(file, "utf-8");
const packageJson = JSON.parse(content);
if (!packageJson.scripts?.build) {
continue;
}
const dir = path.dirname(file);
const relativeDir = path.relative(SRC_DIR, dir);
const testName = `Building ./${relativeDir}:`;
const buildTask = async () => {
const oldCWD = process.cwd();
try {
logCommand("cd", dir);
process.chdir(dir);
await sh("npm", "ci");
await sh("npm", "run", "build");
} finally {
process.chdir(oldCWD);
await sh("git", "reset", "--hard");
}
};
success &&= await runTest(testName, buildTask);
}
if (!success) {
logError("One or more builds failed.");
process.exit(1);
}
}
setImmediate(runBuilds);

View file

@ -1,15 +1,35 @@
#! /usr/bin/env node
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
import commandLineArgs from "command-line-args";
import { spawn } from "child_process";
import { fileURLToPath } from "url";
import { styleText } from "node:util";
import * as path from "path";
import * as fs from "fs";
import * as os from "os";
import core from "@actions/core";
import * as path from "path";
import { fileURLToPath } from "url";
import {logInfo, logError, logGroup, printHelp, runTest, GITHUB_ACTIONS_OUTPUT} from "./helper.mjs";
import { logGroup, logInfo, printHelp, runTest, sh } from "./helper.mjs";
const optionDefinitions = [
{ name: "shell", type: String, description: "Set the shell to test, choices are [jsc, v8, spidermonkey]." },
@ -55,55 +75,6 @@ function convertCliArgs(cli, ...cliArgs) {
}
const SPAWN_OPTIONS = {
stdio: ["inherit", "inherit", "inherit"]
};
async function sh(binary, ...args) {
const cmd = `${binary} ${args.join(" ")}`;
if (GITHUB_ACTIONS_OUTPUT) {
core.startGroup(binary);
core.notice(styleText("blue", cmd));
} else {
console.log(styleText("blue", cmd));
}
try {
const result = await spawnCaptureStdout(binary, args, SPAWN_OPTIONS);
if (result.status || result.error) {
logError(result.error);
throw new Error(`Shell CMD failed: ${binary} ${args.join(" ")}`);
}
return result;
} finally {
if (GITHUB_ACTIONS_OUTPUT)
core.endGroup();
}
}
async function spawnCaptureStdout(binary, args) {
const childProcess = spawn(binary, args);
childProcess.stdout.pipe(process.stdout);
return new Promise((resolve, reject) => {
childProcess.stdoutString = "";
childProcess.stdio[1].on("data", (data) => {
childProcess.stdoutString += data.toString();
});
childProcess.on('close', (code) => {
if (code === 0) {
resolve(childProcess);
} else {
// Reject the Promise with an Error on failure
const error = new Error(`Command failed with exit code ${code}: ${binary} ${args.join(" ")}`);
error.process = childProcess;
error.stdout = childProcess.stdoutString;
error.exitCode = code;
reject(error);
}
});
childProcess.on('error', reject);
})
}
async function runTests() {
const shellBinary = await logGroup(`Installing JavaScript Shell: ${SHELL_NAME}`, testSetup);
let success = true;

View file

@ -1,3 +1,26 @@
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
// Simple local server
import * as path from "path";
import commandLineArgs from "command-line-args";

View file

@ -1,6 +1,29 @@
load("shell-config.js");
load("params.js");
load("startup-helper/StartupBenchmark.js");
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
load("utils/shell-config.js");
load("utils/params.js");
load("utils/StartupBenchmark.js");
load("JetStreamDriver.js");
function assertTrue(condition, message) {
@ -28,7 +51,7 @@ function assertThrows(message, func) {
} catch (e) {
didThrow = true;
}
assertTrue(didThrow, message);
assertTrue(didThrow, `Test did not throw: ${message}`);
}
(function testTagsAreLowerCaseStrings() {
@ -51,6 +74,23 @@ function assertThrows(message, func) {
}
})();
(function tagsAreNotBenchmarkNames() {
const benchmarkNames = new Set(BENCHMARKS.map(e => e.name));
for (const benchmark of benchmarks) {
for (const tag of benchmark.tags) {
assertFalse(benchmarkNames.has(tag), `'${tag}' is also a benchmark name`);
}
}
})();
(function tagsHasWasmOrJS() {
for (const benchmark of benchmarks) {
const tags = benchmark.tags;
assertTrue(tags.has("wasm") || tags.has("js"), `'${benchmark.name}' has no 'js' or 'wasm' tag`);
}
})();
(function testDriverBenchmarksOrder() {
const benchmarks = findBenchmarksByTag("all");
const driver = new Driver(benchmarks);
@ -259,3 +299,46 @@ async function testStartupBenchmarkInnerTests() {
}
);
})();
(function testDefaultParams() {
assertTrue(DefaultJetStreamParams.isDefault);
assertTrue(Object.isFrozen(DefaultJetStreamParams));
assertEquals(Object.entries(DefaultJetStreamParams.nonDefaultParams).length, 0);
})();
(function testCustomParamsSingle() {
const sourceParams = new Map(Object.entries({ developerMode: "true" }));
const params = new Params(sourceParams);
assertFalse(params.isDefault);
const nonDefaults = params.nonDefaultParams;
assertEquals(Object.entries(nonDefaults).length, 1);
assertEquals(nonDefaults.developerMode, true);
})();
(function testCustomParamsMultiple() {
const sourceParams = new Map(Object.entries({ iterationCount: 123, test: "wasm,js"}));
const params = new Params(sourceParams);
assertFalse(params.isDefault);
const nonDefaults = params.nonDefaultParams;
assertEquals(Object.entries(nonDefaults).length, 2);
assertEquals(nonDefaults.testIterationCount, 123);
assertEquals(JSON.stringify(nonDefaults.testList), JSON.stringify(["wasm", "js"]));
})();
(function testParseIterationCount() {
assertThrows("Cannot parse negative iterationCounts",
() => {
const sourceParams = new Map(Object.entries({ iterationCount: -123, }));
new Params(sourceParams);
});
assertThrows("Cannot parse multiple iterationCounts",
() => {
const sourceParams = new Map(Object.entries({ iterationCount: 123, testIterationCount: 10 }));
new Params(sourceParams);
});
let sourceParams = new Map(Object.entries({ iterationCount: 123 }));
let params = new Params(sourceParams);
assertEquals(params.testIterationCount, 123);
})();

View file

@ -67,7 +67,14 @@ class StartupBenchmark {
}
async init() {
if (!JetStream.preload.BUNDLE) {
throw new Error("Missing JetStream.preload.BUNDLE");
}
this.#sourceCode = await JetStream.getString(JetStream.preload.BUNDLE);
if (!this.sourceCode || !this.sourceCode.length) {
throw new Error("Couldn't load JetStream.preload.BUNDLE");
}
const cacheCommentCount = this.sourceCode.match(
CACHE_BUST_COMMENT_RE
).length;

View file

@ -1,11 +1,34 @@
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
import commandLineArgs from 'command-line-args';
import commandLineUsage from 'command-line-usage';
import { globSync, globIterate } from 'glob';
import { globSync } from 'glob';
import zlib from 'zlib';
import fs from 'fs';
import path from 'path';
let log = console.log
function parseCommandLineArgs() {
@ -13,7 +36,7 @@ function parseCommandLineArgs() {
{ name: 'decompress', alias: 'd', type: Boolean, description: 'Decompress files (default: compress).' },
{ name: 'keep', alias: 'k', type: Boolean, description: 'Keep input files after processing (default: delete).' },
{ name: 'help', alias: 'h', type: Boolean, description: 'Print this usage guide.' },
{ name: 'quiet', alias: 'q', type: Boolean, description: 'Quite output, only print errors.' },
{ name: 'quiet', alias: 'q', type: Boolean, description: 'Quite output, only print errors.' },
{ name: 'globs', type: String, multiple: true, defaultOption: true, description: 'Glob patterns of files to process.' },
];
const options = commandLineArgs(optionDefinitions);
@ -52,7 +75,6 @@ function parseCommandLineArgs() {
process.exit(1);
}
}
return options;
}
@ -90,32 +112,29 @@ function decompress(inputData) {
return decompressedData;
}
async function* globsToFiles(globs) {
let files = new Set();
console.assert(globs.length > 0);
function globsToFiles(globs) {
let files = [];
console.assert(globs.length > 0) ;
const globtions = { nodir: true, ignore: '**/node_modules/**' };
for (const glob of globs) {
for await (const file of globIterate(glob, globtions)) {
if (files.has(file))
continue;
files.add(file)
yield file;
}
const matches = globSync(glob, globtions);
files = files.concat(matches);
}
files = Array.from(new Set(files)).sort();
return files;
}
async function processFiles(filesGenerator, isDecompress, keep) {
function processFiles(files, isDecompress, keep) {
const verb = isDecompress ? 'decompress' : 'compress';
const files = [];
log(`Found ${files.length} files to ${verb}` + (files.length ? ':' : '.'));
// For printing overall statistics at the end.
let totalInputSize = 0;
let totalOutputSize = 0;
for await (const inputFilename of filesGenerator) {
files.push(inputFilename);
for (const inputFilename of files) {
try {
log(inputFilename);
console.log(inputFilename);
let outputFilename;
if (isDecompress) {
if (path.extname(inputFilename) !== '.z') {
@ -151,7 +170,6 @@ async function processFiles(filesGenerator, isDecompress, keep) {
}
if (files.length > 1) {
log(`Found ${files.length} files to ${verb}` + (files.length ? ':' : '.'));
if (isDecompress) {
const totalExpansionRatio = calculateExpansionRatio(totalInputSize, totalOutputSize);
log(`Total compressed sizes: ${String(totalInputSize).padStart(9)} bytes`);

View file

@ -75,21 +75,43 @@ class Params {
this.customPostIterationCode = this._parseStringParam(sourceParams, "customPostIterationCode");
this.startDelay = this._parseIntParam(sourceParams, "startDelay", 0);
if (this.report && !this.startDelay)
this.startDelay = 4000;
for (const paramKey of ["tag", "tags", "test", "tests"]) {
this.testList = this._parseTestListParam(sourceParams, paramKey);
if (!this.startDelay) {
if (this.report)
this.startDelay = 4000;
if (this.startAutomatically)
this.startDelay = 100;
}
this.testIterationCount = this._parseIntParam(sourceParams, "iterationCount", 1);
this.testWorstCaseCount = this._parseIntParam(sourceParams, "worstCaseCount", 1);
this.testList = this._parseOneOf(sourceParams, ["testList", "tag", "tags", "test", "tests"], this._parseTestListParam);
this.testIterationCount = this._parseOneOf(sourceParams, ["testIterationCount", "iterationCount", "iterations" ], this._parseIntParam, 1);
this.testWorstCaseCount = this._parseOneOf(sourceParams, ["testWorstCaseCount", "worstCaseCount", "worst"], this._parseIntParam, 1);
const unused = Array.from(sourceParams.keys());
if (unused.length > 0)
console.error("Got unused source params", unused);
}
_parseOneOf(sourceParams, paramKeys, parseFunction, ...args) {
const defaultParamKey = paramKeys[0]
let result = undefined;
let parsedParamKey = undefined;
for (const paramKey of paramKeys) {
if (!sourceParams.has(paramKey)) {
continue;
}
const parseResult = parseFunction.call(this, sourceParams, paramKey, ...args);
if (parsedParamKey) {
throw new Error(`Cannot parse ${paramKey}, overriding previous "${parsedParamKey}" value ${JSON.stringify(result)} with ${JSON.stringify(parseResult)}`)
}
parsedParamKey = paramKey;
result = parseResult;
}
if (!parsedParamKey) {
return DefaultJetStreamParams[defaultParamKey];
}
return result;
}
_parseTestListParam(sourceParams, key) {
if (!sourceParams.has(key))
return this.testList;
@ -104,9 +126,6 @@ class Params {
}
testList = testList.map(each => each.trim());
sourceParams.delete(key);
if (this.testList.length > 0 && testList.length > 0) {
throw new Error(`Overriding previous testList='${this.testList.join()}' with ${key} url-parameter.`);
}
return testList;
}
@ -121,8 +140,9 @@ class Params {
_parseBooleanParam(sourceParams, paramKey) {
if (!sourceParams.has(paramKey))
return DefaultJetStreamParams[paramKey];
const value = sourceParams.get(paramKey).toLowerCase();
const rawValue = sourceParams.get(paramKey);;
sourceParams.delete(paramKey);
const value = rawValue.toLowerCase();
return !(value === "false" || value === "0");
}
@ -151,9 +171,10 @@ class Params {
get nonDefaultParams() {
const diff = Object.create(null);
for (const [key, value] of Object.entries(this)) {
if (value !== DefaultJetStreamParams[key]) {
diff[key] = value;
}
const defaultValue = DefaultJetStreamParams[key]
if (value == defaultValue) continue;
if (value?.length == 0 && defaultValue?.length == 0) continue;
diff[key] = value;
}
return diff;
}
@ -164,6 +185,10 @@ let maybeCustomParams = DefaultJetStreamParams;
if (globalThis?.JetStreamParamsSource) {
try {
maybeCustomParams = new Params(globalThis?.JetStreamParamsSource);
// We might have parsed the same values again, do a poor-mans deep-equals:
if (JSON.stringify(maybeCustomParams) === JSON.stringify(DefaultJetStreamParams)) {
maybeCustomParams = DefaultJetStreamParams
}
} catch (e) {
console.error("Invalid Params", e, "\nUsing defaults as fallback:", maybeCustomParams);
}

47
utils/version-check.mjs Normal file
View file

@ -0,0 +1,47 @@
// Copyright (C) 2007-2025 Apple Inc. All rights reserved.
// Copyright (C) 2025 Google LLC
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions
// are met:
// 1. Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// 2. Redistributions in binary form must reproduce the above copyright
// notice, this list of conditions and the following disclaimer in the
// documentation and/or other materials provided with the distribution.
// THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
// BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
// THE POSSIBILITY OF SUCH DAMAGE.
import fs from "node:fs/promises";
import path from "node:path";
import { fileURLToPath } from "node:url";
const dirname = path.dirname(fileURLToPath(import.meta.url));
const projectRoot = path.join(dirname, "..");
const packageJsonPath = path.join(projectRoot, "package.json");
const packageJsonContent = await fs.readFile(packageJsonPath, "utf8");
const pkg = JSON.parse(packageJsonContent);
const nodeEngine = pkg.engines?.node;
// Regex to parse simple ">= MAJOR[.MINOR[.PATCH]]"
const match = nodeEngine.match(/>=?\s*(\d+)(\.\d+)?(\.\d+)?/);
const requiredMajor = parseInt(match[1]);
const currentMajor = parseInt(process.versions.node.split(".")[0]);
if (currentMajor < requiredMajor) {
console.error(
`❌ Error: Node.js v${requiredMajor} or higher require. expected: "${nodeEngine}", current: ${process.version}).`
);
process.exit(1);
}

22
validatorjs/dist/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,22 @@
validator
MIT
Copyright (c) 2018 Chris O'Hara <cohara87@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

View file

@ -1,8 +0,0 @@
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <https://feross.org>
* @license MIT
*/
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */

View file

@ -10,6 +10,7 @@
"dependencies": {
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1",
"buffer": "^6.0.3",
"license-webpack-plugin": "^4.0.2",
"process": "^0.11.10",
"validator": "^13.15.15",
"webpack": "^5.101.2",
@ -857,6 +858,23 @@
"node": ">=0.10.0"
}
},
"node_modules/license-webpack-plugin": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz",
"integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==",
"license": "ISC",
"dependencies": {
"webpack-sources": "^3.0.0"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
},
"webpack-sources": {
"optional": true
}
}
},
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",

View file

@ -5,11 +5,13 @@
"scripts": {
"test": "node benchmark-node.mjs",
"clean": "rm -rf dist/*",
"prebuild": "npm run clean",
"build": "webpack"
},
"dependencies": {
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1",
"buffer": "^6.0.3",
"license-webpack-plugin": "^4.0.2",
"process": "^0.11.10",
"validator": "^13.15.15",
"webpack": "^5.101.2",

View file

@ -1,6 +1,7 @@
import path from "path";
import { fileURLToPath } from "url";
import UnicodeEscapePlugin from "@dapplets/unicode-escape-webpack-plugin";
import { LicenseWebpackPlugin } from "license-webpack-plugin";
const __filename = fileURLToPath(import.meta.url);
@ -22,7 +23,13 @@ function config({ filename, minify }) {
libraryTarget: "assign",
chunkFormat: "commonjs",
},
plugins: [ new UnicodeEscapePlugin() ],
plugins: [
new UnicodeEscapePlugin(),
new LicenseWebpackPlugin({
perChunkOutput: true,
outputFilename: "LICENSE.txt",
})
],
optimization: {
minimize: minify,
},

View file

@ -85,13 +85,7 @@ function arrayBufferToBase64(buffer) {
}
function base64ToArrayBuffer(base64) {
var binary_string = atob(base64);
var len = binary_string.length;
var bytes = new Uint8Array(len);
for (var i = 0; i < len; i++) {
bytes[i] = binary_string.charCodeAt(i);
}
return bytes.buffer;
return Uint8Array.fromBase64(base64).buffer;
}
function equal(buf1, buf2) {

View file

@ -9,60 +9,25 @@ globalThis.console = {
globalThis.clearTimeout = function () { };
function quickHash(str) {
let hash = 5381;
let i = str.length;
while (i > 0) {
hash = (hash * 33) ^ (str.charCodeAt(i) | 0);
i-= 919;
}
return hash | 0;
}
const CACHE_BUST_COMMENT = "/*ThouShaltNotCache*/";
const CACHE_BUST_COMMENT_RE = new RegExp(`\n${RegExp.escape(CACHE_BUST_COMMENT)}\n`, "g");
// JetStream benchmark.
class Benchmark {
class Benchmark extends StartupBenchmark {
// How many times (separate iterations) should we reuse the source code.
// Use 0 to skip.
CODE_REUSE_COUNT = 1;
iterationCount = 0;
iteration = 0;
lastResult = {};
sourceCode;
sourceHash = 0
iterationSourceCodes = [];
constructor({ iterationCount }) {
this.iterationCount = iterationCount
constructor({iterationCount}) {
super({
iterationCount,
expectedCacheCommentCount: 597,
sourceCodeReuseCount: 1,
});
}
async init() {
this.sourceCode = await JetStream.getString(JetStream.preload.BUNDLE_BLOB);
this.expect("Cache Comment Count", this.sourceCode.match(CACHE_BUST_COMMENT_RE).length, 597);
for (let i = 0; i < this.iterationCount; i++)
this.iterationSourceCodes[i] = this.prepareCode(i);
}
prepareCode(iteration) {
if (!this.CODE_REUSE_COUNT)
return this.sourceCode;
// Alter the code per iteration to prevent caching.
const cacheId = Math.floor(iteration / this.CODE_REUSE_COUNT);
const previousSourceCode = this.iterationSourceCodes[cacheId];
if (previousSourceCode)
return previousSourceCode
const sourceCode = this.sourceCode.replaceAll(CACHE_BUST_COMMENT_RE, `/*${cacheId}*/`);
// Ensure efficient string representation.
this.sourceHash = quickHash(sourceCode);
return sourceCode;
}
runIteration() {
let sourceCode = this.iterationSourceCodes[this.iteration];
runIteration(iteration) {
let sourceCode = this.iterationSourceCodes[iteration];
if (!sourceCode)
throw new Error(`Could not find source for iteration ${this.iteration}`);
throw new Error(`Could not find source for iteration ${iteration}`);
// Module in sourceCode it assigned to the ReactRenderTest variable.
let ReactRenderTest;
@ -71,16 +36,15 @@ class Benchmark {
const runStart = performance.now();
this.lastResult = ReactRenderTest.renderTest();
this.lastResult.htmlHash = quickHash(this.lastResult.html);
this.lastResult.htmlHash = this.quickHash(this.lastResult.html);
const end = performance.now();
const loadTime = runStart - initStart;
const runTime = end - runStart;
// For local debugging:
// print(`Iteration ${this.iteration}:`);
// print(`Iteration ${iteration}:`);
// print(` Load time: ${loadTime.toFixed(2)}ms`);
// print(` Render time: ${runTime.toFixed(2)}ms`);
this.iteration++;
}
validate() {

315
web-ssr/dist/LICENSE.txt vendored Normal file
View file

@ -0,0 +1,315 @@
process
MIT
(The MIT License)
Copyright (c) 2013 Roman Shtylman <shtylman@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
react
MIT
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
react-dom
MIT
MIT License
Copyright (c) Meta Platforms, Inc. and affiliates.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
text-encoding
(Unlicense OR Apache-2.0)
The encoding indexes, algorithms, and many comments in the code
derive from the Encoding Standard https://encoding.spec.whatwg.org/
Otherwise, the code of this repository is released under the Unlicense
license and is also dual-licensed under an Apache 2.0 license. Both
are included below.
# Unlicense
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <http://unlicense.org/>
# Apache 2.0 License
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.js.LICENSE.txt */
(()=>{var __webpack_modules__={57:(module,__unused_webpack_exports,__webpack_require__)=>{"use strict";module.exports=__webpack_require__(158)},96:(__unused_webpack_module,exports,__webpack_require__)=>{"use strict";var MessageChannel=__webpack_require__(492).MessageChannel,TextEncoder=__webpack_require__(997).TextEncoder;function _typeof(o){/*ThouShaltNotCache*/return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){/*ThouShaltNotCache*/return typeof o}:function(o){/*ThouShaltNotCache*/return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},_typeof(o)}var React=__webpack_require__(57),ReactDOM=__webpack_require__(520);function formatProdErrorMessage(code){
/*ThouShaltNotCache*/
var url="https://react.dev/errors/"+code;if(1<arguments.length){url+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)url+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+code+"; visit "+url+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var REACT_ELEMENT_TYPE=Symbol.for("react.transitional.element"),REACT_PORTAL_TYPE=Symbol.for("react.portal"),REACT_FRAGMENT_TYPE=Symbol.for("react.fragment"),REACT_STRICT_MODE_TYPE=Symbol.for("react.strict_mode"),REACT_PROFILER_TYPE=Symbol.for("react.profiler"),REACT_PROVIDER_TYPE=Symbol.for("react.provider"),REACT_CONSUMER_TYPE=Symbol.for("react.consumer"),REACT_CONTEXT_TYPE=Symbol.for("react.context"),REACT_FORWARD_REF_TYPE=Symbol.for("react.forward_ref"),REACT_SUSPENSE_TYPE=Symbol.for("react.suspense"),REACT_SUSPENSE_LIST_TYPE=Symbol.for("react.suspense_list"),REACT_MEMO_TYPE=Symbol.for("react.memo"),REACT_LAZY_TYPE=Symbol.for("react.lazy"),REACT_SCOPE_TYPE=Symbol.for("react.scope"),REACT_ACTIVITY_TYPE=Symbol.for("react.activity"),REACT_LEGACY_HIDDEN_TYPE=Symbol.for("react.legacy_hidden"),REACT_MEMO_CACHE_SENTINEL=Symbol.for("react.memo_cache_sentinel"),REACT_VIEW_TRANSITION_TYPE=Symbol.for("react.view_transition"),MAYBE_ITERATOR_SYMBOL=Symbol.iterator,isArrayImpl=Array.isArray;function murmurhash3_32_gc(key,seed){

View file

@ -1,39 +0,0 @@
/**
* @license React
* react-dom-server-legacy.browser.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.
*/
/**
* @license React
* react-dom-server.browser.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.
*/
/**
* @license React
* react-dom.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.
*/
/**
* @license React
* react.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.
*/

File diff suppressed because one or more lines are too long

View file

@ -1,4 +1,3 @@
/*! For license information please see bundle.min.js.LICENSE.txt */
(()=>{var l={57:(l,n,u)=>{"use strict";l.exports=u(158)},96:(l,n,u)=>{"use strict";var e=u(492).MessageChannel,t=u(997).TextEncoder;function r(l){/*ThouShaltNotCache*/return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(l){/*ThouShaltNotCache*/return typeof l}:function(l){/*ThouShaltNotCache*/return l&&"function"==typeof Symbol&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},r(l)}var a=u(57),o=u(520);function s(l){
/*ThouShaltNotCache*/
var n="https://react.dev/errors/"+l;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)n+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),g=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),b=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),S=Symbol.for("react.lazy"),w=Symbol.for("react.scope"),x=Symbol.for("react.activity"),P=Symbol.for("react.legacy_hidden"),C=Symbol.for("react.memo_cache_sentinel"),E=Symbol.for("react.view_transition"),R=Symbol.iterator,T=Array.isArray;function _(l,n){

View file

@ -1,39 +0,0 @@
/**
* @license React
* react-dom-server-legacy.browser.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.
*/
/**
* @license React
* react-dom-server.browser.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.
*/
/**
* @license React
* react-dom.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.
*/
/**
* @license React
* react.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.
*/

File diff suppressed because one or more lines are too long

View file

@ -14,10 +14,12 @@
"@babel/node": "^7.28.0",
"@babel/preset-env": "^7.28.0",
"@babel/preset-react": "^7.27.1",
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1",
"assert": "^2.1.0",
"babel-loader": "^10.0.0",
"babel-node": "^0.0.1-security",
"buffer": "^6.0.3",
"license-webpack-plugin": "^4.0.2",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^19.1.1",
@ -1641,6 +1643,12 @@
"node": ">=6.9.0"
}
},
"node_modules/@dapplets/unicode-escape-webpack-plugin": {
"version": "0.1.1",
"resolved": "https://registry.npmjs.org/@dapplets/unicode-escape-webpack-plugin/-/unicode-escape-webpack-plugin-0.1.1.tgz",
"integrity": "sha512-dBcrCWE6ZOOHD1XLe3raXk29CwQSJQCXYx8QNcCMvfG+cZ9tZh1h2OVV7D936pmues8OTm1KhjWeiZXbH30SAg==",
"license": "MIT"
},
"node_modules/@discoveryjs/json-ext": {
"version": "0.6.3",
"resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.6.3.tgz",
@ -3900,6 +3908,23 @@
"node": ">=0.10.0"
}
},
"node_modules/license-webpack-plugin": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/license-webpack-plugin/-/license-webpack-plugin-4.0.2.tgz",
"integrity": "sha512-771TFWFD70G1wLTC4oU2Cw4qvtmNrIw+wRvBtn+okgHl7slJVi7zfNcdmqDL72BojM30VNJ2UHylr1o77U37Jw==",
"license": "ISC",
"dependencies": {
"webpack-sources": "^3.0.0"
},
"peerDependenciesMeta": {
"webpack": {
"optional": true
},
"webpack-sources": {
"optional": true
}
}
},
"node_modules/loader-runner": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz",

View file

@ -5,7 +5,8 @@
"main": "index.js",
"scripts": {
"test": "babel-node benchmark-node.mjs",
"prebuild": "rm -rf dist/*",
"clean": "rm -rf dist/*",
"prebuild": "npm run clean",
"build": "webpack",
"build:dev": "npm run prebuild && webpack --mode development"
},
@ -18,10 +19,12 @@
"@babel/node": "^7.28.0",
"@babel/preset-env": "^7.28.0",
"@babel/preset-react": "^7.27.1",
"@dapplets/unicode-escape-webpack-plugin": "^0.1.1",
"assert": "^2.1.0",
"babel-loader": "^10.0.0",
"babel-node": "^0.0.1-security",
"buffer": "^6.0.3",
"license-webpack-plugin": "^4.0.2",
"path-browserify": "^1.0.1",
"process": "^0.11.10",
"react": "^19.1.1",

View file

@ -2,6 +2,7 @@ import path from "path";
import webpack from "webpack";
import TerserPlugin from "terser-webpack-plugin";
import UnicodeEscapePlugin from "@dapplets/unicode-escape-webpack-plugin";
import { LicenseWebpackPlugin } from "license-webpack-plugin";
import { fileURLToPath } from 'url';
const __filename = fileURLToPath(import.meta.url);
@ -33,6 +34,10 @@ function createConfig({ filename, minify }) {
new UnicodeEscapePlugin({
test: /\.(js|jsx|ts|tsx)$/, // Escape Unicode in JavaScript and TypeScript files
}),
new LicenseWebpackPlugin({
perChunkOutput: true,
outputFilename: "LICENSE.txt",
}),
],
module: {
rules: [
@ -49,7 +54,7 @@ function createConfig({ filename, minify }) {
}],
"@babel/preset-react"
],
plugins: [path.resolve(__dirname, "../startup-helper/BabelCacheBuster.mjs")],
plugins: [path.resolve(__dirname, "../utils/BabelCacheBuster.mjs")],
},
},
},
@ -59,7 +64,7 @@ function createConfig({ filename, minify }) {
use: {
loader: "babel-loader",
options: {
plugins: [path.resolve(__dirname, "../startup-helper/BabelCacheBuster.mjs")],
plugins: [path.resolve(__dirname, "../utils/BabelCacheBuster.mjs")],
},
},
},
@ -68,6 +73,7 @@ function createConfig({ filename, minify }) {
optimization: {
minimizer: [
new TerserPlugin({
extractComments: false,
terserOptions: {
mangle: minify,
format: {

Some files were not shown because too many files have changed in this diff Show more