yansu 0.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/README.md +1 -0
  2. package/bin.mjs +18 -0
  3. package/dist/cli.d.mts +2 -0
  4. package/dist/cli.mjs +68 -0
  5. package/dist/dirs.d.mts +4 -0
  6. package/dist/dirs.mjs +6 -0
  7. package/dist/index.d.mts +78 -0
  8. package/dist/index.mjs +121 -0
  9. package/dist/nitro.json +15 -0
  10. package/dist/public/_nuxt/BHIHUtPz.js +4 -0
  11. package/dist/public/_nuxt/CCgOhniq.js +1 -0
  12. package/dist/public/_nuxt/CR6vfq1R.js +1 -0
  13. package/dist/public/_nuxt/DmxzK6E8.js +1 -0
  14. package/dist/public/_nuxt/builds/latest.json +1 -0
  15. package/dist/public/_nuxt/builds/meta/e9079134-f314-434b-b3a7-092c4a1e187d.json +1 -0
  16. package/dist/public/_nuxt/entry.DJ3VOi_0.css +1 -0
  17. package/dist/public/_nuxt/error-404.lC6KBLNm.css +1 -0
  18. package/dist/public/_nuxt/error-500.NtBcR2wE.css +1 -0
  19. package/dist/server/chunks/_/error-500.mjs +9 -0
  20. package/dist/server/chunks/build/_plugin-vue_export-helper-DjsbPc54.mjs +29 -0
  21. package/dist/server/chunks/build/client.precomputed.mjs +3 -0
  22. package/dist/server/chunks/build/error-404-Du0ot2hm.mjs +369 -0
  23. package/dist/server/chunks/build/error-500-Y3RUV6n2.mjs +73 -0
  24. package/dist/server/chunks/build/server.mjs +727 -0
  25. package/dist/server/chunks/nitro/nitro.mjs +5176 -0
  26. package/dist/server/chunks/routes/api/metadata.json.mjs +147 -0
  27. package/dist/server/chunks/routes/api/platform.json.mjs +20 -0
  28. package/dist/server/chunks/routes/renderer.mjs +408 -0
  29. package/dist/server/chunks/virtual/_virtual_spa-template.mjs +3 -0
  30. package/dist/server/index.mjs +9 -0
  31. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/dist/shared.cjs.prod.js +604 -0
  32. package/dist/server/node_modules/.nitro/@vue/shared@3.5.25/package.json +47 -0
  33. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/dist/shared.cjs.prod.js +604 -0
  34. package/dist/server/node_modules/.nitro/@vue/shared@3.5.26/package.json +47 -0
  35. package/dist/server/node_modules/@babel/parser/lib/index.js +14662 -0
  36. package/dist/server/node_modules/@babel/parser/package.json +50 -0
  37. package/dist/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6763 -0
  38. package/dist/server/node_modules/@vue/compiler-core/package.json +58 -0
  39. package/dist/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +689 -0
  40. package/dist/server/node_modules/@vue/compiler-dom/package.json +57 -0
  41. package/dist/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1413 -0
  42. package/dist/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  43. package/dist/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1853 -0
  44. package/dist/server/node_modules/@vue/reactivity/package.json +55 -0
  45. package/dist/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6770 -0
  46. package/dist/server/node_modules/@vue/runtime-core/package.json +52 -0
  47. package/dist/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1732 -0
  48. package/dist/server/node_modules/@vue/runtime-dom/package.json +60 -0
  49. package/dist/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +879 -0
  50. package/dist/server/node_modules/@vue/server-renderer/package.json +55 -0
  51. package/dist/server/node_modules/ansis/index.cjs +1 -0
  52. package/dist/server/node_modules/ansis/index.mjs +1 -0
  53. package/dist/server/node_modules/ansis/package.json +25 -0
  54. package/dist/server/node_modules/birpc/dist/index.mjs +173 -0
  55. package/dist/server/node_modules/birpc/package.json +56 -0
  56. package/dist/server/node_modules/consola/dist/chunks/prompt.mjs +280 -0
  57. package/dist/server/node_modules/consola/dist/core.mjs +512 -0
  58. package/dist/server/node_modules/consola/dist/index.mjs +651 -0
  59. package/dist/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +72 -0
  60. package/dist/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +288 -0
  61. package/dist/server/node_modules/consola/package.json +136 -0
  62. package/dist/server/node_modules/devalue/index.js +4 -0
  63. package/dist/server/node_modules/devalue/package.json +37 -0
  64. package/dist/server/node_modules/devalue/src/base64.js +110 -0
  65. package/dist/server/node_modules/devalue/src/constants.js +6 -0
  66. package/dist/server/node_modules/devalue/src/parse.js +205 -0
  67. package/dist/server/node_modules/devalue/src/stringify.js +265 -0
  68. package/dist/server/node_modules/devalue/src/uneval.js +407 -0
  69. package/dist/server/node_modules/devalue/src/utils.js +118 -0
  70. package/dist/server/node_modules/entities/dist/commonjs/decode-codepoint.js +77 -0
  71. package/dist/server/node_modules/entities/dist/commonjs/decode.js +568 -0
  72. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +7 -0
  73. package/dist/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +7 -0
  74. package/dist/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +21 -0
  75. package/dist/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +31 -0
  76. package/dist/server/node_modules/entities/dist/commonjs/package.json +3 -0
  77. package/dist/server/node_modules/entities/package.json +113 -0
  78. package/dist/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  79. package/dist/server/node_modules/estree-walker/package.json +37 -0
  80. package/dist/server/node_modules/get-port-please/dist/index.mjs +430 -0
  81. package/dist/server/node_modules/get-port-please/package.json +39 -0
  82. package/dist/server/node_modules/hookable/dist/index.mjs +290 -0
  83. package/dist/server/node_modules/hookable/package.json +49 -0
  84. package/dist/server/node_modules/source-map-js/lib/array-set.js +121 -0
  85. package/dist/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  86. package/dist/server/node_modules/source-map-js/lib/base64.js +67 -0
  87. package/dist/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  88. package/dist/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  89. package/dist/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  90. package/dist/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  91. package/dist/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  92. package/dist/server/node_modules/source-map-js/lib/source-node.js +413 -0
  93. package/dist/server/node_modules/source-map-js/lib/util.js +594 -0
  94. package/dist/server/node_modules/source-map-js/package.json +71 -0
  95. package/dist/server/node_modules/source-map-js/source-map.js +8 -0
  96. package/dist/server/node_modules/structured-clone-es/dist/index.mjs +285 -0
  97. package/dist/server/node_modules/structured-clone-es/package.json +56 -0
  98. package/dist/server/node_modules/ufo/dist/index.mjs +638 -0
  99. package/dist/server/node_modules/ufo/package.json +47 -0
  100. package/dist/server/node_modules/unhead/dist/index.mjs +9 -0
  101. package/dist/server/node_modules/unhead/dist/parser.mjs +508 -0
  102. package/dist/server/node_modules/unhead/dist/plugins.mjs +101 -0
  103. package/dist/server/node_modules/unhead/dist/scripts.mjs +30 -0
  104. package/dist/server/node_modules/unhead/dist/server.mjs +182 -0
  105. package/dist/server/node_modules/unhead/dist/shared/unhead.B578PsDV.mjs +266 -0
  106. package/dist/server/node_modules/unhead/dist/shared/unhead.BPM0-cfG.mjs +44 -0
  107. package/dist/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  108. package/dist/server/node_modules/unhead/dist/shared/unhead.BpRRHAhY.mjs +194 -0
  109. package/dist/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  110. package/dist/server/node_modules/unhead/dist/shared/unhead.DH45uomy.mjs +180 -0
  111. package/dist/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  112. package/dist/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
  113. package/dist/server/node_modules/unhead/dist/shared/unhead.Djo8ep_Y.mjs +166 -0
  114. package/dist/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  115. package/dist/server/node_modules/unhead/dist/utils.mjs +5 -0
  116. package/dist/server/node_modules/unhead/package.json +105 -0
  117. package/dist/server/node_modules/vue/dist/vue.cjs.js +80 -0
  118. package/dist/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  119. package/dist/server/node_modules/vue/index.js +7 -0
  120. package/dist/server/node_modules/vue/index.mjs +1 -0
  121. package/dist/server/node_modules/vue/package.json +112 -0
  122. package/dist/server/node_modules/vue/server-renderer/index.mjs +1 -0
  123. package/dist/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +301 -0
  124. package/dist/server/node_modules/vue-bundle-renderer/package.json +55 -0
  125. package/dist/server/node_modules/ws/lib/buffer-util.js +131 -0
  126. package/dist/server/node_modules/ws/lib/constants.js +19 -0
  127. package/dist/server/node_modules/ws/lib/event-target.js +292 -0
  128. package/dist/server/node_modules/ws/lib/extension.js +203 -0
  129. package/dist/server/node_modules/ws/lib/limiter.js +55 -0
  130. package/dist/server/node_modules/ws/lib/permessage-deflate.js +528 -0
  131. package/dist/server/node_modules/ws/lib/receiver.js +706 -0
  132. package/dist/server/node_modules/ws/lib/sender.js +602 -0
  133. package/dist/server/node_modules/ws/lib/stream.js +161 -0
  134. package/dist/server/node_modules/ws/lib/subprotocol.js +62 -0
  135. package/dist/server/node_modules/ws/lib/validation.js +152 -0
  136. package/dist/server/node_modules/ws/lib/websocket-server.js +554 -0
  137. package/dist/server/node_modules/ws/lib/websocket.js +1393 -0
  138. package/dist/server/node_modules/ws/package.json +69 -0
  139. package/dist/server/node_modules/ws/wrapper.mjs +8 -0
  140. package/dist/server/package.json +32 -0
  141. package/dist/shared/yansu.DmdNF4qf.mjs +151 -0
  142. package/package.json +50 -0
@@ -0,0 +1,1732 @@
1
+ /**
2
+ * @vue/runtime-dom v3.5.26
3
+ * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
+ * @license MIT
5
+ **/
6
+ 'use strict';
7
+
8
+ Object.defineProperty(exports, '__esModule', { value: true });
9
+
10
+ var runtimeCore = require('@vue/runtime-core');
11
+ var shared = require('@vue/shared');
12
+
13
+ let policy = void 0;
14
+ const tt = typeof window !== "undefined" && window.trustedTypes;
15
+ if (tt) {
16
+ try {
17
+ policy = /* @__PURE__ */ tt.createPolicy("vue", {
18
+ createHTML: (val) => val
19
+ });
20
+ } catch (e) {
21
+ }
22
+ }
23
+ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) => val;
24
+ const svgNS = "http://www.w3.org/2000/svg";
25
+ const mathmlNS = "http://www.w3.org/1998/Math/MathML";
26
+ const doc = typeof document !== "undefined" ? document : null;
27
+ const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
28
+ const nodeOps = {
29
+ insert: (child, parent, anchor) => {
30
+ parent.insertBefore(child, anchor || null);
31
+ },
32
+ remove: (child) => {
33
+ const parent = child.parentNode;
34
+ if (parent) {
35
+ parent.removeChild(child);
36
+ }
37
+ },
38
+ createElement: (tag, namespace, is, props) => {
39
+ const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : is ? doc.createElement(tag, { is }) : doc.createElement(tag);
40
+ if (tag === "select" && props && props.multiple != null) {
41
+ el.setAttribute("multiple", props.multiple);
42
+ }
43
+ return el;
44
+ },
45
+ createText: (text) => doc.createTextNode(text),
46
+ createComment: (text) => doc.createComment(text),
47
+ setText: (node, text) => {
48
+ node.nodeValue = text;
49
+ },
50
+ setElementText: (el, text) => {
51
+ el.textContent = text;
52
+ },
53
+ parentNode: (node) => node.parentNode,
54
+ nextSibling: (node) => node.nextSibling,
55
+ querySelector: (selector) => doc.querySelector(selector),
56
+ setScopeId(el, id) {
57
+ el.setAttribute(id, "");
58
+ },
59
+ // __UNSAFE__
60
+ // Reason: innerHTML.
61
+ // Static content here can only come from compiled templates.
62
+ // As long as the user only uses trusted templates, this is safe.
63
+ insertStaticContent(content, parent, anchor, namespace, start, end) {
64
+ const before = anchor ? anchor.previousSibling : parent.lastChild;
65
+ if (start && (start === end || start.nextSibling)) {
66
+ while (true) {
67
+ parent.insertBefore(start.cloneNode(true), anchor);
68
+ if (start === end || !(start = start.nextSibling)) break;
69
+ }
70
+ } else {
71
+ templateContainer.innerHTML = unsafeToTrustedHTML(
72
+ namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content
73
+ );
74
+ const template = templateContainer.content;
75
+ if (namespace === "svg" || namespace === "mathml") {
76
+ const wrapper = template.firstChild;
77
+ while (wrapper.firstChild) {
78
+ template.appendChild(wrapper.firstChild);
79
+ }
80
+ template.removeChild(wrapper);
81
+ }
82
+ parent.insertBefore(template, anchor);
83
+ }
84
+ return [
85
+ // first
86
+ before ? before.nextSibling : parent.firstChild,
87
+ // last
88
+ anchor ? anchor.previousSibling : parent.lastChild
89
+ ];
90
+ }
91
+ };
92
+
93
+ const TRANSITION = "transition";
94
+ const ANIMATION = "animation";
95
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
96
+ const DOMTransitionPropsValidators = {
97
+ name: String,
98
+ type: String,
99
+ css: {
100
+ type: Boolean,
101
+ default: true
102
+ },
103
+ duration: [String, Number, Object],
104
+ enterFromClass: String,
105
+ enterActiveClass: String,
106
+ enterToClass: String,
107
+ appearFromClass: String,
108
+ appearActiveClass: String,
109
+ appearToClass: String,
110
+ leaveFromClass: String,
111
+ leaveActiveClass: String,
112
+ leaveToClass: String
113
+ };
114
+ const TransitionPropsValidators = /* @__PURE__ */ shared.extend(
115
+ {},
116
+ runtimeCore.BaseTransitionPropsValidators,
117
+ DOMTransitionPropsValidators
118
+ );
119
+ const decorate$1 = (t) => {
120
+ t.displayName = "Transition";
121
+ t.props = TransitionPropsValidators;
122
+ return t;
123
+ };
124
+ const Transition = /* @__PURE__ */ decorate$1(
125
+ (props, { slots }) => runtimeCore.h(runtimeCore.BaseTransition, resolveTransitionProps(props), slots)
126
+ );
127
+ const callHook = (hook, args = []) => {
128
+ if (shared.isArray(hook)) {
129
+ hook.forEach((h2) => h2(...args));
130
+ } else if (hook) {
131
+ hook(...args);
132
+ }
133
+ };
134
+ const hasExplicitCallback = (hook) => {
135
+ return hook ? shared.isArray(hook) ? hook.some((h2) => h2.length > 1) : hook.length > 1 : false;
136
+ };
137
+ function resolveTransitionProps(rawProps) {
138
+ const baseProps = {};
139
+ for (const key in rawProps) {
140
+ if (!(key in DOMTransitionPropsValidators)) {
141
+ baseProps[key] = rawProps[key];
142
+ }
143
+ }
144
+ if (rawProps.css === false) {
145
+ return baseProps;
146
+ }
147
+ const {
148
+ name = "v",
149
+ type,
150
+ duration,
151
+ enterFromClass = `${name}-enter-from`,
152
+ enterActiveClass = `${name}-enter-active`,
153
+ enterToClass = `${name}-enter-to`,
154
+ appearFromClass = enterFromClass,
155
+ appearActiveClass = enterActiveClass,
156
+ appearToClass = enterToClass,
157
+ leaveFromClass = `${name}-leave-from`,
158
+ leaveActiveClass = `${name}-leave-active`,
159
+ leaveToClass = `${name}-leave-to`
160
+ } = rawProps;
161
+ const durations = normalizeDuration(duration);
162
+ const enterDuration = durations && durations[0];
163
+ const leaveDuration = durations && durations[1];
164
+ const {
165
+ onBeforeEnter,
166
+ onEnter,
167
+ onEnterCancelled,
168
+ onLeave,
169
+ onLeaveCancelled,
170
+ onBeforeAppear = onBeforeEnter,
171
+ onAppear = onEnter,
172
+ onAppearCancelled = onEnterCancelled
173
+ } = baseProps;
174
+ const finishEnter = (el, isAppear, done, isCancelled) => {
175
+ el._enterCancelled = isCancelled;
176
+ removeTransitionClass(el, isAppear ? appearToClass : enterToClass);
177
+ removeTransitionClass(el, isAppear ? appearActiveClass : enterActiveClass);
178
+ done && done();
179
+ };
180
+ const finishLeave = (el, done) => {
181
+ el._isLeaving = false;
182
+ removeTransitionClass(el, leaveFromClass);
183
+ removeTransitionClass(el, leaveToClass);
184
+ removeTransitionClass(el, leaveActiveClass);
185
+ done && done();
186
+ };
187
+ const makeEnterHook = (isAppear) => {
188
+ return (el, done) => {
189
+ const hook = isAppear ? onAppear : onEnter;
190
+ const resolve = () => finishEnter(el, isAppear, done);
191
+ callHook(hook, [el, resolve]);
192
+ nextFrame(() => {
193
+ removeTransitionClass(el, isAppear ? appearFromClass : enterFromClass);
194
+ addTransitionClass(el, isAppear ? appearToClass : enterToClass);
195
+ if (!hasExplicitCallback(hook)) {
196
+ whenTransitionEnds(el, type, enterDuration, resolve);
197
+ }
198
+ });
199
+ };
200
+ };
201
+ return shared.extend(baseProps, {
202
+ onBeforeEnter(el) {
203
+ callHook(onBeforeEnter, [el]);
204
+ addTransitionClass(el, enterFromClass);
205
+ addTransitionClass(el, enterActiveClass);
206
+ },
207
+ onBeforeAppear(el) {
208
+ callHook(onBeforeAppear, [el]);
209
+ addTransitionClass(el, appearFromClass);
210
+ addTransitionClass(el, appearActiveClass);
211
+ },
212
+ onEnter: makeEnterHook(false),
213
+ onAppear: makeEnterHook(true),
214
+ onLeave(el, done) {
215
+ el._isLeaving = true;
216
+ const resolve = () => finishLeave(el, done);
217
+ addTransitionClass(el, leaveFromClass);
218
+ if (!el._enterCancelled) {
219
+ forceReflow(el);
220
+ addTransitionClass(el, leaveActiveClass);
221
+ } else {
222
+ addTransitionClass(el, leaveActiveClass);
223
+ forceReflow(el);
224
+ }
225
+ nextFrame(() => {
226
+ if (!el._isLeaving) {
227
+ return;
228
+ }
229
+ removeTransitionClass(el, leaveFromClass);
230
+ addTransitionClass(el, leaveToClass);
231
+ if (!hasExplicitCallback(onLeave)) {
232
+ whenTransitionEnds(el, type, leaveDuration, resolve);
233
+ }
234
+ });
235
+ callHook(onLeave, [el, resolve]);
236
+ },
237
+ onEnterCancelled(el) {
238
+ finishEnter(el, false, void 0, true);
239
+ callHook(onEnterCancelled, [el]);
240
+ },
241
+ onAppearCancelled(el) {
242
+ finishEnter(el, true, void 0, true);
243
+ callHook(onAppearCancelled, [el]);
244
+ },
245
+ onLeaveCancelled(el) {
246
+ finishLeave(el);
247
+ callHook(onLeaveCancelled, [el]);
248
+ }
249
+ });
250
+ }
251
+ function normalizeDuration(duration) {
252
+ if (duration == null) {
253
+ return null;
254
+ } else if (shared.isObject(duration)) {
255
+ return [NumberOf(duration.enter), NumberOf(duration.leave)];
256
+ } else {
257
+ const n = NumberOf(duration);
258
+ return [n, n];
259
+ }
260
+ }
261
+ function NumberOf(val) {
262
+ const res = shared.toNumber(val);
263
+ return res;
264
+ }
265
+ function addTransitionClass(el, cls) {
266
+ cls.split(/\s+/).forEach((c) => c && el.classList.add(c));
267
+ (el[vtcKey] || (el[vtcKey] = /* @__PURE__ */ new Set())).add(cls);
268
+ }
269
+ function removeTransitionClass(el, cls) {
270
+ cls.split(/\s+/).forEach((c) => c && el.classList.remove(c));
271
+ const _vtc = el[vtcKey];
272
+ if (_vtc) {
273
+ _vtc.delete(cls);
274
+ if (!_vtc.size) {
275
+ el[vtcKey] = void 0;
276
+ }
277
+ }
278
+ }
279
+ function nextFrame(cb) {
280
+ requestAnimationFrame(() => {
281
+ requestAnimationFrame(cb);
282
+ });
283
+ }
284
+ let endId = 0;
285
+ function whenTransitionEnds(el, expectedType, explicitTimeout, resolve) {
286
+ const id = el._endId = ++endId;
287
+ const resolveIfNotStale = () => {
288
+ if (id === el._endId) {
289
+ resolve();
290
+ }
291
+ };
292
+ if (explicitTimeout != null) {
293
+ return setTimeout(resolveIfNotStale, explicitTimeout);
294
+ }
295
+ const { type, timeout, propCount } = getTransitionInfo(el, expectedType);
296
+ if (!type) {
297
+ return resolve();
298
+ }
299
+ const endEvent = type + "end";
300
+ let ended = 0;
301
+ const end = () => {
302
+ el.removeEventListener(endEvent, onEnd);
303
+ resolveIfNotStale();
304
+ };
305
+ const onEnd = (e) => {
306
+ if (e.target === el && ++ended >= propCount) {
307
+ end();
308
+ }
309
+ };
310
+ setTimeout(() => {
311
+ if (ended < propCount) {
312
+ end();
313
+ }
314
+ }, timeout + 1);
315
+ el.addEventListener(endEvent, onEnd);
316
+ }
317
+ function getTransitionInfo(el, expectedType) {
318
+ const styles = window.getComputedStyle(el);
319
+ const getStyleProperties = (key) => (styles[key] || "").split(", ");
320
+ const transitionDelays = getStyleProperties(`${TRANSITION}Delay`);
321
+ const transitionDurations = getStyleProperties(`${TRANSITION}Duration`);
322
+ const transitionTimeout = getTimeout(transitionDelays, transitionDurations);
323
+ const animationDelays = getStyleProperties(`${ANIMATION}Delay`);
324
+ const animationDurations = getStyleProperties(`${ANIMATION}Duration`);
325
+ const animationTimeout = getTimeout(animationDelays, animationDurations);
326
+ let type = null;
327
+ let timeout = 0;
328
+ let propCount = 0;
329
+ if (expectedType === TRANSITION) {
330
+ if (transitionTimeout > 0) {
331
+ type = TRANSITION;
332
+ timeout = transitionTimeout;
333
+ propCount = transitionDurations.length;
334
+ }
335
+ } else if (expectedType === ANIMATION) {
336
+ if (animationTimeout > 0) {
337
+ type = ANIMATION;
338
+ timeout = animationTimeout;
339
+ propCount = animationDurations.length;
340
+ }
341
+ } else {
342
+ timeout = Math.max(transitionTimeout, animationTimeout);
343
+ type = timeout > 0 ? transitionTimeout > animationTimeout ? TRANSITION : ANIMATION : null;
344
+ propCount = type ? type === TRANSITION ? transitionDurations.length : animationDurations.length : 0;
345
+ }
346
+ const hasTransform = type === TRANSITION && /\b(?:transform|all)(?:,|$)/.test(
347
+ getStyleProperties(`${TRANSITION}Property`).toString()
348
+ );
349
+ return {
350
+ type,
351
+ timeout,
352
+ propCount,
353
+ hasTransform
354
+ };
355
+ }
356
+ function getTimeout(delays, durations) {
357
+ while (delays.length < durations.length) {
358
+ delays = delays.concat(delays);
359
+ }
360
+ return Math.max(...durations.map((d, i) => toMs(d) + toMs(delays[i])));
361
+ }
362
+ function toMs(s) {
363
+ if (s === "auto") return 0;
364
+ return Number(s.slice(0, -1).replace(",", ".")) * 1e3;
365
+ }
366
+ function forceReflow(el) {
367
+ const targetDocument = el ? el.ownerDocument : document;
368
+ return targetDocument.body.offsetHeight;
369
+ }
370
+
371
+ function patchClass(el, value, isSVG) {
372
+ const transitionClasses = el[vtcKey];
373
+ if (transitionClasses) {
374
+ value = (value ? [value, ...transitionClasses] : [...transitionClasses]).join(" ");
375
+ }
376
+ if (value == null) {
377
+ el.removeAttribute("class");
378
+ } else if (isSVG) {
379
+ el.setAttribute("class", value);
380
+ } else {
381
+ el.className = value;
382
+ }
383
+ }
384
+
385
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
386
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
387
+ const vShow = {
388
+ // used for prop mismatch check during hydration
389
+ name: "show",
390
+ beforeMount(el, { value }, { transition }) {
391
+ el[vShowOriginalDisplay] = el.style.display === "none" ? "" : el.style.display;
392
+ if (transition && value) {
393
+ transition.beforeEnter(el);
394
+ } else {
395
+ setDisplay(el, value);
396
+ }
397
+ },
398
+ mounted(el, { value }, { transition }) {
399
+ if (transition && value) {
400
+ transition.enter(el);
401
+ }
402
+ },
403
+ updated(el, { value, oldValue }, { transition }) {
404
+ if (!value === !oldValue) return;
405
+ if (transition) {
406
+ if (value) {
407
+ transition.beforeEnter(el);
408
+ setDisplay(el, true);
409
+ transition.enter(el);
410
+ } else {
411
+ transition.leave(el, () => {
412
+ setDisplay(el, false);
413
+ });
414
+ }
415
+ } else {
416
+ setDisplay(el, value);
417
+ }
418
+ },
419
+ beforeUnmount(el, { value }) {
420
+ setDisplay(el, value);
421
+ }
422
+ };
423
+ function setDisplay(el, value) {
424
+ el.style.display = value ? el[vShowOriginalDisplay] : "none";
425
+ el[vShowHidden] = !value;
426
+ }
427
+ function initVShowForSSR() {
428
+ vShow.getSSRProps = ({ value }) => {
429
+ if (!value) {
430
+ return { style: { display: "none" } };
431
+ }
432
+ };
433
+ }
434
+
435
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("");
436
+ function useCssVars(getter) {
437
+ return;
438
+ }
439
+
440
+ const displayRE = /(?:^|;)\s*display\s*:/;
441
+ function patchStyle(el, prev, next) {
442
+ const style = el.style;
443
+ const isCssString = shared.isString(next);
444
+ let hasControlledDisplay = false;
445
+ if (next && !isCssString) {
446
+ if (prev) {
447
+ if (!shared.isString(prev)) {
448
+ for (const key in prev) {
449
+ if (next[key] == null) {
450
+ setStyle(style, key, "");
451
+ }
452
+ }
453
+ } else {
454
+ for (const prevStyle of prev.split(";")) {
455
+ const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
456
+ if (next[key] == null) {
457
+ setStyle(style, key, "");
458
+ }
459
+ }
460
+ }
461
+ }
462
+ for (const key in next) {
463
+ if (key === "display") {
464
+ hasControlledDisplay = true;
465
+ }
466
+ setStyle(style, key, next[key]);
467
+ }
468
+ } else {
469
+ if (isCssString) {
470
+ if (prev !== next) {
471
+ const cssVarText = style[CSS_VAR_TEXT];
472
+ if (cssVarText) {
473
+ next += ";" + cssVarText;
474
+ }
475
+ style.cssText = next;
476
+ hasControlledDisplay = displayRE.test(next);
477
+ }
478
+ } else if (prev) {
479
+ el.removeAttribute("style");
480
+ }
481
+ }
482
+ if (vShowOriginalDisplay in el) {
483
+ el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
484
+ if (el[vShowHidden]) {
485
+ style.display = "none";
486
+ }
487
+ }
488
+ }
489
+ const importantRE = /\s*!important$/;
490
+ function setStyle(style, name, val) {
491
+ if (shared.isArray(val)) {
492
+ val.forEach((v) => setStyle(style, name, v));
493
+ } else {
494
+ if (val == null) val = "";
495
+ if (name.startsWith("--")) {
496
+ style.setProperty(name, val);
497
+ } else {
498
+ const prefixed = autoPrefix(style, name);
499
+ if (importantRE.test(val)) {
500
+ style.setProperty(
501
+ shared.hyphenate(prefixed),
502
+ val.replace(importantRE, ""),
503
+ "important"
504
+ );
505
+ } else {
506
+ style[prefixed] = val;
507
+ }
508
+ }
509
+ }
510
+ }
511
+ const prefixes = ["Webkit", "Moz", "ms"];
512
+ const prefixCache = {};
513
+ function autoPrefix(style, rawName) {
514
+ const cached = prefixCache[rawName];
515
+ if (cached) {
516
+ return cached;
517
+ }
518
+ let name = runtimeCore.camelize(rawName);
519
+ if (name !== "filter" && name in style) {
520
+ return prefixCache[rawName] = name;
521
+ }
522
+ name = shared.capitalize(name);
523
+ for (let i = 0; i < prefixes.length; i++) {
524
+ const prefixed = prefixes[i] + name;
525
+ if (prefixed in style) {
526
+ return prefixCache[rawName] = prefixed;
527
+ }
528
+ }
529
+ return rawName;
530
+ }
531
+
532
+ const xlinkNS = "http://www.w3.org/1999/xlink";
533
+ function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecialBooleanAttr(key)) {
534
+ if (isSVG && key.startsWith("xlink:")) {
535
+ if (value == null) {
536
+ el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
537
+ } else {
538
+ el.setAttributeNS(xlinkNS, key, value);
539
+ }
540
+ } else {
541
+ if (value == null || isBoolean && !shared.includeBooleanAttr(value)) {
542
+ el.removeAttribute(key);
543
+ } else {
544
+ el.setAttribute(
545
+ key,
546
+ isBoolean ? "" : shared.isSymbol(value) ? String(value) : value
547
+ );
548
+ }
549
+ }
550
+ }
551
+
552
+ function patchDOMProp(el, key, value, parentComponent, attrName) {
553
+ if (key === "innerHTML" || key === "textContent") {
554
+ if (value != null) {
555
+ el[key] = key === "innerHTML" ? unsafeToTrustedHTML(value) : value;
556
+ }
557
+ return;
558
+ }
559
+ const tag = el.tagName;
560
+ if (key === "value" && tag !== "PROGRESS" && // custom elements may use _value internally
561
+ !tag.includes("-")) {
562
+ const oldValue = tag === "OPTION" ? el.getAttribute("value") || "" : el.value;
563
+ const newValue = value == null ? (
564
+ // #11647: value should be set as empty string for null and undefined,
565
+ // but <input type="checkbox"> should be set as 'on'.
566
+ el.type === "checkbox" ? "on" : ""
567
+ ) : String(value);
568
+ if (oldValue !== newValue || !("_value" in el)) {
569
+ el.value = newValue;
570
+ }
571
+ if (value == null) {
572
+ el.removeAttribute(key);
573
+ }
574
+ el._value = value;
575
+ return;
576
+ }
577
+ let needRemove = false;
578
+ if (value === "" || value == null) {
579
+ const type = typeof el[key];
580
+ if (type === "boolean") {
581
+ value = shared.includeBooleanAttr(value);
582
+ } else if (value == null && type === "string") {
583
+ value = "";
584
+ needRemove = true;
585
+ } else if (type === "number") {
586
+ value = 0;
587
+ needRemove = true;
588
+ }
589
+ }
590
+ try {
591
+ el[key] = value;
592
+ } catch (e) {
593
+ }
594
+ needRemove && el.removeAttribute(attrName || key);
595
+ }
596
+
597
+ function addEventListener(el, event, handler, options) {
598
+ el.addEventListener(event, handler, options);
599
+ }
600
+ function removeEventListener(el, event, handler, options) {
601
+ el.removeEventListener(event, handler, options);
602
+ }
603
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
604
+ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
605
+ const invokers = el[veiKey] || (el[veiKey] = {});
606
+ const existingInvoker = invokers[rawName];
607
+ if (nextValue && existingInvoker) {
608
+ existingInvoker.value = nextValue;
609
+ } else {
610
+ const [name, options] = parseName(rawName);
611
+ if (nextValue) {
612
+ const invoker = invokers[rawName] = createInvoker(
613
+ nextValue,
614
+ instance
615
+ );
616
+ addEventListener(el, name, invoker, options);
617
+ } else if (existingInvoker) {
618
+ removeEventListener(el, name, existingInvoker, options);
619
+ invokers[rawName] = void 0;
620
+ }
621
+ }
622
+ }
623
+ const optionsModifierRE = /(?:Once|Passive|Capture)$/;
624
+ function parseName(name) {
625
+ let options;
626
+ if (optionsModifierRE.test(name)) {
627
+ options = {};
628
+ let m;
629
+ while (m = name.match(optionsModifierRE)) {
630
+ name = name.slice(0, name.length - m[0].length);
631
+ options[m[0].toLowerCase()] = true;
632
+ }
633
+ }
634
+ const event = name[2] === ":" ? name.slice(3) : shared.hyphenate(name.slice(2));
635
+ return [event, options];
636
+ }
637
+ let cachedNow = 0;
638
+ const p = /* @__PURE__ */ Promise.resolve();
639
+ const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
640
+ function createInvoker(initialValue, instance) {
641
+ const invoker = (e) => {
642
+ if (!e._vts) {
643
+ e._vts = Date.now();
644
+ } else if (e._vts <= invoker.attached) {
645
+ return;
646
+ }
647
+ runtimeCore.callWithAsyncErrorHandling(
648
+ patchStopImmediatePropagation(e, invoker.value),
649
+ instance,
650
+ 5,
651
+ [e]
652
+ );
653
+ };
654
+ invoker.value = initialValue;
655
+ invoker.attached = getNow();
656
+ return invoker;
657
+ }
658
+ function patchStopImmediatePropagation(e, value) {
659
+ if (shared.isArray(value)) {
660
+ const originalStop = e.stopImmediatePropagation;
661
+ e.stopImmediatePropagation = () => {
662
+ originalStop.call(e);
663
+ e._stopped = true;
664
+ };
665
+ return value.map(
666
+ (fn) => (e2) => !e2._stopped && fn && fn(e2)
667
+ );
668
+ } else {
669
+ return value;
670
+ }
671
+ }
672
+
673
+ const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
674
+ key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
675
+ const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
676
+ const isSVG = namespace === "svg";
677
+ if (key === "class") {
678
+ patchClass(el, nextValue, isSVG);
679
+ } else if (key === "style") {
680
+ patchStyle(el, prevValue, nextValue);
681
+ } else if (shared.isOn(key)) {
682
+ if (!shared.isModelListener(key)) {
683
+ patchEvent(el, key, prevValue, nextValue, parentComponent);
684
+ }
685
+ } else if (key[0] === "." ? (key = key.slice(1), true) : key[0] === "^" ? (key = key.slice(1), false) : shouldSetAsProp(el, key, nextValue, isSVG)) {
686
+ patchDOMProp(el, key, nextValue);
687
+ if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
688
+ patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
689
+ }
690
+ } else if (
691
+ // #11081 force set props for possible async custom element
692
+ el._isVueCE && (/[A-Z]/.test(key) || !shared.isString(nextValue))
693
+ ) {
694
+ patchDOMProp(el, shared.camelize(key), nextValue, parentComponent, key);
695
+ } else {
696
+ if (key === "true-value") {
697
+ el._trueValue = nextValue;
698
+ } else if (key === "false-value") {
699
+ el._falseValue = nextValue;
700
+ }
701
+ patchAttr(el, key, nextValue, isSVG);
702
+ }
703
+ };
704
+ function shouldSetAsProp(el, key, value, isSVG) {
705
+ if (isSVG) {
706
+ if (key === "innerHTML" || key === "textContent") {
707
+ return true;
708
+ }
709
+ if (key in el && isNativeOn(key) && shared.isFunction(value)) {
710
+ return true;
711
+ }
712
+ return false;
713
+ }
714
+ if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") {
715
+ return false;
716
+ }
717
+ if (key === "sandbox" && el.tagName === "IFRAME") {
718
+ return false;
719
+ }
720
+ if (key === "form") {
721
+ return false;
722
+ }
723
+ if (key === "list" && el.tagName === "INPUT") {
724
+ return false;
725
+ }
726
+ if (key === "type" && el.tagName === "TEXTAREA") {
727
+ return false;
728
+ }
729
+ if (key === "width" || key === "height") {
730
+ const tag = el.tagName;
731
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
732
+ return false;
733
+ }
734
+ }
735
+ if (isNativeOn(key) && shared.isString(value)) {
736
+ return false;
737
+ }
738
+ return key in el;
739
+ }
740
+
741
+ const REMOVAL = {};
742
+ // @__NO_SIDE_EFFECTS__
743
+ function defineCustomElement(options, extraOptions, _createApp) {
744
+ let Comp = runtimeCore.defineComponent(options, extraOptions);
745
+ if (shared.isPlainObject(Comp)) Comp = shared.extend({}, Comp, extraOptions);
746
+ class VueCustomElement extends VueElement {
747
+ constructor(initialProps) {
748
+ super(Comp, initialProps, _createApp);
749
+ }
750
+ }
751
+ VueCustomElement.def = Comp;
752
+ return VueCustomElement;
753
+ }
754
+ const defineSSRCustomElement = (/* @__NO_SIDE_EFFECTS__ */ (options, extraOptions) => {
755
+ return /* @__PURE__ */ defineCustomElement(options, extraOptions, createSSRApp);
756
+ });
757
+ const BaseClass = typeof HTMLElement !== "undefined" ? HTMLElement : class {
758
+ };
759
+ class VueElement extends BaseClass {
760
+ constructor(_def, _props = {}, _createApp = createApp) {
761
+ super();
762
+ this._def = _def;
763
+ this._props = _props;
764
+ this._createApp = _createApp;
765
+ this._isVueCE = true;
766
+ /**
767
+ * @internal
768
+ */
769
+ this._instance = null;
770
+ /**
771
+ * @internal
772
+ */
773
+ this._app = null;
774
+ /**
775
+ * @internal
776
+ */
777
+ this._nonce = this._def.nonce;
778
+ this._connected = false;
779
+ this._resolved = false;
780
+ this._patching = false;
781
+ this._dirty = false;
782
+ this._numberProps = null;
783
+ this._styleChildren = /* @__PURE__ */ new WeakSet();
784
+ this._ob = null;
785
+ if (this.shadowRoot && _createApp !== createApp) {
786
+ this._root = this.shadowRoot;
787
+ } else {
788
+ if (_def.shadowRoot !== false) {
789
+ this.attachShadow(
790
+ shared.extend({}, _def.shadowRootOptions, {
791
+ mode: "open"
792
+ })
793
+ );
794
+ this._root = this.shadowRoot;
795
+ } else {
796
+ this._root = this;
797
+ }
798
+ }
799
+ }
800
+ connectedCallback() {
801
+ if (!this.isConnected) return;
802
+ if (!this.shadowRoot && !this._resolved) {
803
+ this._parseSlots();
804
+ }
805
+ this._connected = true;
806
+ let parent = this;
807
+ while (parent = parent && (parent.parentNode || parent.host)) {
808
+ if (parent instanceof VueElement) {
809
+ this._parent = parent;
810
+ break;
811
+ }
812
+ }
813
+ if (!this._instance) {
814
+ if (this._resolved) {
815
+ this._mount(this._def);
816
+ } else {
817
+ if (parent && parent._pendingResolve) {
818
+ this._pendingResolve = parent._pendingResolve.then(() => {
819
+ this._pendingResolve = void 0;
820
+ this._resolveDef();
821
+ });
822
+ } else {
823
+ this._resolveDef();
824
+ }
825
+ }
826
+ }
827
+ }
828
+ _setParent(parent = this._parent) {
829
+ if (parent) {
830
+ this._instance.parent = parent._instance;
831
+ this._inheritParentContext(parent);
832
+ }
833
+ }
834
+ _inheritParentContext(parent = this._parent) {
835
+ if (parent && this._app) {
836
+ Object.setPrototypeOf(
837
+ this._app._context.provides,
838
+ parent._instance.provides
839
+ );
840
+ }
841
+ }
842
+ disconnectedCallback() {
843
+ this._connected = false;
844
+ runtimeCore.nextTick(() => {
845
+ if (!this._connected) {
846
+ if (this._ob) {
847
+ this._ob.disconnect();
848
+ this._ob = null;
849
+ }
850
+ this._app && this._app.unmount();
851
+ if (this._instance) this._instance.ce = void 0;
852
+ this._app = this._instance = null;
853
+ if (this._teleportTargets) {
854
+ this._teleportTargets.clear();
855
+ this._teleportTargets = void 0;
856
+ }
857
+ }
858
+ });
859
+ }
860
+ _processMutations(mutations) {
861
+ for (const m of mutations) {
862
+ this._setAttr(m.attributeName);
863
+ }
864
+ }
865
+ /**
866
+ * resolve inner component definition (handle possible async component)
867
+ */
868
+ _resolveDef() {
869
+ if (this._pendingResolve) {
870
+ return;
871
+ }
872
+ for (let i = 0; i < this.attributes.length; i++) {
873
+ this._setAttr(this.attributes[i].name);
874
+ }
875
+ this._ob = new MutationObserver(this._processMutations.bind(this));
876
+ this._ob.observe(this, { attributes: true });
877
+ const resolve = (def, isAsync = false) => {
878
+ this._resolved = true;
879
+ this._pendingResolve = void 0;
880
+ const { props, styles } = def;
881
+ let numberProps;
882
+ if (props && !shared.isArray(props)) {
883
+ for (const key in props) {
884
+ const opt = props[key];
885
+ if (opt === Number || opt && opt.type === Number) {
886
+ if (key in this._props) {
887
+ this._props[key] = shared.toNumber(this._props[key]);
888
+ }
889
+ (numberProps || (numberProps = /* @__PURE__ */ Object.create(null)))[shared.camelize(key)] = true;
890
+ }
891
+ }
892
+ }
893
+ this._numberProps = numberProps;
894
+ this._resolveProps(def);
895
+ if (this.shadowRoot) {
896
+ this._applyStyles(styles);
897
+ }
898
+ this._mount(def);
899
+ };
900
+ const asyncDef = this._def.__asyncLoader;
901
+ if (asyncDef) {
902
+ this._pendingResolve = asyncDef().then((def) => {
903
+ def.configureApp = this._def.configureApp;
904
+ resolve(this._def = def, true);
905
+ });
906
+ } else {
907
+ resolve(this._def);
908
+ }
909
+ }
910
+ _mount(def) {
911
+ this._app = this._createApp(def);
912
+ this._inheritParentContext();
913
+ if (def.configureApp) {
914
+ def.configureApp(this._app);
915
+ }
916
+ this._app._ceVNode = this._createVNode();
917
+ this._app.mount(this._root);
918
+ const exposed = this._instance && this._instance.exposed;
919
+ if (!exposed) return;
920
+ for (const key in exposed) {
921
+ if (!shared.hasOwn(this, key)) {
922
+ Object.defineProperty(this, key, {
923
+ // unwrap ref to be consistent with public instance behavior
924
+ get: () => runtimeCore.unref(exposed[key])
925
+ });
926
+ }
927
+ }
928
+ }
929
+ _resolveProps(def) {
930
+ const { props } = def;
931
+ const declaredPropKeys = shared.isArray(props) ? props : Object.keys(props || {});
932
+ for (const key of Object.keys(this)) {
933
+ if (key[0] !== "_" && declaredPropKeys.includes(key)) {
934
+ this._setProp(key, this[key]);
935
+ }
936
+ }
937
+ for (const key of declaredPropKeys.map(shared.camelize)) {
938
+ Object.defineProperty(this, key, {
939
+ get() {
940
+ return this._getProp(key);
941
+ },
942
+ set(val) {
943
+ this._setProp(key, val, true, !this._patching);
944
+ }
945
+ });
946
+ }
947
+ }
948
+ _setAttr(key) {
949
+ if (key.startsWith("data-v-")) return;
950
+ const has = this.hasAttribute(key);
951
+ let value = has ? this.getAttribute(key) : REMOVAL;
952
+ const camelKey = shared.camelize(key);
953
+ if (has && this._numberProps && this._numberProps[camelKey]) {
954
+ value = shared.toNumber(value);
955
+ }
956
+ this._setProp(camelKey, value, false, true);
957
+ }
958
+ /**
959
+ * @internal
960
+ */
961
+ _getProp(key) {
962
+ return this._props[key];
963
+ }
964
+ /**
965
+ * @internal
966
+ */
967
+ _setProp(key, val, shouldReflect = true, shouldUpdate = false) {
968
+ if (val !== this._props[key]) {
969
+ this._dirty = true;
970
+ if (val === REMOVAL) {
971
+ delete this._props[key];
972
+ } else {
973
+ this._props[key] = val;
974
+ if (key === "key" && this._app) {
975
+ this._app._ceVNode.key = val;
976
+ }
977
+ }
978
+ if (shouldUpdate && this._instance) {
979
+ this._update();
980
+ }
981
+ if (shouldReflect) {
982
+ const ob = this._ob;
983
+ if (ob) {
984
+ this._processMutations(ob.takeRecords());
985
+ ob.disconnect();
986
+ }
987
+ if (val === true) {
988
+ this.setAttribute(shared.hyphenate(key), "");
989
+ } else if (typeof val === "string" || typeof val === "number") {
990
+ this.setAttribute(shared.hyphenate(key), val + "");
991
+ } else if (!val) {
992
+ this.removeAttribute(shared.hyphenate(key));
993
+ }
994
+ ob && ob.observe(this, { attributes: true });
995
+ }
996
+ }
997
+ }
998
+ _update() {
999
+ const vnode = this._createVNode();
1000
+ if (this._app) vnode.appContext = this._app._context;
1001
+ render(vnode, this._root);
1002
+ }
1003
+ _createVNode() {
1004
+ const baseProps = {};
1005
+ if (!this.shadowRoot) {
1006
+ baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
1007
+ }
1008
+ const vnode = runtimeCore.createVNode(this._def, shared.extend(baseProps, this._props));
1009
+ if (!this._instance) {
1010
+ vnode.ce = (instance) => {
1011
+ this._instance = instance;
1012
+ instance.ce = this;
1013
+ instance.isCE = true;
1014
+ const dispatch = (event, args) => {
1015
+ this.dispatchEvent(
1016
+ new CustomEvent(
1017
+ event,
1018
+ shared.isPlainObject(args[0]) ? shared.extend({ detail: args }, args[0]) : { detail: args }
1019
+ )
1020
+ );
1021
+ };
1022
+ instance.emit = (event, ...args) => {
1023
+ dispatch(event, args);
1024
+ if (shared.hyphenate(event) !== event) {
1025
+ dispatch(shared.hyphenate(event), args);
1026
+ }
1027
+ };
1028
+ this._setParent();
1029
+ };
1030
+ }
1031
+ return vnode;
1032
+ }
1033
+ _applyStyles(styles, owner) {
1034
+ if (!styles) return;
1035
+ if (owner) {
1036
+ if (owner === this._def || this._styleChildren.has(owner)) {
1037
+ return;
1038
+ }
1039
+ this._styleChildren.add(owner);
1040
+ }
1041
+ const nonce = this._nonce;
1042
+ for (let i = styles.length - 1; i >= 0; i--) {
1043
+ const s = document.createElement("style");
1044
+ if (nonce) s.setAttribute("nonce", nonce);
1045
+ s.textContent = styles[i];
1046
+ this.shadowRoot.prepend(s);
1047
+ }
1048
+ }
1049
+ /**
1050
+ * Only called when shadowRoot is false
1051
+ */
1052
+ _parseSlots() {
1053
+ const slots = this._slots = {};
1054
+ let n;
1055
+ while (n = this.firstChild) {
1056
+ const slotName = n.nodeType === 1 && n.getAttribute("slot") || "default";
1057
+ (slots[slotName] || (slots[slotName] = [])).push(n);
1058
+ this.removeChild(n);
1059
+ }
1060
+ }
1061
+ /**
1062
+ * Only called when shadowRoot is false
1063
+ */
1064
+ _renderSlots() {
1065
+ const outlets = this._getSlots();
1066
+ const scopeId = this._instance.type.__scopeId;
1067
+ for (let i = 0; i < outlets.length; i++) {
1068
+ const o = outlets[i];
1069
+ const slotName = o.getAttribute("name") || "default";
1070
+ const content = this._slots[slotName];
1071
+ const parent = o.parentNode;
1072
+ if (content) {
1073
+ for (const n of content) {
1074
+ if (scopeId && n.nodeType === 1) {
1075
+ const id = scopeId + "-s";
1076
+ const walker = document.createTreeWalker(n, 1);
1077
+ n.setAttribute(id, "");
1078
+ let child;
1079
+ while (child = walker.nextNode()) {
1080
+ child.setAttribute(id, "");
1081
+ }
1082
+ }
1083
+ parent.insertBefore(n, o);
1084
+ }
1085
+ } else {
1086
+ while (o.firstChild) parent.insertBefore(o.firstChild, o);
1087
+ }
1088
+ parent.removeChild(o);
1089
+ }
1090
+ }
1091
+ /**
1092
+ * @internal
1093
+ */
1094
+ _getSlots() {
1095
+ const roots = [this];
1096
+ if (this._teleportTargets) {
1097
+ roots.push(...this._teleportTargets);
1098
+ }
1099
+ const slots = /* @__PURE__ */ new Set();
1100
+ for (const root of roots) {
1101
+ const found = root.querySelectorAll("slot");
1102
+ for (let i = 0; i < found.length; i++) {
1103
+ slots.add(found[i]);
1104
+ }
1105
+ }
1106
+ return Array.from(slots);
1107
+ }
1108
+ /**
1109
+ * @internal
1110
+ */
1111
+ _injectChildStyle(comp) {
1112
+ this._applyStyles(comp.styles, comp);
1113
+ }
1114
+ /**
1115
+ * @internal
1116
+ */
1117
+ _beginPatch() {
1118
+ this._patching = true;
1119
+ this._dirty = false;
1120
+ }
1121
+ /**
1122
+ * @internal
1123
+ */
1124
+ _endPatch() {
1125
+ this._patching = false;
1126
+ if (this._dirty && this._instance) {
1127
+ this._update();
1128
+ }
1129
+ }
1130
+ /**
1131
+ * @internal
1132
+ */
1133
+ _removeChildStyle(comp) {
1134
+ }
1135
+ }
1136
+ function useHost(caller) {
1137
+ const instance = runtimeCore.getCurrentInstance();
1138
+ const el = instance && instance.ce;
1139
+ if (el) {
1140
+ return el;
1141
+ }
1142
+ return null;
1143
+ }
1144
+ function useShadowRoot() {
1145
+ const el = useHost();
1146
+ return el && el.shadowRoot;
1147
+ }
1148
+
1149
+ function useCssModule(name = "$style") {
1150
+ {
1151
+ const instance = runtimeCore.getCurrentInstance();
1152
+ if (!instance) {
1153
+ return shared.EMPTY_OBJ;
1154
+ }
1155
+ const modules = instance.type.__cssModules;
1156
+ if (!modules) {
1157
+ return shared.EMPTY_OBJ;
1158
+ }
1159
+ const mod = modules[name];
1160
+ if (!mod) {
1161
+ return shared.EMPTY_OBJ;
1162
+ }
1163
+ return mod;
1164
+ }
1165
+ }
1166
+
1167
+ const positionMap = /* @__PURE__ */ new WeakMap();
1168
+ const newPositionMap = /* @__PURE__ */ new WeakMap();
1169
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
1170
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
1171
+ const decorate = (t) => {
1172
+ delete t.props.mode;
1173
+ return t;
1174
+ };
1175
+ const TransitionGroupImpl = /* @__PURE__ */ decorate({
1176
+ name: "TransitionGroup",
1177
+ props: /* @__PURE__ */ shared.extend({}, TransitionPropsValidators, {
1178
+ tag: String,
1179
+ moveClass: String
1180
+ }),
1181
+ setup(props, { slots }) {
1182
+ const instance = runtimeCore.getCurrentInstance();
1183
+ const state = runtimeCore.useTransitionState();
1184
+ let prevChildren;
1185
+ let children;
1186
+ runtimeCore.onUpdated(() => {
1187
+ if (!prevChildren.length) {
1188
+ return;
1189
+ }
1190
+ const moveClass = props.moveClass || `${props.name || "v"}-move`;
1191
+ if (!hasCSSTransform(
1192
+ prevChildren[0].el,
1193
+ instance.vnode.el,
1194
+ moveClass
1195
+ )) {
1196
+ prevChildren = [];
1197
+ return;
1198
+ }
1199
+ prevChildren.forEach(callPendingCbs);
1200
+ prevChildren.forEach(recordPosition);
1201
+ const movedChildren = prevChildren.filter(applyTranslation);
1202
+ forceReflow(instance.vnode.el);
1203
+ movedChildren.forEach((c) => {
1204
+ const el = c.el;
1205
+ const style = el.style;
1206
+ addTransitionClass(el, moveClass);
1207
+ style.transform = style.webkitTransform = style.transitionDuration = "";
1208
+ const cb = el[moveCbKey] = (e) => {
1209
+ if (e && e.target !== el) {
1210
+ return;
1211
+ }
1212
+ if (!e || e.propertyName.endsWith("transform")) {
1213
+ el.removeEventListener("transitionend", cb);
1214
+ el[moveCbKey] = null;
1215
+ removeTransitionClass(el, moveClass);
1216
+ }
1217
+ };
1218
+ el.addEventListener("transitionend", cb);
1219
+ });
1220
+ prevChildren = [];
1221
+ });
1222
+ return () => {
1223
+ const rawProps = runtimeCore.toRaw(props);
1224
+ const cssTransitionProps = resolveTransitionProps(rawProps);
1225
+ let tag = rawProps.tag || runtimeCore.Fragment;
1226
+ prevChildren = [];
1227
+ if (children) {
1228
+ for (let i = 0; i < children.length; i++) {
1229
+ const child = children[i];
1230
+ if (child.el && child.el instanceof Element) {
1231
+ prevChildren.push(child);
1232
+ runtimeCore.setTransitionHooks(
1233
+ child,
1234
+ runtimeCore.resolveTransitionHooks(
1235
+ child,
1236
+ cssTransitionProps,
1237
+ state,
1238
+ instance
1239
+ )
1240
+ );
1241
+ positionMap.set(child, {
1242
+ left: child.el.offsetLeft,
1243
+ top: child.el.offsetTop
1244
+ });
1245
+ }
1246
+ }
1247
+ }
1248
+ children = slots.default ? runtimeCore.getTransitionRawChildren(slots.default()) : [];
1249
+ for (let i = 0; i < children.length; i++) {
1250
+ const child = children[i];
1251
+ if (child.key != null) {
1252
+ runtimeCore.setTransitionHooks(
1253
+ child,
1254
+ runtimeCore.resolveTransitionHooks(child, cssTransitionProps, state, instance)
1255
+ );
1256
+ }
1257
+ }
1258
+ return runtimeCore.createVNode(tag, null, children);
1259
+ };
1260
+ }
1261
+ });
1262
+ const TransitionGroup = TransitionGroupImpl;
1263
+ function callPendingCbs(c) {
1264
+ const el = c.el;
1265
+ if (el[moveCbKey]) {
1266
+ el[moveCbKey]();
1267
+ }
1268
+ if (el[enterCbKey]) {
1269
+ el[enterCbKey]();
1270
+ }
1271
+ }
1272
+ function recordPosition(c) {
1273
+ newPositionMap.set(c, {
1274
+ left: c.el.offsetLeft,
1275
+ top: c.el.offsetTop
1276
+ });
1277
+ }
1278
+ function applyTranslation(c) {
1279
+ const oldPos = positionMap.get(c);
1280
+ const newPos = newPositionMap.get(c);
1281
+ const dx = oldPos.left - newPos.left;
1282
+ const dy = oldPos.top - newPos.top;
1283
+ if (dx || dy) {
1284
+ const s = c.el.style;
1285
+ s.transform = s.webkitTransform = `translate(${dx}px,${dy}px)`;
1286
+ s.transitionDuration = "0s";
1287
+ return c;
1288
+ }
1289
+ }
1290
+ function hasCSSTransform(el, root, moveClass) {
1291
+ const clone = el.cloneNode();
1292
+ const _vtc = el[vtcKey];
1293
+ if (_vtc) {
1294
+ _vtc.forEach((cls) => {
1295
+ cls.split(/\s+/).forEach((c) => c && clone.classList.remove(c));
1296
+ });
1297
+ }
1298
+ moveClass.split(/\s+/).forEach((c) => c && clone.classList.add(c));
1299
+ clone.style.display = "none";
1300
+ const container = root.nodeType === 1 ? root : root.parentNode;
1301
+ container.appendChild(clone);
1302
+ const { hasTransform } = getTransitionInfo(clone);
1303
+ container.removeChild(clone);
1304
+ return hasTransform;
1305
+ }
1306
+
1307
+ const getModelAssigner = (vnode) => {
1308
+ const fn = vnode.props["onUpdate:modelValue"] || false;
1309
+ return shared.isArray(fn) ? (value) => shared.invokeArrayFns(fn, value) : fn;
1310
+ };
1311
+ function onCompositionStart(e) {
1312
+ e.target.composing = true;
1313
+ }
1314
+ function onCompositionEnd(e) {
1315
+ const target = e.target;
1316
+ if (target.composing) {
1317
+ target.composing = false;
1318
+ target.dispatchEvent(new Event("input"));
1319
+ }
1320
+ }
1321
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
1322
+ function castValue(value, trim, number) {
1323
+ if (trim) value = value.trim();
1324
+ if (number) value = shared.looseToNumber(value);
1325
+ return value;
1326
+ }
1327
+ const vModelText = {
1328
+ created(el, { modifiers: { lazy, trim, number } }, vnode) {
1329
+ el[assignKey] = getModelAssigner(vnode);
1330
+ const castToNumber = number || vnode.props && vnode.props.type === "number";
1331
+ addEventListener(el, lazy ? "change" : "input", (e) => {
1332
+ if (e.target.composing) return;
1333
+ el[assignKey](castValue(el.value, trim, castToNumber));
1334
+ });
1335
+ if (trim || castToNumber) {
1336
+ addEventListener(el, "change", () => {
1337
+ el.value = castValue(el.value, trim, castToNumber);
1338
+ });
1339
+ }
1340
+ if (!lazy) {
1341
+ addEventListener(el, "compositionstart", onCompositionStart);
1342
+ addEventListener(el, "compositionend", onCompositionEnd);
1343
+ addEventListener(el, "change", onCompositionEnd);
1344
+ }
1345
+ },
1346
+ // set value on mounted so it's after min/max for type="range"
1347
+ mounted(el, { value }) {
1348
+ el.value = value == null ? "" : value;
1349
+ },
1350
+ beforeUpdate(el, { value, oldValue, modifiers: { lazy, trim, number } }, vnode) {
1351
+ el[assignKey] = getModelAssigner(vnode);
1352
+ if (el.composing) return;
1353
+ const elValue = (number || el.type === "number") && !/^0\d/.test(el.value) ? shared.looseToNumber(el.value) : el.value;
1354
+ const newValue = value == null ? "" : value;
1355
+ if (elValue === newValue) {
1356
+ return;
1357
+ }
1358
+ if (document.activeElement === el && el.type !== "range") {
1359
+ if (lazy && value === oldValue) {
1360
+ return;
1361
+ }
1362
+ if (trim && el.value.trim() === newValue) {
1363
+ return;
1364
+ }
1365
+ }
1366
+ el.value = newValue;
1367
+ }
1368
+ };
1369
+ const vModelCheckbox = {
1370
+ // #4096 array checkboxes need to be deep traversed
1371
+ deep: true,
1372
+ created(el, _, vnode) {
1373
+ el[assignKey] = getModelAssigner(vnode);
1374
+ addEventListener(el, "change", () => {
1375
+ const modelValue = el._modelValue;
1376
+ const elementValue = getValue(el);
1377
+ const checked = el.checked;
1378
+ const assign = el[assignKey];
1379
+ if (shared.isArray(modelValue)) {
1380
+ const index = shared.looseIndexOf(modelValue, elementValue);
1381
+ const found = index !== -1;
1382
+ if (checked && !found) {
1383
+ assign(modelValue.concat(elementValue));
1384
+ } else if (!checked && found) {
1385
+ const filtered = [...modelValue];
1386
+ filtered.splice(index, 1);
1387
+ assign(filtered);
1388
+ }
1389
+ } else if (shared.isSet(modelValue)) {
1390
+ const cloned = new Set(modelValue);
1391
+ if (checked) {
1392
+ cloned.add(elementValue);
1393
+ } else {
1394
+ cloned.delete(elementValue);
1395
+ }
1396
+ assign(cloned);
1397
+ } else {
1398
+ assign(getCheckboxValue(el, checked));
1399
+ }
1400
+ });
1401
+ },
1402
+ // set initial checked on mount to wait for true-value/false-value
1403
+ mounted: setChecked,
1404
+ beforeUpdate(el, binding, vnode) {
1405
+ el[assignKey] = getModelAssigner(vnode);
1406
+ setChecked(el, binding, vnode);
1407
+ }
1408
+ };
1409
+ function setChecked(el, { value, oldValue }, vnode) {
1410
+ el._modelValue = value;
1411
+ let checked;
1412
+ if (shared.isArray(value)) {
1413
+ checked = shared.looseIndexOf(value, vnode.props.value) > -1;
1414
+ } else if (shared.isSet(value)) {
1415
+ checked = value.has(vnode.props.value);
1416
+ } else {
1417
+ if (value === oldValue) return;
1418
+ checked = shared.looseEqual(value, getCheckboxValue(el, true));
1419
+ }
1420
+ if (el.checked !== checked) {
1421
+ el.checked = checked;
1422
+ }
1423
+ }
1424
+ const vModelRadio = {
1425
+ created(el, { value }, vnode) {
1426
+ el.checked = shared.looseEqual(value, vnode.props.value);
1427
+ el[assignKey] = getModelAssigner(vnode);
1428
+ addEventListener(el, "change", () => {
1429
+ el[assignKey](getValue(el));
1430
+ });
1431
+ },
1432
+ beforeUpdate(el, { value, oldValue }, vnode) {
1433
+ el[assignKey] = getModelAssigner(vnode);
1434
+ if (value !== oldValue) {
1435
+ el.checked = shared.looseEqual(value, vnode.props.value);
1436
+ }
1437
+ }
1438
+ };
1439
+ const vModelSelect = {
1440
+ // <select multiple> value need to be deep traversed
1441
+ deep: true,
1442
+ created(el, { value, modifiers: { number } }, vnode) {
1443
+ const isSetModel = shared.isSet(value);
1444
+ addEventListener(el, "change", () => {
1445
+ const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map(
1446
+ (o) => number ? shared.looseToNumber(getValue(o)) : getValue(o)
1447
+ );
1448
+ el[assignKey](
1449
+ el.multiple ? isSetModel ? new Set(selectedVal) : selectedVal : selectedVal[0]
1450
+ );
1451
+ el._assigning = true;
1452
+ runtimeCore.nextTick(() => {
1453
+ el._assigning = false;
1454
+ });
1455
+ });
1456
+ el[assignKey] = getModelAssigner(vnode);
1457
+ },
1458
+ // set value in mounted & updated because <select> relies on its children
1459
+ // <option>s.
1460
+ mounted(el, { value }) {
1461
+ setSelected(el, value);
1462
+ },
1463
+ beforeUpdate(el, _binding, vnode) {
1464
+ el[assignKey] = getModelAssigner(vnode);
1465
+ },
1466
+ updated(el, { value }) {
1467
+ if (!el._assigning) {
1468
+ setSelected(el, value);
1469
+ }
1470
+ }
1471
+ };
1472
+ function setSelected(el, value) {
1473
+ const isMultiple = el.multiple;
1474
+ const isArrayValue = shared.isArray(value);
1475
+ if (isMultiple && !isArrayValue && !shared.isSet(value)) {
1476
+ return;
1477
+ }
1478
+ for (let i = 0, l = el.options.length; i < l; i++) {
1479
+ const option = el.options[i];
1480
+ const optionValue = getValue(option);
1481
+ if (isMultiple) {
1482
+ if (isArrayValue) {
1483
+ const optionType = typeof optionValue;
1484
+ if (optionType === "string" || optionType === "number") {
1485
+ option.selected = value.some((v) => String(v) === String(optionValue));
1486
+ } else {
1487
+ option.selected = shared.looseIndexOf(value, optionValue) > -1;
1488
+ }
1489
+ } else {
1490
+ option.selected = value.has(optionValue);
1491
+ }
1492
+ } else if (shared.looseEqual(getValue(option), value)) {
1493
+ if (el.selectedIndex !== i) el.selectedIndex = i;
1494
+ return;
1495
+ }
1496
+ }
1497
+ if (!isMultiple && el.selectedIndex !== -1) {
1498
+ el.selectedIndex = -1;
1499
+ }
1500
+ }
1501
+ function getValue(el) {
1502
+ return "_value" in el ? el._value : el.value;
1503
+ }
1504
+ function getCheckboxValue(el, checked) {
1505
+ const key = checked ? "_trueValue" : "_falseValue";
1506
+ return key in el ? el[key] : checked;
1507
+ }
1508
+ const vModelDynamic = {
1509
+ created(el, binding, vnode) {
1510
+ callModelHook(el, binding, vnode, null, "created");
1511
+ },
1512
+ mounted(el, binding, vnode) {
1513
+ callModelHook(el, binding, vnode, null, "mounted");
1514
+ },
1515
+ beforeUpdate(el, binding, vnode, prevVNode) {
1516
+ callModelHook(el, binding, vnode, prevVNode, "beforeUpdate");
1517
+ },
1518
+ updated(el, binding, vnode, prevVNode) {
1519
+ callModelHook(el, binding, vnode, prevVNode, "updated");
1520
+ }
1521
+ };
1522
+ function resolveDynamicModel(tagName, type) {
1523
+ switch (tagName) {
1524
+ case "SELECT":
1525
+ return vModelSelect;
1526
+ case "TEXTAREA":
1527
+ return vModelText;
1528
+ default:
1529
+ switch (type) {
1530
+ case "checkbox":
1531
+ return vModelCheckbox;
1532
+ case "radio":
1533
+ return vModelRadio;
1534
+ default:
1535
+ return vModelText;
1536
+ }
1537
+ }
1538
+ }
1539
+ function callModelHook(el, binding, vnode, prevVNode, hook) {
1540
+ const modelToUse = resolveDynamicModel(
1541
+ el.tagName,
1542
+ vnode.props && vnode.props.type
1543
+ );
1544
+ const fn = modelToUse[hook];
1545
+ fn && fn(el, binding, vnode, prevVNode);
1546
+ }
1547
+ function initVModelForSSR() {
1548
+ vModelText.getSSRProps = ({ value }) => ({ value });
1549
+ vModelRadio.getSSRProps = ({ value }, vnode) => {
1550
+ if (vnode.props && shared.looseEqual(vnode.props.value, value)) {
1551
+ return { checked: true };
1552
+ }
1553
+ };
1554
+ vModelCheckbox.getSSRProps = ({ value }, vnode) => {
1555
+ if (shared.isArray(value)) {
1556
+ if (vnode.props && shared.looseIndexOf(value, vnode.props.value) > -1) {
1557
+ return { checked: true };
1558
+ }
1559
+ } else if (shared.isSet(value)) {
1560
+ if (vnode.props && value.has(vnode.props.value)) {
1561
+ return { checked: true };
1562
+ }
1563
+ } else if (value) {
1564
+ return { checked: true };
1565
+ }
1566
+ };
1567
+ vModelDynamic.getSSRProps = (binding, vnode) => {
1568
+ if (typeof vnode.type !== "string") {
1569
+ return;
1570
+ }
1571
+ const modelToUse = resolveDynamicModel(
1572
+ // resolveDynamicModel expects an uppercase tag name, but vnode.type is lowercase
1573
+ vnode.type.toUpperCase(),
1574
+ vnode.props && vnode.props.type
1575
+ );
1576
+ if (modelToUse.getSSRProps) {
1577
+ return modelToUse.getSSRProps(binding, vnode);
1578
+ }
1579
+ };
1580
+ }
1581
+
1582
+ const systemModifiers = ["ctrl", "shift", "alt", "meta"];
1583
+ const modifierGuards = {
1584
+ stop: (e) => e.stopPropagation(),
1585
+ prevent: (e) => e.preventDefault(),
1586
+ self: (e) => e.target !== e.currentTarget,
1587
+ ctrl: (e) => !e.ctrlKey,
1588
+ shift: (e) => !e.shiftKey,
1589
+ alt: (e) => !e.altKey,
1590
+ meta: (e) => !e.metaKey,
1591
+ left: (e) => "button" in e && e.button !== 0,
1592
+ middle: (e) => "button" in e && e.button !== 1,
1593
+ right: (e) => "button" in e && e.button !== 2,
1594
+ exact: (e, modifiers) => systemModifiers.some((m) => e[`${m}Key`] && !modifiers.includes(m))
1595
+ };
1596
+ const withModifiers = (fn, modifiers) => {
1597
+ const cache = fn._withMods || (fn._withMods = {});
1598
+ const cacheKey = modifiers.join(".");
1599
+ return cache[cacheKey] || (cache[cacheKey] = ((event, ...args) => {
1600
+ for (let i = 0; i < modifiers.length; i++) {
1601
+ const guard = modifierGuards[modifiers[i]];
1602
+ if (guard && guard(event, modifiers)) return;
1603
+ }
1604
+ return fn(event, ...args);
1605
+ }));
1606
+ };
1607
+ const keyNames = {
1608
+ esc: "escape",
1609
+ space: " ",
1610
+ up: "arrow-up",
1611
+ left: "arrow-left",
1612
+ right: "arrow-right",
1613
+ down: "arrow-down",
1614
+ delete: "backspace"
1615
+ };
1616
+ const withKeys = (fn, modifiers) => {
1617
+ const cache = fn._withKeys || (fn._withKeys = {});
1618
+ const cacheKey = modifiers.join(".");
1619
+ return cache[cacheKey] || (cache[cacheKey] = ((event) => {
1620
+ if (!("key" in event)) {
1621
+ return;
1622
+ }
1623
+ const eventKey = shared.hyphenate(event.key);
1624
+ if (modifiers.some(
1625
+ (k) => k === eventKey || keyNames[k] === eventKey
1626
+ )) {
1627
+ return fn(event);
1628
+ }
1629
+ }));
1630
+ };
1631
+
1632
+ const rendererOptions = /* @__PURE__ */ shared.extend({ patchProp }, nodeOps);
1633
+ let renderer;
1634
+ let enabledHydration = false;
1635
+ function ensureRenderer() {
1636
+ return renderer || (renderer = runtimeCore.createRenderer(rendererOptions));
1637
+ }
1638
+ function ensureHydrationRenderer() {
1639
+ renderer = enabledHydration ? renderer : runtimeCore.createHydrationRenderer(rendererOptions);
1640
+ enabledHydration = true;
1641
+ return renderer;
1642
+ }
1643
+ const render = ((...args) => {
1644
+ ensureRenderer().render(...args);
1645
+ });
1646
+ const hydrate = ((...args) => {
1647
+ ensureHydrationRenderer().hydrate(...args);
1648
+ });
1649
+ const createApp = ((...args) => {
1650
+ const app = ensureRenderer().createApp(...args);
1651
+ const { mount } = app;
1652
+ app.mount = (containerOrSelector) => {
1653
+ const container = normalizeContainer(containerOrSelector);
1654
+ if (!container) return;
1655
+ const component = app._component;
1656
+ if (!shared.isFunction(component) && !component.render && !component.template) {
1657
+ component.template = container.innerHTML;
1658
+ }
1659
+ if (container.nodeType === 1) {
1660
+ container.textContent = "";
1661
+ }
1662
+ const proxy = mount(container, false, resolveRootNamespace(container));
1663
+ if (container instanceof Element) {
1664
+ container.removeAttribute("v-cloak");
1665
+ container.setAttribute("data-v-app", "");
1666
+ }
1667
+ return proxy;
1668
+ };
1669
+ return app;
1670
+ });
1671
+ const createSSRApp = ((...args) => {
1672
+ const app = ensureHydrationRenderer().createApp(...args);
1673
+ const { mount } = app;
1674
+ app.mount = (containerOrSelector) => {
1675
+ const container = normalizeContainer(containerOrSelector);
1676
+ if (container) {
1677
+ return mount(container, true, resolveRootNamespace(container));
1678
+ }
1679
+ };
1680
+ return app;
1681
+ });
1682
+ function resolveRootNamespace(container) {
1683
+ if (container instanceof SVGElement) {
1684
+ return "svg";
1685
+ }
1686
+ if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
1687
+ return "mathml";
1688
+ }
1689
+ }
1690
+ function normalizeContainer(container) {
1691
+ if (shared.isString(container)) {
1692
+ const res = document.querySelector(container);
1693
+ return res;
1694
+ }
1695
+ return container;
1696
+ }
1697
+ let ssrDirectiveInitialized = false;
1698
+ const initDirectivesForSSR = () => {
1699
+ if (!ssrDirectiveInitialized) {
1700
+ ssrDirectiveInitialized = true;
1701
+ initVModelForSSR();
1702
+ initVShowForSSR();
1703
+ }
1704
+ } ;
1705
+
1706
+ exports.Transition = Transition;
1707
+ exports.TransitionGroup = TransitionGroup;
1708
+ exports.VueElement = VueElement;
1709
+ exports.createApp = createApp;
1710
+ exports.createSSRApp = createSSRApp;
1711
+ exports.defineCustomElement = defineCustomElement;
1712
+ exports.defineSSRCustomElement = defineSSRCustomElement;
1713
+ exports.hydrate = hydrate;
1714
+ exports.initDirectivesForSSR = initDirectivesForSSR;
1715
+ exports.nodeOps = nodeOps;
1716
+ exports.patchProp = patchProp;
1717
+ exports.render = render;
1718
+ exports.useCssModule = useCssModule;
1719
+ exports.useCssVars = useCssVars;
1720
+ exports.useHost = useHost;
1721
+ exports.useShadowRoot = useShadowRoot;
1722
+ exports.vModelCheckbox = vModelCheckbox;
1723
+ exports.vModelDynamic = vModelDynamic;
1724
+ exports.vModelRadio = vModelRadio;
1725
+ exports.vModelSelect = vModelSelect;
1726
+ exports.vModelText = vModelText;
1727
+ exports.vShow = vShow;
1728
+ exports.withKeys = withKeys;
1729
+ exports.withModifiers = withModifiers;
1730
+ Object.keys(runtimeCore).forEach(function (k) {
1731
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = runtimeCore[k];
1732
+ });