fix: production build
This commit is contained in:
@@ -3443,11 +3443,11 @@
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React12 = require_react();
|
||||
var React11 = require_react();
|
||||
var _assign = require_object_assign();
|
||||
var Scheduler = require_scheduler();
|
||||
var tracing = require_tracing();
|
||||
var ReactSharedInternals = React12.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
var ReactSharedInternals = React11.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function warn(format) {
|
||||
{
|
||||
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
||||
@@ -3479,7 +3479,7 @@
|
||||
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
||||
}
|
||||
}
|
||||
if (!React12) {
|
||||
if (!React11) {
|
||||
{
|
||||
throw Error("ReactDOM was loaded before React. Make sure you load the React package before loading ReactDOM.");
|
||||
}
|
||||
@@ -4815,7 +4815,7 @@
|
||||
var didWarnInvalidChild = false;
|
||||
function flattenChildren(children) {
|
||||
var content = "";
|
||||
React12.Children.forEach(children, function(child) {
|
||||
React11.Children.forEach(children, function(child) {
|
||||
if (child == null) {
|
||||
return;
|
||||
}
|
||||
@@ -4826,7 +4826,7 @@
|
||||
function validateProps(element, props) {
|
||||
{
|
||||
if (typeof props.children === "object" && props.children !== null) {
|
||||
React12.Children.forEach(props.children, function(child) {
|
||||
React11.Children.forEach(props.children, function(child) {
|
||||
if (child == null) {
|
||||
return;
|
||||
}
|
||||
@@ -12029,7 +12029,7 @@
|
||||
}
|
||||
var fakeInternalInstance = {};
|
||||
var isArray = Array.isArray;
|
||||
var emptyRefsObject = new React12.Component().refs;
|
||||
var emptyRefsObject = new React11.Component().refs;
|
||||
var didWarnAboutStateAssignmentForComponent;
|
||||
var didWarnAboutUninitializedState;
|
||||
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
|
||||
@@ -21632,7 +21632,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
if (true) {
|
||||
(function() {
|
||||
"use strict";
|
||||
var React12 = require_react();
|
||||
var React11 = require_react();
|
||||
var _assign = require_object_assign();
|
||||
var REACT_ELEMENT_TYPE = 60103;
|
||||
var REACT_PORTAL_TYPE = 60106;
|
||||
@@ -21689,7 +21689,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
var ReactSharedInternals = React12.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
var ReactSharedInternals = React11.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
||||
function error(format) {
|
||||
{
|
||||
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
||||
@@ -22459,10 +22459,10 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
return jsxWithValidation(type, props, key, false);
|
||||
}
|
||||
}
|
||||
var jsx5 = jsxWithValidationDynamic;
|
||||
var jsxs2 = jsxWithValidationStatic;
|
||||
exports.jsx = jsx5;
|
||||
exports.jsxs = jsxs2;
|
||||
var jsx7 = jsxWithValidationDynamic;
|
||||
var jsxs4 = jsxWithValidationStatic;
|
||||
exports.jsx = jsx7;
|
||||
exports.jsxs = jsxs4;
|
||||
})();
|
||||
}
|
||||
}
|
||||
@@ -22497,73 +22497,93 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
]);
|
||||
|
||||
// extension/icons.jsx
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
||||
function LogoIcon() {
|
||||
return /* @__PURE__ */ React.createElement("svg", {
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("svg", {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
width: "56",
|
||||
height: "56",
|
||||
fill: "none",
|
||||
viewBox: "0 0 56 56",
|
||||
"aria-label": "Nostr Connect logo"
|
||||
}, /* @__PURE__ */ React.createElement("rect", {
|
||||
width: "56",
|
||||
height: "56",
|
||||
fill: "#EEECFD",
|
||||
rx: "16"
|
||||
}), /* @__PURE__ */ React.createElement("rect", {
|
||||
width: "55",
|
||||
height: "55",
|
||||
x: "0.5",
|
||||
y: "0.5",
|
||||
stroke: "#5A41F4",
|
||||
strokeOpacity: "0.25",
|
||||
rx: "15.5"
|
||||
}), /* @__PURE__ */ React.createElement("rect", {
|
||||
width: "39",
|
||||
height: "39",
|
||||
x: "8.5",
|
||||
y: "8.5",
|
||||
fill: "url(#paint0_linear_24_2379)",
|
||||
rx: "19.5"
|
||||
}), /* @__PURE__ */ React.createElement("rect", {
|
||||
width: "39",
|
||||
height: "39",
|
||||
x: "8.5",
|
||||
y: "8.5",
|
||||
stroke: "#6149F6",
|
||||
rx: "19.5"
|
||||
}), /* @__PURE__ */ React.createElement("g", {
|
||||
fill: "#fff",
|
||||
stroke: "#6149F6",
|
||||
clipPath: "url(#clip0_24_2379)"
|
||||
}, /* @__PURE__ */ React.createElement("path", {
|
||||
d: "M23.78 20.634l.408-.235-.21-.422a4.432 4.432 0 01-.458-1.797l-.031-.78-.696.355A11.533 11.533 0 0016.5 27.998h0V28c.002.87.103 1.738.302 2.585a3.525 3.525 0 102.843-1.058A8.377 8.377 0 0119.5 28a8.523 8.523 0 014.28-7.366zM36.5 28.023v.468l.467.03c.621.042 1.227.212 1.778.5l.687.36.044-.774.005-.075c.01-.166.02-.349.02-.532v-.001a11.524 11.524 0 00-8.142-10.99 3.526 3.526 0 10-.501 2.989A8.524 8.524 0 0136.5 28s0 0 0 0v.022zM33.185 32.622a3.49 3.49 0 00.311 1.844 8.442 8.442 0 01-9.766.877l-.407-.239-.262.392c-.343.514-.79.95-1.311 1.282l-.652.414.645.425a11.39 11.39 0 0014.092-1.23c.264.069.536.107.81.113h.01a3.5 3.5 0 002.803-5.6h.556l-1.603-.932a3.49 3.49 0 00-5.226 2.654z"
|
||||
})), /* @__PURE__ */ React.createElement("defs", null, /* @__PURE__ */ React.createElement("linearGradient", {
|
||||
id: "paint0_linear_24_2379",
|
||||
x1: "28",
|
||||
x2: "28",
|
||||
y1: "8",
|
||||
y2: "48",
|
||||
gradientUnits: "userSpaceOnUse"
|
||||
}, /* @__PURE__ */ React.createElement("stop", {
|
||||
stopColor: "#8E7CFF"
|
||||
}), /* @__PURE__ */ React.createElement("stop", {
|
||||
offset: "1",
|
||||
stopColor: "#5A41F4"
|
||||
})), /* @__PURE__ */ React.createElement("clipPath", {
|
||||
id: "clip0_24_2379"
|
||||
}, /* @__PURE__ */ React.createElement("path", {
|
||||
fill: "#fff",
|
||||
d: "M0 0H24V24H0z",
|
||||
transform: "translate(16 15)"
|
||||
}))));
|
||||
"aria-label": "Nostr Connect logo",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
|
||||
width: "56",
|
||||
height: "56",
|
||||
fill: "#EEECFD",
|
||||
rx: "16"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
|
||||
width: "55",
|
||||
height: "55",
|
||||
x: "0.5",
|
||||
y: "0.5",
|
||||
stroke: "#5A41F4",
|
||||
strokeOpacity: "0.25",
|
||||
rx: "15.5"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
|
||||
width: "39",
|
||||
height: "39",
|
||||
x: "8.5",
|
||||
y: "8.5",
|
||||
fill: "url(#paint0_linear_24_2379)",
|
||||
rx: "19.5"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", {
|
||||
width: "39",
|
||||
height: "39",
|
||||
x: "8.5",
|
||||
y: "8.5",
|
||||
stroke: "#6149F6",
|
||||
rx: "19.5"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", {
|
||||
fill: "#fff",
|
||||
stroke: "#6149F6",
|
||||
clipPath: "url(#clip0_24_2379)",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
||||
d: "M23.78 20.634l.408-.235-.21-.422a4.432 4.432 0 01-.458-1.797l-.031-.78-.696.355A11.533 11.533 0 0016.5 27.998h0V28c.002.87.103 1.738.302 2.585a3.525 3.525 0 102.843-1.058A8.377 8.377 0 0119.5 28a8.523 8.523 0 014.28-7.366zM36.5 28.023v.468l.467.03c.621.042 1.227.212 1.778.5l.687.36.044-.774.005-.075c.01-.166.02-.349.02-.532v-.001a11.524 11.524 0 00-8.142-10.99 3.526 3.526 0 10-.501 2.989A8.524 8.524 0 0136.5 28s0 0 0 0v.022zM33.185 32.622a3.49 3.49 0 00.311 1.844 8.442 8.442 0 01-9.766.877l-.407-.239-.262.392c-.343.514-.79.95-1.311 1.282l-.652.414.645.425a11.39 11.39 0 0014.092-1.23c.264.069.536.107.81.113h.01a3.5 3.5 0 002.803-5.6h.556l-1.603-.932a3.49 3.49 0 00-5.226 2.654z"
|
||||
})
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("defs", {
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("linearGradient", {
|
||||
id: "paint0_linear_24_2379",
|
||||
x1: "28",
|
||||
x2: "28",
|
||||
y1: "8",
|
||||
y2: "48",
|
||||
gradientUnits: "userSpaceOnUse",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
||||
stopColor: "#8E7CFF"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("stop", {
|
||||
offset: "1",
|
||||
stopColor: "#5A41F4"
|
||||
})
|
||||
]
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("clipPath", {
|
||||
id: "clip0_24_2379",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
||||
fill: "#fff",
|
||||
d: "M0 0H24V24H0z",
|
||||
transform: "translate(16 15)"
|
||||
})
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-checkbox@1.3.3_@types+react-dom@19.0.2_@types+react@19.0.2__@types+reac_d96e45962cc5ba292a62810b70da3303/node_modules/@radix-ui/react-checkbox/dist/index.mjs
|
||||
var React11 = __toESM(require_react(), 1);
|
||||
var React10 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-compose-refs@1.1.2_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-compose-refs/dist/index.mjs
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var React = __toESM(require_react(), 1);
|
||||
function setRef(ref, value) {
|
||||
if (typeof ref === "function") {
|
||||
return ref(value);
|
||||
@@ -22596,28 +22616,28 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
};
|
||||
}
|
||||
function useComposedRefs(...refs) {
|
||||
return React2.useCallback(composeRefs(...refs), refs);
|
||||
return React.useCallback(composeRefs(...refs), refs);
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-context@1.1.2_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-context/dist/index.mjs
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var React2 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
|
||||
function createContextScope(scopeName, createContextScopeDeps = []) {
|
||||
let defaultContexts = [];
|
||||
function createContext3(rootComponentName, defaultContext) {
|
||||
const BaseContext = React3.createContext(defaultContext);
|
||||
const BaseContext = React2.createContext(defaultContext);
|
||||
const index = defaultContexts.length;
|
||||
defaultContexts = [...defaultContexts, defaultContext];
|
||||
const Provider = (props) => {
|
||||
const { scope, children, ...context } = props;
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const value = React3.useMemo(() => context, Object.values(context));
|
||||
const value = React2.useMemo(() => context, Object.values(context));
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Context.Provider, { value, children });
|
||||
};
|
||||
Provider.displayName = rootComponentName + "Provider";
|
||||
function useContext2(consumerName, scope) {
|
||||
const Context = scope?.[scopeName]?.[index] || BaseContext;
|
||||
const context = React3.useContext(Context);
|
||||
const context = React2.useContext(Context);
|
||||
if (context)
|
||||
return context;
|
||||
if (defaultContext !== void 0)
|
||||
@@ -22628,11 +22648,11 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
const createScope = () => {
|
||||
const scopeContexts = defaultContexts.map((defaultContext) => {
|
||||
return React3.createContext(defaultContext);
|
||||
return React2.createContext(defaultContext);
|
||||
});
|
||||
return function useScope(scope) {
|
||||
const contexts = scope?.[scopeName] || scopeContexts;
|
||||
return React3.useMemo(
|
||||
return React2.useMemo(
|
||||
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
||||
[scope, contexts]
|
||||
);
|
||||
@@ -22656,7 +22676,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
const currentScope = scopeProps[`__scope${scopeName}`];
|
||||
return { ...nextScopes2, ...currentScope };
|
||||
}, {});
|
||||
return React3.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
return React2.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
||||
};
|
||||
};
|
||||
createScope.scopeName = baseScope.scopeName;
|
||||
@@ -22675,16 +22695,16 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-use-layout-effect@1.1.1_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs
|
||||
var React4 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = globalThis?.document ? React4.useLayoutEffect : () => {
|
||||
var React3 = __toESM(require_react(), 1);
|
||||
var useLayoutEffect2 = globalThis?.document ? React3.useLayoutEffect : () => {
|
||||
};
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-use-controllable-state@1.2.2_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs
|
||||
var React22 = __toESM(require_react(), 1);
|
||||
var useInsertionEffect = React5[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
||||
var useInsertionEffect = React4[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
||||
function useControllableState({
|
||||
prop,
|
||||
defaultProp,
|
||||
@@ -22699,8 +22719,8 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
const isControlled = prop !== void 0;
|
||||
const value = isControlled ? prop : uncontrolledProp;
|
||||
if (true) {
|
||||
const isControlledRef = React5.useRef(prop !== void 0);
|
||||
React5.useEffect(() => {
|
||||
const isControlledRef = React4.useRef(prop !== void 0);
|
||||
React4.useEffect(() => {
|
||||
const wasControlled = isControlledRef.current;
|
||||
if (wasControlled !== isControlled) {
|
||||
const from = wasControlled ? "controlled" : "uncontrolled";
|
||||
@@ -22712,7 +22732,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
isControlledRef.current = isControlled;
|
||||
}, [isControlled, caller]);
|
||||
}
|
||||
const setValue = React5.useCallback(
|
||||
const setValue = React4.useCallback(
|
||||
(nextValue) => {
|
||||
if (isControlled) {
|
||||
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
||||
@@ -22731,13 +22751,13 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
defaultProp,
|
||||
onChange
|
||||
}) {
|
||||
const [value, setValue] = React5.useState(defaultProp);
|
||||
const prevValueRef = React5.useRef(value);
|
||||
const onChangeRef = React5.useRef(onChange);
|
||||
const [value, setValue] = React4.useState(defaultProp);
|
||||
const prevValueRef = React4.useRef(value);
|
||||
const onChangeRef = React4.useRef(onChange);
|
||||
useInsertionEffect(() => {
|
||||
onChangeRef.current = onChange;
|
||||
}, [onChange]);
|
||||
React5.useEffect(() => {
|
||||
React4.useEffect(() => {
|
||||
if (prevValueRef.current !== value) {
|
||||
onChangeRef.current?.(value);
|
||||
prevValueRef.current = value;
|
||||
@@ -22751,10 +22771,10 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
var SYNC_STATE = Symbol("RADIX:SYNC_STATE");
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-use-previous@1.1.1_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-use-previous/dist/index.mjs
|
||||
var React6 = __toESM(require_react(), 1);
|
||||
var React5 = __toESM(require_react(), 1);
|
||||
function usePrevious(value) {
|
||||
const ref = React6.useRef({ value, previous: value });
|
||||
return React6.useMemo(() => {
|
||||
const ref = React5.useRef({ value, previous: value });
|
||||
return React5.useMemo(() => {
|
||||
if (ref.current.value !== value) {
|
||||
ref.current.previous = ref.current.value;
|
||||
ref.current.value = value;
|
||||
@@ -22764,9 +22784,9 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-use-size@1.1.1_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-use-size/dist/index.mjs
|
||||
var React7 = __toESM(require_react(), 1);
|
||||
var React6 = __toESM(require_react(), 1);
|
||||
function useSize(element) {
|
||||
const [size, setSize] = React7.useState(void 0);
|
||||
const [size, setSize] = React6.useState(void 0);
|
||||
useLayoutEffect2(() => {
|
||||
if (element) {
|
||||
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
||||
@@ -22802,10 +22822,10 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-presence@1.1.5_@types+react-dom@19.0.2_@types+react@19.0.2__@types+reac_100e8a92f6fdf86fd4a0d9e34245f26e/node_modules/@radix-ui/react-presence/dist/index.mjs
|
||||
var React23 = __toESM(require_react(), 1);
|
||||
var React8 = __toESM(require_react(), 1);
|
||||
var React7 = __toESM(require_react(), 1);
|
||||
"use client";
|
||||
function useStateMachine(initialState, machine) {
|
||||
return React8.useReducer((state, event) => {
|
||||
return React7.useReducer((state, event) => {
|
||||
const nextState = machine[state][event];
|
||||
return nextState ?? state;
|
||||
}, initialState);
|
||||
@@ -22928,30 +22948,30 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-primitive@2.1.3_@types+react-dom@19.0.2_@types+react@19.0.2__@types+rea_4d2f7b7fa17f2c71e22e7a2adbe76a73/node_modules/@radix-ui/react-primitive/dist/index.mjs
|
||||
var React10 = __toESM(require_react(), 1);
|
||||
var React9 = __toESM(require_react(), 1);
|
||||
var ReactDOM = __toESM(require_react_dom(), 1);
|
||||
|
||||
// node_modules/.pnpm/@radix-ui+react-slot@1.2.3_@types+react@19.0.2_react@17.0.2/node_modules/@radix-ui/react-slot/dist/index.mjs
|
||||
var React9 = __toESM(require_react(), 1);
|
||||
var React8 = __toESM(require_react(), 1);
|
||||
var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
|
||||
function createSlot(ownerName) {
|
||||
const SlotClone = /* @__PURE__ */ createSlotClone(ownerName);
|
||||
const Slot2 = React9.forwardRef((props, forwardedRef) => {
|
||||
const Slot2 = React8.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
const childrenArray = React9.Children.toArray(children);
|
||||
const childrenArray = React8.Children.toArray(children);
|
||||
const slottable = childrenArray.find(isSlottable);
|
||||
if (slottable) {
|
||||
const newElement = slottable.props.children;
|
||||
const newChildren = childrenArray.map((child) => {
|
||||
if (child === slottable) {
|
||||
if (React9.Children.count(newElement) > 1)
|
||||
return React9.Children.only(null);
|
||||
return React9.isValidElement(newElement) ? newElement.props.children : null;
|
||||
if (React8.Children.count(newElement) > 1)
|
||||
return React8.Children.only(null);
|
||||
return React8.isValidElement(newElement) ? newElement.props.children : null;
|
||||
} else {
|
||||
return child;
|
||||
}
|
||||
});
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React9.isValidElement(newElement) ? React9.cloneElement(newElement, void 0, newChildren) : null });
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children: React8.isValidElement(newElement) ? React8.cloneElement(newElement, void 0, newChildren) : null });
|
||||
}
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(SlotClone, { ...slotProps, ref: forwardedRef, children });
|
||||
});
|
||||
@@ -22959,24 +22979,24 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
return Slot2;
|
||||
}
|
||||
function createSlotClone(ownerName) {
|
||||
const SlotClone = React9.forwardRef((props, forwardedRef) => {
|
||||
const SlotClone = React8.forwardRef((props, forwardedRef) => {
|
||||
const { children, ...slotProps } = props;
|
||||
if (React9.isValidElement(children)) {
|
||||
if (React8.isValidElement(children)) {
|
||||
const childrenRef = getElementRef2(children);
|
||||
const props2 = mergeProps(slotProps, children.props);
|
||||
if (children.type !== React9.Fragment) {
|
||||
if (children.type !== React8.Fragment) {
|
||||
props2.ref = forwardedRef ? composeRefs(forwardedRef, childrenRef) : childrenRef;
|
||||
}
|
||||
return React9.cloneElement(children, props2);
|
||||
return React8.cloneElement(children, props2);
|
||||
}
|
||||
return React9.Children.count(children) > 1 ? React9.Children.only(null) : null;
|
||||
return React8.Children.count(children) > 1 ? React8.Children.only(null) : null;
|
||||
});
|
||||
SlotClone.displayName = `${ownerName}.SlotClone`;
|
||||
return SlotClone;
|
||||
}
|
||||
var SLOTTABLE_IDENTIFIER = Symbol("radix.slottable");
|
||||
function isSlottable(child) {
|
||||
return React9.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
return React8.isValidElement(child) && typeof child.type === "function" && "__radixId" in child.type && child.type.__radixId === SLOTTABLE_IDENTIFIER;
|
||||
}
|
||||
function mergeProps(slotProps, childProps) {
|
||||
const overrideProps = { ...childProps };
|
||||
@@ -23039,7 +23059,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
];
|
||||
var Primitive = NODES.reduce((primitive, node) => {
|
||||
const Slot = createSlot(`Primitive.${node}`);
|
||||
const Node = React10.forwardRef((props, forwardedRef) => {
|
||||
const Node = React9.forwardRef((props, forwardedRef) => {
|
||||
const { asChild, ...primitiveProps } = props;
|
||||
const Comp = asChild ? Slot : node;
|
||||
if (typeof self !== "undefined") {
|
||||
@@ -23077,9 +23097,9 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
onChange: onCheckedChange,
|
||||
caller: CHECKBOX_NAME
|
||||
});
|
||||
const [control, setControl] = React11.useState(null);
|
||||
const [bubbleInput, setBubbleInput] = React11.useState(null);
|
||||
const hasConsumerStoppedPropagationRef = React11.useRef(false);
|
||||
const [control, setControl] = React10.useState(null);
|
||||
const [bubbleInput, setBubbleInput] = React10.useState(null);
|
||||
const hasConsumerStoppedPropagationRef = React10.useRef(false);
|
||||
const isFormControl = control ? !!form || !!control.closest("form") : true;
|
||||
const context = {
|
||||
checked,
|
||||
@@ -23107,7 +23127,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
);
|
||||
}
|
||||
var TRIGGER_NAME = "CheckboxTrigger";
|
||||
var CheckboxTrigger = React11.forwardRef(
|
||||
var CheckboxTrigger = React10.forwardRef(
|
||||
({ __scopeCheckbox, onKeyDown, onClick, ...checkboxProps }, forwardedRef) => {
|
||||
const {
|
||||
control,
|
||||
@@ -23122,8 +23142,8 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
bubbleInput
|
||||
} = useCheckboxContext(TRIGGER_NAME, __scopeCheckbox);
|
||||
const composedRefs = useComposedRefs(forwardedRef, setControl);
|
||||
const initialCheckedStateRef = React11.useRef(checked);
|
||||
React11.useEffect(() => {
|
||||
const initialCheckedStateRef = React10.useRef(checked);
|
||||
React10.useEffect(() => {
|
||||
const form = control?.form;
|
||||
if (form) {
|
||||
const reset = () => setChecked(initialCheckedStateRef.current);
|
||||
@@ -23161,7 +23181,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
);
|
||||
CheckboxTrigger.displayName = TRIGGER_NAME;
|
||||
var Checkbox = React11.forwardRef(
|
||||
var Checkbox = React10.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const {
|
||||
__scopeCheckbox,
|
||||
@@ -23209,7 +23229,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
);
|
||||
Checkbox.displayName = CHECKBOX_NAME;
|
||||
var INDICATOR_NAME = "CheckboxIndicator";
|
||||
var CheckboxIndicator = React11.forwardRef(
|
||||
var CheckboxIndicator = React10.forwardRef(
|
||||
(props, forwardedRef) => {
|
||||
const { __scopeCheckbox, forceMount, ...indicatorProps } = props;
|
||||
const context = useCheckboxContext(INDICATOR_NAME, __scopeCheckbox);
|
||||
@@ -23233,7 +23253,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
);
|
||||
CheckboxIndicator.displayName = INDICATOR_NAME;
|
||||
var BUBBLE_INPUT_NAME = "CheckboxBubbleInput";
|
||||
var CheckboxBubbleInput = React11.forwardRef(
|
||||
var CheckboxBubbleInput = React10.forwardRef(
|
||||
({ __scopeCheckbox, ...props }, forwardedRef) => {
|
||||
const {
|
||||
control,
|
||||
@@ -23251,7 +23271,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
const composedRefs = useComposedRefs(forwardedRef, setBubbleInput);
|
||||
const prevChecked = usePrevious(checked);
|
||||
const controlSize = useSize(control);
|
||||
React11.useEffect(() => {
|
||||
React10.useEffect(() => {
|
||||
const input = bubbleInput;
|
||||
if (!input)
|
||||
return;
|
||||
@@ -23269,7 +23289,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
input.dispatchEvent(event);
|
||||
}
|
||||
}, [bubbleInput, prevChecked, checked, hasConsumerStoppedPropagationRef]);
|
||||
const defaultCheckedRef = React11.useRef(isIndeterminate(checked) ? false : checked);
|
||||
const defaultCheckedRef = React10.useRef(isIndeterminate(checked) ? false : checked);
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
||||
Primitive.input,
|
||||
{
|
||||
@@ -23309,6 +23329,7 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
}
|
||||
|
||||
// extension/prompt.jsx
|
||||
var import_jsx_runtime = __toESM(require_jsx_runtime());
|
||||
function Prompt() {
|
||||
const [isRemember, setIsRemember] = (0, import_react.useState)(false);
|
||||
const qs = new URLSearchParams(location.search);
|
||||
@@ -23339,58 +23360,107 @@ For more info, visit https://reactjs.org/link/mock-scheduler`);
|
||||
});
|
||||
};
|
||||
}
|
||||
return /* @__PURE__ */ React.createElement("div", {
|
||||
className: "w-screen h-screen flex flex-col items-center justify-center"
|
||||
}, /* @__PURE__ */ React.createElement("div", {
|
||||
className: "p-8 shadow-primary border border-primary rounded-2xl max-w-xl mx-auto flex flex-col gap-5"
|
||||
}, /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex flex-col items-center gap-5"
|
||||
}, /* @__PURE__ */ React.createElement(LogoIcon, null), /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex flex-col items-center text-center"
|
||||
}, /* @__PURE__ */ React.createElement("h1", {
|
||||
className: "font-semibold text-lg"
|
||||
}, host), /* @__PURE__ */ React.createElement("p", null, "is requesting your permission to ", /* @__PURE__ */ React.createElement("b", null, PERMISSION_NAMES[type])))), params && /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex flex-col gap-1"
|
||||
}, /* @__PURE__ */ React.createElement("p", null, "Now acting on"), /* @__PURE__ */ React.createElement("pre", {
|
||||
className: "bg-muted px-2 rounded-xl overflow-scroll"
|
||||
}, /* @__PURE__ */ React.createElement("code", null, JSON.stringify(event || params, null, 2)))), /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex flex-col gap-4"
|
||||
}, /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex items-center justify-center gap-2"
|
||||
}, /* @__PURE__ */ React.createElement(Checkbox, {
|
||||
id: "remember",
|
||||
className: "flex h-6 w-6 appearance-none items-center justify-center rounded-lg bg-white outline-none border border-primary data-[state=checked]:bg-primary data-[state=checked]:border-secondary",
|
||||
onCheckedChange: setIsRemember
|
||||
}, /* @__PURE__ */ React.createElement(CheckboxIndicator, {
|
||||
className: "text-white"
|
||||
}, /* @__PURE__ */ React.createElement("svg", {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
fill: "none",
|
||||
viewBox: "0 0 24 24",
|
||||
strokeWidth: 1.5,
|
||||
stroke: "currentColor",
|
||||
className: "w-4 h-4",
|
||||
"aria-hidden": "true"
|
||||
}, /* @__PURE__ */ React.createElement("path", {
|
||||
strokeLinecap: "round",
|
||||
strokeLinejoin: "round",
|
||||
d: "M4.5 12.75l6 6 9-13.5"
|
||||
})))), /* @__PURE__ */ React.createElement("label", {
|
||||
htmlFor: "remember",
|
||||
className: "text-muted"
|
||||
}, "Remember my preference forever")), /* @__PURE__ */ React.createElement("div", {
|
||||
className: "flex gap-3"
|
||||
}, /* @__PURE__ */ React.createElement("button", {
|
||||
type: "button",
|
||||
onClick: authorizeHandler(false),
|
||||
className: "flex-1 h-10 rounded-lg shadow-sm border border-primary inline-flex items-center justify-center font-semibold"
|
||||
}, "Reject"), /* @__PURE__ */ React.createElement("button", {
|
||||
type: "button",
|
||||
onClick: authorizeHandler(true),
|
||||
className: "flex-1 h-10 rounded-lg shadow-sm border border-secondary bg-primary text-white inline-flex items-center justify-center font-semibold"
|
||||
}, "Authorize")))));
|
||||
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {
|
||||
className: "w-screen h-screen flex flex-col items-center justify-center",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "p-8 shadow-primary border border-primary rounded-2xl max-w-xl mx-auto flex flex-col gap-5",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex flex-col items-center gap-5",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(LogoIcon, {}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex flex-col items-center text-center",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("h1", {
|
||||
className: "font-semibold text-lg",
|
||||
children: host
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("p", {
|
||||
children: [
|
||||
"is requesting your permission to ",
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("b", {
|
||||
children: PERMISSION_NAMES[type]
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
}),
|
||||
params && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex flex-col gap-1",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", {
|
||||
children: "Now acting on"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("pre", {
|
||||
className: "bg-muted px-2 rounded-xl overflow-scroll",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("code", {
|
||||
children: JSON.stringify(event || params, null, 2)
|
||||
})
|
||||
})
|
||||
]
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex flex-col gap-4",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex items-center justify-center gap-2",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Checkbox, {
|
||||
id: "remember",
|
||||
className: "flex h-6 w-6 appearance-none items-center justify-center rounded-lg bg-white outline-none border border-primary data-[state=checked]:bg-primary data-[state=checked]:border-secondary",
|
||||
onCheckedChange: setIsRemember,
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CheckboxIndicator, {
|
||||
className: "text-white",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("svg", {
|
||||
xmlns: "http://www.w3.org/2000/svg",
|
||||
fill: "none",
|
||||
viewBox: "0 0 24 24",
|
||||
strokeWidth: 1.5,
|
||||
stroke: "currentColor",
|
||||
className: "w-4 h-4",
|
||||
"aria-hidden": "true",
|
||||
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", {
|
||||
strokeLinecap: "round",
|
||||
strokeLinejoin: "round",
|
||||
d: "M4.5 12.75l6 6 9-13.5"
|
||||
})
|
||||
})
|
||||
})
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("label", {
|
||||
htmlFor: "remember",
|
||||
className: "text-muted",
|
||||
children: "Remember my preference forever"
|
||||
})
|
||||
]
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", {
|
||||
className: "flex gap-3",
|
||||
children: [
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
||||
type: "button",
|
||||
onClick: authorizeHandler(false),
|
||||
className: "flex-1 h-10 rounded-lg shadow-sm border border-primary inline-flex items-center justify-center font-semibold",
|
||||
children: "Reject"
|
||||
}),
|
||||
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("button", {
|
||||
type: "button",
|
||||
onClick: authorizeHandler(true),
|
||||
className: "flex-1 h-10 rounded-lg shadow-sm border border-secondary bg-primary text-white inline-flex items-center justify-center font-semibold",
|
||||
children: "Authorize"
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
]
|
||||
})
|
||||
});
|
||||
}
|
||||
(0, import_react_dom.render)(/* @__PURE__ */ React.createElement(Prompt, null), document.getElementById("main"));
|
||||
(0, import_react_dom.render)(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(Prompt, {}), document.getElementById("main"));
|
||||
})();
|
||||
/*
|
||||
object-assign
|
||||
|
||||
Reference in New Issue
Block a user