@sencha/reext
Advanced tools
Comparing version 1.0.20 to 1.0.40
@@ -1,5 +0,5 @@ | ||
import { jsxs as g, jsx as p, Fragment as le } from "react/jsx-runtime"; | ||
import { jsxs as g, jsx as f, Fragment as le } from "react/jsx-runtime"; | ||
import I, { cloneElement as Ke, useState as W, useRef as ee, useEffect as H } from "react"; | ||
import { createPortal as Y } from "react-dom"; | ||
const Le = "@sencha/reext", Me = "1.0.20", Ue = "ReExt - Sencha Ext JS components in React", Fe = "./dist/ReExt/types.d.ts", Be = "./dist/reext.es.js", qe = { | ||
const Le = "@sencha/reext", Me = "1.0.40", Ue = "ReExt - Sencha Ext JS components in React", Fe = "./dist/ReExt/types.d.ts", Be = "./dist/reext.es.js", Ve = { | ||
b: "npm run buildclonedeep && npm run buildisequal && npm run buildfill && npm run buildgetconfig && npm run buildglobalprovider && npm run buildisevent && npm run builditeratechildren && npm run buildloadextjsfiles && npm run buildpropupdate && npm run buildresizeobserver && npm run builduntilextloaded && npm run buildwatermark", | ||
@@ -32,3 +32,3 @@ buildplugin: "esbuild ./src/lib/modules/vite-plugin-reext.js --format=esm --bundle --minify --outfile=./src/lib/vite-plugin-reext.js --platform=node", | ||
lint: "eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0" | ||
}, Ve = { | ||
}, qe = { | ||
name: "Sencha, Inc.", | ||
@@ -64,4 +64,4 @@ email: "marc.gusmano@sencha.com", | ||
module: Be, | ||
scripts: qe, | ||
author: Ve, | ||
scripts: Ve, | ||
author: qe, | ||
homepage: Ge, | ||
@@ -92,3 +92,3 @@ keywords: Xe, | ||
}, [o, i]), [i, (l) => { | ||
a.map((f) => f(l, i, r)), s.current = l, n(l); | ||
a.map((p) => p(l, i, r)), s.current = l, n(l); | ||
}]; | ||
@@ -108,5 +108,5 @@ }, Re = I.createContext(), Ce = () => I.useContext(Re), nt = (e, t) => { | ||
const [n, s] = it(nt, i, e), a = (o, l) => { | ||
var f = {}; | ||
for (const [c] of Object.entries(l)) f[c] = o[c]; | ||
return f; | ||
var p = {}; | ||
for (const [c] of Object.entries(l)) p[c] = o[c]; | ||
return p; | ||
}; | ||
@@ -148,11 +148,11 @@ return I.createElement(Re.Provider, { value: { ...a(n, i), ...r } }, e.children); | ||
} | ||
function ot({ reextplugin: e, rid: t, reactversion: r, extver: i, extlocation: n, exttoolkit: s, exttheme: a, type: o, packageversion: l, style: f, flexdirection: c, ...y }) { | ||
return /* @__PURE__ */ g("div", { name: "ReExtRootLogo", "data-rid": y.rid, style: { display: "flex", flexDirection: c, alignItems: "center", color: "black", padding: 5, ...f }, children: [ | ||
/* @__PURE__ */ p("img", { style: { height: 40, width: 80 }, src: "../ReExt/ReExt.png" }), | ||
function ot({ reextplugin: e, rid: t, reactversion: r, extver: i, extlocation: n, exttoolkit: s, exttheme: a, type: o, packageversion: l, style: p, flexdirection: c, ...m }) { | ||
return /* @__PURE__ */ g("div", { name: "ReExtRootLogo", "data-rid": m.rid, style: { display: "flex", flexDirection: c, alignItems: "center", color: "black", padding: 5, ...p }, children: [ | ||
/* @__PURE__ */ f("img", { style: { height: 40, width: 80 }, src: "../ReExt/ReExt.png" }), | ||
/* @__PURE__ */ g("div", { style: { margin: "0 0 0 3px" }, children: [ | ||
/* @__PURE__ */ p("div", { style: { margin: "0 0 0 1px", fontSize: 12, color: "black" }, children: /* @__PURE__ */ p("a", { style: y.style, target: "_blank", rel: "noreferrer", href: "https://www.npmjs.com/package/@sencha/reext", children: /* @__PURE__ */ g("i", { children: [ | ||
/* @__PURE__ */ f("div", { style: { margin: "0 0 0 1px", fontSize: 12, color: "black" }, children: /* @__PURE__ */ f("a", { style: m.style, target: "_blank", rel: "noreferrer", href: "https://www.npmjs.com/package/@sencha/reext", children: /* @__PURE__ */ g("i", { children: [ | ||
"ReExt ", | ||
l | ||
] }) }) }), | ||
/* @__PURE__ */ p("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
/* @__PURE__ */ f("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
o, | ||
@@ -162,7 +162,7 @@ ", reextplugin: ", | ||
] }) }), | ||
/* @__PURE__ */ p("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
/* @__PURE__ */ f("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
"React: ", | ||
/* @__PURE__ */ p("b", { children: r }) | ||
/* @__PURE__ */ f("b", { children: r }) | ||
] }) }), | ||
/* @__PURE__ */ p("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
/* @__PURE__ */ f("div", { style: { fontSize: "10px", margin: "2px 0 0 0" }, children: /* @__PURE__ */ g("span", { style: { margin: "0 0 0 0" }, children: [ | ||
"ExtJS: ", | ||
@@ -179,7 +179,7 @@ /* @__PURE__ */ g("b", { children: [ | ||
"toolkit: ", | ||
/* @__PURE__ */ p("b", { children: s }) | ||
/* @__PURE__ */ f("b", { children: s }) | ||
] }), | ||
/* @__PURE__ */ g("span", { style: { margin: "0 0 0 5px" }, children: [ | ||
"theme: ", | ||
/* @__PURE__ */ p("b", { children: a }) | ||
/* @__PURE__ */ f("b", { children: a }) | ||
] }) | ||
@@ -238,10 +238,10 @@ ] }) | ||
r.observe(R); | ||
} }, style: { backgroundColor: "transparent", display: "flex", height: "100%", width: "100%" } }] }), t.add(a), window.Ext.isClassic === !0 ? f = "Ext.container.Container" : f = "Ext.Container", window.Ext.isClassic !== !0 && (o = Y(s, a.items.items[0].el.dom), i.push(o)); | ||
} }, style: { backgroundColor: "transparent", display: "flex", height: "100%", width: "100%" } }] }), t.add(a), window.Ext.isClassic === !0 ? p = "Ext.container.Container" : p = "Ext.Container", window.Ext.isClassic !== !0 && (o = Y(s, a.items.items[0].el.dom), i.push(o)); | ||
} else { | ||
var f; | ||
window.Ext.isClassic === !0 ? f = "Ext.container.Container" : f = "Ext.Container"; | ||
var p; | ||
window.Ext.isClassic === !0 ? p = "Ext.container.Container" : p = "Ext.Container"; | ||
var c = { ...s.props.style, layout: "fit", cls: "ReExtWidgetRoot" }; | ||
a = window.Ext.create(f, c), t.add(a); | ||
var y = Ke(s, { ReExtParent: t }); | ||
window.Ext.isClassic === !0 ? o = Y(y, a.el.dom) : o = Y(y, a.innerElement.dom), i.push(o); | ||
a = window.Ext.create(p, c), t.add(a); | ||
var m = Ke(s, { ReExtParent: t }); | ||
window.Ext.isClassic === !0 ? o = Y(m, a.el.dom) : o = Y(m, a.innerElement.dom), i.push(o); | ||
} | ||
@@ -301,10 +301,10 @@ }), i; | ||
a.current = n; | ||
const o = () => a.current, [l, f] = W(null), c = ee(null); | ||
const o = () => a.current, [l, p] = W(null), c = ee(null); | ||
c.current = l; | ||
const y = () => c.current, u = ee(null); | ||
const m = () => c.current, u = ee(null); | ||
var R = ut(); | ||
const [A, J] = W(!1); | ||
const [j, J] = W(!1); | ||
H(() => { | ||
try { | ||
var m = __IS_REEXT_RUNNING__; | ||
var h = __IS_REEXT_RUNNING__; | ||
J(!0); | ||
@@ -315,3 +315,3 @@ } catch { | ||
}, []), H(() => { | ||
var m, v = "false"; | ||
var h, v = "false"; | ||
if (!(typeof window === void 0 || typeof window > "u")) | ||
@@ -321,3 +321,3 @@ return (async () => { | ||
var b; | ||
y() == null ? b = e.config : b = y(); | ||
m() == null ? b = e.config : b = m(); | ||
try { | ||
@@ -336,5 +336,5 @@ var w = lt(e.xtype, b, e, o), L = Ext.ClassManager.getByAlias("widget." + w.xtype); | ||
} | ||
w.xtype !== "window" && (w.renderTo = u.current), m = window.Ext.create(w), s(m), a.current = m, e.config !== void 0 && e.config.reference !== void 0 && e.ReExtParent !== void 0 && (e.ReExtParent.ReExtChildren === void 0 && (e.ReExtParent.ReExtChildren = []), e.ReExtParent.ReExtChildren.push(m)), u.current === null ? console.warn("ReExtRootRef.current,props", u.current, e) : (u.current.style.background = "transparent", u.current.firstChild.remove()); | ||
var _ = ve(e.children, m, R); | ||
i(_), t.type !== null && t.type !== "production" && pt(m, w.xtype, u.current), e.ready !== void 0 && e.ready(m); | ||
w.xtype !== "window" && (w.renderTo = u.current), h = window.Ext.create(w), s(h), a.current = h, e.config !== void 0 && e.config.reference !== void 0 && e.ReExtParent !== void 0 && (e.ReExtParent.ReExtChildren === void 0 && (e.ReExtParent.ReExtChildren = []), e.ReExtParent.ReExtChildren.push(h)), u.current === null ? console.warn("ReExtRootRef.current,props", u.current, e) : (u.current.style.background = "transparent", u.current.firstChild.remove()); | ||
var _ = ve(e.children, h, R); | ||
i(_), t.type !== null && t.type !== "production" && pt(h, w.xtype, u.current), e.ready !== void 0 && e.ready(h); | ||
} catch (O) { | ||
@@ -345,3 +345,3 @@ console.error(O); | ||
})(), () => { | ||
v = "true", !(typeof window === void 0 || typeof window > "u") && window.Ext !== void 0 && window.Ext.destroy !== void 0 && m != null && (s(null), window.Ext.destroy(m)); | ||
v = "true", !(typeof window === void 0 || typeof window > "u") && window.Ext !== void 0 && window.Ext.destroy !== void 0 && h != null && (s(null), window.Ext.destroy(h)); | ||
}; | ||
@@ -354,16 +354,16 @@ }, [t.type]), H(() => { | ||
if (ct(_) != null || _ === "xtype") return; | ||
var m = re(c.current[_]), v = re(e.config[_]); | ||
m != null && delete m.listeners, v !== void 0 && m !== null && delete v.listeners; | ||
var h = re(c.current[_]), v = re(e.config[_]); | ||
h != null && delete h.listeners, v !== void 0 && h !== null && delete v.listeners; | ||
const O = (se) => { | ||
let B = [], ze = JSON.stringify(se, function(Er, q) { | ||
if (typeof q == "object" && q !== null) { | ||
if (B.indexOf(q) !== -1) | ||
let B = [], ze = JSON.stringify(se, function(Er, V) { | ||
if (typeof V == "object" && V !== null) { | ||
if (B.indexOf(V) !== -1) | ||
return; | ||
B.push(q); | ||
B.push(V); | ||
} | ||
return q; | ||
return V; | ||
}); | ||
return B = null, ze; | ||
}; | ||
var b = O(m), w = O(v), L = he(b, w); | ||
var b = O(h), w = O(v), L = he(b, w); | ||
if (!L && (dt(a.current, _, v), _ === "items")) { | ||
@@ -375,3 +375,3 @@ var oe = ve(e.children, a.current, R); | ||
} | ||
f(e.config), c.current = e.config; | ||
p(e.config), c.current = e.config; | ||
} | ||
@@ -389,6 +389,6 @@ }, [e.config]); | ||
if (t.type === "production" || t.type === null ? x = "production" : x = `${t.type} - ${t.daysleft} days left`, e.xtype === "logo") | ||
return /* @__PURE__ */ p( | ||
return /* @__PURE__ */ f( | ||
ot, | ||
{ | ||
reextplugin: A, | ||
reextplugin: j, | ||
rid: e.rid, | ||
@@ -406,4 +406,4 @@ reactversion: I.version, | ||
); | ||
var h; | ||
e.style === void 0 || e.style.height === void 0 ? h = 1 : h = "none"; | ||
var y; | ||
e.style === void 0 || e.style.height === void 0 ? y = 1 : y = "none"; | ||
var K = ""; | ||
@@ -413,3 +413,3 @@ if (e.className !== void 0 && (K = e.className), e.xtype === "window") | ||
var E, C, k = {}; | ||
return e.child === !0 && (k = { height: "100%" }), r === null ? (E = { ...e.style, ...k, flex: h, position: "relative", display: "flex", overflow: "hidden" }, C = K + " fill") : r.length === 0 ? (E = { ...e.style, ...k, flex: h, position: "relative", display: "flex", overflow: "hidden" }, C = K + " fill") : (E = { ...e.style, flex: h, position: "relative", display: "flex", overflow: "hidden" }, C = K), /* @__PURE__ */ p( | ||
return e.child === !0 && (k = { height: "100%" }), r === null ? (E = { ...e.style, ...k, flex: y, position: "relative", display: "flex", overflow: "hidden" }, C = K + " fill") : r.length === 0 ? (E = { ...e.style, ...k, flex: y, position: "relative", display: "flex", overflow: "hidden" }, C = K + " fill") : (E = { ...e.style, flex: y, position: "relative", display: "flex", overflow: "hidden" }, C = K), /* @__PURE__ */ f( | ||
"div", | ||
@@ -422,3 +422,3 @@ { | ||
ref: u, | ||
children: /* @__PURE__ */ p("div", { className: "portalroot", style: { display: "flex", flex: 1, alignItems: "center", justifyContent: "center" }, children: r !== null && r.map((m) => m) }) | ||
children: /* @__PURE__ */ f("div", { className: "portalroot", style: { display: "flex", flex: 1, alignItems: "center", justifyContent: "center" }, children: r !== null && r.map((h) => h) }) | ||
} | ||
@@ -438,3 +438,3 @@ ); | ||
if (!(typeof window === void 0 || typeof window > "u")) | ||
return /* @__PURE__ */ p("div", { className: "splash", style: { | ||
return /* @__PURE__ */ f("div", { className: "splash", style: { | ||
fontSize: "36px", | ||
@@ -453,6 +453,6 @@ border: "10px solid #0960a5", | ||
alignItems: "center" | ||
}, children: /* @__PURE__ */ p("img", { style: { height: 500, width: 1e3 }, src: "../ReExt/ReExt.png" }) }); | ||
}, children: /* @__PURE__ */ f("img", { style: { height: 500, width: 1e3 }, src: "../ReExt/ReExt.png" }) }); | ||
} | ||
var ht = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), mt = ht(() => { | ||
}), me = crypto, Ae = (e) => e instanceof CryptoKey, Q = new TextEncoder(), X = new TextDecoder(); | ||
}), me = crypto, je = (e) => e instanceof CryptoKey, Q = new TextEncoder(), X = new TextDecoder(); | ||
function wt(...e) { | ||
@@ -467,3 +467,3 @@ let t = e.reduce((n, { length: s }) => n + s, 0), r = new Uint8Array(t), i = 0; | ||
return r; | ||
}, V = (e) => { | ||
}, q = (e) => { | ||
let t = e; | ||
@@ -484,3 +484,3 @@ t instanceof Uint8Array && (t = X.decode(t)), t = t.replace(/-/g, "+").replace(/_/g, "/").replace(/\s/g, ""); | ||
} | ||
}, j = class extends F { | ||
}, A = class extends F { | ||
static get code() { | ||
@@ -602,3 +602,3 @@ return "ERR_JWT_CLAIM_VALIDATION_FAILED"; | ||
} | ||
function je(e, t, ...r) { | ||
function Ae(e, t, ...r) { | ||
var i; | ||
@@ -611,7 +611,7 @@ if (r.length > 2) { | ||
} | ||
var xe = (e, ...t) => je("Key must be ", e, ...t); | ||
var xe = (e, ...t) => Ae("Key must be ", e, ...t); | ||
function Te(e, t, ...r) { | ||
return je(`Key for the ${e} algorithm must be `, t, ...r); | ||
return Ae(`Key for the ${e} algorithm must be `, t, ...r); | ||
} | ||
var Pe = (e) => Ae(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ie = ["CryptoKey"], St = (...e) => { | ||
var Pe = (e) => je(e) ? !0 : (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", ie = ["CryptoKey"], St = (...e) => { | ||
let t = e.filter(Boolean); | ||
@@ -718,10 +718,10 @@ if (t.length === 0 || t.length === 1) return !0; | ||
} | ||
var At = async (e) => { | ||
var jt = async (e) => { | ||
if (!e.alg) throw new TypeError('"alg" argument is required when "jwk.alg" is not present'); | ||
let { algorithm: t, keyUsages: r } = Ct(e), i = [t, e.ext ?? !1, e.key_ops ?? r], n = { ...e }; | ||
return delete n.alg, delete n.use, me.subtle.importKey("jwk", n, ...i); | ||
}, jt = At, _e = (e) => V(e), de, ue, Ie = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", De = async (e, t, r, i) => { | ||
}, At = jt, _e = (e) => q(e), de, ue, Ie = (e) => (e == null ? void 0 : e[Symbol.toStringTag]) === "KeyObject", De = async (e, t, r, i) => { | ||
let n = e.get(t); | ||
if (n != null && n[i]) return n[i]; | ||
let s = await jt({ ...r, alg: i }); | ||
let s = await At({ ...r, alg: i }); | ||
return n ? n[i] = s : e.set(t, { [i]: s }), s; | ||
@@ -795,3 +795,3 @@ }, Tt = (e, t) => { | ||
async function zt(e, t, r) { | ||
if (t = await _t.normalizePublicKey(t, e), Ae(t)) return Et(t, e, r), t; | ||
if (t = await _t.normalizePublicKey(t, e), je(t)) return Et(t, e, r), t; | ||
if (t instanceof Uint8Array) { | ||
@@ -822,3 +822,3 @@ if (!e.startsWith("HS")) throw new TypeError(xe(t, ...ie)); | ||
if (e.protected) try { | ||
let R = V(e.protected); | ||
let R = q(e.protected); | ||
i = JSON.parse(X.decode(R)); | ||
@@ -838,17 +838,17 @@ } catch { | ||
typeof t == "function" && (t = await t(i, e), l = !0), Wt(o, t, "verify"); | ||
let f = wt(Q.encode(e.protected ?? ""), Q.encode("."), typeof e.payload == "string" ? Q.encode(e.payload) : e.payload), c; | ||
let p = wt(Q.encode(e.protected ?? ""), Q.encode("."), typeof e.payload == "string" ? Q.encode(e.payload) : e.payload), c; | ||
try { | ||
c = V(e.signature); | ||
c = q(e.signature); | ||
} catch { | ||
throw new $("Failed to base64url decode the signature"); | ||
} | ||
if (!await Lt(o, t, c, f)) throw new gt(); | ||
let y; | ||
if (!await Lt(o, t, c, p)) throw new gt(); | ||
let m; | ||
if (a) try { | ||
y = V(e.payload); | ||
m = q(e.payload); | ||
} catch { | ||
throw new $("Failed to base64url decode the payload"); | ||
} | ||
else typeof e.payload == "string" ? y = Q.encode(e.payload) : y = e.payload; | ||
let u = { payload: y }; | ||
else typeof e.payload == "string" ? m = Q.encode(e.payload) : m = e.payload; | ||
let u = { payload: m }; | ||
return e.protected !== void 0 && (u.protectedHeader = i), e.header !== void 0 && (u.unprotectedHeader = e.header), l ? { ...u, key: t } : u; | ||
@@ -904,3 +904,3 @@ } | ||
return t[1] === "-" || t[4] === "ago" ? -n : n; | ||
}, Ee = (e) => e.toLowerCase().replace(/^application\//, ""), qt = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, Vt = (e, t, r = {}) => { | ||
}, Ee = (e) => e.toLowerCase().replace(/^application\//, ""), Vt = (e, t) => typeof e == "string" ? t.includes(e) : Array.isArray(e) ? t.some(Set.prototype.has.bind(new Set(e))) : !1, qt = (e, t, r = {}) => { | ||
let i; | ||
@@ -913,19 +913,19 @@ try { | ||
let { typ: n } = r; | ||
if (n && (typeof e.typ != "string" || Ee(e.typ) !== Ee(n))) throw new j('unexpected "typ" JWT header value', i, "typ", "check_failed"); | ||
let { requiredClaims: s = [], issuer: a, subject: o, audience: l, maxTokenAge: f } = r, c = [...s]; | ||
f !== void 0 && c.push("iat"), l !== void 0 && c.push("aud"), o !== void 0 && c.push("sub"), a !== void 0 && c.push("iss"); | ||
for (let A of new Set(c.reverse())) if (!(A in i)) throw new j(`missing required "${A}" claim`, i, A, "missing"); | ||
if (a && !(Array.isArray(a) ? a : [a]).includes(i.iss)) throw new j('unexpected "iss" claim value', i, "iss", "check_failed"); | ||
if (o && i.sub !== o) throw new j('unexpected "sub" claim value', i, "sub", "check_failed"); | ||
if (l && !qt(i.aud, typeof l == "string" ? [l] : l)) throw new j('unexpected "aud" claim value', i, "aud", "check_failed"); | ||
let y; | ||
if (n && (typeof e.typ != "string" || Ee(e.typ) !== Ee(n))) throw new A('unexpected "typ" JWT header value', i, "typ", "check_failed"); | ||
let { requiredClaims: s = [], issuer: a, subject: o, audience: l, maxTokenAge: p } = r, c = [...s]; | ||
p !== void 0 && c.push("iat"), l !== void 0 && c.push("aud"), o !== void 0 && c.push("sub"), a !== void 0 && c.push("iss"); | ||
for (let j of new Set(c.reverse())) if (!(j in i)) throw new A(`missing required "${j}" claim`, i, j, "missing"); | ||
if (a && !(Array.isArray(a) ? a : [a]).includes(i.iss)) throw new A('unexpected "iss" claim value', i, "iss", "check_failed"); | ||
if (o && i.sub !== o) throw new A('unexpected "sub" claim value', i, "sub", "check_failed"); | ||
if (l && !Vt(i.aud, typeof l == "string" ? [l] : l)) throw new A('unexpected "aud" claim value', i, "aud", "check_failed"); | ||
let m; | ||
switch (typeof r.clockTolerance) { | ||
case "string": | ||
y = be(r.clockTolerance); | ||
m = be(r.clockTolerance); | ||
break; | ||
case "number": | ||
y = r.clockTolerance; | ||
m = r.clockTolerance; | ||
break; | ||
case "undefined": | ||
y = 0; | ||
m = 0; | ||
break; | ||
@@ -936,15 +936,15 @@ default: | ||
let { currentDate: u } = r, R = Ft(u || /* @__PURE__ */ new Date()); | ||
if ((i.iat !== void 0 || f) && typeof i.iat != "number") throw new j('"iat" claim must be a number', i, "iat", "invalid"); | ||
if ((i.iat !== void 0 || p) && typeof i.iat != "number") throw new A('"iat" claim must be a number', i, "iat", "invalid"); | ||
if (i.nbf !== void 0) { | ||
if (typeof i.nbf != "number") throw new j('"nbf" claim must be a number', i, "nbf", "invalid"); | ||
if (i.nbf > R + y) throw new j('"nbf" claim timestamp check failed', i, "nbf", "check_failed"); | ||
if (typeof i.nbf != "number") throw new A('"nbf" claim must be a number', i, "nbf", "invalid"); | ||
if (i.nbf > R + m) throw new A('"nbf" claim timestamp check failed', i, "nbf", "check_failed"); | ||
} | ||
if (i.exp !== void 0) { | ||
if (typeof i.exp != "number") throw new j('"exp" claim must be a number', i, "exp", "invalid"); | ||
if (i.exp <= R - y) throw new ge('"exp" claim timestamp check failed', i, "exp", "check_failed"); | ||
if (typeof i.exp != "number") throw new A('"exp" claim must be a number', i, "exp", "invalid"); | ||
if (i.exp <= R - m) throw new ge('"exp" claim timestamp check failed', i, "exp", "check_failed"); | ||
} | ||
if (f) { | ||
let A = R - i.iat, J = typeof f == "number" ? f : be(f); | ||
if (A - y > J) throw new ge('"iat" claim timestamp check failed (too far in the past)', i, "iat", "check_failed"); | ||
if (A < 0 - y) throw new j('"iat" claim timestamp check failed (it should be in the past)', i, "iat", "check_failed"); | ||
if (p) { | ||
let j = R - i.iat, J = typeof p == "number" ? p : be(p); | ||
if (j - m > J) throw new ge('"iat" claim timestamp check failed (too far in the past)', i, "iat", "check_failed"); | ||
if (j < 0 - m) throw new A('"iat" claim timestamp check failed (it should be in the past)', i, "iat", "check_failed"); | ||
} | ||
@@ -957,6 +957,6 @@ return i; | ||
if ((s = i.protectedHeader.crit) != null && s.includes("b64") && i.protectedHeader.b64 === !1) throw new P("JWTs MUST NOT use unencoded payload"); | ||
let n = { payload: Vt(i.protectedHeader, i.payload, r), protectedHeader: i.protectedHeader }; | ||
let n = { payload: qt(i.protectedHeader, i.payload, r), protectedHeader: i.protectedHeader }; | ||
return typeof t == "function" ? { ...n, key: i.key } : n; | ||
} | ||
var Xt = V; | ||
var Xt = q; | ||
function Yt(e) { | ||
@@ -1055,4 +1055,4 @@ if (typeof e != "string") throw new P("JWTs must use Compact JWS serialization, JWT must be a string"); | ||
function ae(e, t, r, i, n) { | ||
let s = n && "input" in n ? n.input : r.value, a = (n == null ? void 0 : n.expected) ?? e.expects ?? null, o = (n == null ? void 0 : n.received) ?? lr(s), l = { kind: e.kind, type: e.type, input: s, expected: a, received: o, message: `Invalid ${t}: ${a ? `Expected ${a} but r` : "R"}eceived ${o}`, requirement: e.requirement, path: n == null ? void 0 : n.path, issues: n == null ? void 0 : n.issues, lang: i.lang, abortEarly: i.abortEarly, abortPipeEarly: i.abortPipeEarly }, f = e.kind === "schema", c = (n == null ? void 0 : n.message) ?? e.message ?? sr(e.reference, l.lang) ?? (f ? or(l.lang) : null) ?? i.message ?? ar(l.lang); | ||
c && (l.message = typeof c == "function" ? c(l) : c), f && (r.typed = !1), r.issues ? r.issues.push(l) : r.issues = [l]; | ||
let s = n && "input" in n ? n.input : r.value, a = (n == null ? void 0 : n.expected) ?? e.expects ?? null, o = (n == null ? void 0 : n.received) ?? lr(s), l = { kind: e.kind, type: e.type, input: s, expected: a, received: o, message: `Invalid ${t}: ${a ? `Expected ${a} but r` : "R"}eceived ${o}`, requirement: e.requirement, path: n == null ? void 0 : n.path, issues: n == null ? void 0 : n.issues, lang: i.lang, abortEarly: i.abortEarly, abortPipeEarly: i.abortPipeEarly }, p = e.kind === "schema", c = (n == null ? void 0 : n.message) ?? e.message ?? sr(e.reference, l.lang) ?? (p ? or(l.lang) : null) ?? i.message ?? ar(l.lang); | ||
c && (l.message = typeof c == "function" ? c(l) : c), p && (r.typed = !1), r.issues ? r.issues.push(l) : r.issues = [l]; | ||
} | ||
@@ -1087,4 +1087,4 @@ function Oe(e) { | ||
if (l.issues) { | ||
let f = { type: "object", origin: "value", input: n, key: a, value: o }; | ||
for (let c of l.issues) c.path ? c.path.unshift(f) : c.path = [f], (s = r.issues) == null || s.push(c); | ||
let p = { type: "object", origin: "value", input: n, key: a, value: o }; | ||
for (let c of l.issues) c.path ? c.path.unshift(p) : c.path = [p], (s = r.issues) == null || s.push(c); | ||
if (r.issues || (r.issues = l.issues), i.abortEarly) { | ||
@@ -1148,4 +1148,4 @@ r.typed = !1; | ||
try { | ||
const o = await gr(a), c = new Date(o.exp * 1e3) - /* @__PURE__ */ new Date(), y = Math.floor(c / (1e3 * 60 * 60 * 24)); | ||
return y > 0 ? { type: "trial", daysleft: y } : { type: "expired", daysleft: 0 }; | ||
const o = await gr(a), c = new Date(o.exp * 1e3) - /* @__PURE__ */ new Date(), m = Math.floor(c / (1e3 * 60 * 60 * 24)); | ||
return m > 0 ? { type: "trial", daysleft: m } : { type: "expired", daysleft: 0 }; | ||
} catch (o) { | ||
@@ -1171,3 +1171,3 @@ return o.message.includes("claim timestamp check failed") ? { type: "expired", daysleft: 0 } : { type: "invalidkey", daysleft: 0 }; | ||
}, [i.type]), i.type !== "production" && i.trialdialog === !0) | ||
return /* @__PURE__ */ p("div", { style: { | ||
return /* @__PURE__ */ f("div", { style: { | ||
zIndex: 2e5, | ||
@@ -1197,3 +1197,3 @@ fontSize: "22px", | ||
/* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "row", alignItems: "center" }, children: [ | ||
/* @__PURE__ */ p("img", { style: { width: 160 }, src: "../ReExt/ReExt.png" }), | ||
/* @__PURE__ */ f("img", { style: { width: 160 }, src: "../ReExt/ReExt.png" }), | ||
/* @__PURE__ */ g("div", { style: { margin: "0 0 0 20px" }, children: [ | ||
@@ -1208,12 +1208,12 @@ "Welcome to the ReExt v", | ||
"This is a 30 day trial version of ReExt.", | ||
/* @__PURE__ */ p("br", {}), | ||
/* @__PURE__ */ f("br", {}), | ||
"Without a valid trial key, this dialog will appear.", | ||
/* @__PURE__ */ p("br", {}), | ||
/* @__PURE__ */ p("br", {}), | ||
/* @__PURE__ */ f("br", {}), | ||
/* @__PURE__ */ f("br", {}), | ||
"To have a trial key emailed to you, fill in this form and click 'Get Trial Key'." | ||
] }), | ||
/* @__PURE__ */ p("div", { style: { xwidth: "100%", flex: 1, display: "flex", border: "0px solid red" }, children: /* @__PURE__ */ p("iframe", { style: { width: "100%", margin: "0 0 10px 0", flex: 1, border: "0px solid lightgray" }, src: "https://www.sencha.com/forms/reext/trial-reext.php" }) }), | ||
/* @__PURE__ */ f("div", { style: { xwidth: "100%", flex: 1, display: "flex", border: "0px solid red" }, children: /* @__PURE__ */ f("iframe", { style: { width: "100%", margin: "0 0 10px 0", flex: 1, border: "0px solid lightgray" }, src: "https://www.sencha.com/forms/reext/trial-reext.php" }) }), | ||
/* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "row", justifyContent: "space-between", alignItems: "flex-end" }, children: [ | ||
/* @__PURE__ */ p("div", { style: { fontSize: "12px" }, children: i.type }), | ||
/* @__PURE__ */ p( | ||
/* @__PURE__ */ f("div", { style: { fontSize: "12px" }, children: i.type }), | ||
/* @__PURE__ */ f( | ||
"button", | ||
@@ -1230,11 +1230,11 @@ { | ||
] }), | ||
i.type === "expired" && /* @__PURE__ */ p(le, { children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", margin: "10px 0 10px 0", fontSize: "18px", height: "100%" }, children: [ | ||
/* @__PURE__ */ p("div", { style: { margin: "0 0 20px 0", fontSize: "24px" }, children: "Your ReExt trial key has expired" }), | ||
/* @__PURE__ */ p("div", { children: "Contact Sencha Sales" }), | ||
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("a", { href: "https://www.sencha.com/company/contact/", target: "_blank", rel: "noopener noreferrer", children: "https://www.sencha.com/company/contact/" }) }) | ||
i.type === "expired" && /* @__PURE__ */ f(le, { children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", margin: "10px 0 10px 0", fontSize: "18px", height: "100%" }, children: [ | ||
/* @__PURE__ */ f("div", { style: { margin: "0 0 20px 0", fontSize: "24px" }, children: "Your ReExt trial key has expired" }), | ||
/* @__PURE__ */ f("div", { children: "Contact Sencha Sales" }), | ||
/* @__PURE__ */ f("div", { children: /* @__PURE__ */ f("a", { href: "https://www.sencha.com/company/contact/", target: "_blank", rel: "noopener noreferrer", children: "https://www.sencha.com/company/contact/" }) }) | ||
] }) }), | ||
i.type === "invalidkey" && /* @__PURE__ */ p(le, { children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", margin: "10px 0 10px 0", fontSize: "18px", height: "100%" }, children: [ | ||
/* @__PURE__ */ p("div", { style: { margin: "0 0 20px 0", fontSize: "24px" }, children: "Your ReExt trial key is invalid" }), | ||
/* @__PURE__ */ p("div", { children: "Contact Sencha Sales" }), | ||
/* @__PURE__ */ p("div", { children: /* @__PURE__ */ p("a", { href: "https://www.sencha.com/company/contact/", target: "_blank", rel: "noopener noreferrer", children: "https://www.sencha.com/company/contact/" }) }) | ||
i.type === "invalidkey" && /* @__PURE__ */ f(le, { children: /* @__PURE__ */ g("div", { style: { display: "flex", flexDirection: "column", justifyContent: "center", alignItems: "center", margin: "10px 0 10px 0", fontSize: "18px", height: "100%" }, children: [ | ||
/* @__PURE__ */ f("div", { style: { margin: "0 0 20px 0", fontSize: "24px" }, children: "Your ReExt trial key is invalid" }), | ||
/* @__PURE__ */ f("div", { children: "Contact Sencha Sales" }), | ||
/* @__PURE__ */ f("div", { children: /* @__PURE__ */ f("a", { href: "https://www.sencha.com/company/contact/", target: "_blank", rel: "noopener noreferrer", children: "https://www.sencha.com/company/contact/" }) }) | ||
] }) }) | ||
@@ -1245,10 +1245,10 @@ ] }) }); | ||
try { | ||
let D = async (E, C, k) => await new Promise((m) => { | ||
let D = async (E, C, k) => await new Promise((h) => { | ||
window.Ext.onReady(function() { | ||
return window.Ext.ReExtLocation = k, window.Ext.ReExtTheme = E, window.Ext.ReExtLi = !0, m(1); | ||
return window.Ext.ReExtLocation = k, window.Ext.ReExtTheme = E, window.Ext.ReExtLi = !0, h(1); | ||
}); | ||
}), x = async (E) => typeof window === void 0 || typeof window > "u" ? void 0 : await new Promise((C, k) => { | ||
let m = document.getElementsByTagName("HEAD")[0]; | ||
let h = document.getElementsByTagName("HEAD")[0]; | ||
var v = !1; | ||
for (let b = 0; b < m.childNodes.length; b++) m.childNodes[b].src === E && (v = !0); | ||
for (let b = 0; b < h.childNodes.length; b++) h.childNodes[b].src === E && (v = !0); | ||
if (v === !1) { | ||
@@ -1262,6 +1262,6 @@ let b = document.createElement("script"); | ||
console.error(w), k(w); | ||
}), b.src = E, m.appendChild(b); | ||
}), b.src = E, h.appendChild(b); | ||
} | ||
}), h = async (E) => typeof window === void 0 || typeof window > "u" ? void 0 : await new Promise((C, k) => { | ||
let m = document.getElementsByTagName("HEAD")[0], v = document.createElement("link"); | ||
}), y = async (E) => typeof window === void 0 || typeof window > "u" ? void 0 : await new Promise((C, k) => { | ||
let h = document.getElementsByTagName("HEAD")[0], v = document.createElement("link"); | ||
v.rel = "stylesheet", v.type = "text/css", v.href = E, v.addEventListener("error", () => { | ||
@@ -1273,3 +1273,3 @@ var b = `${E} (css) | ||
return console.error(b), k(b); | ||
}), v.addEventListener("load", () => C(1)), m.appendChild(v); | ||
}), v.addEventListener("load", () => C(1)), h.appendChild(v); | ||
}); | ||
@@ -1286,4 +1286,4 @@ var t = e.toolkit; | ||
l === !1 || l === void 0 ? l = "" : l = "-rtl"; | ||
var f = e.locale; | ||
f === void 0 && (f = "en"); | ||
var p = e.locale; | ||
p === void 0 && (p = "en"); | ||
var c = e.sdkversion; | ||
@@ -1310,8 +1310,8 @@ switch (c) { | ||
} | ||
var y = a + "ext-" + c, u = a + "ext-addons-" + c; | ||
var m = a + "ext-" + c, u = a + "ext-addons-" + c; | ||
n === !0 ? n = "-debug" : n = ""; | ||
var R = ""; | ||
t === "modern" && (R = "-modern"); | ||
var A = ["ios", "material", "neptune", "triton"]; | ||
if (t === "modern" && !A.includes(r)) throw `${r} theme is not in ${t} toolkit for SDK version ${c}`; | ||
var j = ["ios", "material", "neptune", "triton"]; | ||
if (t === "modern" && !j.includes(r)) throw `${r} theme is not in ${t} toolkit for SDK version ${c}`; | ||
var J = ["classic", "crisp", "graphite", "gray", "material", "neptune", "triton"]; | ||
@@ -1321,15 +1321,15 @@ t === "classic" && !J.includes(r) && console.warn(`${r} is a custom theme in ${t} toolkit for SDK version ${c}`); | ||
(i.calendar === !0 || i.d3 === !0 || i.exporter === !0 || i.pivot === !0 || i.pivotd3 === !0 || i.pivotlocale === !0 || i.froalaeditor === !0) && (N = !0), e.debug === !0 && await x("node_modules/@sencha/reext/dist/ReExt/debug.js"); | ||
var S = y + "/build"; | ||
var S = m + "/build"; | ||
if (c.slice(-1) === "c") { | ||
await x(`${S}/ext-${c}-toolkit-${t}-sdk.js`), await h(`${S}/ext-${c}-theme-${r}-sdk.css`), N === !0 && (await x(`${y}/ext-${c}-toolkit-${t}-addons.js`), await h(`${y}/ext-${c}-theme-${r}-addons.css`)), await D(r, s, o); | ||
await x(`${S}/ext-${c}-toolkit-${t}-sdk.js`), await y(`${S}/ext-${c}-theme-${r}-sdk.css`), N === !0 && (await x(`${m}/ext-${c}-toolkit-${t}-addons.js`), await y(`${m}/ext-${c}-theme-${r}-addons.css`)), await D(r, s, o); | ||
return; | ||
} | ||
if (await x(`${S}/ext${R}-all${l}${n}.js`), await h(`${S}/${t}/theme-${r}/resources/theme-${r}-all${l}.css`), i.fontawesome === !0 && await h(`${S}/packages/font-awesome/resources/font-awesome-all${n}.css`), x(`${S}/${t}/locale/locale-${f}${n}.js`), i.ux === !0 && (await x(`${S}/packages/ux/${t}/ux${n}.js`), c === "7.0.0" && t === "modern" && r === "neptune" && await h(`${S}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`), c === "7.0.0" && t === "classic" && await h(`${S}/packages/ux/${t}/${r}/resources/ux-all${n}.css`), c !== "7.0.0" && t === "classic" && r === "material" && await h(`${S}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`), c !== "7.0.0" && t === "classic" && r !== "material" && r !== "gray" && await h(`${S}/packages/ux/${t}/${r}/resources/ux-all${n}.css`)), i.charts === !0) { | ||
if (await x(`${S}/ext${R}-all${l}${n}.js`), await y(`${S}/${t}/theme-${r}/resources/theme-${r}-all${l}.css`), i.fontawesome === !0 && await y(`${S}/packages/font-awesome/resources/font-awesome-all${n}.css`), x(`${S}/${t}/locale/locale-${p}${n}.js`), i.ux === !0 && (await x(`${S}/packages/ux/${t}/ux${n}.js`), c === "7.0.0" && t === "modern" && r === "neptune" && await y(`${S}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`), c === "7.0.0" && t === "classic" && await y(`${S}/packages/ux/${t}/${r}/resources/ux-all${n}.css`), c !== "7.0.0" && t === "classic" && r === "material" && await y(`${S}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`), c !== "7.0.0" && t === "classic" && r !== "material" && r !== "gray" && await y(`${S}/packages/ux/${t}/${r}/resources/ux-all${n}.css`)), i.charts === !0) { | ||
await x(`${S}/packages/charts/${t}/charts${n}.js`); | ||
var z = !0; | ||
(t === "modern" && r === "ios" && c === "7.0.0" || r === "gray") && (z = !1), z === !0 && (t === "classic" && r !== "material" ? await h(`${S}/packages/charts/${t}/${r}/resources/charts-all${n}.css`) : await h(`${S}/packages/charts/${t}/${t}-${r}/resources/charts-all${n}.css`)); | ||
(t === "modern" && r === "ios" && c === "7.0.0" || r === "gray") && (z = !1), z === !0 && (t === "classic" && r !== "material" ? await y(`${S}/packages/charts/${t}/${r}/resources/charts-all${n}.css`) : await y(`${S}/packages/charts/${t}/${t}-${r}/resources/charts-all${n}.css`)); | ||
} | ||
if (N === !0) { | ||
var d; | ||
u = u + "/packages", i.calendar === !0 && (d = "calendar", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && r === "ios" || c === "7.0.0.156" ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await h(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.d3 === !0 && (d = "d3", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await h(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.exporter === !0 && (d = "exporter", await x(`${u}/${d}/build/${t}/${d}${n}.js`), await h(`${u}/${d}/build/${t}/resources/${d}-all${n}.css`)), i.pivot === !0 && (d = "pivot", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await h(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.pivotd3 === !0 && (d = "pivot-d3", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await h(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.froalaeditor === !0 && (d = "froala-editor", await x(`${u}/${d}/build/${t}/${d}${n}.js`), await h(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`), await x(`${u}/${d}/development/froalaeditor.pkgd.js`), await h(`${u}/${d}/development/froalaeditor.pkgd.css`)), i.pivotlocale; | ||
u = u + "/packages", i.calendar === !0 && (d = "calendar", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && r === "ios" || c === "7.0.0.156" ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await y(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.d3 === !0 && (d = "d3", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await y(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.exporter === !0 && (d = "exporter", await x(`${u}/${d}/build/${t}/${d}${n}.js`), await y(`${u}/${d}/build/${t}/resources/${d}-all${n}.css`)), i.pivot === !0 && (d = "pivot", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await y(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.pivotd3 === !0 && (d = "pivot-d3", await x(`${u}/${d}/build/${t}/${d}${n}.js`), t === "modern" && (r === "ios" || r === "material") ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : r !== "gray" && r !== "graphite" && (t === "classic" && r !== "material" ? await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`) : await y(`${u}/${d}/build/${t}/${t}-${r}/resources/${d}-all${n}.css`))), i.froalaeditor === !0 && (d = "froala-editor", await x(`${u}/${d}/build/${t}/${d}${n}.js`), await y(`${u}/${d}/build/${t}/${r}/resources/${d}-all${n}.css`), await x(`${u}/${d}/development/froalaeditor.pkgd.js`), await y(`${u}/${d}/development/froalaeditor.pkgd.css`)), i.pivotlocale; | ||
} | ||
@@ -1341,4 +1341,4 @@ async function K(E) { | ||
if (k === void 0 && (k = !1), k !== !0 && (k = !1), k === !0) { | ||
var m = `${E.urlbase}ext-${E.sdkversion}/${t}overrides.js`; | ||
console.log("overridefile", m); | ||
var h = `${E.urlbase}ext-${E.sdkversion}/${t}overrides.js`; | ||
console.log("overridefile", h); | ||
async function b(w) { | ||
@@ -1352,4 +1352,4 @@ try { | ||
} | ||
var v = await b(m); | ||
v && await x(m); | ||
var v = await b(h); | ||
v && await x(h); | ||
} | ||
@@ -1365,3 +1365,3 @@ } | ||
var $e = "trial"; | ||
function Ar({ children: e, ReExtData: t, reextkey: r, splash: i }) { | ||
function jr({ children: e, ReExtData: t, reextkey: r, splash: i }) { | ||
if (typeof window === void 0 || typeof window > "u") | ||
@@ -1372,9 +1372,6 @@ return; | ||
try { | ||
console.log("right before"), console.log("isReextRunning:", __IS_REEXT_RUNNING__); | ||
var f = __IS_REEXT_RUNNING__; | ||
console.log("isReextRunning:", f); | ||
var c = /* @__PURE__ */ new Date(), y = c.getTime(); | ||
console.log("now:", y), console.log("diff:", y - f), o(!0); | ||
var p = __IS_REEXT_RUNNING__; | ||
o(!0); | ||
} catch { | ||
o(!1); | ||
console.error("Vite or Next.js plugin not installed"), o(!1); | ||
} | ||
@@ -1400,8 +1397,8 @@ }, []); | ||
await br(t), s(!0); | ||
} catch (y) { | ||
console.error("fail", y); | ||
} catch (m) { | ||
console.error("fail", m); | ||
} | ||
})(); | ||
}, []), !n) | ||
return i === !0 || i === "true" ? /* @__PURE__ */ p(yt, {}) : null; | ||
return i === !0 || i === "true" ? /* @__PURE__ */ f(yt, {}) : null; | ||
if (n) { | ||
@@ -1415,3 +1412,3 @@ var l = { | ||
return /* @__PURE__ */ g(at, { types: l, actionTrace: !1, actionStack: !1, dispatchTrace: !1, dispatchStack: !1, middleware: [], middlewareafter: [], children: [ | ||
$e !== "production" && /* @__PURE__ */ p(xr, { r, v: ke.version, t: $e }), | ||
$e !== "production" && /* @__PURE__ */ f(xr, { r, v: ke.version, t: $e }), | ||
a === !1 && /* @__PURE__ */ g( | ||
@@ -1433,10 +1430,10 @@ "div", | ||
children: [ | ||
/* @__PURE__ */ p("div", { children: "the Vite ReExt plugin is needed to run this app" }), | ||
/* @__PURE__ */ p("div", { children: "modify vite.config.js like this" }), | ||
/* @__PURE__ */ p("div", { dangerouslySetInnerHTML: { __html: ` | ||
/* @__PURE__ */ f("div", { style: { margin: "0 0 10px 0" }, children: "The Vite or Next.js ReExt plugin is needed to run this app" }), | ||
/* @__PURE__ */ f("div", { children: "for Vite, modify vite.config.js like this" }), | ||
/* @__PURE__ */ f("div", { dangerouslySetInnerHTML: { | ||
__html: ` | ||
<pre> | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
import reext from './node_modules/@sencha/reext/dist/ReExt/vite-plugin-reext.js' | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react-swc'; | ||
import reext from './node_modules/@sencha/reext/dist/ReExt/vite-plugin-reext.js'; | ||
export default defineConfig({ | ||
@@ -1448,3 +1445,14 @@ plugins: [ | ||
}) | ||
</pre>` } }) | ||
</pre>` | ||
} }), | ||
/* @__PURE__ */ f("div", { children: "for Next.js, modify next.config.mjs like this" }), | ||
/* @__PURE__ */ f("div", { dangerouslySetInnerHTML: { | ||
__html: ` | ||
<pre> | ||
/** @type {import('next').NextConfig} */ | ||
import withReExtPlugin from './node_modules/@sencha/reext/dist/ReExt/next-plugin-reext.js'; | ||
const nextConfig = {}; | ||
export default withReExtPlugin(nextConfig); | ||
</pre>` | ||
} }) | ||
] | ||
@@ -1456,7 +1464,7 @@ } | ||
} | ||
} catch (f) { | ||
return /* @__PURE__ */ p("div", { children: f.toString() }); | ||
} catch (p) { | ||
return /* @__PURE__ */ f("div", { children: p.toString() }); | ||
} | ||
} | ||
const jr = (e) => { | ||
const Ar = (e) => { | ||
if (typeof window === void 0 || typeof window > "u") | ||
@@ -1480,6 +1488,6 @@ return; | ||
Cr as Fill, | ||
Ar as ReExtProvider, | ||
jr as ReExtProvider, | ||
Tr as ReExtReferences, | ||
Rr as default, | ||
jr as useReExtState | ||
Ar as useReExtState | ||
}; |
@@ -1,14 +0,13 @@ | ||
(function(j,l){typeof exports=="object"&&typeof module<"u"?l(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],l):(j=typeof globalThis<"u"?globalThis:j||self,l(j.ReExt={},j.jsxRuntime,j.React,j.ReactDOM))})(this,function(j,l,m,G){"use strict";const ye={name:"@sencha/reext",version:"1.0.20",description:"ReExt - Sencha Ext JS components in React",types:"./dist/ReExt/types.d.ts",module:"./dist/reext.es.js",scripts:{b:"npm run buildclonedeep && npm run buildisequal && npm run buildfill && npm run buildgetconfig && npm run buildglobalprovider && npm run buildisevent && npm run builditeratechildren && npm run buildloadextjsfiles && npm run buildpropupdate && npm run buildresizeobserver && npm run builduntilextloaded && npm run buildwatermark",buildplugin:"esbuild ./src/lib/modules/vite-plugin-reext.js --format=esm --bundle --minify --outfile=./src/lib/vite-plugin-reext.js --platform=node",buildclonedeep:"esbuild ./src/lib/modules/cloneDeep.jsx --format=esm --bundle --minify --outfile=./src/lib/cloneDeep.js",buildisequal:"esbuild ./src/lib/modules/isEqual.jsx --format=esm --bundle --minify --outfile=./src/lib/isEqual.js",buildfill:"esbuild ./src/lib/modules/Fill.jsx --format=esm --bundle --minify --outfile=./src/lib/Fill.js",buildgetconfig:"esbuild ./src/lib/modules/getconfig.jsx --format=esm --bundle --minify --outfile=./src/lib/getconfig.js",buildglobalprovider:"esbuild ./src/lib/modules/GlobalProvider.jsx --format=esm --minify --outfile=./src/lib/GlobalProvider.js --inject:./src/lib/modules/react-shim.js",buildisevent:"esbuild ./src/lib/modules/isevent.jsx --format=esm --bundle --minify --outfile=./src/lib/isevent.js",builditeratechildren:"esbuild ./src/lib/modules/iteratechildren.jsx --format=esm --bundle --minify --outfile=./src/lib/iteratechildren.js --external:react --external:react-dom",buildloadextjsfiles:"esbuild ./src/lib/modules/loadextjsfiles.jsx --format=esm --bundle --minify --outfile=./src/lib/loadextjsfiles.js",buildpropupdate:"esbuild ./src/lib/modules/propupdate.jsx --format=esm --bundle --minify --outfile=./src/lib/propupdate.js",buildresizeobserver:"esbuild ./src/lib/modules/resizeobserver.jsx --format=esm --bundle --minify --outfile=./src/lib/resizeobserver.js",builduntilextloaded:"esbuild ./src/lib/modules/untilextloaded.jsx --format=esm --bundle --minify --outfile=./src/lib/untilextloaded.js",buildwatermark:"esbuild ./src/lib/modules/watermark.jsx --format=esm --bundle --minify --outfile=./src/lib/watermark.js",preinstall:"node ./dist/scripts/preinstall.js",postinstall:"node ./dist/scripts/postinstall.js",prepublishOnly:"node ./public/scripts/prepublish.js",postpack:"node ./public/scripts/postpack.js",postpublish:"node ./public/scripts/postpublish.js",pack:"npm pack --pack-destination zip",dev:"vite",builddev:"vite build -m development",build:"vite build",test:"vitest run",watch:"vitest",coverage:"vitest run --coverage",lint:"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0"},author:{name:"Sencha, Inc.",email:"marc.gusmano@sencha.com",url:"http://www.sencha.com"},homepage:"https://www.sencha.com/products/reext/",keywords:["React","NextJS","Sencha","ExtJS","Components","ReExt"],license:"MIT",exports:{".":{import:"./dist/reext.es.js"}},devDependencies:{"@vitejs/plugin-react-swc":"^3.7.0",eslint:"8.57.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-react-refresh":"^0.4.9",vite:"^5.4.1"},dependencies:{react:"^18.3.1","react-dom":"^18.3.1"}},We=(e,t)=>{for(var r in e)typeof e[r]=="function"&&function(i,n){var s=r;e[r]=function(){t===!0&&console.log("---"),console.log("globalState."+s+" payload:",arguments[0]),t===!0&&console.log(new Error().stack),t===!0&&console.log("---");var a=n.apply(this,arguments);return a}}(r,e[r])},He=async(e,t,r)=>{console.log("dispatch:",e.type,e.payload),r.dispatchStack&&console.log(new Error().stack)},Je=(e,t,r)=>{const[i,n]=m.useReducer(e,t),s=m.useRef(null);var a=r.middleware;a===void 0&&(a=[]);var o=r.middlewareafter;return o===void 0&&(o=[]),m.useEffect(()=>{o.map(c=>c(s.current,i))},[o,i]),[i,c=>{a.map(p=>p(c,i,r)),s.current=c,n(c)}]},he=m.createContext(),we=()=>m.useContext(he),Ne=(e,t)=>{var r={...e};return r[t.type.toLowerCase()]=t.payload,window.vscodeapi!==void 0&&vscodeapi.setState(r),r},ze=e=>{if(e===void 0)return;var t=e.types,r={};for(let o in t)t.hasOwnProperty(o)&&(r["set"+o]=c=>s({type:o,payload:c}));var i={};for(let o in t)t.hasOwnProperty(o)&&(i[o.toLowerCase()]=t[o].value);m.useEffect(()=>{e.dispatchTrace&&e.middleware.push(He)},[e]),e.actionTrace&&We(r,e.actionStack);const[n,s]=Je(Ne,i,e),a=(o,c)=>{var p={};for(const[d]of Object.entries(c))p[d]=o[d];return p};return m.createElement(he.Provider,{value:{...a(n,i),...r}},e.children)};function X(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++)t[r]=X(e[r]);return t}if(e instanceof Object){let t={};for(let r in e)e.hasOwnProperty(r)&&(t[r]=X(e[r]));return t}return e}function ie(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ie(e[r],t[r]))return!1;return!0}if(e instanceof Object&&t instanceof Object){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r)if(!t.hasOwnProperty(n)||!ie(e[n],t[n]))return!1;return!0}return!1}function Ke({reextplugin:e,rid:t,reactversion:r,extver:i,extlocation:n,exttoolkit:s,exttheme:a,type:o,packageversion:c,style:p,flexdirection:d,...y}){return l.jsxs("div",{name:"ReExtRootLogo","data-rid":y.rid,style:{display:"flex",flexDirection:d,alignItems:"center",color:"black",padding:5,...p},children:[l.jsx("img",{style:{height:40,width:80},src:"../ReExt/ReExt.png"}),l.jsxs("div",{style:{margin:"0 0 0 3px"},children:[l.jsx("div",{style:{margin:"0 0 0 1px",fontSize:12,color:"black"},children:l.jsx("a",{style:y.style,target:"_blank",rel:"noreferrer",href:"https://www.npmjs.com/package/@sencha/reext",children:l.jsxs("i",{children:["ReExt ",c]})})}),l.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:l.jsxs("span",{style:{margin:"0 0 0 0"},children:[o,", reextplugin: ",e.toString()]})}),l.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:l.jsxs("span",{style:{margin:"0 0 0 0"},children:["React: ",l.jsx("b",{children:r})]})}),l.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:l.jsxs("span",{style:{margin:"0 0 0 0"},children:["ExtJS: ",l.jsxs("b",{children:[i," (",n,")"]})]})}),l.jsxs("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:[l.jsxs("span",{style:{margin:"0 0 0 0"},children:["toolkit: ",l.jsx("b",{children:s})]}),l.jsxs("span",{style:{margin:"0 0 0 5px"},children:["theme: ",l.jsx("b",{children:a})]})]})]})]})}var Le=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),n=e.charAt(2).toUpperCase();i===n&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},Me=(e,t,r,i)=>{if(!(typeof window===void 0||typeof window>"u")){var n={};if(n.xtype=e,t!==void 0)for(let[a,o]of Object.entries(t))n[a]=o;if(r.references===!0&&(n.controller=window.Ext.create("Ext.app.ViewController")),n.store!==void 0&&(n.store.listeners!==void 0?n.store.listeners.load===void 0&&(n.store.listeners.load=a=>{r.storeloaded!==void 0&&r.storeloaded(a,i())}):n.store.listeners={load:a=>{r.storeloaded!==void 0&&r.storeloaded(a,i())}}),n.listeners===void 0){n.listeners={};for(let[a,o]of Object.entries(r)){var s=Le(a);s!==null&&(n.listeners[s]=function(){o(...arguments)})}Object.keys(n.listeners).length===0&&delete n.listeners}return n}},Ue=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),n=e.charAt(2).toUpperCase();i===n&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},me=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=[],n=[];if(e===void 0)return[];e.length===void 0?n.push(e):n=e;try{return n.map(s=>{var a,o;if(t.xtype==="tabpanel"){var c;window.Ext.ReExtTheme==="classic"?c="Ext.panel.Panel":c="Ext.Panel",a=window.Ext.create(c,{layout:"fit",title:s.props.title,cls:"ReExtTabChildRoot",items:[{xtype:"component",listeners:{boxready:f=>{o=G.createPortal(s,f.el.dom),i.push(o);var C=f.el.dom.parentNode;r.observe(C)}},style:{backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}]}),t.add(a),window.Ext.isClassic===!0?p="Ext.container.Container":p="Ext.Container",window.Ext.isClassic!==!0&&(o=G.createPortal(s,a.items.items[0].el.dom),i.push(o))}else{var p;window.Ext.isClassic===!0?p="Ext.container.Container":p="Ext.Container";var d={...s.props.style,layout:"fit",cls:"ReExtWidgetRoot"};a=window.Ext.create(p,d),t.add(a);var y=m.cloneElement(s,{ReExtParent:t});window.Ext.isClassic===!0?o=G.createPortal(y,a.el.dom):o=G.createPortal(y,a.innerElement.dom),i.push(o)}}),i}catch(s){return console.error("iteratechldren:",s.toString()),[]}}},Fe=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=s=>{let a=s.charAt(0).toUpperCase(),o=s.slice(1);var c="set"+(a+o);return c},n;window.Ext.isClassic===!0?t==="items"?(e.removeAll(!0),e.add(r)):t!=="layout"&&(n=i(t),e[n]!==void 0?e[n](r):e[t]=r):(n=i(t),e[n]!==void 0&&e[n](r))}},Be=()=>{var e;return typeof ResizeObserver<"u"?(e=new ResizeObserver(t=>{if(!(typeof window===void 0||typeof window>"u"))for(let o of t){var r=0,i=o.target.children.item(r);if(i!==null&&o.contentBoxSize){let c=o.contentBoxSize[0];var n=c.inlineSize,s=window.Ext.getCmp(i.id);if(s!==void 0)window.Ext.getCmp(i.id).setWidth(n),window.Ext.getCmp(i.id).setHeight(c.blockSize);else if(!i.classList.contains("wm")){console.log("child not found",i.id);var a=i.getAttribute("w");a!=="w"&&console.warn("child not resized",i)}}}}),e):null};async function qe(){return await new Promise(e=>{function t(){window.Ext!==void 0&&window.Ext.onReady(function(){return clearInterval(r),e(1)})}var r=setInterval(t,5)})}var Ve=(e,t,r)=>{if(typeof window>"u")return;let i=document.createElement("div");i.classList.add("wm"),i.style.zIndex=2e4,i.style.position="absolute",i.style.bottom="0px",i.style.right="0px",i.style.color="white",i.style.fontSize="10px",i.style.fontWeight="bold",i.style.fontStyle="italic",i.style.background="#B87333",i.style.padding="1px 3px 1px 1px",i.style.border="1px solid lightgray",i.style.borderRadius="3px 3px 3px 3px",i.innerText="ReExt "+t,r!==null?r.appendChild(i):e.el!==void 0&&e.el.dom.appendChild(i)};function Ge(e){const t=we();if(typeof window===void 0||typeof window>"u")return;const[r,i]=m.useState(null),[n,s]=m.useState(null),a=m.useRef(null);a.current=n;const o=()=>a.current,[c,p]=m.useState(null),d=m.useRef(null);d.current=c;const y=()=>d.current,f=m.useRef(null);var C=Be();const[T,N]=m.useState(!1);m.useEffect(()=>{try{var w=__IS_REEXT_RUNNING__;N(!0)}catch{N(!1)}},[]),m.useEffect(()=>{var w,g="false";if(!(typeof window===void 0||typeof window>"u"))return(async()=>{if(await qe(),e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]),g==="false"&&e.xtype!=="logo"){var b;y()==null?b=e.config:b=y();try{var v=Me(e.xtype,b,e,o),M=Ext.ClassManager.getByAlias("widget."+v.xtype);if(M===void 0){var fe="ReExt "+v.xtype+" could not be created";v={xtype:"label",text:fe,style:{color:"red",background:"lightgray"}}}if(v.height===void 0&&v.xtype!=="window"&&(window.Ext.isClassic===!0&&v.xtype==="grid"?v.height=0:v.height="100%"),v.width===void 0&&v.xtype!=="window"&&(window.Ext.isClassic===!0&&v.xtype==="grid"?v.width=0:v.width="100%"),window.Ext.isClassic===!0){const O=pe=>{var q=pe.el.dom.parentNode;C.observe(q)};v.listeners===void 0?v.listeners={boxready:O}:v.listeners.boxready=O}v.xtype!=="window"&&(v.renderTo=f.current),w=window.Ext.create(v),s(w),a.current=w,e.config!==void 0&&e.config.reference!==void 0&&e.ReExtParent!==void 0&&(e.ReExtParent.ReExtChildren===void 0&&(e.ReExtParent.ReExtChildren=[]),e.ReExtParent.ReExtChildren.push(w)),f.current===null?console.warn("ReExtRootRef.current,props",f.current,e):(f.current.style.background="transparent",f.current.firstChild.remove());var I=me(e.children,w,C);i(I),t.type!==null&&t.type!=="production"&&Ve(w,v.xtype,f.current),e.ready!==void 0&&e.ready(w)}catch(O){console.error(O)}}})(),()=>{g="true",!(typeof window===void 0||typeof window>"u")&&window.Ext!==void 0&&window.Ext.destroy!==void 0&&w!=null&&(s(null),window.Ext.destroy(w))}},[t.type]),m.useEffect(()=>{if(!(typeof window===void 0||typeof window>"u")&&e.config!==void 0){if(a.current!==null){e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]);for(const[I]of Object.entries(d.current)){if(Ue(I)!=null||I==="xtype")return;var w=X(d.current[I]),g=X(e.config[I]);w!=null&&delete w.listeners,g!==void 0&&w!==null&&delete g.listeners;const O=pe=>{let q=[],lr=JSON.stringify(pe,function(Er,V){if(typeof V=="object"&&V!==null){if(q.indexOf(V)!==-1)return;q.push(V)}return V});return q=null,lr};var b=O(w),v=O(g),M=ie(b,v);if(!M&&(Fe(a.current,I,g),I==="items")){var fe=me(e.children,a.current,C);i(fe)}}}p(e.config),d.current=e.config}},[e.config]);var z="",k="",K="",u="";if(!(typeof window===void 0||typeof window>"u")){if(window.Ext!==void 0&&window.Ext.versions!==null&&window.Ext.versions!==void 0){k=window.Ext.versions.core.version,u=window.Ext.ReExtTheme,z=window.Ext.ReExtLocation;var D=window.Ext.isClassic;D===!0?K="classic":K="modern"}if(!(typeof window===void 0||typeof window>"u")){var x="";if(t.type==="production"||t.type===null?x="production":x=`${t.type} - ${t.daysleft} days left`,e.xtype==="logo")return l.jsx(Ke,{reextplugin:T,rid:e.rid,reactversion:m.version,extver:k,extlocation:z,exttoolkit:K,exttheme:u,type:x,packageversion:ye.version,flexdirection:e.flexdirection,style:e.style});var h;e.style===void 0||e.style.height===void 0?h=1:h="none";var L="";if(e.className!==void 0&&(L=e.className),e.xtype==="window")return null;var E,A,$={};return e.child===!0&&($={height:"100%"}),r===null?(E={...e.style,...$,flex:h,position:"relative",display:"flex",overflow:"hidden"},A=L+" fill"):r.length===0?(E={...e.style,...$,flex:h,position:"relative",display:"flex",overflow:"hidden"},A=L+" fill"):(E={...e.style,flex:h,position:"relative",display:"flex",overflow:"hidden"},A=L),l.jsx("div",{name:"ReExtRoot-"+e.xtype,"data-rid":e.rid,className:A,style:E,ref:f,children:l.jsx("div",{className:"portalroot",style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:r!==null&&r.map(w=>w)})})}}}async function Xe(){if(typeof window===void 0||typeof window>"u")return;function e(t){t.style.width="100%",t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.padding="0",t.style.boxSizing="border-box",t.style.overflow="hidden"}document.documentElement&&e(document.documentElement),document.body&&e(document.body),document.getElementById("root")&&e(document.getElementById("root"))}function Ye(){if(!(typeof window===void 0||typeof window>"u"))return l.jsx("div",{className:"splash",style:{fontSize:"36px",border:"10px solid #0960a5",width:"100%",height:"100%",margin:0,padding:0,boxSizing:"border-box",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center"},children:l.jsx("img",{style:{height:500,width:1e3},src:"../ReExt/ReExt.png"})})}var Qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ze=Qe(()=>{}),ne=crypto,ve=e=>e instanceof CryptoKey,Y=new TextEncoder,U=new TextDecoder;function et(...e){let t=e.reduce((n,{length:s})=>n+s,0),r=new Uint8Array(t),i=0;for(let n of e)r.set(n,i),i+=n.length;return r}var tt=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r},F=e=>{let t=e;t instanceof Uint8Array&&(t=U.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return tt(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}},W=class extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(t=Error.captureStackTrace)==null||t.call(Error,this,this.constructor)}},R=class extends W{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=i,this.payload=t}},ge=class extends W{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=i,this.payload=t}},H=class extends W{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}},S=class extends W{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}},P=class extends W{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}},rt=class extends W{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}};function _(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Q(e,t){return e.name===t}function ae(e){return parseInt(e.name.slice(4),10)}function it(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function nt(e,t){if(t.length&&!t.some(r=>e.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let i=t.pop();r+=`one of ${t.join(", ")}, or ${i}.`}else t.length===2?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}function at(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Q(e.algorithm,"HMAC"))throw _("HMAC");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Q(e.algorithm,"RSASSA-PKCS1-v1_5"))throw _("RSASSA-PKCS1-v1_5");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Q(e.algorithm,"RSA-PSS"))throw _("RSA-PSS");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw _("Ed25519 or Ed448");break}case"ES256":case"ES384":case"ES512":{if(!Q(e.algorithm,"ECDSA"))throw _("ECDSA");let i=it(t);if(e.algorithm.namedCurve!==i)throw _(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}nt(e,r)}function xe(e,t,...r){var i;if(r.length>2){let n=r.pop();e+=`one of type ${r.join(", ")}, or ${n}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&((i=t.constructor)!=null&&i.name)&&(e+=` Received an instance of ${t.constructor.name}`),e}var be=(e,...t)=>xe("Key must be ",e,...t);function Ee(e,t,...r){return xe(`Key for the ${e} algorithm must be `,t,...r)}var Se=e=>ve(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Z=["CryptoKey"],ot=(...e)=>{let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let i of t){let n=Object.keys(i);if(!r||r.size===0){r=new Set(n);continue}for(let s of n){if(r.has(s))return!1;r.add(s)}}return!0},st=ot;function lt(e){return typeof e=="object"&&e!==null}function ee(e){if(!lt(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var ct=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function dt(e){let t,r;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new H('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var ut=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=dt(e),i=[t,e.ext??!1,e.key_ops??r],n={...e};return delete n.alg,delete n.use,ne.subtle.importKey("jwk",n,...i)},ft=ut,ke=e=>F(e),oe,se,$e=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Ce=async(e,t,r,i)=>{let n=e.get(t);if(n!=null&&n[i])return n[i];let s=await ft({...r,alg:i});return n?n[i]=s:e.set(t,{[i]:s}),s},pt=(e,t)=>{if($e(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?ke(r.k):(se||(se=new WeakMap),Ce(se,e,r,t))}return e},yt=(e,t)=>{if($e(e)){let r=e.export({format:"jwk"});return r.k?ke(r.k):(oe||(oe=new WeakMap),Ce(oe,e,r,t))}return e},ht={normalizePublicKey:pt,normalizePrivateKey:yt},J=e=>e==null?void 0:e[Symbol.toStringTag],wt=(e,t)=>{if(!(t instanceof Uint8Array)){if(!Se(t))throw new TypeError(Ee(e,t,...Z,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${J(t)} instances for symmetric algorithms must be of type "secret"`)}},mt=(e,t,r)=>{if(!Se(t))throw new TypeError(Ee(e,t,...Z));if(t.type==="secret")throw new TypeError(`${J(t)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&t.type==="public")throw new TypeError(`${J(t)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&t.type==="public")throw new TypeError(`${J(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&r==="verify"&&t.type==="private")throw new TypeError(`${J(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&r==="encrypt"&&t.type==="private")throw new TypeError(`${J(t)} instances for asymmetric algorithm encryption must be of type "public"`)},vt=(e,t,r)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?wt(e,t):mt(e,t,r)},gt=vt;function xt(e,t,r,i,n){if(n.crit!==void 0&&(i==null?void 0:i.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let s;r!==void 0?s=new Map([...Object.entries(r),...t.entries()]):s=t;for(let a of i.crit){if(!s.has(a))throw new H(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(s.get(a)&&i[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(i.crit)}var bt=xt;function Et(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function St(e,t,r){if(t=await ht.normalizePublicKey(t,e),ve(t))return at(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(be(t,...Z));return ne.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(be(t,...Z,"Uint8Array"))}var kt=async(e,t,r,i)=>{let n=await St(e,t,"verify");ct(e,n);let s=Et(e,n.algorithm);try{return await ne.subtle.verify(s,n,r,i)}catch{return!1}},$t=kt;async function Ct(e,t,r){if(!ee(e))throw new S("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new S('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new S("JWS Protected Header incorrect type");if(e.payload===void 0)throw new S("JWS Payload missing");if(typeof e.signature!="string")throw new S("JWS Signature missing or incorrect type");if(e.header!==void 0&&!ee(e.header))throw new S("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{let C=F(e.protected);i=JSON.parse(U.decode(C))}catch{throw new S("JWS Protected Header is invalid")}if(!st(i,e.header))throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...i,...e.header},s=bt(S,new Map([["b64",!0]]),r==null?void 0:r.crit,i,n),a=!0;if(s.has("b64")&&(a=i.b64,typeof a!="boolean"))throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:o}=n;if(typeof o!="string"||!o)throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(a){if(typeof e.payload!="string")throw new S("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new S("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof t=="function"&&(t=await t(i,e),c=!0),gt(o,t,"verify");let p=et(Y.encode(e.protected??""),Y.encode("."),typeof e.payload=="string"?Y.encode(e.payload):e.payload),d;try{d=F(e.signature)}catch{throw new S("Failed to base64url decode the signature")}if(!await $t(o,t,d,p))throw new rt;let y;if(a)try{y=F(e.payload)}catch{throw new S("Failed to base64url decode the payload")}else typeof e.payload=="string"?y=Y.encode(e.payload):y=e.payload;let f={payload:y};return e.protected!==void 0&&(f.protectedHeader=i),e.header!==void 0&&(f.unprotectedHeader=e.header),c?{...f,key:t}:f}async function jt(e,t,r){if(e instanceof Uint8Array&&(e=U.decode(e)),typeof e!="string")throw new S("Compact JWS must be a string or Uint8Array");let{0:i,1:n,2:s,length:a}=e.split(".");if(a!==3)throw new S("Invalid Compact JWS");let o=await Ct({payload:n,protected:i,signature:s},t,r),c={payload:o.payload,protectedHeader:o.protectedHeader};return typeof t=="function"?{...c,key:o.key}:c}var At=e=>Math.floor(e.getTime()/1e3),Rt=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,je=e=>{let t=Rt.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),i=t[3].toLowerCase(),n;switch(i){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*60);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*3600);break;case"day":case"days":case"d":n=Math.round(r*86400);break;case"week":case"weeks":case"w":n=Math.round(r*604800);break;default:n=Math.round(r*31557600);break}return t[1]==="-"||t[4]==="ago"?-n:n},Ae=e=>e.toLowerCase().replace(/^application\//,""),Tt=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,Pt=(e,t,r={})=>{let i;try{i=JSON.parse(U.decode(t))}catch{}if(!ee(i))throw new P("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||Ae(e.typ)!==Ae(n)))throw new R('unexpected "typ" JWT header value',i,"typ","check_failed");let{requiredClaims:s=[],issuer:a,subject:o,audience:c,maxTokenAge:p}=r,d=[...s];p!==void 0&&d.push("iat"),c!==void 0&&d.push("aud"),o!==void 0&&d.push("sub"),a!==void 0&&d.push("iss");for(let T of new Set(d.reverse()))if(!(T in i))throw new R(`missing required "${T}" claim`,i,T,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(i.iss))throw new R('unexpected "iss" claim value',i,"iss","check_failed");if(o&&i.sub!==o)throw new R('unexpected "sub" claim value',i,"sub","check_failed");if(c&&!Tt(i.aud,typeof c=="string"?[c]:c))throw new R('unexpected "aud" claim value',i,"aud","check_failed");let y;switch(typeof r.clockTolerance){case"string":y=je(r.clockTolerance);break;case"number":y=r.clockTolerance;break;case"undefined":y=0;break;default:throw new TypeError("Invalid clockTolerance option type")}let{currentDate:f}=r,C=At(f||new Date);if((i.iat!==void 0||p)&&typeof i.iat!="number")throw new R('"iat" claim must be a number',i,"iat","invalid");if(i.nbf!==void 0){if(typeof i.nbf!="number")throw new R('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>C+y)throw new R('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(i.exp!==void 0){if(typeof i.exp!="number")throw new R('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=C-y)throw new ge('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){let T=C-i.iat,N=typeof p=="number"?p:je(p);if(T-y>N)throw new ge('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(T<0-y)throw new R('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i};async function _t(e,t,r){var s;let i=await jt(e,t,r);if((s=i.protectedHeader.crit)!=null&&s.includes("b64")&&i.protectedHeader.b64===!1)throw new P("JWTs MUST NOT use unencoded payload");let n={payload:Pt(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return typeof t=="function"?{...n,key:i.key}:n}var It=F;function Dt(e){if(typeof e!="string")throw new P("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new P("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new P("Invalid JWT");if(!t)throw new P("JWTs must contain a payload");let i;try{i=It(t)}catch{throw new P("Failed to base64url decode the payload")}let n;try{n=JSON.parse(U.decode(i))}catch{throw new P("Failed to parse the decoded payload as JSON")}if(!ee(n))throw new P("Invalid JWT Claims Set");return n}function te(e){var t=new Error(e);return t.source="ulid",t}var le="0123456789ABCDEFGHJKMNPQRSTVWXYZ",B=le.length,Re=Math.pow(2,48)-1,Ot=10,Wt=16;function Ht(e){var t=Math.floor(e()*B);return t===B&&(t=B-1),le.charAt(t)}function Jt(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>Re)throw te("cannot encode time greater than "+Re);if(e<0)throw te("time must be positive");if(Number.isInteger(e)===!1)throw te("time must be an integer");for(var r=void 0,i="";t>0;t--)r=e%B,i=le.charAt(r)+i,e=(e-r)/B;return i}function Nt(e,t){for(var r="";e>0;e--)r=Ht(t)+r;return r}function zt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments[1];t||(t=typeof window<"u"?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};try{var i=Ze();return function(){return i.randomBytes(1).readUInt8()/255}}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw te("secure crypto unusable, insecure Math.random not allowed")}function Kt(e){return e||(e=zt()),function(t){return isNaN(t)&&(t=Date.now()),Jt(t,Ot)+Nt(Wt,e)}}Kt();var ce;function Lt(e){return ce==null?void 0:ce.get(e)}var de;function Mt(e){return de==null?void 0:de.get(e)}var ue;function Ut(e,t){var r;return(r=ue==null?void 0:ue.get(e))==null?void 0:r.get(t)}function Ft(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function re(e,t,r,i,n){let s=n&&"input"in n?n.input:r.value,a=(n==null?void 0:n.expected)??e.expects??null,o=(n==null?void 0:n.received)??Ft(s),c={kind:e.kind,type:e.type,input:s,expected:a,received:o,message:`Invalid ${t}: ${a?`Expected ${a} but r`:"R"}eceived ${o}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},p=e.kind==="schema",d=(n==null?void 0:n.message)??e.message??Ut(e.reference,c.lang)??(p?Mt(c.lang):null)??i.message??Lt(c.lang);d&&(c.message=typeof d=="function"?d(c):d),p&&(r.typed=!1),r.issues?r.issues.push(c):r.issues=[c]}function Te(e){return{kind:"transformation",type:"brand",reference:Te,async:!1,name:e,_run(t){return t}}}function Bt(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Pe(e){return{kind:"schema",type:"number",reference:Pe,expects:"number",async:!1,message:e,_run(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:re(this,"type",t,r),t}}}function _e(e,...t){let r={kind:"schema",type:"optional",reference:_e,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(i,n){return i.value===void 0&&("default"in this&&(i.value=Bt(this,i,n)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,n)}};return 0 in t&&(r.default=t[0]),r}function Ie(e,t){return{kind:"schema",type:"strict_object",reference:Ie,expects:"Object",async:!1,entries:e,message:t,_run(r,i){var s;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let a in this.entries){let o=n[a],c=this.entries[a]._run({typed:!1,value:o},i);if(c.issues){let p={type:"object",origin:"value",input:n,key:a,value:o};for(let d of c.issues)d.path?d.path.unshift(p):d.path=[p],(s=r.issues)==null||s.push(d);if(r.issues||(r.issues=c.issues),i.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),(c.value!==void 0||a in n)&&(r.value[a]=c.value)}if(!r.issues||!i.abortEarly){for(let a in n)if(!(a in this.entries)){let o=n[a];re(this,"type",r,i,{input:o,expected:"never",path:[{type:"object",origin:"value",input:n,key:a,value:o}]});break}}}else re(this,"type",r,i);return r}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,_run(t,r){return typeof t.value=="string"?t.typed=!0:re(this,"type",t,r),t}}}function qt(...e){return{...e[0],pipe:e,_run(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i._run(t,r))}return t}}}var Vt=qt(De(),Te("lid"));Ie({id:Vt,ver:_e(Pe())});var Gt=e=>()=>e*48271%2147483647/2147483647,Xt=e=>typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(typeof e=="string"?e:String.fromCharCode(...e)),Yt=e=>typeof Buffer<"u"?Buffer.from(e,"base64").toString():atob(e),Qt=(e,t)=>{let r=Gt(t),i=new TextEncoder().encode(e).map(n=>n^Math.floor(r()*256));return Xt(i)},Zt=e=>e.split("").reverse().join(""),er=e=>typeof e=="object"&&!!e&&"sub"in e&&"exp"in e&&typeof e.sub=="string"&&typeof e.exp=="number",tr=async e=>{let t=Zt(Yt(e));return{decoded:Dt(t),jwt:t}},rr=async e=>{let{decoded:t,jwt:r}=await tr(e);if(!er(t))throw new Error("Invalid license key");let{sub:i,exp:n}=t,s=new TextEncoder().encode(Qt(i,n));return await _t(r,s),t};function ir({r:e,v:t,t:r}){const i=we();if(m.useEffect(()=>{e!==void 0&&e.toLowerCase().includes("ehsug")?i.setType("production"):i.setType(r)},[]),m.useEffect(()=>{const n=async a=>{if(a===void 0)return{type:"nokey",daysleft:0};try{const o=await rr(a),d=new Date(o.exp*1e3)-new Date,y=Math.floor(d/(1e3*60*60*24));return y>0?{type:"trial",daysleft:y}:{type:"expired",daysleft:0}}catch(o){return o.message.includes("claim timestamp check failed")?{type:"expired",daysleft:0}:{type:"invalidkey",daysleft:0}}},s=async()=>{var a=await n(e);switch(i.setType(a.type),i.setDaysLeft(a.daysleft),a.type){case"production":case"trial":i.setTrialDialog(!1);break;case"nokey":case"expired":case"invalidkey":default:i.setTrialDialog(!0);break}};i.type!==null&&i.type!=="production"&&s()},[i.type]),i.type!=="production"&&i.trialdialog===!0)return l.jsx("div",{style:{zIndex:2e5,fontSize:"22px",background:"rgb(211,211,211,.4)",color:"black",display:"flex",flexDirection:"column",position:"absolute",left:"50%",width:"100%",height:"100%",transform:"translateX(-50%)",padding:"10px 10px 10px 10px",border:"1px solid black"},children:l.jsxs("div",{style:{height:"100%",display:"flex",padding:"10px 10px 10px 10px",flexDirection:"column",margin:"40px",borderRadius:"5px",border:"1px solid gray",background:"white"},children:[l.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[l.jsx("img",{style:{width:160},src:"../ReExt/ReExt.png"}),l.jsxs("div",{style:{margin:"0 0 0 20px"},children:["Welcome to the ReExt v",t," Trial"]})]}),i.type==="trial"||i.type==="nokey"&&l.jsxs(l.Fragment,{children:[l.jsxs("div",{style:{margin:"10px 0 10px 0",fontSize:"18px"},children:["This is a 30 day trial version of ReExt.",l.jsx("br",{}),"Without a valid trial key, this dialog will appear.",l.jsx("br",{}),l.jsx("br",{}),"To have a trial key emailed to you, fill in this form and click 'Get Trial Key'."]}),l.jsx("div",{style:{xwidth:"100%",flex:1,display:"flex",border:"0px solid red"},children:l.jsx("iframe",{style:{width:"100%",margin:"0 0 10px 0",flex:1,border:"0px solid lightgray"},src:"https://www.sencha.com/forms/reext/trial-reext.php"})}),l.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},children:[l.jsx("div",{style:{fontSize:"12px"},children:i.type}),l.jsx("button",{style:{fontSize:"18px",padding:"5px 5px 5px 5px"},onClick:()=>{i.setTrialDialog(!1)},children:"Close"})]})]}),i.type==="expired"&&l.jsx(l.Fragment,{children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[l.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key has expired"}),l.jsx("div",{children:"Contact Sencha Sales"}),l.jsx("div",{children:l.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})}),i.type==="invalidkey"&&l.jsx(l.Fragment,{children:l.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[l.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key is invalid"}),l.jsx("div",{children:"Contact Sencha Sales"}),l.jsx("div",{children:l.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})})]})})}async function nr(e){try{let D=async(E,A,$)=>await new Promise(w=>{window.Ext.onReady(function(){return window.Ext.ReExtLocation=$,window.Ext.ReExtTheme=E,window.Ext.ReExtLi=!0,w(1)})}),x=async E=>typeof window===void 0||typeof window>"u"?void 0:await new Promise((A,$)=>{let w=document.getElementsByTagName("HEAD")[0];var g=!1;for(let b=0;b<w.childNodes.length;b++)w.childNodes[b].src===E&&(g=!0);if(g===!1){let b=document.createElement("script");b.addEventListener("load",()=>A(1)),b.addEventListener("error",()=>{var v=`${E} (js) | ||
(function(j,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],s):(j=typeof globalThis<"u"?globalThis:j||self,s(j.ReExt={},j.jsxRuntime,j.React,j.ReactDOM))})(this,function(j,s,m,G){"use strict";const ye={name:"@sencha/reext",version:"1.0.40",description:"ReExt - Sencha Ext JS components in React",types:"./dist/ReExt/types.d.ts",module:"./dist/reext.es.js",scripts:{b:"npm run buildclonedeep && npm run buildisequal && npm run buildfill && npm run buildgetconfig && npm run buildglobalprovider && npm run buildisevent && npm run builditeratechildren && npm run buildloadextjsfiles && npm run buildpropupdate && npm run buildresizeobserver && npm run builduntilextloaded && npm run buildwatermark",buildplugin:"esbuild ./src/lib/modules/vite-plugin-reext.js --format=esm --bundle --minify --outfile=./src/lib/vite-plugin-reext.js --platform=node",buildclonedeep:"esbuild ./src/lib/modules/cloneDeep.jsx --format=esm --bundle --minify --outfile=./src/lib/cloneDeep.js",buildisequal:"esbuild ./src/lib/modules/isEqual.jsx --format=esm --bundle --minify --outfile=./src/lib/isEqual.js",buildfill:"esbuild ./src/lib/modules/Fill.jsx --format=esm --bundle --minify --outfile=./src/lib/Fill.js",buildgetconfig:"esbuild ./src/lib/modules/getconfig.jsx --format=esm --bundle --minify --outfile=./src/lib/getconfig.js",buildglobalprovider:"esbuild ./src/lib/modules/GlobalProvider.jsx --format=esm --minify --outfile=./src/lib/GlobalProvider.js --inject:./src/lib/modules/react-shim.js",buildisevent:"esbuild ./src/lib/modules/isevent.jsx --format=esm --bundle --minify --outfile=./src/lib/isevent.js",builditeratechildren:"esbuild ./src/lib/modules/iteratechildren.jsx --format=esm --bundle --minify --outfile=./src/lib/iteratechildren.js --external:react --external:react-dom",buildloadextjsfiles:"esbuild ./src/lib/modules/loadextjsfiles.jsx --format=esm --bundle --minify --outfile=./src/lib/loadextjsfiles.js",buildpropupdate:"esbuild ./src/lib/modules/propupdate.jsx --format=esm --bundle --minify --outfile=./src/lib/propupdate.js",buildresizeobserver:"esbuild ./src/lib/modules/resizeobserver.jsx --format=esm --bundle --minify --outfile=./src/lib/resizeobserver.js",builduntilextloaded:"esbuild ./src/lib/modules/untilextloaded.jsx --format=esm --bundle --minify --outfile=./src/lib/untilextloaded.js",buildwatermark:"esbuild ./src/lib/modules/watermark.jsx --format=esm --bundle --minify --outfile=./src/lib/watermark.js",preinstall:"node ./dist/scripts/preinstall.js",postinstall:"node ./dist/scripts/postinstall.js",prepublishOnly:"node ./public/scripts/prepublish.js",postpack:"node ./public/scripts/postpack.js",postpublish:"node ./public/scripts/postpublish.js",pack:"npm pack --pack-destination zip",dev:"vite",builddev:"vite build -m development",build:"vite build",test:"vitest run",watch:"vitest",coverage:"vitest run --coverage",lint:"eslint . --ext js,jsx --report-unused-disable-directives --max-warnings 0"},author:{name:"Sencha, Inc.",email:"marc.gusmano@sencha.com",url:"http://www.sencha.com"},homepage:"https://www.sencha.com/products/reext/",keywords:["React","NextJS","Sencha","ExtJS","Components","ReExt"],license:"MIT",exports:{".":{import:"./dist/reext.es.js"}},devDependencies:{"@vitejs/plugin-react-swc":"^3.7.0",eslint:"8.57.0","eslint-plugin-react":"^7.35.0","eslint-plugin-react-hooks":"^4.6.2","eslint-plugin-react-refresh":"^0.4.9",vite:"^5.4.1"},dependencies:{react:"^18.3.1","react-dom":"^18.3.1"}},We=(e,t)=>{for(var r in e)typeof e[r]=="function"&&function(i,n){var l=r;e[r]=function(){t===!0&&console.log("---"),console.log("globalState."+l+" payload:",arguments[0]),t===!0&&console.log(new Error().stack),t===!0&&console.log("---");var a=n.apply(this,arguments);return a}}(r,e[r])},He=async(e,t,r)=>{console.log("dispatch:",e.type,e.payload),r.dispatchStack&&console.log(new Error().stack)},Je=(e,t,r)=>{const[i,n]=m.useReducer(e,t),l=m.useRef(null);var a=r.middleware;a===void 0&&(a=[]);var o=r.middlewareafter;return o===void 0&&(o=[]),m.useEffect(()=>{o.map(c=>c(l.current,i))},[o,i]),[i,c=>{a.map(p=>p(c,i,r)),l.current=c,n(c)}]},he=m.createContext(),we=()=>m.useContext(he),Ne=(e,t)=>{var r={...e};return r[t.type.toLowerCase()]=t.payload,window.vscodeapi!==void 0&&vscodeapi.setState(r),r},ze=e=>{if(e===void 0)return;var t=e.types,r={};for(let o in t)t.hasOwnProperty(o)&&(r["set"+o]=c=>l({type:o,payload:c}));var i={};for(let o in t)t.hasOwnProperty(o)&&(i[o.toLowerCase()]=t[o].value);m.useEffect(()=>{e.dispatchTrace&&e.middleware.push(He)},[e]),e.actionTrace&&We(r,e.actionStack);const[n,l]=Je(Ne,i,e),a=(o,c)=>{var p={};for(const[d]of Object.entries(c))p[d]=o[d];return p};return m.createElement(he.Provider,{value:{...a(n,i),...r}},e.children)};function X(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e);if(Array.isArray(e)){let t=[];for(let r=0;r<e.length;r++)t[r]=X(e[r]);return t}if(e instanceof Object){let t={};for(let r in e)e.hasOwnProperty(r)&&(t[r]=X(e[r]));return t}return e}function ie(e,t){if(e===t)return!0;if(e==null||t==null)return e===t;if(typeof e!=typeof t)return!1;if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(!ie(e[r],t[r]))return!1;return!0}if(e instanceof Object&&t instanceof Object){let r=Object.keys(e),i=Object.keys(t);if(r.length!==i.length)return!1;for(let n of r)if(!t.hasOwnProperty(n)||!ie(e[n],t[n]))return!1;return!0}return!1}function Ke({reextplugin:e,rid:t,reactversion:r,extver:i,extlocation:n,exttoolkit:l,exttheme:a,type:o,packageversion:c,style:p,flexdirection:d,...w}){return s.jsxs("div",{name:"ReExtRootLogo","data-rid":w.rid,style:{display:"flex",flexDirection:d,alignItems:"center",color:"black",padding:5,...p},children:[s.jsx("img",{style:{height:40,width:80},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 3px"},children:[s.jsx("div",{style:{margin:"0 0 0 1px",fontSize:12,color:"black"},children:s.jsx("a",{style:w.style,target:"_blank",rel:"noreferrer",href:"https://www.npmjs.com/package/@sencha/reext",children:s.jsxs("i",{children:["ReExt ",c]})})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:[o,", reextplugin: ",e.toString()]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["React: ",s.jsx("b",{children:r})]})}),s.jsx("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:s.jsxs("span",{style:{margin:"0 0 0 0"},children:["ExtJS: ",s.jsxs("b",{children:[i," (",n,")"]})]})}),s.jsxs("div",{style:{fontSize:"10px",margin:"2px 0 0 0"},children:[s.jsxs("span",{style:{margin:"0 0 0 0"},children:["toolkit: ",s.jsx("b",{children:l})]}),s.jsxs("span",{style:{margin:"0 0 0 5px"},children:["theme: ",s.jsx("b",{children:a})]})]})]})]})}var Le=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),n=e.charAt(2).toUpperCase();i===n&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},Me=(e,t,r,i)=>{if(!(typeof window===void 0||typeof window>"u")){var n={};if(n.xtype=e,t!==void 0)for(let[a,o]of Object.entries(t))n[a]=o;if(r.references===!0&&(n.controller=window.Ext.create("Ext.app.ViewController")),n.store!==void 0&&(n.store.listeners!==void 0?n.store.listeners.load===void 0&&(n.store.listeners.load=a=>{r.storeloaded!==void 0&&r.storeloaded(a,i())}):n.store.listeners={load:a=>{r.storeloaded!==void 0&&r.storeloaded(a,i())}}),n.listeners===void 0){n.listeners={};for(let[a,o]of Object.entries(r)){var l=Le(a);l!==null&&(n.listeners[l]=function(){o(...arguments)})}Object.keys(n.listeners).length===0&&delete n.listeners}return n}},Ue=e=>{var t=null,r=e.slice(0,2);if(r==="on"){var i=e.charAt(2),n=e.charAt(2).toUpperCase();i===n&&(t=e.slice(2).toLowerCase())}return window.Ext.isClassic===!0&&t==="tap"&&(t="click"),t},me=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=[],n=[];if(e===void 0)return[];e.length===void 0?n.push(e):n=e;try{return n.map(l=>{var a,o;if(t.xtype==="tabpanel"){var c;window.Ext.ReExtTheme==="classic"?c="Ext.panel.Panel":c="Ext.Panel",a=window.Ext.create(c,{layout:"fit",title:l.props.title,cls:"ReExtTabChildRoot",items:[{xtype:"component",listeners:{boxready:f=>{o=G.createPortal(l,f.el.dom),i.push(o);var C=f.el.dom.parentNode;r.observe(C)}},style:{backgroundColor:"transparent",display:"flex",height:"100%",width:"100%"}}]}),t.add(a),window.Ext.isClassic===!0?p="Ext.container.Container":p="Ext.Container",window.Ext.isClassic!==!0&&(o=G.createPortal(l,a.items.items[0].el.dom),i.push(o))}else{var p;window.Ext.isClassic===!0?p="Ext.container.Container":p="Ext.Container";var d={...l.props.style,layout:"fit",cls:"ReExtWidgetRoot"};a=window.Ext.create(p,d),t.add(a);var w=m.cloneElement(l,{ReExtParent:t});window.Ext.isClassic===!0?o=G.createPortal(w,a.el.dom):o=G.createPortal(w,a.innerElement.dom),i.push(o)}}),i}catch(l){return console.error("iteratechldren:",l.toString()),[]}}},Fe=(e,t,r)=>{if(!(typeof window===void 0||typeof window>"u")){var i=l=>{let a=l.charAt(0).toUpperCase(),o=l.slice(1);var c="set"+(a+o);return c},n;window.Ext.isClassic===!0?t==="items"?(e.removeAll(!0),e.add(r)):t!=="layout"&&(n=i(t),e[n]!==void 0?e[n](r):e[t]=r):(n=i(t),e[n]!==void 0&&e[n](r))}},Be=()=>{var e;return typeof ResizeObserver<"u"?(e=new ResizeObserver(t=>{if(!(typeof window===void 0||typeof window>"u"))for(let o of t){var r=0,i=o.target.children.item(r);if(i!==null&&o.contentBoxSize){let c=o.contentBoxSize[0];var n=c.inlineSize,l=window.Ext.getCmp(i.id);if(l!==void 0)window.Ext.getCmp(i.id).setWidth(n),window.Ext.getCmp(i.id).setHeight(c.blockSize);else if(!i.classList.contains("wm")){console.log("child not found",i.id);var a=i.getAttribute("w");a!=="w"&&console.warn("child not resized",i)}}}}),e):null};async function qe(){return await new Promise(e=>{function t(){window.Ext!==void 0&&window.Ext.onReady(function(){return clearInterval(r),e(1)})}var r=setInterval(t,5)})}var Ve=(e,t,r)=>{if(typeof window>"u")return;let i=document.createElement("div");i.classList.add("wm"),i.style.zIndex=2e4,i.style.position="absolute",i.style.bottom="0px",i.style.right="0px",i.style.color="white",i.style.fontSize="10px",i.style.fontWeight="bold",i.style.fontStyle="italic",i.style.background="#B87333",i.style.padding="1px 3px 1px 1px",i.style.border="1px solid lightgray",i.style.borderRadius="3px 3px 3px 3px",i.innerText="ReExt "+t,r!==null?r.appendChild(i):e.el!==void 0&&e.el.dom.appendChild(i)};function Ge(e){const t=we();if(typeof window===void 0||typeof window>"u")return;const[r,i]=m.useState(null),[n,l]=m.useState(null),a=m.useRef(null);a.current=n;const o=()=>a.current,[c,p]=m.useState(null),d=m.useRef(null);d.current=c;const w=()=>d.current,f=m.useRef(null);var C=Be();const[T,N]=m.useState(!1);m.useEffect(()=>{try{var h=__IS_REEXT_RUNNING__;N(!0)}catch{N(!1)}},[]),m.useEffect(()=>{var h,g="false";if(!(typeof window===void 0||typeof window>"u"))return(async()=>{if(await qe(),e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]),g==="false"&&e.xtype!=="logo"){var b;w()==null?b=e.config:b=w();try{var v=Me(e.xtype,b,e,o),M=Ext.ClassManager.getByAlias("widget."+v.xtype);if(M===void 0){var fe="ReExt "+v.xtype+" could not be created";v={xtype:"label",text:fe,style:{color:"red",background:"lightgray"}}}if(v.height===void 0&&v.xtype!=="window"&&(window.Ext.isClassic===!0&&v.xtype==="grid"?v.height=0:v.height="100%"),v.width===void 0&&v.xtype!=="window"&&(window.Ext.isClassic===!0&&v.xtype==="grid"?v.width=0:v.width="100%"),window.Ext.isClassic===!0){const O=pe=>{var q=pe.el.dom.parentNode;C.observe(q)};v.listeners===void 0?v.listeners={boxready:O}:v.listeners.boxready=O}v.xtype!=="window"&&(v.renderTo=f.current),h=window.Ext.create(v),l(h),a.current=h,e.config!==void 0&&e.config.reference!==void 0&&e.ReExtParent!==void 0&&(e.ReExtParent.ReExtChildren===void 0&&(e.ReExtParent.ReExtChildren=[]),e.ReExtParent.ReExtChildren.push(h)),f.current===null?console.warn("ReExtRootRef.current,props",f.current,e):(f.current.style.background="transparent",f.current.firstChild.remove());var I=me(e.children,h,C);i(I),t.type!==null&&t.type!=="production"&&Ve(h,v.xtype,f.current),e.ready!==void 0&&e.ready(h)}catch(O){console.error(O)}}})(),()=>{g="true",!(typeof window===void 0||typeof window>"u")&&window.Ext!==void 0&&window.Ext.destroy!==void 0&&h!=null&&(l(null),window.Ext.destroy(h))}},[t.type]),m.useEffect(()=>{if(!(typeof window===void 0||typeof window>"u")&&e.config!==void 0){if(a.current!==null){e.children!==void 0&&e.config.items===void 0&&(e.config.items=[]);for(const[I]of Object.entries(d.current)){if(Ue(I)!=null||I==="xtype")return;var h=X(d.current[I]),g=X(e.config[I]);h!=null&&delete h.listeners,g!==void 0&&h!==null&&delete g.listeners;const O=pe=>{let q=[],lr=JSON.stringify(pe,function(Er,V){if(typeof V=="object"&&V!==null){if(q.indexOf(V)!==-1)return;q.push(V)}return V});return q=null,lr};var b=O(h),v=O(g),M=ie(b,v);if(!M&&(Fe(a.current,I,g),I==="items")){var fe=me(e.children,a.current,C);i(fe)}}}p(e.config),d.current=e.config}},[e.config]);var z="",k="",K="",u="";if(!(typeof window===void 0||typeof window>"u")){if(window.Ext!==void 0&&window.Ext.versions!==null&&window.Ext.versions!==void 0){k=window.Ext.versions.core.version,u=window.Ext.ReExtTheme,z=window.Ext.ReExtLocation;var D=window.Ext.isClassic;D===!0?K="classic":K="modern"}if(!(typeof window===void 0||typeof window>"u")){var x="";if(t.type==="production"||t.type===null?x="production":x=`${t.type} - ${t.daysleft} days left`,e.xtype==="logo")return s.jsx(Ke,{reextplugin:T,rid:e.rid,reactversion:m.version,extver:k,extlocation:z,exttoolkit:K,exttheme:u,type:x,packageversion:ye.version,flexdirection:e.flexdirection,style:e.style});var y;e.style===void 0||e.style.height===void 0?y=1:y="none";var L="";if(e.className!==void 0&&(L=e.className),e.xtype==="window")return null;var E,A,$={};return e.child===!0&&($={height:"100%"}),r===null?(E={...e.style,...$,flex:y,position:"relative",display:"flex",overflow:"hidden"},A=L+" fill"):r.length===0?(E={...e.style,...$,flex:y,position:"relative",display:"flex",overflow:"hidden"},A=L+" fill"):(E={...e.style,flex:y,position:"relative",display:"flex",overflow:"hidden"},A=L),s.jsx("div",{name:"ReExtRoot-"+e.xtype,"data-rid":e.rid,className:A,style:E,ref:f,children:s.jsx("div",{className:"portalroot",style:{display:"flex",flex:1,alignItems:"center",justifyContent:"center"},children:r!==null&&r.map(h=>h)})})}}}async function Xe(){if(typeof window===void 0||typeof window>"u")return;function e(t){t.style.width="100%",t.style.height="100%",t.style.margin="0",t.style.padding="0",t.style.padding="0",t.style.boxSizing="border-box",t.style.overflow="hidden"}document.documentElement&&e(document.documentElement),document.body&&e(document.body),document.getElementById("root")&&e(document.getElementById("root"))}function Ye(){if(!(typeof window===void 0||typeof window>"u"))return s.jsx("div",{className:"splash",style:{fontSize:"36px",border:"10px solid #0960a5",width:"100%",height:"100%",margin:0,padding:0,boxSizing:"border-box",overflow:"hidden",display:"flex",flexDirection:"column",flex:1,justifyContent:"center",alignItems:"center"},children:s.jsx("img",{style:{height:500,width:1e3},src:"../ReExt/ReExt.png"})})}var Qe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Ze=Qe(()=>{}),ne=crypto,ve=e=>e instanceof CryptoKey,Y=new TextEncoder,U=new TextDecoder;function et(...e){let t=e.reduce((n,{length:l})=>n+l,0),r=new Uint8Array(t),i=0;for(let n of e)r.set(n,i),i+=n.length;return r}var tt=e=>{let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r},F=e=>{let t=e;t instanceof Uint8Array&&(t=U.decode(t)),t=t.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"");try{return tt(t)}catch{throw new TypeError("The input to be decoded is not correctly encoded.")}},W=class extends Error{static get code(){return"ERR_JOSE_GENERIC"}constructor(e){var t;super(e),this.code="ERR_JOSE_GENERIC",this.name=this.constructor.name,(t=Error.captureStackTrace)==null||t.call(Error,this,this.constructor)}},R=class extends W{static get code(){return"ERR_JWT_CLAIM_VALIDATION_FAILED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_CLAIM_VALIDATION_FAILED",this.claim=r,this.reason=i,this.payload=t}},ge=class extends W{static get code(){return"ERR_JWT_EXPIRED"}constructor(e,t,r="unspecified",i="unspecified"){super(e),this.code="ERR_JWT_EXPIRED",this.claim=r,this.reason=i,this.payload=t}},H=class extends W{constructor(){super(...arguments),this.code="ERR_JOSE_NOT_SUPPORTED"}static get code(){return"ERR_JOSE_NOT_SUPPORTED"}},S=class extends W{constructor(){super(...arguments),this.code="ERR_JWS_INVALID"}static get code(){return"ERR_JWS_INVALID"}},P=class extends W{constructor(){super(...arguments),this.code="ERR_JWT_INVALID"}static get code(){return"ERR_JWT_INVALID"}},rt=class extends W{constructor(){super(...arguments),this.code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED",this.message="signature verification failed"}static get code(){return"ERR_JWS_SIGNATURE_VERIFICATION_FAILED"}};function _(e,t="algorithm.name"){return new TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function Q(e,t){return e.name===t}function ae(e){return parseInt(e.name.slice(4),10)}function it(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw new Error("unreachable")}}function nt(e,t){if(t.length&&!t.some(r=>e.usages.includes(r))){let r="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let i=t.pop();r+=`one of ${t.join(", ")}, or ${i}.`}else t.length===2?r+=`one of ${t[0]} or ${t[1]}.`:r+=`${t[0]}.`;throw new TypeError(r)}}function at(e,t,...r){switch(t){case"HS256":case"HS384":case"HS512":{if(!Q(e.algorithm,"HMAC"))throw _("HMAC");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!Q(e.algorithm,"RSASSA-PKCS1-v1_5"))throw _("RSASSA-PKCS1-v1_5");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!Q(e.algorithm,"RSA-PSS"))throw _("RSA-PSS");let i=parseInt(t.slice(2),10);if(ae(e.algorithm.hash)!==i)throw _(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":{if(e.algorithm.name!=="Ed25519"&&e.algorithm.name!=="Ed448")throw _("Ed25519 or Ed448");break}case"ES256":case"ES384":case"ES512":{if(!Q(e.algorithm,"ECDSA"))throw _("ECDSA");let i=it(t);if(e.algorithm.namedCurve!==i)throw _(i,"algorithm.namedCurve");break}default:throw new TypeError("CryptoKey does not support this operation")}nt(e,r)}function xe(e,t,...r){var i;if(r.length>2){let n=r.pop();e+=`one of type ${r.join(", ")}, or ${n}.`}else r.length===2?e+=`one of type ${r[0]} or ${r[1]}.`:e+=`of type ${r[0]}.`;return t==null?e+=` Received ${t}`:typeof t=="function"&&t.name?e+=` Received function ${t.name}`:typeof t=="object"&&t!=null&&((i=t.constructor)!=null&&i.name)&&(e+=` Received an instance of ${t.constructor.name}`),e}var be=(e,...t)=>xe("Key must be ",e,...t);function Ee(e,t,...r){return xe(`Key for the ${e} algorithm must be `,t,...r)}var Se=e=>ve(e)?!0:(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Z=["CryptoKey"],ot=(...e)=>{let t=e.filter(Boolean);if(t.length===0||t.length===1)return!0;let r;for(let i of t){let n=Object.keys(i);if(!r||r.size===0){r=new Set(n);continue}for(let l of n){if(r.has(l))return!1;r.add(l)}}return!0},st=ot;function lt(e){return typeof e=="object"&&e!==null}function ee(e){if(!lt(e)||Object.prototype.toString.call(e)!=="[object Object]")return!1;if(Object.getPrototypeOf(e)===null)return!0;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var ct=(e,t)=>{if(e.startsWith("RS")||e.startsWith("PS")){let{modulusLength:r}=t.algorithm;if(typeof r!="number"||r<2048)throw new TypeError(`${e} requires key modulusLength to be 2048 bits or larger`)}};function dt(e){let t,r;switch(e.kty){case"RSA":{switch(e.alg){case"PS256":case"PS384":case"PS512":t={name:"RSA-PSS",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RS256":case"RS384":case"RS512":t={name:"RSASSA-PKCS1-v1_5",hash:`SHA-${e.alg.slice(-3)}`},r=e.d?["sign"]:["verify"];break;case"RSA-OAEP":case"RSA-OAEP-256":case"RSA-OAEP-384":case"RSA-OAEP-512":t={name:"RSA-OAEP",hash:`SHA-${parseInt(e.alg.slice(-3),10)||1}`},r=e.d?["decrypt","unwrapKey"]:["encrypt","wrapKey"];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"EC":{switch(e.alg){case"ES256":t={name:"ECDSA",namedCurve:"P-256"},r=e.d?["sign"]:["verify"];break;case"ES384":t={name:"ECDSA",namedCurve:"P-384"},r=e.d?["sign"]:["verify"];break;case"ES512":t={name:"ECDSA",namedCurve:"P-521"},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:"ECDH",namedCurve:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}case"OKP":{switch(e.alg){case"EdDSA":t={name:e.crv},r=e.d?["sign"]:["verify"];break;case"ECDH-ES":case"ECDH-ES+A128KW":case"ECDH-ES+A192KW":case"ECDH-ES+A256KW":t={name:e.crv},r=e.d?["deriveBits"]:[];break;default:throw new H('Invalid or unsupported JWK "alg" (Algorithm) Parameter value')}break}default:throw new H('Invalid or unsupported JWK "kty" (Key Type) Parameter value')}return{algorithm:t,keyUsages:r}}var ut=async e=>{if(!e.alg)throw new TypeError('"alg" argument is required when "jwk.alg" is not present');let{algorithm:t,keyUsages:r}=dt(e),i=[t,e.ext??!1,e.key_ops??r],n={...e};return delete n.alg,delete n.use,ne.subtle.importKey("jwk",n,...i)},ft=ut,ke=e=>F(e),oe,se,$e=e=>(e==null?void 0:e[Symbol.toStringTag])==="KeyObject",Ce=async(e,t,r,i)=>{let n=e.get(t);if(n!=null&&n[i])return n[i];let l=await ft({...r,alg:i});return n?n[i]=l:e.set(t,{[i]:l}),l},pt=(e,t)=>{if($e(e)){let r=e.export({format:"jwk"});return delete r.d,delete r.dp,delete r.dq,delete r.p,delete r.q,delete r.qi,r.k?ke(r.k):(se||(se=new WeakMap),Ce(se,e,r,t))}return e},yt=(e,t)=>{if($e(e)){let r=e.export({format:"jwk"});return r.k?ke(r.k):(oe||(oe=new WeakMap),Ce(oe,e,r,t))}return e},ht={normalizePublicKey:pt,normalizePrivateKey:yt},J=e=>e==null?void 0:e[Symbol.toStringTag],wt=(e,t)=>{if(!(t instanceof Uint8Array)){if(!Se(t))throw new TypeError(Ee(e,t,...Z,"Uint8Array"));if(t.type!=="secret")throw new TypeError(`${J(t)} instances for symmetric algorithms must be of type "secret"`)}},mt=(e,t,r)=>{if(!Se(t))throw new TypeError(Ee(e,t,...Z));if(t.type==="secret")throw new TypeError(`${J(t)} instances for asymmetric algorithms must not be of type "secret"`);if(r==="sign"&&t.type==="public")throw new TypeError(`${J(t)} instances for asymmetric algorithm signing must be of type "private"`);if(r==="decrypt"&&t.type==="public")throw new TypeError(`${J(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&r==="verify"&&t.type==="private")throw new TypeError(`${J(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&r==="encrypt"&&t.type==="private")throw new TypeError(`${J(t)} instances for asymmetric algorithm encryption must be of type "public"`)},vt=(e,t,r)=>{e.startsWith("HS")||e==="dir"||e.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(e)?wt(e,t):mt(e,t,r)},gt=vt;function xt(e,t,r,i,n){if(n.crit!==void 0&&(i==null?void 0:i.crit)===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!i||i.crit===void 0)return new Set;if(!Array.isArray(i.crit)||i.crit.length===0||i.crit.some(a=>typeof a!="string"||a.length===0))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');let l;r!==void 0?l=new Map([...Object.entries(r),...t.entries()]):l=t;for(let a of i.crit){if(!l.has(a))throw new H(`Extension Header Parameter "${a}" is not recognized`);if(n[a]===void 0)throw new e(`Extension Header Parameter "${a}" is missing`);if(l.get(a)&&i[a]===void 0)throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(i.crit)}var bt=xt;function Et(e,t){let r=`SHA-${e.slice(-3)}`;switch(e){case"HS256":case"HS384":case"HS512":return{hash:r,name:"HMAC"};case"PS256":case"PS384":case"PS512":return{hash:r,name:"RSA-PSS",saltLength:e.slice(-3)>>3};case"RS256":case"RS384":case"RS512":return{hash:r,name:"RSASSA-PKCS1-v1_5"};case"ES256":case"ES384":case"ES512":return{hash:r,name:"ECDSA",namedCurve:t.namedCurve};case"EdDSA":return{name:t.name};default:throw new H(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}async function St(e,t,r){if(t=await ht.normalizePublicKey(t,e),ve(t))return at(t,e,r),t;if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw new TypeError(be(t,...Z));return ne.subtle.importKey("raw",t,{hash:`SHA-${e.slice(-3)}`,name:"HMAC"},!1,[r])}throw new TypeError(be(t,...Z,"Uint8Array"))}var kt=async(e,t,r,i)=>{let n=await St(e,t,"verify");ct(e,n);let l=Et(e,n.algorithm);try{return await ne.subtle.verify(l,n,r,i)}catch{return!1}},$t=kt;async function Ct(e,t,r){if(!ee(e))throw new S("Flattened JWS must be an object");if(e.protected===void 0&&e.header===void 0)throw new S('Flattened JWS must have either of the "protected" or "header" members');if(e.protected!==void 0&&typeof e.protected!="string")throw new S("JWS Protected Header incorrect type");if(e.payload===void 0)throw new S("JWS Payload missing");if(typeof e.signature!="string")throw new S("JWS Signature missing or incorrect type");if(e.header!==void 0&&!ee(e.header))throw new S("JWS Unprotected Header incorrect type");let i={};if(e.protected)try{let C=F(e.protected);i=JSON.parse(U.decode(C))}catch{throw new S("JWS Protected Header is invalid")}if(!st(i,e.header))throw new S("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let n={...i,...e.header},l=bt(S,new Map([["b64",!0]]),r==null?void 0:r.crit,i,n),a=!0;if(l.has("b64")&&(a=i.b64,typeof a!="boolean"))throw new S('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:o}=n;if(typeof o!="string"||!o)throw new S('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(a){if(typeof e.payload!="string")throw new S("JWS Payload must be a string")}else if(typeof e.payload!="string"&&!(e.payload instanceof Uint8Array))throw new S("JWS Payload must be a string or an Uint8Array instance");let c=!1;typeof t=="function"&&(t=await t(i,e),c=!0),gt(o,t,"verify");let p=et(Y.encode(e.protected??""),Y.encode("."),typeof e.payload=="string"?Y.encode(e.payload):e.payload),d;try{d=F(e.signature)}catch{throw new S("Failed to base64url decode the signature")}if(!await $t(o,t,d,p))throw new rt;let w;if(a)try{w=F(e.payload)}catch{throw new S("Failed to base64url decode the payload")}else typeof e.payload=="string"?w=Y.encode(e.payload):w=e.payload;let f={payload:w};return e.protected!==void 0&&(f.protectedHeader=i),e.header!==void 0&&(f.unprotectedHeader=e.header),c?{...f,key:t}:f}async function jt(e,t,r){if(e instanceof Uint8Array&&(e=U.decode(e)),typeof e!="string")throw new S("Compact JWS must be a string or Uint8Array");let{0:i,1:n,2:l,length:a}=e.split(".");if(a!==3)throw new S("Invalid Compact JWS");let o=await Ct({payload:n,protected:i,signature:l},t,r),c={payload:o.payload,protectedHeader:o.protectedHeader};return typeof t=="function"?{...c,key:o.key}:c}var At=e=>Math.floor(e.getTime()/1e3),Rt=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,je=e=>{let t=Rt.exec(e);if(!t||t[4]&&t[1])throw new TypeError("Invalid time period format");let r=parseFloat(t[2]),i=t[3].toLowerCase(),n;switch(i){case"sec":case"secs":case"second":case"seconds":case"s":n=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":n=Math.round(r*60);break;case"hour":case"hours":case"hr":case"hrs":case"h":n=Math.round(r*3600);break;case"day":case"days":case"d":n=Math.round(r*86400);break;case"week":case"weeks":case"w":n=Math.round(r*604800);break;default:n=Math.round(r*31557600);break}return t[1]==="-"||t[4]==="ago"?-n:n},Ae=e=>e.toLowerCase().replace(/^application\//,""),Tt=(e,t)=>typeof e=="string"?t.includes(e):Array.isArray(e)?t.some(Set.prototype.has.bind(new Set(e))):!1,Pt=(e,t,r={})=>{let i;try{i=JSON.parse(U.decode(t))}catch{}if(!ee(i))throw new P("JWT Claims Set must be a top-level JSON object");let{typ:n}=r;if(n&&(typeof e.typ!="string"||Ae(e.typ)!==Ae(n)))throw new R('unexpected "typ" JWT header value',i,"typ","check_failed");let{requiredClaims:l=[],issuer:a,subject:o,audience:c,maxTokenAge:p}=r,d=[...l];p!==void 0&&d.push("iat"),c!==void 0&&d.push("aud"),o!==void 0&&d.push("sub"),a!==void 0&&d.push("iss");for(let T of new Set(d.reverse()))if(!(T in i))throw new R(`missing required "${T}" claim`,i,T,"missing");if(a&&!(Array.isArray(a)?a:[a]).includes(i.iss))throw new R('unexpected "iss" claim value',i,"iss","check_failed");if(o&&i.sub!==o)throw new R('unexpected "sub" claim value',i,"sub","check_failed");if(c&&!Tt(i.aud,typeof c=="string"?[c]:c))throw new R('unexpected "aud" claim value',i,"aud","check_failed");let w;switch(typeof r.clockTolerance){case"string":w=je(r.clockTolerance);break;case"number":w=r.clockTolerance;break;case"undefined":w=0;break;default:throw new TypeError("Invalid clockTolerance option type")}let{currentDate:f}=r,C=At(f||new Date);if((i.iat!==void 0||p)&&typeof i.iat!="number")throw new R('"iat" claim must be a number',i,"iat","invalid");if(i.nbf!==void 0){if(typeof i.nbf!="number")throw new R('"nbf" claim must be a number',i,"nbf","invalid");if(i.nbf>C+w)throw new R('"nbf" claim timestamp check failed',i,"nbf","check_failed")}if(i.exp!==void 0){if(typeof i.exp!="number")throw new R('"exp" claim must be a number',i,"exp","invalid");if(i.exp<=C-w)throw new ge('"exp" claim timestamp check failed',i,"exp","check_failed")}if(p){let T=C-i.iat,N=typeof p=="number"?p:je(p);if(T-w>N)throw new ge('"iat" claim timestamp check failed (too far in the past)',i,"iat","check_failed");if(T<0-w)throw new R('"iat" claim timestamp check failed (it should be in the past)',i,"iat","check_failed")}return i};async function _t(e,t,r){var l;let i=await jt(e,t,r);if((l=i.protectedHeader.crit)!=null&&l.includes("b64")&&i.protectedHeader.b64===!1)throw new P("JWTs MUST NOT use unencoded payload");let n={payload:Pt(i.protectedHeader,i.payload,r),protectedHeader:i.protectedHeader};return typeof t=="function"?{...n,key:i.key}:n}var It=F;function Dt(e){if(typeof e!="string")throw new P("JWTs must use Compact JWS serialization, JWT must be a string");let{1:t,length:r}=e.split(".");if(r===5)throw new P("Only JWTs using Compact JWS serialization can be decoded");if(r!==3)throw new P("Invalid JWT");if(!t)throw new P("JWTs must contain a payload");let i;try{i=It(t)}catch{throw new P("Failed to base64url decode the payload")}let n;try{n=JSON.parse(U.decode(i))}catch{throw new P("Failed to parse the decoded payload as JSON")}if(!ee(n))throw new P("Invalid JWT Claims Set");return n}function te(e){var t=new Error(e);return t.source="ulid",t}var le="0123456789ABCDEFGHJKMNPQRSTVWXYZ",B=le.length,Re=Math.pow(2,48)-1,Ot=10,Wt=16;function Ht(e){var t=Math.floor(e()*B);return t===B&&(t=B-1),le.charAt(t)}function Jt(e,t){if(isNaN(e))throw new Error(e+" must be a number");if(e>Re)throw te("cannot encode time greater than "+Re);if(e<0)throw te("time must be positive");if(Number.isInteger(e)===!1)throw te("time must be an integer");for(var r=void 0,i="";t>0;t--)r=e%B,i=le.charAt(r)+i,e=(e-r)/B;return i}function Nt(e,t){for(var r="";e>0;e--)r=Ht(t)+r;return r}function zt(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,t=arguments[1];t||(t=typeof window<"u"?window:null);var r=t&&(t.crypto||t.msCrypto);if(r)return function(){var n=new Uint8Array(1);return r.getRandomValues(n),n[0]/255};try{var i=Ze();return function(){return i.randomBytes(1).readUInt8()/255}}catch{}if(e){try{console.error("secure crypto unusable, falling back to insecure Math.random()!")}catch{}return function(){return Math.random()}}throw te("secure crypto unusable, insecure Math.random not allowed")}function Kt(e){return e||(e=zt()),function(t){return isNaN(t)&&(t=Date.now()),Jt(t,Ot)+Nt(Wt,e)}}Kt();var ce;function Lt(e){return ce==null?void 0:ce.get(e)}var de;function Mt(e){return de==null?void 0:de.get(e)}var ue;function Ut(e,t){var r;return(r=ue==null?void 0:ue.get(e))==null?void 0:r.get(t)}function Ft(e){var r,i;let t=typeof e;return t==="string"?`"${e}"`:t==="number"||t==="bigint"||t==="boolean"?`${e}`:t==="object"||t==="function"?(e&&((i=(r=Object.getPrototypeOf(e))==null?void 0:r.constructor)==null?void 0:i.name))??"null":t}function re(e,t,r,i,n){let l=n&&"input"in n?n.input:r.value,a=(n==null?void 0:n.expected)??e.expects??null,o=(n==null?void 0:n.received)??Ft(l),c={kind:e.kind,type:e.type,input:l,expected:a,received:o,message:`Invalid ${t}: ${a?`Expected ${a} but r`:"R"}eceived ${o}`,requirement:e.requirement,path:n==null?void 0:n.path,issues:n==null?void 0:n.issues,lang:i.lang,abortEarly:i.abortEarly,abortPipeEarly:i.abortPipeEarly},p=e.kind==="schema",d=(n==null?void 0:n.message)??e.message??Ut(e.reference,c.lang)??(p?Mt(c.lang):null)??i.message??Lt(c.lang);d&&(c.message=typeof d=="function"?d(c):d),p&&(r.typed=!1),r.issues?r.issues.push(c):r.issues=[c]}function Te(e){return{kind:"transformation",type:"brand",reference:Te,async:!1,name:e,_run(t){return t}}}function Bt(e,t,r){return typeof e.default=="function"?e.default(t,r):e.default}function Pe(e){return{kind:"schema",type:"number",reference:Pe,expects:"number",async:!1,message:e,_run(t,r){return typeof t.value=="number"&&!isNaN(t.value)?t.typed=!0:re(this,"type",t,r),t}}}function _e(e,...t){let r={kind:"schema",type:"optional",reference:_e,expects:`${e.expects} | undefined`,async:!1,wrapped:e,_run(i,n){return i.value===void 0&&("default"in this&&(i.value=Bt(this,i,n)),i.value===void 0)?(i.typed=!0,i):this.wrapped._run(i,n)}};return 0 in t&&(r.default=t[0]),r}function Ie(e,t){return{kind:"schema",type:"strict_object",reference:Ie,expects:"Object",async:!1,entries:e,message:t,_run(r,i){var l;let n=r.value;if(n&&typeof n=="object"){r.typed=!0,r.value={};for(let a in this.entries){let o=n[a],c=this.entries[a]._run({typed:!1,value:o},i);if(c.issues){let p={type:"object",origin:"value",input:n,key:a,value:o};for(let d of c.issues)d.path?d.path.unshift(p):d.path=[p],(l=r.issues)==null||l.push(d);if(r.issues||(r.issues=c.issues),i.abortEarly){r.typed=!1;break}}c.typed||(r.typed=!1),(c.value!==void 0||a in n)&&(r.value[a]=c.value)}if(!r.issues||!i.abortEarly){for(let a in n)if(!(a in this.entries)){let o=n[a];re(this,"type",r,i,{input:o,expected:"never",path:[{type:"object",origin:"value",input:n,key:a,value:o}]});break}}}else re(this,"type",r,i);return r}}}function De(e){return{kind:"schema",type:"string",reference:De,expects:"string",async:!1,message:e,_run(t,r){return typeof t.value=="string"?t.typed=!0:re(this,"type",t,r),t}}}function qt(...e){return{...e[0],pipe:e,_run(t,r){for(let i of e)if(i.kind!=="metadata"){if(t.issues&&(i.kind==="schema"||i.kind==="transformation")){t.typed=!1;break}(!t.issues||!r.abortEarly&&!r.abortPipeEarly)&&(t=i._run(t,r))}return t}}}var Vt=qt(De(),Te("lid"));Ie({id:Vt,ver:_e(Pe())});var Gt=e=>()=>e*48271%2147483647/2147483647,Xt=e=>typeof Buffer<"u"?Buffer.from(e).toString("base64"):btoa(typeof e=="string"?e:String.fromCharCode(...e)),Yt=e=>typeof Buffer<"u"?Buffer.from(e,"base64").toString():atob(e),Qt=(e,t)=>{let r=Gt(t),i=new TextEncoder().encode(e).map(n=>n^Math.floor(r()*256));return Xt(i)},Zt=e=>e.split("").reverse().join(""),er=e=>typeof e=="object"&&!!e&&"sub"in e&&"exp"in e&&typeof e.sub=="string"&&typeof e.exp=="number",tr=async e=>{let t=Zt(Yt(e));return{decoded:Dt(t),jwt:t}},rr=async e=>{let{decoded:t,jwt:r}=await tr(e);if(!er(t))throw new Error("Invalid license key");let{sub:i,exp:n}=t,l=new TextEncoder().encode(Qt(i,n));return await _t(r,l),t};function ir({r:e,v:t,t:r}){const i=we();if(m.useEffect(()=>{e!==void 0&&e.toLowerCase().includes("ehsug")?i.setType("production"):i.setType(r)},[]),m.useEffect(()=>{const n=async a=>{if(a===void 0)return{type:"nokey",daysleft:0};try{const o=await rr(a),d=new Date(o.exp*1e3)-new Date,w=Math.floor(d/(1e3*60*60*24));return w>0?{type:"trial",daysleft:w}:{type:"expired",daysleft:0}}catch(o){return o.message.includes("claim timestamp check failed")?{type:"expired",daysleft:0}:{type:"invalidkey",daysleft:0}}},l=async()=>{var a=await n(e);switch(i.setType(a.type),i.setDaysLeft(a.daysleft),a.type){case"production":case"trial":i.setTrialDialog(!1);break;case"nokey":case"expired":case"invalidkey":default:i.setTrialDialog(!0);break}};i.type!==null&&i.type!=="production"&&l()},[i.type]),i.type!=="production"&&i.trialdialog===!0)return s.jsx("div",{style:{zIndex:2e5,fontSize:"22px",background:"rgb(211,211,211,.4)",color:"black",display:"flex",flexDirection:"column",position:"absolute",left:"50%",width:"100%",height:"100%",transform:"translateX(-50%)",padding:"10px 10px 10px 10px",border:"1px solid black"},children:s.jsxs("div",{style:{height:"100%",display:"flex",padding:"10px 10px 10px 10px",flexDirection:"column",margin:"40px",borderRadius:"5px",border:"1px solid gray",background:"white"},children:[s.jsxs("div",{style:{display:"flex",flexDirection:"row",alignItems:"center"},children:[s.jsx("img",{style:{width:160},src:"../ReExt/ReExt.png"}),s.jsxs("div",{style:{margin:"0 0 0 20px"},children:["Welcome to the ReExt v",t," Trial"]})]}),i.type==="trial"||i.type==="nokey"&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{margin:"10px 0 10px 0",fontSize:"18px"},children:["This is a 30 day trial version of ReExt.",s.jsx("br",{}),"Without a valid trial key, this dialog will appear.",s.jsx("br",{}),s.jsx("br",{}),"To have a trial key emailed to you, fill in this form and click 'Get Trial Key'."]}),s.jsx("div",{style:{xwidth:"100%",flex:1,display:"flex",border:"0px solid red"},children:s.jsx("iframe",{style:{width:"100%",margin:"0 0 10px 0",flex:1,border:"0px solid lightgray"},src:"https://www.sencha.com/forms/reext/trial-reext.php"})}),s.jsxs("div",{style:{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"flex-end"},children:[s.jsx("div",{style:{fontSize:"12px"},children:i.type}),s.jsx("button",{style:{fontSize:"18px",padding:"5px 5px 5px 5px"},onClick:()=>{i.setTrialDialog(!1)},children:"Close"})]})]}),i.type==="expired"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key has expired"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})}),i.type==="invalidkey"&&s.jsx(s.Fragment,{children:s.jsxs("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center",margin:"10px 0 10px 0",fontSize:"18px",height:"100%"},children:[s.jsx("div",{style:{margin:"0 0 20px 0",fontSize:"24px"},children:"Your ReExt trial key is invalid"}),s.jsx("div",{children:"Contact Sencha Sales"}),s.jsx("div",{children:s.jsx("a",{href:"https://www.sencha.com/company/contact/",target:"_blank",rel:"noopener noreferrer",children:"https://www.sencha.com/company/contact/"})})]})})]})})}async function nr(e){try{let D=async(E,A,$)=>await new Promise(h=>{window.Ext.onReady(function(){return window.Ext.ReExtLocation=$,window.Ext.ReExtTheme=E,window.Ext.ReExtLi=!0,h(1)})}),x=async E=>typeof window===void 0||typeof window>"u"?void 0:await new Promise((A,$)=>{let h=document.getElementsByTagName("HEAD")[0];var g=!1;for(let b=0;b<h.childNodes.length;b++)h.childNodes[b].src===E&&(g=!0);if(g===!1){let b=document.createElement("script");b.addEventListener("load",()=>A(1)),b.addEventListener("error",()=>{var v=`${E} (js) | ||
- did you download the SDK from the support portal? | ||
- are you trying to download a file without an enterprise license?`;console.error(v),$(v)}),b.src=E,w.appendChild(b)}}),h=async E=>typeof window===void 0||typeof window>"u"?void 0:await new Promise((A,$)=>{let w=document.getElementsByTagName("HEAD")[0],g=document.createElement("link");g.rel="stylesheet",g.type="text/css",g.href=E,g.addEventListener("error",()=>{var b=`${E} (css) | ||
- are you trying to download a file without an enterprise license?`;console.error(v),$(v)}),b.src=E,h.appendChild(b)}}),y=async E=>typeof window===void 0||typeof window>"u"?void 0:await new Promise((A,$)=>{let h=document.getElementsByTagName("HEAD")[0],g=document.createElement("link");g.rel="stylesheet",g.type="text/css",g.href=E,g.addEventListener("error",()=>{var b=`${E} (css) | ||
- did you download the SDK from the support portal? | ||
- are you trying to download a file without an enterprise license?`;return console.error(b),$(b)}),g.addEventListener("load",()=>A(1)),w.appendChild(g)});var t=e.toolkit;(t==null||t==="")&&(t="modern");var r=e.theme;(r==null||r==="")&&(r="material");var i=e.packages;i===void 0&&(i={charts:!1,fontawesome:!1,ux:!1,calendar:!1,d3:!1,exporter:!1,pivot:!1,pivotd3:!1,pivotlocale:!1,froalaeditor:!1});var n=e.debug,s=e.license,a=e.urlbase,o=e.location;(o==="remote"||o===null)&&(a="https://cdn.sencha.com/reext/ext/");var c=e.rtl;c===!1||c===void 0?c="":c="-rtl";var p=e.locale;p===void 0&&(p="en");var d=e.sdkversion;switch(d){case"7.0.0":d=d+".156";break;case"7.1.0":d=d+".46";break;case"7.2.0":case"7.3.0":case"7.3.1":case"7.4.0":case"7.5.0":case"7.5.1":case"7.6.0":case"7.7.0":case"7.8.0":break;default:throw`SDK version ${d} is not valid`}var y=a+"ext-"+d,f=a+"ext-addons-"+d;n===!0?n="-debug":n="";var C="";t==="modern"&&(C="-modern");var T=["ios","material","neptune","triton"];if(t==="modern"&&!T.includes(r))throw`${r} theme is not in ${t} toolkit for SDK version ${d}`;var N=["classic","crisp","graphite","gray","material","neptune","triton"];t==="classic"&&!N.includes(r)&&console.warn(`${r} is a custom theme in ${t} toolkit for SDK version ${d}`);var z=!1;(i.calendar===!0||i.d3===!0||i.exporter===!0||i.pivot===!0||i.pivotd3===!0||i.pivotlocale===!0||i.froalaeditor===!0)&&(z=!0),e.debug===!0&&await x("node_modules/@sencha/reext/dist/ReExt/debug.js");var k=y+"/build";if(d.slice(-1)==="c"){await x(`${k}/ext-${d}-toolkit-${t}-sdk.js`),await h(`${k}/ext-${d}-theme-${r}-sdk.css`),z===!0&&(await x(`${y}/ext-${d}-toolkit-${t}-addons.js`),await h(`${y}/ext-${d}-theme-${r}-addons.css`)),await D(r,s,o);return}if(await x(`${k}/ext${C}-all${c}${n}.js`),await h(`${k}/${t}/theme-${r}/resources/theme-${r}-all${c}.css`),i.fontawesome===!0&&await h(`${k}/packages/font-awesome/resources/font-awesome-all${n}.css`),x(`${k}/${t}/locale/locale-${p}${n}.js`),i.ux===!0&&(await x(`${k}/packages/ux/${t}/ux${n}.js`),d==="7.0.0"&&t==="modern"&&r==="neptune"&&await h(`${k}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`),d==="7.0.0"&&t==="classic"&&await h(`${k}/packages/ux/${t}/${r}/resources/ux-all${n}.css`),d!=="7.0.0"&&t==="classic"&&r==="material"&&await h(`${k}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`),d!=="7.0.0"&&t==="classic"&&r!=="material"&&r!=="gray"&&await h(`${k}/packages/ux/${t}/${r}/resources/ux-all${n}.css`)),i.charts===!0){await x(`${k}/packages/charts/${t}/charts${n}.js`);var K=!0;(t==="modern"&&r==="ios"&&d==="7.0.0"||r==="gray")&&(K=!1),K===!0&&(t==="classic"&&r!=="material"?await h(`${k}/packages/charts/${t}/${r}/resources/charts-all${n}.css`):await h(`${k}/packages/charts/${t}/${t}-${r}/resources/charts-all${n}.css`))}if(z===!0){var u;f=f+"/packages",i.calendar===!0&&(u="calendar",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&r==="ios"||d==="7.0.0.156"?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await h(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.d3===!0&&(u="d3",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await h(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.exporter===!0&&(u="exporter",await x(`${f}/${u}/build/${t}/${u}${n}.js`),await h(`${f}/${u}/build/${t}/resources/${u}-all${n}.css`)),i.pivot===!0&&(u="pivot",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await h(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.pivotd3===!0&&(u="pivot-d3",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await h(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.froalaeditor===!0&&(u="froala-editor",await x(`${f}/${u}/build/${t}/${u}${n}.js`),await h(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`),await x(`${f}/${u}/development/froalaeditor.pkgd.js`),await h(`${f}/${u}/development/froalaeditor.pkgd.css`)),i.pivotlocale}async function L(E){var A=E.location;if(A==="local"){var $=E.overrides;if($===void 0&&($=!1),$!==!0&&($=!1),$===!0){var w=`${E.urlbase}ext-${E.sdkversion}/${t}overrides.js`;console.log("overridefile",w);async function b(v){try{let M=await fetch(v,{method:"HEAD"});return M.status===404?(console.error("ReExtData.overrides is true but no overrides file exists"),!1):M.status===200}catch{return!1}}var g=await b(w);g&&await x(w)}}}await L(e),await D(r,s,o)}catch(D){console.warn("fail",D),alert(`Loading Failed: | ||
`+D.toString())}}var Oe="trial";function ar({children:e,ReExtData:t,reextkey:r,splash:i}){if(typeof window===void 0||typeof window>"u")return;const[n,s]=m.useState(!1),[a,o]=m.useState(!1);m.useEffect(()=>{try{console.log("right before"),console.log("isReextRunning:",__IS_REEXT_RUNNING__);var p=__IS_REEXT_RUNNING__;console.log("isReextRunning:",p);var d=new Date,y=d.getTime();console.log("now:",y),console.log("diff:",y-p),o(!0)}catch{o(!1)}},[]);try{if(m.useEffect(()=>{(async()=>{var d={sdkversion:"7.8.0",toolkit:"classic",theme:"classic",packages:{charts:!1,fontawesome:!1,ux:!1,calendar:!1,d3:!1,exporter:!1,pivot:!1,pivotd3:!1,pivotlocale:!1,froalaeditor:!1},rtl:!1,locale:"en",debug:!1,urlbase:"./",location:"remote",overrides:!1};t===void 0&&(t=d);try{await nr(t),s(!0)}catch(y){console.error("fail",y)}})()},[]),!n)return i===!0||i==="true"?l.jsx(Ye,{}):null;if(n){var c={TrialDialog:{value:null},Version:{value:"2024-09-21-a"},Type:{value:null},DaysLeft:{value:null}};return l.jsxs(ze,{types:c,actionTrace:!1,actionStack:!1,dispatchTrace:!1,dispatchStack:!1,middleware:[],middlewareafter:[],children:[Oe!=="production"&&l.jsx(ir,{r,v:ye.version,t:Oe}),a===!1&&l.jsxs("div",{style:{border:"10px solid red",boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100vw",fontSize:24,color:"red"},children:[l.jsx("div",{children:"the Vite ReExt plugin is needed to run this app"}),l.jsx("div",{children:"modify vite.config.js like this"}),l.jsx("div",{dangerouslySetInnerHTML:{__html:` | ||
- are you trying to download a file without an enterprise license?`;return console.error(b),$(b)}),g.addEventListener("load",()=>A(1)),h.appendChild(g)});var t=e.toolkit;(t==null||t==="")&&(t="modern");var r=e.theme;(r==null||r==="")&&(r="material");var i=e.packages;i===void 0&&(i={charts:!1,fontawesome:!1,ux:!1,calendar:!1,d3:!1,exporter:!1,pivot:!1,pivotd3:!1,pivotlocale:!1,froalaeditor:!1});var n=e.debug,l=e.license,a=e.urlbase,o=e.location;(o==="remote"||o===null)&&(a="https://cdn.sencha.com/reext/ext/");var c=e.rtl;c===!1||c===void 0?c="":c="-rtl";var p=e.locale;p===void 0&&(p="en");var d=e.sdkversion;switch(d){case"7.0.0":d=d+".156";break;case"7.1.0":d=d+".46";break;case"7.2.0":case"7.3.0":case"7.3.1":case"7.4.0":case"7.5.0":case"7.5.1":case"7.6.0":case"7.7.0":case"7.8.0":break;default:throw`SDK version ${d} is not valid`}var w=a+"ext-"+d,f=a+"ext-addons-"+d;n===!0?n="-debug":n="";var C="";t==="modern"&&(C="-modern");var T=["ios","material","neptune","triton"];if(t==="modern"&&!T.includes(r))throw`${r} theme is not in ${t} toolkit for SDK version ${d}`;var N=["classic","crisp","graphite","gray","material","neptune","triton"];t==="classic"&&!N.includes(r)&&console.warn(`${r} is a custom theme in ${t} toolkit for SDK version ${d}`);var z=!1;(i.calendar===!0||i.d3===!0||i.exporter===!0||i.pivot===!0||i.pivotd3===!0||i.pivotlocale===!0||i.froalaeditor===!0)&&(z=!0),e.debug===!0&&await x("node_modules/@sencha/reext/dist/ReExt/debug.js");var k=w+"/build";if(d.slice(-1)==="c"){await x(`${k}/ext-${d}-toolkit-${t}-sdk.js`),await y(`${k}/ext-${d}-theme-${r}-sdk.css`),z===!0&&(await x(`${w}/ext-${d}-toolkit-${t}-addons.js`),await y(`${w}/ext-${d}-theme-${r}-addons.css`)),await D(r,l,o);return}if(await x(`${k}/ext${C}-all${c}${n}.js`),await y(`${k}/${t}/theme-${r}/resources/theme-${r}-all${c}.css`),i.fontawesome===!0&&await y(`${k}/packages/font-awesome/resources/font-awesome-all${n}.css`),x(`${k}/${t}/locale/locale-${p}${n}.js`),i.ux===!0&&(await x(`${k}/packages/ux/${t}/ux${n}.js`),d==="7.0.0"&&t==="modern"&&r==="neptune"&&await y(`${k}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`),d==="7.0.0"&&t==="classic"&&await y(`${k}/packages/ux/${t}/${r}/resources/ux-all${n}.css`),d!=="7.0.0"&&t==="classic"&&r==="material"&&await y(`${k}/packages/ux/${t}/${t}-${r}/resources/ux-all${n}.css`),d!=="7.0.0"&&t==="classic"&&r!=="material"&&r!=="gray"&&await y(`${k}/packages/ux/${t}/${r}/resources/ux-all${n}.css`)),i.charts===!0){await x(`${k}/packages/charts/${t}/charts${n}.js`);var K=!0;(t==="modern"&&r==="ios"&&d==="7.0.0"||r==="gray")&&(K=!1),K===!0&&(t==="classic"&&r!=="material"?await y(`${k}/packages/charts/${t}/${r}/resources/charts-all${n}.css`):await y(`${k}/packages/charts/${t}/${t}-${r}/resources/charts-all${n}.css`))}if(z===!0){var u;f=f+"/packages",i.calendar===!0&&(u="calendar",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&r==="ios"||d==="7.0.0.156"?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await y(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.d3===!0&&(u="d3",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await y(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.exporter===!0&&(u="exporter",await x(`${f}/${u}/build/${t}/${u}${n}.js`),await y(`${f}/${u}/build/${t}/resources/${u}-all${n}.css`)),i.pivot===!0&&(u="pivot",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await y(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.pivotd3===!0&&(u="pivot-d3",await x(`${f}/${u}/build/${t}/${u}${n}.js`),t==="modern"&&(r==="ios"||r==="material")?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):r!=="gray"&&r!=="graphite"&&(t==="classic"&&r!=="material"?await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`):await y(`${f}/${u}/build/${t}/${t}-${r}/resources/${u}-all${n}.css`))),i.froalaeditor===!0&&(u="froala-editor",await x(`${f}/${u}/build/${t}/${u}${n}.js`),await y(`${f}/${u}/build/${t}/${r}/resources/${u}-all${n}.css`),await x(`${f}/${u}/development/froalaeditor.pkgd.js`),await y(`${f}/${u}/development/froalaeditor.pkgd.css`)),i.pivotlocale}async function L(E){var A=E.location;if(A==="local"){var $=E.overrides;if($===void 0&&($=!1),$!==!0&&($=!1),$===!0){var h=`${E.urlbase}ext-${E.sdkversion}/${t}overrides.js`;console.log("overridefile",h);async function b(v){try{let M=await fetch(v,{method:"HEAD"});return M.status===404?(console.error("ReExtData.overrides is true but no overrides file exists"),!1):M.status===200}catch{return!1}}var g=await b(h);g&&await x(h)}}}await L(e),await D(r,l,o)}catch(D){console.warn("fail",D),alert(`Loading Failed: | ||
`+D.toString())}}var Oe="trial";function ar({children:e,ReExtData:t,reextkey:r,splash:i}){if(typeof window===void 0||typeof window>"u")return;const[n,l]=m.useState(!1),[a,o]=m.useState(!1);m.useEffect(()=>{try{var p=__IS_REEXT_RUNNING__;o(!0)}catch{console.error("Vite or Next.js plugin not installed"),o(!1)}},[]);try{if(m.useEffect(()=>{(async()=>{var d={sdkversion:"7.8.0",toolkit:"classic",theme:"classic",packages:{charts:!1,fontawesome:!1,ux:!1,calendar:!1,d3:!1,exporter:!1,pivot:!1,pivotd3:!1,pivotlocale:!1,froalaeditor:!1},rtl:!1,locale:"en",debug:!1,urlbase:"./",location:"remote",overrides:!1};t===void 0&&(t=d);try{await nr(t),l(!0)}catch(w){console.error("fail",w)}})()},[]),!n)return i===!0||i==="true"?s.jsx(Ye,{}):null;if(n){var c={TrialDialog:{value:null},Version:{value:"2024-09-21-a"},Type:{value:null},DaysLeft:{value:null}};return s.jsxs(ze,{types:c,actionTrace:!1,actionStack:!1,dispatchTrace:!1,dispatchStack:!1,middleware:[],middlewareafter:[],children:[Oe!=="production"&&s.jsx(ir,{r,v:ye.version,t:Oe}),a===!1&&s.jsxs("div",{style:{border:"10px solid red",boxSizing:"border-box",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",height:"100vh",width:"100vw",fontSize:24,color:"red"},children:[s.jsx("div",{style:{margin:"0 0 10px 0"},children:"The Vite or Next.js ReExt plugin is needed to run this app"}),s.jsx("div",{children:"for Vite, modify vite.config.js like this"}),s.jsx("div",{dangerouslySetInnerHTML:{__html:` | ||
<pre> | ||
import { defineConfig } from 'vite' | ||
import react from '@vitejs/plugin-react-swc' | ||
import reext from './node_modules/@sencha/reext/dist/ReExt/vite-plugin-reext.js' | ||
import { defineConfig } from 'vite'; | ||
import react from '@vitejs/plugin-react-swc'; | ||
import reext from './node_modules/@sencha/reext/dist/ReExt/vite-plugin-reext.js'; | ||
export default defineConfig({ | ||
@@ -20,2 +19,8 @@ plugins: [ | ||
}) | ||
</pre>`}})]}),a===!0&&e]})}}catch(p){return l.jsx("div",{children:p.toString()})}}const or=e=>{if(typeof window===void 0||typeof window>"u")return;const[t,r]=m.useState(e);var i=m.useRef();return i.current=t,[()=>i.current,r]};function sr(e){if(!(typeof window===void 0||typeof window>"u")){for(var t,r=e.getController(),i=e;r===void 0;)r=e.parent.getController(),i=e.parent;if(t=r.getReferences(),t===null&&(t={}),i.ReExtChildren!==void 0)for(var n=0;n<i.ReExtChildren.length;n++)i.ReExtChildren[n].reference!==null&&(t[i.ReExtChildren[n].reference]=i.ReExtChildren[n]);return t}}j.Fill=Xe,j.ReExtProvider=ar,j.ReExtReferences=sr,j.default=Ge,j.useReExtState=or,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
</pre>`}}),s.jsx("div",{children:"for Next.js, modify next.config.mjs like this"}),s.jsx("div",{dangerouslySetInnerHTML:{__html:` | ||
<pre> | ||
/** @type {import('next').NextConfig} */ | ||
import withReExtPlugin from './node_modules/@sencha/reext/dist/ReExt/next-plugin-reext.js'; | ||
const nextConfig = {}; | ||
export default withReExtPlugin(nextConfig); | ||
</pre>`}})]}),a===!0&&e]})}}catch(p){return s.jsx("div",{children:p.toString()})}}const or=e=>{if(typeof window===void 0||typeof window>"u")return;const[t,r]=m.useState(e);var i=m.useRef();return i.current=t,[()=>i.current,r]};function sr(e){if(!(typeof window===void 0||typeof window>"u")){for(var t,r=e.getController(),i=e;r===void 0;)r=e.parent.getController(),i=e.parent;if(t=r.getReferences(),t===null&&(t={}),i.ReExtChildren!==void 0)for(var n=0;n<i.ReExtChildren.length;n++)i.ReExtChildren[n].reference!==null&&(t[i.ReExtChildren[n].reference]=i.ReExtChildren[n]);return t}}j.Fill=Xe,j.ReExtProvider=ar,j.ReExtReferences=sr,j.default=Ge,j.useReExtState=or,Object.defineProperties(j,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
{ | ||
"name": "@sencha/reext", | ||
"version": "1.0.20", | ||
"version": "1.0.40", | ||
"description": "ReExt - Sencha Ext JS components in React", | ||
@@ -5,0 +5,0 @@ "types": "./dist/ReExt/types.d.ts", |
@@ -65,2 +65,14 @@ # ReExt - ExtJS Components in React | ||
#### Next.js | ||
```bash | ||
npx create-next-app@latest reextnext --js --eslint --no-tailwind --no-src-dir --app --import-alias "@/*" | ||
cd reextnext | ||
npm install @sencha/reext@latest | ||
cp node_modules/@sencha/reext/dist/example/next.config.mjs next.config.mjs | ||
cp node_modules/@sencha/reext/dist/example/layout.js app/layout.js | ||
cp node_modules/@sencha/reext/dist/example/page.js app/page.js | ||
npm run dev | ||
``` | ||
#### Create React App | ||
@@ -88,8 +100,20 @@ | ||
npm install @sencha/reext@latest | ||
xcopy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js /Y | ||
xcopy node_modules\@sencha\reext\dist\example\App.jsx src\App.jsx /Y | ||
xcopy node_modules\@sencha\reext\dist\example\main.jsx src\index.js /Y | ||
copy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js | ||
copy node_modules\@sencha\reext\dist\example\App.jsx src\App.jsx | ||
copy node_modules\@sencha\reext\dist\example\main.jsx src\main.jsx | ||
npx vite --open | ||
``` | ||
#### Next.js | ||
```bash | ||
npx create-next-app@latest reextnext --js --eslint --no-tailwind --no-src-dir --app --import-alias "@/*" | ||
cd reextnext | ||
npm install @sencha/reext@latest | ||
copy node_modules\@sencha\reext\dist\example\next.config.mjs next.config.mjs | ||
copy node_modules\@sencha\reext\dist\example\layout.js app/layout.js | ||
copy node_modules\@sencha\reext\dist\example\page.js app/page.js | ||
npm run dev | ||
``` | ||
#### Create React App | ||
@@ -101,5 +125,5 @@ | ||
npm install @sencha/reext@latest | ||
xcopy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js /Y | ||
xcopy node_modules\@sencha\reext\dist\example\App.jsx src\App.js /Y | ||
xcopy node_modules\@sencha\reext\dist\example\main.jsx src\index.js /Y | ||
copy node_modules\@sencha\reext\dist\example\vite.config.js vite.config.js | ||
copy node_modules\@sencha\reext\dist\example\App.jsx src\App.js | ||
copy node_modules\@sencha\reext\dist\example\main.jsx src\index.js | ||
npm start | ||
@@ -106,0 +130,0 @@ ``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1996755
21
2057
539