agentation 0.0.2 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js ADDED
@@ -0,0 +1,3380 @@
1
+ "use client";
2
+ "use strict";
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
20
+
21
+ // src/index.ts
22
+ var index_exports = {};
23
+ __export(index_exports, {
24
+ Agentation: () => PageFeedbackToolbarCSS,
25
+ AgentationCSS: () => PageFeedbackToolbarCSS,
26
+ AnimatedBunny: () => AnimatedBunny,
27
+ AnnotationPopup: () => AnnotationPopup,
28
+ AnnotationPopupCSS: () => AnnotationPopupCSS,
29
+ AnnotationPopupPresence: () => AnnotationPopupPresence,
30
+ IconChatEllipsis: () => IconChatEllipsis,
31
+ IconCheck: () => IconCheck,
32
+ IconCheckSmall: () => IconCheckSmall,
33
+ IconCheckSmallAnimated: () => IconCheckSmallAnimated,
34
+ IconCheckmark: () => IconCheckmark,
35
+ IconCheckmarkCircle: () => IconCheckmarkCircle,
36
+ IconCheckmarkLarge: () => IconCheckmarkLarge,
37
+ IconClose: () => IconClose,
38
+ IconCopyAlt: () => IconCopyAlt,
39
+ IconCopyAnimated: () => IconCopyAnimated,
40
+ IconEye: () => IconEye,
41
+ IconEyeAlt: () => IconEyeAlt,
42
+ IconEyeAnimated: () => IconEyeAnimated,
43
+ IconEyeClosed: () => IconEyeClosed,
44
+ IconEyeMinus: () => IconEyeMinus,
45
+ IconGear: () => IconGear,
46
+ IconHelp: () => IconHelp,
47
+ IconListSparkle: () => IconListSparkle,
48
+ IconMoon: () => IconMoon,
49
+ IconPause: () => IconPause,
50
+ IconPauseAlt: () => IconPauseAlt,
51
+ IconPausePlayAnimated: () => IconPausePlayAnimated,
52
+ IconPlayAlt: () => IconPlayAlt,
53
+ IconPlus: () => IconPlus,
54
+ IconSun: () => IconSun,
55
+ IconTrashAlt: () => IconTrashAlt,
56
+ IconXmark: () => IconXmark,
57
+ IconXmarkLarge: () => IconXmarkLarge,
58
+ PageFeedbackToolbarCSS: () => PageFeedbackToolbarCSS,
59
+ getElementClasses: () => getElementClasses,
60
+ getElementPath: () => getElementPath,
61
+ getNearbyText: () => getNearbyText,
62
+ getStorageKey: () => getStorageKey,
63
+ identifyAnimationElement: () => identifyAnimationElement,
64
+ identifyElement: () => identifyElement,
65
+ loadAnnotations: () => loadAnnotations,
66
+ saveAnnotations: () => saveAnnotations
67
+ });
68
+ module.exports = __toCommonJS(index_exports);
69
+
70
+ // src/components/page-toolbar-css/index.tsx
71
+ var import_react2 = require("react");
72
+ var import_react_dom = require("react-dom");
73
+
74
+ // src/components/annotation-popup-css/index.tsx
75
+ var import_react = require("react");
76
+
77
+ // src/components/annotation-popup-css/styles.module.scss
78
+ var css = '@keyframes styles-module__popupEnter___AuQDN {\n from {\n opacity: 0;\n transform: translateX(-50%) scale(0.95) translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n }\n}\n@keyframes styles-module__popupExit___JJKQX {\n from {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n }\n to {\n opacity: 0;\n transform: translateX(-50%) scale(0.95) translateY(4px);\n }\n}\n@keyframes styles-module__shake___jdbWe {\n 0%, 100% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(0);\n }\n 20% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(-3px);\n }\n 40% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(3px);\n }\n 60% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(-2px);\n }\n 80% {\n transform: translateX(-50%) scale(1) translateY(0) translateX(2px);\n }\n}\n.styles-module__popup___IhzrD {\n position: fixed;\n transform: translateX(-50%);\n width: 280px;\n padding: 0.75rem 1rem 14px;\n background: #1a1a1a;\n border-radius: 16px;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n cursor: default;\n z-index: 100001;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n will-change: transform, opacity;\n contain: layout style;\n opacity: 0;\n}\n.styles-module__popup___IhzrD.styles-module__enter___L7U7N {\n animation: styles-module__popupEnter___AuQDN 0.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;\n}\n.styles-module__popup___IhzrD.styles-module__entered___COX-w {\n opacity: 1;\n transform: translateX(-50%) scale(1) translateY(0);\n}\n.styles-module__popup___IhzrD.styles-module__exit___5eGjE {\n animation: styles-module__popupExit___JJKQX 0.15s ease-in forwards;\n}\n.styles-module__popup___IhzrD.styles-module__entered___COX-w.styles-module__shake___jdbWe {\n animation: styles-module__shake___jdbWe 0.25s ease-out;\n}\n\n.styles-module__header___wWsSi {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n}\n\n.styles-module__element___fTV2z {\n font-size: 0.75rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.65);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n}\n\n.styles-module__timestamp___Dtpsv {\n font-size: 0.625rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.35);\n font-variant-numeric: tabular-nums;\n margin-left: 0.5rem;\n flex-shrink: 0;\n}\n\n.styles-module__quote___mcMmQ {\n font-size: 0.6875rem;\n font-style: italic;\n color: rgba(255, 255, 255, 0.5);\n margin-bottom: 0.5rem;\n padding: 0.4rem 0.5rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 0.25rem;\n line-height: 1.45;\n}\n\n.styles-module__textarea___jrSae {\n width: 100%;\n padding: 0.5rem 0.625rem;\n font-size: 0.8125rem;\n font-family: inherit;\n background: rgba(255, 255, 255, 0.05);\n color: #fff;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n resize: none;\n outline: none;\n transition: border-color 0.15s ease;\n}\n.styles-module__textarea___jrSae:focus {\n border-color: #3c82f7;\n}\n.styles-module__textarea___jrSae.styles-module__green___99l3h:focus {\n border-color: #34C759;\n}\n.styles-module__textarea___jrSae::placeholder {\n color: rgba(255, 255, 255, 0.35);\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar {\n width: 6px;\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar-track {\n background: transparent;\n}\n.styles-module__textarea___jrSae::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 3px;\n}\n\n.styles-module__actions___D6x3f {\n display: flex;\n justify-content: flex-end;\n gap: 0.375rem;\n margin-top: 0.5rem;\n}\n\n.styles-module__cancel___hRjnL,\n.styles-module__submit___K-mIR {\n padding: 0.4rem 0.875rem;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 1rem;\n border: none;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;\n}\n\n.styles-module__cancel___hRjnL {\n background: transparent;\n color: rgba(255, 255, 255, 0.5);\n}\n.styles-module__cancel___hRjnL:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n\n.styles-module__submit___K-mIR {\n color: white;\n}\n.styles-module__submit___K-mIR:hover:not(:disabled) {\n filter: brightness(0.9);\n}\n.styles-module__submit___K-mIR:disabled {\n cursor: not-allowed;\n}\n\n.styles-module__light___6AaSQ.styles-module__popup___IhzrD {\n background: #fff;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);\n}\n.styles-module__light___6AaSQ .styles-module__element___fTV2z {\n color: rgba(0, 0, 0, 0.6);\n}\n.styles-module__light___6AaSQ .styles-module__timestamp___Dtpsv {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__quote___mcMmQ {\n color: rgba(0, 0, 0, 0.55);\n background: rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae {\n background: rgba(0, 0, 0, 0.03);\n color: #1a1a1a;\n border-color: rgba(0, 0, 0, 0.12);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae::placeholder {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___6AaSQ .styles-module__textarea___jrSae::-webkit-scrollbar-thumb {\n background: rgba(0, 0, 0, 0.15);\n}\n.styles-module__light___6AaSQ .styles-module__cancel___hRjnL {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___6AaSQ .styles-module__cancel___hRjnL:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.75);\n}';
79
+ var classNames = { "popup": "styles-module__popup___IhzrD", "enter": "styles-module__enter___L7U7N", "popupEnter": "styles-module__popupEnter___AuQDN", "entered": "styles-module__entered___COX-w", "exit": "styles-module__exit___5eGjE", "popupExit": "styles-module__popupExit___JJKQX", "shake": "styles-module__shake___jdbWe", "header": "styles-module__header___wWsSi", "element": "styles-module__element___fTV2z", "timestamp": "styles-module__timestamp___Dtpsv", "quote": "styles-module__quote___mcMmQ", "textarea": "styles-module__textarea___jrSae", "green": "styles-module__green___99l3h", "actions": "styles-module__actions___D6x3f", "cancel": "styles-module__cancel___hRjnL", "submit": "styles-module__submit___K-mIR", "light": "styles-module__light___6AaSQ" };
80
+ if (typeof document !== "undefined") {
81
+ let style = document.getElementById("feedback-tool-styles-annotation-popup-css-styles");
82
+ if (!style) {
83
+ style = document.createElement("style");
84
+ style.id = "feedback-tool-styles-annotation-popup-css-styles";
85
+ style.textContent = css;
86
+ document.head.appendChild(style);
87
+ }
88
+ }
89
+ var styles_module_default = classNames;
90
+
91
+ // src/components/annotation-popup-css/index.tsx
92
+ var import_jsx_runtime = require("react/jsx-runtime");
93
+ var AnnotationPopupCSS = (0, import_react.forwardRef)(
94
+ function AnnotationPopupCSS2({
95
+ element,
96
+ timestamp,
97
+ selectedText,
98
+ placeholder = "What should change?",
99
+ initialValue = "",
100
+ submitLabel = "Add",
101
+ onSubmit,
102
+ onCancel,
103
+ style,
104
+ accentColor = "#3c82f7",
105
+ isExiting = false,
106
+ lightMode = false
107
+ }, ref) {
108
+ const [text, setText] = (0, import_react.useState)(initialValue);
109
+ const [isShaking, setIsShaking] = (0, import_react.useState)(false);
110
+ const [animState, setAnimState] = (0, import_react.useState)("initial");
111
+ const [isFocused, setIsFocused] = (0, import_react.useState)(false);
112
+ const textareaRef = (0, import_react.useRef)(null);
113
+ const popupRef = (0, import_react.useRef)(null);
114
+ (0, import_react.useEffect)(() => {
115
+ if (isExiting && animState !== "exit") {
116
+ setAnimState("exit");
117
+ }
118
+ }, [isExiting, animState]);
119
+ (0, import_react.useEffect)(() => {
120
+ requestAnimationFrame(() => {
121
+ setAnimState("enter");
122
+ });
123
+ const enterTimer = setTimeout(() => {
124
+ setAnimState("entered");
125
+ }, 200);
126
+ const focusTimer = setTimeout(() => {
127
+ const textarea = textareaRef.current;
128
+ if (textarea) {
129
+ textarea.focus();
130
+ textarea.selectionStart = textarea.selectionEnd = textarea.value.length;
131
+ textarea.scrollTop = textarea.scrollHeight;
132
+ }
133
+ }, 50);
134
+ return () => {
135
+ clearTimeout(enterTimer);
136
+ clearTimeout(focusTimer);
137
+ };
138
+ }, []);
139
+ const shake = (0, import_react.useCallback)(() => {
140
+ setIsShaking(true);
141
+ setTimeout(() => {
142
+ setIsShaking(false);
143
+ textareaRef.current?.focus();
144
+ }, 250);
145
+ }, []);
146
+ (0, import_react.useImperativeHandle)(ref, () => ({
147
+ shake
148
+ }), [shake]);
149
+ const handleCancel = (0, import_react.useCallback)(() => {
150
+ setAnimState("exit");
151
+ setTimeout(() => {
152
+ onCancel();
153
+ }, 150);
154
+ }, [onCancel]);
155
+ const handleSubmit = (0, import_react.useCallback)(() => {
156
+ if (!text.trim()) return;
157
+ onSubmit(text.trim());
158
+ }, [text, onSubmit]);
159
+ const handleKeyDown = (0, import_react.useCallback)(
160
+ (e) => {
161
+ if (e.key === "Enter" && !e.shiftKey) {
162
+ e.preventDefault();
163
+ handleSubmit();
164
+ }
165
+ if (e.key === "Escape") {
166
+ handleCancel();
167
+ }
168
+ },
169
+ [handleSubmit, handleCancel]
170
+ );
171
+ const popupClassName = [
172
+ styles_module_default.popup,
173
+ lightMode ? styles_module_default.light : "",
174
+ animState === "enter" ? styles_module_default.enter : "",
175
+ animState === "entered" ? styles_module_default.entered : "",
176
+ animState === "exit" ? styles_module_default.exit : "",
177
+ isShaking ? styles_module_default.shake : ""
178
+ ].filter(Boolean).join(" ");
179
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
180
+ "div",
181
+ {
182
+ ref: popupRef,
183
+ className: popupClassName,
184
+ "data-annotation-popup": true,
185
+ style,
186
+ onClick: (e) => e.stopPropagation(),
187
+ children: [
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles_module_default.header, children: [
189
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles_module_default.element, children: element }),
190
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: styles_module_default.timestamp, children: timestamp })
191
+ ] }),
192
+ selectedText && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles_module_default.quote, children: [
193
+ "\u201C",
194
+ selectedText.slice(0, 80),
195
+ selectedText.length > 80 ? "..." : "",
196
+ "\u201D"
197
+ ] }),
198
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
199
+ "textarea",
200
+ {
201
+ ref: textareaRef,
202
+ className: styles_module_default.textarea,
203
+ style: { borderColor: isFocused ? accentColor : void 0 },
204
+ placeholder,
205
+ value: text,
206
+ onChange: (e) => setText(e.target.value),
207
+ onFocus: () => setIsFocused(true),
208
+ onBlur: () => setIsFocused(false),
209
+ rows: 2,
210
+ onKeyDown: handleKeyDown
211
+ }
212
+ ),
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: styles_module_default.actions, children: [
214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", { className: styles_module_default.cancel, onClick: handleCancel, children: "Cancel" }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
216
+ "button",
217
+ {
218
+ className: styles_module_default.submit,
219
+ style: {
220
+ backgroundColor: accentColor,
221
+ opacity: text.trim() ? 1 : 0.4
222
+ },
223
+ onClick: handleSubmit,
224
+ disabled: !text.trim(),
225
+ children: submitLabel
226
+ }
227
+ )
228
+ ] })
229
+ ]
230
+ }
231
+ );
232
+ }
233
+ );
234
+
235
+ // src/components/icons.tsx
236
+ var import_jsx_runtime2 = require("react/jsx-runtime");
237
+ var IconClose = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
238
+ "path",
239
+ {
240
+ d: "M4 4l8 8M12 4l-8 8",
241
+ stroke: "currentColor",
242
+ strokeWidth: "1.5",
243
+ strokeLinecap: "round"
244
+ }
245
+ ) });
246
+ var IconPlus = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
247
+ "path",
248
+ {
249
+ d: "M8 3v10M3 8h10",
250
+ stroke: "currentColor",
251
+ strokeWidth: "1.5",
252
+ strokeLinecap: "round"
253
+ }
254
+ ) });
255
+ var IconCheck = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 16 16", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
256
+ "path",
257
+ {
258
+ d: "M3 8l3.5 3.5L13 5",
259
+ stroke: "currentColor",
260
+ strokeWidth: "1.5",
261
+ strokeLinecap: "round",
262
+ strokeLinejoin: "round"
263
+ }
264
+ ) });
265
+ var IconCheckSmall = ({ size = 14 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 14 14", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
266
+ "path",
267
+ {
268
+ d: "M3.9375 7L6.125 9.1875L10.5 4.8125",
269
+ stroke: "currentColor",
270
+ strokeWidth: "1.5",
271
+ strokeLinecap: "round",
272
+ strokeLinejoin: "round"
273
+ }
274
+ ) });
275
+ var IconListSparkle = ({
276
+ size = 24,
277
+ style = {}
278
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", style, children: [
279
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { clipPath: "url(#clip0_list_sparkle)", children: [
280
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
281
+ "path",
282
+ {
283
+ d: "M11.5 12L5.5 12",
284
+ stroke: "currentColor",
285
+ strokeWidth: "1.5",
286
+ strokeLinecap: "round",
287
+ strokeLinejoin: "round"
288
+ }
289
+ ),
290
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
291
+ "path",
292
+ {
293
+ d: "M18.5 6.75L5.5 6.75",
294
+ stroke: "currentColor",
295
+ strokeWidth: "1.5",
296
+ strokeLinecap: "round",
297
+ strokeLinejoin: "round"
298
+ }
299
+ ),
300
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
301
+ "path",
302
+ {
303
+ d: "M9.25 17.25L5.5 17.25",
304
+ stroke: "currentColor",
305
+ strokeWidth: "1.5",
306
+ strokeLinecap: "round",
307
+ strokeLinejoin: "round"
308
+ }
309
+ ),
310
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
311
+ "path",
312
+ {
313
+ d: "M16 12.75L16.5179 13.9677C16.8078 14.6494 17.3506 15.1922 18.0323 15.4821L19.25 16L18.0323 16.5179C17.3506 16.8078 16.8078 17.3506 16.5179 18.0323L16 19.25L15.4821 18.0323C15.1922 17.3506 14.6494 16.8078 13.9677 16.5179L12.75 16L13.9677 15.4821C14.6494 15.1922 15.1922 14.6494 15.4821 13.9677L16 12.75Z",
314
+ stroke: "currentColor",
315
+ strokeWidth: "1.5",
316
+ strokeLinejoin: "round"
317
+ }
318
+ )
319
+ ] }),
320
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_list_sparkle", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
321
+ ] });
322
+ var IconHelp = ({ size = 20 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 20 20", fill: "none", children: [
323
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
324
+ "path",
325
+ {
326
+ d: "M10 16.0417C6.66328 16.0417 3.95834 13.3367 3.95834 10C3.95834 6.66328 6.66328 3.95833 10 3.95833C13.3367 3.95833 16.0417 6.66328 16.0417 10C16.0417 13.3367 13.3367 16.0417 10 16.0417Z",
327
+ stroke: "currentColor",
328
+ strokeOpacity: "0.2",
329
+ strokeWidth: "1.25",
330
+ strokeLinecap: "round",
331
+ strokeLinejoin: "round"
332
+ }
333
+ ),
334
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
335
+ "path",
336
+ {
337
+ d: "M8.24188 8.18736C8.38392 7.78357 8.66429 7.44309 9.03331 7.22621C9.40234 7.00933 9.83621 6.93005 10.2581 7.00241C10.68 7.07477 11.0626 7.29411 11.3383 7.62157C11.6139 7.94903 11.7648 8.36348 11.7642 8.79152C11.7642 9.99986 10 10.604 10 10.604V10.8333",
338
+ stroke: "currentColor",
339
+ strokeOpacity: "0.2",
340
+ strokeWidth: "1.25",
341
+ strokeLinecap: "round",
342
+ strokeLinejoin: "round"
343
+ }
344
+ ),
345
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
346
+ "path",
347
+ {
348
+ d: "M10 13.0208H10.006",
349
+ stroke: "currentColor",
350
+ strokeOpacity: "0.2",
351
+ strokeWidth: "1.25",
352
+ strokeLinecap: "round",
353
+ strokeLinejoin: "round"
354
+ }
355
+ )
356
+ ] });
357
+ var IconCheckSmallAnimated = ({ size = 14 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 14 14", fill: "none", children: [
358
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
359
+ @keyframes checkDraw {
360
+ 0% {
361
+ stroke-dashoffset: 12;
362
+ }
363
+ 100% {
364
+ stroke-dashoffset: 0;
365
+ }
366
+ }
367
+ @keyframes checkBounce {
368
+ 0% {
369
+ transform: scale(0.5);
370
+ opacity: 0;
371
+ }
372
+ 50% {
373
+ transform: scale(1.12);
374
+ opacity: 1;
375
+ }
376
+ 75% {
377
+ transform: scale(0.95);
378
+ }
379
+ 100% {
380
+ transform: scale(1);
381
+ }
382
+ }
383
+ .check-path-animated {
384
+ stroke-dasharray: 12;
385
+ stroke-dashoffset: 0;
386
+ transform-origin: center;
387
+ animation: checkDraw 0.18s ease-out, checkBounce 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
388
+ }
389
+ ` }),
390
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
391
+ "path",
392
+ {
393
+ className: "check-path-animated",
394
+ d: "M3.9375 7L6.125 9.1875L10.5 4.8125",
395
+ stroke: "currentColor",
396
+ strokeWidth: "1.5",
397
+ strokeLinecap: "round",
398
+ strokeLinejoin: "round"
399
+ }
400
+ )
401
+ ] });
402
+ var IconCopyAlt = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
403
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
404
+ "path",
405
+ {
406
+ d: "M4.75 11.25C4.75 10.4216 5.42157 9.75 6.25 9.75H12.75C13.5784 9.75 14.25 10.4216 14.25 11.25V17.75C14.25 18.5784 13.5784 19.25 12.75 19.25H6.25C5.42157 19.25 4.75 18.5784 4.75 17.75V11.25Z",
407
+ stroke: "currentColor",
408
+ strokeWidth: "1.5"
409
+ }
410
+ ),
411
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
412
+ "path",
413
+ {
414
+ d: "M17.25 14.25H17.75C18.5784 14.25 19.25 13.5784 19.25 12.75V6.25C19.25 5.42157 18.5784 4.75 17.75 4.75H11.25C10.4216 4.75 9.75 5.42157 9.75 6.25V6.75",
415
+ stroke: "currentColor",
416
+ strokeWidth: "1.5",
417
+ strokeLinecap: "round"
418
+ }
419
+ )
420
+ ] });
421
+ var IconCopyAnimated = ({ size = 24, copied = false }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
422
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
423
+ .copy-icon, .check-icon {
424
+ transition: opacity 0.2s ease, transform 0.2s ease;
425
+ }
426
+ ` }),
427
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { className: "copy-icon", style: { opacity: copied ? 0 : 1, transform: copied ? "scale(0.8)" : "scale(1)", transformOrigin: "center" }, children: [
428
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
429
+ "path",
430
+ {
431
+ d: "M4.75 11.25C4.75 10.4216 5.42157 9.75 6.25 9.75H12.75C13.5784 9.75 14.25 10.4216 14.25 11.25V17.75C14.25 18.5784 13.5784 19.25 12.75 19.25H6.25C5.42157 19.25 4.75 18.5784 4.75 17.75V11.25Z",
432
+ stroke: "currentColor",
433
+ strokeWidth: "1.5"
434
+ }
435
+ ),
436
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
437
+ "path",
438
+ {
439
+ d: "M17.25 14.25H17.75C18.5784 14.25 19.25 13.5784 19.25 12.75V6.25C19.25 5.42157 18.5784 4.75 17.75 4.75H11.25C10.4216 4.75 9.75 5.42157 9.75 6.25V6.75",
440
+ stroke: "currentColor",
441
+ strokeWidth: "1.5",
442
+ strokeLinecap: "round"
443
+ }
444
+ )
445
+ ] }),
446
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { className: "check-icon", style: { opacity: copied ? 1 : 0, transform: copied ? "scale(1)" : "scale(0.8)", transformOrigin: "center" }, children: [
447
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
448
+ "path",
449
+ {
450
+ d: "M12 20C7.58172 20 4 16.4182 4 12C4 7.58172 7.58172 4 12 4C16.4182 4 20 7.58172 20 12C20 16.4182 16.4182 20 12 20Z",
451
+ stroke: "currentColor",
452
+ strokeWidth: "1.5",
453
+ strokeLinecap: "round",
454
+ strokeLinejoin: "round"
455
+ }
456
+ ),
457
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
458
+ "path",
459
+ {
460
+ d: "M15 10L11 14.25L9.25 12.25",
461
+ stroke: "currentColor",
462
+ strokeWidth: "1.5",
463
+ strokeLinecap: "round",
464
+ strokeLinejoin: "round"
465
+ }
466
+ )
467
+ ] })
468
+ ] });
469
+ var IconEye = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
470
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
471
+ "path",
472
+ {
473
+ d: "M4.91516 12.7108C4.63794 12.2883 4.63705 11.7565 4.91242 11.3328C5.84146 9.9033 8.30909 6.74994 12 6.74994C15.6909 6.74994 18.1585 9.9033 19.0876 11.3328C19.3629 11.7565 19.3621 12.2883 19.0848 12.7108C18.1537 14.13 15.6873 17.2499 12 17.2499C8.31272 17.2499 5.8463 14.13 4.91516 12.7108Z",
474
+ stroke: "currentColor",
475
+ strokeWidth: "1.5",
476
+ strokeLinecap: "round",
477
+ strokeLinejoin: "round"
478
+ }
479
+ ),
480
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
481
+ "path",
482
+ {
483
+ d: "M12 14.25C13.2426 14.25 14.25 13.2426 14.25 12C14.25 10.7574 13.2426 9.75 12 9.75C10.7574 9.75 9.75 10.7574 9.75 12C9.75 13.2426 10.7574 14.25 12 14.25Z",
484
+ stroke: "currentColor",
485
+ strokeWidth: "1.5",
486
+ strokeLinecap: "round",
487
+ strokeLinejoin: "round"
488
+ }
489
+ )
490
+ ] });
491
+ var IconEyeAlt = ({ size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
492
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
493
+ "path",
494
+ {
495
+ d: "M3.91752 12.7539C3.65127 12.2996 3.65037 11.7515 3.9149 11.2962C4.9042 9.59346 7.72688 5.49994 12 5.49994C16.2731 5.49994 19.0958 9.59346 20.0851 11.2962C20.3496 11.7515 20.3487 12.2996 20.0825 12.7539C19.0908 14.4459 16.2694 18.4999 12 18.4999C7.73064 18.4999 4.90918 14.4459 3.91752 12.7539Z",
496
+ stroke: "currentColor",
497
+ strokeWidth: "1.5",
498
+ strokeLinecap: "round",
499
+ strokeLinejoin: "round"
500
+ }
501
+ ),
502
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
503
+ "path",
504
+ {
505
+ d: "M12 14.8261C13.5608 14.8261 14.8261 13.5608 14.8261 12C14.8261 10.4392 13.5608 9.17392 12 9.17392C10.4392 9.17392 9.17391 10.4392 9.17391 12C9.17391 13.5608 10.4392 14.8261 12 14.8261Z",
506
+ stroke: "currentColor",
507
+ strokeWidth: "1.5",
508
+ strokeLinecap: "round",
509
+ strokeLinejoin: "round"
510
+ }
511
+ )
512
+ ] });
513
+ var IconEyeClosed = ({ size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
514
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
515
+ "path",
516
+ {
517
+ d: "M18.6025 9.28503C18.9174 8.9701 19.4364 8.99481 19.7015 9.35271C20.1484 9.95606 20.4943 10.507 20.7342 10.9199C21.134 11.6086 21.1329 12.4454 20.7303 13.1328C20.2144 14.013 19.2151 15.5225 17.7723 16.8193C16.3293 18.1162 14.3852 19.2497 12.0008 19.25C11.4192 19.25 10.8638 19.1823 10.3355 19.0613C9.77966 18.934 9.63498 18.2525 10.0382 17.8493C10.2412 17.6463 10.5374 17.573 10.8188 17.6302C11.1993 17.7076 11.5935 17.75 12.0008 17.75C13.8848 17.7497 15.4867 16.8568 16.7693 15.7041C18.0522 14.5511 18.9606 13.1867 19.4363 12.375C19.5656 12.1543 19.5659 11.8943 19.4373 11.6729C19.2235 11.3049 18.921 10.8242 18.5364 10.3003C18.3085 9.98991 18.3302 9.5573 18.6025 9.28503ZM12.0008 4.75C12.5814 4.75006 13.1358 4.81803 13.6632 4.93953C14.2182 5.06741 14.362 5.74812 13.9593 6.15091C13.7558 6.35435 13.4589 6.42748 13.1771 6.36984C12.7983 6.29239 12.4061 6.25006 12.0008 6.25C10.1167 6.25 8.51415 7.15145 7.23028 8.31543C5.94678 9.47919 5.03918 10.8555 4.56426 11.6729C4.43551 11.8945 4.43582 12.1542 4.56524 12.375C4.77587 12.7343 5.07189 13.2012 5.44718 13.7105C5.67623 14.0213 5.65493 14.4552 5.38193 14.7282C5.0671 15.0431 4.54833 15.0189 4.28292 14.6614C3.84652 14.0736 3.50813 13.5369 3.27129 13.1328C2.86831 12.4451 2.86717 11.6088 3.26739 10.9199C3.78185 10.0345 4.77959 8.51239 6.22247 7.2041C7.66547 5.89584 9.61202 4.75 12.0008 4.75Z",
518
+ fill: "currentColor"
519
+ }
520
+ ),
521
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
522
+ "path",
523
+ {
524
+ d: "M5 19L19 5",
525
+ stroke: "currentColor",
526
+ strokeWidth: "1.5",
527
+ strokeLinecap: "round"
528
+ }
529
+ )
530
+ ] });
531
+ var IconEyeAnimated = ({ size = 24, isOpen = true }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
532
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
533
+ .eye-open, .eye-closed {
534
+ transition: opacity 0.2s ease;
535
+ }
536
+ ` }),
537
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { className: "eye-open", style: { opacity: isOpen ? 1 : 0 }, children: [
538
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
539
+ "path",
540
+ {
541
+ d: "M3.91752 12.7539C3.65127 12.2996 3.65037 11.7515 3.9149 11.2962C4.9042 9.59346 7.72688 5.49994 12 5.49994C16.2731 5.49994 19.0958 9.59346 20.0851 11.2962C20.3496 11.7515 20.3487 12.2996 20.0825 12.7539C19.0908 14.4459 16.2694 18.4999 12 18.4999C7.73064 18.4999 4.90918 14.4459 3.91752 12.7539Z",
542
+ stroke: "currentColor",
543
+ strokeWidth: "1.5",
544
+ strokeLinecap: "round",
545
+ strokeLinejoin: "round"
546
+ }
547
+ ),
548
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
549
+ "path",
550
+ {
551
+ d: "M12 14.8261C13.5608 14.8261 14.8261 13.5608 14.8261 12C14.8261 10.4392 13.5608 9.17392 12 9.17392C10.4392 9.17392 9.17391 10.4392 9.17391 12C9.17391 13.5608 10.4392 14.8261 12 14.8261Z",
552
+ stroke: "currentColor",
553
+ strokeWidth: "1.5",
554
+ strokeLinecap: "round",
555
+ strokeLinejoin: "round"
556
+ }
557
+ )
558
+ ] }),
559
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { className: "eye-closed", style: { opacity: isOpen ? 0 : 1 }, children: [
560
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
561
+ "path",
562
+ {
563
+ d: "M18.6025 9.28503C18.9174 8.9701 19.4364 8.99481 19.7015 9.35271C20.1484 9.95606 20.4943 10.507 20.7342 10.9199C21.134 11.6086 21.1329 12.4454 20.7303 13.1328C20.2144 14.013 19.2151 15.5225 17.7723 16.8193C16.3293 18.1162 14.3852 19.2497 12.0008 19.25C11.4192 19.25 10.8638 19.1823 10.3355 19.0613C9.77966 18.934 9.63498 18.2525 10.0382 17.8493C10.2412 17.6463 10.5374 17.573 10.8188 17.6302C11.1993 17.7076 11.5935 17.75 12.0008 17.75C13.8848 17.7497 15.4867 16.8568 16.7693 15.7041C18.0522 14.5511 18.9606 13.1867 19.4363 12.375C19.5656 12.1543 19.5659 11.8943 19.4373 11.6729C19.2235 11.3049 18.921 10.8242 18.5364 10.3003C18.3085 9.98991 18.3302 9.5573 18.6025 9.28503ZM12.0008 4.75C12.5814 4.75006 13.1358 4.81803 13.6632 4.93953C14.2182 5.06741 14.362 5.74812 13.9593 6.15091C13.7558 6.35435 13.4589 6.42748 13.1771 6.36984C12.7983 6.29239 12.4061 6.25006 12.0008 6.25C10.1167 6.25 8.51415 7.15145 7.23028 8.31543C5.94678 9.47919 5.03918 10.8555 4.56426 11.6729C4.43551 11.8945 4.43582 12.1542 4.56524 12.375C4.77587 12.7343 5.07189 13.2012 5.44718 13.7105C5.67623 14.0213 5.65493 14.4552 5.38193 14.7282C5.0671 15.0431 4.54833 15.0189 4.28292 14.6614C3.84652 14.0736 3.50813 13.5369 3.27129 13.1328C2.86831 12.4451 2.86717 11.6088 3.26739 10.9199C3.78185 10.0345 4.77959 8.51239 6.22247 7.2041C7.66547 5.89584 9.61202 4.75 12.0008 4.75Z",
564
+ fill: "currentColor"
565
+ }
566
+ ),
567
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
568
+ "path",
569
+ {
570
+ d: "M5 19L19 5",
571
+ stroke: "currentColor",
572
+ strokeWidth: "1.5",
573
+ strokeLinecap: "round"
574
+ }
575
+ )
576
+ ] })
577
+ ] });
578
+ var IconPausePlayAnimated = ({ size = 24, isPaused = false }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
579
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
580
+ .pause-bar, .play-triangle {
581
+ transition: opacity 0.15s ease;
582
+ }
583
+ ` }),
584
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
585
+ "path",
586
+ {
587
+ className: "pause-bar",
588
+ d: "M8 6L8 18",
589
+ stroke: "currentColor",
590
+ strokeWidth: "1.5",
591
+ strokeLinecap: "round",
592
+ style: { opacity: isPaused ? 0 : 1 }
593
+ }
594
+ ),
595
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
596
+ "path",
597
+ {
598
+ className: "pause-bar",
599
+ d: "M16 18L16 6",
600
+ stroke: "currentColor",
601
+ strokeWidth: "1.5",
602
+ strokeLinecap: "round",
603
+ style: { opacity: isPaused ? 0 : 1 }
604
+ }
605
+ ),
606
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
607
+ "path",
608
+ {
609
+ className: "play-triangle",
610
+ d: "M17.75 10.701C18.75 11.2783 18.75 12.7217 17.75 13.299L8.75 18.4952C7.75 19.0725 6.5 18.3509 6.5 17.1962L6.5 6.80384C6.5 5.64914 7.75 4.92746 8.75 5.50481L17.75 10.701Z",
611
+ stroke: "currentColor",
612
+ strokeWidth: "1.5",
613
+ style: { opacity: isPaused ? 1 : 0 }
614
+ }
615
+ )
616
+ ] });
617
+ var IconEyeMinus = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
618
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
619
+ "path",
620
+ {
621
+ d: "M4.91516 12.7108C4.63794 12.2883 4.63705 11.7565 4.91242 11.3328C5.84146 9.9033 8.30909 6.74994 12 6.74994C15.6909 6.74994 18.1585 9.9033 19.0876 11.3328C19.3629 11.7565 19.3621 12.2883 19.0848 12.7108C18.1537 14.13 15.6873 17.2499 12 17.2499C8.31272 17.2499 5.8463 14.13 4.91516 12.7108Z",
622
+ stroke: "currentColor",
623
+ strokeWidth: "1.5",
624
+ strokeLinecap: "round",
625
+ strokeLinejoin: "round"
626
+ }
627
+ ),
628
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
629
+ "path",
630
+ {
631
+ d: "M9 12H15",
632
+ stroke: "currentColor",
633
+ strokeWidth: "1.5",
634
+ strokeLinecap: "round"
635
+ }
636
+ )
637
+ ] });
638
+ var IconGear = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
639
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
640
+ "path",
641
+ {
642
+ d: "M10.6504 5.81117C10.9939 4.39628 13.0061 4.39628 13.3496 5.81117C13.5715 6.72517 14.6187 7.15891 15.4219 6.66952C16.6652 5.91193 18.0881 7.33479 17.3305 8.57815C16.8411 9.38134 17.2748 10.4285 18.1888 10.6504C19.6037 10.9939 19.6037 13.0061 18.1888 13.3496C17.2748 13.5715 16.8411 14.6187 17.3305 15.4219C18.0881 16.6652 16.6652 18.0881 15.4219 17.3305C14.6187 16.8411 13.5715 17.2748 13.3496 18.1888C13.0061 19.6037 10.9939 19.6037 10.6504 18.1888C10.4285 17.2748 9.38135 16.8411 8.57815 17.3305C7.33479 18.0881 5.91193 16.6652 6.66952 15.4219C7.15891 14.6187 6.72517 13.5715 5.81117 13.3496C4.39628 13.0061 4.39628 10.9939 5.81117 10.6504C6.72517 10.4285 7.15891 9.38134 6.66952 8.57815C5.91193 7.33479 7.33479 5.91192 8.57815 6.66952C9.38135 7.15891 10.4285 6.72517 10.6504 5.81117Z",
643
+ stroke: "currentColor",
644
+ strokeWidth: "1.5",
645
+ strokeLinecap: "round",
646
+ strokeLinejoin: "round"
647
+ }
648
+ ),
649
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "2.5", stroke: "currentColor", strokeWidth: "1.5" })
650
+ ] });
651
+ var IconPauseAlt = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
652
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
653
+ "path",
654
+ {
655
+ d: "M9.25 5.75C9.80228 5.75 10.25 6.19772 10.25 6.75L10.25 17.25C10.25 17.8023 9.80228 18.25 9.25 18.25L6.75 18.25C6.19772 18.25 5.75 17.8023 5.75 17.25L5.75 6.75C5.75 6.19772 6.19772 5.75 6.75 5.75L9.25 5.75Z",
656
+ stroke: "currentColor",
657
+ strokeWidth: "1.5"
658
+ }
659
+ ),
660
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
661
+ "path",
662
+ {
663
+ d: "M17.25 5.75C17.8023 5.75 18.25 6.19772 18.25 6.75L18.25 17.25C18.25 17.8023 17.8023 18.25 17.25 18.25L14.75 18.25C14.1977 18.25 13.75 17.8023 13.75 17.25L13.75 6.75C13.75 6.19772 14.1977 5.75 14.75 5.75L17.25 5.75Z",
664
+ stroke: "currentColor",
665
+ strokeWidth: "1.5"
666
+ }
667
+ )
668
+ ] });
669
+ var IconPause = ({ size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
670
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
671
+ "path",
672
+ {
673
+ d: "M8 6L8 18",
674
+ stroke: "currentColor",
675
+ strokeWidth: "1.5",
676
+ strokeLinecap: "round"
677
+ }
678
+ ),
679
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
680
+ "path",
681
+ {
682
+ d: "M16 18L16 6",
683
+ stroke: "currentColor",
684
+ strokeWidth: "1.5",
685
+ strokeLinecap: "round"
686
+ }
687
+ )
688
+ ] });
689
+ var IconPlayAlt = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
690
+ "path",
691
+ {
692
+ d: "M17.75 10.701C18.75 11.2783 18.75 12.7217 17.75 13.299L8.75 18.4952C7.75 19.0725 6.5 18.3509 6.5 17.1962L6.5 6.80384C6.5 5.64914 7.75 4.92746 8.75 5.50481L17.75 10.701Z",
693
+ stroke: "currentColor",
694
+ strokeWidth: "1.5"
695
+ }
696
+ ) });
697
+ var IconTrashAlt = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
698
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
699
+ "path",
700
+ {
701
+ d: "M10 11.5L10.125 15.5",
702
+ stroke: "currentColor",
703
+ strokeOpacity: "1",
704
+ strokeWidth: "1.5",
705
+ strokeLinecap: "round",
706
+ strokeLinejoin: "round"
707
+ }
708
+ ),
709
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
710
+ "path",
711
+ {
712
+ d: "M14 11.5L13.87 15.5",
713
+ stroke: "currentColor",
714
+ strokeOpacity: "1",
715
+ strokeWidth: "1.5",
716
+ strokeLinecap: "round",
717
+ strokeLinejoin: "round"
718
+ }
719
+ ),
720
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
721
+ "path",
722
+ {
723
+ d: "M9 7.5V6.25C9 5.42157 9.67157 4.75 10.5 4.75H13.5C14.3284 4.75 15 5.42157 15 6.25V7.5",
724
+ stroke: "currentColor",
725
+ strokeOpacity: "1",
726
+ strokeWidth: "1.5",
727
+ strokeLinecap: "round",
728
+ strokeLinejoin: "round"
729
+ }
730
+ ),
731
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
732
+ "path",
733
+ {
734
+ d: "M5.5 7.75H18.5",
735
+ stroke: "currentColor",
736
+ strokeOpacity: "1",
737
+ strokeWidth: "1.5",
738
+ strokeLinecap: "round"
739
+ }
740
+ ),
741
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
742
+ "path",
743
+ {
744
+ d: "M6.75 7.75L7.11691 16.189C7.16369 17.2649 7.18708 17.8028 7.41136 18.2118C7.60875 18.5717 7.91211 18.8621 8.28026 19.0437C8.69854 19.25 9.23699 19.25 10.3139 19.25H13.6861C14.763 19.25 15.3015 19.25 15.7197 19.0437C16.0879 18.8621 16.3912 18.5717 16.5886 18.2118C16.8129 17.8028 16.8363 17.2649 16.8831 16.189L17.25 7.75",
745
+ stroke: "currentColor",
746
+ strokeOpacity: "1",
747
+ strokeWidth: "1.5",
748
+ strokeLinecap: "round"
749
+ }
750
+ )
751
+ ] });
752
+ var IconChatEllipsis = ({
753
+ size = 16,
754
+ style = {}
755
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", style, children: [
756
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
757
+ "path",
758
+ {
759
+ d: "M18.8875 19.25L19.6112 19.0533C19.6823 19.3148 19.6068 19.5943 19.4137 19.7844C19.2206 19.9746 18.9399 20.0457 18.6795 19.9706L18.8875 19.25ZM14.9631 18.244L15.263 18.9314L14.9631 18.244ZM18.0914 15.6309L17.4669 15.2156L18.0914 15.6309ZM4.75 11.8041H5.5C5.5 15.2664 8.39065 18.1081 12 18.1081V18.8581V19.6081C7.60123 19.6081 4 16.1334 4 11.8041H4.75ZM19.25 11.8041H18.5C18.5 8.34166 15.6094 5.5 12 5.5V4.75V4C16.3988 4 20 7.47476 20 11.8041H19.25ZM12 4.75V5.5C8.39065 5.5 5.5 8.34166 5.5 11.8041H4.75H4C4 7.47476 7.60123 4 12 4V4.75ZM18.0914 15.6309L17.4669 15.2156C18.1213 14.2315 18.5 13.0612 18.5 11.8041H19.25H20C20 13.3681 19.5276 14.8257 18.716 16.0462L18.0914 15.6309ZM18.8875 19.25L18.1638 19.4467L17.2953 16.2517L18.019 16.055L18.7428 15.8583L19.6112 19.0533L18.8875 19.25ZM12 18.8581V18.1081C12.9509 18.1081 13.8518 17.9105 14.6632 17.5565L14.9631 18.244L15.263 18.9314C14.2652 19.3667 13.1603 19.6081 12 19.6081V18.8581ZM15.3144 18.2188L15.5224 17.4982L19.0955 18.5294L18.8875 19.25L18.6795 19.9706L15.1064 18.9394L15.3144 18.2188ZM14.9631 18.244L14.6632 17.5565C14.925 17.4423 15.2286 17.4134 15.5224 17.4982L15.3144 18.2188L15.1064 18.9394C15.1677 18.957 15.223 18.9489 15.263 18.9314L14.9631 18.244ZM18.0914 15.6309L18.716 16.0462C18.7451 16.0024 18.7636 15.9351 18.7428 15.8583L18.019 16.055L17.2953 16.2517C17.1957 15.8853 17.2716 15.5093 17.4669 15.2156L18.0914 15.6309Z",
760
+ fill: "currentColor"
761
+ }
762
+ ),
763
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "15", cy: "11.75", r: "1", fill: "currentColor" }),
764
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "11.75", r: "1", fill: "currentColor" }),
765
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "9", cy: "11.75", r: "1", fill: "currentColor" })
766
+ ] });
767
+ var IconCheckmark = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
768
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { clipPath: "url(#clip0_2_45)", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
769
+ "path",
770
+ {
771
+ d: "M16.25 8.75L10 15.25L7.25 12.25",
772
+ stroke: "currentColor",
773
+ strokeWidth: "1.5",
774
+ strokeLinecap: "round",
775
+ strokeLinejoin: "round"
776
+ }
777
+ ) }),
778
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_2_45", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
779
+ ] });
780
+ var IconCheckmarkLarge = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
781
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("g", { clipPath: "url(#clip0_2_37)", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
782
+ "path",
783
+ {
784
+ d: "M17.5962 7.75L9.42308 16.25L6.15385 12.6538",
785
+ stroke: "currentColor",
786
+ strokeWidth: "1.5",
787
+ strokeLinecap: "round",
788
+ strokeLinejoin: "round"
789
+ }
790
+ ) }),
791
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_2_37", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
792
+ ] });
793
+ var IconCheckmarkCircle = ({ size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
794
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { clipPath: "url(#clip0_checkmark_circle)", children: [
795
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
796
+ "path",
797
+ {
798
+ d: "M12 20C7.58172 20 4 16.4182 4 12C4 7.58172 7.58172 4 12 4C16.4182 4 20 7.58172 20 12C20 16.4182 16.4182 20 12 20Z",
799
+ stroke: "currentColor",
800
+ strokeWidth: "1.5",
801
+ strokeLinecap: "round",
802
+ strokeLinejoin: "round"
803
+ }
804
+ ),
805
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
806
+ "path",
807
+ {
808
+ d: "M15 10L11 14.25L9.25 12.25",
809
+ stroke: "currentColor",
810
+ strokeWidth: "1.5",
811
+ strokeLinecap: "round",
812
+ strokeLinejoin: "round"
813
+ }
814
+ )
815
+ ] }),
816
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_checkmark_circle", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
817
+ ] });
818
+ var IconXmark = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
819
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { clipPath: "url(#clip0_2_53)", children: [
820
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
821
+ "path",
822
+ {
823
+ d: "M16.25 16.25L7.75 7.75",
824
+ stroke: "currentColor",
825
+ strokeWidth: "1.5",
826
+ strokeLinecap: "round",
827
+ strokeLinejoin: "round"
828
+ }
829
+ ),
830
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
831
+ "path",
832
+ {
833
+ d: "M7.75 16.25L16.25 7.75",
834
+ stroke: "currentColor",
835
+ strokeWidth: "1.5",
836
+ strokeLinecap: "round",
837
+ strokeLinejoin: "round"
838
+ }
839
+ )
840
+ ] }),
841
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_2_53", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
842
+ ] });
843
+ var IconXmarkLarge = ({ size = 24 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
844
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("g", { clipPath: "url(#clip0_1_660)", children: [
845
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
846
+ "path",
847
+ {
848
+ d: "M17.25 17.25L6.75 6.75",
849
+ stroke: "currentColor",
850
+ strokeWidth: "1.5",
851
+ strokeLinecap: "round",
852
+ strokeLinejoin: "round"
853
+ }
854
+ ),
855
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
856
+ "path",
857
+ {
858
+ d: "M6.75 17.25L17.25 6.75",
859
+ stroke: "currentColor",
860
+ strokeWidth: "1.5",
861
+ strokeLinecap: "round",
862
+ strokeLinejoin: "round"
863
+ }
864
+ )
865
+ ] }),
866
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("defs", { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("clipPath", { id: "clip0_1_660", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "24", height: "24", fill: "white" }) }) })
867
+ ] });
868
+ var IconSun = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: [
869
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("circle", { cx: "12", cy: "12", r: "4", stroke: "currentColor", strokeWidth: "1.5" }),
870
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 5V3", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
871
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M12 21V19", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
872
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16.95 7.05L18.36 5.64", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
873
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5.64 18.36L7.05 16.95", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
874
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M19 12H21", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
875
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M3 12H5", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
876
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M16.95 16.95L18.36 18.36", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" }),
877
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("path", { d: "M5.64 5.64L7.05 7.05", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round" })
878
+ ] });
879
+ var IconMoon = ({ size = 16 }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
880
+ "path",
881
+ {
882
+ d: "M21 12.79A9 9 0 1111.21 3a7 7 0 009.79 9.79z",
883
+ stroke: "currentColor",
884
+ strokeWidth: "1.5",
885
+ strokeLinecap: "round",
886
+ strokeLinejoin: "round"
887
+ }
888
+ ) });
889
+ var AnimatedBunny = ({
890
+ size = 20,
891
+ color = "#4C74FF"
892
+ }) => /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
893
+ "svg",
894
+ {
895
+ width: size,
896
+ height: size,
897
+ viewBox: "0 0 28 28",
898
+ fill: "none",
899
+ xmlns: "http://www.w3.org/2000/svg",
900
+ children: [
901
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("style", { children: `
902
+ @keyframes bunnyEnterEar {
903
+ 0% { opacity: 0; transform: scale(0.8); }
904
+ 100% { opacity: 1; transform: scale(1); }
905
+ }
906
+ @keyframes bunnyEnterFace {
907
+ 0% { opacity: 0; transform: scale(0.9); }
908
+ 100% { opacity: 1; transform: scale(1); }
909
+ }
910
+ @keyframes bunnyEnterEye {
911
+ 0% { opacity: 0; transform: scale(0.5); }
912
+ 100% { opacity: 1; transform: scale(1); }
913
+ }
914
+ @keyframes leftEyeLook {
915
+ 0%, 8% { transform: translate(0, 0); }
916
+ 10%, 18% { transform: translate(1.5px, 0); }
917
+ 20%, 22% { transform: translate(1.5px, 0) scaleY(0.1); }
918
+ 24%, 32% { transform: translate(1.5px, 0); }
919
+ 35%, 48% { transform: translate(-0.8px, -0.6px); }
920
+ 52%, 54% { transform: translate(0, 0) scaleY(0.1); }
921
+ 56%, 68% { transform: translate(0, 0); }
922
+ 72%, 82% { transform: translate(-0.5px, 0.5px); }
923
+ 85%, 100% { transform: translate(0, 0); }
924
+ }
925
+ @keyframes rightEyeLook {
926
+ 0%, 8% { transform: translate(0, 0); }
927
+ 10%, 18% { transform: translate(0.8px, 0); }
928
+ 20%, 22% { transform: translate(0.8px, 0) scaleY(0.1); }
929
+ 24%, 32% { transform: translate(0.8px, 0); }
930
+ 35%, 48% { transform: translate(-1.5px, -0.6px); }
931
+ 52%, 54% { transform: translate(0, 0) scaleY(0.1); }
932
+ 56%, 68% { transform: translate(0, 0); }
933
+ 72%, 82% { transform: translate(-1.2px, 0.5px); }
934
+ 85%, 100% { transform: translate(0, 0); }
935
+ }
936
+ @keyframes leftEarTwitch {
937
+ 0%, 9% { transform: rotate(0deg); }
938
+ 12% { transform: rotate(-8deg); }
939
+ 16%, 34% { transform: rotate(0deg); }
940
+ 38% { transform: rotate(-12deg); }
941
+ 42% { transform: rotate(-6deg); }
942
+ 48%, 100% { transform: rotate(0deg); }
943
+ }
944
+ @keyframes rightEarTwitch {
945
+ 0%, 9% { transform: rotate(0deg); }
946
+ 12% { transform: rotate(6deg); }
947
+ 16%, 34% { transform: rotate(0deg); }
948
+ 38% { transform: rotate(10deg); }
949
+ 42% { transform: rotate(4deg); }
950
+ 48%, 71% { transform: rotate(0deg); }
951
+ 74% { transform: rotate(8deg); }
952
+ 78%, 100% { transform: rotate(0deg); }
953
+ }
954
+ .bunny-eye-left {
955
+ opacity: 0;
956
+ animation: bunnyEnterEye 0.3s ease-out 0.35s forwards, leftEyeLook 5s ease-in-out 0.65s infinite;
957
+ transform-origin: center;
958
+ transform-box: fill-box;
959
+ }
960
+ .bunny-eye-right {
961
+ opacity: 0;
962
+ animation: bunnyEnterEye 0.3s ease-out 0.4s forwards, rightEyeLook 5s ease-in-out 0.7s infinite;
963
+ transform-origin: center;
964
+ transform-box: fill-box;
965
+ }
966
+ .bunny-ear-left {
967
+ opacity: 0;
968
+ animation: bunnyEnterEar 0.3s ease-out 0.1s forwards, leftEarTwitch 5s ease-in-out 0.4s infinite;
969
+ transform-origin: bottom center;
970
+ transform-box: fill-box;
971
+ }
972
+ .bunny-ear-right {
973
+ opacity: 0;
974
+ animation: bunnyEnterEar 0.3s ease-out 0.15s forwards, rightEarTwitch 5s ease-in-out 0.45s infinite;
975
+ transform-origin: bottom center;
976
+ transform-box: fill-box;
977
+ }
978
+ .bunny-face {
979
+ opacity: 0;
980
+ animation: bunnyEnterFace 0.3s ease-out 0.25s forwards;
981
+ transform-origin: center;
982
+ transform-box: fill-box;
983
+ }
984
+ svg:hover .bunny-eye-left,
985
+ svg:hover .bunny-eye-right {
986
+ opacity: 0;
987
+ transition: opacity 0.2s ease;
988
+ }
989
+ .bunny-happy-face {
990
+ opacity: 0;
991
+ transition: opacity 0.2s ease;
992
+ }
993
+ svg:hover .bunny-happy-face {
994
+ opacity: 1;
995
+ }
996
+ ` }),
997
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("rect", { width: "28", height: "28", fill: "transparent" }),
998
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
999
+ "path",
1000
+ {
1001
+ className: "bunny-ear-left",
1002
+ d: "M3.738 10.2164L7.224 2.007H9.167L5.676 10.2164H3.738ZM10.791 6.42705C10.791 5.90346 10.726 5.42764 10.596 4.99959C10.47 4.57155 10.292 4.16643 10.063 3.78425C9.833 3.39825 9.56 3.01797 9.243 2.64343C8.926 2.26507 8.767 2.07589 8.767 2.07589L10.24 0.957996C10.24 0.957996 10.433 1.17203 10.819 1.60007C11.209 2.0243 11.559 2.49056 11.869 2.99886C12.178 3.50717 12.413 4.04222 12.574 4.60403C12.734 5.16584 12.814 5.77352 12.814 6.42705C12.814 7.10734 12.73 7.7303 12.562 8.29593C12.394 8.85774 12.153 9.3966 11.84 9.9126C11.526 10.4247 11.181 10.8833 10.802 11.2884C10.428 11.6974 10.24 11.9018 10.24 11.9018L8.767 10.7839C8.767 10.7839 8.924 10.5948 9.237 10.2164C9.554 9.8419 9.83 9.4597 10.063 9.06985C10.3 8.6762 10.479 8.26726 10.602 7.84304C10.728 7.41499 10.791 6.943 10.791 6.42705Z",
1003
+ fill: color
1004
+ }
1005
+ ),
1006
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1007
+ "path",
1008
+ {
1009
+ className: "bunny-ear-right",
1010
+ d: "M15.003 10.2164L18.489 2.007H20.432L16.941 10.2164H15.003ZM22.056 6.42705C22.056 5.90346 21.991 5.42764 21.861 4.99959C21.735 4.57155 21.557 4.16643 21.328 3.78425C21.098 3.39825 20.825 3.01797 20.508 2.64343C20.191 2.26507 20.032 2.07589 20.032 2.07589L21.505 0.957996C21.505 0.957996 21.698 1.17203 22.084 1.60007C22.474 2.0243 22.824 2.49056 23.133 2.99886C23.443 3.50717 23.678 4.04222 23.839 4.60403C23.999 5.16584 24.079 5.77352 24.079 6.42705C24.079 7.10734 23.995 7.7303 23.827 8.29593C23.659 8.85774 23.418 9.3966 23.105 9.9126C22.791 10.4247 22.445 10.8833 22.067 11.2884C21.693 11.6974 21.505 11.9018 21.505 11.9018L20.032 10.7839C20.032 10.7839 20.189 10.5948 20.502 10.2164C20.819 9.8419 21.094 9.4597 21.328 9.06985C21.565 8.6762 21.744 8.26726 21.866 7.84304C21.993 7.41499 22.056 6.943 22.056 6.42705Z",
1011
+ fill: color
1012
+ }
1013
+ ),
1014
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1015
+ "path",
1016
+ {
1017
+ className: "bunny-face",
1018
+ d: "M2.03 20.4328C2.03 20.9564 2.093 21.4322 2.219 21.8602C2.345 22.2883 2.523 22.6953 2.752 23.0813C2.981 23.4635 3.254 23.8419 3.572 24.2164C3.889 24.5948 4.047 24.7839 4.047 24.7839L2.574 25.9018C2.574 25.9018 2.379 25.6878 1.989 25.2598C1.603 24.8355 1.256 24.3693 0.946 23.861C0.636 23.3527 0.401 22.8176 0.241 22.2558C0.08 21.694 0 21.0863 0 20.4328C0 19.7525 0.084 19.1314 0.252 18.5696C0.421 18.004 0.661 17.4651 0.975 16.953C1.288 16.4371 1.632 15.9765 2.007 15.5714C2.385 15.1625 2.574 14.958 2.574 14.958L4.047 16.0759C4.047 16.0759 3.889 16.2651 3.572 16.6434C3.258 17.018 2.983 17.4021 2.746 17.7957C2.513 18.1855 2.335 18.5945 2.213 19.0225C2.091 19.4467 2.03 19.9168 2.03 20.4328ZM23.687 20.4271C23.687 19.9035 23.622 19.4276 23.492 18.9996C23.366 18.5715 23.188 18.1664 22.959 17.7843C22.729 17.3982 22.456 17.018 22.139 16.6434C21.822 16.2651 21.663 16.0759 21.663 16.0759L23.136 14.958C23.136 14.958 23.329 15.172 23.715 15.6001C24.105 16.0243 24.455 16.4906 24.765 16.9989C25.074 17.5072 25.309 18.0422 25.47 18.604C25.63 19.1658 25.71 19.7735 25.71 20.4271C25.71 21.1073 25.626 21.7303 25.458 22.2959C25.29 22.8577 25.049 23.3966 24.736 23.9126C24.422 24.4247 24.077 24.8833 23.698 25.2884C23.324 25.6974 23.136 25.9018 23.136 25.9018L21.663 24.7839C21.663 24.7839 21.82 24.5948 22.133 24.2164C22.45 23.8419 22.726 23.4597 22.959 23.0698C23.196 22.6762 23.375 22.2673 23.498 21.843C23.624 21.415 23.687 20.943 23.687 20.4271Z",
1019
+ fill: color
1020
+ }
1021
+ ),
1022
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1023
+ "circle",
1024
+ {
1025
+ className: "bunny-eye-left",
1026
+ cx: "8.277",
1027
+ cy: "20.466",
1028
+ r: "1.8",
1029
+ fill: color
1030
+ }
1031
+ ),
1032
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1033
+ "circle",
1034
+ {
1035
+ className: "bunny-eye-right",
1036
+ cx: "19.878",
1037
+ cy: "20.466",
1038
+ r: "1.8",
1039
+ fill: color
1040
+ }
1041
+ ),
1042
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
1043
+ "text",
1044
+ {
1045
+ className: "bunny-happy-face",
1046
+ x: "14",
1047
+ y: "26",
1048
+ textAnchor: "middle",
1049
+ fontSize: "12",
1050
+ fontWeight: "bold",
1051
+ fill: color,
1052
+ fontFamily: "system-ui, -apple-system, sans-serif",
1053
+ children: "\u02C3 \u1D55 \u02C2"
1054
+ }
1055
+ )
1056
+ ]
1057
+ }
1058
+ );
1059
+
1060
+ // src/utils/element-identification.ts
1061
+ function getElementPath(target, maxDepth = 4) {
1062
+ const parts = [];
1063
+ let current = target;
1064
+ let depth = 0;
1065
+ while (current && depth < maxDepth) {
1066
+ const tag = current.tagName.toLowerCase();
1067
+ if (tag === "html" || tag === "body") break;
1068
+ let identifier = tag;
1069
+ if (current.id) {
1070
+ identifier = `#${current.id}`;
1071
+ } else if (current.className && typeof current.className === "string") {
1072
+ const meaningfulClass = current.className.split(/\s+/).find((c) => c.length > 2 && !c.match(/^[a-z]{1,2}$/) && !c.match(/[A-Z0-9]{5,}/));
1073
+ if (meaningfulClass) {
1074
+ identifier = `.${meaningfulClass.split("_")[0]}`;
1075
+ }
1076
+ }
1077
+ parts.unshift(identifier);
1078
+ current = current.parentElement;
1079
+ depth++;
1080
+ }
1081
+ return parts.join(" > ");
1082
+ }
1083
+ function identifyElement(target) {
1084
+ const path = getElementPath(target);
1085
+ if (target.dataset.element) {
1086
+ return { name: target.dataset.element, path };
1087
+ }
1088
+ const tag = target.tagName.toLowerCase();
1089
+ if (["path", "circle", "rect", "line", "g"].includes(tag)) {
1090
+ const svg = target.closest("svg");
1091
+ if (svg) {
1092
+ const parent = svg.parentElement;
1093
+ if (parent) {
1094
+ const parentName = identifyElement(parent).name;
1095
+ return { name: `graphic in ${parentName}`, path };
1096
+ }
1097
+ }
1098
+ return { name: "graphic element", path };
1099
+ }
1100
+ if (tag === "svg") {
1101
+ const parent = target.parentElement;
1102
+ if (parent?.tagName.toLowerCase() === "button") {
1103
+ const btnText = parent.textContent?.trim();
1104
+ return { name: btnText ? `icon in "${btnText}" button` : "button icon", path };
1105
+ }
1106
+ return { name: "icon", path };
1107
+ }
1108
+ if (tag === "button") {
1109
+ const text = target.textContent?.trim();
1110
+ const ariaLabel = target.getAttribute("aria-label");
1111
+ if (ariaLabel) return { name: `button [${ariaLabel}]`, path };
1112
+ return { name: text ? `button "${text.slice(0, 25)}"` : "button", path };
1113
+ }
1114
+ if (tag === "a") {
1115
+ const text = target.textContent?.trim();
1116
+ const href = target.getAttribute("href");
1117
+ if (text) return { name: `link "${text.slice(0, 25)}"`, path };
1118
+ if (href) return { name: `link to ${href.slice(0, 30)}`, path };
1119
+ return { name: "link", path };
1120
+ }
1121
+ if (tag === "input") {
1122
+ const type = target.getAttribute("type") || "text";
1123
+ const placeholder = target.getAttribute("placeholder");
1124
+ const name = target.getAttribute("name");
1125
+ if (placeholder) return { name: `input "${placeholder}"`, path };
1126
+ if (name) return { name: `input [${name}]`, path };
1127
+ return { name: `${type} input`, path };
1128
+ }
1129
+ if (["h1", "h2", "h3", "h4", "h5", "h6"].includes(tag)) {
1130
+ const text = target.textContent?.trim();
1131
+ return { name: text ? `${tag} "${text.slice(0, 35)}"` : tag, path };
1132
+ }
1133
+ if (tag === "p") {
1134
+ const text = target.textContent?.trim();
1135
+ if (text) return { name: `paragraph: "${text.slice(0, 40)}${text.length > 40 ? "..." : ""}"`, path };
1136
+ return { name: "paragraph", path };
1137
+ }
1138
+ if (tag === "span" || tag === "label") {
1139
+ const text = target.textContent?.trim();
1140
+ if (text && text.length < 40) return { name: `"${text}"`, path };
1141
+ return { name: tag, path };
1142
+ }
1143
+ if (tag === "li") {
1144
+ const text = target.textContent?.trim();
1145
+ if (text && text.length < 40) return { name: `list item: "${text.slice(0, 35)}"`, path };
1146
+ return { name: "list item", path };
1147
+ }
1148
+ if (tag === "blockquote") return { name: "blockquote", path };
1149
+ if (tag === "code") {
1150
+ const text = target.textContent?.trim();
1151
+ if (text && text.length < 30) return { name: `code: \`${text}\``, path };
1152
+ return { name: "code", path };
1153
+ }
1154
+ if (tag === "pre") return { name: "code block", path };
1155
+ if (tag === "img") {
1156
+ const alt = target.getAttribute("alt");
1157
+ return { name: alt ? `image "${alt.slice(0, 30)}"` : "image", path };
1158
+ }
1159
+ if (tag === "video") return { name: "video", path };
1160
+ if (["div", "section", "article", "nav", "header", "footer", "aside", "main"].includes(tag)) {
1161
+ const className = target.className;
1162
+ const role = target.getAttribute("role");
1163
+ const ariaLabel = target.getAttribute("aria-label");
1164
+ if (ariaLabel) return { name: `${tag} [${ariaLabel}]`, path };
1165
+ if (role) return { name: `${role}`, path };
1166
+ if (typeof className === "string" && className) {
1167
+ const words = className.split(/[\s_-]+/).map((c) => c.replace(/[A-Z0-9]{5,}.*$/, "")).filter((c) => c.length > 2 && !/^[a-z]{1,2}$/.test(c)).slice(0, 2);
1168
+ if (words.length > 0) return { name: words.join(" "), path };
1169
+ }
1170
+ return { name: tag === "div" ? "container" : tag, path };
1171
+ }
1172
+ return { name: tag, path };
1173
+ }
1174
+ function getNearbyText(element) {
1175
+ const texts = [];
1176
+ const ownText = element.textContent?.trim();
1177
+ if (ownText && ownText.length < 100) {
1178
+ texts.push(ownText);
1179
+ }
1180
+ const prev = element.previousElementSibling;
1181
+ if (prev) {
1182
+ const prevText = prev.textContent?.trim();
1183
+ if (prevText && prevText.length < 50) {
1184
+ texts.unshift(`[before: "${prevText.slice(0, 40)}"]`);
1185
+ }
1186
+ }
1187
+ const next = element.nextElementSibling;
1188
+ if (next) {
1189
+ const nextText = next.textContent?.trim();
1190
+ if (nextText && nextText.length < 50) {
1191
+ texts.push(`[after: "${nextText.slice(0, 40)}"]`);
1192
+ }
1193
+ }
1194
+ return texts.join(" ");
1195
+ }
1196
+ function identifyAnimationElement(target) {
1197
+ if (target.dataset.element) return target.dataset.element;
1198
+ const tag = target.tagName.toLowerCase();
1199
+ if (tag === "path") return "path";
1200
+ if (tag === "circle") return "circle";
1201
+ if (tag === "rect") return "rectangle";
1202
+ if (tag === "line") return "line";
1203
+ if (tag === "ellipse") return "ellipse";
1204
+ if (tag === "polygon") return "polygon";
1205
+ if (tag === "g") return "group";
1206
+ if (tag === "svg") return "svg";
1207
+ if (tag === "button") {
1208
+ const text = target.textContent?.trim();
1209
+ return text ? `button "${text}"` : "button";
1210
+ }
1211
+ if (tag === "input") {
1212
+ const type = target.getAttribute("type") || "text";
1213
+ return `input (${type})`;
1214
+ }
1215
+ if (tag === "span" || tag === "p" || tag === "label") {
1216
+ const text = target.textContent?.trim();
1217
+ if (text && text.length < 30) return `"${text}"`;
1218
+ return "text";
1219
+ }
1220
+ if (tag === "div") {
1221
+ const className = target.className;
1222
+ if (typeof className === "string" && className) {
1223
+ const words = className.split(/[\s_-]+/).map((c) => c.replace(/[A-Z0-9]{5,}.*$/, "")).filter((c) => c.length > 2 && !/^[a-z]{1,2}$/.test(c)).slice(0, 2);
1224
+ if (words.length > 0) {
1225
+ return words.join(" ");
1226
+ }
1227
+ }
1228
+ return "container";
1229
+ }
1230
+ return tag;
1231
+ }
1232
+ function getNearbyElements(element) {
1233
+ const parent = element.parentElement;
1234
+ if (!parent) return "";
1235
+ const siblings = Array.from(parent.children).filter(
1236
+ (child) => child !== element && child instanceof HTMLElement
1237
+ );
1238
+ if (siblings.length === 0) return "";
1239
+ const siblingIds = siblings.slice(0, 4).map((sib) => {
1240
+ const tag = sib.tagName.toLowerCase();
1241
+ const className = sib.className;
1242
+ let cls = "";
1243
+ if (typeof className === "string" && className) {
1244
+ const meaningful = className.split(/\s+/).map((c) => c.replace(/[_][a-zA-Z0-9]{5,}.*$/, "")).find((c) => c.length > 2 && !/^[a-z]{1,2}$/.test(c));
1245
+ if (meaningful) cls = `.${meaningful}`;
1246
+ }
1247
+ if (tag === "button" || tag === "a") {
1248
+ const text = sib.textContent?.trim().slice(0, 15);
1249
+ if (text) return `${tag}${cls} "${text}"`;
1250
+ }
1251
+ return `${tag}${cls}`;
1252
+ });
1253
+ const parentTag = parent.tagName.toLowerCase();
1254
+ let parentId = parentTag;
1255
+ if (typeof parent.className === "string" && parent.className) {
1256
+ const parentCls = parent.className.split(/\s+/).map((c) => c.replace(/[_][a-zA-Z0-9]{5,}.*$/, "")).find((c) => c.length > 2 && !/^[a-z]{1,2}$/.test(c));
1257
+ if (parentCls) parentId = `.${parentCls}`;
1258
+ }
1259
+ const total = parent.children.length;
1260
+ const suffix = total > siblingIds.length + 1 ? ` (${total} total in ${parentId})` : "";
1261
+ return siblingIds.join(", ") + suffix;
1262
+ }
1263
+ function getElementClasses(target) {
1264
+ const className = target.className;
1265
+ if (typeof className !== "string" || !className) return "";
1266
+ const classes = className.split(/\s+/).filter((c) => c.length > 0).map((c) => {
1267
+ const match = c.match(/^([a-zA-Z][a-zA-Z0-9_-]*?)(?:_[a-zA-Z0-9]{5,})?$/);
1268
+ return match ? match[1] : c;
1269
+ }).filter((c, i, arr) => arr.indexOf(c) === i);
1270
+ return classes.join(", ");
1271
+ }
1272
+ function getDetailedComputedStyles(target) {
1273
+ if (typeof window === "undefined") return {};
1274
+ const styles = window.getComputedStyle(target);
1275
+ const result = {};
1276
+ const properties = [
1277
+ // Colors
1278
+ "color",
1279
+ "backgroundColor",
1280
+ "borderColor",
1281
+ // Typography
1282
+ "fontSize",
1283
+ "fontWeight",
1284
+ "fontFamily",
1285
+ "lineHeight",
1286
+ "letterSpacing",
1287
+ "textAlign",
1288
+ // Box model
1289
+ "width",
1290
+ "height",
1291
+ "padding",
1292
+ "margin",
1293
+ "border",
1294
+ "borderRadius",
1295
+ // Layout
1296
+ "display",
1297
+ "position",
1298
+ "top",
1299
+ "right",
1300
+ "bottom",
1301
+ "left",
1302
+ "zIndex",
1303
+ "flexDirection",
1304
+ "justifyContent",
1305
+ "alignItems",
1306
+ "gap",
1307
+ // Visual
1308
+ "opacity",
1309
+ "visibility",
1310
+ "overflow",
1311
+ "boxShadow",
1312
+ // Transform
1313
+ "transform"
1314
+ ];
1315
+ for (const prop of properties) {
1316
+ const value = styles.getPropertyValue(prop.replace(/([A-Z])/g, "-$1").toLowerCase());
1317
+ if (value && value !== "none" && value !== "normal" && value !== "auto" && value !== "0px" && value !== "rgba(0, 0, 0, 0)") {
1318
+ result[prop] = value;
1319
+ }
1320
+ }
1321
+ return result;
1322
+ }
1323
+ function getAccessibilityInfo(target) {
1324
+ const parts = [];
1325
+ const role = target.getAttribute("role");
1326
+ const ariaLabel = target.getAttribute("aria-label");
1327
+ const ariaDescribedBy = target.getAttribute("aria-describedby");
1328
+ const tabIndex = target.getAttribute("tabindex");
1329
+ const ariaHidden = target.getAttribute("aria-hidden");
1330
+ if (role) parts.push(`role="${role}"`);
1331
+ if (ariaLabel) parts.push(`aria-label="${ariaLabel}"`);
1332
+ if (ariaDescribedBy) parts.push(`aria-describedby="${ariaDescribedBy}"`);
1333
+ if (tabIndex) parts.push(`tabindex=${tabIndex}`);
1334
+ if (ariaHidden === "true") parts.push("aria-hidden");
1335
+ const focusable = target.matches("a, button, input, select, textarea, [tabindex]");
1336
+ if (focusable) parts.push("focusable");
1337
+ return parts.join(", ");
1338
+ }
1339
+ function getFullElementPath(target) {
1340
+ const parts = [];
1341
+ let current = target;
1342
+ while (current && current.tagName.toLowerCase() !== "html") {
1343
+ const tag = current.tagName.toLowerCase();
1344
+ let identifier = tag;
1345
+ if (current.id) {
1346
+ identifier = `${tag}#${current.id}`;
1347
+ } else if (current.className && typeof current.className === "string") {
1348
+ const cls = current.className.split(/\s+/).map((c) => c.replace(/[_][a-zA-Z0-9]{5,}.*$/, "")).find((c) => c.length > 2);
1349
+ if (cls) identifier = `${tag}.${cls}`;
1350
+ }
1351
+ parts.unshift(identifier);
1352
+ current = current.parentElement;
1353
+ }
1354
+ return parts.join(" > ");
1355
+ }
1356
+
1357
+ // src/utils/storage.ts
1358
+ var STORAGE_PREFIX = "feedback-annotations-";
1359
+ var DEFAULT_RETENTION_DAYS = 7;
1360
+ function getStorageKey(pathname) {
1361
+ return `${STORAGE_PREFIX}${pathname}`;
1362
+ }
1363
+ function loadAnnotations(pathname) {
1364
+ if (typeof window === "undefined") return [];
1365
+ try {
1366
+ const stored = localStorage.getItem(getStorageKey(pathname));
1367
+ if (!stored) return [];
1368
+ const data = JSON.parse(stored);
1369
+ const cutoff = Date.now() - DEFAULT_RETENTION_DAYS * 24 * 60 * 60 * 1e3;
1370
+ return data.filter((a) => !a.timestamp || a.timestamp > cutoff);
1371
+ } catch {
1372
+ return [];
1373
+ }
1374
+ }
1375
+ function saveAnnotations(pathname, annotations) {
1376
+ if (typeof window === "undefined") return;
1377
+ try {
1378
+ localStorage.setItem(getStorageKey(pathname), JSON.stringify(annotations));
1379
+ } catch {
1380
+ }
1381
+ }
1382
+
1383
+ // src/components/page-toolbar-css/styles.module.scss
1384
+ var css2 = '@keyframes styles-module__toolbarEnter___u8RRu {\n from {\n opacity: 0;\n transform: scale(0.5) rotate(90deg);\n }\n to {\n opacity: 1;\n transform: scale(1) rotate(0deg);\n }\n}\n@keyframes styles-module__badgeEnter___mVQLj {\n from {\n opacity: 0;\n transform: scale(0);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__scaleIn___c-r1K {\n from {\n opacity: 0;\n transform: scale(0.85);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__scaleOut___Wctwz {\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.85);\n }\n}\n@keyframes styles-module__slideUp___kgD36 {\n from {\n opacity: 0;\n transform: scale(0.85) translateY(8px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n@keyframes styles-module__slideDown___zcdje {\n from {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n to {\n opacity: 0;\n transform: scale(0.85) translateY(8px);\n }\n}\n@keyframes styles-module__markerIn___5FaAP {\n 0% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.3);\n }\n 100% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n}\n@keyframes styles-module__markerOut___GU5jX {\n 0% {\n opacity: 1;\n transform: translate(-50%, -50%) scale(1);\n }\n 100% {\n opacity: 0;\n transform: translate(-50%, -50%) scale(0.3);\n }\n}\n@keyframes styles-module__fadeIn___b9qmf {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes styles-module__fadeOut___6Ut6- {\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n}\n@keyframes styles-module__tooltipIn___0N31w {\n from {\n opacity: 0;\n transform: translateX(-50%) translateY(2px) scale(0.98);\n }\n to {\n opacity: 1;\n transform: translateX(-50%) translateY(0) scale(1);\n }\n}\n@keyframes styles-module__hoverHighlightIn___6WYHY {\n from {\n opacity: 0;\n transform: scale(0.98);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes styles-module__hoverTooltipIn___FYGQx {\n from {\n opacity: 0;\n transform: scale(0.95) translateY(4px);\n }\n to {\n opacity: 1;\n transform: scale(1) translateY(0);\n }\n}\n@keyframes styles-module__settingsPanelIn___MGfO8 {\n from {\n opacity: 0;\n transform: translateY(10px) scale(0.95);\n filter: blur(5px);\n }\n to {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n }\n}\n@keyframes styles-module__settingsPanelOut___Zfymi {\n from {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n }\n to {\n opacity: 0;\n transform: translateY(20px) scale(0.95);\n filter: blur(5px);\n }\n}\n.styles-module__toolbar___wNsdK {\n position: fixed;\n bottom: 1.25rem;\n right: 1.25rem;\n width: 257px;\n z-index: 100000;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n pointer-events: none;\n transition: left 0s, top 0s, right 0s, bottom 0s;\n}\n\n.styles-module__toolbarContainer___dIhma {\n user-select: none;\n margin-left: auto;\n align-self: flex-end;\n display: flex;\n align-items: center;\n justify-content: center;\n background: #1a1a1a;\n color: #fff;\n border: none;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);\n pointer-events: auto;\n cursor: grab;\n transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1), transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__toolbarContainer___dIhma.styles-module__dragging___xrolZ {\n transition: width 0.4s cubic-bezier(0.19, 1, 0.22, 1);\n cursor: grabbing;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__entrance___sgHd8 {\n animation: styles-module__toolbarEnter___u8RRu 0.5s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn {\n width: 44px;\n height: 44px;\n border-radius: 22px;\n padding: 0;\n cursor: pointer;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn svg {\n margin-top: -1px;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:hover {\n background: #2a2a2a;\n}\n.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:active {\n transform: scale(0.95);\n}\n.styles-module__toolbarContainer___dIhma.styles-module__expanded___ofKPx {\n width: calc-size(auto, size);\n height: 44px;\n border-radius: 1.5rem;\n padding: 0.375rem;\n}\n@supports not (width: calc-size(auto, size)) {\n .styles-module__toolbarContainer___dIhma.styles-module__expanded___ofKPx {\n width: 257px;\n }\n}\n\n.styles-module__toggleContent___0yfyP {\n position: absolute;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: opacity 0.1s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__toggleContent___0yfyP.styles-module__visible___KHwEW {\n opacity: 1;\n visibility: visible;\n pointer-events: auto;\n}\n.styles-module__toggleContent___0yfyP.styles-module__hidden___Ae8H4 {\n opacity: 0;\n pointer-events: none;\n}\n\n.styles-module__controlsContent___9GJWU {\n display: flex;\n align-items: center;\n gap: 0.375rem;\n transition: filter 0.8s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.8s cubic-bezier(0.19, 1, 0.22, 1), transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);\n}\n.styles-module__controlsContent___9GJWU.styles-module__visible___KHwEW {\n opacity: 1;\n filter: blur(0px);\n transform: scale(1);\n visibility: visible;\n pointer-events: auto;\n}\n.styles-module__controlsContent___9GJWU.styles-module__hidden___Ae8H4 {\n opacity: 0;\n filter: blur(10px);\n transform: scale(0.4);\n pointer-events: none;\n}\n\n.styles-module__badge___2XsgF {\n position: absolute;\n top: -16px;\n right: -16px;\n user-select: none;\n min-width: 18px;\n height: 18px;\n padding: 0 5px;\n border-radius: 9px;\n background: #3c82f7;\n color: white;\n font-size: 0.625rem;\n font-weight: 600;\n display: flex;\n align-items: center;\n justify-content: center;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);\n opacity: 1;\n transition: transform 0.3s ease, opacity 0.2s ease;\n transform: scale(1);\n}\n.styles-module__badge___2XsgF.styles-module__fadeOut___6Ut6- {\n opacity: 0;\n transform: scale(0);\n pointer-events: none;\n}\n.styles-module__badge___2XsgF.styles-module__entrance___sgHd8 {\n animation: styles-module__badgeEnter___mVQLj 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) 0.4s both;\n}\n\n.styles-module__controlButton___8Q0jc {\n cursor: pointer !important;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 34px;\n height: 34px;\n border-radius: 50%;\n border: none;\n background: transparent;\n color: rgba(255, 255, 255, 0.85);\n transition: background-color 0.15s ease, color 0.15s ease, transform 0.1s ease, opacity 0.2s ease;\n}\n.styles-module__controlButton___8Q0jc:hover:not(:disabled) {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n}\n.styles-module__controlButton___8Q0jc:active:not(:disabled) {\n transform: scale(0.92);\n}\n.styles-module__controlButton___8Q0jc:disabled {\n opacity: 0.35;\n cursor: not-allowed;\n}\n.styles-module__controlButton___8Q0jc[data-active=true] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.25);\n}\n.styles-module__controlButton___8Q0jc[data-danger]:hover:not(:disabled) {\n background: rgba(255, 59, 48, 0.25);\n color: #ff3b30;\n}\n\n.styles-module__divider___c--s1 {\n width: 1px;\n height: 12px;\n background: rgba(255, 255, 255, 0.15);\n margin: 0 0.125rem;\n}\n\n.styles-module__overlay___Q1O9y {\n position: fixed;\n inset: 0;\n z-index: 99997;\n pointer-events: none;\n}\n.styles-module__overlay___Q1O9y > * {\n pointer-events: auto;\n}\n\n.styles-module__hoverHighlight___ogakW {\n position: fixed;\n border: 2px solid rgba(60, 130, 247, 0.5);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(60, 130, 247, 0.04);\n box-sizing: border-box;\n will-change: opacity;\n contain: layout style;\n}\n.styles-module__hoverHighlight___ogakW.styles-module__enter___WFIki {\n animation: styles-module__hoverHighlightIn___6WYHY 0.12s ease-out forwards;\n}\n\n.styles-module__multiSelectOutline___cSJ-m {\n position: fixed;\n border: 2px dashed rgba(52, 199, 89, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(52, 199, 89, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n}\n.styles-module__multiSelectOutline___cSJ-m.styles-module__enter___WFIki {\n animation: styles-module__fadeIn___b9qmf 0.15s ease-out forwards;\n}\n.styles-module__multiSelectOutline___cSJ-m.styles-module__exit___fyOJ0 {\n animation: styles-module__fadeOut___6Ut6- 0.15s ease-out forwards;\n}\n\n.styles-module__singleSelectOutline___QhX-O {\n position: fixed;\n border: 2px solid rgba(60, 130, 247, 0.6);\n border-radius: 4px;\n pointer-events: none !important;\n background: rgba(60, 130, 247, 0.05);\n box-sizing: border-box;\n will-change: opacity;\n}\n.styles-module__singleSelectOutline___QhX-O.styles-module__enter___WFIki {\n animation: styles-module__fadeIn___b9qmf 0.15s ease-out forwards;\n}\n.styles-module__singleSelectOutline___QhX-O.styles-module__exit___fyOJ0 {\n animation: styles-module__fadeOut___6Ut6- 0.15s ease-out forwards;\n}\n\n.styles-module__hoverTooltip___bvLk7 {\n position: fixed;\n font-size: 0.6875rem;\n font-weight: 500;\n color: #fff;\n background: rgba(0, 0, 0, 0.85);\n padding: 0.35rem 0.6rem;\n border-radius: 0.375rem;\n pointer-events: none !important;\n white-space: nowrap;\n max-width: 200px;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.styles-module__hoverTooltip___bvLk7.styles-module__enter___WFIki {\n animation: styles-module__hoverTooltipIn___FYGQx 0.1s ease-out forwards;\n}\n\n.styles-module__markersLayer___-25j1 {\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n height: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__markersLayer___-25j1 > * {\n pointer-events: auto;\n}\n\n.styles-module__fixedMarkersLayer___ffyX6 {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: 99998;\n pointer-events: none;\n}\n.styles-module__fixedMarkersLayer___ffyX6 > * {\n pointer-events: auto;\n}\n\n.styles-module__marker___6sQrs {\n position: absolute;\n width: 22px;\n height: 22px;\n background: #3c82f7;\n color: white;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n font-size: 0.6875rem;\n font-weight: 600;\n transform: translate(-50%, -50%) scale(1);\n opacity: 1;\n cursor: pointer;\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);\n user-select: none;\n will-change: transform, opacity;\n contain: layout style;\n z-index: 1;\n}\n.styles-module__marker___6sQrs:hover {\n z-index: 2;\n}\n.styles-module__marker___6sQrs:not(.styles-module__enter___WFIki):not(.styles-module__exit___fyOJ0):not(.styles-module__clearing___FQ--7) {\n transition: background-color 0.15s ease, transform 0.1s ease;\n}\n.styles-module__marker___6sQrs.styles-module__enter___WFIki {\n animation: styles-module__markerIn___5FaAP 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;\n}\n.styles-module__marker___6sQrs.styles-module__exit___fyOJ0 {\n animation: styles-module__markerOut___GU5jX 0.2s ease-out both;\n pointer-events: none;\n}\n.styles-module__marker___6sQrs.styles-module__clearing___FQ--7 {\n animation: styles-module__markerOut___GU5jX 0.15s ease-out both;\n pointer-events: none;\n}\n.styles-module__marker___6sQrs:not(.styles-module__enter___WFIki):not(.styles-module__exit___fyOJ0):not(.styles-module__clearing___FQ--7):hover {\n transform: translate(-50%, -50%) scale(1.1);\n}\n.styles-module__marker___6sQrs.styles-module__pending___2IHLC {\n position: fixed;\n background: #3c82f7;\n}\n.styles-module__marker___6sQrs.styles-module__fixed___dBMHC {\n position: fixed;\n}\n.styles-module__marker___6sQrs.styles-module__multiSelect___YWiuz {\n background: #34c759;\n width: 26px;\n height: 26px;\n border-radius: 6px;\n font-size: 0.75rem;\n}\n.styles-module__marker___6sQrs.styles-module__multiSelect___YWiuz.styles-module__pending___2IHLC {\n background: #34c759;\n}\n.styles-module__marker___6sQrs.styles-module__hovered___ZgXIy {\n background: #ff3b30;\n}\n\n.styles-module__renumber___nCTxD {\n display: block;\n animation: styles-module__renumberRoll___Wgbq3 0.2s ease-out;\n}\n\n@keyframes styles-module__renumberRoll___Wgbq3 {\n 0% {\n transform: translateX(-40%);\n opacity: 0;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n.styles-module__markerTooltip___aLJID {\n position: absolute;\n top: calc(100% + 10px);\n left: 50%;\n transform: translateX(-50%);\n z-index: 100002;\n background: #1a1a1a;\n padding: 0.625rem 0.75rem;\n border-radius: 0.75rem;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n min-width: 120px;\n max-width: 200px;\n pointer-events: none;\n cursor: default;\n}\n.styles-module__markerTooltip___aLJID.styles-module__enter___WFIki {\n animation: styles-module__tooltipIn___0N31w 0.1s ease-out forwards;\n}\n\n.styles-module__markerQuote___FHmrz {\n display: block;\n font-size: 0.6875rem;\n font-style: italic;\n color: rgba(255, 255, 255, 0.5);\n margin-bottom: 0.375rem;\n line-height: 1.4;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.styles-module__markerNote___QkrrS {\n display: block;\n font-size: 0.75rem;\n font-weight: 450;\n line-height: 1.4;\n color: #fff;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 2px;\n}\n\n.styles-module__markerHint___2iF-6 {\n display: block;\n font-size: 0.625rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.3);\n margin-top: 0.375rem;\n white-space: nowrap;\n}\n\n.styles-module__settingsPanel___OxX3Y {\n position: absolute;\n right: 5px;\n bottom: calc(100% + 0.5rem);\n background: white;\n border-radius: 1rem;\n padding: 13px 1rem 16px;\n min-width: 205px;\n box-shadow: 0 1px 8px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.04);\n transition: background 0.25s ease, box-shadow 0.25s ease;\n}\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsHeader___pwDY9,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrand___0gJeM,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrandSlash___uTG18,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsVersion___TUcFq,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsSection___m-YM2,\n.styles-module__settingsPanel___OxX3Y .styles-module__settingsLabel___8UjfX,\n.styles-module__settingsPanel___OxX3Y .styles-module__cycleButton___FMKfw,\n.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY,\n.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz,\n.styles-module__settingsPanel___OxX3Y .styles-module__toggleLabel___Xm8Aa,\n.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax,\n.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr,\n.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp,\n.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56,\n.styles-module__settingsPanel___OxX3Y .styles-module__themeToggle___2rUjA {\n transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__enter___WFIki {\n opacity: 1;\n transform: translateY(0) scale(1);\n filter: blur(0px);\n transition: opacity 0.2s ease, transform 0.2s ease, filter 0.2s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__exit___fyOJ0 {\n opacity: 0;\n transform: translateY(8px) scale(0.95);\n filter: blur(5px);\n pointer-events: none;\n transition: opacity 0.1s ease, transform 0.1s ease, filter 0.1s ease;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf {\n background: #1a1a1a;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsLabel___8UjfX {\n color: rgba(255, 255, 255, 0.6);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12 {\n color: rgba(255, 255, 255, 0.85);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12:hover {\n background: rgba(255, 255, 255, 0.1);\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__settingsOption___UNa12.styles-module__selected___OwRqP {\n background: rgba(255, 255, 255, 0.15);\n color: #fff;\n}\n.styles-module__settingsPanel___OxX3Y.styles-module__dark___ILIQf .styles-module__toggleLabel___Xm8Aa {\n color: rgba(255, 255, 255, 0.85);\n}\n\n.styles-module__settingsHeader___pwDY9 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n margin-bottom: 0.5rem;\n padding-bottom: 9px;\n border-bottom: 1px solid rgba(255, 255, 255, 0.07);\n}\n\n.styles-module__settingsBrand___0gJeM {\n font-size: 0.8125rem;\n font-weight: 600;\n letter-spacing: -0.0094em;\n color: #fff;\n}\n\n.styles-module__settingsBrandSlash___uTG18 {\n color: rgba(255, 255, 255, 0.5);\n}\n\n.styles-module__settingsVersion___TUcFq {\n font-size: 0.6875rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.4);\n margin-left: auto;\n letter-spacing: -0.0094em;\n}\n\n.styles-module__settingsSection___m-YM2 + .styles-module__settingsSection___m-YM2 {\n margin-top: 0.5rem;\n padding-top: calc(0.5rem + 2px);\n border-top: 1px solid rgba(255, 255, 255, 0.07);\n}\n\n.styles-module__settingsRow___3sdhc {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 24px;\n}\n\n.styles-module__dropdownContainer___BVnxe {\n position: relative;\n}\n\n.styles-module__dropdownButton___16NPz {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.25rem 0.5rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 600;\n color: #fff;\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n letter-spacing: -0.0094em;\n}\n.styles-module__dropdownButton___16NPz:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n.styles-module__dropdownButton___16NPz svg {\n opacity: 0.6;\n}\n\n.styles-module__cycleButton___FMKfw {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0;\n border: none;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 500;\n color: #fff;\n cursor: pointer;\n letter-spacing: -0.0094em;\n}\n.styles-module__cycleButton___FMKfw.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.85);\n}\n\n@keyframes styles-module__cycleTextIn___Q6zJf {\n 0% {\n opacity: 0;\n transform: translateY(-6px);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n.styles-module__cycleButtonText___fD1LR {\n display: inline-block;\n animation: styles-module__cycleTextIn___Q6zJf 0.2s ease-out;\n}\n\n.styles-module__cycleDots___LWuoQ {\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.styles-module__cycleDot___nPgLY {\n width: 3px;\n height: 3px;\n border-radius: 50%;\n background: rgba(255, 255, 255, 0.3);\n transform: scale(0.667);\n transition: background-color 0.25s ease-out, transform 0.25s ease-out;\n}\n.styles-module__cycleDot___nPgLY.styles-module__active___-zoN6 {\n background: #fff;\n transform: scale(1);\n}\n.styles-module__cycleDot___nPgLY.styles-module__light___r6n4Y {\n background: rgba(0, 0, 0, 0.2);\n}\n.styles-module__cycleDot___nPgLY.styles-module__light___r6n4Y.styles-module__active___-zoN6 {\n background: rgba(0, 0, 0, 0.7);\n}\n\n.styles-module__dropdownMenu___k73ER {\n position: absolute;\n right: 0;\n top: calc(100% + 0.25rem);\n background: #1a1a1a;\n border-radius: 0.5rem;\n padding: 0.25rem;\n min-width: 120px;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);\n z-index: 10;\n animation: styles-module__scaleIn___c-r1K 0.15s ease-out;\n}\n\n.styles-module__dropdownItem___ylsLj {\n width: 100%;\n display: flex;\n align-items: center;\n padding: 0.5rem 0.625rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.8125rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.85);\n cursor: pointer;\n text-align: left;\n transition: background-color 0.15s ease, color 0.15s ease;\n letter-spacing: -0.0094em;\n}\n.styles-module__dropdownItem___ylsLj:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n.styles-module__dropdownItem___ylsLj.styles-module__selected___OwRqP {\n background: rgba(255, 255, 255, 0.12);\n color: #fff;\n font-weight: 600;\n}\n\n.styles-module__settingsLabel___8UjfX {\n font-size: 0.8125rem;\n font-weight: 400;\n letter-spacing: -0.0094em;\n color: rgba(255, 255, 255, 0.5);\n display: flex;\n align-items: center;\n gap: 0.125rem;\n}\n.styles-module__settingsLabel___8UjfX.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__settingsLabelMarker___ewdtV {\n margin-bottom: 10px;\n}\n\n.styles-module__settingsOptions___LyrBA {\n display: flex;\n gap: 0.25rem;\n}\n\n.styles-module__settingsOption___UNa12 {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 0.25rem;\n padding: 0.375rem 0.5rem;\n border: none;\n border-radius: 0.375rem;\n background: transparent;\n font-size: 0.6875rem;\n font-weight: 500;\n color: rgba(0, 0, 0, 0.7);\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n}\n.styles-module__settingsOption___UNa12:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.styles-module__settingsOption___UNa12.styles-module__selected___OwRqP {\n background: rgba(60, 130, 247, 0.15);\n color: #3c82f7;\n}\n\n.styles-module__sliderContainer___ducXj {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n}\n\n.styles-module__slider___GLdxp {\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n height: 4px;\n background: rgba(255, 255, 255, 0.15);\n border-radius: 2px;\n outline: none;\n cursor: pointer;\n}\n.styles-module__slider___GLdxp::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 14px;\n height: 14px;\n background: white;\n border-radius: 50%;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.styles-module__slider___GLdxp::-moz-range-thumb {\n width: 14px;\n height: 14px;\n background: white;\n border: none;\n border-radius: 50%;\n cursor: pointer;\n transition: transform 0.15s ease, box-shadow 0.15s ease;\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);\n}\n.styles-module__slider___GLdxp:hover::-webkit-slider-thumb {\n transform: scale(1.15);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);\n}\n.styles-module__slider___GLdxp:hover::-moz-range-thumb {\n transform: scale(1.15);\n box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);\n}\n\n.styles-module__sliderLabels___FhLDB {\n display: flex;\n justify-content: space-between;\n}\n\n.styles-module__sliderLabel___U8sPr {\n font-size: 0.625rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n transition: color 0.15s ease;\n}\n.styles-module__sliderLabel___U8sPr:hover {\n color: rgba(255, 255, 255, 0.7);\n}\n.styles-module__sliderLabel___U8sPr.styles-module__active___-zoN6 {\n color: rgba(255, 255, 255, 0.9);\n}\n\n.styles-module__colorOptions___iHCNX {\n display: flex;\n gap: 0.5rem;\n margin-top: 0.375rem;\n margin-bottom: 1px;\n}\n\n.styles-module__colorOption___IodiY {\n display: block;\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 2px solid transparent;\n cursor: pointer;\n transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);\n}\n.styles-module__colorOption___IodiY:hover {\n transform: scale(1.15);\n}\n.styles-module__colorOption___IodiY.styles-module__selected___OwRqP {\n transform: scale(0.83);\n}\n\n.styles-module__colorOptionRing___U2xpo {\n display: flex;\n width: 24px;\n height: 24px;\n border: 2px solid transparent;\n border-radius: 50%;\n transition: border-color 0.3s ease;\n}\n.styles-module__settingsToggle___fBrFn {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n cursor: pointer;\n}\n.styles-module__settingsToggle___fBrFn + .styles-module__settingsToggle___fBrFn {\n margin-top: calc(0.5rem + 6px);\n}\n.styles-module__settingsToggle___fBrFn input[type=checkbox] {\n position: absolute;\n opacity: 0;\n width: 0;\n height: 0;\n}\n\n.styles-module__customCheckbox___U39ax {\n position: relative;\n width: 14px;\n height: 14px;\n border: 1px solid rgba(255, 255, 255, 0.2);\n border-radius: 4px;\n background: rgba(255, 255, 255, 0.05);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n transition: background 0.25s ease, border-color 0.25s ease;\n}\n.styles-module__customCheckbox___U39ax svg {\n color: #1a1a1a;\n opacity: 1;\n transition: opacity 0.15s ease;\n}\ninput[type=checkbox]:checked + .styles-module__customCheckbox___U39ax {\n border-color: rgba(255, 255, 255, 0.3);\n background: rgb(255, 255, 255);\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y {\n border: 1px solid rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y.styles-module__checked___mnZLo {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n.styles-module__customCheckbox___U39ax.styles-module__light___r6n4Y.styles-module__checked___mnZLo svg {\n color: #fff;\n}\n\n.styles-module__toggleLabel___Xm8Aa {\n font-size: 0.8125rem;\n font-weight: 400;\n color: rgba(255, 255, 255, 0.5);\n letter-spacing: -0.0094em;\n display: flex;\n align-items: center;\n gap: 0.25rem;\n}\n.styles-module__toggleLabel___Xm8Aa.styles-module__light___r6n4Y {\n color: rgba(0, 0, 0, 0.5);\n}\n\n.styles-module__helpIcon___xQg56 {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: help;\n margin-left: 0;\n}\n.styles-module__helpIcon___xQg56 svg {\n display: block;\n transform: translateY(1px);\n color: rgba(255, 255, 255, 0.4);\n transition: color 0.15s ease;\n}\n.styles-module__helpIcon___xQg56:hover svg {\n color: rgba(255, 255, 255, 0.7);\n}\n.styles-module__helpIcon___xQg56::after {\n content: attr(data-tooltip);\n position: absolute;\n right: calc(100% + 8px);\n top: 50%;\n transform: translateY(-50%);\n padding: 8px 10px;\n background: #383838;\n color: rgba(255, 255, 255, 0.7);\n font-size: 11px;\n font-weight: 400;\n line-height: 1.4;\n border-radius: 10px;\n white-space: normal;\n width: 152px;\n text-align: left;\n opacity: 0;\n visibility: hidden;\n transition: opacity 0.15s ease, visibility 0.15s ease;\n pointer-events: none;\n z-index: 100;\n box-shadow: 0px 1px 8px rgba(0, 0, 0, 0.28);\n}\n.styles-module__helpIcon___xQg56:hover::after {\n opacity: 1;\n visibility: visible;\n transition-delay: 0.5s;\n}\n\n.styles-module__dragSelection___kZLq2 {\n position: fixed;\n top: 0;\n left: 0;\n border: 2px solid rgba(52, 199, 89, 0.6);\n border-radius: 4px;\n background: rgba(52, 199, 89, 0.08);\n pointer-events: none;\n z-index: 99997;\n will-change: transform, width, height;\n contain: layout style;\n}\n\n.styles-module__dragCount___KM90j {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n background: #34c759;\n color: white;\n font-size: 0.875rem;\n font-weight: 600;\n padding: 0.25rem 0.5rem;\n border-radius: 1rem;\n min-width: 1.5rem;\n text-align: center;\n}\n\n.styles-module__highlightsContainer___-0xzG {\n position: fixed;\n top: 0;\n left: 0;\n pointer-events: none;\n z-index: 99996;\n}\n\n.styles-module__selectedElementHighlight___fyVlI {\n position: fixed;\n top: 0;\n left: 0;\n border: 2px solid rgba(52, 199, 89, 0.5);\n border-radius: 4px;\n background: rgba(52, 199, 89, 0.06);\n pointer-events: none;\n will-change: transform, width, height;\n contain: layout style;\n}\n\n.styles-module__light___r6n4Y.styles-module__toolbarContainer___dIhma {\n background: #fff;\n color: rgba(0, 0, 0, 0.85);\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___r6n4Y.styles-module__toolbarContainer___dIhma.styles-module__collapsed___Rydsn:hover {\n background: #f5f5f5;\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc:hover:not(:disabled) {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-active=true] {\n color: #3c82f7;\n background: rgba(60, 130, 247, 0.15);\n}\n.styles-module__light___r6n4Y.styles-module__controlButton___8Q0jc[data-danger]:hover:not(:disabled) {\n background: rgba(255, 59, 48, 0.15);\n color: #ff3b30;\n}\n.styles-module__light___r6n4Y.styles-module__divider___c--s1 {\n background: rgba(0, 0, 0, 0.1);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID {\n background: #fff;\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.06);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerQuote___FHmrz {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerNote___QkrrS {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__markerTooltip___aLJID .styles-module__markerHint___2iF-6 {\n color: rgba(0, 0, 0, 0.35);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y {\n background: #fff;\n box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08), 0 4px 16px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(0, 0, 0, 0.04);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsHeader___pwDY9 {\n border-bottom-color: rgba(0, 0, 0, 0.08);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrand___0gJeM {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsBrandSlash___uTG18 {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsVersion___TUcFq {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsSection___m-YM2 {\n border-top-color: rgba(0, 0, 0, 0.08);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__settingsLabel___8UjfX {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleButton___FMKfw {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY {\n background: rgba(0, 0, 0, 0.2);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__cycleDot___nPgLY.styles-module__active___-zoN6 {\n background: rgba(0, 0, 0, 0.7);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz {\n color: rgba(0, 0, 0, 0.85);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__dropdownButton___16NPz:hover {\n background: rgba(0, 0, 0, 0.05);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__toggleLabel___Xm8Aa {\n color: rgba(0, 0, 0, 0.5);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax {\n border: 1px solid rgba(0, 0, 0, 0.15);\n background: #fff;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax.styles-module__checked___mnZLo {\n border-color: #1a1a1a;\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__customCheckbox___U39ax.styles-module__checked___mnZLo svg {\n color: #fff;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr:hover {\n color: rgba(0, 0, 0, 0.7);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__sliderLabel___U8sPr.styles-module__active___-zoN6 {\n color: rgba(0, 0, 0, 0.9);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp {\n background: rgba(0, 0, 0, 0.1);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp::-webkit-slider-thumb {\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__slider___GLdxp::-moz-range-thumb {\n background: #1a1a1a;\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56 svg {\n color: rgba(0, 0, 0, 0.6);\n}\n.styles-module__light___r6n4Y.styles-module__settingsPanel___OxX3Y .styles-module__helpIcon___xQg56:hover svg {\n color: rgba(0, 0, 0, 0.7);\n}\n\n.styles-module__themeToggle___2rUjA {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n margin-left: 0.5rem;\n border: none;\n border-radius: 6px;\n background: transparent;\n color: rgba(255, 255, 255, 0.4);\n cursor: pointer;\n transition: background-color 0.15s ease, color 0.15s ease;\n}\n.styles-module__themeToggle___2rUjA:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n.styles-module__light___r6n4Y .styles-module__themeToggle___2rUjA {\n color: rgba(0, 0, 0, 0.4);\n}\n.styles-module__light___r6n4Y .styles-module__themeToggle___2rUjA:hover {\n background: rgba(0, 0, 0, 0.06);\n color: rgba(0, 0, 0, 0.7);\n}';
1385
+ var classNames2 = { "toolbar": "styles-module__toolbar___wNsdK", "toolbarContainer": "styles-module__toolbarContainer___dIhma", "dragging": "styles-module__dragging___xrolZ", "entrance": "styles-module__entrance___sgHd8", "toolbarEnter": "styles-module__toolbarEnter___u8RRu", "collapsed": "styles-module__collapsed___Rydsn", "expanded": "styles-module__expanded___ofKPx", "toggleContent": "styles-module__toggleContent___0yfyP", "visible": "styles-module__visible___KHwEW", "hidden": "styles-module__hidden___Ae8H4", "controlsContent": "styles-module__controlsContent___9GJWU", "badge": "styles-module__badge___2XsgF", "fadeOut": "styles-module__fadeOut___6Ut6-", "badgeEnter": "styles-module__badgeEnter___mVQLj", "controlButton": "styles-module__controlButton___8Q0jc", "divider": "styles-module__divider___c--s1", "overlay": "styles-module__overlay___Q1O9y", "hoverHighlight": "styles-module__hoverHighlight___ogakW", "enter": "styles-module__enter___WFIki", "hoverHighlightIn": "styles-module__hoverHighlightIn___6WYHY", "multiSelectOutline": "styles-module__multiSelectOutline___cSJ-m", "fadeIn": "styles-module__fadeIn___b9qmf", "exit": "styles-module__exit___fyOJ0", "singleSelectOutline": "styles-module__singleSelectOutline___QhX-O", "hoverTooltip": "styles-module__hoverTooltip___bvLk7", "hoverTooltipIn": "styles-module__hoverTooltipIn___FYGQx", "markersLayer": "styles-module__markersLayer___-25j1", "fixedMarkersLayer": "styles-module__fixedMarkersLayer___ffyX6", "marker": "styles-module__marker___6sQrs", "clearing": "styles-module__clearing___FQ--7", "markerIn": "styles-module__markerIn___5FaAP", "markerOut": "styles-module__markerOut___GU5jX", "pending": "styles-module__pending___2IHLC", "fixed": "styles-module__fixed___dBMHC", "multiSelect": "styles-module__multiSelect___YWiuz", "hovered": "styles-module__hovered___ZgXIy", "renumber": "styles-module__renumber___nCTxD", "renumberRoll": "styles-module__renumberRoll___Wgbq3", "markerTooltip": "styles-module__markerTooltip___aLJID", "tooltipIn": "styles-module__tooltipIn___0N31w", "markerQuote": "styles-module__markerQuote___FHmrz", "markerNote": "styles-module__markerNote___QkrrS", "markerHint": "styles-module__markerHint___2iF-6", "settingsPanel": "styles-module__settingsPanel___OxX3Y", "settingsHeader": "styles-module__settingsHeader___pwDY9", "settingsBrand": "styles-module__settingsBrand___0gJeM", "settingsBrandSlash": "styles-module__settingsBrandSlash___uTG18", "settingsVersion": "styles-module__settingsVersion___TUcFq", "settingsSection": "styles-module__settingsSection___m-YM2", "settingsLabel": "styles-module__settingsLabel___8UjfX", "cycleButton": "styles-module__cycleButton___FMKfw", "cycleDot": "styles-module__cycleDot___nPgLY", "dropdownButton": "styles-module__dropdownButton___16NPz", "toggleLabel": "styles-module__toggleLabel___Xm8Aa", "customCheckbox": "styles-module__customCheckbox___U39ax", "sliderLabel": "styles-module__sliderLabel___U8sPr", "slider": "styles-module__slider___GLdxp", "helpIcon": "styles-module__helpIcon___xQg56", "themeToggle": "styles-module__themeToggle___2rUjA", "dark": "styles-module__dark___ILIQf", "settingsOption": "styles-module__settingsOption___UNa12", "selected": "styles-module__selected___OwRqP", "settingsRow": "styles-module__settingsRow___3sdhc", "dropdownContainer": "styles-module__dropdownContainer___BVnxe", "light": "styles-module__light___r6n4Y", "cycleButtonText": "styles-module__cycleButtonText___fD1LR", "cycleTextIn": "styles-module__cycleTextIn___Q6zJf", "cycleDots": "styles-module__cycleDots___LWuoQ", "active": "styles-module__active___-zoN6", "dropdownMenu": "styles-module__dropdownMenu___k73ER", "scaleIn": "styles-module__scaleIn___c-r1K", "dropdownItem": "styles-module__dropdownItem___ylsLj", "settingsLabelMarker": "styles-module__settingsLabelMarker___ewdtV", "settingsOptions": "styles-module__settingsOptions___LyrBA", "sliderContainer": "styles-module__sliderContainer___ducXj", "sliderLabels": "styles-module__sliderLabels___FhLDB", "colorOptions": "styles-module__colorOptions___iHCNX", "colorOption": "styles-module__colorOption___IodiY", "colorOptionRing": "styles-module__colorOptionRing___U2xpo", "settingsToggle": "styles-module__settingsToggle___fBrFn", "checked": "styles-module__checked___mnZLo", "dragSelection": "styles-module__dragSelection___kZLq2", "dragCount": "styles-module__dragCount___KM90j", "highlightsContainer": "styles-module__highlightsContainer___-0xzG", "selectedElementHighlight": "styles-module__selectedElementHighlight___fyVlI", "scaleOut": "styles-module__scaleOut___Wctwz", "slideUp": "styles-module__slideUp___kgD36", "slideDown": "styles-module__slideDown___zcdje", "settingsPanelIn": "styles-module__settingsPanelIn___MGfO8", "settingsPanelOut": "styles-module__settingsPanelOut___Zfymi" };
1386
+ if (typeof document !== "undefined") {
1387
+ let style = document.getElementById("feedback-tool-styles-page-toolbar-css-styles");
1388
+ if (!style) {
1389
+ style = document.createElement("style");
1390
+ style.id = "feedback-tool-styles-page-toolbar-css-styles";
1391
+ style.textContent = css2;
1392
+ document.head.appendChild(style);
1393
+ }
1394
+ }
1395
+ var styles_module_default2 = classNames2;
1396
+
1397
+ // src/components/page-toolbar-css/index.tsx
1398
+ var import_jsx_runtime3 = require("react/jsx-runtime");
1399
+ var hasPlayedEntranceAnimation = false;
1400
+ var DEFAULT_SETTINGS = {
1401
+ outputDetail: "standard",
1402
+ autoClearAfterCopy: false,
1403
+ annotationColor: "#3c82f7",
1404
+ blockInteractions: false
1405
+ };
1406
+ var OUTPUT_DETAIL_OPTIONS = [
1407
+ { value: "compact", label: "Compact" },
1408
+ { value: "standard", label: "Standard" },
1409
+ { value: "detailed", label: "Detailed" },
1410
+ { value: "forensic", label: "Forensic" }
1411
+ ];
1412
+ var COLOR_OPTIONS = [
1413
+ { value: "#AF52DE", label: "Purple" },
1414
+ { value: "#3c82f7", label: "Blue" },
1415
+ { value: "#5AC8FA", label: "Cyan" },
1416
+ { value: "#34C759", label: "Green" },
1417
+ { value: "#FFD60A", label: "Yellow" },
1418
+ { value: "#FF9500", label: "Orange" },
1419
+ { value: "#FF3B30", label: "Red" }
1420
+ ];
1421
+ function isElementFixed(element) {
1422
+ let current = element;
1423
+ while (current && current !== document.body) {
1424
+ const style = window.getComputedStyle(current);
1425
+ const position = style.position;
1426
+ if (position === "fixed" || position === "sticky") {
1427
+ return true;
1428
+ }
1429
+ current = current.parentElement;
1430
+ }
1431
+ return false;
1432
+ }
1433
+ function generateOutput(annotations, pathname, detailLevel = "standard") {
1434
+ if (annotations.length === 0) return "";
1435
+ const viewport = typeof window !== "undefined" ? `${window.innerWidth}\xD7${window.innerHeight}` : "unknown";
1436
+ let output = `## Page Feedback: ${pathname}
1437
+ `;
1438
+ if (detailLevel === "forensic") {
1439
+ output += `
1440
+ **Environment:**
1441
+ `;
1442
+ output += `- Viewport: ${viewport}
1443
+ `;
1444
+ if (typeof window !== "undefined") {
1445
+ output += `- URL: ${window.location.href}
1446
+ `;
1447
+ output += `- User Agent: ${navigator.userAgent}
1448
+ `;
1449
+ output += `- Timestamp: ${(/* @__PURE__ */ new Date()).toISOString()}
1450
+ `;
1451
+ output += `- Device Pixel Ratio: ${window.devicePixelRatio}
1452
+ `;
1453
+ }
1454
+ output += `
1455
+ ---
1456
+ `;
1457
+ } else if (detailLevel !== "compact") {
1458
+ output += `**Viewport:** ${viewport}
1459
+ `;
1460
+ }
1461
+ output += "\n";
1462
+ annotations.forEach((a, i) => {
1463
+ if (detailLevel === "compact") {
1464
+ output += `${i + 1}. **${a.element}**: ${a.comment}`;
1465
+ if (a.selectedText) {
1466
+ output += ` (re: "${a.selectedText.slice(0, 30)}${a.selectedText.length > 30 ? "..." : ""}")`;
1467
+ }
1468
+ output += "\n";
1469
+ } else if (detailLevel === "forensic") {
1470
+ output += `### ${i + 1}. ${a.element}
1471
+ `;
1472
+ if (a.isMultiSelect && a.fullPath) {
1473
+ output += `*Forensic data shown for first element of selection*
1474
+ `;
1475
+ }
1476
+ if (a.fullPath) {
1477
+ output += `**Full DOM Path:** ${a.fullPath}
1478
+ `;
1479
+ }
1480
+ if (a.cssClasses) {
1481
+ output += `**CSS Classes:** ${a.cssClasses}
1482
+ `;
1483
+ }
1484
+ if (a.boundingBox) {
1485
+ output += `**Position:** x:${Math.round(a.boundingBox.x)}, y:${Math.round(a.boundingBox.y)} (${Math.round(a.boundingBox.width)}\xD7${Math.round(a.boundingBox.height)}px)
1486
+ `;
1487
+ }
1488
+ output += `**Annotation at:** ${a.x.toFixed(1)}% from left, ${Math.round(a.y)}px from top
1489
+ `;
1490
+ if (a.selectedText) {
1491
+ output += `**Selected text:** "${a.selectedText}"
1492
+ `;
1493
+ }
1494
+ if (a.nearbyText && !a.selectedText) {
1495
+ output += `**Context:** ${a.nearbyText.slice(0, 100)}
1496
+ `;
1497
+ }
1498
+ if (a.computedStyles) {
1499
+ output += `**Computed Styles:** ${a.computedStyles}
1500
+ `;
1501
+ }
1502
+ if (a.accessibility) {
1503
+ output += `**Accessibility:** ${a.accessibility}
1504
+ `;
1505
+ }
1506
+ if (a.nearbyElements) {
1507
+ output += `**Nearby Elements:** ${a.nearbyElements}
1508
+ `;
1509
+ }
1510
+ output += `**Feedback:** ${a.comment}
1511
+
1512
+ `;
1513
+ } else {
1514
+ output += `### ${i + 1}. ${a.element}
1515
+ `;
1516
+ output += `**Location:** ${a.elementPath}
1517
+ `;
1518
+ if (detailLevel === "detailed") {
1519
+ if (a.cssClasses) {
1520
+ output += `**Classes:** ${a.cssClasses}
1521
+ `;
1522
+ }
1523
+ if (a.boundingBox) {
1524
+ output += `**Position:** ${Math.round(a.boundingBox.x)}px, ${Math.round(a.boundingBox.y)}px (${Math.round(a.boundingBox.width)}\xD7${Math.round(a.boundingBox.height)}px)
1525
+ `;
1526
+ }
1527
+ }
1528
+ if (a.selectedText) {
1529
+ output += `**Selected text:** "${a.selectedText}"
1530
+ `;
1531
+ }
1532
+ if (detailLevel === "detailed" && a.nearbyText && !a.selectedText) {
1533
+ output += `**Context:** ${a.nearbyText.slice(0, 100)}
1534
+ `;
1535
+ }
1536
+ output += `**Feedback:** ${a.comment}
1537
+
1538
+ `;
1539
+ }
1540
+ });
1541
+ return output.trim();
1542
+ }
1543
+ function PageFeedbackToolbarCSS({
1544
+ demoAnnotations,
1545
+ demoDelay = 1e3,
1546
+ enableDemoMode = false
1547
+ } = {}) {
1548
+ const [isActive, setIsActive] = (0, import_react2.useState)(false);
1549
+ const [annotations, setAnnotations] = (0, import_react2.useState)([]);
1550
+ const [showMarkers, setShowMarkers] = (0, import_react2.useState)(true);
1551
+ const [markersVisible, setMarkersVisible] = (0, import_react2.useState)(false);
1552
+ const [markersExiting, setMarkersExiting] = (0, import_react2.useState)(false);
1553
+ const [hoverInfo, setHoverInfo] = (0, import_react2.useState)(null);
1554
+ const [hoverPosition, setHoverPosition] = (0, import_react2.useState)({ x: 0, y: 0 });
1555
+ const [pendingAnnotation, setPendingAnnotation] = (0, import_react2.useState)(null);
1556
+ const [copied, setCopied] = (0, import_react2.useState)(false);
1557
+ const [cleared, setCleared] = (0, import_react2.useState)(false);
1558
+ const [isClearing, setIsClearing] = (0, import_react2.useState)(false);
1559
+ const [hoveredMarkerId, setHoveredMarkerId] = (0, import_react2.useState)(null);
1560
+ const [deletingMarkerId, setDeletingMarkerId] = (0, import_react2.useState)(null);
1561
+ const [renumberFrom, setRenumberFrom] = (0, import_react2.useState)(null);
1562
+ const [editingAnnotation, setEditingAnnotation] = (0, import_react2.useState)(
1563
+ null
1564
+ );
1565
+ const [scrollY, setScrollY] = (0, import_react2.useState)(0);
1566
+ const [isScrolling, setIsScrolling] = (0, import_react2.useState)(false);
1567
+ const [mounted, setMounted] = (0, import_react2.useState)(false);
1568
+ const [isFrozen, setIsFrozen] = (0, import_react2.useState)(false);
1569
+ const [showSettings, setShowSettings] = (0, import_react2.useState)(false);
1570
+ const [showSettingsVisible, setShowSettingsVisible] = (0, import_react2.useState)(false);
1571
+ const [settings, setSettings] = (0, import_react2.useState)(DEFAULT_SETTINGS);
1572
+ const [isDarkMode, setIsDarkMode] = (0, import_react2.useState)(true);
1573
+ const [showEntranceAnimation, setShowEntranceAnimation] = (0, import_react2.useState)(false);
1574
+ const [toolbarPosition, setToolbarPosition] = (0, import_react2.useState)(null);
1575
+ const [isDraggingToolbar, setIsDraggingToolbar] = (0, import_react2.useState)(false);
1576
+ const [dragStartPos, setDragStartPos] = (0, import_react2.useState)(null);
1577
+ const [dragRotation, setDragRotation] = (0, import_react2.useState)(0);
1578
+ const justFinishedToolbarDragRef = (0, import_react2.useRef)(false);
1579
+ const [animatedMarkers, setAnimatedMarkers] = (0, import_react2.useState)(
1580
+ /* @__PURE__ */ new Set()
1581
+ );
1582
+ const [exitingMarkers, setExitingMarkers] = (0, import_react2.useState)(/* @__PURE__ */ new Set());
1583
+ const [pendingExiting, setPendingExiting] = (0, import_react2.useState)(false);
1584
+ const [editExiting, setEditExiting] = (0, import_react2.useState)(false);
1585
+ const [isDragging, setIsDragging] = (0, import_react2.useState)(false);
1586
+ const mouseDownPosRef = (0, import_react2.useRef)(null);
1587
+ const dragStartRef = (0, import_react2.useRef)(null);
1588
+ const dragRectRef = (0, import_react2.useRef)(null);
1589
+ const highlightsContainerRef = (0, import_react2.useRef)(null);
1590
+ const justFinishedDragRef = (0, import_react2.useRef)(false);
1591
+ const lastElementUpdateRef = (0, import_react2.useRef)(0);
1592
+ const recentlyAddedIdRef = (0, import_react2.useRef)(null);
1593
+ const DRAG_THRESHOLD = 8;
1594
+ const ELEMENT_UPDATE_THROTTLE = 50;
1595
+ const popupRef = (0, import_react2.useRef)(null);
1596
+ const editPopupRef = (0, import_react2.useRef)(null);
1597
+ const scrollTimeoutRef = (0, import_react2.useRef)(null);
1598
+ const pathname = typeof window !== "undefined" ? window.location.pathname : "/";
1599
+ (0, import_react2.useEffect)(() => {
1600
+ if (showSettings) {
1601
+ setShowSettingsVisible(true);
1602
+ } else {
1603
+ const timer = setTimeout(() => setShowSettingsVisible(false), 0);
1604
+ return () => clearTimeout(timer);
1605
+ }
1606
+ }, [showSettings]);
1607
+ const shouldShowMarkers = isActive && showMarkers;
1608
+ (0, import_react2.useEffect)(() => {
1609
+ if (shouldShowMarkers) {
1610
+ setMarkersExiting(false);
1611
+ setMarkersVisible(true);
1612
+ setAnimatedMarkers(/* @__PURE__ */ new Set());
1613
+ const timer = setTimeout(() => {
1614
+ setAnimatedMarkers((prev) => {
1615
+ const newSet = new Set(prev);
1616
+ annotations.forEach((a) => newSet.add(a.id));
1617
+ return newSet;
1618
+ });
1619
+ }, 350);
1620
+ return () => clearTimeout(timer);
1621
+ } else if (markersVisible) {
1622
+ setMarkersExiting(true);
1623
+ const timer = setTimeout(() => {
1624
+ setMarkersVisible(false);
1625
+ setMarkersExiting(false);
1626
+ }, 250);
1627
+ return () => clearTimeout(timer);
1628
+ }
1629
+ }, [shouldShowMarkers]);
1630
+ (0, import_react2.useEffect)(() => {
1631
+ setMounted(true);
1632
+ setScrollY(window.scrollY);
1633
+ const stored = loadAnnotations(pathname);
1634
+ setAnnotations(stored);
1635
+ if (!hasPlayedEntranceAnimation) {
1636
+ setShowEntranceAnimation(true);
1637
+ hasPlayedEntranceAnimation = true;
1638
+ setTimeout(() => setShowEntranceAnimation(false), 750);
1639
+ }
1640
+ try {
1641
+ const storedSettings = localStorage.getItem("feedback-toolbar-settings");
1642
+ if (storedSettings) {
1643
+ setSettings({ ...DEFAULT_SETTINGS, ...JSON.parse(storedSettings) });
1644
+ }
1645
+ } catch (e) {
1646
+ }
1647
+ try {
1648
+ const savedTheme = localStorage.getItem("feedback-toolbar-theme");
1649
+ if (savedTheme !== null) {
1650
+ setIsDarkMode(savedTheme === "dark");
1651
+ }
1652
+ } catch (e) {
1653
+ }
1654
+ }, [pathname]);
1655
+ (0, import_react2.useEffect)(() => {
1656
+ if (mounted) {
1657
+ localStorage.setItem(
1658
+ "feedback-toolbar-settings",
1659
+ JSON.stringify(settings)
1660
+ );
1661
+ }
1662
+ }, [settings, mounted]);
1663
+ (0, import_react2.useEffect)(() => {
1664
+ if (mounted) {
1665
+ localStorage.setItem(
1666
+ "feedback-toolbar-theme",
1667
+ isDarkMode ? "dark" : "light"
1668
+ );
1669
+ }
1670
+ }, [isDarkMode, mounted]);
1671
+ (0, import_react2.useEffect)(() => {
1672
+ if (!enableDemoMode) return;
1673
+ if (!mounted || !demoAnnotations || demoAnnotations.length === 0) return;
1674
+ if (annotations.length > 0) return;
1675
+ const timeoutIds = [];
1676
+ timeoutIds.push(
1677
+ setTimeout(() => {
1678
+ setIsActive(true);
1679
+ }, demoDelay - 200)
1680
+ );
1681
+ demoAnnotations.forEach((demo, index) => {
1682
+ const annotationDelay = demoDelay + index * 300;
1683
+ timeoutIds.push(
1684
+ setTimeout(() => {
1685
+ const element = document.querySelector(demo.selector);
1686
+ if (!element) return;
1687
+ const rect = element.getBoundingClientRect();
1688
+ const { name, path } = identifyElement(element);
1689
+ const newAnnotation = {
1690
+ id: `demo-${Date.now()}-${index}`,
1691
+ x: (rect.left + rect.width / 2) / window.innerWidth * 100,
1692
+ y: rect.top + rect.height / 2 + window.scrollY,
1693
+ comment: demo.comment,
1694
+ element: name,
1695
+ elementPath: path,
1696
+ timestamp: Date.now(),
1697
+ selectedText: demo.selectedText,
1698
+ boundingBox: {
1699
+ x: rect.left,
1700
+ y: rect.top + window.scrollY,
1701
+ width: rect.width,
1702
+ height: rect.height
1703
+ },
1704
+ nearbyText: getNearbyText(element),
1705
+ cssClasses: getElementClasses(element)
1706
+ };
1707
+ setAnnotations((prev) => [...prev, newAnnotation]);
1708
+ }, annotationDelay)
1709
+ );
1710
+ });
1711
+ return () => {
1712
+ timeoutIds.forEach(clearTimeout);
1713
+ };
1714
+ }, [enableDemoMode, mounted, demoAnnotations, demoDelay]);
1715
+ (0, import_react2.useEffect)(() => {
1716
+ const handleScroll = () => {
1717
+ setScrollY(window.scrollY);
1718
+ setIsScrolling(true);
1719
+ if (scrollTimeoutRef.current) {
1720
+ clearTimeout(scrollTimeoutRef.current);
1721
+ }
1722
+ scrollTimeoutRef.current = setTimeout(() => {
1723
+ setIsScrolling(false);
1724
+ }, 150);
1725
+ };
1726
+ window.addEventListener("scroll", handleScroll, { passive: true });
1727
+ return () => {
1728
+ window.removeEventListener("scroll", handleScroll);
1729
+ if (scrollTimeoutRef.current) {
1730
+ clearTimeout(scrollTimeoutRef.current);
1731
+ }
1732
+ };
1733
+ }, []);
1734
+ (0, import_react2.useEffect)(() => {
1735
+ if (mounted && annotations.length > 0) {
1736
+ saveAnnotations(pathname, annotations);
1737
+ } else if (mounted && annotations.length === 0) {
1738
+ localStorage.removeItem(getStorageKey(pathname));
1739
+ }
1740
+ }, [annotations, pathname, mounted]);
1741
+ const freezeAnimations = (0, import_react2.useCallback)(() => {
1742
+ if (isFrozen) return;
1743
+ const style = document.createElement("style");
1744
+ style.id = "feedback-freeze-styles";
1745
+ style.textContent = `
1746
+ *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *),
1747
+ *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *)::before,
1748
+ *:not([data-feedback-toolbar]):not([data-feedback-toolbar] *):not([data-annotation-popup]):not([data-annotation-popup] *):not([data-annotation-marker]):not([data-annotation-marker] *)::after {
1749
+ animation-play-state: paused !important;
1750
+ transition: none !important;
1751
+ }
1752
+ `;
1753
+ document.head.appendChild(style);
1754
+ document.querySelectorAll("video").forEach((video) => {
1755
+ if (!video.paused) {
1756
+ video.dataset.wasPaused = "false";
1757
+ video.pause();
1758
+ }
1759
+ });
1760
+ setIsFrozen(true);
1761
+ }, [isFrozen]);
1762
+ const unfreezeAnimations = (0, import_react2.useCallback)(() => {
1763
+ if (!isFrozen) return;
1764
+ const style = document.getElementById("feedback-freeze-styles");
1765
+ if (style) style.remove();
1766
+ document.querySelectorAll("video").forEach((video) => {
1767
+ if (video.dataset.wasPaused === "false") {
1768
+ video.play();
1769
+ delete video.dataset.wasPaused;
1770
+ }
1771
+ });
1772
+ setIsFrozen(false);
1773
+ }, [isFrozen]);
1774
+ const toggleFreeze = (0, import_react2.useCallback)(() => {
1775
+ if (isFrozen) {
1776
+ unfreezeAnimations();
1777
+ } else {
1778
+ freezeAnimations();
1779
+ }
1780
+ }, [isFrozen, freezeAnimations, unfreezeAnimations]);
1781
+ (0, import_react2.useEffect)(() => {
1782
+ if (!isActive) {
1783
+ setPendingAnnotation(null);
1784
+ setEditingAnnotation(null);
1785
+ setHoverInfo(null);
1786
+ setShowSettings(false);
1787
+ if (isFrozen) {
1788
+ unfreezeAnimations();
1789
+ }
1790
+ }
1791
+ }, [isActive, isFrozen, unfreezeAnimations]);
1792
+ (0, import_react2.useEffect)(() => {
1793
+ if (!isActive) return;
1794
+ const style = document.createElement("style");
1795
+ style.id = "feedback-cursor-styles";
1796
+ style.textContent = `
1797
+ body * {
1798
+ cursor: crosshair !important;
1799
+ }
1800
+ body p, body span, body h1, body h2, body h3, body h4, body h5, body h6,
1801
+ body li, body td, body th, body label, body blockquote, body figcaption,
1802
+ body caption, body legend, body dt, body dd, body pre, body code,
1803
+ body em, body strong, body b, body i, body u, body s, body a,
1804
+ body time, body address, body cite, body q, body abbr, body dfn,
1805
+ body mark, body small, body sub, body sup, body [contenteditable],
1806
+ body p *, body span *, body h1 *, body h2 *, body h3 *, body h4 *,
1807
+ body h5 *, body h6 *, body li *, body a *, body label *, body pre *,
1808
+ body code *, body blockquote *, body [contenteditable] * {
1809
+ cursor: text !important;
1810
+ }
1811
+ [data-feedback-toolbar], [data-feedback-toolbar] * {
1812
+ cursor: default !important;
1813
+ }
1814
+ [data-annotation-marker], [data-annotation-marker] * {
1815
+ cursor: pointer !important;
1816
+ }
1817
+ `;
1818
+ document.head.appendChild(style);
1819
+ return () => {
1820
+ const existingStyle = document.getElementById("feedback-cursor-styles");
1821
+ if (existingStyle) existingStyle.remove();
1822
+ };
1823
+ }, [isActive]);
1824
+ (0, import_react2.useEffect)(() => {
1825
+ if (!isActive || pendingAnnotation) return;
1826
+ const handleMouseMove = (e) => {
1827
+ if (e.target.closest("[data-feedback-toolbar]")) {
1828
+ setHoverInfo(null);
1829
+ return;
1830
+ }
1831
+ const elementUnder = document.elementFromPoint(
1832
+ e.clientX,
1833
+ e.clientY
1834
+ );
1835
+ if (!elementUnder || elementUnder.closest("[data-feedback-toolbar]")) {
1836
+ setHoverInfo(null);
1837
+ return;
1838
+ }
1839
+ const { name, path } = identifyElement(elementUnder);
1840
+ const rect = elementUnder.getBoundingClientRect();
1841
+ setHoverInfo({ element: name, elementPath: path, rect });
1842
+ setHoverPosition({ x: e.clientX, y: e.clientY });
1843
+ };
1844
+ document.addEventListener("mousemove", handleMouseMove);
1845
+ return () => document.removeEventListener("mousemove", handleMouseMove);
1846
+ }, [isActive, pendingAnnotation]);
1847
+ (0, import_react2.useEffect)(() => {
1848
+ if (!isActive) return;
1849
+ const handleClick = (e) => {
1850
+ if (justFinishedDragRef.current) {
1851
+ justFinishedDragRef.current = false;
1852
+ return;
1853
+ }
1854
+ const target = e.target;
1855
+ if (target.closest("[data-feedback-toolbar]")) return;
1856
+ if (target.closest("[data-annotation-popup]")) return;
1857
+ if (target.closest("[data-annotation-marker]")) return;
1858
+ const isInteractive = target.closest(
1859
+ "button, a, input, select, textarea, [role='button'], [onclick]"
1860
+ );
1861
+ if (settings.blockInteractions && isInteractive) {
1862
+ e.preventDefault();
1863
+ e.stopPropagation();
1864
+ }
1865
+ if (pendingAnnotation) {
1866
+ if (isInteractive && !settings.blockInteractions) {
1867
+ return;
1868
+ }
1869
+ e.preventDefault();
1870
+ popupRef.current?.shake();
1871
+ return;
1872
+ }
1873
+ if (editingAnnotation) {
1874
+ if (isInteractive && !settings.blockInteractions) {
1875
+ return;
1876
+ }
1877
+ e.preventDefault();
1878
+ editPopupRef.current?.shake();
1879
+ return;
1880
+ }
1881
+ e.preventDefault();
1882
+ const elementUnder = document.elementFromPoint(
1883
+ e.clientX,
1884
+ e.clientY
1885
+ );
1886
+ if (!elementUnder) return;
1887
+ const { name, path } = identifyElement(elementUnder);
1888
+ const rect = elementUnder.getBoundingClientRect();
1889
+ const x = e.clientX / window.innerWidth * 100;
1890
+ const isFixed = isElementFixed(elementUnder);
1891
+ const y = isFixed ? e.clientY : e.clientY + window.scrollY;
1892
+ const selection = window.getSelection();
1893
+ let selectedText;
1894
+ if (selection && selection.toString().trim().length > 0) {
1895
+ selectedText = selection.toString().trim().slice(0, 500);
1896
+ }
1897
+ const computedStylesObj = getDetailedComputedStyles(elementUnder);
1898
+ const computedStylesStr = Object.entries(computedStylesObj).map(([k, v]) => `${k}: ${v}`).join("; ");
1899
+ setPendingAnnotation({
1900
+ x,
1901
+ y,
1902
+ clientY: e.clientY,
1903
+ element: name,
1904
+ elementPath: path,
1905
+ selectedText,
1906
+ boundingBox: {
1907
+ x: rect.left,
1908
+ y: isFixed ? rect.top : rect.top + window.scrollY,
1909
+ width: rect.width,
1910
+ height: rect.height
1911
+ },
1912
+ nearbyText: getNearbyText(elementUnder),
1913
+ cssClasses: getElementClasses(elementUnder),
1914
+ isFixed,
1915
+ fullPath: getFullElementPath(elementUnder),
1916
+ accessibility: getAccessibilityInfo(elementUnder),
1917
+ computedStyles: computedStylesStr,
1918
+ nearbyElements: getNearbyElements(elementUnder)
1919
+ });
1920
+ setHoverInfo(null);
1921
+ };
1922
+ document.addEventListener("click", handleClick, true);
1923
+ return () => document.removeEventListener("click", handleClick, true);
1924
+ }, [
1925
+ isActive,
1926
+ pendingAnnotation,
1927
+ editingAnnotation,
1928
+ settings.blockInteractions
1929
+ ]);
1930
+ (0, import_react2.useEffect)(() => {
1931
+ if (!isActive || pendingAnnotation) return;
1932
+ const handleMouseDown = (e) => {
1933
+ const target = e.target;
1934
+ if (target.closest("[data-feedback-toolbar]")) return;
1935
+ if (target.closest("[data-annotation-marker]")) return;
1936
+ if (target.closest("[data-annotation-popup]")) return;
1937
+ const textTags = /* @__PURE__ */ new Set([
1938
+ "P",
1939
+ "SPAN",
1940
+ "H1",
1941
+ "H2",
1942
+ "H3",
1943
+ "H4",
1944
+ "H5",
1945
+ "H6",
1946
+ "LI",
1947
+ "TD",
1948
+ "TH",
1949
+ "LABEL",
1950
+ "BLOCKQUOTE",
1951
+ "FIGCAPTION",
1952
+ "CAPTION",
1953
+ "LEGEND",
1954
+ "DT",
1955
+ "DD",
1956
+ "PRE",
1957
+ "CODE",
1958
+ "EM",
1959
+ "STRONG",
1960
+ "B",
1961
+ "I",
1962
+ "U",
1963
+ "S",
1964
+ "A",
1965
+ "TIME",
1966
+ "ADDRESS",
1967
+ "CITE",
1968
+ "Q",
1969
+ "ABBR",
1970
+ "DFN",
1971
+ "MARK",
1972
+ "SMALL",
1973
+ "SUB",
1974
+ "SUP"
1975
+ ]);
1976
+ if (textTags.has(target.tagName) || target.isContentEditable) {
1977
+ return;
1978
+ }
1979
+ mouseDownPosRef.current = { x: e.clientX, y: e.clientY };
1980
+ };
1981
+ document.addEventListener("mousedown", handleMouseDown);
1982
+ return () => document.removeEventListener("mousedown", handleMouseDown);
1983
+ }, [isActive, pendingAnnotation]);
1984
+ (0, import_react2.useEffect)(() => {
1985
+ if (!isActive || pendingAnnotation) return;
1986
+ const handleMouseMove = (e) => {
1987
+ if (!mouseDownPosRef.current) return;
1988
+ const dx = e.clientX - mouseDownPosRef.current.x;
1989
+ const dy = e.clientY - mouseDownPosRef.current.y;
1990
+ const distance = dx * dx + dy * dy;
1991
+ const thresholdSq = DRAG_THRESHOLD * DRAG_THRESHOLD;
1992
+ if (!isDragging && distance >= thresholdSq) {
1993
+ dragStartRef.current = mouseDownPosRef.current;
1994
+ setIsDragging(true);
1995
+ }
1996
+ if ((isDragging || distance >= thresholdSq) && dragStartRef.current) {
1997
+ if (dragRectRef.current) {
1998
+ const left2 = Math.min(dragStartRef.current.x, e.clientX);
1999
+ const top2 = Math.min(dragStartRef.current.y, e.clientY);
2000
+ const width = Math.abs(e.clientX - dragStartRef.current.x);
2001
+ const height = Math.abs(e.clientY - dragStartRef.current.y);
2002
+ dragRectRef.current.style.transform = `translate(${left2}px, ${top2}px)`;
2003
+ dragRectRef.current.style.width = `${width}px`;
2004
+ dragRectRef.current.style.height = `${height}px`;
2005
+ }
2006
+ const now = Date.now();
2007
+ if (now - lastElementUpdateRef.current < ELEMENT_UPDATE_THROTTLE) {
2008
+ return;
2009
+ }
2010
+ lastElementUpdateRef.current = now;
2011
+ const startX = dragStartRef.current.x;
2012
+ const startY = dragStartRef.current.y;
2013
+ const left = Math.min(startX, e.clientX);
2014
+ const top = Math.min(startY, e.clientY);
2015
+ const right = Math.max(startX, e.clientX);
2016
+ const bottom = Math.max(startY, e.clientY);
2017
+ const midX = (left + right) / 2;
2018
+ const midY = (top + bottom) / 2;
2019
+ const candidateElements = /* @__PURE__ */ new Set();
2020
+ const points = [
2021
+ [left, top],
2022
+ [right, top],
2023
+ [left, bottom],
2024
+ [right, bottom],
2025
+ [midX, midY],
2026
+ [midX, top],
2027
+ [midX, bottom],
2028
+ [left, midY],
2029
+ [right, midY]
2030
+ ];
2031
+ for (const [x, y] of points) {
2032
+ const elements = document.elementsFromPoint(x, y);
2033
+ for (const el of elements) {
2034
+ if (el instanceof HTMLElement) candidateElements.add(el);
2035
+ }
2036
+ }
2037
+ const nearbyElements = document.querySelectorAll(
2038
+ "button, a, input, img, p, h1, h2, h3, h4, h5, h6, li, label, td, th, div, span, section, article, aside, nav"
2039
+ );
2040
+ for (const el of nearbyElements) {
2041
+ if (el instanceof HTMLElement) {
2042
+ const rect = el.getBoundingClientRect();
2043
+ const centerX = rect.left + rect.width / 2;
2044
+ const centerY = rect.top + rect.height / 2;
2045
+ const centerInside = centerX >= left && centerX <= right && centerY >= top && centerY <= bottom;
2046
+ const overlapX = Math.min(rect.right, right) - Math.max(rect.left, left);
2047
+ const overlapY = Math.min(rect.bottom, bottom) - Math.max(rect.top, top);
2048
+ const overlapArea = overlapX > 0 && overlapY > 0 ? overlapX * overlapY : 0;
2049
+ const elementArea = rect.width * rect.height;
2050
+ const overlapRatio = elementArea > 0 ? overlapArea / elementArea : 0;
2051
+ if (centerInside || overlapRatio > 0.5) {
2052
+ candidateElements.add(el);
2053
+ }
2054
+ }
2055
+ }
2056
+ const allMatching = [];
2057
+ const meaningfulTags = /* @__PURE__ */ new Set([
2058
+ "BUTTON",
2059
+ "A",
2060
+ "INPUT",
2061
+ "IMG",
2062
+ "P",
2063
+ "H1",
2064
+ "H2",
2065
+ "H3",
2066
+ "H4",
2067
+ "H5",
2068
+ "H6",
2069
+ "LI",
2070
+ "LABEL",
2071
+ "TD",
2072
+ "TH",
2073
+ "SECTION",
2074
+ "ARTICLE",
2075
+ "ASIDE",
2076
+ "NAV"
2077
+ ]);
2078
+ for (const el of candidateElements) {
2079
+ if (el.closest("[data-feedback-toolbar]") || el.closest("[data-annotation-marker]"))
2080
+ continue;
2081
+ const rect = el.getBoundingClientRect();
2082
+ if (rect.width > window.innerWidth * 0.8 && rect.height > window.innerHeight * 0.5)
2083
+ continue;
2084
+ if (rect.width < 10 || rect.height < 10) continue;
2085
+ if (rect.left < right && rect.right > left && rect.top < bottom && rect.bottom > top) {
2086
+ const tagName = el.tagName;
2087
+ let shouldInclude = meaningfulTags.has(tagName);
2088
+ if (!shouldInclude && (tagName === "DIV" || tagName === "SPAN")) {
2089
+ const hasText = el.textContent && el.textContent.trim().length > 0;
2090
+ const isInteractive = el.onclick !== null || el.getAttribute("role") === "button" || el.getAttribute("role") === "link" || el.classList.contains("clickable") || el.hasAttribute("data-clickable");
2091
+ if ((hasText || isInteractive) && !el.querySelector("p, h1, h2, h3, h4, h5, h6, button, a")) {
2092
+ shouldInclude = true;
2093
+ }
2094
+ }
2095
+ if (shouldInclude) {
2096
+ let dominated = false;
2097
+ for (const existingRect of allMatching) {
2098
+ if (existingRect.left <= rect.left && existingRect.right >= rect.right && existingRect.top <= rect.top && existingRect.bottom >= rect.bottom) {
2099
+ dominated = true;
2100
+ break;
2101
+ }
2102
+ }
2103
+ if (!dominated) allMatching.push(rect);
2104
+ }
2105
+ }
2106
+ }
2107
+ if (highlightsContainerRef.current) {
2108
+ const container = highlightsContainerRef.current;
2109
+ while (container.children.length > allMatching.length) {
2110
+ container.removeChild(container.lastChild);
2111
+ }
2112
+ allMatching.forEach((rect, i) => {
2113
+ let div = container.children[i];
2114
+ if (!div) {
2115
+ div = document.createElement("div");
2116
+ div.className = styles_module_default2.selectedElementHighlight;
2117
+ container.appendChild(div);
2118
+ }
2119
+ div.style.transform = `translate(${rect.left}px, ${rect.top}px)`;
2120
+ div.style.width = `${rect.width}px`;
2121
+ div.style.height = `${rect.height}px`;
2122
+ });
2123
+ }
2124
+ }
2125
+ };
2126
+ document.addEventListener("mousemove", handleMouseMove, { passive: true });
2127
+ return () => document.removeEventListener("mousemove", handleMouseMove);
2128
+ }, [isActive, pendingAnnotation, isDragging, DRAG_THRESHOLD]);
2129
+ (0, import_react2.useEffect)(() => {
2130
+ if (!isActive) return;
2131
+ const handleMouseUp = (e) => {
2132
+ const wasDragging = isDragging;
2133
+ const dragStart = dragStartRef.current;
2134
+ if (isDragging && dragStart) {
2135
+ justFinishedDragRef.current = true;
2136
+ const left = Math.min(dragStart.x, e.clientX);
2137
+ const top = Math.min(dragStart.y, e.clientY);
2138
+ const right = Math.max(dragStart.x, e.clientX);
2139
+ const bottom = Math.max(dragStart.y, e.clientY);
2140
+ const allMatching = [];
2141
+ const selector = "button, a, input, img, p, h1, h2, h3, h4, h5, h6, li, label, td, th";
2142
+ document.querySelectorAll(selector).forEach((el) => {
2143
+ if (!(el instanceof HTMLElement)) return;
2144
+ if (el.closest("[data-feedback-toolbar]") || el.closest("[data-annotation-marker]"))
2145
+ return;
2146
+ const rect = el.getBoundingClientRect();
2147
+ if (rect.width > window.innerWidth * 0.8 && rect.height > window.innerHeight * 0.5)
2148
+ return;
2149
+ if (rect.width < 10 || rect.height < 10) return;
2150
+ if (rect.left < right && rect.right > left && rect.top < bottom && rect.bottom > top) {
2151
+ allMatching.push({ element: el, rect });
2152
+ }
2153
+ });
2154
+ const finalElements = allMatching.filter(
2155
+ ({ element: el }) => !allMatching.some(
2156
+ ({ element: other }) => other !== el && el.contains(other)
2157
+ )
2158
+ );
2159
+ const x = e.clientX / window.innerWidth * 100;
2160
+ const y = e.clientY + window.scrollY;
2161
+ if (finalElements.length > 0) {
2162
+ const bounds = finalElements.reduce(
2163
+ (acc, { rect }) => ({
2164
+ left: Math.min(acc.left, rect.left),
2165
+ top: Math.min(acc.top, rect.top),
2166
+ right: Math.max(acc.right, rect.right),
2167
+ bottom: Math.max(acc.bottom, rect.bottom)
2168
+ }),
2169
+ {
2170
+ left: Infinity,
2171
+ top: Infinity,
2172
+ right: -Infinity,
2173
+ bottom: -Infinity
2174
+ }
2175
+ );
2176
+ const elementNames = finalElements.slice(0, 5).map(({ element }) => identifyElement(element).name).join(", ");
2177
+ const suffix = finalElements.length > 5 ? ` +${finalElements.length - 5} more` : "";
2178
+ const firstElement = finalElements[0].element;
2179
+ const firstElementComputedStyles = getDetailedComputedStyles(firstElement);
2180
+ const firstElementComputedStylesStr = Object.entries(
2181
+ firstElementComputedStyles
2182
+ ).map(([k, v]) => `${k}: ${v}`).join("; ");
2183
+ setPendingAnnotation({
2184
+ x,
2185
+ y,
2186
+ clientY: e.clientY,
2187
+ element: `${finalElements.length} elements: ${elementNames}${suffix}`,
2188
+ elementPath: "multi-select",
2189
+ boundingBox: {
2190
+ x: bounds.left,
2191
+ y: bounds.top + window.scrollY,
2192
+ width: bounds.right - bounds.left,
2193
+ height: bounds.bottom - bounds.top
2194
+ },
2195
+ isMultiSelect: true,
2196
+ // Forensic data from first element
2197
+ fullPath: getFullElementPath(firstElement),
2198
+ accessibility: getAccessibilityInfo(firstElement),
2199
+ computedStyles: firstElementComputedStylesStr,
2200
+ nearbyElements: getNearbyElements(firstElement),
2201
+ cssClasses: getElementClasses(firstElement),
2202
+ nearbyText: getNearbyText(firstElement)
2203
+ });
2204
+ } else {
2205
+ const width = Math.abs(right - left);
2206
+ const height = Math.abs(bottom - top);
2207
+ if (width > 20 && height > 20) {
2208
+ setPendingAnnotation({
2209
+ x,
2210
+ y,
2211
+ clientY: e.clientY,
2212
+ element: "Area selection",
2213
+ elementPath: `region at (${Math.round(left)}, ${Math.round(top)})`,
2214
+ boundingBox: {
2215
+ x: left,
2216
+ y: top + window.scrollY,
2217
+ width,
2218
+ height
2219
+ },
2220
+ isMultiSelect: true
2221
+ });
2222
+ }
2223
+ }
2224
+ setHoverInfo(null);
2225
+ } else if (wasDragging) {
2226
+ justFinishedDragRef.current = true;
2227
+ }
2228
+ mouseDownPosRef.current = null;
2229
+ dragStartRef.current = null;
2230
+ setIsDragging(false);
2231
+ if (highlightsContainerRef.current) {
2232
+ highlightsContainerRef.current.innerHTML = "";
2233
+ }
2234
+ };
2235
+ document.addEventListener("mouseup", handleMouseUp);
2236
+ return () => document.removeEventListener("mouseup", handleMouseUp);
2237
+ }, [isActive, isDragging]);
2238
+ const addAnnotation = (0, import_react2.useCallback)(
2239
+ (comment) => {
2240
+ if (!pendingAnnotation) return;
2241
+ const newAnnotation = {
2242
+ id: Date.now().toString(),
2243
+ x: pendingAnnotation.x,
2244
+ y: pendingAnnotation.y,
2245
+ comment,
2246
+ element: pendingAnnotation.element,
2247
+ elementPath: pendingAnnotation.elementPath,
2248
+ timestamp: Date.now(),
2249
+ selectedText: pendingAnnotation.selectedText,
2250
+ boundingBox: pendingAnnotation.boundingBox,
2251
+ nearbyText: pendingAnnotation.nearbyText,
2252
+ cssClasses: pendingAnnotation.cssClasses,
2253
+ isMultiSelect: pendingAnnotation.isMultiSelect,
2254
+ isFixed: pendingAnnotation.isFixed,
2255
+ fullPath: pendingAnnotation.fullPath,
2256
+ accessibility: pendingAnnotation.accessibility,
2257
+ computedStyles: pendingAnnotation.computedStyles,
2258
+ nearbyElements: pendingAnnotation.nearbyElements
2259
+ };
2260
+ setAnnotations((prev) => [...prev, newAnnotation]);
2261
+ recentlyAddedIdRef.current = newAnnotation.id;
2262
+ setTimeout(() => {
2263
+ recentlyAddedIdRef.current = null;
2264
+ }, 300);
2265
+ setTimeout(() => {
2266
+ setAnimatedMarkers((prev) => new Set(prev).add(newAnnotation.id));
2267
+ }, 250);
2268
+ setPendingExiting(true);
2269
+ setTimeout(() => {
2270
+ setPendingAnnotation(null);
2271
+ setPendingExiting(false);
2272
+ }, 150);
2273
+ window.getSelection()?.removeAllRanges();
2274
+ },
2275
+ [pendingAnnotation]
2276
+ );
2277
+ const cancelAnnotation = (0, import_react2.useCallback)(() => {
2278
+ setPendingExiting(true);
2279
+ setTimeout(() => {
2280
+ setPendingAnnotation(null);
2281
+ setPendingExiting(false);
2282
+ }, 150);
2283
+ }, []);
2284
+ const deleteAnnotation = (0, import_react2.useCallback)(
2285
+ (id) => {
2286
+ const deletedIndex = annotations.findIndex((a) => a.id === id);
2287
+ setDeletingMarkerId(id);
2288
+ setExitingMarkers((prev) => new Set(prev).add(id));
2289
+ setTimeout(() => {
2290
+ setAnnotations((prev) => prev.filter((a) => a.id !== id));
2291
+ setExitingMarkers((prev) => {
2292
+ const next = new Set(prev);
2293
+ next.delete(id);
2294
+ return next;
2295
+ });
2296
+ setDeletingMarkerId(null);
2297
+ if (deletedIndex < annotations.length - 1) {
2298
+ setRenumberFrom(deletedIndex);
2299
+ setTimeout(() => setRenumberFrom(null), 200);
2300
+ }
2301
+ }, 150);
2302
+ },
2303
+ [annotations]
2304
+ );
2305
+ const startEditAnnotation = (0, import_react2.useCallback)((annotation) => {
2306
+ setEditingAnnotation(annotation);
2307
+ setHoveredMarkerId(null);
2308
+ }, []);
2309
+ const updateAnnotation = (0, import_react2.useCallback)(
2310
+ (newComment) => {
2311
+ if (!editingAnnotation) return;
2312
+ setAnnotations(
2313
+ (prev) => prev.map(
2314
+ (a) => a.id === editingAnnotation.id ? { ...a, comment: newComment } : a
2315
+ )
2316
+ );
2317
+ setEditExiting(true);
2318
+ setTimeout(() => {
2319
+ setEditingAnnotation(null);
2320
+ setEditExiting(false);
2321
+ }, 150);
2322
+ },
2323
+ [editingAnnotation]
2324
+ );
2325
+ const cancelEditAnnotation = (0, import_react2.useCallback)(() => {
2326
+ setEditExiting(true);
2327
+ setTimeout(() => {
2328
+ setEditingAnnotation(null);
2329
+ setEditExiting(false);
2330
+ }, 150);
2331
+ }, []);
2332
+ const clearAll = (0, import_react2.useCallback)(() => {
2333
+ const count = annotations.length;
2334
+ if (count === 0) return;
2335
+ setIsClearing(true);
2336
+ setCleared(true);
2337
+ const totalAnimationTime = count * 30 + 200;
2338
+ setTimeout(() => {
2339
+ setAnnotations([]);
2340
+ setAnimatedMarkers(/* @__PURE__ */ new Set());
2341
+ localStorage.removeItem(getStorageKey(pathname));
2342
+ setIsClearing(false);
2343
+ }, totalAnimationTime);
2344
+ setTimeout(() => setCleared(false), 1500);
2345
+ }, [pathname, annotations.length]);
2346
+ const copyOutput = (0, import_react2.useCallback)(async () => {
2347
+ const output = generateOutput(annotations, pathname, settings.outputDetail);
2348
+ if (!output) return;
2349
+ await navigator.clipboard.writeText(output);
2350
+ setCopied(true);
2351
+ setTimeout(() => setCopied(false), 2e3);
2352
+ if (settings.autoClearAfterCopy) {
2353
+ setTimeout(() => clearAll(), 500);
2354
+ }
2355
+ }, [
2356
+ annotations,
2357
+ pathname,
2358
+ settings.outputDetail,
2359
+ settings.autoClearAfterCopy,
2360
+ clearAll
2361
+ ]);
2362
+ (0, import_react2.useEffect)(() => {
2363
+ if (!dragStartPos) return;
2364
+ const DRAG_THRESHOLD2 = 5;
2365
+ const handleMouseMove = (e) => {
2366
+ const deltaX = e.clientX - dragStartPos.x;
2367
+ const deltaY = e.clientY - dragStartPos.y;
2368
+ const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
2369
+ if (!isDraggingToolbar && distance > DRAG_THRESHOLD2) {
2370
+ setIsDraggingToolbar(true);
2371
+ }
2372
+ if (isDraggingToolbar || distance > DRAG_THRESHOLD2) {
2373
+ let newX = dragStartPos.toolbarX + deltaX;
2374
+ let newY = dragStartPos.toolbarY + deltaY;
2375
+ const padding = 20;
2376
+ const containerWidth = 257;
2377
+ const circleWidth = 44;
2378
+ const toolbarHeight = 44;
2379
+ if (isActive) {
2380
+ newX = Math.max(
2381
+ padding,
2382
+ Math.min(window.innerWidth - containerWidth - padding, newX)
2383
+ );
2384
+ } else {
2385
+ const circleOffset = containerWidth - circleWidth;
2386
+ const minX = padding - circleOffset;
2387
+ const maxX = window.innerWidth - padding - circleOffset - circleWidth;
2388
+ newX = Math.max(minX, Math.min(maxX, newX));
2389
+ }
2390
+ newY = Math.max(
2391
+ padding,
2392
+ Math.min(window.innerHeight - toolbarHeight - padding, newY)
2393
+ );
2394
+ setToolbarPosition({ x: newX, y: newY });
2395
+ }
2396
+ };
2397
+ const handleMouseUp = () => {
2398
+ if (isDraggingToolbar) {
2399
+ justFinishedToolbarDragRef.current = true;
2400
+ setTimeout(() => {
2401
+ justFinishedToolbarDragRef.current = false;
2402
+ }, 50);
2403
+ }
2404
+ setIsDraggingToolbar(false);
2405
+ setDragStartPos(null);
2406
+ };
2407
+ document.addEventListener("mousemove", handleMouseMove);
2408
+ document.addEventListener("mouseup", handleMouseUp);
2409
+ return () => {
2410
+ document.removeEventListener("mousemove", handleMouseMove);
2411
+ document.removeEventListener("mouseup", handleMouseUp);
2412
+ };
2413
+ }, [dragStartPos, isDraggingToolbar, isActive]);
2414
+ const handleToolbarMouseDown = (0, import_react2.useCallback)(
2415
+ (e) => {
2416
+ if (e.target.closest("button") || e.target.closest(`.${styles_module_default2.settingsPanel}`)) {
2417
+ return;
2418
+ }
2419
+ const toolbarParent = e.currentTarget.parentElement;
2420
+ if (!toolbarParent) return;
2421
+ const rect = toolbarParent.getBoundingClientRect();
2422
+ const currentX = toolbarPosition?.x ?? rect.left;
2423
+ const currentY = toolbarPosition?.y ?? rect.top;
2424
+ const randomRotation = (Math.random() - 0.5) * 10;
2425
+ setDragRotation(randomRotation);
2426
+ setDragStartPos({
2427
+ x: e.clientX,
2428
+ y: e.clientY,
2429
+ toolbarX: currentX,
2430
+ toolbarY: currentY
2431
+ });
2432
+ },
2433
+ [toolbarPosition]
2434
+ );
2435
+ (0, import_react2.useEffect)(() => {
2436
+ if (!toolbarPosition) return;
2437
+ const constrainPosition = () => {
2438
+ const padding = 20;
2439
+ const containerWidth = 257;
2440
+ const circleWidth = 44;
2441
+ const toolbarHeight = 44;
2442
+ let newX = toolbarPosition.x;
2443
+ let newY = toolbarPosition.y;
2444
+ if (isActive) {
2445
+ newX = Math.max(
2446
+ padding,
2447
+ Math.min(window.innerWidth - containerWidth - padding, newX)
2448
+ );
2449
+ } else {
2450
+ const circleOffset = containerWidth - circleWidth;
2451
+ const minX = padding - circleOffset;
2452
+ const maxX = window.innerWidth - padding - circleOffset - circleWidth;
2453
+ newX = Math.max(minX, Math.min(maxX, newX));
2454
+ }
2455
+ newY = Math.max(
2456
+ padding,
2457
+ Math.min(window.innerHeight - toolbarHeight - padding, newY)
2458
+ );
2459
+ if (newX !== toolbarPosition.x || newY !== toolbarPosition.y) {
2460
+ setToolbarPosition({ x: newX, y: newY });
2461
+ }
2462
+ };
2463
+ constrainPosition();
2464
+ window.addEventListener("resize", constrainPosition);
2465
+ return () => window.removeEventListener("resize", constrainPosition);
2466
+ }, [toolbarPosition, isActive]);
2467
+ (0, import_react2.useEffect)(() => {
2468
+ const handleKeyDown = (e) => {
2469
+ if (e.key === "Escape") {
2470
+ if (pendingAnnotation) {
2471
+ } else if (isActive) {
2472
+ setIsActive(false);
2473
+ }
2474
+ }
2475
+ };
2476
+ document.addEventListener("keydown", handleKeyDown);
2477
+ return () => document.removeEventListener("keydown", handleKeyDown);
2478
+ }, [isActive, pendingAnnotation]);
2479
+ if (!mounted) return null;
2480
+ const hasAnnotations = annotations.length > 0;
2481
+ const visibleAnnotations = annotations.filter(
2482
+ (a) => !exitingMarkers.has(a.id)
2483
+ );
2484
+ const exitingAnnotationsList = annotations.filter(
2485
+ (a) => exitingMarkers.has(a.id)
2486
+ );
2487
+ const getTooltipPosition = (annotation) => {
2488
+ const tooltipMaxWidth = 200;
2489
+ const tooltipEstimatedHeight = 80;
2490
+ const markerSize = 22;
2491
+ const gap = 10;
2492
+ const markerX = annotation.x / 100 * window.innerWidth;
2493
+ const markerY = typeof annotation.y === "string" ? parseFloat(annotation.y) : annotation.y;
2494
+ const styles = {};
2495
+ const spaceBelow = window.innerHeight - markerY - markerSize - gap;
2496
+ if (spaceBelow < tooltipEstimatedHeight) {
2497
+ styles.top = "auto";
2498
+ styles.bottom = `calc(100% + ${gap}px)`;
2499
+ }
2500
+ const centerX = markerX - tooltipMaxWidth / 2;
2501
+ const edgePadding = 10;
2502
+ if (centerX < edgePadding) {
2503
+ const offset = edgePadding - centerX;
2504
+ styles.left = `calc(50% + ${offset}px)`;
2505
+ } else if (centerX + tooltipMaxWidth > window.innerWidth - edgePadding) {
2506
+ const overflow = centerX + tooltipMaxWidth - (window.innerWidth - edgePadding);
2507
+ styles.left = `calc(50% - ${overflow}px)`;
2508
+ }
2509
+ return styles;
2510
+ };
2511
+ return (0, import_react_dom.createPortal)(
2512
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
2513
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2514
+ "div",
2515
+ {
2516
+ className: styles_module_default2.toolbar,
2517
+ "data-feedback-toolbar": true,
2518
+ style: toolbarPosition ? {
2519
+ left: toolbarPosition.x,
2520
+ top: toolbarPosition.y,
2521
+ right: "auto",
2522
+ bottom: "auto"
2523
+ } : void 0,
2524
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2525
+ "div",
2526
+ {
2527
+ className: `${styles_module_default2.toolbarContainer} ${!isDarkMode ? styles_module_default2.light : ""} ${isActive ? styles_module_default2.expanded : styles_module_default2.collapsed} ${showEntranceAnimation ? styles_module_default2.entrance : ""} ${isDraggingToolbar ? styles_module_default2.dragging : ""}`,
2528
+ onClick: !isActive ? (e) => {
2529
+ if (justFinishedToolbarDragRef.current) {
2530
+ e.preventDefault();
2531
+ return;
2532
+ }
2533
+ setIsActive(true);
2534
+ } : void 0,
2535
+ onMouseDown: handleToolbarMouseDown,
2536
+ role: !isActive ? "button" : void 0,
2537
+ tabIndex: !isActive ? 0 : -1,
2538
+ title: !isActive ? "Start feedback mode" : void 0,
2539
+ style: isDraggingToolbar ? {
2540
+ transform: `scale(1.05) rotate(${dragRotation}deg)`,
2541
+ cursor: "grabbing"
2542
+ } : void 0,
2543
+ children: [
2544
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2545
+ "div",
2546
+ {
2547
+ className: `${styles_module_default2.toggleContent} ${!isActive ? styles_module_default2.visible : styles_module_default2.hidden}`,
2548
+ children: [
2549
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconListSparkle, { size: 24 }),
2550
+ hasAnnotations && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2551
+ "span",
2552
+ {
2553
+ className: `${styles_module_default2.badge} ${isActive ? styles_module_default2.fadeOut : ""} ${showEntranceAnimation ? styles_module_default2.entrance : ""}`,
2554
+ style: { backgroundColor: settings.annotationColor },
2555
+ children: annotations.length
2556
+ }
2557
+ )
2558
+ ]
2559
+ }
2560
+ ),
2561
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2562
+ "div",
2563
+ {
2564
+ className: `${styles_module_default2.controlsContent} ${isActive ? styles_module_default2.visible : styles_module_default2.hidden}`,
2565
+ children: [
2566
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2567
+ "button",
2568
+ {
2569
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2570
+ onClick: (e) => {
2571
+ e.stopPropagation();
2572
+ toggleFreeze();
2573
+ },
2574
+ title: isFrozen ? "Resume animations" : "Pause animations",
2575
+ "data-active": isFrozen,
2576
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconPausePlayAnimated, { size: 24, isPaused: isFrozen })
2577
+ }
2578
+ ),
2579
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2580
+ "button",
2581
+ {
2582
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2583
+ onClick: (e) => {
2584
+ e.stopPropagation();
2585
+ setShowMarkers(!showMarkers);
2586
+ },
2587
+ disabled: !hasAnnotations,
2588
+ title: showMarkers ? "Hide markers" : "Show markers",
2589
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconEyeAnimated, { size: 24, isOpen: showMarkers })
2590
+ }
2591
+ ),
2592
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2593
+ "button",
2594
+ {
2595
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2596
+ onClick: (e) => {
2597
+ e.stopPropagation();
2598
+ copyOutput();
2599
+ },
2600
+ disabled: !hasAnnotations,
2601
+ title: "Copy feedback",
2602
+ "data-active": copied,
2603
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconCopyAnimated, { size: 24, copied })
2604
+ }
2605
+ ),
2606
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2607
+ "button",
2608
+ {
2609
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2610
+ onClick: (e) => {
2611
+ e.stopPropagation();
2612
+ clearAll();
2613
+ },
2614
+ disabled: !hasAnnotations,
2615
+ title: "Clear all",
2616
+ "data-danger": true,
2617
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconTrashAlt, { size: 24 })
2618
+ }
2619
+ ),
2620
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2621
+ "button",
2622
+ {
2623
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2624
+ onClick: (e) => {
2625
+ e.stopPropagation();
2626
+ setShowSettings(!showSettings);
2627
+ },
2628
+ title: "Settings",
2629
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconGear, { size: 24 })
2630
+ }
2631
+ ),
2632
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2633
+ "div",
2634
+ {
2635
+ className: `${styles_module_default2.divider} ${!isDarkMode ? styles_module_default2.light : ""}`
2636
+ }
2637
+ ),
2638
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2639
+ "button",
2640
+ {
2641
+ className: `${styles_module_default2.controlButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2642
+ onClick: (e) => {
2643
+ e.stopPropagation();
2644
+ setIsActive(false);
2645
+ },
2646
+ title: "Exit feedback mode",
2647
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconXmarkLarge, { size: 24 })
2648
+ }
2649
+ )
2650
+ ]
2651
+ }
2652
+ ),
2653
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2654
+ "div",
2655
+ {
2656
+ className: `${styles_module_default2.settingsPanel} ${isDarkMode ? styles_module_default2.dark : styles_module_default2.light} ${showSettingsVisible ? styles_module_default2.enter : styles_module_default2.exit}`,
2657
+ onClick: (e) => e.stopPropagation(),
2658
+ style: toolbarPosition && toolbarPosition.y < 230 ? {
2659
+ bottom: "auto",
2660
+ top: "calc(100% + 0.5rem)"
2661
+ } : void 0,
2662
+ children: [
2663
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.settingsHeader, children: [
2664
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles_module_default2.settingsBrand, children: [
2665
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2666
+ "span",
2667
+ {
2668
+ className: styles_module_default2.settingsBrandSlash,
2669
+ style: {
2670
+ color: settings.annotationColor,
2671
+ transition: "color 0.2s ease"
2672
+ },
2673
+ children: "/"
2674
+ }
2675
+ ),
2676
+ "agentation"
2677
+ ] }),
2678
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles_module_default2.settingsVersion, children: [
2679
+ "v",
2680
+ "0.1.0"
2681
+ ] }),
2682
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2683
+ "button",
2684
+ {
2685
+ className: styles_module_default2.themeToggle,
2686
+ onClick: () => setIsDarkMode(!isDarkMode),
2687
+ title: isDarkMode ? "Switch to light mode" : "Switch to dark mode",
2688
+ children: isDarkMode ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconSun, { size: 14 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconMoon, { size: 14 })
2689
+ }
2690
+ )
2691
+ ] }),
2692
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: styles_module_default2.settingsSection, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.settingsRow, children: [
2693
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2694
+ "div",
2695
+ {
2696
+ className: `${styles_module_default2.settingsLabel} ${!isDarkMode ? styles_module_default2.light : ""}`,
2697
+ children: [
2698
+ "Output Detail",
2699
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2700
+ "span",
2701
+ {
2702
+ className: styles_module_default2.helpIcon,
2703
+ "data-tooltip": "Controls how much detail is included in the copied output",
2704
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconHelp, { size: 20 })
2705
+ }
2706
+ )
2707
+ ]
2708
+ }
2709
+ ),
2710
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2711
+ "button",
2712
+ {
2713
+ className: `${styles_module_default2.cycleButton} ${!isDarkMode ? styles_module_default2.light : ""}`,
2714
+ onClick: () => {
2715
+ const currentIndex = OUTPUT_DETAIL_OPTIONS.findIndex(
2716
+ (opt) => opt.value === settings.outputDetail
2717
+ );
2718
+ const nextIndex = (currentIndex + 1) % OUTPUT_DETAIL_OPTIONS.length;
2719
+ setSettings((s) => ({
2720
+ ...s,
2721
+ outputDetail: OUTPUT_DETAIL_OPTIONS[nextIndex].value
2722
+ }));
2723
+ },
2724
+ children: [
2725
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2726
+ "span",
2727
+ {
2728
+ className: styles_module_default2.cycleButtonText,
2729
+ children: OUTPUT_DETAIL_OPTIONS.find(
2730
+ (opt) => opt.value === settings.outputDetail
2731
+ )?.label
2732
+ },
2733
+ settings.outputDetail
2734
+ ),
2735
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles_module_default2.cycleDots, children: OUTPUT_DETAIL_OPTIONS.map((option, i) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2736
+ "span",
2737
+ {
2738
+ className: `${styles_module_default2.cycleDot} ${!isDarkMode ? styles_module_default2.light : ""} ${settings.outputDetail === option.value ? styles_module_default2.active : ""}`
2739
+ },
2740
+ option.value
2741
+ )) })
2742
+ ]
2743
+ }
2744
+ )
2745
+ ] }) }),
2746
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.settingsSection, children: [
2747
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2748
+ "div",
2749
+ {
2750
+ className: `${styles_module_default2.settingsLabel} ${styles_module_default2.settingsLabelMarker} ${!isDarkMode ? styles_module_default2.light : ""}`,
2751
+ children: "Marker Colour"
2752
+ }
2753
+ ),
2754
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: styles_module_default2.colorOptions, children: COLOR_OPTIONS.map((color) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2755
+ "div",
2756
+ {
2757
+ onClick: () => setSettings((s) => ({
2758
+ ...s,
2759
+ annotationColor: color.value
2760
+ })),
2761
+ style: {
2762
+ borderColor: settings.annotationColor === color.value ? color.value : "transparent"
2763
+ },
2764
+ className: `${styles_module_default2.colorOptionRing} ${settings.annotationColor === color.value ? styles_module_default2.selected : ""}`,
2765
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2766
+ "div",
2767
+ {
2768
+ className: `${styles_module_default2.colorOption} ${settings.annotationColor === color.value ? styles_module_default2.selected : ""}`,
2769
+ style: { backgroundColor: color.value },
2770
+ title: color.label
2771
+ },
2772
+ color.value
2773
+ )
2774
+ }
2775
+ )) })
2776
+ ] }),
2777
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.settingsSection, children: [
2778
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: styles_module_default2.settingsToggle, children: [
2779
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2780
+ "input",
2781
+ {
2782
+ type: "checkbox",
2783
+ id: "autoClearAfterCopy",
2784
+ checked: settings.autoClearAfterCopy,
2785
+ onChange: (e) => setSettings((s) => ({
2786
+ ...s,
2787
+ autoClearAfterCopy: e.target.checked
2788
+ }))
2789
+ }
2790
+ ),
2791
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2792
+ "label",
2793
+ {
2794
+ className: `${styles_module_default2.customCheckbox} ${settings.autoClearAfterCopy ? styles_module_default2.checked : ""}`,
2795
+ htmlFor: "autoClearAfterCopy",
2796
+ children: settings.autoClearAfterCopy && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconCheckSmallAnimated, { size: 14 })
2797
+ }
2798
+ ),
2799
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2800
+ "span",
2801
+ {
2802
+ className: `${styles_module_default2.toggleLabel} ${!isDarkMode ? styles_module_default2.light : ""}`,
2803
+ children: [
2804
+ "Clear after output",
2805
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2806
+ "span",
2807
+ {
2808
+ className: styles_module_default2.helpIcon,
2809
+ "data-tooltip": "Automatically clear annotations after copying",
2810
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconHelp, { size: 20 })
2811
+ }
2812
+ )
2813
+ ]
2814
+ }
2815
+ )
2816
+ ] }),
2817
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("label", { className: styles_module_default2.settingsToggle, children: [
2818
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2819
+ "input",
2820
+ {
2821
+ type: "checkbox",
2822
+ id: "blockInteractions",
2823
+ checked: settings.blockInteractions,
2824
+ onChange: (e) => setSettings((s) => ({
2825
+ ...s,
2826
+ blockInteractions: e.target.checked
2827
+ }))
2828
+ }
2829
+ ),
2830
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2831
+ "label",
2832
+ {
2833
+ className: `${styles_module_default2.customCheckbox} ${settings.blockInteractions ? styles_module_default2.checked : ""}`,
2834
+ htmlFor: "blockInteractions",
2835
+ children: settings.blockInteractions && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconCheckSmallAnimated, { size: 14 })
2836
+ }
2837
+ ),
2838
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2839
+ "span",
2840
+ {
2841
+ className: `${styles_module_default2.toggleLabel} ${!isDarkMode ? styles_module_default2.light : ""}`,
2842
+ children: "Block page interactions"
2843
+ }
2844
+ )
2845
+ ] })
2846
+ ] })
2847
+ ]
2848
+ }
2849
+ )
2850
+ ]
2851
+ }
2852
+ )
2853
+ }
2854
+ ),
2855
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.markersLayer, "data-feedback-toolbar": true, children: [
2856
+ markersVisible && visibleAnnotations.filter((a) => !a.isFixed).map((annotation, index) => {
2857
+ const isHovered = !markersExiting && hoveredMarkerId === annotation.id;
2858
+ const isDeleting = deletingMarkerId === annotation.id;
2859
+ const showDeleteState = isHovered || isDeleting;
2860
+ const isMulti = annotation.isMultiSelect;
2861
+ const markerColor = isMulti ? "#34C759" : settings.annotationColor;
2862
+ const globalIndex = annotations.findIndex(
2863
+ (a) => a.id === annotation.id
2864
+ );
2865
+ const needsEnterAnimation = !animatedMarkers.has(annotation.id);
2866
+ const animClass = markersExiting ? styles_module_default2.exit : isClearing ? styles_module_default2.clearing : needsEnterAnimation ? styles_module_default2.enter : "";
2867
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2868
+ "div",
2869
+ {
2870
+ className: `${styles_module_default2.marker} ${showDeleteState ? styles_module_default2.hovered : ""} ${isMulti ? styles_module_default2.multiSelect : ""} ${animClass}`,
2871
+ "data-annotation-marker": true,
2872
+ style: {
2873
+ left: `${annotation.x}%`,
2874
+ top: annotation.y,
2875
+ backgroundColor: showDeleteState ? void 0 : markerColor,
2876
+ animationDelay: markersExiting ? `${(visibleAnnotations.length - 1 - index) * 20}ms` : `${index * 20}ms`
2877
+ },
2878
+ onMouseEnter: () => !markersExiting && annotation.id !== recentlyAddedIdRef.current && setHoveredMarkerId(annotation.id),
2879
+ onMouseLeave: () => setHoveredMarkerId(null),
2880
+ onClick: (e) => {
2881
+ e.stopPropagation();
2882
+ if (!markersExiting) deleteAnnotation(annotation.id);
2883
+ },
2884
+ onContextMenu: (e) => {
2885
+ e.preventDefault();
2886
+ e.stopPropagation();
2887
+ if (!markersExiting) startEditAnnotation(annotation);
2888
+ },
2889
+ children: [
2890
+ showDeleteState ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconXmark, { size: isMulti ? 18 : 16 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2891
+ "span",
2892
+ {
2893
+ className: renumberFrom !== null && globalIndex >= renumberFrom ? styles_module_default2.renumber : void 0,
2894
+ children: globalIndex + 1
2895
+ }
2896
+ ),
2897
+ isHovered && !editingAnnotation && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2898
+ "div",
2899
+ {
2900
+ className: `${styles_module_default2.markerTooltip} ${!isDarkMode ? styles_module_default2.light : ""} ${styles_module_default2.enter}`,
2901
+ style: getTooltipPosition(annotation),
2902
+ children: [
2903
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles_module_default2.markerQuote, children: [
2904
+ annotation.element,
2905
+ annotation.selectedText && ` "${annotation.selectedText.slice(0, 30)}${annotation.selectedText.length > 30 ? "..." : ""}"`
2906
+ ] }),
2907
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles_module_default2.markerNote, children: annotation.comment })
2908
+ ]
2909
+ }
2910
+ )
2911
+ ]
2912
+ },
2913
+ annotation.id
2914
+ );
2915
+ }),
2916
+ markersVisible && !markersExiting && exitingAnnotationsList.filter((a) => !a.isFixed).map((annotation) => {
2917
+ const isMulti = annotation.isMultiSelect;
2918
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2919
+ "div",
2920
+ {
2921
+ className: `${styles_module_default2.marker} ${styles_module_default2.hovered} ${isMulti ? styles_module_default2.multiSelect : ""} ${styles_module_default2.exit}`,
2922
+ "data-annotation-marker": true,
2923
+ style: {
2924
+ left: `${annotation.x}%`,
2925
+ top: annotation.y
2926
+ },
2927
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconXmark, { size: isMulti ? 12 : 10 })
2928
+ },
2929
+ annotation.id
2930
+ );
2931
+ })
2932
+ ] }),
2933
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles_module_default2.fixedMarkersLayer, "data-feedback-toolbar": true, children: [
2934
+ markersVisible && visibleAnnotations.filter((a) => a.isFixed).map((annotation, index) => {
2935
+ const fixedAnnotations = visibleAnnotations.filter(
2936
+ (a) => a.isFixed
2937
+ );
2938
+ const isHovered = !markersExiting && hoveredMarkerId === annotation.id;
2939
+ const isDeleting = deletingMarkerId === annotation.id;
2940
+ const showDeleteState = isHovered || isDeleting;
2941
+ const isMulti = annotation.isMultiSelect;
2942
+ const markerColor = isMulti ? "#34C759" : settings.annotationColor;
2943
+ const globalIndex = annotations.findIndex(
2944
+ (a) => a.id === annotation.id
2945
+ );
2946
+ const needsEnterAnimation = !animatedMarkers.has(annotation.id);
2947
+ const animClass = markersExiting ? styles_module_default2.exit : isClearing ? styles_module_default2.clearing : needsEnterAnimation ? styles_module_default2.enter : "";
2948
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2949
+ "div",
2950
+ {
2951
+ className: `${styles_module_default2.marker} ${styles_module_default2.fixed} ${showDeleteState ? styles_module_default2.hovered : ""} ${isMulti ? styles_module_default2.multiSelect : ""} ${animClass}`,
2952
+ "data-annotation-marker": true,
2953
+ style: {
2954
+ left: `${annotation.x}%`,
2955
+ top: annotation.y,
2956
+ backgroundColor: showDeleteState ? void 0 : markerColor,
2957
+ animationDelay: markersExiting ? `${(fixedAnnotations.length - 1 - index) * 20}ms` : `${index * 20}ms`
2958
+ },
2959
+ onMouseEnter: () => !markersExiting && annotation.id !== recentlyAddedIdRef.current && setHoveredMarkerId(annotation.id),
2960
+ onMouseLeave: () => setHoveredMarkerId(null),
2961
+ onClick: (e) => {
2962
+ e.stopPropagation();
2963
+ if (!markersExiting) deleteAnnotation(annotation.id);
2964
+ },
2965
+ onContextMenu: (e) => {
2966
+ e.preventDefault();
2967
+ e.stopPropagation();
2968
+ if (!markersExiting) startEditAnnotation(annotation);
2969
+ },
2970
+ children: [
2971
+ showDeleteState ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconClose, { size: isMulti ? 12 : 10 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
2972
+ "span",
2973
+ {
2974
+ className: renumberFrom !== null && globalIndex >= renumberFrom ? styles_module_default2.renumber : void 0,
2975
+ children: globalIndex + 1
2976
+ }
2977
+ ),
2978
+ isHovered && !editingAnnotation && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
2979
+ "div",
2980
+ {
2981
+ className: `${styles_module_default2.markerTooltip} ${!isDarkMode ? styles_module_default2.light : ""} ${styles_module_default2.enter}`,
2982
+ style: getTooltipPosition(annotation),
2983
+ children: [
2984
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: styles_module_default2.markerQuote, children: [
2985
+ annotation.element,
2986
+ annotation.selectedText && ` "${annotation.selectedText.slice(0, 30)}${annotation.selectedText.length > 30 ? "..." : ""}"`
2987
+ ] }),
2988
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles_module_default2.markerNote, children: annotation.comment })
2989
+ ]
2990
+ }
2991
+ )
2992
+ ]
2993
+ },
2994
+ annotation.id
2995
+ );
2996
+ }),
2997
+ markersVisible && !markersExiting && exitingAnnotationsList.filter((a) => a.isFixed).map((annotation) => {
2998
+ const isMulti = annotation.isMultiSelect;
2999
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3000
+ "div",
3001
+ {
3002
+ className: `${styles_module_default2.marker} ${styles_module_default2.fixed} ${styles_module_default2.hovered} ${isMulti ? styles_module_default2.multiSelect : ""} ${styles_module_default2.exit}`,
3003
+ "data-annotation-marker": true,
3004
+ style: {
3005
+ left: `${annotation.x}%`,
3006
+ top: annotation.y
3007
+ },
3008
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconClose, { size: isMulti ? 12 : 10 })
3009
+ },
3010
+ annotation.id
3011
+ );
3012
+ })
3013
+ ] }),
3014
+ isActive && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
3015
+ "div",
3016
+ {
3017
+ className: styles_module_default2.overlay,
3018
+ "data-feedback-toolbar": true,
3019
+ style: pendingAnnotation || editingAnnotation ? { zIndex: 99999 } : void 0,
3020
+ children: [
3021
+ hoverInfo?.rect && !pendingAnnotation && !isScrolling && !isDragging && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3022
+ "div",
3023
+ {
3024
+ className: `${styles_module_default2.hoverHighlight} ${styles_module_default2.enter}`,
3025
+ style: {
3026
+ left: hoverInfo.rect.left,
3027
+ top: hoverInfo.rect.top,
3028
+ width: hoverInfo.rect.width,
3029
+ height: hoverInfo.rect.height,
3030
+ borderColor: `${settings.annotationColor}80`,
3031
+ backgroundColor: `${settings.annotationColor}0A`
3032
+ }
3033
+ }
3034
+ ),
3035
+ hoveredMarkerId && !pendingAnnotation && (() => {
3036
+ const hoveredAnnotation = annotations.find(
3037
+ (a) => a.id === hoveredMarkerId
3038
+ );
3039
+ if (!hoveredAnnotation?.boundingBox) return null;
3040
+ const bb = hoveredAnnotation.boundingBox;
3041
+ const isMulti = hoveredAnnotation.isMultiSelect;
3042
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3043
+ "div",
3044
+ {
3045
+ className: `${isMulti ? styles_module_default2.multiSelectOutline : styles_module_default2.singleSelectOutline} ${styles_module_default2.enter}`,
3046
+ style: {
3047
+ left: bb.x,
3048
+ top: bb.y - scrollY,
3049
+ width: bb.width,
3050
+ height: bb.height,
3051
+ ...isMulti ? {} : {
3052
+ borderColor: `${settings.annotationColor}99`,
3053
+ backgroundColor: `${settings.annotationColor}0D`
3054
+ }
3055
+ }
3056
+ }
3057
+ );
3058
+ })(),
3059
+ hoverInfo && !pendingAnnotation && !isScrolling && !isDragging && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3060
+ "div",
3061
+ {
3062
+ className: `${styles_module_default2.hoverTooltip} ${styles_module_default2.enter}`,
3063
+ style: {
3064
+ left: Math.max(
3065
+ 8,
3066
+ Math.min(hoverPosition.x, window.innerWidth - 100)
3067
+ ),
3068
+ top: Math.max(hoverPosition.y - 32, 8)
3069
+ },
3070
+ children: hoverInfo.element
3071
+ }
3072
+ ),
3073
+ pendingAnnotation && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3074
+ pendingAnnotation.boundingBox && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3075
+ "div",
3076
+ {
3077
+ className: `${pendingAnnotation.isMultiSelect ? styles_module_default2.multiSelectOutline : styles_module_default2.singleSelectOutline} ${pendingExiting ? styles_module_default2.exit : styles_module_default2.enter}`,
3078
+ style: {
3079
+ left: pendingAnnotation.boundingBox.x,
3080
+ top: pendingAnnotation.boundingBox.y - scrollY,
3081
+ width: pendingAnnotation.boundingBox.width,
3082
+ height: pendingAnnotation.boundingBox.height,
3083
+ ...pendingAnnotation.isMultiSelect ? {} : {
3084
+ borderColor: `${settings.annotationColor}99`,
3085
+ backgroundColor: `${settings.annotationColor}0D`
3086
+ }
3087
+ }
3088
+ }
3089
+ ),
3090
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3091
+ "div",
3092
+ {
3093
+ className: `${styles_module_default2.marker} ${styles_module_default2.pending} ${pendingAnnotation.isMultiSelect ? styles_module_default2.multiSelect : ""} ${pendingExiting ? styles_module_default2.exit : styles_module_default2.enter}`,
3094
+ style: {
3095
+ left: `${pendingAnnotation.x}%`,
3096
+ top: pendingAnnotation.clientY,
3097
+ backgroundColor: pendingAnnotation.isMultiSelect ? "#34C759" : settings.annotationColor
3098
+ },
3099
+ children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(IconPlus, { size: 12 })
3100
+ }
3101
+ ),
3102
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3103
+ AnnotationPopupCSS,
3104
+ {
3105
+ ref: popupRef,
3106
+ element: pendingAnnotation.element,
3107
+ selectedText: pendingAnnotation.selectedText,
3108
+ placeholder: pendingAnnotation.element === "Area selection" ? "What should change in this area?" : pendingAnnotation.isMultiSelect ? "Feedback for this group of elements..." : "What should change?",
3109
+ onSubmit: addAnnotation,
3110
+ onCancel: cancelAnnotation,
3111
+ isExiting: pendingExiting,
3112
+ lightMode: !isDarkMode,
3113
+ accentColor: pendingAnnotation.isMultiSelect ? "#34C759" : settings.annotationColor,
3114
+ style: {
3115
+ // Popup is 280px wide, centered with translateX(-50%), so 140px each side
3116
+ // Clamp so popup stays 20px from viewport edges
3117
+ left: Math.max(
3118
+ 160,
3119
+ Math.min(
3120
+ window.innerWidth - 160,
3121
+ pendingAnnotation.x / 100 * window.innerWidth
3122
+ )
3123
+ ),
3124
+ top: Math.max(
3125
+ 20,
3126
+ Math.min(
3127
+ pendingAnnotation.clientY + 20,
3128
+ window.innerHeight - 180
3129
+ )
3130
+ )
3131
+ }
3132
+ }
3133
+ )
3134
+ ] }),
3135
+ editingAnnotation && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3136
+ editingAnnotation.boundingBox && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3137
+ "div",
3138
+ {
3139
+ className: `${editingAnnotation.isMultiSelect ? styles_module_default2.multiSelectOutline : styles_module_default2.singleSelectOutline} ${styles_module_default2.enter}`,
3140
+ style: {
3141
+ left: editingAnnotation.boundingBox.x,
3142
+ top: editingAnnotation.boundingBox.y - scrollY,
3143
+ width: editingAnnotation.boundingBox.width,
3144
+ height: editingAnnotation.boundingBox.height,
3145
+ ...editingAnnotation.isMultiSelect ? {} : {
3146
+ borderColor: `${settings.annotationColor}99`,
3147
+ backgroundColor: `${settings.annotationColor}0D`
3148
+ }
3149
+ }
3150
+ }
3151
+ ),
3152
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3153
+ AnnotationPopupCSS,
3154
+ {
3155
+ ref: editPopupRef,
3156
+ element: editingAnnotation.element,
3157
+ selectedText: editingAnnotation.selectedText,
3158
+ placeholder: "Edit your feedback...",
3159
+ initialValue: editingAnnotation.comment,
3160
+ submitLabel: "Save",
3161
+ onSubmit: updateAnnotation,
3162
+ onCancel: cancelEditAnnotation,
3163
+ isExiting: editExiting,
3164
+ lightMode: !isDarkMode,
3165
+ accentColor: editingAnnotation.isMultiSelect ? "#34C759" : settings.annotationColor,
3166
+ style: {
3167
+ // Popup is 280px wide, centered with translateX(-50%), so 140px each side
3168
+ // Clamp so popup stays 20px from viewport edges
3169
+ left: Math.max(
3170
+ 160,
3171
+ Math.min(
3172
+ window.innerWidth - 160,
3173
+ editingAnnotation.x / 100 * window.innerWidth
3174
+ )
3175
+ ),
3176
+ top: Math.max(
3177
+ 20,
3178
+ Math.min(
3179
+ (editingAnnotation.isFixed ? editingAnnotation.y : editingAnnotation.y - scrollY) + 20,
3180
+ window.innerHeight - 180
3181
+ )
3182
+ )
3183
+ }
3184
+ }
3185
+ )
3186
+ ] }),
3187
+ isDragging && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
3188
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { ref: dragRectRef, className: styles_module_default2.dragSelection }),
3189
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
3190
+ "div",
3191
+ {
3192
+ ref: highlightsContainerRef,
3193
+ className: styles_module_default2.highlightsContainer
3194
+ }
3195
+ )
3196
+ ] })
3197
+ ]
3198
+ }
3199
+ )
3200
+ ] }),
3201
+ document.body
3202
+ );
3203
+ }
3204
+
3205
+ // src/components/annotation-popup/index.tsx
3206
+ var import_react3 = require("react");
3207
+ var import_framer_motion = require("framer-motion");
3208
+
3209
+ // src/components/annotation-popup/styles.module.scss
3210
+ var css3 = '.styles-module__popup___MBQDV {\n position: fixed;\n transform: translateX(-50%);\n width: 280px;\n padding: 0.75rem 1rem 14px;\n background: #1a1a1a;\n border-radius: 16px;\n box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.08);\n cursor: default;\n z-index: 99999;\n font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n}\n\n.styles-module__header___1q-wa {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 0.5rem;\n}\n\n.styles-module__element___tPxVO {\n font-size: 0.75rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.65);\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n flex: 1;\n}\n\n.styles-module__timestamp___t7PEZ {\n font-size: 0.625rem;\n font-weight: 500;\n color: rgba(255, 255, 255, 0.35);\n font-variant-numeric: tabular-nums;\n margin-left: 0.5rem;\n flex-shrink: 0;\n}\n\n.styles-module__quote___uFJyr {\n font-size: 0.6875rem;\n font-style: italic;\n color: rgba(255, 255, 255, 0.5);\n margin-bottom: 0.5rem;\n padding: 0.4rem 0.5rem;\n background: rgba(255, 255, 255, 0.05);\n border-radius: 0.25rem;\n line-height: 1.45;\n}\n\n.styles-module__textarea___Pw6C4 {\n width: 100%;\n padding: 0.5rem 0.625rem;\n font-size: 0.8125rem;\n font-family: inherit;\n background: rgba(255, 255, 255, 0.05);\n color: #fff;\n border: 1px solid rgba(255, 255, 255, 0.15);\n border-radius: 8px;\n resize: none;\n outline: none;\n transition: border-color 0.15s ease;\n}\n.styles-module__textarea___Pw6C4:focus {\n border-color: #3c82f7;\n}\n.styles-module__textarea___Pw6C4.styles-module__green___zdmke:focus {\n border-color: #34C759;\n}\n.styles-module__textarea___Pw6C4::placeholder {\n color: rgba(255, 255, 255, 0.35);\n}\n.styles-module__textarea___Pw6C4::-webkit-scrollbar {\n width: 6px;\n}\n.styles-module__textarea___Pw6C4::-webkit-scrollbar-track {\n background: transparent;\n}\n.styles-module__textarea___Pw6C4::-webkit-scrollbar-thumb {\n background: rgba(255, 255, 255, 0.2);\n border-radius: 3px;\n}\n\n.styles-module__actions___bxQCu {\n display: flex;\n justify-content: flex-end;\n gap: 0.375rem;\n margin-top: 0.5rem;\n}\n\n.styles-module__cancel___-xAEc,\n.styles-module__submit___nnXO9 {\n padding: 0.4rem 0.875rem;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: 1rem;\n border: none;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n\n.styles-module__cancel___-xAEc {\n background: transparent;\n color: rgba(255, 255, 255, 0.5);\n}\n.styles-module__cancel___-xAEc:hover {\n background: rgba(255, 255, 255, 0.1);\n color: rgba(255, 255, 255, 0.8);\n}\n\n.styles-module__submit___nnXO9 {\n background: #3c82f7;\n color: white;\n}\n.styles-module__submit___nnXO9:hover:not(:disabled) {\n background: #2d6fdf;\n}\n.styles-module__submit___nnXO9:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n.styles-module__submit___nnXO9.styles-module__green___zdmke {\n background: #34C759;\n}\n.styles-module__submit___nnXO9.styles-module__green___zdmke:hover:not(:disabled) {\n background: #2db84d;\n}';
3211
+ var classNames3 = { "popup": "styles-module__popup___MBQDV", "header": "styles-module__header___1q-wa", "element": "styles-module__element___tPxVO", "timestamp": "styles-module__timestamp___t7PEZ", "quote": "styles-module__quote___uFJyr", "textarea": "styles-module__textarea___Pw6C4", "green": "styles-module__green___zdmke", "actions": "styles-module__actions___bxQCu", "cancel": "styles-module__cancel___-xAEc", "submit": "styles-module__submit___nnXO9" };
3212
+ if (typeof document !== "undefined") {
3213
+ let style = document.getElementById("feedback-tool-styles-annotation-popup-styles");
3214
+ if (!style) {
3215
+ style = document.createElement("style");
3216
+ style.id = "feedback-tool-styles-annotation-popup-styles";
3217
+ style.textContent = css3;
3218
+ document.head.appendChild(style);
3219
+ }
3220
+ }
3221
+ var styles_module_default3 = classNames3;
3222
+
3223
+ // src/components/annotation-popup/index.tsx
3224
+ var import_jsx_runtime4 = require("react/jsx-runtime");
3225
+ var AnnotationPopup = (0, import_react3.forwardRef)(
3226
+ function AnnotationPopup2({
3227
+ element,
3228
+ timestamp,
3229
+ selectedText,
3230
+ placeholder = "What should change?",
3231
+ onSubmit,
3232
+ onCancel,
3233
+ style,
3234
+ variant = "blue"
3235
+ }, ref) {
3236
+ const [text, setText] = (0, import_react3.useState)("");
3237
+ const textareaRef = (0, import_react3.useRef)(null);
3238
+ const controls = (0, import_framer_motion.useAnimation)();
3239
+ (0, import_react3.useEffect)(() => {
3240
+ controls.start({ opacity: 1, scale: 1, y: 0 });
3241
+ const timer = setTimeout(() => {
3242
+ const textarea = textareaRef.current;
3243
+ if (textarea) {
3244
+ textarea.focus();
3245
+ textarea.selectionStart = textarea.selectionEnd = textarea.value.length;
3246
+ textarea.scrollTop = textarea.scrollHeight;
3247
+ }
3248
+ }, 10);
3249
+ return () => clearTimeout(timer);
3250
+ }, [controls]);
3251
+ const shake = (0, import_react3.useCallback)(async () => {
3252
+ await controls.start({
3253
+ x: [0, -3, 3, -2, 2, 0],
3254
+ transition: { duration: 0.25, ease: "easeOut" }
3255
+ });
3256
+ textareaRef.current?.focus();
3257
+ }, [controls]);
3258
+ (0, import_react3.useImperativeHandle)(ref, () => ({
3259
+ shake
3260
+ }), [shake]);
3261
+ const handleSubmit = (0, import_react3.useCallback)(() => {
3262
+ if (!text.trim()) return;
3263
+ onSubmit(text.trim());
3264
+ }, [text, onSubmit]);
3265
+ const handleKeyDown = (0, import_react3.useCallback)(
3266
+ (e) => {
3267
+ if (e.key === "Enter" && !e.shiftKey) {
3268
+ e.preventDefault();
3269
+ handleSubmit();
3270
+ }
3271
+ if (e.key === "Escape") {
3272
+ onCancel();
3273
+ }
3274
+ },
3275
+ [handleSubmit, onCancel]
3276
+ );
3277
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
3278
+ import_framer_motion.motion.div,
3279
+ {
3280
+ className: styles_module_default3.popup,
3281
+ "data-annotation-popup": true,
3282
+ initial: { opacity: 0, scale: 0.95, y: 4 },
3283
+ animate: controls,
3284
+ exit: { opacity: 0, scale: 0.95, y: 4 },
3285
+ transition: { type: "spring", stiffness: 500, damping: 35 },
3286
+ style,
3287
+ onClick: (e) => e.stopPropagation(),
3288
+ children: [
3289
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles_module_default3.header, children: [
3290
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: styles_module_default3.element, children: element }),
3291
+ timestamp && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { className: styles_module_default3.timestamp, children: timestamp })
3292
+ ] }),
3293
+ selectedText && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles_module_default3.quote, children: [
3294
+ "\u201C",
3295
+ selectedText.slice(0, 80),
3296
+ selectedText.length > 80 ? "..." : "",
3297
+ "\u201D"
3298
+ ] }),
3299
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3300
+ "textarea",
3301
+ {
3302
+ ref: textareaRef,
3303
+ className: `${styles_module_default3.textarea} ${variant === "green" ? styles_module_default3.green : ""}`,
3304
+ placeholder,
3305
+ value: text,
3306
+ onChange: (e) => setText(e.target.value),
3307
+ rows: 2,
3308
+ onKeyDown: handleKeyDown
3309
+ }
3310
+ ),
3311
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: styles_module_default3.actions, children: [
3312
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("button", { className: styles_module_default3.cancel, onClick: onCancel, children: "Cancel" }),
3313
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
3314
+ "button",
3315
+ {
3316
+ className: `${styles_module_default3.submit} ${variant === "green" ? styles_module_default3.green : ""}`,
3317
+ onClick: handleSubmit,
3318
+ disabled: !text.trim(),
3319
+ children: "Add"
3320
+ }
3321
+ )
3322
+ ] })
3323
+ ]
3324
+ }
3325
+ );
3326
+ }
3327
+ );
3328
+ function AnnotationPopupPresence({
3329
+ isOpen,
3330
+ ...props
3331
+ }) {
3332
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_framer_motion.AnimatePresence, { children: isOpen && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(AnnotationPopup, { ...props }) });
3333
+ }
3334
+ // Annotate the CommonJS export names for ESM import in node:
3335
+ 0 && (module.exports = {
3336
+ Agentation,
3337
+ AgentationCSS,
3338
+ AnimatedBunny,
3339
+ AnnotationPopup,
3340
+ AnnotationPopupCSS,
3341
+ AnnotationPopupPresence,
3342
+ IconChatEllipsis,
3343
+ IconCheck,
3344
+ IconCheckSmall,
3345
+ IconCheckSmallAnimated,
3346
+ IconCheckmark,
3347
+ IconCheckmarkCircle,
3348
+ IconCheckmarkLarge,
3349
+ IconClose,
3350
+ IconCopyAlt,
3351
+ IconCopyAnimated,
3352
+ IconEye,
3353
+ IconEyeAlt,
3354
+ IconEyeAnimated,
3355
+ IconEyeClosed,
3356
+ IconEyeMinus,
3357
+ IconGear,
3358
+ IconHelp,
3359
+ IconListSparkle,
3360
+ IconMoon,
3361
+ IconPause,
3362
+ IconPauseAlt,
3363
+ IconPausePlayAnimated,
3364
+ IconPlayAlt,
3365
+ IconPlus,
3366
+ IconSun,
3367
+ IconTrashAlt,
3368
+ IconXmark,
3369
+ IconXmarkLarge,
3370
+ PageFeedbackToolbarCSS,
3371
+ getElementClasses,
3372
+ getElementPath,
3373
+ getNearbyText,
3374
+ getStorageKey,
3375
+ identifyAnimationElement,
3376
+ identifyElement,
3377
+ loadAnnotations,
3378
+ saveAnnotations
3379
+ });
3380
+ //# sourceMappingURL=index.js.map