@deck9/ui 0.15.5 → 0.17.0-next.0
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/Button/Button.vue.d.ts +2 -6
- package/dist/Checkbox/Checkbox.vue.d.ts +3 -3
- package/dist/Select/Select.vue.d.ts +2 -0
- package/dist/Switch/Switch.vue.d.ts +2 -4
- package/dist/index.d.ts +0 -1
- package/dist/src/ui.mjs +1268 -1360
- package/dist/src/ui.umd.js +4 -4
- package/dist/types/types.d.ts +5 -0
- package/package.json +4 -3
- package/dist/SplitButton/SplitButton.vue.d.ts +0 -52
- package/dist/SplitButton/index.d.ts +0 -1
package/dist/src/ui.mjs
CHANGED
|
@@ -1,163 +1,163 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { FontAwesomeIcon as
|
|
1
|
+
import { defineComponent as T, computed as k, openBlock as C, createBlock as U, unref as _, mergeProps as Ne, createCommentVNode as M, createElementBlock as I, normalizeClass as F, createElementVNode as A, toDisplayString as X, createVNode as j, ref as O, getCurrentInstance as In, onMounted as ee, watch as J, Fragment as be, withDirectives as An, vModelText as $n, normalizeStyle as Nt, cloneVNode as Mn, h as Re, inject as he, provide as ye, watchEffect as we, nextTick as N, onUnmounted as Be, toRaw as G, shallowRef as Fn, getCurrentScope as Vn, onScopeDispose as Nn, shallowReadonly as me, withCtx as z, renderSlot as ht, Teleport as Bn, Transition as Bt, normalizeProps as jn, guardReactiveProps as Hn, resolveDynamicComponent as zn, renderList as jt } from "vue";
|
|
2
|
+
import { FontAwesomeIcon as Un } from "@fortawesome/vue-fontawesome";
|
|
3
3
|
import { library as lt } from "@fortawesome/fontawesome-svg-core";
|
|
4
|
-
import * as
|
|
5
|
-
import * as
|
|
6
|
-
var
|
|
4
|
+
import * as f from "@fortawesome/free-solid-svg-icons";
|
|
5
|
+
import * as ke from "@fortawesome/free-brands-svg-icons";
|
|
6
|
+
var Ht = "fas", zt = "numeric-input", Ut = 512, Wt = 512, Je = [], Kt = "", Gt = "m409.445 111 2.112.004c34.066.146 46.74 3.848 59.517 10.681 13.037 6.973 23.268 17.204 30.24 30.241l.415.782c6.705 12.782 10.271 25.9 10.271 60.847v72.002c-.15 34.066-3.852 46.74-10.685 59.517-6.973 13.037-17.204 23.268-30.241 30.24l-.782.415C457.51 382.434 444.392 386 409.445 386h-306.89l-2.112-.004c-34.066-.146-46.74-3.848-59.517-10.681-13.037-6.973-23.268-17.204-30.24-30.241l-.415-.782C3.566 331.51 0 318.392 0 283.445v-69.89c0-35.66 3.713-48.592 10.685-61.629 6.973-13.037 17.204-23.268 30.241-30.24l.782-.415C54.49 114.566 67.608 111 102.555 111h306.89Zm.806 36H102.555l-2.387.005c-22.69.089-31.789 1.488-39.667 5.128l-.523.246c-.696.332-1.385.683-2.074 1.052-6.764 3.617-11.856 8.71-15.473 15.473l-.282.533c-4.492 8.62-6.116 17.401-6.148 43.312v71.502l.012 3.09c.161 24.044 1.9 32.308 6.418 40.755 3.617 6.764 8.71 11.856 15.473 15.473l.533.282c8.62 4.492 17.401 6.116 43.312 6.149h307.696c27.078 0 35.763-1.677 44.651-6.43 6.764-3.618 11.856-8.71 15.473-15.474l.282-.533c4.492-8.62 6.116-17.401 6.149-43.312v-70.696c0-27.078-1.677-35.763-6.43-44.651-3.618-6.764-8.71-11.856-15.474-15.473l-.533-.282c-8.62-4.492-17.401-6.116-43.312-6.149Zm-164.715 19c11.682 0 22.013 1.976 30.994 5.929 8.98 3.952 16.005 9.38 21.074 16.284 5.07 6.904 7.578 14.797 7.527 23.677.103 8.829-2.92 16.066-9.07 21.713-6.15 5.646-13.935 8.983-23.353 10.01v1.231c12.764 1.386 22.362 5.274 28.794 11.665 6.433 6.39 9.598 14.411 9.496 24.061.051 9.24-2.715 17.427-8.299 24.562-5.584 7.135-13.33 12.73-23.236 16.785-9.907 4.055-21.319 6.083-34.236 6.083-12.454 0-23.506-2.143-33.156-6.43-9.65-4.285-17.227-10.201-22.734-17.747-5.506-7.545-8.286-16.22-8.337-26.025h43.23c.051 3.029.99 5.737 2.817 8.124 1.827 2.386 4.336 4.247 7.527 5.582 3.19 1.334 6.845 2.002 10.962 2.002 3.962 0 7.462-.706 10.498-2.118 3.037-1.411 5.404-3.375 7.102-5.89 1.699-2.515 2.522-5.39 2.47-8.623.052-3.183-.913-6.006-2.894-8.47-1.982-2.464-4.748-4.389-8.299-5.775-3.55-1.386-7.642-2.079-12.274-2.079h-16.057v-29.566h16.057c4.271 0 8.041-.693 11.31-2.08 3.267-1.385 5.815-3.31 7.642-5.774s2.714-5.287 2.663-8.47c.051-3.08-.695-5.8-2.239-8.161-1.544-2.361-3.692-4.21-6.446-5.544-2.753-1.334-5.93-2.002-9.533-2.002-3.912 0-7.398.693-10.46 2.08-3.063 1.385-5.468 3.31-7.218 5.774s-2.65 5.287-2.702 8.47h-41.068c.051-9.65 2.715-18.172 7.99-25.563 5.275-7.392 12.518-13.192 21.73-17.401 9.212-4.21 19.788-6.314 31.728-6.314Zm-133.074 0c12.615 0 23.55 2.017 32.807 6.05 9.257 4.033 16.41 9.698 21.462 16.994 5.051 7.296 7.577 15.851 7.577 25.665 0 6.063-1.257 12.087-3.77 18.073-2.512 5.986-7.025 12.601-13.538 19.846-6.513 7.245-15.77 15.877-27.77 25.896l-14.768 12.331v.925H176V326H55.077v-30.829l58.77-48.709c3.897-3.237 7.243-6.28 10.038-9.133 2.794-2.851 4.948-5.793 6.461-8.824 1.513-3.032 2.27-6.397 2.27-10.097 0-4.059-.86-7.527-2.578-10.404-1.717-2.877-4.09-5.1-7.115-6.667-3.026-1.567-6.513-2.35-10.461-2.35-3.95 0-7.424.796-10.424 2.389-3 1.593-5.32 3.93-6.961 7.013-1.641 3.083-2.462 6.834-2.462 11.253H52c0-11.099 2.487-20.655 7.462-28.67 4.974-8.016 12-14.182 21.076-18.498 9.077-4.316 19.718-6.474 31.924-6.474Z";
|
|
7
7
|
const yt = {
|
|
8
|
-
prefix:
|
|
9
|
-
iconName:
|
|
10
|
-
icon: [Ut, Wt,
|
|
11
|
-
},
|
|
8
|
+
prefix: Ht,
|
|
9
|
+
iconName: zt,
|
|
10
|
+
icon: [Ut, Wt, Je, Kt, Gt]
|
|
11
|
+
}, Wn = {
|
|
12
12
|
definition: yt,
|
|
13
13
|
faAlignJustify: yt,
|
|
14
|
-
prefix:
|
|
15
|
-
iconName:
|
|
14
|
+
prefix: Ht,
|
|
15
|
+
iconName: zt,
|
|
16
16
|
width: Ut,
|
|
17
17
|
height: Wt,
|
|
18
|
-
ligatures:
|
|
18
|
+
ligatures: Je,
|
|
19
19
|
unicode: Kt,
|
|
20
20
|
svgPathData: Gt,
|
|
21
|
-
aliases:
|
|
21
|
+
aliases: Je
|
|
22
22
|
};
|
|
23
23
|
lt.add(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
24
|
+
f.faAlignCenter,
|
|
25
|
+
f.faAlignLeft,
|
|
26
|
+
f.faAlignRight,
|
|
27
|
+
f.faArrowRight,
|
|
28
|
+
f.faArrowUp19,
|
|
29
|
+
f.faAsterisk,
|
|
30
|
+
f.faAt,
|
|
31
|
+
f.faBold,
|
|
32
|
+
f.faBolt,
|
|
33
|
+
f.faCalendar,
|
|
34
|
+
f.faChartPie,
|
|
35
|
+
f.faCheck,
|
|
36
|
+
f.faCheckCircle,
|
|
37
|
+
f.faChevronDown,
|
|
38
|
+
f.faChevronLeft,
|
|
39
|
+
f.faChevronRight,
|
|
40
|
+
f.faChevronUp,
|
|
41
|
+
f.faCircleCheck,
|
|
42
|
+
f.faCircleNodes,
|
|
43
|
+
f.faCircleNotch,
|
|
44
|
+
f.faClipboard,
|
|
45
|
+
f.faCloudDownload,
|
|
46
|
+
f.faCloudUpload,
|
|
47
|
+
f.faCode,
|
|
48
|
+
f.faCodeBranch,
|
|
49
|
+
f.faCodeFork,
|
|
50
|
+
f.faCog,
|
|
51
|
+
f.faCompass,
|
|
52
|
+
f.faCrown,
|
|
53
|
+
f.faDiagramProject,
|
|
54
|
+
f.faDoorOpen,
|
|
55
|
+
f.faDotCircle,
|
|
56
|
+
f.faEllipsis,
|
|
57
|
+
f.faEllipsisVertical,
|
|
58
|
+
f.faEnvelope,
|
|
59
|
+
f.faExclamationTriangle,
|
|
60
|
+
f.faExternalLink,
|
|
61
|
+
f.faEye,
|
|
62
|
+
f.faEyeDropper,
|
|
63
|
+
f.faEyeSlash,
|
|
64
|
+
f.faFileLines,
|
|
65
|
+
f.faFilePdf,
|
|
66
|
+
f.faFileUpload,
|
|
67
|
+
f.faFileVideo,
|
|
68
|
+
f.faFileWaveform,
|
|
69
|
+
f.faFilter,
|
|
70
|
+
f.faFilter,
|
|
71
|
+
f.faFingerprint,
|
|
72
|
+
f.faFont,
|
|
73
|
+
f.faGears,
|
|
74
|
+
f.faGlobe,
|
|
75
|
+
f.faGripHorizontal,
|
|
76
|
+
f.faGripVertical,
|
|
77
|
+
f.faHandPointRight,
|
|
78
|
+
f.faHandPointRight,
|
|
79
|
+
f.faHashtag,
|
|
80
|
+
f.faHeading,
|
|
81
|
+
f.faHeart,
|
|
82
|
+
f.faImage,
|
|
83
|
+
f.faInfoCircle,
|
|
84
|
+
f.faItalic,
|
|
85
|
+
f.faLayerGroup,
|
|
86
|
+
f.faLink,
|
|
87
|
+
f.faLinkSlash,
|
|
88
|
+
f.faList,
|
|
89
|
+
f.faListOl,
|
|
90
|
+
f.faListUl,
|
|
91
|
+
f.faLocationArrow,
|
|
92
|
+
f.faLocationCrosshairs,
|
|
93
|
+
f.faLock,
|
|
94
|
+
f.faLockOpen,
|
|
95
|
+
f.faMedal,
|
|
96
|
+
f.faMessage,
|
|
97
|
+
f.faMicrochip,
|
|
98
|
+
f.faPencilAlt,
|
|
99
|
+
f.faPenToSquare,
|
|
100
|
+
f.faPhone,
|
|
101
|
+
f.faPlayCircle,
|
|
102
|
+
f.faPlus,
|
|
103
|
+
f.faPlusCircle,
|
|
104
|
+
f.faPoo,
|
|
105
|
+
f.faPuzzlePiece,
|
|
106
|
+
f.faQuestion,
|
|
107
|
+
f.faQuoteLeft,
|
|
108
|
+
f.faQuoteRight,
|
|
109
|
+
f.faReply,
|
|
110
|
+
f.faReplyAll,
|
|
111
|
+
f.faRightLong,
|
|
112
|
+
f.faRobot,
|
|
113
|
+
f.faSave,
|
|
114
|
+
f.faShield,
|
|
115
|
+
f.faSignal,
|
|
116
|
+
f.faSignature,
|
|
117
|
+
f.faSignature,
|
|
118
|
+
f.faSquareCheck,
|
|
119
|
+
f.faStar,
|
|
120
|
+
f.faStrikethrough,
|
|
121
|
+
f.faTerminal,
|
|
122
|
+
f.faTextSlash,
|
|
123
|
+
f.faTimes,
|
|
124
|
+
f.faTrash,
|
|
125
|
+
f.faTree,
|
|
126
|
+
f.faTrophy,
|
|
127
|
+
f.faTurnDown,
|
|
128
|
+
f.faUnderline,
|
|
129
|
+
f.faUpload,
|
|
130
|
+
f.faUser,
|
|
131
|
+
f.faUserShield,
|
|
132
|
+
f.faWandMagicSparkles,
|
|
133
133
|
// Brands
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
134
|
+
ke.faTwitter,
|
|
135
|
+
ke.faInstagram,
|
|
136
|
+
ke.faGithub,
|
|
137
|
+
ke.faLinkedin,
|
|
138
|
+
ke.faFacebook,
|
|
139
139
|
// Custom
|
|
140
|
-
|
|
140
|
+
Wn.definition
|
|
141
141
|
);
|
|
142
|
-
const
|
|
142
|
+
const Kn = [...Object.keys(lt.definitions.fas)].sort(), wt = [...Object.keys(lt.definitions.fab)].sort(), q = /* @__PURE__ */ T({
|
|
143
143
|
__name: "Icon",
|
|
144
144
|
props: {
|
|
145
145
|
name: { default: "user" }
|
|
146
146
|
},
|
|
147
147
|
setup(e) {
|
|
148
|
-
const t = e,
|
|
148
|
+
const t = e, o = k(() => wt.includes(t.name) ? "fab" : "fas"), l = k(() => Kn.includes(t.name) || wt.includes(t.name) ? !0 : (console.warn(
|
|
149
149
|
"could not load icon, because it is not available",
|
|
150
150
|
t.name
|
|
151
151
|
), !1));
|
|
152
|
-
return (n, r) =>
|
|
152
|
+
return (n, r) => l.value ? (C(), U(_(Un), Ne({
|
|
153
153
|
key: 0,
|
|
154
|
-
icon: [
|
|
154
|
+
icon: [o.value, n.name]
|
|
155
155
|
}, n.$attrs), null, 16, ["icon"])) : M("", !0);
|
|
156
156
|
}
|
|
157
|
-
}),
|
|
157
|
+
}), Gn = ["aria-label", "disabled", "aria-busy"], qn = {
|
|
158
158
|
key: 0,
|
|
159
159
|
class: "absolute inset-0 flex items-center justify-center"
|
|
160
|
-
},
|
|
160
|
+
}, Rr = /* @__PURE__ */ T({
|
|
161
161
|
__name: "Button",
|
|
162
162
|
props: {
|
|
163
163
|
label: {},
|
|
@@ -168,300 +168,297 @@ const Gn = [...Object.keys(lt.definitions.fas)].sort(), xt = [...Object.keys(lt.
|
|
|
168
168
|
icon: {},
|
|
169
169
|
iconPosition: { default: "right" }
|
|
170
170
|
},
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
"text-
|
|
176
|
-
"text-
|
|
177
|
-
"text-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
"px-
|
|
183
|
-
"px-
|
|
184
|
-
"px-8 py-3 text-base leading-6 font-medium rounded-lg": o.size === "large"
|
|
171
|
+
setup(e) {
|
|
172
|
+
const t = e, o = k(() => {
|
|
173
|
+
const n = {
|
|
174
|
+
"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": t.color === "primary",
|
|
175
|
+
"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": t.color === "light",
|
|
176
|
+
"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": t.color === "dark",
|
|
177
|
+
"text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": t.color === "danger"
|
|
178
|
+
}, r = {
|
|
179
|
+
"pointer-events-none opacity-75 cursor-not-allowed": t.isDisabled
|
|
180
|
+
}, i = {
|
|
181
|
+
"px-4 py-1 text-xs leading-5 mono-100 rounded-lg": t.size === "small",
|
|
182
|
+
"px-5 py-2 text-sm leading-4 font-medium rounded-lg": t.size === "medium",
|
|
183
|
+
"px-8 py-3 text-base leading-6 font-medium rounded-lg": t.size === "large"
|
|
185
184
|
};
|
|
186
185
|
return {
|
|
187
|
-
...
|
|
188
|
-
...
|
|
189
|
-
...
|
|
186
|
+
...n,
|
|
187
|
+
...r,
|
|
188
|
+
...i
|
|
190
189
|
};
|
|
191
|
-
}),
|
|
192
|
-
const
|
|
193
|
-
"mr-2 -ml-1": ["small", "medium"].includes(
|
|
194
|
-
"mr-4 -ml-2": ["large"].includes(
|
|
195
|
-
},
|
|
196
|
-
"ml-3 -mr-1": ["small", "medium"].includes(
|
|
197
|
-
"ml-3 -mr-3": ["large"].includes(
|
|
198
|
-
},
|
|
199
|
-
"text-white":
|
|
200
|
-
"text-blue-600":
|
|
201
|
-
"text-grey-50":
|
|
190
|
+
}), l = k(() => {
|
|
191
|
+
const n = {
|
|
192
|
+
"mr-2 -ml-1": ["small", "medium"].includes(t.size) && t.iconPosition === "left",
|
|
193
|
+
"mr-4 -ml-2": ["large"].includes(t.size) && t.iconPosition === "left"
|
|
194
|
+
}, r = {
|
|
195
|
+
"ml-3 -mr-1": ["small", "medium"].includes(t.size) && t.iconPosition === "right",
|
|
196
|
+
"ml-3 -mr-3": ["large"].includes(t.size) && t.iconPosition === "right"
|
|
197
|
+
}, i = {
|
|
198
|
+
"text-white": t.color === "primary",
|
|
199
|
+
"text-blue-600": t.color === "light",
|
|
200
|
+
"text-grey-50": t.color === "dark"
|
|
202
201
|
};
|
|
203
202
|
return {
|
|
204
|
-
...
|
|
205
|
-
...
|
|
206
|
-
...
|
|
203
|
+
...n,
|
|
204
|
+
...r,
|
|
205
|
+
...i
|
|
207
206
|
};
|
|
208
207
|
});
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
}
|
|
212
|
-
return (u, c) => (R(), T("button", {
|
|
213
|
-
class: $(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", n.value]),
|
|
208
|
+
return (n, r) => (C(), I("button", {
|
|
209
|
+
class: F(["relative inline-flex items-center focus:outline-none focus:ring active:ring transition duration-150 ease-in-out", o.value]),
|
|
214
210
|
type: "button",
|
|
215
|
-
"aria-label":
|
|
216
|
-
|
|
217
|
-
|
|
211
|
+
"aria-label": n.label,
|
|
212
|
+
disabled: n.isDisabled || n.isLoading,
|
|
213
|
+
"aria-busy": n.isLoading
|
|
218
214
|
}, [
|
|
219
|
-
|
|
220
|
-
class:
|
|
215
|
+
A("div", {
|
|
216
|
+
class: F(!n.isLoading || "invisible")
|
|
221
217
|
}, [
|
|
222
|
-
|
|
218
|
+
n.icon && n.iconPosition === "left" ? (C(), U(q, {
|
|
223
219
|
key: 0,
|
|
224
|
-
name:
|
|
225
|
-
class:
|
|
220
|
+
name: n.icon,
|
|
221
|
+
class: F(l.value)
|
|
226
222
|
}, null, 8, ["name", "class"])) : M("", !0),
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
A("span", null, X(n.label), 1),
|
|
224
|
+
n.icon && n.iconPosition === "right" ? (C(), U(q, {
|
|
229
225
|
key: 1,
|
|
230
|
-
name:
|
|
231
|
-
class:
|
|
226
|
+
name: n.icon,
|
|
227
|
+
class: F(l.value)
|
|
232
228
|
}, null, 8, ["name", "class"])) : M("", !0)
|
|
233
229
|
], 2),
|
|
234
|
-
|
|
235
|
-
|
|
230
|
+
n.isLoading ? (C(), I("span", qn, [
|
|
231
|
+
j(q, {
|
|
236
232
|
class: "animate-spin",
|
|
237
233
|
name: "circle-notch"
|
|
238
234
|
})
|
|
239
235
|
])) : M("", !0)
|
|
240
|
-
], 10,
|
|
236
|
+
], 10, Gn));
|
|
241
237
|
}
|
|
242
238
|
});
|
|
243
239
|
let Le;
|
|
244
|
-
const
|
|
245
|
-
function
|
|
240
|
+
const Xn = new Uint8Array(16);
|
|
241
|
+
function Yn() {
|
|
246
242
|
if (!Le && (Le = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !Le))
|
|
247
243
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
248
|
-
return Le(
|
|
244
|
+
return Le(Xn);
|
|
249
245
|
}
|
|
250
|
-
const
|
|
246
|
+
const $ = [];
|
|
251
247
|
for (let e = 0; e < 256; ++e)
|
|
252
|
-
|
|
253
|
-
function
|
|
254
|
-
return
|
|
248
|
+
$.push((e + 256).toString(16).slice(1));
|
|
249
|
+
function Qn(e, t = 0) {
|
|
250
|
+
return $[e[t + 0]] + $[e[t + 1]] + $[e[t + 2]] + $[e[t + 3]] + "-" + $[e[t + 4]] + $[e[t + 5]] + "-" + $[e[t + 6]] + $[e[t + 7]] + "-" + $[e[t + 8]] + $[e[t + 9]] + "-" + $[e[t + 10]] + $[e[t + 11]] + $[e[t + 12]] + $[e[t + 13]] + $[e[t + 14]] + $[e[t + 15]];
|
|
255
251
|
}
|
|
256
|
-
const
|
|
257
|
-
randomUUID:
|
|
252
|
+
const Zn = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), xt = {
|
|
253
|
+
randomUUID: Zn
|
|
258
254
|
};
|
|
259
|
-
function qt(e, t,
|
|
260
|
-
if (
|
|
261
|
-
return
|
|
255
|
+
function qt(e, t, o) {
|
|
256
|
+
if (xt.randomUUID && !t && !e)
|
|
257
|
+
return xt.randomUUID();
|
|
262
258
|
e = e || {};
|
|
263
|
-
const
|
|
264
|
-
if (
|
|
265
|
-
|
|
259
|
+
const l = e.random || (e.rng || Yn)();
|
|
260
|
+
if (l[6] = l[6] & 15 | 64, l[8] = l[8] & 63 | 128, t) {
|
|
261
|
+
o = o || 0;
|
|
266
262
|
for (let n = 0; n < 16; ++n)
|
|
267
|
-
t[
|
|
263
|
+
t[o + n] = l[n];
|
|
268
264
|
return t;
|
|
269
265
|
}
|
|
270
|
-
return
|
|
266
|
+
return Qn(l);
|
|
271
267
|
}
|
|
272
|
-
const
|
|
268
|
+
const Jn = { class: "relative flex items-start" }, eo = ["checked", "id"], to = { class: "ml-2 text-sm leading-5 peer-disabled:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:[&>label]:cursor-not-allowed" }, no = ["for"], oo = {
|
|
273
269
|
key: 0,
|
|
274
270
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
275
|
-
},
|
|
271
|
+
}, lo = {
|
|
272
|
+
inheritAttrs: !1
|
|
273
|
+
}, Er = /* @__PURE__ */ T({
|
|
274
|
+
...lo,
|
|
276
275
|
__name: "Checkbox",
|
|
277
276
|
props: {
|
|
278
|
-
id: { default: qt() },
|
|
277
|
+
id: { default: () => qt() },
|
|
279
278
|
label: {},
|
|
280
279
|
modelValue: { type: Boolean },
|
|
281
280
|
description: {}
|
|
282
281
|
},
|
|
283
282
|
emits: ["update:modelValue"],
|
|
284
283
|
setup(e, { emit: t }) {
|
|
285
|
-
const
|
|
286
|
-
|
|
284
|
+
const o = t, l = (n) => {
|
|
285
|
+
o("update:modelValue", n.target.checked);
|
|
287
286
|
};
|
|
288
|
-
return (n, r) => (
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
L("div", oo, [
|
|
299
|
-
L("label", {
|
|
287
|
+
return (n, r) => (C(), I("div", Jn, [
|
|
288
|
+
A("input", Ne({
|
|
289
|
+
class: "peer mt-0.5 h-4 w-4 border-grey-600 dark:text-blue-500 dark:border-grey-300 dark:checked:border-blue-500 dark:focus:ring-blue-900 dark:focus:ring-offset-grey-800 rounded-sm disabled:opacity-50 disabled:cursor-not-allowed",
|
|
290
|
+
type: "checkbox",
|
|
291
|
+
checked: n.modelValue,
|
|
292
|
+
onChange: l,
|
|
293
|
+
id: n.id
|
|
294
|
+
}, n.$attrs), null, 16, eo),
|
|
295
|
+
A("div", to, [
|
|
296
|
+
A("label", {
|
|
300
297
|
for: n.id,
|
|
301
298
|
class: "font-medium text-grey-700 dark:text-grey-200 casual-25"
|
|
302
|
-
},
|
|
303
|
-
n.description ? (
|
|
299
|
+
}, X(n.label), 9, no),
|
|
300
|
+
n.description ? (C(), I("p", oo, X(n.description), 1)) : M("", !0)
|
|
304
301
|
])
|
|
305
302
|
]));
|
|
306
303
|
}
|
|
307
304
|
});
|
|
308
|
-
function
|
|
309
|
-
const e =
|
|
305
|
+
function ro() {
|
|
306
|
+
const e = O(!1);
|
|
310
307
|
return In() && ee(() => {
|
|
311
308
|
e.value = !0;
|
|
312
309
|
}), e;
|
|
313
310
|
}
|
|
314
|
-
function
|
|
315
|
-
const t =
|
|
311
|
+
function io(e) {
|
|
312
|
+
const t = ro();
|
|
316
313
|
return k(() => (t.value, !!e()));
|
|
317
314
|
}
|
|
318
|
-
function
|
|
319
|
-
const { initialValue: t = "" } = e,
|
|
315
|
+
function ao(e = {}) {
|
|
316
|
+
const { initialValue: t = "" } = e, o = io(() => typeof window < "u" && "EyeDropper" in window), l = O(t);
|
|
320
317
|
async function n(r) {
|
|
321
|
-
if (!
|
|
318
|
+
if (!o.value)
|
|
322
319
|
return;
|
|
323
320
|
const u = await new window.EyeDropper().open(r);
|
|
324
|
-
return
|
|
321
|
+
return l.value = u.sRGBHex, u;
|
|
325
322
|
}
|
|
326
|
-
return { isSupported:
|
|
323
|
+
return { isSupported: o, sRGBHex: l, open: n };
|
|
327
324
|
}
|
|
328
|
-
const
|
|
329
|
-
},
|
|
330
|
-
let
|
|
331
|
-
const
|
|
332
|
-
let
|
|
333
|
-
function
|
|
325
|
+
const so = () => {
|
|
326
|
+
}, uo = Array.isArray, co = (e) => typeof e == "function", fo = (e) => typeof e == "symbol";
|
|
327
|
+
let St;
|
|
328
|
+
const kt = () => St || (St = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {});
|
|
329
|
+
let po;
|
|
330
|
+
function mo(e, t = po) {
|
|
334
331
|
t && t.active && t.effects.push(e);
|
|
335
332
|
}
|
|
336
|
-
const
|
|
333
|
+
const vo = (e) => {
|
|
337
334
|
const t = new Set(e);
|
|
338
335
|
return t.w = 0, t.n = 0, t;
|
|
339
|
-
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0,
|
|
336
|
+
}, Xt = (e) => (e.w & ie) > 0, Yt = (e) => (e.n & ie) > 0, go = ({ deps: e }) => {
|
|
340
337
|
if (e.length)
|
|
341
338
|
for (let t = 0; t < e.length; t++)
|
|
342
339
|
e[t].w |= ie;
|
|
343
|
-
},
|
|
340
|
+
}, bo = (e) => {
|
|
344
341
|
const { deps: t } = e;
|
|
345
342
|
if (t.length) {
|
|
346
|
-
let
|
|
347
|
-
for (let
|
|
348
|
-
const n = t[
|
|
349
|
-
Xt(n) && !Yt(n) ? n.delete(e) : t[
|
|
343
|
+
let o = 0;
|
|
344
|
+
for (let l = 0; l < t.length; l++) {
|
|
345
|
+
const n = t[l];
|
|
346
|
+
Xt(n) && !Yt(n) ? n.delete(e) : t[o++] = n, n.w &= ~ie, n.n &= ~ie;
|
|
350
347
|
}
|
|
351
|
-
t.length =
|
|
348
|
+
t.length = o;
|
|
352
349
|
}
|
|
353
350
|
};
|
|
354
|
-
let
|
|
355
|
-
const
|
|
351
|
+
let Oe = 0, ie = 1;
|
|
352
|
+
const et = 30;
|
|
356
353
|
let Y;
|
|
357
|
-
class
|
|
358
|
-
constructor(t,
|
|
359
|
-
this.fn = t, this.scheduler =
|
|
354
|
+
class ho {
|
|
355
|
+
constructor(t, o = null, l) {
|
|
356
|
+
this.fn = t, this.scheduler = o, this.active = !0, this.deps = [], this.parent = void 0, mo(this, l);
|
|
360
357
|
}
|
|
361
358
|
run() {
|
|
362
359
|
if (!this.active)
|
|
363
360
|
return this.fn();
|
|
364
|
-
let t = Y,
|
|
361
|
+
let t = Y, o = Ae;
|
|
365
362
|
for (; t; ) {
|
|
366
363
|
if (t === this)
|
|
367
364
|
return;
|
|
368
365
|
t = t.parent;
|
|
369
366
|
}
|
|
370
367
|
try {
|
|
371
|
-
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++
|
|
368
|
+
return this.parent = Y, Y = this, Ae = !0, ie = 1 << ++Oe, Oe <= et ? go(this) : Ot(this), this.fn();
|
|
372
369
|
} finally {
|
|
373
|
-
|
|
370
|
+
Oe <= et && bo(this), ie = 1 << --Oe, Y = this.parent, Ae = o, this.parent = void 0, this.deferStop && this.stop();
|
|
374
371
|
}
|
|
375
372
|
}
|
|
376
373
|
stop() {
|
|
377
|
-
Y === this ? this.deferStop = !0 : this.active && (
|
|
374
|
+
Y === this ? this.deferStop = !0 : this.active && (Ot(this), this.onStop && this.onStop(), this.active = !1);
|
|
378
375
|
}
|
|
379
376
|
}
|
|
380
|
-
function
|
|
377
|
+
function Ot(e) {
|
|
381
378
|
const { deps: t } = e;
|
|
382
379
|
if (t.length) {
|
|
383
|
-
for (let
|
|
384
|
-
t[
|
|
380
|
+
for (let o = 0; o < t.length; o++)
|
|
381
|
+
t[o].delete(e);
|
|
385
382
|
t.length = 0;
|
|
386
383
|
}
|
|
387
384
|
}
|
|
388
385
|
let Ae = !0;
|
|
389
|
-
function
|
|
390
|
-
let
|
|
391
|
-
|
|
386
|
+
function yo(e, t) {
|
|
387
|
+
let o = !1;
|
|
388
|
+
Oe <= et ? Yt(e) || (e.n |= ie, o = !Xt(e)) : o = !e.has(Y), o && (e.add(Y), Y.deps.push(e));
|
|
392
389
|
}
|
|
393
390
|
function wo(e, t) {
|
|
394
|
-
const
|
|
395
|
-
for (const
|
|
396
|
-
|
|
397
|
-
for (const
|
|
398
|
-
|
|
391
|
+
const o = uo(e) ? e : [...e];
|
|
392
|
+
for (const l of o)
|
|
393
|
+
l.computed && Rt(l);
|
|
394
|
+
for (const l of o)
|
|
395
|
+
l.computed || Rt(l);
|
|
399
396
|
}
|
|
400
|
-
function
|
|
397
|
+
function Rt(e, t) {
|
|
401
398
|
(e !== Y || e.allowRecurse) && (e.scheduler ? e.scheduler() : e.run());
|
|
402
399
|
}
|
|
403
400
|
new Set(
|
|
404
|
-
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(
|
|
401
|
+
/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((e) => e !== "arguments" && e !== "caller").map((e) => Symbol[e]).filter(fo)
|
|
405
402
|
);
|
|
406
|
-
function
|
|
403
|
+
function je(e) {
|
|
407
404
|
const t = e && e.__v_raw;
|
|
408
|
-
return t ?
|
|
405
|
+
return t ? je(t) : e;
|
|
409
406
|
}
|
|
410
|
-
function
|
|
411
|
-
Ae && Y && (e =
|
|
407
|
+
function xo(e) {
|
|
408
|
+
Ae && Y && (e = je(e), yo(e.dep || (e.dep = vo())));
|
|
412
409
|
}
|
|
413
410
|
function So(e, t) {
|
|
414
|
-
e =
|
|
415
|
-
const
|
|
416
|
-
|
|
411
|
+
e = je(e);
|
|
412
|
+
const o = e.dep;
|
|
413
|
+
o && wo(o);
|
|
417
414
|
}
|
|
418
|
-
class
|
|
419
|
-
constructor(t,
|
|
420
|
-
this._setter =
|
|
415
|
+
class ko {
|
|
416
|
+
constructor(t, o, l, n) {
|
|
417
|
+
this._setter = o, this.dep = void 0, this.__v_isRef = !0, this.__v_isReadonly = !1, this._dirty = !0, this.effect = new ho(t, () => {
|
|
421
418
|
this._dirty || (this._dirty = !0, So(this));
|
|
422
|
-
}), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly =
|
|
419
|
+
}), this.effect.computed = this, this.effect.active = this._cacheable = !n, this.__v_isReadonly = l;
|
|
423
420
|
}
|
|
424
421
|
get value() {
|
|
425
|
-
const t =
|
|
426
|
-
return
|
|
422
|
+
const t = je(this);
|
|
423
|
+
return xo(t), (t._dirty || !t._cacheable) && (t._dirty = !1, t._value = t.effect.run()), t._value;
|
|
427
424
|
}
|
|
428
425
|
set value(t) {
|
|
429
426
|
this._setter(t);
|
|
430
427
|
}
|
|
431
428
|
}
|
|
432
|
-
function Oo(e, t,
|
|
433
|
-
let
|
|
434
|
-
const r =
|
|
435
|
-
return r ? (
|
|
429
|
+
function Oo(e, t, o = !1) {
|
|
430
|
+
let l, n;
|
|
431
|
+
const r = co(e);
|
|
432
|
+
return r ? (l = e, n = so) : (l = e.get, n = e.set), new ko(l, n, r || !n, o);
|
|
436
433
|
}
|
|
437
|
-
let
|
|
438
|
-
(
|
|
434
|
+
let Ye, Et = "__VUE_INSTANCE_SETTERS__";
|
|
435
|
+
(Ye = kt()[Et]) || (Ye = kt()[Et] = []), Ye.push((e) => e);
|
|
439
436
|
let Ro = !1;
|
|
440
|
-
const
|
|
437
|
+
const Qe = (e, t) => Oo(e, t, Ro);
|
|
441
438
|
function rt(e) {
|
|
442
|
-
const t =
|
|
439
|
+
const t = Qe(() => ({
|
|
443
440
|
"pl-3 pr-10 py-2": !e.icon && e.type !== "color" && e.size === "small",
|
|
444
441
|
"pl-4 pr-10 py-3": !e.icon && e.type !== "color" && e.size === "medium",
|
|
445
442
|
"pl-6 pr-10 py-3": !e.icon && e.type !== "color" && e.size === "large",
|
|
446
443
|
"pl-10 pr-10 py-1": (e.icon || e.type === "color") && e.size === "small",
|
|
447
444
|
"pl-12 pr-10 py-3": (e.icon || e.type === "color") && (e.size === "medium" || e.size === "large"),
|
|
448
445
|
"w-full block": e.block === !0
|
|
449
|
-
})),
|
|
446
|
+
})), o = Qe(() => ({
|
|
450
447
|
"pointer-events-none opacity-50 cursor-not-allowed": e.isDisabled
|
|
451
|
-
})),
|
|
448
|
+
})), l = Qe(() => ({
|
|
452
449
|
"text-xs leading-4": e.size === "small",
|
|
453
450
|
"text-sm leading-4": e.size === "medium",
|
|
454
451
|
"text-base leading-5": e.size === "large"
|
|
455
452
|
}));
|
|
456
453
|
return {
|
|
457
454
|
inputClasses: t,
|
|
458
|
-
disabledClasses:
|
|
459
|
-
textSizeClasses:
|
|
455
|
+
disabledClasses: o,
|
|
456
|
+
textSizeClasses: l
|
|
460
457
|
};
|
|
461
458
|
}
|
|
462
|
-
const Eo = ["placeholder", "type", "
|
|
459
|
+
const Eo = ["placeholder", "type", "disabled", "value"], Co = { class: "absolute inset-y-2 left-2 w-8 cursor-pointer" }, Do = ["disabled"], Po = ["disabled"], _o = {
|
|
463
460
|
inheritAttrs: !1
|
|
464
|
-
},
|
|
461
|
+
}, Cr = /* @__PURE__ */ T({
|
|
465
462
|
..._o,
|
|
466
463
|
__name: "Input",
|
|
467
464
|
props: {
|
|
@@ -477,92 +474,95 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
477
474
|
showColorPicker: { type: Boolean }
|
|
478
475
|
},
|
|
479
476
|
emits: ["update:modelValue"],
|
|
480
|
-
setup(e, { expose: t, emit:
|
|
481
|
-
const
|
|
482
|
-
|
|
483
|
-
() =>
|
|
484
|
-
(
|
|
485
|
-
typeof
|
|
477
|
+
setup(e, { expose: t, emit: o }) {
|
|
478
|
+
const l = e, n = O(null), r = O(l.modelValue ?? "");
|
|
479
|
+
J(
|
|
480
|
+
() => l.modelValue,
|
|
481
|
+
(m) => {
|
|
482
|
+
typeof m < "u" && m !== r.value && (r.value = m);
|
|
486
483
|
}
|
|
487
484
|
);
|
|
488
|
-
const i =
|
|
489
|
-
isSupported:
|
|
490
|
-
open:
|
|
485
|
+
const i = o, { inputClasses: u, disabledClasses: c, textSizeClasses: a } = rt(l), s = k(() => l.type === "color" ? "text" : l.type), {
|
|
486
|
+
isSupported: d,
|
|
487
|
+
open: g,
|
|
491
488
|
sRGBHex: p
|
|
492
|
-
} =
|
|
493
|
-
|
|
489
|
+
} = ao(), b = () => {
|
|
490
|
+
g();
|
|
494
491
|
};
|
|
495
|
-
|
|
496
|
-
r.value =
|
|
492
|
+
J(p, (m) => {
|
|
493
|
+
r.value = m, i("update:modelValue", m);
|
|
497
494
|
});
|
|
498
|
-
const
|
|
499
|
-
const
|
|
500
|
-
if (
|
|
501
|
-
r.value =
|
|
495
|
+
const v = function(m) {
|
|
496
|
+
const w = (m == null ? void 0 : m.target).value;
|
|
497
|
+
if (l.type === "number" && l.min && parseInt(w) < l.min) {
|
|
498
|
+
r.value = l.min, n.value.value = r.value.toString(), i("update:modelValue", l.min);
|
|
502
499
|
return;
|
|
503
500
|
}
|
|
504
|
-
if (
|
|
505
|
-
r.value =
|
|
501
|
+
if (l.type === "number" && l.max && parseInt(w) > l.max) {
|
|
502
|
+
r.value = l.max, n.value.value = r.value.toString(), i("update:modelValue", l.max);
|
|
506
503
|
return;
|
|
507
504
|
}
|
|
508
|
-
r.value = (
|
|
509
|
-
}
|
|
505
|
+
r.value = (m == null ? void 0 : m.target).value, i("update:modelValue", r.value);
|
|
506
|
+
};
|
|
510
507
|
return t({
|
|
511
508
|
focus: () => {
|
|
512
|
-
|
|
509
|
+
var m;
|
|
510
|
+
l.isDisabled || (m = n.value) == null || m.focus();
|
|
513
511
|
}
|
|
514
|
-
}), (
|
|
515
|
-
class:
|
|
512
|
+
}), (m, w) => (C(), I("div", {
|
|
513
|
+
class: F(["relative", [m.block ? "w-full block" : "inline-block"]])
|
|
516
514
|
}, [
|
|
517
|
-
|
|
515
|
+
A("input", Ne({
|
|
518
516
|
class: ["relative mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [_(u), _(a), _(c)]],
|
|
519
|
-
placeholder:
|
|
517
|
+
placeholder: m.placeholder,
|
|
520
518
|
type: s.value,
|
|
521
|
-
|
|
519
|
+
disabled: m.isDisabled,
|
|
522
520
|
value: r.value
|
|
523
|
-
},
|
|
521
|
+
}, m.$attrs, {
|
|
524
522
|
ref_key: "inputElement",
|
|
525
523
|
ref: n,
|
|
526
|
-
onInput:
|
|
524
|
+
onInput: v
|
|
527
525
|
}), null, 16, Eo),
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
An(
|
|
526
|
+
m.type === "color" ? (C(), I(be, { key: 0 }, [
|
|
527
|
+
A("label", Co, [
|
|
528
|
+
An(A("input", {
|
|
531
529
|
class: "invisible",
|
|
532
530
|
type: "color",
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
531
|
+
disabled: m.isDisabled,
|
|
532
|
+
"onUpdate:modelValue": w[0] || (w[0] = (y) => r.value = y),
|
|
533
|
+
onInput: v
|
|
534
|
+
}, null, 40, Do), [
|
|
536
535
|
[$n, r.value]
|
|
537
536
|
]),
|
|
538
|
-
|
|
537
|
+
A("span", {
|
|
539
538
|
class: "border-1 absolute inset-0 block rounded border border-grey-600/25 bg-clip-border shadow",
|
|
540
539
|
style: Nt(`background-color: ${r.value}`)
|
|
541
540
|
}, null, 4)
|
|
542
541
|
]),
|
|
543
|
-
_(
|
|
542
|
+
_(d) && m.showColorPicker ? (C(), I("button", {
|
|
544
543
|
key: 0,
|
|
545
544
|
type: "button",
|
|
546
545
|
class: "absolute inset-y-2 right-2 h-7 w-7 rounded-full hover:bg-grey-200",
|
|
547
|
-
|
|
546
|
+
disabled: m.isDisabled,
|
|
547
|
+
onClick: b
|
|
548
548
|
}, [
|
|
549
|
-
|
|
549
|
+
j(q, {
|
|
550
550
|
size: "xs",
|
|
551
551
|
name: "eyedropper"
|
|
552
552
|
})
|
|
553
|
-
])) : M("", !0)
|
|
554
|
-
], 64)) :
|
|
553
|
+
], 8, Po)) : M("", !0)
|
|
554
|
+
], 64)) : m.icon ? (C(), I("span", {
|
|
555
555
|
key: 1,
|
|
556
|
-
class:
|
|
556
|
+
class: F(["absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4", _(a)])
|
|
557
557
|
}, [
|
|
558
|
-
|
|
558
|
+
j(q, { name: m.icon }, null, 8, ["name"])
|
|
559
559
|
], 2)) : M("", !0)
|
|
560
560
|
], 2));
|
|
561
561
|
}
|
|
562
|
-
}),
|
|
562
|
+
}), Lo = { class: "inline-block text-grey-700 dark:text-grey-200 text-sm font-medium casual-20" }, To = ["for"], Io = {
|
|
563
563
|
key: 0,
|
|
564
564
|
class: "block text-xs text-grey-400 font-normal mono-0 casual-60"
|
|
565
|
-
},
|
|
565
|
+
}, Dr = /* @__PURE__ */ T({
|
|
566
566
|
__name: "Label",
|
|
567
567
|
props: {
|
|
568
568
|
id: {},
|
|
@@ -570,61 +570,61 @@ const Eo = ["placeholder", "type", "tabindex", "value"], Do = { class: "absolute
|
|
|
570
570
|
description: {}
|
|
571
571
|
},
|
|
572
572
|
setup(e) {
|
|
573
|
-
return (t,
|
|
574
|
-
|
|
575
|
-
t.description ? (
|
|
573
|
+
return (t, o) => (C(), I("span", Lo, [
|
|
574
|
+
A("label", { for: t.id }, X(t.label), 9, To),
|
|
575
|
+
t.description ? (C(), I("span", Io, X(t.description), 1)) : M("", !0)
|
|
576
576
|
]));
|
|
577
577
|
}
|
|
578
578
|
});
|
|
579
|
-
function
|
|
579
|
+
function W(e, t, ...o) {
|
|
580
580
|
if (e in t) {
|
|
581
581
|
let n = t[e];
|
|
582
|
-
return typeof n == "function" ? n(...
|
|
582
|
+
return typeof n == "function" ? n(...o) : n;
|
|
583
583
|
}
|
|
584
|
-
let
|
|
585
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
584
|
+
let l = new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map((n) => `"${n}"`).join(", ")}.`);
|
|
585
|
+
throw Error.captureStackTrace && Error.captureStackTrace(l, W), l;
|
|
586
586
|
}
|
|
587
|
-
var
|
|
588
|
-
function
|
|
587
|
+
var Ee = ((e) => (e[e.None = 0] = "None", e[e.RenderStrategy = 1] = "RenderStrategy", e[e.Static = 2] = "Static", e))(Ee || {}), Ao = ((e) => (e[e.Unmount = 0] = "Unmount", e[e.Hidden = 1] = "Hidden", e))(Ao || {});
|
|
588
|
+
function B({ visible: e = !0, features: t = 0, ourProps: o, theirProps: l, ...n }) {
|
|
589
589
|
var r;
|
|
590
|
-
let i = Zt(
|
|
590
|
+
let i = Zt(l, o), u = Object.assign(n, { props: i });
|
|
591
591
|
if (e || t & 2 && i.static)
|
|
592
|
-
return
|
|
592
|
+
return Ze(u);
|
|
593
593
|
if (t & 1) {
|
|
594
594
|
let c = (r = i.unmount) == null || r ? 0 : 1;
|
|
595
|
-
return
|
|
595
|
+
return W(c, { 0() {
|
|
596
596
|
return null;
|
|
597
597
|
}, 1() {
|
|
598
|
-
return
|
|
598
|
+
return Ze({ ...n, props: { ...i, hidden: !0, style: { display: "none" } } });
|
|
599
599
|
} });
|
|
600
600
|
}
|
|
601
|
-
return
|
|
601
|
+
return Ze(u);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function Ze({ props: e, attrs: t, slots: o, slot: l, name: n }) {
|
|
604
604
|
var r, i;
|
|
605
|
-
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r =
|
|
606
|
-
if (
|
|
607
|
-
let
|
|
608
|
-
for (let [p,
|
|
609
|
-
typeof
|
|
610
|
-
|
|
605
|
+
let { as: u, ...c } = it(e, ["unmount", "static"]), a = (r = o.default) == null ? void 0 : r.call(o, l), s = {};
|
|
606
|
+
if (l) {
|
|
607
|
+
let d = !1, g = [];
|
|
608
|
+
for (let [p, b] of Object.entries(l))
|
|
609
|
+
typeof b == "boolean" && (d = !0), b === !0 && g.push(p);
|
|
610
|
+
d && (s["data-headlessui-state"] = g.join(" "));
|
|
611
611
|
}
|
|
612
612
|
if (u === "template") {
|
|
613
613
|
if (a = Qt(a ?? []), Object.keys(c).length > 0 || Object.keys(t).length > 0) {
|
|
614
|
-
let [
|
|
615
|
-
if (
|
|
616
|
-
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((
|
|
617
|
-
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((
|
|
614
|
+
let [d, ...g] = a ?? [];
|
|
615
|
+
if (!$o(d) || g.length > 0)
|
|
616
|
+
throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(c).concat(Object.keys(t)).map((v) => v.trim()).filter((v, h, m) => m.indexOf(v) === h).sort((v, h) => v.localeCompare(h)).map((v) => ` - ${v}`).join(`
|
|
617
|
+
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((v) => ` - ${v}`).join(`
|
|
618
618
|
`)].join(`
|
|
619
619
|
`));
|
|
620
|
-
let p = Zt((i =
|
|
621
|
-
for (let
|
|
622
|
-
|
|
623
|
-
return
|
|
620
|
+
let p = Zt((i = d.props) != null ? i : {}, c), b = Mn(d, p);
|
|
621
|
+
for (let v in p)
|
|
622
|
+
v.startsWith("on") && (b.props || (b.props = {}), b.props[v] = p[v]);
|
|
623
|
+
return b;
|
|
624
624
|
}
|
|
625
625
|
return Array.isArray(a) && a.length === 1 ? a[0] : a;
|
|
626
626
|
}
|
|
627
|
-
return
|
|
627
|
+
return Re(u, Object.assign({}, c, s), { default: () => a });
|
|
628
628
|
}
|
|
629
629
|
function Qt(e) {
|
|
630
630
|
return e.flatMap((t) => t.type === be ? Qt(t.children) : [t]);
|
|
@@ -634,15 +634,15 @@ function Zt(...e) {
|
|
|
634
634
|
return {};
|
|
635
635
|
if (e.length === 1)
|
|
636
636
|
return e[0];
|
|
637
|
-
let t = {},
|
|
638
|
-
for (let
|
|
639
|
-
for (let n in
|
|
640
|
-
n.startsWith("on") && typeof
|
|
637
|
+
let t = {}, o = {};
|
|
638
|
+
for (let l of e)
|
|
639
|
+
for (let n in l)
|
|
640
|
+
n.startsWith("on") && typeof l[n] == "function" ? (o[n] != null || (o[n] = []), o[n].push(l[n])) : t[n] = l[n];
|
|
641
641
|
if (t.disabled || t["aria-disabled"])
|
|
642
|
-
return Object.assign(t, Object.fromEntries(Object.keys(
|
|
643
|
-
for (let
|
|
644
|
-
Object.assign(t, { [
|
|
645
|
-
let i = l
|
|
642
|
+
return Object.assign(t, Object.fromEntries(Object.keys(o).map((l) => [l, void 0])));
|
|
643
|
+
for (let l in o)
|
|
644
|
+
Object.assign(t, { [l](n, ...r) {
|
|
645
|
+
let i = o[l];
|
|
646
646
|
for (let u of i) {
|
|
647
647
|
if (n instanceof Event && n.defaultPrevented)
|
|
648
648
|
return;
|
|
@@ -653,58 +653,58 @@ function Zt(...e) {
|
|
|
653
653
|
}
|
|
654
654
|
function Jt(e) {
|
|
655
655
|
let t = Object.assign({}, e);
|
|
656
|
-
for (let
|
|
657
|
-
t[
|
|
656
|
+
for (let o in t)
|
|
657
|
+
t[o] === void 0 && delete t[o];
|
|
658
658
|
return t;
|
|
659
659
|
}
|
|
660
660
|
function it(e, t = []) {
|
|
661
|
-
let
|
|
662
|
-
for (let
|
|
663
|
-
|
|
664
|
-
return
|
|
661
|
+
let o = Object.assign({}, e);
|
|
662
|
+
for (let l of t)
|
|
663
|
+
l in o && delete o[l];
|
|
664
|
+
return o;
|
|
665
665
|
}
|
|
666
|
-
function
|
|
666
|
+
function $o(e) {
|
|
667
667
|
return e == null ? !1 : typeof e.type == "string" || typeof e.type == "object" || typeof e.type == "function";
|
|
668
668
|
}
|
|
669
|
-
let
|
|
670
|
-
function
|
|
671
|
-
return
|
|
669
|
+
let Mo = 0;
|
|
670
|
+
function Fo() {
|
|
671
|
+
return ++Mo;
|
|
672
672
|
}
|
|
673
|
-
function
|
|
674
|
-
return
|
|
673
|
+
function Z() {
|
|
674
|
+
return Fo();
|
|
675
675
|
}
|
|
676
676
|
var D = ((e) => (e.Space = " ", e.Enter = "Enter", e.Escape = "Escape", e.Backspace = "Backspace", e.Delete = "Delete", e.ArrowLeft = "ArrowLeft", e.ArrowUp = "ArrowUp", e.ArrowRight = "ArrowRight", e.ArrowDown = "ArrowDown", e.Home = "Home", e.End = "End", e.PageUp = "PageUp", e.PageDown = "PageDown", e.Tab = "Tab", e))(D || {});
|
|
677
677
|
function Vo(e) {
|
|
678
678
|
throw new Error("Unexpected object: " + e);
|
|
679
679
|
}
|
|
680
|
-
var
|
|
680
|
+
var L = ((e) => (e[e.First = 0] = "First", e[e.Previous = 1] = "Previous", e[e.Next = 2] = "Next", e[e.Last = 3] = "Last", e[e.Specific = 4] = "Specific", e[e.Nothing = 5] = "Nothing", e))(L || {});
|
|
681
681
|
function en(e, t) {
|
|
682
|
-
let
|
|
683
|
-
if (
|
|
682
|
+
let o = t.resolveItems();
|
|
683
|
+
if (o.length <= 0)
|
|
684
684
|
return null;
|
|
685
|
-
let
|
|
685
|
+
let l = t.resolveActiveIndex(), n = l ?? -1, r = (() => {
|
|
686
686
|
switch (e.focus) {
|
|
687
687
|
case 0:
|
|
688
|
-
return
|
|
688
|
+
return o.findIndex((i) => !t.resolveDisabled(i));
|
|
689
689
|
case 1: {
|
|
690
|
-
let i =
|
|
691
|
-
return i === -1 ? i :
|
|
690
|
+
let i = o.slice().reverse().findIndex((u, c, a) => n !== -1 && a.length - c - 1 >= n ? !1 : !t.resolveDisabled(u));
|
|
691
|
+
return i === -1 ? i : o.length - 1 - i;
|
|
692
692
|
}
|
|
693
693
|
case 2:
|
|
694
|
-
return
|
|
694
|
+
return o.findIndex((i, u) => u <= n ? !1 : !t.resolveDisabled(i));
|
|
695
695
|
case 3: {
|
|
696
|
-
let i =
|
|
697
|
-
return i === -1 ? i :
|
|
696
|
+
let i = o.slice().reverse().findIndex((u) => !t.resolveDisabled(u));
|
|
697
|
+
return i === -1 ? i : o.length - 1 - i;
|
|
698
698
|
}
|
|
699
699
|
case 4:
|
|
700
|
-
return
|
|
700
|
+
return o.findIndex((i) => t.resolveId(i) === e.id);
|
|
701
701
|
case 5:
|
|
702
702
|
return null;
|
|
703
703
|
default:
|
|
704
704
|
Vo(e);
|
|
705
705
|
}
|
|
706
706
|
})();
|
|
707
|
-
return r === -1 ?
|
|
707
|
+
return r === -1 ? l : r;
|
|
708
708
|
}
|
|
709
709
|
function E(e) {
|
|
710
710
|
var t;
|
|
@@ -718,24 +718,24 @@ function nn() {
|
|
|
718
718
|
function on(e) {
|
|
719
719
|
ye(tn, e);
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function Ct(e, t) {
|
|
722
722
|
if (e)
|
|
723
723
|
return e;
|
|
724
|
-
let
|
|
725
|
-
if (typeof
|
|
724
|
+
let o = t ?? "button";
|
|
725
|
+
if (typeof o == "string" && o.toLowerCase() === "button")
|
|
726
726
|
return "button";
|
|
727
727
|
}
|
|
728
728
|
function at(e, t) {
|
|
729
|
-
let
|
|
729
|
+
let o = O(Ct(e.value.type, e.value.as));
|
|
730
730
|
return ee(() => {
|
|
731
|
-
|
|
732
|
-
}),
|
|
733
|
-
var
|
|
734
|
-
|
|
735
|
-
}),
|
|
736
|
-
}
|
|
737
|
-
var
|
|
738
|
-
class
|
|
731
|
+
o.value = Ct(e.value.type, e.value.as);
|
|
732
|
+
}), we(() => {
|
|
733
|
+
var l;
|
|
734
|
+
o.value || E(t) && E(t) instanceof HTMLButtonElement && !((l = E(t)) != null && l.hasAttribute("type")) && (o.value = "button");
|
|
735
|
+
}), o;
|
|
736
|
+
}
|
|
737
|
+
var No = Object.defineProperty, Bo = (e, t, o) => t in e ? No(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, Dt = (e, t, o) => (Bo(e, typeof t != "symbol" ? t + "" : t, o), o);
|
|
738
|
+
class jo {
|
|
739
739
|
constructor() {
|
|
740
740
|
Dt(this, "current", this.detect()), Dt(this, "currentId", 0);
|
|
741
741
|
}
|
|
@@ -758,7 +758,7 @@ class Bo {
|
|
|
758
758
|
return typeof window > "u" || typeof document > "u" ? "server" : "client";
|
|
759
759
|
}
|
|
760
760
|
}
|
|
761
|
-
let st = new
|
|
761
|
+
let st = new jo();
|
|
762
762
|
function ut(e) {
|
|
763
763
|
if (st.isServer)
|
|
764
764
|
return null;
|
|
@@ -771,75 +771,75 @@ function ut(e) {
|
|
|
771
771
|
}
|
|
772
772
|
return document;
|
|
773
773
|
}
|
|
774
|
-
function
|
|
775
|
-
|
|
774
|
+
function Ho({ container: e, accept: t, walk: o, enabled: l }) {
|
|
775
|
+
we(() => {
|
|
776
776
|
let n = e.value;
|
|
777
|
-
if (!n ||
|
|
777
|
+
if (!n || l !== void 0 && !l.value)
|
|
778
778
|
return;
|
|
779
779
|
let r = ut(e);
|
|
780
780
|
if (!r)
|
|
781
781
|
return;
|
|
782
782
|
let i = Object.assign((c) => t(c), { acceptNode: t }), u = r.createTreeWalker(n, NodeFilter.SHOW_ELEMENT, i, !1);
|
|
783
783
|
for (; u.nextNode(); )
|
|
784
|
-
|
|
784
|
+
o(u.currentNode);
|
|
785
785
|
});
|
|
786
786
|
}
|
|
787
|
-
let
|
|
788
|
-
var
|
|
787
|
+
let tt = ["[contentEditable=true]", "[tabindex]", "a[href]", "area[href]", "button:not([disabled])", "iframe", "input:not([disabled])", "select:not([disabled])", "textarea:not([disabled])"].map((e) => `${e}:not([tabindex='-1'])`).join(",");
|
|
788
|
+
var nt = ((e) => (e[e.First = 1] = "First", e[e.Previous = 2] = "Previous", e[e.Next = 4] = "Next", e[e.Last = 8] = "Last", e[e.WrapAround = 16] = "WrapAround", e[e.NoScroll = 32] = "NoScroll", e))(nt || {}), zo = ((e) => (e[e.Error = 0] = "Error", e[e.Overflow = 1] = "Overflow", e[e.Success = 2] = "Success", e[e.Underflow = 3] = "Underflow", e))(zo || {}), Uo = ((e) => (e[e.Previous = -1] = "Previous", e[e.Next = 1] = "Next", e))(Uo || {});
|
|
789
789
|
function ln(e = document.body) {
|
|
790
|
-
return e == null ? [] : Array.from(e.querySelectorAll(
|
|
790
|
+
return e == null ? [] : Array.from(e.querySelectorAll(tt)).sort((t, o) => Math.sign((t.tabIndex || Number.MAX_SAFE_INTEGER) - (o.tabIndex || Number.MAX_SAFE_INTEGER)));
|
|
791
791
|
}
|
|
792
|
-
var
|
|
792
|
+
var He = ((e) => (e[e.Strict = 0] = "Strict", e[e.Loose = 1] = "Loose", e))(He || {});
|
|
793
793
|
function ze(e, t = 0) {
|
|
794
|
-
var
|
|
795
|
-
return e === ((
|
|
796
|
-
return e.matches(
|
|
794
|
+
var o;
|
|
795
|
+
return e === ((o = ut(e)) == null ? void 0 : o.body) ? !1 : W(t, { 0() {
|
|
796
|
+
return e.matches(tt);
|
|
797
797
|
}, 1() {
|
|
798
|
-
let
|
|
799
|
-
for (;
|
|
800
|
-
if (
|
|
798
|
+
let l = e;
|
|
799
|
+
for (; l !== null; ) {
|
|
800
|
+
if (l.matches(tt))
|
|
801
801
|
return !0;
|
|
802
|
-
|
|
802
|
+
l = l.parentElement;
|
|
803
803
|
}
|
|
804
804
|
return !1;
|
|
805
805
|
} });
|
|
806
806
|
}
|
|
807
807
|
function rn(e) {
|
|
808
808
|
let t = ut(e);
|
|
809
|
-
|
|
810
|
-
t && !ze(t.activeElement, 0) &&
|
|
809
|
+
N(() => {
|
|
810
|
+
t && !ze(t.activeElement, 0) && Ko(e);
|
|
811
811
|
});
|
|
812
812
|
}
|
|
813
|
-
var
|
|
813
|
+
var Wo = ((e) => (e[e.Keyboard = 0] = "Keyboard", e[e.Mouse = 1] = "Mouse", e))(Wo || {});
|
|
814
814
|
typeof window < "u" && typeof document < "u" && (document.addEventListener("keydown", (e) => {
|
|
815
815
|
e.metaKey || e.altKey || e.ctrlKey || (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
816
816
|
}, !0), document.addEventListener("click", (e) => {
|
|
817
817
|
e.detail === 1 ? delete document.documentElement.dataset.headlessuiFocusVisible : e.detail === 0 && (document.documentElement.dataset.headlessuiFocusVisible = "");
|
|
818
818
|
}, !0));
|
|
819
|
-
function
|
|
819
|
+
function Ko(e) {
|
|
820
820
|
e == null || e.focus({ preventScroll: !0 });
|
|
821
821
|
}
|
|
822
|
-
let
|
|
823
|
-
function
|
|
824
|
-
var t,
|
|
825
|
-
return (
|
|
822
|
+
let Go = ["textarea", "input"].join(",");
|
|
823
|
+
function qo(e) {
|
|
824
|
+
var t, o;
|
|
825
|
+
return (o = (t = e == null ? void 0 : e.matches) == null ? void 0 : t.call(e, Go)) != null ? o : !1;
|
|
826
826
|
}
|
|
827
|
-
function ct(e, t = (
|
|
828
|
-
return e.slice().sort((
|
|
829
|
-
let n = t(
|
|
827
|
+
function ct(e, t = (o) => o) {
|
|
828
|
+
return e.slice().sort((o, l) => {
|
|
829
|
+
let n = t(o), r = t(l);
|
|
830
830
|
if (n === null || r === null)
|
|
831
831
|
return 0;
|
|
832
832
|
let i = n.compareDocumentPosition(r);
|
|
833
833
|
return i & Node.DOCUMENT_POSITION_FOLLOWING ? -1 : i & Node.DOCUMENT_POSITION_PRECEDING ? 1 : 0;
|
|
834
834
|
});
|
|
835
835
|
}
|
|
836
|
-
function
|
|
837
|
-
return
|
|
836
|
+
function Xo(e, t) {
|
|
837
|
+
return Yo(ln(), t, { relativeTo: e });
|
|
838
838
|
}
|
|
839
|
-
function
|
|
839
|
+
function Yo(e, t, { sorted: o = !0, relativeTo: l = null, skipElements: n = [] } = {}) {
|
|
840
840
|
var r;
|
|
841
|
-
let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ?
|
|
842
|
-
n.length > 0 && u.length > 1 && (u = u.filter((
|
|
841
|
+
let i = (r = Array.isArray(e) ? e.length > 0 ? e[0].ownerDocument : document : e == null ? void 0 : e.ownerDocument) != null ? r : document, u = Array.isArray(e) ? o ? ct(e) : e : ln(e);
|
|
842
|
+
n.length > 0 && u.length > 1 && (u = u.filter((b) => !n.includes(b))), l = l ?? i.activeElement;
|
|
843
843
|
let c = (() => {
|
|
844
844
|
if (t & 5)
|
|
845
845
|
return 1;
|
|
@@ -850,42 +850,42 @@ function Xo(e, t, { sorted: l = !0, relativeTo: o = null, skipElements: n = [] }
|
|
|
850
850
|
if (t & 1)
|
|
851
851
|
return 0;
|
|
852
852
|
if (t & 2)
|
|
853
|
-
return Math.max(0, u.indexOf(
|
|
853
|
+
return Math.max(0, u.indexOf(l)) - 1;
|
|
854
854
|
if (t & 4)
|
|
855
|
-
return Math.max(0, u.indexOf(
|
|
855
|
+
return Math.max(0, u.indexOf(l)) + 1;
|
|
856
856
|
if (t & 8)
|
|
857
857
|
return u.length - 1;
|
|
858
858
|
throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last");
|
|
859
|
-
})(), s = t & 32 ? { preventScroll: !0 } : {},
|
|
859
|
+
})(), s = t & 32 ? { preventScroll: !0 } : {}, d = 0, g = u.length, p;
|
|
860
860
|
do {
|
|
861
|
-
if (
|
|
861
|
+
if (d >= g || d + g <= 0)
|
|
862
862
|
return 0;
|
|
863
|
-
let
|
|
863
|
+
let b = a + d;
|
|
864
864
|
if (t & 16)
|
|
865
|
-
|
|
865
|
+
b = (b + g) % g;
|
|
866
866
|
else {
|
|
867
|
-
if (
|
|
867
|
+
if (b < 0)
|
|
868
868
|
return 3;
|
|
869
|
-
if (
|
|
869
|
+
if (b >= g)
|
|
870
870
|
return 1;
|
|
871
871
|
}
|
|
872
|
-
p = u[
|
|
872
|
+
p = u[b], p == null || p.focus(s), d += c;
|
|
873
873
|
} while (p !== i.activeElement);
|
|
874
|
-
return t & 6 &&
|
|
874
|
+
return t & 6 && qo(p) && p.select(), 2;
|
|
875
875
|
}
|
|
876
|
-
function Te(e, t,
|
|
877
|
-
st.isServer ||
|
|
878
|
-
document.addEventListener(e, t,
|
|
876
|
+
function Te(e, t, o) {
|
|
877
|
+
st.isServer || we((l) => {
|
|
878
|
+
document.addEventListener(e, t, o), l(() => document.removeEventListener(e, t, o));
|
|
879
879
|
});
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
st.isServer ||
|
|
883
|
-
window.addEventListener(e, t,
|
|
881
|
+
function Qo(e, t, o) {
|
|
882
|
+
st.isServer || we((l) => {
|
|
883
|
+
window.addEventListener(e, t, o), l(() => window.removeEventListener(e, t, o));
|
|
884
884
|
});
|
|
885
885
|
}
|
|
886
|
-
function an(e, t,
|
|
887
|
-
function
|
|
888
|
-
if (!
|
|
886
|
+
function an(e, t, o = k(() => !0)) {
|
|
887
|
+
function l(r, i) {
|
|
888
|
+
if (!o.value || r.defaultPrevented)
|
|
889
889
|
return;
|
|
890
890
|
let u = i(r);
|
|
891
891
|
if (u === null || !u.getRootNode().contains(u))
|
|
@@ -900,114 +900,114 @@ function an(e, t, l = k(() => !0)) {
|
|
|
900
900
|
if (s != null && s.contains(u) || r.composed && r.composedPath().includes(s))
|
|
901
901
|
return;
|
|
902
902
|
}
|
|
903
|
-
return !ze(u,
|
|
903
|
+
return !ze(u, He.Loose) && u.tabIndex !== -1 && r.preventDefault(), t(r, u);
|
|
904
904
|
}
|
|
905
|
-
let n =
|
|
905
|
+
let n = O(null);
|
|
906
906
|
Te("pointerdown", (r) => {
|
|
907
907
|
var i, u;
|
|
908
|
-
|
|
908
|
+
o.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
909
909
|
}, !0), Te("mousedown", (r) => {
|
|
910
910
|
var i, u;
|
|
911
|
-
|
|
911
|
+
o.value && (n.value = ((u = (i = r.composedPath) == null ? void 0 : i.call(r)) == null ? void 0 : u[0]) || r.target);
|
|
912
912
|
}, !0), Te("click", (r) => {
|
|
913
|
-
n.value && (
|
|
914
|
-
}, !0), Te("touchend", (r) =>
|
|
913
|
+
n.value && (l(r, () => n.value), n.value = null);
|
|
914
|
+
}, !0), Te("touchend", (r) => l(r, () => r.target instanceof HTMLElement ? r.target : null), !0), Qo("blur", (r) => l(r, () => window.document.activeElement instanceof HTMLIFrameElement ? window.document.activeElement : null), !0);
|
|
915
915
|
}
|
|
916
916
|
var dt = ((e) => (e[e.None = 1] = "None", e[e.Focusable = 2] = "Focusable", e[e.Hidden = 4] = "Hidden", e))(dt || {});
|
|
917
|
-
let sn =
|
|
917
|
+
let sn = T({ name: "Hidden", props: { as: { type: [Object, String], default: "div" }, features: { type: Number, default: 1 } }, setup(e, { slots: t, attrs: o }) {
|
|
918
918
|
return () => {
|
|
919
|
-
let { features:
|
|
920
|
-
return
|
|
919
|
+
let { features: l, ...n } = e, r = { "aria-hidden": (l & 2) === 2 ? !0 : void 0, style: { position: "fixed", top: 1, left: 1, width: 1, height: 0, padding: 0, margin: -1, overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0", ...(l & 4) === 4 && (l & 2) !== 2 && { display: "none" } } };
|
|
920
|
+
return B({ ourProps: r, theirProps: n, slot: {}, attrs: o, slots: t, name: "Hidden" });
|
|
921
921
|
};
|
|
922
922
|
} });
|
|
923
|
-
function un(e = {}, t = null,
|
|
924
|
-
for (let [
|
|
925
|
-
dn(
|
|
926
|
-
return
|
|
923
|
+
function un(e = {}, t = null, o = []) {
|
|
924
|
+
for (let [l, n] of Object.entries(e))
|
|
925
|
+
dn(o, cn(t, l), n);
|
|
926
|
+
return o;
|
|
927
927
|
}
|
|
928
928
|
function cn(e, t) {
|
|
929
929
|
return e ? e + "[" + t + "]" : t;
|
|
930
930
|
}
|
|
931
|
-
function dn(e, t,
|
|
932
|
-
if (Array.isArray(
|
|
933
|
-
for (let [
|
|
934
|
-
dn(e, cn(t,
|
|
931
|
+
function dn(e, t, o) {
|
|
932
|
+
if (Array.isArray(o))
|
|
933
|
+
for (let [l, n] of o.entries())
|
|
934
|
+
dn(e, cn(t, l.toString()), n);
|
|
935
935
|
else
|
|
936
|
-
|
|
936
|
+
o instanceof Date ? e.push([t, o.toISOString()]) : typeof o == "boolean" ? e.push([t, o ? "1" : "0"]) : typeof o == "string" ? e.push([t, o]) : typeof o == "number" ? e.push([t, `${o}`]) : o == null ? e.push([t, ""]) : un(o, t, e);
|
|
937
937
|
}
|
|
938
|
-
function
|
|
939
|
-
var t,
|
|
940
|
-
let
|
|
941
|
-
if (
|
|
942
|
-
for (let n of
|
|
938
|
+
function Zo(e) {
|
|
939
|
+
var t, o;
|
|
940
|
+
let l = (t = e == null ? void 0 : e.form) != null ? t : e.closest("form");
|
|
941
|
+
if (l) {
|
|
942
|
+
for (let n of l.elements)
|
|
943
943
|
if (n !== e && (n.tagName === "INPUT" && n.type === "submit" || n.tagName === "BUTTON" && n.type === "submit" || n.nodeName === "INPUT" && n.type === "image")) {
|
|
944
944
|
n.click();
|
|
945
945
|
return;
|
|
946
946
|
}
|
|
947
|
-
(
|
|
947
|
+
(o = l.requestSubmit) == null || o.call(l);
|
|
948
948
|
}
|
|
949
949
|
}
|
|
950
|
-
function fn(e, t,
|
|
951
|
-
let
|
|
952
|
-
return [k(() => n.value ? e.value :
|
|
953
|
-
return n.value || (
|
|
950
|
+
function fn(e, t, o) {
|
|
951
|
+
let l = O(o == null ? void 0 : o.value), n = k(() => e.value !== void 0);
|
|
952
|
+
return [k(() => n.value ? e.value : l.value), function(r) {
|
|
953
|
+
return n.value || (l.value = r), t == null ? void 0 : t(r);
|
|
954
954
|
}];
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function Pt(e) {
|
|
957
957
|
return [e.screenX, e.screenY];
|
|
958
958
|
}
|
|
959
959
|
function pn() {
|
|
960
|
-
let e =
|
|
960
|
+
let e = O([-1, -1]);
|
|
961
961
|
return { wasMoved(t) {
|
|
962
|
-
let
|
|
963
|
-
return e.value[0] ===
|
|
962
|
+
let o = Pt(t);
|
|
963
|
+
return e.value[0] === o[0] && e.value[1] === o[1] ? !1 : (e.value = o, !0);
|
|
964
964
|
}, update(t) {
|
|
965
|
-
e.value =
|
|
965
|
+
e.value = Pt(t);
|
|
966
966
|
} };
|
|
967
967
|
}
|
|
968
968
|
let mn = Symbol("DescriptionContext");
|
|
969
|
-
function
|
|
969
|
+
function Jo() {
|
|
970
970
|
let e = he(mn, null);
|
|
971
971
|
if (e === null)
|
|
972
972
|
throw new Error("Missing parent");
|
|
973
973
|
return e;
|
|
974
974
|
}
|
|
975
|
-
function
|
|
976
|
-
let
|
|
975
|
+
function el({ slot: e = O({}), name: t = "Description", props: o = {} } = {}) {
|
|
976
|
+
let l = O([]);
|
|
977
977
|
function n(r) {
|
|
978
|
-
return
|
|
979
|
-
let i =
|
|
980
|
-
i !== -1 &&
|
|
978
|
+
return l.value.push(r), () => {
|
|
979
|
+
let i = l.value.indexOf(r);
|
|
980
|
+
i !== -1 && l.value.splice(i, 1);
|
|
981
981
|
};
|
|
982
982
|
}
|
|
983
|
-
return ye(mn, { register: n, slot: e, name: t, props:
|
|
983
|
+
return ye(mn, { register: n, slot: e, name: t, props: o }), k(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
984
984
|
}
|
|
985
|
-
|
|
986
|
-
let
|
|
987
|
-
return ee(() =>
|
|
988
|
-
let { name: n = "Description", slot: r =
|
|
989
|
-
return
|
|
985
|
+
T({ name: "Description", props: { as: { type: [Object, String], default: "p" }, id: { type: String, default: () => `headlessui-description-${Z()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
986
|
+
let l = Jo();
|
|
987
|
+
return ee(() => Be(l.register(e.id))), () => {
|
|
988
|
+
let { name: n = "Description", slot: r = O({}), props: i = {} } = l, { id: u, ...c } = e, a = { ...Object.entries(i).reduce((s, [d, g]) => Object.assign(s, { [d]: _(g) }), {}), id: u };
|
|
989
|
+
return B({ ourProps: a, theirProps: c, slot: r.value, attrs: t, slots: o, name: n });
|
|
990
990
|
};
|
|
991
991
|
} });
|
|
992
|
-
let
|
|
992
|
+
let _t = /([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;
|
|
993
993
|
function Lt(e) {
|
|
994
|
-
var t,
|
|
995
|
-
let
|
|
994
|
+
var t, o;
|
|
995
|
+
let l = (t = e.innerText) != null ? t : "", n = e.cloneNode(!0);
|
|
996
996
|
if (!(n instanceof HTMLElement))
|
|
997
|
-
return
|
|
997
|
+
return l;
|
|
998
998
|
let r = !1;
|
|
999
999
|
for (let u of n.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))
|
|
1000
1000
|
u.remove(), r = !0;
|
|
1001
|
-
let i = r ? (
|
|
1002
|
-
return
|
|
1001
|
+
let i = r ? (o = n.innerText) != null ? o : "" : l;
|
|
1002
|
+
return _t.test(i) && (i = i.replace(_t, "")), i;
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function tl(e) {
|
|
1005
1005
|
let t = e.getAttribute("aria-label");
|
|
1006
1006
|
if (typeof t == "string")
|
|
1007
1007
|
return t.trim();
|
|
1008
|
-
let
|
|
1009
|
-
if (
|
|
1010
|
-
let
|
|
1008
|
+
let o = e.getAttribute("aria-labelledby");
|
|
1009
|
+
if (o) {
|
|
1010
|
+
let l = o.split(" ").map((n) => {
|
|
1011
1011
|
let r = document.getElementById(n);
|
|
1012
1012
|
if (r) {
|
|
1013
1013
|
let i = r.getAttribute("aria-label");
|
|
@@ -1015,140 +1015,140 @@ function el(e) {
|
|
|
1015
1015
|
}
|
|
1016
1016
|
return null;
|
|
1017
1017
|
}).filter(Boolean);
|
|
1018
|
-
if (
|
|
1019
|
-
return
|
|
1018
|
+
if (l.length > 0)
|
|
1019
|
+
return l.join(", ");
|
|
1020
1020
|
}
|
|
1021
1021
|
return Lt(e).trim();
|
|
1022
1022
|
}
|
|
1023
1023
|
function vn(e) {
|
|
1024
|
-
let t =
|
|
1024
|
+
let t = O(""), o = O("");
|
|
1025
1025
|
return () => {
|
|
1026
|
-
let
|
|
1027
|
-
if (!
|
|
1026
|
+
let l = E(e);
|
|
1027
|
+
if (!l)
|
|
1028
1028
|
return "";
|
|
1029
|
-
let n =
|
|
1029
|
+
let n = l.innerText;
|
|
1030
1030
|
if (t.value === n)
|
|
1031
|
-
return
|
|
1032
|
-
let r =
|
|
1033
|
-
return t.value = n,
|
|
1031
|
+
return o.value;
|
|
1032
|
+
let r = tl(l).trim().toLowerCase();
|
|
1033
|
+
return t.value = n, o.value = r, r;
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function nl(e, t) {
|
|
1037
1037
|
return e === t;
|
|
1038
1038
|
}
|
|
1039
|
-
var
|
|
1040
|
-
function
|
|
1039
|
+
var ol = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(ol || {}), ll = ((e) => (e[e.Single = 0] = "Single", e[e.Multi = 1] = "Multi", e))(ll || {}), rl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(rl || {});
|
|
1040
|
+
function il(e) {
|
|
1041
1041
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1042
1042
|
}
|
|
1043
1043
|
let gn = Symbol("ListboxContext");
|
|
1044
1044
|
function De(e) {
|
|
1045
1045
|
let t = he(gn, null);
|
|
1046
1046
|
if (t === null) {
|
|
1047
|
-
let
|
|
1048
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
1047
|
+
let o = new Error(`<${e} /> is missing a parent <Listbox /> component.`);
|
|
1048
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, De), o;
|
|
1049
1049
|
}
|
|
1050
1050
|
return t;
|
|
1051
1051
|
}
|
|
1052
|
-
let
|
|
1053
|
-
let n =
|
|
1054
|
-
function
|
|
1055
|
-
let
|
|
1052
|
+
let al = T({ name: "Listbox", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => nl }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(e, { slots: t, attrs: o, emit: l }) {
|
|
1053
|
+
let n = O(1), r = O(null), i = O(null), u = O(null), c = O([]), a = O(""), s = O(null), d = O(1);
|
|
1054
|
+
function g(y = (x) => x) {
|
|
1055
|
+
let x = s.value !== null ? c.value[s.value] : null, S = ct(y(c.value.slice()), (R) => E(R.dataRef.domRef)), P = x ? S.indexOf(x) : null;
|
|
1056
1056
|
return P === -1 && (P = null), { options: S, activeOptionIndex: P };
|
|
1057
1057
|
}
|
|
1058
|
-
let p = k(() => e.multiple ? 1 : 0), [
|
|
1058
|
+
let p = k(() => e.multiple ? 1 : 0), [b, v] = fn(k(() => e.modelValue), (y) => l("update:modelValue", y), k(() => e.defaultValue)), h = k(() => b.value === void 0 ? W(p.value, { 1: [], 0: void 0 }) : b.value), m = { listboxState: n, value: h, mode: p, compare(y, x) {
|
|
1059
1059
|
if (typeof e.by == "string") {
|
|
1060
1060
|
let S = e.by;
|
|
1061
|
-
return (
|
|
1061
|
+
return (y == null ? void 0 : y[S]) === (x == null ? void 0 : x[S]);
|
|
1062
1062
|
}
|
|
1063
|
-
return e.by(
|
|
1064
|
-
}, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger:
|
|
1063
|
+
return e.by(y, x);
|
|
1064
|
+
}, orientation: k(() => e.horizontal ? "horizontal" : "vertical"), labelRef: r, buttonRef: i, optionsRef: u, disabled: k(() => e.disabled), options: c, searchQuery: a, activeOptionIndex: s, activationTrigger: d, closeListbox() {
|
|
1065
1065
|
e.disabled || n.value !== 1 && (n.value = 1, s.value = null);
|
|
1066
1066
|
}, openListbox() {
|
|
1067
1067
|
e.disabled || n.value !== 0 && (n.value = 0);
|
|
1068
|
-
}, goToOption(
|
|
1068
|
+
}, goToOption(y, x, S) {
|
|
1069
1069
|
if (e.disabled || n.value === 1)
|
|
1070
1070
|
return;
|
|
1071
|
-
let P =
|
|
1072
|
-
a.value = "", s.value =
|
|
1073
|
-
}, search(
|
|
1071
|
+
let P = g(), R = en(y === L.Specific ? { focus: L.Specific, id: x } : { focus: y }, { resolveItems: () => P.options, resolveActiveIndex: () => P.activeOptionIndex, resolveId: (V) => V.id, resolveDisabled: (V) => V.dataRef.disabled });
|
|
1072
|
+
a.value = "", s.value = R, d.value = S ?? 1, c.value = P.options;
|
|
1073
|
+
}, search(y) {
|
|
1074
1074
|
if (e.disabled || n.value === 1)
|
|
1075
1075
|
return;
|
|
1076
|
-
let
|
|
1077
|
-
a.value +=
|
|
1078
|
-
let S = (s.value !== null ? c.value.slice(s.value +
|
|
1079
|
-
P === -1 || P === s.value || (s.value = P,
|
|
1076
|
+
let x = a.value !== "" ? 0 : 1;
|
|
1077
|
+
a.value += y.toLowerCase();
|
|
1078
|
+
let S = (s.value !== null ? c.value.slice(s.value + x).concat(c.value.slice(0, s.value + x)) : c.value).find((R) => R.dataRef.textValue.startsWith(a.value) && !R.dataRef.disabled), P = S ? c.value.indexOf(S) : -1;
|
|
1079
|
+
P === -1 || P === s.value || (s.value = P, d.value = 1);
|
|
1080
1080
|
}, clearSearch() {
|
|
1081
1081
|
e.disabled || n.value !== 1 && a.value !== "" && (a.value = "");
|
|
1082
|
-
}, registerOption(
|
|
1083
|
-
let S =
|
|
1082
|
+
}, registerOption(y, x) {
|
|
1083
|
+
let S = g((P) => [...P, { id: y, dataRef: x }]);
|
|
1084
1084
|
c.value = S.options, s.value = S.activeOptionIndex;
|
|
1085
|
-
}, unregisterOption(
|
|
1086
|
-
let
|
|
1087
|
-
let P = S.findIndex((
|
|
1085
|
+
}, unregisterOption(y) {
|
|
1086
|
+
let x = g((S) => {
|
|
1087
|
+
let P = S.findIndex((R) => R.id === y);
|
|
1088
1088
|
return P !== -1 && S.splice(P, 1), S;
|
|
1089
1089
|
});
|
|
1090
|
-
c.value =
|
|
1091
|
-
}, theirOnChange(
|
|
1092
|
-
e.disabled ||
|
|
1093
|
-
}, select(
|
|
1094
|
-
e.disabled ||
|
|
1095
|
-
let
|
|
1096
|
-
return P === -1 ?
|
|
1090
|
+
c.value = x.options, s.value = x.activeOptionIndex, d.value = 1;
|
|
1091
|
+
}, theirOnChange(y) {
|
|
1092
|
+
e.disabled || v(y);
|
|
1093
|
+
}, select(y) {
|
|
1094
|
+
e.disabled || v(W(p.value, { 0: () => y, 1: () => {
|
|
1095
|
+
let x = G(m.value.value).slice(), S = G(y), P = x.findIndex((R) => m.compare(S, G(R)));
|
|
1096
|
+
return P === -1 ? x.push(S) : x.splice(P, 1), x;
|
|
1097
1097
|
} }));
|
|
1098
1098
|
} };
|
|
1099
|
-
an([i, u], (
|
|
1099
|
+
an([i, u], (y, x) => {
|
|
1100
1100
|
var S;
|
|
1101
|
-
|
|
1102
|
-
}, k(() => n.value === 0)), ye(gn,
|
|
1103
|
-
let
|
|
1104
|
-
var
|
|
1105
|
-
return (
|
|
1101
|
+
m.closeListbox(), ze(x, He.Loose) || (y.preventDefault(), (S = E(i)) == null || S.focus());
|
|
1102
|
+
}, k(() => n.value === 0)), ye(gn, m), on(k(() => W(n.value, { 0: te.Open, 1: te.Closed })));
|
|
1103
|
+
let w = k(() => {
|
|
1104
|
+
var y;
|
|
1105
|
+
return (y = E(i)) == null ? void 0 : y.closest("form");
|
|
1106
1106
|
});
|
|
1107
1107
|
return ee(() => {
|
|
1108
|
-
|
|
1109
|
-
if (!
|
|
1108
|
+
J([w], () => {
|
|
1109
|
+
if (!w.value || e.defaultValue === void 0)
|
|
1110
1110
|
return;
|
|
1111
|
-
function
|
|
1112
|
-
|
|
1111
|
+
function y() {
|
|
1112
|
+
m.theirOnChange(e.defaultValue);
|
|
1113
1113
|
}
|
|
1114
|
-
return
|
|
1115
|
-
var
|
|
1116
|
-
(
|
|
1114
|
+
return w.value.addEventListener("reset", y), () => {
|
|
1115
|
+
var x;
|
|
1116
|
+
(x = w.value) == null || x.removeEventListener("reset", y);
|
|
1117
1117
|
};
|
|
1118
1118
|
}, { immediate: !0 });
|
|
1119
1119
|
}), () => {
|
|
1120
|
-
let { name:
|
|
1121
|
-
return
|
|
1120
|
+
let { name: y, modelValue: x, disabled: S, form: P, ...R } = e, V = { open: n.value === 0, disabled: S, value: h.value };
|
|
1121
|
+
return Re(be, [...y != null && h.value != null ? un({ [y]: h.value }).map(([re, _e]) => Re(sn, Jt({ features: dt.Hidden, key: re, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: P, name: re, value: _e }))) : [], B({ ourProps: {}, theirProps: { ...o, ...it(R, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: V, slots: t, attrs: o, name: "Listbox" })]);
|
|
1122
1122
|
};
|
|
1123
1123
|
} });
|
|
1124
|
-
|
|
1125
|
-
let
|
|
1124
|
+
T({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: () => `headlessui-listbox-label-${Z()}` } }, setup(e, { attrs: t, slots: o }) {
|
|
1125
|
+
let l = De("ListboxLabel");
|
|
1126
1126
|
function n() {
|
|
1127
1127
|
var r;
|
|
1128
|
-
(r = E(
|
|
1128
|
+
(r = E(l.buttonRef)) == null || r.focus({ preventScroll: !0 });
|
|
1129
1129
|
}
|
|
1130
1130
|
return () => {
|
|
1131
|
-
let r = { open:
|
|
1132
|
-
return
|
|
1131
|
+
let r = { open: l.listboxState.value === 0, disabled: l.disabled.value }, { id: i, ...u } = e, c = { id: i, ref: l.labelRef, onClick: n };
|
|
1132
|
+
return B({ ourProps: c, theirProps: u, slot: r, attrs: t, slots: o, name: "ListboxLabel" });
|
|
1133
1133
|
};
|
|
1134
1134
|
} });
|
|
1135
|
-
let
|
|
1135
|
+
let sl = T({ name: "ListboxButton", props: { as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-listbox-button-${Z()}` } }, setup(e, { attrs: t, slots: o, expose: l }) {
|
|
1136
1136
|
let n = De("ListboxButton");
|
|
1137
|
-
|
|
1137
|
+
l({ el: n.buttonRef, $el: n.buttonRef });
|
|
1138
1138
|
function r(a) {
|
|
1139
1139
|
switch (a.key) {
|
|
1140
1140
|
case D.Space:
|
|
1141
1141
|
case D.Enter:
|
|
1142
1142
|
case D.ArrowDown:
|
|
1143
|
-
a.preventDefault(), n.openListbox(),
|
|
1143
|
+
a.preventDefault(), n.openListbox(), N(() => {
|
|
1144
1144
|
var s;
|
|
1145
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1145
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.First);
|
|
1146
1146
|
});
|
|
1147
1147
|
break;
|
|
1148
1148
|
case D.ArrowUp:
|
|
1149
|
-
a.preventDefault(), n.openListbox(),
|
|
1149
|
+
a.preventDefault(), n.openListbox(), N(() => {
|
|
1150
1150
|
var s;
|
|
1151
|
-
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(
|
|
1151
|
+
(s = E(n.optionsRef)) == null || s.focus({ preventScroll: !0 }), n.value.value || n.goToOption(L.Last);
|
|
1152
1152
|
});
|
|
1153
1153
|
break;
|
|
1154
1154
|
}
|
|
@@ -1161,10 +1161,10 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1161
1161
|
}
|
|
1162
1162
|
}
|
|
1163
1163
|
function u(a) {
|
|
1164
|
-
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(),
|
|
1164
|
+
n.disabled.value || (n.listboxState.value === 0 ? (n.closeListbox(), N(() => {
|
|
1165
1165
|
var s;
|
|
1166
1166
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1167
|
-
})) : (a.preventDefault(), n.openListbox(),
|
|
1167
|
+
})) : (a.preventDefault(), n.openListbox(), il(() => {
|
|
1168
1168
|
var s;
|
|
1169
1169
|
return (s = E(n.optionsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1170
1170
|
})));
|
|
@@ -1172,12 +1172,12 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1172
1172
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1173
1173
|
return () => {
|
|
1174
1174
|
var a, s;
|
|
1175
|
-
let
|
|
1176
|
-
return
|
|
1175
|
+
let d = { open: n.listboxState.value === 0, disabled: n.disabled.value, value: n.value.value }, { id: g, ...p } = e, b = { ref: n.buttonRef, id: g, type: c.value, "aria-haspopup": "listbox", "aria-controls": (a = E(n.optionsRef)) == null ? void 0 : a.id, "aria-expanded": n.listboxState.value === 0, "aria-labelledby": n.labelRef.value ? [(s = E(n.labelRef)) == null ? void 0 : s.id, g].join(" ") : void 0, disabled: n.disabled.value === !0 ? !0 : void 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1176
|
+
return B({ ourProps: b, theirProps: p, slot: d, attrs: t, slots: o, name: "ListboxButton" });
|
|
1177
1177
|
};
|
|
1178
|
-
} }),
|
|
1179
|
-
let n = De("ListboxOptions"), r =
|
|
1180
|
-
|
|
1178
|
+
} }), ul = T({ name: "ListboxOptions", props: { as: { type: [Object, String], default: "ul" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-listbox-options-${Z()}` } }, setup(e, { attrs: t, slots: o, expose: l }) {
|
|
1179
|
+
let n = De("ListboxOptions"), r = O(null);
|
|
1180
|
+
l({ el: n.optionsRef, $el: n.optionsRef });
|
|
1181
1181
|
function i(a) {
|
|
1182
1182
|
switch (r.value && clearTimeout(r.value), a.key) {
|
|
1183
1183
|
case D.Space:
|
|
@@ -1188,23 +1188,23 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1188
1188
|
let s = n.options.value[n.activeOptionIndex.value];
|
|
1189
1189
|
n.select(s.dataRef.value);
|
|
1190
1190
|
}
|
|
1191
|
-
n.mode.value === 0 && (n.closeListbox(),
|
|
1191
|
+
n.mode.value === 0 && (n.closeListbox(), N(() => {
|
|
1192
1192
|
var s;
|
|
1193
1193
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1194
1194
|
}));
|
|
1195
1195
|
break;
|
|
1196
|
-
case
|
|
1197
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1198
|
-
case
|
|
1199
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1196
|
+
case W(n.orientation.value, { vertical: D.ArrowDown, horizontal: D.ArrowRight }):
|
|
1197
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Next);
|
|
1198
|
+
case W(n.orientation.value, { vertical: D.ArrowUp, horizontal: D.ArrowLeft }):
|
|
1199
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Previous);
|
|
1200
1200
|
case D.Home:
|
|
1201
1201
|
case D.PageUp:
|
|
1202
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1202
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.First);
|
|
1203
1203
|
case D.End:
|
|
1204
1204
|
case D.PageDown:
|
|
1205
|
-
return a.preventDefault(), a.stopPropagation(), n.goToOption(
|
|
1205
|
+
return a.preventDefault(), a.stopPropagation(), n.goToOption(L.Last);
|
|
1206
1206
|
case D.Escape:
|
|
1207
|
-
a.preventDefault(), a.stopPropagation(), n.closeListbox(),
|
|
1207
|
+
a.preventDefault(), a.stopPropagation(), n.closeListbox(), N(() => {
|
|
1208
1208
|
var s;
|
|
1209
1209
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1210
1210
|
});
|
|
@@ -1219,127 +1219,127 @@ let al = A({ name: "ListboxButton", props: { as: { type: [Object, String], defau
|
|
|
1219
1219
|
}
|
|
1220
1220
|
let u = nn(), c = k(() => u !== null ? (u.value & te.Open) === te.Open : n.listboxState.value === 0);
|
|
1221
1221
|
return () => {
|
|
1222
|
-
var a, s,
|
|
1223
|
-
let p = { open: n.listboxState.value === 0 }, { id:
|
|
1224
|
-
return
|
|
1222
|
+
var a, s, d, g;
|
|
1223
|
+
let p = { open: n.listboxState.value === 0 }, { id: b, ...v } = e, h = { "aria-activedescendant": n.activeOptionIndex.value === null || (a = n.options.value[n.activeOptionIndex.value]) == null ? void 0 : a.id, "aria-multiselectable": n.mode.value === 1 ? !0 : void 0, "aria-labelledby": (g = (s = E(n.labelRef)) == null ? void 0 : s.id) != null ? g : (d = E(n.buttonRef)) == null ? void 0 : d.id, "aria-orientation": n.orientation.value, id: b, onKeydown: i, role: "listbox", tabIndex: 0, ref: n.optionsRef };
|
|
1224
|
+
return B({ ourProps: h, theirProps: v, slot: p, attrs: t, slots: o, features: Ee.RenderStrategy | Ee.Static, visible: c.value, name: "ListboxOptions" });
|
|
1225
1225
|
};
|
|
1226
|
-
} }),
|
|
1227
|
-
let n = De("ListboxOption"), r =
|
|
1228
|
-
|
|
1229
|
-
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() =>
|
|
1230
|
-
var
|
|
1231
|
-
let
|
|
1232
|
-
return ((
|
|
1226
|
+
} }), cl = T({ name: "ListboxOption", props: { as: { type: [Object, String], default: "li" }, value: { type: [Object, String, Number, Boolean] }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-listbox.option-${Z()}` } }, setup(e, { slots: t, attrs: o, expose: l }) {
|
|
1227
|
+
let n = De("ListboxOption"), r = O(null);
|
|
1228
|
+
l({ el: r, $el: r });
|
|
1229
|
+
let i = k(() => n.activeOptionIndex.value !== null ? n.options.value[n.activeOptionIndex.value].id === e.id : !1), u = k(() => W(n.mode.value, { 0: () => n.compare(G(n.value.value), G(e.value)), 1: () => G(n.value.value).some((m) => n.compare(G(m), G(e.value))) })), c = k(() => W(n.mode.value, { 1: () => {
|
|
1230
|
+
var m;
|
|
1231
|
+
let w = G(n.value.value);
|
|
1232
|
+
return ((m = n.options.value.find((y) => w.some((x) => n.compare(G(x), G(y.dataRef.value))))) == null ? void 0 : m.id) === e.id;
|
|
1233
1233
|
}, 0: () => u.value })), a = vn(r), s = k(() => ({ disabled: e.disabled, value: e.value, get textValue() {
|
|
1234
1234
|
return a();
|
|
1235
1235
|
}, domRef: r }));
|
|
1236
|
-
ee(() => n.registerOption(e.id, s)),
|
|
1237
|
-
|
|
1238
|
-
n.listboxState.value === 0 && u.value &&
|
|
1239
|
-
c.value && n.goToOption(
|
|
1236
|
+
ee(() => n.registerOption(e.id, s)), Be(() => n.unregisterOption(e.id)), ee(() => {
|
|
1237
|
+
J([n.listboxState, u], () => {
|
|
1238
|
+
n.listboxState.value === 0 && u.value && W(n.mode.value, { 1: () => {
|
|
1239
|
+
c.value && n.goToOption(L.Specific, e.id);
|
|
1240
1240
|
}, 0: () => {
|
|
1241
|
-
n.goToOption(
|
|
1241
|
+
n.goToOption(L.Specific, e.id);
|
|
1242
1242
|
} });
|
|
1243
1243
|
}, { immediate: !0 });
|
|
1244
|
-
}),
|
|
1245
|
-
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1246
|
-
var
|
|
1247
|
-
return (
|
|
1244
|
+
}), we(() => {
|
|
1245
|
+
n.listboxState.value === 0 && i.value && n.activationTrigger.value !== 0 && N(() => {
|
|
1246
|
+
var m, w;
|
|
1247
|
+
return (w = (m = E(r)) == null ? void 0 : m.scrollIntoView) == null ? void 0 : w.call(m, { block: "nearest" });
|
|
1248
1248
|
});
|
|
1249
1249
|
});
|
|
1250
|
-
function
|
|
1250
|
+
function d(m) {
|
|
1251
1251
|
if (e.disabled)
|
|
1252
|
-
return
|
|
1253
|
-
n.select(e.value), n.mode.value === 0 && (n.closeListbox(),
|
|
1254
|
-
var
|
|
1255
|
-
return (
|
|
1252
|
+
return m.preventDefault();
|
|
1253
|
+
n.select(e.value), n.mode.value === 0 && (n.closeListbox(), N(() => {
|
|
1254
|
+
var w;
|
|
1255
|
+
return (w = E(n.buttonRef)) == null ? void 0 : w.focus({ preventScroll: !0 });
|
|
1256
1256
|
}));
|
|
1257
1257
|
}
|
|
1258
|
-
function
|
|
1258
|
+
function g() {
|
|
1259
1259
|
if (e.disabled)
|
|
1260
|
-
return n.goToOption(
|
|
1261
|
-
n.goToOption(
|
|
1260
|
+
return n.goToOption(L.Nothing);
|
|
1261
|
+
n.goToOption(L.Specific, e.id);
|
|
1262
1262
|
}
|
|
1263
1263
|
let p = pn();
|
|
1264
|
-
function
|
|
1265
|
-
p.update(
|
|
1264
|
+
function b(m) {
|
|
1265
|
+
p.update(m);
|
|
1266
1266
|
}
|
|
1267
|
-
function m
|
|
1268
|
-
p.wasMoved(
|
|
1267
|
+
function v(m) {
|
|
1268
|
+
p.wasMoved(m) && (e.disabled || i.value || n.goToOption(L.Specific, e.id, 0));
|
|
1269
1269
|
}
|
|
1270
|
-
function h(
|
|
1271
|
-
p.wasMoved(
|
|
1270
|
+
function h(m) {
|
|
1271
|
+
p.wasMoved(m) && (e.disabled || i.value && n.goToOption(L.Nothing));
|
|
1272
1272
|
}
|
|
1273
1273
|
return () => {
|
|
1274
|
-
let { disabled:
|
|
1275
|
-
return
|
|
1274
|
+
let { disabled: m } = e, w = { active: i.value, selected: u.value, disabled: m }, { id: y, value: x, disabled: S, ...P } = e, R = { id: y, ref: r, role: "option", tabIndex: m === !0 ? void 0 : -1, "aria-disabled": m === !0 ? !0 : void 0, "aria-selected": u.value, disabled: void 0, onClick: d, onFocus: g, onPointerenter: b, onMouseenter: b, onPointermove: v, onMousemove: v, onPointerleave: h, onMouseleave: h };
|
|
1275
|
+
return B({ ourProps: R, theirProps: P, slot: w, attrs: o, slots: t, name: "ListboxOption" });
|
|
1276
1276
|
};
|
|
1277
1277
|
} });
|
|
1278
|
-
var
|
|
1279
|
-
function
|
|
1278
|
+
var dl = ((e) => (e[e.Open = 0] = "Open", e[e.Closed = 1] = "Closed", e))(dl || {}), fl = ((e) => (e[e.Pointer = 0] = "Pointer", e[e.Other = 1] = "Other", e))(fl || {});
|
|
1279
|
+
function pl(e) {
|
|
1280
1280
|
requestAnimationFrame(() => requestAnimationFrame(e));
|
|
1281
1281
|
}
|
|
1282
1282
|
let bn = Symbol("MenuContext");
|
|
1283
|
-
function
|
|
1283
|
+
function Ue(e) {
|
|
1284
1284
|
let t = he(bn, null);
|
|
1285
1285
|
if (t === null) {
|
|
1286
|
-
let
|
|
1287
|
-
throw Error.captureStackTrace && Error.captureStackTrace(
|
|
1286
|
+
let o = new Error(`<${e} /> is missing a parent <Menu /> component.`);
|
|
1287
|
+
throw Error.captureStackTrace && Error.captureStackTrace(o, Ue), o;
|
|
1288
1288
|
}
|
|
1289
1289
|
return t;
|
|
1290
1290
|
}
|
|
1291
|
-
let
|
|
1292
|
-
let
|
|
1293
|
-
function s(
|
|
1294
|
-
let p = c.value !== null ? i.value[c.value] : null,
|
|
1295
|
-
return
|
|
1296
|
-
}
|
|
1297
|
-
let
|
|
1298
|
-
|
|
1299
|
-
}, openMenu: () =>
|
|
1300
|
-
let
|
|
1301
|
-
u.value = "", c.value = h, a.value =
|
|
1302
|
-
}, search(
|
|
1291
|
+
let ml = T({ name: "Menu", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: o }) {
|
|
1292
|
+
let l = O(1), n = O(null), r = O(null), i = O([]), u = O(""), c = O(null), a = O(1);
|
|
1293
|
+
function s(g = (p) => p) {
|
|
1294
|
+
let p = c.value !== null ? i.value[c.value] : null, b = ct(g(i.value.slice()), (h) => E(h.dataRef.domRef)), v = p ? b.indexOf(p) : null;
|
|
1295
|
+
return v === -1 && (v = null), { items: b, activeItemIndex: v };
|
|
1296
|
+
}
|
|
1297
|
+
let d = { menuState: l, buttonRef: n, itemsRef: r, items: i, searchQuery: u, activeItemIndex: c, activationTrigger: a, closeMenu: () => {
|
|
1298
|
+
l.value = 1, c.value = null;
|
|
1299
|
+
}, openMenu: () => l.value = 0, goToItem(g, p, b) {
|
|
1300
|
+
let v = s(), h = en(g === L.Specific ? { focus: L.Specific, id: p } : { focus: g }, { resolveItems: () => v.items, resolveActiveIndex: () => v.activeItemIndex, resolveId: (m) => m.id, resolveDisabled: (m) => m.dataRef.disabled });
|
|
1301
|
+
u.value = "", c.value = h, a.value = b ?? 1, i.value = v.items;
|
|
1302
|
+
}, search(g) {
|
|
1303
1303
|
let p = u.value !== "" ? 0 : 1;
|
|
1304
|
-
u.value +=
|
|
1305
|
-
let
|
|
1306
|
-
|
|
1304
|
+
u.value += g.toLowerCase();
|
|
1305
|
+
let b = (c.value !== null ? i.value.slice(c.value + p).concat(i.value.slice(0, c.value + p)) : i.value).find((h) => h.dataRef.textValue.startsWith(u.value) && !h.dataRef.disabled), v = b ? i.value.indexOf(b) : -1;
|
|
1306
|
+
v === -1 || v === c.value || (c.value = v, a.value = 1);
|
|
1307
1307
|
}, clearSearch() {
|
|
1308
1308
|
u.value = "";
|
|
1309
|
-
}, registerItem(
|
|
1310
|
-
let
|
|
1311
|
-
i.value =
|
|
1312
|
-
}, unregisterItem(
|
|
1313
|
-
let p = s((
|
|
1314
|
-
let
|
|
1315
|
-
return
|
|
1309
|
+
}, registerItem(g, p) {
|
|
1310
|
+
let b = s((v) => [...v, { id: g, dataRef: p }]);
|
|
1311
|
+
i.value = b.items, c.value = b.activeItemIndex, a.value = 1;
|
|
1312
|
+
}, unregisterItem(g) {
|
|
1313
|
+
let p = s((b) => {
|
|
1314
|
+
let v = b.findIndex((h) => h.id === g);
|
|
1315
|
+
return v !== -1 && b.splice(v, 1), b;
|
|
1316
1316
|
});
|
|
1317
1317
|
i.value = p.items, c.value = p.activeItemIndex, a.value = 1;
|
|
1318
1318
|
} };
|
|
1319
|
-
return an([n, r], (
|
|
1320
|
-
var
|
|
1321
|
-
|
|
1322
|
-
}, k(() =>
|
|
1323
|
-
let
|
|
1324
|
-
return
|
|
1319
|
+
return an([n, r], (g, p) => {
|
|
1320
|
+
var b;
|
|
1321
|
+
d.closeMenu(), ze(p, He.Loose) || (g.preventDefault(), (b = E(n)) == null || b.focus());
|
|
1322
|
+
}, k(() => l.value === 0)), ye(bn, d), on(k(() => W(l.value, { 0: te.Open, 1: te.Closed }))), () => {
|
|
1323
|
+
let g = { open: l.value === 0, close: d.closeMenu };
|
|
1324
|
+
return B({ ourProps: {}, theirProps: e, slot: g, slots: t, attrs: o, name: "Menu" });
|
|
1325
1325
|
};
|
|
1326
|
-
} }),
|
|
1327
|
-
let n =
|
|
1328
|
-
|
|
1326
|
+
} }), vl = T({ name: "MenuButton", props: { disabled: { type: Boolean, default: !1 }, as: { type: [Object, String], default: "button" }, id: { type: String, default: () => `headlessui-menu-button-${Z()}` } }, setup(e, { attrs: t, slots: o, expose: l }) {
|
|
1327
|
+
let n = Ue("MenuButton");
|
|
1328
|
+
l({ el: n.buttonRef, $el: n.buttonRef });
|
|
1329
1329
|
function r(a) {
|
|
1330
1330
|
switch (a.key) {
|
|
1331
1331
|
case D.Space:
|
|
1332
1332
|
case D.Enter:
|
|
1333
1333
|
case D.ArrowDown:
|
|
1334
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1334
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), N(() => {
|
|
1335
1335
|
var s;
|
|
1336
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1336
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.First);
|
|
1337
1337
|
});
|
|
1338
1338
|
break;
|
|
1339
1339
|
case D.ArrowUp:
|
|
1340
|
-
a.preventDefault(), a.stopPropagation(), n.openMenu(),
|
|
1340
|
+
a.preventDefault(), a.stopPropagation(), n.openMenu(), N(() => {
|
|
1341
1341
|
var s;
|
|
1342
|
-
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(
|
|
1342
|
+
(s = E(n.itemsRef)) == null || s.focus({ preventScroll: !0 }), n.goToItem(L.Last);
|
|
1343
1343
|
});
|
|
1344
1344
|
break;
|
|
1345
1345
|
}
|
|
@@ -1352,10 +1352,10 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1352
1352
|
}
|
|
1353
1353
|
}
|
|
1354
1354
|
function u(a) {
|
|
1355
|
-
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(),
|
|
1355
|
+
e.disabled || (n.menuState.value === 0 ? (n.closeMenu(), N(() => {
|
|
1356
1356
|
var s;
|
|
1357
1357
|
return (s = E(n.buttonRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1358
|
-
})) : (a.preventDefault(), n.openMenu(),
|
|
1358
|
+
})) : (a.preventDefault(), n.openMenu(), pl(() => {
|
|
1359
1359
|
var s;
|
|
1360
1360
|
return (s = E(n.itemsRef)) == null ? void 0 : s.focus({ preventScroll: !0 });
|
|
1361
1361
|
})));
|
|
@@ -1363,47 +1363,47 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1363
1363
|
let c = at(k(() => ({ as: e.as, type: t.type })), n.buttonRef);
|
|
1364
1364
|
return () => {
|
|
1365
1365
|
var a;
|
|
1366
|
-
let s = { open: n.menuState.value === 0 }, { id:
|
|
1367
|
-
return
|
|
1366
|
+
let s = { open: n.menuState.value === 0 }, { id: d, ...g } = e, p = { ref: n.buttonRef, id: d, type: c.value, "aria-haspopup": "menu", "aria-controls": (a = E(n.itemsRef)) == null ? void 0 : a.id, "aria-expanded": n.menuState.value === 0, onKeydown: r, onKeyup: i, onClick: u };
|
|
1367
|
+
return B({ ourProps: p, theirProps: g, slot: s, attrs: t, slots: o, name: "MenuButton" });
|
|
1368
1368
|
};
|
|
1369
|
-
} }),
|
|
1370
|
-
let n =
|
|
1371
|
-
|
|
1369
|
+
} }), gl = T({ name: "MenuItems", props: { as: { type: [Object, String], default: "div" }, static: { type: Boolean, default: !1 }, unmount: { type: Boolean, default: !0 }, id: { type: String, default: () => `headlessui-menu-items-${Z()}` } }, setup(e, { attrs: t, slots: o, expose: l }) {
|
|
1370
|
+
let n = Ue("MenuItems"), r = O(null);
|
|
1371
|
+
l({ el: n.itemsRef, $el: n.itemsRef }), Ho({ container: k(() => E(n.itemsRef)), enabled: k(() => n.menuState.value === 0), accept(s) {
|
|
1372
1372
|
return s.getAttribute("role") === "menuitem" ? NodeFilter.FILTER_REJECT : s.hasAttribute("role") ? NodeFilter.FILTER_SKIP : NodeFilter.FILTER_ACCEPT;
|
|
1373
1373
|
}, walk(s) {
|
|
1374
1374
|
s.setAttribute("role", "none");
|
|
1375
1375
|
} });
|
|
1376
1376
|
function i(s) {
|
|
1377
|
-
var
|
|
1377
|
+
var d;
|
|
1378
1378
|
switch (r.value && clearTimeout(r.value), s.key) {
|
|
1379
1379
|
case D.Space:
|
|
1380
1380
|
if (n.searchQuery.value !== "")
|
|
1381
1381
|
return s.preventDefault(), s.stopPropagation(), n.search(s.key);
|
|
1382
1382
|
case D.Enter:
|
|
1383
1383
|
if (s.preventDefault(), s.stopPropagation(), n.activeItemIndex.value !== null) {
|
|
1384
|
-
let
|
|
1385
|
-
(
|
|
1384
|
+
let g = n.items.value[n.activeItemIndex.value];
|
|
1385
|
+
(d = E(g.dataRef.domRef)) == null || d.click();
|
|
1386
1386
|
}
|
|
1387
1387
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1388
1388
|
break;
|
|
1389
1389
|
case D.ArrowDown:
|
|
1390
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1390
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Next);
|
|
1391
1391
|
case D.ArrowUp:
|
|
1392
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1392
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Previous);
|
|
1393
1393
|
case D.Home:
|
|
1394
1394
|
case D.PageUp:
|
|
1395
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1395
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.First);
|
|
1396
1396
|
case D.End:
|
|
1397
1397
|
case D.PageDown:
|
|
1398
|
-
return s.preventDefault(), s.stopPropagation(), n.goToItem(
|
|
1398
|
+
return s.preventDefault(), s.stopPropagation(), n.goToItem(L.Last);
|
|
1399
1399
|
case D.Escape:
|
|
1400
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1401
|
-
var
|
|
1402
|
-
return (
|
|
1400
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), N(() => {
|
|
1401
|
+
var g;
|
|
1402
|
+
return (g = E(n.buttonRef)) == null ? void 0 : g.focus({ preventScroll: !0 });
|
|
1403
1403
|
});
|
|
1404
1404
|
break;
|
|
1405
1405
|
case D.Tab:
|
|
1406
|
-
s.preventDefault(), s.stopPropagation(), n.closeMenu(),
|
|
1406
|
+
s.preventDefault(), s.stopPropagation(), n.closeMenu(), N(() => Xo(E(n.buttonRef), s.shiftKey ? nt.Previous : nt.Next));
|
|
1407
1407
|
break;
|
|
1408
1408
|
default:
|
|
1409
1409
|
s.key.length === 1 && (n.search(s.key), r.value = setTimeout(() => n.clearSearch(), 350));
|
|
@@ -1419,45 +1419,45 @@ let pl = A({ name: "Menu", props: { as: { type: [Object, String], default: "temp
|
|
|
1419
1419
|
}
|
|
1420
1420
|
let c = nn(), a = k(() => c !== null ? (c.value & te.Open) === te.Open : n.menuState.value === 0);
|
|
1421
1421
|
return () => {
|
|
1422
|
-
var s,
|
|
1423
|
-
let
|
|
1424
|
-
return
|
|
1422
|
+
var s, d;
|
|
1423
|
+
let g = { open: n.menuState.value === 0 }, { id: p, ...b } = e, v = { "aria-activedescendant": n.activeItemIndex.value === null || (s = n.items.value[n.activeItemIndex.value]) == null ? void 0 : s.id, "aria-labelledby": (d = E(n.buttonRef)) == null ? void 0 : d.id, id: p, onKeydown: i, onKeyup: u, role: "menu", tabIndex: 0, ref: n.itemsRef };
|
|
1424
|
+
return B({ ourProps: v, theirProps: b, slot: g, attrs: t, slots: o, features: Ee.RenderStrategy | Ee.Static, visible: a.value, name: "MenuItems" });
|
|
1425
1425
|
};
|
|
1426
|
-
} }),
|
|
1427
|
-
let n =
|
|
1428
|
-
|
|
1426
|
+
} }), bl = T({ name: "MenuItem", inheritAttrs: !1, props: { as: { type: [Object, String], default: "template" }, disabled: { type: Boolean, default: !1 }, id: { type: String, default: () => `headlessui-menu-item-${Z()}` } }, setup(e, { slots: t, attrs: o, expose: l }) {
|
|
1427
|
+
let n = Ue("MenuItem"), r = O(null);
|
|
1428
|
+
l({ el: r, $el: r });
|
|
1429
1429
|
let i = k(() => n.activeItemIndex.value !== null ? n.items.value[n.activeItemIndex.value].id === e.id : !1), u = vn(r), c = k(() => ({ disabled: e.disabled, get textValue() {
|
|
1430
1430
|
return u();
|
|
1431
1431
|
}, domRef: r }));
|
|
1432
|
-
ee(() => n.registerItem(e.id, c)),
|
|
1433
|
-
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 &&
|
|
1434
|
-
var
|
|
1435
|
-
return (h = (
|
|
1432
|
+
ee(() => n.registerItem(e.id, c)), Be(() => n.unregisterItem(e.id)), we(() => {
|
|
1433
|
+
n.menuState.value === 0 && i.value && n.activationTrigger.value !== 0 && N(() => {
|
|
1434
|
+
var v, h;
|
|
1435
|
+
return (h = (v = E(r)) == null ? void 0 : v.scrollIntoView) == null ? void 0 : h.call(v, { block: "nearest" });
|
|
1436
1436
|
});
|
|
1437
1437
|
});
|
|
1438
|
-
function a(
|
|
1438
|
+
function a(v) {
|
|
1439
1439
|
if (e.disabled)
|
|
1440
|
-
return
|
|
1440
|
+
return v.preventDefault();
|
|
1441
1441
|
n.closeMenu(), rn(E(n.buttonRef));
|
|
1442
1442
|
}
|
|
1443
1443
|
function s() {
|
|
1444
1444
|
if (e.disabled)
|
|
1445
|
-
return n.goToItem(
|
|
1446
|
-
n.goToItem(
|
|
1445
|
+
return n.goToItem(L.Nothing);
|
|
1446
|
+
n.goToItem(L.Specific, e.id);
|
|
1447
1447
|
}
|
|
1448
|
-
let
|
|
1449
|
-
function v
|
|
1450
|
-
|
|
1448
|
+
let d = pn();
|
|
1449
|
+
function g(v) {
|
|
1450
|
+
d.update(v);
|
|
1451
1451
|
}
|
|
1452
|
-
function p(
|
|
1453
|
-
|
|
1452
|
+
function p(v) {
|
|
1453
|
+
d.wasMoved(v) && (e.disabled || i.value || n.goToItem(L.Specific, e.id, 0));
|
|
1454
1454
|
}
|
|
1455
|
-
function
|
|
1456
|
-
|
|
1455
|
+
function b(v) {
|
|
1456
|
+
d.wasMoved(v) && (e.disabled || i.value && n.goToItem(L.Nothing));
|
|
1457
1457
|
}
|
|
1458
1458
|
return () => {
|
|
1459
|
-
let { disabled:
|
|
1460
|
-
return
|
|
1459
|
+
let { disabled: v } = e, h = { active: i.value, disabled: v, close: n.closeMenu }, { id: m, ...w } = e;
|
|
1460
|
+
return B({ ourProps: { id: m, ref: r, role: "menuitem", tabIndex: v === !0 ? void 0 : -1, "aria-disabled": v === !0 ? !0 : void 0, disabled: void 0, onClick: a, onFocus: s, onPointerenter: g, onMouseenter: g, onPointermove: p, onMousemove: p, onPointerleave: b, onMouseleave: b }, theirProps: { ...o, ...w }, slot: h, attrs: o, slots: t, name: "MenuItem" });
|
|
1461
1461
|
};
|
|
1462
1462
|
} }), hn = Symbol("LabelContext");
|
|
1463
1463
|
function yn() {
|
|
@@ -1468,74 +1468,74 @@ function yn() {
|
|
|
1468
1468
|
}
|
|
1469
1469
|
return e;
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1472
|
-
let
|
|
1471
|
+
function hl({ slot: e = {}, name: t = "Label", props: o = {} } = {}) {
|
|
1472
|
+
let l = O([]);
|
|
1473
1473
|
function n(r) {
|
|
1474
|
-
return
|
|
1475
|
-
let i =
|
|
1476
|
-
i !== -1 &&
|
|
1474
|
+
return l.value.push(r), () => {
|
|
1475
|
+
let i = l.value.indexOf(r);
|
|
1476
|
+
i !== -1 && l.value.splice(i, 1);
|
|
1477
1477
|
};
|
|
1478
1478
|
}
|
|
1479
|
-
return ye(hn, { register: n, slot: e, name: t, props:
|
|
1479
|
+
return ye(hn, { register: n, slot: e, name: t, props: o }), k(() => l.value.length > 0 ? l.value.join(" ") : void 0);
|
|
1480
1480
|
}
|
|
1481
|
-
|
|
1482
|
-
let
|
|
1483
|
-
return ee(() =>
|
|
1484
|
-
let { name: n = "Label", slot: r = {}, props: i = {} } =
|
|
1485
|
-
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick),
|
|
1481
|
+
T({ name: "Label", props: { as: { type: [Object, String], default: "label" }, passive: { type: [Boolean], default: !1 }, id: { type: String, default: () => `headlessui-label-${Z()}` } }, setup(e, { slots: t, attrs: o }) {
|
|
1482
|
+
let l = yn();
|
|
1483
|
+
return ee(() => Be(l.register(e.id))), () => {
|
|
1484
|
+
let { name: n = "Label", slot: r = {}, props: i = {} } = l, { id: u, passive: c, ...a } = e, s = { ...Object.entries(i).reduce((d, [g, p]) => Object.assign(d, { [g]: _(p) }), {}), id: u };
|
|
1485
|
+
return c && (delete s.onClick, delete s.htmlFor, delete a.onClick), B({ ourProps: s, theirProps: a, slot: r, attrs: o, slots: t, name: n });
|
|
1486
1486
|
};
|
|
1487
1487
|
} });
|
|
1488
|
-
let
|
|
1489
|
-
|
|
1490
|
-
let
|
|
1488
|
+
let wn = Symbol("GroupContext");
|
|
1489
|
+
T({ name: "SwitchGroup", props: { as: { type: [Object, String], default: "template" } }, setup(e, { slots: t, attrs: o }) {
|
|
1490
|
+
let l = O(null), n = hl({ name: "SwitchLabel", props: { htmlFor: k(() => {
|
|
1491
1491
|
var i;
|
|
1492
|
-
return (i =
|
|
1492
|
+
return (i = l.value) == null ? void 0 : i.id;
|
|
1493
1493
|
}), onClick(i) {
|
|
1494
|
-
|
|
1495
|
-
} } }), r =
|
|
1496
|
-
return ye(
|
|
1494
|
+
l.value && (i.currentTarget.tagName === "LABEL" && i.preventDefault(), l.value.click(), l.value.focus({ preventScroll: !0 }));
|
|
1495
|
+
} } }), r = el({ name: "SwitchDescription" });
|
|
1496
|
+
return ye(wn, { switchRef: l, labelledby: n, describedby: r }), () => B({ theirProps: e, ourProps: {}, slot: {}, slots: t, attrs: o, name: "SwitchGroup" });
|
|
1497
1497
|
} });
|
|
1498
|
-
let
|
|
1499
|
-
let r = he(
|
|
1498
|
+
let yl = T({ name: "Switch", emits: { "update:modelValue": (e) => !0 }, props: { as: { type: [Object, String], default: "button" }, modelValue: { type: Boolean, default: void 0 }, defaultChecked: { type: Boolean, optional: !0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, value: { type: String, optional: !0 }, id: { type: String, default: () => `headlessui-switch-${Z()}` } }, inheritAttrs: !1, setup(e, { emit: t, attrs: o, slots: l, expose: n }) {
|
|
1499
|
+
let r = he(wn, null), [i, u] = fn(k(() => e.modelValue), (h) => t("update:modelValue", h), k(() => e.defaultChecked));
|
|
1500
1500
|
function c() {
|
|
1501
1501
|
u(!i.value);
|
|
1502
1502
|
}
|
|
1503
|
-
let a =
|
|
1503
|
+
let a = O(null), s = r === null ? a : r.switchRef, d = at(k(() => ({ as: e.as, type: o.type })), s);
|
|
1504
1504
|
n({ el: s, $el: s });
|
|
1505
|
-
function
|
|
1505
|
+
function g(h) {
|
|
1506
1506
|
h.preventDefault(), c();
|
|
1507
1507
|
}
|
|
1508
1508
|
function p(h) {
|
|
1509
|
-
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter &&
|
|
1509
|
+
h.key === D.Space ? (h.preventDefault(), c()) : h.key === D.Enter && Zo(h.currentTarget);
|
|
1510
1510
|
}
|
|
1511
|
-
function
|
|
1511
|
+
function b(h) {
|
|
1512
1512
|
h.preventDefault();
|
|
1513
1513
|
}
|
|
1514
|
-
let
|
|
1515
|
-
var h,
|
|
1516
|
-
return (
|
|
1514
|
+
let v = k(() => {
|
|
1515
|
+
var h, m;
|
|
1516
|
+
return (m = (h = E(s)) == null ? void 0 : h.closest) == null ? void 0 : m.call(h, "form");
|
|
1517
1517
|
});
|
|
1518
1518
|
return ee(() => {
|
|
1519
|
-
|
|
1520
|
-
if (!
|
|
1519
|
+
J([v], () => {
|
|
1520
|
+
if (!v.value || e.defaultChecked === void 0)
|
|
1521
1521
|
return;
|
|
1522
1522
|
function h() {
|
|
1523
1523
|
u(e.defaultChecked);
|
|
1524
1524
|
}
|
|
1525
|
-
return
|
|
1526
|
-
var
|
|
1527
|
-
(
|
|
1525
|
+
return v.value.addEventListener("reset", h), () => {
|
|
1526
|
+
var m;
|
|
1527
|
+
(m = v.value) == null || m.removeEventListener("reset", h);
|
|
1528
1528
|
};
|
|
1529
1529
|
}, { immediate: !0 });
|
|
1530
1530
|
}), () => {
|
|
1531
|
-
let { id: h, name:
|
|
1532
|
-
return
|
|
1531
|
+
let { id: h, name: m, value: w, form: y, ...x } = e, S = { checked: i.value }, P = { id: h, ref: s, role: "switch", type: d.value, tabIndex: 0, "aria-checked": i.value, "aria-labelledby": r == null ? void 0 : r.labelledby.value, "aria-describedby": r == null ? void 0 : r.describedby.value, onClick: g, onKeyup: p, onKeypress: b };
|
|
1532
|
+
return Re(be, [m != null && i.value != null ? Re(sn, Jt({ features: dt.Hidden, as: "input", type: "checkbox", hidden: !0, readOnly: !0, checked: i.value, form: y, name: m, value: w })) : null, B({ ourProps: P, theirProps: { ...o, ...it(x, ["modelValue", "defaultChecked"]) }, slot: S, attrs: o, slots: l, name: "Switch" })]);
|
|
1533
1533
|
};
|
|
1534
1534
|
} });
|
|
1535
1535
|
const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) => ({
|
|
1536
1536
|
x: e,
|
|
1537
1537
|
y: e
|
|
1538
|
-
}),
|
|
1538
|
+
}), wl = {
|
|
1539
1539
|
left: "right",
|
|
1540
1540
|
right: "left",
|
|
1541
1541
|
bottom: "top",
|
|
@@ -1544,49 +1544,49 @@ const $e = Math.min, ue = Math.max, Me = Math.round, Ie = Math.floor, ae = (e) =
|
|
|
1544
1544
|
start: "end",
|
|
1545
1545
|
end: "start"
|
|
1546
1546
|
};
|
|
1547
|
-
function Tt(e, t,
|
|
1548
|
-
return ue(e, $e(t,
|
|
1547
|
+
function Tt(e, t, o) {
|
|
1548
|
+
return ue(e, $e(t, o));
|
|
1549
1549
|
}
|
|
1550
|
-
function
|
|
1550
|
+
function We(e, t) {
|
|
1551
1551
|
return typeof e == "function" ? e(t) : e;
|
|
1552
1552
|
}
|
|
1553
1553
|
function ce(e) {
|
|
1554
1554
|
return e.split("-")[0];
|
|
1555
1555
|
}
|
|
1556
|
-
function
|
|
1556
|
+
function Ke(e) {
|
|
1557
1557
|
return e.split("-")[1];
|
|
1558
1558
|
}
|
|
1559
|
-
function
|
|
1559
|
+
function xn(e) {
|
|
1560
1560
|
return e === "x" ? "y" : "x";
|
|
1561
1561
|
}
|
|
1562
|
-
function
|
|
1562
|
+
function Sn(e) {
|
|
1563
1563
|
return e === "y" ? "height" : "width";
|
|
1564
1564
|
}
|
|
1565
|
-
function
|
|
1565
|
+
function Ge(e) {
|
|
1566
1566
|
return ["top", "bottom"].includes(ce(e)) ? "y" : "x";
|
|
1567
1567
|
}
|
|
1568
|
-
function
|
|
1569
|
-
return
|
|
1568
|
+
function kn(e) {
|
|
1569
|
+
return xn(Ge(e));
|
|
1570
1570
|
}
|
|
1571
|
-
function
|
|
1572
|
-
|
|
1573
|
-
const
|
|
1574
|
-
let i = n === "x" ?
|
|
1575
|
-
return t.reference[r] > t.floating[r] && (i =
|
|
1571
|
+
function Sl(e, t, o) {
|
|
1572
|
+
o === void 0 && (o = !1);
|
|
1573
|
+
const l = Ke(e), n = kn(e), r = Sn(n);
|
|
1574
|
+
let i = n === "x" ? l === (o ? "end" : "start") ? "right" : "left" : l === "start" ? "bottom" : "top";
|
|
1575
|
+
return t.reference[r] > t.floating[r] && (i = Fe(i)), [i, Fe(i)];
|
|
1576
1576
|
}
|
|
1577
1577
|
function kl(e) {
|
|
1578
|
-
const t =
|
|
1579
|
-
return [
|
|
1578
|
+
const t = Fe(e);
|
|
1579
|
+
return [ot(e), t, ot(t)];
|
|
1580
1580
|
}
|
|
1581
|
-
function
|
|
1581
|
+
function ot(e) {
|
|
1582
1582
|
return e.replace(/start|end/g, (t) => xl[t]);
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1585
|
-
const
|
|
1584
|
+
function Ol(e, t, o) {
|
|
1585
|
+
const l = ["left", "right"], n = ["right", "left"], r = ["top", "bottom"], i = ["bottom", "top"];
|
|
1586
1586
|
switch (e) {
|
|
1587
1587
|
case "top":
|
|
1588
1588
|
case "bottom":
|
|
1589
|
-
return
|
|
1589
|
+
return o ? t ? n : l : t ? l : n;
|
|
1590
1590
|
case "left":
|
|
1591
1591
|
case "right":
|
|
1592
1592
|
return t ? r : i;
|
|
@@ -1594,15 +1594,15 @@ function Sl(e, t, l) {
|
|
|
1594
1594
|
return [];
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
|
-
function
|
|
1598
|
-
const n =
|
|
1599
|
-
let r =
|
|
1600
|
-
return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(
|
|
1597
|
+
function Rl(e, t, o, l) {
|
|
1598
|
+
const n = Ke(e);
|
|
1599
|
+
let r = Ol(ce(e), o === "start", l);
|
|
1600
|
+
return n && (r = r.map((i) => i + "-" + n), t && (r = r.concat(r.map(ot)))), r;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return e.replace(/left|right|bottom|top/g, (t) =>
|
|
1602
|
+
function Fe(e) {
|
|
1603
|
+
return e.replace(/left|right|bottom|top/g, (t) => wl[t]);
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1605
|
+
function El(e) {
|
|
1606
1606
|
return {
|
|
1607
1607
|
top: 0,
|
|
1608
1608
|
right: 0,
|
|
@@ -1611,15 +1611,15 @@ function Ol(e) {
|
|
|
1611
1611
|
...e
|
|
1612
1612
|
};
|
|
1613
1613
|
}
|
|
1614
|
-
function
|
|
1615
|
-
return typeof e != "number" ?
|
|
1614
|
+
function Cl(e) {
|
|
1615
|
+
return typeof e != "number" ? El(e) : {
|
|
1616
1616
|
top: e,
|
|
1617
1617
|
right: e,
|
|
1618
1618
|
bottom: e,
|
|
1619
1619
|
left: e
|
|
1620
1620
|
};
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1622
|
+
function Ve(e) {
|
|
1623
1623
|
return {
|
|
1624
1624
|
...e,
|
|
1625
1625
|
top: e.y,
|
|
@@ -1628,83 +1628,83 @@ function Fe(e) {
|
|
|
1628
1628
|
bottom: e.y + e.height
|
|
1629
1629
|
};
|
|
1630
1630
|
}
|
|
1631
|
-
function It(e, t,
|
|
1631
|
+
function It(e, t, o) {
|
|
1632
1632
|
let {
|
|
1633
|
-
reference:
|
|
1633
|
+
reference: l,
|
|
1634
1634
|
floating: n
|
|
1635
1635
|
} = e;
|
|
1636
|
-
const r =
|
|
1636
|
+
const r = Ge(t), i = kn(t), u = Sn(i), c = ce(t), a = r === "y", s = l.x + l.width / 2 - n.width / 2, d = l.y + l.height / 2 - n.height / 2, g = l[u] / 2 - n[u] / 2;
|
|
1637
1637
|
let p;
|
|
1638
1638
|
switch (c) {
|
|
1639
1639
|
case "top":
|
|
1640
1640
|
p = {
|
|
1641
1641
|
x: s,
|
|
1642
|
-
y:
|
|
1642
|
+
y: l.y - n.height
|
|
1643
1643
|
};
|
|
1644
1644
|
break;
|
|
1645
1645
|
case "bottom":
|
|
1646
1646
|
p = {
|
|
1647
1647
|
x: s,
|
|
1648
|
-
y:
|
|
1648
|
+
y: l.y + l.height
|
|
1649
1649
|
};
|
|
1650
1650
|
break;
|
|
1651
1651
|
case "right":
|
|
1652
1652
|
p = {
|
|
1653
|
-
x:
|
|
1654
|
-
y:
|
|
1653
|
+
x: l.x + l.width,
|
|
1654
|
+
y: d
|
|
1655
1655
|
};
|
|
1656
1656
|
break;
|
|
1657
1657
|
case "left":
|
|
1658
1658
|
p = {
|
|
1659
|
-
x:
|
|
1660
|
-
y:
|
|
1659
|
+
x: l.x - n.width,
|
|
1660
|
+
y: d
|
|
1661
1661
|
};
|
|
1662
1662
|
break;
|
|
1663
1663
|
default:
|
|
1664
1664
|
p = {
|
|
1665
|
-
x:
|
|
1666
|
-
y:
|
|
1665
|
+
x: l.x,
|
|
1666
|
+
y: l.y
|
|
1667
1667
|
};
|
|
1668
1668
|
}
|
|
1669
|
-
switch (
|
|
1669
|
+
switch (Ke(t)) {
|
|
1670
1670
|
case "start":
|
|
1671
|
-
p[i] -=
|
|
1671
|
+
p[i] -= g * (o && a ? -1 : 1);
|
|
1672
1672
|
break;
|
|
1673
1673
|
case "end":
|
|
1674
|
-
p[i] +=
|
|
1674
|
+
p[i] += g * (o && a ? -1 : 1);
|
|
1675
1675
|
break;
|
|
1676
1676
|
}
|
|
1677
1677
|
return p;
|
|
1678
1678
|
}
|
|
1679
|
-
const
|
|
1679
|
+
const Dl = async (e, t, o) => {
|
|
1680
1680
|
const {
|
|
1681
|
-
placement:
|
|
1681
|
+
placement: l = "bottom",
|
|
1682
1682
|
strategy: n = "absolute",
|
|
1683
1683
|
middleware: r = [],
|
|
1684
1684
|
platform: i
|
|
1685
|
-
} =
|
|
1685
|
+
} = o, u = r.filter(Boolean), c = await (i.isRTL == null ? void 0 : i.isRTL(t));
|
|
1686
1686
|
let a = await i.getElementRects({
|
|
1687
1687
|
reference: e,
|
|
1688
1688
|
floating: t,
|
|
1689
1689
|
strategy: n
|
|
1690
1690
|
}), {
|
|
1691
1691
|
x: s,
|
|
1692
|
-
y:
|
|
1693
|
-
} = It(a,
|
|
1694
|
-
for (let
|
|
1692
|
+
y: d
|
|
1693
|
+
} = It(a, l, c), g = l, p = {}, b = 0;
|
|
1694
|
+
for (let v = 0; v < u.length; v++) {
|
|
1695
1695
|
const {
|
|
1696
1696
|
name: h,
|
|
1697
|
-
fn:
|
|
1698
|
-
} = u[
|
|
1699
|
-
x:
|
|
1700
|
-
y
|
|
1701
|
-
data:
|
|
1697
|
+
fn: m
|
|
1698
|
+
} = u[v], {
|
|
1699
|
+
x: w,
|
|
1700
|
+
y,
|
|
1701
|
+
data: x,
|
|
1702
1702
|
reset: S
|
|
1703
|
-
} = await
|
|
1703
|
+
} = await m({
|
|
1704
1704
|
x: s,
|
|
1705
|
-
y:
|
|
1706
|
-
initialPlacement:
|
|
1707
|
-
placement:
|
|
1705
|
+
y: d,
|
|
1706
|
+
initialPlacement: l,
|
|
1707
|
+
placement: g,
|
|
1708
1708
|
strategy: n,
|
|
1709
1709
|
middlewareData: p,
|
|
1710
1710
|
rects: a,
|
|
@@ -1714,37 +1714,37 @@ const El = async (e, t, l) => {
|
|
|
1714
1714
|
floating: t
|
|
1715
1715
|
}
|
|
1716
1716
|
});
|
|
1717
|
-
if (s =
|
|
1717
|
+
if (s = w ?? s, d = y ?? d, p = {
|
|
1718
1718
|
...p,
|
|
1719
1719
|
[h]: {
|
|
1720
1720
|
...p[h],
|
|
1721
|
-
...
|
|
1721
|
+
...x
|
|
1722
1722
|
}
|
|
1723
|
-
}, S &&
|
|
1724
|
-
|
|
1723
|
+
}, S && b <= 50) {
|
|
1724
|
+
b++, typeof S == "object" && (S.placement && (g = S.placement), S.rects && (a = S.rects === !0 ? await i.getElementRects({
|
|
1725
1725
|
reference: e,
|
|
1726
1726
|
floating: t,
|
|
1727
1727
|
strategy: n
|
|
1728
1728
|
}) : S.rects), {
|
|
1729
1729
|
x: s,
|
|
1730
|
-
y:
|
|
1731
|
-
} = It(a,
|
|
1730
|
+
y: d
|
|
1731
|
+
} = It(a, g, c)), v = -1;
|
|
1732
1732
|
continue;
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
1735
1735
|
return {
|
|
1736
1736
|
x: s,
|
|
1737
|
-
y:
|
|
1738
|
-
placement:
|
|
1737
|
+
y: d,
|
|
1738
|
+
placement: g,
|
|
1739
1739
|
strategy: n,
|
|
1740
1740
|
middlewareData: p
|
|
1741
1741
|
};
|
|
1742
1742
|
};
|
|
1743
|
-
async function
|
|
1744
|
-
var
|
|
1743
|
+
async function On(e, t) {
|
|
1744
|
+
var o;
|
|
1745
1745
|
t === void 0 && (t = {});
|
|
1746
1746
|
const {
|
|
1747
|
-
x:
|
|
1747
|
+
x: l,
|
|
1748
1748
|
y: n,
|
|
1749
1749
|
platform: r,
|
|
1750
1750
|
rects: i,
|
|
@@ -1753,42 +1753,42 @@ async function Cn(e, t) {
|
|
|
1753
1753
|
} = e, {
|
|
1754
1754
|
boundary: a = "clippingAncestors",
|
|
1755
1755
|
rootBoundary: s = "viewport",
|
|
1756
|
-
elementContext:
|
|
1757
|
-
altBoundary:
|
|
1756
|
+
elementContext: d = "floating",
|
|
1757
|
+
altBoundary: g = !1,
|
|
1758
1758
|
padding: p = 0
|
|
1759
|
-
} =
|
|
1760
|
-
element: (
|
|
1759
|
+
} = We(t, e), b = Cl(p), h = u[g ? d === "floating" ? "reference" : "floating" : d], m = Ve(await r.getClippingRect({
|
|
1760
|
+
element: (o = await (r.isElement == null ? void 0 : r.isElement(h))) == null || o ? h : h.contextElement || await (r.getDocumentElement == null ? void 0 : r.getDocumentElement(u.floating)),
|
|
1761
1761
|
boundary: a,
|
|
1762
1762
|
rootBoundary: s,
|
|
1763
1763
|
strategy: c
|
|
1764
|
-
})),
|
|
1764
|
+
})), w = d === "floating" ? {
|
|
1765
1765
|
...i.floating,
|
|
1766
|
-
x:
|
|
1766
|
+
x: l,
|
|
1767
1767
|
y: n
|
|
1768
|
-
} : i.reference,
|
|
1768
|
+
} : i.reference, y = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(u.floating)), x = await (r.isElement == null ? void 0 : r.isElement(y)) ? await (r.getScale == null ? void 0 : r.getScale(y)) || {
|
|
1769
1769
|
x: 1,
|
|
1770
1770
|
y: 1
|
|
1771
1771
|
} : {
|
|
1772
1772
|
x: 1,
|
|
1773
1773
|
y: 1
|
|
1774
|
-
}, S =
|
|
1775
|
-
rect:
|
|
1776
|
-
offsetParent:
|
|
1774
|
+
}, S = Ve(r.convertOffsetParentRelativeRectToViewportRelativeRect ? await r.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1775
|
+
rect: w,
|
|
1776
|
+
offsetParent: y,
|
|
1777
1777
|
strategy: c
|
|
1778
|
-
}) :
|
|
1778
|
+
}) : w);
|
|
1779
1779
|
return {
|
|
1780
|
-
top: (
|
|
1781
|
-
bottom: (S.bottom -
|
|
1782
|
-
left: (
|
|
1783
|
-
right: (S.right -
|
|
1780
|
+
top: (m.top - S.top + b.top) / x.y,
|
|
1781
|
+
bottom: (S.bottom - m.bottom + b.bottom) / x.y,
|
|
1782
|
+
left: (m.left - S.left + b.left) / x.x,
|
|
1783
|
+
right: (S.right - m.right + b.right) / x.x
|
|
1784
1784
|
};
|
|
1785
1785
|
}
|
|
1786
|
-
const
|
|
1786
|
+
const Pl = function(e) {
|
|
1787
1787
|
return e === void 0 && (e = {}), {
|
|
1788
1788
|
name: "flip",
|
|
1789
1789
|
options: e,
|
|
1790
1790
|
async fn(t) {
|
|
1791
|
-
var
|
|
1791
|
+
var o, l;
|
|
1792
1792
|
const {
|
|
1793
1793
|
placement: n,
|
|
1794
1794
|
middlewareData: r,
|
|
@@ -1798,56 +1798,56 @@ const Dl = function(e) {
|
|
|
1798
1798
|
elements: a
|
|
1799
1799
|
} = t, {
|
|
1800
1800
|
mainAxis: s = !0,
|
|
1801
|
-
crossAxis:
|
|
1802
|
-
fallbackPlacements:
|
|
1801
|
+
crossAxis: d = !0,
|
|
1802
|
+
fallbackPlacements: g,
|
|
1803
1803
|
fallbackStrategy: p = "bestFit",
|
|
1804
|
-
fallbackAxisSideDirection:
|
|
1805
|
-
flipAlignment:
|
|
1804
|
+
fallbackAxisSideDirection: b = "none",
|
|
1805
|
+
flipAlignment: v = !0,
|
|
1806
1806
|
...h
|
|
1807
|
-
} =
|
|
1808
|
-
if ((
|
|
1807
|
+
} = We(e, t);
|
|
1808
|
+
if ((o = r.arrow) != null && o.alignmentOffset)
|
|
1809
1809
|
return {};
|
|
1810
|
-
const
|
|
1811
|
-
!
|
|
1812
|
-
const S = [u, ...
|
|
1813
|
-
let
|
|
1814
|
-
if (s &&
|
|
1815
|
-
const se =
|
|
1816
|
-
|
|
1810
|
+
const m = ce(n), w = ce(u) === u, y = await (c.isRTL == null ? void 0 : c.isRTL(a.floating)), x = g || (w || !v ? [Fe(u)] : kl(u));
|
|
1811
|
+
!g && b !== "none" && x.push(...Rl(u, v, b, y));
|
|
1812
|
+
const S = [u, ...x], P = await On(t, h), R = [];
|
|
1813
|
+
let V = ((l = r.flip) == null ? void 0 : l.overflows) || [];
|
|
1814
|
+
if (s && R.push(P[m]), d) {
|
|
1815
|
+
const se = Sl(n, i, y);
|
|
1816
|
+
R.push(P[se[0]], P[se[1]]);
|
|
1817
1817
|
}
|
|
1818
|
-
if (
|
|
1818
|
+
if (V = [...V, {
|
|
1819
1819
|
placement: n,
|
|
1820
|
-
overflows:
|
|
1821
|
-
}], !
|
|
1822
|
-
var re,
|
|
1820
|
+
overflows: R
|
|
1821
|
+
}], !R.every((se) => se <= 0)) {
|
|
1822
|
+
var re, _e;
|
|
1823
1823
|
const se = (((re = r.flip) == null ? void 0 : re.index) || 0) + 1, bt = S[se];
|
|
1824
1824
|
if (bt)
|
|
1825
1825
|
return {
|
|
1826
1826
|
data: {
|
|
1827
1827
|
index: se,
|
|
1828
|
-
overflows:
|
|
1828
|
+
overflows: V
|
|
1829
1829
|
},
|
|
1830
1830
|
reset: {
|
|
1831
1831
|
placement: bt
|
|
1832
1832
|
}
|
|
1833
1833
|
};
|
|
1834
|
-
let
|
|
1835
|
-
if (!
|
|
1834
|
+
let xe = (_e = V.filter((fe) => fe.overflows[0] <= 0).sort((fe, pe) => fe.overflows[1] - pe.overflows[1])[0]) == null ? void 0 : _e.placement;
|
|
1835
|
+
if (!xe)
|
|
1836
1836
|
switch (p) {
|
|
1837
1837
|
case "bestFit": {
|
|
1838
1838
|
var gt;
|
|
1839
|
-
const fe = (gt =
|
|
1840
|
-
fe && (
|
|
1839
|
+
const fe = (gt = V.map((pe) => [pe.placement, pe.overflows.filter((Se) => Se > 0).reduce((Se, Tn) => Se + Tn, 0)]).sort((pe, Se) => pe[1] - Se[1])[0]) == null ? void 0 : gt[0];
|
|
1840
|
+
fe && (xe = fe);
|
|
1841
1841
|
break;
|
|
1842
1842
|
}
|
|
1843
1843
|
case "initialPlacement":
|
|
1844
|
-
|
|
1844
|
+
xe = u;
|
|
1845
1845
|
break;
|
|
1846
1846
|
}
|
|
1847
|
-
if (n !==
|
|
1847
|
+
if (n !== xe)
|
|
1848
1848
|
return {
|
|
1849
1849
|
reset: {
|
|
1850
|
-
placement:
|
|
1850
|
+
placement: xe
|
|
1851
1851
|
}
|
|
1852
1852
|
};
|
|
1853
1853
|
}
|
|
@@ -1857,45 +1857,45 @@ const Dl = function(e) {
|
|
|
1857
1857
|
};
|
|
1858
1858
|
async function _l(e, t) {
|
|
1859
1859
|
const {
|
|
1860
|
-
placement:
|
|
1861
|
-
platform:
|
|
1860
|
+
placement: o,
|
|
1861
|
+
platform: l,
|
|
1862
1862
|
elements: n
|
|
1863
|
-
} = e, r = await (
|
|
1863
|
+
} = e, r = await (l.isRTL == null ? void 0 : l.isRTL(n.floating)), i = ce(o), u = Ke(o), c = Ge(o) === "y", a = ["left", "top"].includes(i) ? -1 : 1, s = r && c ? -1 : 1, d = We(t, e);
|
|
1864
1864
|
let {
|
|
1865
|
-
mainAxis:
|
|
1865
|
+
mainAxis: g,
|
|
1866
1866
|
crossAxis: p,
|
|
1867
|
-
alignmentAxis:
|
|
1868
|
-
} = typeof
|
|
1869
|
-
mainAxis:
|
|
1867
|
+
alignmentAxis: b
|
|
1868
|
+
} = typeof d == "number" ? {
|
|
1869
|
+
mainAxis: d,
|
|
1870
1870
|
crossAxis: 0,
|
|
1871
1871
|
alignmentAxis: null
|
|
1872
1872
|
} : {
|
|
1873
1873
|
mainAxis: 0,
|
|
1874
1874
|
crossAxis: 0,
|
|
1875
1875
|
alignmentAxis: null,
|
|
1876
|
-
...
|
|
1876
|
+
...d
|
|
1877
1877
|
};
|
|
1878
|
-
return u && typeof
|
|
1878
|
+
return u && typeof b == "number" && (p = u === "end" ? b * -1 : b), c ? {
|
|
1879
1879
|
x: p * s,
|
|
1880
|
-
y:
|
|
1880
|
+
y: g * a
|
|
1881
1881
|
} : {
|
|
1882
|
-
x:
|
|
1882
|
+
x: g * a,
|
|
1883
1883
|
y: p * s
|
|
1884
1884
|
};
|
|
1885
1885
|
}
|
|
1886
|
-
const
|
|
1886
|
+
const Ll = function(e) {
|
|
1887
1887
|
return e === void 0 && (e = 0), {
|
|
1888
1888
|
name: "offset",
|
|
1889
1889
|
options: e,
|
|
1890
1890
|
async fn(t) {
|
|
1891
|
-
var
|
|
1891
|
+
var o, l;
|
|
1892
1892
|
const {
|
|
1893
1893
|
x: n,
|
|
1894
1894
|
y: r,
|
|
1895
1895
|
placement: i,
|
|
1896
1896
|
middlewareData: u
|
|
1897
1897
|
} = t, c = await _l(t, e);
|
|
1898
|
-
return i === ((
|
|
1898
|
+
return i === ((o = u.offset) == null ? void 0 : o.placement) && (l = u.arrow) != null && l.alignmentOffset ? {} : {
|
|
1899
1899
|
x: n + c.x,
|
|
1900
1900
|
y: r + c.y,
|
|
1901
1901
|
data: {
|
|
@@ -1905,14 +1905,14 @@ const Pl = function(e) {
|
|
|
1905
1905
|
};
|
|
1906
1906
|
}
|
|
1907
1907
|
};
|
|
1908
|
-
},
|
|
1908
|
+
}, Tl = function(e) {
|
|
1909
1909
|
return e === void 0 && (e = {}), {
|
|
1910
1910
|
name: "shift",
|
|
1911
1911
|
options: e,
|
|
1912
1912
|
async fn(t) {
|
|
1913
1913
|
const {
|
|
1914
|
-
x:
|
|
1915
|
-
y:
|
|
1914
|
+
x: o,
|
|
1915
|
+
y: l,
|
|
1916
1916
|
placement: n
|
|
1917
1917
|
} = t, {
|
|
1918
1918
|
mainAxis: r = !0,
|
|
@@ -1920,39 +1920,39 @@ const Pl = function(e) {
|
|
|
1920
1920
|
limiter: u = {
|
|
1921
1921
|
fn: (h) => {
|
|
1922
1922
|
let {
|
|
1923
|
-
x:
|
|
1924
|
-
y
|
|
1923
|
+
x: m,
|
|
1924
|
+
y: w
|
|
1925
1925
|
} = h;
|
|
1926
1926
|
return {
|
|
1927
|
-
x:
|
|
1928
|
-
y
|
|
1927
|
+
x: m,
|
|
1928
|
+
y: w
|
|
1929
1929
|
};
|
|
1930
1930
|
}
|
|
1931
1931
|
},
|
|
1932
1932
|
...c
|
|
1933
|
-
} =
|
|
1934
|
-
x:
|
|
1935
|
-
y:
|
|
1936
|
-
}, s = await
|
|
1937
|
-
let p = a[
|
|
1933
|
+
} = We(e, t), a = {
|
|
1934
|
+
x: o,
|
|
1935
|
+
y: l
|
|
1936
|
+
}, s = await On(t, c), d = Ge(ce(n)), g = xn(d);
|
|
1937
|
+
let p = a[g], b = a[d];
|
|
1938
1938
|
if (r) {
|
|
1939
|
-
const h =
|
|
1940
|
-
p = Tt(
|
|
1939
|
+
const h = g === "y" ? "top" : "left", m = g === "y" ? "bottom" : "right", w = p + s[h], y = p - s[m];
|
|
1940
|
+
p = Tt(w, p, y);
|
|
1941
1941
|
}
|
|
1942
1942
|
if (i) {
|
|
1943
|
-
const h =
|
|
1944
|
-
|
|
1943
|
+
const h = d === "y" ? "top" : "left", m = d === "y" ? "bottom" : "right", w = b + s[h], y = b - s[m];
|
|
1944
|
+
b = Tt(w, b, y);
|
|
1945
1945
|
}
|
|
1946
|
-
const
|
|
1946
|
+
const v = u.fn({
|
|
1947
1947
|
...t,
|
|
1948
|
-
[
|
|
1949
|
-
[
|
|
1948
|
+
[g]: p,
|
|
1949
|
+
[d]: b
|
|
1950
1950
|
});
|
|
1951
1951
|
return {
|
|
1952
|
-
...
|
|
1952
|
+
...v,
|
|
1953
1953
|
data: {
|
|
1954
|
-
x:
|
|
1955
|
-
y:
|
|
1954
|
+
x: v.x - o,
|
|
1955
|
+
y: v.y - l
|
|
1956
1956
|
}
|
|
1957
1957
|
};
|
|
1958
1958
|
}
|
|
@@ -1975,31 +1975,31 @@ function ft(e) {
|
|
|
1975
1975
|
function oe(e) {
|
|
1976
1976
|
return e instanceof Element || e instanceof H(e).Element;
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1978
|
+
function Q(e) {
|
|
1979
1979
|
return e instanceof HTMLElement || e instanceof H(e).HTMLElement;
|
|
1980
1980
|
}
|
|
1981
1981
|
function At(e) {
|
|
1982
1982
|
return typeof ShadowRoot > "u" ? !1 : e instanceof ShadowRoot || e instanceof H(e).ShadowRoot;
|
|
1983
1983
|
}
|
|
1984
|
-
function
|
|
1984
|
+
function Pe(e) {
|
|
1985
1985
|
const {
|
|
1986
1986
|
overflow: t,
|
|
1987
|
-
overflowX:
|
|
1988
|
-
overflowY:
|
|
1987
|
+
overflowX: o,
|
|
1988
|
+
overflowY: l,
|
|
1989
1989
|
display: n
|
|
1990
|
-
} =
|
|
1991
|
-
return /auto|scroll|overlay|hidden|clip/.test(t +
|
|
1990
|
+
} = K(e);
|
|
1991
|
+
return /auto|scroll|overlay|hidden|clip/.test(t + l + o) && !["inline", "contents"].includes(n);
|
|
1992
1992
|
}
|
|
1993
|
-
function
|
|
1993
|
+
function Il(e) {
|
|
1994
1994
|
return ["table", "td", "th"].includes(ne(e));
|
|
1995
1995
|
}
|
|
1996
1996
|
function pt(e) {
|
|
1997
|
-
const t = mt(),
|
|
1998
|
-
return
|
|
1997
|
+
const t = mt(), o = K(e);
|
|
1998
|
+
return o.transform !== "none" || o.perspective !== "none" || (o.containerType ? o.containerType !== "normal" : !1) || !t && (o.backdropFilter ? o.backdropFilter !== "none" : !1) || !t && (o.filter ? o.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((l) => (o.willChange || "").includes(l)) || ["paint", "layout", "strict", "content"].some((l) => (o.contain || "").includes(l));
|
|
1999
1999
|
}
|
|
2000
|
-
function
|
|
2000
|
+
function Al(e) {
|
|
2001
2001
|
let t = ge(e);
|
|
2002
|
-
for (;
|
|
2002
|
+
for (; Q(t) && !qe(t); ) {
|
|
2003
2003
|
if (pt(t))
|
|
2004
2004
|
return t;
|
|
2005
2005
|
t = ge(t);
|
|
@@ -2009,13 +2009,13 @@ function Il(e) {
|
|
|
2009
2009
|
function mt() {
|
|
2010
2010
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
2011
2011
|
}
|
|
2012
|
-
function
|
|
2012
|
+
function qe(e) {
|
|
2013
2013
|
return ["html", "body", "#document"].includes(ne(e));
|
|
2014
2014
|
}
|
|
2015
|
-
function
|
|
2015
|
+
function K(e) {
|
|
2016
2016
|
return H(e).getComputedStyle(e);
|
|
2017
2017
|
}
|
|
2018
|
-
function
|
|
2018
|
+
function Xe(e) {
|
|
2019
2019
|
return oe(e) ? {
|
|
2020
2020
|
scrollLeft: e.scrollLeft,
|
|
2021
2021
|
scrollTop: e.scrollTop
|
|
@@ -2036,23 +2036,23 @@ function ge(e) {
|
|
|
2036
2036
|
);
|
|
2037
2037
|
return At(t) ? t.host : t;
|
|
2038
2038
|
}
|
|
2039
|
-
function
|
|
2039
|
+
function Rn(e) {
|
|
2040
2040
|
const t = ge(e);
|
|
2041
|
-
return
|
|
2041
|
+
return qe(t) ? e.ownerDocument ? e.ownerDocument.body : e.body : Q(t) && Pe(t) ? t : Rn(t);
|
|
2042
2042
|
}
|
|
2043
|
-
function
|
|
2044
|
-
var
|
|
2045
|
-
t === void 0 && (t = []),
|
|
2046
|
-
const n =
|
|
2047
|
-
return r ? t.concat(i, i.visualViewport || [],
|
|
2043
|
+
function Ce(e, t, o) {
|
|
2044
|
+
var l;
|
|
2045
|
+
t === void 0 && (t = []), o === void 0 && (o = !0);
|
|
2046
|
+
const n = Rn(e), r = n === ((l = e.ownerDocument) == null ? void 0 : l.body), i = H(n);
|
|
2047
|
+
return r ? t.concat(i, i.visualViewport || [], Pe(n) ? n : [], i.frameElement && o ? Ce(i.frameElement) : []) : t.concat(n, Ce(n, [], o));
|
|
2048
2048
|
}
|
|
2049
|
-
function
|
|
2050
|
-
const t =
|
|
2051
|
-
let
|
|
2052
|
-
const n =
|
|
2053
|
-
return u && (
|
|
2054
|
-
width:
|
|
2055
|
-
height:
|
|
2049
|
+
function En(e) {
|
|
2050
|
+
const t = K(e);
|
|
2051
|
+
let o = parseFloat(t.width) || 0, l = parseFloat(t.height) || 0;
|
|
2052
|
+
const n = Q(e), r = n ? e.offsetWidth : o, i = n ? e.offsetHeight : l, u = Me(o) !== r || Me(l) !== i;
|
|
2053
|
+
return u && (o = r, l = i), {
|
|
2054
|
+
width: o,
|
|
2055
|
+
height: l,
|
|
2056
2056
|
$: u
|
|
2057
2057
|
};
|
|
2058
2058
|
}
|
|
@@ -2061,69 +2061,69 @@ function vt(e) {
|
|
|
2061
2061
|
}
|
|
2062
2062
|
function ve(e) {
|
|
2063
2063
|
const t = vt(e);
|
|
2064
|
-
if (!
|
|
2064
|
+
if (!Q(t))
|
|
2065
2065
|
return ae(1);
|
|
2066
|
-
const
|
|
2067
|
-
width:
|
|
2066
|
+
const o = t.getBoundingClientRect(), {
|
|
2067
|
+
width: l,
|
|
2068
2068
|
height: n,
|
|
2069
2069
|
$: r
|
|
2070
|
-
} =
|
|
2071
|
-
let i = (r ? Me(
|
|
2070
|
+
} = En(t);
|
|
2071
|
+
let i = (r ? Me(o.width) : o.width) / l, u = (r ? Me(o.height) : o.height) / n;
|
|
2072
2072
|
return (!i || !Number.isFinite(i)) && (i = 1), (!u || !Number.isFinite(u)) && (u = 1), {
|
|
2073
2073
|
x: i,
|
|
2074
2074
|
y: u
|
|
2075
2075
|
};
|
|
2076
2076
|
}
|
|
2077
|
-
const
|
|
2078
|
-
function
|
|
2077
|
+
const $l = /* @__PURE__ */ ae(0);
|
|
2078
|
+
function Cn(e) {
|
|
2079
2079
|
const t = H(e);
|
|
2080
|
-
return !mt() || !t.visualViewport ?
|
|
2080
|
+
return !mt() || !t.visualViewport ? $l : {
|
|
2081
2081
|
x: t.visualViewport.offsetLeft,
|
|
2082
2082
|
y: t.visualViewport.offsetTop
|
|
2083
2083
|
};
|
|
2084
2084
|
}
|
|
2085
|
-
function
|
|
2086
|
-
return t === void 0 && (t = !1), !
|
|
2085
|
+
function Ml(e, t, o) {
|
|
2086
|
+
return t === void 0 && (t = !1), !o || t && o !== H(e) ? !1 : t;
|
|
2087
2087
|
}
|
|
2088
|
-
function de(e, t,
|
|
2089
|
-
t === void 0 && (t = !1),
|
|
2088
|
+
function de(e, t, o, l) {
|
|
2089
|
+
t === void 0 && (t = !1), o === void 0 && (o = !1);
|
|
2090
2090
|
const n = e.getBoundingClientRect(), r = vt(e);
|
|
2091
2091
|
let i = ae(1);
|
|
2092
|
-
t && (
|
|
2093
|
-
const u =
|
|
2094
|
-
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x,
|
|
2092
|
+
t && (l ? oe(l) && (i = ve(l)) : i = ve(e));
|
|
2093
|
+
const u = Ml(r, o, l) ? Cn(r) : ae(0);
|
|
2094
|
+
let c = (n.left + u.x) / i.x, a = (n.top + u.y) / i.y, s = n.width / i.x, d = n.height / i.y;
|
|
2095
2095
|
if (r) {
|
|
2096
|
-
const
|
|
2097
|
-
let
|
|
2098
|
-
for (;
|
|
2099
|
-
const
|
|
2100
|
-
c *=
|
|
2096
|
+
const g = H(r), p = l && oe(l) ? H(l) : l;
|
|
2097
|
+
let b = g.frameElement;
|
|
2098
|
+
for (; b && l && p !== g; ) {
|
|
2099
|
+
const v = ve(b), h = b.getBoundingClientRect(), m = K(b), w = h.left + (b.clientLeft + parseFloat(m.paddingLeft)) * v.x, y = h.top + (b.clientTop + parseFloat(m.paddingTop)) * v.y;
|
|
2100
|
+
c *= v.x, a *= v.y, s *= v.x, d *= v.y, c += w, a += y, b = H(b).frameElement;
|
|
2101
2101
|
}
|
|
2102
2102
|
}
|
|
2103
|
-
return
|
|
2103
|
+
return Ve({
|
|
2104
2104
|
width: s,
|
|
2105
|
-
height:
|
|
2105
|
+
height: d,
|
|
2106
2106
|
x: c,
|
|
2107
2107
|
y: a
|
|
2108
2108
|
});
|
|
2109
2109
|
}
|
|
2110
|
-
function
|
|
2110
|
+
function Fl(e) {
|
|
2111
2111
|
let {
|
|
2112
2112
|
rect: t,
|
|
2113
|
-
offsetParent:
|
|
2114
|
-
strategy:
|
|
2113
|
+
offsetParent: o,
|
|
2114
|
+
strategy: l
|
|
2115
2115
|
} = e;
|
|
2116
|
-
const n =
|
|
2117
|
-
if (
|
|
2116
|
+
const n = Q(o), r = le(o);
|
|
2117
|
+
if (o === r)
|
|
2118
2118
|
return t;
|
|
2119
2119
|
let i = {
|
|
2120
2120
|
scrollLeft: 0,
|
|
2121
2121
|
scrollTop: 0
|
|
2122
2122
|
}, u = ae(1);
|
|
2123
2123
|
const c = ae(0);
|
|
2124
|
-
if ((n || !n &&
|
|
2125
|
-
const a = de(
|
|
2126
|
-
u = ve(
|
|
2124
|
+
if ((n || !n && l !== "fixed") && ((ne(o) !== "body" || Pe(r)) && (i = Xe(o)), Q(o))) {
|
|
2125
|
+
const a = de(o);
|
|
2126
|
+
u = ve(o), c.x = a.x + o.clientLeft, c.y = a.y + o.clientTop;
|
|
2127
2127
|
}
|
|
2128
2128
|
return {
|
|
2129
2129
|
width: t.width * u.x,
|
|
@@ -2136,22 +2136,22 @@ function Vl(e) {
|
|
|
2136
2136
|
return Array.from(e.getClientRects());
|
|
2137
2137
|
}
|
|
2138
2138
|
function Dn(e) {
|
|
2139
|
-
return de(le(e)).left +
|
|
2139
|
+
return de(le(e)).left + Xe(e).scrollLeft;
|
|
2140
2140
|
}
|
|
2141
|
-
function
|
|
2142
|
-
const t = le(e),
|
|
2143
|
-
let i = -
|
|
2144
|
-
const u = -
|
|
2145
|
-
return
|
|
2141
|
+
function Nl(e) {
|
|
2142
|
+
const t = le(e), o = Xe(e), l = e.ownerDocument.body, n = ue(t.scrollWidth, t.clientWidth, l.scrollWidth, l.clientWidth), r = ue(t.scrollHeight, t.clientHeight, l.scrollHeight, l.clientHeight);
|
|
2143
|
+
let i = -o.scrollLeft + Dn(e);
|
|
2144
|
+
const u = -o.scrollTop;
|
|
2145
|
+
return K(l).direction === "rtl" && (i += ue(t.clientWidth, l.clientWidth) - n), {
|
|
2146
2146
|
width: n,
|
|
2147
2147
|
height: r,
|
|
2148
2148
|
x: i,
|
|
2149
2149
|
y: u
|
|
2150
2150
|
};
|
|
2151
2151
|
}
|
|
2152
|
-
function
|
|
2153
|
-
const
|
|
2154
|
-
let r =
|
|
2152
|
+
function Bl(e, t) {
|
|
2153
|
+
const o = H(e), l = le(e), n = o.visualViewport;
|
|
2154
|
+
let r = l.clientWidth, i = l.clientHeight, u = 0, c = 0;
|
|
2155
2155
|
if (n) {
|
|
2156
2156
|
r = n.width, i = n.height;
|
|
2157
2157
|
const a = mt();
|
|
@@ -2164,8 +2164,8 @@ function Nl(e, t) {
|
|
|
2164
2164
|
y: c
|
|
2165
2165
|
};
|
|
2166
2166
|
}
|
|
2167
|
-
function
|
|
2168
|
-
const
|
|
2167
|
+
function jl(e, t) {
|
|
2168
|
+
const o = de(e, !0, t === "fixed"), l = o.top + e.clientTop, n = o.left + e.clientLeft, r = Q(e) ? ve(e) : ae(1), i = e.clientWidth * r.x, u = e.clientHeight * r.y, c = n * r.x, a = l * r.y;
|
|
2169
2169
|
return {
|
|
2170
2170
|
width: i,
|
|
2171
2171
|
height: u,
|
|
@@ -2173,51 +2173,51 @@ function Bl(e, t) {
|
|
|
2173
2173
|
y: a
|
|
2174
2174
|
};
|
|
2175
2175
|
}
|
|
2176
|
-
function $t(e, t,
|
|
2177
|
-
let
|
|
2176
|
+
function $t(e, t, o) {
|
|
2177
|
+
let l;
|
|
2178
2178
|
if (t === "viewport")
|
|
2179
|
-
|
|
2179
|
+
l = Bl(e, o);
|
|
2180
2180
|
else if (t === "document")
|
|
2181
|
-
|
|
2181
|
+
l = Nl(le(e));
|
|
2182
2182
|
else if (oe(t))
|
|
2183
|
-
|
|
2183
|
+
l = jl(t, o);
|
|
2184
2184
|
else {
|
|
2185
|
-
const n =
|
|
2186
|
-
|
|
2185
|
+
const n = Cn(e);
|
|
2186
|
+
l = {
|
|
2187
2187
|
...t,
|
|
2188
2188
|
x: t.x - n.x,
|
|
2189
2189
|
y: t.y - n.y
|
|
2190
2190
|
};
|
|
2191
2191
|
}
|
|
2192
|
-
return
|
|
2192
|
+
return Ve(l);
|
|
2193
2193
|
}
|
|
2194
|
-
function
|
|
2195
|
-
const
|
|
2196
|
-
return
|
|
2194
|
+
function Pn(e, t) {
|
|
2195
|
+
const o = ge(e);
|
|
2196
|
+
return o === t || !oe(o) || qe(o) ? !1 : K(o).position === "fixed" || Pn(o, t);
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2199
|
-
const
|
|
2200
|
-
if (
|
|
2201
|
-
return
|
|
2202
|
-
let
|
|
2203
|
-
const r =
|
|
2198
|
+
function Hl(e, t) {
|
|
2199
|
+
const o = t.get(e);
|
|
2200
|
+
if (o)
|
|
2201
|
+
return o;
|
|
2202
|
+
let l = Ce(e, [], !1).filter((u) => oe(u) && ne(u) !== "body"), n = null;
|
|
2203
|
+
const r = K(e).position === "fixed";
|
|
2204
2204
|
let i = r ? ge(e) : e;
|
|
2205
|
-
for (; oe(i) && !
|
|
2206
|
-
const u =
|
|
2207
|
-
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) ||
|
|
2205
|
+
for (; oe(i) && !qe(i); ) {
|
|
2206
|
+
const u = K(i), c = pt(i);
|
|
2207
|
+
!c && u.position === "fixed" && (n = null), (r ? !c && !n : !c && u.position === "static" && !!n && ["absolute", "fixed"].includes(n.position) || Pe(i) && !c && Pn(e, i)) ? l = l.filter((s) => s !== i) : n = u, i = ge(i);
|
|
2208
2208
|
}
|
|
2209
|
-
return t.set(e,
|
|
2209
|
+
return t.set(e, l), l;
|
|
2210
2210
|
}
|
|
2211
2211
|
function zl(e) {
|
|
2212
2212
|
let {
|
|
2213
2213
|
element: t,
|
|
2214
|
-
boundary:
|
|
2215
|
-
rootBoundary:
|
|
2214
|
+
boundary: o,
|
|
2215
|
+
rootBoundary: l,
|
|
2216
2216
|
strategy: n
|
|
2217
2217
|
} = e;
|
|
2218
|
-
const i = [...
|
|
2219
|
-
const
|
|
2220
|
-
return a.top = ue(
|
|
2218
|
+
const i = [...o === "clippingAncestors" ? Hl(t, this._c) : [].concat(o), l], u = i[0], c = i.reduce((a, s) => {
|
|
2219
|
+
const d = $t(t, s, n);
|
|
2220
|
+
return a.top = ue(d.top, a.top), a.right = $e(d.right, a.right), a.bottom = $e(d.bottom, a.bottom), a.left = ue(d.left, a.left), a;
|
|
2221
2221
|
}, $t(t, u, n));
|
|
2222
2222
|
return {
|
|
2223
2223
|
width: c.right - c.left,
|
|
@@ -2226,25 +2226,25 @@ function zl(e) {
|
|
|
2226
2226
|
y: c.top
|
|
2227
2227
|
};
|
|
2228
2228
|
}
|
|
2229
|
-
function
|
|
2229
|
+
function Ul(e) {
|
|
2230
2230
|
const {
|
|
2231
2231
|
width: t,
|
|
2232
|
-
height:
|
|
2233
|
-
} =
|
|
2232
|
+
height: o
|
|
2233
|
+
} = En(e);
|
|
2234
2234
|
return {
|
|
2235
2235
|
width: t,
|
|
2236
|
-
height:
|
|
2236
|
+
height: o
|
|
2237
2237
|
};
|
|
2238
2238
|
}
|
|
2239
|
-
function
|
|
2240
|
-
const
|
|
2239
|
+
function Wl(e, t, o) {
|
|
2240
|
+
const l = Q(t), n = le(t), r = o === "fixed", i = de(e, !0, r, t);
|
|
2241
2241
|
let u = {
|
|
2242
2242
|
scrollLeft: 0,
|
|
2243
2243
|
scrollTop: 0
|
|
2244
2244
|
};
|
|
2245
2245
|
const c = ae(0);
|
|
2246
|
-
if (
|
|
2247
|
-
if ((ne(t) !== "body" ||
|
|
2246
|
+
if (l || !l && !r)
|
|
2247
|
+
if ((ne(t) !== "body" || Pe(n)) && (u = Xe(t)), l) {
|
|
2248
2248
|
const a = de(t, !0, r, t);
|
|
2249
2249
|
c.x = a.x + t.clientLeft, c.y = a.y + t.clientTop;
|
|
2250
2250
|
} else
|
|
@@ -2257,145 +2257,145 @@ function Ul(e, t, l) {
|
|
|
2257
2257
|
};
|
|
2258
2258
|
}
|
|
2259
2259
|
function Mt(e, t) {
|
|
2260
|
-
return !
|
|
2260
|
+
return !Q(e) || K(e).position === "fixed" ? null : t ? t(e) : e.offsetParent;
|
|
2261
2261
|
}
|
|
2262
|
-
function
|
|
2263
|
-
const
|
|
2264
|
-
if (!
|
|
2265
|
-
return
|
|
2266
|
-
let
|
|
2267
|
-
for (;
|
|
2268
|
-
|
|
2269
|
-
return
|
|
2262
|
+
function _n(e, t) {
|
|
2263
|
+
const o = H(e);
|
|
2264
|
+
if (!Q(e))
|
|
2265
|
+
return o;
|
|
2266
|
+
let l = Mt(e, t);
|
|
2267
|
+
for (; l && Il(l) && K(l).position === "static"; )
|
|
2268
|
+
l = Mt(l, t);
|
|
2269
|
+
return l && (ne(l) === "html" || ne(l) === "body" && K(l).position === "static" && !pt(l)) ? o : l || Al(e) || o;
|
|
2270
2270
|
}
|
|
2271
|
-
const
|
|
2271
|
+
const Kl = async function(e) {
|
|
2272
2272
|
let {
|
|
2273
2273
|
reference: t,
|
|
2274
|
-
floating:
|
|
2275
|
-
strategy:
|
|
2274
|
+
floating: o,
|
|
2275
|
+
strategy: l
|
|
2276
2276
|
} = e;
|
|
2277
|
-
const n = this.getOffsetParent ||
|
|
2277
|
+
const n = this.getOffsetParent || _n, r = this.getDimensions;
|
|
2278
2278
|
return {
|
|
2279
|
-
reference:
|
|
2279
|
+
reference: Wl(t, await n(o), l),
|
|
2280
2280
|
floating: {
|
|
2281
2281
|
x: 0,
|
|
2282
2282
|
y: 0,
|
|
2283
|
-
...await r(
|
|
2283
|
+
...await r(o)
|
|
2284
2284
|
}
|
|
2285
2285
|
};
|
|
2286
2286
|
};
|
|
2287
|
-
function
|
|
2288
|
-
return
|
|
2287
|
+
function Gl(e) {
|
|
2288
|
+
return K(e).direction === "rtl";
|
|
2289
2289
|
}
|
|
2290
|
-
const
|
|
2291
|
-
convertOffsetParentRelativeRectToViewportRelativeRect:
|
|
2290
|
+
const ql = {
|
|
2291
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Fl,
|
|
2292
2292
|
getDocumentElement: le,
|
|
2293
2293
|
getClippingRect: zl,
|
|
2294
|
-
getOffsetParent:
|
|
2295
|
-
getElementRects:
|
|
2294
|
+
getOffsetParent: _n,
|
|
2295
|
+
getElementRects: Kl,
|
|
2296
2296
|
getClientRects: Vl,
|
|
2297
|
-
getDimensions:
|
|
2297
|
+
getDimensions: Ul,
|
|
2298
2298
|
getScale: ve,
|
|
2299
2299
|
isElement: oe,
|
|
2300
|
-
isRTL:
|
|
2300
|
+
isRTL: Gl
|
|
2301
2301
|
};
|
|
2302
|
-
function
|
|
2303
|
-
let
|
|
2302
|
+
function Xl(e, t) {
|
|
2303
|
+
let o = null, l;
|
|
2304
2304
|
const n = le(e);
|
|
2305
2305
|
function r() {
|
|
2306
|
-
clearTimeout(
|
|
2306
|
+
clearTimeout(l), o && o.disconnect(), o = null;
|
|
2307
2307
|
}
|
|
2308
2308
|
function i(u, c) {
|
|
2309
2309
|
u === void 0 && (u = !1), c === void 0 && (c = 1), r();
|
|
2310
2310
|
const {
|
|
2311
2311
|
left: a,
|
|
2312
2312
|
top: s,
|
|
2313
|
-
width:
|
|
2314
|
-
height:
|
|
2313
|
+
width: d,
|
|
2314
|
+
height: g
|
|
2315
2315
|
} = e.getBoundingClientRect();
|
|
2316
|
-
if (u || t(), !
|
|
2316
|
+
if (u || t(), !d || !g)
|
|
2317
2317
|
return;
|
|
2318
|
-
const p = Ie(s),
|
|
2319
|
-
rootMargin: -p + "px " + -
|
|
2318
|
+
const p = Ie(s), b = Ie(n.clientWidth - (a + d)), v = Ie(n.clientHeight - (s + g)), h = Ie(a), w = {
|
|
2319
|
+
rootMargin: -p + "px " + -b + "px " + -v + "px " + -h + "px",
|
|
2320
2320
|
threshold: ue(0, $e(1, c)) || 1
|
|
2321
2321
|
};
|
|
2322
|
-
let
|
|
2323
|
-
function
|
|
2322
|
+
let y = !0;
|
|
2323
|
+
function x(S) {
|
|
2324
2324
|
const P = S[0].intersectionRatio;
|
|
2325
2325
|
if (P !== c) {
|
|
2326
|
-
if (!
|
|
2326
|
+
if (!y)
|
|
2327
2327
|
return i();
|
|
2328
|
-
P ? i(!1, P) :
|
|
2328
|
+
P ? i(!1, P) : l = setTimeout(() => {
|
|
2329
2329
|
i(!1, 1e-7);
|
|
2330
2330
|
}, 100);
|
|
2331
2331
|
}
|
|
2332
|
-
|
|
2332
|
+
y = !1;
|
|
2333
2333
|
}
|
|
2334
2334
|
try {
|
|
2335
|
-
|
|
2336
|
-
...
|
|
2335
|
+
o = new IntersectionObserver(x, {
|
|
2336
|
+
...w,
|
|
2337
2337
|
// Handle <iframe>s
|
|
2338
2338
|
root: n.ownerDocument
|
|
2339
2339
|
});
|
|
2340
2340
|
} catch {
|
|
2341
|
-
|
|
2341
|
+
o = new IntersectionObserver(x, w);
|
|
2342
2342
|
}
|
|
2343
|
-
|
|
2343
|
+
o.observe(e);
|
|
2344
2344
|
}
|
|
2345
2345
|
return i(!0), r;
|
|
2346
2346
|
}
|
|
2347
|
-
function
|
|
2348
|
-
|
|
2347
|
+
function Yl(e, t, o, l) {
|
|
2348
|
+
l === void 0 && (l = {});
|
|
2349
2349
|
const {
|
|
2350
2350
|
ancestorScroll: n = !0,
|
|
2351
2351
|
ancestorResize: r = !0,
|
|
2352
2352
|
elementResize: i = typeof ResizeObserver == "function",
|
|
2353
2353
|
layoutShift: u = typeof IntersectionObserver == "function",
|
|
2354
2354
|
animationFrame: c = !1
|
|
2355
|
-
} =
|
|
2356
|
-
s.forEach((
|
|
2357
|
-
n &&
|
|
2355
|
+
} = l, a = vt(e), s = n || r ? [...a ? Ce(a) : [], ...Ce(t)] : [];
|
|
2356
|
+
s.forEach((m) => {
|
|
2357
|
+
n && m.addEventListener("scroll", o, {
|
|
2358
2358
|
passive: !0
|
|
2359
|
-
}), r &&
|
|
2359
|
+
}), r && m.addEventListener("resize", o);
|
|
2360
2360
|
});
|
|
2361
|
-
const
|
|
2362
|
-
let
|
|
2363
|
-
i && (p = new ResizeObserver((
|
|
2364
|
-
let [
|
|
2365
|
-
|
|
2361
|
+
const d = a && u ? Xl(a, o) : null;
|
|
2362
|
+
let g = -1, p = null;
|
|
2363
|
+
i && (p = new ResizeObserver((m) => {
|
|
2364
|
+
let [w] = m;
|
|
2365
|
+
w && w.target === a && p && (p.unobserve(t), cancelAnimationFrame(g), g = requestAnimationFrame(() => {
|
|
2366
2366
|
p && p.observe(t);
|
|
2367
|
-
})),
|
|
2367
|
+
})), o();
|
|
2368
2368
|
}), a && !c && p.observe(a), p.observe(t));
|
|
2369
|
-
let
|
|
2369
|
+
let b, v = c ? de(e) : null;
|
|
2370
2370
|
c && h();
|
|
2371
2371
|
function h() {
|
|
2372
|
-
const
|
|
2373
|
-
|
|
2372
|
+
const m = de(e);
|
|
2373
|
+
v && (m.x !== v.x || m.y !== v.y || m.width !== v.width || m.height !== v.height) && o(), v = m, b = requestAnimationFrame(h);
|
|
2374
2374
|
}
|
|
2375
|
-
return
|
|
2376
|
-
s.forEach((
|
|
2377
|
-
n &&
|
|
2378
|
-
}),
|
|
2375
|
+
return o(), () => {
|
|
2376
|
+
s.forEach((m) => {
|
|
2377
|
+
n && m.removeEventListener("scroll", o), r && m.removeEventListener("resize", o);
|
|
2378
|
+
}), d && d(), p && p.disconnect(), p = null, c && cancelAnimationFrame(b);
|
|
2379
2379
|
};
|
|
2380
2380
|
}
|
|
2381
|
-
const
|
|
2382
|
-
const
|
|
2383
|
-
platform:
|
|
2384
|
-
...
|
|
2381
|
+
const Ql = Tl, Zl = Pl, Jl = (e, t, o) => {
|
|
2382
|
+
const l = /* @__PURE__ */ new Map(), n = {
|
|
2383
|
+
platform: ql,
|
|
2384
|
+
...o
|
|
2385
2385
|
}, r = {
|
|
2386
2386
|
...n.platform,
|
|
2387
|
-
_c:
|
|
2387
|
+
_c: l
|
|
2388
2388
|
};
|
|
2389
|
-
return
|
|
2389
|
+
return Dl(e, t, {
|
|
2390
2390
|
...n,
|
|
2391
2391
|
platform: r
|
|
2392
2392
|
});
|
|
2393
2393
|
};
|
|
2394
|
-
function
|
|
2394
|
+
function er(e) {
|
|
2395
2395
|
return e != null && typeof e == "object" && "$el" in e;
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2398
|
-
if (
|
|
2397
|
+
function Ft(e) {
|
|
2398
|
+
if (er(e)) {
|
|
2399
2399
|
const t = e.$el;
|
|
2400
2400
|
return ft(t) && ne(t) === "#comment" ? null : t;
|
|
2401
2401
|
}
|
|
@@ -2404,113 +2404,113 @@ function Vt(e) {
|
|
|
2404
2404
|
function Ln(e) {
|
|
2405
2405
|
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2406
2406
|
}
|
|
2407
|
-
function
|
|
2408
|
-
const
|
|
2409
|
-
return Math.round(t *
|
|
2407
|
+
function Vt(e, t) {
|
|
2408
|
+
const o = Ln(e);
|
|
2409
|
+
return Math.round(t * o) / o;
|
|
2410
2410
|
}
|
|
2411
|
-
function
|
|
2412
|
-
|
|
2413
|
-
const
|
|
2414
|
-
var
|
|
2415
|
-
return (
|
|
2416
|
-
}), r = k(() => _(
|
|
2417
|
-
var
|
|
2418
|
-
return (
|
|
2411
|
+
function tr(e, t, o) {
|
|
2412
|
+
o === void 0 && (o = {});
|
|
2413
|
+
const l = o.whileElementsMounted, n = k(() => {
|
|
2414
|
+
var R;
|
|
2415
|
+
return (R = _(o.open)) != null ? R : !0;
|
|
2416
|
+
}), r = k(() => _(o.middleware)), i = k(() => {
|
|
2417
|
+
var R;
|
|
2418
|
+
return (R = _(o.placement)) != null ? R : "bottom";
|
|
2419
2419
|
}), u = k(() => {
|
|
2420
|
-
var
|
|
2421
|
-
return (
|
|
2420
|
+
var R;
|
|
2421
|
+
return (R = _(o.strategy)) != null ? R : "absolute";
|
|
2422
2422
|
}), c = k(() => {
|
|
2423
|
-
var
|
|
2424
|
-
return (
|
|
2425
|
-
}), a = k(() =>
|
|
2426
|
-
const
|
|
2423
|
+
var R;
|
|
2424
|
+
return (R = _(o.transform)) != null ? R : !0;
|
|
2425
|
+
}), a = k(() => Ft(e.value)), s = k(() => Ft(t.value)), d = O(0), g = O(0), p = O(u.value), b = O(i.value), v = Fn({}), h = O(!1), m = k(() => {
|
|
2426
|
+
const R = {
|
|
2427
2427
|
position: p.value,
|
|
2428
2428
|
left: "0",
|
|
2429
2429
|
top: "0"
|
|
2430
2430
|
};
|
|
2431
2431
|
if (!s.value)
|
|
2432
|
-
return
|
|
2433
|
-
const
|
|
2432
|
+
return R;
|
|
2433
|
+
const V = Vt(s.value, d.value), re = Vt(s.value, g.value);
|
|
2434
2434
|
return c.value ? {
|
|
2435
|
-
...
|
|
2436
|
-
transform: "translate(" +
|
|
2435
|
+
...R,
|
|
2436
|
+
transform: "translate(" + V + "px, " + re + "px)",
|
|
2437
2437
|
...Ln(s.value) >= 1.5 && {
|
|
2438
2438
|
willChange: "transform"
|
|
2439
2439
|
}
|
|
2440
2440
|
} : {
|
|
2441
2441
|
position: p.value,
|
|
2442
|
-
left:
|
|
2442
|
+
left: V + "px",
|
|
2443
2443
|
top: re + "px"
|
|
2444
2444
|
};
|
|
2445
2445
|
});
|
|
2446
|
-
let
|
|
2447
|
-
function
|
|
2448
|
-
a.value == null || s.value == null ||
|
|
2446
|
+
let w;
|
|
2447
|
+
function y() {
|
|
2448
|
+
a.value == null || s.value == null || Jl(a.value, s.value, {
|
|
2449
2449
|
middleware: r.value,
|
|
2450
2450
|
placement: i.value,
|
|
2451
2451
|
strategy: u.value
|
|
2452
|
-
}).then((
|
|
2453
|
-
|
|
2452
|
+
}).then((R) => {
|
|
2453
|
+
d.value = R.x, g.value = R.y, p.value = R.strategy, b.value = R.placement, v.value = R.middlewareData, h.value = !0;
|
|
2454
2454
|
});
|
|
2455
2455
|
}
|
|
2456
|
-
function
|
|
2457
|
-
typeof
|
|
2456
|
+
function x() {
|
|
2457
|
+
typeof w == "function" && (w(), w = void 0);
|
|
2458
2458
|
}
|
|
2459
2459
|
function S() {
|
|
2460
|
-
if (
|
|
2461
|
-
|
|
2460
|
+
if (x(), l === void 0) {
|
|
2461
|
+
y();
|
|
2462
2462
|
return;
|
|
2463
2463
|
}
|
|
2464
2464
|
if (a.value != null && s.value != null) {
|
|
2465
|
-
|
|
2465
|
+
w = l(a.value, s.value, y);
|
|
2466
2466
|
return;
|
|
2467
2467
|
}
|
|
2468
2468
|
}
|
|
2469
2469
|
function P() {
|
|
2470
2470
|
n.value || (h.value = !1);
|
|
2471
2471
|
}
|
|
2472
|
-
return
|
|
2472
|
+
return J([r, i, u], y, {
|
|
2473
2473
|
flush: "sync"
|
|
2474
|
-
}),
|
|
2474
|
+
}), J([a, s], S, {
|
|
2475
2475
|
flush: "sync"
|
|
2476
|
-
}),
|
|
2476
|
+
}), J(n, P, {
|
|
2477
2477
|
flush: "sync"
|
|
2478
|
-
}),
|
|
2479
|
-
x: me(
|
|
2480
|
-
y: me(
|
|
2478
|
+
}), Vn() && Nn(x), {
|
|
2479
|
+
x: me(d),
|
|
2480
|
+
y: me(g),
|
|
2481
2481
|
strategy: me(p),
|
|
2482
|
-
placement: me(
|
|
2483
|
-
middlewareData: me(
|
|
2482
|
+
placement: me(b),
|
|
2483
|
+
middlewareData: me(v),
|
|
2484
2484
|
isPositioned: me(h),
|
|
2485
|
-
floatingStyles:
|
|
2486
|
-
update:
|
|
2485
|
+
floatingStyles: m,
|
|
2486
|
+
update: y
|
|
2487
2487
|
};
|
|
2488
2488
|
}
|
|
2489
|
-
const
|
|
2489
|
+
const Pr = /* @__PURE__ */ T({
|
|
2490
2490
|
__name: "MenuContainer",
|
|
2491
2491
|
props: {
|
|
2492
2492
|
position: { default: "left" },
|
|
2493
2493
|
usePortal: { type: [Boolean, String], default: !1 }
|
|
2494
2494
|
},
|
|
2495
2495
|
setup(e) {
|
|
2496
|
-
const t = e,
|
|
2496
|
+
const t = e, o = O(null), l = O(null), n = t.position === "left" ? "bottom-end" : "bottom-start", { floatingStyles: r } = tr(o, l, {
|
|
2497
2497
|
placement: n,
|
|
2498
|
-
whileElementsMounted:
|
|
2499
|
-
middleware: [
|
|
2498
|
+
whileElementsMounted: Yl,
|
|
2499
|
+
middleware: [Ll(6), Zl(), Ql({ padding: 6 })]
|
|
2500
2500
|
});
|
|
2501
|
-
return (i, u) => (
|
|
2501
|
+
return (i, u) => (C(), U(_(ml), {
|
|
2502
2502
|
as: "div",
|
|
2503
2503
|
class: "inline-block text-left"
|
|
2504
2504
|
}, {
|
|
2505
|
-
default:
|
|
2506
|
-
|
|
2505
|
+
default: z(() => [
|
|
2506
|
+
j(_(vl), {
|
|
2507
2507
|
class: "focus:outline-none",
|
|
2508
2508
|
ref_key: "reference",
|
|
2509
|
-
ref:
|
|
2509
|
+
ref: o
|
|
2510
2510
|
}, {
|
|
2511
|
-
default:
|
|
2511
|
+
default: z(() => [
|
|
2512
2512
|
ht(i.$slots, "button", {}, () => [
|
|
2513
|
-
|
|
2513
|
+
j(_(q), {
|
|
2514
2514
|
class: "fill-current",
|
|
2515
2515
|
name: "ellipsis-h"
|
|
2516
2516
|
})
|
|
@@ -2518,17 +2518,17 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2518
2518
|
]),
|
|
2519
2519
|
_: 3
|
|
2520
2520
|
}, 512),
|
|
2521
|
-
(
|
|
2521
|
+
(C(), U(Bn, {
|
|
2522
2522
|
to: typeof i.usePortal == "string" ? i.usePortal : "body",
|
|
2523
2523
|
disabled: !i.usePortal
|
|
2524
2524
|
}, [
|
|
2525
|
-
|
|
2525
|
+
A("div", {
|
|
2526
2526
|
class: "w-56 z-20",
|
|
2527
2527
|
style: Nt(_(r)),
|
|
2528
2528
|
ref_key: "floating",
|
|
2529
|
-
ref:
|
|
2529
|
+
ref: l
|
|
2530
2530
|
}, [
|
|
2531
|
-
|
|
2531
|
+
j(Bt, {
|
|
2532
2532
|
"enter-active-class": "transition duration-200 ease-in-out",
|
|
2533
2533
|
"enter-from-class": "transform -translate-y-4 opacity-0",
|
|
2534
2534
|
"enter-to-class": "transform opacity-100",
|
|
@@ -2536,13 +2536,13 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2536
2536
|
"leave-from-class": "transform opacity-100",
|
|
2537
2537
|
"leave-to-class": "transform -translate-y-2 opacity-0"
|
|
2538
2538
|
}, {
|
|
2539
|
-
default:
|
|
2540
|
-
|
|
2541
|
-
class:
|
|
2539
|
+
default: z(() => [
|
|
2540
|
+
j(_(gl), {
|
|
2541
|
+
class: F([
|
|
2542
2542
|
"z-40 mt-1 p-1 bg-white rounded shadow-lg text-grey-700 focus:outline-none w-full"
|
|
2543
2543
|
])
|
|
2544
2544
|
}, {
|
|
2545
|
-
default:
|
|
2545
|
+
default: z(() => [
|
|
2546
2546
|
ht(i.$slots, "default")
|
|
2547
2547
|
]),
|
|
2548
2548
|
_: 3
|
|
@@ -2556,10 +2556,10 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2556
2556
|
_: 3
|
|
2557
2557
|
}));
|
|
2558
2558
|
}
|
|
2559
|
-
}),
|
|
2559
|
+
}), nr = {
|
|
2560
2560
|
key: 0,
|
|
2561
2561
|
class: "bg-grey-300 px-2 rounded-lg max-w-[66px] truncate"
|
|
2562
|
-
},
|
|
2562
|
+
}, _r = /* @__PURE__ */ T({
|
|
2563
2563
|
__name: "MenuLink",
|
|
2564
2564
|
props: {
|
|
2565
2565
|
label: {},
|
|
@@ -2568,17 +2568,17 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2568
2568
|
as: {}
|
|
2569
2569
|
},
|
|
2570
2570
|
setup(e) {
|
|
2571
|
-
return (t,
|
|
2572
|
-
default:
|
|
2573
|
-
(
|
|
2574
|
-
class:
|
|
2575
|
-
|
|
2571
|
+
return (t, o) => (C(), U(_(bl), jn(Hn({ disabled: t.disabled })), {
|
|
2572
|
+
default: z(({ active: l }) => [
|
|
2573
|
+
(C(), U(zn(t.as || "span"), {
|
|
2574
|
+
class: F(["flex items-center justify-between px-4 py-2 text-xs leading-5 transition-colors duration-100 rounded-lg", [
|
|
2575
|
+
l ? "bg-grey-200" : "",
|
|
2576
2576
|
t.disabled ? "opacity-50 pointer-events-none" : "hover:bg-grey-200 focus:bg-grey-200 focus:outline-none"
|
|
2577
2577
|
]])
|
|
2578
2578
|
}, {
|
|
2579
|
-
default:
|
|
2580
|
-
|
|
2581
|
-
t.meta ? (
|
|
2579
|
+
default: z(() => [
|
|
2580
|
+
A("span", null, X(t.label), 1),
|
|
2581
|
+
t.meta ? (C(), I("span", nr, X(t.meta), 1)) : M("", !0)
|
|
2582
2582
|
]),
|
|
2583
2583
|
_: 2
|
|
2584
2584
|
}, 1032, ["class"]))
|
|
@@ -2586,21 +2586,22 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2586
2586
|
_: 1
|
|
2587
2587
|
}, 16));
|
|
2588
2588
|
}
|
|
2589
|
-
}),
|
|
2589
|
+
}), or = { class: "relative" }, lr = {
|
|
2590
2590
|
key: 0,
|
|
2591
2591
|
class: "absolute left-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none"
|
|
2592
|
-
},
|
|
2592
|
+
}, rr = {
|
|
2593
2593
|
key: 1,
|
|
2594
2594
|
class: "block truncate"
|
|
2595
|
-
},
|
|
2595
|
+
}, ir = ["innerHTML"], ar = {
|
|
2596
2596
|
key: 2,
|
|
2597
2597
|
class: "text-grey-500 truncate"
|
|
2598
|
-
},
|
|
2598
|
+
}, sr = { class: "absolute right-0 inset-y-0 inline-flex items-center justify-center text-grey-700 dark:text-grey-100 px-4 pointer-events-none" }, ur = { class: "absolute right-2 inset-y-0 flex items-center" }, cr = {
|
|
2599
2599
|
key: 0,
|
|
2600
2600
|
class: "bg-grey-500 text-grey-100 rounded text-xs px-2 py-1"
|
|
2601
|
-
},
|
|
2601
|
+
}, dr = ["innerHTML"], Lr = /* @__PURE__ */ T({
|
|
2602
2602
|
__name: "Select",
|
|
2603
2603
|
props: {
|
|
2604
|
+
id: {},
|
|
2604
2605
|
modelValue: {},
|
|
2605
2606
|
size: { default: "medium" },
|
|
2606
2607
|
icon: {},
|
|
@@ -2611,41 +2612,43 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2611
2612
|
},
|
|
2612
2613
|
emits: ["update:modelValue"],
|
|
2613
2614
|
setup(e, { emit: t }) {
|
|
2614
|
-
const
|
|
2615
|
-
|
|
2616
|
-
() =>
|
|
2617
|
-
(
|
|
2618
|
-
|
|
2619
|
-
c && c.id !== ((a = o.value) == null ? void 0 : a.id) && (o.value = c);
|
|
2615
|
+
const o = e, l = O(o.modelValue ?? null), n = t, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(o);
|
|
2616
|
+
J(
|
|
2617
|
+
() => o.modelValue,
|
|
2618
|
+
(a) => {
|
|
2619
|
+
l.value = a ?? null;
|
|
2620
2620
|
}
|
|
2621
|
-
)
|
|
2622
|
-
|
|
2623
|
-
|
|
2621
|
+
);
|
|
2622
|
+
const c = (a) => {
|
|
2623
|
+
l.value = a, n("update:modelValue", a);
|
|
2624
|
+
};
|
|
2625
|
+
return (a, s) => (C(), U(_(al), {
|
|
2624
2626
|
as: "div",
|
|
2625
|
-
|
|
2626
|
-
"onUpdate:modelValue":
|
|
2627
|
-
disabled:
|
|
2627
|
+
"model-value": l.value,
|
|
2628
|
+
"onUpdate:modelValue": c,
|
|
2629
|
+
disabled: a.isDisabled
|
|
2628
2630
|
}, {
|
|
2629
|
-
default:
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2631
|
+
default: z(() => [
|
|
2632
|
+
A("div", or, [
|
|
2633
|
+
j(_(sl), {
|
|
2634
|
+
id: a.id,
|
|
2635
|
+
class: F(["w-full mono-50 bg-white text-grey-800 placeholder-grey-600 border border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder-grey-400 dark:border-grey-700 focus:ring-2 focus:border-blue-400 focus:ring-blue-400 focus:outline-none dark:focus:border-blue-800 dark:focus:ring-blue-800 cursor-default rounded font-normal text-left", [_(r), _(u), _(i)]])
|
|
2633
2636
|
}, {
|
|
2634
|
-
default:
|
|
2635
|
-
var
|
|
2637
|
+
default: z(() => {
|
|
2638
|
+
var d;
|
|
2636
2639
|
return [
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
name: ((
|
|
2640
|
+
a.icon ? (C(), I("span", lr, [
|
|
2641
|
+
j(q, {
|
|
2642
|
+
name: ((d = l.value) == null ? void 0 : d.icon) ?? a.icon
|
|
2640
2643
|
}, null, 8, ["name"])
|
|
2641
2644
|
])) : M("", !0),
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
innerHTML:
|
|
2645
|
-
}, null, 8,
|
|
2646
|
-
])) : (
|
|
2647
|
-
|
|
2648
|
-
|
|
2645
|
+
l.value ? (C(), I("span", rr, [
|
|
2646
|
+
A("span", {
|
|
2647
|
+
innerHTML: l.value.label
|
|
2648
|
+
}, null, 8, ir)
|
|
2649
|
+
])) : (C(), I("span", ar, X(a.placeholder), 1)),
|
|
2650
|
+
A("span", sr, [
|
|
2651
|
+
j(q, {
|
|
2649
2652
|
class: "text-grey-400",
|
|
2650
2653
|
name: "chevron-down",
|
|
2651
2654
|
"aria-hidden": "true"
|
|
@@ -2654,55 +2657,55 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2654
2657
|
];
|
|
2655
2658
|
}),
|
|
2656
2659
|
_: 1
|
|
2657
|
-
}, 8, ["class"]),
|
|
2658
|
-
|
|
2660
|
+
}, 8, ["id", "class"]),
|
|
2661
|
+
j(Bt, {
|
|
2659
2662
|
"leave-active-class": "transition ease-in duration-100",
|
|
2660
2663
|
"leave-from-class": "opacity-100",
|
|
2661
2664
|
"leave-to-class": "opacity-0"
|
|
2662
2665
|
}, {
|
|
2663
|
-
default:
|
|
2664
|
-
|
|
2665
|
-
default:
|
|
2666
|
-
(
|
|
2666
|
+
default: z(() => [
|
|
2667
|
+
j(_(ul), { class: "absolute z-10 mt-1 w-full bg-white dark:bg-grey-700 dark:text-grey-50 shadow-lg max-h-60 rounded-md py-1 text-base ring-1 ring-black ring-opacity-5 overflow-auto focus:outline-none sm:text-sm" }, {
|
|
2668
|
+
default: z(() => [
|
|
2669
|
+
(C(!0), I(be, null, jt(a.options, (d) => (C(), U(_(cl), {
|
|
2667
2670
|
as: "template",
|
|
2668
|
-
key:
|
|
2669
|
-
value:
|
|
2670
|
-
disabled:
|
|
2671
|
+
key: d.id,
|
|
2672
|
+
value: d,
|
|
2673
|
+
disabled: d.disabled
|
|
2671
2674
|
}, {
|
|
2672
|
-
default:
|
|
2673
|
-
|
|
2674
|
-
class:
|
|
2675
|
-
|
|
2675
|
+
default: z(({ active: g, selected: p }) => [
|
|
2676
|
+
A("li", {
|
|
2677
|
+
class: F([
|
|
2678
|
+
g ? "text-white bg-blue-500" : "text-grey-900 dark:text-grey-50",
|
|
2676
2679
|
"cursor-default select-none relative py-2 pl-3 pr-12",
|
|
2677
|
-
{ "opacity-50 bg-grey-100":
|
|
2680
|
+
{ "opacity-50 bg-grey-100": d.disabled }
|
|
2678
2681
|
])
|
|
2679
2682
|
}, [
|
|
2680
|
-
|
|
2681
|
-
|
|
2683
|
+
A("div", ur, [
|
|
2684
|
+
d.disabled && a.disabledBadge ? (C(), I("span", cr, X(a.disabledBadge), 1)) : M("", !0)
|
|
2682
2685
|
]),
|
|
2683
|
-
|
|
2684
|
-
class:
|
|
2685
|
-
|
|
2686
|
+
A("span", {
|
|
2687
|
+
class: F([
|
|
2688
|
+
p ? "font-semibold" : "font-normal",
|
|
2686
2689
|
"block truncate"
|
|
2687
2690
|
])
|
|
2688
2691
|
}, [
|
|
2689
|
-
|
|
2692
|
+
d.icon ? (C(), U(q, {
|
|
2690
2693
|
key: 0,
|
|
2691
2694
|
class: "inline-block mr-1",
|
|
2692
|
-
name:
|
|
2695
|
+
name: d.icon
|
|
2693
2696
|
}, null, 8, ["name"])) : M("", !0),
|
|
2694
|
-
|
|
2695
|
-
innerHTML:
|
|
2696
|
-
}, null, 8,
|
|
2697
|
+
A("span", {
|
|
2698
|
+
innerHTML: d.label
|
|
2699
|
+
}, null, 8, dr)
|
|
2697
2700
|
], 2),
|
|
2698
|
-
|
|
2701
|
+
p ? (C(), I("span", {
|
|
2699
2702
|
key: 0,
|
|
2700
|
-
class:
|
|
2701
|
-
|
|
2703
|
+
class: F([
|
|
2704
|
+
g ? "text-blue-100" : "text-blue-500",
|
|
2702
2705
|
"absolute inset-y-0 right-0 flex items-center pr-4"
|
|
2703
2706
|
])
|
|
2704
2707
|
}, [
|
|
2705
|
-
|
|
2708
|
+
j(q, {
|
|
2706
2709
|
name: "check",
|
|
2707
2710
|
class: "h-5 w-5",
|
|
2708
2711
|
"aria-hidden": "true"
|
|
@@ -2721,21 +2724,21 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2721
2724
|
])
|
|
2722
2725
|
]),
|
|
2723
2726
|
_: 1
|
|
2724
|
-
}, 8, ["
|
|
2727
|
+
}, 8, ["model-value", "disabled"]));
|
|
2725
2728
|
}
|
|
2726
|
-
}),
|
|
2729
|
+
}), fr = { class: "animate-pulse" }, pr = { class: "flex items-center justify-between space-x-4" }, mr = {
|
|
2727
2730
|
key: 0,
|
|
2728
2731
|
class: "w-12 h-12 bg-current rounded-full shrink-0"
|
|
2729
|
-
},
|
|
2732
|
+
}, vr = {
|
|
2730
2733
|
key: 1,
|
|
2731
2734
|
class: "w-full h-8 bg-current rounded-lg"
|
|
2732
|
-
},
|
|
2735
|
+
}, gr = {
|
|
2733
2736
|
key: 0,
|
|
2734
2737
|
class: "mt-6 space-y-2"
|
|
2735
|
-
},
|
|
2738
|
+
}, br = {
|
|
2736
2739
|
key: 1,
|
|
2737
2740
|
class: "w-1/3 h-10 mt-6 bg-current rounded-lg"
|
|
2738
|
-
},
|
|
2741
|
+
}, Tr = /* @__PURE__ */ T({
|
|
2739
2742
|
__name: "Skeleton",
|
|
2740
2743
|
props: {
|
|
2741
2744
|
avatar: { type: Boolean, default: !1 },
|
|
@@ -2744,164 +2747,70 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2744
2747
|
footer: { type: Boolean, default: !1 }
|
|
2745
2748
|
},
|
|
2746
2749
|
setup(e) {
|
|
2747
|
-
const t = e,
|
|
2748
|
-
const
|
|
2750
|
+
const t = e, o = new Array(t.lines).fill(void 0).map(() => {
|
|
2751
|
+
const l = [4, 5, 6, 8, 10, 16, 24, 32];
|
|
2749
2752
|
return {
|
|
2750
|
-
margin: `mr-${
|
|
2753
|
+
margin: `mr-${l[Math.floor(Math.random() * l.length)]}`
|
|
2751
2754
|
};
|
|
2752
2755
|
});
|
|
2753
|
-
return (
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2756
|
+
return (l, n) => (C(), I("div", fr, [
|
|
2757
|
+
A("div", pr, [
|
|
2758
|
+
l.avatar ? (C(), I("div", mr)) : M("", !0),
|
|
2759
|
+
l.title ? (C(), I("div", vr)) : M("", !0)
|
|
2757
2760
|
]),
|
|
2758
|
-
|
|
2759
|
-
(
|
|
2760
|
-
class:
|
|
2761
|
+
l.lines > 0 ? (C(), I("div", gr, [
|
|
2762
|
+
(C(!0), I(be, null, jt(_(o), (r, i) => (C(), I("div", {
|
|
2763
|
+
class: F(["h-4 bg-current rounded-lg", r.margin]),
|
|
2761
2764
|
key: i
|
|
2762
2765
|
}, null, 2))), 128))
|
|
2763
2766
|
])) : M("", !0),
|
|
2764
|
-
|
|
2767
|
+
l.footer ? (C(), I("div", br)) : M("", !0)
|
|
2765
2768
|
]));
|
|
2766
2769
|
}
|
|
2767
|
-
}),
|
|
2770
|
+
}), Ir = /* @__PURE__ */ T({
|
|
2768
2771
|
__name: "Spinner",
|
|
2769
2772
|
setup(e) {
|
|
2770
|
-
return (t,
|
|
2773
|
+
return (t, o) => (C(), U(_(q), {
|
|
2771
2774
|
class: "animate-spin",
|
|
2772
2775
|
name: "circle-notch"
|
|
2773
2776
|
}));
|
|
2774
2777
|
}
|
|
2775
|
-
}),
|
|
2776
|
-
key: 0,
|
|
2777
|
-
class: "absolute inset-0 flex items-center justify-center"
|
|
2778
|
-
}, Mr = /* @__PURE__ */ A({
|
|
2779
|
-
__name: "SplitButton",
|
|
2780
|
-
props: {
|
|
2781
|
-
label: {},
|
|
2782
|
-
size: { default: "medium" },
|
|
2783
|
-
color: { default: "primary" },
|
|
2784
|
-
isLoading: { type: Boolean, default: !1 },
|
|
2785
|
-
isDisabled: { type: Boolean, default: !1 },
|
|
2786
|
-
icon: { default: "plus" }
|
|
2787
|
-
},
|
|
2788
|
-
emits: ["onClick", "onClickSplit"],
|
|
2789
|
-
setup(e, { emit: t }) {
|
|
2790
|
-
const l = t, o = e, n = k(() => {
|
|
2791
|
-
const a = {
|
|
2792
|
-
"text-white bg-blue-600 border-transparent hover:bg-blue-700 active:bg-blue-700 dark:ring-blue-800 ring-offset-2 dark:ring-offset-grey-900": o.color === "primary",
|
|
2793
|
-
"text-blue-600 bg-grey-100 border-transparent hover:bg-blue-100 hover:text-blue-700 active:bg-grey-100 ring-blue-300 ring-offset-2 dark:ring-offset-grey-900": o.color === "light",
|
|
2794
|
-
"text-grey-50 bg-grey-700 border-transparent hover:bg-grey-800 active:bg-grey-700 ring-grey-500 dark:ring-grey-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-grey-900": o.color === "dark",
|
|
2795
|
-
"text-red-50 bg-red-500 border-transparent hover:bg-red-600 active:bg-red-600 ring-red-400 dark:ring-red-400 dark:ring-opacity-50 ring-offset-2 dark:ring-offset-red-900": o.color === "danger"
|
|
2796
|
-
}, s = {
|
|
2797
|
-
"px-4 py-1 text-xs leading-5 mono-100": o.size === "small",
|
|
2798
|
-
"px-5 py-2 text-sm leading-4 font-medium": o.size === "medium",
|
|
2799
|
-
"px-8 pr-4 py-3 text-base leading-6 font-medium": o.size === "large"
|
|
2800
|
-
}, f = {
|
|
2801
|
-
"pointer-events-none opacity-75 cursor-not-allowed": o.isDisabled
|
|
2802
|
-
};
|
|
2803
|
-
return {
|
|
2804
|
-
...a,
|
|
2805
|
-
...f,
|
|
2806
|
-
...s
|
|
2807
|
-
};
|
|
2808
|
-
}), r = k(() => {
|
|
2809
|
-
const a = {
|
|
2810
|
-
"border-l-white/50 border-l": o.color === "primary",
|
|
2811
|
-
"border-l-blue-100 border-l": o.color === "light",
|
|
2812
|
-
"border-l-grey-600 border-l": o.color === "dark",
|
|
2813
|
-
"border-l-red-600 border-l": o.color === "danger"
|
|
2814
|
-
}, s = {
|
|
2815
|
-
"pl-2 pr-3": o.size === "small",
|
|
2816
|
-
"pl-3 pr-3": o.size === "medium",
|
|
2817
|
-
"pl-4 pr-5": o.size === "large"
|
|
2818
|
-
};
|
|
2819
|
-
return {
|
|
2820
|
-
...a,
|
|
2821
|
-
...s
|
|
2822
|
-
};
|
|
2823
|
-
}), i = k(() => ({
|
|
2824
|
-
...{
|
|
2825
|
-
"text-white": o.color === "primary",
|
|
2826
|
-
"text-blue-600": o.color === "light",
|
|
2827
|
-
"text-grey-50": o.color === "dark"
|
|
2828
|
-
}
|
|
2829
|
-
}));
|
|
2830
|
-
function u() {
|
|
2831
|
-
o.isDisabled || l("onClick");
|
|
2832
|
-
}
|
|
2833
|
-
function c() {
|
|
2834
|
-
o.isDisabled || l("onClickSplit");
|
|
2835
|
-
}
|
|
2836
|
-
return (a, s) => (R(), T("div", br, [
|
|
2837
|
-
L("button", {
|
|
2838
|
-
type: "button",
|
|
2839
|
-
"aria-label": a.label,
|
|
2840
|
-
tabindex: a.isDisabled ? "-1" : void 0,
|
|
2841
|
-
class: $(["relative transition duration-150 ease-in-out rounded-l-lg", n.value]),
|
|
2842
|
-
onClick: u
|
|
2843
|
-
}, [
|
|
2844
|
-
L("div", {
|
|
2845
|
-
class: $(!a.isLoading || "invisible")
|
|
2846
|
-
}, [
|
|
2847
|
-
L("span", null, G(a.label), 1)
|
|
2848
|
-
], 2),
|
|
2849
|
-
a.isLoading ? (R(), T("span", yr, [
|
|
2850
|
-
F(z, {
|
|
2851
|
-
class: "ml-3 animate-spin",
|
|
2852
|
-
name: "circle-notch"
|
|
2853
|
-
})
|
|
2854
|
-
])) : M("", !0)
|
|
2855
|
-
], 10, hr),
|
|
2856
|
-
L("button", {
|
|
2857
|
-
type: "button",
|
|
2858
|
-
class: $(["border-l-white/50 border-l transition duration-150 ease-in-out rounded-r-lg", [n.value, r.value]]),
|
|
2859
|
-
onClick: c
|
|
2860
|
-
}, [
|
|
2861
|
-
F(z, {
|
|
2862
|
-
class: $([i.value]),
|
|
2863
|
-
name: a.icon
|
|
2864
|
-
}, null, 8, ["class", "name"])
|
|
2865
|
-
], 2)
|
|
2866
|
-
]));
|
|
2867
|
-
}
|
|
2868
|
-
}), xr = { class: "sr-only" }, Vr = /* @__PURE__ */ A({
|
|
2778
|
+
}), hr = { class: "sr-only" }, Ar = /* @__PURE__ */ T({
|
|
2869
2779
|
__name: "Switch",
|
|
2870
2780
|
props: {
|
|
2871
|
-
id: { default: qt() },
|
|
2781
|
+
id: { default: () => qt() },
|
|
2872
2782
|
label: {},
|
|
2873
2783
|
modelValue: { type: Boolean },
|
|
2874
|
-
description: {},
|
|
2875
2784
|
onLabel: { default: "on" },
|
|
2876
2785
|
offLabel: { default: "off" }
|
|
2877
2786
|
},
|
|
2878
2787
|
emits: ["update:modelValue", "change"],
|
|
2879
2788
|
setup(e, { emit: t }) {
|
|
2880
|
-
const
|
|
2881
|
-
|
|
2789
|
+
const o = t, l = (n) => {
|
|
2790
|
+
o("update:modelValue", n), o("change", n);
|
|
2882
2791
|
};
|
|
2883
|
-
return (n, r) => (
|
|
2792
|
+
return (n, r) => (C(), U(_(yl), {
|
|
2793
|
+
id: n.id,
|
|
2884
2794
|
modelValue: n.modelValue,
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
"onUpdate:modelValue": o
|
|
2795
|
+
class: F([n.modelValue ? "bg-blue-700" : "bg-grey-700", "relative inline-flex items-center h-6 transition rounded-full w-14 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-grey-900 focus:ring-blue-300"]),
|
|
2796
|
+
"onUpdate:modelValue": l
|
|
2888
2797
|
}, {
|
|
2889
|
-
default:
|
|
2890
|
-
|
|
2891
|
-
class:
|
|
2892
|
-
},
|
|
2893
|
-
|
|
2894
|
-
|
|
2895
|
-
class:
|
|
2798
|
+
default: z(() => [
|
|
2799
|
+
A("span", {
|
|
2800
|
+
class: F(["absolute text-xs text-center text-white inset-x-2", n.modelValue ? "pr-3" : "pl-3"])
|
|
2801
|
+
}, X(n.modelValue === !0 ? n.onLabel : n.offLabel), 3),
|
|
2802
|
+
A("span", hr, X(n.label), 1),
|
|
2803
|
+
A("span", {
|
|
2804
|
+
class: F([n.modelValue ? "translate-x-9" : "translate-x-1", "inline-block w-4 h-4 transition bg-white rounded-full"])
|
|
2896
2805
|
}, null, 2)
|
|
2897
2806
|
]),
|
|
2898
2807
|
_: 1
|
|
2899
|
-
}, 8, ["
|
|
2808
|
+
}, 8, ["id", "modelValue", "class"]));
|
|
2900
2809
|
}
|
|
2901
|
-
}),
|
|
2810
|
+
}), yr = { class: "relative" }, wr = ["disabled", "value"], xr = {
|
|
2902
2811
|
inheritAttrs: !1
|
|
2903
|
-
},
|
|
2904
|
-
...
|
|
2812
|
+
}, $r = /* @__PURE__ */ T({
|
|
2813
|
+
...xr,
|
|
2905
2814
|
__name: "Textarea",
|
|
2906
2815
|
props: {
|
|
2907
2816
|
modelValue: {},
|
|
@@ -2910,44 +2819,43 @@ const Lr = /* @__PURE__ */ A({
|
|
|
2910
2819
|
block: { type: Boolean }
|
|
2911
2820
|
},
|
|
2912
2821
|
emits: ["update:modelValue"],
|
|
2913
|
-
setup(e, { expose: t, emit:
|
|
2914
|
-
const
|
|
2915
|
-
n("update:modelValue", (
|
|
2916
|
-
}, a =
|
|
2822
|
+
setup(e, { expose: t, emit: o }) {
|
|
2823
|
+
const l = e, n = o, { inputClasses: r, disabledClasses: i, textSizeClasses: u } = rt(l), c = function(d) {
|
|
2824
|
+
n("update:modelValue", (d == null ? void 0 : d.target).value);
|
|
2825
|
+
}, a = O(null);
|
|
2917
2826
|
return t({
|
|
2918
2827
|
focus: () => {
|
|
2919
|
-
|
|
2828
|
+
l.isDisabled || a.value.focus();
|
|
2920
2829
|
}
|
|
2921
|
-
}), (
|
|
2922
|
-
|
|
2830
|
+
}), (d, g) => (C(), I("div", yr, [
|
|
2831
|
+
A("textarea", Ne({
|
|
2923
2832
|
class: ["mono-50 bg-white text-grey-800 placeholder:text-grey-400 placeholder:font-normal border-grey-300 dark:bg-grey-800 dark:text-grey-100 dark:placeholder:text-grey-500 dark:border-grey-700 focus:border-blue-400 focus:ring-blue-400 dark:focus:border-blue-800 dark:focus:ring-blue-800 rounded", [_(r), _(u), _(i)]],
|
|
2924
|
-
|
|
2925
|
-
value:
|
|
2926
|
-
},
|
|
2833
|
+
disabled: d.isDisabled,
|
|
2834
|
+
value: d.modelValue ?? ""
|
|
2835
|
+
}, d.$attrs, {
|
|
2927
2836
|
ref_key: "input",
|
|
2928
2837
|
ref: a,
|
|
2929
2838
|
cols: "56",
|
|
2930
2839
|
rows: "8",
|
|
2931
2840
|
onInput: c
|
|
2932
2841
|
}), `
|
|
2933
|
-
`, 16,
|
|
2842
|
+
`, 16, wr)
|
|
2934
2843
|
]));
|
|
2935
2844
|
}
|
|
2936
2845
|
});
|
|
2937
2846
|
export {
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
Gn as icons
|
|
2847
|
+
Rr as D9Button,
|
|
2848
|
+
Er as D9Checkbox,
|
|
2849
|
+
q as D9Icon,
|
|
2850
|
+
Cr as D9Input,
|
|
2851
|
+
Dr as D9Label,
|
|
2852
|
+
Pr as D9Menu,
|
|
2853
|
+
_r as D9MenuLink,
|
|
2854
|
+
Lr as D9Select,
|
|
2855
|
+
Tr as D9Skeleton,
|
|
2856
|
+
Ir as D9Spinner,
|
|
2857
|
+
Ar as D9Switch,
|
|
2858
|
+
$r as D9Textarea,
|
|
2859
|
+
wt as brands,
|
|
2860
|
+
Kn as icons
|
|
2953
2861
|
};
|