@vue/compat 3.6.0-alpha.7 → 3.6.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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-alpha.7
2
+ * @vue/compat v3.6.0-beta.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -824,13 +824,13 @@ class Dep {
824
824
  }
825
825
  }
826
826
  const targetMap = /* @__PURE__ */ new WeakMap();
827
- const ITERATE_KEY = Symbol(
827
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
828
828
  "Object iterate"
829
829
  );
830
- const MAP_KEY_ITERATE_KEY = Symbol(
830
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
831
831
  "Map keys iterate"
832
832
  );
833
- const ARRAY_ITERATE_KEY = Symbol(
833
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
834
834
  "Array iterate"
835
835
  );
836
836
  function track(target, type, key) {
@@ -2831,10 +2831,10 @@ function flushPostFlushCbs(seen) {
2831
2831
  }
2832
2832
  }
2833
2833
  let isFlushing = false;
2834
- function flushOnAppMount() {
2834
+ function flushOnAppMount(instance) {
2835
2835
  if (!isFlushing) {
2836
2836
  isFlushing = true;
2837
- flushPreFlushCbs();
2837
+ flushPreFlushCbs(instance);
2838
2838
  flushPostFlushCbs();
2839
2839
  isFlushing = false;
2840
2840
  }
@@ -3568,65 +3568,6 @@ function emit$1(instance, event, args) {
3568
3568
  return instance.proxy;
3569
3569
  }
3570
3570
 
3571
- const compatModelEventPrefix = `onModelCompat:`;
3572
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3573
- function convertLegacyVModelProps(vnode) {
3574
- const { type, shapeFlag, props, dynamicProps } = vnode;
3575
- const comp = type;
3576
- if (shapeFlag & 6 && props && "modelValue" in props) {
3577
- if (!isCompatEnabled$1(
3578
- "COMPONENT_V_MODEL",
3579
- // this is a special case where we want to use the vnode component's
3580
- // compat config instead of the current rendering instance (which is the
3581
- // parent of the component that exposes v-model)
3582
- { type }
3583
- )) {
3584
- return;
3585
- }
3586
- if (!warnedTypes.has(comp)) {
3587
- pushWarningContext(vnode);
3588
- warnDeprecation$1("COMPONENT_V_MODEL", { type }, comp);
3589
- popWarningContext();
3590
- warnedTypes.add(comp);
3591
- }
3592
- const model = comp.model || {};
3593
- applyModelFromMixins(model, comp.mixins);
3594
- const { prop = "value", event = "input" } = model;
3595
- if (prop !== "modelValue") {
3596
- props[prop] = props.modelValue;
3597
- delete props.modelValue;
3598
- }
3599
- if (dynamicProps) {
3600
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3601
- }
3602
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3603
- delete props["onUpdate:modelValue"];
3604
- }
3605
- }
3606
- function applyModelFromMixins(model, mixins) {
3607
- if (mixins) {
3608
- mixins.forEach((m) => {
3609
- if (m.model) extend(model, m.model);
3610
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3611
- });
3612
- }
3613
- }
3614
- function compatModelEmit(instance, event, args) {
3615
- if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
3616
- return;
3617
- }
3618
- const props = instance.vnode.props;
3619
- const modelHandler = props && props[compatModelEventPrefix + event];
3620
- if (modelHandler) {
3621
- callWithErrorHandling(
3622
- modelHandler,
3623
- instance,
3624
- 6,
3625
- args
3626
- );
3627
- }
3628
- }
3629
-
3630
3571
  let currentRenderingInstance = null;
3631
3572
  let currentScopeId = null;
3632
3573
  function setCurrentRenderingInstance(instance) {
@@ -3777,7 +3718,203 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3777
3718
  }
3778
3719
  }
3779
3720
 
3780
- const TeleportEndKey = Symbol("_vte");
3721
+ function provide(key, value) {
3722
+ {
3723
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3724
+ warn$1(`provide() can only be used inside setup().`);
3725
+ }
3726
+ }
3727
+ if (currentInstance) {
3728
+ let provides = currentInstance.provides;
3729
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3730
+ if (parentProvides === provides) {
3731
+ provides = currentInstance.provides = Object.create(parentProvides);
3732
+ }
3733
+ provides[key] = value;
3734
+ }
3735
+ }
3736
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3737
+ const instance = getCurrentGenericInstance();
3738
+ if (instance || currentApp) {
3739
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3740
+ if (provides && key in provides) {
3741
+ return provides[key];
3742
+ } else if (arguments.length > 1) {
3743
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3744
+ } else {
3745
+ warn$1(`injection "${String(key)}" not found.`);
3746
+ }
3747
+ } else {
3748
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3749
+ }
3750
+ }
3751
+ function hasInjectionContext() {
3752
+ return !!(getCurrentGenericInstance() || currentApp);
3753
+ }
3754
+
3755
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3756
+ const useSSRContext = () => {
3757
+ {
3758
+ const ctx = inject(ssrContextKey);
3759
+ if (!ctx) {
3760
+ warn$1(
3761
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3762
+ );
3763
+ }
3764
+ return ctx;
3765
+ }
3766
+ };
3767
+
3768
+ function watchEffect(effect, options) {
3769
+ return doWatch(effect, null, options);
3770
+ }
3771
+ function watchPostEffect(effect, options) {
3772
+ return doWatch(
3773
+ effect,
3774
+ null,
3775
+ extend({}, options, { flush: "post" })
3776
+ );
3777
+ }
3778
+ function watchSyncEffect(effect, options) {
3779
+ return doWatch(
3780
+ effect,
3781
+ null,
3782
+ extend({}, options, { flush: "sync" })
3783
+ );
3784
+ }
3785
+ function watch(source, cb, options) {
3786
+ if (!isFunction(cb)) {
3787
+ warn$1(
3788
+ `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3789
+ );
3790
+ }
3791
+ return doWatch(source, cb, options);
3792
+ }
3793
+ class RenderWatcherEffect extends WatcherEffect {
3794
+ constructor(instance, source, cb, options, flush) {
3795
+ super(source, cb, options);
3796
+ this.flush = flush;
3797
+ const job = () => {
3798
+ if (this.dirty) {
3799
+ this.run();
3800
+ }
3801
+ };
3802
+ if (cb) {
3803
+ this.flags |= 128;
3804
+ job.flags |= 2;
3805
+ }
3806
+ if (instance) {
3807
+ job.i = instance;
3808
+ }
3809
+ this.job = job;
3810
+ }
3811
+ notify() {
3812
+ const flags = this.flags;
3813
+ if (!(flags & 256)) {
3814
+ const flush = this.flush;
3815
+ const job = this.job;
3816
+ if (flush === "post") {
3817
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3818
+ } else if (flush === "pre") {
3819
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3820
+ } else {
3821
+ job();
3822
+ }
3823
+ }
3824
+ }
3825
+ }
3826
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3827
+ const { immediate, deep, flush = "pre", once } = options;
3828
+ if (!cb) {
3829
+ if (immediate !== void 0) {
3830
+ warn$1(
3831
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3832
+ );
3833
+ }
3834
+ if (deep !== void 0) {
3835
+ warn$1(
3836
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3837
+ );
3838
+ }
3839
+ if (once !== void 0) {
3840
+ warn$1(
3841
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3842
+ );
3843
+ }
3844
+ }
3845
+ const baseWatchOptions = extend({}, options);
3846
+ baseWatchOptions.onWarn = warn$1;
3847
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3848
+ let ssrCleanup;
3849
+ if (isInSSRComponentSetup) {
3850
+ if (flush === "sync") {
3851
+ const ctx = useSSRContext();
3852
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3853
+ } else if (!runsImmediately) {
3854
+ const watchStopHandle = () => {
3855
+ };
3856
+ watchStopHandle.stop = NOOP;
3857
+ watchStopHandle.resume = NOOP;
3858
+ watchStopHandle.pause = NOOP;
3859
+ return watchStopHandle;
3860
+ }
3861
+ }
3862
+ const instance = currentInstance;
3863
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3864
+ const effect = new RenderWatcherEffect(
3865
+ instance,
3866
+ source,
3867
+ cb,
3868
+ baseWatchOptions,
3869
+ flush
3870
+ );
3871
+ if (cb) {
3872
+ effect.run(true);
3873
+ } else if (flush === "post") {
3874
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3875
+ } else {
3876
+ effect.run(true);
3877
+ }
3878
+ const stop = effect.stop.bind(effect);
3879
+ stop.pause = effect.pause.bind(effect);
3880
+ stop.resume = effect.resume.bind(effect);
3881
+ stop.stop = stop;
3882
+ if (isInSSRComponentSetup) {
3883
+ if (ssrCleanup) {
3884
+ ssrCleanup.push(stop);
3885
+ } else if (runsImmediately) {
3886
+ stop();
3887
+ }
3888
+ }
3889
+ return stop;
3890
+ }
3891
+ function instanceWatch(source, value, options) {
3892
+ const publicThis = this.proxy;
3893
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3894
+ let cb;
3895
+ if (isFunction(value)) {
3896
+ cb = value;
3897
+ } else {
3898
+ cb = value.handler;
3899
+ options = value;
3900
+ }
3901
+ const prev = setCurrentInstance(this);
3902
+ const res = doWatch(getter, cb.bind(publicThis), options);
3903
+ setCurrentInstance(...prev);
3904
+ return res;
3905
+ }
3906
+ function createPathGetter(ctx, path) {
3907
+ const segments = path.split(".");
3908
+ return () => {
3909
+ let cur = ctx;
3910
+ for (let i = 0; i < segments.length && cur; i++) {
3911
+ cur = cur[segments[i]];
3912
+ }
3913
+ return cur;
3914
+ };
3915
+ }
3916
+
3917
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3781
3918
  const isTeleport = (type) => type.__isTeleport;
3782
3919
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3783
3920
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -4149,8 +4286,8 @@ function prepareAnchor(target, vnode, createText, insert) {
4149
4286
  return targetAnchor;
4150
4287
  }
4151
4288
 
4152
- const leaveCbKey = Symbol("_leaveCb");
4153
- const enterCbKey$1 = Symbol("_enterCb");
4289
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
4290
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
4154
4291
  function useTransitionState() {
4155
4292
  const state = {
4156
4293
  isMounted: false,
@@ -5766,7 +5903,9 @@ const KeepAliveImpl = {
5766
5903
  }
5767
5904
  function pruneCache(filter) {
5768
5905
  cache.forEach((vnode, key) => {
5769
- const name = getComponentName(vnode.type);
5906
+ const name = getComponentName(
5907
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5908
+ );
5770
5909
  if (name && !filter(name)) {
5771
5910
  pruneCacheEntry(key);
5772
5911
  }
@@ -6108,7 +6247,7 @@ const FILTERS = "filters";
6108
6247
  function resolveComponent(name, maybeSelfReference) {
6109
6248
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
6110
6249
  }
6111
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
6250
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
6112
6251
  function resolveDynamicComponent(component) {
6113
6252
  if (isString(component)) {
6114
6253
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -6550,14 +6689,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
6550
6689
  }
6551
6690
  }
6552
6691
 
6553
- function toHandlers(obj, preserveCaseIfNecessary) {
6692
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6554
6693
  const ret = {};
6555
6694
  if (!isObject(obj)) {
6556
6695
  warn$1(`v-on with no argument expects an object value.`);
6557
6696
  return ret;
6558
6697
  }
6559
6698
  for (const key in obj) {
6560
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6699
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6561
6700
  }
6562
6701
  return ret;
6563
6702
  }
@@ -7698,7 +7837,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7698
7837
  return vm;
7699
7838
  }
7700
7839
  }
7701
- Vue.version = `2.6.14-compat:${"3.6.0-alpha.7"}`;
7840
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.1"}`;
7702
7841
  Vue.config = singletonApp.config;
7703
7842
  Vue.use = (plugin, ...options) => {
7704
7843
  if (plugin && isFunction(plugin.install)) {
@@ -8192,270 +8331,140 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
8192
8331
  app._container = rootContainer;
8193
8332
  rootContainer.__vue_app__ = app;
8194
8333
  return getPublicInstance(instance);
8195
- } else {
8196
- warn$1(
8197
- `App has already been mounted.
8198
- If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
8199
- );
8200
- }
8201
- },
8202
- onUnmount(cleanupFn) {
8203
- if (typeof cleanupFn !== "function") {
8204
- warn$1(
8205
- `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8206
- );
8207
- }
8208
- pluginCleanupFns.push(cleanupFn);
8209
- },
8210
- unmount() {
8211
- if (isMounted) {
8212
- callWithAsyncErrorHandling(
8213
- pluginCleanupFns,
8214
- app._instance,
8215
- 16
8216
- );
8217
- unmount(app);
8218
- {
8219
- app._instance = null;
8220
- devtoolsUnmountApp(app);
8221
- }
8222
- delete app._container.__vue_app__;
8223
- } else {
8224
- warn$1(`Cannot unmount an app that is not mounted.`);
8225
- }
8226
- },
8227
- provide(key, value) {
8228
- if (key in context.provides) {
8229
- if (hasOwn(context.provides, key)) {
8230
- warn$1(
8231
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8232
- );
8233
- } else {
8234
- warn$1(
8235
- `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8236
- );
8237
- }
8238
- }
8239
- context.provides[key] = value;
8240
- return app;
8241
- },
8242
- runWithContext(fn) {
8243
- const lastApp = currentApp;
8244
- currentApp = app;
8245
- try {
8246
- return fn();
8247
- } finally {
8248
- currentApp = lastApp;
8249
- }
8250
- }
8251
- };
8252
- {
8253
- installAppCompatProperties(
8254
- app,
8255
- context,
8256
- // vapor doesn't have compat mode so this is always passed
8257
- render
8258
- );
8259
- }
8260
- return app;
8261
- };
8262
- }
8263
- let currentApp = null;
8264
-
8265
- function provide(key, value) {
8266
- {
8267
- if (!currentInstance || currentInstance.isMounted) {
8268
- warn$1(`provide() can only be used inside setup().`);
8269
- }
8270
- }
8271
- if (currentInstance) {
8272
- let provides = currentInstance.provides;
8273
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
8274
- if (parentProvides === provides) {
8275
- provides = currentInstance.provides = Object.create(parentProvides);
8276
- }
8277
- provides[key] = value;
8278
- }
8279
- }
8280
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
8281
- const instance = getCurrentGenericInstance();
8282
- if (instance || currentApp) {
8283
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
8284
- if (provides && key in provides) {
8285
- return provides[key];
8286
- } else if (arguments.length > 1) {
8287
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
8288
- } else {
8289
- warn$1(`injection "${String(key)}" not found.`);
8290
- }
8291
- } else {
8292
- warn$1(`inject() can only be used inside setup() or functional components.`);
8293
- }
8294
- }
8295
- function hasInjectionContext() {
8296
- return !!(getCurrentGenericInstance() || currentApp);
8297
- }
8298
-
8299
- const ssrContextKey = Symbol.for("v-scx");
8300
- const useSSRContext = () => {
8301
- {
8302
- const ctx = inject(ssrContextKey);
8303
- if (!ctx) {
8304
- warn$1(
8305
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
8306
- );
8307
- }
8308
- return ctx;
8309
- }
8310
- };
8311
-
8312
- function watchEffect(effect, options) {
8313
- return doWatch(effect, null, options);
8314
- }
8315
- function watchPostEffect(effect, options) {
8316
- return doWatch(
8317
- effect,
8318
- null,
8319
- extend({}, options, { flush: "post" })
8320
- );
8321
- }
8322
- function watchSyncEffect(effect, options) {
8323
- return doWatch(
8324
- effect,
8325
- null,
8326
- extend({}, options, { flush: "sync" })
8327
- );
8328
- }
8329
- function watch(source, cb, options) {
8330
- if (!isFunction(cb)) {
8331
- warn$1(
8332
- `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
8333
- );
8334
- }
8335
- return doWatch(source, cb, options);
8336
- }
8337
- class RenderWatcherEffect extends WatcherEffect {
8338
- constructor(instance, source, cb, options, flush) {
8339
- super(source, cb, options);
8340
- this.flush = flush;
8341
- const job = () => {
8342
- if (this.dirty) {
8343
- this.run();
8334
+ } else {
8335
+ warn$1(
8336
+ `App has already been mounted.
8337
+ If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
8338
+ );
8339
+ }
8340
+ },
8341
+ onUnmount(cleanupFn) {
8342
+ if (typeof cleanupFn !== "function") {
8343
+ warn$1(
8344
+ `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8345
+ );
8346
+ }
8347
+ pluginCleanupFns.push(cleanupFn);
8348
+ },
8349
+ unmount() {
8350
+ if (isMounted) {
8351
+ callWithAsyncErrorHandling(
8352
+ pluginCleanupFns,
8353
+ app._instance,
8354
+ 16
8355
+ );
8356
+ unmount(app);
8357
+ {
8358
+ app._instance = null;
8359
+ devtoolsUnmountApp(app);
8360
+ }
8361
+ delete app._container.__vue_app__;
8362
+ } else {
8363
+ warn$1(`Cannot unmount an app that is not mounted.`);
8364
+ }
8365
+ },
8366
+ provide(key, value) {
8367
+ if (key in context.provides) {
8368
+ if (hasOwn(context.provides, key)) {
8369
+ warn$1(
8370
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8371
+ );
8372
+ } else {
8373
+ warn$1(
8374
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8375
+ );
8376
+ }
8377
+ }
8378
+ context.provides[key] = value;
8379
+ return app;
8380
+ },
8381
+ runWithContext(fn) {
8382
+ const lastApp = currentApp;
8383
+ currentApp = app;
8384
+ try {
8385
+ return fn();
8386
+ } finally {
8387
+ currentApp = lastApp;
8388
+ }
8344
8389
  }
8345
8390
  };
8346
- if (cb) {
8347
- this.flags |= 128;
8348
- job.flags |= 2;
8349
- }
8350
- if (instance) {
8351
- job.i = instance;
8352
- }
8353
- this.job = job;
8354
- }
8355
- notify() {
8356
- const flags = this.flags;
8357
- if (!(flags & 256)) {
8358
- const flush = this.flush;
8359
- const job = this.job;
8360
- if (flush === "post") {
8361
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
8362
- } else if (flush === "pre") {
8363
- queueJob(job, job.i ? job.i.uid : void 0, true);
8364
- } else {
8365
- job();
8366
- }
8367
- }
8368
- }
8369
- }
8370
- function doWatch(source, cb, options = EMPTY_OBJ) {
8371
- const { immediate, deep, flush = "pre", once } = options;
8372
- if (!cb) {
8373
- if (immediate !== void 0) {
8374
- warn$1(
8375
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
8391
+ {
8392
+ installAppCompatProperties(
8393
+ app,
8394
+ context,
8395
+ // vapor doesn't have compat mode so this is always passed
8396
+ render
8376
8397
  );
8377
8398
  }
8378
- if (deep !== void 0) {
8379
- warn$1(
8380
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
8381
- );
8399
+ return app;
8400
+ };
8401
+ }
8402
+ let currentApp = null;
8403
+
8404
+ const compatModelEventPrefix = `onModelCompat:`;
8405
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
8406
+ function convertLegacyVModelProps(vnode) {
8407
+ const { type, shapeFlag, props, dynamicProps } = vnode;
8408
+ const comp = type;
8409
+ if (shapeFlag & 6 && props && "modelValue" in props) {
8410
+ if (!isCompatEnabled$1(
8411
+ "COMPONENT_V_MODEL",
8412
+ // this is a special case where we want to use the vnode component's
8413
+ // compat config instead of the current rendering instance (which is the
8414
+ // parent of the component that exposes v-model)
8415
+ { type }
8416
+ )) {
8417
+ return;
8382
8418
  }
8383
- if (once !== void 0) {
8384
- warn$1(
8385
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
8419
+ if (!warnedTypes.has(comp)) {
8420
+ pushWarningContext(vnode);
8421
+ warnDeprecation$1(
8422
+ "COMPONENT_V_MODEL",
8423
+ {
8424
+ type,
8425
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
8426
+ },
8427
+ comp
8386
8428
  );
8429
+ popWarningContext();
8430
+ warnedTypes.add(comp);
8387
8431
  }
8388
- }
8389
- const baseWatchOptions = extend({}, options);
8390
- baseWatchOptions.onWarn = warn$1;
8391
- const runsImmediately = cb && immediate || !cb && flush !== "post";
8392
- let ssrCleanup;
8393
- if (isInSSRComponentSetup) {
8394
- if (flush === "sync") {
8395
- const ctx = useSSRContext();
8396
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
8397
- } else if (!runsImmediately) {
8398
- const watchStopHandle = () => {
8399
- };
8400
- watchStopHandle.stop = NOOP;
8401
- watchStopHandle.resume = NOOP;
8402
- watchStopHandle.pause = NOOP;
8403
- return watchStopHandle;
8432
+ const model = comp.model || {};
8433
+ applyModelFromMixins(model, comp.mixins);
8434
+ const { prop = "value", event = "input" } = model;
8435
+ if (prop !== "modelValue") {
8436
+ props[prop] = props.modelValue;
8437
+ delete props.modelValue;
8404
8438
  }
8405
- }
8406
- const instance = currentInstance;
8407
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
8408
- const effect = new RenderWatcherEffect(
8409
- instance,
8410
- source,
8411
- cb,
8412
- baseWatchOptions,
8413
- flush
8414
- );
8415
- if (cb) {
8416
- effect.run(true);
8417
- } else if (flush === "post") {
8418
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
8419
- } else {
8420
- effect.run(true);
8421
- }
8422
- const stop = effect.stop.bind(effect);
8423
- stop.pause = effect.pause.bind(effect);
8424
- stop.resume = effect.resume.bind(effect);
8425
- stop.stop = stop;
8426
- if (isInSSRComponentSetup) {
8427
- if (ssrCleanup) {
8428
- ssrCleanup.push(stop);
8429
- } else if (runsImmediately) {
8430
- stop();
8439
+ if (dynamicProps) {
8440
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
8431
8441
  }
8442
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
8443
+ delete props["onUpdate:modelValue"];
8432
8444
  }
8433
- return stop;
8434
8445
  }
8435
- function instanceWatch(source, value, options) {
8436
- const publicThis = this.proxy;
8437
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
8438
- let cb;
8439
- if (isFunction(value)) {
8440
- cb = value;
8441
- } else {
8442
- cb = value.handler;
8443
- options = value;
8446
+ function applyModelFromMixins(model, mixins) {
8447
+ if (mixins) {
8448
+ mixins.forEach((m) => {
8449
+ if (m.model) extend(model, m.model);
8450
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
8451
+ });
8444
8452
  }
8445
- const prev = setCurrentInstance(this);
8446
- const res = doWatch(getter, cb.bind(publicThis), options);
8447
- setCurrentInstance(...prev);
8448
- return res;
8449
8453
  }
8450
- function createPathGetter(ctx, path) {
8451
- const segments = path.split(".");
8452
- return () => {
8453
- let cur = ctx;
8454
- for (let i = 0; i < segments.length && cur; i++) {
8455
- cur = cur[segments[i]];
8456
- }
8457
- return cur;
8458
- };
8454
+ function compatModelEmit(instance, event, args) {
8455
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
8456
+ return;
8457
+ }
8458
+ const props = instance.vnode.props;
8459
+ const modelHandler = props && props[compatModelEventPrefix + event];
8460
+ if (modelHandler) {
8461
+ callWithErrorHandling(
8462
+ modelHandler,
8463
+ instance,
8464
+ 6,
8465
+ args
8466
+ );
8467
+ }
8459
8468
  }
8460
8469
 
8461
8470
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9647,6 +9656,14 @@ function isSupported() {
9647
9656
  return supported;
9648
9657
  }
9649
9658
 
9659
+ const MoveType = {
9660
+ "ENTER": 0,
9661
+ "0": "ENTER",
9662
+ "LEAVE": 1,
9663
+ "1": "LEAVE",
9664
+ "REORDER": 2,
9665
+ "2": "REORDER"
9666
+ };
9650
9667
  const queuePostRenderEffect = queueEffectWithSuspense ;
9651
9668
  function createRenderer(options) {
9652
9669
  return baseCreateRenderer(options);
@@ -9795,7 +9812,15 @@ function baseCreateRenderer(options, createHydrationFns) {
9795
9812
  } else {
9796
9813
  const el = n2.el = n1.el;
9797
9814
  if (n2.children !== n1.children) {
9798
- hostSetText(el, n2.children);
9815
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9816
+ const childNodes = container.childNodes;
9817
+ const newChild = hostCreateText(n2.children);
9818
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9819
+ hostInsert(newChild, container, oldChild);
9820
+ hostRemove(oldChild);
9821
+ } else {
9822
+ hostSetText(el, n2.children);
9823
+ }
9799
9824
  }
9800
9825
  }
9801
9826
  };
@@ -10181,7 +10206,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10181
10206
  } else {
10182
10207
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
10183
10208
  // of renderSlot() with no valid children
10184
- n1.dynamicChildren) {
10209
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
10185
10210
  patchBlockChildren(
10186
10211
  n1.dynamicChildren,
10187
10212
  dynamicChildren,
@@ -10897,8 +10922,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10897
10922
  const nextChild = c2[nextIndex];
10898
10923
  const anchorVNode = c2[nextIndex + 1];
10899
10924
  const anchor = nextIndex + 1 < l2 ? (
10900
- // #13559, fallback to el placeholder for unresolved async component
10901
- anchorVNode.el || anchorVNode.placeholder
10925
+ // #13559, #14173 fallback to el placeholder for unresolved async component
10926
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
10902
10927
  ) : parentAnchor;
10903
10928
  if (newIndexToOldIndexMap[i] === 0) {
10904
10929
  patch(
@@ -11213,9 +11238,11 @@ function baseCreateRenderer(options, createHydrationFns) {
11213
11238
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
11214
11239
  };
11215
11240
  const render = (vnode, container, namespace) => {
11241
+ let instance;
11216
11242
  if (vnode == null) {
11217
11243
  if (container._vnode) {
11218
11244
  unmount(container._vnode, null, null, true);
11245
+ instance = container._vnode.component;
11219
11246
  }
11220
11247
  } else {
11221
11248
  patch(
@@ -11229,7 +11256,7 @@ function baseCreateRenderer(options, createHydrationFns) {
11229
11256
  );
11230
11257
  }
11231
11258
  container._vnode = vnode;
11232
- flushOnAppMount();
11259
+ flushOnAppMount(instance);
11233
11260
  };
11234
11261
  const internals = {
11235
11262
  p: patch,
@@ -11321,9 +11348,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
11321
11348
  if (!shallow && c2.patchFlag !== -2)
11322
11349
  traverseStaticChildren(c1, c2);
11323
11350
  }
11324
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
11325
- c2.patchFlag !== -1) {
11326
- c2.el = c1.el;
11351
+ if (c2.type === Text) {
11352
+ if (c2.patchFlag !== -1) {
11353
+ c2.el = c1.el;
11354
+ } else {
11355
+ c2.__elIndex = i + // take fragment start anchor into account
11356
+ (n1.type === Fragment ? 1 : 0);
11357
+ }
11327
11358
  }
11328
11359
  if (c2.type === Comment && !c2.el) {
11329
11360
  c2.el = c1.el;
@@ -11359,16 +11390,24 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
11359
11390
  insert();
11360
11391
  }
11361
11392
  }
11362
- function performTransitionLeave(el, transition, remove, isElement = true) {
11393
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
11363
11394
  const performRemove = () => {
11364
11395
  remove();
11365
11396
  if (transition && !transition.persisted && transition.afterLeave) {
11366
11397
  transition.afterLeave();
11367
11398
  }
11368
11399
  };
11369
- if (isElement && transition && !transition.persisted) {
11400
+ if (force || isElement && transition && !transition.persisted) {
11370
11401
  const { leave, delayLeave } = transition;
11371
- const performLeave = () => leave(el, performRemove);
11402
+ const performLeave = () => {
11403
+ if (el._isLeaving && force) {
11404
+ el[leaveCbKey](
11405
+ true
11406
+ /* cancelled */
11407
+ );
11408
+ }
11409
+ leave(el, performRemove);
11410
+ };
11372
11411
  if (delayLeave) {
11373
11412
  delayLeave(el, performRemove, performLeave);
11374
11413
  } else {
@@ -11424,6 +11463,16 @@ function getInheritedScopeIds(vnode, parentComponent) {
11424
11463
  }
11425
11464
  return inheritedScopeIds;
11426
11465
  }
11466
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
11467
+ if (anchorVnode.placeholder) {
11468
+ return anchorVnode.placeholder;
11469
+ }
11470
+ const instance = anchorVnode.component;
11471
+ if (instance) {
11472
+ return resolveAsyncComponentPlaceholder(instance.subTree);
11473
+ }
11474
+ return null;
11475
+ }
11427
11476
 
11428
11477
  const isSuspense = (type) => type.__isSuspense;
11429
11478
  let suspenseId = 0;
@@ -12063,11 +12112,11 @@ function convertLegacyComponent(comp, instance) {
12063
12112
  return comp;
12064
12113
  }
12065
12114
 
12066
- const Fragment = Symbol.for("v-fgt");
12067
- const Text = Symbol.for("v-txt");
12068
- const Comment = Symbol.for("v-cmt");
12069
- const Static = Symbol.for("v-stc");
12070
- const VaporSlot = Symbol.for("v-vps");
12115
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
12116
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
12117
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
12118
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
12119
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
12071
12120
  const blockStack = [];
12072
12121
  let currentBlock = null;
12073
12122
  function openBlock(disableTracking = false) {
@@ -13145,7 +13194,7 @@ function isMemoSame(cached, memo) {
13145
13194
  return true;
13146
13195
  }
13147
13196
 
13148
- const version = "3.6.0-alpha.7";
13197
+ const version = "3.6.0-beta.1";
13149
13198
  const warn = warn$1 ;
13150
13199
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13151
13200
  const devtools = devtools$1 ;
@@ -13257,7 +13306,7 @@ const nodeOps = {
13257
13306
 
13258
13307
  const TRANSITION$1 = "transition";
13259
13308
  const ANIMATION = "animation";
13260
- const vtcKey = Symbol("_vtc");
13309
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
13261
13310
  const DOMTransitionPropsValidators = {
13262
13311
  name: String,
13263
13312
  type: String,
@@ -13587,8 +13636,8 @@ function patchClass(el, value, isSVG) {
13587
13636
  }
13588
13637
  }
13589
13638
 
13590
- const vShowOriginalDisplay = Symbol("_vod");
13591
- const vShowHidden = Symbol("_vsh");
13639
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
13640
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
13592
13641
  const vShow = {
13593
13642
  // used for prop mismatch check during hydration
13594
13643
  name: "show",
@@ -13637,7 +13686,7 @@ function initVShowForSSR() {
13637
13686
  };
13638
13687
  }
13639
13688
 
13640
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
13689
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
13641
13690
  function useCssVars(getter) {
13642
13691
  const instance = getCurrentInstance();
13643
13692
  const getVars = () => getter(instance.proxy);
@@ -13847,7 +13896,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
13847
13896
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13848
13897
  function compatCoerceAttr(el, key, value, instance = null) {
13849
13898
  if (isEnumeratedAttr(key)) {
13850
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
13899
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13851
13900
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13852
13901
  "ATTR_ENUMERATED_COERCION",
13853
13902
  instance,
@@ -13942,7 +13991,7 @@ function addEventListener(el, event, handler, options) {
13942
13991
  function removeEventListener(el, event, handler, options) {
13943
13992
  el.removeEventListener(event, handler, options);
13944
13993
  }
13945
- const veiKey = Symbol("_vei");
13994
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
13946
13995
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
13947
13996
  const invokers = el[veiKey] || (el[veiKey] = {});
13948
13997
  const existingInvoker = invokers[rawName];
@@ -14604,8 +14653,8 @@ function useCssModule(name = "$style") {
14604
14653
 
14605
14654
  const positionMap = /* @__PURE__ */ new WeakMap();
14606
14655
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14607
- const moveCbKey = Symbol("_moveCb");
14608
- const enterCbKey = Symbol("_enterCb");
14656
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14657
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14609
14658
  const decorate = (t) => {
14610
14659
  delete t.props.mode;
14611
14660
  {
@@ -14777,7 +14826,7 @@ function onCompositionEnd(e) {
14777
14826
  target.dispatchEvent(new Event("input"));
14778
14827
  }
14779
14828
  }
14780
- const assignKey = Symbol("_assign");
14829
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
14781
14830
  const vModelText = {
14782
14831
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
14783
14832
  el[assignKey] = getModelAssigner(vnode);
@@ -15313,6 +15362,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
15313
15362
  ErrorTypeStrings: ErrorTypeStrings,
15314
15363
  Fragment: Fragment,
15315
15364
  KeepAlive: KeepAlive,
15365
+ MoveType: MoveType,
15316
15366
  ReactiveEffect: ReactiveEffect,
15317
15367
  Static: Static,
15318
15368
  Suspense: Suspense,
@@ -15510,81 +15560,81 @@ function createCompatVue() {
15510
15560
  return Vue;
15511
15561
  }
15512
15562
 
15513
- const FRAGMENT = Symbol(`Fragment` );
15514
- const TELEPORT = Symbol(`Teleport` );
15515
- const SUSPENSE = Symbol(`Suspense` );
15516
- const KEEP_ALIVE = Symbol(`KeepAlive` );
15517
- const BASE_TRANSITION = Symbol(
15563
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
15564
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
15565
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
15566
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
15567
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
15518
15568
  `BaseTransition`
15519
15569
  );
15520
- const OPEN_BLOCK = Symbol(`openBlock` );
15521
- const CREATE_BLOCK = Symbol(`createBlock` );
15522
- const CREATE_ELEMENT_BLOCK = Symbol(
15570
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
15571
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
15572
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
15523
15573
  `createElementBlock`
15524
15574
  );
15525
- const CREATE_VNODE = Symbol(`createVNode` );
15526
- const CREATE_ELEMENT_VNODE = Symbol(
15575
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
15576
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
15527
15577
  `createElementVNode`
15528
15578
  );
15529
- const CREATE_COMMENT = Symbol(
15579
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
15530
15580
  `createCommentVNode`
15531
15581
  );
15532
- const CREATE_TEXT = Symbol(
15582
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
15533
15583
  `createTextVNode`
15534
15584
  );
15535
- const CREATE_STATIC = Symbol(
15585
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
15536
15586
  `createStaticVNode`
15537
15587
  );
15538
- const RESOLVE_COMPONENT = Symbol(
15588
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
15539
15589
  `resolveComponent`
15540
15590
  );
15541
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
15591
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
15542
15592
  `resolveDynamicComponent`
15543
15593
  );
15544
- const RESOLVE_DIRECTIVE = Symbol(
15594
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
15545
15595
  `resolveDirective`
15546
15596
  );
15547
- const RESOLVE_FILTER = Symbol(
15597
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
15548
15598
  `resolveFilter`
15549
15599
  );
15550
- const WITH_DIRECTIVES = Symbol(
15600
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
15551
15601
  `withDirectives`
15552
15602
  );
15553
- const RENDER_LIST = Symbol(`renderList` );
15554
- const RENDER_SLOT = Symbol(`renderSlot` );
15555
- const CREATE_SLOTS = Symbol(`createSlots` );
15556
- const TO_DISPLAY_STRING = Symbol(
15603
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
15604
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
15605
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
15606
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
15557
15607
  `toDisplayString`
15558
15608
  );
15559
- const MERGE_PROPS = Symbol(`mergeProps` );
15560
- const NORMALIZE_CLASS = Symbol(
15609
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
15610
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
15561
15611
  `normalizeClass`
15562
15612
  );
15563
- const NORMALIZE_STYLE = Symbol(
15613
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
15564
15614
  `normalizeStyle`
15565
15615
  );
15566
- const NORMALIZE_PROPS = Symbol(
15616
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
15567
15617
  `normalizeProps`
15568
15618
  );
15569
- const GUARD_REACTIVE_PROPS = Symbol(
15619
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
15570
15620
  `guardReactiveProps`
15571
15621
  );
15572
- const TO_HANDLERS = Symbol(`toHandlers` );
15573
- const CAMELIZE = Symbol(`camelize` );
15574
- const CAPITALIZE = Symbol(`capitalize` );
15575
- const TO_HANDLER_KEY = Symbol(
15622
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
15623
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
15624
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
15625
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
15576
15626
  `toHandlerKey`
15577
15627
  );
15578
- const SET_BLOCK_TRACKING = Symbol(
15628
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
15579
15629
  `setBlockTracking`
15580
15630
  );
15581
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
15582
- const POP_SCOPE_ID = Symbol(`popScopeId` );
15583
- const WITH_CTX = Symbol(`withCtx` );
15584
- const UNREF = Symbol(`unref` );
15585
- const IS_REF = Symbol(`isRef` );
15586
- const WITH_MEMO = Symbol(`withMemo` );
15587
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
15631
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
15632
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
15633
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
15634
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
15635
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
15636
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
15637
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
15588
15638
  const helperNameMap = {
15589
15639
  [FRAGMENT]: `Fragment`,
15590
15640
  [TELEPORT]: `Teleport`,
@@ -15879,14 +15929,28 @@ class Tokenizer {
15879
15929
  getPos(index) {
15880
15930
  let line = 1;
15881
15931
  let column = index + 1;
15882
- for (let i = this.newlines.length - 1; i >= 0; i--) {
15883
- const newlineIndex = this.newlines[i];
15884
- if (index > newlineIndex) {
15885
- line = i + 2;
15886
- column = index - newlineIndex;
15887
- break;
15932
+ const length = this.newlines.length;
15933
+ let j = -1;
15934
+ if (length > 100) {
15935
+ let l = -1;
15936
+ let r = length;
15937
+ while (l + 1 < r) {
15938
+ const m = l + r >>> 1;
15939
+ this.newlines[m] < index ? l = m : r = m;
15940
+ }
15941
+ j = l;
15942
+ } else {
15943
+ for (let i = length - 1; i >= 0; i--) {
15944
+ if (index > this.newlines[i]) {
15945
+ j = i;
15946
+ break;
15947
+ }
15888
15948
  }
15889
15949
  }
15950
+ if (j >= 0) {
15951
+ line = j + 2;
15952
+ column = index - this.newlines[j];
15953
+ }
15890
15954
  return {
15891
15955
  column,
15892
15956
  line,
@@ -16701,7 +16765,7 @@ const errorMessages = {
16701
16765
  [32]: `v-for has invalid expression.`,
16702
16766
  [33]: `<template v-for> key should be placed on the <template> tag.`,
16703
16767
  [34]: `v-bind is missing expression.`,
16704
- [52]: `v-bind with same-name shorthand only allows static argument.`,
16768
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
16705
16769
  [35]: `v-on is missing expression.`,
16706
16770
  [36]: `Unexpected custom directive on <slot> outlet.`,
16707
16771
  [37]: `Mixed v-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.`,
@@ -16713,16 +16777,17 @@ const errorMessages = {
16713
16777
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16714
16778
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16715
16779
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16716
- [45]: `Error parsing JavaScript expression: `,
16717
- [46]: `<KeepAlive> expects exactly one child component.`,
16718
- [51]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16780
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
16781
+ [46]: `Error parsing JavaScript expression: `,
16782
+ [47]: `<KeepAlive> expects exactly one child component.`,
16783
+ [52]: `@vnode-* hooks in templates are no longer supported. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support has been removed in 3.4.`,
16719
16784
  // generic errors
16720
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16721
- [48]: `ES module mode is not supported in this build of compiler.`,
16722
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16723
- [50]: `"scopeId" option is only supported in module mode.`,
16785
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16786
+ [49]: `ES module mode is not supported in this build of compiler.`,
16787
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16788
+ [51]: `"scopeId" option is only supported in module mode.`,
16724
16789
  // just to fulfill types
16725
- [53]: ``
16790
+ [54]: ``
16726
16791
  };
16727
16792
 
16728
16793
  const isStaticExp = (p) => p.type === 4 && p.isStatic;
@@ -18912,7 +18977,7 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
18912
18977
  }
18913
18978
  context.onError(
18914
18979
  createCompilerError(
18915
- 45,
18980
+ 46,
18916
18981
  node.loc,
18917
18982
  void 0,
18918
18983
  message
@@ -19678,7 +19743,7 @@ const transformElement = (node, context) => {
19678
19743
  patchFlag |= 1024;
19679
19744
  if (node.children.length > 1) {
19680
19745
  context.onError(
19681
- createCompilerError(46, {
19746
+ createCompilerError(47, {
19682
19747
  start: node.children[0].loc.start,
19683
19748
  end: node.children[node.children.length - 1].loc.end,
19684
19749
  source: ""
@@ -20265,7 +20330,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
20265
20330
  if (arg.isStatic) {
20266
20331
  let rawName = arg.content;
20267
20332
  if (rawName.startsWith("vnode")) {
20268
- context.onError(createCompilerError(51, arg.loc));
20333
+ context.onError(createCompilerError(52, arg.loc));
20269
20334
  }
20270
20335
  if (rawName.startsWith("vue:")) {
20271
20336
  rawName = `vnode-${rawName.slice(4)}`;
@@ -20498,6 +20563,10 @@ const transformModel$1 = (dir, node, context) => {
20498
20563
  context.onError(createCompilerError(44, exp.loc));
20499
20564
  return createTransformProps();
20500
20565
  }
20566
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
20567
+ context.onError(createCompilerError(45, exp.loc));
20568
+ return createTransformProps();
20569
+ }
20501
20570
  if (!expString.trim() || !isMemberExpression(exp) && true) {
20502
20571
  context.onError(
20503
20572
  createCompilerError(42, exp.loc)
@@ -20726,7 +20795,7 @@ const transformVBindShorthand = (node, context) => {
20726
20795
  if (arg.type !== 4 || !arg.isStatic) {
20727
20796
  context.onError(
20728
20797
  createCompilerError(
20729
- 52,
20798
+ 53,
20730
20799
  arg.loc
20731
20800
  )
20732
20801
  );
@@ -20770,17 +20839,17 @@ function baseCompile(source, options = {}) {
20770
20839
  const isModuleMode = options.mode === "module";
20771
20840
  {
20772
20841
  if (options.prefixIdentifiers === true) {
20773
- onError(createCompilerError(47));
20774
- } else if (isModuleMode) {
20775
20842
  onError(createCompilerError(48));
20843
+ } else if (isModuleMode) {
20844
+ onError(createCompilerError(49));
20776
20845
  }
20777
20846
  }
20778
20847
  const prefixIdentifiers = false;
20779
20848
  if (options.cacheHandlers) {
20780
- onError(createCompilerError(49));
20849
+ onError(createCompilerError(50));
20781
20850
  }
20782
20851
  if (options.scopeId && !isModuleMode) {
20783
- onError(createCompilerError(50));
20852
+ onError(createCompilerError(51));
20784
20853
  }
20785
20854
  const resolvedOptions = extend({}, options, {
20786
20855
  prefixIdentifiers
@@ -20808,26 +20877,26 @@ function baseCompile(source, options = {}) {
20808
20877
 
20809
20878
  const noopDirectiveTransform = () => ({ props: [] });
20810
20879
 
20811
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
20812
- const V_MODEL_CHECKBOX = Symbol(
20880
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
20881
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
20813
20882
  `vModelCheckbox`
20814
20883
  );
20815
- const V_MODEL_TEXT = Symbol(`vModelText` );
20816
- const V_MODEL_SELECT = Symbol(
20884
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
20885
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
20817
20886
  `vModelSelect`
20818
20887
  );
20819
- const V_MODEL_DYNAMIC = Symbol(
20888
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
20820
20889
  `vModelDynamic`
20821
20890
  );
20822
- const V_ON_WITH_MODIFIERS = Symbol(
20891
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
20823
20892
  `vOnModifiersGuard`
20824
20893
  );
20825
- const V_ON_WITH_KEYS = Symbol(
20894
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
20826
20895
  `vOnKeysGuard`
20827
20896
  );
20828
- const V_SHOW = Symbol(`vShow` );
20829
- const TRANSITION = Symbol(`Transition` );
20830
- const TRANSITION_GROUP = Symbol(
20897
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
20898
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
20899
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
20831
20900
  `TransitionGroup`
20832
20901
  );
20833
20902
  registerRuntimeHelpers({
@@ -20938,31 +21007,31 @@ function createDOMCompilerError(code, loc) {
20938
21007
  );
20939
21008
  }
20940
21009
  const DOMErrorMessages = {
20941
- [53]: `v-html is missing expression.`,
20942
- [54]: `v-html will override element children.`,
20943
- [55]: `v-text is missing expression.`,
20944
- [56]: `v-text will override element children.`,
20945
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
20946
- [58]: `v-model argument is not supported on plain elements.`,
20947
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
20948
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
20949
- [61]: `v-show is missing expression.`,
20950
- [62]: `<Transition> expects exactly one child element or component.`,
20951
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
21010
+ [54]: `v-html is missing expression.`,
21011
+ [55]: `v-html will override element children.`,
21012
+ [56]: `v-text is missing expression.`,
21013
+ [57]: `v-text will override element children.`,
21014
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21015
+ [59]: `v-model argument is not supported on plain elements.`,
21016
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21017
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21018
+ [62]: `v-show is missing expression.`,
21019
+ [63]: `<Transition> expects exactly one child element or component.`,
21020
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
20952
21021
  // just to fulfill types
20953
- [64]: ``
21022
+ [65]: ``
20954
21023
  };
20955
21024
 
20956
21025
  const transformVHtml = (dir, node, context) => {
20957
21026
  const { exp, loc } = dir;
20958
21027
  if (!exp) {
20959
21028
  context.onError(
20960
- createDOMCompilerError(53, loc)
21029
+ createDOMCompilerError(54, loc)
20961
21030
  );
20962
21031
  }
20963
21032
  if (node.children.length) {
20964
21033
  context.onError(
20965
- createDOMCompilerError(54, loc)
21034
+ createDOMCompilerError(55, loc)
20966
21035
  );
20967
21036
  node.children.length = 0;
20968
21037
  }
@@ -20980,12 +21049,12 @@ const transformVText = (dir, node, context) => {
20980
21049
  const { exp, loc } = dir;
20981
21050
  if (!exp) {
20982
21051
  context.onError(
20983
- createDOMCompilerError(55, loc)
21052
+ createDOMCompilerError(56, loc)
20984
21053
  );
20985
21054
  }
20986
21055
  if (node.children.length) {
20987
21056
  context.onError(
20988
- createDOMCompilerError(56, loc)
21057
+ createDOMCompilerError(57, loc)
20989
21058
  );
20990
21059
  node.children.length = 0;
20991
21060
  }
@@ -21011,7 +21080,7 @@ const transformModel = (dir, node, context) => {
21011
21080
  if (dir.arg) {
21012
21081
  context.onError(
21013
21082
  createDOMCompilerError(
21014
- 58,
21083
+ 59,
21015
21084
  dir.arg.loc
21016
21085
  )
21017
21086
  );
@@ -21021,7 +21090,7 @@ const transformModel = (dir, node, context) => {
21021
21090
  if (value && isStaticArgOf(value.arg, "value")) {
21022
21091
  context.onError(
21023
21092
  createDOMCompilerError(
21024
- 60,
21093
+ 61,
21025
21094
  value.loc
21026
21095
  )
21027
21096
  );
@@ -21049,7 +21118,7 @@ const transformModel = (dir, node, context) => {
21049
21118
  isInvalidType = true;
21050
21119
  context.onError(
21051
21120
  createDOMCompilerError(
21052
- 59,
21121
+ 60,
21053
21122
  dir.loc
21054
21123
  )
21055
21124
  );
@@ -21075,7 +21144,7 @@ const transformModel = (dir, node, context) => {
21075
21144
  } else {
21076
21145
  context.onError(
21077
21146
  createDOMCompilerError(
21078
- 57,
21147
+ 58,
21079
21148
  dir.loc
21080
21149
  )
21081
21150
  );
@@ -21186,7 +21255,7 @@ const transformShow = (dir, node, context) => {
21186
21255
  const { exp, loc } = dir;
21187
21256
  if (!exp) {
21188
21257
  context.onError(
21189
- createDOMCompilerError(61, loc)
21258
+ createDOMCompilerError(62, loc)
21190
21259
  );
21191
21260
  }
21192
21261
  return {
@@ -21210,7 +21279,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
21210
21279
  }
21211
21280
  if (hasMultipleChildren(node)) {
21212
21281
  onError(
21213
- createDOMCompilerError(62, {
21282
+ createDOMCompilerError(63, {
21214
21283
  start: node.children[0].loc.start,
21215
21284
  end: node.children[node.children.length - 1].loc.end,
21216
21285
  source: ""
@@ -21245,7 +21314,7 @@ const ignoreSideEffectTags = (node, context) => {
21245
21314
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
21246
21315
  context.onError(
21247
21316
  createDOMCompilerError(
21248
- 63,
21317
+ 64,
21249
21318
  node.loc
21250
21319
  )
21251
21320
  );
@@ -21521,4 +21590,4 @@ Vue.compile = compileToFunction;
21521
21590
 
21522
21591
  const configureCompat = Vue.configureCompat;
21523
21592
 
21524
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
21593
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, Vue as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };