@vue/compat 3.4.0-alpha.4 → 3.4.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.
@@ -193,6 +193,20 @@ var Vue = (function () {
193
193
  });
194
194
  return ret;
195
195
  }
196
+ function stringifyStyle(styles) {
197
+ let ret = "";
198
+ if (!styles || isString(styles)) {
199
+ return ret;
200
+ }
201
+ for (const key in styles) {
202
+ const value = styles[key];
203
+ const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);
204
+ if (isString(value) || typeof value === "number") {
205
+ ret += `${normalizedKey}:${value};`;
206
+ }
207
+ }
208
+ return ret;
209
+ }
196
210
  function normalizeClass(value) {
197
211
  let res = "";
198
212
  if (isString(value)) {
@@ -228,16 +242,27 @@ var Vue = (function () {
228
242
 
229
243
  const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
230
244
  const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view";
245
+ const MATH_TAGS = "math,maction,annotation,annotation-xml,menclose,merror,mfenced,mfrac,mi,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,semantics,mspace,msqrt,mstyle,msub,msup,msubsup,mtable,mtd,mtext,mtr,munder,munderover";
231
246
  const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr";
232
247
  const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
233
248
  const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
249
+ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
234
250
  const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
235
251
 
236
252
  const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
237
253
  const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
254
+ const isBooleanAttr = /* @__PURE__ */ makeMap(
255
+ specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
256
+ );
238
257
  function includeBooleanAttr(value) {
239
258
  return !!value || value === "";
240
259
  }
260
+ const isKnownHtmlAttr = /* @__PURE__ */ makeMap(
261
+ `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`
262
+ );
263
+ const isKnownSvgAttr = /* @__PURE__ */ makeMap(
264
+ `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`
265
+ );
241
266
 
242
267
  function looseCompareArrays(a, b) {
243
268
  if (a.length !== b.length)
@@ -299,20 +324,29 @@ var Vue = (function () {
299
324
  return replacer(_key, val.value);
300
325
  } else if (isMap(val)) {
301
326
  return {
302
- [`Map(${val.size})`]: [...val.entries()].reduce((entries, [key, val2]) => {
303
- entries[`${key} =>`] = val2;
304
- return entries;
305
- }, {})
327
+ [`Map(${val.size})`]: [...val.entries()].reduce(
328
+ (entries, [key, val2], i) => {
329
+ entries[stringifySymbol(key, i) + " =>"] = val2;
330
+ return entries;
331
+ },
332
+ {}
333
+ )
306
334
  };
307
335
  } else if (isSet(val)) {
308
336
  return {
309
- [`Set(${val.size})`]: [...val.values()]
337
+ [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))
310
338
  };
339
+ } else if (isSymbol(val)) {
340
+ return stringifySymbol(val);
311
341
  } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {
312
342
  return String(val);
313
343
  }
314
344
  return val;
315
345
  };
346
+ const stringifySymbol = (v, i = "") => {
347
+ var _a;
348
+ return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
349
+ };
316
350
 
317
351
  function warn$1(msg, ...args) {
318
352
  console.warn(`[Vue warn] ${msg}`, ...args);
@@ -761,8 +795,13 @@ var Vue = (function () {
761
795
  return isReadonly2;
762
796
  } else if (key === "__v_isShallow") {
763
797
  return shallow;
764
- } else if (key === "__v_raw" && receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target)) {
765
- return target;
798
+ } else if (key === "__v_raw") {
799
+ if (receiver === (isReadonly2 ? shallow ? shallowReadonlyMap : readonlyMap : shallow ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype
800
+ // this means the reciever is a user proxy of the reactive proxy
801
+ Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
802
+ return target;
803
+ }
804
+ return;
766
805
  }
767
806
  const targetIsArray = isArray(target);
768
807
  if (!isReadonly2) {
@@ -798,17 +837,19 @@ var Vue = (function () {
798
837
  }
799
838
  set(target, key, value, receiver) {
800
839
  let oldValue = target[key];
801
- if (isReadonly(oldValue) && isRef(oldValue) && !isRef(value)) {
802
- return false;
803
- }
804
840
  if (!this._shallow) {
841
+ const isOldValueReadonly = isReadonly(oldValue);
805
842
  if (!isShallow(value) && !isReadonly(value)) {
806
843
  oldValue = toRaw(oldValue);
807
844
  value = toRaw(value);
808
845
  }
809
846
  if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
810
- oldValue.value = value;
811
- return true;
847
+ if (isOldValueReadonly) {
848
+ return false;
849
+ } else {
850
+ oldValue.value = value;
851
+ return true;
852
+ }
812
853
  }
813
854
  }
814
855
  const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
@@ -1830,13 +1871,16 @@ var Vue = (function () {
1830
1871
  }
1831
1872
  queueFlush();
1832
1873
  }
1833
- function flushPreFlushCbs(seen, i = isFlushing ? flushIndex + 1 : 0) {
1874
+ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
1834
1875
  {
1835
1876
  seen = seen || /* @__PURE__ */ new Map();
1836
1877
  }
1837
1878
  for (; i < queue.length; i++) {
1838
1879
  const cb = queue[i];
1839
1880
  if (cb && cb.pre) {
1881
+ if (instance && cb.id !== instance.uid) {
1882
+ continue;
1883
+ }
1840
1884
  if (checkRecursiveUpdates(seen, cb)) {
1841
1885
  continue;
1842
1886
  }
@@ -3113,9 +3157,17 @@ Details: https://v3-migration.vuejs.org/breaking-changes/migration-build.html`
3113
3157
  return false;
3114
3158
  }
3115
3159
  function updateHOCHostEl({ vnode, parent }, el) {
3116
- while (parent && parent.subTree === vnode) {
3117
- (vnode = parent.vnode).el = el;
3118
- parent = parent.parent;
3160
+ while (parent) {
3161
+ const root = parent.subTree;
3162
+ if (root.suspense && root.suspense.activeBranch === vnode) {
3163
+ root.el = vnode.el;
3164
+ }
3165
+ if (root === vnode) {
3166
+ (vnode = parent.vnode).el = el;
3167
+ parent = parent.parent;
3168
+ } else {
3169
+ break;
3170
+ }
3119
3171
  }
3120
3172
  }
3121
3173
 
@@ -3179,6 +3231,7 @@ If this is a native custom element, make sure to exclude it from component resol
3179
3231
  }
3180
3232
 
3181
3233
  const isSuspense = (type) => type.__isSuspense;
3234
+ let suspenseId = 0;
3182
3235
  const SuspenseImpl = {
3183
3236
  name: "Suspense",
3184
3237
  // In order to make Suspense tree-shakable, we need to avoid importing it
@@ -3186,7 +3239,7 @@ If this is a native custom element, make sure to exclude it from component resol
3186
3239
  // on a vnode's type and calls the `process` method, passing in renderer
3187
3240
  // internals.
3188
3241
  __isSuspense: true,
3189
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
3242
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3190
3243
  if (n1 == null) {
3191
3244
  mountSuspense(
3192
3245
  n2,
@@ -3194,7 +3247,7 @@ If this is a native custom element, make sure to exclude it from component resol
3194
3247
  anchor,
3195
3248
  parentComponent,
3196
3249
  parentSuspense,
3197
- isSVG,
3250
+ namespace,
3198
3251
  slotScopeIds,
3199
3252
  optimized,
3200
3253
  rendererInternals
@@ -3206,7 +3259,7 @@ If this is a native custom element, make sure to exclude it from component resol
3206
3259
  container,
3207
3260
  anchor,
3208
3261
  parentComponent,
3209
- isSVG,
3262
+ namespace,
3210
3263
  slotScopeIds,
3211
3264
  optimized,
3212
3265
  rendererInternals
@@ -3224,7 +3277,7 @@ If this is a native custom element, make sure to exclude it from component resol
3224
3277
  eventListener();
3225
3278
  }
3226
3279
  }
3227
- function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals) {
3280
+ function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
3228
3281
  const {
3229
3282
  p: patch,
3230
3283
  o: { createElement }
@@ -3237,7 +3290,7 @@ If this is a native custom element, make sure to exclude it from component resol
3237
3290
  container,
3238
3291
  hiddenContainer,
3239
3292
  anchor,
3240
- isSVG,
3293
+ namespace,
3241
3294
  slotScopeIds,
3242
3295
  optimized,
3243
3296
  rendererInternals
@@ -3249,7 +3302,7 @@ If this is a native custom element, make sure to exclude it from component resol
3249
3302
  null,
3250
3303
  parentComponent,
3251
3304
  suspense,
3252
- isSVG,
3305
+ namespace,
3253
3306
  slotScopeIds
3254
3307
  );
3255
3308
  if (suspense.deps > 0) {
@@ -3263,7 +3316,7 @@ If this is a native custom element, make sure to exclude it from component resol
3263
3316
  parentComponent,
3264
3317
  null,
3265
3318
  // fallback tree will not have suspense context
3266
- isSVG,
3319
+ namespace,
3267
3320
  slotScopeIds
3268
3321
  );
3269
3322
  setActiveBranch(suspense, vnode.ssFallback);
@@ -3271,7 +3324,7 @@ If this is a native custom element, make sure to exclude it from component resol
3271
3324
  suspense.resolve(false, true);
3272
3325
  }
3273
3326
  }
3274
- function patchSuspense(n1, n2, container, anchor, parentComponent, isSVG, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
3327
+ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) {
3275
3328
  const suspense = n2.suspense = n1.suspense;
3276
3329
  suspense.vnode = n2;
3277
3330
  n2.el = n1.el;
@@ -3288,29 +3341,31 @@ If this is a native custom element, make sure to exclude it from component resol
3288
3341
  null,
3289
3342
  parentComponent,
3290
3343
  suspense,
3291
- isSVG,
3344
+ namespace,
3292
3345
  slotScopeIds,
3293
3346
  optimized
3294
3347
  );
3295
3348
  if (suspense.deps <= 0) {
3296
3349
  suspense.resolve();
3297
3350
  } else if (isInFallback) {
3298
- patch(
3299
- activeBranch,
3300
- newFallback,
3301
- container,
3302
- anchor,
3303
- parentComponent,
3304
- null,
3305
- // fallback tree will not have suspense context
3306
- isSVG,
3307
- slotScopeIds,
3308
- optimized
3309
- );
3310
- setActiveBranch(suspense, newFallback);
3351
+ if (!isHydrating) {
3352
+ patch(
3353
+ activeBranch,
3354
+ newFallback,
3355
+ container,
3356
+ anchor,
3357
+ parentComponent,
3358
+ null,
3359
+ // fallback tree will not have suspense context
3360
+ namespace,
3361
+ slotScopeIds,
3362
+ optimized
3363
+ );
3364
+ setActiveBranch(suspense, newFallback);
3365
+ }
3311
3366
  }
3312
3367
  } else {
3313
- suspense.pendingId++;
3368
+ suspense.pendingId = suspenseId++;
3314
3369
  if (isHydrating) {
3315
3370
  suspense.isHydrating = false;
3316
3371
  suspense.activeBranch = pendingBranch;
@@ -3328,7 +3383,7 @@ If this is a native custom element, make sure to exclude it from component resol
3328
3383
  null,
3329
3384
  parentComponent,
3330
3385
  suspense,
3331
- isSVG,
3386
+ namespace,
3332
3387
  slotScopeIds,
3333
3388
  optimized
3334
3389
  );
@@ -3343,7 +3398,7 @@ If this is a native custom element, make sure to exclude it from component resol
3343
3398
  parentComponent,
3344
3399
  null,
3345
3400
  // fallback tree will not have suspense context
3346
- isSVG,
3401
+ namespace,
3347
3402
  slotScopeIds,
3348
3403
  optimized
3349
3404
  );
@@ -3357,7 +3412,7 @@ If this is a native custom element, make sure to exclude it from component resol
3357
3412
  anchor,
3358
3413
  parentComponent,
3359
3414
  suspense,
3360
- isSVG,
3415
+ namespace,
3361
3416
  slotScopeIds,
3362
3417
  optimized
3363
3418
  );
@@ -3370,7 +3425,7 @@ If this is a native custom element, make sure to exclude it from component resol
3370
3425
  null,
3371
3426
  parentComponent,
3372
3427
  suspense,
3373
- isSVG,
3428
+ namespace,
3374
3429
  slotScopeIds,
3375
3430
  optimized
3376
3431
  );
@@ -3388,7 +3443,7 @@ If this is a native custom element, make sure to exclude it from component resol
3388
3443
  anchor,
3389
3444
  parentComponent,
3390
3445
  suspense,
3391
- isSVG,
3446
+ namespace,
3392
3447
  slotScopeIds,
3393
3448
  optimized
3394
3449
  );
@@ -3396,7 +3451,11 @@ If this is a native custom element, make sure to exclude it from component resol
3396
3451
  } else {
3397
3452
  triggerEvent(n2, "onPending");
3398
3453
  suspense.pendingBranch = newBranch;
3399
- suspense.pendingId++;
3454
+ if (newBranch.shapeFlag & 512) {
3455
+ suspense.pendingId = newBranch.component.suspenseId;
3456
+ } else {
3457
+ suspense.pendingId = suspenseId++;
3458
+ }
3400
3459
  patch(
3401
3460
  null,
3402
3461
  newBranch,
@@ -3404,7 +3463,7 @@ If this is a native custom element, make sure to exclude it from component resol
3404
3463
  null,
3405
3464
  parentComponent,
3406
3465
  suspense,
3407
- isSVG,
3466
+ namespace,
3408
3467
  slotScopeIds,
3409
3468
  optimized
3410
3469
  );
@@ -3426,7 +3485,7 @@ If this is a native custom element, make sure to exclude it from component resol
3426
3485
  }
3427
3486
  }
3428
3487
  let hasWarned = false;
3429
- function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, isSVG, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3488
+ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) {
3430
3489
  if (!hasWarned) {
3431
3490
  hasWarned = true;
3432
3491
  console[console.info ? "info" : "log"](
@@ -3456,7 +3515,7 @@ If this is a native custom element, make sure to exclude it from component resol
3456
3515
  vnode,
3457
3516
  parent: parentSuspense,
3458
3517
  parentComponent,
3459
- isSVG,
3518
+ namespace,
3460
3519
  container,
3461
3520
  hiddenContainer,
3462
3521
  anchor,
@@ -3465,7 +3524,7 @@ If this is a native custom element, make sure to exclude it from component resol
3465
3524
  timeout: typeof timeout === "number" ? timeout : -1,
3466
3525
  activeBranch: null,
3467
3526
  pendingBranch: null,
3468
- isInFallback: true,
3527
+ isInFallback: !isHydrating,
3469
3528
  isHydrating,
3470
3529
  isUnmounted: false,
3471
3530
  effects: [],
@@ -3549,8 +3608,9 @@ If this is a native custom element, make sure to exclude it from component resol
3549
3608
  if (!suspense.pendingBranch) {
3550
3609
  return;
3551
3610
  }
3552
- const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, isSVG: isSVG2 } = suspense;
3611
+ const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense;
3553
3612
  triggerEvent(vnode2, "onFallback");
3613
+ const anchor2 = next(activeBranch);
3554
3614
  const mountFallback = () => {
3555
3615
  if (!suspense.isInFallback) {
3556
3616
  return;
@@ -3559,11 +3619,11 @@ If this is a native custom element, make sure to exclude it from component resol
3559
3619
  null,
3560
3620
  fallbackVNode,
3561
3621
  container2,
3562
- next(activeBranch),
3622
+ anchor2,
3563
3623
  parentComponent2,
3564
3624
  null,
3565
3625
  // fallback tree will not have suspense context
3566
- isSVG2,
3626
+ namespace2,
3567
3627
  slotScopeIds,
3568
3628
  optimized
3569
3629
  );
@@ -3626,7 +3686,7 @@ If this is a native custom element, make sure to exclude it from component resol
3626
3686
  // consider the comment placeholder case.
3627
3687
  hydratedEl ? null : next(instance.subTree),
3628
3688
  suspense,
3629
- isSVG,
3689
+ namespace,
3630
3690
  optimized
3631
3691
  );
3632
3692
  if (placeholder) {
@@ -3663,7 +3723,7 @@ If this is a native custom element, make sure to exclude it from component resol
3663
3723
  };
3664
3724
  return suspense;
3665
3725
  }
3666
- function hydrateSuspense(node, vnode, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3726
+ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) {
3667
3727
  const suspense = vnode.suspense = createSuspenseBoundary(
3668
3728
  vnode,
3669
3729
  parentSuspense,
@@ -3671,7 +3731,7 @@ If this is a native custom element, make sure to exclude it from component resol
3671
3731
  node.parentNode,
3672
3732
  document.createElement("div"),
3673
3733
  null,
3674
- isSVG,
3734
+ namespace,
3675
3735
  slotScopeIds,
3676
3736
  optimized,
3677
3737
  rendererInternals,
@@ -4613,7 +4673,7 @@ If this is a native custom element, make sure to exclude it from component resol
4613
4673
  }
4614
4674
  } = sharedContext;
4615
4675
  const storageContainer = createElement("div");
4616
- sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
4676
+ sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {
4617
4677
  const instance2 = vnode.component;
4618
4678
  move(vnode, container, anchor, 0, parentSuspense);
4619
4679
  patch(
@@ -4623,7 +4683,7 @@ If this is a native custom element, make sure to exclude it from component resol
4623
4683
  anchor,
4624
4684
  instance2,
4625
4685
  parentSuspense,
4626
- isSVG,
4686
+ namespace,
4627
4687
  vnode.slotScopeIds,
4628
4688
  optimized
4629
4689
  );
@@ -5811,7 +5871,7 @@ If this is a native custom element, make sure to exclude it from component resol
5811
5871
  function useAttrs() {
5812
5872
  return getContext().attrs;
5813
5873
  }
5814
- function useModel(props, name, options) {
5874
+ function useModel(props, name) {
5815
5875
  const i = getCurrentInstance();
5816
5876
  if (!i) {
5817
5877
  warn(`useModel() called without active instance.`);
@@ -5821,29 +5881,24 @@ If this is a native custom element, make sure to exclude it from component resol
5821
5881
  warn(`useModel() called with prop "${name}" which is not declared.`);
5822
5882
  return ref();
5823
5883
  }
5824
- if (options && options.local) {
5825
- const proxy = ref(props[name]);
5826
- watch(
5827
- () => props[name],
5828
- (v) => proxy.value = v
5829
- );
5830
- watch(proxy, (value) => {
5831
- if (value !== props[name]) {
5832
- i.emit(`update:${name}`, value);
5833
- }
5834
- });
5835
- return proxy;
5836
- } else {
5837
- return {
5838
- __v_isRef: true,
5839
- get value() {
5840
- return props[name];
5841
- },
5842
- set value(value) {
5843
- i.emit(`update:${name}`, value);
5884
+ let localValue;
5885
+ watchSyncEffect(() => {
5886
+ localValue = props[name];
5887
+ });
5888
+ return customRef((track, trigger) => ({
5889
+ get() {
5890
+ track();
5891
+ return localValue;
5892
+ },
5893
+ set(value) {
5894
+ const rawProps = i.vnode.props;
5895
+ if (!(rawProps && name in rawProps) && hasChanged(value, localValue)) {
5896
+ localValue = value;
5897
+ trigger();
5844
5898
  }
5845
- };
5846
- }
5899
+ i.emit(`update:${name}`, value);
5900
+ }
5901
+ }));
5847
5902
  }
5848
5903
  function getContext() {
5849
5904
  const i = getCurrentInstance();
@@ -6417,7 +6472,7 @@ If this is a native custom element, make sure to exclude it from component resol
6417
6472
  return vm;
6418
6473
  }
6419
6474
  }
6420
- Vue.version = `2.6.14-compat:${"3.4.0-alpha.4"}`;
6475
+ Vue.version = `2.6.14-compat:${"3.4.0-beta.1"}`;
6421
6476
  Vue.config = singletonApp.config;
6422
6477
  Vue.use = (p, ...options) => {
6423
6478
  if (p && isFunction(p.install)) {
@@ -6662,12 +6717,16 @@ If this is a native custom element, make sure to exclude it from component resol
6662
6717
  } else {
6663
6718
  container = selectorOrEl || document.createElement("div");
6664
6719
  }
6665
- const isSVG = container instanceof SVGElement;
6720
+ let namespace;
6721
+ if (container instanceof SVGElement)
6722
+ namespace = "svg";
6723
+ else if (typeof MathMLElement === "function" && container instanceof MathMLElement)
6724
+ namespace = "mathml";
6666
6725
  {
6667
6726
  context.reload = () => {
6668
6727
  const cloned = cloneVNode(vnode);
6669
6728
  cloned.component = null;
6670
- render(cloned, container, isSVG);
6729
+ render(cloned, container, namespace);
6671
6730
  };
6672
6731
  }
6673
6732
  if (hasNoRender && instance.render === emptyRender) {
@@ -6690,7 +6749,7 @@ If this is a native custom element, make sure to exclude it from component resol
6690
6749
  );
6691
6750
  }
6692
6751
  container.innerHTML = "";
6693
- render(vnode, container, isSVG);
6752
+ render(vnode, container, namespace);
6694
6753
  if (container instanceof Element) {
6695
6754
  container.removeAttribute("v-cloak");
6696
6755
  container.setAttribute("data-v-app", "");
@@ -6892,7 +6951,7 @@ If this is a native custom element, make sure to exclude it from component resol
6892
6951
  context.directives[name] = directive;
6893
6952
  return app;
6894
6953
  },
6895
- mount(rootContainer, isHydrate, isSVG) {
6954
+ mount(rootContainer, isHydrate, namespace) {
6896
6955
  if (!isMounted) {
6897
6956
  if (rootContainer.__vue_app__) {
6898
6957
  warn(
@@ -6902,15 +6961,24 @@ If this is a native custom element, make sure to exclude it from component resol
6902
6961
  }
6903
6962
  const vnode = createVNode(rootComponent, rootProps);
6904
6963
  vnode.appContext = context;
6964
+ if (namespace === true) {
6965
+ namespace = "svg";
6966
+ } else if (namespace === false) {
6967
+ namespace = void 0;
6968
+ }
6905
6969
  {
6906
6970
  context.reload = () => {
6907
- render(cloneVNode(vnode), rootContainer, isSVG);
6971
+ render(
6972
+ cloneVNode(vnode),
6973
+ rootContainer,
6974
+ namespace
6975
+ );
6908
6976
  };
6909
6977
  }
6910
6978
  if (isHydrate && hydrate) {
6911
6979
  hydrate(vnode, rootContainer);
6912
6980
  } else {
6913
- render(vnode, rootContainer, isSVG);
6981
+ render(vnode, rootContainer, namespace);
6914
6982
  }
6915
6983
  isMounted = true;
6916
6984
  app._container = rootContainer;
@@ -7375,11 +7443,12 @@ If you want to remount the same app, move your app creation logic into a factory
7375
7443
  key,
7376
7444
  resolvedValues[key],
7377
7445
  opt,
7446
+ shallowReadonly(resolvedValues) ,
7378
7447
  !hasOwn(rawProps, key) && !hasOwn(rawProps, hyphenate(key))
7379
7448
  );
7380
7449
  }
7381
7450
  }
7382
- function validateProp(name, value, prop, isAbsent) {
7451
+ function validateProp(name, value, prop, props, isAbsent) {
7383
7452
  const { type, required, validator, skipCheck } = prop;
7384
7453
  if (required && isAbsent) {
7385
7454
  warn('Missing required prop: "' + name + '"');
@@ -7402,7 +7471,7 @@ If you want to remount the same app, move your app creation logic into a factory
7402
7471
  return;
7403
7472
  }
7404
7473
  }
7405
- if (validator && !validator(value)) {
7474
+ if (validator && !validator(value, props)) {
7406
7475
  warn('Invalid prop: custom validator check failed for prop "' + name + '".');
7407
7476
  }
7408
7477
  }
@@ -7660,7 +7729,15 @@ If you want to remount the same app, move your app creation logic into a factory
7660
7729
  }
7661
7730
 
7662
7731
  let hasMismatch = false;
7663
- const isSVGContainer = (container) => /svg/.test(container.namespaceURI) && container.tagName !== "foreignObject";
7732
+ const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
7733
+ const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
7734
+ const getContainerType = (container) => {
7735
+ if (isSVGContainer(container))
7736
+ return "svg";
7737
+ if (isMathMLContainer(container))
7738
+ return "mathml";
7739
+ return void 0;
7740
+ };
7664
7741
  const isComment = (node) => node.nodeType === 8 /* COMMENT */;
7665
7742
  function createHydrationFunctions(rendererInternals) {
7666
7743
  const {
@@ -7739,11 +7816,13 @@ If you want to remount the same app, move your app creation logic into a factory
7739
7816
  if (node.data !== vnode.children) {
7740
7817
  hasMismatch = true;
7741
7818
  warn(
7742
- `Hydration text mismatch:
7743
- - Server rendered: ${JSON.stringify(
7819
+ `Hydration text mismatch in`,
7820
+ node.parentNode,
7821
+ `
7822
+ - rendered on server: ${JSON.stringify(
7744
7823
  node.data
7745
7824
  )}
7746
- - Client rendered: ${JSON.stringify(vnode.children)}`
7825
+ - expected on client: ${JSON.stringify(vnode.children)}`
7747
7826
  );
7748
7827
  node.data = vnode.children;
7749
7828
  }
@@ -7829,7 +7908,7 @@ If you want to remount the same app, move your app creation logic into a factory
7829
7908
  null,
7830
7909
  parentComponent,
7831
7910
  parentSuspense,
7832
- isSVGContainer(container),
7911
+ getContainerType(container),
7833
7912
  optimized
7834
7913
  );
7835
7914
  if (isAsyncWrapper(vnode)) {
@@ -7864,7 +7943,7 @@ If you want to remount the same app, move your app creation logic into a factory
7864
7943
  vnode,
7865
7944
  parentComponent,
7866
7945
  parentSuspense,
7867
- isSVGContainer(parentNode(node)),
7946
+ getContainerType(parentNode(node)),
7868
7947
  slotScopeIds,
7869
7948
  optimized,
7870
7949
  rendererInternals,
@@ -7887,38 +7966,6 @@ If you want to remount the same app, move your app creation logic into a factory
7887
7966
  if (dirs) {
7888
7967
  invokeDirectiveHook(vnode, null, parentComponent, "created");
7889
7968
  }
7890
- if (props) {
7891
- if (forcePatch || !optimized || patchFlag & (16 | 32)) {
7892
- for (const key in props) {
7893
- if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
7894
- key[0] === ".") {
7895
- patchProp(
7896
- el,
7897
- key,
7898
- null,
7899
- props[key],
7900
- false,
7901
- void 0,
7902
- parentComponent
7903
- );
7904
- }
7905
- }
7906
- } else if (props.onClick) {
7907
- patchProp(
7908
- el,
7909
- "onClick",
7910
- null,
7911
- props.onClick,
7912
- false,
7913
- void 0,
7914
- parentComponent
7915
- );
7916
- }
7917
- }
7918
- let vnodeHooks;
7919
- if (vnodeHooks = props && props.onVnodeBeforeMount) {
7920
- invokeVNodeHook(vnodeHooks, parentComponent, vnode);
7921
- }
7922
7969
  let needCallTransitionHooks = false;
7923
7970
  if (isTemplateNode(el)) {
7924
7971
  needCallTransitionHooks = needTransition(parentSuspense, transition) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;
@@ -7929,16 +7976,6 @@ If you want to remount the same app, move your app creation logic into a factory
7929
7976
  replaceNode(content, el, parentComponent);
7930
7977
  vnode.el = el = content;
7931
7978
  }
7932
- if (dirs) {
7933
- invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
7934
- }
7935
- if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
7936
- queueEffectWithSuspense(() => {
7937
- vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
7938
- needCallTransitionHooks && transition.enter(el);
7939
- dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
7940
- }, parentSuspense);
7941
- }
7942
7979
  if (shapeFlag & 16 && // skip if element has innerHTML / textContent
7943
7980
  !(props && (props.innerHTML || props.textContent))) {
7944
7981
  let next = hydrateChildren(
@@ -7955,7 +7992,10 @@ If you want to remount the same app, move your app creation logic into a factory
7955
7992
  hasMismatch = true;
7956
7993
  if (!hasWarned) {
7957
7994
  warn(
7958
- `Hydration children mismatch in <${vnode.type}>: server rendered element contains more child nodes than client vdom.`
7995
+ `Hydration children mismatch on`,
7996
+ el,
7997
+ `
7998
+ Server rendered element contains more child nodes than client vdom.`
7959
7999
  );
7960
8000
  hasWarned = true;
7961
8001
  }
@@ -7967,13 +8007,50 @@ If you want to remount the same app, move your app creation logic into a factory
7967
8007
  if (el.textContent !== vnode.children) {
7968
8008
  hasMismatch = true;
7969
8009
  warn(
7970
- `Hydration text content mismatch in <${vnode.type}>:
7971
- - Server rendered: ${el.textContent}
7972
- - Client rendered: ${vnode.children}`
8010
+ `Hydration text content mismatch on`,
8011
+ el,
8012
+ `
8013
+ - rendered on server: ${el.textContent}
8014
+ - expected on client: ${vnode.children}`
7973
8015
  );
7974
8016
  el.textContent = vnode.children;
7975
8017
  }
7976
8018
  }
8019
+ if (props) {
8020
+ {
8021
+ for (const key in props) {
8022
+ if (propHasMismatch(el, key, props[key])) {
8023
+ hasMismatch = true;
8024
+ }
8025
+ if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
8026
+ key[0] === ".") {
8027
+ patchProp(
8028
+ el,
8029
+ key,
8030
+ null,
8031
+ props[key],
8032
+ void 0,
8033
+ void 0,
8034
+ parentComponent
8035
+ );
8036
+ }
8037
+ }
8038
+ }
8039
+ }
8040
+ let vnodeHooks;
8041
+ if (vnodeHooks = props && props.onVnodeBeforeMount) {
8042
+ invokeVNodeHook(vnodeHooks, parentComponent, vnode);
8043
+ }
8044
+ if (dirs) {
8045
+ invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
8046
+ }
8047
+ if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {
8048
+ queueEffectWithSuspense(() => {
8049
+ vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);
8050
+ needCallTransitionHooks && transition.enter(el);
8051
+ dirs && invokeDirectiveHook(vnode, null, parentComponent, "mounted");
8052
+ }, parentSuspense);
8053
+ }
7977
8054
  }
7978
8055
  return el.nextSibling;
7979
8056
  };
@@ -7999,7 +8076,10 @@ If you want to remount the same app, move your app creation logic into a factory
7999
8076
  hasMismatch = true;
8000
8077
  if (!hasWarned) {
8001
8078
  warn(
8002
- `Hydration children mismatch in <${container.tagName.toLowerCase()}>: server rendered element contains fewer child nodes than client vdom.`
8079
+ `Hydration children mismatch on`,
8080
+ container,
8081
+ `
8082
+ Server rendered element contains fewer child nodes than client vdom.`
8003
8083
  );
8004
8084
  hasWarned = true;
8005
8085
  }
@@ -8010,7 +8090,7 @@ If you want to remount the same app, move your app creation logic into a factory
8010
8090
  null,
8011
8091
  parentComponent,
8012
8092
  parentSuspense,
8013
- isSVGContainer(container),
8093
+ getContainerType(container),
8014
8094
  slotScopeIds
8015
8095
  );
8016
8096
  }
@@ -8044,12 +8124,12 @@ If you want to remount the same app, move your app creation logic into a factory
8044
8124
  hasMismatch = true;
8045
8125
  warn(
8046
8126
  `Hydration node mismatch:
8047
- - Client vnode:`,
8048
- vnode.type,
8049
- `
8050
- - Server rendered DOM:`,
8127
+ - rendered on server:`,
8051
8128
  node,
8052
- node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``
8129
+ node.nodeType === 3 /* TEXT */ ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``,
8130
+ `
8131
+ - expected on client:`,
8132
+ vnode.type
8053
8133
  );
8054
8134
  vnode.el = null;
8055
8135
  if (isFragment) {
@@ -8073,7 +8153,7 @@ If you want to remount the same app, move your app creation logic into a factory
8073
8153
  next,
8074
8154
  parentComponent,
8075
8155
  parentSuspense,
8076
- isSVGContainer(container),
8156
+ getContainerType(container),
8077
8157
  slotScopeIds
8078
8158
  );
8079
8159
  return next;
@@ -8114,6 +8194,46 @@ If you want to remount the same app, move your app creation logic into a factory
8114
8194
  };
8115
8195
  return [hydrate, hydrateNode];
8116
8196
  }
8197
+ function propHasMismatch(el, key, clientValue) {
8198
+ let mismatchType;
8199
+ let mismatchKey;
8200
+ let actual;
8201
+ let expected;
8202
+ if (key === "class") {
8203
+ actual = el.className;
8204
+ expected = normalizeClass(clientValue);
8205
+ if (actual !== expected) {
8206
+ mismatchType = mismatchKey = `class`;
8207
+ }
8208
+ } else if (key === "style") {
8209
+ actual = el.getAttribute("style");
8210
+ expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));
8211
+ if (actual !== expected) {
8212
+ mismatchType = mismatchKey = "style";
8213
+ }
8214
+ } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {
8215
+ actual = el.hasAttribute(key) && el.getAttribute(key);
8216
+ expected = isBooleanAttr(key) ? includeBooleanAttr(clientValue) ? "" : false : clientValue == null ? false : String(clientValue);
8217
+ if (actual !== expected) {
8218
+ mismatchType = `attribute`;
8219
+ mismatchKey = key;
8220
+ }
8221
+ }
8222
+ if (mismatchType) {
8223
+ const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
8224
+ warn(
8225
+ `Hydration ${mismatchType} mismatch on`,
8226
+ el,
8227
+ `
8228
+ - rendered on server: ${format(actual)}
8229
+ - expected on client: ${format(expected)}
8230
+ Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
8231
+ You should fix the source of the mismatch.`
8232
+ );
8233
+ return true;
8234
+ }
8235
+ return false;
8236
+ }
8117
8237
 
8118
8238
  let supported;
8119
8239
  let perf;
@@ -8182,7 +8302,7 @@ If you want to remount the same app, move your app creation logic into a factory
8182
8302
  setScopeId: hostSetScopeId = NOOP,
8183
8303
  insertStaticContent: hostInsertStaticContent
8184
8304
  } = options;
8185
- const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, isSVG = false, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
8305
+ const patch = (n1, n2, container, anchor = null, parentComponent = null, parentSuspense = null, namespace = void 0, slotScopeIds = null, optimized = isHmrUpdating ? false : !!n2.dynamicChildren) => {
8186
8306
  if (n1 === n2) {
8187
8307
  return;
8188
8308
  }
@@ -8205,9 +8325,9 @@ If you want to remount the same app, move your app creation logic into a factory
8205
8325
  break;
8206
8326
  case Static:
8207
8327
  if (n1 == null) {
8208
- mountStaticNode(n2, container, anchor, isSVG);
8328
+ mountStaticNode(n2, container, anchor, namespace);
8209
8329
  } else {
8210
- patchStaticNode(n1, n2, container, isSVG);
8330
+ patchStaticNode(n1, n2, container, namespace);
8211
8331
  }
8212
8332
  break;
8213
8333
  case Fragment:
@@ -8218,7 +8338,7 @@ If you want to remount the same app, move your app creation logic into a factory
8218
8338
  anchor,
8219
8339
  parentComponent,
8220
8340
  parentSuspense,
8221
- isSVG,
8341
+ namespace,
8222
8342
  slotScopeIds,
8223
8343
  optimized
8224
8344
  );
@@ -8232,7 +8352,7 @@ If you want to remount the same app, move your app creation logic into a factory
8232
8352
  anchor,
8233
8353
  parentComponent,
8234
8354
  parentSuspense,
8235
- isSVG,
8355
+ namespace,
8236
8356
  slotScopeIds,
8237
8357
  optimized
8238
8358
  );
@@ -8244,7 +8364,7 @@ If you want to remount the same app, move your app creation logic into a factory
8244
8364
  anchor,
8245
8365
  parentComponent,
8246
8366
  parentSuspense,
8247
- isSVG,
8367
+ namespace,
8248
8368
  slotScopeIds,
8249
8369
  optimized
8250
8370
  );
@@ -8256,7 +8376,7 @@ If you want to remount the same app, move your app creation logic into a factory
8256
8376
  anchor,
8257
8377
  parentComponent,
8258
8378
  parentSuspense,
8259
- isSVG,
8379
+ namespace,
8260
8380
  slotScopeIds,
8261
8381
  optimized,
8262
8382
  internals
@@ -8269,7 +8389,7 @@ If you want to remount the same app, move your app creation logic into a factory
8269
8389
  anchor,
8270
8390
  parentComponent,
8271
8391
  parentSuspense,
8272
- isSVG,
8392
+ namespace,
8273
8393
  slotScopeIds,
8274
8394
  optimized,
8275
8395
  internals
@@ -8307,17 +8427,17 @@ If you want to remount the same app, move your app creation logic into a factory
8307
8427
  n2.el = n1.el;
8308
8428
  }
8309
8429
  };
8310
- const mountStaticNode = (n2, container, anchor, isSVG) => {
8430
+ const mountStaticNode = (n2, container, anchor, namespace) => {
8311
8431
  [n2.el, n2.anchor] = hostInsertStaticContent(
8312
8432
  n2.children,
8313
8433
  container,
8314
8434
  anchor,
8315
- isSVG,
8435
+ namespace,
8316
8436
  n2.el,
8317
8437
  n2.anchor
8318
8438
  );
8319
8439
  };
8320
- const patchStaticNode = (n1, n2, container, isSVG) => {
8440
+ const patchStaticNode = (n1, n2, container, namespace) => {
8321
8441
  if (n2.children !== n1.children) {
8322
8442
  const anchor = hostNextSibling(n1.anchor);
8323
8443
  removeStaticNode(n1);
@@ -8325,7 +8445,7 @@ If you want to remount the same app, move your app creation logic into a factory
8325
8445
  n2.children,
8326
8446
  container,
8327
8447
  anchor,
8328
- isSVG
8448
+ namespace
8329
8449
  );
8330
8450
  } else {
8331
8451
  n2.el = n1.el;
@@ -8350,8 +8470,12 @@ If you want to remount the same app, move your app creation logic into a factory
8350
8470
  }
8351
8471
  hostRemove(anchor);
8352
8472
  };
8353
- const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8354
- isSVG = isSVG || n2.type === "svg";
8473
+ const processElement = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8474
+ if (n2.type === "svg") {
8475
+ namespace = "svg";
8476
+ } else if (n2.type === "math") {
8477
+ namespace = "mathml";
8478
+ }
8355
8479
  if (n1 == null) {
8356
8480
  mountElement(
8357
8481
  n2,
@@ -8359,7 +8483,7 @@ If you want to remount the same app, move your app creation logic into a factory
8359
8483
  anchor,
8360
8484
  parentComponent,
8361
8485
  parentSuspense,
8362
- isSVG,
8486
+ namespace,
8363
8487
  slotScopeIds,
8364
8488
  optimized
8365
8489
  );
@@ -8369,19 +8493,19 @@ If you want to remount the same app, move your app creation logic into a factory
8369
8493
  n2,
8370
8494
  parentComponent,
8371
8495
  parentSuspense,
8372
- isSVG,
8496
+ namespace,
8373
8497
  slotScopeIds,
8374
8498
  optimized
8375
8499
  );
8376
8500
  }
8377
8501
  };
8378
- const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8502
+ const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8379
8503
  let el;
8380
8504
  let vnodeHook;
8381
- const { type, props, shapeFlag, transition, dirs } = vnode;
8505
+ const { props, shapeFlag, transition, dirs } = vnode;
8382
8506
  el = vnode.el = hostCreateElement(
8383
8507
  vnode.type,
8384
- isSVG,
8508
+ namespace,
8385
8509
  props && props.is,
8386
8510
  props
8387
8511
  );
@@ -8394,7 +8518,7 @@ If you want to remount the same app, move your app creation logic into a factory
8394
8518
  null,
8395
8519
  parentComponent,
8396
8520
  parentSuspense,
8397
- isSVG && type !== "foreignObject",
8521
+ resolveChildrenNamespace(vnode, namespace),
8398
8522
  slotScopeIds,
8399
8523
  optimized
8400
8524
  );
@@ -8411,7 +8535,7 @@ If you want to remount the same app, move your app creation logic into a factory
8411
8535
  key,
8412
8536
  null,
8413
8537
  props[key],
8414
- isSVG,
8538
+ namespace,
8415
8539
  vnode.children,
8416
8540
  parentComponent,
8417
8541
  parentSuspense,
@@ -8420,7 +8544,7 @@ If you want to remount the same app, move your app creation logic into a factory
8420
8544
  }
8421
8545
  }
8422
8546
  if ("value" in props) {
8423
- hostPatchProp(el, "value", null, props.value);
8547
+ hostPatchProp(el, "value", null, props.value, namespace);
8424
8548
  }
8425
8549
  if (vnodeHook = props.onVnodeBeforeMount) {
8426
8550
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
@@ -8478,7 +8602,7 @@ If you want to remount the same app, move your app creation logic into a factory
8478
8602
  }
8479
8603
  }
8480
8604
  };
8481
- const mountChildren = (children, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, start = 0) => {
8605
+ const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
8482
8606
  for (let i = start; i < children.length; i++) {
8483
8607
  const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
8484
8608
  patch(
@@ -8488,13 +8612,13 @@ If you want to remount the same app, move your app creation logic into a factory
8488
8612
  anchor,
8489
8613
  parentComponent,
8490
8614
  parentSuspense,
8491
- isSVG,
8615
+ namespace,
8492
8616
  slotScopeIds,
8493
8617
  optimized
8494
8618
  );
8495
8619
  }
8496
8620
  };
8497
- const patchElement = (n1, n2, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8621
+ const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8498
8622
  const el = n2.el = n1.el;
8499
8623
  let { patchFlag, dynamicChildren, dirs } = n2;
8500
8624
  patchFlag |= n1.patchFlag & 16;
@@ -8514,7 +8638,6 @@ If you want to remount the same app, move your app creation logic into a factory
8514
8638
  optimized = false;
8515
8639
  dynamicChildren = null;
8516
8640
  }
8517
- const areChildrenSVG = isSVG && n2.type !== "foreignObject";
8518
8641
  if (dynamicChildren) {
8519
8642
  patchBlockChildren(
8520
8643
  n1.dynamicChildren,
@@ -8522,7 +8645,7 @@ If you want to remount the same app, move your app creation logic into a factory
8522
8645
  el,
8523
8646
  parentComponent,
8524
8647
  parentSuspense,
8525
- areChildrenSVG,
8648
+ resolveChildrenNamespace(n2, namespace),
8526
8649
  slotScopeIds
8527
8650
  );
8528
8651
  {
@@ -8536,7 +8659,7 @@ If you want to remount the same app, move your app creation logic into a factory
8536
8659
  null,
8537
8660
  parentComponent,
8538
8661
  parentSuspense,
8539
- areChildrenSVG,
8662
+ resolveChildrenNamespace(n2, namespace),
8540
8663
  slotScopeIds,
8541
8664
  false
8542
8665
  );
@@ -8550,16 +8673,16 @@ If you want to remount the same app, move your app creation logic into a factory
8550
8673
  newProps,
8551
8674
  parentComponent,
8552
8675
  parentSuspense,
8553
- isSVG
8676
+ namespace
8554
8677
  );
8555
8678
  } else {
8556
8679
  if (patchFlag & 2) {
8557
8680
  if (oldProps.class !== newProps.class) {
8558
- hostPatchProp(el, "class", null, newProps.class, isSVG);
8681
+ hostPatchProp(el, "class", null, newProps.class, namespace);
8559
8682
  }
8560
8683
  }
8561
8684
  if (patchFlag & 4) {
8562
- hostPatchProp(el, "style", oldProps.style, newProps.style, isSVG);
8685
+ hostPatchProp(el, "style", oldProps.style, newProps.style, namespace);
8563
8686
  }
8564
8687
  if (patchFlag & 8) {
8565
8688
  const propsToUpdate = n2.dynamicProps;
@@ -8573,7 +8696,7 @@ If you want to remount the same app, move your app creation logic into a factory
8573
8696
  key,
8574
8697
  prev,
8575
8698
  next,
8576
- isSVG,
8699
+ namespace,
8577
8700
  n1.children,
8578
8701
  parentComponent,
8579
8702
  parentSuspense,
@@ -8596,7 +8719,7 @@ If you want to remount the same app, move your app creation logic into a factory
8596
8719
  newProps,
8597
8720
  parentComponent,
8598
8721
  parentSuspense,
8599
- isSVG
8722
+ namespace
8600
8723
  );
8601
8724
  }
8602
8725
  if ((vnodeHook = newProps.onVnodeUpdated) || dirs) {
@@ -8606,7 +8729,7 @@ If you want to remount the same app, move your app creation logic into a factory
8606
8729
  }, parentSuspense);
8607
8730
  }
8608
8731
  };
8609
- const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, isSVG, slotScopeIds) => {
8732
+ const patchBlockChildren = (oldChildren, newChildren, fallbackContainer, parentComponent, parentSuspense, namespace, slotScopeIds) => {
8610
8733
  for (let i = 0; i < newChildren.length; i++) {
8611
8734
  const oldVNode = oldChildren[i];
8612
8735
  const newVNode = newChildren[i];
@@ -8631,13 +8754,13 @@ If you want to remount the same app, move your app creation logic into a factory
8631
8754
  null,
8632
8755
  parentComponent,
8633
8756
  parentSuspense,
8634
- isSVG,
8757
+ namespace,
8635
8758
  slotScopeIds,
8636
8759
  true
8637
8760
  );
8638
8761
  }
8639
8762
  };
8640
- const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, isSVG) => {
8763
+ const patchProps = (el, vnode, oldProps, newProps, parentComponent, parentSuspense, namespace) => {
8641
8764
  if (oldProps !== newProps) {
8642
8765
  if (oldProps !== EMPTY_OBJ) {
8643
8766
  for (const key in oldProps) {
@@ -8647,7 +8770,7 @@ If you want to remount the same app, move your app creation logic into a factory
8647
8770
  key,
8648
8771
  oldProps[key],
8649
8772
  null,
8650
- isSVG,
8773
+ namespace,
8651
8774
  vnode.children,
8652
8775
  parentComponent,
8653
8776
  parentSuspense,
@@ -8667,7 +8790,7 @@ If you want to remount the same app, move your app creation logic into a factory
8667
8790
  key,
8668
8791
  prev,
8669
8792
  next,
8670
- isSVG,
8793
+ namespace,
8671
8794
  vnode.children,
8672
8795
  parentComponent,
8673
8796
  parentSuspense,
@@ -8676,11 +8799,11 @@ If you want to remount the same app, move your app creation logic into a factory
8676
8799
  }
8677
8800
  }
8678
8801
  if ("value" in newProps) {
8679
- hostPatchProp(el, "value", oldProps.value, newProps.value);
8802
+ hostPatchProp(el, "value", oldProps.value, newProps.value, namespace);
8680
8803
  }
8681
8804
  }
8682
8805
  };
8683
- const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8806
+ const processFragment = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8684
8807
  const fragmentStartAnchor = n2.el = n1 ? n1.el : hostCreateText("");
8685
8808
  const fragmentEndAnchor = n2.anchor = n1 ? n1.anchor : hostCreateText("");
8686
8809
  let { patchFlag, dynamicChildren, slotScopeIds: fragmentSlotScopeIds } = n2;
@@ -8704,7 +8827,7 @@ If you want to remount the same app, move your app creation logic into a factory
8704
8827
  fragmentEndAnchor,
8705
8828
  parentComponent,
8706
8829
  parentSuspense,
8707
- isSVG,
8830
+ namespace,
8708
8831
  slotScopeIds,
8709
8832
  optimized
8710
8833
  );
@@ -8718,7 +8841,7 @@ If you want to remount the same app, move your app creation logic into a factory
8718
8841
  container,
8719
8842
  parentComponent,
8720
8843
  parentSuspense,
8721
- isSVG,
8844
+ namespace,
8722
8845
  slotScopeIds
8723
8846
  );
8724
8847
  {
@@ -8732,14 +8855,14 @@ If you want to remount the same app, move your app creation logic into a factory
8732
8855
  fragmentEndAnchor,
8733
8856
  parentComponent,
8734
8857
  parentSuspense,
8735
- isSVG,
8858
+ namespace,
8736
8859
  slotScopeIds,
8737
8860
  optimized
8738
8861
  );
8739
8862
  }
8740
8863
  }
8741
8864
  };
8742
- const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
8865
+ const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
8743
8866
  n2.slotScopeIds = slotScopeIds;
8744
8867
  if (n1 == null) {
8745
8868
  if (n2.shapeFlag & 512) {
@@ -8747,7 +8870,7 @@ If you want to remount the same app, move your app creation logic into a factory
8747
8870
  n2,
8748
8871
  container,
8749
8872
  anchor,
8750
- isSVG,
8873
+ namespace,
8751
8874
  optimized
8752
8875
  );
8753
8876
  } else {
@@ -8757,7 +8880,7 @@ If you want to remount the same app, move your app creation logic into a factory
8757
8880
  anchor,
8758
8881
  parentComponent,
8759
8882
  parentSuspense,
8760
- isSVG,
8883
+ namespace,
8761
8884
  optimized
8762
8885
  );
8763
8886
  }
@@ -8765,7 +8888,7 @@ If you want to remount the same app, move your app creation logic into a factory
8765
8888
  updateComponent(n1, n2, optimized);
8766
8889
  }
8767
8890
  };
8768
- const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, isSVG, optimized) => {
8891
+ const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
8769
8892
  const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
8770
8893
  const instance = compatMountInstance || (initialVNode.component = createComponentInstance(
8771
8894
  initialVNode,
@@ -8797,17 +8920,17 @@ If you want to remount the same app, move your app creation logic into a factory
8797
8920
  const placeholder = instance.subTree = createVNode(Comment);
8798
8921
  processCommentNode(null, placeholder, container, anchor);
8799
8922
  }
8800
- return;
8923
+ } else {
8924
+ setupRenderEffect(
8925
+ instance,
8926
+ initialVNode,
8927
+ container,
8928
+ anchor,
8929
+ parentSuspense,
8930
+ namespace,
8931
+ optimized
8932
+ );
8801
8933
  }
8802
- setupRenderEffect(
8803
- instance,
8804
- initialVNode,
8805
- container,
8806
- anchor,
8807
- parentSuspense,
8808
- isSVG,
8809
- optimized
8810
- );
8811
8934
  {
8812
8935
  popWarningContext();
8813
8936
  endMeasure(instance, `mount`);
@@ -8836,7 +8959,7 @@ If you want to remount the same app, move your app creation logic into a factory
8836
8959
  instance.vnode = n2;
8837
8960
  }
8838
8961
  };
8839
- const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, isSVG, optimized) => {
8962
+ const setupRenderEffect = (instance, initialVNode, container, anchor, parentSuspense, namespace, optimized) => {
8840
8963
  const componentUpdateFn = () => {
8841
8964
  if (!instance.isMounted) {
8842
8965
  let vnodeHook;
@@ -8906,7 +9029,7 @@ If you want to remount the same app, move your app creation logic into a factory
8906
9029
  anchor,
8907
9030
  instance,
8908
9031
  parentSuspense,
8909
- isSVG
9032
+ namespace
8910
9033
  );
8911
9034
  {
8912
9035
  endMeasure(instance, `patch`);
@@ -8945,6 +9068,21 @@ If you want to remount the same app, move your app creation logic into a factory
8945
9068
  initialVNode = container = anchor = null;
8946
9069
  } else {
8947
9070
  let { next, bu, u, parent, vnode } = instance;
9071
+ {
9072
+ const nonHydratedAsyncRoot = locateNonHydratedAsyncRoot(instance);
9073
+ if (nonHydratedAsyncRoot) {
9074
+ if (next) {
9075
+ next.el = vnode.el;
9076
+ updateComponentPreRender(instance, next, optimized);
9077
+ }
9078
+ nonHydratedAsyncRoot.asyncDep.then(() => {
9079
+ if (!instance.isUnmounted) {
9080
+ componentUpdateFn();
9081
+ }
9082
+ });
9083
+ return;
9084
+ }
9085
+ }
8948
9086
  let originNext = next;
8949
9087
  let vnodeHook;
8950
9088
  {
@@ -8988,7 +9126,7 @@ If you want to remount the same app, move your app creation logic into a factory
8988
9126
  getNextHostNode(prevTree),
8989
9127
  instance,
8990
9128
  parentSuspense,
8991
- isSVG
9129
+ namespace
8992
9130
  );
8993
9131
  {
8994
9132
  endMeasure(instance, `patch`);
@@ -9049,10 +9187,10 @@ If you want to remount the same app, move your app creation logic into a factory
9049
9187
  updateProps(instance, nextVNode.props, prevProps, optimized);
9050
9188
  updateSlots(instance, nextVNode.children, optimized);
9051
9189
  pauseTracking();
9052
- flushPreFlushCbs();
9190
+ flushPreFlushCbs(instance);
9053
9191
  resetTracking();
9054
9192
  };
9055
- const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized = false) => {
9193
+ const patchChildren = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized = false) => {
9056
9194
  const c1 = n1 && n1.children;
9057
9195
  const prevShapeFlag = n1 ? n1.shapeFlag : 0;
9058
9196
  const c2 = n2.children;
@@ -9066,7 +9204,7 @@ If you want to remount the same app, move your app creation logic into a factory
9066
9204
  anchor,
9067
9205
  parentComponent,
9068
9206
  parentSuspense,
9069
- isSVG,
9207
+ namespace,
9070
9208
  slotScopeIds,
9071
9209
  optimized
9072
9210
  );
@@ -9079,7 +9217,7 @@ If you want to remount the same app, move your app creation logic into a factory
9079
9217
  anchor,
9080
9218
  parentComponent,
9081
9219
  parentSuspense,
9082
- isSVG,
9220
+ namespace,
9083
9221
  slotScopeIds,
9084
9222
  optimized
9085
9223
  );
@@ -9103,7 +9241,7 @@ If you want to remount the same app, move your app creation logic into a factory
9103
9241
  anchor,
9104
9242
  parentComponent,
9105
9243
  parentSuspense,
9106
- isSVG,
9244
+ namespace,
9107
9245
  slotScopeIds,
9108
9246
  optimized
9109
9247
  );
@@ -9121,7 +9259,7 @@ If you want to remount the same app, move your app creation logic into a factory
9121
9259
  anchor,
9122
9260
  parentComponent,
9123
9261
  parentSuspense,
9124
- isSVG,
9262
+ namespace,
9125
9263
  slotScopeIds,
9126
9264
  optimized
9127
9265
  );
@@ -9129,7 +9267,7 @@ If you want to remount the same app, move your app creation logic into a factory
9129
9267
  }
9130
9268
  }
9131
9269
  };
9132
- const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
9270
+ const patchUnkeyedChildren = (c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
9133
9271
  c1 = c1 || EMPTY_ARR;
9134
9272
  c2 = c2 || EMPTY_ARR;
9135
9273
  const oldLength = c1.length;
@@ -9145,7 +9283,7 @@ If you want to remount the same app, move your app creation logic into a factory
9145
9283
  null,
9146
9284
  parentComponent,
9147
9285
  parentSuspense,
9148
- isSVG,
9286
+ namespace,
9149
9287
  slotScopeIds,
9150
9288
  optimized
9151
9289
  );
@@ -9166,14 +9304,14 @@ If you want to remount the same app, move your app creation logic into a factory
9166
9304
  anchor,
9167
9305
  parentComponent,
9168
9306
  parentSuspense,
9169
- isSVG,
9307
+ namespace,
9170
9308
  slotScopeIds,
9171
9309
  optimized,
9172
9310
  commonLength
9173
9311
  );
9174
9312
  }
9175
9313
  };
9176
- const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized) => {
9314
+ const patchKeyedChildren = (c1, c2, container, parentAnchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
9177
9315
  let i = 0;
9178
9316
  const l2 = c2.length;
9179
9317
  let e1 = c1.length - 1;
@@ -9189,7 +9327,7 @@ If you want to remount the same app, move your app creation logic into a factory
9189
9327
  null,
9190
9328
  parentComponent,
9191
9329
  parentSuspense,
9192
- isSVG,
9330
+ namespace,
9193
9331
  slotScopeIds,
9194
9332
  optimized
9195
9333
  );
@@ -9209,7 +9347,7 @@ If you want to remount the same app, move your app creation logic into a factory
9209
9347
  null,
9210
9348
  parentComponent,
9211
9349
  parentSuspense,
9212
- isSVG,
9350
+ namespace,
9213
9351
  slotScopeIds,
9214
9352
  optimized
9215
9353
  );
@@ -9231,7 +9369,7 @@ If you want to remount the same app, move your app creation logic into a factory
9231
9369
  anchor,
9232
9370
  parentComponent,
9233
9371
  parentSuspense,
9234
- isSVG,
9372
+ namespace,
9235
9373
  slotScopeIds,
9236
9374
  optimized
9237
9375
  );
@@ -9301,7 +9439,7 @@ If you want to remount the same app, move your app creation logic into a factory
9301
9439
  null,
9302
9440
  parentComponent,
9303
9441
  parentSuspense,
9304
- isSVG,
9442
+ namespace,
9305
9443
  slotScopeIds,
9306
9444
  optimized
9307
9445
  );
@@ -9322,7 +9460,7 @@ If you want to remount the same app, move your app creation logic into a factory
9322
9460
  anchor,
9323
9461
  parentComponent,
9324
9462
  parentSuspense,
9325
- isSVG,
9463
+ namespace,
9326
9464
  slotScopeIds,
9327
9465
  optimized
9328
9466
  );
@@ -9552,13 +9690,21 @@ If you want to remount the same app, move your app creation logic into a factory
9552
9690
  }
9553
9691
  return hostNextSibling(vnode.anchor || vnode.el);
9554
9692
  };
9555
- const render = (vnode, container, isSVG) => {
9693
+ const render = (vnode, container, namespace) => {
9556
9694
  if (vnode == null) {
9557
9695
  if (container._vnode) {
9558
9696
  unmount(container._vnode, null, null, true);
9559
9697
  }
9560
9698
  } else {
9561
- patch(container._vnode || null, vnode, container, null, null, null, isSVG);
9699
+ patch(
9700
+ container._vnode || null,
9701
+ vnode,
9702
+ container,
9703
+ null,
9704
+ null,
9705
+ null,
9706
+ namespace
9707
+ );
9562
9708
  }
9563
9709
  flushPreFlushCbs();
9564
9710
  flushPostFlushCbs();
@@ -9589,6 +9735,9 @@ If you want to remount the same app, move your app creation logic into a factory
9589
9735
  createApp: createAppAPI(render, hydrate)
9590
9736
  };
9591
9737
  }
9738
+ function resolveChildrenNamespace({ type, props }, currentNamespace) {
9739
+ return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
9740
+ }
9592
9741
  function toggleRecurse({ effect, update }, allowed) {
9593
9742
  effect.allowRecurse = update.allowRecurse = allowed;
9594
9743
  }
@@ -9659,10 +9808,21 @@ If you want to remount the same app, move your app creation logic into a factory
9659
9808
  }
9660
9809
  return result;
9661
9810
  }
9811
+ function locateNonHydratedAsyncRoot(instance) {
9812
+ const subComponent = instance.subTree.component;
9813
+ if (subComponent) {
9814
+ if (subComponent.asyncDep && !subComponent.asyncResolved) {
9815
+ return subComponent;
9816
+ } else {
9817
+ return locateNonHydratedAsyncRoot(subComponent);
9818
+ }
9819
+ }
9820
+ }
9662
9821
 
9663
9822
  const isTeleport = (type) => type.__isTeleport;
9664
9823
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
9665
9824
  const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target instanceof SVGElement;
9825
+ const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
9666
9826
  const resolveTarget = (props, select) => {
9667
9827
  const targetSelector = props && props.to;
9668
9828
  if (isString(targetSelector)) {
@@ -9690,7 +9850,7 @@ If you want to remount the same app, move your app creation logic into a factory
9690
9850
  const TeleportImpl = {
9691
9851
  name: "Teleport",
9692
9852
  __isTeleport: true,
9693
- process(n1, n2, container, anchor, parentComponent, parentSuspense, isSVG, slotScopeIds, optimized, internals) {
9853
+ process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
9694
9854
  const {
9695
9855
  mc: mountChildren,
9696
9856
  pc: patchChildren,
@@ -9712,7 +9872,11 @@ If you want to remount the same app, move your app creation logic into a factory
9712
9872
  const targetAnchor = n2.targetAnchor = createText("");
9713
9873
  if (target) {
9714
9874
  insert(targetAnchor, target);
9715
- isSVG = isSVG || isTargetSVG(target);
9875
+ if (namespace === "svg" || isTargetSVG(target)) {
9876
+ namespace = "svg";
9877
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
9878
+ namespace = "mathml";
9879
+ }
9716
9880
  } else if (!disabled) {
9717
9881
  warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
9718
9882
  }
@@ -9724,7 +9888,7 @@ If you want to remount the same app, move your app creation logic into a factory
9724
9888
  anchor2,
9725
9889
  parentComponent,
9726
9890
  parentSuspense,
9727
- isSVG,
9891
+ namespace,
9728
9892
  slotScopeIds,
9729
9893
  optimized
9730
9894
  );
@@ -9743,7 +9907,11 @@ If you want to remount the same app, move your app creation logic into a factory
9743
9907
  const wasDisabled = isTeleportDisabled(n1.props);
9744
9908
  const currentContainer = wasDisabled ? container : target;
9745
9909
  const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
9746
- isSVG = isSVG || isTargetSVG(target);
9910
+ if (namespace === "svg" || isTargetSVG(target)) {
9911
+ namespace = "svg";
9912
+ } else if (namespace === "mathml" || isTargetMathML(target)) {
9913
+ namespace = "mathml";
9914
+ }
9747
9915
  if (dynamicChildren) {
9748
9916
  patchBlockChildren(
9749
9917
  n1.dynamicChildren,
@@ -9751,7 +9919,7 @@ If you want to remount the same app, move your app creation logic into a factory
9751
9919
  currentContainer,
9752
9920
  parentComponent,
9753
9921
  parentSuspense,
9754
- isSVG,
9922
+ namespace,
9755
9923
  slotScopeIds
9756
9924
  );
9757
9925
  traverseStaticChildren(n1, n2, true);
@@ -9763,7 +9931,7 @@ If you want to remount the same app, move your app creation logic into a factory
9763
9931
  currentAnchor,
9764
9932
  parentComponent,
9765
9933
  parentSuspense,
9766
- isSVG,
9934
+ namespace,
9767
9935
  slotScopeIds,
9768
9936
  false
9769
9937
  );
@@ -10447,10 +10615,14 @@ Component that was made reactive: `,
10447
10615
  let currentInstance = null;
10448
10616
  const getCurrentInstance = () => currentInstance || currentRenderingInstance;
10449
10617
  let internalSetCurrentInstance;
10618
+ let setInSSRSetupState;
10450
10619
  {
10451
10620
  internalSetCurrentInstance = (i) => {
10452
10621
  currentInstance = i;
10453
10622
  };
10623
+ setInSSRSetupState = (v) => {
10624
+ isInSSRComponentSetup = v;
10625
+ };
10454
10626
  }
10455
10627
  const setCurrentInstance = (instance) => {
10456
10628
  internalSetCurrentInstance(instance);
@@ -10474,13 +10646,13 @@ Component that was made reactive: `,
10474
10646
  }
10475
10647
  let isInSSRComponentSetup = false;
10476
10648
  function setupComponent(instance, isSSR = false) {
10477
- isInSSRComponentSetup = isSSR;
10649
+ isSSR && setInSSRSetupState(isSSR);
10478
10650
  const { props, children } = instance.vnode;
10479
10651
  const isStateful = isStatefulComponent(instance);
10480
10652
  initProps(instance, props, isStateful, isSSR);
10481
10653
  initSlots(instance, children);
10482
10654
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
10483
- isInSSRComponentSetup = false;
10655
+ isSSR && setInSSRSetupState(false);
10484
10656
  return setupResult;
10485
10657
  }
10486
10658
  function setupStatefulComponent(instance, isSSR) {
@@ -10998,7 +11170,7 @@ Component that was made reactive: `,
10998
11170
  return true;
10999
11171
  }
11000
11172
 
11001
- const version = "3.4.0-alpha.4";
11173
+ const version = "3.4.0-beta.1";
11002
11174
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11003
11175
  const ssrUtils = null;
11004
11176
  const resolveFilter = resolveFilter$1 ;
@@ -11013,6 +11185,7 @@ Component that was made reactive: `,
11013
11185
  const DeprecationTypes = DeprecationTypes$1 ;
11014
11186
 
11015
11187
  const svgNS = "http://www.w3.org/2000/svg";
11188
+ const mathmlNS = "http://www.w3.org/1998/Math/MathML";
11016
11189
  const doc = typeof document !== "undefined" ? document : null;
11017
11190
  const templateContainer = doc && /* @__PURE__ */ doc.createElement("template");
11018
11191
  const nodeOps = {
@@ -11025,8 +11198,8 @@ Component that was made reactive: `,
11025
11198
  parent.removeChild(child);
11026
11199
  }
11027
11200
  },
11028
- createElement: (tag, isSVG, is, props) => {
11029
- const el = isSVG ? doc.createElementNS(svgNS, tag) : doc.createElement(tag, is ? { is } : void 0);
11201
+ createElement: (tag, namespace, is, props) => {
11202
+ const el = namespace === "svg" ? doc.createElementNS(svgNS, tag) : namespace === "mathml" ? doc.createElementNS(mathmlNS, tag) : doc.createElement(tag, is ? { is } : void 0);
11030
11203
  if (tag === "select" && props && props.multiple != null) {
11031
11204
  el.setAttribute("multiple", props.multiple);
11032
11205
  }
@@ -11050,7 +11223,7 @@ Component that was made reactive: `,
11050
11223
  // Reason: innerHTML.
11051
11224
  // Static content here can only come from compiled templates.
11052
11225
  // As long as the user only uses trusted templates, this is safe.
11053
- insertStaticContent(content, parent, anchor, isSVG, start, end) {
11226
+ insertStaticContent(content, parent, anchor, namespace, start, end) {
11054
11227
  const before = anchor ? anchor.previousSibling : parent.lastChild;
11055
11228
  if (start && (start === end || start.nextSibling)) {
11056
11229
  while (true) {
@@ -11059,9 +11232,9 @@ Component that was made reactive: `,
11059
11232
  break;
11060
11233
  }
11061
11234
  } else {
11062
- templateContainer.innerHTML = isSVG ? `<svg>${content}</svg>` : content;
11235
+ templateContainer.innerHTML = namespace === "svg" ? `<svg>${content}</svg>` : namespace === "mathml" ? `<math>${content}</math>` : content;
11063
11236
  const template = templateContainer.content;
11064
- if (isSVG) {
11237
+ if (namespace === "svg" || namespace === "mathml") {
11065
11238
  const wrapper = template.firstChild;
11066
11239
  while (wrapper.firstChild) {
11067
11240
  template.appendChild(wrapper.firstChild);
@@ -11701,7 +11874,8 @@ Component that was made reactive: `,
11701
11874
 
11702
11875
  const isNativeOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // lowercase letter
11703
11876
  key.charCodeAt(2) > 96 && key.charCodeAt(2) < 123;
11704
- const patchProp = (el, key, prevValue, nextValue, isSVG = false, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11877
+ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, parentComponent, parentSuspense, unmountChildren) => {
11878
+ const isSVG = namespace === "svg";
11705
11879
  if (key === "class") {
11706
11880
  patchClass(el, nextValue, isSVG);
11707
11881
  } else if (key === "style") {
@@ -11753,7 +11927,9 @@ Component that was made reactive: `,
11753
11927
  }
11754
11928
  if (key === "width" || key === "height") {
11755
11929
  const tag = el.tagName;
11756
- return !(tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE");
11930
+ if (tag === "IMG" || tag === "VIDEO" || tag === "CANVAS" || tag === "SOURCE") {
11931
+ return false;
11932
+ }
11757
11933
  }
11758
11934
  if (isNativeOn(key) && isString(value)) {
11759
11935
  return false;
@@ -12544,7 +12720,7 @@ Component that was made reactive: `,
12544
12720
  }
12545
12721
  }
12546
12722
  container.innerHTML = "";
12547
- const proxy = mount(container, false, container instanceof SVGElement);
12723
+ const proxy = mount(container, false, resolveRootNamespace(container));
12548
12724
  if (container instanceof Element) {
12549
12725
  container.removeAttribute("v-cloak");
12550
12726
  container.setAttribute("data-v-app", "");
@@ -12563,14 +12739,22 @@ Component that was made reactive: `,
12563
12739
  app.mount = (containerOrSelector) => {
12564
12740
  const container = normalizeContainer(containerOrSelector);
12565
12741
  if (container) {
12566
- return mount(container, true, container instanceof SVGElement);
12742
+ return mount(container, true, resolveRootNamespace(container));
12567
12743
  }
12568
12744
  };
12569
12745
  return app;
12570
12746
  };
12747
+ function resolveRootNamespace(container) {
12748
+ if (container instanceof SVGElement) {
12749
+ return "svg";
12750
+ }
12751
+ if (typeof MathMLElement === "function" && container instanceof MathMLElement) {
12752
+ return "mathml";
12753
+ }
12754
+ }
12571
12755
  function injectNativeTagCheck(app) {
12572
12756
  Object.defineProperty(app.config, "isNativeTag", {
12573
- value: (tag) => isHTMLTag(tag) || isSVGTag(tag),
12757
+ value: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
12574
12758
  writable: false
12575
12759
  });
12576
12760
  }
@@ -13988,12 +14172,12 @@ Make sure to use the production build (*.prod.js) when deploying for production.
13988
14172
  Use a v-bind binding combined with a v-on listener that emits update:x event instead.`,
13989
14173
  [45]: `Error parsing JavaScript expression: `,
13990
14174
  [46]: `<KeepAlive> expects exactly one child component.`,
13991
- [47]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
14175
+ [51]: `@vnode-* hooks in templates are deprecated. Use the vue: prefix instead. For example, @vnode-mounted should be changed to @vue:mounted. @vnode-* hooks support will be removed in 3.4.`,
13992
14176
  // generic errors
13993
- [48]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
13994
- [49]: `ES module mode is not supported in this build of compiler.`,
13995
- [50]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
13996
- [51]: `"scopeId" option is only supported in module mode.`,
14177
+ [47]: `"prefixIdentifiers" option is not supported in this build of compiler.`,
14178
+ [48]: `ES module mode is not supported in this build of compiler.`,
14179
+ [49]: `"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.`,
14180
+ [50]: `"scopeId" option is only supported in module mode.`,
13997
14181
  // just to fulfill types
13998
14182
  [52]: ``
13999
14183
  };
@@ -15256,6 +15440,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
15256
15440
  const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
15257
15441
  const context = {
15258
15442
  // options
15443
+ filename,
15259
15444
  selfName: nameMatch && capitalize(camelize(nameMatch[1])),
15260
15445
  prefixIdentifiers,
15261
15446
  hoistStatic: hoistStatic2,
@@ -17473,7 +17658,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17473
17658
  if (arg.isStatic) {
17474
17659
  let rawName = arg.content;
17475
17660
  if (rawName.startsWith("vnode")) {
17476
- context.onError(createCompilerError(47, arg.loc));
17661
+ context.onError(createCompilerError(51, arg.loc));
17477
17662
  }
17478
17663
  if (rawName.startsWith("vue:")) {
17479
17664
  rawName = `vnode-${rawName.slice(4)}`;
@@ -17954,24 +18139,26 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17954
18139
  const isModuleMode = options.mode === "module";
17955
18140
  {
17956
18141
  if (options.prefixIdentifiers === true) {
17957
- onError(createCompilerError(48));
18142
+ onError(createCompilerError(47));
17958
18143
  } else if (isModuleMode) {
17959
- onError(createCompilerError(49));
18144
+ onError(createCompilerError(48));
17960
18145
  }
17961
18146
  }
17962
18147
  const prefixIdentifiers = false;
17963
18148
  if (options.cacheHandlers) {
17964
- onError(createCompilerError(50));
18149
+ onError(createCompilerError(49));
17965
18150
  }
17966
18151
  if (options.scopeId && !isModuleMode) {
17967
- onError(createCompilerError(51));
18152
+ onError(createCompilerError(50));
17968
18153
  }
17969
- const ast = isString(source) ? baseParse(source, options) : source;
18154
+ const resolvedOptions = extend({}, options, {
18155
+ prefixIdentifiers
18156
+ });
18157
+ const ast = isString(source) ? baseParse(source, resolvedOptions) : source;
17970
18158
  const [nodeTransforms, directiveTransforms] = getBaseTransformPreset();
17971
18159
  transform(
17972
18160
  ast,
17973
- extend({}, options, {
17974
- prefixIdentifiers,
18161
+ extend({}, resolvedOptions, {
17975
18162
  nodeTransforms: [
17976
18163
  ...nodeTransforms,
17977
18164
  ...options.nodeTransforms || []
@@ -17985,12 +18172,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
17985
18172
  )
17986
18173
  })
17987
18174
  );
17988
- return generate(
17989
- ast,
17990
- extend({}, options, {
17991
- prefixIdentifiers
17992
- })
17993
- );
18175
+ return generate(ast, resolvedOptions);
17994
18176
  }
17995
18177
 
17996
18178
  const noopDirectiveTransform = () => ({ props: [] });
@@ -18035,7 +18217,7 @@ Use a v-bind binding combined with a v-on listener that emits update:x event ins
18035
18217
  const parserOptions = {
18036
18218
  parseMode: "html",
18037
18219
  isVoidTag,
18038
- isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag),
18220
+ isNativeTag: (tag) => isHTMLTag(tag) || isSVGTag(tag) || isMathMLTag(tag),
18039
18221
  isPreTag: (tag) => tag === "pre",
18040
18222
  decodeEntities: decodeHtmlBrowser ,
18041
18223
  isBuiltInComponent: (tag) => {