Grabbed dndbeyond's source code

```
~/go/bin/sourcemapper -output ddb -jsurl https://media.dndbeyond.com/character-app/static/js/main.90aa78c5.js
```
This commit is contained in:
2025-05-28 11:50:03 -07:00
commit 8df9031d27
3592 changed files with 319051 additions and 0 deletions
@@ -0,0 +1,49 @@
import $$observable from 'symbol-observable';
import { createRule } from 'jss';
var isObservable = function isObservable(value) {
return value && value[$$observable] && value === value[$$observable]();
};
var observablePlugin = function observablePlugin(updateOptions) {
return {
onCreateRule: function onCreateRule(name, decl, options) {
if (!isObservable(decl)) return null;
var style$ = decl;
var rule = createRule(name, {}, options); // TODO
// Call `stream.subscribe()` returns a subscription, which should be explicitly
// unsubscribed from when we know this sheet is no longer needed.
style$.subscribe(function (style) {
for (var prop in style) {
rule.prop(prop, style[prop], updateOptions);
}
});
return rule;
},
onProcessRule: function onProcessRule(rule) {
if (rule && rule.type !== 'style') return;
var styleRule = rule;
var style = styleRule.style;
var _loop = function _loop(prop) {
var value = style[prop];
if (!isObservable(value)) return "continue";
delete style[prop];
value.subscribe({
next: function next(nextValue) {
styleRule.prop(prop, nextValue, updateOptions);
}
});
};
for (var prop in style) {
var _ret = _loop(prop);
if (_ret === "continue") continue;
}
}
};
};
export default observablePlugin;
@@ -0,0 +1,19 @@
/* global window */
import ponyfill from './ponyfill.js';
var root;
if (typeof self !== 'undefined') {
root = self;
} else if (typeof window !== 'undefined') {
root = window;
} else if (typeof global !== 'undefined') {
root = global;
} else if (typeof module !== 'undefined') {
root = module;
} else {
root = Function('return this')();
}
var result = ponyfill(root);
export default result;
@@ -0,0 +1,17 @@
export default function symbolObservablePonyfill(root) {
var result;
var Symbol = root.Symbol;
if (typeof Symbol === 'function') {
if (Symbol.observable) {
result = Symbol.observable;
} else {
result = Symbol('observable');
Symbol.observable = result;
}
} else {
result = '@@observable';
}
return result;
};