@oneclick.dev/cms-core-modules 0.0.122 → 0.0.124
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/{ContentEditor-CoJjsV-m.js → ContentEditor-BcIUumah.js} +63 -59
- package/dist/{ContentEditor-DIwqplfB.mjs → ContentEditor-DX1bTQKs.mjs} +27894 -26319
- package/dist/{Detail-Dk8E6_uF.mjs → Detail-B7pe808q.mjs} +15 -14
- package/dist/Detail-BESGmY7z.js +1 -0
- package/dist/{Detail-Cn9Bk0u0.mjs → Detail-B_Q7Qkuz.mjs} +26 -25
- package/dist/Detail-CNiLIEh9.js +1 -0
- package/dist/{Detail-B_scnidb.mjs → Detail-DNxAzeCs.mjs} +35 -34
- package/dist/Detail-t3tOcy3X.js +1 -0
- package/dist/Editor-D4evcdhv.mjs +768 -0
- package/dist/Editor-gLLtuJbY.js +1 -0
- package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-BjKpsqT9.js +1 -0
- package/dist/FormStatusBadge.vue_vue_type_script_setup_true_lang-D5v5AhLe.mjs +76 -0
- package/dist/Knowledge-B66vxz--.js +1 -0
- package/dist/Knowledge-BnMTTuJ7.mjs +742 -0
- package/dist/{NewReservationDialog.vue_vue_type_script_setup_true_lang-bZidw6RT.mjs → NewReservationDialog.vue_vue_type_script_setup_true_lang-8I_Z9cD_.mjs} +530 -530
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BVE_uURZ.js +1 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-BdFa-xNf.mjs +3566 -0
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-DzPOadcU.js +925 -0
- package/dist/Overview-BE4uYPx0.mjs +745 -0
- package/dist/Overview-CQRpFhbJ.mjs +286 -0
- package/dist/Overview-CTs7sX4d.js +1 -0
- package/dist/Overview-Cj89XXKN.js +1 -0
- package/dist/Overview-D_c18mbR.mjs +248 -0
- package/dist/Overview-g4Rcj245.js +1 -0
- package/dist/TableCalculationWidget-CkQPrVUd.js +59 -0
- package/dist/TableCalculationWidget-CrqcLGfU.mjs +254 -0
- package/dist/TableDataWidget-7qvC3Egd.js +1 -0
- package/dist/TableDataWidget-DMTSoGRO.mjs +121 -0
- package/dist/TableOverviewCard-AFq-puJs.js +1 -0
- package/dist/TableOverviewCard-Ci0d4o4w.mjs +391 -0
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-CBn-Oxl9.mjs +534 -0
- package/dist/TableResultView.vue_vue_type_script_setup_true_lang-C_Lv-SmJ.js +1 -0
- package/dist/TableRowActionCard-BhdnnPaq.mjs +266 -0
- package/dist/TableRowActionCard-IzB6tNN-.js +1 -0
- package/dist/TableView-6mdrL3zx.js +4 -0
- package/dist/TableView-Du5nOE6R.mjs +8228 -0
- package/dist/Test-CzmOmi53.mjs +447 -0
- package/dist/Test-USDtNFY1.js +1 -0
- package/dist/UserDetail-DpUL3mhk.mjs +1483 -0
- package/dist/UserDetail-KRIfxaYd.js +1 -0
- package/dist/{agenda-BCKDYOeF.mjs → agenda-DWdbWUbb.mjs} +10 -9
- package/dist/agenda-r9Gl85GL.js +1 -0
- package/dist/cms-core-modules.css +1 -1
- package/dist/dateRangePresets-B-l5b_wR.mjs +48 -0
- package/dist/dateRangePresets-CPWqst_x.js +1 -0
- package/dist/fuse-Deb-Iq39.mjs +1473 -0
- package/dist/fuse-_CGUd5Zq.js +1 -0
- package/dist/{index-DU3Ib10Z.mjs → index-B_qaX29C.mjs} +7 -6
- package/dist/index-CQuN5rKx.js +1 -0
- package/dist/index-CnDGeInm.js +1 -0
- package/dist/index-CqDTc5Ig.mjs +20 -0
- package/dist/index-CyvvAdt4.js +1 -0
- package/dist/index-DIRD7t5_.mjs +20 -0
- package/dist/index-OJuBYR60.mjs +57 -0
- package/dist/{index-Bk3yLv_G.js → index-yHLT6gaZ.js} +3 -3
- package/dist/index.cjs.js +1 -1
- package/dist/index.mjs +671 -118
- package/dist/{orders-CElKNc1v.mjs → orders-BfTLIm7U.mjs} +10 -9
- package/dist/orders-DUa2PVoa.js +1 -0
- package/dist/reports-ChCsd1Gk.mjs +1107 -0
- package/dist/reports-DmJPm8uP.js +158 -0
- package/dist/row-item-C1dUyimV.mjs +204 -0
- package/dist/row-item-Cyo3m3MZ.js +1 -0
- package/dist/server-handlers.cjs.js +1 -1
- package/dist/server-handlers.mjs +1764 -605
- package/dist/src/appointments/components/edit/EventDialog/BookingsList.vue.d.ts +9 -3
- package/dist/src/appointments/components/edit/EventDialog/OrderDetailDialog.vue.d.ts +2 -0
- package/dist/src/appointments/components/edit/EventDialog/ReservationDetailDialog.vue.d.ts +4 -2
- package/dist/src/appointments/components/edit/dashboard/BookingsList.vue.d.ts +9 -3
- package/dist/src/appointments/pages/edit/orders.vue.d.ts +9 -3
- package/dist/src/appointments/pages/edit/reports.vue.d.ts +229 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Container.d.ts +1 -1
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Row.d.ts +7 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/Stack.d.ts +7 -0
- package/dist/src/contentManager/components/content-editor/tiptap-extensions/helpers/resizeHistory.d.ts +9 -0
- package/dist/src/contentManager/components/content-editor/tiptap-menus/ElementEditorMenu.vue.d.ts +3 -1
- package/dist/src/firebaseAuthManager/components/DeleteUserDialog.vue.d.ts +25 -0
- package/dist/src/firebaseAuthManager/components/ReasonActionDialog.vue.d.ts +23 -0
- package/dist/src/firebaseAuthManager/components/UserStatusBadge.vue.d.ts +5 -0
- package/dist/src/firebaseAuthManager/config.d.ts +151 -0
- package/dist/src/firebaseAuthManager/index.d.ts +163 -0
- package/dist/src/firebaseAuthManager/index.vue.d.ts +14 -0
- package/dist/src/firebaseAuthManager/metadata.d.ts +2 -0
- package/dist/src/firebaseAuthManager/pages/Overview.vue.d.ts +2 -0
- package/dist/src/firebaseAuthManager/pages/UserDetail.vue.d.ts +2 -0
- package/dist/src/firebaseAuthManager/permissions.d.ts +5 -0
- package/dist/src/firebaseAuthManager/routes.d.ts +5 -0
- package/dist/src/firebaseAuthManager/server.d.ts +162 -0
- package/dist/src/firebaseAuthManager/types.d.ts +84 -0
- package/dist/src/formBuilder/components/FormPreviewDialog.vue.d.ts +12 -0
- package/dist/src/formBuilder/components/FormStatusBadge.vue.d.ts +9 -0
- package/dist/src/formBuilder/config.d.ts +31 -0
- package/dist/src/formBuilder/index.d.ts +44 -0
- package/dist/src/formBuilder/index.vue.d.ts +14 -0
- package/dist/src/formBuilder/lib/forms.d.ts +11 -0
- package/dist/src/formBuilder/metadata.d.ts +2 -0
- package/dist/src/formBuilder/pages/Editor.vue.d.ts +2 -0
- package/dist/src/formBuilder/pages/Overview.vue.d.ts +2 -0
- package/dist/src/formBuilder/permissions.d.ts +5 -0
- package/dist/src/formBuilder/routes.d.ts +5 -0
- package/dist/src/formBuilder/server.d.ts +87 -0
- package/dist/src/formBuilder/tools.d.ts +1 -0
- package/dist/src/formBuilder/types.d.ts +46 -0
- package/dist/src/helpbot/composables/useHelpbotApi.d.ts +18 -0
- package/dist/src/helpbot/config.d.ts +17 -0
- package/dist/src/helpbot/index.d.ts +29 -0
- package/dist/src/helpbot/index.vue.d.ts +2 -0
- package/dist/src/helpbot/metadata.d.ts +2 -0
- package/dist/src/helpbot/pages/Knowledge.vue.d.ts +4 -0
- package/dist/src/helpbot/pages/Overview.vue.d.ts +2 -0
- package/dist/src/helpbot/pages/Test.vue.d.ts +4 -0
- package/dist/src/helpbot/permissions.d.ts +5 -0
- package/dist/src/helpbot/routes.d.ts +5 -0
- package/dist/src/helpbot/types.d.ts +42 -0
- package/dist/src/index.d.ts +3 -0
- package/dist/src/server-handlers.d.ts +2 -0
- package/dist/src/table/chat-components/TableCalculationWidget.vue.d.ts +15 -0
- package/dist/src/table/chat-components/TableDataWidget.vue.d.ts +15 -0
- package/dist/src/table/chat-components/TableOverviewCard.vue.d.ts +61 -0
- package/dist/src/table/chat-components/TableResultView.vue.d.ts +48 -0
- package/dist/src/table/chat-components/TableRowActionCard.vue.d.ts +15 -0
- package/dist/src/table/components/filters/DialogTableFilterOptionItem.vue.d.ts +16 -0
- package/dist/src/table/components/filters/NumberComparisonFilter.vue.d.ts +12 -0
- package/dist/src/table/components/filters/NumberComparisonFilterSettings.vue.d.ts +12 -0
- package/dist/src/table/components/filters/NumberRangeFilter.vue.d.ts +12 -0
- package/dist/src/table/components/filters/NumberRangeFilterSettings.vue.d.ts +12 -0
- package/dist/src/table/components/filters/filter-utils.d.ts +14 -0
- package/dist/src/table/composables/useTableAgentTools.d.ts +33 -0
- package/dist/src/table/index.d.ts +339 -0
- package/dist/src/table/tool-sandbox.d.ts +13 -0
- package/dist/src/table/tool-utils.d.ts +11 -0
- package/dist/src/table/tools.d.ts +333 -1
- package/dist/src/table/types.d.ts +79 -0
- package/dist/tool-sandbox-DdkMLkDK.mjs +182 -0
- package/dist/tool-sandbox-DoF1PsyS.js +115 -0
- package/dist/types-9N-DKxNj.mjs +250 -0
- package/dist/types-BMraG1kN.js +1 -0
- package/dist/types-Cem0vPo_.js +1 -0
- package/dist/types-ibC3-e1N.mjs +2630 -0
- package/dist/useHelpbotApi-BIIungOh.js +1 -0
- package/dist/useHelpbotApi-HC9JSiSn.mjs +229 -0
- package/dist/useTableAgentTools-D5mzGf3A.js +1 -0
- package/dist/useTableAgentTools-DcN3kYRL.mjs +131 -0
- package/dist/vee-validate-zod-BQElPD0m.js +1 -0
- package/dist/vee-validate-zod-CN16K2x9.mjs +1780 -0
- package/package.json +17 -17
- package/src/formBuilder/tools.ts +1 -0
- package/src/table/tools.ts +304 -1
- package/dist/Detail-BCUUNWvp.js +0 -1
- package/dist/Detail-DGg_xXZc.js +0 -1
- package/dist/Detail-Sc2qZdxj.js +0 -1
- package/dist/NewReservationDialog.vue_vue_type_script_setup_true_lang-BdZbcubW.js +0 -1
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-BYSeUW_V.js +0 -925
- package/dist/OrderDetailDialog.vue_vue_type_script_setup_true_lang-DwAUYR8p.mjs +0 -5021
- package/dist/TableView-Ctnep-Qu.mjs +0 -6247
- package/dist/TableView-DJqyJL9L.js +0 -4
- package/dist/agenda-B54F8cEr.js +0 -1
- package/dist/orders-BMosTk6r.js +0 -1
- package/dist/reports-BQT_GZzU.js +0 -158
- package/dist/reports-DksZCTOw.mjs +0 -837
- package/dist/vee-validate-zod-SjDT8X35.mjs +0 -4404
- package/dist/vee-validate-zod-VCmLnrtQ.js +0 -1
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";const p=require("./TableResultView.vue_vue_type_script_setup_true_lang-C_Lv-SmJ.js"),_=1500,E=8*1024*1024,S=256*1024,g=2e4,T=String.raw`
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
const nativePostMessage = self.postMessage.bind(self);
|
|
5
|
+
const nativeStringify = JSON.stringify.bind(JSON);
|
|
6
|
+
const nativeParse = JSON.parse.bind(JSON);
|
|
7
|
+
const NativeWeakSet = WeakSet;
|
|
8
|
+
const nativeEncoder = new TextEncoder();
|
|
9
|
+
const nativeEncode = nativeEncoder.encode.bind(nativeEncoder);
|
|
10
|
+
const arrayBufferByteLengthGetter = Object.getOwnPropertyDescriptor(ArrayBuffer.prototype, 'byteLength').get;
|
|
11
|
+
const nativeBufferByteLength = Function.prototype.call.bind(arrayBufferByteLengthGetter);
|
|
12
|
+
|
|
13
|
+
function encodedByteLength(value) {
|
|
14
|
+
return nativeBufferByteLength(nativeEncode(value).buffer);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function safeResult(value, maxBytes) {
|
|
18
|
+
const seen = new NativeWeakSet();
|
|
19
|
+
const serialized = nativeStringify(value, (key, nested) => {
|
|
20
|
+
if (key === '__proto__' || key === 'constructor' || key === 'prototype') return undefined;
|
|
21
|
+
if (typeof nested === 'bigint') return String(nested);
|
|
22
|
+
if (nested instanceof Date) return nested.toISOString();
|
|
23
|
+
if (nested && typeof nested === 'object') {
|
|
24
|
+
if (seen.has(nested)) return '[Circular]';
|
|
25
|
+
seen.add(nested);
|
|
26
|
+
}
|
|
27
|
+
return nested;
|
|
28
|
+
});
|
|
29
|
+
if (serialized === undefined) throw new Error('The calculation returned undefined or a non-serializable value.');
|
|
30
|
+
if (encodedByteLength(serialized) > maxBytes) {
|
|
31
|
+
throw new Error('The calculation result is too large. Return a smaller summary or fewer rows.');
|
|
32
|
+
}
|
|
33
|
+
return nativeParse(serialized);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
self.onmessage = async event => {
|
|
37
|
+
const message = event.data || {};
|
|
38
|
+
if (message.type !== 'run' || typeof message.token !== 'string') return;
|
|
39
|
+
const token = message.token;
|
|
40
|
+
|
|
41
|
+
try {
|
|
42
|
+
for (const name of ['fetch', 'XMLHttpRequest', 'WebSocket', 'EventSource', 'importScripts', 'Worker', 'SharedWorker']) {
|
|
43
|
+
try {
|
|
44
|
+
Object.defineProperty(self, name, { value: undefined, writable: false, configurable: false });
|
|
45
|
+
} catch {}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const args = message.args && typeof message.args === 'object' ? message.args : {};
|
|
49
|
+
const keys = Object.keys(args);
|
|
50
|
+
if (!keys.every(key => /^[$A-Z_][0-9A-Z_$]*$/i.test(key) && !['constructor', 'prototype', '__proto__'].includes(key))) {
|
|
51
|
+
throw new Error('The calculation contains an invalid argument name.');
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const calculate = Function(...keys, "'use strict';\n" + message.code);
|
|
55
|
+
const result = await Promise.resolve(calculate(...keys.map(key => args[key])));
|
|
56
|
+
nativePostMessage({
|
|
57
|
+
type: 'result',
|
|
58
|
+
token,
|
|
59
|
+
ok: true,
|
|
60
|
+
result: safeResult(result, message.maxOutputBytes),
|
|
61
|
+
});
|
|
62
|
+
} catch (error) {
|
|
63
|
+
nativePostMessage({
|
|
64
|
+
type: 'result',
|
|
65
|
+
token,
|
|
66
|
+
ok: false,
|
|
67
|
+
error: String(error && error.message ? error.message : error).slice(0, 500),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
`,M=String.raw`
|
|
72
|
+
'use strict';
|
|
73
|
+
const workerSource = __WORKER_SOURCE__;
|
|
74
|
+
|
|
75
|
+
window.addEventListener('message', event => {
|
|
76
|
+
const message = event.data || {};
|
|
77
|
+
if (event.source !== parent || message.type !== 'table-sandbox-run' || typeof message.token !== 'string') return;
|
|
78
|
+
|
|
79
|
+
const workerUrl = URL.createObjectURL(new Blob([workerSource], { type: 'text/javascript' }));
|
|
80
|
+
const worker = new Worker(workerUrl);
|
|
81
|
+
URL.revokeObjectURL(workerUrl);
|
|
82
|
+
let finished = false;
|
|
83
|
+
|
|
84
|
+
const finish = payload => {
|
|
85
|
+
if (finished) return;
|
|
86
|
+
finished = true;
|
|
87
|
+
clearTimeout(timer);
|
|
88
|
+
worker.terminate();
|
|
89
|
+
parent.postMessage({ type: 'table-sandbox-result', token: message.token, ...payload }, '*');
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const timer = setTimeout(() => {
|
|
93
|
+
finish({ ok: false, error: 'The calculation timed out.' });
|
|
94
|
+
}, message.timeoutMs);
|
|
95
|
+
|
|
96
|
+
worker.onmessage = workerEvent => {
|
|
97
|
+
const response = workerEvent.data || {};
|
|
98
|
+
if (response.type !== 'result' || response.token !== message.token) return;
|
|
99
|
+
finish(response.ok
|
|
100
|
+
? { ok: true, result: response.result }
|
|
101
|
+
: { ok: false, error: response.error || 'The calculation failed.' });
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
worker.onerror = () => finish({ ok: false, error: 'The isolated calculation worker failed.' });
|
|
105
|
+
worker.postMessage({
|
|
106
|
+
type: 'run',
|
|
107
|
+
token: message.token,
|
|
108
|
+
code: message.code,
|
|
109
|
+
args: message.args,
|
|
110
|
+
maxOutputBytes: message.maxOutputBytes,
|
|
111
|
+
});
|
|
112
|
+
}, { passive: true });
|
|
113
|
+
|
|
114
|
+
parent.postMessage({ type: 'table-sandbox-ready' }, '*');
|
|
115
|
+
`.replace("__WORKER_SOURCE__",JSON.stringify(T));function x(){return`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'unsafe-inline' 'unsafe-eval' blob:; worker-src blob:; child-src blob:; connect-src 'none'; img-src 'none'; media-src 'none'; object-src 'none'; frame-src 'none'; style-src 'unsafe-inline'"></head><body><script>${M.replace(/<\/script/gi,"<\\/script")}<\/script></body></html>`}function O(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?crypto.randomUUID():`table-sandbox-${Date.now()}-${Math.random().toString(36).slice(2)}`}function B(r,h={},s={}){if(typeof document>"u"||!document.body)return Promise.reject(new Error("Table calculations can only run in a browser session."));if(typeof r!="string"||!r.trim())return Promise.reject(new Error("No calculation code was provided."));if(r.length>g)return Promise.reject(new Error(`Calculation code is limited to ${g} characters.`));const u=Math.min(Math.max(Math.trunc(s.timeoutMs??_),100),5e3),k=Math.min(Math.max(Math.trunc(s.maxInputBytes??E),1024),16*1024*1024),l=Math.min(Math.max(Math.trunc(s.maxOutputBytes??S),1024),1024*1024);let d;try{d=p.serializeBounded(h,k)}catch(o){return Promise.reject(o)}return new Promise((o,a)=>{const e=document.createElement("iframe"),f=O();let i=!1,y=!1;e.setAttribute("sandbox","allow-scripts"),e.setAttribute("aria-hidden","true"),e.tabIndex=-1,e.style.position="fixed",e.style.width="0",e.style.height="0",e.style.border="0",e.style.opacity="0",e.style.pointerEvents="none",e.srcdoc=x();const b=()=>{clearTimeout(v),window.removeEventListener("message",m),e.remove()},n=t=>{y||(y=!0,b(),t())},w=()=>{e.contentWindow?.postMessage({type:"table-sandbox-run",token:f,code:r,args:d,timeoutMs:u,maxOutputBytes:l},"*")},m=t=>{if(!(t.source!==e.contentWindow||!t.data||typeof t.data!="object")){if(t.data.type==="table-sandbox-ready"){if(i)return;i=!0,w();return}if(!(t.data.type!=="table-sandbox-result"||t.data.token!==f)){if(!t.data.ok){n(()=>a(new Error(t.data.error||"The isolated calculation failed.")));return}try{const c=p.serializeBounded(t.data.result,l);n(()=>o(c))}catch(c){n(()=>a(c))}}}},v=window.setTimeout(()=>{n(()=>a(new Error(i?"The calculation timed out.":"The isolated calculation environment could not start.")))},u+1e3);window.addEventListener("message",m),document.body.appendChild(e)})}exports.runSandboxedTableCode=B;
|
|
@@ -0,0 +1,250 @@
|
|
|
1
|
+
import { defineComponent as M, resolveComponent as s, openBlock as u, createBlock as m, normalizeClass as I, withCtx as n, unref as f, createTextVNode as d, toDisplayString as c, ref as z, computed as L, watch as $, createVNode as a, createElementVNode as g, withKeys as R, withModifiers as _, createCommentVNode as x } from "vue";
|
|
2
|
+
import { ShieldX as H, ShieldCheck as K, AlertTriangle as C, Loader2 as P } from "lucide-vue-next";
|
|
3
|
+
const O = /* @__PURE__ */ M({
|
|
4
|
+
__name: "UserStatusBadge",
|
|
5
|
+
props: {
|
|
6
|
+
disabled: { type: Boolean }
|
|
7
|
+
},
|
|
8
|
+
setup(e) {
|
|
9
|
+
return (o, t) => {
|
|
10
|
+
const i = s("Badge");
|
|
11
|
+
return u(), m(i, {
|
|
12
|
+
variant: "outline",
|
|
13
|
+
class: I(["gap-1.5 whitespace-nowrap", e.disabled ? "border-amber-400/60 bg-amber-50 text-amber-800 dark:border-amber-700/70 dark:bg-amber-950/40 dark:text-amber-300" : "border-emerald-400/60 bg-emerald-50 text-emerald-800 dark:border-emerald-700/70 dark:bg-emerald-950/40 dark:text-emerald-300"])
|
|
14
|
+
}, {
|
|
15
|
+
default: n(() => [
|
|
16
|
+
e.disabled ? (u(), m(f(H), {
|
|
17
|
+
key: 0,
|
|
18
|
+
class: "size-3.5"
|
|
19
|
+
})) : (u(), m(f(K), {
|
|
20
|
+
key: 1,
|
|
21
|
+
class: "size-3.5"
|
|
22
|
+
})),
|
|
23
|
+
d(" " + c(e.disabled ? "Suspended" : "Enabled"), 1)
|
|
24
|
+
]),
|
|
25
|
+
_: 1
|
|
26
|
+
}, 8, ["class"]);
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
}), W = { class: "space-y-4 py-5" }, G = { class: "space-y-2" }, Z = /* @__PURE__ */ M({
|
|
30
|
+
__name: "ReasonActionDialog",
|
|
31
|
+
props: {
|
|
32
|
+
open: { type: Boolean },
|
|
33
|
+
title: {},
|
|
34
|
+
description: {},
|
|
35
|
+
confirmLabel: {},
|
|
36
|
+
subject: { default: "" },
|
|
37
|
+
busy: { type: Boolean, default: !1 },
|
|
38
|
+
error: { default: "" },
|
|
39
|
+
destructive: { type: Boolean, default: !1 }
|
|
40
|
+
},
|
|
41
|
+
emits: ["update:open", "confirm"],
|
|
42
|
+
setup(e, { emit: o }) {
|
|
43
|
+
const t = e, i = o, l = z(""), p = L(() => l.value.trim().length >= 3 && !t.busy);
|
|
44
|
+
$(() => t.open, (v) => {
|
|
45
|
+
v && (l.value = "");
|
|
46
|
+
});
|
|
47
|
+
function S() {
|
|
48
|
+
t.busy || i("update:open", !1);
|
|
49
|
+
}
|
|
50
|
+
function b() {
|
|
51
|
+
p.value && i("confirm", l.value.trim());
|
|
52
|
+
}
|
|
53
|
+
return (v, r) => {
|
|
54
|
+
const T = s("ResponsiveModalTitle"), U = s("ResponsiveModalDescription"), D = s("ResponsiveModalHeader"), h = s("AlertTitle"), w = s("AlertDescription"), k = s("Alert"), N = s("Label"), F = s("Textarea"), A = s("Button"), E = s("ResponsiveModalFooter"), V = s("ResponsiveModalScrollContent"), j = s("ResponsiveModal");
|
|
55
|
+
return u(), m(j, {
|
|
56
|
+
open: e.open,
|
|
57
|
+
"onUpdate:open": r[1] || (r[1] = (y) => i("update:open", y))
|
|
58
|
+
}, {
|
|
59
|
+
default: n(() => [
|
|
60
|
+
a(V, { class: "sm:max-w-lg" }, {
|
|
61
|
+
default: n(() => [
|
|
62
|
+
a(D, null, {
|
|
63
|
+
default: n(() => [
|
|
64
|
+
a(T, null, {
|
|
65
|
+
default: n(() => [
|
|
66
|
+
d(c(e.title), 1)
|
|
67
|
+
]),
|
|
68
|
+
_: 1
|
|
69
|
+
}),
|
|
70
|
+
a(U, { class: "break-words" }, {
|
|
71
|
+
default: n(() => [
|
|
72
|
+
d(c(e.description), 1)
|
|
73
|
+
]),
|
|
74
|
+
_: 1
|
|
75
|
+
})
|
|
76
|
+
]),
|
|
77
|
+
_: 1
|
|
78
|
+
}),
|
|
79
|
+
g("div", W, [
|
|
80
|
+
a(k, {
|
|
81
|
+
variant: e.destructive ? "destructive" : "default"
|
|
82
|
+
}, {
|
|
83
|
+
default: n(() => [
|
|
84
|
+
a(f(C)),
|
|
85
|
+
a(h, { class: "break-all" }, {
|
|
86
|
+
default: n(() => [
|
|
87
|
+
d(c(e.subject || "Confirm this account change"), 1)
|
|
88
|
+
]),
|
|
89
|
+
_: 1
|
|
90
|
+
}),
|
|
91
|
+
a(w, null, {
|
|
92
|
+
default: n(() => [...r[2] || (r[2] = [
|
|
93
|
+
d(" Studio will attempt to add this action to its activity history. ", -1)
|
|
94
|
+
])]),
|
|
95
|
+
_: 1
|
|
96
|
+
})
|
|
97
|
+
]),
|
|
98
|
+
_: 1
|
|
99
|
+
}, 8, ["variant"]),
|
|
100
|
+
g("div", G, [
|
|
101
|
+
a(N, { for: "firebase-user-action-reason" }, {
|
|
102
|
+
default: n(() => [...r[3] || (r[3] = [
|
|
103
|
+
d("Reason", -1)
|
|
104
|
+
])]),
|
|
105
|
+
_: 1
|
|
106
|
+
}),
|
|
107
|
+
a(F, {
|
|
108
|
+
id: "firebase-user-action-reason",
|
|
109
|
+
modelValue: l.value,
|
|
110
|
+
"onUpdate:modelValue": r[0] || (r[0] = (y) => l.value = y),
|
|
111
|
+
rows: "3",
|
|
112
|
+
maxlength: "500",
|
|
113
|
+
placeholder: "Why is this change needed?",
|
|
114
|
+
disabled: e.busy,
|
|
115
|
+
onKeydown: [
|
|
116
|
+
R(_(b, ["meta", "prevent"]), ["enter"]),
|
|
117
|
+
R(_(b, ["ctrl", "prevent"]), ["enter"])
|
|
118
|
+
]
|
|
119
|
+
}, null, 8, ["modelValue", "disabled", "onKeydown"]),
|
|
120
|
+
r[4] || (r[4] = g("p", { class: "text-xs text-muted-foreground" }, "At least 3 characters; required for the Studio activity record.", -1))
|
|
121
|
+
]),
|
|
122
|
+
e.error ? (u(), m(k, {
|
|
123
|
+
key: 0,
|
|
124
|
+
variant: "destructive"
|
|
125
|
+
}, {
|
|
126
|
+
default: n(() => [
|
|
127
|
+
a(f(C)),
|
|
128
|
+
a(h, null, {
|
|
129
|
+
default: n(() => [...r[5] || (r[5] = [
|
|
130
|
+
d("The action failed", -1)
|
|
131
|
+
])]),
|
|
132
|
+
_: 1
|
|
133
|
+
}),
|
|
134
|
+
a(w, null, {
|
|
135
|
+
default: n(() => [
|
|
136
|
+
d(c(e.error), 1)
|
|
137
|
+
]),
|
|
138
|
+
_: 1
|
|
139
|
+
})
|
|
140
|
+
]),
|
|
141
|
+
_: 1
|
|
142
|
+
})) : x("", !0)
|
|
143
|
+
]),
|
|
144
|
+
a(E, { class: "gap-2 sm:justify-end" }, {
|
|
145
|
+
default: n(() => [
|
|
146
|
+
a(A, {
|
|
147
|
+
variant: "outline",
|
|
148
|
+
disabled: e.busy,
|
|
149
|
+
onClick: S
|
|
150
|
+
}, {
|
|
151
|
+
default: n(() => [...r[6] || (r[6] = [
|
|
152
|
+
d("Cancel", -1)
|
|
153
|
+
])]),
|
|
154
|
+
_: 1
|
|
155
|
+
}, 8, ["disabled"]),
|
|
156
|
+
a(A, {
|
|
157
|
+
variant: e.destructive ? "destructive" : "default",
|
|
158
|
+
disabled: !p.value,
|
|
159
|
+
onClick: b
|
|
160
|
+
}, {
|
|
161
|
+
default: n(() => [
|
|
162
|
+
e.busy ? (u(), m(f(P), {
|
|
163
|
+
key: 0,
|
|
164
|
+
class: "size-4 animate-spin"
|
|
165
|
+
})) : x("", !0),
|
|
166
|
+
d(" " + c(e.busy ? "Working…" : e.confirmLabel), 1)
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}, 8, ["variant", "disabled"])
|
|
170
|
+
]),
|
|
171
|
+
_: 1
|
|
172
|
+
})
|
|
173
|
+
]),
|
|
174
|
+
_: 1
|
|
175
|
+
})
|
|
176
|
+
]),
|
|
177
|
+
_: 1
|
|
178
|
+
}, 8, ["open"]);
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
function J(e, o) {
|
|
183
|
+
if (!e || typeof e != "object") return o;
|
|
184
|
+
const t = e;
|
|
185
|
+
return t.data?.statusMessage || t.data?.message || t.statusMessage || t.message || o;
|
|
186
|
+
}
|
|
187
|
+
function Q(e) {
|
|
188
|
+
return "user" in e ? e.user : e;
|
|
189
|
+
}
|
|
190
|
+
function Y(e) {
|
|
191
|
+
return !!(e && typeof e == "object" && "auditRecorded" in e && e.auditRecorded === !1);
|
|
192
|
+
}
|
|
193
|
+
function B(e) {
|
|
194
|
+
const o = new TextEncoder().encode(e);
|
|
195
|
+
let t = "";
|
|
196
|
+
for (const i of o) t += String.fromCharCode(i);
|
|
197
|
+
return btoa(t).replace(/\+/g, "-").replace(/\//g, "_").replace(/=+$/g, "");
|
|
198
|
+
}
|
|
199
|
+
function ee(e) {
|
|
200
|
+
if (!/^[A-Za-z0-9_-]{1,1024}$/.test(e)) throw new Error("Invalid Firebase UID token.");
|
|
201
|
+
const o = e.replace(/-/g, "+").replace(/_/g, "/").padEnd(Math.ceil(e.length / 4) * 4, "="), t = atob(o), i = Uint8Array.from(t, (p) => p.charCodeAt(0)), l = new TextDecoder("utf-8", { fatal: !0 }).decode(i);
|
|
202
|
+
if (!l || l.length > 128 || B(l) !== e)
|
|
203
|
+
throw new Error("Invalid Firebase UID token.");
|
|
204
|
+
return l;
|
|
205
|
+
}
|
|
206
|
+
function te(e) {
|
|
207
|
+
return `user/${B(e)}`;
|
|
208
|
+
}
|
|
209
|
+
function oe(e) {
|
|
210
|
+
const o = Array.isArray(e) ? e : String(e || "").split(",");
|
|
211
|
+
return [...new Set(o.map((t) => t.trim()).filter(Boolean))];
|
|
212
|
+
}
|
|
213
|
+
function ae(e) {
|
|
214
|
+
if (!e) return "Never";
|
|
215
|
+
const o = new Date(e);
|
|
216
|
+
return Number.isNaN(o.getTime()) ? "Unknown" : new Intl.DateTimeFormat(void 0, {
|
|
217
|
+
dateStyle: "medium",
|
|
218
|
+
timeStyle: "short"
|
|
219
|
+
}).format(o);
|
|
220
|
+
}
|
|
221
|
+
function ne(e) {
|
|
222
|
+
return {
|
|
223
|
+
password: "Email & password",
|
|
224
|
+
phone: "Phone",
|
|
225
|
+
"google.com": "Google",
|
|
226
|
+
"apple.com": "Apple",
|
|
227
|
+
"facebook.com": "Facebook",
|
|
228
|
+
"github.com": "GitHub",
|
|
229
|
+
"microsoft.com": "Microsoft",
|
|
230
|
+
"twitter.com": "X / Twitter",
|
|
231
|
+
anonymous: "Anonymous"
|
|
232
|
+
}[e] || e;
|
|
233
|
+
}
|
|
234
|
+
function re(e) {
|
|
235
|
+
return (e.displayName || e.email || e.phoneNumber || e.uid).split(/[\s@._+-]+/).filter(Boolean).slice(0, 2).map((i) => i[0]?.toUpperCase()).join("") || "U";
|
|
236
|
+
}
|
|
237
|
+
export {
|
|
238
|
+
O as _,
|
|
239
|
+
ne as a,
|
|
240
|
+
ae as b,
|
|
241
|
+
Z as c,
|
|
242
|
+
J as d,
|
|
243
|
+
B as e,
|
|
244
|
+
te as f,
|
|
245
|
+
re as g,
|
|
246
|
+
ee as h,
|
|
247
|
+
Y as m,
|
|
248
|
+
oe as p,
|
|
249
|
+
Q as u
|
|
250
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _;(function(s){s.assertEqual=a=>{};function e(a){}s.assertIs=e;function t(a){throw new Error}s.assertNever=t,s.arrayToEnum=a=>{const n={};for(const i of a)n[i]=i;return n},s.getValidEnumValues=a=>{const n=s.objectKeys(a).filter(d=>typeof a[a[d]]!="number"),i={};for(const d of n)i[d]=a[d];return s.objectValues(i)},s.objectValues=a=>s.objectKeys(a).map(function(n){return a[n]}),s.objectKeys=typeof Object.keys=="function"?a=>Object.keys(a):a=>{const n=[];for(const i in a)Object.prototype.hasOwnProperty.call(a,i)&&n.push(i);return n},s.find=(a,n)=>{for(const i of a)if(n(i))return i},s.isInteger=typeof Number.isInteger=="function"?a=>Number.isInteger(a):a=>typeof a=="number"&&Number.isFinite(a)&&Math.floor(a)===a;function r(a,n=" | "){return a.map(i=>typeof i=="string"?`'${i}'`:i).join(n)}s.joinValues=r,s.jsonStringifyReplacer=(a,n)=>typeof n=="bigint"?n.toString():n})(_||(_={}));var ee;(function(s){s.mergeShapes=(e,t)=>({...e,...t})})(ee||(ee={}));const u=_.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Z=s=>{switch(typeof s){case"undefined":return u.undefined;case"string":return u.string;case"number":return Number.isNaN(s)?u.nan:u.number;case"boolean":return u.boolean;case"function":return u.function;case"bigint":return u.bigint;case"symbol":return u.symbol;case"object":return Array.isArray(s)?u.array:s===null?u.null:s.then&&typeof s.then=="function"&&s.catch&&typeof s.catch=="function"?u.promise:typeof Map<"u"&&s instanceof Map?u.map:typeof Set<"u"&&s instanceof Set?u.set:typeof Date<"u"&&s instanceof Date?u.date:u.object;default:return u.unknown}},o=_.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]);class T extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=r=>{this.issues=[...this.issues,r]},this.addIssues=(r=[])=>{this.issues=[...this.issues,...r]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(n){return n.message},r={_errors:[]},a=n=>{for(const i of n.issues)if(i.code==="invalid_union")i.unionErrors.map(a);else if(i.code==="invalid_return_type")a(i.returnTypeError);else if(i.code==="invalid_arguments")a(i.argumentsError);else if(i.path.length===0)r._errors.push(t(i));else{let d=r,h=0;for(;h<i.path.length;){const f=i.path[h];h===i.path.length-1?(d[f]=d[f]||{_errors:[]},d[f]._errors.push(t(i))):d[f]=d[f]||{_errors:[]},d=d[f],h++}}};return a(this),r}static assert(e){if(!(e instanceof T))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,_.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=t=>t.message){const t={},r=[];for(const a of this.issues)if(a.path.length>0){const n=a.path[0];t[n]=t[n]||[],t[n].push(e(a))}else r.push(e(a));return{formErrors:r,fieldErrors:t}}get formErrors(){return this.flatten()}}T.create=s=>new T(s);const J=(s,e)=>{let t;switch(s.code){case o.invalid_type:s.received===u.undefined?t="Required":t=`Expected ${s.expected}, received ${s.received}`;break;case o.invalid_literal:t=`Invalid literal value, expected ${JSON.stringify(s.expected,_.jsonStringifyReplacer)}`;break;case o.unrecognized_keys:t=`Unrecognized key(s) in object: ${_.joinValues(s.keys,", ")}`;break;case o.invalid_union:t="Invalid input";break;case o.invalid_union_discriminator:t=`Invalid discriminator value. Expected ${_.joinValues(s.options)}`;break;case o.invalid_enum_value:t=`Invalid enum value. Expected ${_.joinValues(s.options)}, received '${s.received}'`;break;case o.invalid_arguments:t="Invalid function arguments";break;case o.invalid_return_type:t="Invalid function return type";break;case o.invalid_date:t="Invalid date";break;case o.invalid_string:typeof s.validation=="object"?"includes"in s.validation?(t=`Invalid input: must include "${s.validation.includes}"`,typeof s.validation.position=="number"&&(t=`${t} at one or more positions greater than or equal to ${s.validation.position}`)):"startsWith"in s.validation?t=`Invalid input: must start with "${s.validation.startsWith}"`:"endsWith"in s.validation?t=`Invalid input: must end with "${s.validation.endsWith}"`:_.assertNever(s.validation):s.validation!=="regex"?t=`Invalid ${s.validation}`:t="Invalid";break;case o.too_small:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at least":"more than"} ${s.minimum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at least":"over"} ${s.minimum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="bigint"?t=`Number must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${s.minimum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly equal to ":s.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(s.minimum))}`:t="Invalid input";break;case o.too_big:s.type==="array"?t=`Array must contain ${s.exact?"exactly":s.inclusive?"at most":"less than"} ${s.maximum} element(s)`:s.type==="string"?t=`String must contain ${s.exact?"exactly":s.inclusive?"at most":"under"} ${s.maximum} character(s)`:s.type==="number"?t=`Number must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="bigint"?t=`BigInt must be ${s.exact?"exactly":s.inclusive?"less than or equal to":"less than"} ${s.maximum}`:s.type==="date"?t=`Date must be ${s.exact?"exactly":s.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(s.maximum))}`:t="Invalid input";break;case o.custom:t="Invalid input";break;case o.invalid_intersection_types:t="Intersection results could not be merged";break;case o.not_multiple_of:t=`Number must be a multiple of ${s.multipleOf}`;break;case o.not_finite:t="Number must be finite";break;default:t=e.defaultError,_.assertNever(s)}return{message:t}};let ge=J;function ve(){return ge}const xe=s=>{const{data:e,path:t,errorMaps:r,issueData:a}=s,n=[...t,...a.path||[]],i={...a,path:n};if(a.message!==void 0)return{...a,path:n,message:a.message};let d="";const h=r.filter(f=>!!f).slice().reverse();for(const f of h)d=f(i,{data:e,defaultError:d}).message;return{...a,path:n,message:d}};function c(s,e){const t=ve(),r=xe({issueData:e,data:s.data,path:s.path,errorMaps:[s.common.contextualErrorMap,s.schemaErrorMap,t,t===J?void 0:J].filter(a=>!!a)});s.common.issues.push(r)}class x{constructor(){this.value="valid"}dirty(){this.value==="valid"&&(this.value="dirty")}abort(){this.value!=="aborted"&&(this.value="aborted")}static mergeArray(e,t){const r=[];for(const a of t){if(a.status==="aborted")return p;a.status==="dirty"&&e.dirty(),r.push(a.value)}return{status:e.value,value:r}}static async mergeObjectAsync(e,t){const r=[];for(const a of t){const n=await a.key,i=await a.value;r.push({key:n,value:i})}return x.mergeObjectSync(e,r)}static mergeObjectSync(e,t){const r={};for(const a of t){const{key:n,value:i}=a;if(n.status==="aborted"||i.status==="aborted")return p;n.status==="dirty"&&e.dirty(),i.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof i.value<"u"||a.alwaysSet)&&(r[n.value]=i.value)}return{status:e.value,value:r}}}const p=Object.freeze({status:"aborted"}),M=s=>({status:"dirty",value:s}),k=s=>({status:"valid",value:s}),te=s=>s.status==="aborted",se=s=>s.status==="dirty",P=s=>s.status==="valid",z=s=>typeof Promise<"u"&&s instanceof Promise;var l;(function(s){s.errToObj=e=>typeof e=="string"?{message:e}:e||{},s.toString=e=>typeof e=="string"?e:e?.message})(l||(l={}));class O{constructor(e,t,r,a){this._cachedPath=[],this.parent=e,this.data=t,this._path=r,this._key=a}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const re=(s,e)=>{if(P(e))return{success:!0,data:e.value};if(!s.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new T(s.common.issues);return this._error=t,this._error}}};function m(s){if(!s)return{};const{errorMap:e,invalid_type_error:t,required_error:r,description:a}=s;if(e&&(t||r))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:a}:{errorMap:(i,d)=>{const{message:h}=s;return i.code==="invalid_enum_value"?{message:h??d.defaultError}:typeof d.data>"u"?{message:h??r??d.defaultError}:i.code!=="invalid_type"?{message:d.defaultError}:{message:h??t??d.defaultError}},description:a}}class y{get description(){return this._def.description}_getType(e){return Z(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new x,ctx:{common:e.parent.common,data:e.data,parsedType:Z(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if(z(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const r=this.safeParse(e,t);if(r.success)return r.data;throw r.error}safeParse(e,t){const r={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)},a=this._parseSync({data:e,path:r.path,parent:r});return re(r,a)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)};if(!this["~standard"].async)try{const r=this._parseSync({data:e,path:[],parent:t});return P(r)?{value:r.value}:{issues:t.common.issues}}catch(r){r?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(r=>P(r)?{value:r.value}:{issues:t.common.issues})}async parseAsync(e,t){const r=await this.safeParseAsync(e,t);if(r.success)return r.data;throw r.error}async safeParseAsync(e,t){const r={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Z(e)},a=this._parse({data:e,path:r.path,parent:r}),n=await(z(a)?a:Promise.resolve(a));return re(r,n)}refine(e,t){const r=a=>typeof t=="string"||typeof t>"u"?{message:t}:typeof t=="function"?t(a):t;return this._refinement((a,n)=>{const i=e(a),d=()=>n.addIssue({code:o.custom,...r(a)});return typeof Promise<"u"&&i instanceof Promise?i.then(h=>h?!0:(d(),!1)):i?!0:(d(),!1)})}refinement(e,t){return this._refinement((r,a)=>e(r)?!0:(a.addIssue(typeof t=="function"?t(r,a):t),!1))}_refinement(e){return new j({schema:this,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:t=>this["~validate"](t)}}optional(){return C.create(this,this._def)}nullable(){return F.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return b.create(this)}promise(){return B.create(this,this._def)}or(e){return D.create([this,e],this._def)}and(e){return U.create(this,e,this._def)}transform(e){return new j({...m(this._def),schema:this,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t=typeof e=="function"?e:()=>e;return new W({...m(this._def),innerType:this,defaultValue:t,typeName:exports.ZodFirstPartyTypeKind.ZodDefault})}brand(){return new De({typeName:exports.ZodFirstPartyTypeKind.ZodBranded,type:this,...m(this._def)})}catch(e){const t=typeof e=="function"?e:()=>e;return new G({...m(this._def),innerType:this,catchValue:t,typeName:exports.ZodFirstPartyTypeKind.ZodCatch})}describe(e){const t=this.constructor;return new t({...this._def,description:e})}pipe(e){return X.create(this,e)}readonly(){return Q.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const ke=/^c[^\s-]{8,}$/i,be=/^[0-9a-z]+$/,we=/^[0-9A-HJKMNP-TV-Z]{26}$/i,Te=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,Ze=/^[a-z0-9_-]{21}$/i,Ce=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,Oe=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Se=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Ne="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";let q;const Ae=/^(?:(?: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])$/,Re=/^(?:(?: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])\/(3[0-2]|[12]?[0-9])$/,je=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,Ie=/^(([0-9a-fA-F]{1,4}:){7,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}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Pe=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Ee=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,pe="((\\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])))",$e=new RegExp(`^${pe}$`);function me(s){let e="[0-5]\\d";s.precision?e=`${e}\\.\\d{${s.precision}}`:s.precision==null&&(e=`${e}(\\.\\d+)?`);const t=s.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`}function Fe(s){return new RegExp(`^${me(s)}$`)}function Ve(s){let e=`${pe}T${me(s)}`;const t=[];return t.push(s.local?"Z?":"Z"),s.offset&&t.push("([+-]\\d{2}:?\\d{2})"),e=`${e}(${t.join("|")})`,new RegExp(`^${e}$`)}function Me(s,e){return!!((e==="v4"||!e)&&Ae.test(s)||(e==="v6"||!e)&&je.test(s))}function Le(s,e){if(!Ce.test(s))return!1;try{const[t]=s.split(".");if(!t)return!1;const r=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(t.length+(4-t.length%4)%4,"="),a=JSON.parse(atob(r));return!(typeof a!="object"||a===null||"typ"in a&&a?.typ!=="JWT"||!a.alg||e&&a.alg!==e)}catch{return!1}}function ze(s,e){return!!((e==="v4"||!e)&&Re.test(s)||(e==="v6"||!e)&&Ie.test(s))}class w extends y{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==u.string){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.string,received:n.parsedType}),p}const r=new x;let a;for(const n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="max")e.data.length>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),r.dirty());else if(n.kind==="length"){const i=e.data.length>n.value,d=e.data.length<n.value;(i||d)&&(a=this._getOrReturnCtx(e,a),i?c(a,{code:o.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):d&&c(a,{code:o.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),r.dirty())}else if(n.kind==="email")Se.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"email",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="emoji")q||(q=new RegExp(Ne,"u")),q.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"emoji",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="uuid")Te.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"uuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="nanoid")Ze.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"nanoid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid")ke.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="cuid2")be.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cuid2",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="ulid")we.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ulid",code:o.invalid_string,message:n.message}),r.dirty());else if(n.kind==="url")try{new URL(e.data)}catch{a=this._getOrReturnCtx(e,a),c(a,{validation:"url",code:o.invalid_string,message:n.message}),r.dirty()}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"regex",code:o.invalid_string,message:n.message}),r.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),r.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{startsWith:n.value},message:n.message}),r.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:{endsWith:n.value},message:n.message}),r.dirty()):n.kind==="datetime"?Ve(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"datetime",message:n.message}),r.dirty()):n.kind==="date"?$e.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"date",message:n.message}),r.dirty()):n.kind==="time"?Fe(n).test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{code:o.invalid_string,validation:"time",message:n.message}),r.dirty()):n.kind==="duration"?Oe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"duration",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="ip"?Me(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"ip",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="jwt"?Le(e.data,n.alg)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"jwt",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="cidr"?ze(e.data,n.version)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"cidr",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64"?Pe.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64",code:o.invalid_string,message:n.message}),r.dirty()):n.kind==="base64url"?Ee.test(e.data)||(a=this._getOrReturnCtx(e,a),c(a,{validation:"base64url",code:o.invalid_string,message:n.message}),r.dirty()):_.assertNever(n);return{status:r.value,value:e.data}}_regex(e,t,r){return this.refinement(a=>e.test(a),{validation:t,code:o.invalid_string,...l.errToObj(r)})}_addCheck(e){return new w({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...l.errToObj(e)})}url(e){return this._addCheck({kind:"url",...l.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...l.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...l.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...l.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...l.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...l.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...l.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...l.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...l.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...l.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...l.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...l.errToObj(e)})}datetime(e){return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof e?.precision>"u"?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...l.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return typeof e=="string"?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:typeof e?.precision>"u"?null:e?.precision,...l.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...l.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...l.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...l.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...l.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...l.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...l.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...l.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...l.errToObj(t)})}nonempty(e){return this.min(1,l.errToObj(e))}trim(){return new w({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new w({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new w({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>e.kind==="datetime")}get isDate(){return!!this._def.checks.find(e=>e.kind==="date")}get isTime(){return!!this._def.checks.find(e=>e.kind==="time")}get isDuration(){return!!this._def.checks.find(e=>e.kind==="duration")}get isEmail(){return!!this._def.checks.find(e=>e.kind==="email")}get isURL(){return!!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return!!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return!!this._def.checks.find(e=>e.kind==="uuid")}get isNANOID(){return!!this._def.checks.find(e=>e.kind==="nanoid")}get isCUID(){return!!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return!!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return!!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return!!this._def.checks.find(e=>e.kind==="ip")}get isCIDR(){return!!this._def.checks.find(e=>e.kind==="cidr")}get isBase64(){return!!this._def.checks.find(e=>e.kind==="base64")}get isBase64url(){return!!this._def.checks.find(e=>e.kind==="base64url")}get minLength(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}w.create=s=>new w({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodString,coerce:s?.coerce??!1,...m(s)});function Ke(s,e){const t=(s.toString().split(".")[1]||"").length,r=(e.toString().split(".")[1]||"").length,a=t>r?t:r,n=Number.parseInt(s.toFixed(a).replace(".","")),i=Number.parseInt(e.toFixed(a).replace(".",""));return n%i/10**a}class N extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==u.number){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.number,received:n.parsedType}),p}let r;const a=new x;for(const n of this._def.checks)n.kind==="int"?_.isInteger(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.invalid_type,expected:"integer",received:"float",message:n.message}),a.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),a.dirty()):n.kind==="multipleOf"?Ke(e.data,n.value)!==0&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_finite,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new N({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new N({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:l.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:l.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:l.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:l.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&_.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const r of this._def.checks){if(r.kind==="finite"||r.kind==="int"||r.kind==="multipleOf")return!0;r.kind==="min"?(t===null||r.value>t)&&(t=r.value):r.kind==="max"&&(e===null||r.value<e)&&(e=r.value)}return Number.isFinite(t)&&Number.isFinite(e)}}N.create=s=>new N({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodNumber,coerce:s?.coerce||!1,...m(s)});class A extends y{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==u.bigint)return this._getInvalidInput(e);let r;const a=new x;for(const n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),a.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(r=this._getOrReturnCtx(e,r),c(r,{code:o.not_multiple_of,multipleOf:n.value,message:n.message}),a.dirty()):_.assertNever(n);return{status:a.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.bigint,received:t.parsedType}),p}gte(e,t){return this.setLimit("min",e,!0,l.toString(t))}gt(e,t){return this.setLimit("min",e,!1,l.toString(t))}lte(e,t){return this.setLimit("max",e,!0,l.toString(t))}lt(e,t){return this.setLimit("max",e,!1,l.toString(t))}setLimit(e,t,r,a){return new A({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:r,message:l.toString(a)}]})}_addCheck(e){return new A({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:l.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:l.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:l.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:l.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:l.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e}}A.create=s=>new A({checks:[],typeName:exports.ZodFirstPartyTypeKind.ZodBigInt,coerce:s?.coerce??!1,...m(s)});class K extends y{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==u.boolean){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.boolean,received:r.parsedType}),p}return k(e.data)}}K.create=s=>new K({typeName:exports.ZodFirstPartyTypeKind.ZodBoolean,coerce:s?.coerce||!1,...m(s)});class E extends y{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==u.date){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_type,expected:u.date,received:n.parsedType}),p}if(Number.isNaN(e.data.getTime())){const n=this._getOrReturnCtx(e);return c(n,{code:o.invalid_date}),p}const r=new x;let a;for(const n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),r.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(a=this._getOrReturnCtx(e,a),c(a,{code:o.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),r.dirty()):_.assertNever(n);return{status:r.value,value:new Date(e.data.getTime())}}_addCheck(e){return new E({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:l.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:l.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)t.kind==="min"&&(e===null||t.value>e)&&(e=t.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)t.kind==="max"&&(e===null||t.value<e)&&(e=t.value);return e!=null?new Date(e):null}}E.create=s=>new E({checks:[],coerce:s?.coerce||!1,typeName:exports.ZodFirstPartyTypeKind.ZodDate,...m(s)});class ae extends y{_parse(e){if(this._getType(e)!==u.symbol){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.symbol,received:r.parsedType}),p}return k(e.data)}}ae.create=s=>new ae({typeName:exports.ZodFirstPartyTypeKind.ZodSymbol,...m(s)});class ne extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.undefined,received:r.parsedType}),p}return k(e.data)}}ne.create=s=>new ne({typeName:exports.ZodFirstPartyTypeKind.ZodUndefined,...m(s)});class ie extends y{_parse(e){if(this._getType(e)!==u.null){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.null,received:r.parsedType}),p}return k(e.data)}}ie.create=s=>new ie({typeName:exports.ZodFirstPartyTypeKind.ZodNull,...m(s)});class Y extends y{constructor(){super(...arguments),this._any=!0}_parse(e){return k(e.data)}}Y.create=s=>new Y({typeName:exports.ZodFirstPartyTypeKind.ZodAny,...m(s)});class de extends y{constructor(){super(...arguments),this._unknown=!0}_parse(e){return k(e.data)}}de.create=s=>new de({typeName:exports.ZodFirstPartyTypeKind.ZodUnknown,...m(s)});class S extends y{_parse(e){const t=this._getOrReturnCtx(e);return c(t,{code:o.invalid_type,expected:u.never,received:t.parsedType}),p}}S.create=s=>new S({typeName:exports.ZodFirstPartyTypeKind.ZodNever,...m(s)});class oe extends y{_parse(e){if(this._getType(e)!==u.undefined){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.void,received:r.parsedType}),p}return k(e.data)}}oe.create=s=>new oe({typeName:exports.ZodFirstPartyTypeKind.ZodVoid,...m(s)});class b extends y{_parse(e){const{ctx:t,status:r}=this._processInputParams(e),a=this._def;if(t.parsedType!==u.array)return c(t,{code:o.invalid_type,expected:u.array,received:t.parsedType}),p;if(a.exactLength!==null){const i=t.data.length>a.exactLength.value,d=t.data.length<a.exactLength.value;(i||d)&&(c(t,{code:i?o.too_big:o.too_small,minimum:d?a.exactLength.value:void 0,maximum:i?a.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:a.exactLength.message}),r.dirty())}if(a.minLength!==null&&t.data.length<a.minLength.value&&(c(t,{code:o.too_small,minimum:a.minLength.value,type:"array",inclusive:!0,exact:!1,message:a.minLength.message}),r.dirty()),a.maxLength!==null&&t.data.length>a.maxLength.value&&(c(t,{code:o.too_big,maximum:a.maxLength.value,type:"array",inclusive:!0,exact:!1,message:a.maxLength.message}),r.dirty()),t.common.async)return Promise.all([...t.data].map((i,d)=>a.type._parseAsync(new O(t,i,t.path,d)))).then(i=>x.mergeArray(r,i));const n=[...t.data].map((i,d)=>a.type._parseSync(new O(t,i,t.path,d)));return x.mergeArray(r,n)}get element(){return this._def.type}min(e,t){return new b({...this._def,minLength:{value:e,message:l.toString(t)}})}max(e,t){return new b({...this._def,maxLength:{value:e,message:l.toString(t)}})}length(e,t){return new b({...this._def,exactLength:{value:e,message:l.toString(t)}})}nonempty(e){return this.min(1,e)}}b.create=(s,e)=>new b({type:s,minLength:null,maxLength:null,exactLength:null,typeName:exports.ZodFirstPartyTypeKind.ZodArray,...m(e)});function I(s){if(s instanceof v){const e={};for(const t in s.shape){const r=s.shape[t];e[t]=C.create(I(r))}return new v({...s._def,shape:()=>e})}else return s instanceof b?new b({...s._def,type:I(s.element)}):s instanceof C?C.create(I(s.unwrap())):s instanceof F?F.create(I(s.unwrap())):s instanceof R?R.create(s.items.map(e=>I(e))):s}class v extends y{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;const e=this._def.shape(),t=_.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==u.object){const f=this._getOrReturnCtx(e);return c(f,{code:o.invalid_type,expected:u.object,received:f.parsedType}),p}const{status:r,ctx:a}=this._processInputParams(e),{shape:n,keys:i}=this._getCached(),d=[];if(!(this._def.catchall instanceof S&&this._def.unknownKeys==="strip"))for(const f in a.data)i.includes(f)||d.push(f);const h=[];for(const f of i){const g=n[f],V=a.data[f];h.push({key:{status:"valid",value:f},value:g._parse(new O(a,V,a.path,f)),alwaysSet:f in a.data})}if(this._def.catchall instanceof S){const f=this._def.unknownKeys;if(f==="passthrough")for(const g of d)h.push({key:{status:"valid",value:g},value:{status:"valid",value:a.data[g]}});else if(f==="strict")d.length>0&&(c(a,{code:o.unrecognized_keys,keys:d}),r.dirty());else if(f!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const f=this._def.catchall;for(const g of d){const V=a.data[g];h.push({key:{status:"valid",value:g},value:f._parse(new O(a,V,a.path,g)),alwaysSet:g in a.data})}}return a.common.async?Promise.resolve().then(async()=>{const f=[];for(const g of h){const V=await g.key,_e=await g.value;f.push({key:V,value:_e,alwaysSet:g.alwaysSet})}return f}).then(f=>x.mergeObjectSync(r,f)):x.mergeObjectSync(r,h)}get shape(){return this._def.shape()}strict(e){return l.errToObj,new v({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(t,r)=>{const a=this._def.errorMap?.(t,r).message??r.defaultError;return t.code==="unrecognized_keys"?{message:l.errToObj(e).message??a}:{message:a}}}:{}})}strip(){return new v({...this._def,unknownKeys:"strip"})}passthrough(){return new v({...this._def,unknownKeys:"passthrough"})}extend(e){return new v({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new v({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:exports.ZodFirstPartyTypeKind.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new v({...this._def,catchall:e})}pick(e){const t={};for(const r of _.objectKeys(e))e[r]&&this.shape[r]&&(t[r]=this.shape[r]);return new v({...this._def,shape:()=>t})}omit(e){const t={};for(const r of _.objectKeys(this.shape))e[r]||(t[r]=this.shape[r]);return new v({...this._def,shape:()=>t})}deepPartial(){return I(this)}partial(e){const t={};for(const r of _.objectKeys(this.shape)){const a=this.shape[r];e&&!e[r]?t[r]=a:t[r]=a.optional()}return new v({...this._def,shape:()=>t})}required(e){const t={};for(const r of _.objectKeys(this.shape))if(e&&!e[r])t[r]=this.shape[r];else{let n=this.shape[r];for(;n instanceof C;)n=n._def.innerType;t[r]=n}return new v({...this._def,shape:()=>t})}keyof(){return ye(_.objectKeys(this.shape))}}v.create=(s,e)=>new v({shape:()=>s,unknownKeys:"strip",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});v.strictCreate=(s,e)=>new v({shape:()=>s,unknownKeys:"strict",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});v.lazycreate=(s,e)=>new v({shape:s,unknownKeys:"strip",catchall:S.create(),typeName:exports.ZodFirstPartyTypeKind.ZodObject,...m(e)});class D extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=this._def.options;function a(n){for(const d of n)if(d.result.status==="valid")return d.result;for(const d of n)if(d.result.status==="dirty")return t.common.issues.push(...d.ctx.common.issues),d.result;const i=n.map(d=>new T(d.ctx.common.issues));return c(t,{code:o.invalid_union,unionErrors:i}),p}if(t.common.async)return Promise.all(r.map(async n=>{const i={...t,common:{...t.common,issues:[]},parent:null};return{result:await n._parseAsync({data:t.data,path:t.path,parent:i}),ctx:i}})).then(a);{let n;const i=[];for(const h of r){const f={...t,common:{...t.common,issues:[]},parent:null},g=h._parseSync({data:t.data,path:t.path,parent:f});if(g.status==="valid")return g;g.status==="dirty"&&!n&&(n={result:g,ctx:f}),f.common.issues.length&&i.push(f.common.issues)}if(n)return t.common.issues.push(...n.ctx.common.issues),n.result;const d=i.map(h=>new T(h));return c(t,{code:o.invalid_union,unionErrors:d}),p}}get options(){return this._def.options}}D.create=(s,e)=>new D({options:s,typeName:exports.ZodFirstPartyTypeKind.ZodUnion,...m(e)});function H(s,e){const t=Z(s),r=Z(e);if(s===e)return{valid:!0,data:s};if(t===u.object&&r===u.object){const a=_.objectKeys(e),n=_.objectKeys(s).filter(d=>a.indexOf(d)!==-1),i={...s,...e};for(const d of n){const h=H(s[d],e[d]);if(!h.valid)return{valid:!1};i[d]=h.data}return{valid:!0,data:i}}else if(t===u.array&&r===u.array){if(s.length!==e.length)return{valid:!1};const a=[];for(let n=0;n<s.length;n++){const i=s[n],d=e[n],h=H(i,d);if(!h.valid)return{valid:!1};a.push(h.data)}return{valid:!0,data:a}}else return t===u.date&&r===u.date&&+s==+e?{valid:!0,data:s}:{valid:!1}}class U extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=(n,i)=>{if(te(n)||te(i))return p;const d=H(n.value,i.value);return d.valid?((se(n)||se(i))&&t.dirty(),{status:t.value,value:d.data}):(c(r,{code:o.invalid_intersection_types}),p)};return r.common.async?Promise.all([this._def.left._parseAsync({data:r.data,path:r.path,parent:r}),this._def.right._parseAsync({data:r.data,path:r.path,parent:r})]).then(([n,i])=>a(n,i)):a(this._def.left._parseSync({data:r.data,path:r.path,parent:r}),this._def.right._parseSync({data:r.data,path:r.path,parent:r}))}}U.create=(s,e,t)=>new U({left:s,right:e,typeName:exports.ZodFirstPartyTypeKind.ZodIntersection,...m(t)});class R extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.array)return c(r,{code:o.invalid_type,expected:u.array,received:r.parsedType}),p;if(r.data.length<this._def.items.length)return c(r,{code:o.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),p;!this._def.rest&&r.data.length>this._def.items.length&&(c(r,{code:o.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const n=[...r.data].map((i,d)=>{const h=this._def.items[d]||this._def.rest;return h?h._parse(new O(r,i,r.path,d)):null}).filter(i=>!!i);return r.common.async?Promise.all(n).then(i=>x.mergeArray(t,i)):x.mergeArray(t,n)}get items(){return this._def.items}rest(e){return new R({...this._def,rest:e})}}R.create=(s,e)=>{if(!Array.isArray(s))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new R({items:s,typeName:exports.ZodFirstPartyTypeKind.ZodTuple,rest:null,...m(e)})};class ce extends y{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.map)return c(r,{code:o.invalid_type,expected:u.map,received:r.parsedType}),p;const a=this._def.keyType,n=this._def.valueType,i=[...r.data.entries()].map(([d,h],f)=>({key:a._parse(new O(r,d,r.path,[f,"key"])),value:n._parse(new O(r,h,r.path,[f,"value"]))}));if(r.common.async){const d=new Map;return Promise.resolve().then(async()=>{for(const h of i){const f=await h.key,g=await h.value;if(f.status==="aborted"||g.status==="aborted")return p;(f.status==="dirty"||g.status==="dirty")&&t.dirty(),d.set(f.value,g.value)}return{status:t.value,value:d}})}else{const d=new Map;for(const h of i){const f=h.key,g=h.value;if(f.status==="aborted"||g.status==="aborted")return p;(f.status==="dirty"||g.status==="dirty")&&t.dirty(),d.set(f.value,g.value)}return{status:t.value,value:d}}}}ce.create=(s,e,t)=>new ce({valueType:e,keyType:s,typeName:exports.ZodFirstPartyTypeKind.ZodMap,...m(t)});class L extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.parsedType!==u.set)return c(r,{code:o.invalid_type,expected:u.set,received:r.parsedType}),p;const a=this._def;a.minSize!==null&&r.data.size<a.minSize.value&&(c(r,{code:o.too_small,minimum:a.minSize.value,type:"set",inclusive:!0,exact:!1,message:a.minSize.message}),t.dirty()),a.maxSize!==null&&r.data.size>a.maxSize.value&&(c(r,{code:o.too_big,maximum:a.maxSize.value,type:"set",inclusive:!0,exact:!1,message:a.maxSize.message}),t.dirty());const n=this._def.valueType;function i(h){const f=new Set;for(const g of h){if(g.status==="aborted")return p;g.status==="dirty"&&t.dirty(),f.add(g.value)}return{status:t.value,value:f}}const d=[...r.data.values()].map((h,f)=>n._parse(new O(r,h,r.path,f)));return r.common.async?Promise.all(d).then(h=>i(h)):i(d)}min(e,t){return new L({...this._def,minSize:{value:e,message:l.toString(t)}})}max(e,t){return new L({...this._def,maxSize:{value:e,message:l.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}L.create=(s,e)=>new L({valueType:s,minSize:null,maxSize:null,typeName:exports.ZodFirstPartyTypeKind.ZodSet,...m(e)});class ue extends y{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ue.create=(s,e)=>new ue({getter:s,typeName:exports.ZodFirstPartyTypeKind.ZodLazy,...m(e)});class le extends y{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return c(t,{received:t.data,code:o.invalid_literal,expected:this._def.value}),p}return{status:"valid",value:e.data}}get value(){return this._def.value}}le.create=(s,e)=>new le({value:s,typeName:exports.ZodFirstPartyTypeKind.ZodLiteral,...m(e)});function ye(s,e){return new $({values:s,typeName:exports.ZodFirstPartyTypeKind.ZodEnum,...m(e)})}class $ extends y{_parse(e){if(typeof e.data!="string"){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{expected:_.joinValues(r),received:t.parsedType,code:o.invalid_type}),p}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),r=this._def.values;return c(t,{received:t.data,code:o.invalid_enum_value,options:r}),p}return k(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return $.create(e,{...this._def,...t})}exclude(e,t=this._def){return $.create(this.options.filter(r=>!e.includes(r)),{...this._def,...t})}}$.create=ye;class he extends y{_parse(e){const t=_.getValidEnumValues(this._def.values),r=this._getOrReturnCtx(e);if(r.parsedType!==u.string&&r.parsedType!==u.number){const a=_.objectValues(t);return c(r,{expected:_.joinValues(a),received:r.parsedType,code:o.invalid_type}),p}if(this._cache||(this._cache=new Set(_.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const a=_.objectValues(t);return c(r,{received:r.data,code:o.invalid_enum_value,options:a}),p}return k(e.data)}get enum(){return this._def.values}}he.create=(s,e)=>new he({values:s,typeName:exports.ZodFirstPartyTypeKind.ZodNativeEnum,...m(e)});class B extends y{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==u.promise&&t.common.async===!1)return c(t,{code:o.invalid_type,expected:u.promise,received:t.parsedType}),p;const r=t.parsedType===u.promise?t.data:Promise.resolve(t.data);return k(r.then(a=>this._def.type.parseAsync(a,{path:t.path,errorMap:t.common.contextualErrorMap})))}}B.create=(s,e)=>new B({type:s,typeName:exports.ZodFirstPartyTypeKind.ZodPromise,...m(e)});class j extends y{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===exports.ZodFirstPartyTypeKind.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:r}=this._processInputParams(e),a=this._def.effect||null,n={addIssue:i=>{c(r,i),i.fatal?t.abort():t.dirty()},get path(){return r.path}};if(n.addIssue=n.addIssue.bind(n),a.type==="preprocess"){const i=a.transform(r.data,n);if(r.common.async)return Promise.resolve(i).then(async d=>{if(t.value==="aborted")return p;const h=await this._def.schema._parseAsync({data:d,path:r.path,parent:r});return h.status==="aborted"?p:h.status==="dirty"||t.value==="dirty"?M(h.value):h});{if(t.value==="aborted")return p;const d=this._def.schema._parseSync({data:i,path:r.path,parent:r});return d.status==="aborted"?p:d.status==="dirty"||t.value==="dirty"?M(d.value):d}}if(a.type==="refinement"){const i=d=>{const h=a.refinement(d,n);if(r.common.async)return Promise.resolve(h);if(h instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return d};if(r.common.async===!1){const d=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});return d.status==="aborted"?p:(d.status==="dirty"&&t.dirty(),i(d.value),{status:t.value,value:d.value})}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(d=>d.status==="aborted"?p:(d.status==="dirty"&&t.dirty(),i(d.value).then(()=>({status:t.value,value:d.value}))))}if(a.type==="transform")if(r.common.async===!1){const i=this._def.schema._parseSync({data:r.data,path:r.path,parent:r});if(!P(i))return p;const d=a.transform(i.value,n);if(d instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:d}}else return this._def.schema._parseAsync({data:r.data,path:r.path,parent:r}).then(i=>P(i)?Promise.resolve(a.transform(i.value,n)).then(d=>({status:t.value,value:d})):p);_.assertNever(a)}}j.create=(s,e,t)=>new j({schema:s,typeName:exports.ZodFirstPartyTypeKind.ZodEffects,effect:e,...m(t)});j.createWithPreprocess=(s,e,t)=>new j({schema:e,effect:{type:"preprocess",transform:s},typeName:exports.ZodFirstPartyTypeKind.ZodEffects,...m(t)});class C extends y{_parse(e){return this._getType(e)===u.undefined?k(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}C.create=(s,e)=>new C({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodOptional,...m(e)});class F extends y{_parse(e){return this._getType(e)===u.null?k(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}F.create=(s,e)=>new F({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodNullable,...m(e)});class W extends y{_parse(e){const{ctx:t}=this._processInputParams(e);let r=t.data;return t.parsedType===u.undefined&&(r=this._def.defaultValue()),this._def.innerType._parse({data:r,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}W.create=(s,e)=>new W({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...m(e)});class G extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r={...t,common:{...t.common,issues:[]}},a=this._def.innerType._parse({data:r.data,path:r.path,parent:{...r}});return z(a)?a.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})})):{status:"valid",value:a.status==="valid"?a.value:this._def.catchValue({get error(){return new T(r.common.issues)},input:r.data})}}removeCatch(){return this._def.innerType}}G.create=(s,e)=>new G({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...m(e)});class fe extends y{_parse(e){if(this._getType(e)!==u.nan){const r=this._getOrReturnCtx(e);return c(r,{code:o.invalid_type,expected:u.nan,received:r.parsedType}),p}return{status:"valid",value:e.data}}}fe.create=s=>new fe({typeName:exports.ZodFirstPartyTypeKind.ZodNaN,...m(s)});class De extends y{_parse(e){const{ctx:t}=this._processInputParams(e),r=t.data;return this._def.type._parse({data:r,path:t.path,parent:t})}unwrap(){return this._def.type}}class X extends y{_parse(e){const{status:t,ctx:r}=this._processInputParams(e);if(r.common.async)return(async()=>{const n=await this._def.in._parseAsync({data:r.data,path:r.path,parent:r});return n.status==="aborted"?p:n.status==="dirty"?(t.dirty(),M(n.value)):this._def.out._parseAsync({data:n.value,path:r.path,parent:r})})();{const a=this._def.in._parseSync({data:r.data,path:r.path,parent:r});return a.status==="aborted"?p:a.status==="dirty"?(t.dirty(),{status:"dirty",value:a.value}):this._def.out._parseSync({data:a.value,path:r.path,parent:r})}}static create(e,t){return new X({in:e,out:t,typeName:exports.ZodFirstPartyTypeKind.ZodPipeline})}}class Q extends y{_parse(e){const t=this._def.innerType._parse(e),r=a=>(P(a)&&(a.value=Object.freeze(a.value)),a);return z(t)?t.then(a=>r(a)):r(t)}unwrap(){return this._def.innerType}}Q.create=(s,e)=>new Q({innerType:s,typeName:exports.ZodFirstPartyTypeKind.ZodReadonly,...m(e)});exports.ZodFirstPartyTypeKind=void 0;(function(s){s.ZodString="ZodString",s.ZodNumber="ZodNumber",s.ZodNaN="ZodNaN",s.ZodBigInt="ZodBigInt",s.ZodBoolean="ZodBoolean",s.ZodDate="ZodDate",s.ZodSymbol="ZodSymbol",s.ZodUndefined="ZodUndefined",s.ZodNull="ZodNull",s.ZodAny="ZodAny",s.ZodUnknown="ZodUnknown",s.ZodNever="ZodNever",s.ZodVoid="ZodVoid",s.ZodArray="ZodArray",s.ZodObject="ZodObject",s.ZodUnion="ZodUnion",s.ZodDiscriminatedUnion="ZodDiscriminatedUnion",s.ZodIntersection="ZodIntersection",s.ZodTuple="ZodTuple",s.ZodRecord="ZodRecord",s.ZodMap="ZodMap",s.ZodSet="ZodSet",s.ZodFunction="ZodFunction",s.ZodLazy="ZodLazy",s.ZodLiteral="ZodLiteral",s.ZodEnum="ZodEnum",s.ZodEffects="ZodEffects",s.ZodNativeEnum="ZodNativeEnum",s.ZodOptional="ZodOptional",s.ZodNullable="ZodNullable",s.ZodDefault="ZodDefault",s.ZodCatch="ZodCatch",s.ZodPromise="ZodPromise",s.ZodBranded="ZodBranded",s.ZodPipeline="ZodPipeline",s.ZodReadonly="ZodReadonly"})(exports.ZodFirstPartyTypeKind||(exports.ZodFirstPartyTypeKind={}));const Ue=w.create;N.create;A.create;const Be=K.create,We=E.create,qe=Y.create;S.create;const Je=b.create,Ye=v.create;D.create;U.create;R.create;const He=$.create;B.create;C.create;F.create;const Ge=j.createWithPreprocess,Qe={string:(s=>w.create({...s,coerce:!0})),number:(s=>N.create({...s,coerce:!0})),boolean:(s=>K.create({...s,coerce:!0})),bigint:(s=>A.create({...s,coerce:!0})),date:(s=>E.create({...s,coerce:!0}))};exports.ZodDefault=W;exports.ZodObject=v;exports.anyType=qe;exports.arrayType=Je;exports.booleanType=Be;exports.coerce=Qe;exports.dateType=We;exports.enumType=He;exports.objectType=Ye;exports.preprocessType=Ge;exports.stringType=Ue;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("vue"),s=require("lucide-vue-next"),B=e.defineComponent({__name:"UserStatusBadge",props:{disabled:{type:Boolean}},setup(t){return(n,o)=>{const r=e.resolveComponent("Badge");return e.openBlock(),e.createBlock(r,{variant:"outline",class:e.normalizeClass(["gap-1.5 whitespace-nowrap",t.disabled?"border-amber-400/60 bg-amber-50 text-amber-800 dark:border-amber-700/70 dark:bg-amber-950/40 dark:text-amber-300":"border-emerald-400/60 bg-emerald-50 text-emerald-800 dark:border-emerald-700/70 dark:bg-emerald-950/40 dark:text-emerald-300"])},{default:e.withCtx(()=>[t.disabled?(e.openBlock(),e.createBlock(e.unref(s.ShieldX),{key:0,class:"size-3.5"})):(e.openBlock(),e.createBlock(e.unref(s.ShieldCheck),{key:1,class:"size-3.5"})),e.createTextVNode(" "+e.toDisplayString(t.disabled?"Suspended":"Enabled"),1)]),_:1},8,["class"])}}}),T={class:"space-y-4 py-5"},A={class:"space-y-2"},R=e.defineComponent({__name:"ReasonActionDialog",props:{open:{type:Boolean},title:{},description:{},confirmLabel:{},subject:{default:""},busy:{type:Boolean,default:!1},error:{default:""},destructive:{type:Boolean,default:!1}},emits:["update:open","confirm"],setup(t,{emit:n}){const o=t,r=n,i=e.ref(""),l=e.computed(()=>i.value.trim().length>=3&&!o.busy);e.watch(()=>o.open,m=>{m&&(i.value="")});function y(){o.busy||r("update:open",!1)}function d(){l.value&&r("confirm",i.value.trim())}return(m,a)=>{const g=e.resolveComponent("ResponsiveModalTitle"),h=e.resolveComponent("ResponsiveModalDescription"),C=e.resolveComponent("ResponsiveModalHeader"),f=e.resolveComponent("AlertTitle"),p=e.resolveComponent("AlertDescription"),b=e.resolveComponent("Alert"),w=e.resolveComponent("Label"),x=e.resolveComponent("Textarea"),v=e.resolveComponent("Button"),N=e.resolveComponent("ResponsiveModalFooter"),V=e.resolveComponent("ResponsiveModalScrollContent"),k=e.resolveComponent("ResponsiveModal");return e.openBlock(),e.createBlock(k,{open:t.open,"onUpdate:open":a[1]||(a[1]=c=>r("update:open",c))},{default:e.withCtx(()=>[e.createVNode(V,{class:"sm:max-w-lg"},{default:e.withCtx(()=>[e.createVNode(C,null,{default:e.withCtx(()=>[e.createVNode(g,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1}),e.createVNode(h,{class:"break-words"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.description),1)]),_:1})]),_:1}),e.createElementVNode("div",T,[e.createVNode(b,{variant:t.destructive?"destructive":"default"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.AlertTriangle)),e.createVNode(f,{class:"break-all"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.subject||"Confirm this account change"),1)]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[...a[2]||(a[2]=[e.createTextVNode(" Studio will attempt to add this action to its activity history. ",-1)])]),_:1})]),_:1},8,["variant"]),e.createElementVNode("div",A,[e.createVNode(w,{for:"firebase-user-action-reason"},{default:e.withCtx(()=>[...a[3]||(a[3]=[e.createTextVNode("Reason",-1)])]),_:1}),e.createVNode(x,{id:"firebase-user-action-reason",modelValue:i.value,"onUpdate:modelValue":a[0]||(a[0]=c=>i.value=c),rows:"3",maxlength:"500",placeholder:"Why is this change needed?",disabled:t.busy,onKeydown:[e.withKeys(e.withModifiers(d,["meta","prevent"]),["enter"]),e.withKeys(e.withModifiers(d,["ctrl","prevent"]),["enter"])]},null,8,["modelValue","disabled","onKeydown"]),a[4]||(a[4]=e.createElementVNode("p",{class:"text-xs text-muted-foreground"},"At least 3 characters; required for the Studio activity record.",-1))]),t.error?(e.openBlock(),e.createBlock(b,{key:0,variant:"destructive"},{default:e.withCtx(()=>[e.createVNode(e.unref(s.AlertTriangle)),e.createVNode(f,null,{default:e.withCtx(()=>[...a[5]||(a[5]=[e.createTextVNode("The action failed",-1)])]),_:1}),e.createVNode(p,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error),1)]),_:1})]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(N,{class:"gap-2 sm:justify-end"},{default:e.withCtx(()=>[e.createVNode(v,{variant:"outline",disabled:t.busy,onClick:y},{default:e.withCtx(()=>[...a[6]||(a[6]=[e.createTextVNode("Cancel",-1)])]),_:1},8,["disabled"]),e.createVNode(v,{variant:t.destructive?"destructive":"default",disabled:!l.value,onClick:d},{default:e.withCtx(()=>[t.busy?(e.openBlock(),e.createBlock(e.unref(s.Loader2),{key:0,class:"size-4 animate-spin"})):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.busy?"Working…":t.confirmLabel),1)]),_:1},8,["variant","disabled"])]),_:1})]),_:1})]),_:1},8,["open"])}}});function _(t,n){if(!t||typeof t!="object")return n;const o=t;return o.data?.statusMessage||o.data?.message||o.statusMessage||o.message||n}function S(t){return"user"in t?t.user:t}function U(t){return!!(t&&typeof t=="object"&&"auditRecorded"in t&&t.auditRecorded===!1)}function u(t){const n=new TextEncoder().encode(t);let o="";for(const r of n)o+=String.fromCharCode(r);return btoa(o).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function D(t){if(!/^[A-Za-z0-9_-]{1,1024}$/.test(t))throw new Error("Invalid Firebase UID token.");const n=t.replace(/-/g,"+").replace(/_/g,"/").padEnd(Math.ceil(t.length/4)*4,"="),o=atob(n),r=Uint8Array.from(o,l=>l.charCodeAt(0)),i=new TextDecoder("utf-8",{fatal:!0}).decode(r);if(!i||i.length>128||u(i)!==t)throw new Error("Invalid Firebase UID token.");return i}function M(t){return`user/${u(t)}`}function F(t){const n=Array.isArray(t)?t:String(t||"").split(",");return[...new Set(n.map(o=>o.trim()).filter(Boolean))]}function E(t){if(!t)return"Never";const n=new Date(t);return Number.isNaN(n.getTime())?"Unknown":new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}).format(n)}function I(t){return{password:"Email & password",phone:"Phone","google.com":"Google","apple.com":"Apple","facebook.com":"Facebook","github.com":"GitHub","microsoft.com":"Microsoft","twitter.com":"X / Twitter",anonymous:"Anonymous"}[t]||t}function j(t){return(t.displayName||t.email||t.phoneNumber||t.uid).split(/[\s@._+-]+/).filter(Boolean).slice(0,2).map(r=>r[0]?.toUpperCase()).join("")||"U"}exports._sfc_main=B;exports._sfc_main$1=R;exports.decodeFirebaseUid=D;exports.encodeFirebaseUid=u;exports.firebaseAuthUserPath=M;exports.formatFirebaseDate=E;exports.formatProvider=I;exports.getReadableError=_;exports.getUserInitials=j;exports.mutationAuditWasNotRecorded=U;exports.parseRoleOptions=F;exports.unwrapFirebaseAuthUser=S;
|