@canton-network/core-wallet-ui-components 0.33.0 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/wallet-picker.d.ts +2 -0
- package/dist/components/wallet-picker.d.ts.map +1 -1
- package/dist/index.cjs +52 -52
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +261 -235
- package/dist/index.js.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ const ja = (t) => new _a(typeof t == "string" ? t : t + "", void 0, lo), Pa = (t
|
|
|
34
34
|
for (const o of e.cssRules) r += o.cssText;
|
|
35
35
|
return ja(r);
|
|
36
36
|
})(t) : t;
|
|
37
|
-
const { is:
|
|
37
|
+
const { is: Ta, defineProperty: Da, getOwnPropertyDescriptor: Ba, getOwnPropertyNames: Na, getOwnPropertySymbols: Ma, getPrototypeOf: Za } = Object, qe = globalThis, Pr = qe.trustedTypes, Ra = Pr ? Pr.emptyScript : "", $a = qe.reactiveElementPolyfillSupport, $t = (t, e) => t, Me = { toAttribute(t, e) {
|
|
38
38
|
switch (e) {
|
|
39
39
|
case Boolean:
|
|
40
40
|
t = t ? Ra : null;
|
|
@@ -62,7 +62,7 @@ const { is: Ba, defineProperty: Ta, getOwnPropertyDescriptor: Da, getOwnProperty
|
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
64
|
return r;
|
|
65
|
-
} }, hr = (t, e) => !
|
|
65
|
+
} }, hr = (t, e) => !Ta(t, e), Tr = { attribute: !0, type: String, converter: Me, reflect: !1, useDefault: !1, hasChanged: hr };
|
|
66
66
|
Symbol.metadata ??= /* @__PURE__ */ Symbol("metadata"), qe.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
67
67
|
class Zt extends HTMLElement {
|
|
68
68
|
static addInitializer(e) {
|
|
@@ -71,14 +71,14 @@ class Zt extends HTMLElement {
|
|
|
71
71
|
static get observedAttributes() {
|
|
72
72
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
73
73
|
}
|
|
74
|
-
static createProperty(e, r =
|
|
74
|
+
static createProperty(e, r = Tr) {
|
|
75
75
|
if (r.state && (r.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(e) && ((r = Object.create(r)).wrapped = !0), this.elementProperties.set(e, r), !r.noAccessor) {
|
|
76
76
|
const o = /* @__PURE__ */ Symbol(), a = this.getPropertyDescriptor(e, o, r);
|
|
77
|
-
a !== void 0 &&
|
|
77
|
+
a !== void 0 && Da(this.prototype, e, a);
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
80
|
static getPropertyDescriptor(e, r, o) {
|
|
81
|
-
const { get: a, set: n } =
|
|
81
|
+
const { get: a, set: n } = Ba(this.prototype, e) ?? { get() {
|
|
82
82
|
return this[r];
|
|
83
83
|
}, set(i) {
|
|
84
84
|
this[r] = i;
|
|
@@ -89,7 +89,7 @@ class Zt extends HTMLElement {
|
|
|
89
89
|
}, configurable: !0, enumerable: !0 };
|
|
90
90
|
}
|
|
91
91
|
static getPropertyOptions(e) {
|
|
92
|
-
return this.elementProperties.get(e) ??
|
|
92
|
+
return this.elementProperties.get(e) ?? Tr;
|
|
93
93
|
}
|
|
94
94
|
static _$Ei() {
|
|
95
95
|
if (this.hasOwnProperty($t("elementProperties"))) return;
|
|
@@ -246,7 +246,7 @@ class Zt extends HTMLElement {
|
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
Zt.elementStyles = [], Zt.shadowRootOptions = { mode: "open" }, Zt[$t("elementProperties")] = /* @__PURE__ */ new Map(), Zt[$t("finalized")] = /* @__PURE__ */ new Map(), $a?.({ ReactiveElement: Zt }), (qe.reactiveElementVersions ??= []).push("2.1.2");
|
|
249
|
-
const Ya = { attribute: !0, type: String, converter: Me, reflect: !1, hasChanged: hr },
|
|
249
|
+
const Ya = { attribute: !0, type: String, converter: Me, reflect: !1, hasChanged: hr }, Ua = (t = Ya, e, r) => {
|
|
250
250
|
const { kind: o, metadata: a } = r;
|
|
251
251
|
let n = globalThis.litPropertyMetadata.get(a);
|
|
252
252
|
if (n === void 0 && globalThis.litPropertyMetadata.set(a, n = /* @__PURE__ */ new Map()), o === "setter" && ((t = Object.create(t)).wrapped = !0), n.set(r.name, t), o === "accessor") {
|
|
@@ -268,19 +268,19 @@ const Ya = { attribute: !0, type: String, converter: Me, reflect: !1, hasChanged
|
|
|
268
268
|
throw Error("Unsupported decorator location: " + o);
|
|
269
269
|
};
|
|
270
270
|
function b(t) {
|
|
271
|
-
return (e, r) => typeof r == "object" ?
|
|
271
|
+
return (e, r) => typeof r == "object" ? Ua(t, e, r) : ((o, a, n) => {
|
|
272
272
|
const i = a.hasOwnProperty(n);
|
|
273
273
|
return a.constructor.createProperty(n, o), i ? Object.getOwnPropertyDescriptor(a, n) : void 0;
|
|
274
274
|
})(t, e, r);
|
|
275
275
|
}
|
|
276
|
-
function
|
|
276
|
+
function T(t) {
|
|
277
277
|
return b({ ...t, state: !0, attribute: !1 });
|
|
278
278
|
}
|
|
279
|
-
const
|
|
279
|
+
const Ga = (t, e, r) => (r.configurable = !0, r.enumerable = !0, Reflect.decorate && typeof e != "object" && Object.defineProperty(t, e, r), r);
|
|
280
280
|
function pt(t, e) {
|
|
281
281
|
return (r, o, a) => {
|
|
282
282
|
const n = (i) => i.renderRoot?.querySelector(t) ?? null;
|
|
283
|
-
return
|
|
283
|
+
return Ga(r, o, { get() {
|
|
284
284
|
return n(this);
|
|
285
285
|
} });
|
|
286
286
|
};
|
|
@@ -371,7 +371,7 @@ const po = [
|
|
|
371
371
|
"/404",
|
|
372
372
|
"/callback"
|
|
373
373
|
];
|
|
374
|
-
function
|
|
374
|
+
function Tp(t) {
|
|
375
375
|
return po.includes(t);
|
|
376
376
|
}
|
|
377
377
|
const Va = po.filter(
|
|
@@ -402,7 +402,7 @@ function Yt(t, e = window.location.pathname) {
|
|
|
402
402
|
const r = Fa(e), o = t.startsWith("/") ? t : `/${t}`;
|
|
403
403
|
return r ? o === "/" ? `${r}/` : `${r}${o}` : o;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Dp(t, e = window.location.pathname) {
|
|
406
406
|
return Yt(t === "/" ? "/" : `${t}/`, e);
|
|
407
407
|
}
|
|
408
408
|
const Ja = p`
|
|
@@ -909,15 +909,15 @@ Pt([
|
|
|
909
909
|
b({ type: Boolean })
|
|
910
910
|
], W.prototype, "networkConnected", 2);
|
|
911
911
|
Pt([
|
|
912
|
-
|
|
912
|
+
T()
|
|
913
913
|
], W.prototype, "menuOpen", 2);
|
|
914
914
|
Pt([
|
|
915
|
-
|
|
915
|
+
T()
|
|
916
916
|
], W.prototype, "darkMode", 2);
|
|
917
917
|
W = Pt([
|
|
918
918
|
A("app-header")
|
|
919
919
|
], W);
|
|
920
|
-
var ni = Object.defineProperty, si = Object.getOwnPropertyDescriptor,
|
|
920
|
+
var ni = Object.defineProperty, si = Object.getOwnPropertyDescriptor, Tt = (t, e, r, o) => {
|
|
921
921
|
for (var a = o > 1 ? void 0 : o ? si(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
922
922
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
923
923
|
return o && a && ni(e, r, a), a;
|
|
@@ -973,22 +973,22 @@ tt.styles = [
|
|
|
973
973
|
}
|
|
974
974
|
`
|
|
975
975
|
];
|
|
976
|
-
|
|
976
|
+
Tt([
|
|
977
977
|
b({ type: String })
|
|
978
978
|
], tt.prototype, "iconSrc", 2);
|
|
979
|
-
|
|
979
|
+
Tt([
|
|
980
980
|
b({ type: String })
|
|
981
981
|
], tt.prototype, "themeSrc", 2);
|
|
982
|
-
|
|
982
|
+
Tt([
|
|
983
983
|
b({ type: String })
|
|
984
984
|
], tt.prototype, "networkName", 2);
|
|
985
|
-
|
|
985
|
+
Tt([
|
|
986
986
|
b({ type: Boolean })
|
|
987
987
|
], tt.prototype, "networkConnected", 2);
|
|
988
|
-
|
|
988
|
+
Tt([
|
|
989
989
|
b({ type: String })
|
|
990
990
|
], tt.prototype, "currentPage", 2);
|
|
991
|
-
tt =
|
|
991
|
+
tt = Tt([
|
|
992
992
|
A("app-layout")
|
|
993
993
|
], tt);
|
|
994
994
|
var li = Object.defineProperty, di = Object.getOwnPropertyDescriptor, vr = (t, e, r, o) => {
|
|
@@ -996,7 +996,7 @@ var li = Object.defineProperty, di = Object.getOwnPropertyDescriptor, vr = (t, e
|
|
|
996
996
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
997
997
|
return o && a && li(e, r, a), a;
|
|
998
998
|
};
|
|
999
|
-
let
|
|
999
|
+
let Ut = class extends f {
|
|
1000
1000
|
constructor() {
|
|
1001
1001
|
super(...arguments), this.href = "", this.label = "Back";
|
|
1002
1002
|
}
|
|
@@ -1022,7 +1022,7 @@ let Gt = class extends f {
|
|
|
1022
1022
|
`;
|
|
1023
1023
|
}
|
|
1024
1024
|
};
|
|
1025
|
-
|
|
1025
|
+
Ut.styles = [
|
|
1026
1026
|
f.styles,
|
|
1027
1027
|
k`
|
|
1028
1028
|
:host {
|
|
@@ -1045,14 +1045,14 @@ Gt.styles = [
|
|
|
1045
1045
|
];
|
|
1046
1046
|
vr([
|
|
1047
1047
|
b()
|
|
1048
|
-
],
|
|
1048
|
+
], Ut.prototype, "href", 2);
|
|
1049
1049
|
vr([
|
|
1050
1050
|
b()
|
|
1051
|
-
],
|
|
1052
|
-
|
|
1051
|
+
], Ut.prototype, "label", 2);
|
|
1052
|
+
Ut = vr([
|
|
1053
1053
|
A("wg-back-link")
|
|
1054
|
-
],
|
|
1055
|
-
var ci = Object.defineProperty, pi = Object.getOwnPropertyDescriptor,
|
|
1054
|
+
], Ut);
|
|
1055
|
+
var ci = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, Dt = (t, e, r, o) => {
|
|
1056
1056
|
for (var a = o > 1 ? void 0 : o ? pi(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
1057
1057
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
1058
1058
|
return o && a && ci(e, r, a), a;
|
|
@@ -1239,22 +1239,22 @@ F.styles = [
|
|
|
1239
1239
|
}
|
|
1240
1240
|
`
|
|
1241
1241
|
];
|
|
1242
|
-
|
|
1242
|
+
Dt([
|
|
1243
1243
|
b({ type: String })
|
|
1244
1244
|
], F.prototype, "title", 2);
|
|
1245
|
-
|
|
1245
|
+
Dt([
|
|
1246
1246
|
b({ type: String })
|
|
1247
1247
|
], F.prototype, "message", 2);
|
|
1248
|
-
|
|
1248
|
+
Dt([
|
|
1249
1249
|
b({ type: String })
|
|
1250
1250
|
], F.prototype, "buttonText", 2);
|
|
1251
|
-
|
|
1251
|
+
Dt([
|
|
1252
1252
|
b({ type: String })
|
|
1253
1253
|
], F.prototype, "type", 2);
|
|
1254
|
-
|
|
1254
|
+
Dt([
|
|
1255
1255
|
b({ type: Boolean })
|
|
1256
1256
|
], F.prototype, "closing", 2);
|
|
1257
|
-
F =
|
|
1257
|
+
F = Dt([
|
|
1258
1258
|
A("custom-toast")
|
|
1259
1259
|
], F);
|
|
1260
1260
|
var mi = Object.defineProperty, gi = Object.getOwnPropertyDescriptor, Fe = (t, e, r, o) => {
|
|
@@ -1369,12 +1369,12 @@ Fe([
|
|
|
1369
1369
|
b({ type: String })
|
|
1370
1370
|
], zt.prototype, "label", 2);
|
|
1371
1371
|
Fe([
|
|
1372
|
-
|
|
1372
|
+
T()
|
|
1373
1373
|
], zt.prototype, "copied", 2);
|
|
1374
1374
|
zt = Fe([
|
|
1375
1375
|
A("wg-copy-button")
|
|
1376
1376
|
], zt);
|
|
1377
|
-
var fi = Object.defineProperty, hi = Object.getOwnPropertyDescriptor,
|
|
1377
|
+
var fi = Object.defineProperty, hi = Object.getOwnPropertyDescriptor, Bt = (t, e, r, o) => {
|
|
1378
1378
|
for (var a = o > 1 ? void 0 : o ? hi(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
1379
1379
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
1380
1380
|
return o && a && fi(e, r, a), a;
|
|
@@ -1488,22 +1488,22 @@ et.styles = [
|
|
|
1488
1488
|
}
|
|
1489
1489
|
`
|
|
1490
1490
|
];
|
|
1491
|
-
|
|
1491
|
+
Bt([
|
|
1492
1492
|
b({ type: String })
|
|
1493
1493
|
], et.prototype, "mode", 2);
|
|
1494
|
-
|
|
1494
|
+
Bt([
|
|
1495
1495
|
b({ type: String })
|
|
1496
1496
|
], et.prototype, "title", 2);
|
|
1497
|
-
|
|
1497
|
+
Bt([
|
|
1498
1498
|
b({ type: String })
|
|
1499
1499
|
], et.prototype, "message", 2);
|
|
1500
|
-
|
|
1500
|
+
Bt([
|
|
1501
1501
|
b({ type: String })
|
|
1502
1502
|
], et.prototype, "backHref", 2);
|
|
1503
|
-
|
|
1503
|
+
Bt([
|
|
1504
1504
|
b({ type: Boolean })
|
|
1505
1505
|
], et.prototype, "performDefaultAction", 2);
|
|
1506
|
-
et =
|
|
1506
|
+
et = Bt([
|
|
1507
1507
|
A("wg-error-page")
|
|
1508
1508
|
], et);
|
|
1509
1509
|
var xi = Object.defineProperty, yi = Object.getOwnPropertyDescriptor, fo = (t, e, r, o) => {
|
|
@@ -2116,7 +2116,7 @@ const Si = ho([
|
|
|
2116
2116
|
`
|
|
2117
2117
|
]), Cr = class Cr extends HTMLElement {
|
|
2118
2118
|
constructor() {
|
|
2119
|
-
super(), this.RECENT_KEY = "splice_wallet_picker_recent", this.entries = [], this.recentGateways = [], this.state = "list", this.selectedEntry = null, this.errorMessage = "", this.onOpenerStatusMessage = (r) => {
|
|
2119
|
+
super(), this.RECENT_KEY = "splice_wallet_picker_recent", this.entries = [], this.recentGateways = [], this.state = "list", this.selectedEntry = null, this.errorMessage = "", this.wcUri = null, this.wcQrDataUrl = null, this.onOpenerStatusMessage = (r) => {
|
|
2120
2120
|
if (r.origin !== window.location.origin) return;
|
|
2121
2121
|
const o = r.data;
|
|
2122
2122
|
if (o?.messageType === "SPLICE_WALLET_PICKER_CONNECT_STATUS") {
|
|
@@ -2332,17 +2332,41 @@ const Si = ho([
|
|
|
2332
2332
|
this.el("div", "Connecting...", { class: "view-title" })
|
|
2333
2333
|
);
|
|
2334
2334
|
const r = this.el("div", "", { class: "status-view" });
|
|
2335
|
-
|
|
2336
|
-
this.
|
|
2337
|
-
"
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2335
|
+
if (this.wcUri) {
|
|
2336
|
+
if (this.wcQrDataUrl) {
|
|
2337
|
+
const i = this.el("img", "", {
|
|
2338
|
+
src: this.wcQrDataUrl,
|
|
2339
|
+
alt: "QR Code"
|
|
2340
|
+
});
|
|
2341
|
+
i.style.cssText = "display:block;margin:0 auto 12px;width:200px;height:200px;border-radius:8px;", r.appendChild(i);
|
|
2342
|
+
}
|
|
2343
|
+
r.appendChild(
|
|
2344
|
+
this.el(
|
|
2345
|
+
"h3",
|
|
2346
|
+
this.wcQrDataUrl ? "Or paste this URI in your wallet" : "Paste this URI in your wallet"
|
|
2347
|
+
)
|
|
2348
|
+
);
|
|
2349
|
+
const o = this.el("code", this.wcUri);
|
|
2350
|
+
o.style.cssText = "display:block;word-break:break-all;font-size:11px;background:var(--wg-theme-background-color, #111);padding:12px;border-radius:6px;margin:8px 0;max-height:120px;overflow:auto;user-select:all;cursor:pointer;", r.appendChild(o);
|
|
2351
|
+
const a = this.wcUri, n = this.el("button", "Copy URI");
|
|
2352
|
+
n.style.cssText = "padding:8px 16px;border-radius:4px;border:none;background:#646cff;color:white;cursor:pointer;font-size:14px;margin-top:4px;", n.addEventListener("click", () => {
|
|
2353
|
+
navigator.clipboard.writeText(a), n.innerText = "Copied!", setTimeout(() => {
|
|
2354
|
+
n.innerText = "Copy URI";
|
|
2355
|
+
}, 2e3);
|
|
2356
|
+
}), r.appendChild(n);
|
|
2357
|
+
} else
|
|
2358
|
+
r.appendChild(this.el("div", "", { class: "spinner" })), r.appendChild(
|
|
2359
|
+
this.el(
|
|
2360
|
+
"h3",
|
|
2361
|
+
"Connecting to " + (this.selectedEntry?.name || "") + "..."
|
|
2362
|
+
)
|
|
2363
|
+
), r.appendChild(
|
|
2364
|
+
this.el(
|
|
2365
|
+
"p",
|
|
2366
|
+
this.selectedEntry?.type === "remote" ? "Approve the connection in the wallet popup" : "Approve the connection in your extension"
|
|
2367
|
+
)
|
|
2368
|
+
);
|
|
2369
|
+
return e.appendChild(r), e;
|
|
2346
2370
|
}
|
|
2347
2371
|
renderConnected() {
|
|
2348
2372
|
const e = this.el("div", "", {
|
|
@@ -2401,7 +2425,9 @@ const Si = ho([
|
|
|
2401
2425
|
}), this.shadowRoot.appendChild(e));
|
|
2402
2426
|
}
|
|
2403
2427
|
connectedCallback() {
|
|
2404
|
-
window.addEventListener("message", this.onOpenerStatusMessage), this.render()
|
|
2428
|
+
window.addEventListener("message", this.onOpenerStatusMessage), this.render(), window.addEventListener("message", (e) => {
|
|
2429
|
+
e.data?.type === "wc-uri" && typeof e.data.uri == "string" && (this.wcUri = e.data.uri, this.wcQrDataUrl = e.data.qrDataUrl ?? null, this.state === "connecting" && this.render());
|
|
2430
|
+
});
|
|
2405
2431
|
}
|
|
2406
2432
|
disconnectedCallback() {
|
|
2407
2433
|
window.removeEventListener("message", this.onOpenerStatusMessage);
|
|
@@ -2571,11 +2597,11 @@ at([
|
|
|
2571
2597
|
H = at([
|
|
2572
2598
|
A("form-input")
|
|
2573
2599
|
], H);
|
|
2574
|
-
let
|
|
2600
|
+
let Dr = class extends H {
|
|
2575
2601
|
};
|
|
2576
|
-
|
|
2602
|
+
Dr = at([
|
|
2577
2603
|
A("wg-form-input")
|
|
2578
|
-
],
|
|
2604
|
+
], Dr);
|
|
2579
2605
|
const qt = k`
|
|
2580
2606
|
.wg-card {
|
|
2581
2607
|
background: var(--wg-surface);
|
|
@@ -2630,7 +2656,7 @@ class ji extends Event {
|
|
|
2630
2656
|
super("idp-review", { bubbles: !0, composed: !0 }), this.idp = e;
|
|
2631
2657
|
}
|
|
2632
2658
|
}
|
|
2633
|
-
class
|
|
2659
|
+
class Bp extends Event {
|
|
2634
2660
|
constructor(e) {
|
|
2635
2661
|
super("delete", { bubbles: !0, composed: !0 }), this.idp = e;
|
|
2636
2662
|
}
|
|
@@ -2640,7 +2666,7 @@ class Np extends Event {
|
|
|
2640
2666
|
super("update", { bubbles: !0, composed: !0 });
|
|
2641
2667
|
}
|
|
2642
2668
|
}
|
|
2643
|
-
let
|
|
2669
|
+
let Gt = class extends f {
|
|
2644
2670
|
constructor() {
|
|
2645
2671
|
super(...arguments), this.idp = null, this.readonly = !1;
|
|
2646
2672
|
}
|
|
@@ -2691,7 +2717,7 @@ let Ut = class extends f {
|
|
|
2691
2717
|
</article>`;
|
|
2692
2718
|
}
|
|
2693
2719
|
};
|
|
2694
|
-
|
|
2720
|
+
Gt.styles = [
|
|
2695
2721
|
f.styles,
|
|
2696
2722
|
qt,
|
|
2697
2723
|
k`
|
|
@@ -2769,26 +2795,26 @@ Ut.styles = [
|
|
|
2769
2795
|
];
|
|
2770
2796
|
wr([
|
|
2771
2797
|
b({ type: Object })
|
|
2772
|
-
],
|
|
2798
|
+
], Gt.prototype, "idp", 2);
|
|
2773
2799
|
wr([
|
|
2774
2800
|
b({ type: Boolean })
|
|
2775
|
-
],
|
|
2776
|
-
|
|
2801
|
+
], Gt.prototype, "readonly", 2);
|
|
2802
|
+
Gt = wr([
|
|
2777
2803
|
A("idp-card")
|
|
2778
|
-
],
|
|
2779
|
-
var Pi = Object.defineProperty,
|
|
2804
|
+
], Gt);
|
|
2805
|
+
var Pi = Object.defineProperty, Ti = Object.getOwnPropertyDescriptor, vo = (t) => {
|
|
2780
2806
|
throw TypeError(t);
|
|
2781
2807
|
}, K = (t, e, r, o) => {
|
|
2782
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
2808
|
+
for (var a = o > 1 ? void 0 : o ? Ti(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
2783
2809
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
2784
2810
|
return o && a && Pi(e, r, a), a;
|
|
2785
2811
|
}, wo = (t, e, r) => e.has(t) || vo("Cannot " + r), gt = (t, e, r) => (wo(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ut = (t, e, r) => e.has(t) ? vo("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), ft = (t, e, r, o) => (wo(t, e, "write to private field"), e.set(t, r), r), de, ce, pe, be, me, ge;
|
|
2786
|
-
class
|
|
2812
|
+
class Di extends Event {
|
|
2787
2813
|
constructor(e) {
|
|
2788
2814
|
super("idp-form-save", { bubbles: !0, composed: !0 }), this.idp = e;
|
|
2789
2815
|
}
|
|
2790
2816
|
}
|
|
2791
|
-
class
|
|
2817
|
+
class Bi extends Event {
|
|
2792
2818
|
constructor(e) {
|
|
2793
2819
|
super("idp-form-delete", { bubbles: !0, composed: !0 }), this.idp = e;
|
|
2794
2820
|
}
|
|
@@ -2803,7 +2829,7 @@ class Mp extends Event {
|
|
|
2803
2829
|
super("idp-form-back", { bubbles: !0, composed: !0 });
|
|
2804
2830
|
}
|
|
2805
2831
|
}
|
|
2806
|
-
let
|
|
2832
|
+
let U = class extends f {
|
|
2807
2833
|
constructor() {
|
|
2808
2834
|
super(...arguments), ut(this, de, "add"), ut(this, ce, {
|
|
2809
2835
|
id: "",
|
|
@@ -2857,7 +2883,7 @@ let G = class extends f {
|
|
|
2857
2883
|
}
|
|
2858
2884
|
this._error = "";
|
|
2859
2885
|
const n = { id: e, type: r, issuer: o };
|
|
2860
|
-
r === "oauth" && a && (n.configUrl = a), this.dispatchEvent(new
|
|
2886
|
+
r === "oauth" && a && (n.configUrl = a), this.dispatchEvent(new Di(n));
|
|
2861
2887
|
}
|
|
2862
2888
|
render() {
|
|
2863
2889
|
const t = this.mode === "review";
|
|
@@ -2956,7 +2982,7 @@ let G = class extends f {
|
|
|
2956
2982
|
type="button"
|
|
2957
2983
|
class="btn-delete"
|
|
2958
2984
|
@click=${() => this.dispatchEvent(
|
|
2959
|
-
new
|
|
2985
|
+
new Bi(this.idp)
|
|
2960
2986
|
)}
|
|
2961
2987
|
>
|
|
2962
2988
|
Delete identity provider
|
|
@@ -3002,7 +3028,7 @@ pe = /* @__PURE__ */ new WeakMap();
|
|
|
3002
3028
|
be = /* @__PURE__ */ new WeakMap();
|
|
3003
3029
|
me = /* @__PURE__ */ new WeakMap();
|
|
3004
3030
|
ge = /* @__PURE__ */ new WeakMap();
|
|
3005
|
-
|
|
3031
|
+
U.styles = [
|
|
3006
3032
|
f.styles,
|
|
3007
3033
|
k`
|
|
3008
3034
|
:host {
|
|
@@ -3165,31 +3191,31 @@ G.styles = [
|
|
|
3165
3191
|
];
|
|
3166
3192
|
K([
|
|
3167
3193
|
b({ type: String })
|
|
3168
|
-
],
|
|
3194
|
+
], U.prototype, "mode", 1);
|
|
3169
3195
|
K([
|
|
3170
3196
|
b({ type: Object })
|
|
3171
|
-
],
|
|
3197
|
+
], U.prototype, "idp", 1);
|
|
3172
3198
|
K([
|
|
3173
3199
|
b({ type: Boolean })
|
|
3174
|
-
],
|
|
3200
|
+
], U.prototype, "loading", 2);
|
|
3175
3201
|
K([
|
|
3176
|
-
|
|
3177
|
-
],
|
|
3202
|
+
T()
|
|
3203
|
+
], U.prototype, "_error", 2);
|
|
3178
3204
|
K([
|
|
3179
3205
|
pt("#idp-id")
|
|
3180
|
-
],
|
|
3206
|
+
], U.prototype, "idpIdInput", 1);
|
|
3181
3207
|
K([
|
|
3182
3208
|
pt("#idp-type")
|
|
3183
|
-
],
|
|
3209
|
+
], U.prototype, "idpTypeSelect", 1);
|
|
3184
3210
|
K([
|
|
3185
3211
|
pt("#idp-issuer")
|
|
3186
|
-
],
|
|
3212
|
+
], U.prototype, "idpIssuerInput", 1);
|
|
3187
3213
|
K([
|
|
3188
3214
|
pt("#idp-config-url")
|
|
3189
|
-
],
|
|
3190
|
-
|
|
3215
|
+
], U.prototype, "idpConfigUrlInput", 1);
|
|
3216
|
+
U = K([
|
|
3191
3217
|
A("idp-form")
|
|
3192
|
-
],
|
|
3218
|
+
], U);
|
|
3193
3219
|
const xo = k`
|
|
3194
3220
|
.modal {
|
|
3195
3221
|
position: fixed;
|
|
@@ -3406,10 +3432,10 @@ Ft([
|
|
|
3406
3432
|
b({ type: Boolean })
|
|
3407
3433
|
], lt.prototype, "readonly", 1);
|
|
3408
3434
|
Ft([
|
|
3409
|
-
|
|
3435
|
+
T()
|
|
3410
3436
|
], lt.prototype, "isModalOpen", 1);
|
|
3411
3437
|
Ft([
|
|
3412
|
-
|
|
3438
|
+
T()
|
|
3413
3439
|
], lt.prototype, "modalIdp", 1);
|
|
3414
3440
|
lt = Ft([
|
|
3415
3441
|
A("wg-idps")
|
|
@@ -3460,10 +3486,10 @@ Ke([
|
|
|
3460
3486
|
St = Ke([
|
|
3461
3487
|
A("network-table")
|
|
3462
3488
|
], St);
|
|
3463
|
-
var
|
|
3464
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
3489
|
+
var Ui = Object.defineProperty, Gi = Object.getOwnPropertyDescriptor, Jt = (t, e, r, o) => {
|
|
3490
|
+
for (var a = o > 1 ? void 0 : o ? Gi(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
3465
3491
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
3466
|
-
return o && a &&
|
|
3492
|
+
return o && a && Ui(e, r, a), a;
|
|
3467
3493
|
};
|
|
3468
3494
|
class Li extends Event {
|
|
3469
3495
|
constructor(e) {
|
|
@@ -3750,13 +3776,13 @@ function Hi(t, e) {
|
|
|
3750
3776
|
const n = r > a ? r : a, i = Number.parseInt(t.toFixed(n).replace(".", "")), s = Number.parseInt(e.toFixed(n).replace(".", ""));
|
|
3751
3777
|
return i % s / 10 ** n;
|
|
3752
3778
|
}
|
|
3753
|
-
const
|
|
3779
|
+
const Br = /* @__PURE__ */ Symbol("evaluating");
|
|
3754
3780
|
function x(t, e, r) {
|
|
3755
3781
|
let o;
|
|
3756
3782
|
Object.defineProperty(t, e, {
|
|
3757
3783
|
get() {
|
|
3758
|
-
if (o !==
|
|
3759
|
-
return o === void 0 && (o =
|
|
3784
|
+
if (o !== Br)
|
|
3785
|
+
return o === void 0 && (o = Br, o = r()), o;
|
|
3760
3786
|
},
|
|
3761
3787
|
set(a) {
|
|
3762
3788
|
Object.defineProperty(t, e, {
|
|
@@ -4102,16 +4128,16 @@ const zr = (t) => (e, r, o, a) => {
|
|
|
4102
4128
|
function On() {
|
|
4103
4129
|
return new RegExp(In, "u");
|
|
4104
4130
|
}
|
|
4105
|
-
const En = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Cn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, _n = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, jn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Pn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, jo = /^[A-Za-z0-9_-]*$/,
|
|
4106
|
-
function
|
|
4131
|
+
const En = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Cn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, _n = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, jn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Pn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, jo = /^[A-Za-z0-9_-]*$/, Tn = /^\+[1-9]\d{6,14}$/, Po = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Dn = /* @__PURE__ */ new RegExp(`^${Po}$`);
|
|
4132
|
+
function To(t) {
|
|
4107
4133
|
const e = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
4108
4134
|
return typeof t.precision == "number" ? t.precision === -1 ? `${e}` : t.precision === 0 ? `${e}:[0-5]\\d` : `${e}:[0-5]\\d\\.\\d{${t.precision}}` : `${e}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
4109
4135
|
}
|
|
4110
|
-
function
|
|
4111
|
-
return new RegExp(`^${
|
|
4136
|
+
function Bn(t) {
|
|
4137
|
+
return new RegExp(`^${To(t)}$`);
|
|
4112
4138
|
}
|
|
4113
4139
|
function Nn(t) {
|
|
4114
|
-
const e =
|
|
4140
|
+
const e = To({ precision: t.precision }), r = ["Z"];
|
|
4115
4141
|
t.local && r.push(""), t.offset && r.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
4116
4142
|
const o = `${e}(?:${r.join("|")})`;
|
|
4117
4143
|
return new RegExp(`^${Po}T(?:${o})$`);
|
|
@@ -4119,16 +4145,16 @@ function Nn(t) {
|
|
|
4119
4145
|
const Mn = (t) => {
|
|
4120
4146
|
const e = t ? `[\\s\\S]{${t?.minimum ?? 0},${t?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
4121
4147
|
return new RegExp(`^${e}$`);
|
|
4122
|
-
}, Zn = /^-?\d+$/,
|
|
4148
|
+
}, Zn = /^-?\d+$/, Do = /^-?\d+(?:\.\d+)?$/, Rn = /^(?:true|false)$/i, $n = /^null$/i, Yn = /^undefined$/i, Un = /^[^A-Z]*$/, Gn = /^[^a-z]*$/, Z = /* @__PURE__ */ d("$ZodCheck", (t, e) => {
|
|
4123
4149
|
var r;
|
|
4124
4150
|
t._zod ?? (t._zod = {}), t._zod.def = e, (r = t._zod).onattach ?? (r.onattach = []);
|
|
4125
|
-
}),
|
|
4151
|
+
}), Bo = {
|
|
4126
4152
|
number: "number",
|
|
4127
4153
|
bigint: "bigint",
|
|
4128
4154
|
object: "date"
|
|
4129
4155
|
}, No = /* @__PURE__ */ d("$ZodCheckLessThan", (t, e) => {
|
|
4130
4156
|
Z.init(t, e);
|
|
4131
|
-
const r =
|
|
4157
|
+
const r = Bo[typeof e.value];
|
|
4132
4158
|
t._zod.onattach.push((o) => {
|
|
4133
4159
|
const a = o._zod.bag, n = (e.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
4134
4160
|
e.value < n && (e.inclusive ? a.maximum = e.value : a.exclusiveMaximum = e.value);
|
|
@@ -4145,7 +4171,7 @@ const Mn = (t) => {
|
|
|
4145
4171
|
};
|
|
4146
4172
|
}), Mo = /* @__PURE__ */ d("$ZodCheckGreaterThan", (t, e) => {
|
|
4147
4173
|
Z.init(t, e);
|
|
4148
|
-
const r =
|
|
4174
|
+
const r = Bo[typeof e.value];
|
|
4149
4175
|
t._zod.onattach.push((o) => {
|
|
4150
4176
|
const a = o._zod.bag, n = (e.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
4151
4177
|
e.value > n && (e.inclusive ? a.minimum = e.value : a.exclusiveMinimum = e.value);
|
|
@@ -4336,9 +4362,9 @@ const Mn = (t) => {
|
|
|
4336
4362
|
});
|
|
4337
4363
|
};
|
|
4338
4364
|
}), Jn = /* @__PURE__ */ d("$ZodCheckLowerCase", (t, e) => {
|
|
4339
|
-
e.pattern ?? (e.pattern = Gn), er.init(t, e);
|
|
4340
|
-
}), Kn = /* @__PURE__ */ d("$ZodCheckUpperCase", (t, e) => {
|
|
4341
4365
|
e.pattern ?? (e.pattern = Un), er.init(t, e);
|
|
4366
|
+
}), Kn = /* @__PURE__ */ d("$ZodCheckUpperCase", (t, e) => {
|
|
4367
|
+
e.pattern ?? (e.pattern = Gn), er.init(t, e);
|
|
4342
4368
|
}), Qn = /* @__PURE__ */ d("$ZodCheckIncludes", (t, e) => {
|
|
4343
4369
|
Z.init(t, e);
|
|
4344
4370
|
const r = Ot(e.includes), o = new RegExp(typeof e.position == "number" ? `^.{${e.position}}${r}` : r);
|
|
@@ -4583,9 +4609,9 @@ const os = {
|
|
|
4583
4609
|
}), us = /* @__PURE__ */ d("$ZodISODateTime", (t, e) => {
|
|
4584
4610
|
e.pattern ?? (e.pattern = Nn(e)), O.init(t, e);
|
|
4585
4611
|
}), fs = /* @__PURE__ */ d("$ZodISODate", (t, e) => {
|
|
4586
|
-
e.pattern ?? (e.pattern =
|
|
4612
|
+
e.pattern ?? (e.pattern = Dn), O.init(t, e);
|
|
4587
4613
|
}), hs = /* @__PURE__ */ d("$ZodISOTime", (t, e) => {
|
|
4588
|
-
e.pattern ?? (e.pattern =
|
|
4614
|
+
e.pattern ?? (e.pattern = Bn(e)), O.init(t, e);
|
|
4589
4615
|
}), vs = /* @__PURE__ */ d("$ZodISODuration", (t, e) => {
|
|
4590
4616
|
e.pattern ?? (e.pattern = zn), O.init(t, e);
|
|
4591
4617
|
}), ws = /* @__PURE__ */ d("$ZodIPv4", (t, e) => {
|
|
@@ -4671,7 +4697,7 @@ const Ss = /* @__PURE__ */ d("$ZodBase64URL", (t, e) => {
|
|
|
4671
4697
|
});
|
|
4672
4698
|
};
|
|
4673
4699
|
}), Is = /* @__PURE__ */ d("$ZodE164", (t, e) => {
|
|
4674
|
-
e.pattern ?? (e.pattern =
|
|
4700
|
+
e.pattern ?? (e.pattern = Tn), O.init(t, e);
|
|
4675
4701
|
});
|
|
4676
4702
|
function Os(t, e = null) {
|
|
4677
4703
|
try {
|
|
@@ -4698,7 +4724,7 @@ const Es = /* @__PURE__ */ d("$ZodJWT", (t, e) => {
|
|
|
4698
4724
|
});
|
|
4699
4725
|
};
|
|
4700
4726
|
}), Ro = /* @__PURE__ */ d("$ZodNumber", (t, e) => {
|
|
4701
|
-
S.init(t, e), t._zod.pattern = t._zod.bag.pattern ??
|
|
4727
|
+
S.init(t, e), t._zod.pattern = t._zod.bag.pattern ?? Do, t._zod.parse = (r, o) => {
|
|
4702
4728
|
if (e.coerce)
|
|
4703
4729
|
try {
|
|
4704
4730
|
r.value = Number(r.value);
|
|
@@ -4753,9 +4779,9 @@ const Es = /* @__PURE__ */ d("$ZodJWT", (t, e) => {
|
|
|
4753
4779
|
inst: t
|
|
4754
4780
|
}), r;
|
|
4755
4781
|
};
|
|
4756
|
-
}),
|
|
4782
|
+
}), Ts = /* @__PURE__ */ d("$ZodUnknown", (t, e) => {
|
|
4757
4783
|
S.init(t, e), t._zod.parse = (r) => r;
|
|
4758
|
-
}),
|
|
4784
|
+
}), Ds = /* @__PURE__ */ d("$ZodNever", (t, e) => {
|
|
4759
4785
|
S.init(t, e), t._zod.parse = (r, o) => (r.issues.push({
|
|
4760
4786
|
expected: "never",
|
|
4761
4787
|
code: "invalid_type",
|
|
@@ -4766,7 +4792,7 @@ const Es = /* @__PURE__ */ d("$ZodJWT", (t, e) => {
|
|
|
4766
4792
|
function Zr(t, e, r) {
|
|
4767
4793
|
t.issues.length && e.issues.push(...yt(r, t.issues)), e.value[r] = t.value;
|
|
4768
4794
|
}
|
|
4769
|
-
const
|
|
4795
|
+
const Bs = /* @__PURE__ */ d("$ZodArray", (t, e) => {
|
|
4770
4796
|
S.init(t, e), t._zod.parse = (r, o) => {
|
|
4771
4797
|
const a = r.value;
|
|
4772
4798
|
if (!Array.isArray(a))
|
|
@@ -4955,7 +4981,7 @@ function Rr(t, e, r, o) {
|
|
|
4955
4981
|
errors: t.map((n) => n.issues.map((i) => ot(i, o, rt())))
|
|
4956
4982
|
}), e);
|
|
4957
4983
|
}
|
|
4958
|
-
const
|
|
4984
|
+
const Uo = /* @__PURE__ */ d("$ZodUnion", (t, e) => {
|
|
4959
4985
|
S.init(t, e), x(t._zod, "optin", () => e.options.some((a) => a._zod.optin === "optional") ? "optional" : void 0), x(t._zod, "optout", () => e.options.some((a) => a._zod.optout === "optional") ? "optional" : void 0), x(t._zod, "values", () => {
|
|
4960
4986
|
if (e.options.every((a) => a._zod.values))
|
|
4961
4987
|
return new Set(e.options.flatMap((a) => Array.from(a._zod.values)));
|
|
@@ -4987,7 +5013,7 @@ const Go = /* @__PURE__ */ d("$ZodUnion", (t, e) => {
|
|
|
4987
5013
|
return i ? Promise.all(s).then((l) => Rr(l, a, t, n)) : Rr(s, a, t, n);
|
|
4988
5014
|
};
|
|
4989
5015
|
}), Zs = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (t, e) => {
|
|
4990
|
-
e.inclusive = !1,
|
|
5016
|
+
e.inclusive = !1, Uo.init(t, e);
|
|
4991
5017
|
const r = t._zod.parse;
|
|
4992
5018
|
x(t._zod, "propValues", () => {
|
|
4993
5019
|
const a = {};
|
|
@@ -5141,7 +5167,7 @@ const $s = /* @__PURE__ */ d("$ZodRecord", (t, e) => {
|
|
|
5141
5167
|
let l = e.keyType._zod.run({ value: s, issues: [] }, o);
|
|
5142
5168
|
if (l instanceof Promise)
|
|
5143
5169
|
throw new Error("Async schemas not supported in object keys currently");
|
|
5144
|
-
if (typeof s == "string" &&
|
|
5170
|
+
if (typeof s == "string" && Do.test(s) && l.issues.length) {
|
|
5145
5171
|
const g = e.keyType._zod.run({ value: Number(s), issues: [] }, o);
|
|
5146
5172
|
if (g instanceof Promise)
|
|
5147
5173
|
throw new Error("Async schemas not supported in object keys currently");
|
|
@@ -5178,7 +5204,7 @@ const $s = /* @__PURE__ */ d("$ZodRecord", (t, e) => {
|
|
|
5178
5204
|
inst: t
|
|
5179
5205
|
}), a;
|
|
5180
5206
|
};
|
|
5181
|
-
}),
|
|
5207
|
+
}), Us = /* @__PURE__ */ d("$ZodLiteral", (t, e) => {
|
|
5182
5208
|
if (S.init(t, e), e.values.length === 0)
|
|
5183
5209
|
throw new Error("Cannot create literal schema with no valid values");
|
|
5184
5210
|
const r = new Set(e.values);
|
|
@@ -5191,7 +5217,7 @@ const $s = /* @__PURE__ */ d("$ZodRecord", (t, e) => {
|
|
|
5191
5217
|
inst: t
|
|
5192
5218
|
}), o;
|
|
5193
5219
|
};
|
|
5194
|
-
}),
|
|
5220
|
+
}), Gs = /* @__PURE__ */ d("$ZodTransform", (t, e) => {
|
|
5195
5221
|
S.init(t, e), t._zod.parse = (r, o) => {
|
|
5196
5222
|
if (o.direction === "backward")
|
|
5197
5223
|
throw new zo(t.constructor.name);
|
|
@@ -5206,7 +5232,7 @@ const $s = /* @__PURE__ */ d("$ZodRecord", (t, e) => {
|
|
|
5206
5232
|
function Yr(t, e) {
|
|
5207
5233
|
return t.issues.length && e === void 0 ? { issues: [], value: void 0 } : t;
|
|
5208
5234
|
}
|
|
5209
|
-
const
|
|
5235
|
+
const Go = /* @__PURE__ */ d("$ZodOptional", (t, e) => {
|
|
5210
5236
|
S.init(t, e), t._zod.optin = "optional", t._zod.optout = "optional", x(t._zod, "values", () => e.innerType._zod.values ? /* @__PURE__ */ new Set([...e.innerType._zod.values, void 0]) : void 0), x(t._zod, "pattern", () => {
|
|
5211
5237
|
const r = e.innerType._zod.pattern;
|
|
5212
5238
|
return r ? new RegExp(`^(${yr(r.source)})?$`) : void 0;
|
|
@@ -5218,7 +5244,7 @@ const Uo = /* @__PURE__ */ d("$ZodOptional", (t, e) => {
|
|
|
5218
5244
|
return r.value === void 0 ? r : e.innerType._zod.run(r, o);
|
|
5219
5245
|
};
|
|
5220
5246
|
}), Ls = /* @__PURE__ */ d("$ZodExactOptional", (t, e) => {
|
|
5221
|
-
|
|
5247
|
+
Go.init(t, e), x(t._zod, "values", () => e.innerType._zod.values), x(t._zod, "pattern", () => e.innerType._zod.pattern), t._zod.parse = (r, o) => e.innerType._zod.run(r, o);
|
|
5222
5248
|
}), Hs = /* @__PURE__ */ d("$ZodNullable", (t, e) => {
|
|
5223
5249
|
S.init(t, e), x(t._zod, "optin", () => e.innerType._zod.optin), x(t._zod, "optout", () => e.innerType._zod.optout), x(t._zod, "pattern", () => {
|
|
5224
5250
|
const r = e.innerType._zod.pattern;
|
|
@@ -5231,10 +5257,10 @@ const Uo = /* @__PURE__ */ d("$ZodOptional", (t, e) => {
|
|
|
5231
5257
|
if (r.value === void 0)
|
|
5232
5258
|
return r.value = e.defaultValue, r;
|
|
5233
5259
|
const a = e.innerType._zod.run(r, o);
|
|
5234
|
-
return a instanceof Promise ? a.then((n) =>
|
|
5260
|
+
return a instanceof Promise ? a.then((n) => Ur(n, e)) : Ur(a, e);
|
|
5235
5261
|
};
|
|
5236
5262
|
});
|
|
5237
|
-
function
|
|
5263
|
+
function Ur(t, e) {
|
|
5238
5264
|
return t.value === void 0 && (t.value = e.defaultValue), t;
|
|
5239
5265
|
}
|
|
5240
5266
|
const Vs = /* @__PURE__ */ d("$ZodPrefault", (t, e) => {
|
|
@@ -5245,10 +5271,10 @@ const Vs = /* @__PURE__ */ d("$ZodPrefault", (t, e) => {
|
|
|
5245
5271
|
return r ? new Set([...r].filter((o) => o !== void 0)) : void 0;
|
|
5246
5272
|
}), t._zod.parse = (r, o) => {
|
|
5247
5273
|
const a = e.innerType._zod.run(r, o);
|
|
5248
|
-
return a instanceof Promise ? a.then((n) =>
|
|
5274
|
+
return a instanceof Promise ? a.then((n) => Gr(n, t)) : Gr(a, t);
|
|
5249
5275
|
};
|
|
5250
5276
|
});
|
|
5251
|
-
function
|
|
5277
|
+
function Gr(t, e) {
|
|
5252
5278
|
return !t.issues.length && t.value === void 0 && t.issues.push({
|
|
5253
5279
|
code: "invalid_type",
|
|
5254
5280
|
expected: "nonoptional",
|
|
@@ -5673,7 +5699,7 @@ function Pl(t) {
|
|
|
5673
5699
|
});
|
|
5674
5700
|
}
|
|
5675
5701
|
// @__NO_SIDE_EFFECTS__
|
|
5676
|
-
function
|
|
5702
|
+
function Tl(t, e) {
|
|
5677
5703
|
return new t({
|
|
5678
5704
|
type: "never",
|
|
5679
5705
|
...u(e)
|
|
@@ -5748,7 +5774,7 @@ function Ho(t, e) {
|
|
|
5748
5774
|
});
|
|
5749
5775
|
}
|
|
5750
5776
|
// @__NO_SIDE_EFFECTS__
|
|
5751
|
-
function
|
|
5777
|
+
function Dl(t, e) {
|
|
5752
5778
|
return new Fn({
|
|
5753
5779
|
check: "string_format",
|
|
5754
5780
|
format: "regex",
|
|
@@ -5757,7 +5783,7 @@ function Tl(t, e) {
|
|
|
5757
5783
|
});
|
|
5758
5784
|
}
|
|
5759
5785
|
// @__NO_SIDE_EFFECTS__
|
|
5760
|
-
function
|
|
5786
|
+
function Bl(t) {
|
|
5761
5787
|
return new Jn({
|
|
5762
5788
|
check: "string_format",
|
|
5763
5789
|
format: "lowercase",
|
|
@@ -5815,11 +5841,11 @@ function Yl() {
|
|
|
5815
5841
|
return /* @__PURE__ */ Nt((t) => t.trim());
|
|
5816
5842
|
}
|
|
5817
5843
|
// @__NO_SIDE_EFFECTS__
|
|
5818
|
-
function
|
|
5844
|
+
function Ul() {
|
|
5819
5845
|
return /* @__PURE__ */ Nt((t) => t.toLowerCase());
|
|
5820
5846
|
}
|
|
5821
5847
|
// @__NO_SIDE_EFFECTS__
|
|
5822
|
-
function
|
|
5848
|
+
function Gl() {
|
|
5823
5849
|
return /* @__PURE__ */ Nt((t) => t.toUpperCase());
|
|
5824
5850
|
}
|
|
5825
5851
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -5911,7 +5937,7 @@ function C(t, e, r = { path: [], schemaPath: [] }) {
|
|
|
5911
5937
|
g && (i.ref || (i.ref = g), C(g, e, m), e.seen.get(g).isParent = !0);
|
|
5912
5938
|
}
|
|
5913
5939
|
const l = e.metadataRegistry.get(t);
|
|
5914
|
-
return l && Object.assign(i.schema, l), e.io === "input" &&
|
|
5940
|
+
return l && Object.assign(i.schema, l), e.io === "input" && D(t) && (delete i.schema.examples, delete i.schema.default), e.io === "input" && i.schema._prefault && ((o = i.schema).default ?? (o.default = i.schema._prefault)), delete i.schema._prefault, e.seen.get(t).schema;
|
|
5915
5941
|
}
|
|
5916
5942
|
function Vo(t, e) {
|
|
5917
5943
|
const r = t.seen.get(e);
|
|
@@ -6040,8 +6066,8 @@ function qo(t, e) {
|
|
|
6040
6066
|
value: {
|
|
6041
6067
|
...e["~standard"],
|
|
6042
6068
|
jsonSchema: {
|
|
6043
|
-
input:
|
|
6044
|
-
output:
|
|
6069
|
+
input: Ue(e, "input", t.processors),
|
|
6070
|
+
output: Ue(e, "output", t.processors)
|
|
6045
6071
|
}
|
|
6046
6072
|
},
|
|
6047
6073
|
enumerable: !1,
|
|
@@ -6051,7 +6077,7 @@ function qo(t, e) {
|
|
|
6051
6077
|
throw new Error("Error converting schema to JSON.");
|
|
6052
6078
|
}
|
|
6053
6079
|
}
|
|
6054
|
-
function
|
|
6080
|
+
function D(t, e) {
|
|
6055
6081
|
const r = e ?? { seen: /* @__PURE__ */ new Set() };
|
|
6056
6082
|
if (r.seen.has(t))
|
|
6057
6083
|
return !1;
|
|
@@ -6060,43 +6086,43 @@ function T(t, e) {
|
|
|
6060
6086
|
if (o.type === "transform")
|
|
6061
6087
|
return !0;
|
|
6062
6088
|
if (o.type === "array")
|
|
6063
|
-
return
|
|
6089
|
+
return D(o.element, r);
|
|
6064
6090
|
if (o.type === "set")
|
|
6065
|
-
return
|
|
6091
|
+
return D(o.valueType, r);
|
|
6066
6092
|
if (o.type === "lazy")
|
|
6067
|
-
return
|
|
6093
|
+
return D(o.getter(), r);
|
|
6068
6094
|
if (o.type === "promise" || o.type === "optional" || o.type === "nonoptional" || o.type === "nullable" || o.type === "readonly" || o.type === "default" || o.type === "prefault")
|
|
6069
|
-
return
|
|
6095
|
+
return D(o.innerType, r);
|
|
6070
6096
|
if (o.type === "intersection")
|
|
6071
|
-
return
|
|
6097
|
+
return D(o.left, r) || D(o.right, r);
|
|
6072
6098
|
if (o.type === "record" || o.type === "map")
|
|
6073
|
-
return
|
|
6099
|
+
return D(o.keyType, r) || D(o.valueType, r);
|
|
6074
6100
|
if (o.type === "pipe")
|
|
6075
|
-
return
|
|
6101
|
+
return D(o.in, r) || D(o.out, r);
|
|
6076
6102
|
if (o.type === "object") {
|
|
6077
6103
|
for (const a in o.shape)
|
|
6078
|
-
if (
|
|
6104
|
+
if (D(o.shape[a], r))
|
|
6079
6105
|
return !0;
|
|
6080
6106
|
return !1;
|
|
6081
6107
|
}
|
|
6082
6108
|
if (o.type === "union") {
|
|
6083
6109
|
for (const a of o.options)
|
|
6084
|
-
if (
|
|
6110
|
+
if (D(a, r))
|
|
6085
6111
|
return !0;
|
|
6086
6112
|
return !1;
|
|
6087
6113
|
}
|
|
6088
6114
|
if (o.type === "tuple") {
|
|
6089
6115
|
for (const a of o.items)
|
|
6090
|
-
if (
|
|
6116
|
+
if (D(a, r))
|
|
6091
6117
|
return !0;
|
|
6092
|
-
return !!(o.rest &&
|
|
6118
|
+
return !!(o.rest && D(o.rest, r));
|
|
6093
6119
|
}
|
|
6094
6120
|
return !1;
|
|
6095
6121
|
}
|
|
6096
6122
|
const Fl = (t, e = {}) => (r) => {
|
|
6097
6123
|
const o = Xo({ ...r, processors: e });
|
|
6098
6124
|
return C(t, o), Vo(o, t), qo(o, t);
|
|
6099
|
-
},
|
|
6125
|
+
}, Ue = (t, e, r = {}) => (o) => {
|
|
6100
6126
|
const { libraryOptions: a, target: n } = o ?? {}, i = Xo({ ...a ?? {}, target: n, io: e, processors: r });
|
|
6101
6127
|
return C(t, i), Vo(i, t), qo(i, t);
|
|
6102
6128
|
}, Jl = {
|
|
@@ -6321,10 +6347,10 @@ const Ed = (t, e) => {
|
|
|
6321
6347
|
});
|
|
6322
6348
|
}, $ = d("ZodError", Ed, {
|
|
6323
6349
|
Parent: Error
|
|
6324
|
-
}), Cd = /* @__PURE__ */ zr($), _d = /* @__PURE__ */ Ar($), jd = /* @__PURE__ */ We($), Pd = /* @__PURE__ */ tr($),
|
|
6350
|
+
}), Cd = /* @__PURE__ */ zr($), _d = /* @__PURE__ */ Ar($), jd = /* @__PURE__ */ We($), Pd = /* @__PURE__ */ tr($), Td = /* @__PURE__ */ dn($), Dd = /* @__PURE__ */ cn($), Bd = /* @__PURE__ */ pn($), Nd = /* @__PURE__ */ bn($), Md = /* @__PURE__ */ mn($), Zd = /* @__PURE__ */ gn($), Rd = /* @__PURE__ */ un($), $d = /* @__PURE__ */ fn($), I = /* @__PURE__ */ d("ZodType", (t, e) => (S.init(t, e), Object.assign(t["~standard"], {
|
|
6325
6351
|
jsonSchema: {
|
|
6326
|
-
input:
|
|
6327
|
-
output:
|
|
6352
|
+
input: Ue(t, "input"),
|
|
6353
|
+
output: Ue(t, "output")
|
|
6328
6354
|
}
|
|
6329
6355
|
}), t.toJSONSchema = Fl(t, {}), t.def = e, t.type = e.type, Object.defineProperty(t, "_def", { value: e }), t.check = (...r) => t.clone(it(e, {
|
|
6330
6356
|
checks: [
|
|
@@ -6333,7 +6359,7 @@ const Ed = (t, e) => {
|
|
|
6333
6359
|
]
|
|
6334
6360
|
}), {
|
|
6335
6361
|
parent: !0
|
|
6336
|
-
}), t.with = t.check, t.clone = (r, o) => nt(t, r, o), t.brand = () => t, t.register = ((r, o) => (r.add(t, o), t)), t.parse = (r, o) => Cd(t, r, o, { callee: t.parse }), t.safeParse = (r, o) => jd(t, r, o), t.parseAsync = async (r, o) => _d(t, r, o, { callee: t.parseAsync }), t.safeParseAsync = async (r, o) => Pd(t, r, o), t.spa = t.safeParseAsync, t.encode = (r, o) =>
|
|
6362
|
+
}), t.with = t.check, t.clone = (r, o) => nt(t, r, o), t.brand = () => t, t.register = ((r, o) => (r.add(t, o), t)), t.parse = (r, o) => Cd(t, r, o, { callee: t.parse }), t.safeParse = (r, o) => jd(t, r, o), t.parseAsync = async (r, o) => _d(t, r, o, { callee: t.parseAsync }), t.safeParseAsync = async (r, o) => Pd(t, r, o), t.spa = t.safeParseAsync, t.encode = (r, o) => Td(t, r, o), t.decode = (r, o) => Dd(t, r, o), t.encodeAsync = async (r, o) => Bd(t, r, o), t.decodeAsync = async (r, o) => Nd(t, r, o), t.safeEncode = (r, o) => Md(t, r, o), t.safeDecode = (r, o) => Zd(t, r, o), t.safeEncodeAsync = async (r, o) => Rd(t, r, o), t.safeDecodeAsync = async (r, o) => $d(t, r, o), t.refine = (r, o) => t.check(Mc(r, o)), t.superRefine = (r) => t.check(Zc(r)), t.overwrite = (r) => t.check(/* @__PURE__ */ Nt(r)), t.optional = () => ct(t), t.exactOptional = () => Ac(t), t.nullable = () => Wr(t), t.nullish = () => ct(Wr(t)), t.nonoptional = (r) => _c(t, r), t.array = () => Le(t), t.or = (r) => Ir([t, r]), t.and = (r) => Or(t, r), t.transform = (r) => to(t, kc(r)), t.default = (r) => Oc(t, r), t.prefault = (r) => Cc(t, r), t.catch = (r) => Pc(t, r), t.pipe = (r) => to(t, r), t.readonly = () => Bc(t), t.describe = (r) => {
|
|
6337
6363
|
const o = t.clone();
|
|
6338
6364
|
return Rt.add(o, { description: r }), o;
|
|
6339
6365
|
}, Object.defineProperty(t, "description", {
|
|
@@ -6349,22 +6375,22 @@ const Ed = (t, e) => {
|
|
|
6349
6375
|
}, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t.apply = (r) => r(t), t)), Jo = /* @__PURE__ */ d("_ZodString", (t, e) => {
|
|
6350
6376
|
Sr.init(t, e), I.init(t, e), t._zod.processJSONSchema = (o, a, n) => Kl(t, o, a);
|
|
6351
6377
|
const r = t._zod.bag;
|
|
6352
|
-
t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...o) => t.check(/* @__PURE__ */
|
|
6378
|
+
t.format = r.format ?? null, t.minLength = r.minimum ?? null, t.maxLength = r.maximum ?? null, t.regex = (...o) => t.check(/* @__PURE__ */ Dl(...o)), t.includes = (...o) => t.check(/* @__PURE__ */ Ml(...o)), t.startsWith = (...o) => t.check(/* @__PURE__ */ Zl(...o)), t.endsWith = (...o) => t.check(/* @__PURE__ */ Rl(...o)), t.min = (...o) => t.check(/* @__PURE__ */ Ye(...o)), t.max = (...o) => t.check(/* @__PURE__ */ Lo(...o)), t.length = (...o) => t.check(/* @__PURE__ */ Ho(...o)), t.nonempty = (...o) => t.check(/* @__PURE__ */ Ye(1, ...o)), t.lowercase = (o) => t.check(/* @__PURE__ */ Bl(o)), t.uppercase = (o) => t.check(/* @__PURE__ */ Nl(o)), t.trim = () => t.check(/* @__PURE__ */ Yl()), t.normalize = (...o) => t.check(/* @__PURE__ */ $l(...o)), t.toLowerCase = () => t.check(/* @__PURE__ */ Ul()), t.toUpperCase = () => t.check(/* @__PURE__ */ Gl()), t.slugify = () => t.check(/* @__PURE__ */ Ll());
|
|
6353
6379
|
}), Yd = /* @__PURE__ */ d("ZodString", (t, e) => {
|
|
6354
|
-
Sr.init(t, e), Jo.init(t, e), t.email = (r) => t.check(/* @__PURE__ */ rl(
|
|
6380
|
+
Sr.init(t, e), Jo.init(t, e), t.email = (r) => t.check(/* @__PURE__ */ rl(Ud, r)), t.url = (r) => t.check(/* @__PURE__ */ sl(Gd, r)), t.jwt = (r) => t.check(/* @__PURE__ */ kl(ac, r)), t.emoji = (r) => t.check(/* @__PURE__ */ ll(Ld, r)), t.guid = (r) => t.check(/* @__PURE__ */ Vr(Kr, r)), t.uuid = (r) => t.check(/* @__PURE__ */ ol(oe, r)), t.uuidv4 = (r) => t.check(/* @__PURE__ */ al(oe, r)), t.uuidv6 = (r) => t.check(/* @__PURE__ */ il(oe, r)), t.uuidv7 = (r) => t.check(/* @__PURE__ */ nl(oe, r)), t.nanoid = (r) => t.check(/* @__PURE__ */ dl(Hd, r)), t.guid = (r) => t.check(/* @__PURE__ */ Vr(Kr, r)), t.cuid = (r) => t.check(/* @__PURE__ */ cl(Xd, r)), t.cuid2 = (r) => t.check(/* @__PURE__ */ pl(Vd, r)), t.ulid = (r) => t.check(/* @__PURE__ */ bl(qd, r)), t.base64 = (r) => t.check(/* @__PURE__ */ wl(ec, r)), t.base64url = (r) => t.check(/* @__PURE__ */ xl(rc, r)), t.xid = (r) => t.check(/* @__PURE__ */ ml(Fd, r)), t.ksuid = (r) => t.check(/* @__PURE__ */ gl(Jd, r)), t.ipv4 = (r) => t.check(/* @__PURE__ */ ul(Kd, r)), t.ipv6 = (r) => t.check(/* @__PURE__ */ fl(Qd, r)), t.cidrv4 = (r) => t.check(/* @__PURE__ */ hl(Wd, r)), t.cidrv6 = (r) => t.check(/* @__PURE__ */ vl(tc, r)), t.e164 = (r) => t.check(/* @__PURE__ */ yl(oc, r)), t.datetime = (r) => t.check(yd(r)), t.date = (r) => t.check(zd(r)), t.time = (r) => t.check(Sd(r)), t.duration = (r) => t.check(Od(r));
|
|
6355
6381
|
});
|
|
6356
6382
|
function h(t) {
|
|
6357
6383
|
return /* @__PURE__ */ el(Yd, t);
|
|
6358
6384
|
}
|
|
6359
6385
|
const E = /* @__PURE__ */ d("ZodStringFormat", (t, e) => {
|
|
6360
6386
|
O.init(t, e), Jo.init(t, e);
|
|
6361
|
-
}),
|
|
6387
|
+
}), Ud = /* @__PURE__ */ d("ZodEmail", (t, e) => {
|
|
6362
6388
|
ns.init(t, e), E.init(t, e);
|
|
6363
6389
|
}), Kr = /* @__PURE__ */ d("ZodGUID", (t, e) => {
|
|
6364
6390
|
as.init(t, e), E.init(t, e);
|
|
6365
6391
|
}), oe = /* @__PURE__ */ d("ZodUUID", (t, e) => {
|
|
6366
6392
|
is.init(t, e), E.init(t, e);
|
|
6367
|
-
}),
|
|
6393
|
+
}), Gd = /* @__PURE__ */ d("ZodURL", (t, e) => {
|
|
6368
6394
|
ss.init(t, e), E.init(t, e);
|
|
6369
6395
|
}), Ld = /* @__PURE__ */ d("ZodEmoji", (t, e) => {
|
|
6370
6396
|
ls.init(t, e), E.init(t, e);
|
|
@@ -6401,7 +6427,7 @@ const E = /* @__PURE__ */ d("ZodStringFormat", (t, e) => {
|
|
|
6401
6427
|
const r = t._zod.bag;
|
|
6402
6428
|
t.minValue = Math.max(r.minimum ?? Number.NEGATIVE_INFINITY, r.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(r.maximum ?? Number.POSITIVE_INFINITY, r.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (r.format ?? "").includes("int") || Number.isSafeInteger(r.multipleOf ?? 0.5), t.isFinite = !0, t.format = r.format ?? null;
|
|
6403
6429
|
});
|
|
6404
|
-
function
|
|
6430
|
+
function Ge(t) {
|
|
6405
6431
|
return /* @__PURE__ */ Ol(Ko, t);
|
|
6406
6432
|
}
|
|
6407
6433
|
const ic = /* @__PURE__ */ d("ZodNumberFormat", (t, e) => {
|
|
@@ -6429,19 +6455,19 @@ function Qo(t) {
|
|
|
6429
6455
|
return /* @__PURE__ */ jl(cc, t);
|
|
6430
6456
|
}
|
|
6431
6457
|
const pc = /* @__PURE__ */ d("ZodUnknown", (t, e) => {
|
|
6432
|
-
|
|
6458
|
+
Ts.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => od();
|
|
6433
6459
|
});
|
|
6434
6460
|
function Et() {
|
|
6435
6461
|
return /* @__PURE__ */ Pl(pc);
|
|
6436
6462
|
}
|
|
6437
6463
|
const bc = /* @__PURE__ */ d("ZodNever", (t, e) => {
|
|
6438
|
-
|
|
6464
|
+
Ds.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => rd(t, r, o);
|
|
6439
6465
|
});
|
|
6440
6466
|
function Wo(t) {
|
|
6441
|
-
return /* @__PURE__ */
|
|
6467
|
+
return /* @__PURE__ */ Tl(bc, t);
|
|
6442
6468
|
}
|
|
6443
6469
|
const mc = /* @__PURE__ */ d("ZodArray", (t, e) => {
|
|
6444
|
-
|
|
6470
|
+
Bs.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => ld(t, r, o, a), t.element = e.element, t.min = (r, o) => t.check(/* @__PURE__ */ Ye(r, o)), t.nonempty = (r) => t.check(/* @__PURE__ */ Ye(1, r)), t.max = (r, o) => t.check(/* @__PURE__ */ Lo(r, o)), t.length = (r, o) => t.check(/* @__PURE__ */ Ho(r, o)), t.unwrap = () => t.element;
|
|
6445
6471
|
});
|
|
6446
6472
|
function Le(t, e) {
|
|
6447
6473
|
return /* @__PURE__ */ Hl(mc, t, e);
|
|
@@ -6458,7 +6484,7 @@ function y(t, e) {
|
|
|
6458
6484
|
return new gc(r);
|
|
6459
6485
|
}
|
|
6460
6486
|
const ta = /* @__PURE__ */ d("ZodUnion", (t, e) => {
|
|
6461
|
-
|
|
6487
|
+
Uo.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => cd(t, r, o, a), t.options = e.options;
|
|
6462
6488
|
});
|
|
6463
6489
|
function Ir(t, e) {
|
|
6464
6490
|
return new ta({
|
|
@@ -6539,7 +6565,7 @@ function wc(t, e) {
|
|
|
6539
6565
|
});
|
|
6540
6566
|
}
|
|
6541
6567
|
const xc = /* @__PURE__ */ d("ZodLiteral", (t, e) => {
|
|
6542
|
-
|
|
6568
|
+
Us.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => id(t, r, o), t.values = new Set(e.values), Object.defineProperty(t, "value", {
|
|
6543
6569
|
get() {
|
|
6544
6570
|
if (e.values.length > 1)
|
|
6545
6571
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -6555,7 +6581,7 @@ function _(t, e) {
|
|
|
6555
6581
|
});
|
|
6556
6582
|
}
|
|
6557
6583
|
const yc = /* @__PURE__ */ d("ZodTransform", (t, e) => {
|
|
6558
|
-
|
|
6584
|
+
Gs.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => sd(t, r), t._zod.parse = (r, o) => {
|
|
6559
6585
|
if (o.direction === "backward")
|
|
6560
6586
|
throw new zo(t.constructor.name);
|
|
6561
6587
|
r.addIssue = (n) => {
|
|
@@ -6577,7 +6603,7 @@ function kc(t) {
|
|
|
6577
6603
|
});
|
|
6578
6604
|
}
|
|
6579
6605
|
const ea = /* @__PURE__ */ d("ZodOptional", (t, e) => {
|
|
6580
|
-
|
|
6606
|
+
Go.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => Fo(t, r, o, a), t.unwrap = () => t._zod.def.innerType;
|
|
6581
6607
|
});
|
|
6582
6608
|
function ct(t) {
|
|
6583
6609
|
return new ea({
|
|
@@ -6647,22 +6673,22 @@ function Pc(t, e) {
|
|
|
6647
6673
|
catchValue: typeof e == "function" ? e : () => e
|
|
6648
6674
|
});
|
|
6649
6675
|
}
|
|
6650
|
-
const
|
|
6676
|
+
const Tc = /* @__PURE__ */ d("ZodPipe", (t, e) => {
|
|
6651
6677
|
Js.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => vd(t, r, o, a), t.in = e.in, t.out = e.out;
|
|
6652
6678
|
});
|
|
6653
6679
|
function to(t, e) {
|
|
6654
|
-
return new
|
|
6680
|
+
return new Tc({
|
|
6655
6681
|
type: "pipe",
|
|
6656
6682
|
in: t,
|
|
6657
6683
|
out: e
|
|
6658
6684
|
// ...util.normalizeParams(params),
|
|
6659
6685
|
});
|
|
6660
6686
|
}
|
|
6661
|
-
const
|
|
6687
|
+
const Dc = /* @__PURE__ */ d("ZodReadonly", (t, e) => {
|
|
6662
6688
|
Ks.init(t, e), I.init(t, e), t._zod.processJSONSchema = (r, o, a) => wd(t, r, o, a), t.unwrap = () => t._zod.def.innerType;
|
|
6663
6689
|
});
|
|
6664
|
-
function
|
|
6665
|
-
return new
|
|
6690
|
+
function Bc(t) {
|
|
6691
|
+
return new Dc({
|
|
6666
6692
|
type: "readonly",
|
|
6667
6693
|
innerType: t
|
|
6668
6694
|
});
|
|
@@ -6702,7 +6728,7 @@ var oa = y({
|
|
|
6702
6728
|
scope: h(),
|
|
6703
6729
|
clientId: h(),
|
|
6704
6730
|
clientSecretEnv: h()
|
|
6705
|
-
}),
|
|
6731
|
+
}), Uc = y({
|
|
6706
6732
|
method: _("self_signed"),
|
|
6707
6733
|
issuer: h(),
|
|
6708
6734
|
audience: h(),
|
|
@@ -6717,9 +6743,9 @@ var oa = y({
|
|
|
6717
6743
|
Mt("method", [
|
|
6718
6744
|
oa,
|
|
6719
6745
|
Yc,
|
|
6720
|
-
|
|
6746
|
+
Uc
|
|
6721
6747
|
]);
|
|
6722
|
-
var
|
|
6748
|
+
var Gc = Mt("type", [
|
|
6723
6749
|
y({
|
|
6724
6750
|
id: h(),
|
|
6725
6751
|
type: _("self_signed"),
|
|
@@ -6755,7 +6781,7 @@ y({
|
|
|
6755
6781
|
y({
|
|
6756
6782
|
type: _("postgres"),
|
|
6757
6783
|
host: h(),
|
|
6758
|
-
port:
|
|
6784
|
+
port: Ge(),
|
|
6759
6785
|
user: h(),
|
|
6760
6786
|
password: h(),
|
|
6761
6787
|
database: h()
|
|
@@ -6763,7 +6789,7 @@ y({
|
|
|
6763
6789
|
])
|
|
6764
6790
|
});
|
|
6765
6791
|
y({
|
|
6766
|
-
idps: Le(
|
|
6792
|
+
idps: Le(Gc),
|
|
6767
6793
|
networks: Le(aa)
|
|
6768
6794
|
});
|
|
6769
6795
|
var Hc = Object.defineProperty, Xc = Object.getOwnPropertyDescriptor, ia = (t) => {
|
|
@@ -7309,7 +7335,7 @@ rr([
|
|
|
7309
7335
|
b({ type: Object })
|
|
7310
7336
|
], Ct.prototype, "network", 1);
|
|
7311
7337
|
rr([
|
|
7312
|
-
|
|
7338
|
+
T()
|
|
7313
7339
|
], Ct.prototype, "_error", 2);
|
|
7314
7340
|
Ct = rr([
|
|
7315
7341
|
A("network-form")
|
|
@@ -7442,13 +7468,13 @@ mt([
|
|
|
7442
7468
|
b({ type: Boolean })
|
|
7443
7469
|
], J.prototype, "readonly", 1);
|
|
7444
7470
|
mt([
|
|
7445
|
-
|
|
7471
|
+
T()
|
|
7446
7472
|
], J.prototype, "isModalOpen", 1);
|
|
7447
7473
|
mt([
|
|
7448
|
-
|
|
7474
|
+
T()
|
|
7449
7475
|
], J.prototype, "editingNetwork", 1);
|
|
7450
7476
|
mt([
|
|
7451
|
-
|
|
7477
|
+
T()
|
|
7452
7478
|
], J.prototype, "authType", 1);
|
|
7453
7479
|
J = mt([
|
|
7454
7480
|
A("wg-networks")
|
|
@@ -7682,16 +7708,16 @@ var rp = y({
|
|
|
7682
7708
|
result: ct(Et())
|
|
7683
7709
|
}), ur = y({
|
|
7684
7710
|
error: y({
|
|
7685
|
-
code:
|
|
7711
|
+
code: Ge(),
|
|
7686
7712
|
message: h(),
|
|
7687
7713
|
data: ct(
|
|
7688
|
-
h().or(
|
|
7714
|
+
h().or(Ge()).or(sc()).or(Qo()).or(Et())
|
|
7689
7715
|
)
|
|
7690
7716
|
})
|
|
7691
7717
|
}), ap = Ir([op, ur]), pa = y({
|
|
7692
7718
|
jsonrpc: _("2.0"),
|
|
7693
7719
|
// only support JSON-RPC 2.0
|
|
7694
|
-
id: ct(h().or(
|
|
7720
|
+
id: ct(h().or(Ge()).or(dc()).or(Qo()))
|
|
7695
7721
|
}), ip = Or(pa, rp), np = Or(pa, ap), ae = h().min(1).describe(
|
|
7696
7722
|
"Optional routing key for browser-extension messaging. When present, only the matching extension should handle the message."
|
|
7697
7723
|
);
|
|
@@ -7930,10 +7956,10 @@ or([
|
|
|
7930
7956
|
b({ attribute: !1 })
|
|
7931
7957
|
], _t.prototype, "client", 2);
|
|
7932
7958
|
or([
|
|
7933
|
-
|
|
7959
|
+
T()
|
|
7934
7960
|
], _t.prototype, "isSyncNeeded", 1);
|
|
7935
7961
|
or([
|
|
7936
|
-
|
|
7962
|
+
T()
|
|
7937
7963
|
], _t.prototype, "isSyncing", 1);
|
|
7938
7964
|
_t = or([
|
|
7939
7965
|
A("wg-wallets-sync")
|
|
@@ -8493,7 +8519,7 @@ var hp = Object.defineProperty, vp = Object.getOwnPropertyDescriptor, fa = (t) =
|
|
|
8493
8519
|
for (var a = o > 1 ? void 0 : o ? vp(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
8494
8520
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
8495
8521
|
return o && a && hp(e, r, a), a;
|
|
8496
|
-
}, ha = (t, e, r) => e.has(t) || fa("Cannot " + r), ie = (t, e, r) => (ha(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ne = (t, e, r) => e.has(t) ? fa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), se = (t, e, r, o) => (ha(t, e, "write to private field"), e.set(t, r), r),
|
|
8522
|
+
}, ha = (t, e, r) => e.has(t) || fa("Cannot " + r), ie = (t, e, r) => (ha(t, e, "read from private field"), r ? r.call(t) : e.get(t)), ne = (t, e, r) => e.has(t) ? fa("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), se = (t, e, r, o) => (ha(t, e, "write to private field"), e.set(t, r), r), Te, De, Be, Ne;
|
|
8497
8523
|
class wp extends Event {
|
|
8498
8524
|
constructor(e, r, o) {
|
|
8499
8525
|
super("login-connect", { bubbles: !0, composed: !0 }), this.selectedNetwork = e, this.selectedIdp = r, this.clientId = o;
|
|
@@ -8508,27 +8534,27 @@ class xp extends Event {
|
|
|
8508
8534
|
});
|
|
8509
8535
|
}
|
|
8510
8536
|
}
|
|
8511
|
-
let
|
|
8537
|
+
let G = class extends f {
|
|
8512
8538
|
constructor() {
|
|
8513
|
-
super(...arguments), this.networks = [], this.idps = [], this.connecting = !1, this.backHref = "/", ne(this,
|
|
8539
|
+
super(...arguments), this.networks = [], this.idps = [], this.connecting = !1, this.backHref = "/", ne(this, Te, null), ne(this, De, null), ne(this, Be, null), ne(this, Ne, null);
|
|
8514
8540
|
}
|
|
8515
8541
|
get selectedNetwork() {
|
|
8516
|
-
return ie(this,
|
|
8542
|
+
return ie(this, Te);
|
|
8517
8543
|
}
|
|
8518
8544
|
set selectedNetwork(t) {
|
|
8519
|
-
se(this,
|
|
8545
|
+
se(this, Te, t);
|
|
8520
8546
|
}
|
|
8521
8547
|
get selectedIdp() {
|
|
8522
|
-
return ie(this,
|
|
8548
|
+
return ie(this, De);
|
|
8523
8549
|
}
|
|
8524
8550
|
set selectedIdp(t) {
|
|
8525
|
-
se(this,
|
|
8551
|
+
se(this, De, t);
|
|
8526
8552
|
}
|
|
8527
8553
|
get message() {
|
|
8528
|
-
return ie(this,
|
|
8554
|
+
return ie(this, Be);
|
|
8529
8555
|
}
|
|
8530
8556
|
set message(t) {
|
|
8531
|
-
se(this,
|
|
8557
|
+
se(this, Be, t);
|
|
8532
8558
|
}
|
|
8533
8559
|
get messageType() {
|
|
8534
8560
|
return ie(this, Ne);
|
|
@@ -8674,11 +8700,11 @@ let U = class extends f {
|
|
|
8674
8700
|
`;
|
|
8675
8701
|
}
|
|
8676
8702
|
};
|
|
8677
|
-
Be = /* @__PURE__ */ new WeakMap();
|
|
8678
8703
|
Te = /* @__PURE__ */ new WeakMap();
|
|
8679
8704
|
De = /* @__PURE__ */ new WeakMap();
|
|
8705
|
+
Be = /* @__PURE__ */ new WeakMap();
|
|
8680
8706
|
Ne = /* @__PURE__ */ new WeakMap();
|
|
8681
|
-
|
|
8707
|
+
G.styles = [
|
|
8682
8708
|
f.styles,
|
|
8683
8709
|
k`
|
|
8684
8710
|
:host {
|
|
@@ -8768,31 +8794,31 @@ U.styles = [
|
|
|
8768
8794
|
];
|
|
8769
8795
|
Q([
|
|
8770
8796
|
b({ type: Array })
|
|
8771
|
-
],
|
|
8797
|
+
], G.prototype, "networks", 2);
|
|
8772
8798
|
Q([
|
|
8773
8799
|
b({ type: Array })
|
|
8774
|
-
],
|
|
8800
|
+
], G.prototype, "idps", 2);
|
|
8775
8801
|
Q([
|
|
8776
8802
|
b({ type: Boolean })
|
|
8777
|
-
],
|
|
8803
|
+
], G.prototype, "connecting", 2);
|
|
8778
8804
|
Q([
|
|
8779
8805
|
b({ type: String })
|
|
8780
|
-
],
|
|
8806
|
+
], G.prototype, "backHref", 2);
|
|
8781
8807
|
Q([
|
|
8782
|
-
|
|
8783
|
-
],
|
|
8808
|
+
T()
|
|
8809
|
+
], G.prototype, "selectedNetwork", 1);
|
|
8784
8810
|
Q([
|
|
8785
|
-
|
|
8786
|
-
],
|
|
8811
|
+
T()
|
|
8812
|
+
], G.prototype, "selectedIdp", 1);
|
|
8787
8813
|
Q([
|
|
8788
|
-
|
|
8789
|
-
],
|
|
8814
|
+
T()
|
|
8815
|
+
], G.prototype, "message", 1);
|
|
8790
8816
|
Q([
|
|
8791
|
-
|
|
8792
|
-
],
|
|
8793
|
-
|
|
8817
|
+
T()
|
|
8818
|
+
], G.prototype, "messageType", 1);
|
|
8819
|
+
G = Q([
|
|
8794
8820
|
A("wg-login-form")
|
|
8795
|
-
],
|
|
8821
|
+
], G);
|
|
8796
8822
|
function yp(t) {
|
|
8797
8823
|
const e = t.toLowerCase();
|
|
8798
8824
|
return e === "executed" || e === "signed" ? "success" : e === "pending" ? "warning" : e === "failed" || e === "rejected" ? "danger" : "default";
|
|
@@ -9015,7 +9041,7 @@ V([
|
|
|
9015
9041
|
R = V([
|
|
9016
9042
|
A("wg-transaction-card")
|
|
9017
9043
|
], R);
|
|
9018
|
-
var Sp = Object.defineProperty, Ip = Object.getOwnPropertyDescriptor,
|
|
9044
|
+
var Sp = Object.defineProperty, Ip = Object.getOwnPropertyDescriptor, B = (t, e, r, o) => {
|
|
9019
9045
|
for (var a = o > 1 ? void 0 : o ? Ip(e, r) : e, n = t.length - 1, i; n >= 0; n--)
|
|
9020
9046
|
(i = t[n]) && (a = (o ? i(e, r, a) : i(a)) || a);
|
|
9021
9047
|
return o && a && Sp(e, r, a), a;
|
|
@@ -9431,49 +9457,49 @@ P.styles = [
|
|
|
9431
9457
|
}
|
|
9432
9458
|
`
|
|
9433
9459
|
];
|
|
9434
|
-
|
|
9460
|
+
B([
|
|
9435
9461
|
b()
|
|
9436
9462
|
], P.prototype, "commandId", 2);
|
|
9437
|
-
|
|
9463
|
+
B([
|
|
9438
9464
|
b()
|
|
9439
9465
|
], P.prototype, "externalTxId", 2);
|
|
9440
|
-
|
|
9466
|
+
B([
|
|
9441
9467
|
b()
|
|
9442
9468
|
], P.prototype, "status", 2);
|
|
9443
|
-
|
|
9469
|
+
B([
|
|
9444
9470
|
b()
|
|
9445
9471
|
], P.prototype, "txHash", 2);
|
|
9446
|
-
|
|
9472
|
+
B([
|
|
9447
9473
|
b()
|
|
9448
9474
|
], P.prototype, "tx", 2);
|
|
9449
|
-
|
|
9475
|
+
B([
|
|
9450
9476
|
b({ type: Object })
|
|
9451
9477
|
], P.prototype, "parsed", 2);
|
|
9452
|
-
|
|
9478
|
+
B([
|
|
9453
9479
|
b()
|
|
9454
9480
|
], P.prototype, "createdAt", 2);
|
|
9455
|
-
|
|
9481
|
+
B([
|
|
9456
9482
|
b()
|
|
9457
9483
|
], P.prototype, "signedAt", 2);
|
|
9458
|
-
|
|
9484
|
+
B([
|
|
9459
9485
|
b()
|
|
9460
9486
|
], P.prototype, "origin", 2);
|
|
9461
|
-
|
|
9487
|
+
B([
|
|
9462
9488
|
b()
|
|
9463
9489
|
], P.prototype, "backHref", 2);
|
|
9464
|
-
|
|
9490
|
+
B([
|
|
9465
9491
|
b({ type: Boolean })
|
|
9466
9492
|
], P.prototype, "isApproving", 2);
|
|
9467
|
-
|
|
9493
|
+
B([
|
|
9468
9494
|
b({ type: Boolean })
|
|
9469
9495
|
], P.prototype, "isDeleting", 2);
|
|
9470
|
-
|
|
9496
|
+
B([
|
|
9471
9497
|
b({ type: Boolean })
|
|
9472
9498
|
], P.prototype, "disabled", 2);
|
|
9473
|
-
|
|
9474
|
-
|
|
9499
|
+
B([
|
|
9500
|
+
T()
|
|
9475
9501
|
], P.prototype, "decodedExpanded", 2);
|
|
9476
|
-
P =
|
|
9502
|
+
P = B([
|
|
9477
9503
|
A("wg-transaction-detail")
|
|
9478
9504
|
], P);
|
|
9479
9505
|
let q;
|
|
@@ -9582,7 +9608,7 @@ const za = (t) => {
|
|
|
9582
9608
|
Xt = void 0;
|
|
9583
9609
|
}
|
|
9584
9610
|
});
|
|
9585
|
-
},
|
|
9611
|
+
}, Up = (t) => {
|
|
9586
9612
|
za({
|
|
9587
9613
|
messageType: "SPLICE_WALLET_PICKER_CONNECT_STATUS",
|
|
9588
9614
|
status: "error",
|
|
@@ -9604,7 +9630,7 @@ const za = (t) => {
|
|
|
9604
9630
|
}));
|
|
9605
9631
|
};
|
|
9606
9632
|
t.addEventListener("beforeunload", n), window.addEventListener("message", i);
|
|
9607
|
-
}),
|
|
9633
|
+
}), Gp = async () => {
|
|
9608
9634
|
const t = Xt;
|
|
9609
9635
|
if (!t || t.closed)
|
|
9610
9636
|
throw new Error("Wallet picker is not open");
|
|
@@ -9631,15 +9657,15 @@ export {
|
|
|
9631
9657
|
H as FormInput,
|
|
9632
9658
|
Ei as FormInputChangedEvent,
|
|
9633
9659
|
Ri as IdpAddEvent,
|
|
9634
|
-
|
|
9635
|
-
|
|
9660
|
+
Gt as IdpCard,
|
|
9661
|
+
Bp as IdpCardDeleteEvent,
|
|
9636
9662
|
ji as IdpCardReviewEvent,
|
|
9637
9663
|
Np as IdpCardUpdateEvent,
|
|
9638
9664
|
Mp as IdpFormBackEvent,
|
|
9639
9665
|
Ni as IdpFormCancelEvent,
|
|
9640
|
-
|
|
9641
|
-
|
|
9642
|
-
|
|
9666
|
+
U as IdpFormComponent,
|
|
9667
|
+
Bi as IdpFormDeleteEvent,
|
|
9668
|
+
Di as IdpFormSaveEvent,
|
|
9643
9669
|
xp as LoginBackEvent,
|
|
9644
9670
|
wp as LoginConnectEvent,
|
|
9645
9671
|
ii as LogoutEvent,
|
|
@@ -9663,13 +9689,13 @@ export {
|
|
|
9663
9689
|
bp as WalletCreateEvent,
|
|
9664
9690
|
Re as WalletPicker,
|
|
9665
9691
|
up as WalletSetPrimaryEvent,
|
|
9666
|
-
|
|
9692
|
+
Ut as WgBackLink,
|
|
9667
9693
|
zt as WgCopyButton,
|
|
9668
9694
|
et as WgErrorPage,
|
|
9669
|
-
|
|
9695
|
+
Dr as WgFormInput,
|
|
9670
9696
|
lt as WgIdps,
|
|
9671
9697
|
Ze as WgLoadingState,
|
|
9672
|
-
|
|
9698
|
+
G as WgLoginForm,
|
|
9673
9699
|
J as WgNetworks,
|
|
9674
9700
|
At as WgPagination,
|
|
9675
9701
|
Xe as WgSessions,
|
|
@@ -9681,13 +9707,13 @@ export {
|
|
|
9681
9707
|
Wa as chevronLeftIcon,
|
|
9682
9708
|
qa as getCurrentRoute,
|
|
9683
9709
|
sp as handleErrorToast,
|
|
9684
|
-
|
|
9710
|
+
Tp as isAllowedRoute,
|
|
9685
9711
|
Yp as notifyWalletPickerConnected,
|
|
9686
|
-
|
|
9712
|
+
Up as notifyWalletPickerError,
|
|
9687
9713
|
Lp as pickWallet,
|
|
9688
9714
|
Cp as popup,
|
|
9689
|
-
|
|
9715
|
+
Dp as toRelHref,
|
|
9690
9716
|
Yt as toRelPath,
|
|
9691
|
-
|
|
9717
|
+
Gp as waitForWalletPickerRetrySelection
|
|
9692
9718
|
};
|
|
9693
9719
|
//# sourceMappingURL=index.js.map
|