@sheetxl/studio-vanilla
Version:
SheetXL Studio - Vanilla entry point for integrating SheetXL UI.
242 lines (241 loc) • 10.2 kB
JavaScript
/**
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.6.4
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/
var U, N, M = { exports: {} }, o = {};
function K() {
if (U) return o;
U = 1;
var h = Symbol.for("react.transitional.element"), V = Symbol.for("react.portal"), D = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), L = Symbol.for("react.profiler"), F = Symbol.for("react.consumer"), z = Symbol.for("react.context"), G = Symbol.for("react.forward_ref"), W = Symbol.for("react.suspense"), Y = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), j = Symbol.iterator, H = { isMounted: function() {
return !1;
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
} }, k = Object.assign, C = {};
function y(t, e, n) {
this.props = t, this.context = e, this.refs = C, this.updater = n || H;
}
function $() {
}
function v(t, e, n) {
this.props = t, this.context = e, this.refs = C, this.updater = n || H;
}
y.prototype.isReactComponent = {}, y.prototype.setState = function(t, e) {
if (typeof t != "object" && typeof t != "function" && t != null) throw Error("takes an object of state variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, t, e, "setState");
}, y.prototype.forceUpdate = function(t) {
this.updater.enqueueForceUpdate(this, t, "forceUpdate");
}, $.prototype = y.prototype;
var b = v.prototype = new $();
b.constructor = v, k(b, y.prototype), b.isPureReactComponent = !0;
var x = Array.isArray, s = { H: null, A: null, T: null, S: null, V: null }, T = Object.prototype.hasOwnProperty;
function S(t, e, n, r, u, a) {
return n = a.ref, { $$typeof: h, type: t, key: e, ref: n !== void 0 ? n : null, props: a };
}
function E(t) {
return typeof t == "object" && t !== null && t.$$typeof === h;
}
var O = /\/+/g;
function g(t, e) {
return typeof t == "object" && t !== null && t.key != null ? (n = "" + t.key, r = { "=": "=0", ":": "=2" }, "$" + n.replace(/[=:]/g, function(u) {
return r[u];
})) : e.toString(36);
var n, r;
}
function A() {
}
function d(t, e, n, r, u) {
var a = typeof t;
a !== "undefined" && a !== "boolean" || (t = null);
var i, l, f = !1;
if (t === null) f = !0;
else switch (a) {
case "bigint":
case "string":
case "number":
f = !0;
break;
case "object":
switch (t.$$typeof) {
case h:
case V:
f = !0;
break;
case R:
return d((f = t._init)(t._payload), e, n, r, u);
}
}
if (f) return u = u(t), f = r === "" ? "." + g(t, 0) : r, x(u) ? (n = "", f != null && (n = f.replace(O, "$&/") + "/"), d(u, e, n, "", function(c) {
return c;
})) : u != null && (E(u) && (i = u, l = n + (u.key == null || t && t.key === u.key ? "" : ("" + u.key).replace(O, "$&/") + "/") + f, u = S(i.type, l, void 0, 0, 0, i.props)), e.push(u)), 1;
f = 0;
var m, P = r === "" ? "." : r + ":";
if (x(t)) for (var p = 0; p < t.length; p++) f += d(r = t[p], e, n, a = P + g(r, p), u);
else if (typeof (p = (m = t) === null || typeof m != "object" ? null : typeof (m = j && m[j] || m["@@iterator"]) == "function" ? m : null) == "function") for (t = p.call(t), p = 0; !(r = t.next()).done; ) f += d(r = r.value, e, n, a = P + g(r, p++), u);
else if (a === "object") {
if (typeof t.then == "function") return d(function(c) {
switch (c.status) {
case "fulfilled":
return c.value;
case "rejected":
throw c.reason;
default:
switch (typeof c.status == "string" ? c.then(A, A) : (c.status = "pending", c.then(function(w) {
c.status === "pending" && (c.status = "fulfilled", c.value = w);
}, function(w) {
c.status === "pending" && (c.status = "rejected", c.reason = w);
})), c.status) {
case "fulfilled":
return c.value;
case "rejected":
throw c.reason;
}
}
throw c;
}(t), e, n, r, u);
throw e = String(t), Error("Objects are not valid as a React child (found: " + (e === "[object Object]" ? "object with keys {" + Object.keys(t).join(", ") + "}" : e) + "). If you meant to render a collection of children, use an array instead.");
}
return f;
}
function _(t, e, n) {
if (t == null) return t;
var r = [], u = 0;
return d(t, r, "", "", function(a) {
return e.call(n, a, u++);
}), r;
}
function B(t) {
if (t._status === -1) {
var e = t._result;
(e = e()).then(function(n) {
t._status !== 0 && t._status !== -1 || (t._status = 1, t._result = n);
}, function(n) {
t._status !== 0 && t._status !== -1 || (t._status = 2, t._result = n);
}), t._status === -1 && (t._status = 0, t._result = e);
}
if (t._status === 1) return t._result.default;
throw t._result;
}
var I = typeof reportError == "function" ? reportError : function(t) {
if (typeof window == "object" && typeof window.ErrorEvent == "function") {
var e = new window.ErrorEvent("error", { bubbles: !0, cancelable: !0, message: typeof t == "object" && t !== null && typeof t.message == "string" ? String(t.message) : String(t), error: t });
if (!window.dispatchEvent(e)) return;
} else if (typeof process == "object" && typeof process.emit == "function") return void process.emit("uncaughtException", t);
console.error(t);
};
function J() {
}
return o.Children = { map: _, forEach: function(t, e, n) {
_(t, function() {
e.apply(this, arguments);
}, n);
}, count: function(t) {
var e = 0;
return _(t, function() {
e++;
}), e;
}, toArray: function(t) {
return _(t, function(e) {
return e;
}) || [];
}, only: function(t) {
if (!E(t)) throw Error("React.Children.only expected to receive a single React element child.");
return t;
} }, o.Component = y, o.Fragment = D, o.Profiler = L, o.PureComponent = v, o.StrictMode = q, o.Suspense = W, o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = s, o.__COMPILER_RUNTIME = { __proto__: null, c: function(t) {
return s.H.useMemoCache(t);
} }, o.cache = function(t) {
return function() {
return t.apply(null, arguments);
};
}, o.cloneElement = function(t, e, n) {
if (t == null) throw Error("The argument must be a React element, but you passed " + t + ".");
var r = k({}, t.props), u = t.key;
if (e != null) for (a in e.ref, e.key !== void 0 && (u = "" + e.key), e) !T.call(e, a) || a === "key" || a === "__self" || a === "__source" || a === "ref" && e.ref === void 0 || (r[a] = e[a]);
var a = arguments.length - 2;
if (a === 1) r.children = n;
else if (1 < a) {
for (var i = Array(a), l = 0; l < a; l++) i[l] = arguments[l + 2];
r.children = i;
}
return S(t.type, u, void 0, 0, 0, r);
}, o.createContext = function(t) {
return (t = { $$typeof: z, _currentValue: t, _currentValue2: t, _threadCount: 0, Provider: null, Consumer: null }).Provider = t, t.Consumer = { $$typeof: F, _context: t }, t;
}, o.createElement = function(t, e, n) {
var r, u = {}, a = null;
if (e != null) for (r in e.key !== void 0 && (a = "" + e.key), e) T.call(e, r) && r !== "key" && r !== "__self" && r !== "__source" && (u[r] = e[r]);
var i = arguments.length - 2;
if (i === 1) u.children = n;
else if (1 < i) {
for (var l = Array(i), f = 0; f < i; f++) l[f] = arguments[f + 2];
u.children = l;
}
if (t && t.defaultProps) for (r in i = t.defaultProps) u[r] === void 0 && (u[r] = i[r]);
return S(t, a, void 0, 0, 0, u);
}, o.createRef = function() {
return { current: null };
}, o.forwardRef = function(t) {
return { $$typeof: G, render: t };
}, o.isValidElement = E, o.lazy = function(t) {
return { $$typeof: R, _payload: { _status: -1, _result: t }, _init: B };
}, o.memo = function(t, e) {
return { $$typeof: Y, type: t, compare: e === void 0 ? null : e };
}, o.startTransition = function(t) {
var e = s.T, n = {};
s.T = n;
try {
var r = t(), u = s.S;
u !== null && u(n, r), typeof r == "object" && r !== null && typeof r.then == "function" && r.then(J, I);
} catch (a) {
I(a);
} finally {
s.T = e;
}
}, o.unstable_useCacheRefresh = function() {
return s.H.useCacheRefresh();
}, o.use = function(t) {
return s.H.use(t);
}, o.useActionState = function(t, e, n) {
return s.H.useActionState(t, e, n);
}, o.useCallback = function(t, e) {
return s.H.useCallback(t, e);
}, o.useContext = function(t) {
return s.H.useContext(t);
}, o.useDebugValue = function() {
}, o.useDeferredValue = function(t, e) {
return s.H.useDeferredValue(t, e);
}, o.useEffect = function(t, e, n) {
var r = s.H;
if (typeof n == "function") throw Error("useEffect CRUD overload is not enabled in this build of React.");
return r.useEffect(t, e);
}, o.useId = function() {
return s.H.useId();
}, o.useImperativeHandle = function(t, e, n) {
return s.H.useImperativeHandle(t, e, n);
}, o.useInsertionEffect = function(t, e) {
return s.H.useInsertionEffect(t, e);
}, o.useLayoutEffect = function(t, e) {
return s.H.useLayoutEffect(t, e);
}, o.useMemo = function(t, e) {
return s.H.useMemo(t, e);
}, o.useOptimistic = function(t, e) {
return s.H.useOptimistic(t, e);
}, o.useReducer = function(t, e, n) {
return s.H.useReducer(t, e, n);
}, o.useRef = function(t) {
return s.H.useRef(t);
}, o.useState = function(t) {
return s.H.useState(t);
}, o.useSyncExternalStore = function(t, e, n) {
return s.H.useSyncExternalStore(t, e, n);
}, o.useTransition = function() {
return s.H.useTransition();
}, o.version = "19.1.0", o;
}
function Q() {
return N || (N = 1, M.exports = K()), M.exports;
}
export {
Q as r
};