react-grab 0.0.41 → 0.0.42
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.cjs +107 -84
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.global.js +24 -23
- package/dist/index.js +107 -84
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -358,12 +358,14 @@ var getCursorQuadrants = (cursorX, cursorY, elementWidth, elementHeight, offset)
|
|
|
358
358
|
};
|
|
359
359
|
|
|
360
360
|
// src/components/label.tsx
|
|
361
|
-
var _tmpl$3 = /* @__PURE__ */ web.template(`<
|
|
362
|
-
var _tmpl$22 = /* @__PURE__ */ web.template(`<
|
|
363
|
-
var _tmpl$32 = /* @__PURE__ */ web.template(`<
|
|
364
|
-
var _tmpl$4 = /* @__PURE__ */ web.template(`<span style=font-variant-numeric:tabular-nums;
|
|
365
|
-
var _tmpl$5 = /* @__PURE__ */ web.template(`<
|
|
366
|
-
var _tmpl$6 = /* @__PURE__ */ web.template(`<div style=
|
|
361
|
+
var _tmpl$3 = /* @__PURE__ */ web.template(`<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">`);
|
|
362
|
+
var _tmpl$22 = /* @__PURE__ */ web.template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
|
|
363
|
+
var _tmpl$32 = /* @__PURE__ */ web.template(`<div style=margin-right:4px>Copied`);
|
|
364
|
+
var _tmpl$4 = /* @__PURE__ */ web.template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
|
|
365
|
+
var _tmpl$5 = /* @__PURE__ */ web.template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
|
|
366
|
+
var _tmpl$6 = /* @__PURE__ */ web.template(`<div style=margin-left:4px>to clipboard`);
|
|
367
|
+
var _tmpl$7 = /* @__PURE__ */ web.template(`<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select`);
|
|
368
|
+
var _tmpl$8 = /* @__PURE__ */ web.template(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`);
|
|
367
369
|
var Label = (props) => {
|
|
368
370
|
let labelRef;
|
|
369
371
|
const position = useAnimatedPosition({
|
|
@@ -416,10 +418,20 @@ var Label = (props) => {
|
|
|
416
418
|
return props.visible !== false;
|
|
417
419
|
},
|
|
418
420
|
get children() {
|
|
419
|
-
var _el$ = _tmpl$
|
|
421
|
+
var _el$ = _tmpl$8(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild;
|
|
420
422
|
var _ref$ = labelRef;
|
|
421
423
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : labelRef = _el$;
|
|
422
424
|
web.insert(_el$, web.createComponent(solidJs.Show, {
|
|
425
|
+
get when() {
|
|
426
|
+
return web.memo(() => props.variant === "processing")() && props.progress !== void 0;
|
|
427
|
+
},
|
|
428
|
+
get children() {
|
|
429
|
+
var _el$2 = _tmpl$3();
|
|
430
|
+
web.effect((_$p) => web.setStyleProperty(_el$2, "width", `${Math.min(100, Math.max(0, (props.progress ?? 0) * 100))}%`));
|
|
431
|
+
return _el$2;
|
|
432
|
+
}
|
|
433
|
+
}), _el$3);
|
|
434
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
423
435
|
get when() {
|
|
424
436
|
return props.variant === "processing";
|
|
425
437
|
},
|
|
@@ -427,55 +439,63 @@ var Label = (props) => {
|
|
|
427
439
|
return web.createComponent(Spinner, {});
|
|
428
440
|
}
|
|
429
441
|
}), null);
|
|
430
|
-
web.insert(_el
|
|
442
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
431
443
|
get when() {
|
|
432
444
|
return props.variant === "success";
|
|
433
445
|
},
|
|
434
446
|
get children() {
|
|
435
|
-
return _tmpl$
|
|
447
|
+
return _tmpl$22();
|
|
436
448
|
}
|
|
437
449
|
}), null);
|
|
438
|
-
web.insert(_el
|
|
450
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
439
451
|
get when() {
|
|
440
452
|
return props.variant === "success";
|
|
441
453
|
},
|
|
442
454
|
get children() {
|
|
443
|
-
return _tmpl$
|
|
455
|
+
return _tmpl$32();
|
|
444
456
|
}
|
|
445
457
|
}), null);
|
|
446
|
-
web.insert(_el
|
|
458
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
447
459
|
get when() {
|
|
448
460
|
return props.variant === "processing";
|
|
449
461
|
},
|
|
450
|
-
children: "
|
|
462
|
+
children: "Please wait\u2026"
|
|
451
463
|
}), null);
|
|
452
|
-
web.insert(_el
|
|
464
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
453
465
|
get when() {
|
|
454
466
|
return props.variant !== "processing";
|
|
455
467
|
},
|
|
456
468
|
get children() {
|
|
457
469
|
return [(() => {
|
|
458
|
-
var _el$
|
|
459
|
-
web.insert(_el$
|
|
460
|
-
return _el$
|
|
470
|
+
var _el$7 = _tmpl$4();
|
|
471
|
+
web.insert(_el$7, () => labelSegments().primary);
|
|
472
|
+
return _el$7;
|
|
461
473
|
})(), web.createComponent(solidJs.Show, {
|
|
462
474
|
get when() {
|
|
463
475
|
return web.memo(() => props.variant === "hover")() && labelSegments().secondary !== "";
|
|
464
476
|
},
|
|
465
477
|
get children() {
|
|
466
|
-
var _el$
|
|
467
|
-
web.insert(_el$
|
|
468
|
-
return _el$
|
|
478
|
+
var _el$8 = _tmpl$5();
|
|
479
|
+
web.insert(_el$8, () => labelSegments().secondary);
|
|
480
|
+
return _el$8;
|
|
469
481
|
}
|
|
470
482
|
})];
|
|
471
483
|
}
|
|
472
484
|
}), null);
|
|
473
|
-
web.insert(_el
|
|
485
|
+
web.insert(_el$4, web.createComponent(solidJs.Show, {
|
|
474
486
|
get when() {
|
|
475
487
|
return props.variant === "success";
|
|
476
488
|
},
|
|
477
489
|
get children() {
|
|
478
|
-
return _tmpl$
|
|
490
|
+
return _tmpl$6();
|
|
491
|
+
}
|
|
492
|
+
}), null);
|
|
493
|
+
web.insert(_el$3, web.createComponent(solidJs.Show, {
|
|
494
|
+
get when() {
|
|
495
|
+
return web.memo(() => props.variant === "hover")() && props.showHint;
|
|
496
|
+
},
|
|
497
|
+
get children() {
|
|
498
|
+
return _tmpl$7();
|
|
479
499
|
}
|
|
480
500
|
}), null);
|
|
481
501
|
web.effect((_p$) => {
|
|
@@ -495,7 +515,7 @@ var Label = (props) => {
|
|
|
495
515
|
}
|
|
496
516
|
});
|
|
497
517
|
};
|
|
498
|
-
var _tmpl$
|
|
518
|
+
var _tmpl$9 = /* @__PURE__ */ web.template(`<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">`);
|
|
499
519
|
var ProgressIndicator = (props) => {
|
|
500
520
|
const opacity = useFadeInOut({
|
|
501
521
|
visible: props.visible
|
|
@@ -517,7 +537,7 @@ var ProgressIndicator = (props) => {
|
|
|
517
537
|
return props.visible !== false;
|
|
518
538
|
},
|
|
519
539
|
get children() {
|
|
520
|
-
var _el$ = _tmpl$
|
|
540
|
+
var _el$ = _tmpl$9(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
521
541
|
var _ref$ = progressIndicatorRef;
|
|
522
542
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : progressIndicatorRef = _el$;
|
|
523
543
|
web.effect((_p$) => {
|
|
@@ -537,7 +557,7 @@ var ProgressIndicator = (props) => {
|
|
|
537
557
|
}
|
|
538
558
|
});
|
|
539
559
|
};
|
|
540
|
-
var _tmpl$
|
|
560
|
+
var _tmpl$10 = /* @__PURE__ */ web.template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
|
|
541
561
|
var Crosshair = (props) => {
|
|
542
562
|
let canvasRef;
|
|
543
563
|
let context = null;
|
|
@@ -597,7 +617,7 @@ var Crosshair = (props) => {
|
|
|
597
617
|
return props.visible !== false;
|
|
598
618
|
},
|
|
599
619
|
get children() {
|
|
600
|
-
var _el$ = _tmpl$
|
|
620
|
+
var _el$ = _tmpl$10();
|
|
601
621
|
var _ref$ = canvasRef;
|
|
602
622
|
typeof _ref$ === "function" ? web.use(_ref$, _el$) : canvasRef = _el$;
|
|
603
623
|
return _el$;
|
|
@@ -665,22 +685,29 @@ var ReactGrabRenderer = (props) => {
|
|
|
665
685
|
return box.createdAt;
|
|
666
686
|
}
|
|
667
687
|
})
|
|
668
|
-
}), web.createComponent(solidJs.
|
|
669
|
-
get
|
|
670
|
-
return props.
|
|
688
|
+
}), web.createComponent(solidJs.Show, {
|
|
689
|
+
get when() {
|
|
690
|
+
return props.labelVariant !== "processing";
|
|
671
691
|
},
|
|
672
|
-
children
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
692
|
+
get children() {
|
|
693
|
+
return web.createComponent(solidJs.For, {
|
|
694
|
+
get each() {
|
|
695
|
+
return props.successLabels ?? [];
|
|
696
|
+
},
|
|
697
|
+
children: (label) => web.createComponent(Label, {
|
|
698
|
+
variant: "success",
|
|
699
|
+
get text() {
|
|
700
|
+
return label.text;
|
|
701
|
+
},
|
|
702
|
+
get x() {
|
|
703
|
+
return props.mouseX ?? 0;
|
|
704
|
+
},
|
|
705
|
+
get y() {
|
|
706
|
+
return props.mouseY ?? 0;
|
|
707
|
+
}
|
|
708
|
+
})
|
|
709
|
+
});
|
|
710
|
+
}
|
|
684
711
|
}), web.createComponent(solidJs.Show, {
|
|
685
712
|
get when() {
|
|
686
713
|
return web.memo(() => !!(props.labelVisible && props.labelVariant && props.labelText && props.labelX !== void 0))() && props.labelY !== void 0;
|
|
@@ -704,6 +731,12 @@ var ReactGrabRenderer = (props) => {
|
|
|
704
731
|
},
|
|
705
732
|
get zIndex() {
|
|
706
733
|
return props.labelZIndex;
|
|
734
|
+
},
|
|
735
|
+
get progress() {
|
|
736
|
+
return props.progress;
|
|
737
|
+
},
|
|
738
|
+
get showHint() {
|
|
739
|
+
return props.labelShowHint;
|
|
707
740
|
}
|
|
708
741
|
});
|
|
709
742
|
}
|
|
@@ -856,8 +889,8 @@ var getHTMLPreview = (element) => {
|
|
|
856
889
|
}
|
|
857
890
|
attrsText += ` ${name}="${value}"`;
|
|
858
891
|
}
|
|
859
|
-
|
|
860
|
-
|
|
892
|
+
const topElements = [];
|
|
893
|
+
const bottomElements = [];
|
|
861
894
|
let foundFirstText = false;
|
|
862
895
|
const childNodes = Array.from(element.childNodes);
|
|
863
896
|
for (const node of childNodes) {
|
|
@@ -868,19 +901,31 @@ var getHTMLPreview = (element) => {
|
|
|
868
901
|
}
|
|
869
902
|
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
|
870
903
|
if (!foundFirstText) {
|
|
871
|
-
topElements
|
|
904
|
+
topElements.push(node);
|
|
872
905
|
} else {
|
|
873
|
-
bottomElements
|
|
906
|
+
bottomElements.push(node);
|
|
874
907
|
}
|
|
875
908
|
}
|
|
876
909
|
}
|
|
910
|
+
const formatElements = (elements) => {
|
|
911
|
+
if (elements.length === 0) return "";
|
|
912
|
+
if (elements.length <= 2) {
|
|
913
|
+
return elements.map((el) => `<${el.tagName.toLowerCase()} ...>`).join("\n ");
|
|
914
|
+
}
|
|
915
|
+
return `(${elements.length} elements)`;
|
|
916
|
+
};
|
|
877
917
|
let content = "";
|
|
878
|
-
|
|
879
|
-
(
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
918
|
+
const topElementsStr = formatElements(topElements);
|
|
919
|
+
if (topElementsStr) content += `
|
|
920
|
+
${topElementsStr}`;
|
|
921
|
+
if (text.length > 0) {
|
|
922
|
+
const truncatedText = text.length > 100 ? `${text.slice(0, 100)}...` : text;
|
|
923
|
+
content += `
|
|
924
|
+
${truncatedText}`;
|
|
925
|
+
}
|
|
926
|
+
const bottomElementsStr = formatElements(bottomElements);
|
|
927
|
+
if (bottomElementsStr) content += `
|
|
928
|
+
${bottomElementsStr}`;
|
|
884
929
|
if (content.length > 0) {
|
|
885
930
|
return `<${tagName}${attrsText}>${content}
|
|
886
931
|
</${tagName}>`;
|
|
@@ -1130,8 +1175,6 @@ var init = (rawOptions) => {
|
|
|
1130
1175
|
let progressDelayTimerId = null;
|
|
1131
1176
|
let keydownSpamTimerId = null;
|
|
1132
1177
|
let mouseSettleTimerId = null;
|
|
1133
|
-
let referenceMouseX = OFFSCREEN_POSITION;
|
|
1134
|
-
let referenceMouseY = OFFSCREEN_POSITION;
|
|
1135
1178
|
const isRendererActive = solidJs.createMemo(() => isActivated() && !isCopying());
|
|
1136
1179
|
const hasValidMousePosition = solidJs.createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
|
|
1137
1180
|
const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
|
|
@@ -1329,7 +1372,6 @@ ${formatStack(await getStack(element))}`));
|
|
|
1329
1372
|
x: mouseX(),
|
|
1330
1373
|
y: mouseY()
|
|
1331
1374
|
});
|
|
1332
|
-
const isSameAsLast = solidJs.createMemo(() => Boolean(targetElement() && targetElement() === lastGrabbedElement()));
|
|
1333
1375
|
solidJs.createEffect(solidJs.on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
|
|
1334
1376
|
if (lastElement && currentElement && lastElement !== currentElement) {
|
|
1335
1377
|
setLastGrabbedElement(null);
|
|
@@ -1392,8 +1434,6 @@ ${formatStack(await getStack(element))}`));
|
|
|
1392
1434
|
mouseSettleTimerId = null;
|
|
1393
1435
|
}
|
|
1394
1436
|
setMouseHasSettled(false);
|
|
1395
|
-
referenceMouseX = OFFSCREEN_POSITION;
|
|
1396
|
-
referenceMouseY = OFFSCREEN_POSITION;
|
|
1397
1437
|
stopProgressAnimation();
|
|
1398
1438
|
};
|
|
1399
1439
|
const abortController = new AbortController();
|
|
@@ -1460,34 +1500,14 @@ ${formatStack(await getStack(element))}`));
|
|
|
1460
1500
|
window.addEventListener("mousemove", (event) => {
|
|
1461
1501
|
setMouseX(event.clientX);
|
|
1462
1502
|
setMouseY(event.clientY);
|
|
1463
|
-
if (
|
|
1464
|
-
|
|
1465
|
-
referenceMouseY = event.clientY;
|
|
1466
|
-
}
|
|
1467
|
-
const deltaX = event.clientX - referenceMouseX;
|
|
1468
|
-
const deltaY = event.clientY - referenceMouseY;
|
|
1469
|
-
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
1470
|
-
if (distance >= 200) {
|
|
1471
|
-
if (mouseSettleTimerId !== null) {
|
|
1472
|
-
window.clearTimeout(mouseSettleTimerId);
|
|
1473
|
-
}
|
|
1474
|
-
setMouseHasSettled(false);
|
|
1475
|
-
referenceMouseX = event.clientX;
|
|
1476
|
-
referenceMouseY = event.clientY;
|
|
1477
|
-
mouseSettleTimerId = window.setTimeout(() => {
|
|
1478
|
-
setMouseHasSettled(true);
|
|
1479
|
-
referenceMouseX = mouseX();
|
|
1480
|
-
referenceMouseY = mouseY();
|
|
1481
|
-
mouseSettleTimerId = null;
|
|
1482
|
-
}, 100);
|
|
1483
|
-
} else if (mouseSettleTimerId === null && !mouseHasSettled()) {
|
|
1484
|
-
mouseSettleTimerId = window.setTimeout(() => {
|
|
1485
|
-
setMouseHasSettled(true);
|
|
1486
|
-
referenceMouseX = mouseX();
|
|
1487
|
-
referenceMouseY = mouseY();
|
|
1488
|
-
mouseSettleTimerId = null;
|
|
1489
|
-
}, 100);
|
|
1503
|
+
if (mouseSettleTimerId !== null) {
|
|
1504
|
+
window.clearTimeout(mouseSettleTimerId);
|
|
1490
1505
|
}
|
|
1506
|
+
setMouseHasSettled(false);
|
|
1507
|
+
mouseSettleTimerId = window.setTimeout(() => {
|
|
1508
|
+
setMouseHasSettled(true);
|
|
1509
|
+
mouseSettleTimerId = null;
|
|
1510
|
+
}, 300);
|
|
1491
1511
|
}, {
|
|
1492
1512
|
signal: eventListenerSignal
|
|
1493
1513
|
});
|
|
@@ -1571,7 +1591,7 @@ ${formatStack(await getStack(element))}`));
|
|
|
1571
1591
|
const labelVisible = solidJs.createMemo(() => {
|
|
1572
1592
|
if (isCopying()) return true;
|
|
1573
1593
|
if (successLabels().length > 0) return false;
|
|
1574
|
-
return isRendererActive() && !isDragging() &&
|
|
1594
|
+
return isRendererActive() && !isDragging() && Boolean(targetElement());
|
|
1575
1595
|
});
|
|
1576
1596
|
const progressVisible = solidJs.createMemo(() => isCopying() && showProgressIndicator() && hasValidMousePosition());
|
|
1577
1597
|
const crosshairVisible = solidJs.createMemo(() => isRendererActive() && !isDragging());
|
|
@@ -1610,6 +1630,9 @@ ${formatStack(await getStack(element))}`));
|
|
|
1610
1630
|
return labelVisible();
|
|
1611
1631
|
},
|
|
1612
1632
|
labelZIndex: Z_INDEX_LABEL,
|
|
1633
|
+
get labelShowHint() {
|
|
1634
|
+
return mouseHasSettled();
|
|
1635
|
+
},
|
|
1613
1636
|
get progressVisible() {
|
|
1614
1637
|
return progressVisible();
|
|
1615
1638
|
},
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.global.js
CHANGED
|
@@ -6,35 +6,36 @@ var ReactGrab=(function(exports){'use strict';/**
|
|
|
6
6
|
* This source code is licensed under the MIT license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
|
-
var jr=(e,t)=>e===t;var Vr=Symbol("solid-track"),tt={equals:jr},xn=An,ce=1,je=2,Cn={owned:null,cleanups:null,context:null,owner:null};var O=null,g=null,Me=null,I=null,U=null,Q=null,rt=0;function Ne(e,t){let n=I,r=O,o=e.length===0,i=t===void 0?r:t,s=o?Cn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ie(()=>ve(s)));O=s,I=null;try{return ye(a,!0)}finally{I=n,O=r;}}function E(e,t){t=t?Object.assign({},tt,t):tt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Rn(n,o));return [En.bind(n),r]}function se(e,t,n){let r=Pt(e,t,false,ce);Ge(r);}function oe(e,t,n){xn=zr;let r=Pt(e,t,false,ce);(r.user=true),Q?Q.push(r):Ge(r);}function L(e,t,n){n=n?Object.assign({},tt,n):tt;let r=Pt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ge(r),En.bind(r)}function ie(e){if(I===null)return e();let t=I;I=null;try{return Me?Me.untrack(e):e()}finally{I=t;}}function $e(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ie(()=>t(a,o,s));return o=a,l}}function vn(e){oe(()=>ie(e));}function ae(e){return O===null||(O.cleanups===null?O.cleanups=[e]:O.cleanups.push(e)),e}E(false);function En(){let e=g;if(this.sources&&(this.state))if((this.state)===ce)Ge(this);else {let t=U;U=null,ye(()=>nt(this),false),U=t;}if(I){let t=this.observers?this.observers.length:0;I.sources?(I.sources.push(this),I.sourceSlots.push(t)):(I.sources=[this],I.sourceSlots=[t]),this.observers?(this.observers.push(I),this.observerSlots.push(I.sources.length-1)):(this.observers=[I],this.observerSlots=[I.sources.length-1]);}return e&&g.sources.has(this)?this.tValue:this.value}function Rn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&ye(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=g&&g.running;s&&g.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?U.push(i):Q.push(i),i.observers&&_n(i)),s?i.tState=ce:i.state=ce);}if(U.length>1e6)throw U=[],new Error},false);}return t}function Ge(e){if(!e.fn)return;ve(e);let t=rt;wn(e,e.value,t);}function wn(e,t,n){let r,o=O,i=I;I=O=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=ce,e.owned&&e.owned.forEach(ve),e.owned=null)),e.updatedAt=n+1,It(s)}finally{I=i,O=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Rn(e,r):e.value=r,e.updatedAt=n);}function Pt(e,t,n,r=ce,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:O,context:O?O.context:null,pure:n};if(O===null||O!==Cn&&(O.owned?O.owned.push(i):O.owned=[i]),Me);return i}function Ve(e){let t=g;if((e.state)===0)return;if((e.state)===je)return nt(e);if(e.suspense&&ie(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<rt);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ce)Ge(e);else if((e.state)===je){let o=U;U=null,ye(()=>nt(e,n[0]),false),U=o;}}}function ye(e,t){if(U)return e();let n=false;t||(U=[]),Q?n=true:Q=[],rt++;try{let r=e();return Ur(n),r}catch(r){n||(Q=null),U=null,It(r);}}function Ur(e){if(U&&(An(U),U=null),e)return;let n=Q;Q=null,n.length&&ye(()=>xn(n),false);}function An(e){for(let t=0;t<e.length;t++)Ve(e[t]);}function zr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ve(r);}for(t=0;t<n;t++)Ve(e[t]);}function nt(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=o.state;i===ce?o!==t&&(!o.updatedAt||o.updatedAt<rt)&&Ve(o):i===je&&nt(o,t);}}}function _n(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=je,r.pure?U.push(r):Q.push(r),r.observers&&_n(r));}}function ve(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)ve(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)ve(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function qr(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function It(e,t=O){let r=qr(e);throw r;}var Wr=Symbol("fallback");function Sn(e){for(let t=0;t<e.length;t++)e[t]();}function Kr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return ae(()=>Sn(i)),()=>{let l=e()||[],c=l.length,d,m;return l[Vr],ie(()=>{let w,y,x,G,ne,X,W,D,K;if(c===0)s!==0&&(Sn(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[Wr],o[0]=Ne(fe=>(i[0]=fe,n.fallback())),s=1);else if(s===0){for(o=new Array(c),m=0;m<c;m++)r[m]=l[m],o[m]=Ne(T);s=c;}else {for(x=new Array(c),G=new Array(c),a&&(ne=new Array(c)),X=0,W=Math.min(s,c);X<W&&r[X]===l[X];X++);for(W=s-1,D=c-1;W>=X&&D>=X&&r[W]===l[D];W--,D--)x[D]=o[W],G[D]=i[W],a&&(ne[D]=a[W]);for(w=new Map,y=new Array(D+1),m=D;m>=X;m--)K=l[m],d=w.get(K),y[m]=d===void 0?-1:d,w.set(K,m);for(d=X;d<=W;d++)K=r[d],m=w.get(K),m!==void 0&&m!==-1?(x[m]=o[d],G[m]=i[d],a&&(ne[m]=a[d]),m=y[m],w.set(K,m)):i[d]();for(m=X;m<c;m++)m in x?(o[m]=x[m],i[m]=G[m],a&&(a[m]=ne[m],a[m](m))):o[m]=Ne(T);o=o.slice(0,s=c),r=l.slice(0);}return o});function T(w){if(i[m]=w,a){let[y,x]=E(m);return a[m]=x,t(l[m],y)}return t(l[m])}}}function R(e,t){return ie(()=>e(t||{}))}var Qr=e=>`Stale read from <${e}>.`;function ot(e){let t="fallback"in e&&{fallback:()=>e.fallback};return L(Kr(()=>e.each,e.children,t||void 0))}function H(e){let t=e.keyed,n=L(()=>e.when,void 0,void 0),r=t?n:L(n,void 0,{equals:(o,i)=>!o==!i});return L(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?ie(()=>i(t?o:()=>{if(!ie(r))throw Qr("Show");return n()})):i}return e.fallback},void 0,void 0)}var Ee=e=>L(()=>e());function to(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let d=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],d);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let d=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],d),t[o]=n[i];}else {if(!c){c=new Map;let m=a;for(;m<i;)c.set(n[m],m++);}let d=c.get(t[s]);if(d!=null)if(a<d&&d<i){let m=s,T=1,w;for(;++m<o&&m<i&&!((w=c.get(t[m]))==null||w!==d+T);)T++;if(T>d-a){let y=t[s];for(;a<d;)e.insertBefore(n[a++],y);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function kn(e,t,n,r={}){let o;return Ne(i=>{o=i,t===document?e():be(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function te(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function no(e,t,n){(e.removeAttribute(t));}function st(e,t,n){if(!t)return n?no(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function he(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function Re(e,t,n){return ie(()=>e(t,n))}function be(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return it(e,t,r,n);se(o=>it(e,t(),o,n),r);}function it(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=Le(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=Le(e,n,r);}else {if(s==="function")return se(()=>{let l=t();for(;typeof l=="function";)l=l();n=it(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if(Mt(l,t,n,o))return se(()=>n=it(e,l,n,r,true)),()=>n;if(l.length===0){if(n=Le(e,n,r),a)return n}else c?n.length===0?Fn(e,l,r):to(e,n,l):(n&&Le(e),Fn(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=Le(e,n,r,t);Le(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function Mt(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=Mt(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=Mt(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let d=String(a);l&&l.nodeType===3&&l.data===d?e.push(l):e.push(document.createTextNode(d));}}return o}function Fn(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function Le(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var ro=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],oo=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),io=e=>Array.isArray(e),so=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&oo(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return io(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},Pn=e=>so(e,ro);var De="data-react-grab",In=()=>{let e=document.querySelector(`[${De}]`);if(e){let i=e.shadowRoot?.querySelector(`[${De}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(De,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(De,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var Ae=(e,t,n)=>e+(t-e)*n;var lo=te("<div>"),at=e=>{let[t,n]=E(e.bounds.x),[r,o]=E(e.bounds.y),[i,s]=E(e.bounds.width),[a,l]=E(e.bounds.height),[c,d]=E(1),m=false,T=null,w=null,y=e.bounds,x=false,G=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,ne=()=>{if(x)return;x=true;let D=()=>{let K=Ae(t(),y.x,G()),fe=Ae(r(),y.y,G()),Oe=Ae(i(),y.width,G()),Te=Ae(a(),y.height,G());n(K),o(fe),s(Oe),l(Te),Math.abs(K-y.x)<.5&&Math.abs(fe-y.y)<.5&&Math.abs(Oe-y.width)<.5&&Math.abs(Te-y.height)<.5?(T=null,x=false):T=requestAnimationFrame(D);};T=requestAnimationFrame(D);};oe($e(()=>e.bounds,D=>{if(y=D,!m){n(y.x),o(y.y),s(y.width),l(y.height),m=true;return}ne();})),oe(()=>{e.variant==="grabbed"&&e.createdAt&&(w=window.setTimeout(()=>{d(0);},1500));}),ae(()=>{T!==null&&(cancelAnimationFrame(T),T=null),w!==null&&(window.clearTimeout(w),w=null),x=false;});let X={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},W=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:e.variant==="selection"?{border:"1px dashed rgba(210, 57, 192, 0.5)","background-color":"rgba(210, 57, 192, 0.08)"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.08)",transition:"opacity 0.3s ease-out"};return R(H,{get when(){return e.visible!==false},get children(){var D=lo();return se(K=>st(D,{...X,...W(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},K)),D}})};var co=te('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),Mn=e=>{let t;return vn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=co(),r=t;return typeof r=="function"?Re(r,n):t=n,se(o=>st(n,{...e.style},o)),n})()};var lt=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,d=Math.max(s,Math.min(e,l)),m=Math.max(a,Math.min(t,c));return {left:d,top:m}};var ct=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=E(e.x()),[i,s]=E(e.y()),a=e.x(),l=e.y(),c=null,d=false,m=()=>{let w=Ae(r(),a,t),y=Ae(i(),l,t);o(w),s(y),Math.abs(w-a)<n&&Math.abs(y-l)<n?c=null:c=requestAnimationFrame(m);},T=()=>{c===null&&(c=requestAnimationFrame(m));};return oe(()=>{if(a=e.x(),l=e.y(),!d){o(a),s(l),d=true;return}T();}),ae(()=>{c!==null&&(cancelAnimationFrame(c),c=null);}),{x:r,y:i}};var ut=e=>{let[t,n]=E(0);return oe($e(()=>e.visible,r=>{if(r!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.autoFadeOutAfter!==void 0){let o=setTimeout(()=>{n(0);},e.autoFadeOutAfter);ae(()=>clearTimeout(o));}})),t};var $n=(e,t,n,r,o)=>[{left:Math.round(e)+o,top:Math.round(t)+o},{left:Math.round(e)-n-o,top:Math.round(t)+o},{left:Math.round(e)+o,top:Math.round(t)-r-o},{left:Math.round(e)-n-o,top:Math.round(t)-r-o}];var uo=te("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),fo=te("<div style=margin-right:4px>Copied"),mo=te(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),go=te("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),po=te("<div style=margin-left:4px>to clipboard"),ho=te(`<div style="position:fixed;padding:2px 6px;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;display:flex;align-items:center;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden;text-overflow:ellipsis;white-space:nowrap">`),$t=e=>{let t,n=ct({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=ut({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:n.x(),top:n.y()};let l=window.innerWidth,c=window.innerHeight,d=$n(n.x(),n.y(),a.width,a.height,14);for(let T of d){let w=T.left>=8&&T.left+a.width<=l-8,y=T.top>=8&&T.top+a.height<=c-8;if(w&&y)return T}let m=lt(d[0].left,d[0].top,a.width,a.height);return m.left+=4,m.top+=4,m},s=()=>{let l=e.text.indexOf(" in ");return l===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,l),secondary:e.text.slice(l)}};return R(H,{get when(){return e.visible!==false},get children(){var a=ho(),l=t;return typeof l=="function"?Re(l,a):t=a,be(a,R(H,{get when(){return e.variant==="processing"},get children(){return R(Mn,{})}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return uo()}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return fo()}}),null),be(a,R(H,{get when(){return e.variant==="processing"},children:"Grabbing\u2026"}),null),be(a,R(H,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var c=mo();return be(c,()=>s().primary),c})(),R(H,{get when(){return Ee(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var c=go();return be(c,()=>s().secondary),c}})]}}),null),be(a,R(H,{get when(){return e.variant==="success"},get children(){return po()}}),null),se(c=>{var d=`${i().top}px`,m=`${i().left}px`,T=e.zIndex?.toString()??"2147483647",w=r();return d!==c.e&&he(a,"top",c.e=d),m!==c.t&&he(a,"left",c.t=m),T!==c.a&&he(a,"z-index",c.a=T),w!==c.o&&he(a,"opacity",c.o=w),c},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})};var bo=te('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Dn=e=>{let t=ut({visible:e.visible}),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return lt(s,a,o.width,o.height)};return R(H,{get when(){return e.visible!==false},get children(){var o=bo(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?Re(a,o):n=o,se(l=>{var c=`${r().top}px`,d=`${r().left}px`,m=t(),T=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&he(o,"top",l.e=c),d!==l.t&&he(o,"left",l.t=d),m!==l.a&&he(o,"opacity",l.a=m),T!==l.o&&he(s,"width",l.o=T),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var yo=te("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),Hn=e=>{let t,n=null,r=0,o=0,i=1,s=ct({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),a=()=>{t&&(i=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*i,t.height=o*i,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(i,i));},l=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(s.x(),0),n.lineTo(s.x(),o),n.moveTo(0,s.y()),n.lineTo(r,s.y()),n.stroke());};return oe(()=>{a(),l();let c=()=>{a(),l();};window.addEventListener("resize",c),ae(()=>{window.removeEventListener("resize",c);});}),oe(()=>{s.x(),s.y(),l();}),R(H,{get when(){return e.visible!==false},get children(){var c=yo(),d=t;return typeof d=="function"?Re(d,c):t=c,c}})};var Bn=e=>[R(H,{get when(){return Ee(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return R(at,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),R(H,{get when(){return Ee(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return R(Hn,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),R(H,{get when(){return Ee(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return R(at,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),R(ot,{get each(){return e.grabbedBoxes??[]},children:t=>R(at,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),R(ot,{get each(){return e.successLabels??[]},children:t=>R($t,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})}),R(H,{get when(){return Ee(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return R($t,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex}})}}),R(H,{get when(){return Ee(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return R(Dn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var Yn="0.5.16",pt=`bippy-${Yn}`,jn=Object.defineProperty,wo=Object.prototype.hasOwnProperty,Xe=()=>{},Gn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},Lt=(e=_e())=>"getFiberRoots"in e,Un=false,Vn,mt=(e=_e())=>Un?true:(typeof e.inject=="function"&&(Vn=e.inject.toString()),!!Vn?.includes("(injected)")),dt=new Set,Pe=new Set,Xn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:pt,checkDCE:Gn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),Pe.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,dt.forEach(s=>s())),i},on:Xe,onCommitFiberRoot:Xe,onCommitFiberUnmount:Xe,onPostCommitFiberRoot:Xe,renderers:t,supportsFiber:true,supportsFlight:true};try{jn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{Pe.add(l),s.renderers.set(c,l);}),gt(e));}}});let o=window.hasOwnProperty,i=!1;jn(window,"hasOwnProperty",{configurable:!0,value:function(...s){try{if(!i&&s[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,i=!0,-0}catch{}return o.apply(this,s)},writable:!0});}catch{gt(e);}return r},gt=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Gn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=pt,t._instrumentationIsActive=!1;let n=Lt(t);if(n||(t.on=Xe),t.renderers.size){t._instrumentationIsActive=!0,dt.forEach(i=>i());return}let r=t.inject,o=mt(t);o&&!n&&(Un=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return Pe.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,dt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||mt())&&e?.();}catch{}},Dt=()=>wo.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),_e=e=>Dt()?(gt(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Xn(e),zn=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ht=()=>{try{zn()&&_e();}catch{}};Ht();var ht=0,bt=1;var yt=5;var wt=11,Bt=13,qn=14,Tt=15,jt=16;var Vt=19;var St=26,xt=27,Yt=28,Gt=30;var Ct=e=>{switch(e.tag){case yt:case St:case xt:return true;default:return typeof e.type=="string"}},vt=e=>{switch(e.tag){case bt:case wt:case ht:case qn:case Tt:return true;default:return false}},Ut=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function He(e,t,n=false){if(!e)return null;let r=t(e);if(r instanceof Promise)return (async()=>{if(await r===true)return e;let i=n?e.return:e.child;for(;i;){let s=await zt(i,t,n);if(s)return s;i=n?null:i.sibling;}return null})();if(r===true)return e;let o=n?e.return:e.child;for(;o;){let i=Xt(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var Xt=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=Xt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},zt=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await zt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var qt=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?qt(t.type||t.render):null},Ie=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=qt(t);return r&&(r.displayName||r.name)||null};var Et=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of Wn){let r=He(n.current,o=>{if(o===e)return true});if(r)return r}return e};var ze=e=>{let t=_e();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Wn=new Set;var _o=Object.create,rr=Object.defineProperty,Oo=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyNames,ko=Object.getPrototypeOf,No=Object.prototype.hasOwnProperty,Po=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Io=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Fo(t),i=0,s=o.length,a;i<s;i++)a=o[i],!No.call(e,a)&&a!==n&&rr(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Oo(t,a))||r.enumerable});return e},Mo=(e,t,n)=>(n=e==null?{}:_o(ko(e)),Io(rr(n,"default",{value:e,enumerable:true}),e)),$o=()=>{let e=_e();for(let t of [...Array.from(Pe),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},Kn=e=>{for(let t of Pe){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},we=e=>`
|
|
10
|
-
in ${e}`,
|
|
11
|
-
`),
|
|
12
|
-
`),
|
|
13
|
-
${T[
|
|
9
|
+
var Dr=(e,t)=>e===t;var Hr=Symbol("solid-track"),nt={equals:Dr},Sn=En,ae=1,je=2,Tn={owned:null,cleanups:null,context:null,owner:null};var O=null,g=null,Pe=null,I=null,U=null,Q=null,ot=0;function Fe(e,t){let n=I,r=O,o=e.length===0,i=t===void 0?r:t,s=o?Tn:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?e:()=>e(()=>ie(()=>Te(s)));O=s,I=null;try{return ye(a,!0)}finally{I=n,O=r;}}function E(e,t){t=t?Object.assign({},nt,t):nt;let n={value:e,observers:null,observerSlots:null,comparator:t.equals||void 0},r=o=>(typeof o=="function"&&(o=o(n.value)),Cn(n,o));return [vn.bind(n),r]}function ne(e,t,n){let r=Pt(e,t,false,ae);Ye(r);}function re(e,t,n){Sn=Yr;let r=Pt(e,t,false,ae);(r.user=true),Q?Q.push(r):Ye(r);}function H(e,t,n){n=n?Object.assign({},nt,n):nt;let r=Pt(e,t,true,0);return r.observers=null,r.observerSlots=null,r.comparator=n.equals||void 0,Ye(r),vn.bind(r)}function ie(e){if(I===null)return e();let t=I;I=null;try{return Pe?Pe.untrack(e):e()}finally{I=t;}}function Ie(e,t,n){let r=Array.isArray(e),o;return s=>{let a;if(r){a=Array(e.length);for(let c=0;c<e.length;c++)a[c]=e[c]();}else a=e();let l=ie(()=>t(a,o,s));return o=a,l}}function xn(e){re(()=>ie(e));}function se(e){return O===null||(O.cleanups===null?O.cleanups=[e]:O.cleanups.push(e)),e}E(false);function vn(){let e=g;if(this.sources&&(this.state))if((this.state)===ae)Ye(this);else {let t=U;U=null,ye(()=>rt(this),false),U=t;}if(I){let t=this.observers?this.observers.length:0;I.sources?(I.sources.push(this),I.sourceSlots.push(t)):(I.sources=[this],I.sourceSlots=[t]),this.observers?(this.observers.push(I),this.observerSlots.push(I.sources.length-1)):(this.observers=[I],this.observerSlots=[I.sources.length-1]);}return e&&g.sources.has(this)?this.tValue:this.value}function Cn(e,t,n){let r=e.value;if(!e.comparator||!e.comparator(r,t)){e.value=t;e.observers&&e.observers.length&&ye(()=>{for(let o=0;o<e.observers.length;o+=1){let i=e.observers[o],s=g&&g.running;s&&g.disposed.has(i)||((s?!i.tState:!i.state)&&(i.pure?U.push(i):Q.push(i),i.observers&&Rn(i)),s?i.tState=ae:i.state=ae);}if(U.length>1e6)throw U=[],new Error},false);}return t}function Ye(e){if(!e.fn)return;Te(e);let t=ot;bn(e,e.value,t);}function bn(e,t,n){let r,o=O,i=I;I=O=e;try{r=e.fn(t);}catch(s){return e.pure&&((e.state=ae,e.owned&&e.owned.forEach(Te),e.owned=null)),e.updatedAt=n+1,It(s)}finally{I=i,O=o;}(!e.updatedAt||e.updatedAt<=n)&&(e.updatedAt!=null&&"observers"in e?Cn(e,r):e.value=r,e.updatedAt=n);}function Pt(e,t,n,r=ae,o){let i={fn:e,state:r,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:t,owner:O,context:O?O.context:null,pure:n};if(O===null||O!==Tn&&(O.owned?O.owned.push(i):O.owned=[i]),Pe);return i}function Ve(e){let t=g;if((e.state)===0)return;if((e.state)===je)return rt(e);if(e.suspense&&ie(e.suspense.inFallback))return e.suspense.effects.push(e);let n=[e];for(;(e=e.owner)&&(!e.updatedAt||e.updatedAt<ot);){(e.state)&&n.push(e);}for(let r=n.length-1;r>=0;r--){if(e=n[r],t);if((e.state)===ae)Ye(e);else if((e.state)===je){let o=U;U=null,ye(()=>rt(e,n[0]),false),U=o;}}}function ye(e,t){if(U)return e();let n=false;t||(U=[]),Q?n=true:Q=[],ot++;try{let r=e();return Vr(n),r}catch(r){n||(Q=null),U=null,It(r);}}function Vr(e){if(U&&(En(U),U=null),e)return;let n=Q;Q=null,n.length&&ye(()=>Sn(n),false);}function En(e){for(let t=0;t<e.length;t++)Ve(e[t]);}function Yr(e){let t,n=0;for(t=0;t<e.length;t++){let r=e[t];r.user?e[n++]=r:Ve(r);}for(t=0;t<n;t++)Ve(e[t]);}function rt(e,t){e.state=0;for(let r=0;r<e.sources.length;r+=1){let o=e.sources[r];if(o.sources){let i=o.state;i===ae?o!==t&&(!o.updatedAt||o.updatedAt<ot)&&Ve(o):i===je&&rt(o,t);}}}function Rn(e){for(let n=0;n<e.observers.length;n+=1){let r=e.observers[n];(!r.state)&&(r.state=je,r.pure?U.push(r):Q.push(r),r.observers&&Rn(r));}}function Te(e){let t;if(e.sources)for(;e.sources.length;){let n=e.sources.pop(),r=e.sourceSlots.pop(),o=n.observers;if(o&&o.length){let i=o.pop(),s=n.observerSlots.pop();r<o.length&&(i.sourceSlots[s]=r,o[r]=i,n.observerSlots[r]=s);}}if(e.tOwned){for(t=e.tOwned.length-1;t>=0;t--)Te(e.tOwned[t]);delete e.tOwned;}if(e.owned){for(t=e.owned.length-1;t>=0;t--)Te(e.owned[t]);e.owned=null;}if(e.cleanups){for(t=e.cleanups.length-1;t>=0;t--)e.cleanups[t]();e.cleanups=null;}e.state=0;}function Ur(e){return e instanceof Error?e:new Error(typeof e=="string"?e:"Unknown error",{cause:e})}function It(e,t=O){let r=Ur(e);throw r;}var zr=Symbol("fallback");function wn(e){for(let t=0;t<e.length;t++)e[t]();}function Xr(e,t,n={}){let r=[],o=[],i=[],s=0,a=t.length>1?[]:null;return se(()=>wn(i)),()=>{let l=e()||[],c=l.length,m,f;return l[Hr],ie(()=>{let h,w,S,Y,oe,z,q,D,W;if(c===0)s!==0&&(wn(i),i=[],r=[],o=[],s=0,a&&(a=[])),n.fallback&&(r=[zr],o[0]=Fe(fe=>(i[0]=fe,n.fallback())),s=1);else if(s===0){for(o=new Array(c),f=0;f<c;f++)r[f]=l[f],o[f]=Fe(T);s=c;}else {for(S=new Array(c),Y=new Array(c),a&&(oe=new Array(c)),z=0,q=Math.min(s,c);z<q&&r[z]===l[z];z++);for(q=s-1,D=c-1;q>=z&&D>=z&&r[q]===l[D];q--,D--)S[D]=o[q],Y[D]=i[q],a&&(oe[D]=a[q]);for(h=new Map,w=new Array(D+1),f=D;f>=z;f--)W=l[f],m=h.get(W),w[f]=m===void 0?-1:m,h.set(W,f);for(m=z;m<=q;m++)W=r[m],f=h.get(W),f!==void 0&&f!==-1?(S[f]=o[m],Y[f]=i[m],a&&(oe[f]=a[m]),f=w[f],h.set(W,f)):i[m]();for(f=z;f<c;f++)f in S?(o[f]=S[f],i[f]=Y[f],a&&(a[f]=oe[f],a[f](f))):o[f]=Fe(T);o=o.slice(0,s=c),r=l.slice(0);}return o});function T(h){if(i[f]=h,a){let[w,S]=E(f);return a[f]=S,t(l[f],w)}return t(l[f])}}}function C(e,t){return ie(()=>e(t||{}))}var Wr=e=>`Stale read from <${e}>.`;function it(e){let t="fallback"in e&&{fallback:()=>e.fallback};return H(Xr(()=>e.each,e.children,t||void 0))}function $(e){let t=e.keyed,n=H(()=>e.when,void 0,void 0),r=t?n:H(n,void 0,{equals:(o,i)=>!o==!i});return H(()=>{let o=r();if(o){let i=e.children;return typeof i=="function"&&i.length>0?ie(()=>i(t?o:()=>{if(!ie(r))throw Wr("Show");return n()})):i}return e.fallback},void 0,void 0)}var he=e=>H(()=>e());function Qr(e,t,n){let r=n.length,o=t.length,i=r,s=0,a=0,l=t[o-1].nextSibling,c=null;for(;s<o||a<i;){if(t[s]===n[a]){s++,a++;continue}for(;t[o-1]===n[i-1];)o--,i--;if(o===s){let m=i<r?a?n[a-1].nextSibling:n[i-a]:l;for(;a<i;)e.insertBefore(n[a++],m);}else if(i===a)for(;s<o;)(!c||!c.has(t[s]))&&t[s].remove(),s++;else if(t[s]===n[i-1]&&n[a]===t[o-1]){let m=t[--o].nextSibling;e.insertBefore(n[a++],t[s++].nextSibling),e.insertBefore(n[--i],m),t[o]=n[i];}else {if(!c){c=new Map;let f=a;for(;f<i;)c.set(n[f],f++);}let m=c.get(t[s]);if(m!=null)if(a<m&&m<i){let f=s,T=1,h;for(;++f<o&&f<i&&!((h=c.get(t[f]))==null||h!==m+T);)T++;if(T>m-a){let w=t[s];for(;a<m;)e.insertBefore(n[a++],w);}else e.replaceChild(n[a++],t[s++]);}else s++;else t[s++].remove();}}}function On(e,t,n,r={}){let o;return Fe(i=>{o=i,t===document?e():le(t,e(),t.firstChild?null:void 0,n);},r.owner),()=>{o(),t.textContent="";}}function X(e,t,n,r){let o,i=()=>{let a=document.createElement("template");return a.innerHTML=e,a.content.firstChild},s=()=>(o||(o=i())).cloneNode(true);return s.cloneNode=s,s}function Jr(e,t,n){(e.removeAttribute(t));}function at(e,t,n){if(!t)return n?Jr(e,"style"):t;let r=e.style;if(typeof t=="string")return r.cssText=t;typeof n=="string"&&(r.cssText=n=void 0),n||(n={}),t||(t={});let o,i;for(i in n)t[i]==null&&r.removeProperty(i),delete n[i];for(i in t)o=t[i],o!==n[i]&&(r.setProperty(i,o),n[i]=o);return n}function ce(e,t,n){n!=null?e.style.setProperty(t,n):e.style.removeProperty(t);}function xe(e,t,n){return ie(()=>e(t,n))}function le(e,t,n,r){if(n!==void 0&&!r&&(r=[]),typeof t!="function")return st(e,t,r,n);ne(o=>st(e,t(),o,n),r);}function st(e,t,n,r,o){for(;typeof n=="function";)n=n();if(t===n)return n;let s=typeof t,a=r!==void 0;if(e=a&&n[0]&&n[0].parentNode||e,s==="string"||s==="number"){if(s==="number"&&(t=t.toString(),t===n))return n;if(a){let l=n[0];l&&l.nodeType===3?l.data!==t&&(l.data=t):l=document.createTextNode(t),n=$e(e,n,r,l);}else n!==""&&typeof n=="string"?n=e.firstChild.data=t:n=e.textContent=t;}else if(t==null||s==="boolean"){n=$e(e,n,r);}else {if(s==="function")return ne(()=>{let l=t();for(;typeof l=="function";)l=l();n=st(e,l,n,r);}),()=>n;if(Array.isArray(t)){let l=[],c=n&&Array.isArray(n);if($t(l,t,n,o))return ne(()=>n=st(e,l,n,r,true)),()=>n;if(l.length===0){if(n=$e(e,n,r),a)return n}else c?n.length===0?An(e,l,r):Qr(e,n,l):(n&&$e(e),An(e,l));n=l;}else if(t.nodeType){if(Array.isArray(n)){if(a)return n=$e(e,n,r,t);$e(e,n,null,t);}else n==null||n===""||!e.firstChild?e.appendChild(t):e.replaceChild(t,e.firstChild);n=t;}}return n}function $t(e,t,n,r){let o=false;for(let i=0,s=t.length;i<s;i++){let a=t[i],l=n&&n[e.length],c;if(!(a==null||a===true||a===false))if((c=typeof a)=="object"&&a.nodeType)e.push(a);else if(Array.isArray(a))o=$t(e,a,l)||o;else if(c==="function")if(r){for(;typeof a=="function";)a=a();o=$t(e,Array.isArray(a)?a:[a],Array.isArray(l)?l:[l])||o;}else e.push(a),o=true;else {let m=String(a);l&&l.nodeType===3&&l.data===m?e.push(l):e.push(document.createTextNode(m));}}return o}function An(e,t,n=null){for(let r=0,o=t.length;r<o;r++)e.insertBefore(t[r],n);}function $e(e,t,n,r){if(n===void 0)return e.textContent="";let o=r||document.createTextNode("");if(t.length){let i=false;for(let s=t.length-1;s>=0;s--){let a=t[s];if(o!==a){let l=a.parentNode===e;!i&&!s?l?e.replaceChild(o,a):e.insertBefore(o,n):l&&a.remove();}else i=true;}}else e.insertBefore(o,n);return [o]}var eo=["input","textarea","select","searchbox","slider","spinbutton","menuitem","menuitemcheckbox","menuitemradio","option","radio","textbox"],to=e=>!!e.tagName&&!e.tagName.startsWith("-")&&e.tagName.includes("-"),no=e=>Array.isArray(e),ro=(e,t=false)=>{let{composed:n,target:r}=e,o,i;if(r instanceof HTMLElement&&to(r)&&n){let a=e.composedPath()[0];a instanceof HTMLElement&&(o=a.tagName,i=a.role);}else r instanceof HTMLElement&&(o=r.tagName,i=r.role);return no(t)?!!(o&&t&&t.some(s=>typeof o=="string"&&s.toLowerCase()===o.toLowerCase()||s===i)):!!(o&&t&&t)},kn=e=>ro(e,eo);var Me="data-react-grab",Nn=()=>{let e=document.querySelector(`[${Me}]`);if(e){let i=e.shadowRoot?.querySelector(`[${Me}]`);if(i instanceof HTMLDivElement&&e.shadowRoot)return i}let t=document.createElement("div");t.setAttribute(Me,"true"),t.style.zIndex="2147483646",t.style.position="fixed",t.style.top="0",t.style.left="0";let n=t.attachShadow({mode:"open"}),r=document.createElement("div");return r.setAttribute(Me,"true"),n.appendChild(r),(document.body??document.documentElement).appendChild(t),r};var ve=(e,t,n)=>e+(t-e)*n;var io=X("<div>"),lt=e=>{let[t,n]=E(e.bounds.x),[r,o]=E(e.bounds.y),[i,s]=E(e.bounds.width),[a,l]=E(e.bounds.height),[c,m]=E(1),f=false,T=null,h=null,w=e.bounds,S=false,Y=()=>e.lerpFactor!==void 0?e.lerpFactor:e.variant==="drag"?.7:.95,oe=()=>{if(S)return;S=true;let D=()=>{let W=ve(t(),w.x,Y()),fe=ve(r(),w.y,Y()),Re=ve(i(),w.width,Y()),Se=ve(a(),w.height,Y());n(W),o(fe),s(Re),l(Se),Math.abs(W-w.x)<.5&&Math.abs(fe-w.y)<.5&&Math.abs(Re-w.width)<.5&&Math.abs(Se-w.height)<.5?(T=null,S=false):T=requestAnimationFrame(D);};T=requestAnimationFrame(D);};re(Ie(()=>e.bounds,D=>{if(w=D,!f){n(w.x),o(w.y),s(w.width),l(w.height),f=true;return}oe();})),re(()=>{e.variant==="grabbed"&&e.createdAt&&(h=window.setTimeout(()=>{m(0);},1500));}),se(()=>{T!==null&&(cancelAnimationFrame(T),T=null),h!==null&&(window.clearTimeout(h),h=null),S=false;});let z={position:"fixed","box-sizing":"border-box","pointer-events":e.variant==="drag"?"none":"auto","z-index":e.variant==="grabbed"?"2147483645":"2147483646"},q=()=>e.variant==="drag"?{border:"1px dashed rgba(210, 57, 192, 0.4)","background-color":"rgba(210, 57, 192, 0.05)","will-change":"transform, width, height",contain:"layout paint size",cursor:"crosshair"}:e.variant==="selection"?{border:"1px dashed rgba(210, 57, 192, 0.5)","background-color":"rgba(210, 57, 192, 0.08)"}:{border:"1px solid rgb(210, 57, 192)","background-color":"rgba(210, 57, 192, 0.08)",transition:"opacity 0.3s ease-out"};return C($,{get when(){return e.visible!==false},get children(){var D=io();return ne(W=>at(D,{...z,...q(),top:`${r()}px`,left:`${t()}px`,width:`${i()}px`,height:`${a()}px`,"border-radius":e.bounds.borderRadius,transform:e.bounds.transform,opacity:c()},W)),D}})};var so=X('<span style="display:inline-block;width:8px;height:8px;border:1.5px solid rgb(210, 57, 192);border-top-color:transparent;border-radius:50%;margin-right:4px;vertical-align:middle">'),Pn=e=>{let t;return xn(()=>{t&&t.animate([{transform:"rotate(0deg)"},{transform:"rotate(360deg)"}],{duration:600,easing:"linear",iterations:1/0});}),(()=>{var n=so(),r=t;return typeof r=="function"?xe(r,n):t=n,ne(o=>at(n,{...e.style},o)),n})()};var ct=(e,t,n,r)=>{let o=window.innerWidth,i=window.innerHeight,s=8,a=8,l=o-n-8,c=i-r-8,m=Math.max(s,Math.min(e,l)),f=Math.max(a,Math.min(t,c));return {left:m,top:f}};var ut=e=>{let t=e.lerpFactor??.3,n=e.convergenceThreshold??.5,[r,o]=E(e.x()),[i,s]=E(e.y()),a=e.x(),l=e.y(),c=null,m=false,f=()=>{let h=ve(r(),a,t),w=ve(i(),l,t);o(h),s(w),Math.abs(h-a)<n&&Math.abs(w-l)<n?c=null:c=requestAnimationFrame(f);},T=()=>{c===null&&(c=requestAnimationFrame(f));};return re(()=>{if(a=e.x(),l=e.y(),!m){o(a),s(l),m=true;return}T();}),se(()=>{c!==null&&(cancelAnimationFrame(c),c=null);}),{x:r,y:i}};var ft=e=>{let[t,n]=E(0);return re(Ie(()=>e.visible,r=>{if(r!==false)requestAnimationFrame(()=>{n(1);});else {n(0);return}if(e.autoFadeOutAfter!==void 0){let o=setTimeout(()=>{n(0);},e.autoFadeOutAfter);se(()=>clearTimeout(o));}})),t};var In=(e,t,n,r,o)=>[{left:Math.round(e)+o,top:Math.round(t)+o},{left:Math.round(e)-n-o,top:Math.round(t)+o},{left:Math.round(e)+o,top:Math.round(t)-r-o},{left:Math.round(e)-n-o,top:Math.round(t)-r-o}];var ao=X('<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">'),lo=X("<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713"),co=X("<div style=margin-right:4px>Copied"),uo=X(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`),fo=X("<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>"),mo=X("<div style=margin-left:4px>to clipboard"),go=X("<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select"),ho=X(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`),Mt=e=>{let t,n=ut({x:()=>e.x,y:()=>e.y,lerpFactor:.3}),r=ft({visible:e.visible,autoFadeOutAfter:e.variant==="success"?1700:void 0}),o=()=>t?.getBoundingClientRect(),i=()=>{let a=o();if(!a)return {left:n.x(),top:n.y()};let l=window.innerWidth,c=window.innerHeight,m=In(n.x(),n.y(),a.width,a.height,14);for(let T of m){let h=T.left>=8&&T.left+a.width<=l-8,w=T.top>=8&&T.top+a.height<=c-8;if(h&&w)return T}let f=ct(m[0].left,m[0].top,a.width,a.height);return f.left+=4,f.top+=4,f},s=()=>{let l=e.text.indexOf(" in ");return l===-1?{primary:e.text,secondary:""}:{primary:e.text.slice(0,l),secondary:e.text.slice(l)}};return C($,{get when(){return e.visible!==false},get children(){var a=ho(),l=a.firstChild,c=l.firstChild,m=t;return typeof m=="function"?xe(m,a):t=a,le(a,C($,{get when(){return he(()=>e.variant==="processing")()&&e.progress!==void 0},get children(){var f=ao();return ne(T=>ce(f,"width",`${Math.min(100,Math.max(0,(e.progress??0)*100))}%`)),f}}),l),le(c,C($,{get when(){return e.variant==="processing"},get children(){return C(Pn,{})}}),null),le(c,C($,{get when(){return e.variant==="success"},get children(){return lo()}}),null),le(c,C($,{get when(){return e.variant==="success"},get children(){return co()}}),null),le(c,C($,{get when(){return e.variant==="processing"},children:"Please wait\u2026"}),null),le(c,C($,{get when(){return e.variant!=="processing"},get children(){return [(()=>{var f=uo();return le(f,()=>s().primary),f})(),C($,{get when(){return he(()=>e.variant==="hover")()&&s().secondary!==""},get children(){var f=fo();return le(f,()=>s().secondary),f}})]}}),null),le(c,C($,{get when(){return e.variant==="success"},get children(){return mo()}}),null),le(l,C($,{get when(){return he(()=>e.variant==="hover")()&&e.showHint},get children(){return go()}}),null),ne(f=>{var T=`${i().top}px`,h=`${i().left}px`,w=e.zIndex?.toString()??"2147483647",S=r();return T!==f.e&&ce(a,"top",f.e=T),h!==f.t&&ce(a,"left",f.t=h),w!==f.a&&ce(a,"z-index",f.a=w),S!==f.o&&ce(a,"opacity",f.o=S),f},{e:void 0,t:void 0,a:void 0,o:void 0}),a}})};var po=X('<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">'),Mn=e=>{let t=ft({visible:e.visible}),n,r=()=>{let o=n?.getBoundingClientRect();if(!o)return {left:e.mouseX,top:e.mouseY};let i=window.innerHeight,s=e.mouseX-o.width/2,a=e.mouseY+14+o.height+8>i?e.mouseY-o.height-14:e.mouseY+14;return ct(s,a,o.width,o.height)};return C($,{get when(){return e.visible!==false},get children(){var o=po(),i=o.firstChild,s=i.firstChild,a=n;return typeof a=="function"?xe(a,o):n=o,ne(l=>{var c=`${r().top}px`,m=`${r().left}px`,f=t(),T=`${Math.min(100,Math.max(0,e.progress*100))}%`;return c!==l.e&&ce(o,"top",l.e=c),m!==l.t&&ce(o,"left",l.t=m),f!==l.a&&ce(o,"opacity",l.a=f),T!==l.o&&ce(s,"width",l.o=T),l},{e:void 0,t:void 0,a:void 0,o:void 0}),o}})};var bo=X("<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>"),Ln=e=>{let t,n=null,r=0,o=0,i=1,s=ut({x:()=>e.mouseX,y:()=>e.mouseY,lerpFactor:.3}),a=()=>{t&&(i=Math.max(window.devicePixelRatio||1,2),r=window.innerWidth,o=window.innerHeight,t.width=r*i,t.height=o*i,t.style.width=`${r}px`,t.style.height=`${o}px`,n=t.getContext("2d"),n&&n.scale(i,i));},l=()=>{n&&(n.clearRect(0,0,r,o),n.strokeStyle="rgba(210, 57, 192)",n.lineWidth=1,n.beginPath(),n.moveTo(s.x(),0),n.lineTo(s.x(),o),n.moveTo(0,s.y()),n.lineTo(r,s.y()),n.stroke());};return re(()=>{a(),l();let c=()=>{a(),l();};window.addEventListener("resize",c),se(()=>{window.removeEventListener("resize",c);});}),re(()=>{s.x(),s.y(),l();}),C($,{get when(){return e.visible!==false},get children(){var c=bo(),m=t;return typeof m=="function"?xe(m,c):t=c,c}})};var Dn=e=>[C($,{get when(){return he(()=>!!e.selectionVisible)()&&e.selectionBounds},get children(){return C(lt,{variant:"selection",get bounds(){return e.selectionBounds},get visible(){return e.selectionVisible}})}}),C($,{get when(){return he(()=>e.crosshairVisible===true&&e.mouseX!==void 0)()&&e.mouseY!==void 0},get children(){return C(Ln,{get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},visible:true})}}),C($,{get when(){return he(()=>!!e.dragVisible)()&&e.dragBounds},get children(){return C(lt,{variant:"drag",get bounds(){return e.dragBounds},get visible(){return e.dragVisible}})}}),C(it,{get each(){return e.grabbedBoxes??[]},children:t=>C(lt,{variant:"grabbed",get bounds(){return t.bounds},get createdAt(){return t.createdAt}})}),C($,{get when(){return e.labelVariant!=="processing"},get children(){return C(it,{get each(){return e.successLabels??[]},children:t=>C(Mt,{variant:"success",get text(){return t.text},get x(){return e.mouseX??0},get y(){return e.mouseY??0}})})}}),C($,{get when(){return he(()=>!!(e.labelVisible&&e.labelVariant&&e.labelText&&e.labelX!==void 0))()&&e.labelY!==void 0},get children(){return C(Mt,{get variant(){return e.labelVariant},get text(){return e.labelText},get x(){return e.labelX},get y(){return e.labelY},get visible(){return e.labelVisible},get zIndex(){return e.labelZIndex},get progress(){return e.progress},get showHint(){return e.labelShowHint}})}}),C($,{get when(){return he(()=>!!(e.progressVisible&&e.progress!==void 0&&e.mouseX!==void 0))()&&e.mouseY!==void 0},get children(){return C(Mn,{get progress(){return e.progress},get mouseX(){return e.mouseX},get mouseY(){return e.mouseY},get visible(){return e.progressVisible}})}})];var jn="0.5.16",pt=`bippy-${jn}`,Hn=Object.defineProperty,yo=Object.prototype.hasOwnProperty,ze=()=>{},Vn=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout(()=>{throw Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")});}catch{}},Lt=(e=Ce())=>"getFiberRoots"in e,Gn=false,Bn,gt=(e=Ce())=>Gn?true:(typeof e.inject=="function"&&(Bn=e.inject.toString()),!!Bn?.includes("(injected)")),mt=new Set,ke=new Set,Yn=e=>{let t=new Map,n=0,r={_instrumentationIsActive:false,_instrumentationSource:pt,checkDCE:Vn,hasUnsupportedRendererAttached:false,inject(o){let i=++n;return t.set(i,o),ke.add(o),r._instrumentationIsActive||(r._instrumentationIsActive=true,mt.forEach(s=>s())),i},on:ze,onCommitFiberRoot:ze,onCommitFiberUnmount:ze,onPostCommitFiberRoot:ze,renderers:t,supportsFiber:true,supportsFlight:true};try{Hn(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{configurable:!0,enumerable:!0,get(){return r},set(s){if(s&&typeof s=="object"){let a=r.renderers;r=s,a.size>0&&(a.forEach((l,c)=>{ke.add(l),s.renderers.set(c,l);}),ht(e));}}});let o=window.hasOwnProperty,i=!1;Hn(window,"hasOwnProperty",{configurable:!0,value:function(...s){try{if(!i&&s[0]==="__REACT_DEVTOOLS_GLOBAL_HOOK__")return globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__=void 0,i=!0,-0}catch{}return o.apply(this,s)},writable:!0});}catch{ht(e);}return r},ht=e=>{try{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!t)return;if(!t._instrumentationSource){t.checkDCE=Vn,t.supportsFiber=!0,t.supportsFlight=!0,t.hasUnsupportedRendererAttached=!1,t._instrumentationSource=pt,t._instrumentationIsActive=!1;let n=Lt(t);if(n||(t.on=ze),t.renderers.size){t._instrumentationIsActive=!0,mt.forEach(i=>i());return}let r=t.inject,o=gt(t);o&&!n&&(Gn=!0,t.inject({scheduleRefresh(){}})&&(t._instrumentationIsActive=!0)),t.inject=i=>{let s=r(i);return ke.add(i),o&&t.renderers.set(s,i),t._instrumentationIsActive=!0,mt.forEach(a=>a()),s};}(t.renderers.size||t._instrumentationIsActive||gt())&&e?.();}catch{}},Dt=()=>yo.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),Ce=e=>Dt()?(ht(e),globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__):Yn(e),Un=()=>!!(typeof window<"u"&&(window.document?.createElement||window.navigator?.product==="ReactNative")),Ht=()=>{try{Un()&&Ce();}catch{}};Ht();var bt=0,yt=1;var wt=5;var St=11,Bt=13,zn=14,Tt=15,jt=16;var Vt=19;var xt=26,vt=27,Gt=28,Yt=30;var Ct=e=>{switch(e.tag){case wt:case xt:case vt:return true;default:return typeof e.type=="string"}},Et=e=>{switch(e.tag){case yt:case St:case bt:case zn:case Tt:return true;default:return false}},Ut=e=>!e||typeof e!="object"?true:"pendingProps"in e&&!("containerInfo"in e);function Le(e,t,n=false){if(!e)return null;let r=t(e);if(r instanceof Promise)return (async()=>{if(await r===true)return e;let i=n?e.return:e.child;for(;i;){let s=await Xt(i,t,n);if(s)return s;i=n?null:i.sibling;}return null})();if(r===true)return e;let o=n?e.return:e.child;for(;o;){let i=zt(o,t,n);if(i)return i;o=n?null:o.sibling;}return null}var zt=(e,t,n=false)=>{if(!e)return null;if(t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=zt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null},Xt=async(e,t,n=false)=>{if(!e)return null;if(await t(e)===true)return e;let r=n?e.return:e.child;for(;r;){let o=await Xt(r,t,n);if(o)return o;r=n?null:r.sibling;}return null};var qt=e=>{let t=e;return typeof t=="function"?t:typeof t=="object"&&t?qt(t.type||t.render):null},Ne=e=>{let t=e;if(typeof t=="string")return t;if(typeof t!="function"&&!(typeof t=="object"&&t))return null;let n=t.displayName||t.name||null;if(n)return n;let r=qt(t);return r&&(r.displayName||r.name)||null};var Rt=e=>{let t=e.alternate;if(!t)return e;if(t.actualStartTime&&e.actualStartTime)return t.actualStartTime>e.actualStartTime?t:e;for(let n of Xn){let r=Le(n.current,o=>{if(o===e)return true});if(r)return r}return e};var Xe=e=>{let t=Ce();for(let n of t.renderers.values())try{let r=n.findFiberByHostInstance?.(e);if(r)return r}catch{}if(typeof e=="object"&&e){if("_reactRootContainer"in e)return e._reactRootContainer?._internalRoot?.current?.child;for(let n in e)if(n.startsWith("__reactContainer$")||n.startsWith("__reactInternalInstance$")||n.startsWith("__reactFiber"))return e[n]||null}return null},Xn=new Set;var _o=Object.create,tr=Object.defineProperty,Ao=Object.getOwnPropertyDescriptor,Oo=Object.getOwnPropertyNames,Fo=Object.getPrototypeOf,ko=Object.prototype.hasOwnProperty,No=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Po=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(var o=Oo(t),i=0,s=o.length,a;i<s;i++)a=o[i],!ko.call(e,a)&&a!==n&&tr(e,a,{get:(l=>t[l]).bind(null,a),enumerable:!(r=Ao(t,a))||r.enumerable});return e},Io=(e,t,n)=>(n=e==null?{}:_o(Fo(e)),Po(tr(n,"default",{value:e,enumerable:true}),e)),$o=()=>{let e=Ce();for(let t of [...Array.from(ke),...Array.from(e.renderers.values())]){let n=t.currentDispatcherRef;if(n&&typeof n=="object")return "H"in n?n.H:n.current}return null},qn=e=>{for(let t of ke){let n=t.currentDispatcherRef;n&&typeof n=="object"&&("H"in n?n.H=e:n.current=e);}},we=e=>`
|
|
10
|
+
in ${e}`,Mo=(e,t)=>{let n=we(e);return t&&(n+=` (at ${t})`),n},Wt=false,Kt=(e,t)=>{if(!e||Wt)return "";let n=Error.prepareStackTrace;Error.prepareStackTrace=void 0,Wt=true;let r=$o();qn(null);let o=console.error,i=console.warn;console.error=()=>{},console.warn=()=>{};try{let l={DetermineComponentFrameRoot(){let T;try{if(t){let h=function(){throw Error()};if(Object.defineProperty(h.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(h,[]);}catch(w){T=w;}Reflect.construct(e,[],h);}else {try{h.call();}catch(w){T=w;}e.call(h.prototype);}}else {try{throw Error()}catch(w){T=w;}let h=e();h&&typeof h.catch=="function"&&h.catch(()=>{});}}catch(h){if(h instanceof Error&&T instanceof Error&&typeof h.stack=="string")return [h.stack,T.stack]}return [null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot",Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name")?.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});let[m,f]=l.DetermineComponentFrameRoot();if(m&&f){let T=m.split(`
|
|
11
|
+
`),h=f.split(`
|
|
12
|
+
`),w=0,S=0;for(;w<T.length&&!T[w].includes("DetermineComponentFrameRoot");)w++;for(;S<h.length&&!h[S].includes("DetermineComponentFrameRoot");)S++;if(w===T.length||S===h.length)for(w=T.length-1,S=h.length-1;w>=1&&S>=0&&T[w]!==h[S];)S--;for(;w>=1&&S>=0;w--,S--)if(T[w]!==h[S]){if(w!==1||S!==1)do if(w--,S--,S<0||T[w]!==h[S]){let Y=`
|
|
13
|
+
${T[w].replace(" at new "," at ")}`,oe=Ne(e);return oe&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",oe)),Y}while(w>=1&&S>=0);break}}}finally{Wt=false,Error.prepareStackTrace=n,qn(r),console.error=o,console.warn=i;}let s=e?Ne(e):"";return s?we(s):""},Lo=(e,t)=>{let n=e.tag,r="";switch(n){case Gt:r=we("Activity");break;case yt:r=Kt(e.type,true);break;case St:r=Kt(e.type.render,false);break;case bt:case Tt:r=Kt(e.type,false);break;case wt:case xt:case vt:r=we(e.type);break;case jt:r=we("Lazy");break;case Bt:r=e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");break;case Vt:r=we("SuspenseList");break;case Yt:r=we("ViewTransition");break;default:return ""}return r},Do=e=>{try{let t="",n=e,r=null;do{t+=Lo(n,r);let o=n._debugInfo;if(o&&Array.isArray(o))for(let i=o.length-1;i>=0;i--){let s=o[i];typeof s.name=="string"&&(t+=Mo(s.name,s.env));}r=n,n=n.return;}while(n);return t}catch(t){return t instanceof Error?`
|
|
14
14
|
Error generating stack: ${t.message}
|
|
15
|
-
${t.stack}`:""}},
|
|
15
|
+
${t.stack}`:""}},Ho=e=>{let t=Error.prepareStackTrace;Error.prepareStackTrace=void 0;let n=e;if(!n)return "";Error.prepareStackTrace=t,n.startsWith(`Error: react-stack-top-frame
|
|
16
16
|
`)&&(n=n.slice(29));let r=n.indexOf(`
|
|
17
17
|
`);if(r!==-1&&(n=n.slice(r+1)),r=Math.max(n.indexOf("react_stack_bottom_frame"),n.indexOf("react-stack-bottom-frame")),r!==-1&&(r=n.lastIndexOf(`
|
|
18
|
-
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},
|
|
19
|
-
`),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let i=
|
|
20
|
-
`).filter(r=>!!r.match(
|
|
21
|
-
`).filter(r=>!r.match(
|
|
22
|
-
`),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(
|
|
23
|
-
`)},
|
|
24
|
-
(${
|
|
25
|
-
${
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
${f}
|
|
29
|
-
|
|
18
|
+
`,r)),r!==-1)n=n.slice(0,r);else return "";return n},Bo=/(^|@)\S+:\d+/,nr=/^\s*at .*(\S+:\d+|\(native\))/m,jo=/^(eval@)?(\[native code\])?$/;var Vo=(e,t)=>{if(t?.includeInElement!==false){let n=e.split(`
|
|
19
|
+
`),r=[];for(let o of n)if(/^\s*at\s+/.test(o)){let i=Wn(o,void 0)[0];i&&r.push(i);}else if(/^\s*in\s+/.test(o)){let i=o.replace(/^\s*in\s+/,"").replace(/\s*\(at .*\)$/,"");r.push({function:i,raw:o});}else if(o.match(Bo)){let i=Kn(o,void 0)[0];i&&r.push(i);}return Zt(r,t)}return e.match(nr)?Wn(e,t):Kn(e,t)},rr=e=>{if(!e.includes(":"))return [e,void 0,void 0];let t=/(.+?)(?::(\d+))?(?::(\d+))?$/,n=t.exec(e.replace(/[()]/g,""));return [n[1],n[2]||void 0,n[3]||void 0]},Zt=(e,t)=>t&&t.slice!=null?Array.isArray(t.slice)?e.slice(t.slice[0],t.slice[1]):e.slice(0,t.slice):e;var Wn=(e,t)=>Zt(e.split(`
|
|
20
|
+
`).filter(r=>!!r.match(nr)),t).map(r=>{let o=r;o.includes("(eval ")&&(o=o.replace(/eval code/g,"eval").replace(/(\(eval at [^()]*)|(,.*$)/g,""));let i=o.replace(/^\s+/,"").replace(/\(eval code/g,"(").replace(/^.*?\s+/,""),s=i.match(/ (\(.+\)$)/);i=s?i.replace(s[0],""):i;let a=rr(s?s[1]:i),l=s&&i||void 0,c=["eval","<anonymous>"].includes(a[0])?void 0:a[0];return {function:l,file:c,line:a[1]?+a[1]:void 0,col:a[2]?+a[2]:void 0,raw:o}});var Kn=(e,t)=>Zt(e.split(`
|
|
21
|
+
`).filter(r=>!r.match(jo)),t).map(r=>{let o=r;if(o.includes(" > eval")&&(o=o.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g,":$1")),!o.includes("@")&&!o.includes(":"))return {function:o};{let i=/(([^\n\r"\u2028\u2029]*".[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*(?:@[^\n\r"\u2028\u2029]*"[^\n\r@\u2028\u2029]*)*(?:[\n\r\u2028\u2029][^@]*)?)?[^@]*)@/,s=o.match(i),a=s&&s[1]?s[1]:void 0,l=rr(o.replace(i,""));return {function:a,file:l[0],line:l[1]?+l[1]:void 0,col:l[2]?+l[2]:void 0,raw:o}}});var Go=No((e,t)=>{(function(n,r){typeof e=="object"&&t!==void 0?r(e):typeof define=="function"&&define.amd?define(["exports"],r):(n=typeof globalThis<"u"?globalThis:n||self,r(n.sourcemapCodec={}));})(void 0,function(n){let r=44,o=59,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=new Uint8Array(64),a=new Uint8Array(128);for(let y=0;y<i.length;y++){let p=i.charCodeAt(y);s[y]=p,a[p]=y;}function l(y,p){let u=0,b=0,v=0;do{let P=y.next();v=a[P],u|=(v&31)<<b,b+=5;}while(v&32);let _=u&1;return u>>>=1,_&&(u=-2147483648|-u),p+u}function c(y,p,u){let b=p-u;b=b<0?-b<<1|1:b<<1;do{let v=b&31;b>>>=5,b>0&&(v|=32),y.write(s[v]);}while(b>0);return p}function m(y,p){return y.pos>=p?false:y.peek()!==r}let f=1024*16,T=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(y){return Buffer.from(y.buffer,y.byteOffset,y.byteLength).toString()}}:{decode(y){let p="";for(let u=0;u<y.length;u++)p+=String.fromCharCode(y[u]);return p}};class h{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(f);}write(p){let{buffer:u}=this;u[this.pos++]=p,this.pos===f&&(this.out+=T.decode(u),this.pos=0);}flush(){let{buffer:p,out:u,pos:b}=this;return b>0?u+T.decode(p.subarray(0,b)):u}}class w{constructor(p){this.pos=0,this.buffer=p;}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(p){let{buffer:u,pos:b}=this,v=u.indexOf(p,b);return v===-1?u.length:v}}let S=[];function Y(y){let{length:p}=y,u=new w(y),b=[],v=[],_=0;for(;u.pos<p;u.pos++){_=l(u,_);let P=l(u,0);if(!m(u,p)){let V=v.pop();V[2]=_,V[3]=P;continue}let F=l(u,0),M=l(u,0),L=M&1,N=L?[_,P,0,0,F,l(u,0)]:[_,P,0,0,F],j=S;if(m(u,p)){j=[];do{let V=l(u,0);j.push(V);}while(m(u,p))}N.vars=j,b.push(N),v.push(N);}return b}function oe(y){let p=new h;for(let u=0;u<y.length;)u=z(y,u,p,[0]);return p.flush()}function z(y,p,u,b){let v=y[p],{0:_,1:P,2:F,3:M,4:L,vars:N}=v;p>0&&u.write(r),b[0]=c(u,_,b[0]),c(u,P,0),c(u,L,0);let j=v.length===6?1:0;c(u,j,0),v.length===6&&c(u,v[5],0);for(let V of N)c(u,V,0);for(p++;p<y.length;){let V=y[p],{0:A,1:k}=V;if(A>F||A===F&&k>=M)break;p=z(y,p,u,b);}return u.write(r),b[0]=c(u,F,b[0]),c(u,M,0),p}function q(y){let{length:p}=y,u=new w(y),b=[],v=[],_=0,P=0,F=0,M=0,L=0,N=0,j=0,V=0;do{let A=u.indexOf(";"),k=0;for(;u.pos<A;u.pos++){if(k=l(u,k),!m(u,A)){let te=v.pop();te[2]=_,te[3]=k;continue}let J=l(u,0),de=J&1,K=J&2,ee=J&4,me=null,He=S,pe;if(de){let te=l(u,P);F=l(u,P===te?F:0),P=te,pe=[_,k,0,0,te,F];}else pe=[_,k,0,0];if(pe.isScope=!!ee,K){let te=M,be=L;M=l(u,M);let _e=te===M;L=l(u,_e?L:0),N=l(u,_e&&be===L?N:0),me=[M,L,N];}if(pe.callsite=me,m(u,A)){He=[];do{j=_,V=k;let te=l(u,0),be;if(te<-1){be=[[l(u,0)]];for(let _e=-1;_e>te;_e--){let Qe=j;j=l(u,j),V=l(u,j===Qe?V:0);let Je=l(u,0);be.push([Je,j,V]);}}else be=[[te]];He.push(be);}while(m(u,A))}pe.bindings=He,b.push(pe),v.push(pe);}_++,u.pos=A+1;}while(u.pos<p);return b}function D(y){if(y.length===0)return "";let p=new h;for(let u=0;u<y.length;)u=W(y,u,p,[0,0,0,0,0,0,0]);return p.flush()}function W(y,p,u,b){let v=y[p],{0:_,1:P,2:F,3:M,isScope:L,callsite:N,bindings:j}=v;b[0]<_?(fe(u,b[0],_),b[0]=_,b[1]=0):p>0&&u.write(r),b[1]=c(u,v[1],b[1]);let V=(v.length===6?1:0)|(N?2:0)|(L?4:0);if(c(u,V,0),v.length===6){let{4:A,5:k}=v;A!==b[2]&&(b[3]=0),b[2]=c(u,A,b[2]),b[3]=c(u,k,b[3]);}if(N){let{0:A,1:k,2:J}=v.callsite;A===b[4]?k!==b[5]&&(b[6]=0):(b[5]=0,b[6]=0),b[4]=c(u,A,b[4]),b[5]=c(u,k,b[5]),b[6]=c(u,J,b[6]);}if(j)for(let A of j){A.length>1&&c(u,-A.length,0);let k=A[0][0];c(u,k,0);let J=_,de=P;for(let K=1;K<A.length;K++){let ee=A[K];J=c(u,ee[1],J),de=c(u,ee[2],de),c(u,ee[0],0);}}for(p++;p<y.length;){let A=y[p],{0:k,1:J}=A;if(k>F||k===F&&J>=M)break;p=W(y,p,u,b);}return b[0]<F?(fe(u,b[0],F),b[0]=F,b[1]=0):u.write(r),b[1]=c(u,M,b[1]),p}function fe(y,p,u){do y.write(o);while(++p<u)}function Re(y){let{length:p}=y,u=new w(y),b=[],v=0,_=0,P=0,F=0,M=0;do{let L=u.indexOf(";"),N=[],j=true,V=0;for(v=0;u.pos<L;){let A;v=l(u,v),v<V&&(j=false),V=v,m(u,L)?(_=l(u,_),P=l(u,P),F=l(u,F),m(u,L)?(M=l(u,M),A=[v,_,P,F,M]):A=[v,_,P,F]):A=[v],N.push(A),u.pos++;}j||Se(N),b.push(N),u.pos=L+1;}while(u.pos<=p);return b}function Se(y){y.sort(De);}function De(y,p){return y[0]-p[0]}function Ze(y){let p=new h,u=0,b=0,v=0,_=0;for(let P=0;P<y.length;P++){let F=y[P];if(P>0&&p.write(o),F.length===0)continue;let M=0;for(let L=0;L<F.length;L++){let N=F[L];L>0&&p.write(r),M=c(p,N[0],M),N.length!==1&&(u=c(p,N[1],u),b=c(p,N[2],b),v=c(p,N[3],v),N.length!==4&&(_=c(p,N[4],_)));}}return p.flush()}n.decode=Re,n.decodeGeneratedRanges=q,n.decodeOriginalScopes=Y,n.encode=Ze,n.encodeGeneratedRanges=D,n.encodeOriginalScopes=oe,Object.defineProperty(n,"__esModule",{value:true});});}),or=Io(Go()),ir=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Yo=/^data:application\/json[^,]+base64,/,Uo=/(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^*]+?)[ \t]*(?:\*\/)[ \t]*$)/,sr=typeof WeakRef<"u",qe=new Map,_t=new Map,zo=e=>sr&&e instanceof WeakRef,Zn=(e,t,n,r)=>{if(n<0||n>=e.length)return null;let o=e[n];if(!o||o.length===0)return null;let i=null;for(let m of o)if(m[0]<=r)i=m;else break;if(!i||i.length<4)return null;let[,s,a,l]=i;if(s===void 0||a===void 0||l===void 0)return null;let c=t[s];return c?{columnNumber:l,fileName:c,lineNumber:a+1}:null},Xo=(e,t,n)=>{if(e.sections){let r=null;for(let s of e.sections)if(t>s.offset.line||t===s.offset.line&&n>=s.offset.column)r=s;else break;if(!r)return null;let o=t-r.offset.line,i=t===r.offset.line?n-r.offset.column:n;return Zn(r.map.mappings,r.map.sources,o,i)}return Zn(e.mappings,e.sources,t-1,n)},qo=(e,t)=>{let n=t.split(`
|
|
22
|
+
`),r;for(let i=n.length-1;i>=0&&!r;i--){let s=n[i].match(Uo);s&&(r=s[1]||s[2]);}if(!r)return null;let o=ir.test(r);if(!(Yo.test(r)||o||r.startsWith("/"))){let i=e.split("/");i[i.length-1]=r,r=i.join("/");}return r},Wo=e=>({file:e.file,mappings:(0, or.decode)(e.mappings),names:e.names,sourceRoot:e.sourceRoot,sources:e.sources,sourcesContent:e.sourcesContent,version:3}),Ko=e=>{let t=e.sections.map(({map:r,offset:o})=>({map:{...r,mappings:(0, or.decode)(r.mappings)},offset:o})),n=new Set;for(let r of t)for(let o of r.map.sources)n.add(o);return {file:e.file,mappings:[],names:[],sections:t,sourceRoot:void 0,sources:Array.from(n),sourcesContent:void 0,version:3}},Qn=e=>{if(!e)return false;let t=e.trim();if(!t)return false;let n=t.match(ir);if(!n)return true;let r=n[0].toLowerCase();return r==="http:"||r==="https:"},Zo=async(e,t=fetch)=>{if(!Qn(e))return null;let n;try{n=await(await t(e)).text();}catch{return null}if(!n)return null;let r=qo(e,n);if(!r||!Qn(r))return null;try{let o=await t(r),i=await o.json();return "sections"in i?Ko(i):Wo(i)}catch{return null}},Qo=async(e,t=true,n)=>{if(t&&qe.has(e)){let i=qe.get(e);if(i==null)return null;if(zo(i)){let s=i.deref();if(s)return s;qe.delete(e);}else return i}if(t&&_t.has(e))return _t.get(e);let r=Zo(e,n);t&&_t.set(e,r);let o=await r;return t&&_t.delete(e),t&&(o===null?qe.set(e,null):qe.set(e,sr?new WeakRef(o):o)),o},Jn=/^[a-zA-Z][a-zA-Z\d+\-.]*:/,Jo=["rsc://","file:///","webpack://","node:","turbopack://","metro://"],er="about://React/",ei=["<anonymous>","eval",""],ti=/\.(jsx|tsx|ts|js)$/,ni=/(\.min|bundle|chunk|vendor|vendors|runtime|polyfill|polyfills)\.(js|mjs|cjs)$|(chunk|bundle|vendor|vendors|runtime|polyfill|polyfills|framework|app|main|index)[-_.][A-Za-z0-9_-]{4,}\.(js|mjs|cjs)$|[\da-f]{8,}\.(js|mjs|cjs)$|[-_.][\da-f]{20,}\.(js|mjs|cjs)$|\/dist\/|\/build\/|\/.next\/|\/out\/|\/node_modules\/|\.webpack\.|\.vite\.|\.turbopack\./i,ri=/^\?[\w~.\-]+(?:=[^&#]*)?(?:&[\w~.\-]+(?:=[^&#]*)?)*$/,oi=e=>e._debugStack instanceof Error&&typeof e._debugStack?.stack=="string",ii=e=>{let t=e._debugSource;return t?typeof t=="object"&&!!t&&"fileName"in t&&typeof t.fileName=="string"&&"lineNumber"in t&&typeof t.lineNumber=="number":false},ar=async(e,t=true,n)=>{if(ii(e))return e._debugSource||null;let r=si(e),o=await ai(r,1,t,n);return !o||o.length===0?null:o[0]},si=e=>oi(e)?Ho(e._debugStack.stack):Do(e);var ai=async(e,t=1,n=true,r)=>{let o=Vo(e,{slice:t??1}),i=[];for(let s of o){if(!s?.file)continue;let a=await Qo(s.file,n,r);if(a&&typeof s.line=="number"&&typeof s.col=="number"){let l=Xo(a,s.line,s.col);if(l){i.push(l);continue}}i.push({fileName:s.file,lineNumber:s.line,columnNumber:s.col,functionName:s.function});}return i},Qt=e=>{if(!e||ei.includes(e))return "";let t=e;if(t.startsWith(er)){let r=t.slice(er.length),o=r.indexOf("/"),i=r.indexOf(":");t=o!==-1&&(i===-1||o<i)?r.slice(o+1):r;}for(let r of Jo)if(t.startsWith(r)){t=t.slice(r.length),r==="file:///"&&(t=`/${t.replace(/^\/+/,"")}`);break}if(Jn.test(t)){let r=t.match(Jn);r&&(t=t.slice(r[0].length));}let n=t.indexOf("?");if(n!==-1){let r=t.slice(n);ri.test(r)&&(t=t.slice(0,n));}return t},lr=e=>{let t=Qt(e);return !(!t||!ti.test(t)||ni.test(t))};var cr=e=>e.length>0&&/^[A-Z]/.test(e);var li=["InnerLayoutRouter","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","LoadingBoundary","ErrorBoundary","InnerScrollAndFocusHandler","ScrollAndFocusHandler","RenderFromTemplateContext","OuterLayoutRouter","body","html","RedirectErrorBoundary","RedirectBoundary","HTTPAccessFallbackErrorBoundary","HTTPAccessFallbackBoundary","DevRootHTTPAccessFallbackBoundary","AppDevOverlayErrorBoundary","AppDevOverlay","HotReload","Router","ErrorBoundaryHandler","ErrorBoundary","AppRouter","ServerRoot","SegmentStateProvider","RootErrorBoundary"],ci=()=>!!document.getElementById("__NEXT_DATA__"),ur=e=>!!(e.startsWith("_")||li.includes(e)),ui=e=>!(ur(e)||!cr(e)||e.startsWith("Primitive.")||e.includes("Provider")&&e.includes("Context")),fr=e=>{let t=Xe(e);if(!t)return null;let n=null;return Le(t,r=>{if(Et(r)){let o=Ne(r);if(o&&ui(o))return n=o,true}return false},true),n},dr=async e=>{let t=Xe(e);if(!t||!Ut(t))return [];let n=Rt(t),r=[];return Le(n,i=>{let s=Ct(i)?typeof i.type=="string"?i.type:null:Ne(i);s&&!ur(s)&&r.push({name:s,sourcePromise:ar(i)});},true),(await Promise.all(r.map(async i=>({name:i.name,source:await i.sourcePromise})))).filter(i=>i.source!==null)},mr=e=>{let t=ci();return e.map(({name:n,source:r})=>{if(!r)return ` at ${n}`;if(r.fileName.startsWith("about://React/Server"))return ` at ${n} (Server)`;if(!lr(r.fileName))return ` at ${n}`;let o=` at ${n} in ${Qt(r.fileName)}`;return t?`${o}:${r.lineNumber}:${r.columnNumber}`:o}).join(`
|
|
23
|
+
`)},gr=e=>{let t=e.tagName.toLowerCase();if(!(e instanceof HTMLElement))return `<${t} />`;let n=e.innerText?.trim()??e.textContent?.trim()??"",r="",o=Array.from(e.attributes);for(let h of o){let w=h.name,S=h.value;S.length>20&&(S=`${S.slice(0,20)}...`),r+=` ${w}="${S}"`;}let i=[],s=[],a=false,l=Array.from(e.childNodes);for(let h of l)h.nodeType!==Node.COMMENT_NODE&&(h.nodeType===Node.TEXT_NODE?h.textContent&&h.textContent.trim().length>0&&(a=true):h.nodeType===Node.ELEMENT_NODE&&(a?s.push(h):i.push(h)));let c=h=>h.length===0?"":h.length<=2?h.map(w=>`<${w.tagName.toLowerCase()} ...>`).join(`
|
|
24
|
+
`):`(${h.length} elements)`,m="",f=c(i);if(f&&(m+=`
|
|
25
|
+
${f}`),n.length>0){let h=n.length>100?`${n.slice(0,100)}...`:n;m+=`
|
|
26
|
+
${h}`;}let T=c(s);return T&&(m+=`
|
|
27
|
+
${T}`),m.length>0?`<${t}${r}>${m}
|
|
28
|
+
</${t}>`:`<${t}${r} />`};var fi=()=>document.hasFocus()?new Promise(e=>setTimeout(e,50)):new Promise(e=>{let t=()=>{window.removeEventListener("focus",t),setTimeout(e,50);};window.addEventListener("focus",t),window.focus();}),At=async(e,t)=>{await fi();try{try{return await navigator.clipboard.writeText(e),t?.(),!0}catch{return di(e,t)}}catch{return false}},di=(e,t)=>{if(!document.execCommand)return false;let n=document.createElement("textarea");n.value=String(e),n.style.clipPath="inset(50%)",n.ariaHidden="true",(document.body||document.documentElement).append(n);try{n.select();let o=document.execCommand("copy");return o&&t?.(),o}finally{n.remove();}};var We=()=>{try{let e=new(window.AudioContext||window.webkitAudioContext),t=e.createGain();t.connect(e.destination),[{freq:523.25,start:0,duration:.1},{freq:659.25,start:.05,duration:.1},{freq:783.99,start:.1,duration:.15}].forEach(r=>{let o=e.createOscillator(),i=e.createGain();o.connect(i),i.connect(t),o.frequency.value=r.freq,o.type="triangle";let s=e.currentTime+r.start,a=s+.01,l=s+r.duration;i.gain.setValueAtTime(0,s),i.gain.linearRampToValueAtTime(.15,a),i.gain.exponentialRampToValueAtTime(.01,l),o.start(s),o.stop(l);});}catch{}};var hr=(e,t=window.getComputedStyle(e))=>t.display!=="none"&&t.visibility!=="hidden"&&t.opacity!=="0";var Ke=e=>{if(e.closest(`[${Me}]`))return false;let t=window.getComputedStyle(e);return !(!hr(e,t)||t.pointerEvents==="none")};var Jt=(e,t)=>{let n=document.elementsFromPoint(e,t);for(let r of n)if(Ke(r))return r;return null};var mi=(e,t)=>{let n=Math.max(e.left,t.left),r=Math.max(e.top,t.top),o=Math.min(e.right,t.right),i=Math.min(e.bottom,t.bottom),s=Math.max(0,o-n),a=Math.max(0,i-r);return s*a},gi=(e,t)=>e.left<t.right&&e.right>t.left&&e.top<t.bottom&&e.bottom>t.top,pr=(e,t,n)=>{let r=[],o=Array.from(document.querySelectorAll("*")),i={left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height};for(let s of o){if(!n){let c=(s.tagName||"").toUpperCase();if(c==="HTML"||c==="BODY")continue}if(!t(s))continue;let a=s.getBoundingClientRect(),l={left:a.left,top:a.top,right:a.left+a.width,bottom:a.top+a.height};if(n){let c=mi(i,l),m=Math.max(0,a.width*a.height);m>0&&c/m>=.75&&r.push(s);}else gi(l,i)&&r.push(s);}return r},br=e=>e.filter(t=>!e.some(n=>n!==t&&n.contains(t))),yr=(e,t)=>{let n=pr(e,t,true);return br(n)},wr=(e,t)=>{let n=pr(e,t,false);return br(n)};var en=e=>{let t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return {borderRadius:n.borderRadius||"0px",height:t.height,transform:n.transform||"none",width:t.width,x:t.left,y:t.top}};var Sr=e=>{let t={enabled:true,keyHoldDuration:300,allowActivationInsideInput:true,playCopySound:false,...e};return t.enabled===false?{activate:()=>{},deactivate:()=>{},toggle:()=>{},isActive:()=>false,dispose:()=>{}}:Fe(n=>{let[r,o]=E(false),[i,s]=E(-1e3),[a,l]=E(-1e3),[c,m]=E(false),[f,T]=E(-1e3),[h,w]=E(-1e3),[S,Y]=E(false),[oe,z]=E(null),[q,D]=E(null),[W,fe]=E(0),[Re,Se]=E([]),[De,Ze]=E([]),[y,p]=E(false),[u,b]=E(false),[v,_]=E(false),[P,F]=E(false),[M,L]=E(-1e3),[N,j]=E(-1e3),[V,A]=E(false),k=null,J=null,de=null,K=null,ee=null,me=H(()=>y()&&!S()),He=H(()=>i()>-1e3&&a()>-1e3),pe=d=>(d.metaKey||d.ctrlKey)&&d.key.toLowerCase()==="c",te=d=>{let x=`grabbed-${Date.now()}-${Math.random()}`,R=Date.now(),Z={id:x,bounds:d,createdAt:R},B=Re();Se([...B,Z]),setTimeout(()=>{Se(ge=>ge.filter(dn=>dn.id!==x));},1700);},be=d=>{let x=`success-${Date.now()}-${Math.random()}`;Ze(R=>[...R,{id:x,text:d}]),setTimeout(()=>{Ze(R=>R.filter(Z=>Z.id!==x));},1700);},_e=d=>`<selected_element>
|
|
29
|
+
${d}
|
|
30
|
+
</selected_element>`,Qe=d=>(d.tagName||"").toLowerCase(),Je=d=>{let x=Qe(d),R=fr(d);return x&&R?`<${x}> in ${R}`:x?`<${x}>`:"<element>"},tn=d=>{try{let x=d.map(R=>({tagName:Qe(R)}));window.dispatchEvent(new CustomEvent("react-grab:element-selected",{detail:{elements:x}}));}catch{}},Ft=async(d,x,R)=>{L(d),j(x),Y(true),Ar(),await R().finally(()=>{Y(false),et(),u()&&(r()?b(false):Ae());});},xr=d=>"innerText"in d,vr=d=>xr(d)?d.innerText:d.textContent??"",nn=d=>d.map(x=>vr(x).trim()).filter(x=>x.length>0).join(`
|
|
30
31
|
|
|
31
|
-
`),
|
|
32
|
-
${
|
|
32
|
+
`),rn=async d=>{let x=false;try{let Z=(await Promise.allSettled(d.map(async B=>`## HTML Frame:
|
|
33
|
+
${gr(B)}
|
|
33
34
|
|
|
34
35
|
## Code Location:
|
|
35
|
-
${
|
|
36
|
+
${mr(await dr(B))}`))).map(B=>B.status==="fulfilled"?B.value:"").filter(B=>B.trim());if(Z.length>0){let B=Z.map(ge=>_e(ge)).join(`
|
|
36
37
|
|
|
37
|
-
`);
|
|
38
|
+
`);x=await At(B,t.playCopySound?We:void 0);}if(!x){let B=nn(d);B.length>0&&(x=await At(B,t.playCopySound?We:void 0));}}catch{let R=nn(d);R.length>0&&(x=await At(R,t.playCopySound?We:void 0));}return x},Cr=async d=>{te(en(d)),await new Promise(R=>requestAnimationFrame(R)),await rn([d])&&be(Je(d)),tn([d]);},on=async d=>{if(d.length===0)return;for(let R of d)te(en(R));await new Promise(R=>requestAnimationFrame(R)),await rn(d)&&be(`${d.length} elements`),tn(d);},Be=H(()=>!me()||c()?null:Jt(i(),a())),Er=H(()=>{let d=Be();if(!d)return;let x=d.getBoundingClientRect(),R=window.getComputedStyle(d);return {borderRadius:R.borderRadius||"0px",height:x.height,transform:R.transform||"none",width:x.width,x:x.left,y:x.top}}),sn=(d,x)=>({x:Math.abs(d-f()),y:Math.abs(x-h())}),an=H(()=>{if(!c())return false;let d=sn(i(),a());return d.x>2||d.y>2}),ln=(d,x)=>{let R=Math.min(f(),d),Z=Math.min(h(),x),B=Math.abs(d-f()),ge=Math.abs(x-h());return {x:R,y:Z,width:B,height:ge}},Rr=H(()=>{if(!an())return;let d=ln(i(),a());return {borderRadius:"0px",height:d.height,transform:"none",width:d.width,x:d.x,y:d.y}}),_r=H(()=>{let d=Be();return d?Je(d):"<element>"}),cn=H(()=>S()?{x:M(),y:N()}:{x:i(),y:a()}),un=H(()=>S()?{x:M(),y:N()}:{x:i(),y:a()});re(Ie(()=>[Be(),oe()],([d,x])=>{x&&d&&x!==d&&z(null);}));let Ar=()=>{let d=Date.now();D(d),_(false),de=window.setTimeout(()=>{_(true),de=null;},150);let x=()=>{let R=q();if(R===null)return;let B=(Date.now()-R)/t.keyHoldDuration,ge=1-Math.exp(-B),mn=S()?Math.min(ge,.95):1;fe(mn),mn<1&&(J=requestAnimationFrame(x));};x();},et=()=>{J!==null&&(cancelAnimationFrame(J),J=null),de!==null&&(window.clearTimeout(de),de=null),D(null),fe(1),_(false);},tt=()=>{et(),p(true),document.body.style.cursor="crosshair";},Ae=()=>{b(false),o(false),p(false),document.body.style.cursor="",c()&&(m(false),document.body.style.userSelect=""),k&&window.clearTimeout(k),K&&window.clearTimeout(K),ee&&(window.clearTimeout(ee),ee=null),A(false),et();},fn=new AbortController,Oe=fn.signal;window.addEventListener("keydown",d=>{if(d.key==="Escape"&&r()){Ae();return}if(d.key==="Enter"&&r()){b(true),K!==null&&(window.clearTimeout(K),K=null),y()||(k&&window.clearTimeout(k),tt(),t.onActivate?.());return}if(!(!t.allowActivationInsideInput&&kn(d))&&pe(d)){if(y()){if(u())return;K!==null&&window.clearTimeout(K),K=window.setTimeout(()=>{Ae();},200);return}d.repeat||(k!==null&&window.clearTimeout(k),r()||o(true),k=window.setTimeout(()=>{tt(),t.onActivate?.();},t.keyHoldDuration));}},{signal:Oe,capture:true}),window.addEventListener("keyup",d=>{if(!r()&&!y())return;let x=!d.metaKey&&!d.ctrlKey;if(d.key.toLowerCase()==="c"||x){if(u())return;Ae();}},{signal:Oe,capture:true}),window.addEventListener("mousemove",d=>{s(d.clientX),l(d.clientY),ee!==null&&window.clearTimeout(ee),A(false),ee=window.setTimeout(()=>{A(true),ee=null;},300);},{signal:Oe}),window.addEventListener("mousedown",d=>{!me()||S()||(d.preventDefault(),m(true),T(d.clientX),w(d.clientY),document.body.style.userSelect="none");},{signal:Oe}),window.addEventListener("mouseup",d=>{if(!c())return;let x=sn(d.clientX,d.clientY),R=x.x>2||x.y>2;if(m(false),document.body.style.userSelect="",R){F(true);let Z=ln(d.clientX,d.clientY),B=yr(Z,Ke);if(B.length>0)Ft(d.clientX,d.clientY,()=>on(B));else {let ge=wr(Z,Ke);ge.length>0&&Ft(d.clientX,d.clientY,()=>on(ge));}}else {let Z=Jt(d.clientX,d.clientY);if(!Z)return;z(Z),Ft(d.clientX,d.clientY,()=>Cr(Z));}},{signal:Oe}),window.addEventListener("click",d=>{(me()||S()||P())&&(d.preventDefault(),d.stopPropagation(),P()&&F(false),u()&&!S()&&(r()?b(false):Ae()));},{signal:Oe,capture:true}),document.addEventListener("visibilitychange",()=>{document.hidden&&Se([]);},{signal:Oe}),se(()=>{fn.abort(),k&&window.clearTimeout(k),K&&window.clearTimeout(K),ee&&window.clearTimeout(ee),et(),document.body.style.userSelect="",document.body.style.cursor="";});let Or=Nn(),Fr=H(()=>me()&&!c()&&!!Be()),kr=H(()=>me()&&an()),Nr=H(()=>S()?"processing":"hover"),Pr=H(()=>S()?true:De().length>0?false:me()&&!c()&&!!Be()),Ir=H(()=>S()&&v()&&He()),$r=H(()=>me()&&!c());return On(()=>C(Dn,{get selectionVisible(){return Fr()},get selectionBounds(){return Er()},get dragVisible(){return kr()},get dragBounds(){return Rr()},get grabbedBoxes(){return Re()},get successLabels(){return De()},get labelVariant(){return Nr()},get labelText(){return _r()},get labelX(){return cn().x},get labelY(){return cn().y},get labelVisible(){return Pr()},labelZIndex:2147483647,get labelShowHint(){return V()},get progressVisible(){return Ir()},get progress(){return W()},get mouseX(){return un().x},get mouseY(){return un().y},get crosshairVisible(){return $r()}}),Or),{activate:()=>{y()||(tt(),t.onActivate?.());},deactivate:()=>{y()&&Ae();},toggle:()=>{y()?Ae():(tt(),t.onActivate?.());},isActive:()=>y(),dispose:n}})};var Tr=null,kl=()=>Tr;Tr=Sr();/*! Bundled license information:
|
|
38
39
|
|
|
39
40
|
bippy/dist/rdt-hook-CrcWl4lP.js:
|
|
40
41
|
(**
|
|
@@ -95,4 +96,4 @@ bippy/dist/source.js:
|
|
|
95
96
|
* This source code is licensed under the MIT license found in the
|
|
96
97
|
* LICENSE file in the root directory of this source tree.
|
|
97
98
|
*)
|
|
98
|
-
*/exports.getGlobalApi=
|
|
99
|
+
*/exports.getGlobalApi=kl;exports.init=Sr;exports.playCopySound=We;return exports;})({});
|
package/dist/index.js
CHANGED
|
@@ -356,12 +356,14 @@ var getCursorQuadrants = (cursorX, cursorY, elementWidth, elementHeight, offset)
|
|
|
356
356
|
};
|
|
357
357
|
|
|
358
358
|
// src/components/label.tsx
|
|
359
|
-
var _tmpl$3 = /* @__PURE__ */ template(`<
|
|
360
|
-
var _tmpl$22 = /* @__PURE__ */ template(`<
|
|
361
|
-
var _tmpl$32 = /* @__PURE__ */ template(`<
|
|
362
|
-
var _tmpl$4 = /* @__PURE__ */ template(`<span style=font-variant-numeric:tabular-nums;
|
|
363
|
-
var _tmpl$5 = /* @__PURE__ */ template(`<
|
|
364
|
-
var _tmpl$6 = /* @__PURE__ */ template(`<div style=
|
|
359
|
+
var _tmpl$3 = /* @__PURE__ */ template(`<div style="position:absolute;top:0;left:0;bottom:0;background-color:rgba(178, 28, 142, 0.2);border-radius:3px;transition:width 0.1s ease-out;pointer-events:none">`);
|
|
360
|
+
var _tmpl$22 = /* @__PURE__ */ template(`<span style=display:inline-block;margin-right:4px;font-weight:600>\u2713`);
|
|
361
|
+
var _tmpl$32 = /* @__PURE__ */ template(`<div style=margin-right:4px>Copied`);
|
|
362
|
+
var _tmpl$4 = /* @__PURE__ */ template(`<span style="font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;font-variant-numeric:tabular-nums;vertical-align:middle">`);
|
|
363
|
+
var _tmpl$5 = /* @__PURE__ */ template(`<span style=font-variant-numeric:tabular-nums;font-size:10px;margin-left:4px;vertical-align:middle>`);
|
|
364
|
+
var _tmpl$6 = /* @__PURE__ */ template(`<div style=margin-left:4px>to clipboard`);
|
|
365
|
+
var _tmpl$7 = /* @__PURE__ */ template(`<div style=font-size:9px;opacity:0.6;text-align:center;margin-top:2px>Click or drag to select`);
|
|
366
|
+
var _tmpl$8 = /* @__PURE__ */ template(`<div style="position:fixed;background-color:#fde7f7;color:#b21c8e;border:1px solid #f7c5ec;border-radius:4px;font-size:11px;font-weight:500;font-family:-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;pointer-events:none;transition:opacity 0.2s ease-in-out;max-width:calc(100vw - (16px + env(safe-area-inset-left) + env(safe-area-inset-right)));overflow:hidden"><div style="position:relative;padding:2px 6px;display:flex;flex-direction:column"><div style=display:flex;align-items:center;text-overflow:ellipsis;white-space:nowrap>`);
|
|
365
367
|
var Label = (props) => {
|
|
366
368
|
let labelRef;
|
|
367
369
|
const position = useAnimatedPosition({
|
|
@@ -414,10 +416,20 @@ var Label = (props) => {
|
|
|
414
416
|
return props.visible !== false;
|
|
415
417
|
},
|
|
416
418
|
get children() {
|
|
417
|
-
var _el$ = _tmpl$
|
|
419
|
+
var _el$ = _tmpl$8(), _el$3 = _el$.firstChild, _el$4 = _el$3.firstChild;
|
|
418
420
|
var _ref$ = labelRef;
|
|
419
421
|
typeof _ref$ === "function" ? use(_ref$, _el$) : labelRef = _el$;
|
|
420
422
|
insert(_el$, createComponent(Show, {
|
|
423
|
+
get when() {
|
|
424
|
+
return memo(() => props.variant === "processing")() && props.progress !== void 0;
|
|
425
|
+
},
|
|
426
|
+
get children() {
|
|
427
|
+
var _el$2 = _tmpl$3();
|
|
428
|
+
effect((_$p) => setStyleProperty(_el$2, "width", `${Math.min(100, Math.max(0, (props.progress ?? 0) * 100))}%`));
|
|
429
|
+
return _el$2;
|
|
430
|
+
}
|
|
431
|
+
}), _el$3);
|
|
432
|
+
insert(_el$4, createComponent(Show, {
|
|
421
433
|
get when() {
|
|
422
434
|
return props.variant === "processing";
|
|
423
435
|
},
|
|
@@ -425,55 +437,63 @@ var Label = (props) => {
|
|
|
425
437
|
return createComponent(Spinner, {});
|
|
426
438
|
}
|
|
427
439
|
}), null);
|
|
428
|
-
insert(_el
|
|
440
|
+
insert(_el$4, createComponent(Show, {
|
|
429
441
|
get when() {
|
|
430
442
|
return props.variant === "success";
|
|
431
443
|
},
|
|
432
444
|
get children() {
|
|
433
|
-
return _tmpl$
|
|
445
|
+
return _tmpl$22();
|
|
434
446
|
}
|
|
435
447
|
}), null);
|
|
436
|
-
insert(_el
|
|
448
|
+
insert(_el$4, createComponent(Show, {
|
|
437
449
|
get when() {
|
|
438
450
|
return props.variant === "success";
|
|
439
451
|
},
|
|
440
452
|
get children() {
|
|
441
|
-
return _tmpl$
|
|
453
|
+
return _tmpl$32();
|
|
442
454
|
}
|
|
443
455
|
}), null);
|
|
444
|
-
insert(_el
|
|
456
|
+
insert(_el$4, createComponent(Show, {
|
|
445
457
|
get when() {
|
|
446
458
|
return props.variant === "processing";
|
|
447
459
|
},
|
|
448
|
-
children: "
|
|
460
|
+
children: "Please wait\u2026"
|
|
449
461
|
}), null);
|
|
450
|
-
insert(_el
|
|
462
|
+
insert(_el$4, createComponent(Show, {
|
|
451
463
|
get when() {
|
|
452
464
|
return props.variant !== "processing";
|
|
453
465
|
},
|
|
454
466
|
get children() {
|
|
455
467
|
return [(() => {
|
|
456
|
-
var _el$
|
|
457
|
-
insert(_el$
|
|
458
|
-
return _el$
|
|
468
|
+
var _el$7 = _tmpl$4();
|
|
469
|
+
insert(_el$7, () => labelSegments().primary);
|
|
470
|
+
return _el$7;
|
|
459
471
|
})(), createComponent(Show, {
|
|
460
472
|
get when() {
|
|
461
473
|
return memo(() => props.variant === "hover")() && labelSegments().secondary !== "";
|
|
462
474
|
},
|
|
463
475
|
get children() {
|
|
464
|
-
var _el$
|
|
465
|
-
insert(_el$
|
|
466
|
-
return _el$
|
|
476
|
+
var _el$8 = _tmpl$5();
|
|
477
|
+
insert(_el$8, () => labelSegments().secondary);
|
|
478
|
+
return _el$8;
|
|
467
479
|
}
|
|
468
480
|
})];
|
|
469
481
|
}
|
|
470
482
|
}), null);
|
|
471
|
-
insert(_el
|
|
483
|
+
insert(_el$4, createComponent(Show, {
|
|
472
484
|
get when() {
|
|
473
485
|
return props.variant === "success";
|
|
474
486
|
},
|
|
475
487
|
get children() {
|
|
476
|
-
return _tmpl$
|
|
488
|
+
return _tmpl$6();
|
|
489
|
+
}
|
|
490
|
+
}), null);
|
|
491
|
+
insert(_el$3, createComponent(Show, {
|
|
492
|
+
get when() {
|
|
493
|
+
return memo(() => props.variant === "hover")() && props.showHint;
|
|
494
|
+
},
|
|
495
|
+
get children() {
|
|
496
|
+
return _tmpl$7();
|
|
477
497
|
}
|
|
478
498
|
}), null);
|
|
479
499
|
effect((_p$) => {
|
|
@@ -493,7 +513,7 @@ var Label = (props) => {
|
|
|
493
513
|
}
|
|
494
514
|
});
|
|
495
515
|
};
|
|
496
|
-
var _tmpl$
|
|
516
|
+
var _tmpl$9 = /* @__PURE__ */ template(`<div style="position:fixed;z-index:2147483647;pointer-events:none;transition:opacity 0.1s ease-in-out"><div style="width:32px;height:2px;background-color:rgba(178, 28, 142, 0.2);border-radius:1px;overflow:hidden;position:relative"><div style="height:100%;background-color:#b21c8e;border-radius:1px;transition:width 0.05s cubic-bezier(0.165, 0.84, 0.44, 1)">`);
|
|
497
517
|
var ProgressIndicator = (props) => {
|
|
498
518
|
const opacity = useFadeInOut({
|
|
499
519
|
visible: props.visible
|
|
@@ -515,7 +535,7 @@ var ProgressIndicator = (props) => {
|
|
|
515
535
|
return props.visible !== false;
|
|
516
536
|
},
|
|
517
537
|
get children() {
|
|
518
|
-
var _el$ = _tmpl$
|
|
538
|
+
var _el$ = _tmpl$9(), _el$2 = _el$.firstChild, _el$3 = _el$2.firstChild;
|
|
519
539
|
var _ref$ = progressIndicatorRef;
|
|
520
540
|
typeof _ref$ === "function" ? use(_ref$, _el$) : progressIndicatorRef = _el$;
|
|
521
541
|
effect((_p$) => {
|
|
@@ -535,7 +555,7 @@ var ProgressIndicator = (props) => {
|
|
|
535
555
|
}
|
|
536
556
|
});
|
|
537
557
|
};
|
|
538
|
-
var _tmpl$
|
|
558
|
+
var _tmpl$10 = /* @__PURE__ */ template(`<canvas style=position:fixed;top:0;left:0;pointer-events:none;z-index:2147483645>`);
|
|
539
559
|
var Crosshair = (props) => {
|
|
540
560
|
let canvasRef;
|
|
541
561
|
let context = null;
|
|
@@ -595,7 +615,7 @@ var Crosshair = (props) => {
|
|
|
595
615
|
return props.visible !== false;
|
|
596
616
|
},
|
|
597
617
|
get children() {
|
|
598
|
-
var _el$ = _tmpl$
|
|
618
|
+
var _el$ = _tmpl$10();
|
|
599
619
|
var _ref$ = canvasRef;
|
|
600
620
|
typeof _ref$ === "function" ? use(_ref$, _el$) : canvasRef = _el$;
|
|
601
621
|
return _el$;
|
|
@@ -663,22 +683,29 @@ var ReactGrabRenderer = (props) => {
|
|
|
663
683
|
return box.createdAt;
|
|
664
684
|
}
|
|
665
685
|
})
|
|
666
|
-
}), createComponent(
|
|
667
|
-
get
|
|
668
|
-
return props.
|
|
686
|
+
}), createComponent(Show, {
|
|
687
|
+
get when() {
|
|
688
|
+
return props.labelVariant !== "processing";
|
|
669
689
|
},
|
|
670
|
-
children
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
690
|
+
get children() {
|
|
691
|
+
return createComponent(For, {
|
|
692
|
+
get each() {
|
|
693
|
+
return props.successLabels ?? [];
|
|
694
|
+
},
|
|
695
|
+
children: (label) => createComponent(Label, {
|
|
696
|
+
variant: "success",
|
|
697
|
+
get text() {
|
|
698
|
+
return label.text;
|
|
699
|
+
},
|
|
700
|
+
get x() {
|
|
701
|
+
return props.mouseX ?? 0;
|
|
702
|
+
},
|
|
703
|
+
get y() {
|
|
704
|
+
return props.mouseY ?? 0;
|
|
705
|
+
}
|
|
706
|
+
})
|
|
707
|
+
});
|
|
708
|
+
}
|
|
682
709
|
}), createComponent(Show, {
|
|
683
710
|
get when() {
|
|
684
711
|
return memo(() => !!(props.labelVisible && props.labelVariant && props.labelText && props.labelX !== void 0))() && props.labelY !== void 0;
|
|
@@ -702,6 +729,12 @@ var ReactGrabRenderer = (props) => {
|
|
|
702
729
|
},
|
|
703
730
|
get zIndex() {
|
|
704
731
|
return props.labelZIndex;
|
|
732
|
+
},
|
|
733
|
+
get progress() {
|
|
734
|
+
return props.progress;
|
|
735
|
+
},
|
|
736
|
+
get showHint() {
|
|
737
|
+
return props.labelShowHint;
|
|
705
738
|
}
|
|
706
739
|
});
|
|
707
740
|
}
|
|
@@ -854,8 +887,8 @@ var getHTMLPreview = (element) => {
|
|
|
854
887
|
}
|
|
855
888
|
attrsText += ` ${name}="${value}"`;
|
|
856
889
|
}
|
|
857
|
-
|
|
858
|
-
|
|
890
|
+
const topElements = [];
|
|
891
|
+
const bottomElements = [];
|
|
859
892
|
let foundFirstText = false;
|
|
860
893
|
const childNodes = Array.from(element.childNodes);
|
|
861
894
|
for (const node of childNodes) {
|
|
@@ -866,19 +899,31 @@ var getHTMLPreview = (element) => {
|
|
|
866
899
|
}
|
|
867
900
|
} else if (node.nodeType === Node.ELEMENT_NODE) {
|
|
868
901
|
if (!foundFirstText) {
|
|
869
|
-
topElements
|
|
902
|
+
topElements.push(node);
|
|
870
903
|
} else {
|
|
871
|
-
bottomElements
|
|
904
|
+
bottomElements.push(node);
|
|
872
905
|
}
|
|
873
906
|
}
|
|
874
907
|
}
|
|
908
|
+
const formatElements = (elements) => {
|
|
909
|
+
if (elements.length === 0) return "";
|
|
910
|
+
if (elements.length <= 2) {
|
|
911
|
+
return elements.map((el) => `<${el.tagName.toLowerCase()} ...>`).join("\n ");
|
|
912
|
+
}
|
|
913
|
+
return `(${elements.length} elements)`;
|
|
914
|
+
};
|
|
875
915
|
let content = "";
|
|
876
|
-
|
|
877
|
-
(
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
916
|
+
const topElementsStr = formatElements(topElements);
|
|
917
|
+
if (topElementsStr) content += `
|
|
918
|
+
${topElementsStr}`;
|
|
919
|
+
if (text.length > 0) {
|
|
920
|
+
const truncatedText = text.length > 100 ? `${text.slice(0, 100)}...` : text;
|
|
921
|
+
content += `
|
|
922
|
+
${truncatedText}`;
|
|
923
|
+
}
|
|
924
|
+
const bottomElementsStr = formatElements(bottomElements);
|
|
925
|
+
if (bottomElementsStr) content += `
|
|
926
|
+
${bottomElementsStr}`;
|
|
882
927
|
if (content.length > 0) {
|
|
883
928
|
return `<${tagName}${attrsText}>${content}
|
|
884
929
|
</${tagName}>`;
|
|
@@ -1128,8 +1173,6 @@ var init = (rawOptions) => {
|
|
|
1128
1173
|
let progressDelayTimerId = null;
|
|
1129
1174
|
let keydownSpamTimerId = null;
|
|
1130
1175
|
let mouseSettleTimerId = null;
|
|
1131
|
-
let referenceMouseX = OFFSCREEN_POSITION;
|
|
1132
|
-
let referenceMouseY = OFFSCREEN_POSITION;
|
|
1133
1176
|
const isRendererActive = createMemo(() => isActivated() && !isCopying());
|
|
1134
1177
|
const hasValidMousePosition = createMemo(() => mouseX() > OFFSCREEN_POSITION && mouseY() > OFFSCREEN_POSITION);
|
|
1135
1178
|
const isTargetKeyCombination = (event) => (event.metaKey || event.ctrlKey) && event.key.toLowerCase() === "c";
|
|
@@ -1327,7 +1370,6 @@ ${formatStack(await getStack(element))}`));
|
|
|
1327
1370
|
x: mouseX(),
|
|
1328
1371
|
y: mouseY()
|
|
1329
1372
|
});
|
|
1330
|
-
const isSameAsLast = createMemo(() => Boolean(targetElement() && targetElement() === lastGrabbedElement()));
|
|
1331
1373
|
createEffect(on(() => [targetElement(), lastGrabbedElement()], ([currentElement, lastElement]) => {
|
|
1332
1374
|
if (lastElement && currentElement && lastElement !== currentElement) {
|
|
1333
1375
|
setLastGrabbedElement(null);
|
|
@@ -1390,8 +1432,6 @@ ${formatStack(await getStack(element))}`));
|
|
|
1390
1432
|
mouseSettleTimerId = null;
|
|
1391
1433
|
}
|
|
1392
1434
|
setMouseHasSettled(false);
|
|
1393
|
-
referenceMouseX = OFFSCREEN_POSITION;
|
|
1394
|
-
referenceMouseY = OFFSCREEN_POSITION;
|
|
1395
1435
|
stopProgressAnimation();
|
|
1396
1436
|
};
|
|
1397
1437
|
const abortController = new AbortController();
|
|
@@ -1458,34 +1498,14 @@ ${formatStack(await getStack(element))}`));
|
|
|
1458
1498
|
window.addEventListener("mousemove", (event) => {
|
|
1459
1499
|
setMouseX(event.clientX);
|
|
1460
1500
|
setMouseY(event.clientY);
|
|
1461
|
-
if (
|
|
1462
|
-
|
|
1463
|
-
referenceMouseY = event.clientY;
|
|
1464
|
-
}
|
|
1465
|
-
const deltaX = event.clientX - referenceMouseX;
|
|
1466
|
-
const deltaY = event.clientY - referenceMouseY;
|
|
1467
|
-
const distance = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
|
|
1468
|
-
if (distance >= 200) {
|
|
1469
|
-
if (mouseSettleTimerId !== null) {
|
|
1470
|
-
window.clearTimeout(mouseSettleTimerId);
|
|
1471
|
-
}
|
|
1472
|
-
setMouseHasSettled(false);
|
|
1473
|
-
referenceMouseX = event.clientX;
|
|
1474
|
-
referenceMouseY = event.clientY;
|
|
1475
|
-
mouseSettleTimerId = window.setTimeout(() => {
|
|
1476
|
-
setMouseHasSettled(true);
|
|
1477
|
-
referenceMouseX = mouseX();
|
|
1478
|
-
referenceMouseY = mouseY();
|
|
1479
|
-
mouseSettleTimerId = null;
|
|
1480
|
-
}, 100);
|
|
1481
|
-
} else if (mouseSettleTimerId === null && !mouseHasSettled()) {
|
|
1482
|
-
mouseSettleTimerId = window.setTimeout(() => {
|
|
1483
|
-
setMouseHasSettled(true);
|
|
1484
|
-
referenceMouseX = mouseX();
|
|
1485
|
-
referenceMouseY = mouseY();
|
|
1486
|
-
mouseSettleTimerId = null;
|
|
1487
|
-
}, 100);
|
|
1501
|
+
if (mouseSettleTimerId !== null) {
|
|
1502
|
+
window.clearTimeout(mouseSettleTimerId);
|
|
1488
1503
|
}
|
|
1504
|
+
setMouseHasSettled(false);
|
|
1505
|
+
mouseSettleTimerId = window.setTimeout(() => {
|
|
1506
|
+
setMouseHasSettled(true);
|
|
1507
|
+
mouseSettleTimerId = null;
|
|
1508
|
+
}, 300);
|
|
1489
1509
|
}, {
|
|
1490
1510
|
signal: eventListenerSignal
|
|
1491
1511
|
});
|
|
@@ -1569,7 +1589,7 @@ ${formatStack(await getStack(element))}`));
|
|
|
1569
1589
|
const labelVisible = createMemo(() => {
|
|
1570
1590
|
if (isCopying()) return true;
|
|
1571
1591
|
if (successLabels().length > 0) return false;
|
|
1572
|
-
return isRendererActive() && !isDragging() &&
|
|
1592
|
+
return isRendererActive() && !isDragging() && Boolean(targetElement());
|
|
1573
1593
|
});
|
|
1574
1594
|
const progressVisible = createMemo(() => isCopying() && showProgressIndicator() && hasValidMousePosition());
|
|
1575
1595
|
const crosshairVisible = createMemo(() => isRendererActive() && !isDragging());
|
|
@@ -1608,6 +1628,9 @@ ${formatStack(await getStack(element))}`));
|
|
|
1608
1628
|
return labelVisible();
|
|
1609
1629
|
},
|
|
1610
1630
|
labelZIndex: Z_INDEX_LABEL,
|
|
1631
|
+
get labelShowHint() {
|
|
1632
|
+
return mouseHasSettled();
|
|
1633
|
+
},
|
|
1611
1634
|
get progressVisible() {
|
|
1612
1635
|
return progressVisible();
|
|
1613
1636
|
},
|