@superinterface/react 5.2.2 → 5.2.3-beta.1
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 +474 -442
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +383 -351
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
"use client";
|
|
2
1
|
function _array_like_to_array(arr, len) {
|
|
3
2
|
if (len == null || len > arr.length) len = arr.length;
|
|
4
3
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
@@ -5597,7 +5596,7 @@ var require_lib = __commonJS({
|
|
|
5597
5596
|
key: "parseMaybeAssign",
|
|
5598
5597
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
5599
5598
|
var _this = this;
|
|
5600
|
-
var
|
|
5599
|
+
var _jsx110;
|
|
5601
5600
|
var state = null;
|
|
5602
5601
|
var jsx2;
|
|
5603
5602
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
@@ -5612,7 +5611,7 @@ var require_lib = __commonJS({
|
|
|
5612
5611
|
context.pop();
|
|
5613
5612
|
}
|
|
5614
5613
|
}
|
|
5615
|
-
if ((
|
|
5614
|
+
if ((_jsx110 = jsx2) != null && _jsx110.error || this.match(47)) {
|
|
5616
5615
|
var _jsx210, _jsx310;
|
|
5617
5616
|
state = state || this.state.clone();
|
|
5618
5617
|
var typeParameters;
|
|
@@ -13390,7 +13389,7 @@ var require_lib = __commonJS({
|
|
|
13390
13389
|
key: "parseMaybeAssign",
|
|
13391
13390
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
13392
13391
|
var _this = this;
|
|
13393
|
-
var
|
|
13392
|
+
var _jsx110, _jsx210, _typeCast, _jsx310, _typeCast2;
|
|
13394
13393
|
var state;
|
|
13395
13394
|
var jsx2;
|
|
13396
13395
|
var typeCast;
|
|
@@ -13406,7 +13405,7 @@ var require_lib = __commonJS({
|
|
|
13406
13405
|
context.pop();
|
|
13407
13406
|
}
|
|
13408
13407
|
}
|
|
13409
|
-
if (!((
|
|
13408
|
+
if (!((_jsx110 = jsx2) != null && _jsx110.error) && !this.match(47)) {
|
|
13410
13409
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssign", this).call(this, refExpressionErrors, afterLeftParse);
|
|
13411
13410
|
}
|
|
13412
13411
|
if (!state || state === this.state) state = this.state.clone();
|
|
@@ -37072,7 +37071,7 @@ var SuperinterfaceProvider = function(_ref) {
|
|
|
37072
37071
|
});
|
|
37073
37072
|
};
|
|
37074
37073
|
// src/components/threads/Thread/index.tsx
|
|
37075
|
-
import { c as
|
|
37074
|
+
import { c as _c78 } from "react-compiler-runtime";
|
|
37076
37075
|
// src/components/threads/Thread/Messages/index.tsx
|
|
37077
37076
|
import { c as _c66 } from "react-compiler-runtime";
|
|
37078
37077
|
import { Flex as Flex18 } from "@radix-ui/themes";
|
|
@@ -39810,7 +39809,8 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
|
|
|
39810
39809
|
3,
|
|
39811
39810
|
2
|
|
39812
39811
|
];
|
|
39813
|
-
toolCalls =
|
|
39812
|
+
toolCalls = // @ts-ignore-next-line
|
|
39813
|
+
value.data.required_action.submit_client_tool_outputs.tool_calls;
|
|
39814
39814
|
return [
|
|
39815
39815
|
4,
|
|
39816
39816
|
map(toolCalls, /* @__PURE__ */ function() {
|
|
@@ -43942,7 +43942,7 @@ Messages2.Message = Message;
|
|
|
43942
43942
|
Messages2.NextPageSkeleton = NextPageSkeleton;
|
|
43943
43943
|
Messages2.Content = Content7;
|
|
43944
43944
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
43945
|
-
import { c as
|
|
43945
|
+
import { c as _c74 } from "react-compiler-runtime";
|
|
43946
43946
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
43947
43947
|
import { c as _c67 } from "react-compiler-runtime";
|
|
43948
43948
|
import { ArrowUpIcon as ArrowUpIcon2, StopIcon } from "@radix-ui/react-icons";
|
|
@@ -44117,8 +44117,41 @@ Submit.Root = Root7;
|
|
|
44117
44117
|
Submit.Button = Button3;
|
|
44118
44118
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
44119
44119
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
44120
|
-
import { useMemo as
|
|
44121
|
-
import { useForm
|
|
44120
|
+
import { useMemo as useMemo14, useState as useState4, useCallback as useCallback3 } from "react";
|
|
44121
|
+
import { useForm } from "react-hook-form";
|
|
44122
|
+
// src/lib/reactHookForm/FormProvider.tsx
|
|
44123
|
+
import { c as _c68 } from "react-compiler-runtime";
|
|
44124
|
+
import { createContext as createContext12, useContext as useContext16, useMemo as useMemo13 } from "react";
|
|
44125
|
+
import { jsx as _jsx69 } from "react/jsx-runtime";
|
|
44126
|
+
var FormContext = /* @__PURE__ */ createContext12(null);
|
|
44127
|
+
var useFormContext = function() {
|
|
44128
|
+
var value = useContext16(FormContext);
|
|
44129
|
+
if (!value) {
|
|
44130
|
+
throw new Error("useFormContext must be used within FormProvider");
|
|
44131
|
+
}
|
|
44132
|
+
return value;
|
|
44133
|
+
};
|
|
44134
|
+
var FormProvider = function(t0) {
|
|
44135
|
+
var $ = _c68(3);
|
|
44136
|
+
var children = t0.children, form = t0.form;
|
|
44137
|
+
var t1;
|
|
44138
|
+
t1 = form;
|
|
44139
|
+
var contextValue = t1;
|
|
44140
|
+
var t2;
|
|
44141
|
+
if ($[0] !== children || $[1] !== contextValue) {
|
|
44142
|
+
t2 = /* @__PURE__ */ _jsx69(FormContext.Provider, {
|
|
44143
|
+
value: contextValue,
|
|
44144
|
+
children: children
|
|
44145
|
+
});
|
|
44146
|
+
$[0] = children;
|
|
44147
|
+
$[1] = contextValue;
|
|
44148
|
+
$[2] = t2;
|
|
44149
|
+
} else {
|
|
44150
|
+
t2 = $[2];
|
|
44151
|
+
}
|
|
44152
|
+
return t2;
|
|
44153
|
+
};
|
|
44154
|
+
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
44122
44155
|
import { Box as Box14 } from "@radix-ui/themes";
|
|
44123
44156
|
// src/components/threads/Thread/MessageForm/Root/lib/formOptions.ts
|
|
44124
44157
|
import { z } from "zod";
|
|
@@ -44131,7 +44164,7 @@ var formOptions = {
|
|
|
44131
44164
|
};
|
|
44132
44165
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
44133
44166
|
import { partob } from "radash";
|
|
44134
|
-
import { jsx as
|
|
44167
|
+
import { jsx as _jsx70 } from "react/jsx-runtime";
|
|
44135
44168
|
function ownKeys30(e, r) {
|
|
44136
44169
|
var t = Object.keys(e);
|
|
44137
44170
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -44215,7 +44248,7 @@ var Root8 = function(_ref) {
|
|
|
44215
44248
|
})
|
|
44216
44249
|
}).createMessage;
|
|
44217
44250
|
var isMutatingMessage = useIsMutatingMessage();
|
|
44218
|
-
var isFileLoading =
|
|
44251
|
+
var isFileLoading = useMemo14(function() {
|
|
44219
44252
|
return files.some(function(file) {
|
|
44220
44253
|
return isOptimistic({
|
|
44221
44254
|
id: file.id
|
|
@@ -44224,14 +44257,14 @@ var Root8 = function(_ref) {
|
|
|
44224
44257
|
}, [
|
|
44225
44258
|
files
|
|
44226
44259
|
]);
|
|
44227
|
-
var isLoading =
|
|
44260
|
+
var isLoading = useMemo14(function() {
|
|
44228
44261
|
return isMutatingMessage || isSubmitting;
|
|
44229
44262
|
}, [
|
|
44230
44263
|
isMutatingMessage,
|
|
44231
44264
|
isSubmitting
|
|
44232
44265
|
]);
|
|
44233
44266
|
var latestMessage = useLatestMessage().latestMessage;
|
|
44234
|
-
var isDisabled =
|
|
44267
|
+
var isDisabled = useMemo14(function() {
|
|
44235
44268
|
var _latestMessage$metada;
|
|
44236
44269
|
return !!(latestMessage !== null && latestMessage !== void 0 && (_latestMessage$metada = latestMessage.metadata) !== null && _latestMessage$metada !== void 0 && _latestMessage$metada.isBlocking) || !!isDisabledArg;
|
|
44237
44270
|
}, [
|
|
@@ -44313,7 +44346,7 @@ var Root8 = function(_ref) {
|
|
|
44313
44346
|
};
|
|
44314
44347
|
}();
|
|
44315
44348
|
var content_0 = watch("content");
|
|
44316
|
-
return /* @__PURE__ */
|
|
44349
|
+
return /* @__PURE__ */ _jsx70(MessageFormContext.Provider, {
|
|
44317
44350
|
value: {
|
|
44318
44351
|
isDisabled: isDisabled,
|
|
44319
44352
|
isLoading: isLoading,
|
|
@@ -44322,27 +44355,26 @@ var Root8 = function(_ref) {
|
|
|
44322
44355
|
isFileLoading: isFileLoading,
|
|
44323
44356
|
content: content_0
|
|
44324
44357
|
},
|
|
44325
|
-
children: /* @__PURE__ */
|
|
44326
|
-
|
|
44358
|
+
children: /* @__PURE__ */ _jsx70(FormProvider, {
|
|
44359
|
+
form: formProps,
|
|
44360
|
+
children: /* @__PURE__ */ _jsx70(Box14, {
|
|
44327
44361
|
asChild: true,
|
|
44328
44362
|
flexShrink: "0",
|
|
44329
44363
|
style: style,
|
|
44330
44364
|
className: className,
|
|
44331
|
-
children: /* @__PURE__ */
|
|
44365
|
+
children: /* @__PURE__ */ _jsx70("form", {
|
|
44332
44366
|
onSubmit: handleSubmit(onSubmit),
|
|
44333
44367
|
children: children
|
|
44334
44368
|
})
|
|
44335
44369
|
})
|
|
44336
|
-
})
|
|
44370
|
+
})
|
|
44337
44371
|
});
|
|
44338
44372
|
};
|
|
44339
44373
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
44340
|
-
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
44341
44374
|
import { Container as RadixContainer, Flex as Flex23 } from "@radix-ui/themes";
|
|
44342
44375
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
44343
|
-
import { c as
|
|
44376
|
+
import { c as _c70 } from "react-compiler-runtime";
|
|
44344
44377
|
import { Flex as Flex20 } from "@radix-ui/themes";
|
|
44345
|
-
import { useFormContext } from "react-hook-form";
|
|
44346
44378
|
// src/hooks/misc/usePrevious.ts
|
|
44347
44379
|
import { useEffect as useEffect5, useRef as useRef4 } from "react";
|
|
44348
44380
|
var usePrevious = function(state) {
|
|
@@ -44353,12 +44385,12 @@ var usePrevious = function(state) {
|
|
|
44353
44385
|
return ref.current;
|
|
44354
44386
|
};
|
|
44355
44387
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
44356
|
-
import { useContext as
|
|
44388
|
+
import { useContext as useContext17, useMemo as useMemo15, useRef as useRef5, useEffect as useEffect6 } from "react";
|
|
44357
44389
|
// src/components/textareas/TextareaBase/index.tsx
|
|
44358
|
-
import { c as
|
|
44390
|
+
import { c as _c69 } from "react-compiler-runtime";
|
|
44359
44391
|
import { forwardRef as forwardRef4 } from "react";
|
|
44360
44392
|
import TextareaAutosize from "react-textarea-autosize";
|
|
44361
|
-
import { jsx as
|
|
44393
|
+
import { jsx as _jsx71, Fragment as _Fragment5, jsxs as _jsxs22 } from "react/jsx-runtime";
|
|
44362
44394
|
var _excluded3 = [
|
|
44363
44395
|
"style",
|
|
44364
44396
|
"className"
|
|
@@ -44425,7 +44457,7 @@ function _objectWithoutPropertiesLoose3(r, e) {
|
|
|
44425
44457
|
return t;
|
|
44426
44458
|
}
|
|
44427
44459
|
var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
|
|
44428
|
-
var $ =
|
|
44460
|
+
var $ = _c69(14);
|
|
44429
44461
|
var className;
|
|
44430
44462
|
var rest;
|
|
44431
44463
|
var style;
|
|
@@ -44446,7 +44478,7 @@ var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
|
|
|
44446
44478
|
}
|
|
44447
44479
|
var t1;
|
|
44448
44480
|
if ($[4] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44449
|
-
t1 = /* @__PURE__ */
|
|
44481
|
+
t1 = /* @__PURE__ */ _jsx71("style", {
|
|
44450
44482
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
44451
44483
|
});
|
|
44452
44484
|
$[4] = t1;
|
|
@@ -44483,7 +44515,7 @@ var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
|
|
|
44483
44515
|
t5 = /* @__PURE__ */ _jsxs22(_Fragment5, {
|
|
44484
44516
|
children: [
|
|
44485
44517
|
t1,
|
|
44486
|
-
/* @__PURE__ */
|
|
44518
|
+
/* @__PURE__ */ _jsx71(TextareaAutosize, _objectSpread31({
|
|
44487
44519
|
ref: ref,
|
|
44488
44520
|
className: t2,
|
|
44489
44521
|
style: t4
|
|
@@ -44501,7 +44533,7 @@ var TextareaBase = /* @__PURE__ */ forwardRef4(function TextareaBase2(t0, ref) {
|
|
|
44501
44533
|
return t5;
|
|
44502
44534
|
});
|
|
44503
44535
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
44504
|
-
import { jsx as
|
|
44536
|
+
import { jsx as _jsx72 } from "react/jsx-runtime";
|
|
44505
44537
|
function ownKeys32(e, r) {
|
|
44506
44538
|
var t = Object.keys(e);
|
|
44507
44539
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -44546,11 +44578,11 @@ function _toPrimitive32(t, r) {
|
|
|
44546
44578
|
return ("string" === r ? String : Number)(t);
|
|
44547
44579
|
}
|
|
44548
44580
|
var Root9 = function(t0) {
|
|
44549
|
-
var $ =
|
|
44581
|
+
var $ = _c70(4);
|
|
44550
44582
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
44551
44583
|
var t1;
|
|
44552
44584
|
if ($[0] !== children || $[1] !== className || $[2] !== style) {
|
|
44553
|
-
t1 = /* @__PURE__ */
|
|
44585
|
+
t1 = /* @__PURE__ */ _jsx72(Flex20, {
|
|
44554
44586
|
flexGrow: "1",
|
|
44555
44587
|
pt: "4px",
|
|
44556
44588
|
style: style,
|
|
@@ -44569,10 +44601,10 @@ var Root9 = function(t0) {
|
|
|
44569
44601
|
var Input = function(props) {
|
|
44570
44602
|
"use no memo";
|
|
44571
44603
|
var _props$placeholder;
|
|
44572
|
-
var assistantNameContext =
|
|
44604
|
+
var assistantNameContext = useContext17(AssistantNameContext);
|
|
44573
44605
|
var register = useFormContext().register;
|
|
44574
44606
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
44575
|
-
var isSubmitDisabled =
|
|
44607
|
+
var isSubmitDisabled = useMemo15(function() {
|
|
44576
44608
|
return isDisabled || isLoading;
|
|
44577
44609
|
}, [
|
|
44578
44610
|
isDisabled,
|
|
@@ -44591,7 +44623,7 @@ var Input = function(props) {
|
|
|
44591
44623
|
isDisabledPrevious,
|
|
44592
44624
|
textareaProps
|
|
44593
44625
|
]);
|
|
44594
|
-
return /* @__PURE__ */
|
|
44626
|
+
return /* @__PURE__ */ _jsx72(TextareaBase, _objectSpread32(_objectSpread32(_objectSpread32({
|
|
44595
44627
|
minRows: 1,
|
|
44596
44628
|
placeholder: (_props$placeholder = props.placeholder) !== null && _props$placeholder !== void 0 ? _props$placeholder : "Message ".concat(assistantNameContext, "..."),
|
|
44597
44629
|
disabled: isDisabled,
|
|
@@ -44611,17 +44643,17 @@ var Input = function(props) {
|
|
|
44611
44643
|
}));
|
|
44612
44644
|
};
|
|
44613
44645
|
var Control = function(props) {
|
|
44614
|
-
var $ =
|
|
44646
|
+
var $ = _c70(3);
|
|
44615
44647
|
var t0;
|
|
44616
44648
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
44617
|
-
t0 = /* @__PURE__ */
|
|
44649
|
+
t0 = /* @__PURE__ */ _jsx72(Input, {});
|
|
44618
44650
|
$[0] = t0;
|
|
44619
44651
|
} else {
|
|
44620
44652
|
t0 = $[0];
|
|
44621
44653
|
}
|
|
44622
44654
|
var t1;
|
|
44623
44655
|
if ($[1] !== props) {
|
|
44624
|
-
t1 = /* @__PURE__ */
|
|
44656
|
+
t1 = /* @__PURE__ */ _jsx72(Root9, _objectSpread32(_objectSpread32({}, props), {}, {
|
|
44625
44657
|
children: t0
|
|
44626
44658
|
}));
|
|
44627
44659
|
$[1] = props;
|
|
@@ -44634,10 +44666,10 @@ var Control = function(props) {
|
|
|
44634
44666
|
Control.Root = Root9;
|
|
44635
44667
|
Control.Input = Input;
|
|
44636
44668
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
44637
|
-
import { c as
|
|
44669
|
+
import { c as _c71 } from "react-compiler-runtime";
|
|
44638
44670
|
import { Flex as Flex21, Card as Card2, Spinner as Spinner2, Text as Text7, IconButton as IconButton6 } from "@radix-ui/themes";
|
|
44639
44671
|
import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
|
|
44640
|
-
import { jsx as
|
|
44672
|
+
import { jsx as _jsx73, jsxs as _jsxs23 } from "react/jsx-runtime";
|
|
44641
44673
|
function ownKeys33(e, r) {
|
|
44642
44674
|
var t = Object.keys(e);
|
|
44643
44675
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -44682,7 +44714,7 @@ function _toPrimitive33(t, r) {
|
|
|
44682
44714
|
return ("string" === r ? String : Number)(t);
|
|
44683
44715
|
}
|
|
44684
44716
|
var Preview = function(props) {
|
|
44685
|
-
var $ =
|
|
44717
|
+
var $ = _c71(8);
|
|
44686
44718
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
44687
44719
|
if (!files.length) {
|
|
44688
44720
|
return null;
|
|
@@ -44692,7 +44724,7 @@ var Preview = function(props) {
|
|
|
44692
44724
|
var _t;
|
|
44693
44725
|
if ($[3] !== setFiles) {
|
|
44694
44726
|
_t = function(file) {
|
|
44695
|
-
return /* @__PURE__ */
|
|
44727
|
+
return /* @__PURE__ */ _jsx73(Card2, {
|
|
44696
44728
|
variant: "ghost",
|
|
44697
44729
|
children: /* @__PURE__ */ _jsxs23(Flex21, {
|
|
44698
44730
|
align: "center",
|
|
@@ -44706,16 +44738,16 @@ var Preview = function(props) {
|
|
|
44706
44738
|
minWidth: "0",
|
|
44707
44739
|
maxWidth: "250px",
|
|
44708
44740
|
children: [
|
|
44709
|
-
/* @__PURE__ */
|
|
44741
|
+
/* @__PURE__ */ _jsx73(Flex21, {
|
|
44710
44742
|
flexShrink: "0",
|
|
44711
|
-
children: /* @__PURE__ */
|
|
44743
|
+
children: /* @__PURE__ */ _jsx73(Spinner2, {
|
|
44712
44744
|
loading: isOptimistic({
|
|
44713
44745
|
id: file.id
|
|
44714
44746
|
}),
|
|
44715
|
-
children: /* @__PURE__ */
|
|
44747
|
+
children: /* @__PURE__ */ _jsx73(FileIcon2, {})
|
|
44716
44748
|
})
|
|
44717
44749
|
}),
|
|
44718
|
-
/* @__PURE__ */
|
|
44750
|
+
/* @__PURE__ */ _jsx73(Text7, {
|
|
44719
44751
|
size: "2",
|
|
44720
44752
|
truncate: true,
|
|
44721
44753
|
wrap: "nowrap",
|
|
@@ -44723,9 +44755,9 @@ var Preview = function(props) {
|
|
|
44723
44755
|
})
|
|
44724
44756
|
]
|
|
44725
44757
|
}),
|
|
44726
|
-
/* @__PURE__ */
|
|
44758
|
+
/* @__PURE__ */ _jsx73(Flex21, {
|
|
44727
44759
|
flexShrink: "0",
|
|
44728
|
-
children: /* @__PURE__ */
|
|
44760
|
+
children: /* @__PURE__ */ _jsx73(IconButton6, {
|
|
44729
44761
|
onClick: function() {
|
|
44730
44762
|
return setFiles(function(prev) {
|
|
44731
44763
|
return prev.filter(function(prevFile) {
|
|
@@ -44736,7 +44768,7 @@ var Preview = function(props) {
|
|
|
44736
44768
|
color: "gray",
|
|
44737
44769
|
variant: "ghost",
|
|
44738
44770
|
size: "1",
|
|
44739
|
-
children: /* @__PURE__ */
|
|
44771
|
+
children: /* @__PURE__ */ _jsx73(Cross2Icon, {})
|
|
44740
44772
|
})
|
|
44741
44773
|
})
|
|
44742
44774
|
]
|
|
@@ -44757,7 +44789,7 @@ var Preview = function(props) {
|
|
|
44757
44789
|
}
|
|
44758
44790
|
var t1;
|
|
44759
44791
|
if ($[5] !== props || $[6] !== t0) {
|
|
44760
|
-
t1 = /* @__PURE__ */
|
|
44792
|
+
t1 = /* @__PURE__ */ _jsx73(Flex21, _objectSpread33(_objectSpread33({
|
|
44761
44793
|
flexBasis: "100%",
|
|
44762
44794
|
direction: "column",
|
|
44763
44795
|
pb: "2",
|
|
@@ -44774,7 +44806,7 @@ var Preview = function(props) {
|
|
|
44774
44806
|
return t1;
|
|
44775
44807
|
};
|
|
44776
44808
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
44777
|
-
import { c as
|
|
44809
|
+
import { c as _c73 } from "react-compiler-runtime";
|
|
44778
44810
|
import { FilePlusIcon } from "@radix-ui/react-icons";
|
|
44779
44811
|
import { IconButton as IconButton7, Flex as Flex22 } from "@radix-ui/themes";
|
|
44780
44812
|
// src/hooks/files/useChangeFilesField/index.ts
|
|
@@ -44782,7 +44814,7 @@ import { useCallback as useCallback4 } from "react";
|
|
|
44782
44814
|
import { omit as omit4 } from "radash";
|
|
44783
44815
|
import dayjs2 from "dayjs";
|
|
44784
44816
|
// src/hooks/files/useCreateFile/index.ts
|
|
44785
|
-
import { c as
|
|
44817
|
+
import { c as _c72 } from "react-compiler-runtime";
|
|
44786
44818
|
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
44787
44819
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
44788
44820
|
var formData = function(variables) {
|
|
@@ -45018,7 +45050,7 @@ function _toPrimitive36(t, r) {
|
|
|
45018
45050
|
return ("string" === r ? String : Number)(t);
|
|
45019
45051
|
}
|
|
45020
45052
|
var useCreateFile = function(t0) {
|
|
45021
|
-
var $ =
|
|
45053
|
+
var $ = _c72(15);
|
|
45022
45054
|
var t1;
|
|
45023
45055
|
if ($[0] !== t0) {
|
|
45024
45056
|
t1 = t0 === void 0 ? {
|
|
@@ -45347,7 +45379,7 @@ var useChangeFilesField = function() {
|
|
|
45347
45379
|
// src/lib/files/filesFieldAccept.ts
|
|
45348
45380
|
var filesFieldAccept = ".c,text/x-c,\n.cs,text/x-csharp,\n.cpp,text/x-c++,\n.doc,application/msword,\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document,\n.html,text/html,\n.java,text/x-java,\n.json,application/json,\n.md,text/markdown,\n.pdf,application/pdf,\n.php,text/x-php,\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation,\n.py,text/x-python,\n.py,text/x-script.python,\n.rb,text/x-ruby,\n.tex,text/x-tex,\n.txt,text/plain,\n.css,text/css,\n.js,text/javascript,\n.sh,application/x-sh,\n.ts,application/typescript,\n.png,image/png,\n.jpeg,image/jpeg,\n.jpg,image/jpeg,\n.webp,image/webp,\n.gif,image/gif";
|
|
45349
45381
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
45350
|
-
import { jsx as
|
|
45382
|
+
import { jsx as _jsx74, jsxs as _jsxs24 } from "react/jsx-runtime";
|
|
45351
45383
|
function ownKeys37(e, r) {
|
|
45352
45384
|
var t = Object.keys(e);
|
|
45353
45385
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -45392,7 +45424,7 @@ function _toPrimitive37(t, r) {
|
|
|
45392
45424
|
return ("string" === r ? String : Number)(t);
|
|
45393
45425
|
}
|
|
45394
45426
|
var Control2 = function(props) {
|
|
45395
|
-
var $ =
|
|
45427
|
+
var $ = _c73(11);
|
|
45396
45428
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
45397
45429
|
var changeFilesField = useChangeFilesField().changeFilesField;
|
|
45398
45430
|
var t0 = isDisabled || isLoading;
|
|
@@ -45403,7 +45435,7 @@ var Control2 = function(props) {
|
|
|
45403
45435
|
position: "relative",
|
|
45404
45436
|
overflow: "hidden"
|
|
45405
45437
|
};
|
|
45406
|
-
t2 = /* @__PURE__ */
|
|
45438
|
+
t2 = /* @__PURE__ */ _jsx74(FilePlusIcon, {});
|
|
45407
45439
|
$[0] = t1;
|
|
45408
45440
|
$[1] = t2;
|
|
45409
45441
|
} else {
|
|
@@ -45427,7 +45459,7 @@ var Control2 = function(props) {
|
|
|
45427
45459
|
}
|
|
45428
45460
|
var t4;
|
|
45429
45461
|
if ($[3] !== changeFilesField) {
|
|
45430
|
-
t4 = /* @__PURE__ */
|
|
45462
|
+
t4 = /* @__PURE__ */ _jsx74("input", {
|
|
45431
45463
|
type: "file",
|
|
45432
45464
|
multiple: true,
|
|
45433
45465
|
accept: filesFieldAccept,
|
|
@@ -45460,7 +45492,7 @@ var Control2 = function(props) {
|
|
|
45460
45492
|
}
|
|
45461
45493
|
var t6;
|
|
45462
45494
|
if ($[8] !== props || $[9] !== t5) {
|
|
45463
|
-
t6 = /* @__PURE__ */
|
|
45495
|
+
t6 = /* @__PURE__ */ _jsx74(Flex22, _objectSpread37(_objectSpread37({
|
|
45464
45496
|
pt: "2",
|
|
45465
45497
|
pr: "2",
|
|
45466
45498
|
flexGrow: "0"
|
|
@@ -45481,7 +45513,7 @@ var Files = {
|
|
|
45481
45513
|
Control: Control2
|
|
45482
45514
|
};
|
|
45483
45515
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
45484
|
-
import { jsx as
|
|
45516
|
+
import { jsx as _jsx75 } from "react/jsx-runtime";
|
|
45485
45517
|
function ownKeys38(e, r) {
|
|
45486
45518
|
var t = Object.keys(e);
|
|
45487
45519
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -45528,19 +45560,19 @@ function _toPrimitive38(t, r) {
|
|
|
45528
45560
|
var Root10 = function(_ref) {
|
|
45529
45561
|
"use no memo";
|
|
45530
45562
|
var children = _ref.children, className = _ref.className, style = _ref.style;
|
|
45531
|
-
var
|
|
45532
|
-
return /* @__PURE__ */
|
|
45563
|
+
var _useFormContext = useFormContext(), errors = _useFormContext.formState.errors;
|
|
45564
|
+
return /* @__PURE__ */ _jsx75(RadixContainer, {
|
|
45533
45565
|
size: "2",
|
|
45534
45566
|
flexGrow: "0",
|
|
45535
45567
|
className: className,
|
|
45536
45568
|
style: style,
|
|
45537
|
-
children: /* @__PURE__ */
|
|
45569
|
+
children: /* @__PURE__ */ _jsx75(Flex23, {
|
|
45538
45570
|
direction: "column",
|
|
45539
45571
|
flexShrink: "0",
|
|
45540
|
-
children: /* @__PURE__ */
|
|
45572
|
+
children: /* @__PURE__ */ _jsx75(Flex23, {
|
|
45541
45573
|
direction: "column",
|
|
45542
45574
|
flexShrink: "0",
|
|
45543
|
-
children: /* @__PURE__ */
|
|
45575
|
+
children: /* @__PURE__ */ _jsx75(Flex23, {
|
|
45544
45576
|
style: _objectSpread38({
|
|
45545
45577
|
borderRadius: "var(--radius-2)",
|
|
45546
45578
|
borderWidth: "1px",
|
|
@@ -45564,7 +45596,7 @@ var Field = {
|
|
|
45564
45596
|
Files: Files
|
|
45565
45597
|
};
|
|
45566
45598
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
45567
|
-
import { jsx as
|
|
45599
|
+
import { jsx as _jsx76, jsxs as _jsxs25 } from "react/jsx-runtime";
|
|
45568
45600
|
function ownKeys39(e, r) {
|
|
45569
45601
|
var t = Object.keys(e);
|
|
45570
45602
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -45609,13 +45641,13 @@ function _toPrimitive39(t, r) {
|
|
|
45609
45641
|
return ("string" === r ? String : Number)(t);
|
|
45610
45642
|
}
|
|
45611
45643
|
var MessageForm = function(props) {
|
|
45612
|
-
var $ =
|
|
45644
|
+
var $ = _c74(3);
|
|
45613
45645
|
var t0;
|
|
45614
45646
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45615
45647
|
t0 = /* @__PURE__ */ _jsxs25(Field.Root, {
|
|
45616
45648
|
children: [
|
|
45617
|
-
/* @__PURE__ */
|
|
45618
|
-
/* @__PURE__ */
|
|
45649
|
+
/* @__PURE__ */ _jsx76(Field.Control, {}),
|
|
45650
|
+
/* @__PURE__ */ _jsx76(Submit, {})
|
|
45619
45651
|
]
|
|
45620
45652
|
});
|
|
45621
45653
|
$[0] = t0;
|
|
@@ -45624,7 +45656,7 @@ var MessageForm = function(props) {
|
|
|
45624
45656
|
}
|
|
45625
45657
|
var t1;
|
|
45626
45658
|
if ($[1] !== props) {
|
|
45627
|
-
t1 = /* @__PURE__ */
|
|
45659
|
+
t1 = /* @__PURE__ */ _jsx76(Root8, _objectSpread39(_objectSpread39({}, props), {}, {
|
|
45628
45660
|
children: t0
|
|
45629
45661
|
}));
|
|
45630
45662
|
$[1] = props;
|
|
@@ -45638,32 +45670,32 @@ MessageForm.Root = Root8;
|
|
|
45638
45670
|
MessageForm.Field = Field;
|
|
45639
45671
|
MessageForm.Submit = Submit;
|
|
45640
45672
|
// src/components/threads/Thread/Root/index.tsx
|
|
45641
|
-
import { c as
|
|
45673
|
+
import { c as _c77 } from "react-compiler-runtime";
|
|
45642
45674
|
import { Flex as Flex25 } from "@radix-ui/themes";
|
|
45643
45675
|
// src/components/threads/Thread/Provider/index.tsx
|
|
45644
45676
|
var Provider2 = SuperinterfaceProvider;
|
|
45645
45677
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
45646
|
-
import { c as
|
|
45678
|
+
import { c as _c76 } from "react-compiler-runtime";
|
|
45647
45679
|
import { useState as useState5, useCallback as useCallback5 } from "react";
|
|
45648
45680
|
import * as Toast2 from "@radix-ui/react-toast";
|
|
45649
45681
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
45650
|
-
import { c as
|
|
45682
|
+
import { c as _c75 } from "react-compiler-runtime";
|
|
45651
45683
|
import * as Toast from "@radix-ui/react-toast";
|
|
45652
45684
|
import { Card as Card3, Text as Text8, Flex as Flex24 } from "@radix-ui/themes";
|
|
45653
45685
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
45654
|
-
import { jsx as
|
|
45686
|
+
import { jsx as _jsx77, jsxs as _jsxs26 } from "react/jsx-runtime";
|
|
45655
45687
|
var CustomToast = function(t0) {
|
|
45656
|
-
var $ =
|
|
45688
|
+
var $ = _c75(7);
|
|
45657
45689
|
var toast = t0.toast;
|
|
45658
45690
|
var t1;
|
|
45659
45691
|
if ($[0] !== toast.type) {
|
|
45660
|
-
t1 = /* @__PURE__ */
|
|
45692
|
+
t1 = /* @__PURE__ */ _jsx77(Flex24, {
|
|
45661
45693
|
pr: "2",
|
|
45662
45694
|
height: "14px",
|
|
45663
45695
|
align: "center",
|
|
45664
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
45696
|
+
children: toast.type === "success" ? /* @__PURE__ */ _jsx77(CheckCircledIcon2, {
|
|
45665
45697
|
color: "var(--accent-9)"
|
|
45666
|
-
}) : /* @__PURE__ */
|
|
45698
|
+
}) : /* @__PURE__ */ _jsx77(CrossCircledIcon, {
|
|
45667
45699
|
color: "var(--red-9)"
|
|
45668
45700
|
})
|
|
45669
45701
|
});
|
|
@@ -45674,7 +45706,7 @@ var CustomToast = function(t0) {
|
|
|
45674
45706
|
}
|
|
45675
45707
|
var t2;
|
|
45676
45708
|
if ($[2] !== toast.message) {
|
|
45677
|
-
t2 = /* @__PURE__ */
|
|
45709
|
+
t2 = /* @__PURE__ */ _jsx77(Text8, {
|
|
45678
45710
|
weight: "medium",
|
|
45679
45711
|
size: "1",
|
|
45680
45712
|
children: toast.message
|
|
@@ -45686,9 +45718,9 @@ var CustomToast = function(t0) {
|
|
|
45686
45718
|
}
|
|
45687
45719
|
var t3;
|
|
45688
45720
|
if ($[4] !== t1 || $[5] !== t2) {
|
|
45689
|
-
t3 = /* @__PURE__ */
|
|
45690
|
-
children: /* @__PURE__ */
|
|
45691
|
-
children: /* @__PURE__ */
|
|
45721
|
+
t3 = /* @__PURE__ */ _jsx77(Toast.Root, {
|
|
45722
|
+
children: /* @__PURE__ */ _jsx77(Card3, {
|
|
45723
|
+
children: /* @__PURE__ */ _jsx77(Toast.Title, {
|
|
45692
45724
|
children: /* @__PURE__ */ _jsxs26(Flex24, {
|
|
45693
45725
|
children: [
|
|
45694
45726
|
t1,
|
|
@@ -45707,9 +45739,9 @@ var CustomToast = function(t0) {
|
|
|
45707
45739
|
return t3;
|
|
45708
45740
|
};
|
|
45709
45741
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
45710
|
-
import { jsx as
|
|
45742
|
+
import { jsx as _jsx78, jsxs as _jsxs27 } from "react/jsx-runtime";
|
|
45711
45743
|
var ToastsProvider = function(t0) {
|
|
45712
|
-
var $ =
|
|
45744
|
+
var $ = _c76(15);
|
|
45713
45745
|
var children = t0.children, t1 = t0.bottom;
|
|
45714
45746
|
var bottom = t1 === void 0 ? 0 : t1;
|
|
45715
45747
|
var t2;
|
|
@@ -45755,7 +45787,7 @@ var ToastsProvider = function(t0) {
|
|
|
45755
45787
|
}
|
|
45756
45788
|
var t6;
|
|
45757
45789
|
if ($[6] !== bottom) {
|
|
45758
|
-
t6 = /* @__PURE__ */
|
|
45790
|
+
t6 = /* @__PURE__ */ _jsx78(Toast2.Viewport, {
|
|
45759
45791
|
style: {
|
|
45760
45792
|
position: "absolute",
|
|
45761
45793
|
bottom: bottom,
|
|
@@ -45795,7 +45827,7 @@ var ToastsProvider = function(t0) {
|
|
|
45795
45827
|
}
|
|
45796
45828
|
var t8;
|
|
45797
45829
|
if ($[12] !== t4 || $[13] !== t7) {
|
|
45798
|
-
t8 = /* @__PURE__ */
|
|
45830
|
+
t8 = /* @__PURE__ */ _jsx78(ToastsContext.Provider, {
|
|
45799
45831
|
value: t4,
|
|
45800
45832
|
children: t7
|
|
45801
45833
|
});
|
|
@@ -45808,12 +45840,12 @@ var ToastsProvider = function(t0) {
|
|
|
45808
45840
|
return t8;
|
|
45809
45841
|
};
|
|
45810
45842
|
function _temp5(toast_0, index) {
|
|
45811
|
-
return /* @__PURE__ */
|
|
45843
|
+
return /* @__PURE__ */ _jsx78(CustomToast, {
|
|
45812
45844
|
toast: toast_0
|
|
45813
45845
|
}, index);
|
|
45814
45846
|
}
|
|
45815
45847
|
// src/components/threads/Thread/Root/index.tsx
|
|
45816
|
-
import { jsx as
|
|
45848
|
+
import { jsx as _jsx79 } from "react/jsx-runtime";
|
|
45817
45849
|
var _excluded4 = [
|
|
45818
45850
|
"children",
|
|
45819
45851
|
"style",
|
|
@@ -45881,7 +45913,7 @@ function _objectWithoutPropertiesLoose4(r, e) {
|
|
|
45881
45913
|
return t;
|
|
45882
45914
|
}
|
|
45883
45915
|
var Root12 = function(t0) {
|
|
45884
|
-
var $ =
|
|
45916
|
+
var $ = _c77(12);
|
|
45885
45917
|
var children;
|
|
45886
45918
|
var className;
|
|
45887
45919
|
var rest;
|
|
@@ -45905,7 +45937,7 @@ var Root12 = function(t0) {
|
|
|
45905
45937
|
}
|
|
45906
45938
|
var t1;
|
|
45907
45939
|
if ($[5] !== children || $[6] !== className || $[7] !== style) {
|
|
45908
|
-
t1 = /* @__PURE__ */
|
|
45940
|
+
t1 = /* @__PURE__ */ _jsx79(Flex25, {
|
|
45909
45941
|
direction: "column",
|
|
45910
45942
|
flexGrow: "1",
|
|
45911
45943
|
className: className,
|
|
@@ -45921,9 +45953,9 @@ var Root12 = function(t0) {
|
|
|
45921
45953
|
}
|
|
45922
45954
|
var t2;
|
|
45923
45955
|
if ($[9] !== rest || $[10] !== t1) {
|
|
45924
|
-
t2 = /* @__PURE__ */
|
|
45956
|
+
t2 = /* @__PURE__ */ _jsx79(ToastsProvider, {
|
|
45925
45957
|
bottom: "var(--space-9)",
|
|
45926
|
-
children: /* @__PURE__ */
|
|
45958
|
+
children: /* @__PURE__ */ _jsx79(Provider2, _objectSpread40(_objectSpread40({}, rest), {}, {
|
|
45927
45959
|
children: t1
|
|
45928
45960
|
}))
|
|
45929
45961
|
});
|
|
@@ -45936,7 +45968,7 @@ var Root12 = function(t0) {
|
|
|
45936
45968
|
return t2;
|
|
45937
45969
|
};
|
|
45938
45970
|
// src/components/threads/Thread/index.tsx
|
|
45939
|
-
import { jsx as
|
|
45971
|
+
import { jsx as _jsx80, jsxs as _jsxs28 } from "react/jsx-runtime";
|
|
45940
45972
|
function ownKeys41(e, r) {
|
|
45941
45973
|
var t = Object.keys(e);
|
|
45942
45974
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -45981,12 +46013,12 @@ function _toPrimitive41(t, r) {
|
|
|
45981
46013
|
return ("string" === r ? String : Number)(t);
|
|
45982
46014
|
}
|
|
45983
46015
|
var Thread = function(props) {
|
|
45984
|
-
var $ =
|
|
46016
|
+
var $ = _c78(4);
|
|
45985
46017
|
var t0;
|
|
45986
46018
|
var t1;
|
|
45987
46019
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
45988
|
-
t0 = /* @__PURE__ */
|
|
45989
|
-
t1 = /* @__PURE__ */
|
|
46020
|
+
t0 = /* @__PURE__ */ _jsx80(Messages2, {});
|
|
46021
|
+
t1 = /* @__PURE__ */ _jsx80(MessageForm, {});
|
|
45990
46022
|
$[0] = t0;
|
|
45991
46023
|
$[1] = t1;
|
|
45992
46024
|
} else {
|
|
@@ -46012,13 +46044,13 @@ Thread.Root = Root12;
|
|
|
46012
46044
|
Thread.Messages = Messages2;
|
|
46013
46045
|
Thread.MessageForm = MessageForm;
|
|
46014
46046
|
// src/hooks/messages/useMessageContext/index.ts
|
|
46015
|
-
import { useContext as
|
|
46047
|
+
import { useContext as useContext18 } from "react";
|
|
46016
46048
|
var useMessageContext = function() {
|
|
46017
|
-
return
|
|
46049
|
+
return useContext18(MessageContext);
|
|
46018
46050
|
};
|
|
46019
46051
|
// src/hooks/assistants/useAssistant/index.ts
|
|
46020
|
-
import { c as
|
|
46021
|
-
import { useMemo as
|
|
46052
|
+
import { c as _c79 } from "react-compiler-runtime";
|
|
46053
|
+
import { useMemo as useMemo16 } from "react";
|
|
46022
46054
|
import { useQuery } from "@tanstack/react-query";
|
|
46023
46055
|
// src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
|
|
46024
46056
|
import { queryOptions as tanstackQueryOptions } from "@tanstack/react-query";
|
|
@@ -46167,7 +46199,7 @@ function _toPrimitive42(t, r) {
|
|
|
46167
46199
|
return ("string" === r ? String : Number)(t);
|
|
46168
46200
|
}
|
|
46169
46201
|
var useAssistant = function(t0) {
|
|
46170
|
-
var $ =
|
|
46202
|
+
var $ = _c79(6);
|
|
46171
46203
|
var assistantId = t0.assistantId;
|
|
46172
46204
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
46173
46205
|
var t1;
|
|
@@ -46200,27 +46232,27 @@ var useAssistant = function(t0) {
|
|
|
46200
46232
|
return t2;
|
|
46201
46233
|
};
|
|
46202
46234
|
// src/components/threads/ThreadDialog/index.tsx
|
|
46203
|
-
import { c as
|
|
46235
|
+
import { c as _c86 } from "react-compiler-runtime";
|
|
46204
46236
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
46205
|
-
import { c as
|
|
46237
|
+
import { c as _c81 } from "react-compiler-runtime";
|
|
46206
46238
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
46207
|
-
import { c as
|
|
46239
|
+
import { c as _c80 } from "react-compiler-runtime";
|
|
46208
46240
|
import { useState as useState6 } from "react";
|
|
46209
46241
|
// src/contexts/threads/ThreadDialogContext/index.ts
|
|
46210
|
-
import { createContext as
|
|
46211
|
-
var ThreadDialogContext = /* @__PURE__ */
|
|
46242
|
+
import { createContext as createContext13 } from "react";
|
|
46243
|
+
var ThreadDialogContext = /* @__PURE__ */ createContext13({
|
|
46212
46244
|
isOpen: false,
|
|
46213
46245
|
setIsOpen: function() {}
|
|
46214
46246
|
});
|
|
46215
46247
|
// src/hooks/threads/useThreadDialogContext/index.ts
|
|
46216
|
-
import { useContext as
|
|
46248
|
+
import { useContext as useContext19 } from "react";
|
|
46217
46249
|
var useThreadDialogContext = function() {
|
|
46218
|
-
return
|
|
46250
|
+
return useContext19(ThreadDialogContext);
|
|
46219
46251
|
};
|
|
46220
46252
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
46221
|
-
import { jsx as
|
|
46253
|
+
import { jsx as _jsx81 } from "react/jsx-runtime";
|
|
46222
46254
|
var Provider4 = function(t0) {
|
|
46223
|
-
var $ =
|
|
46255
|
+
var $ = _c80(5);
|
|
46224
46256
|
var children = t0.children;
|
|
46225
46257
|
var threadDialogContext = useThreadDialogContext();
|
|
46226
46258
|
var _useState6 = _sliced_to_array(useState6(threadDialogContext.isOpen), 2), isOpen = _useState6[0], setIsOpen = _useState6[1];
|
|
@@ -46237,7 +46269,7 @@ var Provider4 = function(t0) {
|
|
|
46237
46269
|
}
|
|
46238
46270
|
var t2;
|
|
46239
46271
|
if ($[2] !== children || $[3] !== t1) {
|
|
46240
|
-
t2 = /* @__PURE__ */
|
|
46272
|
+
t2 = /* @__PURE__ */ _jsx81(ThreadDialogContext.Provider, {
|
|
46241
46273
|
value: t1,
|
|
46242
46274
|
children: children
|
|
46243
46275
|
});
|
|
@@ -46250,13 +46282,13 @@ var Provider4 = function(t0) {
|
|
|
46250
46282
|
return t2;
|
|
46251
46283
|
};
|
|
46252
46284
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
46253
|
-
import { jsx as
|
|
46285
|
+
import { jsx as _jsx82 } from "react/jsx-runtime";
|
|
46254
46286
|
var Root13 = function(t0) {
|
|
46255
|
-
var $ =
|
|
46287
|
+
var $ = _c81(2);
|
|
46256
46288
|
var children = t0.children;
|
|
46257
46289
|
var t1;
|
|
46258
46290
|
if ($[0] !== children) {
|
|
46259
|
-
t1 = /* @__PURE__ */
|
|
46291
|
+
t1 = /* @__PURE__ */ _jsx82(Provider4, {
|
|
46260
46292
|
children: children
|
|
46261
46293
|
});
|
|
46262
46294
|
$[0] = children;
|
|
@@ -46267,13 +46299,13 @@ var Root13 = function(t0) {
|
|
|
46267
46299
|
return t1;
|
|
46268
46300
|
};
|
|
46269
46301
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
46270
|
-
import { c as
|
|
46302
|
+
import { c as _c83 } from "react-compiler-runtime";
|
|
46271
46303
|
import { Flex as Flex26 } from "@radix-ui/themes";
|
|
46272
46304
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
46273
|
-
import { c as
|
|
46305
|
+
import { c as _c82 } from "react-compiler-runtime";
|
|
46274
46306
|
import { IconButton as IconButton8 } from "@radix-ui/themes";
|
|
46275
46307
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
46276
|
-
import { jsx as
|
|
46308
|
+
import { jsx as _jsx83 } from "react/jsx-runtime";
|
|
46277
46309
|
function ownKeys43(e, r) {
|
|
46278
46310
|
var t = Object.keys(e);
|
|
46279
46311
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -46318,17 +46350,17 @@ function _toPrimitive43(t, r) {
|
|
|
46318
46350
|
return ("string" === r ? String : Number)(t);
|
|
46319
46351
|
}
|
|
46320
46352
|
var Button4 = function(props) {
|
|
46321
|
-
var $ =
|
|
46353
|
+
var $ = _c82(3);
|
|
46322
46354
|
var t0;
|
|
46323
46355
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46324
|
-
t0 = /* @__PURE__ */
|
|
46356
|
+
t0 = /* @__PURE__ */ _jsx83(ChatBubbleIcon, {});
|
|
46325
46357
|
$[0] = t0;
|
|
46326
46358
|
} else {
|
|
46327
46359
|
t0 = $[0];
|
|
46328
46360
|
}
|
|
46329
46361
|
var t1;
|
|
46330
46362
|
if ($[1] !== props) {
|
|
46331
|
-
t1 = /* @__PURE__ */
|
|
46363
|
+
t1 = /* @__PURE__ */ _jsx83(IconButton8, _objectSpread43(_objectSpread43({
|
|
46332
46364
|
size: "4",
|
|
46333
46365
|
radius: "full"
|
|
46334
46366
|
}, props), {}, {
|
|
@@ -46342,7 +46374,7 @@ var Button4 = function(props) {
|
|
|
46342
46374
|
return t1;
|
|
46343
46375
|
};
|
|
46344
46376
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
46345
|
-
import { jsx as
|
|
46377
|
+
import { jsx as _jsx84 } from "react/jsx-runtime";
|
|
46346
46378
|
function ownKeys44(e, r) {
|
|
46347
46379
|
var t = Object.keys(e);
|
|
46348
46380
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -46387,7 +46419,7 @@ function _toPrimitive44(t, r) {
|
|
|
46387
46419
|
return ("string" === r ? String : Number)(t);
|
|
46388
46420
|
}
|
|
46389
46421
|
var Root14 = function(t0) {
|
|
46390
|
-
var $ =
|
|
46422
|
+
var $ = _c83(14);
|
|
46391
46423
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
46392
46424
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
46393
46425
|
var t1 = isOpen ? "none" : "flex";
|
|
@@ -46432,7 +46464,7 @@ var Root14 = function(t0) {
|
|
|
46432
46464
|
}
|
|
46433
46465
|
var t6;
|
|
46434
46466
|
if ($[8] !== children || $[9] !== className || $[10] !== t2 || $[11] !== t3 || $[12] !== t5) {
|
|
46435
|
-
t6 = /* @__PURE__ */
|
|
46467
|
+
t6 = /* @__PURE__ */ _jsx84(Flex26, {
|
|
46436
46468
|
display: t2,
|
|
46437
46469
|
onClick: t3,
|
|
46438
46470
|
direction: "column",
|
|
@@ -46458,17 +46490,17 @@ var Root14 = function(t0) {
|
|
|
46458
46490
|
return t6;
|
|
46459
46491
|
};
|
|
46460
46492
|
var Trigger = function(args) {
|
|
46461
|
-
var $ =
|
|
46493
|
+
var $ = _c83(3);
|
|
46462
46494
|
var t0;
|
|
46463
46495
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46464
|
-
t0 = /* @__PURE__ */
|
|
46496
|
+
t0 = /* @__PURE__ */ _jsx84(Button4, {});
|
|
46465
46497
|
$[0] = t0;
|
|
46466
46498
|
} else {
|
|
46467
46499
|
t0 = $[0];
|
|
46468
46500
|
}
|
|
46469
46501
|
var t1;
|
|
46470
46502
|
if ($[1] !== args) {
|
|
46471
|
-
t1 = /* @__PURE__ */
|
|
46503
|
+
t1 = /* @__PURE__ */ _jsx84(Root14, _objectSpread44(_objectSpread44({}, args), {}, {
|
|
46472
46504
|
children: t0
|
|
46473
46505
|
}));
|
|
46474
46506
|
$[1] = args;
|
|
@@ -46484,15 +46516,15 @@ function _temp6(prev) {
|
|
|
46484
46516
|
return !prev;
|
|
46485
46517
|
}
|
|
46486
46518
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
46487
|
-
import { c as
|
|
46519
|
+
import { c as _c85 } from "react-compiler-runtime";
|
|
46488
46520
|
import { Card as Card4, Inset as Inset2, Flex as Flex28 } from "@radix-ui/themes";
|
|
46489
46521
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
46490
|
-
import { c as
|
|
46522
|
+
import { c as _c84 } from "react-compiler-runtime";
|
|
46491
46523
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
46492
46524
|
import { IconButton as IconButton9, Flex as Flex27 } from "@radix-ui/themes";
|
|
46493
|
-
import { jsx as
|
|
46525
|
+
import { jsx as _jsx85 } from "react/jsx-runtime";
|
|
46494
46526
|
var Close = function() {
|
|
46495
|
-
var $ =
|
|
46527
|
+
var $ = _c84(9);
|
|
46496
46528
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
46497
46529
|
var t0 = isOpen ? "flex" : "none";
|
|
46498
46530
|
var t1;
|
|
@@ -46527,10 +46559,10 @@ var Close = function() {
|
|
|
46527
46559
|
}
|
|
46528
46560
|
var t4;
|
|
46529
46561
|
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46530
|
-
t4 = /* @__PURE__ */
|
|
46562
|
+
t4 = /* @__PURE__ */ _jsx85(IconButton9, {
|
|
46531
46563
|
size: "2",
|
|
46532
46564
|
variant: "soft",
|
|
46533
|
-
children: /* @__PURE__ */
|
|
46565
|
+
children: /* @__PURE__ */ _jsx85(Cross1Icon, {})
|
|
46534
46566
|
});
|
|
46535
46567
|
$[5] = t4;
|
|
46536
46568
|
} else {
|
|
@@ -46538,7 +46570,7 @@ var Close = function() {
|
|
|
46538
46570
|
}
|
|
46539
46571
|
var t5;
|
|
46540
46572
|
if ($[6] !== t1 || $[7] !== t2) {
|
|
46541
|
-
t5 = /* @__PURE__ */
|
|
46573
|
+
t5 = /* @__PURE__ */ _jsx85(Flex27, {
|
|
46542
46574
|
display: t1,
|
|
46543
46575
|
onClick: t2,
|
|
46544
46576
|
direction: "column",
|
|
@@ -46563,7 +46595,7 @@ function _temp7(prev) {
|
|
|
46563
46595
|
return !prev;
|
|
46564
46596
|
}
|
|
46565
46597
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
46566
|
-
import { jsx as
|
|
46598
|
+
import { jsx as _jsx86, jsxs as _jsxs29 } from "react/jsx-runtime";
|
|
46567
46599
|
function ownKeys45(e, r) {
|
|
46568
46600
|
var t = Object.keys(e);
|
|
46569
46601
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -46608,7 +46640,7 @@ function _toPrimitive45(t, r) {
|
|
|
46608
46640
|
return ("string" === r ? String : Number)(t);
|
|
46609
46641
|
}
|
|
46610
46642
|
var Root15 = function(t0) {
|
|
46611
|
-
var $ =
|
|
46643
|
+
var $ = _c85(19);
|
|
46612
46644
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
46613
46645
|
var isOpen = useThreadDialogContext().isOpen;
|
|
46614
46646
|
if (!isOpen) {
|
|
@@ -46695,7 +46727,7 @@ var Root15 = function(t0) {
|
|
|
46695
46727
|
}
|
|
46696
46728
|
var t10;
|
|
46697
46729
|
if ($[10] !== children) {
|
|
46698
|
-
t10 = /* @__PURE__ */
|
|
46730
|
+
t10 = /* @__PURE__ */ _jsx86(Inset2, {
|
|
46699
46731
|
clip: "padding-box",
|
|
46700
46732
|
side: "all",
|
|
46701
46733
|
pb: "current",
|
|
@@ -46709,7 +46741,7 @@ var Root15 = function(t0) {
|
|
|
46709
46741
|
}
|
|
46710
46742
|
var t11;
|
|
46711
46743
|
if ($[12] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46712
|
-
t11 = /* @__PURE__ */
|
|
46744
|
+
t11 = /* @__PURE__ */ _jsx86(Close, {});
|
|
46713
46745
|
$[12] = t11;
|
|
46714
46746
|
} else {
|
|
46715
46747
|
t11 = $[12];
|
|
@@ -46731,7 +46763,7 @@ var Root15 = function(t0) {
|
|
|
46731
46763
|
}
|
|
46732
46764
|
var t13;
|
|
46733
46765
|
if ($[15] !== className || $[16] !== t12 || $[17] !== t6) {
|
|
46734
|
-
t13 = /* @__PURE__ */
|
|
46766
|
+
t13 = /* @__PURE__ */ _jsx86(Flex28, {
|
|
46735
46767
|
className: className,
|
|
46736
46768
|
direction: "column",
|
|
46737
46769
|
justify: "end",
|
|
@@ -46755,7 +46787,7 @@ var Root15 = function(t0) {
|
|
|
46755
46787
|
return t13;
|
|
46756
46788
|
};
|
|
46757
46789
|
var Messages3 = function(t0) {
|
|
46758
|
-
var $ =
|
|
46790
|
+
var $ = _c85(5);
|
|
46759
46791
|
var className = t0.className, style = t0.style;
|
|
46760
46792
|
var t1;
|
|
46761
46793
|
if ($[0] !== style) {
|
|
@@ -46771,7 +46803,7 @@ var Messages3 = function(t0) {
|
|
|
46771
46803
|
}
|
|
46772
46804
|
var t2;
|
|
46773
46805
|
if ($[2] !== className || $[3] !== t1) {
|
|
46774
|
-
t2 = /* @__PURE__ */
|
|
46806
|
+
t2 = /* @__PURE__ */ _jsx86(Thread.Messages, {
|
|
46775
46807
|
className: className,
|
|
46776
46808
|
style: t1
|
|
46777
46809
|
});
|
|
@@ -46784,11 +46816,11 @@ var Messages3 = function(t0) {
|
|
|
46784
46816
|
return t2;
|
|
46785
46817
|
};
|
|
46786
46818
|
var FormContainer = function(t0) {
|
|
46787
|
-
var $ =
|
|
46819
|
+
var $ = _c85(4);
|
|
46788
46820
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
46789
46821
|
var t1;
|
|
46790
46822
|
if ($[0] !== children || $[1] !== className || $[2] !== style) {
|
|
46791
|
-
t1 = /* @__PURE__ */
|
|
46823
|
+
t1 = /* @__PURE__ */ _jsx86(Flex28, {
|
|
46792
46824
|
direction: "column",
|
|
46793
46825
|
pl: "5",
|
|
46794
46826
|
pr: "5",
|
|
@@ -46808,10 +46840,10 @@ var FormContainer = function(t0) {
|
|
|
46808
46840
|
return t1;
|
|
46809
46841
|
};
|
|
46810
46842
|
var Content8 = function(props) {
|
|
46811
|
-
var $ =
|
|
46843
|
+
var $ = _c85(4);
|
|
46812
46844
|
var t0;
|
|
46813
46845
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46814
|
-
t0 = /* @__PURE__ */
|
|
46846
|
+
t0 = /* @__PURE__ */ _jsx86(Messages3, {});
|
|
46815
46847
|
$[0] = t0;
|
|
46816
46848
|
} else {
|
|
46817
46849
|
t0 = $[0];
|
|
@@ -46821,8 +46853,8 @@ var Content8 = function(props) {
|
|
|
46821
46853
|
t1 = /* @__PURE__ */ _jsxs29(Thread.Root, {
|
|
46822
46854
|
children: [
|
|
46823
46855
|
t0,
|
|
46824
|
-
/* @__PURE__ */
|
|
46825
|
-
children: /* @__PURE__ */
|
|
46856
|
+
/* @__PURE__ */ _jsx86(FormContainer, {
|
|
46857
|
+
children: /* @__PURE__ */ _jsx86(Thread.MessageForm, {})
|
|
46826
46858
|
})
|
|
46827
46859
|
]
|
|
46828
46860
|
});
|
|
@@ -46832,7 +46864,7 @@ var Content8 = function(props) {
|
|
|
46832
46864
|
}
|
|
46833
46865
|
var t2;
|
|
46834
46866
|
if ($[2] !== props) {
|
|
46835
|
-
t2 = /* @__PURE__ */
|
|
46867
|
+
t2 = /* @__PURE__ */ _jsx86(Root15, _objectSpread45(_objectSpread45({}, props), {}, {
|
|
46836
46868
|
children: t1
|
|
46837
46869
|
}));
|
|
46838
46870
|
$[2] = props;
|
|
@@ -46846,15 +46878,15 @@ Content8.Root = Root15;
|
|
|
46846
46878
|
Content8.Messages = Messages3;
|
|
46847
46879
|
Content8.FormContainer = FormContainer;
|
|
46848
46880
|
// src/components/threads/ThreadDialog/index.tsx
|
|
46849
|
-
import { jsx as
|
|
46881
|
+
import { jsx as _jsx87, jsxs as _jsxs30 } from "react/jsx-runtime";
|
|
46850
46882
|
var ThreadDialog = function() {
|
|
46851
|
-
var $ =
|
|
46883
|
+
var $ = _c86(1);
|
|
46852
46884
|
var t0;
|
|
46853
46885
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
46854
46886
|
t0 = /* @__PURE__ */ _jsxs30(Root13, {
|
|
46855
46887
|
children: [
|
|
46856
|
-
/* @__PURE__ */
|
|
46857
|
-
/* @__PURE__ */
|
|
46888
|
+
/* @__PURE__ */ _jsx87(Content8, {}),
|
|
46889
|
+
/* @__PURE__ */ _jsx87(Trigger, {})
|
|
46858
46890
|
]
|
|
46859
46891
|
});
|
|
46860
46892
|
$[0] = t0;
|
|
@@ -46867,29 +46899,29 @@ ThreadDialog.Root = Root13;
|
|
|
46867
46899
|
ThreadDialog.Trigger = Trigger;
|
|
46868
46900
|
ThreadDialog.Content = Content8;
|
|
46869
46901
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
46870
|
-
import { c as
|
|
46902
|
+
import { c as _c101 } from "react-compiler-runtime";
|
|
46871
46903
|
// src/components/threads/AudioThread/index.tsx
|
|
46872
|
-
import { c as
|
|
46904
|
+
import { c as _c100 } from "react-compiler-runtime";
|
|
46873
46905
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
46874
|
-
import { c as
|
|
46906
|
+
import { c as _c92 } from "react-compiler-runtime";
|
|
46875
46907
|
import { Flex as Flex29 } from "@radix-ui/themes";
|
|
46876
46908
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
46877
|
-
import { createContext as
|
|
46878
|
-
var AudioThreadContext = /* @__PURE__ */
|
|
46909
|
+
import { createContext as createContext14 } from "react";
|
|
46910
|
+
var AudioThreadContext = /* @__PURE__ */ createContext14({
|
|
46879
46911
|
audioRuntime: null
|
|
46880
46912
|
});
|
|
46881
46913
|
// src/hooks/threads/useAudioThreadContext/index.ts
|
|
46882
|
-
import { useContext as
|
|
46914
|
+
import { useContext as useContext20 } from "react";
|
|
46883
46915
|
var useAudioThreadContext = function() {
|
|
46884
|
-
return
|
|
46916
|
+
return useContext20(AudioThreadContext);
|
|
46885
46917
|
};
|
|
46886
46918
|
// src/components/audioRuntimes/TtsAudioRuntimeProvider.tsx
|
|
46887
|
-
import { c as
|
|
46919
|
+
import { c as _c91 } from "react-compiler-runtime";
|
|
46888
46920
|
// src/hooks/audioRuntimes/useTtsAudioRuntime/index.ts
|
|
46889
|
-
import { c as
|
|
46890
|
-
import { useMemo as
|
|
46921
|
+
import { c as _c90 } from "react-compiler-runtime";
|
|
46922
|
+
import { useMemo as useMemo19 } from "react";
|
|
46891
46923
|
// src/hooks/misc/usePermission/index.ts
|
|
46892
|
-
import { c as
|
|
46924
|
+
import { c as _c87 } from "react-compiler-runtime";
|
|
46893
46925
|
import { useEffect as useEffect7, useState as useState7 } from "react";
|
|
46894
46926
|
// src/hooks/misc/usePermission/util.ts
|
|
46895
46927
|
var noop = function() {};
|
|
@@ -46913,7 +46945,7 @@ function off(obj) {
|
|
|
46913
46945
|
}
|
|
46914
46946
|
// src/hooks/misc/usePermission/index.ts
|
|
46915
46947
|
var usePermission = function(permissionDesc) {
|
|
46916
|
-
var $ =
|
|
46948
|
+
var $ = _c87(3);
|
|
46917
46949
|
var _useState7 = _sliced_to_array(useState7(""), 2), state = _useState7[0], setState = _useState7[1];
|
|
46918
46950
|
var t0;
|
|
46919
46951
|
var t1;
|
|
@@ -46959,13 +46991,13 @@ var usePermission = function(permissionDesc) {
|
|
|
46959
46991
|
// src/hooks/audioThreads/useRecorder/index.ts
|
|
46960
46992
|
import dayjs3 from "dayjs";
|
|
46961
46993
|
import { useAudioCapture } from "@supercorp/use-audio-capture";
|
|
46962
|
-
import { useMemo as
|
|
46994
|
+
import { useMemo as useMemo17, useRef as useRef7, useState as useState8, useCallback as useCallback6, useEffect as useEffect9 } from "react";
|
|
46963
46995
|
import { useAudioPlayer } from "react-use-audio-player";
|
|
46964
46996
|
// src/hooks/misc/useInterval.ts
|
|
46965
|
-
import { c as
|
|
46997
|
+
import { c as _c88 } from "react-compiler-runtime";
|
|
46966
46998
|
import { useEffect as useEffect8, useRef as useRef6 } from "react";
|
|
46967
46999
|
var useInterval = function(callback, delay) {
|
|
46968
|
-
var $ =
|
|
47000
|
+
var $ = _c88(5);
|
|
46969
47001
|
var savedCallback = useRef6(_temp8);
|
|
46970
47002
|
var t0;
|
|
46971
47003
|
if ($[0] !== callback) {
|
|
@@ -47155,7 +47187,7 @@ var useRecorder = function(_ref) {
|
|
|
47155
47187
|
isInited,
|
|
47156
47188
|
mediaStream
|
|
47157
47189
|
]);
|
|
47158
|
-
var visualizationAnalyser =
|
|
47190
|
+
var visualizationAnalyser = useMemo17(function() {
|
|
47159
47191
|
if (!audioEngine) return null;
|
|
47160
47192
|
var result = audioEngine.audioContext.createAnalyser();
|
|
47161
47193
|
audioEngine.source.connect(result);
|
|
@@ -47163,7 +47195,7 @@ var useRecorder = function(_ref) {
|
|
|
47163
47195
|
}, [
|
|
47164
47196
|
audioEngine
|
|
47165
47197
|
]);
|
|
47166
|
-
var silenceAnalyser =
|
|
47198
|
+
var silenceAnalyser = useMemo17(function() {
|
|
47167
47199
|
if (!audioEngine) return null;
|
|
47168
47200
|
var result_0 = audioEngine.audioContext.createAnalyser();
|
|
47169
47201
|
result_0.minDecibels = -60;
|
|
@@ -47218,8 +47250,8 @@ var useRecorder = function(_ref) {
|
|
|
47218
47250
|
});
|
|
47219
47251
|
};
|
|
47220
47252
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
47221
|
-
import { c as
|
|
47222
|
-
import { useMemo as
|
|
47253
|
+
import { c as _c89 } from "react-compiler-runtime";
|
|
47254
|
+
import { useMemo as useMemo18, useRef as useRef8, useState as useState9, useEffect as useEffect10, useCallback as useCallback7 } from "react";
|
|
47223
47255
|
import nlp from "compromise";
|
|
47224
47256
|
import { Howler } from "howler";
|
|
47225
47257
|
import { useAudioPlayer as useAudioPlayer2 } from "react-use-audio-player";
|
|
@@ -47300,7 +47332,7 @@ var getMessageSentences = function(_ref) {
|
|
|
47300
47332
|
};
|
|
47301
47333
|
var useMessageAudio = function(t0) {
|
|
47302
47334
|
var _latestMessageProps$l, _latestMessageProps$l4, _latestMessageProps$l5;
|
|
47303
|
-
var $ =
|
|
47335
|
+
var $ = _c89(68);
|
|
47304
47336
|
var _onEnd = t0.onEnd, passedPlay = t0.play, t1 = t0.fullSentenceRegex;
|
|
47305
47337
|
var t2;
|
|
47306
47338
|
if ($[0] !== t1) {
|
|
@@ -47753,7 +47785,7 @@ function _asyncToGenerator11(n) {
|
|
|
47753
47785
|
};
|
|
47754
47786
|
}
|
|
47755
47787
|
var useTtsAudioRuntime = function(t0) {
|
|
47756
|
-
var $ =
|
|
47788
|
+
var $ = _c90(30);
|
|
47757
47789
|
var play = t0.play, passedOnEnd = t0.onEnd;
|
|
47758
47790
|
var addToast = useToasts().addToast;
|
|
47759
47791
|
var queryClient = useQueryClient6();
|
|
@@ -47937,9 +47969,9 @@ function _temp24() {
|
|
|
47937
47969
|
return _temp24.apply(this, arguments);
|
|
47938
47970
|
}
|
|
47939
47971
|
// src/components/audioRuntimes/TtsAudioRuntimeProvider.tsx
|
|
47940
|
-
import { jsx as
|
|
47972
|
+
import { jsx as _jsx88 } from "react/jsx-runtime";
|
|
47941
47973
|
var TtsAudioRuntimeProvider = function(t0) {
|
|
47942
|
-
var $ =
|
|
47974
|
+
var $ = _c91(8);
|
|
47943
47975
|
var children = t0.children, play = t0.play, onEnd = t0.onEnd;
|
|
47944
47976
|
var t1;
|
|
47945
47977
|
if ($[0] !== onEnd || $[1] !== play) {
|
|
@@ -47966,7 +47998,7 @@ var TtsAudioRuntimeProvider = function(t0) {
|
|
|
47966
47998
|
}
|
|
47967
47999
|
var t3;
|
|
47968
48000
|
if ($[5] !== children || $[6] !== t2) {
|
|
47969
|
-
t3 = /* @__PURE__ */
|
|
48001
|
+
t3 = /* @__PURE__ */ _jsx88(AudioThreadContext.Provider, {
|
|
47970
48002
|
value: t2,
|
|
47971
48003
|
children: children
|
|
47972
48004
|
});
|
|
@@ -47979,7 +48011,7 @@ var TtsAudioRuntimeProvider = function(t0) {
|
|
|
47979
48011
|
return t3;
|
|
47980
48012
|
};
|
|
47981
48013
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
47982
|
-
import { jsx as
|
|
48014
|
+
import { jsx as _jsx89 } from "react/jsx-runtime";
|
|
47983
48015
|
var _excluded5 = [
|
|
47984
48016
|
"children"
|
|
47985
48017
|
];
|
|
@@ -48052,11 +48084,11 @@ function _objectWithoutPropertiesLoose5(r, e) {
|
|
|
48052
48084
|
return t;
|
|
48053
48085
|
}
|
|
48054
48086
|
var Content9 = function(t0) {
|
|
48055
|
-
var $ =
|
|
48087
|
+
var $ = _c92(4);
|
|
48056
48088
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
48057
48089
|
var t1;
|
|
48058
48090
|
if ($[0] !== children || $[1] !== className || $[2] !== style) {
|
|
48059
|
-
t1 = /* @__PURE__ */
|
|
48091
|
+
t1 = /* @__PURE__ */ _jsx89(Flex29, {
|
|
48060
48092
|
direction: "column",
|
|
48061
48093
|
flexGrow: "1",
|
|
48062
48094
|
p: "9",
|
|
@@ -48074,7 +48106,7 @@ var Content9 = function(t0) {
|
|
|
48074
48106
|
return t1;
|
|
48075
48107
|
};
|
|
48076
48108
|
var AudioRuntimeProvider = function(t0) {
|
|
48077
|
-
var $ =
|
|
48109
|
+
var $ = _c92(4);
|
|
48078
48110
|
var children = t0.children, play = t0.play, onEnd = t0.onEnd;
|
|
48079
48111
|
var audioThreadContext = useAudioThreadContext();
|
|
48080
48112
|
if (audioThreadContext.audioRuntime) {
|
|
@@ -48082,7 +48114,7 @@ var AudioRuntimeProvider = function(t0) {
|
|
|
48082
48114
|
}
|
|
48083
48115
|
var t1;
|
|
48084
48116
|
if ($[0] !== children || $[1] !== onEnd || $[2] !== play) {
|
|
48085
|
-
t1 = /* @__PURE__ */
|
|
48117
|
+
t1 = /* @__PURE__ */ _jsx89(TtsAudioRuntimeProvider, {
|
|
48086
48118
|
play: play,
|
|
48087
48119
|
onEnd: onEnd,
|
|
48088
48120
|
children: children
|
|
@@ -48097,7 +48129,7 @@ var AudioRuntimeProvider = function(t0) {
|
|
|
48097
48129
|
return t1;
|
|
48098
48130
|
};
|
|
48099
48131
|
var Provider5 = function(t0) {
|
|
48100
|
-
var $ =
|
|
48132
|
+
var $ = _c92(9);
|
|
48101
48133
|
var children;
|
|
48102
48134
|
var rest;
|
|
48103
48135
|
if ($[0] !== t0) {
|
|
@@ -48124,7 +48156,7 @@ var Provider5 = function(t0) {
|
|
|
48124
48156
|
}
|
|
48125
48157
|
var t2;
|
|
48126
48158
|
if ($[6] !== children || $[7] !== t1) {
|
|
48127
|
-
t2 = /* @__PURE__ */
|
|
48159
|
+
t2 = /* @__PURE__ */ _jsx89(AudioThreadContext.Provider, {
|
|
48128
48160
|
value: t1,
|
|
48129
48161
|
children: children
|
|
48130
48162
|
});
|
|
@@ -48137,7 +48169,7 @@ var Provider5 = function(t0) {
|
|
|
48137
48169
|
return t2;
|
|
48138
48170
|
};
|
|
48139
48171
|
var Root16 = function(t0) {
|
|
48140
|
-
var $ =
|
|
48172
|
+
var $ = _c92(18);
|
|
48141
48173
|
var children;
|
|
48142
48174
|
var className;
|
|
48143
48175
|
var onEnd;
|
|
@@ -48167,8 +48199,8 @@ var Root16 = function(t0) {
|
|
|
48167
48199
|
}
|
|
48168
48200
|
var t1;
|
|
48169
48201
|
if ($[7] !== children || $[8] !== className || $[9] !== style) {
|
|
48170
|
-
t1 = /* @__PURE__ */
|
|
48171
|
-
children: /* @__PURE__ */
|
|
48202
|
+
t1 = /* @__PURE__ */ _jsx89(ToastsProvider, {
|
|
48203
|
+
children: /* @__PURE__ */ _jsx89(Content9, {
|
|
48172
48204
|
className: className,
|
|
48173
48205
|
style: style,
|
|
48174
48206
|
children: children
|
|
@@ -48183,7 +48215,7 @@ var Root16 = function(t0) {
|
|
|
48183
48215
|
}
|
|
48184
48216
|
var t2;
|
|
48185
48217
|
if ($[11] !== onEnd || $[12] !== play || $[13] !== t1) {
|
|
48186
|
-
t2 = /* @__PURE__ */
|
|
48218
|
+
t2 = /* @__PURE__ */ _jsx89(AudioRuntimeProvider, {
|
|
48187
48219
|
play: play,
|
|
48188
48220
|
onEnd: onEnd,
|
|
48189
48221
|
children: t1
|
|
@@ -48197,7 +48229,7 @@ var Root16 = function(t0) {
|
|
|
48197
48229
|
}
|
|
48198
48230
|
var t3;
|
|
48199
48231
|
if ($[15] !== rest || $[16] !== t2) {
|
|
48200
|
-
t3 = /* @__PURE__ */
|
|
48232
|
+
t3 = /* @__PURE__ */ _jsx89(Provider5, _objectSpread48(_objectSpread48({}, rest), {}, {
|
|
48201
48233
|
children: t2
|
|
48202
48234
|
}));
|
|
48203
48235
|
$[15] = rest;
|
|
@@ -48209,8 +48241,8 @@ var Root16 = function(t0) {
|
|
|
48209
48241
|
return t3;
|
|
48210
48242
|
};
|
|
48211
48243
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
48212
|
-
import { c as
|
|
48213
|
-
import { useState as useState11, useCallback as useCallback9, useEffect as useEffect12, useContext as
|
|
48244
|
+
import { c as _c94 } from "react-compiler-runtime";
|
|
48245
|
+
import { useState as useState11, useCallback as useCallback9, useEffect as useEffect12, useContext as useContext21, createContext as createContext15 } from "react";
|
|
48214
48246
|
import _9 from "lodash";
|
|
48215
48247
|
import { Flex as Flex31 } from "@radix-ui/themes";
|
|
48216
48248
|
// src/components/threads/AudioThread/BarsVisualizer/index.tsx
|
|
@@ -48218,7 +48250,7 @@ import _8 from "lodash";
|
|
|
48218
48250
|
import { Flex as Flex30, Grid } from "@radix-ui/themes";
|
|
48219
48251
|
import { useState as useState10, useEffect as useEffect11, useCallback as useCallback8 } from "react";
|
|
48220
48252
|
import { cluster } from "radash";
|
|
48221
|
-
import { jsx as
|
|
48253
|
+
import { jsx as _jsx90 } from "react/jsx-runtime";
|
|
48222
48254
|
var barCount = 4;
|
|
48223
48255
|
var BarsVisualizer = function(_ref) {
|
|
48224
48256
|
var visualizationAnalyser = _ref.visualizationAnalyser, backgroundColor = _ref.backgroundColor, height = _ref.height, barWidth = _ref.barWidth;
|
|
@@ -48249,7 +48281,7 @@ var BarsVisualizer = function(_ref) {
|
|
|
48249
48281
|
draw,
|
|
48250
48282
|
visualizationAnalyser
|
|
48251
48283
|
]);
|
|
48252
|
-
return /* @__PURE__ */
|
|
48284
|
+
return /* @__PURE__ */ _jsx90(Grid, {
|
|
48253
48285
|
columns: "".concat(barCount),
|
|
48254
48286
|
gap: "1",
|
|
48255
48287
|
width: "auto",
|
|
@@ -48258,12 +48290,12 @@ var BarsVisualizer = function(_ref) {
|
|
|
48258
48290
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
48259
48291
|
},
|
|
48260
48292
|
children: barHeights.map(function(barHeight, index) {
|
|
48261
|
-
return /* @__PURE__ */
|
|
48293
|
+
return /* @__PURE__ */ _jsx90(Flex30, {
|
|
48262
48294
|
direction: "column",
|
|
48263
48295
|
align: "center",
|
|
48264
48296
|
justify: "center",
|
|
48265
48297
|
height: height,
|
|
48266
|
-
children: /* @__PURE__ */
|
|
48298
|
+
children: /* @__PURE__ */ _jsx90(Flex30, {
|
|
48267
48299
|
minHeight: "50%",
|
|
48268
48300
|
maxHeight: "100%",
|
|
48269
48301
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -48278,10 +48310,10 @@ var BarsVisualizer = function(_ref) {
|
|
|
48278
48310
|
});
|
|
48279
48311
|
};
|
|
48280
48312
|
// src/hooks/audioThreads/useStatus/index.ts
|
|
48281
|
-
import { c as
|
|
48282
|
-
import { useMemo as
|
|
48313
|
+
import { c as _c93 } from "react-compiler-runtime";
|
|
48314
|
+
import { useMemo as useMemo20 } from "react";
|
|
48283
48315
|
var useStatus = function() {
|
|
48284
|
-
var $ =
|
|
48316
|
+
var $ = _c93(2);
|
|
48285
48317
|
var audioRuntime = useAudioThreadContext().audioRuntime;
|
|
48286
48318
|
var t0;
|
|
48287
48319
|
bb0: {
|
|
@@ -48329,7 +48361,7 @@ var useStatus = function() {
|
|
|
48329
48361
|
return t1;
|
|
48330
48362
|
};
|
|
48331
48363
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
48332
|
-
import { jsx as
|
|
48364
|
+
import { jsx as _jsx91, jsxs as _jsxs31 } from "react/jsx-runtime";
|
|
48333
48365
|
var _excluded6 = [
|
|
48334
48366
|
"children"
|
|
48335
48367
|
];
|
|
@@ -48403,7 +48435,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
|
|
|
48403
48435
|
}
|
|
48404
48436
|
return t;
|
|
48405
48437
|
}
|
|
48406
|
-
var AudioThreadVisualizationContext = /* @__PURE__ */
|
|
48438
|
+
var AudioThreadVisualizationContext = /* @__PURE__ */ createContext15({
|
|
48407
48439
|
scale: 0
|
|
48408
48440
|
});
|
|
48409
48441
|
var Provider6 = function(_ref) {
|
|
@@ -48433,7 +48465,7 @@ var Provider6 = function(_ref) {
|
|
|
48433
48465
|
draw,
|
|
48434
48466
|
audioThreadContext
|
|
48435
48467
|
]);
|
|
48436
|
-
return /* @__PURE__ */
|
|
48468
|
+
return /* @__PURE__ */ _jsx91(AudioThreadVisualizationContext.Provider, {
|
|
48437
48469
|
value: {
|
|
48438
48470
|
scale: scale
|
|
48439
48471
|
},
|
|
@@ -48441,7 +48473,7 @@ var Provider6 = function(_ref) {
|
|
|
48441
48473
|
});
|
|
48442
48474
|
};
|
|
48443
48475
|
var Root17 = function(t0) {
|
|
48444
|
-
var $ =
|
|
48476
|
+
var $ = _c94(6);
|
|
48445
48477
|
var children;
|
|
48446
48478
|
var rest;
|
|
48447
48479
|
if ($[0] !== t0) {
|
|
@@ -48458,8 +48490,8 @@ var Root17 = function(t0) {
|
|
|
48458
48490
|
}
|
|
48459
48491
|
var t1;
|
|
48460
48492
|
if ($[3] !== children || $[4] !== rest) {
|
|
48461
|
-
t1 = /* @__PURE__ */
|
|
48462
|
-
children: /* @__PURE__ */
|
|
48493
|
+
t1 = /* @__PURE__ */ _jsx91(Provider6, {
|
|
48494
|
+
children: /* @__PURE__ */ _jsx91(Flex31, _objectSpread49(_objectSpread49({
|
|
48463
48495
|
direction: "column",
|
|
48464
48496
|
align: "center",
|
|
48465
48497
|
justify: "center",
|
|
@@ -48478,7 +48510,7 @@ var Root17 = function(t0) {
|
|
|
48478
48510
|
return t1;
|
|
48479
48511
|
};
|
|
48480
48512
|
var BarsVisualizer2 = function(t0) {
|
|
48481
|
-
var $ =
|
|
48513
|
+
var $ = _c94(10);
|
|
48482
48514
|
var rest;
|
|
48483
48515
|
var t1;
|
|
48484
48516
|
var t2;
|
|
@@ -48504,7 +48536,7 @@ var BarsVisualizer2 = function(t0) {
|
|
|
48504
48536
|
var t3 = status === "playing" ? "var(--accent-11)" : "var(--gray-11)";
|
|
48505
48537
|
var t4;
|
|
48506
48538
|
if ($[4] !== audioThreadContext.audioRuntime.assistant.visualizationAnalyser || $[5] !== barWidth || $[6] !== height || $[7] !== rest || $[8] !== t3) {
|
|
48507
|
-
t4 = /* @__PURE__ */
|
|
48539
|
+
t4 = /* @__PURE__ */ _jsx91(BarsVisualizer, _objectSpread49({
|
|
48508
48540
|
visualizationAnalyser: audioThreadContext.audioRuntime.assistant.visualizationAnalyser,
|
|
48509
48541
|
backgroundColor: t3,
|
|
48510
48542
|
height: height,
|
|
@@ -48522,7 +48554,7 @@ var BarsVisualizer2 = function(t0) {
|
|
|
48522
48554
|
return t4;
|
|
48523
48555
|
};
|
|
48524
48556
|
var AssistantVisualizationRoot = function(t0) {
|
|
48525
|
-
var $ =
|
|
48557
|
+
var $ = _c94(17);
|
|
48526
48558
|
var children;
|
|
48527
48559
|
var rest;
|
|
48528
48560
|
var t1;
|
|
@@ -48547,7 +48579,7 @@ var AssistantVisualizationRoot = function(t0) {
|
|
|
48547
48579
|
var height = t1 === void 0 ? "200px" : t1;
|
|
48548
48580
|
var width2 = t2 === void 0 ? "200px" : t2;
|
|
48549
48581
|
var status = useStatus().status;
|
|
48550
|
-
var scale =
|
|
48582
|
+
var scale = useContext21(AudioThreadVisualizationContext).scale;
|
|
48551
48583
|
var t3 = status === "playing" ? "var(--accent-4)" : "var(--gray-4)";
|
|
48552
48584
|
var t4;
|
|
48553
48585
|
if ($[5] !== rest.style) {
|
|
@@ -48574,7 +48606,7 @@ var AssistantVisualizationRoot = function(t0) {
|
|
|
48574
48606
|
}
|
|
48575
48607
|
var t6;
|
|
48576
48608
|
if ($[11] !== children || $[12] !== height || $[13] !== rest || $[14] !== t5 || $[15] !== width2) {
|
|
48577
|
-
t6 = /* @__PURE__ */
|
|
48609
|
+
t6 = /* @__PURE__ */ _jsx91(Flex31, _objectSpread49(_objectSpread49({
|
|
48578
48610
|
align: "center",
|
|
48579
48611
|
justify: "center",
|
|
48580
48612
|
height: height,
|
|
@@ -48595,17 +48627,17 @@ var AssistantVisualizationRoot = function(t0) {
|
|
|
48595
48627
|
return t6;
|
|
48596
48628
|
};
|
|
48597
48629
|
var AssistantVisualization = function(props) {
|
|
48598
|
-
var $ =
|
|
48630
|
+
var $ = _c94(3);
|
|
48599
48631
|
var t0;
|
|
48600
48632
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48601
|
-
t0 = /* @__PURE__ */
|
|
48633
|
+
t0 = /* @__PURE__ */ _jsx91(BarsVisualizer2, {});
|
|
48602
48634
|
$[0] = t0;
|
|
48603
48635
|
} else {
|
|
48604
48636
|
t0 = $[0];
|
|
48605
48637
|
}
|
|
48606
48638
|
var t1;
|
|
48607
48639
|
if ($[1] !== props) {
|
|
48608
|
-
t1 = /* @__PURE__ */
|
|
48640
|
+
t1 = /* @__PURE__ */ _jsx91(AssistantVisualizationRoot, _objectSpread49(_objectSpread49({}, props), {}, {
|
|
48609
48641
|
children: t0
|
|
48610
48642
|
}));
|
|
48611
48643
|
$[1] = props;
|
|
@@ -48618,18 +48650,18 @@ var AssistantVisualization = function(props) {
|
|
|
48618
48650
|
AssistantVisualization.Root = AssistantVisualizationRoot;
|
|
48619
48651
|
AssistantVisualization.BarsVisualizer = BarsVisualizer2;
|
|
48620
48652
|
var AssistantInfo = function(props) {
|
|
48621
|
-
var $ =
|
|
48622
|
-
var assistantNameContext =
|
|
48653
|
+
var $ = _c94(6);
|
|
48654
|
+
var assistantNameContext = useContext21(AssistantNameContext);
|
|
48623
48655
|
var t0;
|
|
48624
48656
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48625
|
-
t0 = /* @__PURE__ */
|
|
48657
|
+
t0 = /* @__PURE__ */ _jsx91(MessageGroup.AssistantAvatar, {});
|
|
48626
48658
|
$[0] = t0;
|
|
48627
48659
|
} else {
|
|
48628
48660
|
t0 = $[0];
|
|
48629
48661
|
}
|
|
48630
48662
|
var t1;
|
|
48631
48663
|
if ($[1] !== assistantNameContext) {
|
|
48632
|
-
t1 = /* @__PURE__ */
|
|
48664
|
+
t1 = /* @__PURE__ */ _jsx91(MessageGroup.Name, {
|
|
48633
48665
|
children: assistantNameContext
|
|
48634
48666
|
});
|
|
48635
48667
|
$[1] = assistantNameContext;
|
|
@@ -48658,12 +48690,12 @@ var AssistantInfo = function(props) {
|
|
|
48658
48690
|
return t2;
|
|
48659
48691
|
};
|
|
48660
48692
|
var Visualization = function(props) {
|
|
48661
|
-
var $ =
|
|
48693
|
+
var $ = _c94(4);
|
|
48662
48694
|
var t0;
|
|
48663
48695
|
var t1;
|
|
48664
48696
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48665
|
-
t0 = /* @__PURE__ */
|
|
48666
|
-
t1 = /* @__PURE__ */
|
|
48697
|
+
t0 = /* @__PURE__ */ _jsx91(AssistantVisualization, {});
|
|
48698
|
+
t1 = /* @__PURE__ */ _jsx91(AssistantInfo, {});
|
|
48667
48699
|
$[0] = t0;
|
|
48668
48700
|
$[1] = t1;
|
|
48669
48701
|
} else {
|
|
@@ -48690,11 +48722,11 @@ Visualization.Provider = Provider6;
|
|
|
48690
48722
|
Visualization.AssistantVisualization = AssistantVisualization;
|
|
48691
48723
|
Visualization.AssistantInfo = AssistantInfo;
|
|
48692
48724
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
48693
|
-
import { c as
|
|
48725
|
+
import { c as _c96 } from "react-compiler-runtime";
|
|
48694
48726
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
48695
|
-
import { c as
|
|
48727
|
+
import { c as _c95 } from "react-compiler-runtime";
|
|
48696
48728
|
import { Flex as Flex32, Text as Text9 } from "@radix-ui/themes";
|
|
48697
|
-
import { jsx as
|
|
48729
|
+
import { jsx as _jsx92, jsxs as _jsxs32 } from "react/jsx-runtime";
|
|
48698
48730
|
var html = function(_ref) {
|
|
48699
48731
|
var texts = _ref.texts;
|
|
48700
48732
|
return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 5, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_10, i) {
|
|
@@ -48702,11 +48734,11 @@ var html = function(_ref) {
|
|
|
48702
48734
|
}).join(""), "\n }");
|
|
48703
48735
|
};
|
|
48704
48736
|
var StatusMessages = function(t0) {
|
|
48705
|
-
var $ =
|
|
48737
|
+
var $ = _c95(9);
|
|
48706
48738
|
var texts = t0.texts, className = t0.className, style = t0.style;
|
|
48707
48739
|
var t1;
|
|
48708
48740
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48709
|
-
t1 = /* @__PURE__ */
|
|
48741
|
+
t1 = /* @__PURE__ */ _jsx92(Text9, {
|
|
48710
48742
|
size: "2",
|
|
48711
48743
|
weight: "regular",
|
|
48712
48744
|
color: "gray",
|
|
@@ -48729,7 +48761,7 @@ var StatusMessages = function(t0) {
|
|
|
48729
48761
|
}
|
|
48730
48762
|
var t3;
|
|
48731
48763
|
if ($[3] !== t2) {
|
|
48732
|
-
t3 = /* @__PURE__ */
|
|
48764
|
+
t3 = /* @__PURE__ */ _jsx92("style", {
|
|
48733
48765
|
dangerouslySetInnerHTML: {
|
|
48734
48766
|
__html: t2
|
|
48735
48767
|
}
|
|
@@ -48761,7 +48793,7 @@ var StatusMessages = function(t0) {
|
|
|
48761
48793
|
return t4;
|
|
48762
48794
|
};
|
|
48763
48795
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
48764
|
-
import { jsx as
|
|
48796
|
+
import { jsx as _jsx93 } from "react/jsx-runtime";
|
|
48765
48797
|
function ownKeys50(e, r) {
|
|
48766
48798
|
var t = Object.keys(e);
|
|
48767
48799
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -48806,7 +48838,7 @@ function _toPrimitive50(t, r) {
|
|
|
48806
48838
|
return ("string" === r ? String : Number)(t);
|
|
48807
48839
|
}
|
|
48808
48840
|
var Status = function(props) {
|
|
48809
|
-
var $ =
|
|
48841
|
+
var $ = _c96(12);
|
|
48810
48842
|
var status = useStatus().status;
|
|
48811
48843
|
if (status === "recording") {
|
|
48812
48844
|
var _t;
|
|
@@ -48823,7 +48855,7 @@ var Status = function(props) {
|
|
|
48823
48855
|
}
|
|
48824
48856
|
var _t2;
|
|
48825
48857
|
if ($[1] !== props) {
|
|
48826
|
-
_t2 = /* @__PURE__ */
|
|
48858
|
+
_t2 = /* @__PURE__ */ _jsx93(StatusMessages, _objectSpread50({
|
|
48827
48859
|
texts: _t
|
|
48828
48860
|
}, props));
|
|
48829
48861
|
$[1] = props;
|
|
@@ -48849,7 +48881,7 @@ var Status = function(props) {
|
|
|
48849
48881
|
}
|
|
48850
48882
|
var _t4;
|
|
48851
48883
|
if ($[4] !== props) {
|
|
48852
|
-
_t4 = /* @__PURE__ */
|
|
48884
|
+
_t4 = /* @__PURE__ */ _jsx93(StatusMessages, _objectSpread50({
|
|
48853
48885
|
texts: _t3
|
|
48854
48886
|
}, props));
|
|
48855
48887
|
$[4] = props;
|
|
@@ -48871,7 +48903,7 @@ var Status = function(props) {
|
|
|
48871
48903
|
}
|
|
48872
48904
|
var _t6;
|
|
48873
48905
|
if ($[7] !== props) {
|
|
48874
|
-
_t6 = /* @__PURE__ */
|
|
48906
|
+
_t6 = /* @__PURE__ */ _jsx93(StatusMessages, _objectSpread50({
|
|
48875
48907
|
texts: _t5
|
|
48876
48908
|
}, props));
|
|
48877
48909
|
$[7] = props;
|
|
@@ -48892,7 +48924,7 @@ var Status = function(props) {
|
|
|
48892
48924
|
}
|
|
48893
48925
|
var t1;
|
|
48894
48926
|
if ($[10] !== props) {
|
|
48895
|
-
t1 = /* @__PURE__ */
|
|
48927
|
+
t1 = /* @__PURE__ */ _jsx93(StatusMessages, _objectSpread50({
|
|
48896
48928
|
texts: t0
|
|
48897
48929
|
}, props));
|
|
48898
48930
|
$[10] = props;
|
|
@@ -48903,11 +48935,11 @@ var Status = function(props) {
|
|
|
48903
48935
|
return t1;
|
|
48904
48936
|
};
|
|
48905
48937
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
48906
|
-
import { c as
|
|
48938
|
+
import { c as _c99 } from "react-compiler-runtime";
|
|
48907
48939
|
import { Flex as Flex34 } from "@radix-ui/themes";
|
|
48908
48940
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
48909
|
-
import { c as
|
|
48910
|
-
import { jsx as
|
|
48941
|
+
import { c as _c97 } from "react-compiler-runtime";
|
|
48942
|
+
import { jsx as _jsx94 } from "react/jsx-runtime";
|
|
48911
48943
|
function ownKeys51(e, r) {
|
|
48912
48944
|
var t = Object.keys(e);
|
|
48913
48945
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -48952,10 +48984,10 @@ function _toPrimitive51(t, r) {
|
|
|
48952
48984
|
return ("string" === r ? String : Number)(t);
|
|
48953
48985
|
}
|
|
48954
48986
|
var MicIcon = function(props) {
|
|
48955
|
-
var $ =
|
|
48987
|
+
var $ = _c97(3);
|
|
48956
48988
|
var t0;
|
|
48957
48989
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48958
|
-
t0 = /* @__PURE__ */
|
|
48990
|
+
t0 = /* @__PURE__ */ _jsx94("path", {
|
|
48959
48991
|
stroke: "none",
|
|
48960
48992
|
d: "M192 0c-53 0-96 43-96 96v160c0 53 43 96 96 96s96-43 96-96V96c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 89.1 66.2 162.7 152 174.4V464h-48c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24h-48v-33.6c85.8-11.7 152-85.3 152-174.4v-40c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 70.7-57.3 128-128 128S64 326.7 64 256v-40z"
|
|
48961
48993
|
});
|
|
@@ -48965,7 +48997,7 @@ var MicIcon = function(props) {
|
|
|
48965
48997
|
}
|
|
48966
48998
|
var t1;
|
|
48967
48999
|
if ($[1] !== props) {
|
|
48968
|
-
t1 = /* @__PURE__ */
|
|
49000
|
+
t1 = /* @__PURE__ */ _jsx94("svg", _objectSpread51(_objectSpread51({
|
|
48969
49001
|
xmlns: "http://www.w3.org/2000/svg",
|
|
48970
49002
|
fill: "currentColor",
|
|
48971
49003
|
stroke: "currentColor",
|
|
@@ -48984,29 +49016,29 @@ var MicIcon = function(props) {
|
|
|
48984
49016
|
return t1;
|
|
48985
49017
|
};
|
|
48986
49018
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
48987
|
-
import { c as
|
|
49019
|
+
import { c as _c98 } from "react-compiler-runtime";
|
|
48988
49020
|
import { Flex as Flex33, IconButton as IconButton10 } from "@radix-ui/themes";
|
|
48989
49021
|
import { StopIcon as StopIcon2, PauseIcon as PauseIcon2, ArrowUpIcon as ArrowUpIcon3, ResumeIcon } from "@radix-ui/react-icons";
|
|
48990
|
-
import { jsx as
|
|
49022
|
+
import { jsx as _jsx95, jsxs as _jsxs33 } from "react/jsx-runtime";
|
|
48991
49023
|
var ActionButton = function() {
|
|
48992
|
-
var $ =
|
|
49024
|
+
var $ = _c98(27);
|
|
48993
49025
|
var status = useStatus().status;
|
|
48994
49026
|
var audioThreadContext = useAudioThreadContext();
|
|
48995
49027
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
48996
49028
|
if (status === "recording") {
|
|
48997
49029
|
var _t;
|
|
48998
49030
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
48999
|
-
_t = /* @__PURE__ */
|
|
49031
|
+
_t = /* @__PURE__ */ _jsx95(PauseIcon2, {});
|
|
49000
49032
|
$[0] = _t;
|
|
49001
49033
|
} else {
|
|
49002
49034
|
_t = $[0];
|
|
49003
49035
|
}
|
|
49004
49036
|
var t1;
|
|
49005
49037
|
if ($[1] !== audioThreadContext.audioRuntime.user.pause) {
|
|
49006
|
-
t1 = /* @__PURE__ */
|
|
49038
|
+
t1 = /* @__PURE__ */ _jsx95(Flex33, {
|
|
49007
49039
|
mr: "3",
|
|
49008
49040
|
ml: "-7",
|
|
49009
|
-
children: /* @__PURE__ */
|
|
49041
|
+
children: /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49010
49042
|
onClick: audioThreadContext.audioRuntime.user.pause,
|
|
49011
49043
|
color: "gray",
|
|
49012
49044
|
variant: "soft",
|
|
@@ -49021,14 +49053,14 @@ var ActionButton = function() {
|
|
|
49021
49053
|
}
|
|
49022
49054
|
var t2;
|
|
49023
49055
|
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49024
|
-
t2 = /* @__PURE__ */
|
|
49056
|
+
t2 = /* @__PURE__ */ _jsx95(ArrowUpIcon3, {});
|
|
49025
49057
|
$[3] = t2;
|
|
49026
49058
|
} else {
|
|
49027
49059
|
t2 = $[3];
|
|
49028
49060
|
}
|
|
49029
49061
|
var t3;
|
|
49030
49062
|
if ($[4] !== audioThreadContext.audioRuntime.user.stop) {
|
|
49031
|
-
t3 = /* @__PURE__ */
|
|
49063
|
+
t3 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49032
49064
|
onClick: audioThreadContext.audioRuntime.user.stop,
|
|
49033
49065
|
highContrast: true,
|
|
49034
49066
|
variant: "soft",
|
|
@@ -49060,14 +49092,14 @@ var ActionButton = function() {
|
|
|
49060
49092
|
if (status === "recorderPaused") {
|
|
49061
49093
|
var _t2;
|
|
49062
49094
|
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49063
|
-
_t2 = /* @__PURE__ */
|
|
49095
|
+
_t2 = /* @__PURE__ */ _jsx95(ResumeIcon, {});
|
|
49064
49096
|
$[9] = _t2;
|
|
49065
49097
|
} else {
|
|
49066
49098
|
_t2 = $[9];
|
|
49067
49099
|
}
|
|
49068
49100
|
var _t3;
|
|
49069
49101
|
if ($[10] !== audioThreadContext.audioRuntime.user.resume) {
|
|
49070
|
-
_t3 = /* @__PURE__ */
|
|
49102
|
+
_t3 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49071
49103
|
onClick: audioThreadContext.audioRuntime.user.resume,
|
|
49072
49104
|
color: "red",
|
|
49073
49105
|
size: "4",
|
|
@@ -49083,7 +49115,7 @@ var ActionButton = function() {
|
|
|
49083
49115
|
if (status === "idle") {
|
|
49084
49116
|
var _t4;
|
|
49085
49117
|
if ($[12] !== audioThreadContext.audioRuntime.user) {
|
|
49086
|
-
_t4 = /* @__PURE__ */
|
|
49118
|
+
_t4 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49087
49119
|
onClick: function() {
|
|
49088
49120
|
return audioThreadContext.audioRuntime.user.start();
|
|
49089
49121
|
},
|
|
@@ -49115,14 +49147,14 @@ var ActionButton = function() {
|
|
|
49115
49147
|
}
|
|
49116
49148
|
var _t6;
|
|
49117
49149
|
if ($[18] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49118
|
-
_t6 = /* @__PURE__ */
|
|
49150
|
+
_t6 = /* @__PURE__ */ _jsx95(StopIcon2, {});
|
|
49119
49151
|
$[18] = _t6;
|
|
49120
49152
|
} else {
|
|
49121
49153
|
_t6 = $[18];
|
|
49122
49154
|
}
|
|
49123
49155
|
var _t7;
|
|
49124
49156
|
if ($[19] !== _t5) {
|
|
49125
|
-
_t7 = /* @__PURE__ */
|
|
49157
|
+
_t7 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49126
49158
|
onClick: _t5,
|
|
49127
49159
|
size: "4",
|
|
49128
49160
|
color: "gray",
|
|
@@ -49149,14 +49181,14 @@ var ActionButton = function() {
|
|
|
49149
49181
|
}
|
|
49150
49182
|
var _t9;
|
|
49151
49183
|
if ($[23] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49152
|
-
_t9 = /* @__PURE__ */
|
|
49184
|
+
_t9 = /* @__PURE__ */ _jsx95(ResumeIcon, {});
|
|
49153
49185
|
$[23] = _t9;
|
|
49154
49186
|
} else {
|
|
49155
49187
|
_t9 = $[23];
|
|
49156
49188
|
}
|
|
49157
49189
|
var _t0;
|
|
49158
49190
|
if ($[24] !== _t8) {
|
|
49159
|
-
_t0 = /* @__PURE__ */
|
|
49191
|
+
_t0 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49160
49192
|
onClick: _t8,
|
|
49161
49193
|
size: "4",
|
|
49162
49194
|
children: _t9
|
|
@@ -49170,7 +49202,7 @@ var ActionButton = function() {
|
|
|
49170
49202
|
}
|
|
49171
49203
|
var t0;
|
|
49172
49204
|
if ($[26] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49173
|
-
t0 = /* @__PURE__ */
|
|
49205
|
+
t0 = /* @__PURE__ */ _jsx95(IconButton10, {
|
|
49174
49206
|
size: "4",
|
|
49175
49207
|
variant: "soft",
|
|
49176
49208
|
disabled: true
|
|
@@ -49182,7 +49214,7 @@ var ActionButton = function() {
|
|
|
49182
49214
|
return t0;
|
|
49183
49215
|
};
|
|
49184
49216
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
49185
|
-
import { jsx as
|
|
49217
|
+
import { jsx as _jsx96, jsxs as _jsxs34 } from "react/jsx-runtime";
|
|
49186
49218
|
function ownKeys52(e, r) {
|
|
49187
49219
|
var t = Object.keys(e);
|
|
49188
49220
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -49227,17 +49259,17 @@ function _toPrimitive52(t, r) {
|
|
|
49227
49259
|
return ("string" === r ? String : Number)(t);
|
|
49228
49260
|
}
|
|
49229
49261
|
var Form = function(props) {
|
|
49230
|
-
var $ =
|
|
49262
|
+
var $ = _c99(17);
|
|
49231
49263
|
var status = useStatus().status;
|
|
49232
49264
|
var audioThreadContext = useAudioThreadContext();
|
|
49233
49265
|
var t0 = status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
|
|
49234
49266
|
var t1;
|
|
49235
49267
|
if ($[0] !== t0) {
|
|
49236
|
-
t1 = /* @__PURE__ */
|
|
49268
|
+
t1 = /* @__PURE__ */ _jsx96(Flex34, {
|
|
49237
49269
|
ml: "-22.5px",
|
|
49238
49270
|
mr: "2",
|
|
49239
49271
|
align: "center",
|
|
49240
|
-
children: /* @__PURE__ */
|
|
49272
|
+
children: /* @__PURE__ */ _jsx96(MicIcon, {
|
|
49241
49273
|
style: {
|
|
49242
49274
|
color: t0
|
|
49243
49275
|
}
|
|
@@ -49263,7 +49295,7 @@ var Form = function(props) {
|
|
|
49263
49295
|
var t4 = status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
|
|
49264
49296
|
var t5;
|
|
49265
49297
|
if ($[4] !== audioThreadContext.audioRuntime.user.visualizationAnalyser || $[5] !== t4) {
|
|
49266
|
-
t5 = /* @__PURE__ */
|
|
49298
|
+
t5 = /* @__PURE__ */ _jsx96(BarsVisualizer, {
|
|
49267
49299
|
visualizationAnalyser: audioThreadContext.audioRuntime.user.visualizationAnalyser,
|
|
49268
49300
|
backgroundColor: t4,
|
|
49269
49301
|
height: "20px",
|
|
@@ -49277,7 +49309,7 @@ var Form = function(props) {
|
|
|
49277
49309
|
}
|
|
49278
49310
|
var t6;
|
|
49279
49311
|
if ($[7] !== t3 || $[8] !== t5) {
|
|
49280
|
-
t6 = /* @__PURE__ */
|
|
49312
|
+
t6 = /* @__PURE__ */ _jsx96(Flex34, {
|
|
49281
49313
|
px: "2",
|
|
49282
49314
|
py: "1",
|
|
49283
49315
|
style: t3,
|
|
@@ -49307,7 +49339,7 @@ var Form = function(props) {
|
|
|
49307
49339
|
}
|
|
49308
49340
|
var t8;
|
|
49309
49341
|
if ($[13] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49310
|
-
t8 = /* @__PURE__ */
|
|
49342
|
+
t8 = /* @__PURE__ */ _jsx96(ActionButton, {});
|
|
49311
49343
|
$[13] = t8;
|
|
49312
49344
|
} else {
|
|
49313
49345
|
t8 = $[13];
|
|
@@ -49332,7 +49364,7 @@ var Form = function(props) {
|
|
|
49332
49364
|
return t9;
|
|
49333
49365
|
};
|
|
49334
49366
|
// src/components/threads/AudioThread/index.tsx
|
|
49335
|
-
import { jsx as
|
|
49367
|
+
import { jsx as _jsx97, jsxs as _jsxs35 } from "react/jsx-runtime";
|
|
49336
49368
|
function ownKeys53(e, r) {
|
|
49337
49369
|
var t = Object.keys(e);
|
|
49338
49370
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -49377,14 +49409,14 @@ function _toPrimitive53(t, r) {
|
|
|
49377
49409
|
return ("string" === r ? String : Number)(t);
|
|
49378
49410
|
}
|
|
49379
49411
|
var AudioThread = function(props) {
|
|
49380
|
-
var $ =
|
|
49412
|
+
var $ = _c100(5);
|
|
49381
49413
|
var t0;
|
|
49382
49414
|
var t1;
|
|
49383
49415
|
var t2;
|
|
49384
49416
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49385
|
-
t0 = /* @__PURE__ */
|
|
49386
|
-
t1 = /* @__PURE__ */
|
|
49387
|
-
t2 = /* @__PURE__ */
|
|
49417
|
+
t0 = /* @__PURE__ */ _jsx97(Visualization, {});
|
|
49418
|
+
t1 = /* @__PURE__ */ _jsx97(Status, {});
|
|
49419
|
+
t2 = /* @__PURE__ */ _jsx97(Form, {});
|
|
49388
49420
|
$[0] = t0;
|
|
49389
49421
|
$[1] = t1;
|
|
49390
49422
|
$[2] = t2;
|
|
@@ -49414,7 +49446,7 @@ AudioThread.Visualization = Visualization;
|
|
|
49414
49446
|
AudioThread.Status = Status;
|
|
49415
49447
|
AudioThread.Form = Form;
|
|
49416
49448
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
49417
|
-
import { jsx as
|
|
49449
|
+
import { jsx as _jsx98, jsxs as _jsxs36 } from "react/jsx-runtime";
|
|
49418
49450
|
function ownKeys54(e, r) {
|
|
49419
49451
|
var t = Object.keys(e);
|
|
49420
49452
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -49459,14 +49491,14 @@ function _toPrimitive54(t, r) {
|
|
|
49459
49491
|
return ("string" === r ? String : Number)(t);
|
|
49460
49492
|
}
|
|
49461
49493
|
var AudioThreadDialog = function(props) {
|
|
49462
|
-
var $ =
|
|
49494
|
+
var $ = _c101(4);
|
|
49463
49495
|
var t0;
|
|
49464
49496
|
var t1;
|
|
49465
49497
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
49466
|
-
t0 = /* @__PURE__ */
|
|
49467
|
-
children: /* @__PURE__ */
|
|
49498
|
+
t0 = /* @__PURE__ */ _jsx98(Content8.Root, {
|
|
49499
|
+
children: /* @__PURE__ */ _jsx98(AudioThread, {})
|
|
49468
49500
|
});
|
|
49469
|
-
t1 = /* @__PURE__ */
|
|
49501
|
+
t1 = /* @__PURE__ */ _jsx98(Trigger, {});
|
|
49470
49502
|
$[0] = t0;
|
|
49471
49503
|
$[1] = t1;
|
|
49472
49504
|
} else {
|
|
@@ -49492,7 +49524,7 @@ AudioThreadDialog.Root = Root13;
|
|
|
49492
49524
|
AudioThreadDialog.Trigger = Trigger;
|
|
49493
49525
|
AudioThreadDialog.Content = Content8;
|
|
49494
49526
|
// src/hooks/audioRuntimes/useWebrtcAudioRuntime/index.ts
|
|
49495
|
-
import { useEffect as useEffect13, useMemo as
|
|
49527
|
+
import { useEffect as useEffect13, useMemo as useMemo21, useRef as useRef9, useState as useState12 } from "react";
|
|
49496
49528
|
function asyncGeneratorStep12(n, t, e, r, o, a, c) {
|
|
49497
49529
|
try {
|
|
49498
49530
|
var i = n[a](c), u = i.value;
|
|
@@ -49932,7 +49964,7 @@ var useWebrtcAudioRuntime = function() {
|
|
|
49932
49964
|
return _ref7.apply(this, arguments);
|
|
49933
49965
|
};
|
|
49934
49966
|
}();
|
|
49935
|
-
return
|
|
49967
|
+
return useMemo21(function() {
|
|
49936
49968
|
return {
|
|
49937
49969
|
webrtcAudioRuntime: {
|
|
49938
49970
|
user: {
|
|
@@ -49981,10 +50013,10 @@ var useWebrtcAudioRuntime = function() {
|
|
|
49981
50013
|
]);
|
|
49982
50014
|
};
|
|
49983
50015
|
// src/components/audioRuntimes/WebrtcAudioRuntimeProvider.tsx
|
|
49984
|
-
import { c as
|
|
49985
|
-
import { jsx as
|
|
50016
|
+
import { c as _c102 } from "react-compiler-runtime";
|
|
50017
|
+
import { jsx as _jsx99 } from "react/jsx-runtime";
|
|
49986
50018
|
var WebrtcAudioRuntimeProvider = function(t0) {
|
|
49987
|
-
var $ =
|
|
50019
|
+
var $ = _c102(5);
|
|
49988
50020
|
var children = t0.children;
|
|
49989
50021
|
var webrtcAudioRuntime = useWebrtcAudioRuntime().webrtcAudioRuntime;
|
|
49990
50022
|
var t1;
|
|
@@ -49999,7 +50031,7 @@ var WebrtcAudioRuntimeProvider = function(t0) {
|
|
|
49999
50031
|
}
|
|
50000
50032
|
var t2;
|
|
50001
50033
|
if ($[2] !== children || $[3] !== t1) {
|
|
50002
|
-
t2 = /* @__PURE__ */
|
|
50034
|
+
t2 = /* @__PURE__ */ _jsx99(AudioThreadContext.Provider, {
|
|
50003
50035
|
value: t1,
|
|
50004
50036
|
children: children
|
|
50005
50037
|
});
|
|
@@ -50012,14 +50044,14 @@ var WebrtcAudioRuntimeProvider = function(t0) {
|
|
|
50012
50044
|
return t2;
|
|
50013
50045
|
};
|
|
50014
50046
|
// src/components/gui/Gui/index.tsx
|
|
50015
|
-
import { c as
|
|
50016
|
-
import { useMemo as
|
|
50047
|
+
import { c as _c105 } from "react-compiler-runtime";
|
|
50048
|
+
import { useMemo as useMemo24 } from "react";
|
|
50017
50049
|
import { Flex as Flex35, Card as Card5, Spinner as Spinner3 } from "@radix-ui/themes";
|
|
50018
50050
|
// src/hooks/messages/useLatestAssistantMessage/index.ts
|
|
50019
|
-
import { c as
|
|
50020
|
-
import { useMemo as
|
|
50051
|
+
import { c as _c103 } from "react-compiler-runtime";
|
|
50052
|
+
import { useMemo as useMemo22 } from "react";
|
|
50021
50053
|
var useLatestAssistantMessage = function() {
|
|
50022
|
-
var $ =
|
|
50054
|
+
var $ = _c103(4);
|
|
50023
50055
|
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50024
50056
|
var t0;
|
|
50025
50057
|
var t1;
|
|
@@ -50048,11 +50080,11 @@ function _temp11(message) {
|
|
|
50048
50080
|
return message.role === "assistant";
|
|
50049
50081
|
}
|
|
50050
50082
|
// src/hooks/messages/useLatestAssistantMessageWithContent/index.ts
|
|
50051
|
-
import { c as
|
|
50083
|
+
import { c as _c104 } from "react-compiler-runtime";
|
|
50052
50084
|
import { isEmpty as isEmpty3 } from "radash";
|
|
50053
|
-
import { useMemo as
|
|
50085
|
+
import { useMemo as useMemo23 } from "react";
|
|
50054
50086
|
var useLatestAssistantMessageWithContent = function() {
|
|
50055
|
-
var $ =
|
|
50087
|
+
var $ = _c104(4);
|
|
50056
50088
|
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50057
50089
|
var t0;
|
|
50058
50090
|
var t1;
|
|
@@ -50084,14 +50116,14 @@ function _temp25(message) {
|
|
|
50084
50116
|
return message.role === "assistant" && message.content.some(_temp12);
|
|
50085
50117
|
}
|
|
50086
50118
|
// src/components/gui/Gui/index.tsx
|
|
50087
|
-
import { jsx as
|
|
50119
|
+
import { jsx as _jsx100, jsxs as _jsxs37 } from "react/jsx-runtime";
|
|
50088
50120
|
var StartingToolCalls3 = function() {
|
|
50089
|
-
var $ =
|
|
50121
|
+
var $ = _c105(2);
|
|
50090
50122
|
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
50091
50123
|
var StartingToolCalls4 = t0.StartingToolCalls;
|
|
50092
50124
|
var t1;
|
|
50093
50125
|
if ($[0] !== StartingToolCalls4) {
|
|
50094
|
-
t1 = /* @__PURE__ */
|
|
50126
|
+
t1 = /* @__PURE__ */ _jsx100(StartingToolCalls4, {});
|
|
50095
50127
|
$[0] = StartingToolCalls4;
|
|
50096
50128
|
$[1] = t1;
|
|
50097
50129
|
} else {
|
|
@@ -50100,7 +50132,7 @@ var StartingToolCalls3 = function() {
|
|
|
50100
50132
|
return t1;
|
|
50101
50133
|
};
|
|
50102
50134
|
var Content10 = function(t0) {
|
|
50103
|
-
var $ =
|
|
50135
|
+
var $ = _c105(5);
|
|
50104
50136
|
var latestRunStep = t0.latestRunStep;
|
|
50105
50137
|
var t1;
|
|
50106
50138
|
bb0: {
|
|
@@ -50122,7 +50154,7 @@ var Content10 = function(t0) {
|
|
|
50122
50154
|
if (!latestRunStep || latestRunStep.step_details.type !== "tool_calls") {
|
|
50123
50155
|
var _t;
|
|
50124
50156
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50125
|
-
_t = /* @__PURE__ */
|
|
50157
|
+
_t = /* @__PURE__ */ _jsx100(Spinner3, {});
|
|
50126
50158
|
$[0] = _t;
|
|
50127
50159
|
} else {
|
|
50128
50160
|
_t = $[0];
|
|
@@ -50132,7 +50164,7 @@ var Content10 = function(t0) {
|
|
|
50132
50164
|
if (!latestToolCall) {
|
|
50133
50165
|
var _t2;
|
|
50134
50166
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50135
|
-
_t2 = /* @__PURE__ */
|
|
50167
|
+
_t2 = /* @__PURE__ */ _jsx100(StartingToolCalls3, {});
|
|
50136
50168
|
$[1] = _t2;
|
|
50137
50169
|
} else {
|
|
50138
50170
|
_t2 = $[1];
|
|
@@ -50141,7 +50173,7 @@ var Content10 = function(t0) {
|
|
|
50141
50173
|
}
|
|
50142
50174
|
var t2;
|
|
50143
50175
|
if ($[2] !== latestRunStep || $[3] !== latestToolCall) {
|
|
50144
|
-
t2 = /* @__PURE__ */
|
|
50176
|
+
t2 = /* @__PURE__ */ _jsx100(ToolCall, {
|
|
50145
50177
|
runStep: latestRunStep,
|
|
50146
50178
|
toolCall: latestToolCall
|
|
50147
50179
|
});
|
|
@@ -50154,7 +50186,7 @@ var Content10 = function(t0) {
|
|
|
50154
50186
|
return t2;
|
|
50155
50187
|
};
|
|
50156
50188
|
var Progress2 = function(t0) {
|
|
50157
|
-
var $ =
|
|
50189
|
+
var $ = _c105(5);
|
|
50158
50190
|
var latestAssistantMessage = t0.latestAssistantMessage;
|
|
50159
50191
|
var isMutatingMessage = useIsMutatingMessage();
|
|
50160
50192
|
var t1;
|
|
@@ -50188,10 +50220,10 @@ var Progress2 = function(t0) {
|
|
|
50188
50220
|
}
|
|
50189
50221
|
var t4;
|
|
50190
50222
|
if ($[3] !== latestRunStep) {
|
|
50191
|
-
t4 = /* @__PURE__ */
|
|
50223
|
+
t4 = /* @__PURE__ */ _jsx100(Flex35, {
|
|
50192
50224
|
style: t3,
|
|
50193
|
-
children: /* @__PURE__ */
|
|
50194
|
-
children: /* @__PURE__ */
|
|
50225
|
+
children: /* @__PURE__ */ _jsx100(Card5, {
|
|
50226
|
+
children: /* @__PURE__ */ _jsx100(Content10, {
|
|
50195
50227
|
latestRunStep: latestRunStep
|
|
50196
50228
|
})
|
|
50197
50229
|
})
|
|
@@ -50204,20 +50236,20 @@ var Progress2 = function(t0) {
|
|
|
50204
50236
|
return t4;
|
|
50205
50237
|
};
|
|
50206
50238
|
var Gui = function() {
|
|
50207
|
-
var $ =
|
|
50239
|
+
var $ = _c105(8);
|
|
50208
50240
|
var latestAssistantMessage = useLatestAssistantMessage().latestAssistantMessage;
|
|
50209
50241
|
var latestAssistantMessageWithContent = useLatestAssistantMessageWithContent().latestAssistantMessageWithContent;
|
|
50210
50242
|
if (!latestAssistantMessage || !latestAssistantMessageWithContent) {
|
|
50211
50243
|
var _t3;
|
|
50212
50244
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50213
|
-
_t3 = /* @__PURE__ */
|
|
50245
|
+
_t3 = /* @__PURE__ */ _jsx100(Flex35, {
|
|
50214
50246
|
direction: "column",
|
|
50215
50247
|
flexGrow: "1",
|
|
50216
|
-
children: /* @__PURE__ */
|
|
50248
|
+
children: /* @__PURE__ */ _jsx100(Flex35, {
|
|
50217
50249
|
align: "center",
|
|
50218
50250
|
justify: "center",
|
|
50219
50251
|
flexGrow: "1",
|
|
50220
|
-
children: /* @__PURE__ */
|
|
50252
|
+
children: /* @__PURE__ */ _jsx100(Spinner3, {
|
|
50221
50253
|
size: "3"
|
|
50222
50254
|
})
|
|
50223
50255
|
})
|
|
@@ -50230,7 +50262,7 @@ var Gui = function() {
|
|
|
50230
50262
|
}
|
|
50231
50263
|
var t0;
|
|
50232
50264
|
if ($[1] !== latestAssistantMessageWithContent) {
|
|
50233
|
-
t0 = /* @__PURE__ */
|
|
50265
|
+
t0 = /* @__PURE__ */ _jsx100(MessageContent, {
|
|
50234
50266
|
message: latestAssistantMessageWithContent
|
|
50235
50267
|
});
|
|
50236
50268
|
$[1] = latestAssistantMessageWithContent;
|
|
@@ -50240,7 +50272,7 @@ var Gui = function() {
|
|
|
50240
50272
|
}
|
|
50241
50273
|
var t1;
|
|
50242
50274
|
if ($[3] !== latestAssistantMessage) {
|
|
50243
|
-
t1 = /* @__PURE__ */
|
|
50275
|
+
t1 = /* @__PURE__ */ _jsx100(Progress2, {
|
|
50244
50276
|
latestAssistantMessage: latestAssistantMessage
|
|
50245
50277
|
});
|
|
50246
50278
|
$[3] = latestAssistantMessage;
|
|
@@ -50270,9 +50302,9 @@ function _temp13(rs) {
|
|
|
50270
50302
|
return rs.status === "in_progress";
|
|
50271
50303
|
}
|
|
50272
50304
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
50273
|
-
import { c as
|
|
50274
|
-
import { useMemo as
|
|
50275
|
-
import { jsx as
|
|
50305
|
+
import { c as _c106 } from "react-compiler-runtime";
|
|
50306
|
+
import { useMemo as useMemo25 } from "react";
|
|
50307
|
+
import { jsx as _jsx101 } from "react/jsx-runtime";
|
|
50276
50308
|
var _excluded7 = [
|
|
50277
50309
|
"children"
|
|
50278
50310
|
];
|
|
@@ -50295,7 +50327,7 @@ function _objectWithoutPropertiesLoose7(r, e) {
|
|
|
50295
50327
|
return t;
|
|
50296
50328
|
}
|
|
50297
50329
|
var MarkdownProvider = function(t0) {
|
|
50298
|
-
var $ =
|
|
50330
|
+
var $ = _c106(9);
|
|
50299
50331
|
var children;
|
|
50300
50332
|
var rest;
|
|
50301
50333
|
if ($[0] !== t0) {
|
|
@@ -50325,7 +50357,7 @@ var MarkdownProvider = function(t0) {
|
|
|
50325
50357
|
var value = t1;
|
|
50326
50358
|
var t3;
|
|
50327
50359
|
if ($[6] !== children || $[7] !== value) {
|
|
50328
|
-
t3 = /* @__PURE__ */
|
|
50360
|
+
t3 = /* @__PURE__ */ _jsx101(MarkdownContext.Provider, {
|
|
50329
50361
|
value: value,
|
|
50330
50362
|
children: children
|
|
50331
50363
|
});
|
|
@@ -50338,18 +50370,18 @@ var MarkdownProvider = function(t0) {
|
|
|
50338
50370
|
return t3;
|
|
50339
50371
|
};
|
|
50340
50372
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50341
|
-
import { c as
|
|
50373
|
+
import { c as _c109 } from "react-compiler-runtime";
|
|
50342
50374
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50343
|
-
import { c as
|
|
50375
|
+
import { c as _c108 } from "react-compiler-runtime";
|
|
50344
50376
|
import { useState as useState13 } from "react";
|
|
50345
50377
|
import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
|
|
50346
50378
|
import { Dialog, VisuallyHidden, IconButton as IconButton11 } from "@radix-ui/themes";
|
|
50347
50379
|
// src/components/annotations/SourceAnnotation/FileCitation/Content.tsx
|
|
50348
|
-
import { c as
|
|
50380
|
+
import { c as _c107 } from "react-compiler-runtime";
|
|
50349
50381
|
import { Flex as Flex36, Card as Card6, Inset as Inset3 } from "@radix-ui/themes";
|
|
50350
|
-
import { jsx as
|
|
50382
|
+
import { jsx as _jsx102 } from "react/jsx-runtime";
|
|
50351
50383
|
var Content11 = function(t0) {
|
|
50352
|
-
var $ =
|
|
50384
|
+
var $ = _c107(5);
|
|
50353
50385
|
var fileId = t0.fileId;
|
|
50354
50386
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50355
50387
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
@@ -50386,18 +50418,18 @@ var Content11 = function(t0) {
|
|
|
50386
50418
|
}
|
|
50387
50419
|
var t5;
|
|
50388
50420
|
if ($[3] !== t3) {
|
|
50389
|
-
t5 = /* @__PURE__ */
|
|
50421
|
+
t5 = /* @__PURE__ */ _jsx102(Flex36, {
|
|
50390
50422
|
direction: "column",
|
|
50391
50423
|
flexGrow: "1",
|
|
50392
50424
|
gap: "3",
|
|
50393
|
-
children: /* @__PURE__ */
|
|
50425
|
+
children: /* @__PURE__ */ _jsx102(Card6, {
|
|
50394
50426
|
style: t1,
|
|
50395
|
-
children: /* @__PURE__ */
|
|
50427
|
+
children: /* @__PURE__ */ _jsx102(Inset3, {
|
|
50396
50428
|
clip: "padding-box",
|
|
50397
50429
|
style: t2,
|
|
50398
|
-
children: /* @__PURE__ */
|
|
50430
|
+
children: /* @__PURE__ */ _jsx102(Flex36, {
|
|
50399
50431
|
flexGrow: "1",
|
|
50400
|
-
children: /* @__PURE__ */
|
|
50432
|
+
children: /* @__PURE__ */ _jsx102("embed", {
|
|
50401
50433
|
src: t3,
|
|
50402
50434
|
style: t4
|
|
50403
50435
|
})
|
|
@@ -50413,9 +50445,9 @@ var Content11 = function(t0) {
|
|
|
50413
50445
|
return t5;
|
|
50414
50446
|
};
|
|
50415
50447
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50416
|
-
import { jsx as
|
|
50448
|
+
import { jsx as _jsx103, jsxs as _jsxs38, Fragment as _Fragment6 } from "react/jsx-runtime";
|
|
50417
50449
|
var FileCitation = function(t0) {
|
|
50418
|
-
var $ =
|
|
50450
|
+
var $ = _c108(18);
|
|
50419
50451
|
var annotation = t0.annotation;
|
|
50420
50452
|
var _useState13 = _sliced_to_array(useState13(null), 2), activeFileId = _useState13[0], setActiveFileId = _useState13[1];
|
|
50421
50453
|
var t1;
|
|
@@ -50430,14 +50462,14 @@ var FileCitation = function(t0) {
|
|
|
50430
50462
|
}
|
|
50431
50463
|
var t2;
|
|
50432
50464
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50433
|
-
t2 = /* @__PURE__ */
|
|
50465
|
+
t2 = /* @__PURE__ */ _jsx103(QuoteIcon2, {});
|
|
50434
50466
|
$[2] = t2;
|
|
50435
50467
|
} else {
|
|
50436
50468
|
t2 = $[2];
|
|
50437
50469
|
}
|
|
50438
50470
|
var t3;
|
|
50439
50471
|
if ($[3] !== t1) {
|
|
50440
|
-
t3 = /* @__PURE__ */
|
|
50472
|
+
t3 = /* @__PURE__ */ _jsx103(IconButton11, {
|
|
50441
50473
|
variant: "soft",
|
|
50442
50474
|
color: "gray",
|
|
50443
50475
|
size: "1",
|
|
@@ -50473,9 +50505,9 @@ var FileCitation = function(t0) {
|
|
|
50473
50505
|
}
|
|
50474
50506
|
var t7;
|
|
50475
50507
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50476
|
-
t7 = /* @__PURE__ */
|
|
50508
|
+
t7 = /* @__PURE__ */ _jsx103(VisuallyHidden, {
|
|
50477
50509
|
asChild: true,
|
|
50478
|
-
children: /* @__PURE__ */
|
|
50510
|
+
children: /* @__PURE__ */ _jsx103(Dialog.Title, {
|
|
50479
50511
|
children: "Source"
|
|
50480
50512
|
})
|
|
50481
50513
|
});
|
|
@@ -50485,7 +50517,7 @@ var FileCitation = function(t0) {
|
|
|
50485
50517
|
}
|
|
50486
50518
|
var t8;
|
|
50487
50519
|
if ($[8] !== activeFileId) {
|
|
50488
|
-
t8 = activeFileId && /* @__PURE__ */
|
|
50520
|
+
t8 = activeFileId && /* @__PURE__ */ _jsx103(Content11, {
|
|
50489
50521
|
fileId: activeFileId
|
|
50490
50522
|
});
|
|
50491
50523
|
$[8] = activeFileId;
|
|
@@ -50513,7 +50545,7 @@ var FileCitation = function(t0) {
|
|
|
50513
50545
|
}
|
|
50514
50546
|
var t10;
|
|
50515
50547
|
if ($[12] !== t4 || $[13] !== t9) {
|
|
50516
|
-
t10 = /* @__PURE__ */
|
|
50548
|
+
t10 = /* @__PURE__ */ _jsx103(Dialog.Root, {
|
|
50517
50549
|
open: t4,
|
|
50518
50550
|
onOpenChange: t5,
|
|
50519
50551
|
children: t9
|
|
@@ -50541,7 +50573,7 @@ var FileCitation = function(t0) {
|
|
|
50541
50573
|
return t11;
|
|
50542
50574
|
};
|
|
50543
50575
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50544
|
-
import { jsx as
|
|
50576
|
+
import { jsx as _jsx104 } from "react/jsx-runtime";
|
|
50545
50577
|
var _excluded8 = [
|
|
50546
50578
|
"children"
|
|
50547
50579
|
];
|
|
@@ -50564,7 +50596,7 @@ function _objectWithoutPropertiesLoose8(r, e) {
|
|
|
50564
50596
|
return t;
|
|
50565
50597
|
}
|
|
50566
50598
|
var SourceAnnotation = function(t0) {
|
|
50567
|
-
var $ =
|
|
50599
|
+
var $ = _c109(10);
|
|
50568
50600
|
var children;
|
|
50569
50601
|
var rest;
|
|
50570
50602
|
if ($[0] !== t0) {
|
|
@@ -50592,7 +50624,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50592
50624
|
if (annotation.type === "file_citation") {
|
|
50593
50625
|
var t2;
|
|
50594
50626
|
if ($[5] !== annotation) {
|
|
50595
|
-
t2 = /* @__PURE__ */
|
|
50627
|
+
t2 = /* @__PURE__ */ _jsx104(FileCitation, {
|
|
50596
50628
|
annotation: annotation
|
|
50597
50629
|
});
|
|
50598
50630
|
$[5] = annotation;
|
|
@@ -50605,7 +50637,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50605
50637
|
if (annotation.type === "file_path") {
|
|
50606
50638
|
var _t2;
|
|
50607
50639
|
if ($[7] !== annotation || $[8] !== children) {
|
|
50608
|
-
_t2 = /* @__PURE__ */
|
|
50640
|
+
_t2 = /* @__PURE__ */ _jsx104(FilePathAnnotation, {
|
|
50609
50641
|
annotation: annotation,
|
|
50610
50642
|
children: children
|
|
50611
50643
|
});
|
|
@@ -50621,7 +50653,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50621
50653
|
return null;
|
|
50622
50654
|
};
|
|
50623
50655
|
// src/components/avatars/Avatar.tsx
|
|
50624
|
-
import { c as
|
|
50656
|
+
import { c as _c112 } from "react-compiler-runtime";
|
|
50625
50657
|
// src/enums/index.ts
|
|
50626
50658
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
50627
50659
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -50646,7 +50678,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
50646
50678
|
// src/components/avatars/Avatar.tsx
|
|
50647
50679
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
50648
50680
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
50649
|
-
import { c as
|
|
50681
|
+
import { c as _c110 } from "react-compiler-runtime";
|
|
50650
50682
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
50651
50683
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
50652
50684
|
var width = function(_ref) {
|
|
@@ -50698,9 +50730,9 @@ var optimizedSrc = function(_ref) {
|
|
|
50698
50730
|
}));
|
|
50699
50731
|
};
|
|
50700
50732
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
50701
|
-
import { jsx as
|
|
50733
|
+
import { jsx as _jsx105 } from "react/jsx-runtime";
|
|
50702
50734
|
var ImageAvatar = function(t0) {
|
|
50703
|
-
var $ =
|
|
50735
|
+
var $ = _c110(9);
|
|
50704
50736
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
50705
50737
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50706
50738
|
var t1;
|
|
@@ -50719,7 +50751,7 @@ var ImageAvatar = function(t0) {
|
|
|
50719
50751
|
}
|
|
50720
50752
|
var t2;
|
|
50721
50753
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
50722
|
-
t2 = /* @__PURE__ */
|
|
50754
|
+
t2 = /* @__PURE__ */ _jsx105(Avatar4, {
|
|
50723
50755
|
className: className,
|
|
50724
50756
|
style: style,
|
|
50725
50757
|
fallback: "",
|
|
@@ -50737,24 +50769,24 @@ var ImageAvatar = function(t0) {
|
|
|
50737
50769
|
return t2;
|
|
50738
50770
|
};
|
|
50739
50771
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
50740
|
-
import { c as
|
|
50741
|
-
import { useMemo as
|
|
50772
|
+
import { c as _c111 } from "react-compiler-runtime";
|
|
50773
|
+
import { useMemo as useMemo26 } from "react";
|
|
50742
50774
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
50743
50775
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
50744
50776
|
import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon, GlobeIcon, StarIcon, LightningBoltIcon as LightningBoltIcon2, FaceIcon, PersonIcon as PersonIcon2, HeartIcon } from "@radix-ui/react-icons";
|
|
50745
50777
|
var _obj;
|
|
50746
50778
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, CubeIcon), _define_property(_obj, IconAvatarName.TARGET, TargetIcon), _define_property(_obj, IconAvatarName.DISC, DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, GlobeIcon), _define_property(_obj, IconAvatarName.STAR, StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, LightningBoltIcon2), _define_property(_obj, IconAvatarName.FACE, FaceIcon), _define_property(_obj, IconAvatarName.PERSON, PersonIcon2), _define_property(_obj, IconAvatarName.HEART, HeartIcon), _obj);
|
|
50747
50779
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
50748
|
-
import { jsx as
|
|
50780
|
+
import { jsx as _jsx106 } from "react/jsx-runtime";
|
|
50749
50781
|
var IconAvatar = function(t0) {
|
|
50750
|
-
var $ =
|
|
50782
|
+
var $ = _c111(7);
|
|
50751
50783
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
50752
50784
|
var t1;
|
|
50753
50785
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
50754
50786
|
var Component2 = t1;
|
|
50755
50787
|
var t2;
|
|
50756
50788
|
if ($[0] !== Component2) {
|
|
50757
|
-
t2 = Component2 ? /* @__PURE__ */
|
|
50789
|
+
t2 = Component2 ? /* @__PURE__ */ _jsx106(Component2, {}) : "";
|
|
50758
50790
|
$[0] = Component2;
|
|
50759
50791
|
$[1] = t2;
|
|
50760
50792
|
} else {
|
|
@@ -50762,7 +50794,7 @@ var IconAvatar = function(t0) {
|
|
|
50762
50794
|
}
|
|
50763
50795
|
var t3;
|
|
50764
50796
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
50765
|
-
t3 = /* @__PURE__ */
|
|
50797
|
+
t3 = /* @__PURE__ */ _jsx106(Avatar5, {
|
|
50766
50798
|
className: className,
|
|
50767
50799
|
style: style,
|
|
50768
50800
|
size: size,
|
|
@@ -50779,16 +50811,16 @@ var IconAvatar = function(t0) {
|
|
|
50779
50811
|
return t3;
|
|
50780
50812
|
};
|
|
50781
50813
|
// src/components/avatars/Avatar.tsx
|
|
50782
|
-
import { jsx as
|
|
50814
|
+
import { jsx as _jsx107 } from "react/jsx-runtime";
|
|
50783
50815
|
var Avatar6 = function(t0) {
|
|
50784
|
-
var $ =
|
|
50816
|
+
var $ = _c112(14);
|
|
50785
50817
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
50786
50818
|
var size = t1 === void 0 ? "1" : t1;
|
|
50787
50819
|
if (avatar) {
|
|
50788
50820
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
50789
50821
|
var _t;
|
|
50790
50822
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
50791
|
-
_t = /* @__PURE__ */
|
|
50823
|
+
_t = /* @__PURE__ */ _jsx107(ImageAvatar, {
|
|
50792
50824
|
imageAvatar: avatar.imageAvatar,
|
|
50793
50825
|
size: size,
|
|
50794
50826
|
className: className,
|
|
@@ -50807,7 +50839,7 @@ var Avatar6 = function(t0) {
|
|
|
50807
50839
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
50808
50840
|
var _t2;
|
|
50809
50841
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
50810
|
-
_t2 = /* @__PURE__ */
|
|
50842
|
+
_t2 = /* @__PURE__ */ _jsx107(IconAvatar, {
|
|
50811
50843
|
iconAvatar: avatar.iconAvatar,
|
|
50812
50844
|
size: size,
|
|
50813
50845
|
className: className,
|
|
@@ -50826,7 +50858,7 @@ var Avatar6 = function(t0) {
|
|
|
50826
50858
|
}
|
|
50827
50859
|
var t2;
|
|
50828
50860
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
50829
|
-
t2 = /* @__PURE__ */
|
|
50861
|
+
t2 = /* @__PURE__ */ _jsx107(RadixAvatar, {
|
|
50830
50862
|
fallback: "",
|
|
50831
50863
|
size: size,
|
|
50832
50864
|
className: className,
|
|
@@ -50842,9 +50874,9 @@ var Avatar6 = function(t0) {
|
|
|
50842
50874
|
return t2;
|
|
50843
50875
|
};
|
|
50844
50876
|
// src/components/components/ComponentsProvider.tsx
|
|
50845
|
-
import { c as
|
|
50846
|
-
import { useMemo as
|
|
50847
|
-
import { jsx as
|
|
50877
|
+
import { c as _c113 } from "react-compiler-runtime";
|
|
50878
|
+
import { useMemo as useMemo27 } from "react";
|
|
50879
|
+
import { jsx as _jsx108 } from "react/jsx-runtime";
|
|
50848
50880
|
var _excluded9 = [
|
|
50849
50881
|
"children"
|
|
50850
50882
|
];
|
|
@@ -50867,7 +50899,7 @@ function _objectWithoutPropertiesLoose9(r, e) {
|
|
|
50867
50899
|
return t;
|
|
50868
50900
|
}
|
|
50869
50901
|
var ComponentsProvider = function(t0) {
|
|
50870
|
-
var $ =
|
|
50902
|
+
var $ = _c113(9);
|
|
50871
50903
|
var children;
|
|
50872
50904
|
var rest;
|
|
50873
50905
|
if ($[0] !== t0) {
|
|
@@ -50897,7 +50929,7 @@ var ComponentsProvider = function(t0) {
|
|
|
50897
50929
|
var value = t1;
|
|
50898
50930
|
var t3;
|
|
50899
50931
|
if ($[6] !== children || $[7] !== value) {
|
|
50900
|
-
t3 = /* @__PURE__ */
|
|
50932
|
+
t3 = /* @__PURE__ */ _jsx108(ComponentsContext.Provider, {
|
|
50901
50933
|
value: value,
|
|
50902
50934
|
children: children
|
|
50903
50935
|
});
|
|
@@ -50910,11 +50942,11 @@ var ComponentsProvider = function(t0) {
|
|
|
50910
50942
|
return t3;
|
|
50911
50943
|
};
|
|
50912
50944
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
50913
|
-
import { c as
|
|
50914
|
-
import { jsx as
|
|
50945
|
+
import { c as _c114 } from "react-compiler-runtime";
|
|
50946
|
+
import { jsx as _jsx109 } from "react/jsx-runtime";
|
|
50915
50947
|
var AssistantProvider = function(t0) {
|
|
50916
50948
|
var _assistant$name;
|
|
50917
|
-
var $ =
|
|
50949
|
+
var $ = _c114(10);
|
|
50918
50950
|
var children = t0.children;
|
|
50919
50951
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50920
50952
|
var t1;
|
|
@@ -50932,7 +50964,7 @@ var AssistantProvider = function(t0) {
|
|
|
50932
50964
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
50933
50965
|
var t4;
|
|
50934
50966
|
if ($[2] !== t3) {
|
|
50935
|
-
t4 = /* @__PURE__ */
|
|
50967
|
+
t4 = /* @__PURE__ */ _jsx109(Avatar6, {
|
|
50936
50968
|
avatar: t3
|
|
50937
50969
|
});
|
|
50938
50970
|
$[2] = t3;
|
|
@@ -50942,7 +50974,7 @@ var AssistantProvider = function(t0) {
|
|
|
50942
50974
|
}
|
|
50943
50975
|
var t5;
|
|
50944
50976
|
if ($[4] !== children || $[5] !== t4) {
|
|
50945
|
-
t5 = /* @__PURE__ */
|
|
50977
|
+
t5 = /* @__PURE__ */ _jsx109(AssistantAvatarContext.Provider, {
|
|
50946
50978
|
value: t4,
|
|
50947
50979
|
children: children
|
|
50948
50980
|
});
|
|
@@ -50954,7 +50986,7 @@ var AssistantProvider = function(t0) {
|
|
|
50954
50986
|
}
|
|
50955
50987
|
var t6;
|
|
50956
50988
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
50957
|
-
t6 = /* @__PURE__ */
|
|
50989
|
+
t6 = /* @__PURE__ */ _jsx109(AssistantNameContext.Provider, {
|
|
50958
50990
|
value: t2,
|
|
50959
50991
|
children: t5
|
|
50960
50992
|
});
|