PageSourceSearch

https://hunter.io/assets/confetti-D26MlcV3.js

js hunter.io collected 2026-09-24 07:51:33 UTC 2,493 bytes, 62 lines download raw bytes

1(function() {
2	try {
3		var e = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof globalThis ? globalThis : "undefined" != typeof self ? self : {};
4		e.SENTRY_RELEASE = { id: "b96dc26" };
5		var n = new e.Error().stack;
6		n && (e._sentryDebugIds = e._sentryDebugIds || {}, e._sentryDebugIds[n] = "ccf6502c-ab20-4aa9-961f-5077f1ebd98c", e._sentryDebugIdIdentifier = "sentry-dbid-ccf6502c-ab20-4aa9-961f-5077f1ebd98c");
7	} catch (e) {}
8})();
9import { a as __toESM, n as __esmMin } from "./rolldown-runtime-sLwMD6dS.js";
10import { I as confetti_module_default, L as init_confetti_module } from "./controllers-jdPQjaCB.js";
11import { a as cn, t as require_jsx_runtime, u as init_utils } from "./jsx-runtime-CHSMGLHp.js";
12import { t as require_react } from "./react-CrLPhuc5.js";
13//#region app/frontend/react/components/confetti.tsx
14var import_react, import_jsx_runtime, Confetti;
15function init_confetti() {
16	return (init_confetti = __esmMin((() => {
17		import_react = /* @__PURE__ */ __toESM(require_react());
18		init_confetti_module();
19		init_utils();
20		import_jsx_runtime = require_jsx_runtime();
21		Confetti = import_react.forwardRef(({ className, timeout = 20, ...props }, ref) => {
22			const canvasRef = import_react.useRef(null);
23			const confettiInstanceRef = import_react.useRef(null);
24			import_react.useImperativeHandle(ref, () => canvasRef.current);
25			import_react.useEffect(() => {
26				const canvas = canvasRef.current;
27				if (!canvas) return;
28				confettiInstanceRef.current = confettiInstanceRef.current || confetti_module_default.create(canvas, { resize: true });
29				const timeoutSeconds = timeout || 20;
30				const endTime = Date.now() + timeoutSeconds * 1e3;
31				let cancelled = false;
32				const shootConfetti = async () => {
33					while (Date.now() < endTime && !cancelled) {
34						if (confettiInstanceRef.current) confettiInstanceRef.current({
35							particleCount: 6,
36							ticks: 140,
37							spread: 100,
38							origin: {
39								x: .5,
40								y: 0
41							},
42							scalar: 1.15
43						});
44						await new Promise((resolve) => requestAnimationFrame(resolve));
45					}
46				};
47				shootConfetti();
48				return () => {
49					cancelled = true;
50				};
51			}, [timeout]);
52			return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("canvas", {
53				ref: canvasRef,
54				className: cn("confetti-canvas", className),
55				...props
56			});
57		});
58		Confetti.displayName = "Confetti";
59	})))();
60}
61//#endregion
62export { init_confetti as n, Confetti as t };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.