@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.
package/dist/vue.cjs.js CHANGED
@@ -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
  **/
@@ -7,7 +7,7 @@
7
7
 
8
8
  var parser = require('@babel/parser');
9
9
  var estreeWalker = require('estree-walker');
10
- var decode_js = require('entities/lib/decode.js');
10
+ var decode = require('entities/decode');
11
11
  var sourceMapJs = require('source-map-js');
12
12
 
13
13
  // @__NO_SIDE_EFFECTS__
@@ -877,13 +877,13 @@ class Dep {
877
877
  }
878
878
  }
879
879
  const targetMap = /* @__PURE__ */ new WeakMap();
880
- const ITERATE_KEY = Symbol(
880
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
881
881
  "Object iterate"
882
882
  );
883
- const MAP_KEY_ITERATE_KEY = Symbol(
883
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
884
884
  "Map keys iterate"
885
885
  );
886
- const ARRAY_ITERATE_KEY = Symbol(
886
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
887
887
  "Array iterate"
888
888
  );
889
889
  function track(target, type, key) {
@@ -2884,10 +2884,10 @@ function flushPostFlushCbs(seen) {
2884
2884
  }
2885
2885
  }
2886
2886
  let isFlushing = false;
2887
- function flushOnAppMount() {
2887
+ function flushOnAppMount(instance) {
2888
2888
  if (!isFlushing) {
2889
2889
  isFlushing = true;
2890
- flushPreFlushCbs();
2890
+ flushPreFlushCbs(instance);
2891
2891
  flushPostFlushCbs();
2892
2892
  isFlushing = false;
2893
2893
  }
@@ -3621,65 +3621,6 @@ function emit$1(instance, event, args) {
3621
3621
  return instance.proxy;
3622
3622
  }
3623
3623
 
3624
- const compatModelEventPrefix = `onModelCompat:`;
3625
- const warnedTypes = /* @__PURE__ */ new WeakSet();
3626
- function convertLegacyVModelProps(vnode) {
3627
- const { type, shapeFlag, props, dynamicProps } = vnode;
3628
- const comp = type;
3629
- if (shapeFlag & 6 && props && "modelValue" in props) {
3630
- if (!isCompatEnabled$1(
3631
- "COMPONENT_V_MODEL",
3632
- // this is a special case where we want to use the vnode component's
3633
- // compat config instead of the current rendering instance (which is the
3634
- // parent of the component that exposes v-model)
3635
- { type }
3636
- )) {
3637
- return;
3638
- }
3639
- if (!warnedTypes.has(comp)) {
3640
- pushWarningContext(vnode);
3641
- warnDeprecation$1("COMPONENT_V_MODEL", { type }, comp);
3642
- popWarningContext();
3643
- warnedTypes.add(comp);
3644
- }
3645
- const model = comp.model || {};
3646
- applyModelFromMixins(model, comp.mixins);
3647
- const { prop = "value", event = "input" } = model;
3648
- if (prop !== "modelValue") {
3649
- props[prop] = props.modelValue;
3650
- delete props.modelValue;
3651
- }
3652
- if (dynamicProps) {
3653
- dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
3654
- }
3655
- props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
3656
- delete props["onUpdate:modelValue"];
3657
- }
3658
- }
3659
- function applyModelFromMixins(model, mixins) {
3660
- if (mixins) {
3661
- mixins.forEach((m) => {
3662
- if (m.model) extend(model, m.model);
3663
- if (m.mixins) applyModelFromMixins(model, m.mixins);
3664
- });
3665
- }
3666
- }
3667
- function compatModelEmit(instance, event, args) {
3668
- if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
3669
- return;
3670
- }
3671
- const props = instance.vnode.props;
3672
- const modelHandler = props && props[compatModelEventPrefix + event];
3673
- if (modelHandler) {
3674
- callWithErrorHandling(
3675
- modelHandler,
3676
- instance,
3677
- 6,
3678
- args
3679
- );
3680
- }
3681
- }
3682
-
3683
3624
  let currentRenderingInstance = null;
3684
3625
  let currentScopeId = null;
3685
3626
  function setCurrentRenderingInstance(instance) {
@@ -3830,7 +3771,203 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3830
3771
  }
3831
3772
  }
3832
3773
 
3833
- const TeleportEndKey = Symbol("_vte");
3774
+ function provide(key, value) {
3775
+ {
3776
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3777
+ warn$1(`provide() can only be used inside setup().`);
3778
+ }
3779
+ }
3780
+ if (currentInstance) {
3781
+ let provides = currentInstance.provides;
3782
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3783
+ if (parentProvides === provides) {
3784
+ provides = currentInstance.provides = Object.create(parentProvides);
3785
+ }
3786
+ provides[key] = value;
3787
+ }
3788
+ }
3789
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3790
+ const instance = getCurrentGenericInstance();
3791
+ if (instance || currentApp) {
3792
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3793
+ if (provides && key in provides) {
3794
+ return provides[key];
3795
+ } else if (arguments.length > 1) {
3796
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3797
+ } else {
3798
+ warn$1(`injection "${String(key)}" not found.`);
3799
+ }
3800
+ } else {
3801
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3802
+ }
3803
+ }
3804
+ function hasInjectionContext() {
3805
+ return !!(getCurrentGenericInstance() || currentApp);
3806
+ }
3807
+
3808
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3809
+ const useSSRContext = () => {
3810
+ {
3811
+ const ctx = inject(ssrContextKey);
3812
+ if (!ctx) {
3813
+ warn$1(
3814
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3815
+ );
3816
+ }
3817
+ return ctx;
3818
+ }
3819
+ };
3820
+
3821
+ function watchEffect(effect, options) {
3822
+ return doWatch(effect, null, options);
3823
+ }
3824
+ function watchPostEffect(effect, options) {
3825
+ return doWatch(
3826
+ effect,
3827
+ null,
3828
+ extend({}, options, { flush: "post" })
3829
+ );
3830
+ }
3831
+ function watchSyncEffect(effect, options) {
3832
+ return doWatch(
3833
+ effect,
3834
+ null,
3835
+ extend({}, options, { flush: "sync" })
3836
+ );
3837
+ }
3838
+ function watch(source, cb, options) {
3839
+ if (!isFunction(cb)) {
3840
+ warn$1(
3841
+ `\`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.`
3842
+ );
3843
+ }
3844
+ return doWatch(source, cb, options);
3845
+ }
3846
+ class RenderWatcherEffect extends WatcherEffect {
3847
+ constructor(instance, source, cb, options, flush) {
3848
+ super(source, cb, options);
3849
+ this.flush = flush;
3850
+ const job = () => {
3851
+ if (this.dirty) {
3852
+ this.run();
3853
+ }
3854
+ };
3855
+ if (cb) {
3856
+ this.flags |= 128;
3857
+ job.flags |= 2;
3858
+ }
3859
+ if (instance) {
3860
+ job.i = instance;
3861
+ }
3862
+ this.job = job;
3863
+ }
3864
+ notify() {
3865
+ const flags = this.flags;
3866
+ if (!(flags & 256)) {
3867
+ const flush = this.flush;
3868
+ const job = this.job;
3869
+ if (flush === "post") {
3870
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3871
+ } else if (flush === "pre") {
3872
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3873
+ } else {
3874
+ job();
3875
+ }
3876
+ }
3877
+ }
3878
+ }
3879
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3880
+ const { immediate, deep, flush = "pre", once } = options;
3881
+ if (!cb) {
3882
+ if (immediate !== void 0) {
3883
+ warn$1(
3884
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3885
+ );
3886
+ }
3887
+ if (deep !== void 0) {
3888
+ warn$1(
3889
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3890
+ );
3891
+ }
3892
+ if (once !== void 0) {
3893
+ warn$1(
3894
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3895
+ );
3896
+ }
3897
+ }
3898
+ const baseWatchOptions = extend({}, options);
3899
+ baseWatchOptions.onWarn = warn$1;
3900
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3901
+ let ssrCleanup;
3902
+ if (isInSSRComponentSetup) {
3903
+ if (flush === "sync") {
3904
+ const ctx = useSSRContext();
3905
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3906
+ } else if (!runsImmediately) {
3907
+ const watchStopHandle = () => {
3908
+ };
3909
+ watchStopHandle.stop = NOOP;
3910
+ watchStopHandle.resume = NOOP;
3911
+ watchStopHandle.pause = NOOP;
3912
+ return watchStopHandle;
3913
+ }
3914
+ }
3915
+ const instance = currentInstance;
3916
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3917
+ const effect = new RenderWatcherEffect(
3918
+ instance,
3919
+ source,
3920
+ cb,
3921
+ baseWatchOptions,
3922
+ flush
3923
+ );
3924
+ if (cb) {
3925
+ effect.run(true);
3926
+ } else if (flush === "post") {
3927
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3928
+ } else {
3929
+ effect.run(true);
3930
+ }
3931
+ const stop = effect.stop.bind(effect);
3932
+ stop.pause = effect.pause.bind(effect);
3933
+ stop.resume = effect.resume.bind(effect);
3934
+ stop.stop = stop;
3935
+ if (isInSSRComponentSetup) {
3936
+ if (ssrCleanup) {
3937
+ ssrCleanup.push(stop);
3938
+ } else if (runsImmediately) {
3939
+ stop();
3940
+ }
3941
+ }
3942
+ return stop;
3943
+ }
3944
+ function instanceWatch(source, value, options) {
3945
+ const publicThis = this.proxy;
3946
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3947
+ let cb;
3948
+ if (isFunction(value)) {
3949
+ cb = value;
3950
+ } else {
3951
+ cb = value.handler;
3952
+ options = value;
3953
+ }
3954
+ const prev = setCurrentInstance(this);
3955
+ const res = doWatch(getter, cb.bind(publicThis), options);
3956
+ setCurrentInstance(...prev);
3957
+ return res;
3958
+ }
3959
+ function createPathGetter(ctx, path) {
3960
+ const segments = path.split(".");
3961
+ return () => {
3962
+ let cur = ctx;
3963
+ for (let i = 0; i < segments.length && cur; i++) {
3964
+ cur = cur[segments[i]];
3965
+ }
3966
+ return cur;
3967
+ };
3968
+ }
3969
+
3970
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3834
3971
  const isTeleport = (type) => type.__isTeleport;
3835
3972
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3836
3973
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -4202,8 +4339,8 @@ function prepareAnchor(target, vnode, createText, insert) {
4202
4339
  return targetAnchor;
4203
4340
  }
4204
4341
 
4205
- const leaveCbKey = Symbol("_leaveCb");
4206
- const enterCbKey$1 = Symbol("_enterCb");
4342
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
4343
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
4207
4344
  function useTransitionState() {
4208
4345
  const state = {
4209
4346
  isMounted: false,
@@ -5819,7 +5956,9 @@ const KeepAliveImpl = {
5819
5956
  }
5820
5957
  function pruneCache(filter) {
5821
5958
  cache.forEach((vnode, key) => {
5822
- const name = getComponentName(vnode.type);
5959
+ const name = getComponentName(
5960
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5961
+ );
5823
5962
  if (name && !filter(name)) {
5824
5963
  pruneCacheEntry(key);
5825
5964
  }
@@ -6158,7 +6297,7 @@ const FILTERS = "filters";
6158
6297
  function resolveComponent(name, maybeSelfReference) {
6159
6298
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
6160
6299
  }
6161
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
6300
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
6162
6301
  function resolveDynamicComponent(component) {
6163
6302
  if (isString(component)) {
6164
6303
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -6600,14 +6739,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
6600
6739
  }
6601
6740
  }
6602
6741
 
6603
- function toHandlers(obj, preserveCaseIfNecessary) {
6742
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
6604
6743
  const ret = {};
6605
6744
  if (!isObject(obj)) {
6606
6745
  warn$1(`v-on with no argument expects an object value.`);
6607
6746
  return ret;
6608
6747
  }
6609
6748
  for (const key in obj) {
6610
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
6749
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
6611
6750
  }
6612
6751
  return ret;
6613
6752
  }
@@ -7748,7 +7887,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
7748
7887
  return vm;
7749
7888
  }
7750
7889
  }
7751
- Vue.version = `2.6.14-compat:${"3.6.0-alpha.7"}`;
7890
+ Vue.version = `2.6.14-compat:${"3.6.0-beta.1"}`;
7752
7891
  Vue.config = singletonApp.config;
7753
7892
  Vue.use = (plugin, ...options) => {
7754
7893
  if (plugin && isFunction(plugin.install)) {
@@ -8240,272 +8379,142 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
8240
8379
  }
8241
8380
  isMounted = true;
8242
8381
  app._container = rootContainer;
8243
- rootContainer.__vue_app__ = app;
8244
- return getPublicInstance(instance);
8245
- } else {
8246
- warn$1(
8247
- `App has already been mounted.
8248
- 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)\``
8249
- );
8250
- }
8251
- },
8252
- onUnmount(cleanupFn) {
8253
- if (typeof cleanupFn !== "function") {
8254
- warn$1(
8255
- `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8256
- );
8257
- }
8258
- pluginCleanupFns.push(cleanupFn);
8259
- },
8260
- unmount() {
8261
- if (isMounted) {
8262
- callWithAsyncErrorHandling(
8263
- pluginCleanupFns,
8264
- app._instance,
8265
- 16
8266
- );
8267
- unmount(app);
8268
- {
8269
- app._instance = null;
8270
- devtoolsUnmountApp(app);
8271
- }
8272
- delete app._container.__vue_app__;
8273
- } else {
8274
- warn$1(`Cannot unmount an app that is not mounted.`);
8275
- }
8276
- },
8277
- provide(key, value) {
8278
- if (key in context.provides) {
8279
- if (hasOwn(context.provides, key)) {
8280
- warn$1(
8281
- `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8282
- );
8283
- } else {
8284
- warn$1(
8285
- `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8286
- );
8287
- }
8288
- }
8289
- context.provides[key] = value;
8290
- return app;
8291
- },
8292
- runWithContext(fn) {
8293
- const lastApp = currentApp;
8294
- currentApp = app;
8295
- try {
8296
- return fn();
8297
- } finally {
8298
- currentApp = lastApp;
8299
- }
8300
- }
8301
- };
8302
- {
8303
- installAppCompatProperties(
8304
- app,
8305
- context,
8306
- // vapor doesn't have compat mode so this is always passed
8307
- render
8308
- );
8309
- }
8310
- return app;
8311
- };
8312
- }
8313
- let currentApp = null;
8314
-
8315
- function provide(key, value) {
8316
- {
8317
- if (!currentInstance || currentInstance.isMounted) {
8318
- warn$1(`provide() can only be used inside setup().`);
8319
- }
8320
- }
8321
- if (currentInstance) {
8322
- let provides = currentInstance.provides;
8323
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
8324
- if (parentProvides === provides) {
8325
- provides = currentInstance.provides = Object.create(parentProvides);
8326
- }
8327
- provides[key] = value;
8328
- }
8329
- }
8330
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
8331
- const instance = getCurrentGenericInstance();
8332
- if (instance || currentApp) {
8333
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
8334
- if (provides && key in provides) {
8335
- return provides[key];
8336
- } else if (arguments.length > 1) {
8337
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
8338
- } else {
8339
- warn$1(`injection "${String(key)}" not found.`);
8340
- }
8341
- } else {
8342
- warn$1(`inject() can only be used inside setup() or functional components.`);
8343
- }
8344
- }
8345
- function hasInjectionContext() {
8346
- return !!(getCurrentGenericInstance() || currentApp);
8347
- }
8348
-
8349
- const ssrContextKey = Symbol.for("v-scx");
8350
- const useSSRContext = () => {
8351
- {
8352
- const ctx = inject(ssrContextKey);
8353
- if (!ctx) {
8354
- warn$1(
8355
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
8356
- );
8357
- }
8358
- return ctx;
8359
- }
8360
- };
8361
-
8362
- function watchEffect(effect, options) {
8363
- return doWatch(effect, null, options);
8364
- }
8365
- function watchPostEffect(effect, options) {
8366
- return doWatch(
8367
- effect,
8368
- null,
8369
- extend({}, options, { flush: "post" })
8370
- );
8371
- }
8372
- function watchSyncEffect(effect, options) {
8373
- return doWatch(
8374
- effect,
8375
- null,
8376
- extend({}, options, { flush: "sync" })
8377
- );
8378
- }
8379
- function watch(source, cb, options) {
8380
- if (!isFunction(cb)) {
8381
- warn$1(
8382
- `\`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.`
8383
- );
8384
- }
8385
- return doWatch(source, cb, options);
8386
- }
8387
- class RenderWatcherEffect extends WatcherEffect {
8388
- constructor(instance, source, cb, options, flush) {
8389
- super(source, cb, options);
8390
- this.flush = flush;
8391
- const job = () => {
8392
- if (this.dirty) {
8393
- this.run();
8382
+ rootContainer.__vue_app__ = app;
8383
+ return getPublicInstance(instance);
8384
+ } else {
8385
+ warn$1(
8386
+ `App has already been mounted.
8387
+ 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)\``
8388
+ );
8389
+ }
8390
+ },
8391
+ onUnmount(cleanupFn) {
8392
+ if (typeof cleanupFn !== "function") {
8393
+ warn$1(
8394
+ `Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
8395
+ );
8396
+ }
8397
+ pluginCleanupFns.push(cleanupFn);
8398
+ },
8399
+ unmount() {
8400
+ if (isMounted) {
8401
+ callWithAsyncErrorHandling(
8402
+ pluginCleanupFns,
8403
+ app._instance,
8404
+ 16
8405
+ );
8406
+ unmount(app);
8407
+ {
8408
+ app._instance = null;
8409
+ devtoolsUnmountApp(app);
8410
+ }
8411
+ delete app._container.__vue_app__;
8412
+ } else {
8413
+ warn$1(`Cannot unmount an app that is not mounted.`);
8414
+ }
8415
+ },
8416
+ provide(key, value) {
8417
+ if (key in context.provides) {
8418
+ if (hasOwn(context.provides, key)) {
8419
+ warn$1(
8420
+ `App already provides property with key "${String(key)}". It will be overwritten with the new value.`
8421
+ );
8422
+ } else {
8423
+ warn$1(
8424
+ `App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`
8425
+ );
8426
+ }
8427
+ }
8428
+ context.provides[key] = value;
8429
+ return app;
8430
+ },
8431
+ runWithContext(fn) {
8432
+ const lastApp = currentApp;
8433
+ currentApp = app;
8434
+ try {
8435
+ return fn();
8436
+ } finally {
8437
+ currentApp = lastApp;
8438
+ }
8394
8439
  }
8395
8440
  };
8396
- if (cb) {
8397
- this.flags |= 128;
8398
- job.flags |= 2;
8399
- }
8400
- if (instance) {
8401
- job.i = instance;
8402
- }
8403
- this.job = job;
8404
- }
8405
- notify() {
8406
- const flags = this.flags;
8407
- if (!(flags & 256)) {
8408
- const flush = this.flush;
8409
- const job = this.job;
8410
- if (flush === "post") {
8411
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
8412
- } else if (flush === "pre") {
8413
- queueJob(job, job.i ? job.i.uid : void 0, true);
8414
- } else {
8415
- job();
8416
- }
8417
- }
8418
- }
8419
- }
8420
- function doWatch(source, cb, options = EMPTY_OBJ) {
8421
- const { immediate, deep, flush = "pre", once } = options;
8422
- if (!cb) {
8423
- if (immediate !== void 0) {
8424
- warn$1(
8425
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
8441
+ {
8442
+ installAppCompatProperties(
8443
+ app,
8444
+ context,
8445
+ // vapor doesn't have compat mode so this is always passed
8446
+ render
8426
8447
  );
8427
8448
  }
8428
- if (deep !== void 0) {
8429
- warn$1(
8430
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
8431
- );
8449
+ return app;
8450
+ };
8451
+ }
8452
+ let currentApp = null;
8453
+
8454
+ const compatModelEventPrefix = `onModelCompat:`;
8455
+ const warnedTypes = /* @__PURE__ */ new WeakSet();
8456
+ function convertLegacyVModelProps(vnode) {
8457
+ const { type, shapeFlag, props, dynamicProps } = vnode;
8458
+ const comp = type;
8459
+ if (shapeFlag & 6 && props && "modelValue" in props) {
8460
+ if (!isCompatEnabled$1(
8461
+ "COMPONENT_V_MODEL",
8462
+ // this is a special case where we want to use the vnode component's
8463
+ // compat config instead of the current rendering instance (which is the
8464
+ // parent of the component that exposes v-model)
8465
+ { type }
8466
+ )) {
8467
+ return;
8432
8468
  }
8433
- if (once !== void 0) {
8434
- warn$1(
8435
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
8469
+ if (!warnedTypes.has(comp)) {
8470
+ pushWarningContext(vnode);
8471
+ warnDeprecation$1(
8472
+ "COMPONENT_V_MODEL",
8473
+ {
8474
+ type,
8475
+ appContext: vnode.ctx && vnode.ctx.appContext || createAppContext()
8476
+ },
8477
+ comp
8436
8478
  );
8479
+ popWarningContext();
8480
+ warnedTypes.add(comp);
8437
8481
  }
8438
- }
8439
- const baseWatchOptions = extend({}, options);
8440
- baseWatchOptions.onWarn = warn$1;
8441
- const runsImmediately = cb && immediate || !cb && flush !== "post";
8442
- let ssrCleanup;
8443
- if (isInSSRComponentSetup) {
8444
- if (flush === "sync") {
8445
- const ctx = useSSRContext();
8446
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
8447
- } else if (!runsImmediately) {
8448
- const watchStopHandle = () => {
8449
- };
8450
- watchStopHandle.stop = NOOP;
8451
- watchStopHandle.resume = NOOP;
8452
- watchStopHandle.pause = NOOP;
8453
- return watchStopHandle;
8482
+ const model = comp.model || {};
8483
+ applyModelFromMixins(model, comp.mixins);
8484
+ const { prop = "value", event = "input" } = model;
8485
+ if (prop !== "modelValue") {
8486
+ props[prop] = props.modelValue;
8487
+ delete props.modelValue;
8454
8488
  }
8455
- }
8456
- const instance = currentInstance;
8457
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
8458
- const effect = new RenderWatcherEffect(
8459
- instance,
8460
- source,
8461
- cb,
8462
- baseWatchOptions,
8463
- flush
8464
- );
8465
- if (cb) {
8466
- effect.run(true);
8467
- } else if (flush === "post") {
8468
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
8469
- } else {
8470
- effect.run(true);
8471
- }
8472
- const stop = effect.stop.bind(effect);
8473
- stop.pause = effect.pause.bind(effect);
8474
- stop.resume = effect.resume.bind(effect);
8475
- stop.stop = stop;
8476
- if (isInSSRComponentSetup) {
8477
- if (ssrCleanup) {
8478
- ssrCleanup.push(stop);
8479
- } else if (runsImmediately) {
8480
- stop();
8489
+ if (dynamicProps) {
8490
+ dynamicProps[dynamicProps.indexOf("modelValue")] = prop;
8481
8491
  }
8492
+ props[compatModelEventPrefix + event] = props["onUpdate:modelValue"];
8493
+ delete props["onUpdate:modelValue"];
8482
8494
  }
8483
- return stop;
8484
8495
  }
8485
- function instanceWatch(source, value, options) {
8486
- const publicThis = this.proxy;
8487
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
8488
- let cb;
8489
- if (isFunction(value)) {
8490
- cb = value;
8491
- } else {
8492
- cb = value.handler;
8493
- options = value;
8496
+ function applyModelFromMixins(model, mixins) {
8497
+ if (mixins) {
8498
+ mixins.forEach((m) => {
8499
+ if (m.model) extend(model, m.model);
8500
+ if (m.mixins) applyModelFromMixins(model, m.mixins);
8501
+ });
8494
8502
  }
8495
- const prev = setCurrentInstance(this);
8496
- const res = doWatch(getter, cb.bind(publicThis), options);
8497
- setCurrentInstance(...prev);
8498
- return res;
8499
8503
  }
8500
- function createPathGetter(ctx, path) {
8501
- const segments = path.split(".");
8502
- return () => {
8503
- let cur = ctx;
8504
- for (let i = 0; i < segments.length && cur; i++) {
8505
- cur = cur[segments[i]];
8506
- }
8507
- return cur;
8508
- };
8504
+ function compatModelEmit(instance, event, args) {
8505
+ if (!isCompatEnabled$1("COMPONENT_V_MODEL", instance)) {
8506
+ return;
8507
+ }
8508
+ const props = instance.vnode.props;
8509
+ const modelHandler = props && props[compatModelEventPrefix + event];
8510
+ if (modelHandler) {
8511
+ callWithErrorHandling(
8512
+ modelHandler,
8513
+ instance,
8514
+ 6,
8515
+ args
8516
+ );
8517
+ }
8509
8518
  }
8510
8519
 
8511
8520
  function useModel(props, name, options = EMPTY_OBJ) {
@@ -9697,6 +9706,14 @@ function isSupported() {
9697
9706
  return supported;
9698
9707
  }
9699
9708
 
9709
+ const MoveType = {
9710
+ "ENTER": 0,
9711
+ "0": "ENTER",
9712
+ "LEAVE": 1,
9713
+ "1": "LEAVE",
9714
+ "REORDER": 2,
9715
+ "2": "REORDER"
9716
+ };
9700
9717
  const queuePostRenderEffect = queueEffectWithSuspense ;
9701
9718
  function createRenderer(options) {
9702
9719
  return baseCreateRenderer(options);
@@ -9845,7 +9862,15 @@ function baseCreateRenderer(options, createHydrationFns) {
9845
9862
  } else {
9846
9863
  const el = n2.el = n1.el;
9847
9864
  if (n2.children !== n1.children) {
9848
- hostSetText(el, n2.children);
9865
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
9866
+ const childNodes = container.childNodes;
9867
+ const newChild = hostCreateText(n2.children);
9868
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
9869
+ hostInsert(newChild, container, oldChild);
9870
+ hostRemove(oldChild);
9871
+ } else {
9872
+ hostSetText(el, n2.children);
9873
+ }
9849
9874
  }
9850
9875
  }
9851
9876
  };
@@ -10231,7 +10256,7 @@ function baseCreateRenderer(options, createHydrationFns) {
10231
10256
  } else {
10232
10257
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
10233
10258
  // of renderSlot() with no valid children
10234
- n1.dynamicChildren) {
10259
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
10235
10260
  patchBlockChildren(
10236
10261
  n1.dynamicChildren,
10237
10262
  dynamicChildren,
@@ -10947,8 +10972,8 @@ function baseCreateRenderer(options, createHydrationFns) {
10947
10972
  const nextChild = c2[nextIndex];
10948
10973
  const anchorVNode = c2[nextIndex + 1];
10949
10974
  const anchor = nextIndex + 1 < l2 ? (
10950
- // #13559, fallback to el placeholder for unresolved async component
10951
- anchorVNode.el || anchorVNode.placeholder
10975
+ // #13559, #14173 fallback to el placeholder for unresolved async component
10976
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
10952
10977
  ) : parentAnchor;
10953
10978
  if (newIndexToOldIndexMap[i] === 0) {
10954
10979
  patch(
@@ -11263,9 +11288,11 @@ function baseCreateRenderer(options, createHydrationFns) {
11263
11288
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
11264
11289
  };
11265
11290
  const render = (vnode, container, namespace) => {
11291
+ let instance;
11266
11292
  if (vnode == null) {
11267
11293
  if (container._vnode) {
11268
11294
  unmount(container._vnode, null, null, true);
11295
+ instance = container._vnode.component;
11269
11296
  }
11270
11297
  } else {
11271
11298
  patch(
@@ -11279,7 +11306,7 @@ function baseCreateRenderer(options, createHydrationFns) {
11279
11306
  );
11280
11307
  }
11281
11308
  container._vnode = vnode;
11282
- flushOnAppMount();
11309
+ flushOnAppMount(instance);
11283
11310
  };
11284
11311
  const internals = {
11285
11312
  p: patch,
@@ -11371,9 +11398,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
11371
11398
  if (!shallow && c2.patchFlag !== -2)
11372
11399
  traverseStaticChildren(c1, c2);
11373
11400
  }
11374
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
11375
- c2.patchFlag !== -1) {
11376
- c2.el = c1.el;
11401
+ if (c2.type === Text) {
11402
+ if (c2.patchFlag !== -1) {
11403
+ c2.el = c1.el;
11404
+ } else {
11405
+ c2.__elIndex = i + // take fragment start anchor into account
11406
+ (n1.type === Fragment ? 1 : 0);
11407
+ }
11377
11408
  }
11378
11409
  if (c2.type === Comment && !c2.el) {
11379
11410
  c2.el = c1.el;
@@ -11409,16 +11440,24 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
11409
11440
  insert();
11410
11441
  }
11411
11442
  }
11412
- function performTransitionLeave(el, transition, remove, isElement = true) {
11443
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
11413
11444
  const performRemove = () => {
11414
11445
  remove();
11415
11446
  if (transition && !transition.persisted && transition.afterLeave) {
11416
11447
  transition.afterLeave();
11417
11448
  }
11418
11449
  };
11419
- if (isElement && transition && !transition.persisted) {
11450
+ if (force || isElement && transition && !transition.persisted) {
11420
11451
  const { leave, delayLeave } = transition;
11421
- const performLeave = () => leave(el, performRemove);
11452
+ const performLeave = () => {
11453
+ if (el._isLeaving && force) {
11454
+ el[leaveCbKey](
11455
+ true
11456
+ /* cancelled */
11457
+ );
11458
+ }
11459
+ leave(el, performRemove);
11460
+ };
11422
11461
  if (delayLeave) {
11423
11462
  delayLeave(el, performRemove, performLeave);
11424
11463
  } else {
@@ -11474,6 +11513,16 @@ function getInheritedScopeIds(vnode, parentComponent) {
11474
11513
  }
11475
11514
  return inheritedScopeIds;
11476
11515
  }
11516
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
11517
+ if (anchorVnode.placeholder) {
11518
+ return anchorVnode.placeholder;
11519
+ }
11520
+ const instance = anchorVnode.component;
11521
+ if (instance) {
11522
+ return resolveAsyncComponentPlaceholder(instance.subTree);
11523
+ }
11524
+ return null;
11525
+ }
11477
11526
 
11478
11527
  const isSuspense = (type) => type.__isSuspense;
11479
11528
  let suspenseId = 0;
@@ -12113,11 +12162,11 @@ function convertLegacyComponent(comp, instance) {
12113
12162
  return comp;
12114
12163
  }
12115
12164
 
12116
- const Fragment = Symbol.for("v-fgt");
12117
- const Text = Symbol.for("v-txt");
12118
- const Comment = Symbol.for("v-cmt");
12119
- const Static = Symbol.for("v-stc");
12120
- const VaporSlot = Symbol.for("v-vps");
12165
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
12166
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
12167
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
12168
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
12169
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
12121
12170
  const blockStack = [];
12122
12171
  let currentBlock = null;
12123
12172
  function openBlock(disableTracking = false) {
@@ -13195,7 +13244,7 @@ function isMemoSame(cached, memo) {
13195
13244
  return true;
13196
13245
  }
13197
13246
 
13198
- const version = "3.6.0-alpha.7";
13247
+ const version = "3.6.0-beta.1";
13199
13248
  const warn = warn$1 ;
13200
13249
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
13201
13250
  const devtools = devtools$1 ;
@@ -13307,7 +13356,7 @@ const nodeOps = {
13307
13356
 
13308
13357
  const TRANSITION$1 = "transition";
13309
13358
  const ANIMATION = "animation";
13310
- const vtcKey = Symbol("_vtc");
13359
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
13311
13360
  const DOMTransitionPropsValidators = {
13312
13361
  name: String,
13313
13362
  type: String,
@@ -13637,8 +13686,8 @@ function patchClass(el, value, isSVG) {
13637
13686
  }
13638
13687
  }
13639
13688
 
13640
- const vShowOriginalDisplay = Symbol("_vod");
13641
- const vShowHidden = Symbol("_vsh");
13689
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
13690
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
13642
13691
  const vShow = {
13643
13692
  // used for prop mismatch check during hydration
13644
13693
  name: "show",
@@ -13687,7 +13736,7 @@ function initVShowForSSR() {
13687
13736
  };
13688
13737
  }
13689
13738
 
13690
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
13739
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
13691
13740
  function useCssVars(getter) {
13692
13741
  return;
13693
13742
  }
@@ -13817,7 +13866,7 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
13817
13866
  const isEnumeratedAttr = /* @__PURE__ */ makeMap("contenteditable,draggable,spellcheck") ;
13818
13867
  function compatCoerceAttr(el, key, value, instance = null) {
13819
13868
  if (isEnumeratedAttr(key)) {
13820
- const v2CoercedValue = value === null ? "false" : typeof value !== "boolean" && value !== void 0 ? "true" : null;
13869
+ const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
13821
13870
  if (v2CoercedValue && compatUtils.softAssertCompatEnabled(
13822
13871
  "ATTR_ENUMERATED_COERCION",
13823
13872
  instance,
@@ -13912,7 +13961,7 @@ function addEventListener(el, event, handler, options) {
13912
13961
  function removeEventListener(el, event, handler, options) {
13913
13962
  el.removeEventListener(event, handler, options);
13914
13963
  }
13915
- const veiKey = Symbol("_vei");
13964
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
13916
13965
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
13917
13966
  const invokers = el[veiKey] || (el[veiKey] = {});
13918
13967
  const existingInvoker = invokers[rawName];
@@ -14574,8 +14623,8 @@ function useCssModule(name = "$style") {
14574
14623
 
14575
14624
  const positionMap = /* @__PURE__ */ new WeakMap();
14576
14625
  const newPositionMap = /* @__PURE__ */ new WeakMap();
14577
- const moveCbKey = Symbol("_moveCb");
14578
- const enterCbKey = Symbol("_enterCb");
14626
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
14627
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
14579
14628
  const decorate = (t) => {
14580
14629
  delete t.props.mode;
14581
14630
  {
@@ -14747,7 +14796,7 @@ function onCompositionEnd(e) {
14747
14796
  target.dispatchEvent(new Event("input"));
14748
14797
  }
14749
14798
  }
14750
- const assignKey = Symbol("_assign");
14799
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
14751
14800
  const vModelText = {
14752
14801
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
14753
14802
  el[assignKey] = getModelAssigner(vnode);
@@ -15283,6 +15332,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
15283
15332
  ErrorTypeStrings: ErrorTypeStrings,
15284
15333
  Fragment: Fragment,
15285
15334
  KeepAlive: KeepAlive,
15335
+ MoveType: MoveType,
15286
15336
  ReactiveEffect: ReactiveEffect,
15287
15337
  Static: Static,
15288
15338
  Suspense: Suspense,
@@ -15465,81 +15515,81 @@ function createCompatVue() {
15465
15515
  return Vue;
15466
15516
  }
15467
15517
 
15468
- const FRAGMENT = Symbol(`Fragment` );
15469
- const TELEPORT = Symbol(`Teleport` );
15470
- const SUSPENSE = Symbol(`Suspense` );
15471
- const KEEP_ALIVE = Symbol(`KeepAlive` );
15472
- const BASE_TRANSITION = Symbol(
15518
+ const FRAGMENT = /* @__PURE__ */ Symbol(`Fragment` );
15519
+ const TELEPORT = /* @__PURE__ */ Symbol(`Teleport` );
15520
+ const SUSPENSE = /* @__PURE__ */ Symbol(`Suspense` );
15521
+ const KEEP_ALIVE = /* @__PURE__ */ Symbol(`KeepAlive` );
15522
+ const BASE_TRANSITION = /* @__PURE__ */ Symbol(
15473
15523
  `BaseTransition`
15474
15524
  );
15475
- const OPEN_BLOCK = Symbol(`openBlock` );
15476
- const CREATE_BLOCK = Symbol(`createBlock` );
15477
- const CREATE_ELEMENT_BLOCK = Symbol(
15525
+ const OPEN_BLOCK = /* @__PURE__ */ Symbol(`openBlock` );
15526
+ const CREATE_BLOCK = /* @__PURE__ */ Symbol(`createBlock` );
15527
+ const CREATE_ELEMENT_BLOCK = /* @__PURE__ */ Symbol(
15478
15528
  `createElementBlock`
15479
15529
  );
15480
- const CREATE_VNODE = Symbol(`createVNode` );
15481
- const CREATE_ELEMENT_VNODE = Symbol(
15530
+ const CREATE_VNODE = /* @__PURE__ */ Symbol(`createVNode` );
15531
+ const CREATE_ELEMENT_VNODE = /* @__PURE__ */ Symbol(
15482
15532
  `createElementVNode`
15483
15533
  );
15484
- const CREATE_COMMENT = Symbol(
15534
+ const CREATE_COMMENT = /* @__PURE__ */ Symbol(
15485
15535
  `createCommentVNode`
15486
15536
  );
15487
- const CREATE_TEXT = Symbol(
15537
+ const CREATE_TEXT = /* @__PURE__ */ Symbol(
15488
15538
  `createTextVNode`
15489
15539
  );
15490
- const CREATE_STATIC = Symbol(
15540
+ const CREATE_STATIC = /* @__PURE__ */ Symbol(
15491
15541
  `createStaticVNode`
15492
15542
  );
15493
- const RESOLVE_COMPONENT = Symbol(
15543
+ const RESOLVE_COMPONENT = /* @__PURE__ */ Symbol(
15494
15544
  `resolveComponent`
15495
15545
  );
15496
- const RESOLVE_DYNAMIC_COMPONENT = Symbol(
15546
+ const RESOLVE_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol(
15497
15547
  `resolveDynamicComponent`
15498
15548
  );
15499
- const RESOLVE_DIRECTIVE = Symbol(
15549
+ const RESOLVE_DIRECTIVE = /* @__PURE__ */ Symbol(
15500
15550
  `resolveDirective`
15501
15551
  );
15502
- const RESOLVE_FILTER = Symbol(
15552
+ const RESOLVE_FILTER = /* @__PURE__ */ Symbol(
15503
15553
  `resolveFilter`
15504
15554
  );
15505
- const WITH_DIRECTIVES = Symbol(
15555
+ const WITH_DIRECTIVES = /* @__PURE__ */ Symbol(
15506
15556
  `withDirectives`
15507
15557
  );
15508
- const RENDER_LIST = Symbol(`renderList` );
15509
- const RENDER_SLOT = Symbol(`renderSlot` );
15510
- const CREATE_SLOTS = Symbol(`createSlots` );
15511
- const TO_DISPLAY_STRING = Symbol(
15558
+ const RENDER_LIST = /* @__PURE__ */ Symbol(`renderList` );
15559
+ const RENDER_SLOT = /* @__PURE__ */ Symbol(`renderSlot` );
15560
+ const CREATE_SLOTS = /* @__PURE__ */ Symbol(`createSlots` );
15561
+ const TO_DISPLAY_STRING = /* @__PURE__ */ Symbol(
15512
15562
  `toDisplayString`
15513
15563
  );
15514
- const MERGE_PROPS = Symbol(`mergeProps` );
15515
- const NORMALIZE_CLASS = Symbol(
15564
+ const MERGE_PROPS = /* @__PURE__ */ Symbol(`mergeProps` );
15565
+ const NORMALIZE_CLASS = /* @__PURE__ */ Symbol(
15516
15566
  `normalizeClass`
15517
15567
  );
15518
- const NORMALIZE_STYLE = Symbol(
15568
+ const NORMALIZE_STYLE = /* @__PURE__ */ Symbol(
15519
15569
  `normalizeStyle`
15520
15570
  );
15521
- const NORMALIZE_PROPS = Symbol(
15571
+ const NORMALIZE_PROPS = /* @__PURE__ */ Symbol(
15522
15572
  `normalizeProps`
15523
15573
  );
15524
- const GUARD_REACTIVE_PROPS = Symbol(
15574
+ const GUARD_REACTIVE_PROPS = /* @__PURE__ */ Symbol(
15525
15575
  `guardReactiveProps`
15526
15576
  );
15527
- const TO_HANDLERS = Symbol(`toHandlers` );
15528
- const CAMELIZE = Symbol(`camelize` );
15529
- const CAPITALIZE = Symbol(`capitalize` );
15530
- const TO_HANDLER_KEY = Symbol(
15577
+ const TO_HANDLERS = /* @__PURE__ */ Symbol(`toHandlers` );
15578
+ const CAMELIZE = /* @__PURE__ */ Symbol(`camelize` );
15579
+ const CAPITALIZE = /* @__PURE__ */ Symbol(`capitalize` );
15580
+ const TO_HANDLER_KEY = /* @__PURE__ */ Symbol(
15531
15581
  `toHandlerKey`
15532
15582
  );
15533
- const SET_BLOCK_TRACKING = Symbol(
15583
+ const SET_BLOCK_TRACKING = /* @__PURE__ */ Symbol(
15534
15584
  `setBlockTracking`
15535
15585
  );
15536
- const PUSH_SCOPE_ID = Symbol(`pushScopeId` );
15537
- const POP_SCOPE_ID = Symbol(`popScopeId` );
15538
- const WITH_CTX = Symbol(`withCtx` );
15539
- const UNREF = Symbol(`unref` );
15540
- const IS_REF = Symbol(`isRef` );
15541
- const WITH_MEMO = Symbol(`withMemo` );
15542
- const IS_MEMO_SAME = Symbol(`isMemoSame` );
15586
+ const PUSH_SCOPE_ID = /* @__PURE__ */ Symbol(`pushScopeId` );
15587
+ const POP_SCOPE_ID = /* @__PURE__ */ Symbol(`popScopeId` );
15588
+ const WITH_CTX = /* @__PURE__ */ Symbol(`withCtx` );
15589
+ const UNREF = /* @__PURE__ */ Symbol(`unref` );
15590
+ const IS_REF = /* @__PURE__ */ Symbol(`isRef` );
15591
+ const WITH_MEMO = /* @__PURE__ */ Symbol(`withMemo` );
15592
+ const IS_MEMO_SAME = /* @__PURE__ */ Symbol(`isMemoSame` );
15543
15593
  const helperNameMap = {
15544
15594
  [FRAGMENT]: `Fragment`,
15545
15595
  [TELEPORT]: `Teleport`,
@@ -15809,8 +15859,8 @@ class Tokenizer {
15809
15859
  this.currentSequence = void 0;
15810
15860
  this.sequenceIndex = 0;
15811
15861
  {
15812
- this.entityDecoder = new decode_js.EntityDecoder(
15813
- decode_js.htmlDecodeTree,
15862
+ this.entityDecoder = new decode.EntityDecoder(
15863
+ decode.htmlDecodeTree,
15814
15864
  (cp, consumed) => this.emitCodePoint(cp, consumed)
15815
15865
  );
15816
15866
  }
@@ -15840,14 +15890,28 @@ class Tokenizer {
15840
15890
  getPos(index) {
15841
15891
  let line = 1;
15842
15892
  let column = index + 1;
15843
- for (let i = this.newlines.length - 1; i >= 0; i--) {
15844
- const newlineIndex = this.newlines[i];
15845
- if (index > newlineIndex) {
15846
- line = i + 2;
15847
- column = index - newlineIndex;
15848
- break;
15893
+ const length = this.newlines.length;
15894
+ let j = -1;
15895
+ if (length > 100) {
15896
+ let l = -1;
15897
+ let r = length;
15898
+ while (l + 1 < r) {
15899
+ const m = l + r >>> 1;
15900
+ this.newlines[m] < index ? l = m : r = m;
15901
+ }
15902
+ j = l;
15903
+ } else {
15904
+ for (let i = length - 1; i >= 0; i--) {
15905
+ if (index > this.newlines[i]) {
15906
+ j = i;
15907
+ break;
15908
+ }
15849
15909
  }
15850
15910
  }
15911
+ if (j >= 0) {
15912
+ line = j + 2;
15913
+ column = index - this.newlines[j];
15914
+ }
15851
15915
  return {
15852
15916
  column,
15853
15917
  line,
@@ -16360,7 +16424,7 @@ class Tokenizer {
16360
16424
  this.state = 33;
16361
16425
  this.entityStart = this.index;
16362
16426
  this.entityDecoder.startEntity(
16363
- this.baseState === 1 || this.baseState === 32 ? decode_js.DecodingMode.Legacy : decode_js.DecodingMode.Attribute
16427
+ this.baseState === 1 || this.baseState === 32 ? decode.DecodingMode.Legacy : decode.DecodingMode.Attribute
16364
16428
  );
16365
16429
  }
16366
16430
  }
@@ -16579,7 +16643,7 @@ class Tokenizer {
16579
16643
  this.sectionStart = this.entityStart + consumed;
16580
16644
  this.index = this.sectionStart - 1;
16581
16645
  this.cbs.onattribentity(
16582
- decode_js.fromCodePoint(cp),
16646
+ decode.fromCodePoint(cp),
16583
16647
  this.entityStart,
16584
16648
  this.sectionStart
16585
16649
  );
@@ -16590,7 +16654,7 @@ class Tokenizer {
16590
16654
  this.sectionStart = this.entityStart + consumed;
16591
16655
  this.index = this.sectionStart - 1;
16592
16656
  this.cbs.ontextentity(
16593
- decode_js.fromCodePoint(cp),
16657
+ decode.fromCodePoint(cp),
16594
16658
  this.entityStart,
16595
16659
  this.sectionStart
16596
16660
  );
@@ -16718,7 +16782,7 @@ const errorMessages = {
16718
16782
  [32]: `v-for has invalid expression.`,
16719
16783
  [33]: `<template v-for> key should be placed on the <template> tag.`,
16720
16784
  [34]: `v-bind is missing expression.`,
16721
- [52]: `v-bind with same-name shorthand only allows static argument.`,
16785
+ [53]: `v-bind with same-name shorthand only allows static argument.`,
16722
16786
  [35]: `v-on is missing expression.`,
16723
16787
  [36]: `Unexpected custom directive on <slot> outlet.`,
16724
16788
  [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.`,
@@ -16730,16 +16794,17 @@ const errorMessages = {
16730
16794
  [43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
16731
16795
  [44]: `v-model cannot be used on a prop, because local prop bindings are not writable.
16732
16796
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
16733
- [45]: `Error parsing JavaScript expression: `,
16734
- [46]: `<KeepAlive> expects exactly one child component.`,
16735
- [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.`,
16797
+ [45]: `v-model cannot be used on a const binding because it is not writable.`,
16798
+ [46]: `Error parsing JavaScript expression: `,
16799
+ [47]: `<KeepAlive> expects exactly one child component.`,
16800
+ [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.`,
16736
16801
  // generic errors
16737
- [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16738
- [48]: `ES module mode is not supported in this build of compiler.`,
16739
- [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16740
- [50]: `"scopeId" option is only supported in module mode.`,
16802
+ [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
16803
+ [49]: `ES module mode is not supported in this build of compiler.`,
16804
+ [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
16805
+ [51]: `"scopeId" option is only supported in module mode.`,
16741
16806
  // just to fulfill types
16742
- [53]: ``
16807
+ [54]: ``
16743
16808
  };
16744
16809
 
16745
16810
  function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [], knownIds = /* @__PURE__ */ Object.create(null)) {
@@ -17463,7 +17528,7 @@ const tokenizer = new Tokenizer(stack, {
17463
17528
  let exp = getSlice(innerStart, innerEnd);
17464
17529
  if (exp.includes("&")) {
17465
17530
  {
17466
- exp = decode_js.decodeHTML(exp);
17531
+ exp = decode.decodeHTML(exp);
17467
17532
  }
17468
17533
  }
17469
17534
  addNode({
@@ -18124,7 +18189,7 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0
18124
18189
  }
18125
18190
  } catch (e) {
18126
18191
  exp.ast = false;
18127
- emitError(45, loc.start.offset, e.message);
18192
+ emitError(46, loc.start.offset, e.message);
18128
18193
  }
18129
18194
  }
18130
18195
  return exp;
@@ -19701,7 +19766,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
19701
19766
  } catch (e) {
19702
19767
  context.onError(
19703
19768
  createCompilerError(
19704
- 45,
19769
+ 46,
19705
19770
  node.loc,
19706
19771
  void 0,
19707
19772
  e.message
@@ -20585,7 +20650,7 @@ const transformElement = (node, context) => {
20585
20650
  patchFlag |= 1024;
20586
20651
  if (node.children.length > 1) {
20587
20652
  context.onError(
20588
- createCompilerError(46, {
20653
+ createCompilerError(47, {
20589
20654
  start: node.children[0].loc.start,
20590
20655
  end: node.children[node.children.length - 1].loc.end,
20591
20656
  source: ""
@@ -21248,7 +21313,7 @@ const transformOn$1 = (dir, node, context, augmentor) => {
21248
21313
  if (arg.isStatic) {
21249
21314
  let rawName = arg.content;
21250
21315
  if (rawName.startsWith("vnode")) {
21251
- context.onError(createCompilerError(51, arg.loc));
21316
+ context.onError(createCompilerError(52, arg.loc));
21252
21317
  }
21253
21318
  if (rawName.startsWith("vue:")) {
21254
21319
  rawName = `vnode-${rawName.slice(4)}`;
@@ -21510,6 +21575,10 @@ const transformModel$1 = (dir, node, context) => {
21510
21575
  context.onError(createCompilerError(44, exp.loc));
21511
21576
  return createTransformProps();
21512
21577
  }
21578
+ if (bindingType === "literal-const" || bindingType === "setup-const") {
21579
+ context.onError(createCompilerError(45, exp.loc));
21580
+ return createTransformProps();
21581
+ }
21513
21582
  const maybeRef = context.inline && (bindingType === "setup-let" || bindingType === "setup-ref" || bindingType === "setup-maybe-ref");
21514
21583
  if (!expString.trim() || !isMemberExpression(exp, context) && !maybeRef) {
21515
21584
  context.onError(
@@ -21763,7 +21832,7 @@ const transformVBindShorthand = (node, context) => {
21763
21832
  if (arg.type !== 4 || !arg.isStatic) {
21764
21833
  context.onError(
21765
21834
  createCompilerError(
21766
- 52,
21835
+ 53,
21767
21836
  arg.loc
21768
21837
  )
21769
21838
  );
@@ -21811,10 +21880,10 @@ function baseCompile(source, options = {}) {
21811
21880
  const isModuleMode = options.mode === "module";
21812
21881
  const prefixIdentifiers = options.prefixIdentifiers === true || isModuleMode;
21813
21882
  if (!prefixIdentifiers && options.cacheHandlers) {
21814
- onError(createCompilerError(49));
21883
+ onError(createCompilerError(50));
21815
21884
  }
21816
21885
  if (options.scopeId && !isModuleMode) {
21817
- onError(createCompilerError(50));
21886
+ onError(createCompilerError(51));
21818
21887
  }
21819
21888
  const resolvedOptions = extend({}, options, {
21820
21889
  prefixIdentifiers
@@ -21848,26 +21917,26 @@ function baseCompile(source, options = {}) {
21848
21917
 
21849
21918
  const noopDirectiveTransform = () => ({ props: [] });
21850
21919
 
21851
- const V_MODEL_RADIO = Symbol(`vModelRadio` );
21852
- const V_MODEL_CHECKBOX = Symbol(
21920
+ const V_MODEL_RADIO = /* @__PURE__ */ Symbol(`vModelRadio` );
21921
+ const V_MODEL_CHECKBOX = /* @__PURE__ */ Symbol(
21853
21922
  `vModelCheckbox`
21854
21923
  );
21855
- const V_MODEL_TEXT = Symbol(`vModelText` );
21856
- const V_MODEL_SELECT = Symbol(
21924
+ const V_MODEL_TEXT = /* @__PURE__ */ Symbol(`vModelText` );
21925
+ const V_MODEL_SELECT = /* @__PURE__ */ Symbol(
21857
21926
  `vModelSelect`
21858
21927
  );
21859
- const V_MODEL_DYNAMIC = Symbol(
21928
+ const V_MODEL_DYNAMIC = /* @__PURE__ */ Symbol(
21860
21929
  `vModelDynamic`
21861
21930
  );
21862
- const V_ON_WITH_MODIFIERS = Symbol(
21931
+ const V_ON_WITH_MODIFIERS = /* @__PURE__ */ Symbol(
21863
21932
  `vOnModifiersGuard`
21864
21933
  );
21865
- const V_ON_WITH_KEYS = Symbol(
21934
+ const V_ON_WITH_KEYS = /* @__PURE__ */ Symbol(
21866
21935
  `vOnKeysGuard`
21867
21936
  );
21868
- const V_SHOW = Symbol(`vShow` );
21869
- const TRANSITION = Symbol(`Transition` );
21870
- const TRANSITION_GROUP = Symbol(
21937
+ const V_SHOW = /* @__PURE__ */ Symbol(`vShow` );
21938
+ const TRANSITION = /* @__PURE__ */ Symbol(`Transition` );
21939
+ const TRANSITION_GROUP = /* @__PURE__ */ Symbol(
21871
21940
  `TransitionGroup`
21872
21941
  );
21873
21942
  registerRuntimeHelpers({
@@ -21964,31 +22033,31 @@ function createDOMCompilerError(code, loc) {
21964
22033
  );
21965
22034
  }
21966
22035
  const DOMErrorMessages = {
21967
- [53]: `v-html is missing expression.`,
21968
- [54]: `v-html will override element children.`,
21969
- [55]: `v-text is missing expression.`,
21970
- [56]: `v-text will override element children.`,
21971
- [57]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
21972
- [58]: `v-model argument is not supported on plain elements.`,
21973
- [59]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
21974
- [60]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
21975
- [61]: `v-show is missing expression.`,
21976
- [62]: `<Transition> expects exactly one child element or component.`,
21977
- [63]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
22036
+ [54]: `v-html is missing expression.`,
22037
+ [55]: `v-html will override element children.`,
22038
+ [56]: `v-text is missing expression.`,
22039
+ [57]: `v-text will override element children.`,
22040
+ [58]: `v-model can only be used on <input>, <textarea> and <select> elements.`,
22041
+ [59]: `v-model argument is not supported on plain elements.`,
22042
+ [60]: `v-model cannot be used on file inputs since they are read-only. Use a v-on:change listener instead.`,
22043
+ [61]: `Unnecessary value binding used alongside v-model. It will interfere with v-model's behavior.`,
22044
+ [62]: `v-show is missing expression.`,
22045
+ [63]: `<Transition> expects exactly one child element or component.`,
22046
+ [64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
21978
22047
  // just to fulfill types
21979
- [64]: ``
22048
+ [65]: ``
21980
22049
  };
21981
22050
 
21982
22051
  const transformVHtml = (dir, node, context) => {
21983
22052
  const { exp, loc } = dir;
21984
22053
  if (!exp) {
21985
22054
  context.onError(
21986
- createDOMCompilerError(53, loc)
22055
+ createDOMCompilerError(54, loc)
21987
22056
  );
21988
22057
  }
21989
22058
  if (node.children.length) {
21990
22059
  context.onError(
21991
- createDOMCompilerError(54, loc)
22060
+ createDOMCompilerError(55, loc)
21992
22061
  );
21993
22062
  node.children.length = 0;
21994
22063
  }
@@ -22006,12 +22075,12 @@ const transformVText = (dir, node, context) => {
22006
22075
  const { exp, loc } = dir;
22007
22076
  if (!exp) {
22008
22077
  context.onError(
22009
- createDOMCompilerError(55, loc)
22078
+ createDOMCompilerError(56, loc)
22010
22079
  );
22011
22080
  }
22012
22081
  if (node.children.length) {
22013
22082
  context.onError(
22014
- createDOMCompilerError(56, loc)
22083
+ createDOMCompilerError(57, loc)
22015
22084
  );
22016
22085
  node.children.length = 0;
22017
22086
  }
@@ -22037,7 +22106,7 @@ const transformModel = (dir, node, context) => {
22037
22106
  if (dir.arg) {
22038
22107
  context.onError(
22039
22108
  createDOMCompilerError(
22040
- 58,
22109
+ 59,
22041
22110
  dir.arg.loc
22042
22111
  )
22043
22112
  );
@@ -22047,7 +22116,7 @@ const transformModel = (dir, node, context) => {
22047
22116
  if (value && isStaticArgOf(value.arg, "value")) {
22048
22117
  context.onError(
22049
22118
  createDOMCompilerError(
22050
- 60,
22119
+ 61,
22051
22120
  value.loc
22052
22121
  )
22053
22122
  );
@@ -22075,7 +22144,7 @@ const transformModel = (dir, node, context) => {
22075
22144
  isInvalidType = true;
22076
22145
  context.onError(
22077
22146
  createDOMCompilerError(
22078
- 59,
22147
+ 60,
22079
22148
  dir.loc
22080
22149
  )
22081
22150
  );
@@ -22101,7 +22170,7 @@ const transformModel = (dir, node, context) => {
22101
22170
  } else {
22102
22171
  context.onError(
22103
22172
  createDOMCompilerError(
22104
- 57,
22173
+ 58,
22105
22174
  dir.loc
22106
22175
  )
22107
22176
  );
@@ -22212,7 +22281,7 @@ const transformShow = (dir, node, context) => {
22212
22281
  const { exp, loc } = dir;
22213
22282
  if (!exp) {
22214
22283
  context.onError(
22215
- createDOMCompilerError(61, loc)
22284
+ createDOMCompilerError(62, loc)
22216
22285
  );
22217
22286
  }
22218
22287
  return {
@@ -22236,7 +22305,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
22236
22305
  }
22237
22306
  if (hasMultipleChildren(node)) {
22238
22307
  onError(
22239
- createDOMCompilerError(62, {
22308
+ createDOMCompilerError(63, {
22240
22309
  start: node.children[0].loc.start,
22241
22310
  end: node.children[node.children.length - 1].loc.end,
22242
22311
  source: ""
@@ -22505,7 +22574,7 @@ const ignoreSideEffectTags = (node, context) => {
22505
22574
  if (node.type === 1 && node.tagType === 0 && (node.tag === "script" || node.tag === "style")) {
22506
22575
  context.onError(
22507
22576
  createDOMCompilerError(
22508
- 63,
22577
+ 64,
22509
22578
  node.loc
22510
22579
  )
22511
22580
  );