@scalar/agent-chat 0.2.3 → 0.2.6
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/LICENSE +21 -0
- package/dist/App.vue.d.ts +3 -2
- package/dist/App.vue.d.ts.map +1 -1
- package/dist/App.vue.js +32 -0
- package/dist/App.vue2.js +4 -0
- package/dist/Chat.vue.d.ts.map +1 -1
- package/dist/Chat.vue.js +23 -0
- package/dist/Chat.vue2.js +4 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/api.d.ts +50 -0
- package/dist/api.d.ts.map +1 -0
- package/dist/api.js +68 -0
- package/dist/components/ApprovalSection.vue.d.ts.map +1 -1
- package/dist/components/ApprovalSection.vue.js +7 -0
- package/dist/components/ApprovalSection.vue2.js +42 -0
- package/dist/components/AuthenticationProvided.vue.d.ts +3 -0
- package/dist/components/AuthenticationProvided.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationProvided.vue.js +13 -0
- package/dist/components/AuthenticationRequired.vue.d.ts +3 -0
- package/dist/components/AuthenticationRequired.vue.d.ts.map +1 -0
- package/dist/components/AuthenticationRequired.vue.js +13 -0
- package/dist/components/AutosendPaused.vue.d.ts.map +1 -1
- package/dist/components/AutosendPaused.vue.js +13 -0
- package/dist/components/ContextItem.vue.d.ts.map +1 -1
- package/dist/components/ContextItem.vue.js +7 -0
- package/dist/components/ContextItem.vue2.js +19 -0
- package/dist/components/ErrorMessage.vue.d.ts +2 -1
- package/dist/components/ErrorMessage.vue.d.ts.map +1 -1
- package/dist/components/ErrorMessage.vue.js +7 -0
- package/dist/components/ErrorMessage.vue2.js +22 -0
- package/dist/components/LoadingMiniOpenAPIDoc.vue.d.ts.map +1 -1
- package/dist/components/LoadingMiniOpenAPIDoc.vue.js +14 -0
- package/dist/components/LoadingOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/components/LoadingOpenAPISpecsSummary.vue.js +14 -0
- package/dist/components/Logo.vue.d.ts.map +1 -1
- package/dist/components/Logo.vue.js +23 -0
- package/dist/components/PaymentSection.vue.d.ts.map +1 -1
- package/dist/components/PaymentSection.vue.js +7 -0
- package/dist/components/PaymentSection.vue2.js +34 -0
- package/dist/components/RequestApproved.vue.d.ts.map +1 -1
- package/dist/components/RequestApproved.vue.js +13 -0
- package/dist/components/RequestFailed.vue.d.ts.map +1 -1
- package/dist/components/RequestFailed.vue.js +24 -0
- package/dist/components/RequestPreview.vue.d.ts +1 -1
- package/dist/components/RequestPreview.vue.d.ts.map +1 -1
- package/dist/components/RequestPreview.vue.js +7 -0
- package/dist/components/RequestPreview.vue2.js +123 -0
- package/dist/components/RequestRejected.vue.d.ts.map +1 -1
- package/dist/components/RequestRejected.vue.js +22 -0
- package/dist/components/RequestSuccess.vue.d.ts.map +1 -1
- package/dist/components/RequestSuccess.vue.js +13 -0
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBody.vue.js +41 -0
- package/dist/components/ResponseBody/ResponseBody.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyInfo.vue.js +14 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyPreview.vue.js +7 -0
- package/dist/components/ResponseBody/ResponseBodyPreview.vue2.js +65 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyRaw.vue.js +20 -0
- package/dist/components/ResponseBody/ResponseBodyRaw.vue2.js +4 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts +2 -2
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.d.ts.map +1 -1
- package/dist/components/ResponseBody/ResponseBodyToggle.vue.js +26 -0
- package/dist/components/ResponseBody/ResponseBodyToggle.vue2.js +4 -0
- package/dist/components/ResponseBody/helpers/media-types.js +130 -0
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.d.ts.map +1 -1
- package/dist/components/ResponseBody/helpers/process-response-body.js +33 -0
- package/dist/components/SearchPopover.vue.d.ts +2 -2
- package/dist/components/SearchPopover.vue.d.ts.map +1 -1
- package/dist/components/SearchPopover.vue.js +7 -0
- package/dist/components/SearchPopover.vue2.js +67 -0
- package/dist/components/Selector.vue.d.ts +24 -0
- package/dist/components/Selector.vue.d.ts.map +1 -0
- package/dist/components/Selector.vue.js +67 -0
- package/dist/components/Selector.vue2.js +4 -0
- package/dist/components/SendingRequest.vue.d.ts.map +1 -1
- package/dist/components/SendingRequest.vue.js +24 -0
- package/dist/components/ServerSelector.vue.d.ts +22 -0
- package/dist/components/ServerSelector.vue.d.ts.map +1 -0
- package/dist/components/ServerSelector.vue.js +57 -0
- package/dist/components/ServerSelector.vue2.js +4 -0
- package/dist/components/Suggestion.vue.d.ts.map +1 -1
- package/dist/components/TestRequestButton.vue.d.ts.map +1 -1
- package/dist/components/{Endpoint.vue.d.ts → UploadSection.vue.d.ts} +3 -5
- package/dist/components/UploadSection.vue.d.ts.map +1 -0
- package/dist/components/UploadSection.vue.js +7 -0
- package/dist/components/UploadSection.vue2.js +62 -0
- package/dist/entities/prompt/constants.d.ts +2 -0
- package/dist/entities/prompt/constants.d.ts.map +1 -0
- package/dist/entities/prompt/constants.js +4 -0
- package/dist/entities/registry/document.d.ts +21 -0
- package/dist/entities/registry/document.d.ts.map +1 -0
- package/dist/entities/registry/document.js +12 -0
- package/dist/entities/tools/ask-for-authentication.d.ts +7 -0
- package/dist/entities/tools/ask-for-authentication.d.ts.map +1 -0
- package/dist/entities/tools/ask-for-authentication.js +8 -0
- package/dist/entities/tools/constants.d.ts +2 -0
- package/dist/entities/tools/constants.d.ts.map +1 -0
- package/dist/entities/tools/constants.js +4 -0
- package/dist/entities/tools/execute-request.d.ts +42 -0
- package/dist/entities/tools/execute-request.d.ts.map +1 -0
- package/dist/entities/tools/execute-request.js +11 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts +12 -0
- package/dist/entities/tools/get-mini-openapi-spec.d.ts.map +1 -0
- package/dist/entities/tools/get-mini-openapi-spec.js +8 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts +10 -0
- package/dist/entities/tools/get-openapi-spec-summary.d.ts.map +1 -0
- package/dist/entities/tools/get-openapi-spec-summary.js +4 -0
- package/dist/helpers.d.ts +20 -12
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +122 -0
- package/dist/hooks/{useChatApprovals.d.ts → use-chat-approvals.d.ts} +1 -1
- package/dist/hooks/use-chat-approvals.d.ts.map +1 -0
- package/dist/hooks/use-chat-approvals.js +21 -0
- package/dist/hooks/use-chat-error.d.ts +14 -0
- package/dist/hooks/use-chat-error.d.ts.map +1 -0
- package/dist/hooks/use-chat-error.js +23 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts +19 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.d.ts.map +1 -0
- package/dist/hooks/use-chat-pending-client-tool-parts.js +12 -0
- package/dist/hooks/{useChatScroll.d.ts → use-chat-scroll.d.ts} +1 -1
- package/dist/hooks/use-chat-scroll.d.ts.map +1 -0
- package/dist/hooks/use-chat-scroll.js +16 -0
- package/dist/hooks/{useSearch.d.ts → use-search.d.ts} +11 -11
- package/dist/hooks/use-search.d.ts.map +1 -0
- package/dist/hooks/use-search.js +25 -0
- package/dist/hooks/use-term-and-conditions.d.ts +6 -0
- package/dist/hooks/use-term-and-conditions.d.ts.map +1 -0
- package/dist/hooks/use-term-and-conditions.js +16 -0
- package/dist/hooks/use-upload-tmp-document.d.ts +19 -0
- package/dist/hooks/use-upload-tmp-document.d.ts.map +1 -0
- package/dist/hooks/use-upload-tmp-document.js +64 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/package.json +34 -23
- package/dist/registry/add-documents-to-store.d.ts +6 -6
- package/dist/registry/add-documents-to-store.d.ts.map +1 -1
- package/dist/registry/add-documents-to-store.js +40 -0
- package/dist/registry/create-document-name.d.ts +2 -0
- package/dist/registry/create-document-name.d.ts.map +1 -0
- package/dist/registry/create-document-name.js +6 -0
- package/dist/state/state.d.ts +20 -8
- package/dist/state/state.d.ts.map +1 -1
- package/dist/state/state.js +110 -0
- package/dist/style.css +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/views/Chat/Chat.vue.d.ts.map +1 -1
- package/dist/views/Chat/Chat.vue.js +7 -0
- package/dist/views/Chat/Chat.vue2.js +77 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts +10 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.d.ts.map +1 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue.js +7 -0
- package/dist/views/Chat/Messages/AskForAuthentication.vue2.js +93 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue.js +7 -0
- package/dist/views/Chat/Messages/ExecuteRequestTool.vue2.js +23 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue.js +7 -0
- package/dist/views/Chat/Messages/GetMiniOpenAPIDocTool.vue2.js +56 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts +2 -2
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue.js +26 -0
- package/dist/views/Chat/Messages/GetOpenAPISpecsSummary.vue2.js +4 -0
- package/dist/views/Chat/Messages/Text.vue.d.ts.map +1 -1
- package/dist/views/Chat/Messages/Text.vue.js +16 -0
- package/dist/views/Chat/Messages/Text.vue2.js +4 -0
- package/dist/views/Layout.vue.d.ts.map +1 -1
- package/dist/views/Layout.vue.js +7 -0
- package/dist/views/Layout.vue2.js +23 -0
- package/dist/views/PromptForm.vue.d.ts.map +1 -1
- package/dist/views/PromptForm.vue.js +7 -0
- package/dist/views/PromptForm.vue2.js +212 -0
- package/dist/views/Settings/Auth.vue.d.ts.map +1 -1
- package/dist/views/Settings/Auth.vue.js +67 -0
- package/dist/views/Settings/Auth.vue2.js +4 -0
- package/dist/views/Settings/DocSettings.vue.d.ts.map +1 -1
- package/dist/views/Settings/DocSettings.vue.js +7 -0
- package/dist/views/Settings/DocSettings.vue2.js +48 -0
- package/dist/views/Settings/Settings.vue.d.ts.map +1 -1
- package/dist/views/Settings/Settings.vue.js +8 -0
- package/dist/views/Settings/Settings.vue2.js +67 -0
- package/dist/views/Start.vue.d.ts.map +1 -1
- package/dist/views/Start.vue.js +7 -0
- package/dist/views/Start.vue2.js +41 -0
- package/package.json +52 -7
- package/dist/Tooltip-Cm82QgNj.js +0 -575
- package/dist/__vite-optional-peer-dep_stream-markdown_markstream-vue_false-sdjmOmXd.js +0 -5
- package/dist/__vite-optional-peer-dep_stream-monaco_markstream-vue_false-HdL4xm5U.js +0 -5
- package/dist/__vite-optional-peer-dep_vue-i18n_markstream-vue_false-B9Pwe5kz.js +0 -5
- package/dist/_basePickBy-hHD8tMGb.js +0 -151
- package/dist/_baseUniq-DTF1wuF6.js +0 -614
- package/dist/arc-Dw2RQerU.js +0 -83
- package/dist/architecture-U656AL7Q-B00Z9eXr.js +0 -36
- package/dist/architectureDiagram-VXUJARFQ-BtOffFaM.js +0 -4662
- package/dist/blockDiagram-VD42YOAC-BUqFMMQe.js +0 -2261
- package/dist/c4Diagram-YG6GDRKO-NrM1YcpG.js +0 -1579
- package/dist/channel-105myCGU.js +0 -5
- package/dist/chunk-4BX2VUAB-TAxJli7C.js +0 -8
- package/dist/chunk-55IACEB6-VXFJ4bz5.js +0 -8
- package/dist/chunk-B4BG7PRW-CZDQpfj5.js +0 -1375
- package/dist/chunk-DI55MBZ5-D3l7TA-E.js +0 -1370
- package/dist/chunk-FMBD7UC4-BMXFm8I3.js +0 -19
- package/dist/chunk-QN33PNHL-BOUpbpWp.js +0 -19
- package/dist/chunk-QZHKN3VN-C-TEEx05.js +0 -15
- package/dist/chunk-TZMSLE5B-BUiROKNR.js +0 -64
- package/dist/classDiagram-2ON5EDUG-HQET4ybK.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-HQET4ybK.js +0 -16
- package/dist/clone-CIIO71O9.js +0 -8
- package/dist/components/Endpoint.vue.d.ts.map +0 -1
- package/dist/cose-bilkent-S5V4N54A-CMsF4n-5.js +0 -2609
- package/dist/cytoscape.esm-DfdJODL8.js +0 -18735
- package/dist/dagre-6UL2VRFP-DqzdQ6Qg.js +0 -444
- package/dist/defaultLocale-BEa-49Qz.js +0 -171
- package/dist/diagram-PSM6KHXK-1xyGntw2.js +0 -531
- package/dist/diagram-QEK2KX5R-DdZdlAm1.js +0 -217
- package/dist/diagram-S2PKOQOG-C80Eo2jp.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-DFVRrMXT.js +0 -841
- package/dist/flowDiagram-NV44I4VS-D9QK_qqB.js +0 -1620
- package/dist/ganttDiagram-LVOFAZNH-Bo1NTkeQ.js +0 -2506
- package/dist/gitGraph-F6HP7TQM-C5hdgcgO.js +0 -27
- package/dist/gitGraphDiagram-NY62KEGX-BZqnqZh6.js +0 -699
- package/dist/graph-Dth4IhEK.js +0 -247
- package/dist/hooks/useChatApprovals.d.ts.map +0 -1
- package/dist/hooks/useChatOperationBlocks.d.ts +0 -3
- package/dist/hooks/useChatOperationBlocks.d.ts.map +0 -1
- package/dist/hooks/useChatScroll.d.ts.map +0 -1
- package/dist/hooks/useSearch.d.ts.map +0 -1
- package/dist/index-BOvT43H8.js +0 -111780
- package/dist/index2-B36B-gt0.js +0 -69
- package/dist/index3-CtIyYUnG.js +0 -70
- package/dist/index4-Dzz91Ao2.js +0 -537
- package/dist/index5-Bmz0gMSP.js +0 -590
- package/dist/index6-DMB3qTSV.js +0 -196
- package/dist/info-NVLQJR56-azt5obk5.js +0 -27
- package/dist/infoDiagram-ER5ION4S-DD4Jtctm.js +0 -24
- package/dist/infographic_markstream-vue_false-BfsmcXxk.js +0 -5
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-CXL6UO0r.js +0 -834
- package/dist/kanban-definition-3W4ZIXB7-B57do5Wg.js +0 -719
- package/dist/katex-SsTUIUTC.js +0 -11688
- package/dist/layout-7TCY8eA2.js +0 -1332
- package/dist/linear-DSm5i91N.js +0 -625
- package/dist/mermaid-parser.core-CUQWpAMM.js +0 -12746
- package/dist/mermaid.core-QjuzH7xx.js +0 -14164
- package/dist/mhchem-XHl7cef5.js +0 -2306
- package/dist/mindmap-definition-VGOIOE7T-DAQyGNAM.js +0 -784
- package/dist/ordinal-DfAQgscy.js +0 -61
- package/dist/packet-BFZMPI3H-CixuxAEA.js +0 -27
- package/dist/pie-7BOR55EZ-D3cgnzR1.js +0 -32
- package/dist/pieDiagram-ADFJNKIX-BqxgYwrL.js +0 -161
- package/dist/quadrantDiagram-AYHSOK5B-CQ4v-9Hh.js +0 -1022
- package/dist/radar-NHE76QYJ-DhV0Od_M.js +0 -27
- package/dist/requirementDiagram-UZGBJVZJ-ncWNAgFi.js +0 -850
- package/dist/safeRaf-I3a3-dyJ.js +0 -10
- package/dist/sankeyDiagram-TZEHDZUN-yCR2_cH5.js +0 -810
- package/dist/sequenceDiagram-WL72ISMW-DZ7wqFyd.js +0 -2511
- package/dist/stateDiagram-FKZM4ZOC-Dra68Tzi.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CARbPECD.js +0 -16
- package/dist/timeline-definition-IT6M3QCI-DEbG9QIM.js +0 -795
- package/dist/treemap-KMMF4GRG-CQbPsyWe.js +0 -81
- package/dist/xychartDiagram-PRI3JC2R-C94Pu8hL.js +0 -1340
package/dist/Tooltip-Cm82QgNj.js
DELETED
|
@@ -1,575 +0,0 @@
|
|
|
1
|
-
import { defineComponent as Zt, computed as te, ref as xt, createBlock as ee, watch as St, onBeforeUnmount as ne, openBlock as oe, Teleport as re, createElementVNode as At, createVNode as ie, Transition as le, withCtx as ce, withDirectives as se, normalizeClass as ae, normalizeStyle as fe, toDisplayString as ue, vShow as de, nextTick as lt } from "vue";
|
|
2
|
-
import { J as pe } from "./index-BOvT43H8.js";
|
|
3
|
-
var he = Object.defineProperty, me = Object.defineProperties, ye = Object.getOwnPropertyDescriptors, at = Object.getOwnPropertySymbols, Nt = Object.prototype.hasOwnProperty, zt = Object.prototype.propertyIsEnumerable, kt = (t, e, n) => e in t ? he(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, H = (t, e) => {
|
|
4
|
-
for (var n in e || (e = {})) Nt.call(e, n) && kt(t, n, e[n]);
|
|
5
|
-
if (at) for (var n of at(e)) zt.call(e, n) && kt(t, n, e[n]);
|
|
6
|
-
return t;
|
|
7
|
-
}, K = (t, e) => me(t, ye(e)), jt = (t, e) => {
|
|
8
|
-
var n = {};
|
|
9
|
-
for (var o in t) Nt.call(t, o) && e.indexOf(o) < 0 && (n[o] = t[o]);
|
|
10
|
-
if (t != null && at) for (var o of at(t)) e.indexOf(o) < 0 && zt.call(t, o) && (n[o] = t[o]);
|
|
11
|
-
return n;
|
|
12
|
-
}, $ = (t, e, n) => new Promise((o, r) => {
|
|
13
|
-
var i = (c) => {
|
|
14
|
-
try {
|
|
15
|
-
l(n.next(c));
|
|
16
|
-
} catch (a) {
|
|
17
|
-
r(a);
|
|
18
|
-
}
|
|
19
|
-
}, s = (c) => {
|
|
20
|
-
try {
|
|
21
|
-
l(n.throw(c));
|
|
22
|
-
} catch (a) {
|
|
23
|
-
r(a);
|
|
24
|
-
}
|
|
25
|
-
}, l = (c) => c.done ? o(c.value) : Promise.resolve(c.value).then(i, s);
|
|
26
|
-
l((n = n.apply(t, e)).next());
|
|
27
|
-
});
|
|
28
|
-
const ft = Math.min, Q = Math.max, ut = Math.round, ct = Math.floor, X = (t) => ({ x: t, y: t }), ge = { left: "right", right: "left", bottom: "top", top: "bottom" }, ve = { start: "end", end: "start" };
|
|
29
|
-
function Ot(t, e, n) {
|
|
30
|
-
return Q(t, ft(e, n));
|
|
31
|
-
}
|
|
32
|
-
function yt(t, e) {
|
|
33
|
-
return typeof t == "function" ? t(e) : t;
|
|
34
|
-
}
|
|
35
|
-
function U(t) {
|
|
36
|
-
return t.split("-")[0];
|
|
37
|
-
}
|
|
38
|
-
function dt(t) {
|
|
39
|
-
return t.split("-")[1];
|
|
40
|
-
}
|
|
41
|
-
function _t(t) {
|
|
42
|
-
return t === "x" ? "y" : "x";
|
|
43
|
-
}
|
|
44
|
-
function $t(t) {
|
|
45
|
-
return t === "y" ? "height" : "width";
|
|
46
|
-
}
|
|
47
|
-
const xe = /* @__PURE__ */ new Set(["top", "bottom"]);
|
|
48
|
-
function q(t) {
|
|
49
|
-
return xe.has(U(t)) ? "y" : "x";
|
|
50
|
-
}
|
|
51
|
-
function Xt(t) {
|
|
52
|
-
return _t(q(t));
|
|
53
|
-
}
|
|
54
|
-
function wt(t) {
|
|
55
|
-
return t.replace(/start|end/g, (e) => ve[e]);
|
|
56
|
-
}
|
|
57
|
-
const Dt = ["left", "right"], Ct = ["right", "left"], we = ["top", "bottom"], be = ["bottom", "top"];
|
|
58
|
-
function st(t) {
|
|
59
|
-
return t.replace(/left|right|bottom|top/g, (e) => ge[e]);
|
|
60
|
-
}
|
|
61
|
-
function pt(t) {
|
|
62
|
-
const { x: e, y: n, width: o, height: r } = t;
|
|
63
|
-
return { width: o, height: r, top: n, left: e, right: e + o, bottom: n + r, x: e, y: n };
|
|
64
|
-
}
|
|
65
|
-
function Pt(t, e, n) {
|
|
66
|
-
let { reference: o, floating: r } = t;
|
|
67
|
-
const i = q(e), s = Xt(e), l = $t(s), c = U(e), a = i === "y", p = o.x + o.width / 2 - r.width / 2, h = o.y + o.height / 2 - r.height / 2, y = o[l] / 2 - r[l] / 2;
|
|
68
|
-
let d;
|
|
69
|
-
switch (c) {
|
|
70
|
-
case "top":
|
|
71
|
-
d = { x: p, y: o.y - r.height };
|
|
72
|
-
break;
|
|
73
|
-
case "bottom":
|
|
74
|
-
d = { x: p, y: o.y + o.height };
|
|
75
|
-
break;
|
|
76
|
-
case "right":
|
|
77
|
-
d = { x: o.x + o.width, y: h };
|
|
78
|
-
break;
|
|
79
|
-
case "left":
|
|
80
|
-
d = { x: o.x - r.width, y: h };
|
|
81
|
-
break;
|
|
82
|
-
default:
|
|
83
|
-
d = { x: o.x, y: o.y };
|
|
84
|
-
}
|
|
85
|
-
switch (dt(e)) {
|
|
86
|
-
case "start":
|
|
87
|
-
d[s] -= y * (n && a ? -1 : 1);
|
|
88
|
-
break;
|
|
89
|
-
case "end":
|
|
90
|
-
d[s] += y * (n && a ? -1 : 1);
|
|
91
|
-
}
|
|
92
|
-
return d;
|
|
93
|
-
}
|
|
94
|
-
function Yt(t, e) {
|
|
95
|
-
return $(this, null, function* () {
|
|
96
|
-
var n;
|
|
97
|
-
e === void 0 && (e = {});
|
|
98
|
-
const { x: o, y: r, platform: i, rects: s, elements: l, strategy: c } = t, { boundary: a = "clippingAncestors", rootBoundary: p = "viewport", elementContext: h = "floating", altBoundary: y = !1, padding: d = 0 } = yt(e, t), f = (function(S) {
|
|
99
|
-
return typeof S != "number" ? (function(k) {
|
|
100
|
-
return H({ top: 0, right: 0, bottom: 0, left: 0 }, k);
|
|
101
|
-
})(S) : { top: S, right: S, bottom: S, left: S };
|
|
102
|
-
})(d), m = l[y ? h === "floating" ? "reference" : "floating" : h], u = pt(yield i.getClippingRect({ element: (n = yield i.isElement == null ? void 0 : i.isElement(m)) == null || n ? m : m.contextElement || (yield i.getDocumentElement == null ? void 0 : i.getDocumentElement(l.floating)), boundary: a, rootBoundary: p, strategy: c })), g = h === "floating" ? { x: o, y: r, width: s.floating.width, height: s.floating.height } : s.reference, R = yield i.getOffsetParent == null ? void 0 : i.getOffsetParent(l.floating), E = (yield i.isElement == null ? void 0 : i.isElement(R)) && (yield i.getScale == null ? void 0 : i.getScale(R)) || { x: 1, y: 1 }, A = pt(i.convertOffsetParentRelativeRectToViewportRelativeRect ? yield i.convertOffsetParentRelativeRectToViewportRelativeRect({ elements: l, rect: g, offsetParent: R, strategy: c }) : g);
|
|
103
|
-
return { top: (u.top - A.top + f.top) / E.y, bottom: (A.bottom - u.bottom + f.bottom) / E.y, left: (u.left - A.left + f.left) / E.x, right: (A.right - u.right + f.right) / E.x };
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
const Re = /* @__PURE__ */ new Set(["left", "top"]);
|
|
107
|
-
function gt() {
|
|
108
|
-
return typeof window < "u";
|
|
109
|
-
}
|
|
110
|
-
function nt(t) {
|
|
111
|
-
return It(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
112
|
-
}
|
|
113
|
-
function B(t) {
|
|
114
|
-
var e;
|
|
115
|
-
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
116
|
-
}
|
|
117
|
-
function Y(t) {
|
|
118
|
-
var e;
|
|
119
|
-
return (e = (It(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
120
|
-
}
|
|
121
|
-
function It(t) {
|
|
122
|
-
return !!gt() && (t instanceof Node || t instanceof B(t).Node);
|
|
123
|
-
}
|
|
124
|
-
function N(t) {
|
|
125
|
-
return !!gt() && (t instanceof Element || t instanceof B(t).Element);
|
|
126
|
-
}
|
|
127
|
-
function I(t) {
|
|
128
|
-
return !!gt() && (t instanceof HTMLElement || t instanceof B(t).HTMLElement);
|
|
129
|
-
}
|
|
130
|
-
function Mt(t) {
|
|
131
|
-
return !(!gt() || typeof ShadowRoot > "u") && (t instanceof ShadowRoot || t instanceof B(t).ShadowRoot);
|
|
132
|
-
}
|
|
133
|
-
const Ee = /* @__PURE__ */ new Set(["inline", "contents"]);
|
|
134
|
-
function ot(t) {
|
|
135
|
-
const { overflow: e, overflowX: n, overflowY: o, display: r } = z(t);
|
|
136
|
-
return /auto|scroll|overlay|hidden|clip/.test(e + o + n) && !Ee.has(r);
|
|
137
|
-
}
|
|
138
|
-
const Te = /* @__PURE__ */ new Set(["table", "td", "th"]);
|
|
139
|
-
function Le(t) {
|
|
140
|
-
return Te.has(nt(t));
|
|
141
|
-
}
|
|
142
|
-
const Se = [":popover-open", ":modal"];
|
|
143
|
-
function ht(t) {
|
|
144
|
-
return Se.some((e) => {
|
|
145
|
-
try {
|
|
146
|
-
return t.matches(e);
|
|
147
|
-
} catch {
|
|
148
|
-
return !1;
|
|
149
|
-
}
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
const Ae = ["transform", "translate", "scale", "rotate", "perspective"], ke = ["transform", "translate", "scale", "rotate", "perspective", "filter"], Oe = ["paint", "layout", "strict", "content"];
|
|
153
|
-
function Rt(t) {
|
|
154
|
-
const e = Tt(), n = N(t) ? z(t) : t;
|
|
155
|
-
return Ae.some((o) => !!n[o] && n[o] !== "none") || !!n.containerType && n.containerType !== "normal" || !e && !!n.backdropFilter && n.backdropFilter !== "none" || !e && !!n.filter && n.filter !== "none" || ke.some((o) => (n.willChange || "").includes(o)) || Oe.some((o) => (n.contain || "").includes(o));
|
|
156
|
-
}
|
|
157
|
-
function Tt() {
|
|
158
|
-
return !(typeof CSS > "u" || !CSS.supports) && CSS.supports("-webkit-backdrop-filter", "none");
|
|
159
|
-
}
|
|
160
|
-
const De = /* @__PURE__ */ new Set(["html", "body", "#document"]);
|
|
161
|
-
function tt(t) {
|
|
162
|
-
return De.has(nt(t));
|
|
163
|
-
}
|
|
164
|
-
function z(t) {
|
|
165
|
-
return B(t).getComputedStyle(t);
|
|
166
|
-
}
|
|
167
|
-
function vt(t) {
|
|
168
|
-
return N(t) ? { scrollLeft: t.scrollLeft, scrollTop: t.scrollTop } : { scrollLeft: t.scrollX, scrollTop: t.scrollY };
|
|
169
|
-
}
|
|
170
|
-
function J(t) {
|
|
171
|
-
if (nt(t) === "html") return t;
|
|
172
|
-
const e = t.assignedSlot || t.parentNode || Mt(t) && t.host || Y(t);
|
|
173
|
-
return Mt(e) ? e.host : e;
|
|
174
|
-
}
|
|
175
|
-
function qt(t) {
|
|
176
|
-
const e = J(t);
|
|
177
|
-
return tt(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : I(e) && ot(e) ? e : qt(e);
|
|
178
|
-
}
|
|
179
|
-
function rt(t, e, n) {
|
|
180
|
-
var o;
|
|
181
|
-
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
182
|
-
const r = qt(t), i = r === ((o = t.ownerDocument) == null ? void 0 : o.body), s = B(r);
|
|
183
|
-
if (i) {
|
|
184
|
-
const l = Et(s);
|
|
185
|
-
return e.concat(s, s.visualViewport || [], ot(r) ? r : [], l && n ? rt(l) : []);
|
|
186
|
-
}
|
|
187
|
-
return e.concat(r, rt(r, [], n));
|
|
188
|
-
}
|
|
189
|
-
function Et(t) {
|
|
190
|
-
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
191
|
-
}
|
|
192
|
-
function Jt(t) {
|
|
193
|
-
const e = z(t);
|
|
194
|
-
let n = parseFloat(e.width) || 0, o = parseFloat(e.height) || 0;
|
|
195
|
-
const r = I(t), i = r ? t.offsetWidth : n, s = r ? t.offsetHeight : o, l = ut(n) !== i || ut(o) !== s;
|
|
196
|
-
return l && (n = i, o = s), { width: n, height: o, $: l };
|
|
197
|
-
}
|
|
198
|
-
function Lt(t) {
|
|
199
|
-
return N(t) ? t : t.contextElement;
|
|
200
|
-
}
|
|
201
|
-
function et(t) {
|
|
202
|
-
const e = Lt(t);
|
|
203
|
-
if (!I(e)) return X(1);
|
|
204
|
-
const n = e.getBoundingClientRect(), { width: o, height: r, $: i } = Jt(e);
|
|
205
|
-
let s = (i ? ut(n.width) : n.width) / o, l = (i ? ut(n.height) : n.height) / r;
|
|
206
|
-
return s && Number.isFinite(s) || (s = 1), l && Number.isFinite(l) || (l = 1), { x: s, y: l };
|
|
207
|
-
}
|
|
208
|
-
const Ce = /* @__PURE__ */ X(0);
|
|
209
|
-
function Gt(t) {
|
|
210
|
-
const e = B(t);
|
|
211
|
-
return Tt() && e.visualViewport ? { x: e.visualViewport.offsetLeft, y: e.visualViewport.offsetTop } : Ce;
|
|
212
|
-
}
|
|
213
|
-
function Z(t, e, n, o) {
|
|
214
|
-
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
215
|
-
const r = t.getBoundingClientRect(), i = Lt(t);
|
|
216
|
-
let s = X(1);
|
|
217
|
-
e && (o ? N(o) && (s = et(o)) : s = et(t));
|
|
218
|
-
const l = (function(y, d, f) {
|
|
219
|
-
return d === void 0 && (d = !1), !(!f || d && f !== B(y)) && d;
|
|
220
|
-
})(i, n, o) ? Gt(i) : X(0);
|
|
221
|
-
let c = (r.left + l.x) / s.x, a = (r.top + l.y) / s.y, p = r.width / s.x, h = r.height / s.y;
|
|
222
|
-
if (i) {
|
|
223
|
-
const y = B(i), d = o && N(o) ? B(o) : o;
|
|
224
|
-
let f = y, m = Et(f);
|
|
225
|
-
for (; m && o && d !== f; ) {
|
|
226
|
-
const u = et(m), g = m.getBoundingClientRect(), R = z(m), E = g.left + (m.clientLeft + parseFloat(R.paddingLeft)) * u.x, A = g.top + (m.clientTop + parseFloat(R.paddingTop)) * u.y;
|
|
227
|
-
c *= u.x, a *= u.y, p *= u.x, h *= u.y, c += E, a += A, f = B(m), m = Et(f);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
return pt({ width: p, height: h, x: c, y: a });
|
|
231
|
-
}
|
|
232
|
-
function mt(t, e) {
|
|
233
|
-
const n = vt(t).scrollLeft;
|
|
234
|
-
return e ? e.left + n : Z(Y(t)).left + n;
|
|
235
|
-
}
|
|
236
|
-
function Kt(t, e) {
|
|
237
|
-
const n = t.getBoundingClientRect();
|
|
238
|
-
return { x: n.left + e.scrollLeft - mt(t, n), y: n.top + e.scrollTop };
|
|
239
|
-
}
|
|
240
|
-
const Pe = /* @__PURE__ */ new Set(["absolute", "fixed"]);
|
|
241
|
-
function Bt(t, e, n) {
|
|
242
|
-
let o;
|
|
243
|
-
if (e === "viewport") o = (function(r, i) {
|
|
244
|
-
const s = B(r), l = Y(r), c = s.visualViewport;
|
|
245
|
-
let a = l.clientWidth, p = l.clientHeight, h = 0, y = 0;
|
|
246
|
-
if (c) {
|
|
247
|
-
a = c.width, p = c.height;
|
|
248
|
-
const f = Tt();
|
|
249
|
-
(!f || f && i === "fixed") && (h = c.offsetLeft, y = c.offsetTop);
|
|
250
|
-
}
|
|
251
|
-
const d = mt(l);
|
|
252
|
-
if (d <= 0) {
|
|
253
|
-
const f = l.ownerDocument, m = f.body, u = getComputedStyle(m), g = f.compatMode === "CSS1Compat" && parseFloat(u.marginLeft) + parseFloat(u.marginRight) || 0, R = Math.abs(l.clientWidth - m.clientWidth - g);
|
|
254
|
-
R <= 25 && (a -= R);
|
|
255
|
-
} else d <= 25 && (a += d);
|
|
256
|
-
return { width: a, height: p, x: h, y };
|
|
257
|
-
})(t, n);
|
|
258
|
-
else if (e === "document") o = (function(r) {
|
|
259
|
-
const i = Y(r), s = vt(r), l = r.ownerDocument.body, c = Q(i.scrollWidth, i.clientWidth, l.scrollWidth, l.clientWidth), a = Q(i.scrollHeight, i.clientHeight, l.scrollHeight, l.clientHeight);
|
|
260
|
-
let p = -s.scrollLeft + mt(r);
|
|
261
|
-
const h = -s.scrollTop;
|
|
262
|
-
return z(l).direction === "rtl" && (p += Q(i.clientWidth, l.clientWidth) - c), { width: c, height: a, x: p, y: h };
|
|
263
|
-
})(Y(t));
|
|
264
|
-
else if (N(e)) o = (function(r, i) {
|
|
265
|
-
const s = Z(r, !0, i === "fixed"), l = s.top + r.clientTop, c = s.left + r.clientLeft, a = I(r) ? et(r) : X(1);
|
|
266
|
-
return { width: r.clientWidth * a.x, height: r.clientHeight * a.y, x: c * a.x, y: l * a.y };
|
|
267
|
-
})(e, n);
|
|
268
|
-
else {
|
|
269
|
-
const r = Gt(t);
|
|
270
|
-
o = { x: e.x - r.x, y: e.y - r.y, width: e.width, height: e.height };
|
|
271
|
-
}
|
|
272
|
-
return pt(o);
|
|
273
|
-
}
|
|
274
|
-
function Qt(t, e) {
|
|
275
|
-
const n = J(t);
|
|
276
|
-
return !(n === e || !N(n) || tt(n)) && (z(n).position === "fixed" || Qt(n, e));
|
|
277
|
-
}
|
|
278
|
-
function Me(t, e, n) {
|
|
279
|
-
const o = I(e), r = Y(e), i = n === "fixed", s = Z(t, !0, i, e);
|
|
280
|
-
let l = { scrollLeft: 0, scrollTop: 0 };
|
|
281
|
-
const c = X(0);
|
|
282
|
-
function a() {
|
|
283
|
-
c.x = mt(r);
|
|
284
|
-
}
|
|
285
|
-
if (o || !o && !i) if ((nt(e) !== "body" || ot(r)) && (l = vt(e)), o) {
|
|
286
|
-
const h = Z(e, !0, i, e);
|
|
287
|
-
c.x = h.x + e.clientLeft, c.y = h.y + e.clientTop;
|
|
288
|
-
} else r && a();
|
|
289
|
-
i && !o && r && a();
|
|
290
|
-
const p = !r || o || i ? X(0) : Kt(r, l);
|
|
291
|
-
return { x: s.left + l.scrollLeft - c.x - p.x, y: s.top + l.scrollTop - c.y - p.y, width: s.width, height: s.height };
|
|
292
|
-
}
|
|
293
|
-
function bt(t) {
|
|
294
|
-
return z(t).position === "static";
|
|
295
|
-
}
|
|
296
|
-
function Ft(t, e) {
|
|
297
|
-
if (!I(t) || z(t).position === "fixed") return null;
|
|
298
|
-
if (e) return e(t);
|
|
299
|
-
let n = t.offsetParent;
|
|
300
|
-
return Y(t) === n && (n = n.ownerDocument.body), n;
|
|
301
|
-
}
|
|
302
|
-
function Wt(t, e) {
|
|
303
|
-
const n = B(t);
|
|
304
|
-
if (ht(t)) return n;
|
|
305
|
-
if (!I(t)) {
|
|
306
|
-
let r = J(t);
|
|
307
|
-
for (; r && !tt(r); ) {
|
|
308
|
-
if (N(r) && !bt(r)) return r;
|
|
309
|
-
r = J(r);
|
|
310
|
-
}
|
|
311
|
-
return n;
|
|
312
|
-
}
|
|
313
|
-
let o = Ft(t, e);
|
|
314
|
-
for (; o && Le(o) && bt(o); ) o = Ft(o, e);
|
|
315
|
-
return o && tt(o) && bt(o) && !Rt(o) ? n : o || (function(r) {
|
|
316
|
-
let i = J(r);
|
|
317
|
-
for (; I(i) && !tt(i); ) {
|
|
318
|
-
if (Rt(i)) return i;
|
|
319
|
-
if (ht(i)) return null;
|
|
320
|
-
i = J(i);
|
|
321
|
-
}
|
|
322
|
-
return null;
|
|
323
|
-
})(t) || n;
|
|
324
|
-
}
|
|
325
|
-
const Be = { convertOffsetParentRelativeRectToViewportRelativeRect: function(t) {
|
|
326
|
-
let { elements: e, rect: n, offsetParent: o, strategy: r } = t;
|
|
327
|
-
const i = r === "fixed", s = Y(o), l = !!e && ht(e.floating);
|
|
328
|
-
if (o === s || l && i) return n;
|
|
329
|
-
let c = { scrollLeft: 0, scrollTop: 0 }, a = X(1);
|
|
330
|
-
const p = X(0), h = I(o);
|
|
331
|
-
if ((h || !h && !i) && ((nt(o) !== "body" || ot(s)) && (c = vt(o)), I(o))) {
|
|
332
|
-
const d = Z(o);
|
|
333
|
-
a = et(o), p.x = d.x + o.clientLeft, p.y = d.y + o.clientTop;
|
|
334
|
-
}
|
|
335
|
-
const y = !s || h || i ? X(0) : Kt(s, c);
|
|
336
|
-
return { width: n.width * a.x, height: n.height * a.y, x: n.x * a.x - c.scrollLeft * a.x + p.x + y.x, y: n.y * a.y - c.scrollTop * a.y + p.y + y.y };
|
|
337
|
-
}, getDocumentElement: Y, getClippingRect: function(t) {
|
|
338
|
-
let { element: e, boundary: n, rootBoundary: o, strategy: r } = t;
|
|
339
|
-
const i = [...n === "clippingAncestors" ? ht(e) ? [] : (function(c, a) {
|
|
340
|
-
const p = a.get(c);
|
|
341
|
-
if (p) return p;
|
|
342
|
-
let h = rt(c, [], !1).filter((m) => N(m) && nt(m) !== "body"), y = null;
|
|
343
|
-
const d = z(c).position === "fixed";
|
|
344
|
-
let f = d ? J(c) : c;
|
|
345
|
-
for (; N(f) && !tt(f); ) {
|
|
346
|
-
const m = z(f), u = Rt(f);
|
|
347
|
-
u || m.position !== "fixed" || (y = null), (d ? !u && !y : !u && m.position === "static" && y && Pe.has(y.position) || ot(f) && !u && Qt(c, f)) ? h = h.filter((g) => g !== f) : y = m, f = J(f);
|
|
348
|
-
}
|
|
349
|
-
return a.set(c, h), h;
|
|
350
|
-
})(e, this._c) : [].concat(n), o], s = i[0], l = i.reduce((c, a) => {
|
|
351
|
-
const p = Bt(e, a, r);
|
|
352
|
-
return c.top = Q(p.top, c.top), c.right = ft(p.right, c.right), c.bottom = ft(p.bottom, c.bottom), c.left = Q(p.left, c.left), c;
|
|
353
|
-
}, Bt(e, s, r));
|
|
354
|
-
return { width: l.right - l.left, height: l.bottom - l.top, x: l.left, y: l.top };
|
|
355
|
-
}, getOffsetParent: Wt, getElementRects: function(t) {
|
|
356
|
-
return $(this, null, function* () {
|
|
357
|
-
const e = this.getOffsetParent || Wt, n = this.getDimensions, o = yield n(t.floating);
|
|
358
|
-
return { reference: Me(t.reference, yield e(t.floating), t.strategy), floating: { x: 0, y: 0, width: o.width, height: o.height } };
|
|
359
|
-
});
|
|
360
|
-
}, getClientRects: function(t) {
|
|
361
|
-
return Array.from(t.getClientRects());
|
|
362
|
-
}, getDimensions: function(t) {
|
|
363
|
-
const { width: e, height: n } = Jt(t);
|
|
364
|
-
return { width: e, height: n };
|
|
365
|
-
}, getScale: et, isElement: N, isRTL: function(t) {
|
|
366
|
-
return z(t).direction === "rtl";
|
|
367
|
-
} };
|
|
368
|
-
function Vt(t, e) {
|
|
369
|
-
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
370
|
-
}
|
|
371
|
-
function Ht(t, e, n, o) {
|
|
372
|
-
o === void 0 && (o = {});
|
|
373
|
-
const { ancestorScroll: r = !0, ancestorResize: i = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: l = typeof IntersectionObserver == "function", animationFrame: c = !1 } = o, a = Lt(t), p = r || i ? [...a ? rt(a) : [], ...rt(e)] : [];
|
|
374
|
-
p.forEach((u) => {
|
|
375
|
-
r && u.addEventListener("scroll", n, { passive: !0 }), i && u.addEventListener("resize", n);
|
|
376
|
-
});
|
|
377
|
-
const h = a && l ? (function(u, g) {
|
|
378
|
-
let R, E = null;
|
|
379
|
-
const A = Y(u);
|
|
380
|
-
function S() {
|
|
381
|
-
var k;
|
|
382
|
-
clearTimeout(R), (k = E) == null || k.disconnect(), E = null;
|
|
383
|
-
}
|
|
384
|
-
return (function k(F, O) {
|
|
385
|
-
F === void 0 && (F = !1), O === void 0 && (O = 1), S();
|
|
386
|
-
const W = u.getBoundingClientRect(), { left: D, top: C, width: j, height: M } = W;
|
|
387
|
-
if (F || g(), !j || !M) return;
|
|
388
|
-
const P = { rootMargin: -ct(C) + "px " + -ct(A.clientWidth - (D + j)) + "px " + -ct(A.clientHeight - (C + M)) + "px " + -ct(D) + "px", threshold: Q(0, ft(1, O)) || 1 };
|
|
389
|
-
let x = !0;
|
|
390
|
-
function L(w) {
|
|
391
|
-
const v = w[0].intersectionRatio;
|
|
392
|
-
if (v !== O) {
|
|
393
|
-
if (!x) return k();
|
|
394
|
-
v ? k(!1, v) : R = setTimeout(() => {
|
|
395
|
-
k(!1, 1e-7);
|
|
396
|
-
}, 1e3);
|
|
397
|
-
}
|
|
398
|
-
v !== 1 || Vt(W, u.getBoundingClientRect()) || k(), x = !1;
|
|
399
|
-
}
|
|
400
|
-
try {
|
|
401
|
-
E = new IntersectionObserver(L, K(H({}, P), { root: A.ownerDocument }));
|
|
402
|
-
} catch {
|
|
403
|
-
E = new IntersectionObserver(L, P);
|
|
404
|
-
}
|
|
405
|
-
E.observe(u);
|
|
406
|
-
})(!0), S;
|
|
407
|
-
})(a, n) : null;
|
|
408
|
-
let y, d = -1, f = null;
|
|
409
|
-
s && (f = new ResizeObserver((u) => {
|
|
410
|
-
let [g] = u;
|
|
411
|
-
g && g.target === a && f && (f.unobserve(e), cancelAnimationFrame(d), d = requestAnimationFrame(() => {
|
|
412
|
-
var R;
|
|
413
|
-
(R = f) == null || R.observe(e);
|
|
414
|
-
})), n();
|
|
415
|
-
}), a && !c && f.observe(a), f.observe(e));
|
|
416
|
-
let m = c ? Z(t) : null;
|
|
417
|
-
return c && (function u() {
|
|
418
|
-
const g = Z(t);
|
|
419
|
-
m && !Vt(m, g) && n(), m = g, y = requestAnimationFrame(u);
|
|
420
|
-
})(), n(), () => {
|
|
421
|
-
var u;
|
|
422
|
-
p.forEach((g) => {
|
|
423
|
-
r && g.removeEventListener("scroll", n), i && g.removeEventListener("resize", n);
|
|
424
|
-
}), h?.(), (u = f) == null || u.disconnect(), f = null, c && cancelAnimationFrame(y);
|
|
425
|
-
};
|
|
426
|
-
}
|
|
427
|
-
const Fe = function(t) {
|
|
428
|
-
return t === void 0 && (t = {}), { name: "shift", options: t, fn(e) {
|
|
429
|
-
return $(this, null, function* () {
|
|
430
|
-
const { x: n, y: o, placement: r } = e, i = yt(t, e), { mainAxis: s = !0, crossAxis: l = !1, limiter: c = { fn: (g) => {
|
|
431
|
-
let { x: R, y: E } = g;
|
|
432
|
-
return { x: R, y: E };
|
|
433
|
-
} } } = i, a = jt(i, ["mainAxis", "crossAxis", "limiter"]), p = { x: n, y: o }, h = yield Yt(e, a), y = q(U(r)), d = _t(y);
|
|
434
|
-
let f = p[d], m = p[y];
|
|
435
|
-
if (s) {
|
|
436
|
-
const g = d === "y" ? "bottom" : "right";
|
|
437
|
-
f = Ot(f + h[d === "y" ? "top" : "left"], f, f - h[g]);
|
|
438
|
-
}
|
|
439
|
-
if (l) {
|
|
440
|
-
const g = y === "y" ? "bottom" : "right";
|
|
441
|
-
m = Ot(m + h[y === "y" ? "top" : "left"], m, m - h[g]);
|
|
442
|
-
}
|
|
443
|
-
const u = c.fn(K(H({}, e), { [d]: f, [y]: m }));
|
|
444
|
-
return K(H({}, u), { data: { x: u.x - n, y: u.y - o, enabled: { [d]: s, [y]: l } } });
|
|
445
|
-
});
|
|
446
|
-
} };
|
|
447
|
-
}, We = function(t) {
|
|
448
|
-
return t === void 0 && (t = {}), { name: "flip", options: t, fn(e) {
|
|
449
|
-
return $(this, null, function* () {
|
|
450
|
-
var n, o;
|
|
451
|
-
const { placement: r, middlewareData: i, rects: s, initialPlacement: l, platform: c, elements: a } = e, p = yt(t, e), { mainAxis: h = !0, crossAxis: y = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: m = "none", flipAlignment: u = !0 } = p, g = jt(p, ["mainAxis", "crossAxis", "fallbackPlacements", "fallbackStrategy", "fallbackAxisSideDirection", "flipAlignment"]);
|
|
452
|
-
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
453
|
-
const R = U(r), E = q(l), A = U(l) === l, S = yield c.isRTL == null ? void 0 : c.isRTL(a.floating), k = d || (A || !u ? [st(l)] : (function(x) {
|
|
454
|
-
const L = st(x);
|
|
455
|
-
return [wt(x), L, wt(L)];
|
|
456
|
-
})(l)), F = m !== "none";
|
|
457
|
-
!d && F && k.push(...(function(x, L, w, v) {
|
|
458
|
-
const T = dt(x);
|
|
459
|
-
let b = (function(_, V, it) {
|
|
460
|
-
switch (_) {
|
|
461
|
-
case "top":
|
|
462
|
-
case "bottom":
|
|
463
|
-
return it ? V ? Ct : Dt : V ? Dt : Ct;
|
|
464
|
-
case "left":
|
|
465
|
-
case "right":
|
|
466
|
-
return V ? we : be;
|
|
467
|
-
default:
|
|
468
|
-
return [];
|
|
469
|
-
}
|
|
470
|
-
})(U(x), w === "start", v);
|
|
471
|
-
return T && (b = b.map((_) => _ + "-" + T), L && (b = b.concat(b.map(wt)))), b;
|
|
472
|
-
})(l, u, m, S));
|
|
473
|
-
const O = [l, ...k], W = yield Yt(e, g), D = [];
|
|
474
|
-
let C = ((o = i.flip) == null ? void 0 : o.overflows) || [];
|
|
475
|
-
if (h && D.push(W[R]), y) {
|
|
476
|
-
const x = (function(L, w, v) {
|
|
477
|
-
v === void 0 && (v = !1);
|
|
478
|
-
const T = dt(L), b = Xt(L), _ = $t(b);
|
|
479
|
-
let V = b === "x" ? T === (v ? "end" : "start") ? "right" : "left" : T === "start" ? "bottom" : "top";
|
|
480
|
-
return w.reference[_] > w.floating[_] && (V = st(V)), [V, st(V)];
|
|
481
|
-
})(r, s, S);
|
|
482
|
-
D.push(W[x[0]], W[x[1]]);
|
|
483
|
-
}
|
|
484
|
-
if (C = [...C, { placement: r, overflows: D }], !D.every((x) => x <= 0)) {
|
|
485
|
-
var j, M;
|
|
486
|
-
const x = (((j = i.flip) == null ? void 0 : j.index) || 0) + 1, L = O[x];
|
|
487
|
-
if (L && (y !== "alignment" || E === q(L) || C.every((v) => q(v.placement) !== E || v.overflows[0] > 0))) return { data: { index: x, overflows: C }, reset: { placement: L } };
|
|
488
|
-
let w = (M = C.filter((v) => v.overflows[0] <= 0).sort((v, T) => v.overflows[1] - T.overflows[1])[0]) == null ? void 0 : M.placement;
|
|
489
|
-
if (!w) switch (f) {
|
|
490
|
-
case "bestFit": {
|
|
491
|
-
var P;
|
|
492
|
-
const v = (P = C.filter((T) => {
|
|
493
|
-
if (F) {
|
|
494
|
-
const b = q(T.placement);
|
|
495
|
-
return b === E || b === "y";
|
|
496
|
-
}
|
|
497
|
-
return !0;
|
|
498
|
-
}).map((T) => [T.placement, T.overflows.filter((b) => b > 0).reduce((b, _) => b + _, 0)]).sort((T, b) => T[1] - b[1])[0]) == null ? void 0 : P[0];
|
|
499
|
-
v && (w = v);
|
|
500
|
-
break;
|
|
501
|
-
}
|
|
502
|
-
case "initialPlacement":
|
|
503
|
-
w = l;
|
|
504
|
-
}
|
|
505
|
-
if (r !== w) return { reset: { placement: w } };
|
|
506
|
-
}
|
|
507
|
-
return {};
|
|
508
|
-
});
|
|
509
|
-
} };
|
|
510
|
-
}, Ve = { class: "markstream-vue" }, He = ["id"], je = /* @__PURE__ */ pe(/* @__PURE__ */ Zt({ __name: "Tooltip", props: { visible: { type: Boolean }, anchorEl: {}, content: {}, placement: {}, offset: {}, originX: {}, originY: {}, id: {}, isDark: { type: [Boolean, null] } }, setup(t) {
|
|
511
|
-
const e = t, n = te(() => {
|
|
512
|
-
if (e.isDark !== void 0 && e.isDark !== null) return !!e.isDark;
|
|
513
|
-
if (typeof document < "u") try {
|
|
514
|
-
if (document.documentElement.classList.contains("dark") || window?.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches) return !0;
|
|
515
|
-
} catch {
|
|
516
|
-
}
|
|
517
|
-
return !1;
|
|
518
|
-
}), o = xt(null), r = xt({ transform: "translate3d(0px, 0px, 0px)", left: "0px", top: "0px" }), i = xt(!1);
|
|
519
|
-
let s = null;
|
|
520
|
-
function l() {
|
|
521
|
-
return $(this, null, function* () {
|
|
522
|
-
var c, a;
|
|
523
|
-
if (!e.anchorEl || !o.value) return;
|
|
524
|
-
const p = [(d = (c = e.offset) != null ? c : 8, d === void 0 && (d = 0), { name: "offset", options: d, fn(f) {
|
|
525
|
-
return $(this, null, function* () {
|
|
526
|
-
var m, u;
|
|
527
|
-
const { x: g, y: R, placement: E, middlewareData: A } = f, S = yield (function(k, F) {
|
|
528
|
-
return $(this, null, function* () {
|
|
529
|
-
const { placement: O, platform: W, elements: D } = k, C = yield W.isRTL == null ? void 0 : W.isRTL(D.floating), j = U(O), M = dt(O), P = q(O) === "y", x = Re.has(j) ? -1 : 1, L = C && P ? -1 : 1, w = yt(F, k);
|
|
530
|
-
let { mainAxis: v, crossAxis: T, alignmentAxis: b } = typeof w == "number" ? { mainAxis: w, crossAxis: 0, alignmentAxis: null } : { mainAxis: w.mainAxis || 0, crossAxis: w.crossAxis || 0, alignmentAxis: w.alignmentAxis };
|
|
531
|
-
return M && typeof b == "number" && (T = M === "end" ? -1 * b : b), P ? { x: T * L, y: v * x } : { x: v * x, y: T * L };
|
|
532
|
-
});
|
|
533
|
-
})(f, d);
|
|
534
|
-
return E === ((m = A.offset) == null ? void 0 : m.placement) && (u = A.arrow) != null && u.alignmentOffset ? {} : { x: g + S.x, y: R + S.y, data: K(H({}, S), { placement: E }) };
|
|
535
|
-
});
|
|
536
|
-
} }), We(), Fe({ padding: 8 })], { x: h, y } = yield ((f, m, u) => {
|
|
537
|
-
const g = /* @__PURE__ */ new Map(), R = H({ platform: Be }, u), E = K(H({}, R.platform), { _c: g });
|
|
538
|
-
return ((A, S, k) => $(null, null, function* () {
|
|
539
|
-
const { placement: F = "bottom", strategy: O = "absolute", middleware: W = [], platform: D } = k, C = W.filter(Boolean), j = yield D.isRTL == null ? void 0 : D.isRTL(S);
|
|
540
|
-
let M = yield D.getElementRects({ reference: A, floating: S, strategy: O }), { x: P, y: x } = Pt(M, F, j), L = F, w = {}, v = 0;
|
|
541
|
-
for (let T = 0; T < C.length; T++) {
|
|
542
|
-
const { name: b, fn: _ } = C[T], { x: V, y: it, data: Ut, reset: G } = yield _({ x: P, y: x, initialPlacement: F, placement: L, strategy: O, middlewareData: w, rects: M, platform: D, elements: { reference: A, floating: S } });
|
|
543
|
-
P = V ?? P, x = it ?? x, w = K(H({}, w), { [b]: H(H({}, w[b]), Ut) }), G && v <= 50 && (v++, typeof G == "object" && (G.placement && (L = G.placement), G.rects && (M = G.rects === !0 ? yield D.getElementRects({ reference: A, floating: S, strategy: O }) : G.rects), { x: P, y: x } = Pt(M, L, j)), T = -1);
|
|
544
|
-
}
|
|
545
|
-
return { x: P, y: x, placement: L, strategy: O, middlewareData: w };
|
|
546
|
-
}))(f, m, K(H({}, R), { platform: E }));
|
|
547
|
-
})(e.anchorEl, o.value, { placement: (a = e.placement) != null ? a : "top", middleware: p, strategy: "fixed" });
|
|
548
|
-
var d;
|
|
549
|
-
r.value.transform = `translate3d(${Math.round(h)}px, ${Math.round(y)}px, 0)`, r.value.left = "0px", r.value.top = "0px";
|
|
550
|
-
});
|
|
551
|
-
}
|
|
552
|
-
return St(() => e.visible, (c) => $(null, null, function* () {
|
|
553
|
-
if (c) if (i.value = !1, yield lt(), e.anchorEl && o.value) try {
|
|
554
|
-
const a = e.anchorEl.getBoundingClientRect();
|
|
555
|
-
yield l();
|
|
556
|
-
const p = r.value.transform;
|
|
557
|
-
if (e.originX != null && e.originY != null) {
|
|
558
|
-
const h = Math.abs(Number(e.originX) - a.left), y = Math.abs(Number(e.originY) - a.top);
|
|
559
|
-
Math.hypot(h, y) > 120 ? (r.value.transform = `translate3d(${Math.round(e.originX)}px, ${Math.round(e.originY)}px, 0)`, yield lt(), i.value = !0, yield lt(), r.value.transform = p) : i.value = !0;
|
|
560
|
-
} else i.value = !0;
|
|
561
|
-
s = Ht(e.anchorEl, o.value, l);
|
|
562
|
-
} catch {
|
|
563
|
-
yield l(), i.value = !0, s = Ht(e.anchorEl, o.value, l);
|
|
564
|
-
}
|
|
565
|
-
else i.value = !0;
|
|
566
|
-
else i.value = !1, s && (s(), s = null);
|
|
567
|
-
})), St([() => e.anchorEl, () => e.placement, () => e.content], () => $(null, null, function* () {
|
|
568
|
-
e.visible && e.anchorEl && o.value && (yield lt(), yield l());
|
|
569
|
-
})), ne(() => {
|
|
570
|
-
s && s();
|
|
571
|
-
}), (c, a) => (oe(), ee(re, { to: "body" }, [At("div", Ve, [ie(le, { name: "tooltip", appear: "" }, { default: ce(() => [se(At("div", { id: e.id, ref_key: "tooltip", ref: o, style: fe({ position: "fixed", left: r.value.left, top: r.value.top, transform: r.value.transform }), class: ae(["z-[9999] inline-block text-base py-2 px-3 rounded-md shadow-md whitespace-nowrap pointer-events-none tooltip-element border", [n.value ? "bg-gray-900 text-white border-gray-700 border is-dark" : "bg-white text-gray-900 border-gray-200 border"]]), role: "tooltip" }, ue(t.content), 15, He), [[de, t.visible && i.value]])]), _: 1 })])]));
|
|
572
|
-
} }), [["__scopeId", "data-v-d524cc01"]]);
|
|
573
|
-
export {
|
|
574
|
-
je as default
|
|
575
|
-
};
|