ono-react-element 0.0.11 → 0.0.13
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/LICENSE.md +21 -0
- package/dist/es/AutoSliderList-w9mw0JCN.js +30 -0
- package/dist/es/InjunctiveBox-DUNoNHCO.js +11 -0
- package/dist/es/{Input-Z3uL5-nj.js → Input-DLOeg2pz.js} +32 -32
- package/dist/es/Message-BGDILiLc.js +105 -0
- package/dist/es/{Modal-C-c_S_VM.js → Modal-BIFxRjSt.js} +10 -10
- package/dist/es/{Select-BXPk2P2w.js → Select-DAU6TuBu.js} +6 -6
- package/dist/es/{Switch-CN3M5pXb.js → Switch-CRJejHP9.js} +13 -13
- package/dist/es/{TemplateDialog-CO-4TmAd.js → TemplateDialog-dD8BcnbA.js} +11 -11
- package/dist/es/{Toast-BadlA1yD.js → Toast-CQEsbqUJ.js} +27 -27
- package/dist/es/{Tooltip-C5OFmxWo.js → Tooltip-j2AKREfX.js} +11 -11
- package/dist/es/VirtualList-w16-kBkT.js +65 -0
- package/dist/es/{Waterfall-a_c3urjB.js → Waterfall-CFVkuuCO.js} +17 -17
- package/dist/es/colorUtils.ts-DYuRvCXZ.js +145 -0
- package/dist/es/common.ts-DQOEx8k3.js +126 -0
- package/dist/es/fileFormatConversion.ts-tUlewYon.js +38 -0
- package/dist/es/formatTimeUtils.ts-CkdWJ_Sl.js +32 -0
- package/dist/es/index.js +96 -85
- package/dist/es/useClickOutSide.tsx-CMvd2uTW.js +15 -0
- package/dist/es/useCountdown.tsx-Btzj-keH.js +16 -0
- package/dist/es/useEventListener.tsx-BBGVcI5T.js +12 -0
- package/dist/es/useGetElementSize.tsx-Dtshth0Y.js +22 -0
- package/dist/es/useKeyPress.tsx-Db44HXXz.js +18 -0
- package/dist/es/useMouseClick.tsx-C7uAH4n4.js +12 -0
- package/dist/es/useTheme.tsx-C5b7BRYz.js +24 -0
- package/dist/es/useThemePro.tsx-DQuSI8J7.js +20 -0
- package/dist/es/viewTransitionUtils.ts-CHa9uBpi.js +19 -0
- package/dist/index.css +1 -1
- package/dist/style/Button.css +1 -1
- package/dist/style/Message.css +1 -1
- package/dist/style/Modal.css +1 -1
- package/dist/style/Toast.css +1 -1
- package/dist/style/index.css +1 -1
- package/dist/types/components/TemplateDialog/TemplateDialog.d.ts +1 -1
- package/dist/types/components/TemplateDialog/types.d.ts +1 -1
- package/dist/types/hooks/useClickOutSide.d.ts +2 -2
- package/dist/types/hooks/useCountdown.d.ts +2 -1
- package/dist/types/hooks/useEventListener.d.ts +2 -2
- package/dist/types/hooks/useGetElementSize.d.ts +2 -1
- package/dist/types/hooks/useKeyPress.d.ts +2 -2
- package/dist/types/hooks/useMouseClick.d.ts +9 -0
- package/dist/types/hooks/useTheme.d.ts +2 -2
- package/dist/types/hooks/useThemePro.d.ts +2 -2
- package/dist/types/index.d.ts +9 -2
- package/dist/umd/index.css +1 -1
- package/dist/umd/index.css.br +0 -0
- package/dist/umd/index.css.gz +0 -0
- package/dist/umd/index.umd.cjs +398 -392
- package/dist/umd/index.umd.cjs.br +0 -0
- package/dist/umd/index.umd.cjs.gz +0 -0
- package/package.json +3 -2
- package/dist/es/AutoSliderList-Dy-otnYu.js +0 -30
- package/dist/es/InjunctiveBox-D0V-K9Pn.js +0 -11
- package/dist/es/Message-GvTC61N0.js +0 -68
- package/dist/es/VirtualList-BeDq637Z.js +0 -65
- package/dist/es/hooks-Dew3_cmY.js +0 -103
- package/dist/es/utils-BxXROOPY.js +0 -394
- package/dist/types/hooks/index.d.ts +0 -7
package/dist/umd/index.umd.cjs
CHANGED
|
@@ -135,24 +135,7 @@
|
|
|
135
135
|
return i2(e3, t2, n3, true, 0, o3, l3 ? Error("react-stack-top-frame") : N2, l3 ? _2(a2(e3)) : L2);
|
|
136
136
|
};
|
|
137
137
|
})()), c)), s.exports);
|
|
138
|
-
const f = (e2
|
|
139
|
-
const { target: a2, deps: o2, isDeferred: l2 } = r2 || {}, i2 = (e3) => n2(e3);
|
|
140
|
-
return t.useEffect(() => ("string" == typeof e2 ? !l2 && (a2 || window).addEventListener(e2, i2) : e2.forEach((e3) => !l2 && (a2 || window).addEventListener(e3, i2)), () => {
|
|
141
|
-
"string" == typeof e2 ? (a2 || window).removeEventListener(e2, i2) : e2.forEach((e3) => (a2 || window).removeEventListener(e3, i2));
|
|
142
|
-
}), [a2, ...o2 || []]), l2 ? () => {
|
|
143
|
-
"string" == typeof e2 ? (a2 || window).addEventListener(e2, i2) : e2.forEach((e3) => (a2 || window).addEventListener(e3, i2));
|
|
144
|
-
} : void 0;
|
|
145
|
-
}, p = (e2, t2, n2) => f(((e3) => {
|
|
146
|
-
const t3 = "string" == typeof e3 ? [e3] : e3;
|
|
147
|
-
if (new Set(t3).size !== t3.length) throw new Error("there are duplicates in the event type");
|
|
148
|
-
return t3;
|
|
149
|
-
})((n2 == null ? void 0 : n2.event) || "click"), (n3) => {
|
|
150
|
-
if (e2) if (e2 instanceof Array) e2.map((e3) => e3 instanceof HTMLElement ? e3 : e3.current).some((e3) => !!e3 && e3.contains(n3.target)) || t2(n3);
|
|
151
|
-
else {
|
|
152
|
-
const r2 = e2 instanceof HTMLElement ? e2 : e2.current;
|
|
153
|
-
r2 && !r2.contains(n3.target) && t2(n3);
|
|
154
|
-
}
|
|
155
|
-
}, { deps: [e2, ...(n2 == null ? void 0 : n2.deps) || []] }), h = (e2) => {
|
|
138
|
+
const f = (e2) => {
|
|
156
139
|
const [n2, r2] = t.useState({ w: 0, h: 0 }), a2 = new ResizeObserver((e3) => {
|
|
157
140
|
for (const t2 of e3) r2({ w: t2.borderBoxSize[0].inlineSize, h: t2.borderBoxSize[0].blockSize });
|
|
158
141
|
}), o2 = () => {
|
|
@@ -169,55 +152,7 @@
|
|
|
169
152
|
a2.unobserve(t2 instanceof HTMLElement ? t2 : t2.current);
|
|
170
153
|
}
|
|
171
154
|
}), [e2]), n2;
|
|
172
|
-
},
|
|
173
|
-
const r2 = (r3) => f(r3, (r4) => ((e3, n3, r5) => {
|
|
174
|
-
e3.forEach((e4) => {
|
|
175
|
-
if (e4.includes("+") && e4.length > 1) {
|
|
176
|
-
const r6 = e4.split("+"), a2 = n3.ctrlKey && r6.includes("ctrl"), o2 = n3.shiftKey && r6.includes("shift"), l2 = n3.altKey && r6.includes("alt"), i2 = n3.metaKey && r6.includes("meta"), s2 = (n3.ctrlKey || n3.metaKey) && r6.includes("commandorcontrol");
|
|
177
|
-
2 === r6.length ? (a2 || o2 || l2 || i2 || s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4) : 3 === r6.length && (a2 && o2 || a2 && l2 || a2 && i2 || a2 && s2 || o2 && l2 || o2 && i2 || o2 && s2 || l2 && i2 || l2 && s2 || i2 && s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4);
|
|
178
|
-
} else if (e4.includes(m(n3.key))) {
|
|
179
|
-
if (r5) e4 === m(n3.key) && t2(n3, e4);
|
|
180
|
-
else if (!(n3.ctrlKey || n3.metaKey || n3.shiftKey || n3.altKey)) return t2(n3, e4);
|
|
181
|
-
}
|
|
182
|
-
});
|
|
183
|
-
})(e2 instanceof Array ? e2.map((e3) => m(e3)) : [m(e2)], r4, (n2 == null ? void 0 : n2.exactMatch) || false), { deps: [n2 == null ? void 0 : n2.target, ...(n2 == null ? void 0 : n2.deps) || []] });
|
|
184
|
-
(n2 == null ? void 0 : n2.events) instanceof Array ? n2.events.forEach((e3) => r2(e3)) : r2((n2 == null ? void 0 : n2.events) || "keydown");
|
|
185
|
-
};
|
|
186
|
-
let y = false;
|
|
187
|
-
const b = ({ theme: e2, onDark: n2, onLight: r2 }) => {
|
|
188
|
-
const a2 = window.matchMedia("(prefers-color-scheme: dark)"), o2 = () => {
|
|
189
|
-
a2.matches ? n2() : r2();
|
|
190
|
-
};
|
|
191
|
-
t.useEffect(() => {
|
|
192
|
-
(() => {
|
|
193
|
-
switch (y && (y = false, a2.removeEventListener("change", o2)), e2) {
|
|
194
|
-
case "light":
|
|
195
|
-
r2();
|
|
196
|
-
break;
|
|
197
|
-
case "dark":
|
|
198
|
-
n2();
|
|
199
|
-
break;
|
|
200
|
-
default:
|
|
201
|
-
o2(), y = true, a2.addEventListener("change", o2);
|
|
202
|
-
}
|
|
203
|
-
})();
|
|
204
|
-
}, [e2]);
|
|
205
|
-
}, v = (e2) => {
|
|
206
|
-
const t2 = "ono-view-transition-clip-path-circle", { element: n2, duration: r2 = 300, themeRules: a2, onChangeTheme: o2 } = e2, l2 = (a2 == null ? void 0 : a2()) || document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
207
|
-
if (!document.startViewTransition) return o2("dark" === l2 ? "light" : "dark");
|
|
208
|
-
const i2 = document.startViewTransition(() => {
|
|
209
|
-
const e3 = document.documentElement.classList.contains("dark");
|
|
210
|
-
o2(e3 ? "light" : "dark");
|
|
211
|
-
}), { top: s2, left: u2, width: c2, height: d2 } = n2.getBoundingClientRect(), f2 = u2 + c2 / 2, p2 = s2 + d2 / 2, h2 = [`circle(0% at ${f2}px ${p2}px)`, `circle(${Math.hypot(Math.max(f2, window.innerWidth - f2), Math.max(p2, window.innerHeight - p2))}px at ${f2}px ${p2}px)`];
|
|
212
|
-
((e3, t3) => {
|
|
213
|
-
const n3 = document.createElement("style");
|
|
214
|
-
n3.setAttribute("type", "text/css"), n3.setAttribute("data-style-tag", t3), n3.textContent = "\n ::view-transition-old(root),\n ::view-transition-new(root) {\n animation: none;\n }\n .dark::view-transition-old(root) {\n z-index: 1;\n }\n\n .dark::view-transition-new(root) {\n z-index: 999;\n }\n\n ::view-transition-old(root) {\n z-index: 999;\n }\n\n ::view-transition-new(root) {\n z-index: 1;\n }\n ", document.head.appendChild(n3);
|
|
215
|
-
})(0, t2), i2.ready.then(() => {
|
|
216
|
-
document.documentElement.animate({ clipPath: "light" === l2 ? h2 : h2.reverse() }, { duration: r2, easing: "ease-in-out", pseudoElement: "light" === l2 ? "::view-transition-new(root)" : "::view-transition-old(root)" }), setTimeout(() => ((e3) => {
|
|
217
|
-
document.head.querySelectorAll("style").forEach((t3) => t3.getAttribute("data-style-tag") === e3 && t3.remove());
|
|
218
|
-
})(t2), r2 + 100);
|
|
219
|
-
});
|
|
220
|
-
}, k = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+])[\da-zA-Z]{8,}$/, w = (e2) => e2 <= 11 ? Math.random().toString(36).substring(2, 2 + e2).padEnd(e2, "0") : w(11) + w(e2 - 11), S = ({ el: e2, str: t2 = "hello world", speed: n2 = 100, isExtendStr: r2 = true, onDone: a2 }) => {
|
|
155
|
+
}, p = /^(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[!@#$%^&*()_+])[\da-zA-Z]{8,}$/, h = (e2) => e2 <= 11 ? Math.random().toString(36).substring(2, 2 + e2).padEnd(e2, "0") : h(11) + h(e2 - 11), m = ({ el: e2, str: t2 = "hello world", speed: n2 = 100, isExtendStr: r2 = true, onDone: a2 }) => {
|
|
221
156
|
let o2 = 0, l2 = null;
|
|
222
157
|
e2.textContent && r2 && (o2 = e2.textContent.length, t2 = e2.textContent + t2);
|
|
223
158
|
const i2 = () => {
|
|
@@ -226,7 +161,7 @@
|
|
|
226
161
|
e2.textContent = r3, o2++, o2 !== t2.length ? l2 = setTimeout(i2, n2) : a2 && a2();
|
|
227
162
|
};
|
|
228
163
|
i2();
|
|
229
|
-
},
|
|
164
|
+
}, g = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent), y = async (e2, t2) => {
|
|
230
165
|
const n2 = (e3, t3) => {
|
|
231
166
|
const n3 = window.URL.createObjectURL(e3), r2 = document.createElement("a");
|
|
232
167
|
r2.href = n3, r2.download = encodeURIComponent(t3), document.body.appendChild(r2), r2.click(), document.body.removeChild(r2), window.URL.revokeObjectURL(n3);
|
|
@@ -240,78 +175,78 @@
|
|
|
240
175
|
} catch (e3) {
|
|
241
176
|
console.error("文件下载失败:", e3 instanceof Error ? e3.message : String(e3));
|
|
242
177
|
}
|
|
243
|
-
},
|
|
178
|
+
}, b = (e2, t2) => {
|
|
244
179
|
e2.toString().startsWith("2") ? t2.onSuccess && t2.onSuccess() : (e2.toString().startsWith("4") || e2.toString().startsWith("5")) && t2.onFail && t2.onFail();
|
|
245
|
-
},
|
|
180
|
+
}, v = (e2) => {
|
|
246
181
|
const t2 = e2.getBoundingClientRect();
|
|
247
182
|
return { x: t2.left + t2.width / 2, y: t2.top + t2.height / 2 };
|
|
248
|
-
},
|
|
183
|
+
}, k = (e2, t2, n2) => {
|
|
249
184
|
const r2 = new IntersectionObserver(t2, n2);
|
|
250
185
|
e2 instanceof HTMLElement ? r2.observe(e2) : e2.forEach((e3) => r2.observe(e3));
|
|
251
|
-
},
|
|
186
|
+
}, w = (e2) => {
|
|
252
187
|
const t2 = Math.floor(e2 / 3600), n2 = Math.floor(e2 % 3600 / 60), r2 = Math.floor(e2 % 60), a2 = (e3) => e3.toString().padStart(2, "0");
|
|
253
188
|
return (t2 > 0 ? `${a2(t2)}:${a2(n2)}:${a2(r2)}` : `${a2(n2)}:${a2(r2)}`) + (e2 < 10 ? ".00" : e2 < 100 ? ".0" : "");
|
|
254
|
-
},
|
|
189
|
+
}, S = (e2) => {
|
|
255
190
|
if (e2.length < 2) return e2;
|
|
256
191
|
const t2 = e2[0], n2 = e2.slice(1).filter((e3) => e3 <= t2), r2 = e2.slice(1).filter((e3) => e3 > t2);
|
|
257
|
-
return [...
|
|
258
|
-
},
|
|
192
|
+
return [...S(n2), t2, ...S(r2)];
|
|
193
|
+
}, x = (e2, t2) => {
|
|
259
194
|
const n2 = ["B", "KB", "MB", "GB", "TB"], r2 = 1024;
|
|
260
195
|
let a2 = n2.indexOf((t2 == null ? void 0 : t2.unit) ?? "B");
|
|
261
196
|
if (-1 === a2) throw new Error("Invalid unit");
|
|
262
197
|
if (!(t2 == null ? void 0 : t2.unit)) for (; e2 / Math.pow(r2, a2) >= r2; ) a2++;
|
|
263
198
|
return `${(e2 / Math.pow(r2, a2)).toFixed((t2 == null ? void 0 : t2.decimalPlaces) ?? 0)} ${n2[a2]}`;
|
|
264
|
-
},
|
|
199
|
+
}, C = (e2, t2) => `${Math.floor(e2 / E(e2, t2))}:${Math.floor(t2 / E(e2, t2))}`, E = (e2, t2) => {
|
|
265
200
|
for (; 0 !== t2; ) {
|
|
266
201
|
const n2 = t2;
|
|
267
202
|
t2 = e2 % t2, e2 = n2;
|
|
268
203
|
}
|
|
269
204
|
return e2;
|
|
270
|
-
},
|
|
205
|
+
}, T = (e2, t2, n2) => {
|
|
271
206
|
e2.muted = true, e2.play();
|
|
272
207
|
const r2 = new AudioContext(), a2 = "running" === r2.state;
|
|
273
208
|
r2.close(), a2 ? (e2.muted = false, t2 == null ? void 0 : t2()) : n2 == null ? void 0 : n2();
|
|
274
|
-
},
|
|
209
|
+
}, P = (e2) => new URLSearchParams(window.location.search).get(e2), z = (e2) => {
|
|
275
210
|
let t2;
|
|
276
211
|
const n2 = new Proxy(e2, { construct: (e3, n3) => (t2 || (t2 = Reflect.construct(e3, n3)), t2) });
|
|
277
212
|
return n2.prototype.construct = n2, n2;
|
|
278
|
-
},
|
|
213
|
+
}, _ = (e2) => "string" != typeof e2 || 0 === e2.length ? "" : e2.charAt(0).toUpperCase() + e2.slice(1), R = (e2) => {
|
|
279
214
|
if ("object" != typeof e2 || null === e2) return e2;
|
|
280
215
|
const t2 = Array.isArray(e2) ? [] : {};
|
|
281
|
-
for (const n2 in e2) Object.prototype.hasOwnProperty.call(e2, n2) && (t2[n2] =
|
|
216
|
+
for (const n2 in e2) Object.prototype.hasOwnProperty.call(e2, n2) && (t2[n2] = R(e2[n2]));
|
|
282
217
|
return t2;
|
|
283
|
-
},
|
|
218
|
+
}, N = (e2) => new Promise((t2) => {
|
|
284
219
|
const n2 = new Image();
|
|
285
220
|
n2.src = "string" == typeof e2 ? e2 : URL.createObjectURL(e2), n2.onload = () => t2({ width: n2.width, height: n2.height });
|
|
286
|
-
}),
|
|
221
|
+
}), L = (e2, t2) => {
|
|
287
222
|
let n2 = 0;
|
|
288
223
|
const r2 = (a2) => {
|
|
289
224
|
n2 || (n2 = a2), a2 - n2 >= t2 ? e2() : requestAnimationFrame(r2);
|
|
290
225
|
};
|
|
291
226
|
requestAnimationFrame(r2);
|
|
292
|
-
},
|
|
227
|
+
}, D = (e2, t2, n2) => {
|
|
293
228
|
const r2 = e2[t2];
|
|
294
229
|
e2[t2] = function(e3) {
|
|
295
230
|
r2 && "function" == typeof r2 && r2.call(this, e3), n2.call(this, e3);
|
|
296
231
|
};
|
|
297
|
-
},
|
|
232
|
+
}, O = (e2) => {
|
|
298
233
|
if ("number" != typeof e2 || isNaN(e2)) throw new Error("请输入有效的数字");
|
|
299
234
|
const t2 = e2.toString().split(".");
|
|
300
235
|
return t2[0] = t2[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","), t2.join(".");
|
|
301
|
-
},
|
|
236
|
+
}, M = (e2) => parseFloat(e2.replace(/[^0-9.]/g, "")), F = (e2, t2, n2, r2) => Math.sqrt((e2 - n2) ** 2 + (t2 - r2) ** 2), I = (e2) => navigator.clipboard.writeText(e2), A = (e2) => Math.ceil((e2.getTime() - new Date(e2.getFullYear(), 0, 1).getTime()) / 864e5), j = (e2, t2, n2) => 0.2126 * e2 + 0.7152 * t2 + 0.0722 * n2, U = (e2) => {
|
|
302
237
|
const t2 = {};
|
|
303
238
|
return e2.replace(/([^?=&]+)=([^&]+)/g, (e3, n2, r2) => t2[n2] = r2), t2;
|
|
304
|
-
},
|
|
239
|
+
}, H = (e2, ...t2) => Object.fromEntries(Object.entries(e2).filter(([e3]) => t2.includes(e3))), B = (e2) => {
|
|
305
240
|
if (!e2) return "";
|
|
306
241
|
const t2 = e2.lastIndexOf(".");
|
|
307
|
-
return -1 === t2 ?
|
|
308
|
-
},
|
|
242
|
+
return -1 === t2 ? B(e2.substring(e2.lastIndexOf("/") + 1)) : e2.substring(0, t2);
|
|
243
|
+
}, W = (e2) => {
|
|
309
244
|
if (!e2) return "";
|
|
310
245
|
const t2 = e2.lastIndexOf(".");
|
|
311
246
|
return e2.substring(t2 + 1);
|
|
312
|
-
},
|
|
313
|
-
var
|
|
314
|
-
const
|
|
247
|
+
}, $ = { addCommasToNumber: O, addEventWithOriginHandler: D, calculateAspectRatio: C, checkDeviceIsMobile: g, checkStatusCode: b, copy2Clipboard: I, createIntersectionObserver: k, dayOfYear: A, deepCopy: R, downloadFile: y, formatFileSize: x, formatSecondes: w, getElementCenterPosition: v, getFileName: B, getFileSuffix: W, getImageSIze: N, getPointDistance: F, getURLSearchParams: P, grayColor: j, mediaAutoplayPolicies: T, parseQuery: U, passwordStrength: p, pick: H, printStr: m, pureNumber: M, quickSort: S, rafTimeout: L, randomString: h, safeCapitalizeWord: _, singleton: z };
|
|
248
|
+
var V = ((e2) => (e2.Horizontal = "Horizontal", e2.Vertical = "Vertical", e2))(V || {});
|
|
249
|
+
const q = ({ imageFile: e2, cvsW: n2 = 520, maskBG: r2 = "rgba(0, 0, 0, 0.5)", border: a2 = "4px solid #fff", wheelScale: o2 = 0.1, setCtx: l2, maskInfo: i2, setMaskInfo: s2, imageStartState: u2, setImageStartState: c2, imageState: f2, setImageState: p2 }) => {
|
|
315
250
|
const [h2, m2] = t.useState(), [g2, y2] = t.useState({ w: 0, h: 0 }), [b2, v2] = t.useState({ w: 0, h: 0 }), [k2, w2] = t.useState({ x: 0, y: 0 }), [S2, x2] = t.useState(false), C2 = t.useRef(null), E2 = t.useRef(null), T2 = (e3, t2) => {
|
|
316
251
|
t2((t3) => ({ ...t3, ...e3 }));
|
|
317
252
|
}, P2 = () => {
|
|
@@ -357,7 +292,7 @@
|
|
|
357
292
|
(Math.abs(t2) > 10 || Math.abs(n3) > 10) && (T2({ t: f2.t + n3, l: f2.l + t2 }, p2), T2({ x: e3.clientX, y: e3.clientY }, w2));
|
|
358
293
|
}
|
|
359
294
|
} }), h2 && d.jsx("div", { className: "ono-avatar-mask", children: d.jsx("div", { style: { border: a2, boxShadow: `${r2} 0 0 0 10000px`, width: `${i2.w + 2 * P2()}px`, height: `${i2.w + 2 * P2()}px` } }) })] });
|
|
360
|
-
},
|
|
295
|
+
}, Q = () => d.jsx("svg", { className: "ono-input-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.jsx("path", { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" }) }), Y = ({ open: e2 }) => d.jsx("svg", { viewBox: "64 64 896 896", focusable: "false", "data-icon": e2 ? "eye" : "eye-invisible", fill: "currentColor", "aria-hidden": "true", className: "ono-input-icon", children: e2 ? d.jsx("path", { d: "M942.2 486.2C847.4 286.5 704.1 186 512 186c-192.2 0-335.4 100.5-430.2 300.3a60.3 60.3 0 000 51.5C176.6 737.5 319.9 838 512 838c192.2 0 335.4-100.5 430.2-300.3 7.7-16.2 7.7-35 0-51.5zM512 766c-161.3 0-279.4-81.8-362.7-254C232.6 339.8 350.7 258 512 258c161.3 0 279.4 81.8 362.7 254C791.5 684.2 673.4 766 512 766zm-4-430c-97.2 0-176 78.8-176 176s78.8 176 176 176 176-78.8 176-176-78.8-176-176-176zm0 288c-61.9 0-112-50.1-112-112s50.1-112 112-112 112 50.1 112 112-50.1 112-112 112z" }) : d.jsxs(d.Fragment, { children: [d.jsx("path", { d: "M942.2 486.2Q889.47 375.11 816.7 305l-50.88 50.88C807.31 395.53 843.45 447.4 874.7 512 791.5 684.2 673.4 766 512 766q-72.67 0-133.87-22.38L323 798.75Q408 838 512 838q288.3 0 430.2-300.3a60.29 60.29 0 000-51.5zm-63.57-320.64L836 122.88a8 8 0 00-11.32 0L715.31 232.2Q624.86 186 512 186q-288.3 0-430.2 300.3a60.3 60.3 0 000 51.5q56.69 119.4 136.5 191.41L112.48 835a8 8 0 000 11.31L155.17 889a8 8 0 0011.31 0l712.15-712.12a8 8 0 000-11.32zM149.3 512C232.6 339.8 350.7 258 512 258c54.54 0 104.13 9.36 149.12 28.39l-70.3 70.3a176 176 0 00-238.13 238.13l-83.42 83.42C223.1 637.49 183.3 582.28 149.3 512zm246.7 0a112.11 112.11 0 01146.2-106.69L401.31 546.2A112 112 0 01396 512z" }), d.jsx("path", { d: "M508 624c-3.46 0-6.87-.16-10.25-.47l-52.82 52.82a176.09 176.09 0 00227.42-227.42l-52.82 52.82c.31 3.38.47 6.79.47 10.25a111.94 111.94 0 01-112 112z" })] }) }), K = ({ id: e2, name: n2, max: r2, min: a2, maxLength: o2, minLength: l2, type: i2 = "text", className: s2, defaultValue: u2, placeholder: c2, readonly: f2, autocomplete: p2 = "off", autofocus: h2, form: m2, disabled: g2, clearable: y2, showPassword: b2, prepend: v2, append: k2, prefix: w2, suffix: S2, showCount: x2, border: C2 = "1px solid #5644b8", boxShadow: E2 = "0 0 0 2px #7969d11a", value: T2 = "", onChange: P2, onFocus: z2, onBlur: _2, onClear: R2 }) => {
|
|
361
296
|
const [N2, L2] = t.useState(T2), [D2, O2] = t.useState(false), [M2, F2] = t.useState(false), I2 = t.useRef(null), A2 = y2 && !g2 && N2, j2 = b2 && !g2;
|
|
362
297
|
return t.useEffect(() => {
|
|
363
298
|
I2.current && (I2.current.style.setProperty("--ono-input-border", C2), I2.current.style.setProperty("--ono-input-box-shadow", E2));
|
|
@@ -373,14 +308,34 @@
|
|
|
373
308
|
P2 == null ? void 0 : P2(e3), L2(e3.target.value);
|
|
374
309
|
} }), (S2 || A2 || j2 || x2) && d.jsxs("span", { className: "ono-suffix", children: [S2, A2 && d.jsx("button", { className: "ono-clear-icon", onClick: () => {
|
|
375
310
|
R2 == null ? void 0 : R2(), L2("");
|
|
376
|
-
}, children: d.jsx(
|
|
377
|
-
},
|
|
311
|
+
}, children: d.jsx(Q, {}) }), j2 && d.jsx("button", { className: "ono-eye-icon", onClick: () => F2(!M2), children: d.jsx(Y, { open: M2 }) }), x2 && o2 && d.jsxs("p", { className: "ono-count", children: [N2.length, "/", o2] })] })] }), k2 && d.jsx("div", { className: "ono-append", children: k2 })] });
|
|
312
|
+
}, X = (e2, n2, r2) => {
|
|
313
|
+
const { target: a2, deps: o2, isDeferred: l2 } = r2 || {}, i2 = (e3) => n2(e3);
|
|
314
|
+
return t.useEffect(() => ("string" == typeof e2 ? !l2 && (a2 || window).addEventListener(e2, i2) : e2.forEach((e3) => !l2 && (a2 || window).addEventListener(e3, i2)), () => {
|
|
315
|
+
"string" == typeof e2 ? (a2 || window).removeEventListener(e2, i2) : e2.forEach((e3) => (a2 || window).removeEventListener(e3, i2));
|
|
316
|
+
}), [a2, ...o2 || []]), l2 ? () => {
|
|
317
|
+
"string" == typeof e2 ? (a2 || window).addEventListener(e2, i2) : e2.forEach((e3) => (a2 || window).addEventListener(e3, i2));
|
|
318
|
+
} : void 0;
|
|
319
|
+
}, G = (e2) => e2.toString().toLocaleLowerCase(), Z = (e2, t2, n2) => {
|
|
320
|
+
const r2 = (r3) => X(r3, (r4) => ((e3, n3, r5) => {
|
|
321
|
+
e3.forEach((e4) => {
|
|
322
|
+
if (e4.includes("+") && e4.length > 1) {
|
|
323
|
+
const r6 = e4.split("+"), a2 = n3.ctrlKey && r6.includes("ctrl"), o2 = n3.shiftKey && r6.includes("shift"), l2 = n3.altKey && r6.includes("alt"), i2 = n3.metaKey && r6.includes("meta"), s2 = (n3.ctrlKey || n3.metaKey) && r6.includes("commandorcontrol");
|
|
324
|
+
2 === r6.length ? (a2 || o2 || l2 || i2 || s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4) : 3 === r6.length && (a2 && o2 || a2 && l2 || a2 && i2 || a2 && s2 || o2 && l2 || o2 && i2 || o2 && s2 || l2 && i2 || l2 && s2 || i2 && s2) && n3.key.toLocaleLowerCase() === r6[r6.length - 1] && t2(n3, e4);
|
|
325
|
+
} else if (e4.includes(G(n3.key))) {
|
|
326
|
+
if (r5) e4 === G(n3.key) && t2(n3, e4);
|
|
327
|
+
else if (!(n3.ctrlKey || n3.metaKey || n3.shiftKey || n3.altKey)) return t2(n3, e4);
|
|
328
|
+
}
|
|
329
|
+
});
|
|
330
|
+
})(e2 instanceof Array ? e2.map((e3) => G(e3)) : [G(e2)], r4, (n2 == null ? void 0 : n2.exactMatch) || false), { deps: [n2 == null ? void 0 : n2.target, ...(n2 == null ? void 0 : n2.deps) || []] });
|
|
331
|
+
(n2 == null ? void 0 : n2.events) instanceof Array ? n2.events.forEach((e3) => r2(e3)) : r2((n2 == null ? void 0 : n2.events) || "keydown");
|
|
332
|
+
}, J = ({ list: e2, children: t2, fallback: n2, insertBetweenDom: r2 }) => (() => {
|
|
378
333
|
const a2 = "function" == typeof e2 ? e2() : e2;
|
|
379
334
|
return a2.length > 0 ? ((e3, t3) => t3 ? e3.reduce((n3, r3, a3) => (n3.push(r3), a3 < e3.length - 1 && n3.push(t3(a3)), n3), []) : e3)(((e3) => e3.map(t2).filter(Boolean))(a2), r2) : n2;
|
|
380
335
|
})();
|
|
381
|
-
var
|
|
382
|
-
function
|
|
383
|
-
return
|
|
336
|
+
var ee, te, ne, re, ae = { exports: {} }, oe = {}, le = { exports: {} }, ie = {}, se = {};
|
|
337
|
+
function ue() {
|
|
338
|
+
return ne || (ne = 1, "production" === process.env.NODE_ENV ? le.exports = (ee || (ee = 1, (function(e2) {
|
|
384
339
|
function t2(e3, t3) {
|
|
385
340
|
var n3 = e3.length;
|
|
386
341
|
e3.push(t3);
|
|
@@ -577,7 +532,7 @@
|
|
|
577
532
|
}
|
|
578
533
|
};
|
|
579
534
|
};
|
|
580
|
-
})(
|
|
535
|
+
})(ie)), ie) : le.exports = (te || (te = 1, (function(e2) {
|
|
581
536
|
"production" !== process.env.NODE_ENV && (function() {
|
|
582
537
|
function t2() {
|
|
583
538
|
if (w2 = false, E2) {
|
|
@@ -775,7 +730,7 @@
|
|
|
775
730
|
};
|
|
776
731
|
}, "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
777
732
|
})();
|
|
778
|
-
})(
|
|
733
|
+
})(se)), se)), le.exports;
|
|
779
734
|
}
|
|
780
735
|
/**
|
|
781
736
|
* @license React
|
|
@@ -786,7 +741,7 @@
|
|
|
786
741
|
* This source code is licensed under the MIT license found in the
|
|
787
742
|
* LICENSE file in the root directory of this source tree.
|
|
788
743
|
*/
|
|
789
|
-
var
|
|
744
|
+
var ce, de, fe = {};
|
|
790
745
|
/**
|
|
791
746
|
* @license React
|
|
792
747
|
* react-dom-client.development.js
|
|
@@ -796,7 +751,7 @@
|
|
|
796
751
|
* This source code is licensed under the MIT license found in the
|
|
797
752
|
* LICENSE file in the root directory of this source tree.
|
|
798
753
|
*/
|
|
799
|
-
const
|
|
754
|
+
const pe = a((de || (de = 1, "production" === process.env.NODE_ENV ? ((function e2() {
|
|
800
755
|
if ("undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE) {
|
|
801
756
|
if ("production" !== process.env.NODE_ENV) throw new Error("^_^");
|
|
802
757
|
try {
|
|
@@ -805,10 +760,10 @@
|
|
|
805
760
|
console.error(e3);
|
|
806
761
|
}
|
|
807
762
|
}
|
|
808
|
-
})(),
|
|
809
|
-
if (
|
|
810
|
-
|
|
811
|
-
var e2 =
|
|
763
|
+
})(), ae.exports = (function() {
|
|
764
|
+
if (re) return oe;
|
|
765
|
+
re = 1;
|
|
766
|
+
var e2 = ue(), r2 = t, a2 = n;
|
|
812
767
|
function o2(e3) {
|
|
813
768
|
var t2 = "https://react.dev/errors/" + e3;
|
|
814
769
|
if (1 < arguments.length) {
|
|
@@ -937,10 +892,10 @@
|
|
|
937
892
|
function Y2(e3) {
|
|
938
893
|
B2.current === e3 && (j2(H2), j2(B2)), $2.current === e3 && (j2($2), Xd._currentValue = M2);
|
|
939
894
|
}
|
|
940
|
-
var K2 = Object.prototype.hasOwnProperty, X2 = e2.unstable_scheduleCallback, G2 = e2.unstable_cancelCallback, Z2 = e2.unstable_shouldYield, J2 = e2.unstable_requestPaint, ee2 = e2.unstable_now, te2 = e2.unstable_getCurrentPriorityLevel, ne2 = e2.unstable_ImmediatePriority,
|
|
895
|
+
var K2 = Object.prototype.hasOwnProperty, X2 = e2.unstable_scheduleCallback, G2 = e2.unstable_cancelCallback, Z2 = e2.unstable_shouldYield, J2 = e2.unstable_requestPaint, ee2 = e2.unstable_now, te2 = e2.unstable_getCurrentPriorityLevel, ne2 = e2.unstable_ImmediatePriority, ae2 = e2.unstable_UserBlockingPriority, le2 = e2.unstable_NormalPriority, ie2 = e2.unstable_LowPriority, se2 = e2.unstable_IdlePriority, ce2 = e2.log, de2 = e2.unstable_setDisableYieldValue, fe2 = null, pe2 = null;
|
|
941
896
|
function he2(e3) {
|
|
942
|
-
if ("function" == typeof
|
|
943
|
-
|
|
897
|
+
if ("function" == typeof ce2 && de2(e3), pe2 && "function" == typeof pe2.setStrictMode) try {
|
|
898
|
+
pe2.setStrictMode(fe2, e3);
|
|
944
899
|
} catch (e4) {
|
|
945
900
|
}
|
|
946
901
|
}
|
|
@@ -4252,8 +4207,8 @@
|
|
|
4252
4207
|
for (n2 = n2.child; null !== n2; ) Ns(e3, t2, n2), n2 = n2.sibling;
|
|
4253
4208
|
}
|
|
4254
4209
|
function Ns(e3, t2, n2) {
|
|
4255
|
-
if (
|
|
4256
|
-
|
|
4210
|
+
if (pe2 && "function" == typeof pe2.onCommitFiberUnmount) try {
|
|
4211
|
+
pe2.onCommitFiberUnmount(fe2, n2);
|
|
4257
4212
|
} catch (e4) {
|
|
4258
4213
|
}
|
|
4259
4214
|
switch (n2.tag) {
|
|
@@ -5218,7 +5173,7 @@
|
|
|
5218
5173
|
n3 &= ~d3;
|
|
5219
5174
|
}
|
|
5220
5175
|
0 !== r4 && ze2(e4, r4, 0), 0 !== o3 && 0 === a4 && 0 !== e4.tag && (e4.suspendedLanes |= o3 & ~(l4 & ~t3));
|
|
5221
|
-
})(e3, n2, l3 |= _r, i3, s3, u3), e3 === ou && (lu = ou = null, iu = 0), _u = t2, zu = e3, Ru = n2, Nu = l3, Lu = a3, Du = r3, 10256 & t2.subtreeFlags || 10256 & t2.flags ? (e3.callbackNode = null, e3.callbackPriority = 0, X2(
|
|
5176
|
+
})(e3, n2, l3 |= _r, i3, s3, u3), e3 === ou && (lu = ou = null, iu = 0), _u = t2, zu = e3, Ru = n2, Nu = l3, Lu = a3, Du = r3, 10256 & t2.subtreeFlags || 10256 & t2.flags ? (e3.callbackNode = null, e3.callbackPriority = 0, X2(le2, function() {
|
|
5222
5177
|
return cc(), null;
|
|
5223
5178
|
})) : (e3.callbackNode = null, e3.callbackPriority = 0), r3 = !!(13878 & t2.flags), 13878 & t2.subtreeFlags || r3) {
|
|
5224
5179
|
r3 = D2.T, D2.T = null, a3 = O2.p, O2.p = 2, i3 = au, au |= 4;
|
|
@@ -5377,8 +5332,8 @@
|
|
|
5377
5332
|
var e3 = zu, t2 = _u, n2 = Ru, r3 = Du;
|
|
5378
5333
|
10256 & t2.subtreeFlags || 10256 & t2.flags ? Pu = 5 : (Pu = 0, _u = zu = null, sc(e3, e3.pendingLanes));
|
|
5379
5334
|
var a3 = e3.pendingLanes;
|
|
5380
|
-
if (0 === a3 && (Tu = null), Ne2(n2), t2 = t2.stateNode,
|
|
5381
|
-
|
|
5335
|
+
if (0 === a3 && (Tu = null), Ne2(n2), t2 = t2.stateNode, pe2 && "function" == typeof pe2.onCommitFiberRoot) try {
|
|
5336
|
+
pe2.onCommitFiberRoot(fe2, t2, void 0, !(128 & ~t2.current.flags));
|
|
5382
5337
|
} catch (e4) {
|
|
5383
5338
|
}
|
|
5384
5339
|
if (null !== r3) {
|
|
@@ -5411,8 +5366,8 @@
|
|
|
5411
5366
|
var l3 = zu, i3 = Ru;
|
|
5412
5367
|
if (Pu = 0, _u = zu = null, Ru = 0, 6 & au) throw Error(o2(331));
|
|
5413
5368
|
var s3 = au;
|
|
5414
|
-
if (au |= 4, Js(l3.current), Vs(l3, l3.current, i3, n2), au = s3, Ec(0),
|
|
5415
|
-
|
|
5369
|
+
if (au |= 4, Js(l3.current), Vs(l3, l3.current, i3, n2), au = s3, Ec(0), pe2 && "function" == typeof pe2.onPostCommitFiberRoot) try {
|
|
5370
|
+
pe2.onPostCommitFiberRoot(fe2, l3);
|
|
5416
5371
|
} catch (e4) {
|
|
5417
5372
|
}
|
|
5418
5373
|
return true;
|
|
@@ -5528,14 +5483,14 @@
|
|
|
5528
5483
|
switch (null !== r3 && G2(r3), Ne2(n2)) {
|
|
5529
5484
|
case 2:
|
|
5530
5485
|
case 8:
|
|
5531
|
-
n2 =
|
|
5486
|
+
n2 = ae2;
|
|
5532
5487
|
break;
|
|
5533
5488
|
case 32:
|
|
5534
5489
|
default:
|
|
5535
|
-
n2 =
|
|
5490
|
+
n2 = le2;
|
|
5536
5491
|
break;
|
|
5537
5492
|
case 268435456:
|
|
5538
|
-
n2 =
|
|
5493
|
+
n2 = se2;
|
|
5539
5494
|
}
|
|
5540
5495
|
return r3 = _c.bind(null, e3), n2 = X2(n2, r3), e3.callbackPriority = t2, e3.callbackNode = n2, t2;
|
|
5541
5496
|
}
|
|
@@ -6819,12 +6774,12 @@
|
|
|
6819
6774
|
switch (te2()) {
|
|
6820
6775
|
case ne2:
|
|
6821
6776
|
return 2;
|
|
6822
|
-
case re2:
|
|
6823
|
-
return 8;
|
|
6824
6777
|
case ae2:
|
|
6825
|
-
|
|
6826
|
-
return 32;
|
|
6778
|
+
return 8;
|
|
6827
6779
|
case le2:
|
|
6780
|
+
case ie2:
|
|
6781
|
+
return 32;
|
|
6782
|
+
case se2:
|
|
6828
6783
|
return 268435456;
|
|
6829
6784
|
default:
|
|
6830
6785
|
return 32;
|
|
@@ -7039,20 +6994,20 @@
|
|
|
7039
6994
|
if ("undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
|
7040
6995
|
var Mf = __REACT_DEVTOOLS_GLOBAL_HOOK__;
|
|
7041
6996
|
if (!Mf.isDisabled && Mf.supportsFiber) try {
|
|
7042
|
-
|
|
6997
|
+
fe2 = Mf.inject(Of), pe2 = Mf;
|
|
7043
6998
|
} catch (e3) {
|
|
7044
6999
|
}
|
|
7045
7000
|
}
|
|
7046
|
-
return
|
|
7001
|
+
return oe.createRoot = function(e3, t2) {
|
|
7047
7002
|
if (!l2(e3)) throw Error(o2(299));
|
|
7048
7003
|
var n2 = false, r3 = "", a3 = ki, i3 = wi, s3 = Si;
|
|
7049
7004
|
return null != t2 && (true === t2.unstable_strictMode && (n2 = true), void 0 !== t2.identifierPrefix && (r3 = t2.identifierPrefix), void 0 !== t2.onUncaughtError && (a3 = t2.onUncaughtError), void 0 !== t2.onCaughtError && (i3 = t2.onCaughtError), void 0 !== t2.onRecoverableError && (s3 = t2.onRecoverableError), void 0 !== t2.unstable_transitionCallbacks && t2.unstable_transitionCallbacks), t2 = Zd(e3, 1, false, null, 0, n2, r3, a3, i3, s3, 0, null), e3[Fe2] = t2.current, Bc(e3), new Nf(t2);
|
|
7050
|
-
},
|
|
7005
|
+
}, oe.hydrateRoot = function(e3, t2, n2) {
|
|
7051
7006
|
if (!l2(e3)) throw Error(o2(299));
|
|
7052
7007
|
var r3 = false, a3 = "", i3 = ki, s3 = wi, u3 = Si, c3 = null;
|
|
7053
7008
|
return null != n2 && (true === n2.unstable_strictMode && (r3 = true), void 0 !== n2.identifierPrefix && (a3 = n2.identifierPrefix), void 0 !== n2.onUncaughtError && (i3 = n2.onUncaughtError), void 0 !== n2.onCaughtError && (s3 = n2.onCaughtError), void 0 !== n2.onRecoverableError && (u3 = n2.onRecoverableError), void 0 !== n2.unstable_transitionCallbacks && n2.unstable_transitionCallbacks, void 0 !== n2.formState && (c3 = n2.formState)), (t2 = Zd(e3, 1, true, t2, 0, r3, a3, i3, s3, u3, 0, c3)).context = Jd(null), n2 = t2.current, (a3 = lo(r3 = Re2(r3 = Fu()))).callback = null, io(n2, a3, r3), n2 = r3, t2.current.lanes = n2, Pe2(t2, n2), Cc(t2), e3[Fe2] = t2.current, Bc(e3), new Lf(t2);
|
|
7054
|
-
},
|
|
7055
|
-
})()) :
|
|
7009
|
+
}, oe.version = "19.1.1", oe;
|
|
7010
|
+
})()) : ae.exports = (ce || (ce = 1, "production" !== process.env.NODE_ENV && (function() {
|
|
7056
7011
|
function e2(e3, t2) {
|
|
7057
7012
|
for (e3 = e3.memoizedState; null !== e3 && 0 < t2; ) e3 = e3.next, t2--;
|
|
7058
7013
|
return e3;
|
|
@@ -7533,7 +7488,7 @@
|
|
|
7533
7488
|
function se2(e3) {
|
|
7534
7489
|
delete e3[Nd], delete e3[Ld], delete e3[Od], delete e3[Md], delete e3[Fd];
|
|
7535
7490
|
}
|
|
7536
|
-
function
|
|
7491
|
+
function ce2(e3) {
|
|
7537
7492
|
var t2 = e3[Nd];
|
|
7538
7493
|
if (t2) return t2;
|
|
7539
7494
|
for (var n2 = e3.parentNode; n2; ) {
|
|
@@ -7548,26 +7503,26 @@
|
|
|
7548
7503
|
}
|
|
7549
7504
|
return null;
|
|
7550
7505
|
}
|
|
7551
|
-
function
|
|
7506
|
+
function de2(e3) {
|
|
7552
7507
|
if (e3 = e3[Nd] || e3[Dd]) {
|
|
7553
7508
|
var t2 = e3.tag;
|
|
7554
7509
|
if (5 === t2 || 6 === t2 || 13 === t2 || 26 === t2 || 27 === t2 || 3 === t2) return e3;
|
|
7555
7510
|
}
|
|
7556
7511
|
return null;
|
|
7557
7512
|
}
|
|
7558
|
-
function
|
|
7513
|
+
function pe2(e3) {
|
|
7559
7514
|
var t2 = e3.tag;
|
|
7560
7515
|
if (5 === t2 || 26 === t2 || 27 === t2 || 6 === t2) return e3.stateNode;
|
|
7561
7516
|
throw Error("getNodeFromInstance: Invalid argument.");
|
|
7562
7517
|
}
|
|
7563
|
-
function
|
|
7518
|
+
function he2(e3) {
|
|
7564
7519
|
var t2 = e3[Id];
|
|
7565
7520
|
return t2 || (t2 = e3[Id] = { hoistableStyles: /* @__PURE__ */ new Map(), hoistableScripts: /* @__PURE__ */ new Map() }), t2;
|
|
7566
7521
|
}
|
|
7567
|
-
function
|
|
7522
|
+
function me2(e3) {
|
|
7568
7523
|
e3[Ad] = true;
|
|
7569
7524
|
}
|
|
7570
|
-
function
|
|
7525
|
+
function ge2(e3, t2) {
|
|
7571
7526
|
ye2(e3, t2), ye2(e3 + "Capture", t2);
|
|
7572
7527
|
}
|
|
7573
7528
|
function ye2(e3, t2) {
|
|
@@ -8476,7 +8431,7 @@
|
|
|
8476
8431
|
return (e3 = e3.target || e3.srcElement || window).correspondingUseElement && (e3 = e3.correspondingUseElement), 3 === e3.nodeType ? e3.parentNode : e3;
|
|
8477
8432
|
}
|
|
8478
8433
|
function zt(e3) {
|
|
8479
|
-
var t2 =
|
|
8434
|
+
var t2 = de2(e3);
|
|
8480
8435
|
if (t2 && (e3 = t2.stateNode)) {
|
|
8481
8436
|
var n2 = e3[Ld] || null;
|
|
8482
8437
|
e: switch (e3 = t2.stateNode, t2.type) {
|
|
@@ -8606,7 +8561,7 @@
|
|
|
8606
8561
|
ws(e3, 0);
|
|
8607
8562
|
}
|
|
8608
8563
|
function Wt(e3) {
|
|
8609
|
-
if (Ae2(
|
|
8564
|
+
if (Ae2(pe2(e3))) return e3;
|
|
8610
8565
|
}
|
|
8611
8566
|
function $t(e3, t2) {
|
|
8612
8567
|
if ("change" === e3) return t2;
|
|
@@ -8702,7 +8657,7 @@
|
|
|
8702
8657
|
return e3;
|
|
8703
8658
|
}
|
|
8704
8659
|
function ln(e3, t2) {
|
|
8705
|
-
Jp.set(e3, t2),
|
|
8660
|
+
Jp.set(e3, t2), ge2(t2, [e3]);
|
|
8706
8661
|
}
|
|
8707
8662
|
function sn(e3, t2) {
|
|
8708
8663
|
if ("object" == typeof e3 && null !== e3) {
|
|
@@ -10851,7 +10806,7 @@
|
|
|
10851
10806
|
}
|
|
10852
10807
|
return t2;
|
|
10853
10808
|
case 26:
|
|
10854
|
-
return Vo(e3, t2), null === e3 ? (e3 = Pu(t2.type, null, t2.pendingProps, null)) ? t2.memoizedState = e3 : _h || (e3 = t2.type, n2 = t2.pendingProps, (r3 = Xs(r3 = P2(ed.current)).createElement(e3))[Nd] = t2, r3[Ld] = n2, Us(r3, e3, n2),
|
|
10809
|
+
return Vo(e3, t2), null === e3 ? (e3 = Pu(t2.type, null, t2.pendingProps, null)) ? t2.memoizedState = e3 : _h || (e3 = t2.type, n2 = t2.pendingProps, (r3 = Xs(r3 = P2(ed.current)).createElement(e3))[Nd] = t2, r3[Ld] = n2, Us(r3, e3, n2), me2(r3), t2.stateNode = r3) : t2.memoizedState = Pu(t2.type, e3.memoizedProps, t2.pendingProps, e3.memoizedState), null;
|
|
10855
10810
|
case 27:
|
|
10856
10811
|
return N2(t2), null === e3 && _h && (r3 = P2(ed.current), a3 = R2(), r3 = t2.stateNode = Su(t2.type, t2.pendingProps, r3, a3, false), Rh || null !== (a3 = Ks(r3, t2.type, t2.pendingProps, a3)) && (On(t2, 0).serverProps = a3), Ph = t2, Dh = true, a3 = zh, ou(t2.type) ? (Yv = a3, zh = mu(r3.firstChild)) : zh = a3), jo(e3, t2, t2.pendingProps.children, n2), Vo(e3, t2), null === e3 && (t2.flags |= 4194304), t2.child;
|
|
10857
10812
|
case 5:
|
|
@@ -11622,7 +11577,7 @@
|
|
|
11622
11577
|
r3 = e3.type, n2 = e3.memoizedProps, t2 = a3.ownerDocument || a3;
|
|
11623
11578
|
t: switch (r3) {
|
|
11624
11579
|
case "title":
|
|
11625
|
-
(!(a3 = t2.getElementsByTagName("title")[0]) || a3[Ad] || a3[Nd] || a3.namespaceURI === _f || a3.hasAttribute("itemprop")) && (a3 = t2.createElement(r3), t2.head.insertBefore(a3, t2.querySelector("head > title"))), Us(a3, r3, n2), a3[Nd] = e3,
|
|
11580
|
+
(!(a3 = t2.getElementsByTagName("title")[0]) || a3[Ad] || a3[Nd] || a3.namespaceURI === _f || a3.hasAttribute("itemprop")) && (a3 = t2.createElement(r3), t2.head.insertBefore(a3, t2.querySelector("head > title"))), Us(a3, r3, n2), a3[Nd] = e3, me2(a3), r3 = a3;
|
|
11626
11581
|
break e;
|
|
11627
11582
|
case "link":
|
|
11628
11583
|
var o3 = Au("link", "href", t2).get(r3 + (n2.href || ""));
|
|
@@ -11646,7 +11601,7 @@
|
|
|
11646
11601
|
default:
|
|
11647
11602
|
throw Error('getNodesForType encountered a type it did not expect: "' + r3 + '". This is a bug in React.');
|
|
11648
11603
|
}
|
|
11649
|
-
a3[Nd] = e3,
|
|
11604
|
+
a3[Nd] = e3, me2(a3), r3 = a3;
|
|
11650
11605
|
}
|
|
11651
11606
|
e3.stateNode = r3;
|
|
11652
11607
|
} else ju(a3, e3.type, e3.stateNode);
|
|
@@ -11940,8 +11895,8 @@
|
|
|
11940
11895
|
if ("stylesheet" === t3.type && ("string" != typeof n2.media || false !== matchMedia(n2.media).matches) && (t3.state.loading & Jv) === Kv) {
|
|
11941
11896
|
if (null === t3.instance) {
|
|
11942
11897
|
var a3 = _u(n2.href), o3 = e4.querySelector(Ru(a3));
|
|
11943
|
-
if (o3) return null !== (e4 = o3._p) && "object" == typeof e4 && "function" == typeof e4.then && (r3.count++, r3 = Bu.bind(r3), e4.then(r3, r3)), t3.state.loading |= Jv, t3.instance = o3, void
|
|
11944
|
-
o3 = e4.ownerDocument || e4, n2 = Nu(n2), (a3 = ek.get(a3)) && Fu(n2, a3),
|
|
11898
|
+
if (o3) return null !== (e4 = o3._p) && "object" == typeof e4 && "function" == typeof e4.then && (r3.count++, r3 = Bu.bind(r3), e4.then(r3, r3)), t3.state.loading |= Jv, t3.instance = o3, void me2(o3);
|
|
11899
|
+
o3 = e4.ownerDocument || e4, n2 = Nu(n2), (a3 = ek.get(a3)) && Fu(n2, a3), me2(o3 = o3.createElement("link"));
|
|
11945
11900
|
var l3 = o3;
|
|
11946
11901
|
l3._p = new Promise(function(e5, t4) {
|
|
11947
11902
|
l3.onload = e5, l3.onerror = t4;
|
|
@@ -12980,7 +12935,7 @@
|
|
|
12980
12935
|
l3 = l3.return;
|
|
12981
12936
|
}
|
|
12982
12937
|
for (; null !== i3; ) {
|
|
12983
|
-
if (null === (l3 =
|
|
12938
|
+
if (null === (l3 = ce2(i3))) return;
|
|
12984
12939
|
if (5 === (s3 = l3.tag) || 6 === s3 || 26 === s3 || 27 === s3) {
|
|
12985
12940
|
r3 = o3 = l3;
|
|
12986
12941
|
continue e;
|
|
@@ -13086,8 +13041,8 @@
|
|
|
13086
13041
|
}
|
|
13087
13042
|
}
|
|
13088
13043
|
if (!(7 & t2)) {
|
|
13089
|
-
if (s4 = "mouseout" === e3 || "pointerout" === e3, (!(i4 = "mouseover" === e3 || "pointerover" === e3) || n2 === Wf || !(u3 = n2.relatedTarget || n2.fromElement) || !
|
|
13090
|
-
if (c3 = ip, m3 = "onMouseLeave", f3 = "onMouseEnter", h3 = "mouse", "pointerout" !== e3 && "pointerover" !== e3 || (c3 = bp, m3 = "onPointerLeave", f3 = "onPointerEnter", h3 = "pointer"), d3 = null == s4 ? i4 :
|
|
13044
|
+
if (s4 = "mouseout" === e3 || "pointerout" === e3, (!(i4 = "mouseover" === e3 || "pointerover" === e3) || n2 === Wf || !(u3 = n2.relatedTarget || n2.fromElement) || !ce2(u3) && !u3[Dd]) && (s4 || i4) && (i4 = a4.window === a4 ? a4 : (i4 = a4.ownerDocument) ? i4.defaultView || i4.parentWindow : window, s4 ? (s4 = r4, null !== (u3 = (u3 = n2.relatedTarget || n2.toElement) ? ce2(u3) : null) && (d3 = g2(u3), c3 = u3.tag, u3 !== d3 || 5 !== c3 && 27 !== c3 && 6 !== c3) && (u3 = null)) : (s4 = null, u3 = r4), s4 !== u3)) {
|
|
13045
|
+
if (c3 = ip, m3 = "onMouseLeave", f3 = "onMouseEnter", h3 = "mouse", "pointerout" !== e3 && "pointerover" !== e3 || (c3 = bp, m3 = "onPointerLeave", f3 = "onPointerEnter", h3 = "pointer"), d3 = null == s4 ? i4 : pe2(s4), p3 = null == u3 ? i4 : pe2(u3), (i4 = new c3(m3, h3 + "leave", s4, n2, a4)).target = d3, i4.relatedTarget = p3, m3 = null, ce2(a4) === r4 && ((c3 = new c3(f3, h3 + "enter", u3, n2, a4)).target = p3, c3.relatedTarget = d3, m3 = c3), d3 = m3, s4 && u3) e: {
|
|
13091
13046
|
for (f3 = u3, h3 = 0, p3 = c3 = s4; p3; p3 = _s(p3)) h3++;
|
|
13092
13047
|
for (p3 = 0, m3 = f3; m3; m3 = _s(m3)) p3++;
|
|
13093
13048
|
for (; 0 < h3 - p3; ) c3 = _s(c3), h3--;
|
|
@@ -13101,14 +13056,14 @@
|
|
|
13101
13056
|
else c3 = null;
|
|
13102
13057
|
null !== s4 && Rs(l4, i4, s4, c3, false), null !== u3 && null !== d3 && Rs(l4, d3, u3, c3, true);
|
|
13103
13058
|
}
|
|
13104
|
-
if ("select" === (s4 = (i4 = r4 ?
|
|
13059
|
+
if ("select" === (s4 = (i4 = r4 ? pe2(r4) : window).nodeName && i4.nodeName.toLowerCase()) || "input" === s4 && "file" === i4.type) var y3 = $t;
|
|
13105
13060
|
else if (Ut(i4)) if (Fp) y3 = Xt;
|
|
13106
13061
|
else {
|
|
13107
13062
|
y3 = Yt;
|
|
13108
13063
|
var b3 = Qt;
|
|
13109
13064
|
}
|
|
13110
13065
|
else !(s4 = i4.nodeName) || "input" !== s4.toLowerCase() || "checkbox" !== i4.type && "radio" !== i4.type ? r4 && St(r4.elementType) && (y3 = $t) : y3 = Kt;
|
|
13111
|
-
switch (y3 && (y3 = y3(e3, r4)) ? Ht(l4, y3, n2, a4) : (b3 && b3(e3, i4, r4), "focusout" === e3 && r4 && "number" === i4.type && null != r4.memoizedProps.value && $e2(i4, "number", i4.value)), b3 = r4 ?
|
|
13066
|
+
switch (y3 && (y3 = y3(e3, r4)) ? Ht(l4, y3, n2, a4) : (b3 && b3(e3, i4, r4), "focusout" === e3 && r4 && "number" === i4.type && null != r4.memoizedProps.value && $e2(i4, "number", i4.value)), b3 = r4 ? pe2(r4) : window, e3) {
|
|
13112
13067
|
case "focusin":
|
|
13113
13068
|
(Ut(b3) || "true" === b3.contentEditable) && (jp = b3, Up = r4, Hp = null);
|
|
13114
13069
|
break;
|
|
@@ -14330,7 +14285,7 @@
|
|
|
14330
14285
|
}
|
|
14331
14286
|
}
|
|
14332
14287
|
function xu(e3, t2, n2, r3) {
|
|
14333
|
-
if (!n2[Dd] &&
|
|
14288
|
+
if (!n2[Dd] && de2(n2)) {
|
|
14334
14289
|
var a3 = n2.tagName.toLowerCase();
|
|
14335
14290
|
console.error("You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.", a3, a3, a3);
|
|
14336
14291
|
}
|
|
@@ -14356,7 +14311,7 @@
|
|
|
14356
14311
|
var r3 = fk;
|
|
14357
14312
|
if (r3 && "string" == typeof t2 && t2) {
|
|
14358
14313
|
var a3 = Ue2(t2);
|
|
14359
|
-
a3 = 'link[rel="' + e3 + '"][href="' + a3 + '"]', "string" == typeof n2 && (a3 += '[crossorigin="' + n2 + '"]'), tk.has(a3) || (tk.add(a3), e3 = { rel: e3, crossOrigin: n2, href: t2 }, null === r3.querySelector(a3) && (Us(t2 = r3.createElement("link"), "link", e3),
|
|
14314
|
+
a3 = 'link[rel="' + e3 + '"][href="' + a3 + '"]', "string" == typeof n2 && (a3 += '[crossorigin="' + n2 + '"]'), tk.has(a3) || (tk.add(a3), e3 = { rel: e3, crossOrigin: n2, href: t2 }, null === r3.querySelector(a3) && (Us(t2 = r3.createElement("link"), "link", e3), me2(t2), r3.head.appendChild(t2)));
|
|
14360
14315
|
}
|
|
14361
14316
|
}
|
|
14362
14317
|
function Pu(e3, t2, n2, r3) {
|
|
@@ -14367,11 +14322,11 @@
|
|
|
14367
14322
|
case "title":
|
|
14368
14323
|
return null;
|
|
14369
14324
|
case "style":
|
|
14370
|
-
return "string" == typeof n2.precedence && "string" == typeof n2.href ? (n2 = _u(n2.href), (r3 = (t2 =
|
|
14325
|
+
return "string" == typeof n2.precedence && "string" == typeof n2.href ? (n2 = _u(n2.href), (r3 = (t2 = he2(a3).hoistableStyles).get(n2)) || (r3 = { type: "style", instance: null, count: 0, state: null }, t2.set(n2, r3)), r3) : { type: "void", instance: null, count: 0, state: null };
|
|
14371
14326
|
case "link":
|
|
14372
14327
|
if ("stylesheet" === n2.rel && "string" == typeof n2.href && "string" == typeof n2.precedence) {
|
|
14373
14328
|
e3 = _u(n2.href);
|
|
14374
|
-
var o3 =
|
|
14329
|
+
var o3 = he2(a3).hoistableStyles, l3 = o3.get(e3);
|
|
14375
14330
|
if (!l3 && (a3 = a3.ownerDocument || a3, l3 = { type: "stylesheet", instance: null, count: 0, state: { loading: Kv, preload: null } }, o3.set(e3, l3), (o3 = a3.querySelector(Ru(e3))) && !o3._p && (l3.instance = o3, l3.state.loading = Xv | Jv), !ek.has(e3))) {
|
|
14376
14331
|
var i3 = { rel: "preload", as: "style", href: n2.href, crossOrigin: n2.crossOrigin, integrity: n2.integrity, media: n2.media, hrefLang: n2.hrefLang, referrerPolicy: n2.referrerPolicy };
|
|
14377
14332
|
ek.set(e3, i3), o3 || (function(e4, t3, n3, r4) {
|
|
@@ -14379,7 +14334,7 @@
|
|
|
14379
14334
|
return r4.loading |= Xv;
|
|
14380
14335
|
}), t3.addEventListener("error", function() {
|
|
14381
14336
|
return r4.loading |= Gv;
|
|
14382
|
-
}), Us(t3, "link", n3),
|
|
14337
|
+
}), Us(t3, "link", n3), me2(t3), e4.head.appendChild(t3));
|
|
14383
14338
|
})(a3, e3, i3, l3.state);
|
|
14384
14339
|
}
|
|
14385
14340
|
if (t2 && null === r3) throw n2 = "\n\n - " + zu(t2) + "\n + " + zu(n2), Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + n2);
|
|
@@ -14388,7 +14343,7 @@
|
|
|
14388
14343
|
if (t2 && null !== r3) throw n2 = "\n\n - " + zu(t2) + "\n + " + zu(n2), Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key." + n2);
|
|
14389
14344
|
return null;
|
|
14390
14345
|
case "script":
|
|
14391
|
-
return t2 = n2.async, "string" == typeof (n2 = n2.src) && t2 && "function" != typeof t2 && "symbol" != typeof t2 ? (n2 = Lu(n2), (r3 = (t2 =
|
|
14346
|
+
return t2 = n2.async, "string" == typeof (n2 = n2.src) && t2 && "function" != typeof t2 && "symbol" != typeof t2 ? (n2 = Lu(n2), (r3 = (t2 = he2(a3).hoistableScripts).get(n2)) || (r3 = { type: "script", instance: null, count: 0, state: null }, t2.set(n2, r3)), r3) : { type: "void", instance: null, count: 0, state: null };
|
|
14392
14347
|
default:
|
|
14393
14348
|
throw Error('getResource encountered a type it did not expect: "' + e3 + '". this is a bug in React.');
|
|
14394
14349
|
}
|
|
@@ -14416,20 +14371,20 @@
|
|
|
14416
14371
|
if (t2.count++, null === t2.instance) switch (t2.type) {
|
|
14417
14372
|
case "style":
|
|
14418
14373
|
var r3 = e3.querySelector('style[data-href~="' + Ue2(n2.href) + '"]');
|
|
14419
|
-
if (r3) return t2.instance = r3,
|
|
14374
|
+
if (r3) return t2.instance = r3, me2(r3), r3;
|
|
14420
14375
|
var a3 = Tc({}, n2, { "data-href": n2.href, "data-precedence": n2.precedence, href: null, precedence: null });
|
|
14421
|
-
return
|
|
14376
|
+
return me2(r3 = (e3.ownerDocument || e3).createElement("style")), Us(r3, "style", a3), Mu(r3, n2.precedence, e3), t2.instance = r3;
|
|
14422
14377
|
case "stylesheet":
|
|
14423
14378
|
a3 = _u(n2.href);
|
|
14424
14379
|
var o3 = e3.querySelector(Ru(a3));
|
|
14425
|
-
if (o3) return t2.state.loading |= Jv, t2.instance = o3,
|
|
14426
|
-
r3 = Nu(n2), (a3 = ek.get(a3)) && Fu(r3, a3),
|
|
14380
|
+
if (o3) return t2.state.loading |= Jv, t2.instance = o3, me2(o3), o3;
|
|
14381
|
+
r3 = Nu(n2), (a3 = ek.get(a3)) && Fu(r3, a3), me2(o3 = (e3.ownerDocument || e3).createElement("link"));
|
|
14427
14382
|
var l3 = o3;
|
|
14428
14383
|
return l3._p = new Promise(function(e4, t3) {
|
|
14429
14384
|
l3.onload = e4, l3.onerror = t3;
|
|
14430
14385
|
}), Us(o3, "link", r3), t2.state.loading |= Jv, Mu(o3, n2.precedence, e3), t2.instance = o3;
|
|
14431
14386
|
case "script":
|
|
14432
|
-
return o3 = Lu(n2.src), (a3 = e3.querySelector(Du(o3))) ? (t2.instance = a3,
|
|
14387
|
+
return o3 = Lu(n2.src), (a3 = e3.querySelector(Du(o3))) ? (t2.instance = a3, me2(a3), a3) : (r3 = n2, (a3 = ek.get(o3)) && Iu(r3 = Tc({}, n2), a3), me2(a3 = (e3 = e3.ownerDocument || e3).createElement("script")), Us(a3, "link", r3), e3.head.appendChild(a3), t2.instance = a3);
|
|
14433
14388
|
case "void":
|
|
14434
14389
|
return null;
|
|
14435
14390
|
default:
|
|
@@ -14579,7 +14534,7 @@
|
|
|
14579
14534
|
})(a3, e3, t2, n2, r3)) r3.stopPropagation();
|
|
14580
14535
|
else if (ac(e3, r3), 4 & t2 && -1 < Mk.indexOf(e3)) {
|
|
14581
14536
|
for (; null !== a3; ) {
|
|
14582
|
-
var o3 =
|
|
14537
|
+
var o3 = de2(a3);
|
|
14583
14538
|
if (null !== o3) switch (o3.tag) {
|
|
14584
14539
|
case 3:
|
|
14585
14540
|
if ((o3 = o3.stateNode).current.memoizedState.isDehydrated) {
|
|
@@ -14608,7 +14563,7 @@
|
|
|
14608
14563
|
return nc(e3 = Pt(e3));
|
|
14609
14564
|
}
|
|
14610
14565
|
function nc(e3) {
|
|
14611
|
-
if (Pk = null, null !== (e3 =
|
|
14566
|
+
if (Pk = null, null !== (e3 = ce2(e3))) {
|
|
14612
14567
|
var t2 = g2(e3);
|
|
14613
14568
|
if (null === t2) e3 = null;
|
|
14614
14569
|
else {
|
|
@@ -14741,10 +14696,10 @@
|
|
|
14741
14696
|
}
|
|
14742
14697
|
}
|
|
14743
14698
|
function oc(e3, t2, n2, r3, a3, o3) {
|
|
14744
|
-
return null === e3 || e3.nativeEvent !== o3 ? (e3 = { blockedOn: t2, domEventName: n2, eventSystemFlags: r3, nativeEvent: o3, targetContainers: [a3] }, null !== t2 && null !== (t2 =
|
|
14699
|
+
return null === e3 || e3.nativeEvent !== o3 ? (e3 = { blockedOn: t2, domEventName: n2, eventSystemFlags: r3, nativeEvent: o3, targetContainers: [a3] }, null !== t2 && null !== (t2 = de2(t2)) && Gu(t2), e3) : (e3.eventSystemFlags |= r3, t2 = e3.targetContainers, null !== a3 && -1 === t2.indexOf(a3) && t2.push(a3), e3);
|
|
14745
14700
|
}
|
|
14746
14701
|
function lc(e3) {
|
|
14747
|
-
var t2 =
|
|
14702
|
+
var t2 = ce2(e3.target);
|
|
14748
14703
|
if (null !== t2) {
|
|
14749
14704
|
var n2 = g2(t2);
|
|
14750
14705
|
if (null !== n2) {
|
|
@@ -14773,7 +14728,7 @@
|
|
|
14773
14728
|
if (null !== e3.blockedOn) return false;
|
|
14774
14729
|
for (var t2 = e3.targetContainers; 0 < t2.length; ) {
|
|
14775
14730
|
var n2 = tc(e3.nativeEvent);
|
|
14776
|
-
if (null !== n2) return null !== (t2 =
|
|
14731
|
+
if (null !== n2) return null !== (t2 = de2(n2)) && Gu(t2), e3.blockedOn = n2, false;
|
|
14777
14732
|
var r3 = new (n2 = e3.nativeEvent).constructor(n2.type, n2), a3 = r3;
|
|
14778
14733
|
null !== Wf && console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."), Wf = a3, n2.target.dispatchEvent(r3), null === Wf && console.error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue."), Wf = null, t2.shift();
|
|
14779
14734
|
}
|
|
@@ -14797,7 +14752,7 @@
|
|
|
14797
14752
|
if (null === nc(r3 || n2)) continue;
|
|
14798
14753
|
break;
|
|
14799
14754
|
}
|
|
14800
|
-
var o3 =
|
|
14755
|
+
var o3 = de2(n2);
|
|
14801
14756
|
null !== o3 && (e3.splice(t2, 3), t2 -= 3, n2 = { pending: true, data: a3, method: n2.method, action: r3 }, Object.freeze(n2), Ka(o3, n2, r3, a3));
|
|
14802
14757
|
}
|
|
14803
14758
|
}));
|
|
@@ -14835,7 +14790,7 @@
|
|
|
14835
14790
|
e3[Dd] && (e3._reactRootContainer ? console.error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.") : console.error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it."));
|
|
14836
14791
|
}
|
|
14837
14792
|
"undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
|
|
14838
|
-
var gc, yc, bc, vc, kc, wc, Sc, xc =
|
|
14793
|
+
var gc, yc, bc, vc, kc, wc, Sc, xc = ue(), Cc = t, Ec = n, Tc = Object.assign, Pc = Symbol.for("react.element"), zc = Symbol.for("react.transitional.element"), _c = Symbol.for("react.portal"), Rc = Symbol.for("react.fragment"), Nc = Symbol.for("react.strict_mode"), Lc = Symbol.for("react.profiler"), Dc = Symbol.for("react.provider"), Oc = Symbol.for("react.consumer"), Mc = Symbol.for("react.context"), Fc = Symbol.for("react.forward_ref"), Ic = Symbol.for("react.suspense"), Ac = Symbol.for("react.suspense_list"), jc = Symbol.for("react.memo"), Uc = Symbol.for("react.lazy"), Hc = Symbol.for("react.activity"), Bc = Symbol.for("react.memo_cache_sentinel"), Wc = Symbol.iterator, $c = Symbol.for("react.client.reference"), Vc = Array.isArray, qc = Cc.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Qc = Ec.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Yc = Object.freeze({ pending: false, data: null, method: null, action: null }), Kc = [], Xc = [], Gc = -1, Zc = C2(null), Jc = C2(null), ed = C2(null), td = C2(null), nd = Object.prototype.hasOwnProperty, rd = xc.unstable_scheduleCallback, ad = xc.unstable_cancelCallback, od = xc.unstable_shouldYield, ld = xc.unstable_requestPaint, id = xc.unstable_now, sd = xc.unstable_getCurrentPriorityLevel, ud = xc.unstable_ImmediatePriority, cd = xc.unstable_UserBlockingPriority, dd = xc.unstable_NormalPriority, fd = xc.unstable_LowPriority, pd = xc.unstable_IdlePriority, hd = xc.log, md = xc.unstable_setDisableYieldValue, gd = null, yd = null, bd = null, vd = false, kd = "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__, wd = Math.clz32 ? Math.clz32 : function(e3) {
|
|
14839
14794
|
return 0 == (e3 >>>= 0) ? 32 : 31 - (Sd(e3) / xd | 0) | 0;
|
|
14840
14795
|
}, Sd = Math.log, xd = Math.LN2, Cd = 256, Ed = 4194304, Td = 2, Pd = 8, zd = 32, _d = 268435456, Rd = Math.random().toString(36).slice(2), Nd = "__reactFiber$" + Rd, Ld = "__reactProps$" + Rd, Dd = "__reactContainer$" + Rd, Od = "__reactEvents$" + Rd, Md = "__reactListeners$" + Rd, Fd = "__reactHandles$" + Rd, Id = "__reactResources$" + Rd, Ad = "__reactMarker$" + Rd, jd = /* @__PURE__ */ new Set(), Ud = {}, Hd = {}, Bd = { button: true, checkbox: true, image: true, hidden: true, radio: true, reset: true, submit: true }, Wd = RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"), $d = {}, Vd = {}, qd = 0;
|
|
14841
14796
|
Ce2.__reactDisabledLog = true;
|
|
@@ -15531,7 +15486,7 @@
|
|
|
15531
15486
|
ln(t2.toLowerCase(), "on" + (t2 = t2[0].toUpperCase() + t2.slice(1)));
|
|
15532
15487
|
}
|
|
15533
15488
|
ln(qp, "onAnimationEnd"), ln(Qp, "onAnimationIteration"), ln(Yp, "onAnimationStart"), ln("dblclick", "onDoubleClick"), ln("focusin", "onFocus"), ln("focusout", "onBlur"), ln(Kp, "onTransitionRun"), ln(Xp, "onTransitionStart"), ln(Gp, "onTransitionCancel"), ln(Zp, "onTransitionEnd");
|
|
15534
|
-
})(), ye2("onMouseEnter", ["mouseout", "mouseover"]), ye2("onMouseLeave", ["mouseout", "mouseover"]), ye2("onPointerEnter", ["pointerout", "pointerover"]), ye2("onPointerLeave", ["pointerout", "pointerover"]),
|
|
15489
|
+
})(), ye2("onMouseEnter", ["mouseout", "mouseover"]), ye2("onMouseLeave", ["mouseout", "mouseover"]), ye2("onPointerEnter", ["pointerout", "pointerover"]), ye2("onPointerLeave", ["pointerout", "pointerover"]), ge2("onChange", "change click focusin focusout input keydown keyup selectionchange".split(" ")), ge2("onSelect", "focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")), ge2("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]), ge2("onCompositionEnd", "compositionend focusout keydown keypress keyup mousedown".split(" ")), ge2("onCompositionStart", "compositionstart focusout keydown keypress keyup mousedown".split(" ")), ge2("onCompositionUpdate", "compositionupdate focusout keydown keypress keyup mousedown".split(" "));
|
|
15535
15490
|
var sv = "abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "), uv = new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(sv)), cv = "_reactListening" + Math.random().toString(36).slice(2), dv = false, fv = false, pv = false, hv = false, mv = false, gv = false, yv = false, bv = {}, vv = /\r\n?/g, kv = /\u0000|\uFFFD/g, wv = "http://www.w3.org/1999/xlink", Sv = "http://www.w3.org/XML/1998/namespace", xv = "javascript:throw new Error('React form unexpectedly submitted.')", Cv = "suppressHydrationWarning", Ev = "$", Tv = "/$", Pv = "$?", zv = "$!", _v = 1, Rv = 2, Nv = 4, Lv = "F!", Dv = "F", Ov = "complete", Mv = "style", Fv = 0, Iv = 1, Av = 2, jv = null, Uv = null, Hv = { dialog: true, webview: true }, Bv = null, Wv = "function" == typeof setTimeout ? setTimeout : void 0, $v = "function" == typeof clearTimeout ? clearTimeout : void 0, Vv = -1, qv = "function" == typeof Promise ? Promise : void 0, Qv = "function" == typeof queueMicrotask ? queueMicrotask : void 0 !== qv ? function(e3) {
|
|
15536
15491
|
return qv.resolve(null).then(e3).catch(eu);
|
|
15537
15492
|
} : Wv, Yv = null, Kv = 0, Xv = 1, Gv = 2, Zv = 3, Jv = 4, ek = /* @__PURE__ */ new Map(), tk = /* @__PURE__ */ new Set(), nk = Qc.d;
|
|
@@ -15539,7 +15494,7 @@
|
|
|
15539
15494
|
var e3 = nk.f(), t2 = Ti();
|
|
15540
15495
|
return e3 || t2;
|
|
15541
15496
|
}, r: function(e3) {
|
|
15542
|
-
var t2 =
|
|
15497
|
+
var t2 = de2(e3);
|
|
15543
15498
|
null !== t2 && 5 === t2.tag && "form" === t2.type ? Ga(t2) : nk.r(e3);
|
|
15544
15499
|
}, D: function(e3) {
|
|
15545
15500
|
nk.D(e3), Tu("dns-prefetch", e3, null);
|
|
@@ -15559,7 +15514,7 @@
|
|
|
15559
15514
|
case "script":
|
|
15560
15515
|
o3 = Lu(e3);
|
|
15561
15516
|
}
|
|
15562
|
-
ek.has(o3) || (e3 = Tc({ rel: "preload", href: "image" === t2 && n2 && n2.imageSrcSet ? void 0 : e3, as: t2 }, n2), ek.set(o3, e3), null !== r3.querySelector(a3) || "style" === t2 && r3.querySelector(Ru(o3)) || "script" === t2 && r3.querySelector(Du(o3)) || (Us(t2 = r3.createElement("link"), "link", e3),
|
|
15517
|
+
ek.has(o3) || (e3 = Tc({ rel: "preload", href: "image" === t2 && n2 && n2.imageSrcSet ? void 0 : e3, as: t2 }, n2), ek.set(o3, e3), null !== r3.querySelector(a3) || "style" === t2 && r3.querySelector(Ru(o3)) || "script" === t2 && r3.querySelector(Du(o3)) || (Us(t2 = r3.createElement("link"), "link", e3), me2(t2), r3.head.appendChild(t2)));
|
|
15563
15518
|
}
|
|
15564
15519
|
}, m: function(e3, t2) {
|
|
15565
15520
|
nk.m(e3, t2);
|
|
@@ -15585,21 +15540,21 @@
|
|
|
15585
15540
|
case "script":
|
|
15586
15541
|
if (n2.querySelector(Du(o3))) return;
|
|
15587
15542
|
}
|
|
15588
|
-
Us(r3 = n2.createElement("link"), "link", e3),
|
|
15543
|
+
Us(r3 = n2.createElement("link"), "link", e3), me2(r3), n2.head.appendChild(r3);
|
|
15589
15544
|
}
|
|
15590
15545
|
}
|
|
15591
15546
|
}, X: function(e3, t2) {
|
|
15592
15547
|
nk.X(e3, t2);
|
|
15593
15548
|
var n2 = fk;
|
|
15594
15549
|
if (n2 && e3) {
|
|
15595
|
-
var r3 =
|
|
15596
|
-
o3 || ((o3 = n2.querySelector(Du(a3))) || (e3 = Tc({ src: e3, async: true }, t2), (t2 = ek.get(a3)) && Iu(e3, t2),
|
|
15550
|
+
var r3 = he2(n2).hoistableScripts, a3 = Lu(e3), o3 = r3.get(a3);
|
|
15551
|
+
o3 || ((o3 = n2.querySelector(Du(a3))) || (e3 = Tc({ src: e3, async: true }, t2), (t2 = ek.get(a3)) && Iu(e3, t2), me2(o3 = n2.createElement("script")), Us(o3, "link", e3), n2.head.appendChild(o3)), o3 = { type: "script", instance: o3, count: 1, state: null }, r3.set(a3, o3));
|
|
15597
15552
|
}
|
|
15598
15553
|
}, S: function(e3, t2, n2) {
|
|
15599
15554
|
nk.S(e3, t2, n2);
|
|
15600
15555
|
var r3 = fk;
|
|
15601
15556
|
if (r3 && e3) {
|
|
15602
|
-
var a3 =
|
|
15557
|
+
var a3 = he2(r3).hoistableStyles, o3 = _u(e3);
|
|
15603
15558
|
t2 = t2 || "default";
|
|
15604
15559
|
var l3 = a3.get(o3);
|
|
15605
15560
|
if (!l3) {
|
|
@@ -15608,7 +15563,7 @@
|
|
|
15608
15563
|
else {
|
|
15609
15564
|
e3 = Tc({ rel: "stylesheet", href: e3, "data-precedence": t2 }, n2), (n2 = ek.get(o3)) && Fu(e3, n2);
|
|
15610
15565
|
var s3 = l3 = r3.createElement("link");
|
|
15611
|
-
|
|
15566
|
+
me2(s3), Us(s3, "link", e3), s3._p = new Promise(function(e4, t3) {
|
|
15612
15567
|
s3.onload = e4, s3.onerror = t3;
|
|
15613
15568
|
}), s3.addEventListener("load", function() {
|
|
15614
15569
|
i3.loading |= Xv;
|
|
@@ -15623,8 +15578,8 @@
|
|
|
15623
15578
|
nk.M(e3, t2);
|
|
15624
15579
|
var n2 = fk;
|
|
15625
15580
|
if (n2 && e3) {
|
|
15626
|
-
var r3 =
|
|
15627
|
-
o3 || ((o3 = n2.querySelector(Du(a3))) || (e3 = Tc({ src: e3, async: true, type: "module" }, t2), (t2 = ek.get(a3)) && Iu(e3, t2),
|
|
15581
|
+
var r3 = he2(n2).hoistableScripts, a3 = Lu(e3), o3 = r3.get(a3);
|
|
15582
|
+
o3 || ((o3 = n2.querySelector(Du(a3))) || (e3 = Tc({ src: e3, async: true, type: "module" }, t2), (t2 = ek.get(a3)) && Iu(e3, t2), me2(o3 = n2.createElement("script")), Us(o3, "link", e3), n2.head.appendChild(o3)), o3 = { type: "script", instance: o3, count: 1, state: null }, r3.set(a3, o3));
|
|
15628
15583
|
}
|
|
15629
15584
|
} };
|
|
15630
15585
|
var rk, ak, ok, lk, ik, sk, uk, ck, dk, fk = "undefined" == typeof document ? null : document, pk = null, hk = null, mk = null, gk = null, yk = Yc, bk = { $$typeof: Mc, Provider: null, Consumer: null, _currentValue: yk, _currentValue2: yk, _threadCount: 0 }, vk = "%c%s%c ", kk = "background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px", wk = "", Sk = " ", xk = Function.prototype.bind, Ck = false;
|
|
@@ -15771,18 +15726,18 @@
|
|
|
15771
15726
|
var Ik = window.location.protocol;
|
|
15772
15727
|
/^(https?|file):$/.test(Ik) && console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools" + ("file:" === Ik ? "\nYou might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq" : ""), "font-weight:bold");
|
|
15773
15728
|
}
|
|
15774
|
-
|
|
15729
|
+
fe.createRoot = function(e3, t2) {
|
|
15775
15730
|
if (!m2(e3)) throw Error("Target container is not a DOM element.");
|
|
15776
15731
|
mc(e3);
|
|
15777
15732
|
var n2 = false, r3 = "", a3 = No, o3 = Lo, l3 = Do;
|
|
15778
15733
|
return null != t2 && (t2.hydrate ? console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.") : "object" == typeof t2 && null !== t2 && t2.$$typeof === zc && console.error("You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);"), true === t2.unstable_strictMode && (n2 = true), void 0 !== t2.identifierPrefix && (r3 = t2.identifierPrefix), void 0 !== t2.onUncaughtError && (a3 = t2.onUncaughtError), void 0 !== t2.onCaughtError && (o3 = t2.onCaughtError), void 0 !== t2.onRecoverableError && (l3 = t2.onRecoverableError), void 0 !== t2.unstable_transitionCallbacks && t2.unstable_transitionCallbacks), t2 = qu(e3, 1, false, null, 0, n2, r3, a3, o3, l3, 0, null), e3[Dd] = t2.current, Cs(e3), new pc(t2);
|
|
15779
|
-
},
|
|
15734
|
+
}, fe.hydrateRoot = function(e3, t2, n2) {
|
|
15780
15735
|
if (!m2(e3)) throw Error("Target container is not a DOM element.");
|
|
15781
15736
|
mc(e3), void 0 === t2 && console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");
|
|
15782
15737
|
var r3 = false, a3 = "", o3 = No, l3 = Lo, i3 = Do, s3 = null;
|
|
15783
15738
|
return null != n2 && (true === n2.unstable_strictMode && (r3 = true), void 0 !== n2.identifierPrefix && (a3 = n2.identifierPrefix), void 0 !== n2.onUncaughtError && (o3 = n2.onUncaughtError), void 0 !== n2.onCaughtError && (l3 = n2.onCaughtError), void 0 !== n2.onRecoverableError && (i3 = n2.onRecoverableError), void 0 !== n2.unstable_transitionCallbacks && n2.unstable_transitionCallbacks, void 0 !== n2.formState && (s3 = n2.formState)), (t2 = qu(e3, 1, true, t2, 0, r3, a3, o3, l3, i3, 0, s3)).context = Qu(null), (a3 = Cr(r3 = re2(r3 = vi(n2 = t2.current)))).callback = null, Er(n2, a3, r3), n2 = r3, t2.current.lanes = n2, ee2(t2, n2), ss(t2), e3[Dd] = t2.current, Cs(e3), new hc(t2);
|
|
15784
|
-
},
|
|
15785
|
-
})()),
|
|
15739
|
+
}, fe.version = "19.1.1", "undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
|
|
15740
|
+
})()), fe)), ae.exports)), he = (e2, t2, n2, r2) => {
|
|
15786
15741
|
const { target: a2, root: o2 } = ((e3, t3) => {
|
|
15787
15742
|
let n3 = null, r3 = null;
|
|
15788
15743
|
return t3 && (n3 = document.getElementById(t3), n3 || (n3 = document.createElement("div"), n3.id = t3, document.body.appendChild(n3))), e3 ? (r3 = document.getElementById(e3), r3 || (r3 = document.createElement("div"), r3.id = e3, n3 ? n3.appendChild(r3) : document.body.appendChild(r3))) : (r3 = document.createElement("div"), n3 ? n3.appendChild(r3) : document.body.appendChild(r3)), { target: r3, root: n3 };
|
|
@@ -15792,23 +15747,23 @@
|
|
|
15792
15747
|
};
|
|
15793
15748
|
if (void 0 !== a2.__reactContainer$) a2.__reactContainer$.render(d.jsx(e2, { ...{ ...t2, destroy: l2 } }));
|
|
15794
15749
|
else {
|
|
15795
|
-
const n3 =
|
|
15750
|
+
const n3 = pe.createRoot(a2);
|
|
15796
15751
|
a2.__reactContainer$ = n3, n3.render(d.jsx(e2, { ...{ ...t2, destroy: l2 } }));
|
|
15797
15752
|
}
|
|
15798
15753
|
return l2;
|
|
15799
15754
|
};
|
|
15800
|
-
let
|
|
15801
|
-
const
|
|
15802
|
-
const t2 =
|
|
15803
|
-
return t2 <= 0 ? 0 :
|
|
15804
|
-
},
|
|
15805
|
-
const r2 = (e3) =>
|
|
15755
|
+
let me = 1;
|
|
15756
|
+
const ge = [], ye = (e2, t2, n2) => (0 === ge.length && (me = 1), ve(t2.instancesKey || "", e2, { id: `${n2}-${me++}`, key: t2.instancesKey || "", reactNode: e2, props: t2, offsetOptions: { topOffset: 0, height: 0, bottomOffset: 0 } }), ge), be = (e2) => {
|
|
15757
|
+
const t2 = ge.findIndex((t3) => t3.id === e2);
|
|
15758
|
+
return t2 <= 0 ? 0 : ge[t2 - 1].offsetOptions.bottomOffset;
|
|
15759
|
+
}, ve = (e2, t2, n2) => {
|
|
15760
|
+
const r2 = (e3) => he(t2, { zIndex: 999 + me - 1, ...e3.props, id: e3.id }, e3.id, "ono-message-root");
|
|
15806
15761
|
if (!e2) {
|
|
15807
15762
|
const e3 = r2(n2);
|
|
15808
|
-
|
|
15763
|
+
ge.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
|
|
15809
15764
|
}
|
|
15810
15765
|
let a2 = false;
|
|
15811
|
-
const o2 =
|
|
15766
|
+
const o2 = ge.map((t3) => {
|
|
15812
15767
|
if (t3.key === e2) {
|
|
15813
15768
|
a2 = true;
|
|
15814
15769
|
const e3 = { ...t3.props, ...n2.props };
|
|
@@ -15819,35 +15774,35 @@
|
|
|
15819
15774
|
return { ...t3, props: { ...t3.props, id: t3.id, destroy: e3 }, destroy: e3 };
|
|
15820
15775
|
}
|
|
15821
15776
|
});
|
|
15822
|
-
if (Object.assign(
|
|
15777
|
+
if (Object.assign(ge, o2), !a2) {
|
|
15823
15778
|
const e3 = r2(n2);
|
|
15824
|
-
|
|
15779
|
+
ge.push({ ...n2, props: { ...n2.props, id: n2.id, destroy: e3 }, destroy: e3 });
|
|
15825
15780
|
}
|
|
15826
|
-
},
|
|
15781
|
+
}, ke = { info: { light: "#1677ff", dark: "#1677ff" }, success: { light: "#52c41a", dark: "#49aa19" }, error: { light: "#ff4d4f", dark: "#a61d24" }, warning: { light: "#faad14", dark: "#d89614" }, loading: { light: "#9254de", dark: "#f5f5f5" } }, we = (e2, t2) => ke[e2][t2], Se = (e2) => {
|
|
15827
15782
|
switch (e2) {
|
|
15828
15783
|
case "success":
|
|
15829
|
-
return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", fill:
|
|
15784
|
+
return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", fill: we(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" }) });
|
|
15830
15785
|
case "error":
|
|
15831
|
-
return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", fill:
|
|
15786
|
+
return d.jsx("svg", { className: "ono-type-icon", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", fill: we(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" }) });
|
|
15832
15787
|
case "loading":
|
|
15833
|
-
return d.jsx("svg", { className: ["ono-info-icon", "ono-loading"].join(" "), viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill:
|
|
15788
|
+
return d.jsx("svg", { className: ["ono-info-icon", "ono-loading"].join(" "), viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill: we(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" }) });
|
|
15834
15789
|
default:
|
|
15835
|
-
return d.jsx("svg", { className: "ono-info-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "exclamation-circle", fill:
|
|
15790
|
+
return d.jsx("svg", { className: "ono-info-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "exclamation-circle", fill: we(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }) });
|
|
15836
15791
|
}
|
|
15837
|
-
},
|
|
15792
|
+
}, xe = ({ handleDestroy: e2 }) => d.jsx("button", { onClick: e2, children: d.jsx("svg", { className: "ono-clear-icon", viewBox: "64 64 896 896", focusable: "false", "data-icon": "close-circle", fill: "currentColor", "aria-hidden": "true", children: d.jsx("path", { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" }) }) }), Ce = ({ id: e2, instancesKey: n2, duration: r2 = 3e3, speed: a2 = 300, offset: o2 = 20, message: l2, type: i2, plain: s2 = true, showClose: u2 = false, zIndex: c2, onClose: f2 = () => {
|
|
15838
15793
|
}, destroy: p2 }) => {
|
|
15839
15794
|
const [, h2] = t.useState(false), [m2, g2] = t.useState(0), [y2, b2] = t.useState(((e3) => {
|
|
15840
|
-
const t2 =
|
|
15841
|
-
return t2 <= 0 ? 0 :
|
|
15795
|
+
const t2 = ge.findIndex((t3) => t3.id === e3);
|
|
15796
|
+
return t2 <= 0 ? 0 : ge[t2 - 1].offsetOptions.topOffset;
|
|
15842
15797
|
})(e2)), [v2, k2] = t.useState({ duration: r2, speed: a2, message: l2, type: i2, showClose: u2, onClose: f2 }), w2 = t.useRef(null), S2 = t.useRef(null), x2 = t.useRef(null), C2 = y2 + m2, E2 = t.useMemo(() => ({ transform: `translate(-50%, ${y2}px)`, transition: `transform ${a2}ms ease-in-out`, zIndex: c2 }), [y2, a2]), T2 = () => {
|
|
15843
|
-
x2.current && (x2.current.classList.remove("ono-message-enter"), x2.current.classList.add("ono-message-leave"), x2.current.style.transform = `translate(-50%, ${
|
|
15844
|
-
const t2 =
|
|
15845
|
-
-1 !== t2 &&
|
|
15798
|
+
x2.current && (x2.current.classList.remove("ono-message-enter"), x2.current.classList.add("ono-message-leave"), x2.current.style.transform = `translate(-50%, ${be(e2) - m2}px)`, ((e3) => {
|
|
15799
|
+
const t2 = ge.findIndex((t3) => t3.id === e3);
|
|
15800
|
+
-1 !== t2 && ge.splice(t2, 1);
|
|
15846
15801
|
})(e2), setTimeout(() => p2(v2.onClose), a2));
|
|
15847
15802
|
}, P2 = (e3, t2, n3) => {
|
|
15848
15803
|
"loading" !== e3 && (w2.current = setTimeout(T2, t2 - n3));
|
|
15849
15804
|
}, z2 = () => {
|
|
15850
|
-
const t2 =
|
|
15805
|
+
const t2 = be(e2);
|
|
15851
15806
|
h2((e3) => (e3 && b2(t2 + o2), true)), requestAnimationFrame(z2);
|
|
15852
15807
|
}, _2 = t.useCallback(() => {
|
|
15853
15808
|
if ("loading" === v2.type) {
|
|
@@ -15855,7 +15810,7 @@
|
|
|
15855
15810
|
S2.current = setTimeout(() => {
|
|
15856
15811
|
var _a;
|
|
15857
15812
|
S2.current = null;
|
|
15858
|
-
const e3 = (t2 = n2 || "") ? (_a =
|
|
15813
|
+
const e3 = (t2 = n2 || "") ? (_a = ge.find((e4) => e4.key === t2)) == null ? void 0 : _a.props : null;
|
|
15859
15814
|
var t2;
|
|
15860
15815
|
e3 && (((e4) => {
|
|
15861
15816
|
k2((t3) => ({ ...t3, ...e4 }));
|
|
@@ -15873,43 +15828,43 @@
|
|
|
15873
15828
|
})();
|
|
15874
15829
|
}, [x2]), t.useEffect(() => {
|
|
15875
15830
|
((e3, t2) => {
|
|
15876
|
-
const n3 =
|
|
15877
|
-
n3 < 0 || (
|
|
15831
|
+
const n3 = ge.findIndex((t3) => t3.id === e3);
|
|
15832
|
+
n3 < 0 || (ge[n3].offsetOptions = t2);
|
|
15878
15833
|
})(e2, { topOffset: y2, height: m2, bottomOffset: C2 });
|
|
15879
15834
|
}, [C2]), d.jsx("div", { ref: x2, className: ["ono-message", `ono-message-${v2.type}`, "ono-message-enter", s2 ? "" : "ono-message-color"].filter(Boolean).join(" "), style: E2, onMouseEnter: () => {
|
|
15880
15835
|
w2.current && (clearTimeout(w2.current), w2.current = null);
|
|
15881
|
-
}, onMouseLeave: () => P2(v2.type, v2.duration, v2.speed), children: "function" == typeof v2.message ? v2.message(
|
|
15882
|
-
},
|
|
15836
|
+
}, onMouseLeave: () => P2(v2.type, v2.duration, v2.speed), children: "function" == typeof v2.message ? v2.message(Se(v2.type), v2.showClose && d.jsx(xe, { handleDestroy: T2 })) : d.jsxs(d.Fragment, { children: [Se(v2.type), d.jsx("div", { children: v2.message }), v2.showClose && d.jsx(xe, { handleDestroy: T2 })] }) });
|
|
15837
|
+
}, Ee = (e2) => {
|
|
15883
15838
|
if ("string" == typeof e2) return { message: e2 };
|
|
15884
15839
|
{
|
|
15885
15840
|
const t2 = { ...e2, instancesKey: e2.key };
|
|
15886
15841
|
return delete t2.key, { ...t2 };
|
|
15887
15842
|
}
|
|
15888
|
-
},
|
|
15889
|
-
|
|
15843
|
+
}, Te = { info: (e2) => {
|
|
15844
|
+
ye(Ce, { ...Ee(e2), type: "info" }, "ono-message");
|
|
15890
15845
|
}, success: (e2) => {
|
|
15891
|
-
|
|
15846
|
+
ye(Ce, { ...Ee(e2), type: "success" }, "ono-message");
|
|
15892
15847
|
}, warning: (e2) => {
|
|
15893
|
-
|
|
15848
|
+
ye(Ce, { ...Ee(e2), type: "warning" }, "ono-message");
|
|
15894
15849
|
}, error: (e2) => {
|
|
15895
|
-
|
|
15850
|
+
ye(Ce, { ...Ee(e2), type: "error" }, "ono-message");
|
|
15896
15851
|
}, loading: (e2) => {
|
|
15897
|
-
|
|
15898
|
-
} },
|
|
15899
|
-
const t2 = e2.match(
|
|
15852
|
+
ye(Ce, { ...Ee(e2), type: "loading" }, "ono-message");
|
|
15853
|
+
} }, Pe = /\d+/g, ze = (e2) => {
|
|
15854
|
+
const t2 = e2.match(Pe), n2 = (e3) => Number(e3).toString(16).padStart(2, "0"), r2 = (e3) => e3.reduce((e4, t3) => e4 + n2(t3), "#"), a2 = (e3) => {
|
|
15900
15855
|
const t3 = e3, a3 = 1 !== Number(e3[e3.length - 1]) ? Number(e3[e3.length - 1]) : 100;
|
|
15901
15856
|
return t3.pop(), r2(t3) + n2(2.56 * a3);
|
|
15902
15857
|
};
|
|
15903
15858
|
return 3 === t2.length ? r2(t2) : 5 === t2.length ? a2([t2[0], t2[1], t2[2], 10 * Number(t2[t2.length - 1])]) : a2(t2);
|
|
15904
|
-
},
|
|
15859
|
+
}, _e = (e2) => {
|
|
15905
15860
|
const t2 = e2.split("#")[1], n2 = (e3) => [parseInt(e3.slice(0, 2), 16), parseInt(e3.slice(2, 4), 16), parseInt(e3.slice(4, 6), 16)];
|
|
15906
15861
|
if (8 === t2.length) {
|
|
15907
15862
|
const e3 = parseInt(t2.slice(-2), 16) / 256, r2 = n2(t2.slice(0, -2));
|
|
15908
15863
|
return r2.push(e3), "rgba(" + r2.join(", ") + ")";
|
|
15909
15864
|
}
|
|
15910
15865
|
return "rgb(" + n2(t2).join(", ") + ")";
|
|
15911
|
-
},
|
|
15912
|
-
const t2 = e2.match(
|
|
15866
|
+
}, Re = (e2) => {
|
|
15867
|
+
const t2 = e2.match(Pe), n2 = Number(t2[0]) / 255, r2 = Number(t2[1]) / 255, a2 = Number(t2[2]) / 255, o2 = Math.min(n2, r2, a2), l2 = Math.max(n2, r2, a2);
|
|
15913
15868
|
let i2 = 0, s2 = 0, u2 = (l2 + o2) / 2;
|
|
15914
15869
|
if (l2 === o2) i2 = s2 = 0;
|
|
15915
15870
|
else {
|
|
@@ -15927,16 +15882,16 @@
|
|
|
15927
15882
|
i2 /= 6;
|
|
15928
15883
|
}
|
|
15929
15884
|
return `hsl(${Math.round(360 * i2)}, ${Math.round(100 * s2)}%, ${Math.round(100 * u2)}%)`;
|
|
15930
|
-
},
|
|
15931
|
-
const t2 = e2.match(
|
|
15885
|
+
}, Ne = (e2) => {
|
|
15886
|
+
const t2 = e2.match(Pe), n2 = Number(t2[0]) / 360, r2 = Number(t2[1]) / 100, a2 = Number(t2[2]) / 100;
|
|
15932
15887
|
let o2, l2, i2;
|
|
15933
15888
|
function s2(e3, t3, n3) {
|
|
15934
15889
|
return n3 < 0 && (n3 += 1), n3 > 1 && (n3 -= 1), n3 < 1 / 6 ? e3 + 6 * (t3 - e3) * n3 : n3 < 0.5 ? t3 : n3 < 2 / 3 ? e3 + (t3 - e3) * (2 / 3 - n3) * 6 : e3;
|
|
15935
15890
|
}
|
|
15936
15891
|
let u2 = a2 < 0.5 ? a2 * (1 + r2) : a2 + r2 - a2 * r2, c2 = 2 * a2 - u2;
|
|
15937
15892
|
return o2 = s2(c2, u2, n2 + 1 / 3), l2 = s2(c2, u2, n2), i2 = s2(c2, u2, n2 - 1 / 3), `rgb(${Math.round(255 * o2)}, ${Math.round(255 * l2)}, ${Math.round(255 * i2)})`;
|
|
15938
|
-
},
|
|
15939
|
-
const t2 = e2.match(
|
|
15893
|
+
}, Le = (e2) => Re(_e(e2)), De = (e2) => ze(Ne(e2)), Oe = (e2) => {
|
|
15894
|
+
const t2 = e2.match(Pe);
|
|
15940
15895
|
let n2 = Number(t2[0]) / 255, r2 = Number(t2[1]) / 255, a2 = Number(t2[2]) / 255;
|
|
15941
15896
|
const o2 = Math.max(n2, r2, a2), l2 = Math.min(n2, r2, a2);
|
|
15942
15897
|
let i2 = 0, s2 = 0, u2 = o2;
|
|
@@ -15956,8 +15911,8 @@
|
|
|
15956
15911
|
i2 /= 6;
|
|
15957
15912
|
}
|
|
15958
15913
|
return `hsv(${360 * i2}, ${100 * s2}, ${100 * u2})`;
|
|
15959
|
-
},
|
|
15960
|
-
const t2 = e2.match(
|
|
15914
|
+
}, Me = (e2) => {
|
|
15915
|
+
const t2 = e2.match(Pe);
|
|
15961
15916
|
let n2, r2, a2, o2, l2, i2, s2, u2, c2 = Number(t2[0]) / 360, d2 = Number(t2[1]) / 100, f2 = Number(t2[2]) / 100;
|
|
15962
15917
|
if (c2 && 0 === d2) n2 = r2 = a2 = f2;
|
|
15963
15918
|
else switch (c2 /= 60, o2 = Math.floor(c2), l2 = c2 - o2, i2 = f2 * (1 - d2), s2 = f2 * (1 - d2 * l2), u2 = f2 * (1 - d2 * (1 - l2)), o2) {
|
|
@@ -15980,16 +15935,16 @@
|
|
|
15980
15935
|
n2 = f2, r2 = i2, a2 = s2;
|
|
15981
15936
|
}
|
|
15982
15937
|
return `rgb(${Math.round(255 * n2)}, ${Math.round(255 * r2)}, ${Math.round(255 * a2)})`;
|
|
15983
|
-
},
|
|
15938
|
+
}, Fe = (e2) => /^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) ? "hex" : /^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2) ? "rgb" : "unknown", Ie = (e2, t2, n2) => {
|
|
15984
15939
|
let r2 = [];
|
|
15985
|
-
if (e2.includes("#")) r2 =
|
|
15986
|
-
else if (e2.includes("rgb")) r2 =
|
|
15940
|
+
if (e2.includes("#")) r2 = Le(e2).match(Pe);
|
|
15941
|
+
else if (e2.includes("rgb")) r2 = Re(e2).match(Pe);
|
|
15987
15942
|
else {
|
|
15988
15943
|
if (!e2.includes("hsl")) throw new Error("颜色格式错误");
|
|
15989
|
-
r2 = e2.match(
|
|
15944
|
+
r2 = e2.match(Pe);
|
|
15990
15945
|
}
|
|
15991
|
-
return
|
|
15992
|
-
},
|
|
15946
|
+
return De(`${r2[0]}, ${r2[1]}%, ${"light" === t2 ? Number(r2[2]) + n2 > 100 ? 100 : Number(r2[2]) + n2 : Number(r2[2]) - n2 < 0 ? 0 : Number(r2[2]) - n2}%`);
|
|
15947
|
+
}, Ae = { randomColor: () => "#" + Math.random().toString(16).slice(2, 8).padEnd(6, "0"), rgb2hex: ze, hex2rgb: _e, rgb2rgba: (e2, t2) => {
|
|
15993
15948
|
if (!t2) return e2;
|
|
15994
15949
|
if (e2.includes("rgba")) {
|
|
15995
15950
|
const n2 = e2.split(",");
|
|
@@ -15999,10 +15954,10 @@
|
|
|
15999
15954
|
const n2 = e2.split(","), r2 = "rgba(" + n2[0].split("(")[1], a2 = n2[n2.length - 1].split(")")[0];
|
|
16000
15955
|
return [r2, n2[1], a2, " " + t2 + ")"].join(",");
|
|
16001
15956
|
}
|
|
16002
|
-
}, rgb2hsl:
|
|
16003
|
-
const r2 = e2.match(
|
|
15957
|
+
}, rgb2hsl: Re, hsl2rgb: Ne, hex2hsl: Le, hsl2hex: De, rgb2hsv: Oe, hsv2rgb: Me, hex2hsv: (e2) => Oe(_e(e2)), hsv2hex: (e2) => ze(Me(e2)), formatColor: (e2, t2, n2 = "rgba") => {
|
|
15958
|
+
const r2 = e2.match(Pe);
|
|
16004
15959
|
let a2 = Number(r2[0]) / 255, o2 = Number(r2[1]) / 255, l2 = Number(r2[2]) / 255;
|
|
16005
|
-
return "rgba" === n2 ? `rgba(${a2},${o2},${l2},${t2})` : "rgb" === n2 ? e2 : "hex" === n2 ?
|
|
15960
|
+
return "rgba" === n2 ? `rgba(${a2},${o2},${l2},${t2})` : "rgb" === n2 ? e2 : "hex" === n2 ? ze(e2) : "hsl" === n2 ? Re(`rgba(${a2},${o2},${l2},${t2})`) : `rgba(${a2},${o2},${l2},${t2})`;
|
|
16006
15961
|
}, getContrastColor: (e2) => {
|
|
16007
15962
|
const t2 = (function(e3) {
|
|
16008
15963
|
if (e3.startsWith("#")) return 4 === e3.length && (e3 = `#${e3.slice(1).repeat(2)}`), [parseInt(e3.substr(1, 2), 16), parseInt(e3.substr(3, 2), 16), parseInt(e3.substr(5, 2), 16)];
|
|
@@ -16015,7 +15970,7 @@
|
|
|
16015
15970
|
return null === t2 ? null : (299 * (n2 = t2)[0] + 587 * n2[1] + 114 * n2[2]) / 1e3 > 128 ? "#000" : "#fff";
|
|
16016
15971
|
var n2;
|
|
16017
15972
|
}, adjustColor: (e2, t2, n2) => {
|
|
16018
|
-
const r2 =
|
|
15973
|
+
const r2 = Fe(e2);
|
|
16019
15974
|
if ("hex" === r2) {
|
|
16020
15975
|
const r3 = e2.replace("#", ""), a2 = parseInt(r3.slice(0, 2), 16), o2 = parseInt(r3.slice(2, 4), 16), l2 = parseInt(r3.slice(4, 6), 16);
|
|
16021
15976
|
if ("lighten" === t2) {
|
|
@@ -16032,13 +15987,13 @@
|
|
|
16032
15987
|
if ("darken" === t2) return `rgb(${Math.min(255, Math.max(0, a2 - a2 * n2 / 100))},${Math.min(255, Math.max(0, o2 - o2 * n2 / 100))},${Math.min(255, Math.max(0, l2 - l2 * n2 / 100))})`;
|
|
16033
15988
|
}
|
|
16034
15989
|
return e2;
|
|
16035
|
-
}, isValidColor: (e2) => !(!/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) && !/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2)), getColorType:
|
|
15990
|
+
}, isValidColor: (e2) => !(!/^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})$/.test(e2) && !/^rgb\((1?\d{1,3},\s*1?\d{1,3},\s*1?\d{1,3})\)$/.test(e2)), getColorType: Fe, hex3To6: (e2) => {
|
|
16036
15991
|
const t2 = e2.replace("#", "").split("");
|
|
16037
15992
|
return `#${t2[0] + t2[0] + t2[1] + t2[1] + t2[2] + t2[2]}`;
|
|
16038
|
-
}, adjustingColors:
|
|
15993
|
+
}, adjustingColors: Ie }, je = ({ title: e2 = "This is a modal title", icon: n2, content: r2 = "This is a modal content", okText: a2 = "confirm", cancelText: o2 = "cancel", isLoading: l2, confirmDisabled: i2, cancelDisabled: s2, position: u2, onConfirm: c2 = () => {
|
|
16039
15994
|
}, onCancel: f2 = () => {
|
|
16040
15995
|
}, mask: p2 = true, maskClosable: h2 = false, width: m2, btnClr: g2, footer: y2 = ({ OkBtn: e3, CancelBtn: t2 }) => d.jsxs(d.Fragment, { children: [d.jsx(t2, {}), d.jsx(e3, {})] }), modalBody: b2, destroy: v2 }) => {
|
|
16041
|
-
const k2 = t.useRef(null), w2 = t.useRef(null), S2 = [{ label: "themeColor", value: g2 || "" }, { label: "themeHoverColor", value: g2 &&
|
|
15996
|
+
const k2 = t.useRef(null), w2 = t.useRef(null), S2 = [{ label: "themeColor", value: g2 || "" }, { label: "themeHoverColor", value: g2 && Ie(g2, "light", 10) || "" }, { label: "themeActiveColor", value: g2 && Ie(g2, "dark", 20) || "" }, { label: "themeDisabledClr", value: g2 && Ie(g2, "light", 20) || "" }], x2 = () => {
|
|
16042
15997
|
if (u2) {
|
|
16043
15998
|
if (!w2.current) return;
|
|
16044
15999
|
w2.current.classList.remove("ono-modal-enter"), w2.current.classList.add("ono-modal-leave"), setTimeout(() => {
|
|
@@ -16059,7 +16014,7 @@
|
|
|
16059
16014
|
}, children: [l2 && d.jsx("svg", { className: "ono-modal-box-footer-confirmBtn-loading", viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "loading", fill: "currentColor", "aria-hidden": "true", children: d.jsx("path", { d: "M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z" }) }), a2 ?? "Confirm"] }), CancelBtn: () => d.jsx("button", { className: "ono-modal-box-footer-cancelBtn", disabled: s2 || l2, onClick: () => {
|
|
16060
16015
|
f2(), x2();
|
|
16061
16016
|
}, children: o2 ?? "Cancel" }), handleClose: () => x2() }) })] }) });
|
|
16062
|
-
},
|
|
16017
|
+
}, Ue = ({ name: e2, value: n2, style: r2, checked: a2, onChange: o2, children: l2, className: i2, radioW: s2 = 16, radioGap: u2 = 4, checkedColor: c2 = "#532ce1", unCheckedColor: f2 = "transparent", disabled: p2 = false }) => {
|
|
16063
16018
|
const [h2, m2] = t.useState(""), g2 = t.useRef(null), y2 = t.useRef(null), b2 = t.useRef(null), v2 = [{ value: s2, name: "w" }, { value: u2, name: "gap" }, { value: c2, name: "checkedColor" }, { value: f2, name: "unCheckedColor" }];
|
|
16064
16019
|
return t.useEffect(() => {
|
|
16065
16020
|
(() => {
|
|
@@ -16077,86 +16032,96 @@
|
|
|
16077
16032
|
var _a;
|
|
16078
16033
|
return (_a = g2.current) == null ? void 0 : _a.click();
|
|
16079
16034
|
}, children: d.jsx("input", { type: "radio", name: e2, ref: g2, value: n2 + "", checked: a2, disabled: p2, id: n2 + "" + l2, onChange: o2 }) }), l2 && d.jsx("label", { htmlFor: n2 + "" + l2 || "", children: l2 })] });
|
|
16080
|
-
},
|
|
16081
|
-
let
|
|
16082
|
-
const
|
|
16083
|
-
|
|
16035
|
+
}, He = ({ label: e2, value: t2, disabled: n2, onChange: r2, optionRender: a2, currentValue: o2 }) => d.jsx("button", { role: "option", "aria-label": e2, disabled: n2, className: "ono-option-item", onClick: () => r2 == null ? void 0 : r2(t2), children: a2 ? a2({ label: e2, value: t2, disabled: n2 }, o2 === e2) : d.jsx("div", { className: ["ono-option-item-content", o2 === e2 ? "ono-option-item-content-active" : "", n2 ? "ono-option-item-content-disabled" : ""].filter(Boolean).join(" "), children: e2 }) }), Be = ({ isVisible: e2 }) => d.jsx("svg", { className: ["ono-select-arrow-down-icon", e2 ? "ono-select-arrow-down-active" : ""].filter(Boolean).join(" "), viewBox: "64 64 896 896", focusable: "false", "data-icon": "down", fill: "currentColor", "aria-hidden": "true", children: d.jsx("path", { d: "M884 256h-75c-5.1 0-9.9 2.5-12.9 6.6L512 654.2 227.9 262.6c-3-4.1-7.8-6.6-12.9-6.6h-75c-6.5 0-10.3 7.4-6.5 12.7l352.6 486.1c12.8 17.6 39 17.6 51.7 0l352.6-486.1c3.9-5.3.1-12.7-6.4-12.7z" }) });
|
|
16036
|
+
let We, $e = null;
|
|
16037
|
+
const Ve = ({ className: e2, content: t2, style: n2, onClick: r2, onDoubleClick: a2, onContextMenu: o2, onMouseDown: l2, onMouseUp: i2, onMouseEnter: s2, onMouseLeave: u2, onMouseMove: c2, isClickBoxToClose: f2 }) => (X("click", () => {
|
|
16038
|
+
f2 && $e && ($e.remove(), $e = null);
|
|
16084
16039
|
}), d.jsx("div", { className: e2, style: n2, onClick: r2, onDoubleClick: a2, onContextMenu: o2, onMouseDown: l2, onMouseUp: i2, onMouseEnter: s2, onMouseLeave: u2, onMouseMove: c2, children: "function" == typeof t2 ? t2((e3) => {
|
|
16085
|
-
|
|
16086
|
-
}) : t2 })),
|
|
16087
|
-
let
|
|
16088
|
-
const
|
|
16040
|
+
$e && ($e.remove(), $e = null, e3 && e3());
|
|
16041
|
+
}) : t2 })), qe = "_enter_974ly_32";
|
|
16042
|
+
let Qe = [];
|
|
16043
|
+
const Ye = { success: { light: "#52c41a", dark: "#49aa19" }, error: { light: "#ff4d4f", dark: "#a61d24" }, warning: { light: "#faad14", dark: "#d89614" }, promise: { light: "", dark: "" } }, Ke = (e2, t2) => Ye[e2][t2], Xe = (e2) => {
|
|
16089
16044
|
switch (e2) {
|
|
16090
16045
|
case "success":
|
|
16091
|
-
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", width: "24px", height: "24px", fill:
|
|
16046
|
+
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "check-circle", width: "24px", height: "24px", fill: Ke(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z" }) });
|
|
16092
16047
|
case "error":
|
|
16093
|
-
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", width: "24px", height: "24px", fill:
|
|
16048
|
+
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "close-circle", width: "24px", height: "24px", fill: Ke(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64c247.4 0 448 200.6 448 448S759.4 960 512 960 64 759.4 64 512 264.6 64 512 64zm127.98 274.82h-.04l-.08.06L512 466.75 384.14 338.88c-.04-.05-.06-.06-.08-.06a.12.12 0 00-.07 0c-.03 0-.05.01-.09.05l-45.02 45.02a.2.2 0 00-.05.09.12.12 0 000 .07v.02a.27.27 0 00.06.06L466.75 512 338.88 639.86c-.05.04-.06.06-.06.08a.12.12 0 000 .07c0 .03.01.05.05.09l45.02 45.02a.2.2 0 00.09.05.12.12 0 00.07 0c.02 0 .04-.01.08-.05L512 557.25l127.86 127.87c.04.04.06.05.08.05a.12.12 0 00.07 0c.03 0 .05-.01.09-.05l45.02-45.02a.2.2 0 00.05-.09.12.12 0 000-.07v-.02a.27.27 0 00-.05-.06L557.25 512l127.87-127.86c.04-.04.05-.06.05-.08a.12.12 0 000-.07c0-.03-.01-.05-.05-.09l-45.02-45.02a.2.2 0 00-.09-.05.12.12 0 00-.07 0z" }) });
|
|
16094
16049
|
case "warning":
|
|
16095
|
-
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "exclamation-circle", width: "24px", height: "24px", fill:
|
|
16050
|
+
return d.jsx("svg", { viewBox: "0 0 1024 1024", focusable: "false", "data-icon": "exclamation-circle", width: "24px", height: "24px", fill: Ke(e2, "light"), "aria-hidden": "true", children: d.jsx("path", { d: "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" }) });
|
|
16096
16051
|
}
|
|
16097
|
-
},
|
|
16052
|
+
}, Ge = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, className: o2, style: l2, isUseEnterAnimation: i2 = true, promiseOptions: s2, toastList: u2, handleDestroy: c2 }) => {
|
|
16098
16053
|
const f2 = t.useRef(null);
|
|
16099
16054
|
return t.useEffect(() => {
|
|
16100
|
-
f2.current && (f2.current.style.setProperty("--speed", n2 / 1e3 + "s"), i2 && f2.current.classList.add(
|
|
16055
|
+
f2.current && (f2.current.style.setProperty("--speed", n2 / 1e3 + "s"), i2 && f2.current.classList.add(qe), "promise" !== e2 && setTimeout(() => {
|
|
16101
16056
|
var _a, _b;
|
|
16102
|
-
(_a = f2.current) == null ? void 0 : _a.classList.remove(
|
|
16057
|
+
(_a = f2.current) == null ? void 0 : _a.classList.remove(qe), (_b = f2.current) == null ? void 0 : _b.classList.add("_leave_974ly_36");
|
|
16103
16058
|
}, a2 - n2));
|
|
16104
16059
|
}, [f2]), t.useEffect(() => {
|
|
16105
16060
|
"promise" === e2 ? ("function" == typeof r2 ? r2() : r2).then((e3) => setTimeout(() => {
|
|
16106
|
-
c2(),
|
|
16061
|
+
c2(), Ze({ type: "success", message: "function" == typeof (s2 == null ? void 0 : s2.success) ? s2.success(e3) : (s2 == null ? void 0 : s2.success) || "", isUseEnterAnimation: false, toastList: u2 });
|
|
16107
16062
|
}, n2)).catch((e3) => setTimeout(() => {
|
|
16108
|
-
c2(),
|
|
16063
|
+
c2(), Ze({ type: "error", message: "function" == typeof (s2 == null ? void 0 : s2.error) ? s2.error(e3) : (s2 == null ? void 0 : s2.error) || "", isUseEnterAnimation: false, toastList: u2 });
|
|
16109
16064
|
}, n2)) : setTimeout(() => c2(() => u2 = []), a2);
|
|
16110
|
-
}, [e2]), d.jsxs("div", { ref: f2, className: ["promise" === e2 ? "
|
|
16111
|
-
}, children: [d.jsx("div", { className: "
|
|
16112
|
-
},
|
|
16113
|
-
return (f2 = (p2 = { className: "
|
|
16114
|
-
}, [c2]), d.jsx(
|
|
16065
|
+
}, [e2]), d.jsxs("div", { ref: f2, className: ["promise" === e2 ? "_promise_974ly_15" : "_base_974ly_15", o2].join(" "), style: l2, onClick: () => {
|
|
16066
|
+
}, children: [d.jsx("div", { className: "_icon_974ly_40", children: Xe(e2) }), d.jsx("p", { children: "string" == typeof r2 ? r2 : s2 && s2.loading })] });
|
|
16067
|
+
}, Ze = ({ type: e2, speed: n2 = 200, message: r2, duration: a2 = 2e3, zIndex: o2 = 9999, className: l2, style: i2, isUseEnterAnimation: s2 = true, promiseOptions: u2, toastList: c2 }) => {
|
|
16068
|
+
return (f2 = (p2 = { className: "_container_974ly_1", isSingle: true, style: { zIndex: o2 }, content: (o3) => (t.useEffect(() => {
|
|
16069
|
+
}, [c2]), d.jsx(Ge, { className: l2, style: i2, type: e2, message: r2, speed: n2, duration: a2, isUseEnterAnimation: s2, promiseOptions: u2, handleDestroy: o3, toastList: c2 })) }).isSingle || false, f2 && $e && We || ($e = document.createElement("div"), document.body.appendChild($e), We = pe.createRoot($e)), We).render(d.jsx(Ve, { ...p2 })), $e;
|
|
16115
16070
|
var f2, p2;
|
|
16116
|
-
},
|
|
16117
|
-
|
|
16071
|
+
}, Je = { success: (e2) => {
|
|
16072
|
+
Qe.push({ type: "success", message: e2 }), Ze("string" == typeof e2 ? { type: "success", message: e2, toastList: Qe } : { type: "success", ...e2, toastList: Qe });
|
|
16118
16073
|
}, error: (e2) => {
|
|
16119
|
-
|
|
16074
|
+
Qe.push({ type: "error", message: e2 }), Ze("string" == typeof e2 ? { type: "error", message: e2, toastList: Qe } : { type: "error", ...e2, toastList: Qe });
|
|
16120
16075
|
}, warning: (e2) => {
|
|
16121
|
-
|
|
16076
|
+
Qe.push({ type: "warning", message: e2 }), Ze("string" == typeof e2 ? { type: "warning", message: e2, toastList: Qe } : { type: "warning", ...e2, toastList: Qe });
|
|
16122
16077
|
}, promise: (e2, t2) => {
|
|
16123
|
-
|
|
16124
|
-
} }
|
|
16125
|
-
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16078
|
+
Qe.push({ type: "promise", message: e2 }), Ze({ type: "promise", message: e2, promiseOptions: t2, toastList: Qe });
|
|
16079
|
+
} }, et = (e2, t2, n2) => X(((e3) => {
|
|
16080
|
+
const t3 = "string" == typeof e3 ? [e3] : e3;
|
|
16081
|
+
if (new Set(t3).size !== t3.length) throw new Error("there are duplicates in the event type");
|
|
16082
|
+
return t3;
|
|
16083
|
+
})((n2 == null ? void 0 : n2.event) || "click"), (n3) => {
|
|
16084
|
+
if (e2) if (e2 instanceof Array) e2.map((e3) => e3 instanceof HTMLElement ? e3 : e3.current).some((e3) => !!e3 && e3.contains(n3.target)) || t2(n3);
|
|
16085
|
+
else {
|
|
16086
|
+
const r2 = e2 instanceof HTMLElement ? e2 : e2.current;
|
|
16087
|
+
r2 && !r2.contains(n3.target) && t2(n3);
|
|
16088
|
+
}
|
|
16089
|
+
}, { deps: [e2, ...(n2 == null ? void 0 : n2.deps) || []] });
|
|
16090
|
+
let tt = null, nt = null;
|
|
16091
|
+
const rt = ({ children: e2, content: n2, onOpenChange: a2, trigger: o2 = "hover", placement: l2 = "top", popperOptions: i2 = {}, className: s2, style: u2, isShowArrow: c2 = true, sameWidth: f2, autoAdjustOverflow: p2 = true }) => {
|
|
16092
|
+
const [h2, m2] = t.useState(false), g2 = t.useRef(null), y2 = t.useRef(null), b2 = (e3) => {
|
|
16093
|
+
a2 == null ? void 0 : a2(e3), m2(e3);
|
|
16129
16094
|
};
|
|
16130
|
-
return
|
|
16131
|
-
"click" !== o2 && "contextmenu" !== o2 ||
|
|
16095
|
+
return et(y2, () => {
|
|
16096
|
+
"click" !== o2 && "contextmenu" !== o2 || b2(false);
|
|
16132
16097
|
}, { event: ["click", "contextmenu"], deps: [o2, a2] }), t.useEffect(() => {
|
|
16133
16098
|
(() => {
|
|
16134
|
-
if (!
|
|
16135
|
-
const e3 = Array.from(
|
|
16099
|
+
if (!y2.current) return;
|
|
16100
|
+
const e3 = Array.from(y2.current.children);
|
|
16136
16101
|
if (e3.length > 1) throw new Error("Tooltip only support one child");
|
|
16137
|
-
|
|
16102
|
+
y2.current.style.width = e3[0].getBoundingClientRect().width + "px";
|
|
16138
16103
|
})();
|
|
16139
|
-
}, [
|
|
16140
|
-
|
|
16104
|
+
}, [y2, e2]), t.useEffect(() => {
|
|
16105
|
+
y2.current && ("hover" === o2 ? (y2.current.onmouseenter = () => b2(true), y2.current.onmouseleave = () => b2(false)) : "click" === o2 ? y2.current.onclick = () => b2(!h2) : "focus" === o2 ? (y2.current.onfocus = () => b2(true), y2.current.onblur = () => b2(false)) : y2.current.oncontextmenu = () => b2(!h2)), h2 && y2.current && g2.current ? nt = r.createPopper(y2.current, g2.current, { placement: l2, modifiers: [{ name: "offset", options: { offset: [0, 6] } }, f2 ? { name: "sameWidth", enabled: true, phase: "beforeWrite", requires: ["computeStyles"], fn({ state: e3 }) {
|
|
16141
16106
|
e3.styles.popper.width = `${e3.rects.reference.width}px`;
|
|
16142
16107
|
}, effect({ state: e3 }) {
|
|
16143
16108
|
e3.elements.popper.style.width = `${e3.elements.reference.offsetWidth}px`;
|
|
16144
|
-
} } : {},
|
|
16145
|
-
}, [
|
|
16146
|
-
},
|
|
16147
|
-
const [
|
|
16109
|
+
} } : {}, p2 ? { name: "flip", enabled: true } : {}], ...i2 }) : nt && (nt.destroy(), nt = null, tt && tt.remove(), tt = null);
|
|
16110
|
+
}, [h2, y2, g2]), d.jsxs(d.Fragment, { children: [h2 && d.jsxs("div", { ref: g2, style: u2, className: ["ono-tooltip-popper", s2].join(" "), "data-popper-placement": i2.placement || l2, children: [d.jsx("div", { children: n2 instanceof Function ? n2() : n2 }), c2 && d.jsx("div", { className: "ono-tooltip-popper-arrow", "data-popper-arrow": true })] }), d.jsx("div", { ref: y2, children: e2 instanceof Function ? e2() : e2 })] });
|
|
16111
|
+
}, at = t.memo(({ containerClassName: e2, dataSource: n2, containerStyle: r2 = {}, onEndCallback: a2, refreshSpeed: o2 = 50, wrapperClassName: l2, wrapperStyle: i2 = {}, estimatedSize: s2 = 35, updateDataSourceScroll2Top: u2, direction: c2 = "vertical" }) => {
|
|
16112
|
+
const [f2, p2] = t.useState({ viewSize: 0, startIndex: 0, listSize: 0, renderCount: 0, prevLen: 0 }), [h2, m2] = t.useState([]), g2 = "number" == typeof s2 ? s2 : s2(), y2 = t.useMemo(() => Math.min(n2.length, f2.startIndex + f2.renderCount), [n2, f2]), b2 = t.useMemo(() => {
|
|
16148
16113
|
var _a;
|
|
16149
|
-
return
|
|
16150
|
-
}, [
|
|
16114
|
+
return f2.startIndex > 0 ? (_a = h2[f2.startIndex - 1]) == null ? void 0 : _a.end : 0;
|
|
16115
|
+
}, [f2.startIndex, h2]), v2 = t.useMemo(() => n2.slice(f2.startIndex, y2).map(({ id: e3, data: t2 }) => d.jsx("li", { "data-virtual-id": e3, style: "vertical" === c2 ? { width: "100%" } : { height: "100%" }, children: t2 }, e3)), [y2, n2, f2.startIndex, c2]), k2 = t.useMemo(() => ({ display: "flex", listStyle: "none", flexDirection: "vertical" === c2 ? "column" : "row", height: "vertical" === c2 ? f2.listSize - b2 + "px" : "100%", width: "vertical" === c2 ? "auto" : f2.listSize - b2 + "px", transform: "vertical" === c2 ? `translate3d(0, ${b2}px, 0)` : `translate3d(${b2}px, 0, 0)` }), [f2.listSize, b2, c2]), w2 = t.useRef(null), S2 = t.useRef(null), x2 = (e3) => p2((t2) => ({ ...t2, ...e3 })), C2 = /* @__PURE__ */ ((e3, t2 = 300) => {
|
|
16151
16116
|
let n3 = 0;
|
|
16152
16117
|
return () => {
|
|
16153
16118
|
const r3 = Date.now();
|
|
16154
16119
|
r3 - n3 >= t2 && (e3(), n3 = r3);
|
|
16155
16120
|
};
|
|
16156
16121
|
})(() => {
|
|
16157
|
-
const { scrollTop: e3, clientHeight: t2, scrollHeight: n3, scrollLeft: r3, clientWidth: o3, scrollWidth: l3 } =
|
|
16158
|
-
|
|
16159
|
-
}, o2),
|
|
16122
|
+
const { scrollTop: e3, clientHeight: t2, scrollHeight: n3, scrollLeft: r3, clientWidth: o3, scrollWidth: l3 } = w2.current, i3 = "vertical" === c2 ? n3 - t2 - e3 : l3 - o3 - r3;
|
|
16123
|
+
x2({ startIndex: E2(h2, "vertical" === c2 ? e3 : r3) }), ("vertical" === c2 ? e3 === g2 / 2 : r3 === g2 / 2) && x2({ startIndex: 0 }), i3 <= 20 && a2 && a2();
|
|
16124
|
+
}, o2), E2 = (e3, t2) => {
|
|
16160
16125
|
let n3 = 0, r3 = e3.length - 1, a3 = -1;
|
|
16161
16126
|
for (; n3 <= r3; ) {
|
|
16162
16127
|
const o3 = n3 + Math.floor((r3 - n3) / 2), l3 = e3[o3].end;
|
|
@@ -16165,42 +16130,77 @@
|
|
|
16165
16130
|
}
|
|
16166
16131
|
return a3;
|
|
16167
16132
|
};
|
|
16168
|
-
return
|
|
16133
|
+
return X("scroll", C2, { target: w2.current, deps: [h2, c2] }), t.useEffect(() => {
|
|
16169
16134
|
(() => {
|
|
16170
|
-
if (!
|
|
16171
|
-
const e3 = ("vertical" === c2 ?
|
|
16172
|
-
|
|
16135
|
+
if (!w2.current) return;
|
|
16136
|
+
const e3 = ("vertical" === c2 ? w2.current.offsetHeight : w2.current.offsetWidth) || 0;
|
|
16137
|
+
x2({ viewSize: e3, renderCount: Math.ceil(e3 / g2) + 1 });
|
|
16173
16138
|
})();
|
|
16174
|
-
}, [
|
|
16175
|
-
n2.length &&
|
|
16139
|
+
}, [w2, c2]), t.useEffect(() => {
|
|
16140
|
+
n2.length && S2 && (() => {
|
|
16176
16141
|
var _a;
|
|
16177
|
-
const e3 = [], t2 = n2.length -
|
|
16142
|
+
const e3 = [], t2 = n2.length - f2.prevLen, r3 = t2 > 0 ? h2.length : 0, a3 = r3 > 0 ? h2[r3 - 1].end : 0;
|
|
16178
16143
|
for (let r4 = 0; r4 < (t2 > 0 ? t2 : n2.length); r4++) {
|
|
16179
|
-
const o3 = n2[(t2 > 0 ?
|
|
16180
|
-
e3.push({ index: o3.id, size:
|
|
16144
|
+
const o3 = n2[(t2 > 0 ? f2.prevLen : 0) + r4];
|
|
16145
|
+
e3.push({ index: o3.id, size: g2, start: a3 ? a3 + r4 * g2 : o3.id * g2, end: a3 ? a3 + (r4 + 1) * g2 : (o3.id + 1) * g2, dSize: 0 });
|
|
16181
16146
|
}
|
|
16182
|
-
|
|
16147
|
+
m2((n3) => [...t2 > 0 ? n3 : [], ...e3]), x2({ prevLen: n2.length }), u2 && ((_a = w2.current) == null ? void 0 : _a.scrollTo(0, 0));
|
|
16183
16148
|
})();
|
|
16184
|
-
}, [
|
|
16149
|
+
}, [S2, n2, u2]), t.useEffect(() => {
|
|
16185
16150
|
(() => {
|
|
16186
|
-
if (!
|
|
16187
|
-
const e3 = Array.from(
|
|
16151
|
+
if (!S2.current || 0 === h2.length) return;
|
|
16152
|
+
const e3 = Array.from(S2.current.childNodes);
|
|
16188
16153
|
if (!e3.length) return;
|
|
16189
16154
|
e3.forEach((e4) => {
|
|
16190
|
-
const t3 = e4.getBoundingClientRect(), n4 = +e4.getAttribute("data-virtual-id"), r4 =
|
|
16155
|
+
const t3 = e4.getBoundingClientRect(), n4 = +e4.getAttribute("data-virtual-id"), r4 = h2[n4], a3 = r4.size - ("vertical" === c2 ? t3.height : t3.width);
|
|
16191
16156
|
a3 && (r4.size = "vertical" === c2 ? t3.height : t3.width, r4.end = r4.end - a3, r4.dSize = a3);
|
|
16192
16157
|
});
|
|
16193
|
-
const t2 = +e3[0].getAttribute("data-virtual-id"), n3 =
|
|
16194
|
-
let r3 =
|
|
16195
|
-
|
|
16158
|
+
const t2 = +e3[0].getAttribute("data-virtual-id"), n3 = h2.length;
|
|
16159
|
+
let r3 = h2[t2].dSize;
|
|
16160
|
+
h2[t2].dSize = 0;
|
|
16196
16161
|
for (let e4 = t2 + 1; e4 < n3; e4++) {
|
|
16197
|
-
const t3 =
|
|
16198
|
-
t3.start =
|
|
16162
|
+
const t3 = h2[e4];
|
|
16163
|
+
t3.start = h2[e4 - 1].end, t3.end = t3.end - r3, t3.dSize && (r3 += t3.dSize, t3.dSize = 0);
|
|
16164
|
+
}
|
|
16165
|
+
x2({ listSize: h2[n3 - 1].end });
|
|
16166
|
+
})();
|
|
16167
|
+
}, [S2, h2, f2.startIndex, c2]), d.jsx("div", { ref: w2, className: e2, style: { width: "100%", height: "100%", overflow: "auto", ...r2 }, children: d.jsx("ul", { ref: S2, className: l2, style: { ...k2, ...i2 }, children: v2 }) });
|
|
16168
|
+
});
|
|
16169
|
+
let ot = false;
|
|
16170
|
+
const lt = ({ theme: e2, onDark: n2, onLight: r2 }) => {
|
|
16171
|
+
const a2 = window.matchMedia("(prefers-color-scheme: dark)"), o2 = () => {
|
|
16172
|
+
a2.matches ? n2() : r2();
|
|
16173
|
+
};
|
|
16174
|
+
t.useEffect(() => {
|
|
16175
|
+
(() => {
|
|
16176
|
+
switch (ot && (ot = false, a2.removeEventListener("change", o2)), e2) {
|
|
16177
|
+
case "light":
|
|
16178
|
+
r2();
|
|
16179
|
+
break;
|
|
16180
|
+
case "dark":
|
|
16181
|
+
n2();
|
|
16182
|
+
break;
|
|
16183
|
+
default:
|
|
16184
|
+
o2(), ot = true, a2.addEventListener("change", o2);
|
|
16199
16185
|
}
|
|
16200
|
-
C2({ listSize: m2[n3 - 1].end });
|
|
16201
16186
|
})();
|
|
16202
|
-
}, [
|
|
16203
|
-
}
|
|
16187
|
+
}, [e2]);
|
|
16188
|
+
}, it = (e2) => {
|
|
16189
|
+
const t2 = "ono-view-transition-clip-path-circle", { element: n2, duration: r2 = 300, themeRules: a2, onChangeTheme: o2 } = e2, l2 = (a2 == null ? void 0 : a2()) || document.documentElement.classList.contains("dark") ? "dark" : "light";
|
|
16190
|
+
if (!document.startViewTransition) return o2("dark" === l2 ? "light" : "dark");
|
|
16191
|
+
const i2 = document.startViewTransition(() => {
|
|
16192
|
+
const e3 = document.documentElement.classList.contains("dark");
|
|
16193
|
+
o2(e3 ? "light" : "dark");
|
|
16194
|
+
}), { top: s2, left: u2, width: c2, height: d2 } = n2.getBoundingClientRect(), f2 = u2 + c2 / 2, p2 = s2 + d2 / 2, h2 = [`circle(0% at ${f2}px ${p2}px)`, `circle(${Math.hypot(Math.max(f2, window.innerWidth - f2), Math.max(p2, window.innerHeight - p2))}px at ${f2}px ${p2}px)`];
|
|
16195
|
+
((e3, t3) => {
|
|
16196
|
+
const n3 = document.createElement("style");
|
|
16197
|
+
n3.setAttribute("type", "text/css"), n3.setAttribute("data-style-tag", t3), n3.textContent = "\n ::view-transition-old(root),\n ::view-transition-new(root) {\n animation: none;\n }\n .dark::view-transition-old(root) {\n z-index: 1;\n }\n\n .dark::view-transition-new(root) {\n z-index: 999;\n }\n\n ::view-transition-old(root) {\n z-index: 999;\n }\n\n ::view-transition-new(root) {\n z-index: 1;\n }\n ", document.head.appendChild(n3);
|
|
16198
|
+
})(0, t2), i2.ready.then(() => {
|
|
16199
|
+
document.documentElement.animate({ clipPath: "light" === l2 ? h2 : h2.reverse() }, { duration: r2, easing: "ease-in-out", pseudoElement: "light" === l2 ? "::view-transition-new(root)" : "::view-transition-old(root)" }), setTimeout(() => ((e3) => {
|
|
16200
|
+
document.head.querySelectorAll("style").forEach((t3) => t3.getAttribute("data-style-tag") === e3 && t3.remove());
|
|
16201
|
+
})(t2), r2 + 100);
|
|
16202
|
+
});
|
|
16203
|
+
}, st = (e2) => new Promise((t2) => {
|
|
16204
16204
|
const n2 = new FileReader();
|
|
16205
16205
|
n2.readAsDataURL(e2), n2.onload = (e3) => {
|
|
16206
16206
|
var _a;
|
|
@@ -16208,8 +16208,8 @@
|
|
|
16208
16208
|
t2(r2);
|
|
16209
16209
|
};
|
|
16210
16210
|
}), ut = (e2, t2 = "abc.jpg") => new File([e2], t2, { type: e2.type }), ct = async (e2) => await (await fetch(e2)).blob(), dt = (e2) => e2 < 10 ? `0${e2}` : `${e2}`, ft = (e2) => e2.toString().length > 13 ? new Date(Number(e2.toString().substring(0, 13))) : 13 === e2.toString().length ? new Date(e2) : e2.toString().length < 13 && e2.toString().length > 10 ? new Date(Number((e2.toString() + "000").substring(0, 13))) : 10 === e2.toString().length ? new Date(1e3 * e2) : new Date(Number((e2.toString() + "000000000000").substring(0, 13)));
|
|
16211
|
-
e.AutoSliderList = ({ list: e2, style: n2, disable: r2, children: a2, sliderBox: o2, className: l2, sliderStyle: i2, duration: s2 = 300, sliderClassName: u2, currentIndex: c2 = 0, direction:
|
|
16212
|
-
const [m2, g2] = t.useState(false), [y2, b2] = t.useState(0), [v2, k2] = t.useState({ t: 0, l: 0 }), [w2, S2] = t.useState({ w: 0, h: 0 }), x2 = t.useRef(null), C2 = t.useRef(null), E2 = t.useMemo(() => ["width", "height", "transform"].map((e3) => `${e3} ${s2 / 1e3}s ${
|
|
16211
|
+
e.AutoSliderList = ({ list: e2, style: n2, disable: r2, children: a2, sliderBox: o2, className: l2, sliderStyle: i2, duration: s2 = 300, sliderClassName: u2, currentIndex: c2 = 0, direction: p2 = V.Horizontal, sliderTransitionTimingFunction: h2 = "ease-in-out" }) => {
|
|
16212
|
+
const [m2, g2] = t.useState(false), [y2, b2] = t.useState(0), [v2, k2] = t.useState({ t: 0, l: 0 }), [w2, S2] = t.useState({ w: 0, h: 0 }), x2 = t.useRef(null), C2 = t.useRef(null), E2 = t.useMemo(() => ["width", "height", "transform"].map((e3) => `${e3} ${s2 / 1e3}s ${h2}`).join(","), [p2, s2, h2]), T2 = t.useMemo(() => ({ width: w2.w, height: w2.h, transition: m2 ? E2 : "initial", transform: `translate(${v2.l}px, ${v2.t}px)` }), [w2, v2]), { w: P2, h: z2 } = f();
|
|
16213
16213
|
return t.useEffect(() => {
|
|
16214
16214
|
b2(c2);
|
|
16215
16215
|
}, [c2]), t.useEffect(() => {
|
|
@@ -16220,17 +16220,17 @@
|
|
|
16220
16220
|
e3.forEach((e4) => {
|
|
16221
16221
|
e4.style.position = "relative", e4.style.cursor = r2 ? "not-allowed" : "pointer", e4.style.zIndex = "1";
|
|
16222
16222
|
});
|
|
16223
|
-
const t2 = window.getComputedStyle(x2.current), n3 = { t: "Horizontal" ===
|
|
16223
|
+
const t2 = window.getComputedStyle(x2.current), n3 = { t: "Horizontal" === p2 ? M(t2.paddingTop) : e3[y2].offsetTop, l: "Horizontal" === p2 ? e3[y2].offsetLeft : M(t2.paddingLeft) };
|
|
16224
16224
|
k2(n3), S2({ w: e3[y2].offsetWidth, h: e3[y2].offsetHeight }), setTimeout(() => g2(true), s2);
|
|
16225
16225
|
})();
|
|
16226
|
-
}, [y2, P2, z2, r2]), d.jsxs("ul", { ref: x2, className: ["ono-auto-slider-list-container", l2, r2 ? "ono-auto-slider-list-is-disable" : ""].filter(Boolean).join(" "), style: { flexDirection: "Horizontal" ===
|
|
16226
|
+
}, [y2, P2, z2, r2]), d.jsxs("ul", { ref: x2, className: ["ono-auto-slider-list-container", l2, r2 ? "ono-auto-slider-list-is-disable" : ""].filter(Boolean).join(" "), style: { flexDirection: "Horizontal" === p2 ? "row" : "column", ...n2 }, children: [d.jsx("li", { ref: C2, className: ["ono-auto-slider-list-slider", u2].filter(Boolean).join(" "), style: { ...i2, ...T2 }, children: o2 }), e2.map((e3, n3) => t.cloneElement(a2({ item: e3, index: n3, isActive: n3 === y2 }), { onClick: (t2) => {
|
|
16227
16227
|
if (r2) return;
|
|
16228
16228
|
const o3 = a2({ item: e3, index: n3, isActive: n3 === y2 }).props.onClick;
|
|
16229
16229
|
o3 && o3(t2), b2(n3);
|
|
16230
16230
|
} }))] });
|
|
16231
16231
|
}, e.AvatarCrop = ({ imageFile: e2, cvsW: n2 = 520, maskBG: r2 = "rgba(0, 0, 0, 0.5)", border: a2 = "4px solid #fff", wheelScale: o2 = 0.1, children: l2 }) => {
|
|
16232
16232
|
const [i2, s2] = t.useState({ w: 0, h: 0, t: 0, l: 0 }), [u2, c2] = t.useState({ w: 0, h: 0, t: 0, l: 0 }), [f2, p2] = t.useState({ w: 0, l: 0 }), [h2, m2] = t.useState();
|
|
16233
|
-
return d.jsxs(d.Fragment, { children: [d.jsx(
|
|
16233
|
+
return d.jsxs(d.Fragment, { children: [d.jsx(q, { imageFile: e2, cvsW: n2, maskBG: r2, border: a2, wheelScale: o2, maskInfo: f2, setMaskInfo: p2, setCtx: m2, imageStartState: i2, setImageStartState: s2, imageState: u2, setImageState: c2 }), l2 == null ? void 0 : l2({ handleConfirm: (e3, t2) => {
|
|
16234
16234
|
if (!h2) return;
|
|
16235
16235
|
const n3 = h2.getImageData(f2.l, f2.l, f2.w, f2.w), r3 = document.createElement("canvas"), a3 = r3.getContext("2d");
|
|
16236
16236
|
if (r3.width = f2.w, r3.height = f2.w, !a3) return;
|
|
@@ -16296,7 +16296,7 @@
|
|
|
16296
16296
|
});
|
|
16297
16297
|
})(), p2.current && (p2.current.indeterminate = l2);
|
|
16298
16298
|
}, [p2, o2, n2, l2]), d.jsx("input", { id: e2, type: "checkbox", ref: p2, checked: r2, onChange: a2, className: [o2, "line" === s2 ? "ono-checkbox-line" : "ono-checkbox-border"].filter(Boolean).join(" "), style: n2 });
|
|
16299
|
-
}, e.Direction =
|
|
16299
|
+
}, e.Direction = V, e.EstimatedVirtualList = at, e.List = J, e.MenuButton = ({ active: e2, onchange: n2, w: r2 = "40px", duration: a2 = 400, clr: o2 = "#f5f5f5", bgc: l2 = "#342A7C" }) => {
|
|
16300
16300
|
const [i2, s2] = t.useState(false), u2 = (e3, t2) => {
|
|
16301
16301
|
let n3;
|
|
16302
16302
|
const r3 = e3.split("");
|
|
@@ -16307,7 +16307,7 @@
|
|
|
16307
16307
|
}, [e2]), d.jsx("button", { className: "ono-menu-button", style: { width: r2, height: r2, background: l2, borderRadius: u2(r2, 0.2) }, onClick: () => requestAnimationFrame(() => {
|
|
16308
16308
|
n2 == null ? void 0 : n2(!i2), s2(!i2);
|
|
16309
16309
|
}), children: f2.map((e3, t2) => d.jsx("span", { style: { ...e3 } }, t2)) });
|
|
16310
|
-
}, e.Modal = (e2) =>
|
|
16310
|
+
}, e.Modal = (e2) => he(je, e2, "ono-modal"), e.OnoInput = K, e.OnoSelect = ({ options: e2, defaultValue: n2, placeholder: r2, inputBorder: a2, isShowArrow: o2, disabled: l2, clearable: i2, selectClassName: s2, optionsClassName: u2, filterable: c2, notFoundContent: f2, optionRender: p2, onClear: h2, onChange: m2, filterMethod: g2 }) => {
|
|
16311
16311
|
const [y2, b2] = t.useState(""), [v2, k2] = t.useState(""), [w2, S2] = t.useState(false), [x2, C2] = t.useState(false), [E2, T2] = t.useState(""), P2 = (t2) => {
|
|
16312
16312
|
const n3 = e2.find((e3) => e3.value === t2);
|
|
16313
16313
|
b2(n3 ? n3.label : "");
|
|
@@ -16316,48 +16316,48 @@
|
|
|
16316
16316
|
};
|
|
16317
16317
|
return t.useEffect(() => {
|
|
16318
16318
|
n2 && P2(n2);
|
|
16319
|
-
}, [n2, e2]), d.jsx(
|
|
16319
|
+
}, [n2, e2]), d.jsx(rt, { sameWidth: true, trigger: "click", placement: "bottom", isShowArrow: o2, className: ["ono-option-container", u2].filter(Boolean).join(" "), onOpenChange: (e3) => {
|
|
16320
16320
|
C2(e3), c2 && v2 && !e3 && k2("");
|
|
16321
|
-
}, content: d.jsx(
|
|
16321
|
+
}, content: d.jsx(J, { list: c2 ? g2 && "function" == typeof g2 ? g2(v2, e2) : e2.filter((e3) => e3.label.toLocaleLowerCase().includes(v2.toLocaleLowerCase())) : e2, fallback: f2 ?? d.jsx("div", { className: "ono-option-item", children: d.jsx("div", { className: "ono-option-item-content-no-data", onClick: (e3) => e3.stopPropagation(), children: "No Data" }) }), children: (e3) => d.jsx(He, { ...e3, onChange: z2, currentValue: y2.toString(), optionRender: p2 }, e3.value) }), children: d.jsx("div", { className: "ono-select", onMouseEnter: () => S2(true), onMouseLeave: () => S2(false), children: d.jsx(K, { className: [c2 ? "" : "ono-select-readonly", s2].filter(Boolean).join(" "), border: a2, disabled: l2, placeholder: c2 && E2 ? y2.toString() || "" : r2, readonly: !c2, value: c2 && x2 ? v2 : y2.toString(), clearable: w2 && i2, suffix: w2 && i2 && y2 || i2 && v2 && c2 ? d.jsx(d.Fragment, {}) : d.jsx(Be, { isVisible: x2 }), onClear: () => {
|
|
16322
16322
|
h2 == null ? void 0 : h2(), m2 == null ? void 0 : m2(""), T2(""), b2(""), k2("");
|
|
16323
16323
|
}, onChange: (e3) => k2(e3.target.value) }) }) });
|
|
16324
|
-
}, e.OnoTextarea = ({ id: e2, name: n2, rows: r2, maxLength: a2, minLength: o2, className: l2, placeholder: i2, readonly: s2, resize: u2 = true, autocomplete: c2 = "off", autofocus: f2, form: p2, disabled: h2, autoSize: m2, showCount:
|
|
16325
|
-
const [
|
|
16326
|
-
const t2 =
|
|
16327
|
-
t2.push(e3),
|
|
16328
|
-
},
|
|
16329
|
-
document.activeElement ===
|
|
16330
|
-
if (
|
|
16331
|
-
const e4 =
|
|
16332
|
-
if (
|
|
16333
|
-
const e5 = { target:
|
|
16334
|
-
|
|
16324
|
+
}, e.OnoTextarea = ({ id: e2, name: n2, rows: r2, maxLength: a2, minLength: o2, className: l2, placeholder: i2, readonly: s2, resize: u2 = true, autocomplete: c2 = "off", autofocus: f2, form: p2, disabled: h2, autoSize: m2, showCount: g2, border: y2 = "1px solid #5644b8", boxShadow: b2 = "0 0 0 2px #7969d11a", value: v2 = "", onChange: k2 }) => {
|
|
16325
|
+
const [w2, S2] = t.useState(v2), [x2, C2] = t.useState(false), [E2, T2] = t.useState([v2]), [P2, z2] = t.useState(0), _2 = t.useRef(null), R2 = (e3) => {
|
|
16326
|
+
const t2 = E2.slice(0, P2 + 1);
|
|
16327
|
+
t2.push(e3), T2(t2), z2(t2.length - 1);
|
|
16328
|
+
}, N2 = [{ key: "CommandOrControl+z", handler: (e3) => {
|
|
16329
|
+
document.activeElement === _2.current && (e3.preventDefault(), (() => {
|
|
16330
|
+
if (P2 > 0 && _2.current) {
|
|
16331
|
+
const e4 = P2 - 1, t2 = E2[e4];
|
|
16332
|
+
if (_2.current.value = t2, S2(t2), z2(e4), k2) {
|
|
16333
|
+
const e5 = { target: _2.current };
|
|
16334
|
+
k2(e5);
|
|
16335
16335
|
}
|
|
16336
16336
|
}
|
|
16337
16337
|
})());
|
|
16338
|
-
}, deps: [
|
|
16339
|
-
if (
|
|
16338
|
+
}, deps: [E2] }, { key: "CommandOrControl+d", handler: (e3) => {
|
|
16339
|
+
if (_2.current && document.activeElement === _2.current) {
|
|
16340
16340
|
e3.preventDefault();
|
|
16341
16341
|
const t2 = ((e4) => {
|
|
16342
16342
|
const { value: t3, selectionStart: n3, selectionEnd: r3 } = e4, a3 = t3.substring(0, n3) + t3.substring(r3);
|
|
16343
16343
|
return e4.value = a3, e4.setSelectionRange(n3, n3), a3;
|
|
16344
|
-
})(
|
|
16345
|
-
if (
|
|
16346
|
-
const e4 = { target:
|
|
16347
|
-
|
|
16344
|
+
})(_2.current);
|
|
16345
|
+
if (S2(t2), R2(t2), k2) {
|
|
16346
|
+
const e4 = { target: _2.current };
|
|
16347
|
+
k2(e4);
|
|
16348
16348
|
}
|
|
16349
16349
|
}
|
|
16350
|
-
}, deps: [
|
|
16351
|
-
return
|
|
16352
|
-
|
|
16353
|
-
}, [
|
|
16350
|
+
}, deps: [E2] }];
|
|
16351
|
+
return N2.forEach(({ key: e3, handler: t2, deps: n3 }) => Z(e3, t2, { target: _2.current, deps: n3 })), t.useEffect(() => {
|
|
16352
|
+
S2(v2);
|
|
16353
|
+
}, [v2]), t.useEffect(() => {
|
|
16354
16354
|
(() => {
|
|
16355
|
-
if (!
|
|
16356
|
-
const e3 =
|
|
16355
|
+
if (!_2.current) return;
|
|
16356
|
+
const e3 = _2.current;
|
|
16357
16357
|
((e4, t2, n3, r3, a3) => {
|
|
16358
16358
|
const o3 = e4.parentNode;
|
|
16359
16359
|
e4.style.resize = t2 ? "none" : n3 ? "vertical" : "none", o3.style.setProperty("--ono-input-border", r3), o3.style.setProperty("--ono-input-box-shadow", a3), o3.style.setProperty("--ono-input-height", "auto");
|
|
16360
|
-
})(e3, m2 || false, u2,
|
|
16360
|
+
})(e3, m2 || false, u2, y2, b2), m2 && ((e4, t2) => {
|
|
16361
16361
|
const { minRows: n3 = 2, maxRows: r3 } = "object" == typeof t2 ? t2 : {}, a3 = document.createElement("div");
|
|
16362
16362
|
a3.style.position = "absolute", a3.style.visibility = "hidden", a3.style.whiteSpace = "pre-wrap", a3.style.wordWrap = "break-word", a3.style.width = `${e4.clientWidth}px`, a3.style.font = getComputedStyle(e4).font, a3.style.padding = getComputedStyle(e4).padding, a3.style.border = getComputedStyle(e4).border, a3.style.boxSizing = "border-box", document.body.appendChild(a3);
|
|
16363
16363
|
const o3 = 34 * n3;
|
|
@@ -16370,12 +16370,12 @@
|
|
|
16370
16370
|
e4.style.height = `${l3}px`, e4.style.resize = t2 ? "none" : "vertical", document.body.removeChild(a3), Math.floor(l3 / 34);
|
|
16371
16371
|
})(e3, m2);
|
|
16372
16372
|
})();
|
|
16373
|
-
}, [
|
|
16373
|
+
}, [_2, m2, w2]), d.jsxs("div", { className: ["ono-textarea", h2 ? "ono-input-is-disabled" : ""].filter(Boolean).join(" "), children: [d.jsx("div", { className: ["ono-textarea-wrapper", x2 ? "none" === y2 ? "" : "ono-input-is-focus" : "", l2].filter(Boolean).join(" "), onClick: () => {
|
|
16374
16374
|
var _a;
|
|
16375
|
-
return (_a =
|
|
16376
|
-
}, children: d.jsx("textarea", { ref:
|
|
16377
|
-
|
|
16378
|
-
} }) }),
|
|
16375
|
+
return (_a = _2.current) == null ? void 0 : _a.focus();
|
|
16376
|
+
}, children: d.jsx("textarea", { ref: _2, className: "ono-textarea-inner", id: e2, rows: r2, name: n2, maxLength: a2, minLength: o2, placeholder: i2, readOnly: s2, autoComplete: c2, autoFocus: f2, form: p2, disabled: h2, onFocus: () => C2(true), onBlur: () => C2(false), value: w2, onChange: (e3) => {
|
|
16377
|
+
S2(e3.target.value), R2(e3.target.value), k2 == null ? void 0 : k2(e3);
|
|
16378
|
+
} }) }), g2 && a2 && d.jsx("p", { className: "ono-count-bar", onClick: (e3) => e3.stopPropagation(), children: w2.length + "/" + a2 })] });
|
|
16379
16379
|
}, e.Pagination = ({ firstBtn: e2, lastBtn: t2, currentPage: n2, total: r2, prevBtn: a2, nextBtn: o2, styles: l2, className: i2, children: s2, onChange: u2, pageBtnClassName: c2, pageBtnActiveClassName: f2, hiddenNextBtnOnLastPage: p2, hiddenPrevBtnOnFirstPage: h2 }) => {
|
|
16380
16380
|
const m2 = Math.max(1, Math.min(n2, r2));
|
|
16381
16381
|
return d.jsxs("ul", { className: `ono-pagination ${i2}`, style: l2, children: [e2 && d.jsx("li", { className: e2 ? "ono-pagination-base" : "ono-pagination-btn", onClick: () => u2(1), children: e2 }), h2 && 1 === n2 ? null : d.jsx("li", { className: "ono-pagination-base", style: { cursor: 1 !== n2 ? "pointer" : "no-drop" }, onClick: () => {
|
|
@@ -16388,7 +16388,7 @@
|
|
|
16388
16388
|
})(), p2 && n2 === r2 ? null : d.jsx("li", { className: "ono-pagination-base", style: { cursor: n2 !== r2 ? "pointer" : "no-drop" }, onClick: () => {
|
|
16389
16389
|
u2(n2 >= r2 ? r2 : n2 + 1);
|
|
16390
16390
|
}, children: o2 ? "function" == typeof o2 ? o2(n2 !== r2) : o2 : d.jsx("div", { className: o2 ? "ono-pagination-base" : "ono-pagination-btn", children: "nextBtn" }) }), t2 && d.jsx("li", { className: t2 ? "ono-pagination-base" : "ono-pagination-btn", onClick: () => u2(r2), children: t2 })] });
|
|
16391
|
-
}, e.Radio =
|
|
16391
|
+
}, e.Radio = Ue, e.RadioGroup = ({ name: e2, style: t2, options: n2, onChange: r2, className: a2, radioW: o2 = 16, radioGap: l2 = 4, labelPosition: i2 = "right", checkedColor: s2 = "#532ce1", unCheckedColor: u2 = "transparent", value: c2 }) => d.jsx("div", { className: ["ono-radio-group", a2].join(" "), style: t2, children: n2.map(({ label: t3, value: n3, disabled: a3 }) => d.jsx(Ue, { name: e2, value: n3, radioW: o2, radioGap: l2, style: { flexDirection: "left" === i2 ? "row-reverse" : "row" }, checkedColor: s2, unCheckedColor: u2, onChange: () => r2(n3), checked: c2 + "" == n3 + "", disabled: "function" == typeof a3 ? a3(c2) : a3 || false, children: t3 }, t3)) }), e.SvgImg = ({ w: e2, h: n2, src: r2, clr: a2, className: o2, onClick: l2 }) => {
|
|
16392
16392
|
const i2 = t.useRef(null), s2 = [{ value: e2, name: "w" }, { value: n2, name: "h" }, { value: a2, name: "clr" }];
|
|
16393
16393
|
return t.useEffect(() => {
|
|
16394
16394
|
i2.current && s2.forEach((e3) => {
|
|
@@ -16404,7 +16404,7 @@
|
|
|
16404
16404
|
let e3 = 60, t2 = 32;
|
|
16405
16405
|
if (s2 || r2) {
|
|
16406
16406
|
const n3 = getComputedStyle(f2.current);
|
|
16407
|
-
e3 =
|
|
16407
|
+
e3 = M(n3.width), t2 = M(n3.height);
|
|
16408
16408
|
}
|
|
16409
16409
|
[...y2, { value: e3, name: "w" }, { value: t2, name: "h" }].forEach(({ value: e4, name: t3 }) => {
|
|
16410
16410
|
e4 && ((e5, t4, n3) => {
|
|
@@ -16423,7 +16423,7 @@
|
|
|
16423
16423
|
var _a;
|
|
16424
16424
|
return (_a = p2.current) == null ? void 0 : _a.click();
|
|
16425
16425
|
}, children: d.jsxs("div", { ref: h2, className: "ono-switch-children-bar", children: [(n2 == null ? void 0 : n2.active) && d.jsx("div", { ref: m2, className: "ono-switch-children", children: n2 == null ? void 0 : n2.active }), d.jsx("div", { className: "ono-switch-slider" }), (n2 == null ? void 0 : n2.inactive) && d.jsx("div", { ref: g2, className: "ono-switch-children", children: n2 == null ? void 0 : n2.inactive })] }) })] });
|
|
16426
|
-
}, e.TemplateDialog = ({ children: e2, animation: n2, className: r2, duration: a2 = 300, style: o2, maskColor: l2 = "rgba(0, 0, 0, 0.5)", disableContextMenu: i2,
|
|
16426
|
+
}, e.TemplateDialog = ({ children: e2, animation: n2, className: r2, duration: a2 = 300, style: o2, maskColor: l2 = "rgba(0, 0, 0, 0.5)", disableContextMenu: i2, maskClickClose: s2 = true, dialogClose: u2 }) => {
|
|
16427
16427
|
const [c2, f2] = t.useState(false), p2 = t.useRef(null), h2 = () => {
|
|
16428
16428
|
if (p2.current) if (f2(true), n2) {
|
|
16429
16429
|
const e3 = p2.current;
|
|
@@ -16436,7 +16436,7 @@
|
|
|
16436
16436
|
const e3 = p2.current.parentElement.style, t2 = p2.current.style;
|
|
16437
16437
|
switch (e3.setProperty("--duration", a2 / 1e3 + "s"), n2.type) {
|
|
16438
16438
|
case "zoom": {
|
|
16439
|
-
const { x: e4, y: r3 } =
|
|
16439
|
+
const { x: e4, y: r3 } = v(n2.element), a3 = (e4 / window.innerWidth * 100).toFixed(2) + "%", o3 = (r3 / window.innerHeight * 100).toFixed(2) + "%";
|
|
16440
16440
|
t2.setProperty("--left", a3), t2.setProperty("--top", o3);
|
|
16441
16441
|
break;
|
|
16442
16442
|
}
|
|
@@ -16461,55 +16461,55 @@
|
|
|
16461
16461
|
${r2 || ""}
|
|
16462
16462
|
${m2()}
|
|
16463
16463
|
`, style: o2, onClick: (e3) => e3.stopPropagation(), children: "function" == typeof e2 ? e2(h2) : e2 }) });
|
|
16464
|
-
}, e.Tooltip =
|
|
16465
|
-
const [
|
|
16466
|
-
const n3 = o2 &&
|
|
16467
|
-
if (
|
|
16468
|
-
|
|
16464
|
+
}, e.Tooltip = rt, e.Waterfall = ({ options: e2, pageSize: n2, children: r2, request: a2, reloadData: o2, className: l2, style: i2, updateData: s2, loading: u2 = true, bottomThreshold: c2 = 50 }) => {
|
|
16465
|
+
const [f2, p2] = t.useState({ page: 1, reloadData: o2, loading: false, isFinish: false, gap: "number" == typeof e2 ? 0 : e2.gap, imageWidth: "number" == typeof e2 ? e2 : 0, columns: "number" == typeof e2 ? 0 : e2.columns, imageList: [] }), [h2, m2] = t.useState([]), [g2, y2] = t.useState([]), b2 = t.useRef(null), v2 = t.useRef(null), k2 = t.useRef(null), w2 = (e3) => p2((t2) => ({ ...t2, ...e3 })), S2 = async (e3, t2) => {
|
|
16466
|
+
const n3 = o2 && f2.reloadData !== o2;
|
|
16467
|
+
if (f2.isFinish) return;
|
|
16468
|
+
w2({ loading: true });
|
|
16469
16469
|
const r3 = await a2(e3, t2);
|
|
16470
|
-
|
|
16471
|
-
},
|
|
16472
|
-
const n3 = o2 &&
|
|
16470
|
+
x2(r3), w2({ isFinish: !r3.length, imageList: n3 ? [...r3] : [...f2.imageList, ...r3], page: e3 + 1, loading: false });
|
|
16471
|
+
}, x2 = (e3) => p2((t2) => {
|
|
16472
|
+
const n3 = o2 && f2.reloadData !== o2, r3 = n3 ? [] : [...g2], a3 = n3 ? Array(t2.columns).fill(0) : [..."[]" !== JSON.stringify(h2) ? h2 : Array(t2.columns).fill(0)];
|
|
16473
16473
|
return e3.forEach((e4) => {
|
|
16474
16474
|
const n4 = ((e5) => {
|
|
16475
16475
|
let t3 = 0, n5 = 0;
|
|
16476
16476
|
return t3 = e5.indexOf(Math.min(...e5)), n5 = e5[t3], { index: t3, height: n5 };
|
|
16477
16477
|
})(a3), o3 = Math.floor(e4.height * t2.imageWidth / e4.width);
|
|
16478
|
-
r3.push({ x: n4.index % t2.columns !== 0 ? n4.index * t2.imageWidth + t2.gap * n4.index : n4.index * t2.imageWidth, y: n4.height }), a3[n4.index] += o3 + t2.gap,
|
|
16479
|
-
}),
|
|
16480
|
-
}),
|
|
16481
|
-
if (!
|
|
16482
|
-
const t2 =
|
|
16483
|
-
let r3 = 0, a3 =
|
|
16484
|
-
if (o2 &&
|
|
16485
|
-
const e3 = Math.floor(t2 /
|
|
16478
|
+
r3.push({ x: n4.index % t2.columns !== 0 ? n4.index * t2.imageWidth + t2.gap * n4.index : n4.index * t2.imageWidth, y: n4.height }), a3[n4.index] += o3 + t2.gap, m2(a3);
|
|
16479
|
+
}), y2(r3), t2;
|
|
16480
|
+
}), C2 = t.useCallback(() => {
|
|
16481
|
+
if (!k2.current) return;
|
|
16482
|
+
const t2 = k2.current.clientWidth;
|
|
16483
|
+
let r3 = 0, a3 = f2.page;
|
|
16484
|
+
if (o2 && f2.reloadData !== o2 && (p2({ page: 1, reloadData: o2, loading: false, isFinish: false, gap: "number" == typeof e2 ? 0 : e2.gap, imageWidth: "number" == typeof e2 ? e2 : 0, columns: "number" == typeof e2 ? 0 : e2.columns, imageList: [] }), m2([]), y2([]), a3 = 1), "number" == typeof e2) {
|
|
16485
|
+
const e3 = Math.floor(t2 / f2.imageWidth);
|
|
16486
16486
|
r3 = e3 - 1;
|
|
16487
|
-
const n3 = r3 ? (t2 - e3 *
|
|
16488
|
-
|
|
16487
|
+
const n3 = r3 ? (t2 - e3 * f2.imageWidth) / r3 : 0;
|
|
16488
|
+
w2({ columns: e3, gap: n3 });
|
|
16489
16489
|
} else {
|
|
16490
|
-
r3 =
|
|
16491
|
-
const e3 = (t2 - r3 *
|
|
16492
|
-
|
|
16493
|
-
}
|
|
16494
|
-
|
|
16495
|
-
}, [
|
|
16496
|
-
|
|
16497
|
-
},
|
|
16490
|
+
r3 = f2.columns - 1;
|
|
16491
|
+
const e3 = (t2 - r3 * f2.gap) / f2.columns;
|
|
16492
|
+
w2({ imageWidth: e3 });
|
|
16493
|
+
}
|
|
16494
|
+
S2(a3, n2);
|
|
16495
|
+
}, [f2, o2]), E2 = () => {
|
|
16496
|
+
b2.current && clearTimeout(b2.current), b2.current = setTimeout(C2, 50);
|
|
16497
|
+
}, T2 = /* @__PURE__ */ ((e3, t2 = 50) => {
|
|
16498
16498
|
let n3 = 0;
|
|
16499
16499
|
return () => {
|
|
16500
16500
|
const r3 = Date.now();
|
|
16501
16501
|
r3 - n3 >= t2 && (e3(), n3 = r3);
|
|
16502
16502
|
};
|
|
16503
16503
|
})(() => {
|
|
16504
|
-
const { scrollTop: e3, clientHeight: t2, scrollHeight: r3 } =
|
|
16505
|
-
r3 - t2 - e3 > c2 || !
|
|
16504
|
+
const { scrollTop: e3, clientHeight: t2, scrollHeight: r3 } = v2.current;
|
|
16505
|
+
r3 - t2 - e3 > c2 || !f2.loading && S2(f2.page, n2);
|
|
16506
16506
|
});
|
|
16507
|
-
return
|
|
16508
|
-
window.removeEventListener("resize",
|
|
16509
|
-
}), [
|
|
16510
|
-
s2 &&
|
|
16511
|
-
}, [s2,
|
|
16512
|
-
}, e.addCommasToNumber =
|
|
16507
|
+
return X("scroll", T2, { target: v2.current, deps: [f2.loading, f2.page] }), t.useEffect(() => (C2(), window.addEventListener("resize", E2), () => {
|
|
16508
|
+
window.removeEventListener("resize", E2);
|
|
16509
|
+
}), [k2, o2]), t.useEffect(() => {
|
|
16510
|
+
s2 && S2(f2.page, n2);
|
|
16511
|
+
}, [s2, f2.loading, f2.page, v2.current]), d.jsxs("div", { className: "ono-waterfall-container", children: [d.jsx("div", { ref: v2, className: [l2, "ono-waterfall-content"].join(" ").trim(), style: i2, children: d.jsx("div", { ref: k2, className: "ono-waterfall-wrapper", style: { height: Math.max(...h2) - f2.gap + "px" }, children: f2.imageList.map((e3, t2) => d.jsx("div", { className: "ono-waterfall-item", style: { width: `${f2.imageWidth}px`, transform: `translate(${g2[t2].x}px,${g2[t2].y}px)` }, children: r2(e3, t2) }, e3.id)) }) }), f2.loading && ("function" == typeof u2 ? u2() : u2 && "boolean" == typeof u2 ? d.jsx("div", { className: "ono-waterfall-loading", children: "loading..." }) : u2)] });
|
|
16512
|
+
}, e.addCommasToNumber = O, e.addEventWithOriginHandler = D, e.adjustingColors = Ie, e.base64ToBlob = (e2) => {
|
|
16513
16513
|
const t2 = e2.split(","), n2 = t2[0].match(/:(.*?);/)[1], r2 = atob(t2[1]);
|
|
16514
16514
|
let a2 = r2.length;
|
|
16515
16515
|
const o2 = new Uint8Array(a2);
|
|
@@ -16522,22 +16522,22 @@
|
|
|
16522
16522
|
for (; o2--; ) i2[o2] = a2.charCodeAt(o2);
|
|
16523
16523
|
const s2 = new Blob([i2], { type: r2 });
|
|
16524
16524
|
return new File([s2], t2 + l2, { type: r2, lastModified: (/* @__PURE__ */ new Date()).getTime() });
|
|
16525
|
-
}, e.blobToBase64 = st, e.blobToFile = ut, e.calculateAspectRatio =
|
|
16525
|
+
}, e.blobToBase64 = st, e.blobToFile = ut, e.calculateAspectRatio = C, e.checkDeviceIsMobile = g, e.checkStatusCode = b, e.colorUtils = Ae, e.common = $, e.convertSecondToOtherTime = (e2, t2) => {
|
|
16526
16526
|
const n2 = { year: 31536e3, month: 2592e3, day: 86400, hour: 3600, minute: 60, second: 1 };
|
|
16527
16527
|
if (!n2[t2]) throw new Error('Invalid type. Please use "day", "hour", "minute", or "second".');
|
|
16528
16528
|
return Math.floor(e2 / n2[t2]);
|
|
16529
|
-
}, e.copy2Clipboard =
|
|
16529
|
+
}, e.copy2Clipboard = I, e.createDataSource = (e2, t2) => e2.map((e3, n2) => ({ id: n2, data: t2(e3, n2) })), e.createIntersectionObserver = k, e.dayOfYear = A, e.deepCopy = R, e.downloadFile = y, e.fileToBase64 = (e2) => new Promise((t2) => {
|
|
16530
16530
|
const n2 = new FileReader();
|
|
16531
16531
|
n2.readAsDataURL(e2), n2.onload = (e3) => {
|
|
16532
16532
|
var _a;
|
|
16533
16533
|
return t2((_a = e3.target) == null ? void 0 : _a.result);
|
|
16534
16534
|
};
|
|
16535
|
-
}), e.fileToBlob = (e2) => e2.slice(0, e2.size, e2.type), e.formatFileSize =
|
|
16535
|
+
}), e.fileToBlob = (e2) => e2.slice(0, e2.size, e2.type), e.formatFileSize = x, e.formatSecondes = w, e.formatTime = (e2, t2 = "YY-MM-DD hh:mm:ss") => {
|
|
16536
16536
|
const n2 = ["YY", "MM", "DD", "hh", "mm", "ss"], r2 = [], a2 = ft(e2);
|
|
16537
16537
|
r2.push(a2.getFullYear().toString()), r2.push(dt(a2.getMonth() + 1)), r2.push(dt(a2.getDate())), r2.push(dt(a2.getHours())), r2.push(dt(a2.getMinutes())), r2.push(dt(a2.getSeconds()));
|
|
16538
16538
|
for (let e3 in r2) t2 = t2.replace(n2[e3], r2[e3]);
|
|
16539
16539
|
return t2;
|
|
16540
|
-
}, e.getElementCenterPosition =
|
|
16540
|
+
}, e.getElementCenterPosition = v, e.getFileName = B, e.getFileSuffix = W, e.getImageSIze = N, e.getPointDistance = F, e.getURLSearchParams = P, e.grayColor = j, e.localFormat = (e2, t2 = "YY-MM-DD hh:mm:ss", n2 = "cn") => {
|
|
16541
16541
|
const r2 = ["YY", "MM", "DD", "hh", "mm", "ss"], a2 = [], o2 = ft(e2);
|
|
16542
16542
|
a2.push(((e3, t3) => {
|
|
16543
16543
|
const n3 = { en: ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"], cn: ["零", "一", "二", "三", "四", "五", "六", "七", "八", "九"] };
|
|
@@ -16548,12 +16548,12 @@
|
|
|
16548
16548
|
})(dt(o2.getDate()), n2)), a2.push(dt(o2.getHours())), a2.push(dt(o2.getMinutes())), a2.push(dt(o2.getSeconds()));
|
|
16549
16549
|
for (let e3 in a2) t2 = t2.replace(r2[e3], a2[e3]);
|
|
16550
16550
|
return t2;
|
|
16551
|
-
}, e.mediaAutoplayPolicies =
|
|
16551
|
+
}, e.mediaAutoplayPolicies = T, e.message = Te, e.parseQuery = U, e.passwordStrength = p, e.pick = H, e.portalRenderer = he, e.printStr = m, e.pureNumber = M, e.quickSort = S, e.rafTimeout = L, e.randomString = h, e.safeCapitalizeWord = _, e.second2Day = (e2, t2) => {
|
|
16552
16552
|
const n2 = ["DD", "hh", "mm", "ss"], r2 = [];
|
|
16553
16553
|
r2.push(Math.floor(e2 / 86400)), r2.push(dt(Math.floor(e2 % 86400 / 3600))), r2.push(dt(Math.floor(e2 % 3600 / 60))), r2.push(dt(e2 % 60));
|
|
16554
16554
|
for (let e3 = 0; e3 < n2.length; e3++) t2 = t2.replace(n2[e3], r2[e3].toString());
|
|
16555
16555
|
return t2;
|
|
16556
|
-
}, e.singleton =
|
|
16556
|
+
}, e.singleton = z, e.toast = Je, e.urlToBase64 = async (e2) => await st(await ct(e2)), e.urlToBlob = ct, e.urlToFile = async (e2) => ut(await ct(e2)), e.useClickOutSide = et, e.useCountdown = (e2 = 60, n2) => {
|
|
16557
16557
|
const [r2, a2] = t.useState(e2), [o2, l2] = t.useState(false), i2 = t.useRef(null), s2 = t.useCallback(() => l2(true), []), u2 = t.useCallback(() => {
|
|
16558
16558
|
l2(false), a2(e2), i2.current && (clearTimeout(i2.current), i2.current = null), n2 == null ? void 0 : n2();
|
|
16559
16559
|
}, [e2, n2]);
|
|
@@ -16564,14 +16564,20 @@
|
|
|
16564
16564
|
i2.current && (clearTimeout(i2.current), i2.current = null);
|
|
16565
16565
|
};
|
|
16566
16566
|
}, [o2, r2, u2]), [r2, s2, u2];
|
|
16567
|
-
}, e.useEventListener =
|
|
16567
|
+
}, e.useEventListener = X, e.useGetElementSize = f, e.useKeyPress = Z, e.useMouseClick = () => {
|
|
16568
|
+
const [e2, n2] = t.useState({ clientX: 0, clientY: 0, screenX: 0, screenY: 0, pageX: 0, pageY: 0 });
|
|
16569
|
+
return X("click", (e3) => {
|
|
16570
|
+
const t2 = e3.clientX, r2 = e3.clientY, a2 = e3.screenX, o2 = e3.screenY, l2 = e3.pageX, i2 = e3.pageY;
|
|
16571
|
+
n2({ clientX: t2, clientY: r2, screenX: a2, screenY: o2, pageX: l2, pageY: i2 });
|
|
16572
|
+
}), e2;
|
|
16573
|
+
}, e.useTheme = lt, e.useThemePro = (e2) => {
|
|
16568
16574
|
const { initTheme: n2 = "light", themeRules: r2 = (e3) => {
|
|
16569
16575
|
e3 ? document.documentElement.classList.add("dark") : document.documentElement.classList.remove("dark");
|
|
16570
16576
|
} } = e2 || Object.assign({}), [a2, o2] = t.useState(n2), l2 = t.useRef(null);
|
|
16571
|
-
return
|
|
16572
|
-
l2.current ?
|
|
16577
|
+
return lt({ theme: a2, onDark: () => {
|
|
16578
|
+
l2.current ? it({ element: l2.current, onChangeTheme: () => r2(true) }) : r2(true);
|
|
16573
16579
|
}, onLight: () => {
|
|
16574
|
-
l2.current ?
|
|
16580
|
+
l2.current ? it({ element: l2.current, onChangeTheme: () => r2(false) }) : r2(false);
|
|
16575
16581
|
} }), [a2, ({ targetTheme: e3, element: t2, onChange: n3 }) => {
|
|
16576
16582
|
l2.current = t2 || null, requestAnimationFrame(() => {
|
|
16577
16583
|
n3 == null ? void 0 : n3(), o2(e3);
|