@sheetxl/studio-vanilla
Version:
SheetXL Studio - Vanilla entry point for integrating SheetXL UI.
244 lines (243 loc) • 10.3 kB
JavaScript
/**
* @license @sheetxl/studio-vanilla - SheetXL Studio - Vanilla entry point for integrating SheetXL UI. - v0.7.27
*
* (C) 2025-present SheetXL Inc. & Michael T. Ford
* License: The license can be found at https://www.sheetxl.com/license.
*/
var N, U, M = { exports: {} }, r = {};
function Q() {
if (N) return r;
N = 1;
var h = Symbol.for("react.transitional.element"), V = Symbol.for("react.portal"), q = Symbol.for("react.fragment"), D = 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"), j = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), R = Symbol.iterator, k = { isMounted: function() {
return !1;
}, enqueueForceUpdate: function() {
}, enqueueReplaceState: function() {
}, enqueueSetState: function() {
} }, C = Object.assign, $ = {};
function y(t, e, o) {
this.props = t, this.context = e, this.refs = $, this.updater = o || k;
}
function x() {
}
function v(t, e, o) {
this.props = t, this.context = e, this.refs = $, this.updater = o || k;
}
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");
}, x.prototype = y.prototype;
var b = v.prototype = new x();
b.constructor = v, C(b, y.prototype), b.isPureReactComponent = !0;
var T = Array.isArray;
function S() {
}
var s = { H: null, A: null, T: null, S: null }, A = Object.prototype.hasOwnProperty;
function E(t, e, o) {
var n = o.ref;
return { $$typeof: h, type: t, key: e, ref: n !== void 0 ? n : null, props: o };
}
function g(t) {
return typeof t == "object" && t !== null && t.$$typeof === h;
}
var O = /\/+/g;
function w(t, e) {
return typeof t == "object" && t !== null && t.key != null ? (o = "" + t.key, n = { "=": "=0", ":": "=2" }, "$" + o.replace(/[=:]/g, function(u) {
return n[u];
})) : e.toString(36);
var o, n;
}
function d(t, e, o, n, u) {
var a = typeof t;
a !== "undefined" && a !== "boolean" || (t = null);
var c, 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 j:
return d((f = t._init)(t._payload), e, o, n, u);
}
}
if (f) return u = u(t), f = n === "" ? "." + w(t, 0) : n, T(u) ? (o = "", f != null && (o = f.replace(O, "$&/") + "/"), d(u, e, o, "", function(i) {
return i;
})) : u != null && (g(u) && (c = u, l = o + (u.key == null || t && t.key === u.key ? "" : ("" + u.key).replace(O, "$&/") + "/") + f, u = E(c.type, l, c.props)), e.push(u)), 1;
f = 0;
var m, P = n === "" ? "." : n + ":";
if (T(t)) for (var p = 0; p < t.length; p++) f += d(n = t[p], e, o, a = P + w(n, p), u);
else if (typeof (p = (m = t) === null || typeof m != "object" ? null : typeof (m = R && m[R] || m["@@iterator"]) == "function" ? m : null) == "function") for (t = p.call(t), p = 0; !(n = t.next()).done; ) f += d(n = n.value, e, o, a = P + w(n, p++), u);
else if (a === "object") {
if (typeof t.then == "function") return d((function(i) {
switch (i.status) {
case "fulfilled":
return i.value;
case "rejected":
throw i.reason;
default:
switch (typeof i.status == "string" ? i.then(S, S) : (i.status = "pending", i.then(function(H) {
i.status === "pending" && (i.status = "fulfilled", i.value = H);
}, function(H) {
i.status === "pending" && (i.status = "rejected", i.reason = H);
})), i.status) {
case "fulfilled":
return i.value;
case "rejected":
throw i.reason;
}
}
throw i;
})(t), e, o, n, 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, o) {
if (t == null) return t;
var n = [], u = 0;
return d(t, n, "", "", function(a) {
return e.call(o, a, u++);
}), n;
}
function J(t) {
if (t._status === -1) {
var e = t._result;
(e = e()).then(function(o) {
t._status !== 0 && t._status !== -1 || (t._status = 1, t._result = o);
}, function(o) {
t._status !== 0 && t._status !== -1 || (t._status = 2, t._result = o);
}), 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);
}, K = { map: _, forEach: function(t, e, o) {
_(t, function() {
e.apply(this, arguments);
}, o);
}, count: function(t) {
var e = 0;
return _(t, function() {
e++;
}), e;
}, toArray: function(t) {
return _(t, function(e) {
return e;
}) || [];
}, only: function(t) {
if (!g(t)) throw Error("React.Children.only expected to receive a single React element child.");
return t;
} };
return r.Activity = B, r.Children = K, r.Component = y, r.Fragment = q, r.Profiler = L, r.PureComponent = v, r.StrictMode = D, r.Suspense = W, r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE = s, r.__COMPILER_RUNTIME = { __proto__: null, c: function(t) {
return s.H.useMemoCache(t);
} }, r.cache = function(t) {
return function() {
return t.apply(null, arguments);
};
}, r.cacheSignal = function() {
return null;
}, r.cloneElement = function(t, e, o) {
if (t == null) throw Error("The argument must be a React element, but you passed " + t + ".");
var n = C({}, t.props), u = t.key;
if (e != null) for (a in e.key !== void 0 && (u = "" + e.key), e) !A.call(e, a) || a === "key" || a === "__self" || a === "__source" || a === "ref" && e.ref === void 0 || (n[a] = e[a]);
var a = arguments.length - 2;
if (a === 1) n.children = o;
else if (1 < a) {
for (var c = Array(a), l = 0; l < a; l++) c[l] = arguments[l + 2];
n.children = c;
}
return E(t.type, u, n);
}, r.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;
}, r.createElement = function(t, e, o) {
var n, u = {}, a = null;
if (e != null) for (n in e.key !== void 0 && (a = "" + e.key), e) A.call(e, n) && n !== "key" && n !== "__self" && n !== "__source" && (u[n] = e[n]);
var c = arguments.length - 2;
if (c === 1) u.children = o;
else if (1 < c) {
for (var l = Array(c), f = 0; f < c; f++) l[f] = arguments[f + 2];
u.children = l;
}
if (t && t.defaultProps) for (n in c = t.defaultProps) u[n] === void 0 && (u[n] = c[n]);
return E(t, a, u);
}, r.createRef = function() {
return { current: null };
}, r.forwardRef = function(t) {
return { $$typeof: G, render: t };
}, r.isValidElement = g, r.lazy = function(t) {
return { $$typeof: j, _payload: { _status: -1, _result: t }, _init: J };
}, r.memo = function(t, e) {
return { $$typeof: Y, type: t, compare: e === void 0 ? null : e };
}, r.startTransition = function(t) {
var e = s.T, o = {};
s.T = o;
try {
var n = t(), u = s.S;
u !== null && u(o, n), typeof n == "object" && n !== null && typeof n.then == "function" && n.then(S, I);
} catch (a) {
I(a);
} finally {
e !== null && o.types !== null && (e.types = o.types), s.T = e;
}
}, r.unstable_useCacheRefresh = function() {
return s.H.useCacheRefresh();
}, r.use = function(t) {
return s.H.use(t);
}, r.useActionState = function(t, e, o) {
return s.H.useActionState(t, e, o);
}, r.useCallback = function(t, e) {
return s.H.useCallback(t, e);
}, r.useContext = function(t) {
return s.H.useContext(t);
}, r.useDebugValue = function() {
}, r.useDeferredValue = function(t, e) {
return s.H.useDeferredValue(t, e);
}, r.useEffect = function(t, e) {
return s.H.useEffect(t, e);
}, r.useEffectEvent = function(t) {
return s.H.useEffectEvent(t);
}, r.useId = function() {
return s.H.useId();
}, r.useImperativeHandle = function(t, e, o) {
return s.H.useImperativeHandle(t, e, o);
}, r.useInsertionEffect = function(t, e) {
return s.H.useInsertionEffect(t, e);
}, r.useLayoutEffect = function(t, e) {
return s.H.useLayoutEffect(t, e);
}, r.useMemo = function(t, e) {
return s.H.useMemo(t, e);
}, r.useOptimistic = function(t, e) {
return s.H.useOptimistic(t, e);
}, r.useReducer = function(t, e, o) {
return s.H.useReducer(t, e, o);
}, r.useRef = function(t) {
return s.H.useRef(t);
}, r.useState = function(t) {
return s.H.useState(t);
}, r.useSyncExternalStore = function(t, e, o) {
return s.H.useSyncExternalStore(t, e, o);
}, r.useTransition = function() {
return s.H.useTransition();
}, r.version = "19.2.0", r;
}
function X() {
return U || (U = 1, M.exports = Q()), M.exports;
}
export {
X as r
};