605 lines
35 KiB
Plaintext
605 lines
35 KiB
Plaintext
"use client";
|
||
import {
|
||
L,
|
||
O,
|
||
T,
|
||
d
|
||
} from "/node_modules/.vite/deps/chunk-K7UO52JA.js?v=e565559a";
|
||
import {
|
||
require_react_dom
|
||
} from "/node_modules/.vite/deps/chunk-GYWC62UC.js?v=e565559a";
|
||
import {
|
||
require_react
|
||
} from "/node_modules/.vite/deps/chunk-HS5T2ZWL.js?v=e565559a";
|
||
import {
|
||
__commonJS,
|
||
__toESM
|
||
} from "/node_modules/.vite/deps/chunk-AUZ3RYOM.js?v=e565559a";
|
||
|
||
// node_modules/lodash/isObject.js
|
||
var require_isObject = __commonJS({
|
||
"node_modules/lodash/isObject.js"(exports, module) {
|
||
function isObject(value) {
|
||
var type = typeof value;
|
||
return value != null && (type == "object" || type == "function");
|
||
}
|
||
module.exports = isObject;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_freeGlobal.js
|
||
var require_freeGlobal = __commonJS({
|
||
"node_modules/lodash/_freeGlobal.js"(exports, module) {
|
||
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
|
||
module.exports = freeGlobal;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_root.js
|
||
var require_root = __commonJS({
|
||
"node_modules/lodash/_root.js"(exports, module) {
|
||
var freeGlobal = require_freeGlobal();
|
||
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
|
||
var root = freeGlobal || freeSelf || Function("return this")();
|
||
module.exports = root;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/now.js
|
||
var require_now = __commonJS({
|
||
"node_modules/lodash/now.js"(exports, module) {
|
||
var root = require_root();
|
||
var now = function() {
|
||
return root.Date.now();
|
||
};
|
||
module.exports = now;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_trimmedEndIndex.js
|
||
var require_trimmedEndIndex = __commonJS({
|
||
"node_modules/lodash/_trimmedEndIndex.js"(exports, module) {
|
||
var reWhitespace = /\s/;
|
||
function trimmedEndIndex(string) {
|
||
var index = string.length;
|
||
while (index-- && reWhitespace.test(string.charAt(index))) {
|
||
}
|
||
return index;
|
||
}
|
||
module.exports = trimmedEndIndex;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_baseTrim.js
|
||
var require_baseTrim = __commonJS({
|
||
"node_modules/lodash/_baseTrim.js"(exports, module) {
|
||
var trimmedEndIndex = require_trimmedEndIndex();
|
||
var reTrimStart = /^\s+/;
|
||
function baseTrim(string) {
|
||
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
|
||
}
|
||
module.exports = baseTrim;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_Symbol.js
|
||
var require_Symbol = __commonJS({
|
||
"node_modules/lodash/_Symbol.js"(exports, module) {
|
||
var root = require_root();
|
||
var Symbol = root.Symbol;
|
||
module.exports = Symbol;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_getRawTag.js
|
||
var require_getRawTag = __commonJS({
|
||
"node_modules/lodash/_getRawTag.js"(exports, module) {
|
||
var Symbol = require_Symbol();
|
||
var objectProto = Object.prototype;
|
||
var hasOwnProperty = objectProto.hasOwnProperty;
|
||
var nativeObjectToString = objectProto.toString;
|
||
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
|
||
function getRawTag(value) {
|
||
var isOwn = hasOwnProperty.call(value, symToStringTag), tag = value[symToStringTag];
|
||
try {
|
||
value[symToStringTag] = void 0;
|
||
var unmasked = true;
|
||
} catch (e) {
|
||
}
|
||
var result = nativeObjectToString.call(value);
|
||
if (unmasked) {
|
||
if (isOwn) {
|
||
value[symToStringTag] = tag;
|
||
} else {
|
||
delete value[symToStringTag];
|
||
}
|
||
}
|
||
return result;
|
||
}
|
||
module.exports = getRawTag;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_objectToString.js
|
||
var require_objectToString = __commonJS({
|
||
"node_modules/lodash/_objectToString.js"(exports, module) {
|
||
var objectProto = Object.prototype;
|
||
var nativeObjectToString = objectProto.toString;
|
||
function objectToString(value) {
|
||
return nativeObjectToString.call(value);
|
||
}
|
||
module.exports = objectToString;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/_baseGetTag.js
|
||
var require_baseGetTag = __commonJS({
|
||
"node_modules/lodash/_baseGetTag.js"(exports, module) {
|
||
var Symbol = require_Symbol();
|
||
var getRawTag = require_getRawTag();
|
||
var objectToString = require_objectToString();
|
||
var nullTag = "[object Null]";
|
||
var undefinedTag = "[object Undefined]";
|
||
var symToStringTag = Symbol ? Symbol.toStringTag : void 0;
|
||
function baseGetTag(value) {
|
||
if (value == null) {
|
||
return value === void 0 ? undefinedTag : nullTag;
|
||
}
|
||
return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value);
|
||
}
|
||
module.exports = baseGetTag;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/isObjectLike.js
|
||
var require_isObjectLike = __commonJS({
|
||
"node_modules/lodash/isObjectLike.js"(exports, module) {
|
||
function isObjectLike(value) {
|
||
return value != null && typeof value == "object";
|
||
}
|
||
module.exports = isObjectLike;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/isSymbol.js
|
||
var require_isSymbol = __commonJS({
|
||
"node_modules/lodash/isSymbol.js"(exports, module) {
|
||
var baseGetTag = require_baseGetTag();
|
||
var isObjectLike = require_isObjectLike();
|
||
var symbolTag = "[object Symbol]";
|
||
function isSymbol(value) {
|
||
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
|
||
}
|
||
module.exports = isSymbol;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/toNumber.js
|
||
var require_toNumber = __commonJS({
|
||
"node_modules/lodash/toNumber.js"(exports, module) {
|
||
var baseTrim = require_baseTrim();
|
||
var isObject = require_isObject();
|
||
var isSymbol = require_isSymbol();
|
||
var NAN = 0 / 0;
|
||
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
|
||
var reIsBinary = /^0b[01]+$/i;
|
||
var reIsOctal = /^0o[0-7]+$/i;
|
||
var freeParseInt = parseInt;
|
||
function toNumber(value) {
|
||
if (typeof value == "number") {
|
||
return value;
|
||
}
|
||
if (isSymbol(value)) {
|
||
return NAN;
|
||
}
|
||
if (isObject(value)) {
|
||
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
|
||
value = isObject(other) ? other + "" : other;
|
||
}
|
||
if (typeof value != "string") {
|
||
return value === 0 ? value : +value;
|
||
}
|
||
value = baseTrim(value);
|
||
var isBinary = reIsBinary.test(value);
|
||
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
|
||
}
|
||
module.exports = toNumber;
|
||
}
|
||
});
|
||
|
||
// node_modules/lodash/debounce.js
|
||
var require_debounce = __commonJS({
|
||
"node_modules/lodash/debounce.js"(exports, module) {
|
||
var isObject = require_isObject();
|
||
var now = require_now();
|
||
var toNumber = require_toNumber();
|
||
var FUNC_ERROR_TEXT = "Expected a function";
|
||
var nativeMax = Math.max;
|
||
var nativeMin = Math.min;
|
||
function debounce(func, wait, options) {
|
||
var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
|
||
if (typeof func != "function") {
|
||
throw new TypeError(FUNC_ERROR_TEXT);
|
||
}
|
||
wait = toNumber(wait) || 0;
|
||
if (isObject(options)) {
|
||
leading = !!options.leading;
|
||
maxing = "maxWait" in options;
|
||
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
|
||
trailing = "trailing" in options ? !!options.trailing : trailing;
|
||
}
|
||
function invokeFunc(time) {
|
||
var args = lastArgs, thisArg = lastThis;
|
||
lastArgs = lastThis = void 0;
|
||
lastInvokeTime = time;
|
||
result = func.apply(thisArg, args);
|
||
return result;
|
||
}
|
||
function leadingEdge(time) {
|
||
lastInvokeTime = time;
|
||
timerId = setTimeout(timerExpired, wait);
|
||
return leading ? invokeFunc(time) : result;
|
||
}
|
||
function remainingWait(time) {
|
||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
|
||
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
|
||
}
|
||
function shouldInvoke(time) {
|
||
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
|
||
return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
|
||
}
|
||
function timerExpired() {
|
||
var time = now();
|
||
if (shouldInvoke(time)) {
|
||
return trailingEdge(time);
|
||
}
|
||
timerId = setTimeout(timerExpired, remainingWait(time));
|
||
}
|
||
function trailingEdge(time) {
|
||
timerId = void 0;
|
||
if (trailing && lastArgs) {
|
||
return invokeFunc(time);
|
||
}
|
||
lastArgs = lastThis = void 0;
|
||
return result;
|
||
}
|
||
function cancel() {
|
||
if (timerId !== void 0) {
|
||
clearTimeout(timerId);
|
||
}
|
||
lastInvokeTime = 0;
|
||
lastArgs = lastCallTime = lastThis = timerId = void 0;
|
||
}
|
||
function flush() {
|
||
return timerId === void 0 ? result : trailingEdge(now());
|
||
}
|
||
function debounced() {
|
||
var time = now(), isInvoking = shouldInvoke(time);
|
||
lastArgs = arguments;
|
||
lastThis = this;
|
||
lastCallTime = time;
|
||
if (isInvoking) {
|
||
if (timerId === void 0) {
|
||
return leadingEdge(lastCallTime);
|
||
}
|
||
if (maxing) {
|
||
clearTimeout(timerId);
|
||
timerId = setTimeout(timerExpired, wait);
|
||
return invokeFunc(lastCallTime);
|
||
}
|
||
}
|
||
if (timerId === void 0) {
|
||
timerId = setTimeout(timerExpired, wait);
|
||
}
|
||
return result;
|
||
}
|
||
debounced.cancel = cancel;
|
||
debounced.flush = flush;
|
||
return debounced;
|
||
}
|
||
module.exports = debounce;
|
||
}
|
||
});
|
||
|
||
// node_modules/@refinedev/devtools/dist/esm/index.js
|
||
var import_react = __toESM(require_react());
|
||
var import_react2 = __toESM(require_react());
|
||
var import_react3 = __toESM(require_react());
|
||
var import_react_dom = __toESM(require_react_dom());
|
||
|
||
// node_modules/@aliemir/dom-to-fiber-utils/dist/esm/index.js
|
||
var F = (e) => {
|
||
let r = e, t;
|
||
for (; !t && r; )
|
||
t = Object.keys(r).find((n) => n.startsWith("__reactFiber$")), t || (r = r.parentElement);
|
||
return t && r ? r[t] : null;
|
||
};
|
||
var i = (e) => {
|
||
var r, t, n, u2;
|
||
return e && (((r = e.type) == null ? void 0 : r.displayName) || ((t = e.type) == null ? void 0 : t.name) || ((n = e.elementType) == null ? void 0 : n.displayName) || ((u2 = e.elementType) == null ? void 0 : u2.name)) || null;
|
||
};
|
||
var l = (e) => e.return || null;
|
||
var s = (e) => {
|
||
let r = e;
|
||
for (; r; ) {
|
||
if (r.stateNode)
|
||
return r;
|
||
r = l(r);
|
||
}
|
||
return null;
|
||
};
|
||
var p = (e) => e.stateNode;
|
||
var o = (e) => {
|
||
if (!e)
|
||
return null;
|
||
if (i(e))
|
||
return e;
|
||
let r = l(e);
|
||
return r ? o(r) : null;
|
||
};
|
||
|
||
// node_modules/@refinedev/devtools/dist/esm/index.js
|
||
var import_debounce = __toESM(require_debounce());
|
||
var import_react4 = __toESM(require_react());
|
||
var import_react5 = __toESM(require_react());
|
||
var y = __toESM(require_react());
|
||
var import_react6 = __toESM(require_react());
|
||
var S = __toESM(require_react());
|
||
var import_react7 = __toESM(require_react());
|
||
var import_react8 = __toESM(require_react());
|
||
var import_react9 = __toESM(require_react());
|
||
var import_react10 = __toESM(require_react());
|
||
var O2 = (e) => {
|
||
let { devtoolsUrl: a } = import_react4.default.useContext(O), [p2, s2] = import_react4.default.useState([]);
|
||
import_react4.default.useEffect(() => {
|
||
e && fetch(`${a ?? "http://localhost:5001"}/api/unique-trace-items`).then((r) => r.json().then((i2) => s2(i2.data)));
|
||
}, [e, a]);
|
||
let [l2, t] = import_react4.default.useState({ stateNode: null, nameFiber: null }), [n, h] = import_react4.default.useState({ stateNode: null, nameFiber: null, derived: false });
|
||
import_react4.default.useEffect(() => e ? () => {
|
||
t({ stateNode: null, nameFiber: null }), h({ stateNode: null, nameFiber: null, derived: false });
|
||
} : () => 0, [e]);
|
||
let w = import_react4.default.useCallback((r) => {
|
||
let i2 = r, d2, x, C = false;
|
||
for (; !C && i2; )
|
||
d2 = o(i2), x = s(d2), C = p2.includes(i(d2) ?? ""), C || (i2 = l(i2));
|
||
return x && d2 ? { stateNode: x, nameFiber: d2 } : { stateNode: null, nameFiber: null };
|
||
}, [p2]), v = import_react4.default.useCallback((r) => {
|
||
let i2 = F(r);
|
||
t(w(i2));
|
||
}, [p2]);
|
||
import_react4.default.useEffect(() => {
|
||
(n.stateNode !== l2.stateNode || n.nameFiber !== l2.nameFiber) && h({ stateNode: l2.stateNode, nameFiber: l2.nameFiber, derived: false });
|
||
}, [l2]);
|
||
let m = import_react4.default.useRef({ rect: { width: 0, height: 0, x: 0, y: 0 }, name: "" }), { rect: o2, name: c } = import_react4.default.useMemo(() => {
|
||
var r;
|
||
if (!e)
|
||
return { rect: { width: 0, height: 0, x: 0, y: 0 }, name: "" };
|
||
if (n.stateNode || n.nameFiber) {
|
||
let i2 = n.stateNode ? p(n.stateNode) : null, d2 = n.nameFiber ? i(n.nameFiber) : null;
|
||
if (!i2)
|
||
return { rect: m.current.rect, name: d2 ?? m.current.name };
|
||
let x = (r = i2.getBoundingClientRect) == null ? void 0 : r.call(i2);
|
||
return x ? { rect: { width: x.width, height: x.height, x: x.left, y: x.top }, name: d2 ?? m.current.name } : { rect: m.current.rect, name: d2 ?? m.current.name };
|
||
}
|
||
return m.current;
|
||
}, [n, e]);
|
||
return m.current = { rect: o2, name: c }, import_react4.default.useEffect(() => {
|
||
if (e) {
|
||
let r = (i2) => {
|
||
if (i2.key === "Shift" && n.stateNode) {
|
||
i2.stopPropagation(), i2.preventDefault();
|
||
let d2 = l(n.nameFiber), x = w(d2);
|
||
if (x.nameFiber && x.stateNode) {
|
||
h({ ...x, derived: true });
|
||
return;
|
||
}
|
||
}
|
||
};
|
||
return document.addEventListener("keydown", r), () => document.removeEventListener("keydown", r);
|
||
}
|
||
return () => 0;
|
||
}, [n, e]), import_react4.default.useEffect(() => {
|
||
if (e) {
|
||
let r = null, i2 = (0, import_debounce.default)((d2) => {
|
||
if (d2 != null && d2.target) {
|
||
if (r === d2.target)
|
||
return;
|
||
v(d2.target), r = d2.target;
|
||
}
|
||
}, 50);
|
||
return document.addEventListener("mousemove", i2), () => document.removeEventListener("mousemove", i2);
|
||
}
|
||
return () => 0;
|
||
}, [e, v]), { rect: o2, name: c };
|
||
};
|
||
var z = (e) => y.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...e }, y.createElement("path", { fill: "#303450", stroke: "url(#arrow-union-icon)", d: "M.5 8.495V15.5h15V8.495a4.5 4.5 0 0 1-3.816-2.483L9.341 1.33c-.553-1.105-2.13-1.105-2.683 0L4.317 6.012A4.5 4.5 0 0 1 .5 8.495Z" }), y.createElement("defs", null, y.createElement("linearGradient", { id: "arrow-union-icon", x1: 8, x2: 8, y1: 0, y2: 10, gradientUnits: "userSpaceOnUse" }, y.createElement("stop", { stopColor: "#474E6B" }), y.createElement("stop", { offset: 0.9, stopColor: "#474E6B" }), y.createElement("stop", { offset: 0.901, stopColor: "#474E6B", stopOpacity: 0 }))));
|
||
var W = 38;
|
||
var Z = 7;
|
||
var A = ({ width: e, height: a, x: p2, y: s2, name: l2 }) => {
|
||
let t = s2 > W ? "top" : a > 3 * W ? "inset" : "bottom", n = p2 > Z && s2 > Z ? "outside" : "inside";
|
||
return import_react5.default.createElement("div", { id: "selector-box", style: { pointerEvents: "none", position: "fixed", opacity: l2 ? 1 : 0, transitionProperty: "width, height, transform, opacity", transitionDuration: "0.15s", transitionTimingFunction: "ease-out", border: "1.5px solid #47EBEB", borderRadius: "4px", background: "rgba(37,160,160, 0.25)", backdropFilter: "sepia(30%) hue-rotate(180deg)", zIndex: 99998, ...n === "outside" ? { left: -6, top: -6, width: e + 10, height: a + 10, transform: `translate(${p2}px, ${s2}px)` } : { left: 0, top: 0, width: e - 10, height: a - 20, transform: `translate(${p2 + 4}px, ${s2 + 4}px)` } } }, import_react5.default.createElement("div", { style: { position: "absolute", left: "-1.5px", background: "#303450", border: "1px solid #474E6B", borderRadius: "4px", padding: "8px 12px", fontSize: "12px", lineHeight: "16px", fontWeight: 400, color: "#ffffff", display: l2 ? "block" : "none", ...t === "top" && { top: "-38px" }, ...t === "bottom" && { bottom: "-38px" }, ...t === "inset" && { top: "4px", left: "8px" } } }, l2, import_react5.default.createElement(z, { style: { position: "absolute", left: "30%", ...t === "top" && { transform: "translateX(-50%) rotate(180deg)", bottom: "-9px" }, ...t === "bottom" && { transform: "translateX(-50%) ", top: "-9px" }, ...t === "inset" && { transform: "translateX(-50%) rotate(-90deg)", top: "8px", left: "-1px" }, display: l2 ? "block" : "none" } })));
|
||
};
|
||
var G = ({ active: e }) => import_react6.default.createElement("div", { style: { color: "white", pointerEvents: "none", position: "absolute", left: "calc(-50% - 144px - 14px)", top: "-36px", width: "max-content", borderRadius: "8px", backgroundColor: "#40414A", opacity: e ? 1 : 0, transitionDuration: "0.2s", transitionProperty: "transform,opacity", transitionTimingFunction: "ease-in-out", padding: "8px", fontSize: "12px", lineHeight: "12px", fontWeight: 400, textShadow: "0 0 2px #1D1E30, 1px 0 2px #1D1E30, -1px 0 2px #1D1E30, 0 1px 2px #1D1E30, 0 -1px 2px #1D1E30" } }, import_react6.default.createElement("kbd", { style: { marginLeft: "4px", padding: "2px 4px", borderRadius: "2px", background: "#1D1E30", color: "#CFD7E2", border: "none", textShadow: "none" } }, "shift"), " ", "to move to parent.", import_react6.default.createElement("kbd", { style: { marginLeft: "4px", padding: "2px 4px", borderRadius: "2px", background: "#1D1E30", color: "#CFD7E2", border: "none", textShadow: "none" } }, "space"), " ", "to highlight in monitor.");
|
||
var R = ({ onSelectorOpen: e, onHighlight: a, icon: p2, style: s2 }) => {
|
||
let [l2, t] = import_react3.default.useState(false), [n, h] = import_react3.default.useState(false), { rect: w, name: v } = O2(n), [m, o2] = import_react3.default.useState(null);
|
||
return import_react3.default.useEffect(() => {
|
||
if (!m) {
|
||
let c = document.createElement("div");
|
||
c.id = "selector-box-root", document.body.appendChild(c), o2(c);
|
||
}
|
||
}, []), import_react3.default.useEffect(() => {
|
||
n ? document.body.style.cursor = "crosshair" : document.body.style.cursor = "default";
|
||
}, [n]), import_react3.default.useEffect(() => {
|
||
let c = (r) => {
|
||
n && v && (r == null || r.preventDefault(), r == null || r.stopPropagation(), r.stopImmediatePropagation(), a(v), h(false));
|
||
};
|
||
return n ? (document.addEventListener("click", c, { capture: true }), () => {
|
||
document.removeEventListener("click", c, { capture: true });
|
||
}) : () => 0;
|
||
}, [v, a, n]), import_react3.default.useEffect(() => {
|
||
n && e();
|
||
}, [n, e]), import_react3.default.createElement("div", { style: s2 }, import_react3.default.createElement("div", { role: "button", title: "Element Selector", onMouseOver: () => t(true), onMouseOut: () => t(false), onClick: (c) => {
|
||
var r;
|
||
c.preventDefault(), c.stopPropagation(), (r = document == null ? void 0 : document.activeElement) == null || r.blur(), h((i2) => !i2);
|
||
}, style: { padding: 0, margin: 0, height: "100%", width: "100%", transform: l2 ? "rotate(180deg)" : "rotate(0deg)", transition: "transform 0.2s ease-in-out" } }, p2), import_react3.default.createElement(G, { active: n }), n && m && (0, import_react_dom.createPortal)(import_react3.default.createElement(A, { ...w, name: v }), m));
|
||
};
|
||
var X = (e) => S.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 157, height: 25, viewBox: "0 0 157 25", fill: "none", ...e }, S.createElement("g", null, S.createElement("path", { fill: "#1D1E30", d: "M17 1h123v24H17z" }), S.createElement("path", { fill: "#1D1E30", d: "M6.265 9.205A12 12 0 0 1 17.649 1H25v24H1L6.265 9.205ZM150.735 9.205A12 12 0 0 0 139.351 1H132v24h24l-5.265-15.795Z" }), S.createElement("path", { fill: "currentColor", d: "M25 14.333A1.333 1.333 0 1 1 25 17a1.333 1.333 0 0 1 0-2.667Z" }), S.createElement("path", { fill: "currentColor", fillRule: "evenodd", d: "M23.211 20.578a4 4 0 0 0 3.578 0l4-2A4 4 0 0 0 33 15v-4a4 4 0 0 0-2.211-3.578l-4-2a4 4 0 0 0-3.578 0l-4 2A4 4 0 0 0 17 11v4a4 4 0 0 0 2.211 3.578l4 2Zm-.878-4.911a2.667 2.667 0 0 0 5.334 0v-5.334a2.667 2.667 0 0 0-5.334 0v5.334Z", clipRule: "evenodd" }), S.createElement("path", { fill: "#CFD7E2", d: "M42.152 17a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h4.2c.288 0 .56.056.816.168a2.135 2.135 0 0 1 1.14 1.128c.112.256.168.532.168.828v3.984c0 .296-.056.572-.168.828a2.135 2.135 0 0 1-1.14 1.128 2.014 2.014 0 0 1-.816.168h-4.2Zm1.38-1.644h2.82a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-3.984a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.82v4.944Zm13.18-5.196a.244.244 0 0 1-.253.252h-4.44v1.656h4.02c.072 0 .132.024.18.072a.227.227 0 0 1 .084.18v1.128a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072h-4.02v1.644h4.44c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-5.832a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h5.832c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.128ZM63.014 17h-2.232a.387.387 0 0 1-.216-.072.356.356 0 0 1-.144-.168l-1.716-4.296a.853.853 0 0 1-.072-.24 1.783 1.783 0 0 1-.024-.264V9.032c0-.072.024-.132.072-.18a.227.227 0 0 1 .18-.084h1.128c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v2.616c0 .072.008.156.024.252s.04.176.072.24l1.284 3.216h.528l1.284-3.216a.853.853 0 0 0 .072-.24c.016-.096.024-.18.024-.252V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.128c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v2.928c0 .072-.008.16-.024.264a.853.853 0 0 1-.072.24l-1.716 4.296a.356.356 0 0 1-.144.168.387.387 0 0 1-.216.072ZM73.29 8.768c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v1.128a.227.227 0 0 1-.084.18.244.244 0 0 1-.18.072h-2.208v6.324a.264.264 0 0 1-.084.192.244.244 0 0 1-.18.072H69.69a.244.244 0 0 1-.18-.072.287.287 0 0 1-.072-.192v-6.324H67.23a.287.287 0 0 1-.192-.072.244.244 0 0 1-.072-.18V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h6.06Zm6.507.012c.296 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.296 0-.572-.056-.828-.168a2.171 2.171 0 0 1-1.128-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.128-1.128c.256-.112.532-.168.828-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.336-.132h-2.34a.497.497 0 0 0-.348.132.455.455 0 0 0-.132.336v3.996c0 .136.044.248.132.336a.497.497 0 0 0 .348.132h2.34a.455.455 0 0 0 .336-.132.436.436 0 0 0 .144-.336v-3.996Zm7.888-2.112c.295 0 .572.056.828.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v3.996c0 .288-.056.56-.168.816a2.171 2.171 0 0 1-1.128 1.128 2.043 2.043 0 0 1-.828.168h-2.34c-.297 0-.573-.056-.829-.168a2.171 2.171 0 0 1-1.127-1.128 2.014 2.014 0 0 1-.168-.816v-3.996c0-.288.056-.56.168-.816a2.171 2.171 0 0 1 1.127-1.128c.257-.112.532-.168.829-.168h2.34Zm.48 2.112a.436.436 0 0 0-.144-.336.455.455 0 0 0-.337-.132h-2.34a.497.497 0 0 0-.347.132.455.455 0 0 0-.133.336v3.996c0 .136.044.248.133.336a.497.497 0 0 0 .347.132h2.34a.455.455 0 0 0 .337-.132.436.436 0 0 0 .143-.336v-3.996ZM98.294 17H92.68a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192V9.032c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v6.324h4.236c.072 0 .132.028.18.084a.244.244 0 0 1 .072.18v1.116a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072Zm7.336-5.76a.287.287 0 0 1-.192-.072.287.287 0 0 1-.072-.192v-.084a.455.455 0 0 0-.132-.336.436.436 0 0 0-.336-.144h-2.352a.46.46 0 0 0-.336.144.455.455 0 0 0-.132.336v.696c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.528.168.816v.696c0 .296-.056.572-.168.828a2.171 2.171 0 0 1-1.128 1.128 2.014 2.014 0 0 1-.816.168h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.043 2.043 0 0 1-.168-.828v-.084c0-.072.024-.132.072-.18a.264.264 0 0 1 .192-.084h1.116c.072 0 .132.028.18.084a.227.227 0 0 1 .084.18v.084c0 .136.044.252.132.348a.482.482 0 0 0 .336.132h2.352a.455.455 0 0 0 .336-.132.497.497 0 0 0 .132-.348v-.696a.455.455 0 0 0-.132-.336.455.455 0 0 0-.336-.132h-2.352c-.288 0-.56-.056-.816-.168a2.171 2.171 0 0 1-1.128-1.128 2.099 2.099 0 0 1-.168-.828v-.696c0-.296.056-.572.168-.828a2.171 2.171 0 0 1 1.128-1.128c.256-.112.528-.168.816-.168h2.352c.288 0 .56.056.816.168a2.171 2.171 0 0 1 1.128 1.128c.112.256.168.532.168.828v.084a.287.287 0 0 1-.072.192.244.244 0 0 1-.18.072h-1.128Z" })));
|
||
var Y = (e) => import_react7.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 16, height: 16, viewBox: "0 0 16 16", fill: "none", ...e }, import_react7.default.createElement("path", { fill: "#0FBDBD", fillRule: "evenodd", d: "M9 1a1 1 0 0 0-2 0v2.1A5.006 5.006 0 0 0 3.1 7H1a1 1 0 0 0 0 2h2.1A5.006 5.006 0 0 0 7 12.9V15a1 1 0 1 0 2 0v-2.1A5.006 5.006 0 0 0 12.9 9H15a1 1 0 1 0 0-2h-2.1A5.006 5.006 0 0 0 9 3.1V1Zm2 7a3 3 0 1 0-6 0 3 3 0 0 0 6 0Z", clipRule: "evenodd" }));
|
||
var U = ({ onClick: e, onSelectorHighlight: a, onSelectorOpen: p2 }) => {
|
||
let [s2, l2] = import_react2.default.useState(false);
|
||
return import_react2.default.createElement("div", { onMouseOver: () => l2(true), onMouseOut: () => l2(false), style: { position: "relative", userSelect: "none", WebkitUserSelect: "none", background: "none", border: "none", padding: 0, paddingRight: "1px", margin: 0, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", color: s2 ? "#0FBDBD" : "#6C7793", transition: "color 0.1s ease-in-out" }, onClick: e }, import_react2.default.createElement(X, null), import_react2.default.createElement(R, { style: { position: "absolute", top: 5, right: 18, width: "16px", height: "16px" }, icon: import_react2.default.createElement(Y, { width: 16, height: 16, style: { pointerEvents: "none" } }), onSelectorOpen: p2, onHighlight: a }));
|
||
};
|
||
var j = (e) => e ? "scaleX(1) translateY(0)" : "scaleX(0) translateY(25vw)";
|
||
var F2 = 50;
|
||
var f = 10;
|
||
var se = () => typeof window < "u" ? window.innerWidth * 0.7 : 1440 * 0.7;
|
||
var ae = () => typeof window < "u" ? window.innerHeight * 0.7 : 900 * 0.7;
|
||
var q = 640;
|
||
var K = 360;
|
||
var L2 = (e) => {
|
||
switch (e) {
|
||
case "left":
|
||
return { left: `calc(${F2}px + ${f}px)`, top: "50%", transform: "translateY(-50%)" };
|
||
case "right":
|
||
return { right: `calc(${F2}px + ${f}px)`, top: "50%", transform: "translateY(-50%)" };
|
||
case "top":
|
||
return { left: "50%", top: `calc(${F2}px + ${f}px)`, transform: "translateX(-50%)" };
|
||
case "bottom":
|
||
return { left: "50%", bottom: `calc(${F2}px + ${f}px)`, transform: "translateX(-50%)" };
|
||
}
|
||
};
|
||
var I = (e) => {
|
||
switch (e) {
|
||
case "left":
|
||
case "right":
|
||
return -f - F2 - f + (typeof window < "u" ? window.innerWidth : 1440) - f;
|
||
case "top":
|
||
case "bottom":
|
||
return -f + (typeof window < "u" ? window.innerWidth : 1440) - f;
|
||
}
|
||
};
|
||
var k = (e) => {
|
||
switch (e) {
|
||
case "left":
|
||
case "right":
|
||
return -f + (typeof window < "u" ? window.innerHeight : 900) - f;
|
||
case "top":
|
||
case "bottom":
|
||
return -f - F2 - f + (typeof window < "u" ? window.innerHeight : 900) - f;
|
||
}
|
||
};
|
||
var V = (e, a) => {
|
||
let p2 = { width: se(), height: ae() }, s2 = I(e), l2 = k(e), t = Math.min(s2, (a ?? p2).width), n = Math.min(l2, (a ?? p2).height);
|
||
return { width: t, height: n };
|
||
};
|
||
var P = (e) => {
|
||
let a = Math.round(e);
|
||
return a % 2 === 0 ? a : a + 1;
|
||
};
|
||
var H = (e) => import_react9.default.createElement("svg", { width: 10, height: 26, viewBox: "0 0 10 26", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...e }, import_react9.default.createElement("rect", { x: 0.5, y: 0.5, width: 9, height: 25, rx: 4.5, fill: "#1D1E30" }), import_react9.default.createElement("path", { d: "M7 5C7 6.10457 6.10457 7 5 7C3.89543 7 3 6.10457 3 5C3 3.89543 3.89543 3 5 3C6.10457 3 7 3.89543 7 5Z", fill: "#303450" }), import_react9.default.createElement("path", { d: "M7 13C7 14.1046 6.10457 15 5 15C3.89543 15 3 14.1046 3 13C3 11.8954 3.89543 11 5 11C6.10457 11 7 11.8954 7 13Z", fill: "#303450" }), import_react9.default.createElement("path", { d: "M7 21C7 22.1046 6.10457 23 5 23C3.89543 23 3 22.1046 3 21C3 19.8954 3.89543 19 5 19C6.10457 19 7 19.8954 7 21Z", fill: "#303450" }), import_react9.default.createElement("rect", { x: 0.5, y: 0.5, width: 9, height: 25, rx: 4.5, stroke: "#303450" }));
|
||
var J = ({ placement: e, visible: a, children: p2 }) => {
|
||
let [s2, l2] = import_react8.default.useState(false), [t, n] = import_react8.default.useState(null), [h, w] = import_react8.default.useState(null), [v, m] = import_react8.default.useState(() => {
|
||
let o2 = V(e);
|
||
return { width: P(o2.width), height: P(o2.height) };
|
||
});
|
||
return import_react8.default.useEffect(() => {
|
||
let o2 = () => {
|
||
m((c) => {
|
||
let r = V(e, c);
|
||
return { width: P(r.width), height: P(r.height) };
|
||
});
|
||
};
|
||
return o2(), window.addEventListener("resize", o2), () => {
|
||
window.removeEventListener("resize", o2);
|
||
};
|
||
}, [e]), import_react8.default.useEffect(() => {
|
||
let o2 = () => {
|
||
n(null);
|
||
};
|
||
if (t !== null)
|
||
return window.addEventListener("mouseup", o2), () => {
|
||
window.removeEventListener("mouseup", o2);
|
||
};
|
||
}, [t]), import_react8.default.useEffect(() => {
|
||
let o2 = document.body.style.cursor;
|
||
return t != null && t.includes("x") ? document.body.style.cursor = "col-resize" : t != null && t.includes("y") && (document.body.style.cursor = "row-resize"), () => {
|
||
document.body.style.cursor = o2;
|
||
};
|
||
}, [t]), import_react8.default.useEffect(() => {
|
||
let o2 = (c) => {
|
||
if ((t == null ? void 0 : t[1]) === "x") {
|
||
let r = c.clientX - ((h == null ? void 0 : h.x) ?? c.clientX), i2 = v.width + (t === "lx" ? -r : r) * 2;
|
||
m((d2) => ({ ...d2, width: P(Math.min(I(e), Math.max(q, i2))) }));
|
||
} else if ((t == null ? void 0 : t[1]) === "y") {
|
||
let r = c.clientY - ((h == null ? void 0 : h.y) ?? c.clientY), i2 = v.height + (t === "ty" ? -r : r) * 1;
|
||
m((d2) => ({ ...d2, height: P(Math.min(k(e), Math.max(K, i2))) }));
|
||
}
|
||
};
|
||
if (t !== null)
|
||
return window.addEventListener("mousemove", o2), () => {
|
||
window.removeEventListener("mousemove", o2);
|
||
};
|
||
}, [t, e]), import_react8.default.createElement("div", { style: { position: "absolute", borderRadius: "8px", boxShadow: "0 0 10px rgba(0, 0, 0, 0.5)", border: "1px solid rgba(0, 0, 0, 0.5)", transitionProperty: "transform, opacity", transitionTimingFunction: "ease-in-out", transitionDuration: "0.2s", ...L2(e), opacity: a ? 1 : 0, transform: `${L2(e).transform} ${j(a ?? false)}`, ...v }, onMouseEnter: () => {
|
||
l2(true);
|
||
}, onMouseLeave: () => {
|
||
l2(false);
|
||
} }, p2({ resizing: t }), import_react8.default.createElement(import_react8.default.Fragment, null, import_react8.default.createElement("div", { style: { position: "absolute", left: 0, top: "50%", width: "10px", height: "26px", transform: "translateY(-13px) translateX(-5px)", cursor: "col-resize", transition: "opacity ease-in-out 0.2s", pointerEvents: s2 || t ? "auto" : "none", opacity: s2 || t ? 1 : 0 }, onMouseDown: (o2) => {
|
||
n("lx"), w({ x: o2.clientX, y: o2.clientY }), o2.preventDefault();
|
||
} }, import_react8.default.createElement(H, null)), import_react8.default.createElement("div", { style: { position: "absolute", right: 0, top: "50%", width: "10px", height: "26px", transform: "translateY(-13px) translateX(5px)", cursor: "col-resize", transition: "opacity ease-in-out 0.2s", pointerEvents: s2 || t ? "auto" : "none", opacity: s2 || t ? 1 : 0 }, onMouseDown: (o2) => {
|
||
n("rx"), w({ x: o2.clientX, y: o2.clientY }), o2.preventDefault();
|
||
} }, import_react8.default.createElement(H, null)), import_react8.default.createElement("div", { style: { position: "absolute", left: "50%", top: 0, width: "26px", height: "10px", transform: "translateY(-5px) translateX(-13px)", cursor: "row-resize", transition: "opacity ease-in-out 0.2s", pointerEvents: s2 || t ? "auto" : "none", opacity: s2 || t ? 1 : 0 }, onMouseDown: (o2) => {
|
||
n("ty"), w({ x: o2.clientX, y: o2.clientY }), o2.preventDefault();
|
||
} }, import_react8.default.createElement(H, { style: { transform: "rotate(90deg)", transformOrigin: "13px 13px" } })), import_react8.default.createElement("div", { style: { position: "absolute", left: "50%", bottom: 0, width: "26px", height: "10px", transform: "translateY(5px) translateX(-13px)", cursor: "row-resize", transition: "opacity ease-in-out 0.2s", pointerEvents: s2 || t ? "auto" : "none", opacity: s2 || t ? 1 : 0 }, onMouseDown: (o2) => {
|
||
n("by"), w({ x: o2.clientX, y: o2.clientY }), o2.preventDefault();
|
||
} }, import_react8.default.createElement(H, { style: { transform: "rotate(90deg)", transformOrigin: "13px 13px" } }))));
|
||
};
|
||
var ue = false ? () => null : () => {
|
||
let [e, a] = import_react.default.useState(false), [p2, s2] = import_react.default.useState(false), [l2] = import_react.default.useState("bottom"), { devtoolsUrl: t, ws: n } = import_react.default.useContext(O), [h, w] = import_react.default.useState(0), v = import_react.default.useCallback((o2) => {
|
||
n && d(n, T.DEVTOOLS_HIGHLIGHT_IN_MONITOR, { name: o2 }), s2(true);
|
||
}, [n]), m = import_react.default.useCallback(() => {
|
||
s2(false);
|
||
}, []);
|
||
return import_react.default.useEffect(() => {
|
||
typeof window < "u" && a(true);
|
||
}, []), import_react.default.useEffect(() => {
|
||
if (e) {
|
||
w(window.innerWidth);
|
||
let o2 = () => {
|
||
w(window.innerWidth);
|
||
};
|
||
return window.addEventListener("resize", o2), () => {
|
||
window.removeEventListener("resize", o2);
|
||
};
|
||
}
|
||
return () => {
|
||
};
|
||
}, [e]), e ? import_react.default.createElement("div", { style: { position: "fixed", left: `${Math.round(h / 2)}px`, transform: "translateX(-50%)", bottom: 0, zIndex: 99999 } }, import_react.default.createElement(U, { onClick: () => s2((o2) => !o2), onSelectorHighlight: v, onSelectorOpen: m }), import_react.default.createElement(J, { visible: p2, placement: l2 }, ({ resizing: o2 }) => import_react.default.createElement("iframe", { allow: "clipboard-write;", src: t, srcDoc: t ? void 0 : `
|
||
<html style="height:100%;padding:0;margin:0;">
|
||
<body style="display:flex;justify-content:center;height:100%;padding:24px;margin:0;align-items:center;box-sizing:border-box;">
|
||
<h1 style="font-family:ui-monospace,monospace;color:#CFD7E2;text-align:center;">Could not connect to the devtools server</h1>
|
||
</body>
|
||
</html>
|
||
`, style: { width: "100%", height: "100%", border: "none", borderRadius: "7px", pointerEvents: o2 ? "none" : "auto", background: "#14141F" } }))) : null;
|
||
};
|
||
var he = false ? ({ children: e }) => e : ({ children: e }) => import_react10.default.createElement(L, null, e);
|
||
export {
|
||
ue as DevtoolsPanel,
|
||
he as DevtoolsProvider
|
||
};
|
||
//# sourceMappingURL=@refinedev_devtools.js.map
|
||
<EFBFBD>?<3F>8<EFBFBD>; |