@knime/scripting-editor 0.0.127 → 0.0.129
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/{AnyOfTwinlist-C0gjxeQW-C5wsbDLK.js → AnyOfTwinlist-Chx0nmt3-DPMbiVZd.js} +5 -4
- package/dist/{ArrayLayout-U4hs5LA_.js → ArrayLayout-C2-4wxkT.js} +39 -39
- package/dist/{ButtonControl-B8WGWs_m.js → ButtonControl-Dga3IomB.js} +26 -26
- package/dist/CheckboxControl-B8b1Di4k-CEkOsWEu.js +40 -0
- package/dist/CheckboxesControl-DWUnPGdN-BOSX_stf.js +42 -0
- package/dist/CodeEditorControl-CN4ltMvy.js +133 -0
- package/dist/{ColorControl-DeSwgyjS-BW1FBjqa.js → ColorControl-ByE5ku7u-C12pZ0rg.js} +10 -8
- package/dist/ColorPreviewControl-XiKZ4jfn-CLIjX6M_.js +89 -0
- package/dist/ComboBoxControl-zSceYlyZ-BgpAi7q9.js +42 -0
- package/dist/{ConfigurationNodeNotSupported-Bg2W0ik5.js → ConfigurationNodeNotSupported-B27grebd.js} +3 -3
- package/dist/ControlWithSubParameters-ROJGaqDF.js +63 -0
- package/dist/CredentialsControl-B6jczlBv.js +33 -0
- package/dist/CredentialsControlBase-CdNdAngd.js +96 -0
- package/dist/DateControl-BBGpEVpr-yZP_TZnE.js +44 -0
- package/dist/DateTimeControl-CymOURq5-Ca0mT1HW.js +89 -0
- package/dist/DateTimeFormatPickerControl-Bx19jwpr-Bd0xBs4D.js +37 -0
- package/dist/DateTimeFormatPickerWithTypeControl-Byo_0cTq-C0ZfMqtp.js +598 -0
- package/dist/{DialogFileExplorer-Bi0DVFut.js → DialogFileExplorer-BmT2YlVn.js} +2 -2
- package/dist/{DirtyTrackerRenderer-CDcL-lwX.js → DirtyTrackerRenderer-BG451zZD.js} +10 -10
- package/dist/DropdownControl-C6ffVYyf-hy0i8nDV.js +32 -0
- package/dist/DynamicInputControl-W23Zexge.js +6 -0
- package/dist/ExecutorCoresControl-D9FZ-g9O-Dws9IhAs.js +51 -0
- package/dist/ExecutorMemoryControl-__P80Lkb-DxQZ2IuA.js +44 -0
- package/dist/{FileChooserControl-BR84kEXy.js → FileChooserControl-BBbay7zU.js} +4 -3
- package/dist/{FileChooserControlBase-1oayQJzv.js → FileChooserControlBase-DpYYK3eE.js} +147 -143
- package/dist/{FileChooserControlForMultiFile-ChQtkmps.js → FileChooserControlForMultiFile-6NLYZKbt.js} +5 -4
- package/dist/FileUploadControl-DWs4PhOj-BvByW-Tq.js +545 -0
- package/dist/GridSelectionControl-WcJ4y6Fs-BoxSk0VG.js +117 -0
- package/dist/{HorizontalLayout-DwdPdBTW-w5bjgNga.js → HorizontalLayout-ByB5A7X3-BURAMMFG.js} +5 -5
- package/dist/{IntegerControl-D8OzxbRA-D9mR5ahj.js → IntegerControl-aveswmbr-50_b6vGY.js} +5 -4
- package/dist/IntervalControl-B4Eqs1Jf-CiB2D52B.js +51 -0
- package/dist/{LabeledGroup-BzXUTco4.js → LabeledGroup-BONZ_GLo.js} +3 -3
- package/dist/LegacyCredentialsControl-DaIrvNBd.js +88 -0
- package/dist/{LinkControl-BvBBTFCs-DojlONSA.js → LinkControl-DD56lOiw-CDy6OBu8.js} +10 -10
- package/dist/{LoadingDropdown.vue_vue_type_script_setup_true_lang-BLSG6Lpo-CtYj2B6v.js → LoadingDropdown.vue_vue_type_script_setup_true_lang-CscatDmg-BaroyBA0.js} +1 -1
- package/dist/ManualTwinlistControl-DBZ5RZgW-BV5qOGau.js +77 -0
- package/dist/MultiFileChooserControl-cyndOpF7.js +341 -0
- package/dist/{MultiRuleWrapper-TvQw5Kaj.js → MultiRuleWrapper-Db-W_o1f.js} +1 -1
- package/dist/{MultiSelectListBoxControl-nmvLP18g-feO16jJ4.js → MultiSelectListBoxControl-BMsPvxGQ-5ua-fVR8.js} +10 -9
- package/dist/{MultimodeTwinlistControl-yCdeWH2E-DG6GXu0l.js → MultimodeTwinlistControl-thO1be1r-8kc-JSH1.js} +64 -62
- package/dist/{NameFilter-D1TMJydD-Db00pnR3.js → NameFilter-DBMVmZmk-DnB-5f39.js} +7 -6
- package/dist/{NumberControl-uLMOLEbg-B_H33dGY.js → NumberControl-BPVO5l6t--nrQcx4m.js} +8 -7
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-CR61f6d6-Df5EPyns.js +54 -0
- package/dist/OneOfDropdown-DBG8ZcpV-cZs_ptrT.js +36 -0
- package/dist/{RadioButtonsWithDescriptionControl-5M_6G7Qk-BHHWv0Y0.js → RadioButtonsWithDescriptionControl-BsqMTEB5-COGPhNPs.js} +17 -17
- package/dist/RadioControl-ClJmr0EQ-BzjoXaZ3.js +21 -0
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-Bm4EUEvw-Cabfycg_.js +64 -0
- package/dist/ResourceControlBase-CeXYJeR1-DSmxhV0s.js +113 -0
- package/dist/{RichTextControl-D9QD2_uO-OY669heQ.js → RichTextControl-DvYkBpzH-CtMZq2re.js} +7876 -6699
- package/dist/{SectionLayout-DY27pAtG-BIZg0kiA.js → SectionLayout-CwRO3UXc-d5rFpCRN.js} +5 -5
- package/dist/SettingsSubPanelLayout-CV6y2bcX-OzpF07vB.js +64 -0
- package/dist/{SimpleTwinlistControl-P4KEYOq0-97VRLEr4.js → SimpleTwinlistControl-BSON5VYy-BaAaU86G.js} +7 -6
- package/dist/SingleSelectControl-BSqORMYm-CBP_mVGB.js +58 -0
- package/dist/{SingleSelectListBoxControl-oMWH0vEE-Ewf1HUGa.js → SingleSelectListBoxControl-CFdKzbOK-CruT9yt-.js} +14 -13
- package/dist/{SortListControl-4v3T2j_9-BkTlN-H5.js → SortListControl-DZIHeQmn-CKRyT1hN.js} +41 -39
- package/dist/{StringFileChooserControl-BVH5iHNM.js → StringFileChooserControl-Br8gZTku.js} +33 -30
- package/dist/{StyledListItem-D3LSfgGV-B9rTS8WT.js → StyledListItem--sgmJ3W_-Bo6f-_9B.js} +1 -1
- package/dist/{TeamAndSpacesControl-CH5ImByy-aTqgKpBn.js → TeamAndSpacesControl-DiMyDT-5-Br-Lq0ki.js} +21 -20
- package/dist/TeamResourceControl-Bag_dwA1-PdtnhxEi.js +44 -0
- package/dist/{TextAreaControl-CrsZSU_f-CNj59YPm.js → TextAreaControl-B52P0DAa-McfOgZWn.js} +10 -8
- package/dist/TextControl-52n-sttB-DssWw4KP.js +50962 -0
- package/dist/TimeControl-Cu12_qpz-CK1bxhya.js +71 -0
- package/dist/TimeframesControl-DhdC8OS1-DYseJbBV.js +352 -0
- package/dist/TwinlistControlBase.vue_vue_type_script_setup_true_lang-t1I2qxJz-DU6yd1RM.js +45 -0
- package/dist/{TypedStringFilter-ry7fTUTx-CCJRabai.js → TypedStringFilter-zJOICQei-B-5z8atp.js} +7 -6
- package/dist/{ValueSwitchControl-aVx7pUi9-7kuEbp3H.js → ValueSwitchControl-CEVWJH7z-DzuxqLvy.js} +7 -6
- package/dist/{VennDiagramLayout-D8s5yYbT.js → VennDiagramLayout-DyTZ5EJ9.js} +24 -24
- package/dist/{VerticalLayout-Bv-LJOZ0-BTrnMnQu.js → VerticalLayout-D_13xb_m-BfU1M3IE.js} +7 -7
- package/dist/ZonedDateTimeControl-C-vO6fC1-XngmuFqW.js +82 -0
- package/dist/{ai-bar-DLr5A9ZW.js → ai-bar-DDtzX23v.js} +775 -732
- package/dist/classApi-CHpAZrj3-BptMrhKH.js +3328 -0
- package/dist/collection-BBXRVj4b-DhO8c3tP.js +22 -0
- package/dist/collection-BBXRVj4b-DzRZ2FYd-COyFmQqa.js +22 -0
- package/dist/collection-BBXRVj4b-grENCIdl.js +22 -0
- package/dist/main.js +9977 -13304
- package/dist/parameters.js +1 -1
- package/dist/plainDateTimeUtils-CR0UhpkD-DU-LM4_V.js +52 -0
- package/dist/src/components/ScriptingEditor.vue.d.ts +6 -4
- package/dist/src/components/SettingsPage.vue.d.ts +5 -4
- package/dist/src/scripting-service.d.ts +1 -1
- package/dist/useDropdownNavigation-CdrbT-CQ-Dxb_y1Fq.js +2003 -0
- package/dist/{useFileChooserBackend-Bs7hx7xH.js → useFileChooserBackend-CLdJ1RU1.js} +6 -6
- package/dist/usePlainDateTimeBatch-Bd2G-GY9-DO2Zu0Mj.js +34 -0
- package/dist/{usePossibleValues-B-W6u-1T-DcglK6MY.js → usePossibleValues-DiYOmnZW-CaSLjdK-.js} +4 -4
- package/package.json +3 -3
- package/dist/CheckboxControl-CS6iXHnF-DLCN_obF.js +0 -38
- package/dist/CheckboxesControl-CPKIkyWt-BgPFZcJW.js +0 -40
- package/dist/CodeEditorControl-DM7k0B2q.js +0 -103
- package/dist/ColorPreviewControl-CntI0nTL-qVTX4e1m.js +0 -89
- package/dist/ComboBoxControl-DBYnBkC4-1oOLCCms.js +0 -40
- package/dist/ControlWithSubParameters-DgJhqCMe.js +0 -80
- package/dist/CredentialsControl-CuHgBJQY.js +0 -32
- package/dist/CredentialsControlBase-14mA9Xg5.js +0 -96
- package/dist/DateControl-Cx_CwvNB-Cnu4FwAv.js +0 -35
- package/dist/DateTimeControl-BJsDzufC-BLhNM1JR.js +0 -56
- package/dist/DateTimeFormatPickerControl-C80v1qfK-0bjg1c9X.js +0 -35
- package/dist/DateTimeFormatPickerWithTypeControl-Dt-FKtYV-x-IJKc_b.js +0 -475
- package/dist/DropdownControl-D_BnA4-1-BWnnlfiI.js +0 -30
- package/dist/DynamicInputControl-u5VOv3zx.js +0 -6
- package/dist/ExecutorCoresControl-BnglyGMR-CagN3N5j.js +0 -56
- package/dist/ExecutorMemoryControl-CRATGs9C-Dsj7vG41.js +0 -50
- package/dist/FileUploadControl-D42rjpJg-DIoT6HeI.js +0 -221
- package/dist/GridSelectionControl-BJk8-yiM-CvDVlby0.js +0 -116
- package/dist/IntervalControl-Drljrv-b-WpTsaCtp.js +0 -751
- package/dist/LegacyCredentialsControl-C5OmuHPe.js +0 -87
- package/dist/ManualTwinlistControl-By0Hur_m-zZbz98JO.js +0 -75
- package/dist/MultiFileChooserControl-BDBYwcSY.js +0 -401
- package/dist/NumberControlBase.vue_vue_type_script_setup_true_lang-VVQDBYw7-FEqHVnFo.js +0 -52
- package/dist/OneOfDropdown-CDwwxb3h-DAK0CMDe.js +0 -34
- package/dist/RadioControl-C73s-icb-DSF6WESw.js +0 -24
- package/dist/RadioControlBase.vue_vue_type_script_setup_true_lang-BScekfhl-oNoT_40f.js +0 -60
- package/dist/ResourceControlBase-Bqq1PAX_-5gNwtS9Y.js +0 -183
- package/dist/SettingsSubPanelLayout-82gMWhpv-DwWBU76p.js +0 -70
- package/dist/SingleSelectControl-C_ZKkV5m-nfkmmDbp.js +0 -56
- package/dist/TeamResourceControl-BFMuyWnk-DvcyxCqW.js +0 -47
- package/dist/TextControl-B0ag-3Pv-nwKlVRtp.js +0 -54671
- package/dist/TimeControl-Bt5OcjBc-KiaYQH-m.js +0 -41
- package/dist/TimePartInput-CvwAzDuY-CuNpUUqj.js +0 -253
- package/dist/TimeframesControl-BE3LFgyl-hQJ_5QVJ.js +0 -94
- package/dist/Tooltip-UlemzxdS-Dfhzj7no.js +0 -24
- package/dist/TwinlistControlBase.vue_vue_type_script_setup_true_lang-B5lCsIOD-KqyVUaZj.js +0 -42
- package/dist/ValueSwitch-BXaDBm2C-Ba93O_aZ.js +0 -130
- package/dist/ZonedDateTimeControl-6MUvXzd3-B1B9FPa7.js +0 -72
- package/dist/_Uint8Array-C_ozLuQF-DBc0hZkr.js +0 -349
- package/dist/arrow-dropdown-DMFBPPcK-uCJYJfqE.js +0 -17
- package/dist/arrow-next-BQULX8HT-DDsCfA5A.js +0 -17
- package/dist/floating-ui.vue-Fx4CxKut-DAsMxBCU.js +0 -1057
- package/dist/isArray-WzO_os3q-ClnPWjBY.js +0 -4
- package/dist/localTimeUtils-DBMwKtLh-CTshgG3l.js +0 -12470
- package/dist/src/lsp/completion.d.ts +0 -7
- package/dist/src/lsp/connection.d.ts +0 -56
- package/dist/src/lsp/diagnostics.d.ts +0 -4
- package/dist/src/lsp/doc-sync.d.ts +0 -5
- package/dist/src/lsp/hover.d.ts +0 -5
- package/dist/src/lsp/knime-io.d.ts +0 -22
- package/dist/src/lsp/mapping-utils.d.ts +0 -8
- package/dist/src/lsp/signature-help.d.ts +0 -5
- package/dist/toString-C-CNeuJl-jseUiiTM.js +0 -949
- package/dist/useDropdownNavigation-2Yhk7zes-75raAHpT.js +0 -821
- /package/dist/{useUnknownValuesInTwinlist-BbwGcno5-D2ve7iXH.js → useUnknownValuesInTwinlist-BhhirtmX-D2ve7iXH.js} +0 -0
|
@@ -0,0 +1,2003 @@
|
|
|
1
|
+
import { computed as U, ref as J, shallowRef as Ot, shallowReadonly as ae, watch as be, getCurrentScope as kt, onScopeDispose as Dt, unref as At, defineComponent as Ft, readonly as Pt, onMounted as Nt, onUnmounted as Ct, Comment as It, cloneVNode as Lt } from "vue";
|
|
2
|
+
var ut = ["input:not([inert]):not([inert] *)", "select:not([inert]):not([inert] *)", "textarea:not([inert]):not([inert] *)", "a[href]:not([inert]):not([inert] *)", "button:not([inert]):not([inert] *)", "[tabindex]:not(slot):not([inert]):not([inert] *)", "audio[controls]:not([inert]):not([inert] *)", "video[controls]:not([inert]):not([inert] *)", '[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)', "details>summary:first-of-type:not([inert]):not([inert] *)", "details:not([inert]):not([inert] *)"], ye = /* @__PURE__ */ ut.join(","), st = typeof Element > "u", te = st ? function() {
|
|
3
|
+
} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector, ge = !st && Element.prototype.getRootNode ? function(e) {
|
|
4
|
+
var t;
|
|
5
|
+
return e == null || (t = e.getRootNode) === null || t === void 0 ? void 0 : t.call(e);
|
|
6
|
+
} : function(e) {
|
|
7
|
+
return e == null ? void 0 : e.ownerDocument;
|
|
8
|
+
}, we = function(e, t) {
|
|
9
|
+
var n;
|
|
10
|
+
t === void 0 && (t = !0);
|
|
11
|
+
var o = e == null || (n = e.getAttribute) === null || n === void 0 ? void 0 : n.call(e, "inert"), a = o === "" || o === "true", r = a || t && e && // closest does not exist on shadow roots, so we fall back to a manual
|
|
12
|
+
// lookup upward, in case it is not defined.
|
|
13
|
+
(typeof e.closest == "function" ? e.closest("[inert]") : we(e.parentNode));
|
|
14
|
+
return r;
|
|
15
|
+
}, jt = function(e) {
|
|
16
|
+
var t, n = e == null || (t = e.getAttribute) === null || t === void 0 ? void 0 : t.call(e, "contenteditable");
|
|
17
|
+
return n === "" || n === "true";
|
|
18
|
+
}, ct = function(e, t, n) {
|
|
19
|
+
if (we(e))
|
|
20
|
+
return [];
|
|
21
|
+
var o = Array.prototype.slice.apply(e.querySelectorAll(ye));
|
|
22
|
+
return t && te.call(e, ye) && o.unshift(e), o = o.filter(n), o;
|
|
23
|
+
}, xe = function(e, t, n) {
|
|
24
|
+
for (var o = [], a = Array.from(e); a.length; ) {
|
|
25
|
+
var r = a.shift();
|
|
26
|
+
if (!we(r, !1))
|
|
27
|
+
if (r.tagName === "SLOT") {
|
|
28
|
+
var i = r.assignedElements(), l = i.length ? i : r.children, c = xe(l, !0, n);
|
|
29
|
+
n.flatten ? o.push.apply(o, c) : o.push({
|
|
30
|
+
scopeParent: r,
|
|
31
|
+
candidates: c
|
|
32
|
+
});
|
|
33
|
+
} else {
|
|
34
|
+
var f = te.call(r, ye);
|
|
35
|
+
f && n.filter(r) && (t || !e.includes(r)) && o.push(r);
|
|
36
|
+
var d = r.shadowRoot || // check for an undisclosed shadow
|
|
37
|
+
typeof n.getShadowRoot == "function" && n.getShadowRoot(r), v = !we(d, !1) && (!n.shadowRootFilter || n.shadowRootFilter(r));
|
|
38
|
+
if (d && v) {
|
|
39
|
+
var h = xe(d === !0 ? r.children : d.children, !0, n);
|
|
40
|
+
n.flatten ? o.push.apply(o, h) : o.push({
|
|
41
|
+
scopeParent: r,
|
|
42
|
+
candidates: h
|
|
43
|
+
});
|
|
44
|
+
} else
|
|
45
|
+
a.unshift.apply(a, r.children);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return o;
|
|
49
|
+
}, ft = function(e) {
|
|
50
|
+
return !isNaN(parseInt(e.getAttribute("tabindex"), 10));
|
|
51
|
+
}, Q = function(e) {
|
|
52
|
+
if (!e)
|
|
53
|
+
throw new Error("No node provided");
|
|
54
|
+
return e.tabIndex < 0 && (/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName) || jt(e)) && !ft(e) ? 0 : e.tabIndex;
|
|
55
|
+
}, Bt = function(e, t) {
|
|
56
|
+
var n = Q(e);
|
|
57
|
+
return n < 0 && t && !ft(e) ? 0 : n;
|
|
58
|
+
}, Gt = function(e, t) {
|
|
59
|
+
return e.tabIndex === t.tabIndex ? e.documentOrder - t.documentOrder : e.tabIndex - t.tabIndex;
|
|
60
|
+
}, dt = function(e) {
|
|
61
|
+
return e.tagName === "INPUT";
|
|
62
|
+
}, _t = function(e) {
|
|
63
|
+
return dt(e) && e.type === "hidden";
|
|
64
|
+
}, Mt = function(e) {
|
|
65
|
+
var t = e.tagName === "DETAILS" && Array.prototype.slice.apply(e.children).some(function(n) {
|
|
66
|
+
return n.tagName === "SUMMARY";
|
|
67
|
+
});
|
|
68
|
+
return t;
|
|
69
|
+
}, Vt = function(e, t) {
|
|
70
|
+
for (var n = 0; n < e.length; n++)
|
|
71
|
+
if (e[n].checked && e[n].form === t)
|
|
72
|
+
return e[n];
|
|
73
|
+
}, Ht = function(e) {
|
|
74
|
+
if (!e.name)
|
|
75
|
+
return !0;
|
|
76
|
+
var t = e.form || ge(e), n = function(r) {
|
|
77
|
+
return t.querySelectorAll('input[type="radio"][name="' + r + '"]');
|
|
78
|
+
}, o;
|
|
79
|
+
if (typeof window < "u" && typeof window.CSS < "u" && typeof window.CSS.escape == "function")
|
|
80
|
+
o = n(window.CSS.escape(e.name));
|
|
81
|
+
else
|
|
82
|
+
try {
|
|
83
|
+
o = n(e.name);
|
|
84
|
+
} catch (r) {
|
|
85
|
+
return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s", r.message), !1;
|
|
86
|
+
}
|
|
87
|
+
var a = Vt(o, e.form);
|
|
88
|
+
return !a || a === e;
|
|
89
|
+
}, Kt = function(e) {
|
|
90
|
+
return dt(e) && e.type === "radio";
|
|
91
|
+
}, Ut = function(e) {
|
|
92
|
+
return Kt(e) && !Ht(e);
|
|
93
|
+
}, $t = function(e) {
|
|
94
|
+
var t, n = e && ge(e), o = (t = n) === null || t === void 0 ? void 0 : t.host, a = !1;
|
|
95
|
+
if (n && n !== e) {
|
|
96
|
+
var r, i, l;
|
|
97
|
+
for (a = !!((r = o) !== null && r !== void 0 && (i = r.ownerDocument) !== null && i !== void 0 && i.contains(o) || e != null && (l = e.ownerDocument) !== null && l !== void 0 && l.contains(e)); !a && o; ) {
|
|
98
|
+
var c, f, d;
|
|
99
|
+
n = ge(o), o = (c = n) === null || c === void 0 ? void 0 : c.host, a = !!((f = o) !== null && f !== void 0 && (d = f.ownerDocument) !== null && d !== void 0 && d.contains(o));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return a;
|
|
103
|
+
}, qe = function(e) {
|
|
104
|
+
var t = e.getBoundingClientRect(), n = t.width, o = t.height;
|
|
105
|
+
return n === 0 && o === 0;
|
|
106
|
+
}, Wt = function(e, t) {
|
|
107
|
+
var n = t.displayCheck, o = t.getShadowRoot;
|
|
108
|
+
if (n === "full-native" && "checkVisibility" in e) {
|
|
109
|
+
var a = e.checkVisibility({
|
|
110
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
111
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
112
|
+
checkOpacity: !1,
|
|
113
|
+
opacityProperty: !1,
|
|
114
|
+
contentVisibilityAuto: !0,
|
|
115
|
+
visibilityProperty: !0,
|
|
116
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
117
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
118
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
119
|
+
// we include it anyway.
|
|
120
|
+
checkVisibilityCSS: !0
|
|
121
|
+
});
|
|
122
|
+
return !a;
|
|
123
|
+
}
|
|
124
|
+
if (getComputedStyle(e).visibility === "hidden")
|
|
125
|
+
return !0;
|
|
126
|
+
var r = te.call(e, "details>summary:first-of-type"), i = r ? e.parentElement : e;
|
|
127
|
+
if (te.call(i, "details:not([open]) *"))
|
|
128
|
+
return !0;
|
|
129
|
+
if (!n || n === "full" || // full-native can run this branch when it falls through in case
|
|
130
|
+
// Element#checkVisibility is unsupported
|
|
131
|
+
n === "full-native" || n === "legacy-full") {
|
|
132
|
+
if (typeof o == "function") {
|
|
133
|
+
for (var l = e; e; ) {
|
|
134
|
+
var c = e.parentElement, f = ge(e);
|
|
135
|
+
if (c && !c.shadowRoot && o(c) === !0)
|
|
136
|
+
return qe(e);
|
|
137
|
+
e.assignedSlot ? e = e.assignedSlot : !c && f !== e.ownerDocument ? e = f.host : e = c;
|
|
138
|
+
}
|
|
139
|
+
e = l;
|
|
140
|
+
}
|
|
141
|
+
if ($t(e))
|
|
142
|
+
return !e.getClientRects().length;
|
|
143
|
+
if (n !== "legacy-full")
|
|
144
|
+
return !0;
|
|
145
|
+
} else if (n === "non-zero-area")
|
|
146
|
+
return qe(e);
|
|
147
|
+
return !1;
|
|
148
|
+
}, qt = function(e) {
|
|
149
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))
|
|
150
|
+
for (var t = e.parentElement; t; ) {
|
|
151
|
+
if (t.tagName === "FIELDSET" && t.disabled) {
|
|
152
|
+
for (var n = 0; n < t.children.length; n++) {
|
|
153
|
+
var o = t.children.item(n);
|
|
154
|
+
if (o.tagName === "LEGEND")
|
|
155
|
+
return te.call(t, "fieldset[disabled] *") ? !0 : !o.contains(e);
|
|
156
|
+
}
|
|
157
|
+
return !0;
|
|
158
|
+
}
|
|
159
|
+
t = t.parentElement;
|
|
160
|
+
}
|
|
161
|
+
return !1;
|
|
162
|
+
}, Se = function(e, t) {
|
|
163
|
+
return !(t.disabled || _t(t) || Wt(t, e) || // For a details element with a summary, the summary element gets the focus
|
|
164
|
+
Mt(t) || qt(t));
|
|
165
|
+
}, _e = function(e, t) {
|
|
166
|
+
return !(Ut(t) || Q(t) < 0 || !Se(e, t));
|
|
167
|
+
}, zt = function(e) {
|
|
168
|
+
var t = parseInt(e.getAttribute("tabindex"), 10);
|
|
169
|
+
return !!(isNaN(t) || t >= 0);
|
|
170
|
+
}, pt = function(e) {
|
|
171
|
+
var t = [], n = [];
|
|
172
|
+
return e.forEach(function(o, a) {
|
|
173
|
+
var r = !!o.scopeParent, i = r ? o.scopeParent : o, l = Bt(i, r), c = r ? pt(o.candidates) : i;
|
|
174
|
+
l === 0 ? r ? t.push.apply(t, c) : t.push(i) : n.push({
|
|
175
|
+
documentOrder: a,
|
|
176
|
+
tabIndex: l,
|
|
177
|
+
item: o,
|
|
178
|
+
isScope: r,
|
|
179
|
+
content: c
|
|
180
|
+
});
|
|
181
|
+
}), n.sort(Gt).reduce(function(o, a) {
|
|
182
|
+
return a.isScope ? o.push.apply(o, a.content) : o.push(a.content), o;
|
|
183
|
+
}, []).concat(t);
|
|
184
|
+
}, Yt = function(e, t) {
|
|
185
|
+
t = t || {};
|
|
186
|
+
var n;
|
|
187
|
+
return t.getShadowRoot ? n = xe([e], t.includeContainer, {
|
|
188
|
+
filter: _e.bind(null, t),
|
|
189
|
+
flatten: !1,
|
|
190
|
+
getShadowRoot: t.getShadowRoot,
|
|
191
|
+
shadowRootFilter: zt
|
|
192
|
+
}) : n = ct(e, t.includeContainer, _e.bind(null, t)), pt(n);
|
|
193
|
+
}, Xt = function(e, t) {
|
|
194
|
+
t = t || {};
|
|
195
|
+
var n;
|
|
196
|
+
return t.getShadowRoot ? n = xe([e], t.includeContainer, {
|
|
197
|
+
filter: Se.bind(null, t),
|
|
198
|
+
flatten: !0,
|
|
199
|
+
getShadowRoot: t.getShadowRoot
|
|
200
|
+
}) : n = ct(e, t.includeContainer, Se.bind(null, t)), n;
|
|
201
|
+
}, ie = function(e, t) {
|
|
202
|
+
if (t = t || {}, !e)
|
|
203
|
+
throw new Error("No node provided");
|
|
204
|
+
return te.call(e, ye) === !1 ? !1 : _e(t, e);
|
|
205
|
+
}, Zt = /* @__PURE__ */ ut.concat("iframe:not([inert]):not([inert] *)").join(","), je = function(e, t) {
|
|
206
|
+
if (t = t || {}, !e)
|
|
207
|
+
throw new Error("No node provided");
|
|
208
|
+
return te.call(e, Zt) === !1 ? !1 : Se(t, e);
|
|
209
|
+
};
|
|
210
|
+
function Me(e, t) {
|
|
211
|
+
(t == null || t > e.length) && (t = e.length);
|
|
212
|
+
for (var n = 0, o = Array(t); n < t; n++) o[n] = e[n];
|
|
213
|
+
return o;
|
|
214
|
+
}
|
|
215
|
+
function Jt(e) {
|
|
216
|
+
if (Array.isArray(e)) return Me(e);
|
|
217
|
+
}
|
|
218
|
+
function ze(e, t) {
|
|
219
|
+
var n = typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
220
|
+
if (!n) {
|
|
221
|
+
if (Array.isArray(e) || (n = vt(e)) || t) {
|
|
222
|
+
n && (e = n);
|
|
223
|
+
var o = 0, a = function() {
|
|
224
|
+
};
|
|
225
|
+
return {
|
|
226
|
+
s: a,
|
|
227
|
+
n: function() {
|
|
228
|
+
return o >= e.length ? {
|
|
229
|
+
done: !0
|
|
230
|
+
} : {
|
|
231
|
+
done: !1,
|
|
232
|
+
value: e[o++]
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
e: function(c) {
|
|
236
|
+
throw c;
|
|
237
|
+
},
|
|
238
|
+
f: a
|
|
239
|
+
};
|
|
240
|
+
}
|
|
241
|
+
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
242
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
243
|
+
}
|
|
244
|
+
var r, i = !0, l = !1;
|
|
245
|
+
return {
|
|
246
|
+
s: function() {
|
|
247
|
+
n = n.call(e);
|
|
248
|
+
},
|
|
249
|
+
n: function() {
|
|
250
|
+
var c = n.next();
|
|
251
|
+
return i = c.done, c;
|
|
252
|
+
},
|
|
253
|
+
e: function(c) {
|
|
254
|
+
l = !0, r = c;
|
|
255
|
+
},
|
|
256
|
+
f: function() {
|
|
257
|
+
try {
|
|
258
|
+
i || n.return == null || n.return();
|
|
259
|
+
} finally {
|
|
260
|
+
if (l) throw r;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
function Qt(e, t, n) {
|
|
266
|
+
return (t = rn(t)) in e ? Object.defineProperty(e, t, {
|
|
267
|
+
value: n,
|
|
268
|
+
enumerable: !0,
|
|
269
|
+
configurable: !0,
|
|
270
|
+
writable: !0
|
|
271
|
+
}) : e[t] = n, e;
|
|
272
|
+
}
|
|
273
|
+
function en(e) {
|
|
274
|
+
if (typeof Symbol < "u" && e[Symbol.iterator] != null || e["@@iterator"] != null) return Array.from(e);
|
|
275
|
+
}
|
|
276
|
+
function tn() {
|
|
277
|
+
throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
278
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
279
|
+
}
|
|
280
|
+
function Ye(e, t) {
|
|
281
|
+
var n = Object.keys(e);
|
|
282
|
+
if (Object.getOwnPropertySymbols) {
|
|
283
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
284
|
+
t && (o = o.filter(function(a) {
|
|
285
|
+
return Object.getOwnPropertyDescriptor(e, a).enumerable;
|
|
286
|
+
})), n.push.apply(n, o);
|
|
287
|
+
}
|
|
288
|
+
return n;
|
|
289
|
+
}
|
|
290
|
+
function Xe(e) {
|
|
291
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
292
|
+
var n = arguments[t] != null ? arguments[t] : {};
|
|
293
|
+
t % 2 ? Ye(Object(n), !0).forEach(function(o) {
|
|
294
|
+
Qt(e, o, n[o]);
|
|
295
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : Ye(Object(n)).forEach(function(o) {
|
|
296
|
+
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(n, o));
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
return e;
|
|
300
|
+
}
|
|
301
|
+
function nn(e) {
|
|
302
|
+
return Jt(e) || en(e) || vt(e) || tn();
|
|
303
|
+
}
|
|
304
|
+
function on(e, t) {
|
|
305
|
+
if (typeof e != "object" || !e) return e;
|
|
306
|
+
var n = e[Symbol.toPrimitive];
|
|
307
|
+
if (n !== void 0) {
|
|
308
|
+
var o = n.call(e, t);
|
|
309
|
+
if (typeof o != "object") return o;
|
|
310
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
311
|
+
}
|
|
312
|
+
return (t === "string" ? String : Number)(e);
|
|
313
|
+
}
|
|
314
|
+
function rn(e) {
|
|
315
|
+
var t = on(e, "string");
|
|
316
|
+
return typeof t == "symbol" ? t : t + "";
|
|
317
|
+
}
|
|
318
|
+
function vt(e, t) {
|
|
319
|
+
if (e) {
|
|
320
|
+
if (typeof e == "string") return Me(e, t);
|
|
321
|
+
var n = {}.toString.call(e).slice(8, -1);
|
|
322
|
+
return n === "Object" && e.constructor && (n = e.constructor.name), n === "Map" || n === "Set" ? Array.from(e) : n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ? Me(e, t) : void 0;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
var $ = {
|
|
326
|
+
// Returns the trap from the top of the stack.
|
|
327
|
+
getActiveTrap: function(e) {
|
|
328
|
+
return (e == null ? void 0 : e.length) > 0 ? e[e.length - 1] : null;
|
|
329
|
+
},
|
|
330
|
+
// Pauses the currently active trap, then adds a new trap to the stack.
|
|
331
|
+
activateTrap: function(e, t) {
|
|
332
|
+
var n = $.getActiveTrap(e);
|
|
333
|
+
t !== n && $.pauseTrap(e);
|
|
334
|
+
var o = e.indexOf(t);
|
|
335
|
+
o === -1 || e.splice(o, 1), e.push(t);
|
|
336
|
+
},
|
|
337
|
+
// Removes the trap from the top of the stack, then unpauses the next trap down.
|
|
338
|
+
deactivateTrap: function(e, t) {
|
|
339
|
+
var n = e.indexOf(t);
|
|
340
|
+
n !== -1 && e.splice(n, 1), $.unpauseTrap(e);
|
|
341
|
+
},
|
|
342
|
+
// Pauses the trap at the top of the stack.
|
|
343
|
+
pauseTrap: function(e) {
|
|
344
|
+
var t = $.getActiveTrap(e);
|
|
345
|
+
t == null || t._setPausedState(!0);
|
|
346
|
+
},
|
|
347
|
+
// Unpauses the trap at the top of the stack.
|
|
348
|
+
unpauseTrap: function(e) {
|
|
349
|
+
var t = $.getActiveTrap(e);
|
|
350
|
+
t && !t._isManuallyPaused() && t._setPausedState(!1);
|
|
351
|
+
}
|
|
352
|
+
}, an = function(e) {
|
|
353
|
+
return e.tagName && e.tagName.toLowerCase() === "input" && typeof e.select == "function";
|
|
354
|
+
}, ln = function(e) {
|
|
355
|
+
return (e == null ? void 0 : e.key) === "Escape" || (e == null ? void 0 : e.key) === "Esc" || (e == null ? void 0 : e.keyCode) === 27;
|
|
356
|
+
}, fe = function(e) {
|
|
357
|
+
return (e == null ? void 0 : e.key) === "Tab" || (e == null ? void 0 : e.keyCode) === 9;
|
|
358
|
+
}, un = function(e) {
|
|
359
|
+
return fe(e) && !e.shiftKey;
|
|
360
|
+
}, sn = function(e) {
|
|
361
|
+
return fe(e) && e.shiftKey;
|
|
362
|
+
}, Ze = function(e) {
|
|
363
|
+
return setTimeout(e, 0);
|
|
364
|
+
}, se = function(e) {
|
|
365
|
+
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), o = 1; o < t; o++)
|
|
366
|
+
n[o - 1] = arguments[o];
|
|
367
|
+
return typeof e == "function" ? e.apply(void 0, n) : e;
|
|
368
|
+
}, ve = function(e) {
|
|
369
|
+
return e.target.shadowRoot && typeof e.composedPath == "function" ? e.composedPath()[0] : e.target;
|
|
370
|
+
}, cn = [], fn = function(e, t) {
|
|
371
|
+
var n = (t == null ? void 0 : t.document) || document, o = (t == null ? void 0 : t.trapStack) || cn, a = Xe({
|
|
372
|
+
returnFocusOnDeactivate: !0,
|
|
373
|
+
escapeDeactivates: !0,
|
|
374
|
+
delayInitialFocus: !0,
|
|
375
|
+
isolateSubtrees: !1,
|
|
376
|
+
isKeyForward: un,
|
|
377
|
+
isKeyBackward: sn
|
|
378
|
+
}, t), r = {
|
|
379
|
+
// containers given to createFocusTrap()
|
|
380
|
+
/** @type {Array<HTMLElement>} */
|
|
381
|
+
containers: [],
|
|
382
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
383
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
384
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
385
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
386
|
+
// result in an error being thrown)
|
|
387
|
+
/** @type {Array<{
|
|
388
|
+
* container: HTMLElement,
|
|
389
|
+
* tabbableNodes: Array<HTMLElement>, // empty if none
|
|
390
|
+
* focusableNodes: Array<HTMLElement>, // empty if none
|
|
391
|
+
* posTabIndexesFound: boolean,
|
|
392
|
+
* firstTabbableNode: HTMLElement|undefined,
|
|
393
|
+
* lastTabbableNode: HTMLElement|undefined,
|
|
394
|
+
* firstDomTabbableNode: HTMLElement|undefined,
|
|
395
|
+
* lastDomTabbableNode: HTMLElement|undefined,
|
|
396
|
+
* nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
397
|
+
* }>}
|
|
398
|
+
*/
|
|
399
|
+
containerGroups: [],
|
|
400
|
+
// same order/length as `containers` list
|
|
401
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
402
|
+
// tabbable nodes in them
|
|
403
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
404
|
+
// the same length
|
|
405
|
+
tabbableGroups: [],
|
|
406
|
+
// references to nodes that are siblings to the ancestors of this trap's containers.
|
|
407
|
+
/** @type {Set<HTMLElement>} */
|
|
408
|
+
adjacentElements: /* @__PURE__ */ new Set(),
|
|
409
|
+
// references to nodes that were inert or aria-hidden before the trap was activated.
|
|
410
|
+
/** @type {Set<HTMLElement>} */
|
|
411
|
+
alreadySilent: /* @__PURE__ */ new Set(),
|
|
412
|
+
nodeFocusedBeforeActivation: null,
|
|
413
|
+
mostRecentlyFocusedNode: null,
|
|
414
|
+
active: !1,
|
|
415
|
+
paused: !1,
|
|
416
|
+
manuallyPaused: !1,
|
|
417
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
418
|
+
// has been delayed during activation
|
|
419
|
+
delayInitialFocusTimer: void 0,
|
|
420
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
421
|
+
recentNavEvent: void 0
|
|
422
|
+
}, i, l = function(u, s, m) {
|
|
423
|
+
return u && u[s] !== void 0 ? u[s] : a[m || s];
|
|
424
|
+
}, c = function(u, s) {
|
|
425
|
+
var m = typeof (s == null ? void 0 : s.composedPath) == "function" ? s.composedPath() : void 0;
|
|
426
|
+
return r.containerGroups.findIndex(function(S) {
|
|
427
|
+
var g = S.container, x = S.tabbableNodes;
|
|
428
|
+
return g.contains(u) || (m == null ? void 0 : m.includes(g)) || x.find(function(b) {
|
|
429
|
+
return b === u;
|
|
430
|
+
});
|
|
431
|
+
});
|
|
432
|
+
}, f = function(u) {
|
|
433
|
+
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, m = s.hasFallback, S = m === void 0 ? !1 : m, g = s.params, x = g === void 0 ? [] : g, b = a[u];
|
|
434
|
+
if (typeof b == "function" && (b = b.apply(void 0, nn(x))), b === !0 && (b = void 0), !b) {
|
|
435
|
+
if (b === void 0 || b === !1)
|
|
436
|
+
return b;
|
|
437
|
+
throw new Error("`".concat(u, "` was specified but was not a node, or did not return a node"));
|
|
438
|
+
}
|
|
439
|
+
var E = b;
|
|
440
|
+
if (typeof b == "string") {
|
|
441
|
+
try {
|
|
442
|
+
E = n.querySelector(b);
|
|
443
|
+
} catch (k) {
|
|
444
|
+
throw new Error("`".concat(u, '` appears to be an invalid selector; error="').concat(k.message, '"'));
|
|
445
|
+
}
|
|
446
|
+
if (!E && !S)
|
|
447
|
+
throw new Error("`".concat(u, "` as selector refers to no known node"));
|
|
448
|
+
}
|
|
449
|
+
return E;
|
|
450
|
+
}, d = function() {
|
|
451
|
+
var u = f("initialFocus", {
|
|
452
|
+
hasFallback: !0
|
|
453
|
+
});
|
|
454
|
+
if (u === !1)
|
|
455
|
+
return !1;
|
|
456
|
+
if (u === void 0 || u && !je(u, a.tabbableOptions))
|
|
457
|
+
if (c(n.activeElement) >= 0)
|
|
458
|
+
u = n.activeElement;
|
|
459
|
+
else {
|
|
460
|
+
var s = r.tabbableGroups[0], m = s && s.firstTabbableNode;
|
|
461
|
+
u = m || f("fallbackFocus");
|
|
462
|
+
}
|
|
463
|
+
else u === null && (u = f("fallbackFocus"));
|
|
464
|
+
if (!u)
|
|
465
|
+
throw new Error("Your focus-trap needs to have at least one focusable element");
|
|
466
|
+
return u;
|
|
467
|
+
}, v = function() {
|
|
468
|
+
if (r.containerGroups = r.containers.map(function(u) {
|
|
469
|
+
var s = Yt(u, a.tabbableOptions), m = Xt(u, a.tabbableOptions), S = s.length > 0 ? s[0] : void 0, g = s.length > 0 ? s[s.length - 1] : void 0, x = m.find(function(k) {
|
|
470
|
+
return ie(k);
|
|
471
|
+
}), b = m.slice().reverse().find(function(k) {
|
|
472
|
+
return ie(k);
|
|
473
|
+
}), E = !!s.find(function(k) {
|
|
474
|
+
return Q(k) > 0;
|
|
475
|
+
});
|
|
476
|
+
return {
|
|
477
|
+
container: u,
|
|
478
|
+
tabbableNodes: s,
|
|
479
|
+
focusableNodes: m,
|
|
480
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
481
|
+
posTabIndexesFound: E,
|
|
482
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
483
|
+
firstTabbableNode: S,
|
|
484
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
485
|
+
lastTabbableNode: g,
|
|
486
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
487
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
488
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
489
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
490
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
491
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
492
|
+
// be avoided anyway...
|
|
493
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
494
|
+
firstDomTabbableNode: x,
|
|
495
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
496
|
+
lastDomTabbableNode: b,
|
|
497
|
+
/**
|
|
498
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
499
|
+
* in this container, if any.
|
|
500
|
+
* @param {HTMLElement} node
|
|
501
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
502
|
+
* in reverse.
|
|
503
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
504
|
+
*/
|
|
505
|
+
nextTabbableNode: function(k) {
|
|
506
|
+
var I = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !0, M = s.indexOf(k);
|
|
507
|
+
return M < 0 ? I ? m.slice(m.indexOf(k) + 1).find(function(L) {
|
|
508
|
+
return ie(L);
|
|
509
|
+
}) : m.slice(0, m.indexOf(k)).reverse().find(function(L) {
|
|
510
|
+
return ie(L);
|
|
511
|
+
}) : s[M + (I ? 1 : -1)];
|
|
512
|
+
}
|
|
513
|
+
};
|
|
514
|
+
}), r.tabbableGroups = r.containerGroups.filter(function(u) {
|
|
515
|
+
return u.tabbableNodes.length > 0;
|
|
516
|
+
}), r.tabbableGroups.length <= 0 && !f("fallbackFocus"))
|
|
517
|
+
throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");
|
|
518
|
+
if (r.containerGroups.find(function(u) {
|
|
519
|
+
return u.posTabIndexesFound;
|
|
520
|
+
}) && r.containerGroups.length > 1)
|
|
521
|
+
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
522
|
+
}, h = function(u) {
|
|
523
|
+
var s = u.activeElement;
|
|
524
|
+
if (s)
|
|
525
|
+
return s.shadowRoot && s.shadowRoot.activeElement !== null ? h(s.shadowRoot) : s;
|
|
526
|
+
}, p = function(u) {
|
|
527
|
+
if (u !== !1 && u !== h(document)) {
|
|
528
|
+
if (!u || !u.focus) {
|
|
529
|
+
p(d());
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
u.focus({
|
|
533
|
+
preventScroll: !!a.preventScroll
|
|
534
|
+
}), r.mostRecentlyFocusedNode = u, an(u) && u.select();
|
|
535
|
+
}
|
|
536
|
+
}, y = function(u) {
|
|
537
|
+
var s = f("setReturnFocus", {
|
|
538
|
+
params: [u]
|
|
539
|
+
});
|
|
540
|
+
return s || (s === !1 ? !1 : u);
|
|
541
|
+
}, w = function(u) {
|
|
542
|
+
var s = u.target, m = u.event, S = u.isBackward, g = S === void 0 ? !1 : S;
|
|
543
|
+
s = s || ve(m), v();
|
|
544
|
+
var x = null;
|
|
545
|
+
if (r.tabbableGroups.length > 0) {
|
|
546
|
+
var b = c(s, m), E = b >= 0 ? r.containerGroups[b] : void 0;
|
|
547
|
+
if (b < 0)
|
|
548
|
+
g ? x = r.tabbableGroups[r.tabbableGroups.length - 1].lastTabbableNode : x = r.tabbableGroups[0].firstTabbableNode;
|
|
549
|
+
else if (g) {
|
|
550
|
+
var k = r.tabbableGroups.findIndex(function(Ie) {
|
|
551
|
+
var Le = Ie.firstTabbableNode;
|
|
552
|
+
return s === Le;
|
|
553
|
+
});
|
|
554
|
+
if (k < 0 && (E.container === s || je(s, a.tabbableOptions) && !ie(s, a.tabbableOptions) && !E.nextTabbableNode(s, !1)) && (k = b), k >= 0) {
|
|
555
|
+
var I = k === 0 ? r.tabbableGroups.length - 1 : k - 1, M = r.tabbableGroups[I];
|
|
556
|
+
x = Q(s) >= 0 ? M.lastTabbableNode : M.lastDomTabbableNode;
|
|
557
|
+
} else fe(m) || (x = E.nextTabbableNode(s, !1));
|
|
558
|
+
} else {
|
|
559
|
+
var L = r.tabbableGroups.findIndex(function(Ie) {
|
|
560
|
+
var Le = Ie.lastTabbableNode;
|
|
561
|
+
return s === Le;
|
|
562
|
+
});
|
|
563
|
+
if (L < 0 && (E.container === s || je(s, a.tabbableOptions) && !ie(s, a.tabbableOptions) && !E.nextTabbableNode(s)) && (L = b), L >= 0) {
|
|
564
|
+
var Ce = L === r.tabbableGroups.length - 1 ? 0 : L + 1, z = r.tabbableGroups[Ce];
|
|
565
|
+
x = Q(s) >= 0 ? z.firstTabbableNode : z.firstDomTabbableNode;
|
|
566
|
+
} else fe(m) || (x = E.nextTabbableNode(s));
|
|
567
|
+
}
|
|
568
|
+
} else
|
|
569
|
+
x = f("fallbackFocus");
|
|
570
|
+
return x;
|
|
571
|
+
}, T = function(u) {
|
|
572
|
+
var s = ve(u);
|
|
573
|
+
if (!(c(s, u) >= 0)) {
|
|
574
|
+
if (se(a.clickOutsideDeactivates, u)) {
|
|
575
|
+
i.deactivate({
|
|
576
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
577
|
+
// which will result in the outside click setting focus to the node
|
|
578
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
579
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
580
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
581
|
+
// outside click was on a focusable node or not
|
|
582
|
+
returnFocus: a.returnFocusOnDeactivate
|
|
583
|
+
});
|
|
584
|
+
return;
|
|
585
|
+
}
|
|
586
|
+
se(a.allowOutsideClick, u) || u.preventDefault();
|
|
587
|
+
}
|
|
588
|
+
}, R = function(u) {
|
|
589
|
+
var s = ve(u), m = c(s, u) >= 0;
|
|
590
|
+
if (m || s instanceof Document)
|
|
591
|
+
m && (r.mostRecentlyFocusedNode = s);
|
|
592
|
+
else {
|
|
593
|
+
u.stopImmediatePropagation();
|
|
594
|
+
var S, g = !0;
|
|
595
|
+
if (r.mostRecentlyFocusedNode)
|
|
596
|
+
if (Q(r.mostRecentlyFocusedNode) > 0) {
|
|
597
|
+
var x = c(r.mostRecentlyFocusedNode), b = r.containerGroups[x].tabbableNodes;
|
|
598
|
+
if (b.length > 0) {
|
|
599
|
+
var E = b.findIndex(function(k) {
|
|
600
|
+
return k === r.mostRecentlyFocusedNode;
|
|
601
|
+
});
|
|
602
|
+
E >= 0 && (a.isKeyForward(r.recentNavEvent) ? E + 1 < b.length && (S = b[E + 1], g = !1) : E - 1 >= 0 && (S = b[E - 1], g = !1));
|
|
603
|
+
}
|
|
604
|
+
} else
|
|
605
|
+
r.containerGroups.some(function(k) {
|
|
606
|
+
return k.tabbableNodes.some(function(I) {
|
|
607
|
+
return Q(I) > 0;
|
|
608
|
+
});
|
|
609
|
+
}) || (g = !1);
|
|
610
|
+
else
|
|
611
|
+
g = !1;
|
|
612
|
+
g && (S = w({
|
|
613
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
614
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
615
|
+
target: r.mostRecentlyFocusedNode,
|
|
616
|
+
isBackward: a.isKeyBackward(r.recentNavEvent)
|
|
617
|
+
})), p(S || r.mostRecentlyFocusedNode || d());
|
|
618
|
+
}
|
|
619
|
+
r.recentNavEvent = void 0;
|
|
620
|
+
}, O = function(u) {
|
|
621
|
+
var s = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
622
|
+
r.recentNavEvent = u;
|
|
623
|
+
var m = w({
|
|
624
|
+
event: u,
|
|
625
|
+
isBackward: s
|
|
626
|
+
});
|
|
627
|
+
m && (fe(u) && u.preventDefault(), p(m));
|
|
628
|
+
}, D = function(u) {
|
|
629
|
+
(a.isKeyForward(u) || a.isKeyBackward(u)) && O(u, a.isKeyBackward(u));
|
|
630
|
+
}, A = function(u) {
|
|
631
|
+
ln(u) && se(a.escapeDeactivates, u) !== !1 && (u.preventDefault(), i.deactivate());
|
|
632
|
+
}, j = function(u) {
|
|
633
|
+
var s = ve(u);
|
|
634
|
+
c(s, u) >= 0 || se(a.clickOutsideDeactivates, u) || se(a.allowOutsideClick, u) || (u.preventDefault(), u.stopImmediatePropagation());
|
|
635
|
+
}, F = function() {
|
|
636
|
+
if (r.active)
|
|
637
|
+
return $.activateTrap(o, i), r.delayInitialFocusTimer = a.delayInitialFocus ? Ze(function() {
|
|
638
|
+
p(d());
|
|
639
|
+
}) : p(d()), n.addEventListener("focusin", R, !0), n.addEventListener("mousedown", T, {
|
|
640
|
+
capture: !0,
|
|
641
|
+
passive: !1
|
|
642
|
+
}), n.addEventListener("touchstart", T, {
|
|
643
|
+
capture: !0,
|
|
644
|
+
passive: !1
|
|
645
|
+
}), n.addEventListener("click", j, {
|
|
646
|
+
capture: !0,
|
|
647
|
+
passive: !1
|
|
648
|
+
}), n.addEventListener("keydown", D, {
|
|
649
|
+
capture: !0,
|
|
650
|
+
passive: !1
|
|
651
|
+
}), n.addEventListener("keydown", A), i;
|
|
652
|
+
}, P = function(u) {
|
|
653
|
+
r.active && !r.paused && i._setSubtreeIsolation(!1), r.adjacentElements.clear(), r.alreadySilent.clear();
|
|
654
|
+
var s = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), S = ze(u), g;
|
|
655
|
+
try {
|
|
656
|
+
for (S.s(); !(g = S.n()).done; ) {
|
|
657
|
+
var x = g.value;
|
|
658
|
+
s.add(x);
|
|
659
|
+
for (var b = typeof ShadowRoot < "u" && x.getRootNode() instanceof ShadowRoot, E = x; E; ) {
|
|
660
|
+
s.add(E);
|
|
661
|
+
var k = E.parentElement, I = [];
|
|
662
|
+
k ? I = k.children : !k && b && (I = E.getRootNode().children, k = E.getRootNode().host, b = typeof ShadowRoot < "u" && k.getRootNode() instanceof ShadowRoot);
|
|
663
|
+
var M = ze(I), L;
|
|
664
|
+
try {
|
|
665
|
+
for (M.s(); !(L = M.n()).done; ) {
|
|
666
|
+
var Ce = L.value;
|
|
667
|
+
m.add(Ce);
|
|
668
|
+
}
|
|
669
|
+
} catch (z) {
|
|
670
|
+
M.e(z);
|
|
671
|
+
} finally {
|
|
672
|
+
M.f();
|
|
673
|
+
}
|
|
674
|
+
E = k;
|
|
675
|
+
}
|
|
676
|
+
}
|
|
677
|
+
} catch (z) {
|
|
678
|
+
S.e(z);
|
|
679
|
+
} finally {
|
|
680
|
+
S.f();
|
|
681
|
+
}
|
|
682
|
+
s.forEach(function(z) {
|
|
683
|
+
m.delete(z);
|
|
684
|
+
}), r.adjacentElements = m;
|
|
685
|
+
}, N = function() {
|
|
686
|
+
if (r.active)
|
|
687
|
+
return n.removeEventListener("focusin", R, !0), n.removeEventListener("mousedown", T, !0), n.removeEventListener("touchstart", T, !0), n.removeEventListener("click", j, !0), n.removeEventListener("keydown", D, !0), n.removeEventListener("keydown", A), i;
|
|
688
|
+
}, K = function(u) {
|
|
689
|
+
var s = u.some(function(m) {
|
|
690
|
+
var S = Array.from(m.removedNodes);
|
|
691
|
+
return S.some(function(g) {
|
|
692
|
+
return g === r.mostRecentlyFocusedNode;
|
|
693
|
+
});
|
|
694
|
+
});
|
|
695
|
+
s && p(d());
|
|
696
|
+
}, _ = typeof window < "u" && "MutationObserver" in window ? new MutationObserver(K) : void 0, q = function() {
|
|
697
|
+
_ && (_.disconnect(), r.active && !r.paused && r.containers.map(function(u) {
|
|
698
|
+
_.observe(u, {
|
|
699
|
+
subtree: !0,
|
|
700
|
+
childList: !0
|
|
701
|
+
});
|
|
702
|
+
}));
|
|
703
|
+
};
|
|
704
|
+
return i = {
|
|
705
|
+
get active() {
|
|
706
|
+
return r.active;
|
|
707
|
+
},
|
|
708
|
+
get paused() {
|
|
709
|
+
return r.paused;
|
|
710
|
+
},
|
|
711
|
+
activate: function(u) {
|
|
712
|
+
if (r.active)
|
|
713
|
+
return this;
|
|
714
|
+
var s = l(u, "onActivate"), m = l(u, "onPostActivate"), S = l(u, "checkCanFocusTrap"), g = $.getActiveTrap(o), x = !1;
|
|
715
|
+
if (g && !g.paused) {
|
|
716
|
+
var b;
|
|
717
|
+
(b = g._setSubtreeIsolation) === null || b === void 0 || b.call(g, !1), x = !0;
|
|
718
|
+
}
|
|
719
|
+
try {
|
|
720
|
+
S || v(), r.active = !0, r.paused = !1, r.nodeFocusedBeforeActivation = h(n), s == null || s();
|
|
721
|
+
var E = function() {
|
|
722
|
+
S && v(), F(), q(), a.isolateSubtrees && i._setSubtreeIsolation(!0), m == null || m();
|
|
723
|
+
};
|
|
724
|
+
if (S)
|
|
725
|
+
return S(r.containers.concat()).then(E, E), this;
|
|
726
|
+
E();
|
|
727
|
+
} catch (I) {
|
|
728
|
+
if (g === $.getActiveTrap(o) && x) {
|
|
729
|
+
var k;
|
|
730
|
+
(k = g._setSubtreeIsolation) === null || k === void 0 || k.call(g, !0);
|
|
731
|
+
}
|
|
732
|
+
throw I;
|
|
733
|
+
}
|
|
734
|
+
return this;
|
|
735
|
+
},
|
|
736
|
+
deactivate: function(u) {
|
|
737
|
+
if (!r.active)
|
|
738
|
+
return this;
|
|
739
|
+
var s = Xe({
|
|
740
|
+
onDeactivate: a.onDeactivate,
|
|
741
|
+
onPostDeactivate: a.onPostDeactivate,
|
|
742
|
+
checkCanReturnFocus: a.checkCanReturnFocus
|
|
743
|
+
}, u);
|
|
744
|
+
clearTimeout(r.delayInitialFocusTimer), r.delayInitialFocusTimer = void 0, r.paused || i._setSubtreeIsolation(!1), r.alreadySilent.clear(), N(), r.active = !1, r.paused = !1, q(), $.deactivateTrap(o, i);
|
|
745
|
+
var m = l(s, "onDeactivate"), S = l(s, "onPostDeactivate"), g = l(s, "checkCanReturnFocus"), x = l(s, "returnFocus", "returnFocusOnDeactivate");
|
|
746
|
+
m == null || m();
|
|
747
|
+
var b = function() {
|
|
748
|
+
Ze(function() {
|
|
749
|
+
x && p(y(r.nodeFocusedBeforeActivation)), S == null || S();
|
|
750
|
+
});
|
|
751
|
+
};
|
|
752
|
+
return x && g ? (g(y(r.nodeFocusedBeforeActivation)).then(b, b), this) : (b(), this);
|
|
753
|
+
},
|
|
754
|
+
pause: function(u) {
|
|
755
|
+
return r.active ? (r.manuallyPaused = !0, this._setPausedState(!0, u)) : this;
|
|
756
|
+
},
|
|
757
|
+
unpause: function(u) {
|
|
758
|
+
return r.active ? (r.manuallyPaused = !1, o[o.length - 1] !== this ? this : this._setPausedState(!1, u)) : this;
|
|
759
|
+
},
|
|
760
|
+
updateContainerElements: function(u) {
|
|
761
|
+
var s = [].concat(u).filter(Boolean);
|
|
762
|
+
return r.containers = s.map(function(m) {
|
|
763
|
+
return typeof m == "string" ? n.querySelector(m) : m;
|
|
764
|
+
}), a.isolateSubtrees && P(r.containers), r.active && (v(), a.isolateSubtrees && !r.paused && i._setSubtreeIsolation(!0)), q(), this;
|
|
765
|
+
}
|
|
766
|
+
}, Object.defineProperties(i, {
|
|
767
|
+
_isManuallyPaused: {
|
|
768
|
+
value: function() {
|
|
769
|
+
return r.manuallyPaused;
|
|
770
|
+
}
|
|
771
|
+
},
|
|
772
|
+
_setPausedState: {
|
|
773
|
+
value: function(u, s) {
|
|
774
|
+
if (r.paused === u)
|
|
775
|
+
return this;
|
|
776
|
+
if (r.paused = u, u) {
|
|
777
|
+
var m = l(s, "onPause"), S = l(s, "onPostPause");
|
|
778
|
+
m == null || m(), N(), q(), i._setSubtreeIsolation(!1), S == null || S();
|
|
779
|
+
} else {
|
|
780
|
+
var g = l(s, "onUnpause"), x = l(s, "onPostUnpause");
|
|
781
|
+
g == null || g(), i._setSubtreeIsolation(!0), v(), F(), q(), x == null || x();
|
|
782
|
+
}
|
|
783
|
+
return this;
|
|
784
|
+
}
|
|
785
|
+
},
|
|
786
|
+
_setSubtreeIsolation: {
|
|
787
|
+
value: function(u) {
|
|
788
|
+
a.isolateSubtrees && r.adjacentElements.forEach(function(s) {
|
|
789
|
+
var m;
|
|
790
|
+
u ? a.isolateSubtrees === "aria-hidden" ? ((s.ariaHidden === "true" || ((m = s.getAttribute("aria-hidden")) === null || m === void 0 ? void 0 : m.toLowerCase()) === "true") && r.alreadySilent.add(s), s.setAttribute("aria-hidden", "true")) : ((s.inert || s.hasAttribute("inert")) && r.alreadySilent.add(s), s.setAttribute("inert", !0)) : r.alreadySilent.has(s) || (a.isolateSubtrees === "aria-hidden" ? s.removeAttribute("aria-hidden") : s.removeAttribute("inert"));
|
|
791
|
+
});
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}), i.updateContainerElements(e), i;
|
|
795
|
+
};
|
|
796
|
+
const dn = {
|
|
797
|
+
escapeDeactivates: {
|
|
798
|
+
type: Boolean,
|
|
799
|
+
default: !0
|
|
800
|
+
},
|
|
801
|
+
returnFocusOnDeactivate: {
|
|
802
|
+
type: Boolean,
|
|
803
|
+
default: !0
|
|
804
|
+
},
|
|
805
|
+
allowOutsideClick: {
|
|
806
|
+
type: [Boolean, Function],
|
|
807
|
+
default: !0
|
|
808
|
+
},
|
|
809
|
+
clickOutsideDeactivates: [Boolean, Function],
|
|
810
|
+
initialFocus: [String, Function, Boolean],
|
|
811
|
+
fallbackFocus: [String, Function],
|
|
812
|
+
checkCanFocusTrap: Function,
|
|
813
|
+
checkCanReturnFocus: Function,
|
|
814
|
+
delayInitialFocus: {
|
|
815
|
+
type: Boolean,
|
|
816
|
+
default: !0
|
|
817
|
+
},
|
|
818
|
+
document: Object,
|
|
819
|
+
preventScroll: Boolean,
|
|
820
|
+
setReturnFocus: [Object, String, Boolean, Function],
|
|
821
|
+
tabbableOptions: Object
|
|
822
|
+
}, Jn = Ft({
|
|
823
|
+
props: Object.assign({
|
|
824
|
+
active: {
|
|
825
|
+
// TODO: could be options for activate but what about the options for deactivating?
|
|
826
|
+
type: Boolean,
|
|
827
|
+
default: !0
|
|
828
|
+
}
|
|
829
|
+
}, dn),
|
|
830
|
+
emits: [
|
|
831
|
+
"update:active",
|
|
832
|
+
"activate",
|
|
833
|
+
"postActivate",
|
|
834
|
+
"deactivate",
|
|
835
|
+
"postDeactivate"
|
|
836
|
+
],
|
|
837
|
+
render() {
|
|
838
|
+
return this.renderImpl();
|
|
839
|
+
},
|
|
840
|
+
setup(e, { slots: t, emit: n }) {
|
|
841
|
+
let o;
|
|
842
|
+
const a = J(null), r = U(() => {
|
|
843
|
+
const l = a.value;
|
|
844
|
+
return l && (l instanceof HTMLElement ? l : l.$el);
|
|
845
|
+
});
|
|
846
|
+
function i() {
|
|
847
|
+
return o || (o = fn(r.value, {
|
|
848
|
+
escapeDeactivates: e.escapeDeactivates,
|
|
849
|
+
allowOutsideClick: e.allowOutsideClick,
|
|
850
|
+
returnFocusOnDeactivate: e.returnFocusOnDeactivate,
|
|
851
|
+
clickOutsideDeactivates: e.clickOutsideDeactivates,
|
|
852
|
+
onActivate: () => {
|
|
853
|
+
n("update:active", !0), n("activate");
|
|
854
|
+
},
|
|
855
|
+
onDeactivate: () => {
|
|
856
|
+
n("update:active", !1), n("deactivate");
|
|
857
|
+
},
|
|
858
|
+
onPostActivate: () => n("postActivate"),
|
|
859
|
+
onPostDeactivate: () => n("postDeactivate"),
|
|
860
|
+
initialFocus: e.initialFocus,
|
|
861
|
+
fallbackFocus: e.fallbackFocus,
|
|
862
|
+
tabbableOptions: e.tabbableOptions,
|
|
863
|
+
delayInitialFocus: e.delayInitialFocus
|
|
864
|
+
}));
|
|
865
|
+
}
|
|
866
|
+
return Nt(() => {
|
|
867
|
+
be(() => e.active, (l) => {
|
|
868
|
+
l && r.value ? i().activate() : o && (o.deactivate(), (!r.value || r.value.nodeType === Node.COMMENT_NODE) && (o = null));
|
|
869
|
+
}, { immediate: !0, flush: "post" });
|
|
870
|
+
}), Ct(() => {
|
|
871
|
+
o && o.deactivate(), o = null;
|
|
872
|
+
}), {
|
|
873
|
+
activate() {
|
|
874
|
+
i().activate();
|
|
875
|
+
},
|
|
876
|
+
deactivate() {
|
|
877
|
+
o && o.deactivate();
|
|
878
|
+
},
|
|
879
|
+
renderImpl() {
|
|
880
|
+
if (!t.default)
|
|
881
|
+
return null;
|
|
882
|
+
const l = t.default().filter((c) => c.type !== It);
|
|
883
|
+
return !l || !l.length || l.length > 1 ? (console.error("[focus-trap-vue]: FocusTrap requires exactly one child."), l) : Lt(l[0], { ref: a });
|
|
884
|
+
}
|
|
885
|
+
};
|
|
886
|
+
}
|
|
887
|
+
}), Ee = Math.min, ee = Math.max, Te = Math.round, me = Math.floor, V = (e) => ({
|
|
888
|
+
x: e,
|
|
889
|
+
y: e
|
|
890
|
+
}), pn = {
|
|
891
|
+
left: "right",
|
|
892
|
+
right: "left",
|
|
893
|
+
bottom: "top",
|
|
894
|
+
top: "bottom"
|
|
895
|
+
};
|
|
896
|
+
function Je(e, t, n) {
|
|
897
|
+
return ee(e, Ee(t, n));
|
|
898
|
+
}
|
|
899
|
+
function ke(e, t) {
|
|
900
|
+
return typeof e == "function" ? e(t) : e;
|
|
901
|
+
}
|
|
902
|
+
function ne(e) {
|
|
903
|
+
return e.split("-")[0];
|
|
904
|
+
}
|
|
905
|
+
function De(e) {
|
|
906
|
+
return e.split("-")[1];
|
|
907
|
+
}
|
|
908
|
+
function mt(e) {
|
|
909
|
+
return e === "x" ? "y" : "x";
|
|
910
|
+
}
|
|
911
|
+
function ht(e) {
|
|
912
|
+
return e === "y" ? "height" : "width";
|
|
913
|
+
}
|
|
914
|
+
function Y(e) {
|
|
915
|
+
const t = e[0];
|
|
916
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
917
|
+
}
|
|
918
|
+
function bt(e) {
|
|
919
|
+
return mt(Y(e));
|
|
920
|
+
}
|
|
921
|
+
function vn(e, t, n) {
|
|
922
|
+
n === void 0 && (n = !1);
|
|
923
|
+
const o = De(e), a = bt(e), r = ht(a);
|
|
924
|
+
let i = a === "x" ? o === (n ? "end" : "start") ? "right" : "left" : o === "start" ? "bottom" : "top";
|
|
925
|
+
return t.reference[r] > t.floating[r] && (i = Re(i)), [i, Re(i)];
|
|
926
|
+
}
|
|
927
|
+
function mn(e) {
|
|
928
|
+
const t = Re(e);
|
|
929
|
+
return [Ve(e), t, Ve(t)];
|
|
930
|
+
}
|
|
931
|
+
function Ve(e) {
|
|
932
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
933
|
+
}
|
|
934
|
+
const Qe = ["left", "right"], et = ["right", "left"], hn = ["top", "bottom"], bn = ["bottom", "top"];
|
|
935
|
+
function yn(e, t, n) {
|
|
936
|
+
switch (e) {
|
|
937
|
+
case "top":
|
|
938
|
+
case "bottom":
|
|
939
|
+
return n ? t ? et : Qe : t ? Qe : et;
|
|
940
|
+
case "left":
|
|
941
|
+
case "right":
|
|
942
|
+
return t ? hn : bn;
|
|
943
|
+
default:
|
|
944
|
+
return [];
|
|
945
|
+
}
|
|
946
|
+
}
|
|
947
|
+
function gn(e, t, n, o) {
|
|
948
|
+
const a = De(e);
|
|
949
|
+
let r = yn(ne(e), n === "start", o);
|
|
950
|
+
return a && (r = r.map((i) => i + "-" + a), t && (r = r.concat(r.map(Ve)))), r;
|
|
951
|
+
}
|
|
952
|
+
function Re(e) {
|
|
953
|
+
const t = ne(e);
|
|
954
|
+
return pn[t] + e.slice(t.length);
|
|
955
|
+
}
|
|
956
|
+
function wn(e) {
|
|
957
|
+
return {
|
|
958
|
+
top: 0,
|
|
959
|
+
right: 0,
|
|
960
|
+
bottom: 0,
|
|
961
|
+
left: 0,
|
|
962
|
+
...e
|
|
963
|
+
};
|
|
964
|
+
}
|
|
965
|
+
function xn(e) {
|
|
966
|
+
return typeof e != "number" ? wn(e) : {
|
|
967
|
+
top: e,
|
|
968
|
+
right: e,
|
|
969
|
+
bottom: e,
|
|
970
|
+
left: e
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
function Oe(e) {
|
|
974
|
+
const {
|
|
975
|
+
x: t,
|
|
976
|
+
y: n,
|
|
977
|
+
width: o,
|
|
978
|
+
height: a
|
|
979
|
+
} = e;
|
|
980
|
+
return {
|
|
981
|
+
width: o,
|
|
982
|
+
height: a,
|
|
983
|
+
top: n,
|
|
984
|
+
left: t,
|
|
985
|
+
right: t + o,
|
|
986
|
+
bottom: n + a,
|
|
987
|
+
x: t,
|
|
988
|
+
y: n
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
function tt(e, t, n) {
|
|
992
|
+
let {
|
|
993
|
+
reference: o,
|
|
994
|
+
floating: a
|
|
995
|
+
} = e;
|
|
996
|
+
const r = Y(t), i = bt(t), l = ht(i), c = ne(t), f = r === "y", d = o.x + o.width / 2 - a.width / 2, v = o.y + o.height / 2 - a.height / 2, h = o[l] / 2 - a[l] / 2;
|
|
997
|
+
let p;
|
|
998
|
+
switch (c) {
|
|
999
|
+
case "top":
|
|
1000
|
+
p = {
|
|
1001
|
+
x: d,
|
|
1002
|
+
y: o.y - a.height
|
|
1003
|
+
};
|
|
1004
|
+
break;
|
|
1005
|
+
case "bottom":
|
|
1006
|
+
p = {
|
|
1007
|
+
x: d,
|
|
1008
|
+
y: o.y + o.height
|
|
1009
|
+
};
|
|
1010
|
+
break;
|
|
1011
|
+
case "right":
|
|
1012
|
+
p = {
|
|
1013
|
+
x: o.x + o.width,
|
|
1014
|
+
y: v
|
|
1015
|
+
};
|
|
1016
|
+
break;
|
|
1017
|
+
case "left":
|
|
1018
|
+
p = {
|
|
1019
|
+
x: o.x - a.width,
|
|
1020
|
+
y: v
|
|
1021
|
+
};
|
|
1022
|
+
break;
|
|
1023
|
+
default:
|
|
1024
|
+
p = {
|
|
1025
|
+
x: o.x,
|
|
1026
|
+
y: o.y
|
|
1027
|
+
};
|
|
1028
|
+
}
|
|
1029
|
+
switch (De(t)) {
|
|
1030
|
+
case "start":
|
|
1031
|
+
p[i] -= h * (n && f ? -1 : 1);
|
|
1032
|
+
break;
|
|
1033
|
+
case "end":
|
|
1034
|
+
p[i] += h * (n && f ? -1 : 1);
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
return p;
|
|
1038
|
+
}
|
|
1039
|
+
async function Sn(e, t) {
|
|
1040
|
+
var n;
|
|
1041
|
+
t === void 0 && (t = {});
|
|
1042
|
+
const {
|
|
1043
|
+
x: o,
|
|
1044
|
+
y: a,
|
|
1045
|
+
platform: r,
|
|
1046
|
+
rects: i,
|
|
1047
|
+
elements: l,
|
|
1048
|
+
strategy: c
|
|
1049
|
+
} = e, {
|
|
1050
|
+
boundary: f = "clippingAncestors",
|
|
1051
|
+
rootBoundary: d = "viewport",
|
|
1052
|
+
elementContext: v = "floating",
|
|
1053
|
+
altBoundary: h = !1,
|
|
1054
|
+
padding: p = 0
|
|
1055
|
+
} = ke(t, e), y = xn(p), w = l[h ? v === "floating" ? "reference" : "floating" : v], T = Oe(await r.getClippingRect({
|
|
1056
|
+
element: (n = await (r.isElement == null ? void 0 : r.isElement(w))) == null || n ? w : w.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(l.floating)),
|
|
1057
|
+
boundary: f,
|
|
1058
|
+
rootBoundary: d,
|
|
1059
|
+
strategy: c
|
|
1060
|
+
})), R = v === "floating" ? {
|
|
1061
|
+
x: o,
|
|
1062
|
+
y: a,
|
|
1063
|
+
width: i.floating.width,
|
|
1064
|
+
height: i.floating.height
|
|
1065
|
+
} : i.reference, O = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(l.floating)), D = await (r.isElement == null ? void 0 : r.isElement(O)) ? await (r.getScale == null ? void 0 : r.getScale(O)) || {
|
|
1066
|
+
x: 1,
|
|
1067
|
+
y: 1
|
|
1068
|
+
} : {
|
|
1069
|
+
x: 1,
|
|
1070
|
+
y: 1
|
|
1071
|
+
}, A = Oe(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1072
|
+
elements: l,
|
|
1073
|
+
rect: R,
|
|
1074
|
+
offsetParent: O,
|
|
1075
|
+
strategy: c
|
|
1076
|
+
}) : R);
|
|
1077
|
+
return {
|
|
1078
|
+
top: (T.top - A.top + y.top) / D.y,
|
|
1079
|
+
bottom: (A.bottom - T.bottom + y.bottom) / D.y,
|
|
1080
|
+
left: (T.left - A.left + y.left) / D.x,
|
|
1081
|
+
right: (A.right - T.right + y.right) / D.x
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
const En = 50, Tn = async (e, t, n) => {
|
|
1085
|
+
const {
|
|
1086
|
+
placement: o = "bottom",
|
|
1087
|
+
strategy: a = "absolute",
|
|
1088
|
+
middleware: r = [],
|
|
1089
|
+
platform: i
|
|
1090
|
+
} = n, l = i.detectOverflow ? i : {
|
|
1091
|
+
...i,
|
|
1092
|
+
detectOverflow: Sn
|
|
1093
|
+
}, c = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
1094
|
+
let f = await i.getElementRects({
|
|
1095
|
+
reference: e,
|
|
1096
|
+
floating: t,
|
|
1097
|
+
strategy: a
|
|
1098
|
+
}), {
|
|
1099
|
+
x: d,
|
|
1100
|
+
y: v
|
|
1101
|
+
} = tt(f, o, c), h = o, p = 0;
|
|
1102
|
+
const y = {};
|
|
1103
|
+
for (let w = 0; w < r.length; w++) {
|
|
1104
|
+
const T = r[w];
|
|
1105
|
+
if (!T)
|
|
1106
|
+
continue;
|
|
1107
|
+
const {
|
|
1108
|
+
name: R,
|
|
1109
|
+
fn: O
|
|
1110
|
+
} = T, {
|
|
1111
|
+
x: D,
|
|
1112
|
+
y: A,
|
|
1113
|
+
data: j,
|
|
1114
|
+
reset: F
|
|
1115
|
+
} = await O({
|
|
1116
|
+
x: d,
|
|
1117
|
+
y: v,
|
|
1118
|
+
initialPlacement: o,
|
|
1119
|
+
placement: h,
|
|
1120
|
+
strategy: a,
|
|
1121
|
+
middlewareData: y,
|
|
1122
|
+
rects: f,
|
|
1123
|
+
platform: l,
|
|
1124
|
+
elements: {
|
|
1125
|
+
reference: e,
|
|
1126
|
+
floating: t
|
|
1127
|
+
}
|
|
1128
|
+
});
|
|
1129
|
+
d = D ?? d, v = A ?? v, y[R] = {
|
|
1130
|
+
...y[R],
|
|
1131
|
+
...j
|
|
1132
|
+
}, F && p < En && (p++, typeof F == "object" && (F.placement && (h = F.placement), F.rects && (f = F.rects === !0 ? await i.getElementRects({
|
|
1133
|
+
reference: e,
|
|
1134
|
+
floating: t,
|
|
1135
|
+
strategy: a
|
|
1136
|
+
}) : F.rects), {
|
|
1137
|
+
x: d,
|
|
1138
|
+
y: v
|
|
1139
|
+
} = tt(f, h, c)), w = -1);
|
|
1140
|
+
}
|
|
1141
|
+
return {
|
|
1142
|
+
x: d,
|
|
1143
|
+
y: v,
|
|
1144
|
+
placement: h,
|
|
1145
|
+
strategy: a,
|
|
1146
|
+
middlewareData: y
|
|
1147
|
+
};
|
|
1148
|
+
}, Rn = function(e) {
|
|
1149
|
+
return e === void 0 && (e = {}), {
|
|
1150
|
+
name: "flip",
|
|
1151
|
+
options: e,
|
|
1152
|
+
async fn(t) {
|
|
1153
|
+
var n, o;
|
|
1154
|
+
const {
|
|
1155
|
+
placement: a,
|
|
1156
|
+
middlewareData: r,
|
|
1157
|
+
rects: i,
|
|
1158
|
+
initialPlacement: l,
|
|
1159
|
+
platform: c,
|
|
1160
|
+
elements: f
|
|
1161
|
+
} = t, {
|
|
1162
|
+
mainAxis: d = !0,
|
|
1163
|
+
crossAxis: v = !0,
|
|
1164
|
+
fallbackPlacements: h,
|
|
1165
|
+
fallbackStrategy: p = "bestFit",
|
|
1166
|
+
fallbackAxisSideDirection: y = "none",
|
|
1167
|
+
flipAlignment: w = !0,
|
|
1168
|
+
...T
|
|
1169
|
+
} = ke(e, t);
|
|
1170
|
+
if ((n = r.arrow) != null && n.alignmentOffset)
|
|
1171
|
+
return {};
|
|
1172
|
+
const R = ne(a), O = Y(l), D = ne(l) === l, A = await (c.isRTL == null ? void 0 : c.isRTL(f.floating)), j = h || (D || !w ? [Re(l)] : mn(l)), F = y !== "none";
|
|
1173
|
+
!h && F && j.push(...gn(l, w, y, A));
|
|
1174
|
+
const P = [l, ...j], N = await c.detectOverflow(t, T), K = [];
|
|
1175
|
+
let _ = ((o = r.flip) == null ? void 0 : o.overflows) || [];
|
|
1176
|
+
if (d && K.push(N[R]), v) {
|
|
1177
|
+
const m = vn(a, i, A);
|
|
1178
|
+
K.push(N[m[0]], N[m[1]]);
|
|
1179
|
+
}
|
|
1180
|
+
if (_ = [..._, {
|
|
1181
|
+
placement: a,
|
|
1182
|
+
overflows: K
|
|
1183
|
+
}], !K.every((m) => m <= 0)) {
|
|
1184
|
+
var q, u;
|
|
1185
|
+
const m = (((q = r.flip) == null ? void 0 : q.index) || 0) + 1, S = P[m];
|
|
1186
|
+
if (S && (!(v === "alignment" && O !== Y(S)) || // We leave the current main axis only if every placement on that axis
|
|
1187
|
+
// overflows the main axis.
|
|
1188
|
+
_.every((x) => Y(x.placement) === O ? x.overflows[0] > 0 : !0)))
|
|
1189
|
+
return {
|
|
1190
|
+
data: {
|
|
1191
|
+
index: m,
|
|
1192
|
+
overflows: _
|
|
1193
|
+
},
|
|
1194
|
+
reset: {
|
|
1195
|
+
placement: S
|
|
1196
|
+
}
|
|
1197
|
+
};
|
|
1198
|
+
let g = (u = _.filter((x) => x.overflows[0] <= 0).sort((x, b) => x.overflows[1] - b.overflows[1])[0]) == null ? void 0 : u.placement;
|
|
1199
|
+
if (!g)
|
|
1200
|
+
switch (p) {
|
|
1201
|
+
case "bestFit": {
|
|
1202
|
+
var s;
|
|
1203
|
+
const x = (s = _.filter((b) => {
|
|
1204
|
+
if (F) {
|
|
1205
|
+
const E = Y(b.placement);
|
|
1206
|
+
return E === O || // Create a bias to the `y` side axis due to horizontal
|
|
1207
|
+
// reading directions favoring greater width.
|
|
1208
|
+
E === "y";
|
|
1209
|
+
}
|
|
1210
|
+
return !0;
|
|
1211
|
+
}).map((b) => [b.placement, b.overflows.filter((E) => E > 0).reduce((E, k) => E + k, 0)]).sort((b, E) => b[1] - E[1])[0]) == null ? void 0 : s[0];
|
|
1212
|
+
x && (g = x);
|
|
1213
|
+
break;
|
|
1214
|
+
}
|
|
1215
|
+
case "initialPlacement":
|
|
1216
|
+
g = l;
|
|
1217
|
+
break;
|
|
1218
|
+
}
|
|
1219
|
+
if (a !== g)
|
|
1220
|
+
return {
|
|
1221
|
+
reset: {
|
|
1222
|
+
placement: g
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
}
|
|
1226
|
+
return {};
|
|
1227
|
+
}
|
|
1228
|
+
};
|
|
1229
|
+
}, On = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1230
|
+
async function kn(e, t) {
|
|
1231
|
+
const {
|
|
1232
|
+
placement: n,
|
|
1233
|
+
platform: o,
|
|
1234
|
+
elements: a
|
|
1235
|
+
} = e, r = await (o.isRTL == null ? void 0 : o.isRTL(a.floating)), i = ne(n), l = De(n), c = Y(n) === "y", f = On.has(i) ? -1 : 1, d = r && c ? -1 : 1, v = ke(t, e);
|
|
1236
|
+
let {
|
|
1237
|
+
mainAxis: h,
|
|
1238
|
+
crossAxis: p,
|
|
1239
|
+
alignmentAxis: y
|
|
1240
|
+
} = typeof v == "number" ? {
|
|
1241
|
+
mainAxis: v,
|
|
1242
|
+
crossAxis: 0,
|
|
1243
|
+
alignmentAxis: null
|
|
1244
|
+
} : {
|
|
1245
|
+
mainAxis: v.mainAxis || 0,
|
|
1246
|
+
crossAxis: v.crossAxis || 0,
|
|
1247
|
+
alignmentAxis: v.alignmentAxis
|
|
1248
|
+
};
|
|
1249
|
+
return l && typeof y == "number" && (p = l === "end" ? y * -1 : y), c ? {
|
|
1250
|
+
x: p * d,
|
|
1251
|
+
y: h * f
|
|
1252
|
+
} : {
|
|
1253
|
+
x: h * f,
|
|
1254
|
+
y: p * d
|
|
1255
|
+
};
|
|
1256
|
+
}
|
|
1257
|
+
const Dn = function(e) {
|
|
1258
|
+
return e === void 0 && (e = 0), {
|
|
1259
|
+
name: "offset",
|
|
1260
|
+
options: e,
|
|
1261
|
+
async fn(t) {
|
|
1262
|
+
var n, o;
|
|
1263
|
+
const {
|
|
1264
|
+
x: a,
|
|
1265
|
+
y: r,
|
|
1266
|
+
placement: i,
|
|
1267
|
+
middlewareData: l
|
|
1268
|
+
} = t, c = await kn(t, e);
|
|
1269
|
+
return i === ((n = l.offset) == null ? void 0 : n.placement) && (o = l.arrow) != null && o.alignmentOffset ? {} : {
|
|
1270
|
+
x: a + c.x,
|
|
1271
|
+
y: r + c.y,
|
|
1272
|
+
data: {
|
|
1273
|
+
...c,
|
|
1274
|
+
placement: i
|
|
1275
|
+
}
|
|
1276
|
+
};
|
|
1277
|
+
}
|
|
1278
|
+
};
|
|
1279
|
+
}, An = function(e) {
|
|
1280
|
+
return e === void 0 && (e = {}), {
|
|
1281
|
+
name: "shift",
|
|
1282
|
+
options: e,
|
|
1283
|
+
async fn(t) {
|
|
1284
|
+
const {
|
|
1285
|
+
x: n,
|
|
1286
|
+
y: o,
|
|
1287
|
+
placement: a,
|
|
1288
|
+
platform: r
|
|
1289
|
+
} = t, {
|
|
1290
|
+
mainAxis: i = !0,
|
|
1291
|
+
crossAxis: l = !1,
|
|
1292
|
+
limiter: c = {
|
|
1293
|
+
fn: (R) => {
|
|
1294
|
+
let {
|
|
1295
|
+
x: O,
|
|
1296
|
+
y: D
|
|
1297
|
+
} = R;
|
|
1298
|
+
return {
|
|
1299
|
+
x: O,
|
|
1300
|
+
y: D
|
|
1301
|
+
};
|
|
1302
|
+
}
|
|
1303
|
+
},
|
|
1304
|
+
...f
|
|
1305
|
+
} = ke(e, t), d = {
|
|
1306
|
+
x: n,
|
|
1307
|
+
y: o
|
|
1308
|
+
}, v = await r.detectOverflow(t, f), h = Y(ne(a)), p = mt(h);
|
|
1309
|
+
let y = d[p], w = d[h];
|
|
1310
|
+
if (i) {
|
|
1311
|
+
const R = p === "y" ? "top" : "left", O = p === "y" ? "bottom" : "right", D = y + v[R], A = y - v[O];
|
|
1312
|
+
y = Je(D, y, A);
|
|
1313
|
+
}
|
|
1314
|
+
if (l) {
|
|
1315
|
+
const R = h === "y" ? "top" : "left", O = h === "y" ? "bottom" : "right", D = w + v[R], A = w - v[O];
|
|
1316
|
+
w = Je(D, w, A);
|
|
1317
|
+
}
|
|
1318
|
+
const T = c.fn({
|
|
1319
|
+
...t,
|
|
1320
|
+
[p]: y,
|
|
1321
|
+
[h]: w
|
|
1322
|
+
});
|
|
1323
|
+
return {
|
|
1324
|
+
...T,
|
|
1325
|
+
data: {
|
|
1326
|
+
x: T.x - n,
|
|
1327
|
+
y: T.y - o,
|
|
1328
|
+
enabled: {
|
|
1329
|
+
[p]: i,
|
|
1330
|
+
[h]: l
|
|
1331
|
+
}
|
|
1332
|
+
}
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
};
|
|
1336
|
+
};
|
|
1337
|
+
function Ae() {
|
|
1338
|
+
return typeof window < "u";
|
|
1339
|
+
}
|
|
1340
|
+
function re(e) {
|
|
1341
|
+
return Ke(e) ? (e.nodeName || "").toLowerCase() : "#document";
|
|
1342
|
+
}
|
|
1343
|
+
function C(e) {
|
|
1344
|
+
var t;
|
|
1345
|
+
return (e == null || (t = e.ownerDocument) == null ? void 0 : t.defaultView) || window;
|
|
1346
|
+
}
|
|
1347
|
+
function H(e) {
|
|
1348
|
+
var t;
|
|
1349
|
+
return (t = (Ke(e) ? e.ownerDocument : e.document) || window.document) == null ? void 0 : t.documentElement;
|
|
1350
|
+
}
|
|
1351
|
+
function Ke(e) {
|
|
1352
|
+
return Ae() ? e instanceof Node || e instanceof C(e).Node : !1;
|
|
1353
|
+
}
|
|
1354
|
+
function B(e) {
|
|
1355
|
+
return Ae() ? e instanceof Element || e instanceof C(e).Element : !1;
|
|
1356
|
+
}
|
|
1357
|
+
function W(e) {
|
|
1358
|
+
return Ae() ? e instanceof HTMLElement || e instanceof C(e).HTMLElement : !1;
|
|
1359
|
+
}
|
|
1360
|
+
function nt(e) {
|
|
1361
|
+
return !Ae() || typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof C(e).ShadowRoot;
|
|
1362
|
+
}
|
|
1363
|
+
function pe(e) {
|
|
1364
|
+
const {
|
|
1365
|
+
overflow: t,
|
|
1366
|
+
overflowX: n,
|
|
1367
|
+
overflowY: o,
|
|
1368
|
+
display: a
|
|
1369
|
+
} = G(e);
|
|
1370
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + o + n) && a !== "inline" && a !== "contents";
|
|
1371
|
+
}
|
|
1372
|
+
function Fn(e) {
|
|
1373
|
+
return /^(table|td|th)$/.test(re(e));
|
|
1374
|
+
}
|
|
1375
|
+
function Fe(e) {
|
|
1376
|
+
try {
|
|
1377
|
+
if (e.matches(":popover-open"))
|
|
1378
|
+
return !0;
|
|
1379
|
+
} catch {
|
|
1380
|
+
}
|
|
1381
|
+
try {
|
|
1382
|
+
return e.matches(":modal");
|
|
1383
|
+
} catch {
|
|
1384
|
+
return !1;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
const Pn = /transform|translate|scale|rotate|perspective|filter/, Nn = /paint|layout|strict|content/, Z = (e) => !!e && e !== "none";
|
|
1388
|
+
let Be;
|
|
1389
|
+
function Ue(e) {
|
|
1390
|
+
const t = B(e) ? G(e) : e;
|
|
1391
|
+
return Z(t.transform) || Z(t.translate) || Z(t.scale) || Z(t.rotate) || Z(t.perspective) || !$e() && (Z(t.backdropFilter) || Z(t.filter)) || Pn.test(t.willChange || "") || Nn.test(t.contain || "");
|
|
1392
|
+
}
|
|
1393
|
+
function Cn(e) {
|
|
1394
|
+
let t = X(e);
|
|
1395
|
+
for (; W(t) && !ue(t); ) {
|
|
1396
|
+
if (Ue(t))
|
|
1397
|
+
return t;
|
|
1398
|
+
if (Fe(t))
|
|
1399
|
+
return null;
|
|
1400
|
+
t = X(t);
|
|
1401
|
+
}
|
|
1402
|
+
return null;
|
|
1403
|
+
}
|
|
1404
|
+
function $e() {
|
|
1405
|
+
return Be == null && (Be = typeof CSS < "u" && CSS.supports && CSS.supports("-webkit-backdrop-filter", "none")), Be;
|
|
1406
|
+
}
|
|
1407
|
+
function ue(e) {
|
|
1408
|
+
return /^(html|body|#document)$/.test(re(e));
|
|
1409
|
+
}
|
|
1410
|
+
function G(e) {
|
|
1411
|
+
return C(e).getComputedStyle(e);
|
|
1412
|
+
}
|
|
1413
|
+
function Pe(e) {
|
|
1414
|
+
return B(e) ? {
|
|
1415
|
+
scrollLeft: e.scrollLeft,
|
|
1416
|
+
scrollTop: e.scrollTop
|
|
1417
|
+
} : {
|
|
1418
|
+
scrollLeft: e.scrollX,
|
|
1419
|
+
scrollTop: e.scrollY
|
|
1420
|
+
};
|
|
1421
|
+
}
|
|
1422
|
+
function X(e) {
|
|
1423
|
+
if (re(e) === "html")
|
|
1424
|
+
return e;
|
|
1425
|
+
const t = (
|
|
1426
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
1427
|
+
e.assignedSlot || // DOM Element detected.
|
|
1428
|
+
e.parentNode || // ShadowRoot detected.
|
|
1429
|
+
nt(e) && e.host || // Fallback.
|
|
1430
|
+
H(e)
|
|
1431
|
+
);
|
|
1432
|
+
return nt(t) ? t.host : t;
|
|
1433
|
+
}
|
|
1434
|
+
function yt(e) {
|
|
1435
|
+
const t = X(e);
|
|
1436
|
+
return ue(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : W(t) && pe(t) ? t : yt(t);
|
|
1437
|
+
}
|
|
1438
|
+
function de(e, t, n) {
|
|
1439
|
+
var o;
|
|
1440
|
+
t === void 0 && (t = []), n === void 0 && (n = !0);
|
|
1441
|
+
const a = yt(e), r = a === ((o = e.ownerDocument) == null ? void 0 : o.body), i = C(a);
|
|
1442
|
+
if (r) {
|
|
1443
|
+
const l = He(i);
|
|
1444
|
+
return t.concat(i, i.visualViewport || [], pe(a) ? a : [], l && n ? de(l) : []);
|
|
1445
|
+
} else
|
|
1446
|
+
return t.concat(a, de(a, [], n));
|
|
1447
|
+
}
|
|
1448
|
+
function He(e) {
|
|
1449
|
+
return e.parent && Object.getPrototypeOf(e.parent) ? e.frameElement : null;
|
|
1450
|
+
}
|
|
1451
|
+
function gt(e) {
|
|
1452
|
+
const t = G(e);
|
|
1453
|
+
let n = parseFloat(t.width) || 0, o = parseFloat(t.height) || 0;
|
|
1454
|
+
const a = W(e), r = a ? e.offsetWidth : n, i = a ? e.offsetHeight : o, l = Te(n) !== r || Te(o) !== i;
|
|
1455
|
+
return l && (n = r, o = i), {
|
|
1456
|
+
width: n,
|
|
1457
|
+
height: o,
|
|
1458
|
+
$: l
|
|
1459
|
+
};
|
|
1460
|
+
}
|
|
1461
|
+
function We(e) {
|
|
1462
|
+
return B(e) ? e : e.contextElement;
|
|
1463
|
+
}
|
|
1464
|
+
function le(e) {
|
|
1465
|
+
const t = We(e);
|
|
1466
|
+
if (!W(t))
|
|
1467
|
+
return V(1);
|
|
1468
|
+
const n = t.getBoundingClientRect(), {
|
|
1469
|
+
width: o,
|
|
1470
|
+
height: a,
|
|
1471
|
+
$: r
|
|
1472
|
+
} = gt(t);
|
|
1473
|
+
let i = (r ? Te(n.width) : n.width) / o, l = (r ? Te(n.height) : n.height) / a;
|
|
1474
|
+
return (!i || !Number.isFinite(i)) && (i = 1), (!l || !Number.isFinite(l)) && (l = 1), {
|
|
1475
|
+
x: i,
|
|
1476
|
+
y: l
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
const In = /* @__PURE__ */ V(0);
|
|
1480
|
+
function wt(e) {
|
|
1481
|
+
const t = C(e);
|
|
1482
|
+
return !$e() || !t.visualViewport ? In : {
|
|
1483
|
+
x: t.visualViewport.offsetLeft,
|
|
1484
|
+
y: t.visualViewport.offsetTop
|
|
1485
|
+
};
|
|
1486
|
+
}
|
|
1487
|
+
function Ln(e, t, n) {
|
|
1488
|
+
return t === void 0 && (t = !1), !n || t && n !== C(e) ? !1 : t;
|
|
1489
|
+
}
|
|
1490
|
+
function oe(e, t, n, o) {
|
|
1491
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1492
|
+
const a = e.getBoundingClientRect(), r = We(e);
|
|
1493
|
+
let i = V(1);
|
|
1494
|
+
t && (o ? B(o) && (i = le(o)) : i = le(e));
|
|
1495
|
+
const l = Ln(r, n, o) ? wt(r) : V(0);
|
|
1496
|
+
let c = (a.left + l.x) / i.x, f = (a.top + l.y) / i.y, d = a.width / i.x, v = a.height / i.y;
|
|
1497
|
+
if (r) {
|
|
1498
|
+
const h = C(r), p = o && B(o) ? C(o) : o;
|
|
1499
|
+
let y = h, w = He(y);
|
|
1500
|
+
for (; w && o && p !== y; ) {
|
|
1501
|
+
const T = le(w), R = w.getBoundingClientRect(), O = G(w), D = R.left + (w.clientLeft + parseFloat(O.paddingLeft)) * T.x, A = R.top + (w.clientTop + parseFloat(O.paddingTop)) * T.y;
|
|
1502
|
+
c *= T.x, f *= T.y, d *= T.x, v *= T.y, c += D, f += A, y = C(w), w = He(y);
|
|
1503
|
+
}
|
|
1504
|
+
}
|
|
1505
|
+
return Oe({
|
|
1506
|
+
width: d,
|
|
1507
|
+
height: v,
|
|
1508
|
+
x: c,
|
|
1509
|
+
y: f
|
|
1510
|
+
});
|
|
1511
|
+
}
|
|
1512
|
+
function Ne(e, t) {
|
|
1513
|
+
const n = Pe(e).scrollLeft;
|
|
1514
|
+
return t ? t.left + n : oe(H(e)).left + n;
|
|
1515
|
+
}
|
|
1516
|
+
function xt(e, t) {
|
|
1517
|
+
const n = e.getBoundingClientRect(), o = n.left + t.scrollLeft - Ne(e, n), a = n.top + t.scrollTop;
|
|
1518
|
+
return {
|
|
1519
|
+
x: o,
|
|
1520
|
+
y: a
|
|
1521
|
+
};
|
|
1522
|
+
}
|
|
1523
|
+
function jn(e) {
|
|
1524
|
+
let {
|
|
1525
|
+
elements: t,
|
|
1526
|
+
rect: n,
|
|
1527
|
+
offsetParent: o,
|
|
1528
|
+
strategy: a
|
|
1529
|
+
} = e;
|
|
1530
|
+
const r = a === "fixed", i = H(o), l = t ? Fe(t.floating) : !1;
|
|
1531
|
+
if (o === i || l && r)
|
|
1532
|
+
return n;
|
|
1533
|
+
let c = {
|
|
1534
|
+
scrollLeft: 0,
|
|
1535
|
+
scrollTop: 0
|
|
1536
|
+
}, f = V(1);
|
|
1537
|
+
const d = V(0), v = W(o);
|
|
1538
|
+
if ((v || !v && !r) && ((re(o) !== "body" || pe(i)) && (c = Pe(o)), v)) {
|
|
1539
|
+
const p = oe(o);
|
|
1540
|
+
f = le(o), d.x = p.x + o.clientLeft, d.y = p.y + o.clientTop;
|
|
1541
|
+
}
|
|
1542
|
+
const h = i && !v && !r ? xt(i, c) : V(0);
|
|
1543
|
+
return {
|
|
1544
|
+
width: n.width * f.x,
|
|
1545
|
+
height: n.height * f.y,
|
|
1546
|
+
x: n.x * f.x - c.scrollLeft * f.x + d.x + h.x,
|
|
1547
|
+
y: n.y * f.y - c.scrollTop * f.y + d.y + h.y
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
function Bn(e) {
|
|
1551
|
+
return Array.from(e.getClientRects());
|
|
1552
|
+
}
|
|
1553
|
+
function Gn(e) {
|
|
1554
|
+
const t = H(e), n = Pe(e), o = e.ownerDocument.body, a = ee(t.scrollWidth, t.clientWidth, o.scrollWidth, o.clientWidth), r = ee(t.scrollHeight, t.clientHeight, o.scrollHeight, o.clientHeight);
|
|
1555
|
+
let i = -n.scrollLeft + Ne(e);
|
|
1556
|
+
const l = -n.scrollTop;
|
|
1557
|
+
return G(o).direction === "rtl" && (i += ee(t.clientWidth, o.clientWidth) - a), {
|
|
1558
|
+
width: a,
|
|
1559
|
+
height: r,
|
|
1560
|
+
x: i,
|
|
1561
|
+
y: l
|
|
1562
|
+
};
|
|
1563
|
+
}
|
|
1564
|
+
const ot = 25;
|
|
1565
|
+
function _n(e, t) {
|
|
1566
|
+
const n = C(e), o = H(e), a = n.visualViewport;
|
|
1567
|
+
let r = o.clientWidth, i = o.clientHeight, l = 0, c = 0;
|
|
1568
|
+
if (a) {
|
|
1569
|
+
r = a.width, i = a.height;
|
|
1570
|
+
const d = $e();
|
|
1571
|
+
(!d || d && t === "fixed") && (l = a.offsetLeft, c = a.offsetTop);
|
|
1572
|
+
}
|
|
1573
|
+
const f = Ne(o);
|
|
1574
|
+
if (f <= 0) {
|
|
1575
|
+
const d = o.ownerDocument, v = d.body, h = getComputedStyle(v), p = d.compatMode === "CSS1Compat" && parseFloat(h.marginLeft) + parseFloat(h.marginRight) || 0, y = Math.abs(o.clientWidth - v.clientWidth - p);
|
|
1576
|
+
y <= ot && (r -= y);
|
|
1577
|
+
} else f <= ot && (r += f);
|
|
1578
|
+
return {
|
|
1579
|
+
width: r,
|
|
1580
|
+
height: i,
|
|
1581
|
+
x: l,
|
|
1582
|
+
y: c
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
function Mn(e, t) {
|
|
1586
|
+
const n = oe(e, !0, t === "fixed"), o = n.top + e.clientTop, a = n.left + e.clientLeft, r = W(e) ? le(e) : V(1), i = e.clientWidth * r.x, l = e.clientHeight * r.y, c = a * r.x, f = o * r.y;
|
|
1587
|
+
return {
|
|
1588
|
+
width: i,
|
|
1589
|
+
height: l,
|
|
1590
|
+
x: c,
|
|
1591
|
+
y: f
|
|
1592
|
+
};
|
|
1593
|
+
}
|
|
1594
|
+
function rt(e, t, n) {
|
|
1595
|
+
let o;
|
|
1596
|
+
if (t === "viewport")
|
|
1597
|
+
o = _n(e, n);
|
|
1598
|
+
else if (t === "document")
|
|
1599
|
+
o = Gn(H(e));
|
|
1600
|
+
else if (B(t))
|
|
1601
|
+
o = Mn(t, n);
|
|
1602
|
+
else {
|
|
1603
|
+
const a = wt(e);
|
|
1604
|
+
o = {
|
|
1605
|
+
x: t.x - a.x,
|
|
1606
|
+
y: t.y - a.y,
|
|
1607
|
+
width: t.width,
|
|
1608
|
+
height: t.height
|
|
1609
|
+
};
|
|
1610
|
+
}
|
|
1611
|
+
return Oe(o);
|
|
1612
|
+
}
|
|
1613
|
+
function St(e, t) {
|
|
1614
|
+
const n = X(e);
|
|
1615
|
+
return n === t || !B(n) || ue(n) ? !1 : G(n).position === "fixed" || St(n, t);
|
|
1616
|
+
}
|
|
1617
|
+
function Vn(e, t) {
|
|
1618
|
+
const n = t.get(e);
|
|
1619
|
+
if (n)
|
|
1620
|
+
return n;
|
|
1621
|
+
let o = de(e, [], !1).filter((l) => B(l) && re(l) !== "body"), a = null;
|
|
1622
|
+
const r = G(e).position === "fixed";
|
|
1623
|
+
let i = r ? X(e) : e;
|
|
1624
|
+
for (; B(i) && !ue(i); ) {
|
|
1625
|
+
const l = G(i), c = Ue(i);
|
|
1626
|
+
!c && l.position === "fixed" && (a = null), (r ? !c && !a : !c && l.position === "static" && a && (a.position === "absolute" || a.position === "fixed") || pe(i) && !c && St(e, i)) ? o = o.filter((f) => f !== i) : a = l, i = X(i);
|
|
1627
|
+
}
|
|
1628
|
+
return t.set(e, o), o;
|
|
1629
|
+
}
|
|
1630
|
+
function Hn(e) {
|
|
1631
|
+
let {
|
|
1632
|
+
element: t,
|
|
1633
|
+
boundary: n,
|
|
1634
|
+
rootBoundary: o,
|
|
1635
|
+
strategy: a
|
|
1636
|
+
} = e;
|
|
1637
|
+
const r = [...n === "clippingAncestors" ? Fe(t) ? [] : Vn(t, this._c) : [].concat(n), o], i = rt(t, r[0], a);
|
|
1638
|
+
let l = i.top, c = i.right, f = i.bottom, d = i.left;
|
|
1639
|
+
for (let v = 1; v < r.length; v++) {
|
|
1640
|
+
const h = rt(t, r[v], a);
|
|
1641
|
+
l = ee(h.top, l), c = Ee(h.right, c), f = Ee(h.bottom, f), d = ee(h.left, d);
|
|
1642
|
+
}
|
|
1643
|
+
return {
|
|
1644
|
+
width: c - d,
|
|
1645
|
+
height: f - l,
|
|
1646
|
+
x: d,
|
|
1647
|
+
y: l
|
|
1648
|
+
};
|
|
1649
|
+
}
|
|
1650
|
+
function Kn(e) {
|
|
1651
|
+
const {
|
|
1652
|
+
width: t,
|
|
1653
|
+
height: n
|
|
1654
|
+
} = gt(e);
|
|
1655
|
+
return {
|
|
1656
|
+
width: t,
|
|
1657
|
+
height: n
|
|
1658
|
+
};
|
|
1659
|
+
}
|
|
1660
|
+
function Un(e, t, n) {
|
|
1661
|
+
const o = W(t), a = H(t), r = n === "fixed", i = oe(e, !0, r, t);
|
|
1662
|
+
let l = {
|
|
1663
|
+
scrollLeft: 0,
|
|
1664
|
+
scrollTop: 0
|
|
1665
|
+
};
|
|
1666
|
+
const c = V(0);
|
|
1667
|
+
function f() {
|
|
1668
|
+
c.x = Ne(a);
|
|
1669
|
+
}
|
|
1670
|
+
if (o || !o && !r)
|
|
1671
|
+
if ((re(t) !== "body" || pe(a)) && (l = Pe(t)), o) {
|
|
1672
|
+
const p = oe(t, !0, r, t);
|
|
1673
|
+
c.x = p.x + t.clientLeft, c.y = p.y + t.clientTop;
|
|
1674
|
+
} else a && f();
|
|
1675
|
+
r && !o && a && f();
|
|
1676
|
+
const d = a && !o && !r ? xt(a, l) : V(0), v = i.left + l.scrollLeft - c.x - d.x, h = i.top + l.scrollTop - c.y - d.y;
|
|
1677
|
+
return {
|
|
1678
|
+
x: v,
|
|
1679
|
+
y: h,
|
|
1680
|
+
width: i.width,
|
|
1681
|
+
height: i.height
|
|
1682
|
+
};
|
|
1683
|
+
}
|
|
1684
|
+
function Ge(e) {
|
|
1685
|
+
return G(e).position === "static";
|
|
1686
|
+
}
|
|
1687
|
+
function at(e, t) {
|
|
1688
|
+
if (!W(e) || G(e).position === "fixed")
|
|
1689
|
+
return null;
|
|
1690
|
+
if (t)
|
|
1691
|
+
return t(e);
|
|
1692
|
+
let n = e.offsetParent;
|
|
1693
|
+
return H(e) === n && (n = n.ownerDocument.body), n;
|
|
1694
|
+
}
|
|
1695
|
+
function Et(e, t) {
|
|
1696
|
+
const n = C(e);
|
|
1697
|
+
if (Fe(e))
|
|
1698
|
+
return n;
|
|
1699
|
+
if (!W(e)) {
|
|
1700
|
+
let a = X(e);
|
|
1701
|
+
for (; a && !ue(a); ) {
|
|
1702
|
+
if (B(a) && !Ge(a))
|
|
1703
|
+
return a;
|
|
1704
|
+
a = X(a);
|
|
1705
|
+
}
|
|
1706
|
+
return n;
|
|
1707
|
+
}
|
|
1708
|
+
let o = at(e, t);
|
|
1709
|
+
for (; o && Fn(o) && Ge(o); )
|
|
1710
|
+
o = at(o, t);
|
|
1711
|
+
return o && ue(o) && Ge(o) && !Ue(o) ? n : o || Cn(e) || n;
|
|
1712
|
+
}
|
|
1713
|
+
const $n = async function(e) {
|
|
1714
|
+
const t = this.getOffsetParent || Et, n = this.getDimensions, o = await n(e.floating);
|
|
1715
|
+
return {
|
|
1716
|
+
reference: Un(e.reference, await t(e.floating), e.strategy),
|
|
1717
|
+
floating: {
|
|
1718
|
+
x: 0,
|
|
1719
|
+
y: 0,
|
|
1720
|
+
width: o.width,
|
|
1721
|
+
height: o.height
|
|
1722
|
+
}
|
|
1723
|
+
};
|
|
1724
|
+
};
|
|
1725
|
+
function Wn(e) {
|
|
1726
|
+
return G(e).direction === "rtl";
|
|
1727
|
+
}
|
|
1728
|
+
const qn = {
|
|
1729
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: jn,
|
|
1730
|
+
getDocumentElement: H,
|
|
1731
|
+
getClippingRect: Hn,
|
|
1732
|
+
getOffsetParent: Et,
|
|
1733
|
+
getElementRects: $n,
|
|
1734
|
+
getClientRects: Bn,
|
|
1735
|
+
getDimensions: Kn,
|
|
1736
|
+
getScale: le,
|
|
1737
|
+
isElement: B,
|
|
1738
|
+
isRTL: Wn
|
|
1739
|
+
};
|
|
1740
|
+
function Tt(e, t) {
|
|
1741
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1742
|
+
}
|
|
1743
|
+
function zn(e, t) {
|
|
1744
|
+
let n = null, o;
|
|
1745
|
+
const a = H(e);
|
|
1746
|
+
function r() {
|
|
1747
|
+
var l;
|
|
1748
|
+
clearTimeout(o), (l = n) == null || l.disconnect(), n = null;
|
|
1749
|
+
}
|
|
1750
|
+
function i(l, c) {
|
|
1751
|
+
l === void 0 && (l = !1), c === void 0 && (c = 1), r();
|
|
1752
|
+
const f = e.getBoundingClientRect(), {
|
|
1753
|
+
left: d,
|
|
1754
|
+
top: v,
|
|
1755
|
+
width: h,
|
|
1756
|
+
height: p
|
|
1757
|
+
} = f;
|
|
1758
|
+
if (l || t(), !h || !p)
|
|
1759
|
+
return;
|
|
1760
|
+
const y = me(v), w = me(a.clientWidth - (d + h)), T = me(a.clientHeight - (v + p)), R = me(d), O = {
|
|
1761
|
+
rootMargin: -y + "px " + -w + "px " + -T + "px " + -R + "px",
|
|
1762
|
+
threshold: ee(0, Ee(1, c)) || 1
|
|
1763
|
+
};
|
|
1764
|
+
let D = !0;
|
|
1765
|
+
function A(j) {
|
|
1766
|
+
const F = j[0].intersectionRatio;
|
|
1767
|
+
if (F !== c) {
|
|
1768
|
+
if (!D)
|
|
1769
|
+
return i();
|
|
1770
|
+
F ? i(!1, F) : o = setTimeout(() => {
|
|
1771
|
+
i(!1, 1e-7);
|
|
1772
|
+
}, 1e3);
|
|
1773
|
+
}
|
|
1774
|
+
F === 1 && !Tt(f, e.getBoundingClientRect()) && i(), D = !1;
|
|
1775
|
+
}
|
|
1776
|
+
try {
|
|
1777
|
+
n = new IntersectionObserver(A, {
|
|
1778
|
+
...O,
|
|
1779
|
+
// Handle <iframe>s
|
|
1780
|
+
root: a.ownerDocument
|
|
1781
|
+
});
|
|
1782
|
+
} catch {
|
|
1783
|
+
n = new IntersectionObserver(A, O);
|
|
1784
|
+
}
|
|
1785
|
+
n.observe(e);
|
|
1786
|
+
}
|
|
1787
|
+
return i(!0), r;
|
|
1788
|
+
}
|
|
1789
|
+
function Qn(e, t, n, o) {
|
|
1790
|
+
o === void 0 && (o = {});
|
|
1791
|
+
const {
|
|
1792
|
+
ancestorScroll: a = !0,
|
|
1793
|
+
ancestorResize: r = !0,
|
|
1794
|
+
elementResize: i = typeof ResizeObserver == "function",
|
|
1795
|
+
layoutShift: l = typeof IntersectionObserver == "function",
|
|
1796
|
+
animationFrame: c = !1
|
|
1797
|
+
} = o, f = We(e), d = a || r ? [...f ? de(f) : [], ...t ? de(t) : []] : [];
|
|
1798
|
+
d.forEach((R) => {
|
|
1799
|
+
a && R.addEventListener("scroll", n, {
|
|
1800
|
+
passive: !0
|
|
1801
|
+
}), r && R.addEventListener("resize", n);
|
|
1802
|
+
});
|
|
1803
|
+
const v = f && l ? zn(f, n) : null;
|
|
1804
|
+
let h = -1, p = null;
|
|
1805
|
+
i && (p = new ResizeObserver((R) => {
|
|
1806
|
+
let [O] = R;
|
|
1807
|
+
O && O.target === f && p && t && (p.unobserve(t), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1808
|
+
var D;
|
|
1809
|
+
(D = p) == null || D.observe(t);
|
|
1810
|
+
})), n();
|
|
1811
|
+
}), f && !c && p.observe(f), t && p.observe(t));
|
|
1812
|
+
let y, w = c ? oe(e) : null;
|
|
1813
|
+
c && T();
|
|
1814
|
+
function T() {
|
|
1815
|
+
const R = oe(e);
|
|
1816
|
+
w && !Tt(w, R) && n(), w = R, y = requestAnimationFrame(T);
|
|
1817
|
+
}
|
|
1818
|
+
return n(), () => {
|
|
1819
|
+
var R;
|
|
1820
|
+
d.forEach((O) => {
|
|
1821
|
+
a && O.removeEventListener("scroll", n), r && O.removeEventListener("resize", n);
|
|
1822
|
+
}), v == null || v(), (R = p) == null || R.disconnect(), p = null, c && cancelAnimationFrame(y);
|
|
1823
|
+
};
|
|
1824
|
+
}
|
|
1825
|
+
const eo = Dn, to = An, no = Rn, Yn = (e, t, n) => {
|
|
1826
|
+
const o = /* @__PURE__ */ new Map(), a = {
|
|
1827
|
+
platform: qn,
|
|
1828
|
+
...n
|
|
1829
|
+
}, r = {
|
|
1830
|
+
...a.platform,
|
|
1831
|
+
_c: o
|
|
1832
|
+
};
|
|
1833
|
+
return Tn(e, t, {
|
|
1834
|
+
...a,
|
|
1835
|
+
platform: r
|
|
1836
|
+
});
|
|
1837
|
+
};
|
|
1838
|
+
function Xn(e) {
|
|
1839
|
+
return e != null && typeof e == "object" && "$el" in e;
|
|
1840
|
+
}
|
|
1841
|
+
function it(e) {
|
|
1842
|
+
if (Xn(e)) {
|
|
1843
|
+
const t = e.$el;
|
|
1844
|
+
return Ke(t) && re(t) === "#comment" ? null : t;
|
|
1845
|
+
}
|
|
1846
|
+
return e;
|
|
1847
|
+
}
|
|
1848
|
+
function ce(e) {
|
|
1849
|
+
return typeof e == "function" ? e() : At(e);
|
|
1850
|
+
}
|
|
1851
|
+
function Rt(e) {
|
|
1852
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
1853
|
+
}
|
|
1854
|
+
function lt(e, t) {
|
|
1855
|
+
const n = Rt(e);
|
|
1856
|
+
return Math.round(t * n) / n;
|
|
1857
|
+
}
|
|
1858
|
+
function oo(e, t, n) {
|
|
1859
|
+
n === void 0 && (n = {});
|
|
1860
|
+
const o = n.whileElementsMounted, a = U(() => {
|
|
1861
|
+
var P;
|
|
1862
|
+
return (P = ce(n.open)) != null ? P : !0;
|
|
1863
|
+
}), r = U(() => ce(n.middleware)), i = U(() => {
|
|
1864
|
+
var P;
|
|
1865
|
+
return (P = ce(n.placement)) != null ? P : "bottom";
|
|
1866
|
+
}), l = U(() => {
|
|
1867
|
+
var P;
|
|
1868
|
+
return (P = ce(n.strategy)) != null ? P : "absolute";
|
|
1869
|
+
}), c = U(() => {
|
|
1870
|
+
var P;
|
|
1871
|
+
return (P = ce(n.transform)) != null ? P : !0;
|
|
1872
|
+
}), f = U(() => it(e.value)), d = U(() => it(t.value)), v = J(0), h = J(0), p = J(l.value), y = J(i.value), w = Ot({}), T = J(!1), R = U(() => {
|
|
1873
|
+
const P = {
|
|
1874
|
+
position: p.value,
|
|
1875
|
+
left: "0",
|
|
1876
|
+
top: "0"
|
|
1877
|
+
};
|
|
1878
|
+
if (!d.value)
|
|
1879
|
+
return P;
|
|
1880
|
+
const N = lt(d.value, v.value), K = lt(d.value, h.value);
|
|
1881
|
+
return c.value ? {
|
|
1882
|
+
...P,
|
|
1883
|
+
transform: "translate(" + N + "px, " + K + "px)",
|
|
1884
|
+
...Rt(d.value) >= 1.5 && {
|
|
1885
|
+
willChange: "transform"
|
|
1886
|
+
}
|
|
1887
|
+
} : {
|
|
1888
|
+
position: p.value,
|
|
1889
|
+
left: N + "px",
|
|
1890
|
+
top: K + "px"
|
|
1891
|
+
};
|
|
1892
|
+
});
|
|
1893
|
+
let O;
|
|
1894
|
+
function D() {
|
|
1895
|
+
if (f.value == null || d.value == null)
|
|
1896
|
+
return;
|
|
1897
|
+
const P = a.value;
|
|
1898
|
+
Yn(f.value, d.value, {
|
|
1899
|
+
middleware: r.value,
|
|
1900
|
+
placement: i.value,
|
|
1901
|
+
strategy: l.value
|
|
1902
|
+
}).then((N) => {
|
|
1903
|
+
v.value = N.x, h.value = N.y, p.value = N.strategy, y.value = N.placement, w.value = N.middlewareData, T.value = P !== !1;
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
function A() {
|
|
1907
|
+
typeof O == "function" && (O(), O = void 0);
|
|
1908
|
+
}
|
|
1909
|
+
function j() {
|
|
1910
|
+
if (A(), o === void 0) {
|
|
1911
|
+
D();
|
|
1912
|
+
return;
|
|
1913
|
+
}
|
|
1914
|
+
if (f.value != null && d.value != null) {
|
|
1915
|
+
O = o(f.value, d.value, D);
|
|
1916
|
+
return;
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
function F() {
|
|
1920
|
+
a.value || (T.value = !1);
|
|
1921
|
+
}
|
|
1922
|
+
return be([r, i, l, a], D, {
|
|
1923
|
+
flush: "sync"
|
|
1924
|
+
}), be([f, d], j, {
|
|
1925
|
+
flush: "sync"
|
|
1926
|
+
}), be(a, F, {
|
|
1927
|
+
flush: "sync"
|
|
1928
|
+
}), kt() && Dt(A), {
|
|
1929
|
+
x: ae(v),
|
|
1930
|
+
y: ae(h),
|
|
1931
|
+
strategy: ae(p),
|
|
1932
|
+
placement: ae(y),
|
|
1933
|
+
middlewareData: ae(w),
|
|
1934
|
+
isPositioned: ae(T),
|
|
1935
|
+
floatingStyles: R,
|
|
1936
|
+
update: D
|
|
1937
|
+
};
|
|
1938
|
+
}
|
|
1939
|
+
const he = (e) => {
|
|
1940
|
+
e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();
|
|
1941
|
+
}, ro = ({
|
|
1942
|
+
getNextElement: e,
|
|
1943
|
+
getFirstElement: t,
|
|
1944
|
+
getLastElement: n,
|
|
1945
|
+
close: o,
|
|
1946
|
+
disableSpaceToClick: a,
|
|
1947
|
+
keepOpenedOnTab: r
|
|
1948
|
+
}) => {
|
|
1949
|
+
const i = J(null), l = () => {
|
|
1950
|
+
};
|
|
1951
|
+
let c = l;
|
|
1952
|
+
const f = () => {
|
|
1953
|
+
i.value = null, c = l;
|
|
1954
|
+
}, d = (p) => {
|
|
1955
|
+
i.value = p.index, c = p.onClick;
|
|
1956
|
+
}, v = (p) => {
|
|
1957
|
+
d(e(i.value, p));
|
|
1958
|
+
}, h = () => {
|
|
1959
|
+
f(), o();
|
|
1960
|
+
};
|
|
1961
|
+
return {
|
|
1962
|
+
onKeydown: (p) => {
|
|
1963
|
+
switch (p.code) {
|
|
1964
|
+
case "ArrowDown":
|
|
1965
|
+
he(p), v(1);
|
|
1966
|
+
break;
|
|
1967
|
+
case "ArrowUp":
|
|
1968
|
+
he(p), v(-1);
|
|
1969
|
+
break;
|
|
1970
|
+
case "Enter":
|
|
1971
|
+
case "Space": {
|
|
1972
|
+
const y = p.code === "Enter", w = p.code === "Space";
|
|
1973
|
+
i.value !== null && (y || w && !a) && (he(p), c());
|
|
1974
|
+
break;
|
|
1975
|
+
}
|
|
1976
|
+
case "Home":
|
|
1977
|
+
t && d(t());
|
|
1978
|
+
break;
|
|
1979
|
+
case "End":
|
|
1980
|
+
n && d(n());
|
|
1981
|
+
break;
|
|
1982
|
+
case "Escape":
|
|
1983
|
+
he(p), h();
|
|
1984
|
+
break;
|
|
1985
|
+
case "Tab":
|
|
1986
|
+
r || h();
|
|
1987
|
+
break;
|
|
1988
|
+
}
|
|
1989
|
+
},
|
|
1990
|
+
currentIndex: Pt(i),
|
|
1991
|
+
resetNavigation: f,
|
|
1992
|
+
setElement: d
|
|
1993
|
+
};
|
|
1994
|
+
};
|
|
1995
|
+
export {
|
|
1996
|
+
oo as a,
|
|
1997
|
+
Jn as e,
|
|
1998
|
+
no as i,
|
|
1999
|
+
eo as n,
|
|
2000
|
+
ro as o,
|
|
2001
|
+
to as r,
|
|
2002
|
+
Qn as t
|
|
2003
|
+
};
|