@vue/compat 3.6.0-rc.5 → 3.6.0-rc.7
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-compat.d.ts +686 -685
- package/dist/vue.cjs.js +974 -769
- package/dist/vue.cjs.prod.js +797 -653
- package/dist/vue.esm-browser.js +876 -688
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +901 -705
- package/dist/vue.global.js +877 -689
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +876 -688
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +901 -705
- package/dist/vue.runtime.global.js +877 -689
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.7
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -23,7 +23,7 @@ var __exportAll = (all, no_symbols) => {
|
|
|
23
23
|
* \/\*#\_\_PURE\_\_\*\/
|
|
24
24
|
* So that they can be tree-shaken if necessary.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
27
27
|
function makeMap(str) {
|
|
28
28
|
const map = Object.create(null);
|
|
29
29
|
for (const key of str.split(",")) map[key] = 1;
|
|
@@ -67,9 +67,9 @@ const toRawType = (value) => {
|
|
|
67
67
|
};
|
|
68
68
|
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
69
69
|
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
70
|
-
const isReservedProp =
|
|
71
|
-
const isBuiltInTag =
|
|
72
|
-
const isBuiltInDirective =
|
|
70
|
+
const isReservedProp = /*@__PURE__*/ makeMap(",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted");
|
|
71
|
+
const isBuiltInTag = /*#__PURE__*/ makeMap("slot,component");
|
|
72
|
+
const isBuiltInDirective = /*@__PURE__*/ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
73
73
|
const cacheStringFunction = (fn) => {
|
|
74
74
|
const cache = Object.create(null);
|
|
75
75
|
return ((str) => {
|
|
@@ -177,7 +177,7 @@ const slotFlagsText = {
|
|
|
177
177
|
[2]: "DYNAMIC",
|
|
178
178
|
[3]: "FORWARDED"
|
|
179
179
|
};
|
|
180
|
-
const isGloballyAllowed =
|
|
180
|
+
const isGloballyAllowed = /*@__PURE__*/ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region packages/shared/src/codeframe.ts
|
|
183
183
|
const range = 2;
|
|
@@ -284,22 +284,22 @@ const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,tr
|
|
|
284
284
|
* Compiler only.
|
|
285
285
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
286
286
|
*/
|
|
287
|
-
const isHTMLTag =
|
|
287
|
+
const isHTMLTag = /*@__PURE__*/ makeMap(HTML_TAGS);
|
|
288
288
|
/**
|
|
289
289
|
* Compiler only.
|
|
290
290
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
291
291
|
*/
|
|
292
|
-
const isSVGTag =
|
|
292
|
+
const isSVGTag = /*@__PURE__*/ makeMap(SVG_TAGS);
|
|
293
293
|
/**
|
|
294
294
|
* Compiler only.
|
|
295
295
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
296
296
|
*/
|
|
297
|
-
const isMathMLTag =
|
|
297
|
+
const isMathMLTag = /*@__PURE__*/ makeMap(MATH_TAGS);
|
|
298
298
|
/**
|
|
299
299
|
* Compiler only.
|
|
300
300
|
* Do NOT use in runtime code paths unless behind `!!(process.env.NODE_ENV !== 'production')` flag.
|
|
301
301
|
*/
|
|
302
|
-
const isVoidTag =
|
|
302
|
+
const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
303
303
|
//#endregion
|
|
304
304
|
//#region packages/shared/src/domAttrConfig.ts
|
|
305
305
|
/**
|
|
@@ -314,11 +314,11 @@ const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
|
314
314
|
* - readonly -> readOnly
|
|
315
315
|
*/
|
|
316
316
|
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
317
|
-
const isSpecialBooleanAttr =
|
|
317
|
+
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
318
318
|
/**
|
|
319
319
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
320
320
|
*/
|
|
321
|
-
const isBooleanAttr =
|
|
321
|
+
const isBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
322
322
|
/**
|
|
323
323
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
324
324
|
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
@@ -332,11 +332,11 @@ function includeBooleanAttr(value) {
|
|
|
332
332
|
* Don't also forget to allow `data-*` and `aria-*`!
|
|
333
333
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
|
|
334
334
|
*/
|
|
335
|
-
const isKnownHtmlAttr =
|
|
335
|
+
const isKnownHtmlAttr = /*@__PURE__*/ makeMap("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");
|
|
336
336
|
/**
|
|
337
337
|
* Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
|
|
338
338
|
*/
|
|
339
|
-
const isKnownSvgAttr =
|
|
339
|
+
const isKnownSvgAttr = /*@__PURE__*/ makeMap("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");
|
|
340
340
|
/**
|
|
341
341
|
* Shared between server-renderer and runtime-core hydration logic
|
|
342
342
|
*/
|
|
@@ -368,6 +368,21 @@ function looseCompareArrays(a, b) {
|
|
|
368
368
|
for (let i = 0; equal && i < a.length; i++) equal = looseEqual(a[i], b[i]);
|
|
369
369
|
return equal;
|
|
370
370
|
}
|
|
371
|
+
function looseCompareCollections(a, b) {
|
|
372
|
+
if (a.size !== b.size) return false;
|
|
373
|
+
const candidates = Array.from(b);
|
|
374
|
+
const matched = new Uint8Array(candidates.length);
|
|
375
|
+
for (const item of a) {
|
|
376
|
+
let index = -1;
|
|
377
|
+
for (let i = 0; i < candidates.length; i++) if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
378
|
+
index = i;
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
if (index < 0) return false;
|
|
382
|
+
matched[index] = 1;
|
|
383
|
+
}
|
|
384
|
+
return true;
|
|
385
|
+
}
|
|
371
386
|
function looseEqual(a, b) {
|
|
372
387
|
if (a === b) return true;
|
|
373
388
|
let aValidType = isDate(a);
|
|
@@ -383,6 +398,12 @@ function looseEqual(a, b) {
|
|
|
383
398
|
bValidType = isObject(b);
|
|
384
399
|
if (aValidType || bValidType) {
|
|
385
400
|
if (!aValidType || !bValidType) return false;
|
|
401
|
+
aValidType = isMap(a);
|
|
402
|
+
bValidType = isMap(b);
|
|
403
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
404
|
+
aValidType = isSet(a);
|
|
405
|
+
bValidType = isSet(b);
|
|
406
|
+
if (aValidType || bValidType) return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
386
407
|
if (Object.keys(a).length !== Object.keys(b).length) return false;
|
|
387
408
|
for (const key in a) {
|
|
388
409
|
const aHasKey = a.hasOwnProperty(key);
|
|
@@ -834,9 +855,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
834
855
|
if (isMap(target)) run(depsMap.get(MAP_KEY_ITERATE_KEY));
|
|
835
856
|
}
|
|
836
857
|
break;
|
|
837
|
-
case "set":
|
|
838
|
-
if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
839
|
-
break;
|
|
858
|
+
case "set": if (isMap(target)) run(depsMap.get(ITERATE_KEY));
|
|
840
859
|
}
|
|
841
860
|
}
|
|
842
861
|
}
|
|
@@ -1033,8 +1052,8 @@ function noTracking(self, method, args = []) {
|
|
|
1033
1052
|
}
|
|
1034
1053
|
//#endregion
|
|
1035
1054
|
//#region packages/reactivity/src/baseHandlers.ts
|
|
1036
|
-
const isNonTrackableKeys =
|
|
1037
|
-
const builtInSymbols = new Set(
|
|
1055
|
+
const isNonTrackableKeys = /*@__PURE__*/ makeMap(`__proto__,__v_isRef,__isVue`);
|
|
1056
|
+
const builtInSymbols = new Set(/*@__PURE__*/ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
|
|
1038
1057
|
function hasOwnProperty(key) {
|
|
1039
1058
|
if (!isSymbol(key)) key = String(key);
|
|
1040
1059
|
const obj = /* @__PURE__ */ toRaw(this);
|
|
@@ -1089,12 +1108,14 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
1089
1108
|
oldValue = /* @__PURE__ */ toRaw(oldValue);
|
|
1090
1109
|
value = /* @__PURE__ */ toRaw(value);
|
|
1091
1110
|
}
|
|
1092
|
-
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value))
|
|
1093
|
-
if (
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1111
|
+
if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
|
|
1112
|
+
if (isOldValueReadonly) {
|
|
1113
|
+
if (!!(process.env.NODE_ENV !== "production")) warn$2(`Set operation on key "${String(key)}" failed: target is readonly.`, target[key]);
|
|
1114
|
+
return true;
|
|
1115
|
+
} else {
|
|
1116
|
+
oldValue.value = value;
|
|
1117
|
+
return true;
|
|
1118
|
+
}
|
|
1098
1119
|
}
|
|
1099
1120
|
}
|
|
1100
1121
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
@@ -1135,10 +1156,10 @@ var ReadonlyReactiveHandler = class extends BaseReactiveHandler {
|
|
|
1135
1156
|
return true;
|
|
1136
1157
|
}
|
|
1137
1158
|
};
|
|
1138
|
-
const mutableHandlers =
|
|
1139
|
-
const readonlyHandlers =
|
|
1140
|
-
const shallowReactiveHandlers =
|
|
1141
|
-
const shallowReadonlyHandlers =
|
|
1159
|
+
const mutableHandlers = /*@__PURE__*/ new MutableReactiveHandler();
|
|
1160
|
+
const readonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler();
|
|
1161
|
+
const shallowReactiveHandlers = /*@__PURE__*/ new MutableReactiveHandler(true);
|
|
1162
|
+
const shallowReadonlyHandlers = /*@__PURE__*/ new ReadonlyReactiveHandler(true);
|
|
1142
1163
|
//#endregion
|
|
1143
1164
|
//#region packages/reactivity/src/collectionHandlers.ts
|
|
1144
1165
|
const toShallow = (value) => value;
|
|
@@ -1289,10 +1310,10 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
1289
1310
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1290
1311
|
};
|
|
1291
1312
|
}
|
|
1292
|
-
const mutableCollectionHandlers = { get:
|
|
1293
|
-
const shallowCollectionHandlers = { get:
|
|
1294
|
-
const readonlyCollectionHandlers = { get:
|
|
1295
|
-
const shallowReadonlyCollectionHandlers = { get:
|
|
1313
|
+
const mutableCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, false) };
|
|
1314
|
+
const shallowCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(false, true) };
|
|
1315
|
+
const readonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, false) };
|
|
1316
|
+
const shallowReadonlyCollectionHandlers = { get: /*@__PURE__*/ createInstrumentationGetter(true, true) };
|
|
1296
1317
|
function checkIdentityKeys(target, has, key) {
|
|
1297
1318
|
const rawKey = /* @__PURE__ */ toRaw(key);
|
|
1298
1319
|
if (rawKey !== key && has.call(target, rawKey)) {
|
|
@@ -1317,7 +1338,7 @@ function targetTypeMap(rawType) {
|
|
|
1317
1338
|
default: return 0;
|
|
1318
1339
|
}
|
|
1319
1340
|
}
|
|
1320
|
-
|
|
1341
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1321
1342
|
function reactive(target) {
|
|
1322
1343
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
1323
1344
|
return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
|
|
@@ -1352,7 +1373,7 @@ function reactive(target) {
|
|
|
1352
1373
|
* @param target - The source object.
|
|
1353
1374
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreactive}
|
|
1354
1375
|
*/
|
|
1355
|
-
|
|
1376
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1356
1377
|
function shallowReactive(target) {
|
|
1357
1378
|
return createReactiveObject(target, false, shallowReactiveHandlers, shallowCollectionHandlers, shallowReactiveMap);
|
|
1358
1379
|
}
|
|
@@ -1385,7 +1406,7 @@ function shallowReactive(target) {
|
|
|
1385
1406
|
* @param target - The source object.
|
|
1386
1407
|
* @see {@link https://vuejs.org/api/reactivity-core.html#readonly}
|
|
1387
1408
|
*/
|
|
1388
|
-
|
|
1409
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1389
1410
|
function readonly(target) {
|
|
1390
1411
|
return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
|
|
1391
1412
|
}
|
|
@@ -1419,7 +1440,7 @@ function readonly(target) {
|
|
|
1419
1440
|
* @param target - The source object.
|
|
1420
1441
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#shallowreadonly}
|
|
1421
1442
|
*/
|
|
1422
|
-
|
|
1443
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1423
1444
|
function shallowReadonly(target) {
|
|
1424
1445
|
return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
|
|
1425
1446
|
}
|
|
@@ -1456,7 +1477,7 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1456
1477
|
* @param value - The value to check.
|
|
1457
1478
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreactive}
|
|
1458
1479
|
*/
|
|
1459
|
-
|
|
1480
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1460
1481
|
function isReactive(value) {
|
|
1461
1482
|
if (/* @__PURE__ */ isReadonly(value)) return /* @__PURE__ */ isReactive(value["__v_raw"]);
|
|
1462
1483
|
return !!(value && value["__v_isReactive"]);
|
|
@@ -1472,11 +1493,11 @@ function isReactive(value) {
|
|
|
1472
1493
|
* @param value - The value to check.
|
|
1473
1494
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isreadonly}
|
|
1474
1495
|
*/
|
|
1475
|
-
|
|
1496
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1476
1497
|
function isReadonly(value) {
|
|
1477
1498
|
return !!(value && value["__v_isReadonly"]);
|
|
1478
1499
|
}
|
|
1479
|
-
|
|
1500
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1480
1501
|
function isShallow(value) {
|
|
1481
1502
|
return !!(value && value["__v_isShallow"]);
|
|
1482
1503
|
}
|
|
@@ -1487,7 +1508,7 @@ function isShallow(value) {
|
|
|
1487
1508
|
* @param value - The value to check.
|
|
1488
1509
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
|
|
1489
1510
|
*/
|
|
1490
|
-
|
|
1511
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1491
1512
|
function isProxy(value) {
|
|
1492
1513
|
return value ? !!value["__v_raw"] : false;
|
|
1493
1514
|
}
|
|
@@ -1514,7 +1535,7 @@ function isProxy(value) {
|
|
|
1514
1535
|
* @param observed - The object for which the "raw" value is requested.
|
|
1515
1536
|
* @see {@link https://vuejs.org/api/reactivity-advanced.html#toraw}
|
|
1516
1537
|
*/
|
|
1517
|
-
|
|
1538
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1518
1539
|
function toRaw(observed) {
|
|
1519
1540
|
const raw = observed && observed["__v_raw"];
|
|
1520
1541
|
return raw ? /* @__PURE__ */ toRaw(raw) : observed;
|
|
@@ -1563,15 +1584,15 @@ const toReactive = (value) => isObject(value) ? /* @__PURE__ */ reactive(value)
|
|
|
1563
1584
|
const toReadonly = (value) => isObject(value) ? /* @__PURE__ */ readonly(value) : value;
|
|
1564
1585
|
//#endregion
|
|
1565
1586
|
//#region packages/reactivity/src/ref.ts
|
|
1566
|
-
|
|
1587
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1567
1588
|
function isRef(r) {
|
|
1568
1589
|
return r ? r["__v_isRef"] === true : false;
|
|
1569
1590
|
}
|
|
1570
|
-
|
|
1591
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1571
1592
|
function ref(value) {
|
|
1572
1593
|
return createRef(value, toReactive);
|
|
1573
1594
|
}
|
|
1574
|
-
|
|
1595
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1575
1596
|
function shallowRef(value) {
|
|
1576
1597
|
return createRef(value);
|
|
1577
1598
|
}
|
|
@@ -1774,7 +1795,7 @@ function customRef(factory) {
|
|
|
1774
1795
|
* @param object - Reactive object to be made into an object of linked refs.
|
|
1775
1796
|
* @see {@link https://vuejs.org/api/reactivity-utilities.html#torefs}
|
|
1776
1797
|
*/
|
|
1777
|
-
|
|
1798
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1778
1799
|
function toRefs(object) {
|
|
1779
1800
|
const ret = isArray(object) ? new Array(object.length) : {};
|
|
1780
1801
|
for (const key in object) ret[key] = propertyToRef(object, key);
|
|
@@ -1825,7 +1846,7 @@ var GetterRefImpl = class {
|
|
|
1825
1846
|
return this._value = this._getter();
|
|
1826
1847
|
}
|
|
1827
1848
|
};
|
|
1828
|
-
|
|
1849
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1829
1850
|
function toRef(source, key, defaultValue) {
|
|
1830
1851
|
if (/* @__PURE__ */ isRef(source)) return source;
|
|
1831
1852
|
else if (isFunction(source)) return new GetterRefImpl(source);
|
|
@@ -1891,10 +1912,12 @@ var ReactiveEffect = class {
|
|
|
1891
1912
|
get dirty() {
|
|
1892
1913
|
const flags = this.flags;
|
|
1893
1914
|
if (flags & 16) return true;
|
|
1894
|
-
if (flags & 32)
|
|
1895
|
-
this.
|
|
1896
|
-
|
|
1897
|
-
|
|
1915
|
+
if (flags & 32) {
|
|
1916
|
+
if (checkDirty(this.deps, this)) {
|
|
1917
|
+
this.flags = flags | 16;
|
|
1918
|
+
return true;
|
|
1919
|
+
} else this.flags = flags & -33;
|
|
1920
|
+
}
|
|
1898
1921
|
return false;
|
|
1899
1922
|
}
|
|
1900
1923
|
};
|
|
@@ -2073,10 +2096,12 @@ var ComputedRefImpl = class {
|
|
|
2073
2096
|
get _dirty() {
|
|
2074
2097
|
const flags = this.flags;
|
|
2075
2098
|
if (flags & 16) return true;
|
|
2076
|
-
if (flags & 32)
|
|
2077
|
-
this.
|
|
2078
|
-
|
|
2079
|
-
|
|
2099
|
+
if (flags & 32) {
|
|
2100
|
+
if (checkDirty(this.deps, this)) {
|
|
2101
|
+
this.flags = flags | 16;
|
|
2102
|
+
return true;
|
|
2103
|
+
} else this.flags = flags & -33;
|
|
2104
|
+
}
|
|
2080
2105
|
return false;
|
|
2081
2106
|
}
|
|
2082
2107
|
/**
|
|
@@ -2137,7 +2162,7 @@ var ComputedRefImpl = class {
|
|
|
2137
2162
|
}
|
|
2138
2163
|
};
|
|
2139
2164
|
if (!!(process.env.NODE_ENV !== "production")) setupOnTrigger(ComputedRefImpl);
|
|
2140
|
-
|
|
2165
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2141
2166
|
function computed$1(getterOrOptions, debugOptions, isSSR = false) {
|
|
2142
2167
|
let getter;
|
|
2143
2168
|
let setter;
|
|
@@ -2215,25 +2240,26 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2215
2240
|
else if (isFunction(s)) return call ? call(s, 2) : s();
|
|
2216
2241
|
else process.env.NODE_ENV !== "production" && warnInvalidSource(s, onWarn);
|
|
2217
2242
|
});
|
|
2218
|
-
} else if (isFunction(source))
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2243
|
+
} else if (isFunction(source)) {
|
|
2244
|
+
if (cb) getter = call ? () => call(source, 2) : source;
|
|
2245
|
+
else getter = () => {
|
|
2246
|
+
if (this.cleanupsLength) {
|
|
2247
|
+
const prevSub = setActiveSub();
|
|
2248
|
+
try {
|
|
2249
|
+
cleanup(this);
|
|
2250
|
+
} finally {
|
|
2251
|
+
setActiveSub(prevSub);
|
|
2252
|
+
}
|
|
2253
|
+
}
|
|
2254
|
+
const currentEffect = activeWatcher;
|
|
2255
|
+
activeWatcher = this;
|
|
2222
2256
|
try {
|
|
2223
|
-
|
|
2257
|
+
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2224
2258
|
} finally {
|
|
2225
|
-
|
|
2259
|
+
activeWatcher = currentEffect;
|
|
2226
2260
|
}
|
|
2227
|
-
}
|
|
2228
|
-
|
|
2229
|
-
activeWatcher = this;
|
|
2230
|
-
try {
|
|
2231
|
-
return call ? call(source, 3, [this.boundCleanup]) : source(this.boundCleanup);
|
|
2232
|
-
} finally {
|
|
2233
|
-
activeWatcher = currentEffect;
|
|
2234
|
-
}
|
|
2235
|
-
};
|
|
2236
|
-
else {
|
|
2261
|
+
};
|
|
2262
|
+
} else {
|
|
2237
2263
|
getter = NOOP;
|
|
2238
2264
|
process.env.NODE_ENV !== "production" && warnInvalidSource(source, onWarn);
|
|
2239
2265
|
}
|
|
@@ -2571,7 +2597,7 @@ let currentFlushPromise = null;
|
|
|
2571
2597
|
let jobsLength = 0;
|
|
2572
2598
|
let flushIndex = 0;
|
|
2573
2599
|
let postFlushIndex = 0;
|
|
2574
|
-
const resolvedPromise =
|
|
2600
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
2575
2601
|
const RECURSION_LIMIT = 100;
|
|
2576
2602
|
function nextTick(fn) {
|
|
2577
2603
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -2610,6 +2636,7 @@ const doFlushJobs = () => {
|
|
|
2610
2636
|
flushJobs();
|
|
2611
2637
|
} catch (e) {
|
|
2612
2638
|
currentFlushPromise = null;
|
|
2639
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
2613
2640
|
throw e;
|
|
2614
2641
|
}
|
|
2615
2642
|
};
|
|
@@ -2617,9 +2644,10 @@ function queueFlush() {
|
|
|
2617
2644
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
2618
2645
|
}
|
|
2619
2646
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
2620
|
-
if (!isArray(jobs))
|
|
2621
|
-
|
|
2622
|
-
|
|
2647
|
+
if (!isArray(jobs)) {
|
|
2648
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
2649
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
2650
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2623
2651
|
queueFlush();
|
|
2624
2652
|
}
|
|
2625
2653
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -2633,8 +2661,11 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
2633
2661
|
i--;
|
|
2634
2662
|
jobsLength--;
|
|
2635
2663
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2636
|
-
|
|
2637
|
-
|
|
2664
|
+
try {
|
|
2665
|
+
cb();
|
|
2666
|
+
} finally {
|
|
2667
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2668
|
+
}
|
|
2638
2669
|
}
|
|
2639
2670
|
}
|
|
2640
2671
|
function flushPostFlushCbs(seen) {
|
|
@@ -2647,18 +2678,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2647
2678
|
activePostJobs = postJobs;
|
|
2648
2679
|
postJobs = [];
|
|
2649
2680
|
if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
cb
|
|
2656
|
-
|
|
2657
|
-
|
|
2681
|
+
try {
|
|
2682
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
2683
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
2684
|
+
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
|
|
2685
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
2686
|
+
if (!(cb.flags & 4)) try {
|
|
2687
|
+
cb();
|
|
2688
|
+
} finally {
|
|
2689
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
2690
|
+
}
|
|
2658
2691
|
}
|
|
2692
|
+
} finally {
|
|
2693
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
2694
|
+
activePostJobs = null;
|
|
2695
|
+
postFlushIndex = 0;
|
|
2659
2696
|
}
|
|
2660
|
-
activePostJobs = null;
|
|
2661
|
-
postFlushIndex = 0;
|
|
2662
2697
|
}
|
|
2663
2698
|
}
|
|
2664
2699
|
let isFlushing = false;
|
|
@@ -2668,9 +2703,12 @@ let isFlushing = false;
|
|
|
2668
2703
|
function flushOnAppMount(instance) {
|
|
2669
2704
|
if (!isFlushing) {
|
|
2670
2705
|
isFlushing = true;
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2706
|
+
try {
|
|
2707
|
+
flushPreFlushCbs(instance);
|
|
2708
|
+
flushPostFlushCbs();
|
|
2709
|
+
} finally {
|
|
2710
|
+
isFlushing = false;
|
|
2711
|
+
}
|
|
2674
2712
|
}
|
|
2675
2713
|
}
|
|
2676
2714
|
function flushJobs(seen) {
|
|
@@ -2700,8 +2738,8 @@ function flushJobs(seen) {
|
|
|
2700
2738
|
jobsLength = 0;
|
|
2701
2739
|
jobs.length = 0;
|
|
2702
2740
|
flushPostFlushCbs(seen);
|
|
2703
|
-
currentFlushPromise = null;
|
|
2704
2741
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
2742
|
+
else currentFlushPromise = null;
|
|
2705
2743
|
}
|
|
2706
2744
|
}
|
|
2707
2745
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -2732,6 +2770,19 @@ if (!!(process.env.NODE_ENV !== "production")) getGlobalThis().__VUE_HMR_RUNTIME
|
|
|
2732
2770
|
rerender: tryWrap(rerender),
|
|
2733
2771
|
reload: tryWrap(reload)
|
|
2734
2772
|
};
|
|
2773
|
+
function runWithHmrUpdating(fn) {
|
|
2774
|
+
isHmrUpdating = true;
|
|
2775
|
+
let done = false;
|
|
2776
|
+
try {
|
|
2777
|
+
fn();
|
|
2778
|
+
done = true;
|
|
2779
|
+
} finally {
|
|
2780
|
+
if (done) nextTick(() => {
|
|
2781
|
+
isHmrUpdating = false;
|
|
2782
|
+
});
|
|
2783
|
+
else isHmrUpdating = false;
|
|
2784
|
+
}
|
|
2785
|
+
}
|
|
2735
2786
|
const map = /* @__PURE__ */ new Map();
|
|
2736
2787
|
function registerHMR(instance) {
|
|
2737
2788
|
const id = instance.type.__hmrId;
|
|
@@ -2773,18 +2824,16 @@ function rerender(id, newRender) {
|
|
|
2773
2824
|
instance.render = newRender;
|
|
2774
2825
|
normalizeClassComponent(instance.type).render = newRender;
|
|
2775
2826
|
}
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2827
|
+
runWithHmrUpdating(() => {
|
|
2828
|
+
if (instance.vapor) {
|
|
2829
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
2830
|
+
} else {
|
|
2831
|
+
const i = instance;
|
|
2832
|
+
if (!(i.effect.flags & 1024)) {
|
|
2833
|
+
i.renderCache = [];
|
|
2834
|
+
i.effect.run();
|
|
2835
|
+
}
|
|
2784
2836
|
}
|
|
2785
|
-
}
|
|
2786
|
-
nextTick(() => {
|
|
2787
|
-
isHmrUpdating = false;
|
|
2788
2837
|
});
|
|
2789
2838
|
});
|
|
2790
2839
|
}
|
|
@@ -2799,15 +2848,17 @@ function reload(id, newComp) {
|
|
|
2799
2848
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2800
2849
|
const dirtyInstances = new Set(instances);
|
|
2801
2850
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2802
|
-
|
|
2803
|
-
const
|
|
2804
|
-
|
|
2805
|
-
if (
|
|
2806
|
-
rerenderedParents.
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2851
|
+
runWithHmrUpdating(() => {
|
|
2852
|
+
for (const instance of instances) {
|
|
2853
|
+
const parent = instance.parent;
|
|
2854
|
+
if (parent) {
|
|
2855
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2856
|
+
rerenderedParents.add(parent);
|
|
2857
|
+
parent.hmrRerender();
|
|
2858
|
+
}
|
|
2859
|
+
} else instance.hmrReload(newComp);
|
|
2860
|
+
}
|
|
2861
|
+
});
|
|
2811
2862
|
} else {
|
|
2812
2863
|
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2813
2864
|
const dirtyInstanceSet = new Set(instances);
|
|
@@ -2841,21 +2892,22 @@ function reload(id, newComp) {
|
|
|
2841
2892
|
}
|
|
2842
2893
|
parentUpdates.forEach((updates, parent) => {
|
|
2843
2894
|
queueJob(() => {
|
|
2844
|
-
|
|
2845
|
-
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
|
|
2851
|
-
|
|
2895
|
+
try {
|
|
2896
|
+
runWithHmrUpdating(() => {
|
|
2897
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2898
|
+
else {
|
|
2899
|
+
const i = parent;
|
|
2900
|
+
if (!(i.effect.flags & 1024)) {
|
|
2901
|
+
i.renderCache = [];
|
|
2902
|
+
i.effect.run();
|
|
2903
|
+
}
|
|
2904
|
+
}
|
|
2905
|
+
});
|
|
2906
|
+
} finally {
|
|
2907
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2908
|
+
dirtyInstances.delete(instance);
|
|
2909
|
+
});
|
|
2852
2910
|
}
|
|
2853
|
-
nextTick(() => {
|
|
2854
|
-
isHmrUpdating = false;
|
|
2855
|
-
});
|
|
2856
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
2857
|
-
dirtyInstances.delete(instance);
|
|
2858
|
-
});
|
|
2859
2911
|
});
|
|
2860
2912
|
});
|
|
2861
2913
|
}
|
|
@@ -2924,20 +2976,20 @@ function devtoolsInitApp(app, version) {
|
|
|
2924
2976
|
function devtoolsUnmountApp(app) {
|
|
2925
2977
|
emit$2("app:unmount", app);
|
|
2926
2978
|
}
|
|
2927
|
-
const devtoolsComponentAdded =
|
|
2928
|
-
const devtoolsComponentUpdated =
|
|
2929
|
-
const _devtoolsComponentRemoved =
|
|
2979
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
2980
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
2981
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
2930
2982
|
const devtoolsComponentRemoved = (component) => {
|
|
2931
2983
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
2932
2984
|
};
|
|
2933
|
-
|
|
2985
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2934
2986
|
function createDevtoolsComponentHook(hook) {
|
|
2935
2987
|
return (component) => {
|
|
2936
2988
|
emit$2(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
2937
2989
|
};
|
|
2938
2990
|
}
|
|
2939
|
-
const devtoolsPerfStart =
|
|
2940
|
-
const devtoolsPerfEnd =
|
|
2991
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
2992
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
2941
2993
|
function createDevtoolsPerformanceHook(hook) {
|
|
2942
2994
|
return (component, type, time) => {
|
|
2943
2995
|
emit$2(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -3167,7 +3219,7 @@ function configureCompat$1(config) {
|
|
|
3167
3219
|
if (!!(process.env.NODE_ENV !== "production")) validateCompatConfig(config);
|
|
3168
3220
|
extend(globalCompatConfig, config);
|
|
3169
3221
|
}
|
|
3170
|
-
const seenConfigObjects =
|
|
3222
|
+
const seenConfigObjects = /*@__PURE__*/ new WeakSet();
|
|
3171
3223
|
const warnedInvalidKeys = {};
|
|
3172
3224
|
function validateCompatConfig(config, instance) {
|
|
3173
3225
|
if (seenConfigObjects.has(config)) return;
|
|
@@ -3219,7 +3271,7 @@ function checkCompatEnabled$1(key, instance, ...args) {
|
|
|
3219
3271
|
}
|
|
3220
3272
|
//#endregion
|
|
3221
3273
|
//#region packages/runtime-core/src/compat/instanceEventEmitter.ts
|
|
3222
|
-
const eventRegistryMap =
|
|
3274
|
+
const eventRegistryMap = /*@__PURE__*/ new WeakMap();
|
|
3223
3275
|
function getRegistry(instance) {
|
|
3224
3276
|
let events = eventRegistryMap.get(instance);
|
|
3225
3277
|
if (!events) eventRegistryMap.set(instance, events = Object.create(null));
|
|
@@ -3353,19 +3405,21 @@ const legacyDirectiveHookMap = {
|
|
|
3353
3405
|
};
|
|
3354
3406
|
function mapCompatDirectiveHook(name, dir, instance) {
|
|
3355
3407
|
const mappedName = legacyDirectiveHookMap[name];
|
|
3356
|
-
if (mappedName)
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3408
|
+
if (mappedName) {
|
|
3409
|
+
if (isArray(mappedName)) {
|
|
3410
|
+
const hook = [];
|
|
3411
|
+
mappedName.forEach((mapped) => {
|
|
3412
|
+
const mappedHook = dir[mapped];
|
|
3413
|
+
if (mappedHook) {
|
|
3414
|
+
softAssertCompatEnabled("CUSTOM_DIR", instance, mapped, name);
|
|
3415
|
+
hook.push(mappedHook);
|
|
3416
|
+
}
|
|
3417
|
+
});
|
|
3418
|
+
return hook.length ? hook : void 0;
|
|
3419
|
+
} else {
|
|
3420
|
+
if (dir[mappedName]) softAssertCompatEnabled("CUSTOM_DIR", instance, mappedName, name);
|
|
3421
|
+
return dir[mappedName];
|
|
3422
|
+
}
|
|
3369
3423
|
}
|
|
3370
3424
|
}
|
|
3371
3425
|
//#endregion
|
|
@@ -3574,15 +3628,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
|
|
|
3574
3628
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
3575
3629
|
const resolveTarget = (props, select) => {
|
|
3576
3630
|
const targetSelector = props && props.to;
|
|
3577
|
-
if (isString(targetSelector))
|
|
3578
|
-
|
|
3579
|
-
|
|
3631
|
+
if (isString(targetSelector)) {
|
|
3632
|
+
if (!select) {
|
|
3633
|
+
process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
3634
|
+
return null;
|
|
3635
|
+
} else {
|
|
3636
|
+
const target = select(targetSelector);
|
|
3637
|
+
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3638
|
+
return target;
|
|
3639
|
+
}
|
|
3580
3640
|
} else {
|
|
3581
|
-
const target = select(targetSelector);
|
|
3582
|
-
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
3583
|
-
return target;
|
|
3584
|
-
}
|
|
3585
|
-
else {
|
|
3586
3641
|
if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
3587
3642
|
return targetSelector;
|
|
3588
3643
|
}
|
|
@@ -3620,7 +3675,8 @@ const TeleportImpl = {
|
|
|
3620
3675
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3621
3676
|
pendingMounts.delete(vnode);
|
|
3622
3677
|
if (isTeleportDisabled(vnode.props)) {
|
|
3623
|
-
|
|
3678
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
3679
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
3624
3680
|
updateCssVars(vnode, true);
|
|
3625
3681
|
}
|
|
3626
3682
|
mountToTarget(vnode);
|
|
@@ -3729,15 +3785,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
3729
3785
|
const disabled = isTeleportDisabled(vnode.props);
|
|
3730
3786
|
if (target) {
|
|
3731
3787
|
const targetNode = target._lpa || target.firstChild;
|
|
3732
|
-
if (vnode.shapeFlag & 16)
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3788
|
+
if (vnode.shapeFlag & 16) {
|
|
3789
|
+
if (disabled) {
|
|
3790
|
+
hydrateDisabledTeleport(node, vnode);
|
|
3791
|
+
hydrateAnchor(target, targetNode);
|
|
3792
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
3793
|
+
} else {
|
|
3794
|
+
vnode.anchor = nextSibling(node);
|
|
3795
|
+
hydrateAnchor(target, targetNode);
|
|
3796
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
3797
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3798
|
+
}
|
|
3741
3799
|
}
|
|
3742
3800
|
updateCssVars(vnode, disabled);
|
|
3743
3801
|
} else if (disabled) {
|
|
@@ -3905,8 +3963,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3905
3963
|
persisted,
|
|
3906
3964
|
beforeEnter(el) {
|
|
3907
3965
|
let hook = onBeforeEnter;
|
|
3908
|
-
if (!state.isMounted)
|
|
3909
|
-
|
|
3966
|
+
if (!state.isMounted) {
|
|
3967
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
3968
|
+
else return;
|
|
3969
|
+
}
|
|
3910
3970
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
3911
3971
|
earlyRemove();
|
|
3912
3972
|
callHook(hook, [el]);
|
|
@@ -3916,11 +3976,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3916
3976
|
let hook = onEnter;
|
|
3917
3977
|
let afterHook = onAfterEnter;
|
|
3918
3978
|
let cancelHook = onEnterCancelled;
|
|
3919
|
-
if (!state.isMounted)
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3923
|
-
|
|
3979
|
+
if (!state.isMounted) {
|
|
3980
|
+
if (appear) {
|
|
3981
|
+
hook = onAppear || onEnter;
|
|
3982
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
3983
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
3984
|
+
} else return;
|
|
3985
|
+
}
|
|
3924
3986
|
let called = false;
|
|
3925
3987
|
el[enterCbKey$1] = (cancelled) => {
|
|
3926
3988
|
if (called) return;
|
|
@@ -3954,7 +4016,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
3954
4016
|
else done();
|
|
3955
4017
|
},
|
|
3956
4018
|
clone(node) {
|
|
3957
|
-
return cloneHooks(node);
|
|
4019
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
3958
4020
|
}
|
|
3959
4021
|
};
|
|
3960
4022
|
return hooks;
|
|
@@ -4097,9 +4159,9 @@ function checkTransitionMode(mode) {
|
|
|
4097
4159
|
}
|
|
4098
4160
|
//#endregion
|
|
4099
4161
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4100
|
-
|
|
4162
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4101
4163
|
function defineComponent(options, extraOptions) {
|
|
4102
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
4164
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
4103
4165
|
}
|
|
4104
4166
|
//#endregion
|
|
4105
4167
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -4196,15 +4258,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4196
4258
|
if (rawRef.f) {
|
|
4197
4259
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
4198
4260
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
4199
|
-
else if (!isArray(existing))
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4261
|
+
else if (!isArray(existing)) {
|
|
4262
|
+
if (_isString) {
|
|
4263
|
+
refs[ref] = [refValue];
|
|
4264
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
4265
|
+
} else {
|
|
4266
|
+
const newVal = [refValue];
|
|
4267
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
4268
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
4269
|
+
}
|
|
4270
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
4208
4271
|
} else if (_isString) {
|
|
4209
4272
|
refs[ref] = value;
|
|
4210
4273
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -4318,11 +4381,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4318
4381
|
let nextNode = null;
|
|
4319
4382
|
switch (type) {
|
|
4320
4383
|
case Text:
|
|
4321
|
-
if (domType !== 3)
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4384
|
+
if (domType !== 3) {
|
|
4385
|
+
if (vnode.children === "") {
|
|
4386
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
4387
|
+
nextNode = node;
|
|
4388
|
+
} else nextNode = onMismatch();
|
|
4389
|
+
} else {
|
|
4326
4390
|
if (node.data !== vnode.children) {
|
|
4327
4391
|
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
4328
4392
|
logMismatchError();
|
|
@@ -4361,9 +4425,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4361
4425
|
case VaporSlot:
|
|
4362
4426
|
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4363
4427
|
break;
|
|
4364
|
-
default: if (shapeFlag & 1)
|
|
4365
|
-
|
|
4366
|
-
|
|
4428
|
+
default: if (shapeFlag & 1) {
|
|
4429
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
4430
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4431
|
+
} else if (shapeFlag & 6) {
|
|
4367
4432
|
vnode.slotScopeIds = slotScopeIds;
|
|
4368
4433
|
const container = parentNode(node);
|
|
4369
4434
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
@@ -4385,19 +4450,20 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4385
4450
|
} else {
|
|
4386
4451
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4387
4452
|
const component = vnode.component;
|
|
4388
|
-
if (isAsyncWrapper(vnode)
|
|
4453
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep && !component.asyncResolved)) {
|
|
4389
4454
|
let subTree;
|
|
4390
4455
|
if (isFragmentStart) {
|
|
4391
|
-
subTree = createVNode(
|
|
4456
|
+
subTree = createVNode(Static);
|
|
4392
4457
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4393
4458
|
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4394
4459
|
subTree.el = node;
|
|
4395
4460
|
component.subTree = subTree;
|
|
4396
4461
|
}
|
|
4397
4462
|
}
|
|
4398
|
-
} else if (shapeFlag & 64)
|
|
4399
|
-
|
|
4400
|
-
|
|
4463
|
+
} else if (shapeFlag & 64) {
|
|
4464
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
4465
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
4466
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
4401
4467
|
else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4402
4468
|
}
|
|
4403
4469
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -4542,8 +4608,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4542
4608
|
node = nextSibling(node);
|
|
4543
4609
|
if (node && isComment(node)) {
|
|
4544
4610
|
if (node.data === open) match++;
|
|
4545
|
-
if (node.data === close)
|
|
4546
|
-
|
|
4611
|
+
if (node.data === close) {
|
|
4612
|
+
if (match === 0) return nextSibling(node);
|
|
4613
|
+
else match--;
|
|
4614
|
+
}
|
|
4547
4615
|
}
|
|
4548
4616
|
}
|
|
4549
4617
|
return node;
|
|
@@ -4565,7 +4633,7 @@ const isTemplateNode = (node) => {
|
|
|
4565
4633
|
/**
|
|
4566
4634
|
* Dev only
|
|
4567
4635
|
*/
|
|
4568
|
-
const resourceProps =
|
|
4636
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
4569
4637
|
"src",
|
|
4570
4638
|
"srcset",
|
|
4571
4639
|
"href",
|
|
@@ -4819,14 +4887,14 @@ function forEachElement(node, cb) {
|
|
|
4819
4887
|
//#endregion
|
|
4820
4888
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
4821
4889
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
4822
|
-
|
|
4890
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
4823
4891
|
function defineAsyncComponent(source) {
|
|
4824
4892
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
4825
4893
|
return /* @__PURE__ */ defineComponent({
|
|
4826
4894
|
name: "AsyncComponentWrapper",
|
|
4827
4895
|
__asyncLoader: load,
|
|
4828
4896
|
__asyncHydrate(el, instance, hydrate) {
|
|
4829
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
4897
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
4830
4898
|
},
|
|
4831
4899
|
get __asyncResolved() {
|
|
4832
4900
|
return getResolvedComp();
|
|
@@ -4945,10 +5013,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
4945
5013
|
* shared between core and vapor
|
|
4946
5014
|
* @internal
|
|
4947
5015
|
*/
|
|
4948
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
5016
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
4949
5017
|
const wasConnected = el.isConnected;
|
|
4950
5018
|
let patched = false;
|
|
4951
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
5019
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4952
5020
|
const performHydrate = () => {
|
|
4953
5021
|
if (patched) {
|
|
4954
5022
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -5038,10 +5106,13 @@ const KeepAliveImpl = {
|
|
|
5038
5106
|
});
|
|
5039
5107
|
let pendingCacheKey = null;
|
|
5040
5108
|
const cacheSubtree = () => {
|
|
5041
|
-
if (pendingCacheKey != null)
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5109
|
+
if (pendingCacheKey != null) {
|
|
5110
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
5111
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
5112
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
5113
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
5114
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
5115
|
+
}
|
|
5045
5116
|
};
|
|
5046
5117
|
onMounted(cacheSubtree);
|
|
5047
5118
|
onUpdated(cacheSubtree);
|
|
@@ -5112,7 +5183,7 @@ const decorate$2 = (t) => {
|
|
|
5112
5183
|
t.__isBuiltIn = true;
|
|
5113
5184
|
return t;
|
|
5114
5185
|
};
|
|
5115
|
-
const KeepAlive =
|
|
5186
|
+
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
5116
5187
|
function matches(pattern, name) {
|
|
5117
5188
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
5118
5189
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5328,16 +5399,17 @@ function compatH(type, propsOrChildren, children) {
|
|
|
5328
5399
|
}
|
|
5329
5400
|
const l = arguments.length;
|
|
5330
5401
|
const is2ndArgArrayChildren = isArray(propsOrChildren);
|
|
5331
|
-
if (l === 2 || is2ndArgArrayChildren)
|
|
5332
|
-
if (
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5402
|
+
if (l === 2 || is2ndArgArrayChildren) {
|
|
5403
|
+
if (isObject(propsOrChildren) && !is2ndArgArrayChildren) {
|
|
5404
|
+
if (isVNode(propsOrChildren)) return convertLegacySlots(createVNode(type, null, [propsOrChildren]));
|
|
5405
|
+
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type)), propsOrChildren));
|
|
5406
|
+
} else return convertLegacySlots(createVNode(type, null, propsOrChildren));
|
|
5407
|
+
} else {
|
|
5336
5408
|
if (isVNode(children)) children = [children];
|
|
5337
5409
|
return convertLegacySlots(convertLegacyDirectives(createVNode(type, convertLegacyProps(propsOrChildren, type), children), propsOrChildren));
|
|
5338
5410
|
}
|
|
5339
5411
|
}
|
|
5340
|
-
const skipLegacyRootLevelProps =
|
|
5412
|
+
const skipLegacyRootLevelProps = /*@__PURE__*/ makeMap("staticStyle,staticClass,directives,model,hook");
|
|
5341
5413
|
function convertLegacyProps(legacyProps, type) {
|
|
5342
5414
|
if (!legacyProps) return null;
|
|
5343
5415
|
const converted = {};
|
|
@@ -5349,8 +5421,10 @@ function convertLegacyProps(legacyProps, type) {
|
|
|
5349
5421
|
if (key === "nativeOn") handlerKey += `Native`;
|
|
5350
5422
|
const existing = converted[handlerKey];
|
|
5351
5423
|
const incoming = listeners[event];
|
|
5352
|
-
if (existing !== incoming)
|
|
5353
|
-
|
|
5424
|
+
if (existing !== incoming) {
|
|
5425
|
+
if (existing) converted[handlerKey] = [].concat(existing, incoming);
|
|
5426
|
+
else converted[handlerKey] = incoming;
|
|
5427
|
+
}
|
|
5354
5428
|
}
|
|
5355
5429
|
} else if (!skipLegacyRootLevelProps(key)) converted[key] = legacyProps[key];
|
|
5356
5430
|
if (legacyProps.staticClass) converted.class = normalizeClass([legacyProps.staticClass, converted.class]);
|
|
@@ -5449,7 +5523,7 @@ function convertLegacyFunctionalComponent(comp) {
|
|
|
5449
5523
|
const legacyFn = comp.render;
|
|
5450
5524
|
const Func = (props, ctx) => {
|
|
5451
5525
|
const instance = getCurrentInstance();
|
|
5452
|
-
|
|
5526
|
+
const legacyCtx = {
|
|
5453
5527
|
props,
|
|
5454
5528
|
children: instance.vnode.children || [],
|
|
5455
5529
|
data: instance.vnode.props || {},
|
|
@@ -5469,7 +5543,8 @@ function convertLegacyFunctionalComponent(comp) {
|
|
|
5469
5543
|
}
|
|
5470
5544
|
return {};
|
|
5471
5545
|
}
|
|
5472
|
-
}
|
|
5546
|
+
};
|
|
5547
|
+
return legacyFn(compatH, legacyCtx);
|
|
5473
5548
|
};
|
|
5474
5549
|
Func.props = comp.props;
|
|
5475
5550
|
Func.displayName = comp.name;
|
|
@@ -5498,23 +5573,25 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5498
5573
|
}
|
|
5499
5574
|
ret = new Array(source.length);
|
|
5500
5575
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
5501
|
-
} else if (typeof source === "number")
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5509
|
-
else {
|
|
5510
|
-
const keys = Object.keys(source);
|
|
5511
|
-
ret = new Array(keys.length);
|
|
5512
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5513
|
-
const key = keys[i];
|
|
5514
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5576
|
+
} else if (typeof source === "number") {
|
|
5577
|
+
if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
5578
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
5579
|
+
ret = [];
|
|
5580
|
+
} else {
|
|
5581
|
+
ret = new Array(source);
|
|
5582
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
5515
5583
|
}
|
|
5516
|
-
}
|
|
5517
|
-
|
|
5584
|
+
} else if (isObject(source)) {
|
|
5585
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
5586
|
+
else {
|
|
5587
|
+
const keys = Object.keys(source);
|
|
5588
|
+
ret = new Array(keys.length);
|
|
5589
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
5590
|
+
const key = keys[i];
|
|
5591
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
5592
|
+
}
|
|
5593
|
+
}
|
|
5594
|
+
} else ret = [];
|
|
5518
5595
|
if (cache) cache[index] = ret;
|
|
5519
5596
|
return ret;
|
|
5520
5597
|
}
|
|
@@ -5539,14 +5616,27 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5539
5616
|
//#endregion
|
|
5540
5617
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
5541
5618
|
/**
|
|
5619
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
5620
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
5621
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
5622
|
+
* "which one". Internal to vapor interop.
|
|
5623
|
+
*/
|
|
5624
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
5625
|
+
/**
|
|
5626
|
+
* Marks a compiler-generated slot fallback as VDOM-rendered so the vapor
|
|
5627
|
+
* interop fallback chain renders it through the VDOM renderer. Internal to
|
|
5628
|
+
* vapor interop.
|
|
5629
|
+
*/
|
|
5630
|
+
const vdomSlotFallbackKey = Symbol(`vdomSlotFallback`);
|
|
5631
|
+
/**
|
|
5542
5632
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5543
5633
|
* @private
|
|
5544
5634
|
*/
|
|
5545
5635
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5546
5636
|
if (props == null) props = {};
|
|
5547
5637
|
let slot = slots[name];
|
|
5548
|
-
if (fallback) fallback
|
|
5549
|
-
const vaporSlot = slot &&
|
|
5638
|
+
if (fallback) fallback[vdomSlotFallbackKey] = true;
|
|
5639
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5550
5640
|
if (vaporSlot) {
|
|
5551
5641
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5552
5642
|
ret.vs = {
|
|
@@ -5654,12 +5744,14 @@ function legacyResolveScopedSlots(fns, raw, hasDynamicKeys) {
|
|
|
5654
5744
|
function mapKeyToName(slots) {
|
|
5655
5745
|
for (let i = 0; i < slots.length; i++) {
|
|
5656
5746
|
const fn = slots[i];
|
|
5657
|
-
if (fn)
|
|
5658
|
-
|
|
5747
|
+
if (fn) {
|
|
5748
|
+
if (isArray(fn)) mapKeyToName(fn);
|
|
5749
|
+
else fn.name = fn.key || "default";
|
|
5750
|
+
}
|
|
5659
5751
|
}
|
|
5660
5752
|
return slots;
|
|
5661
5753
|
}
|
|
5662
|
-
const staticCacheMap =
|
|
5754
|
+
const staticCacheMap = /*@__PURE__*/ new WeakMap();
|
|
5663
5755
|
function legacyRenderStatic(instance, index) {
|
|
5664
5756
|
let cache = staticCacheMap.get(instance);
|
|
5665
5757
|
if (!cache) staticCacheMap.set(instance, cache = []);
|
|
@@ -5792,11 +5884,38 @@ const getPublicInstance = (i) => {
|
|
|
5792
5884
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
5793
5885
|
return getPublicInstance(i.parent);
|
|
5794
5886
|
};
|
|
5887
|
+
const resolveDevRootEl = (vnode) => {
|
|
5888
|
+
let found = false;
|
|
5889
|
+
while (true) {
|
|
5890
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
5891
|
+
const root = filterSingleRoot(vnode.children);
|
|
5892
|
+
if (!root) return;
|
|
5893
|
+
vnode = root;
|
|
5894
|
+
found = true;
|
|
5895
|
+
continue;
|
|
5896
|
+
}
|
|
5897
|
+
const component = vnode.component;
|
|
5898
|
+
if (component && component.subTree) {
|
|
5899
|
+
vnode = component.subTree;
|
|
5900
|
+
continue;
|
|
5901
|
+
}
|
|
5902
|
+
const suspense = vnode.suspense;
|
|
5903
|
+
if (suspense && suspense.activeBranch) {
|
|
5904
|
+
vnode = suspense.activeBranch;
|
|
5905
|
+
continue;
|
|
5906
|
+
}
|
|
5907
|
+
return found ? vnode.el : void 0;
|
|
5908
|
+
}
|
|
5909
|
+
};
|
|
5910
|
+
const getDevRootFragmentEl = (i) => {
|
|
5911
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
5912
|
+
return el === void 0 ? i.vnode.el : el;
|
|
5913
|
+
};
|
|
5795
5914
|
let publicPropertiesMap;
|
|
5796
5915
|
const getPublicPropertiesMap = () => {
|
|
5797
5916
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
5798
5917
|
$: (i) => i,
|
|
5799
|
-
$el: (i) => i.vnode.el,
|
|
5918
|
+
$el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
|
|
5800
5919
|
$data: (i) => i.data,
|
|
5801
5920
|
$props: (i) => !!(process.env.NODE_ENV !== "production") ? /* @__PURE__ */ shallowReadonly(i.props) : i.props,
|
|
5802
5921
|
$attrs: (i) => !!(process.env.NODE_ENV !== "production") ? /* @__PURE__ */ shallowReadonly(i.attrs) : i.attrs,
|
|
@@ -5909,7 +6028,7 @@ if (!!(process.env.NODE_ENV !== "production") && true) PublicInstanceProxyHandle
|
|
|
5909
6028
|
warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
|
|
5910
6029
|
return Reflect.ownKeys(target);
|
|
5911
6030
|
};
|
|
5912
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
6031
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
5913
6032
|
get(target, key) {
|
|
5914
6033
|
if (key === Symbol.unscopables) return;
|
|
5915
6034
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -6094,12 +6213,13 @@ function mergeDefaults(raw, defaults) {
|
|
|
6094
6213
|
for (const key in defaults) {
|
|
6095
6214
|
if (key.startsWith("__skip")) continue;
|
|
6096
6215
|
let opt = props[key];
|
|
6097
|
-
if (opt)
|
|
6098
|
-
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6216
|
+
if (opt) {
|
|
6217
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
6218
|
+
type: opt,
|
|
6219
|
+
default: defaults[key]
|
|
6220
|
+
};
|
|
6221
|
+
else opt.default = defaults[key];
|
|
6222
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
6103
6223
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
6104
6224
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
6105
6225
|
}
|
|
@@ -6243,11 +6363,12 @@ function applyOptions(instance) {
|
|
|
6243
6363
|
const opt = computedOptions[key];
|
|
6244
6364
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
6245
6365
|
if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
6366
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
6367
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6368
|
+
} : NOOP;
|
|
6246
6369
|
const c = computed({
|
|
6247
6370
|
get,
|
|
6248
|
-
set
|
|
6249
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
6250
|
-
} : NOOP
|
|
6371
|
+
set
|
|
6251
6372
|
});
|
|
6252
6373
|
Object.defineProperty(ctx, key, {
|
|
6253
6374
|
enumerable: true,
|
|
@@ -6307,9 +6428,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
6307
6428
|
for (const key in injectOptions) {
|
|
6308
6429
|
const opt = injectOptions[key];
|
|
6309
6430
|
let injected;
|
|
6310
|
-
if (isObject(opt))
|
|
6311
|
-
|
|
6312
|
-
|
|
6431
|
+
if (isObject(opt)) {
|
|
6432
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
6433
|
+
else injected = inject(opt.from || key);
|
|
6434
|
+
} else injected = inject(opt);
|
|
6313
6435
|
if (/* @__PURE__ */ isRef(injected)) Object.defineProperty(ctx, key, {
|
|
6314
6436
|
enumerable: true,
|
|
6315
6437
|
configurable: true,
|
|
@@ -6329,7 +6451,8 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
6329
6451
|
{
|
|
6330
6452
|
const cur = getCurrentInstance();
|
|
6331
6453
|
const instance = cur && getCurrentScope() === cur.scope ? cur : null;
|
|
6332
|
-
|
|
6454
|
+
const newValue = getter();
|
|
6455
|
+
if (isArray(newValue) && isCompatEnabled$1("WATCH_ARRAY", instance)) options.deep = true;
|
|
6333
6456
|
const baseGetter = getter;
|
|
6334
6457
|
getter = () => {
|
|
6335
6458
|
const val = baseGetter();
|
|
@@ -6342,13 +6465,14 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
6342
6465
|
if (isFunction(handler)) watch(getter, handler, options);
|
|
6343
6466
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
6344
6467
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis), options);
|
|
6345
|
-
else if (isObject(raw))
|
|
6346
|
-
|
|
6347
|
-
|
|
6348
|
-
|
|
6349
|
-
|
|
6350
|
-
|
|
6351
|
-
|
|
6468
|
+
else if (isObject(raw)) {
|
|
6469
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
6470
|
+
else {
|
|
6471
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
6472
|
+
if (isFunction(handler)) watch(getter, handler, extend(raw, options));
|
|
6473
|
+
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
6474
|
+
}
|
|
6475
|
+
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
|
|
6352
6476
|
}
|
|
6353
6477
|
/**
|
|
6354
6478
|
* Resolve merged options and cache it on the component.
|
|
@@ -6362,12 +6486,13 @@ function resolveMergedOptions(instance) {
|
|
|
6362
6486
|
const cached = cache.get(base);
|
|
6363
6487
|
let resolved;
|
|
6364
6488
|
if (cached) resolved = cached;
|
|
6365
|
-
else if (!globalMixins.length && !mixins && !extendsOptions)
|
|
6366
|
-
|
|
6367
|
-
|
|
6368
|
-
|
|
6369
|
-
|
|
6370
|
-
|
|
6489
|
+
else if (!globalMixins.length && !mixins && !extendsOptions) {
|
|
6490
|
+
if (isCompatEnabled$1("PRIVATE_APIS", instance)) {
|
|
6491
|
+
resolved = extend({}, base);
|
|
6492
|
+
resolved.parent = instance.parent && instance.parent.proxy;
|
|
6493
|
+
resolved.propsData = instance.vnode.props;
|
|
6494
|
+
} else resolved = base;
|
|
6495
|
+
} else {
|
|
6371
6496
|
resolved = {};
|
|
6372
6497
|
if (globalMixins.length) globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
|
|
6373
6498
|
mergeOptions(resolved, base, optionMergeStrategies);
|
|
@@ -6440,7 +6565,7 @@ function mergeObjectOptions(to, from) {
|
|
|
6440
6565
|
}
|
|
6441
6566
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
6442
6567
|
if (to) {
|
|
6443
|
-
if (isArray(to) && isArray(from)) return [
|
|
6568
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
6444
6569
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
6445
6570
|
} else return from;
|
|
6446
6571
|
}
|
|
@@ -6501,7 +6626,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6501
6626
|
if (options.el) return vm.$mount(options.el);
|
|
6502
6627
|
else return vm;
|
|
6503
6628
|
}
|
|
6504
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6629
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.7`;
|
|
6505
6630
|
Vue.config = singletonApp.config;
|
|
6506
6631
|
Vue.use = (plugin, ...options) => {
|
|
6507
6632
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6897,8 +7022,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
6897
7022
|
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Cannot unmount an app that is not mounted.`);
|
|
6898
7023
|
},
|
|
6899
7024
|
provide(key, value) {
|
|
6900
|
-
if (!!(process.env.NODE_ENV !== "production") && key in context.provides)
|
|
6901
|
-
|
|
7025
|
+
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
7026
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
7027
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
7028
|
+
}
|
|
6902
7029
|
context.provides[key] = value;
|
|
6903
7030
|
return app;
|
|
6904
7031
|
},
|
|
@@ -7048,12 +7175,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
7048
7175
|
if (instance.isUnmounted) return;
|
|
7049
7176
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7050
7177
|
const { emitsOptions, propsOptions } = instance;
|
|
7051
|
-
if (emitsOptions)
|
|
7052
|
-
if (!
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
if (
|
|
7178
|
+
if (emitsOptions) {
|
|
7179
|
+
if (!(event in emitsOptions) && !(event.startsWith("hook:") || event.startsWith(compatModelEventPrefix))) {
|
|
7180
|
+
if (!propsOptions || !propsOptions[0] || !(toHandlerKey(camelize(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(camelize(event))}" prop.`);
|
|
7181
|
+
} else {
|
|
7182
|
+
const validator = emitsOptions[event];
|
|
7183
|
+
if (isFunction(validator)) {
|
|
7184
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
7185
|
+
}
|
|
7057
7186
|
}
|
|
7058
7187
|
}
|
|
7059
7188
|
}
|
|
@@ -7063,7 +7192,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
7063
7192
|
const modifiers = isCompatModelListener ? props.modelModifiers : isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
7064
7193
|
if (modifiers) {
|
|
7065
7194
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
7066
|
-
if (modifiers.number) args =
|
|
7195
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
7067
7196
|
}
|
|
7068
7197
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
|
|
7069
7198
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -7262,10 +7391,12 @@ function filterSingleRoot(children, recurse = true) {
|
|
|
7262
7391
|
for (let i = 0; i < children.length; i++) {
|
|
7263
7392
|
const child = children[i];
|
|
7264
7393
|
if (isVNode(child)) {
|
|
7265
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7394
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
7395
|
+
if (singleRoot) return;
|
|
7396
|
+
else {
|
|
7397
|
+
singleRoot = child;
|
|
7398
|
+
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
7399
|
+
}
|
|
7269
7400
|
}
|
|
7270
7401
|
} else return;
|
|
7271
7402
|
}
|
|
@@ -7410,16 +7541,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
7410
7541
|
let key = propsToUpdate[i];
|
|
7411
7542
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
7412
7543
|
const value = rawProps[key];
|
|
7413
|
-
if (options)
|
|
7414
|
-
if (
|
|
7415
|
-
attrs[key]
|
|
7416
|
-
|
|
7544
|
+
if (options) {
|
|
7545
|
+
if (hasOwn(attrs, key)) {
|
|
7546
|
+
if (value !== attrs[key]) {
|
|
7547
|
+
attrs[key] = value;
|
|
7548
|
+
hasAttrsChanged = true;
|
|
7549
|
+
}
|
|
7550
|
+
} else {
|
|
7551
|
+
const camelizedKey = camelize(key);
|
|
7552
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7417
7553
|
}
|
|
7418
7554
|
} else {
|
|
7419
|
-
const camelizedKey = camelize(key);
|
|
7420
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
7421
|
-
}
|
|
7422
|
-
else {
|
|
7423
7555
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7424
7556
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7425
7557
|
if (value !== attrs[key]) {
|
|
@@ -7432,9 +7564,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
7432
7564
|
} else {
|
|
7433
7565
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
7434
7566
|
let kebabKey;
|
|
7435
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
7436
|
-
if (
|
|
7437
|
-
|
|
7567
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
7568
|
+
if (options) {
|
|
7569
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
7570
|
+
} else delete props[key];
|
|
7571
|
+
}
|
|
7438
7572
|
if (attrs !== rawCurrentProps) {
|
|
7439
7573
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && !hasOwn(rawProps, key + "Native")) {
|
|
7440
7574
|
delete attrs[key];
|
|
@@ -7455,9 +7589,10 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
7455
7589
|
if (key === "inline-template") continue;
|
|
7456
7590
|
const value = rawProps[key];
|
|
7457
7591
|
let camelKey;
|
|
7458
|
-
if (options && hasOwn(options, camelKey = camelize(key)))
|
|
7459
|
-
|
|
7460
|
-
|
|
7592
|
+
if (options && hasOwn(options, camelKey = camelize(key))) {
|
|
7593
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
7594
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
7595
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
7461
7596
|
if (isOn(key) && key.endsWith("Native")) key = key.slice(0, -6);
|
|
7462
7597
|
else if (shouldSkipAttr(key, instance)) continue;
|
|
7463
7598
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
@@ -7623,7 +7758,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
|
|
|
7623
7758
|
}
|
|
7624
7759
|
if (validator && !validator(value, !!(process.env.NODE_ENV !== "production") ? /* @__PURE__ */ shallowReadonly(resolvedProps) : resolvedProps)) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
7625
7760
|
}
|
|
7626
|
-
const isSimpleType =
|
|
7761
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
7627
7762
|
/**
|
|
7628
7763
|
* dev only
|
|
7629
7764
|
*/
|
|
@@ -7736,12 +7871,13 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
7736
7871
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
7737
7872
|
if (vnode.shapeFlag & 32) {
|
|
7738
7873
|
const type = children._;
|
|
7739
|
-
if (type)
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7874
|
+
if (type) {
|
|
7875
|
+
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
7876
|
+
assignSlots(slots, children, optimized);
|
|
7877
|
+
trigger(instance, "set", "$slots");
|
|
7878
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
7879
|
+
else assignSlots(slots, children, optimized);
|
|
7880
|
+
} else {
|
|
7745
7881
|
needDeletionCheck = !children.$stable;
|
|
7746
7882
|
normalizeObjectSlots(children, slots, instance);
|
|
7747
7883
|
}
|
|
@@ -7759,7 +7895,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
7759
7895
|
let supported;
|
|
7760
7896
|
let perf;
|
|
7761
7897
|
let cachedNow$1 = 0;
|
|
7762
|
-
const p$1 =
|
|
7898
|
+
const p$1 = /*@__PURE__*/ Promise.resolve();
|
|
7763
7899
|
const getNow$1 = () => cachedNow$1 || (p$1.then(() => cachedNow$1 = 0), cachedNow$1 = isSupported() ? perf.now() : Date.now());
|
|
7764
7900
|
/**
|
|
7765
7901
|
* @internal
|
|
@@ -8007,7 +8143,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8007
8143
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
8008
8144
|
};
|
|
8009
8145
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
8010
|
-
for (let i = start; i < children.length; i++)
|
|
8146
|
+
for (let i = start; i < children.length; i++) {
|
|
8147
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
8148
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8149
|
+
}
|
|
8011
8150
|
};
|
|
8012
8151
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8013
8152
|
const el = n2.el = n1.el;
|
|
@@ -8019,6 +8158,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8019
8158
|
let vnodeHook;
|
|
8020
8159
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
8021
8160
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8161
|
+
if (n2.ibu) n2.ibu();
|
|
8022
8162
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8023
8163
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
8024
8164
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -8052,8 +8192,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8052
8192
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
8053
8193
|
}
|
|
8054
8194
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
8055
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
8195
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
8056
8196
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8197
|
+
n2.iu && n2.iu();
|
|
8057
8198
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8058
8199
|
}, void 0, parentSuspense);
|
|
8059
8200
|
};
|
|
@@ -8061,7 +8202,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8061
8202
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8062
8203
|
const oldVNode = oldChildren[i];
|
|
8063
8204
|
const newVNode = newChildren[i];
|
|
8064
|
-
|
|
8205
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
8206
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
8065
8207
|
}
|
|
8066
8208
|
};
|
|
8067
8209
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -8100,41 +8242,46 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8100
8242
|
};
|
|
8101
8243
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
8102
8244
|
n2.slotScopeIds = slotScopeIds;
|
|
8103
|
-
if (n2.type.__vapor)
|
|
8104
|
-
|
|
8105
|
-
|
|
8106
|
-
|
|
8107
|
-
|
|
8108
|
-
|
|
8109
|
-
|
|
8245
|
+
if (n2.type.__vapor) {
|
|
8246
|
+
if (n1 == null) {
|
|
8247
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
8248
|
+
else {
|
|
8249
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
8250
|
+
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
8251
|
+
if (n2.dirs) {
|
|
8252
|
+
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
8253
|
+
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
8254
|
+
}
|
|
8255
|
+
}, () => {
|
|
8256
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
8257
|
+
});
|
|
8258
|
+
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
8259
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
8260
|
+
if (vnodeMountedHook) {
|
|
8261
|
+
const scopedVNode = n2;
|
|
8262
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
8263
|
+
}
|
|
8110
8264
|
}
|
|
8111
|
-
}
|
|
8112
|
-
|
|
8113
|
-
|
|
8114
|
-
|
|
8115
|
-
|
|
8116
|
-
|
|
8117
|
-
|
|
8118
|
-
|
|
8265
|
+
} else {
|
|
8266
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
8267
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
8268
|
+
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8269
|
+
}, () => {
|
|
8270
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
8271
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
8272
|
+
if (n2.ibu) n2.ibu();
|
|
8273
|
+
});
|
|
8274
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
8275
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs || n2.iu)) queuePostRenderEffect(() => {
|
|
8276
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8277
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
8278
|
+
n2.iu && n2.iu();
|
|
8279
|
+
}, void 0, parentSuspense);
|
|
8119
8280
|
}
|
|
8120
|
-
}
|
|
8121
|
-
|
|
8122
|
-
|
|
8123
|
-
|
|
8124
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8125
|
-
}, () => {
|
|
8126
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
8127
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
8128
|
-
});
|
|
8129
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
8130
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
8131
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8132
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
8133
|
-
}, void 0, parentSuspense);
|
|
8134
|
-
}
|
|
8135
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
8136
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
8137
|
-
else updateComponent(n1, n2, optimized);
|
|
8281
|
+
} else if (n1 == null) {
|
|
8282
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
8283
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
8284
|
+
} else updateComponent(n1, n2, optimized);
|
|
8138
8285
|
};
|
|
8139
8286
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
8140
8287
|
const compatMountInstance = initialVNode.isCompatRoot && initialVNode.component;
|
|
@@ -8182,16 +8329,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8182
8329
|
};
|
|
8183
8330
|
const updateComponent = (n1, n2, optimized) => {
|
|
8184
8331
|
const instance = n2.component = n1.component;
|
|
8185
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
8186
|
-
if (
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8332
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
8333
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8334
|
+
if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
|
|
8335
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
8336
|
+
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
8337
|
+
return;
|
|
8338
|
+
} else {
|
|
8339
|
+
instance.next = n2;
|
|
8340
|
+
instance.effect.run();
|
|
8341
|
+
}
|
|
8190
8342
|
} else {
|
|
8191
|
-
instance.next = n2;
|
|
8192
|
-
instance.effect.run();
|
|
8193
|
-
}
|
|
8194
|
-
else {
|
|
8195
8343
|
n2.el = n1.el;
|
|
8196
8344
|
instance.vnode = n2;
|
|
8197
8345
|
}
|
|
@@ -8296,6 +8444,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8296
8444
|
} else next = vnode;
|
|
8297
8445
|
if (bu) invokeArrayFns(bu);
|
|
8298
8446
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8447
|
+
if (next.ibu) next.ibu();
|
|
8299
8448
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8300
8449
|
toggleRecurse(instance, true);
|
|
8301
8450
|
if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
|
|
@@ -8309,7 +8458,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8309
8458
|
next.el = nextTree.el;
|
|
8310
8459
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8311
8460
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8312
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
8461
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8462
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8463
|
+
next.iu && next.iu();
|
|
8464
|
+
}, void 0, parentSuspense);
|
|
8313
8465
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8314
8466
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
|
|
8315
8467
|
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
@@ -8350,9 +8502,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8350
8502
|
if (shapeFlag & 8) {
|
|
8351
8503
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
8352
8504
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
8353
|
-
} else if (prevShapeFlag & 16)
|
|
8354
|
-
|
|
8355
|
-
|
|
8505
|
+
} else if (prevShapeFlag & 16) {
|
|
8506
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8507
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
8508
|
+
} else {
|
|
8356
8509
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
8357
8510
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8358
8511
|
}
|
|
@@ -8451,8 +8604,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8451
8604
|
const anchorVNode = c2[nextIndex + 1];
|
|
8452
8605
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
8453
8606
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8454
|
-
else if (moved)
|
|
8455
|
-
|
|
8607
|
+
else if (moved) {
|
|
8608
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
8609
|
+
else j--;
|
|
8610
|
+
}
|
|
8456
8611
|
}
|
|
8457
8612
|
}
|
|
8458
8613
|
};
|
|
@@ -8484,26 +8639,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8484
8639
|
moveStaticNode(vnode, container, anchor);
|
|
8485
8640
|
return;
|
|
8486
8641
|
}
|
|
8487
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
8488
|
-
|
|
8489
|
-
|
|
8490
|
-
const remove = () => {
|
|
8642
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
8643
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
8644
|
+
else performTransitionLeave(el, transition, () => {
|
|
8491
8645
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
8492
8646
|
else hostInsert(el, container, anchor);
|
|
8493
|
-
};
|
|
8494
|
-
|
|
8495
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8496
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
8497
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
8498
|
-
else leave(el, () => {
|
|
8499
|
-
remove();
|
|
8500
|
-
afterLeave && afterLeave();
|
|
8501
|
-
});
|
|
8502
|
-
};
|
|
8503
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
8504
|
-
else performLeave();
|
|
8505
|
-
}
|
|
8506
|
-
else hostInsert(el, container, anchor);
|
|
8647
|
+
}, true, true);
|
|
8648
|
+
} else hostInsert(el, container, anchor);
|
|
8507
8649
|
};
|
|
8508
8650
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
8509
8651
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
@@ -8523,16 +8665,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8523
8665
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
8524
8666
|
let vnodeHook;
|
|
8525
8667
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8526
|
-
if (shapeFlag & 6)
|
|
8527
|
-
if (
|
|
8528
|
-
|
|
8529
|
-
|
|
8530
|
-
|
|
8531
|
-
|
|
8532
|
-
|
|
8533
|
-
|
|
8534
|
-
|
|
8535
|
-
|
|
8668
|
+
if (shapeFlag & 6) {
|
|
8669
|
+
if (isVaporComponent(type)) {
|
|
8670
|
+
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8671
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8672
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8673
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8674
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8675
|
+
}, void 0, parentSuspense);
|
|
8676
|
+
return;
|
|
8677
|
+
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8678
|
+
} else {
|
|
8536
8679
|
if (shapeFlag & 128) {
|
|
8537
8680
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
8538
8681
|
return;
|
|
@@ -8666,12 +8809,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
8666
8809
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8667
8810
|
}
|
|
8668
8811
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8669
|
-
if (!vapor)
|
|
8670
|
-
|
|
8671
|
-
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8812
|
+
if (!vapor) {
|
|
8813
|
+
if (allowed) {
|
|
8814
|
+
effect.flags |= 128;
|
|
8815
|
+
job.flags |= 2;
|
|
8816
|
+
} else {
|
|
8817
|
+
effect.flags &= -129;
|
|
8818
|
+
job.flags &= -3;
|
|
8819
|
+
}
|
|
8675
8820
|
}
|
|
8676
8821
|
}
|
|
8677
8822
|
function needTransition(parentSuspense, transition) {
|
|
@@ -8711,8 +8856,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
8711
8856
|
}
|
|
8712
8857
|
function locateNonHydratedAsyncRoot(instance) {
|
|
8713
8858
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
8714
|
-
if (subComponent)
|
|
8715
|
-
|
|
8859
|
+
if (subComponent) {
|
|
8860
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
8861
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
8862
|
+
}
|
|
8716
8863
|
}
|
|
8717
8864
|
function invalidateMount(hooks) {
|
|
8718
8865
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -8731,13 +8878,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
8731
8878
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
8732
8879
|
const performRemove = () => {
|
|
8733
8880
|
remove();
|
|
8734
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8881
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
8735
8882
|
};
|
|
8736
8883
|
if (force || isElement && transition && !transition.persisted) {
|
|
8737
8884
|
const { leave, delayLeave } = transition;
|
|
8738
8885
|
const performLeave = () => {
|
|
8886
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8739
8887
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
8740
|
-
|
|
8888
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
8889
|
+
else leave(el, performRemove);
|
|
8741
8890
|
};
|
|
8742
8891
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
8743
8892
|
else performLeave();
|
|
@@ -8833,7 +8982,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
8833
8982
|
patch(pendingBranch, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8834
8983
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8835
8984
|
else if (isInFallback) {
|
|
8836
|
-
if (!isHydrating) {
|
|
8985
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
8837
8986
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8838
8987
|
setActiveBranch(suspense, newFallback);
|
|
8839
8988
|
}
|
|
@@ -8854,7 +9003,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
8854
9003
|
if (isInFallback) {
|
|
8855
9004
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
8856
9005
|
if (suspense.deps <= 0) suspense.resolve();
|
|
8857
|
-
else {
|
|
9006
|
+
else if (!suspense.isFallbackMountPending) {
|
|
8858
9007
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
8859
9008
|
setActiveBranch(suspense, newFallback);
|
|
8860
9009
|
}
|
|
@@ -8982,8 +9131,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8982
9131
|
const mountFallback = () => {
|
|
8983
9132
|
suspense.isFallbackMountPending = false;
|
|
8984
9133
|
if (!suspense.isInFallback) return;
|
|
8985
|
-
|
|
8986
|
-
|
|
9134
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
9135
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
9136
|
+
setActiveBranch(suspense, latestFallback);
|
|
8987
9137
|
};
|
|
8988
9138
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
8989
9139
|
if (delayEnter) {
|
|
@@ -9059,9 +9209,10 @@ function normalizeSuspenseSlot(s) {
|
|
|
9059
9209
|
return s;
|
|
9060
9210
|
}
|
|
9061
9211
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
9062
|
-
if (suspense && suspense.pendingBranch)
|
|
9063
|
-
|
|
9064
|
-
|
|
9212
|
+
if (suspense && suspense.pendingBranch) {
|
|
9213
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
9214
|
+
else suspense.effects.push(fn);
|
|
9215
|
+
} else queuePostFlushCb(fn, id);
|
|
9065
9216
|
}
|
|
9066
9217
|
function setActiveBranch(suspense, branch) {
|
|
9067
9218
|
suspense.activeBranch = branch;
|
|
@@ -9297,8 +9448,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
9297
9448
|
if (isVNode(type)) {
|
|
9298
9449
|
const cloned = cloneVNode(type, props, true);
|
|
9299
9450
|
if (children) normalizeChildren(cloned, children);
|
|
9300
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
9301
|
-
|
|
9451
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
9452
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
9453
|
+
else currentBlock.push(cloned);
|
|
9454
|
+
}
|
|
9302
9455
|
cloned.patchFlag = -2;
|
|
9303
9456
|
return cloned;
|
|
9304
9457
|
}
|
|
@@ -9359,7 +9512,9 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9359
9512
|
ce: vnode.ce,
|
|
9360
9513
|
vi: vnode.vi,
|
|
9361
9514
|
vs: cloneVaporSlotMeta(vnode),
|
|
9362
|
-
vb: vnode.vb
|
|
9515
|
+
vb: vnode.vb,
|
|
9516
|
+
ibu: vnode.ibu,
|
|
9517
|
+
iu: vnode.iu
|
|
9363
9518
|
};
|
|
9364
9519
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9365
9520
|
defineLegacyVNodeProperties(cloned);
|
|
@@ -9423,25 +9578,28 @@ function normalizeChildren(vnode, children) {
|
|
|
9423
9578
|
const { shapeFlag } = vnode;
|
|
9424
9579
|
if (children == null) children = null;
|
|
9425
9580
|
else if (isArray(children)) type = 16;
|
|
9426
|
-
else if (typeof children === "object")
|
|
9427
|
-
|
|
9428
|
-
|
|
9429
|
-
|
|
9430
|
-
|
|
9431
|
-
|
|
9432
|
-
|
|
9433
|
-
|
|
9434
|
-
|
|
9435
|
-
|
|
9436
|
-
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
|
|
9440
|
-
|
|
9441
|
-
|
|
9581
|
+
else if (typeof children === "object") {
|
|
9582
|
+
if (shapeFlag & 65) {
|
|
9583
|
+
const slot = children.default;
|
|
9584
|
+
if (slot) {
|
|
9585
|
+
slot._c && (slot._d = false);
|
|
9586
|
+
normalizeChildren(vnode, slot());
|
|
9587
|
+
slot._c && (slot._d = true);
|
|
9588
|
+
}
|
|
9589
|
+
return;
|
|
9590
|
+
} else {
|
|
9591
|
+
type = 32;
|
|
9592
|
+
const slotFlag = children._;
|
|
9593
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
9594
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
9595
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
9596
|
+
else {
|
|
9597
|
+
children._ = 2;
|
|
9598
|
+
vnode.patchFlag |= 1024;
|
|
9599
|
+
}
|
|
9600
|
+
}
|
|
9442
9601
|
}
|
|
9443
|
-
}
|
|
9444
|
-
else if (isFunction(children)) {
|
|
9602
|
+
} else if (isFunction(children)) {
|
|
9445
9603
|
if (shapeFlag & 65) {
|
|
9446
9604
|
normalizeChildren(vnode, { default: children });
|
|
9447
9605
|
return;
|
|
@@ -9559,7 +9717,7 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
9559
9717
|
};
|
|
9560
9718
|
//#endregion
|
|
9561
9719
|
//#region packages/runtime-core/src/component.ts
|
|
9562
|
-
const emptyAppContext =
|
|
9720
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9563
9721
|
let uid = 0;
|
|
9564
9722
|
/**
|
|
9565
9723
|
* @internal for vapor
|
|
@@ -9713,9 +9871,10 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
9713
9871
|
} else finishComponentSetup(instance, isSSR);
|
|
9714
9872
|
}
|
|
9715
9873
|
function handleSetupResult(instance, setupResult, isSSR) {
|
|
9716
|
-
if (isFunction(setupResult))
|
|
9717
|
-
|
|
9718
|
-
|
|
9874
|
+
if (isFunction(setupResult)) {
|
|
9875
|
+
if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
|
|
9876
|
+
else instance.render = setupResult;
|
|
9877
|
+
} else if (isObject(setupResult)) {
|
|
9719
9878
|
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
|
|
9720
9879
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
|
|
9721
9880
|
instance.setupState = proxyRefs(setupResult);
|
|
@@ -9770,10 +9929,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9770
9929
|
restoreCurrentInstance(prevInstance);
|
|
9771
9930
|
}
|
|
9772
9931
|
}
|
|
9773
|
-
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR)
|
|
9932
|
+
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
9933
|
+
if (!compile$1 && Component.template)
|
|
9774
9934
|
/* v8 ignore start */
|
|
9775
|
-
|
|
9776
|
-
|
|
9935
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
|
|
9936
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
9937
|
+
}
|
|
9777
9938
|
}
|
|
9778
9939
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
9779
9940
|
get(target, key) {
|
|
@@ -9891,11 +10052,12 @@ function h(type, propsOrChildren, children) {
|
|
|
9891
10052
|
try {
|
|
9892
10053
|
setBlockTracking(-1);
|
|
9893
10054
|
const l = arguments.length;
|
|
9894
|
-
if (l === 2)
|
|
9895
|
-
if (
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
|
|
10055
|
+
if (l === 2) {
|
|
10056
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
10057
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
10058
|
+
return createVNode(type, propsOrChildren);
|
|
10059
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
10060
|
+
} else {
|
|
9899
10061
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
9900
10062
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
9901
10063
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -10087,7 +10249,7 @@ function isMemoSame(cached, memo) {
|
|
|
10087
10249
|
}
|
|
10088
10250
|
//#endregion
|
|
10089
10251
|
//#region packages/runtime-core/src/index.ts
|
|
10090
|
-
const version = "3.6.0-rc.
|
|
10252
|
+
const version = "3.6.0-rc.7";
|
|
10091
10253
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
10092
10254
|
/**
|
|
10093
10255
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10132,7 +10294,7 @@ const DeprecationTypes = DeprecationTypes$1;
|
|
|
10132
10294
|
let policy = void 0;
|
|
10133
10295
|
const tt = typeof window !== "undefined" && window.trustedTypes;
|
|
10134
10296
|
if (tt) try {
|
|
10135
|
-
policy =
|
|
10297
|
+
policy = /*@__PURE__*/ tt.createPolicy("vue", { createHTML: (val) => val });
|
|
10136
10298
|
} catch (e) {
|
|
10137
10299
|
process.env.NODE_ENV !== "production" && warn(`Error creating trusted types policy: ${e}`);
|
|
10138
10300
|
}
|
|
@@ -10140,7 +10302,7 @@ const unsafeToTrustedHTML = policy ? (val) => policy.createHTML(val) : (val) =>
|
|
|
10140
10302
|
const svgNS = "http://www.w3.org/2000/svg";
|
|
10141
10303
|
const mathmlNS = "http://www.w3.org/1998/Math/MathML";
|
|
10142
10304
|
const doc = typeof document !== "undefined" ? document : null;
|
|
10143
|
-
const templateContainer = doc &&
|
|
10305
|
+
const templateContainer = doc && /*@__PURE__*/ doc.createElement("template");
|
|
10144
10306
|
const nodeOps = {
|
|
10145
10307
|
insert: (child, parent, anchor) => {
|
|
10146
10308
|
parent.insertBefore(child, anchor || null);
|
|
@@ -10214,7 +10376,7 @@ const DOMTransitionPropsValidators = {
|
|
|
10214
10376
|
leaveActiveClass: String,
|
|
10215
10377
|
leaveToClass: String
|
|
10216
10378
|
};
|
|
10217
|
-
const TransitionPropsValidators =
|
|
10379
|
+
const TransitionPropsValidators = /*@__PURE__*/ extend({}, BaseTransitionPropsValidators, DOMTransitionPropsValidators);
|
|
10218
10380
|
/**
|
|
10219
10381
|
* Wrap logic that attaches extra properties to Transition in a function
|
|
10220
10382
|
* so that it can be annotated as pure
|
|
@@ -10229,7 +10391,7 @@ const decorate$1 = (t) => {
|
|
|
10229
10391
|
* DOM Transition is a higher-order-component based on the platform-agnostic
|
|
10230
10392
|
* base Transition component, with DOM-specific logic.
|
|
10231
10393
|
*/
|
|
10232
|
-
const Transition =
|
|
10394
|
+
const Transition = /*@__PURE__*/ decorate$1((props, { slots }) => h(BaseTransition, resolveTransitionProps(props), slots));
|
|
10233
10395
|
/**
|
|
10234
10396
|
* #3227 Incoming hooks may be merged into arrays when wrapping Transition
|
|
10235
10397
|
* with custom HOCs.
|
|
@@ -10469,14 +10631,15 @@ const vShow = {
|
|
|
10469
10631
|
},
|
|
10470
10632
|
updated(el, { value, oldValue }, { transition }) {
|
|
10471
10633
|
if (!value === !oldValue) return;
|
|
10472
|
-
if (transition)
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10634
|
+
if (transition) {
|
|
10635
|
+
if (value) {
|
|
10636
|
+
transition.beforeEnter(el);
|
|
10637
|
+
setDisplay(el, true);
|
|
10638
|
+
transition.enter(el);
|
|
10639
|
+
} else transition.leave(el, () => {
|
|
10640
|
+
setDisplay(el, false);
|
|
10641
|
+
});
|
|
10642
|
+
} else setDisplay(el, value);
|
|
10480
10643
|
},
|
|
10481
10644
|
beforeUnmount(el, { value }) {
|
|
10482
10645
|
setDisplay(el, value);
|
|
@@ -10584,11 +10747,13 @@ function patchStyle(el, prev, next) {
|
|
|
10584
10747
|
const isCssString = isString(next);
|
|
10585
10748
|
let hasControlledDisplay = false;
|
|
10586
10749
|
if (next && !isCssString) {
|
|
10587
|
-
if (prev)
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10750
|
+
if (prev) {
|
|
10751
|
+
if (!isString(prev)) {
|
|
10752
|
+
for (const key in prev) if (next[key] == null) setStyle(style, key, "");
|
|
10753
|
+
} else for (const prevStyle of prev.split(";")) {
|
|
10754
|
+
const key = prevStyle.slice(0, prevStyle.indexOf(":")).trim();
|
|
10755
|
+
if (next[key] == null) setStyle(style, key, "");
|
|
10756
|
+
}
|
|
10592
10757
|
}
|
|
10593
10758
|
for (const key in next) {
|
|
10594
10759
|
if (key === "display") hasControlledDisplay = true;
|
|
@@ -10619,8 +10784,10 @@ function setStyle(style, name, rawVal) {
|
|
|
10619
10784
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
10620
10785
|
if (semicolonRE.test(val)) warn(`Unexpected semicolon at the end of '${name}' style value: '${val}'`);
|
|
10621
10786
|
}
|
|
10622
|
-
if (name.startsWith("--"))
|
|
10623
|
-
|
|
10787
|
+
if (name.startsWith("--")) {
|
|
10788
|
+
if (importantRE.test(val)) style.setProperty(name, val.replace(importantRE, ""), "important");
|
|
10789
|
+
else style.setProperty(name, val);
|
|
10790
|
+
} else {
|
|
10624
10791
|
const prefixed = autoPrefix(style, name);
|
|
10625
10792
|
if (importantRE.test(val)) style.setProperty(hyphenate(prefixed), val.replace(importantRE, ""), "important");
|
|
10626
10793
|
else style[prefixed] = val;
|
|
@@ -10657,15 +10824,16 @@ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
|
10657
10824
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10658
10825
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
10659
10826
|
function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBooleanAttr(key)) {
|
|
10660
|
-
if (isSVG && key.startsWith("xlink:"))
|
|
10661
|
-
|
|
10662
|
-
|
|
10827
|
+
if (isSVG && key.startsWith("xlink:")) {
|
|
10828
|
+
if (value == null) el.removeAttributeNS(xlinkNS, key.slice(6, key.length));
|
|
10829
|
+
else el.setAttributeNS(xlinkNS, key, value);
|
|
10830
|
+
} else {
|
|
10663
10831
|
if (compatCoerceAttr(el, key, value, instance)) return;
|
|
10664
10832
|
if (value == null || isBoolean && !includeBooleanAttr(value)) el.removeAttribute(key);
|
|
10665
10833
|
else el.setAttribute(key, isBoolean ? "" : isSymbol(value) ? String(value) : value);
|
|
10666
10834
|
}
|
|
10667
10835
|
}
|
|
10668
|
-
const isEnumeratedAttr =
|
|
10836
|
+
const isEnumeratedAttr = /*@__PURE__*/ makeMap("contenteditable,draggable,spellcheck");
|
|
10669
10837
|
function compatCoerceAttr(el, key, value, instance = null) {
|
|
10670
10838
|
if (isEnumeratedAttr(key)) {
|
|
10671
10839
|
const v2CoercedValue = value === void 0 ? null : value === null || value === false || value === "false" ? "false" : "true";
|
|
@@ -10757,7 +10925,7 @@ function parseEventName(name) {
|
|
|
10757
10925
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10758
10926
|
}
|
|
10759
10927
|
let cachedNow = 0;
|
|
10760
|
-
const p =
|
|
10928
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
10761
10929
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = Date.now());
|
|
10762
10930
|
function createInvoker(initialValue, instance) {
|
|
10763
10931
|
const invoker = (e) => {
|
|
@@ -10825,7 +10993,7 @@ function shouldSetAsPropForVueCE(el, key) {
|
|
|
10825
10993
|
//#endregion
|
|
10826
10994
|
//#region packages/runtime-dom/src/apiCustomElement.ts
|
|
10827
10995
|
const REMOVAL = {};
|
|
10828
|
-
|
|
10996
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
10829
10997
|
function defineCustomElement(options, extraOptions, _createApp) {
|
|
10830
10998
|
let Comp = /* @__PURE__ */ defineComponent(options, extraOptions);
|
|
10831
10999
|
if (isPlainObject(Comp)) Comp = extend({}, Comp, extraOptions);
|
|
@@ -10874,12 +11042,14 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10874
11042
|
this._parent = parent;
|
|
10875
11043
|
break;
|
|
10876
11044
|
}
|
|
10877
|
-
if (!this._instance)
|
|
10878
|
-
|
|
10879
|
-
this._pendingResolve =
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
11045
|
+
if (!this._instance) {
|
|
11046
|
+
if (this._resolved) this._mountComponent(this._def);
|
|
11047
|
+
else if (parent && parent._pendingResolve) this._pendingResolve = parent._pendingResolve.then(() => {
|
|
11048
|
+
this._pendingResolve = void 0;
|
|
11049
|
+
if (this.isConnected) return this._resolveDef();
|
|
11050
|
+
});
|
|
11051
|
+
else this._resolveDef();
|
|
11052
|
+
}
|
|
10883
11053
|
}
|
|
10884
11054
|
disconnectedCallback() {
|
|
10885
11055
|
this._connected = false;
|
|
@@ -11053,14 +11223,16 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11053
11223
|
if (!parentComp) this._styleAnchors.set(this._def, s);
|
|
11054
11224
|
if (owner) this._styleAnchors.set(owner, s);
|
|
11055
11225
|
}
|
|
11056
|
-
if (!!(process.env.NODE_ENV !== "production"))
|
|
11057
|
-
if (owner
|
|
11058
|
-
if (
|
|
11059
|
-
|
|
11060
|
-
|
|
11061
|
-
|
|
11062
|
-
|
|
11063
|
-
|
|
11226
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
11227
|
+
if (owner) {
|
|
11228
|
+
if (owner.__hmrId) {
|
|
11229
|
+
if (!this._childStyles) this._childStyles = /* @__PURE__ */ new Map();
|
|
11230
|
+
let entry = this._childStyles.get(owner.__hmrId);
|
|
11231
|
+
if (!entry) this._childStyles.set(owner.__hmrId, entry = []);
|
|
11232
|
+
entry.push(s);
|
|
11233
|
+
}
|
|
11234
|
+
} else (this._styles || (this._styles = [])).push(s);
|
|
11235
|
+
}
|
|
11064
11236
|
}
|
|
11065
11237
|
}
|
|
11066
11238
|
_getStyleAnchor(comp) {
|
|
@@ -11095,13 +11267,11 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11095
11267
|
_renderSlots() {
|
|
11096
11268
|
const outlets = this._getSlots();
|
|
11097
11269
|
const scopeId = this._instance.type.__scopeId;
|
|
11098
|
-
const slotReplacements = /* @__PURE__ */ new Map();
|
|
11099
11270
|
for (let i = 0; i < outlets.length; i++) {
|
|
11100
11271
|
const o = outlets[i];
|
|
11101
11272
|
const slotName = o.getAttribute("name") || "default";
|
|
11102
11273
|
const content = this._slots[slotName];
|
|
11103
11274
|
const parent = o.parentNode;
|
|
11104
|
-
const replacementNodes = [];
|
|
11105
11275
|
if (content) for (const n of content) {
|
|
11106
11276
|
if (scopeId && n.nodeType === 1) {
|
|
11107
11277
|
const id = scopeId + "-s";
|
|
@@ -11111,20 +11281,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11111
11281
|
while (child = walker.nextNode()) child.setAttribute(id, "");
|
|
11112
11282
|
}
|
|
11113
11283
|
parent.insertBefore(n, o);
|
|
11114
|
-
replacementNodes.push(n);
|
|
11115
|
-
}
|
|
11116
|
-
else while (o.firstChild) {
|
|
11117
|
-
const child = o.firstChild;
|
|
11118
|
-
parent.insertBefore(child, o);
|
|
11119
|
-
replacementNodes.push(child);
|
|
11120
11284
|
}
|
|
11285
|
+
else while (o.firstChild) parent.insertBefore(o.firstChild, o);
|
|
11121
11286
|
parent.removeChild(o);
|
|
11122
|
-
slotReplacements.set(o, {
|
|
11123
|
-
nodes: replacementNodes,
|
|
11124
|
-
usedFallback: !content
|
|
11125
|
-
});
|
|
11126
11287
|
}
|
|
11127
|
-
this._updateSlotNodes(slotReplacements);
|
|
11128
11288
|
}
|
|
11129
11289
|
/**
|
|
11130
11290
|
* @internal
|
|
@@ -11163,7 +11323,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11163
11323
|
* @internal
|
|
11164
11324
|
*/
|
|
11165
11325
|
_hasShadowRoot() {
|
|
11166
|
-
return this.
|
|
11326
|
+
return this._root !== this;
|
|
11167
11327
|
}
|
|
11168
11328
|
/**
|
|
11169
11329
|
* @internal
|
|
@@ -11210,10 +11370,6 @@ var VueElement = class extends VueElementBase {
|
|
|
11210
11370
|
if (this._instance && this._instance.ce) this._instance.ce = void 0;
|
|
11211
11371
|
this._app = this._instance = null;
|
|
11212
11372
|
}
|
|
11213
|
-
/**
|
|
11214
|
-
* Only called when shadowRoot is false
|
|
11215
|
-
*/
|
|
11216
|
-
_updateSlotNodes(replacements) {}
|
|
11217
11373
|
_createVNode() {
|
|
11218
11374
|
const baseProps = {};
|
|
11219
11375
|
if (!this.shadowRoot) baseProps.onVnodeMounted = baseProps.onVnodeUpdated = this._renderSlots.bind(this);
|
|
@@ -11229,8 +11385,10 @@ function useHost(caller) {
|
|
|
11229
11385
|
const { hasInstance, value } = useInstanceOption("ce", true);
|
|
11230
11386
|
const el = value;
|
|
11231
11387
|
if (el) return el;
|
|
11232
|
-
else if (!!(process.env.NODE_ENV !== "production"))
|
|
11233
|
-
|
|
11388
|
+
else if (!!(process.env.NODE_ENV !== "production")) {
|
|
11389
|
+
if (!hasInstance) warn(`${caller || "useHost"} called without an active component instance.`);
|
|
11390
|
+
else warn(`${caller || "useHost"} can only be used in components defined via defineCustomElement.`);
|
|
11391
|
+
}
|
|
11234
11392
|
return null;
|
|
11235
11393
|
}
|
|
11236
11394
|
/**
|
|
@@ -11280,7 +11438,7 @@ const decorate = (t) => {
|
|
|
11280
11438
|
};
|
|
11281
11439
|
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
11282
11440
|
name: "TransitionGroup",
|
|
11283
|
-
props:
|
|
11441
|
+
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
11284
11442
|
tag: String,
|
|
11285
11443
|
moveClass: String
|
|
11286
11444
|
}),
|
|
@@ -11562,19 +11720,39 @@ const vModelSelectInit = (el, value, number, set) => {
|
|
|
11562
11720
|
el._modelValue = value;
|
|
11563
11721
|
addEventListener(el, "change", () => {
|
|
11564
11722
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
11565
|
-
|
|
11566
|
-
el.
|
|
11567
|
-
|
|
11568
|
-
|
|
11569
|
-
|
|
11723
|
+
const multiple = el.multiple;
|
|
11724
|
+
const assignedValue = multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0];
|
|
11725
|
+
const pending = el._pendingValue = [multiple, multiple ? isArray(assignedValue) ? selectedVal.slice() : selectedVal : assignedValue];
|
|
11726
|
+
try {
|
|
11727
|
+
(set || el[assignKey])(assignedValue);
|
|
11728
|
+
} finally {
|
|
11729
|
+
nextTick(() => {
|
|
11730
|
+
if (el._pendingValue === pending) el._pendingValue = void 0;
|
|
11731
|
+
});
|
|
11732
|
+
}
|
|
11570
11733
|
});
|
|
11571
11734
|
};
|
|
11735
|
+
function isSameSelectValue(value, assignedValue, multiple) {
|
|
11736
|
+
if (!multiple) return looseEqual(value, assignedValue);
|
|
11737
|
+
if (isArray(value)) return looseEqual(value, assignedValue);
|
|
11738
|
+
if (isSet(value)) {
|
|
11739
|
+
if (value.size !== assignedValue.length) return false;
|
|
11740
|
+
for (const item of assignedValue) if (!value.has(item)) return false;
|
|
11741
|
+
return true;
|
|
11742
|
+
}
|
|
11743
|
+
return false;
|
|
11744
|
+
}
|
|
11572
11745
|
/**
|
|
11573
11746
|
* @internal
|
|
11574
11747
|
*/
|
|
11575
11748
|
const vModelSetSelected = (el, value) => {
|
|
11576
11749
|
el._modelValue = value;
|
|
11577
|
-
|
|
11750
|
+
const pending = el._pendingValue;
|
|
11751
|
+
el._pendingValue = void 0;
|
|
11752
|
+
if (pending && pending[0] === el.multiple && isSameSelectValue(value, pending[1], pending[0])) return;
|
|
11753
|
+
setSelected(el, value);
|
|
11754
|
+
};
|
|
11755
|
+
function setSelected(el, value) {
|
|
11578
11756
|
const isMultiple = el.multiple;
|
|
11579
11757
|
const isArrayValue = isArray(value);
|
|
11580
11758
|
if (isMultiple && !isArrayValue && !isSet(value)) {
|
|
@@ -11584,18 +11762,19 @@ const vModelSetSelected = (el, value) => {
|
|
|
11584
11762
|
for (let i = 0, l = el.options.length; i < l; i++) {
|
|
11585
11763
|
const option = el.options[i];
|
|
11586
11764
|
const optionValue = getValue(option);
|
|
11587
|
-
if (isMultiple)
|
|
11588
|
-
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11765
|
+
if (isMultiple) {
|
|
11766
|
+
if (isArrayValue) {
|
|
11767
|
+
const optionType = typeof optionValue;
|
|
11768
|
+
if (optionType === "string" || optionType === "number") option.selected = value.some((v) => String(v) === String(optionValue));
|
|
11769
|
+
else option.selected = looseIndexOf(value, optionValue) > -1;
|
|
11770
|
+
} else option.selected = value.has(optionValue);
|
|
11771
|
+
} else if (looseEqual(getValue(option), value)) {
|
|
11593
11772
|
if (el.selectedIndex !== i) el.selectedIndex = i;
|
|
11594
11773
|
return;
|
|
11595
11774
|
}
|
|
11596
11775
|
}
|
|
11597
11776
|
if (!isMultiple && el.selectedIndex !== -1) el.selectedIndex = -1;
|
|
11598
|
-
}
|
|
11777
|
+
}
|
|
11599
11778
|
/**
|
|
11600
11779
|
* @internal retrieve raw value set via :value bindings
|
|
11601
11780
|
*/
|
|
@@ -11916,6 +12095,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11916
12095
|
queueJob: () => queueJob,
|
|
11917
12096
|
queuePostFlushCb: () => queuePostFlushCb,
|
|
11918
12097
|
queuePostRenderEffect: () => queuePostRenderEffect,
|
|
12098
|
+
rawVaporSlotKey: () => rawVaporSlotKey,
|
|
11919
12099
|
reactive: () => reactive,
|
|
11920
12100
|
readonly: () => readonly,
|
|
11921
12101
|
ref: () => ref,
|
|
@@ -11999,6 +12179,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11999
12179
|
vShowOriginalDisplay: () => vShowOriginalDisplay,
|
|
12000
12180
|
validateComponentName: () => validateComponentName,
|
|
12001
12181
|
validateProps: () => validateProps,
|
|
12182
|
+
vdomSlotFallbackKey: () => vdomSlotFallbackKey,
|
|
12002
12183
|
version: () => version,
|
|
12003
12184
|
warn: () => warn,
|
|
12004
12185
|
warnExtraneousAttributes: () => warnExtraneousAttributes,
|
|
@@ -12017,7 +12198,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12017
12198
|
withScopeId: () => withScopeId,
|
|
12018
12199
|
xlinkNS: () => xlinkNS
|
|
12019
12200
|
});
|
|
12020
|
-
const rendererOptions =
|
|
12201
|
+
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12021
12202
|
let renderer;
|
|
12022
12203
|
let enabledHydration = false;
|
|
12023
12204
|
function ensureRenderer() {
|
|
@@ -12578,13 +12759,14 @@ var Tokenizer = class {
|
|
|
12578
12759
|
}
|
|
12579
12760
|
}
|
|
12580
12761
|
stateInterpolationOpen(c) {
|
|
12581
|
-
if (c === this.delimiterOpen[this.delimiterIndex])
|
|
12582
|
-
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12762
|
+
if (c === this.delimiterOpen[this.delimiterIndex]) {
|
|
12763
|
+
if (this.delimiterIndex === this.delimiterOpen.length - 1) {
|
|
12764
|
+
const start = this.index + 1 - this.delimiterOpen.length;
|
|
12765
|
+
if (start > this.sectionStart) this.cbs.ontext(this.sectionStart, start);
|
|
12766
|
+
this.state = 3;
|
|
12767
|
+
this.sectionStart = start;
|
|
12768
|
+
} else this.delimiterIndex++;
|
|
12769
|
+
} else if (this.inRCDATA) {
|
|
12588
12770
|
this.state = 32;
|
|
12589
12771
|
this.stateInRCDATA(c);
|
|
12590
12772
|
} else {
|
|
@@ -12600,13 +12782,14 @@ var Tokenizer = class {
|
|
|
12600
12782
|
}
|
|
12601
12783
|
}
|
|
12602
12784
|
stateInterpolationClose(c) {
|
|
12603
|
-
if (c === this.delimiterClose[this.delimiterIndex])
|
|
12604
|
-
|
|
12605
|
-
|
|
12606
|
-
|
|
12607
|
-
|
|
12608
|
-
|
|
12609
|
-
|
|
12785
|
+
if (c === this.delimiterClose[this.delimiterIndex]) {
|
|
12786
|
+
if (this.delimiterIndex === this.delimiterClose.length - 1) {
|
|
12787
|
+
this.cbs.oninterpolation(this.sectionStart, this.index + 1);
|
|
12788
|
+
if (this.inRCDATA) this.state = 32;
|
|
12789
|
+
else this.state = 1;
|
|
12790
|
+
this.sectionStart = this.index + 1;
|
|
12791
|
+
} else this.delimiterIndex++;
|
|
12792
|
+
} else {
|
|
12610
12793
|
this.state = 3;
|
|
12611
12794
|
this.stateInterpolation(c);
|
|
12612
12795
|
}
|
|
@@ -12721,9 +12904,10 @@ var Tokenizer = class {
|
|
|
12721
12904
|
this.sectionStart = this.index;
|
|
12722
12905
|
if (this.mode === 0) this.state = 6;
|
|
12723
12906
|
else if (this.inSFCRoot) this.state = 34;
|
|
12724
|
-
else if (!this.inXML)
|
|
12725
|
-
|
|
12726
|
-
|
|
12907
|
+
else if (!this.inXML) {
|
|
12908
|
+
if (c === 116) this.state = 30;
|
|
12909
|
+
else this.state = c === 115 ? 29 : 6;
|
|
12910
|
+
} else this.state = 6;
|
|
12727
12911
|
} else if (c === 47) this.state = 8;
|
|
12728
12912
|
else {
|
|
12729
12913
|
this.state = 1;
|
|
@@ -13076,9 +13260,7 @@ var Tokenizer = class {
|
|
|
13076
13260
|
case 24:
|
|
13077
13261
|
this.stateInProcessingInstruction(c);
|
|
13078
13262
|
break;
|
|
13079
|
-
case 33:
|
|
13080
|
-
this.stateInEntity();
|
|
13081
|
-
break;
|
|
13263
|
+
case 33: this.stateInEntity();
|
|
13082
13264
|
}
|
|
13083
13265
|
this.index++;
|
|
13084
13266
|
}
|
|
@@ -13107,9 +13289,10 @@ var Tokenizer = class {
|
|
|
13107
13289
|
handleTrailingData() {
|
|
13108
13290
|
const endIndex = this.buffer.length;
|
|
13109
13291
|
if (this.sectionStart >= endIndex) return;
|
|
13110
|
-
if (this.state === 28)
|
|
13111
|
-
|
|
13112
|
-
|
|
13292
|
+
if (this.state === 28) {
|
|
13293
|
+
if (this.currentSequence === Sequences.CdataEnd) this.cbs.oncdata(this.sectionStart, endIndex);
|
|
13294
|
+
else this.cbs.oncomment(this.sectionStart, endIndex);
|
|
13295
|
+
} else if (this.state === 6 || this.state === 11 || this.state === 18 || this.state === 17 || this.state === 12 || this.state === 13 || this.state === 14 || this.state === 15 || this.state === 16 || this.state === 20 || this.state === 19 || this.state === 21 || this.state === 9) {} else this.cbs.ontext(this.sectionStart, endIndex);
|
|
13113
13296
|
}
|
|
13114
13297
|
emitCodePoint(cp, consumed) {}
|
|
13115
13298
|
};
|
|
@@ -13311,12 +13494,10 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
13311
13494
|
if (!--currentOpenParensCount) state = stateStack.pop();
|
|
13312
13495
|
}
|
|
13313
13496
|
break;
|
|
13314
|
-
case 3:
|
|
13315
|
-
|
|
13316
|
-
|
|
13317
|
-
|
|
13318
|
-
}
|
|
13319
|
-
break;
|
|
13497
|
+
case 3: if (char === currentStringType) {
|
|
13498
|
+
state = stateStack.pop();
|
|
13499
|
+
currentStringType = null;
|
|
13500
|
+
}
|
|
13320
13501
|
}
|
|
13321
13502
|
}
|
|
13322
13503
|
return !currentOpenBracketCount && !currentOpenParensCount;
|
|
@@ -13366,7 +13547,7 @@ function isTemplateNode$1(node) {
|
|
|
13366
13547
|
function isSlotOutlet(node) {
|
|
13367
13548
|
return node.type === 1 && node.tagType === 2;
|
|
13368
13549
|
}
|
|
13369
|
-
const propsHelperSet = new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
13550
|
+
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
13370
13551
|
function getUnnormalizedProps(props, callPath = []) {
|
|
13371
13552
|
if (props && !isString(props) && props.type === 14) {
|
|
13372
13553
|
const callee = props.callee;
|
|
@@ -13409,9 +13590,10 @@ function injectProp(node, prop, context) {
|
|
|
13409
13590
|
propsWithInjection = createCallExpression(context.helper(MERGE_PROPS), [createObjectExpression([prop]), props]);
|
|
13410
13591
|
if (parentCall && parentCall.callee === GUARD_REACTIVE_PROPS) parentCall = callPath[callPath.length - 2];
|
|
13411
13592
|
}
|
|
13412
|
-
if (node.type === 13)
|
|
13413
|
-
|
|
13414
|
-
|
|
13593
|
+
if (node.type === 13) {
|
|
13594
|
+
if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
13595
|
+
else node.props = propsWithInjection;
|
|
13596
|
+
} else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
13415
13597
|
else node.arguments[2] = propsWithInjection;
|
|
13416
13598
|
}
|
|
13417
13599
|
function injectSlotKey(node, prop) {
|
|
@@ -13686,10 +13868,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
13686
13868
|
case 18:
|
|
13687
13869
|
case 19:
|
|
13688
13870
|
case 20:
|
|
13689
|
-
case 21:
|
|
13690
|
-
emitError(9, end);
|
|
13691
|
-
break;
|
|
13692
|
-
default: break;
|
|
13871
|
+
case 21: emitError(9, end);
|
|
13693
13872
|
}
|
|
13694
13873
|
for (let index = 0; index < stack.length; index++) {
|
|
13695
13874
|
onCloseTag(stack[index], end - 1);
|
|
@@ -13839,7 +14018,7 @@ function backTrack(index, c) {
|
|
|
13839
14018
|
while (currentInput.charCodeAt(i) !== c && i >= 0) i--;
|
|
13840
14019
|
return i;
|
|
13841
14020
|
}
|
|
13842
|
-
const specialTemplateDir = new Set([
|
|
14021
|
+
const specialTemplateDir = /* @__PURE__ */ new Set([
|
|
13843
14022
|
"if",
|
|
13844
14023
|
"else",
|
|
13845
14024
|
"else-if",
|
|
@@ -13875,16 +14054,18 @@ function condenseWhitespace(nodes) {
|
|
|
13875
14054
|
let removedWhitespace = false;
|
|
13876
14055
|
for (let i = 0; i < nodes.length; i++) {
|
|
13877
14056
|
const node = nodes[i];
|
|
13878
|
-
if (node.type === 2)
|
|
13879
|
-
if (
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
14057
|
+
if (node.type === 2) {
|
|
14058
|
+
if (!inPre) {
|
|
14059
|
+
if (isAllWhitespace(node.content)) {
|
|
14060
|
+
const prev = nodes[i - 1] && nodes[i - 1].type;
|
|
14061
|
+
const next = nodes[i + 1] && nodes[i + 1].type;
|
|
14062
|
+
if (!prev || !next || shouldCondense && (prev === 3 && (next === 3 || next === 1) || prev === 1 && (next === 3 || next === 1 && hasNewlineChar(node.content)))) {
|
|
14063
|
+
removedWhitespace = true;
|
|
14064
|
+
nodes[i] = null;
|
|
14065
|
+
} else node.content = " ";
|
|
14066
|
+
} else if (shouldCondense) node.content = condense(node.content);
|
|
14067
|
+
} else node.content = node.content.replace(windowsNewlineRE, "\n");
|
|
14068
|
+
}
|
|
13888
14069
|
}
|
|
13889
14070
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
13890
14071
|
}
|
|
@@ -14149,7 +14330,7 @@ function getConstantType(node, context) {
|
|
|
14149
14330
|
return 0;
|
|
14150
14331
|
}
|
|
14151
14332
|
}
|
|
14152
|
-
const allowHoistedHelperSet = new Set([
|
|
14333
|
+
const allowHoistedHelperSet = /* @__PURE__ */ new Set([
|
|
14153
14334
|
NORMALIZE_CLASS,
|
|
14154
14335
|
NORMALIZE_STYLE,
|
|
14155
14336
|
NORMALIZE_PROPS,
|
|
@@ -14310,7 +14491,7 @@ function transform(root, options) {
|
|
|
14310
14491
|
traverseNode(root, context);
|
|
14311
14492
|
if (options.hoistStatic) cacheStatic(root, context);
|
|
14312
14493
|
if (!options.ssr) createRootCodegen(root, context);
|
|
14313
|
-
root.helpers = new Set([...context.helpers.keys()]);
|
|
14494
|
+
root.helpers = /* @__PURE__ */ new Set([...context.helpers.keys()]);
|
|
14314
14495
|
root.components = [...context.components];
|
|
14315
14496
|
root.directives = [...context.directives];
|
|
14316
14497
|
root.imports = context.imports;
|
|
@@ -14357,8 +14538,10 @@ function traverseNode(node, context) {
|
|
|
14357
14538
|
const exitFns = [];
|
|
14358
14539
|
for (let i = 0; i < nodeTransforms.length; i++) {
|
|
14359
14540
|
const onExit = nodeTransforms[i](node, context);
|
|
14360
|
-
if (onExit)
|
|
14361
|
-
|
|
14541
|
+
if (onExit) {
|
|
14542
|
+
if (isArray(onExit)) exitFns.push(...onExit);
|
|
14543
|
+
else exitFns.push(onExit);
|
|
14544
|
+
}
|
|
14362
14545
|
if (!context.currentNode) return;
|
|
14363
14546
|
else node = context.currentNode;
|
|
14364
14547
|
}
|
|
@@ -14375,9 +14558,7 @@ function traverseNode(node, context) {
|
|
|
14375
14558
|
case 10:
|
|
14376
14559
|
case 11:
|
|
14377
14560
|
case 1:
|
|
14378
|
-
case 0:
|
|
14379
|
-
traverseChildren(node, context);
|
|
14380
|
-
break;
|
|
14561
|
+
case 0: traverseChildren(node, context);
|
|
14381
14562
|
}
|
|
14382
14563
|
context.currentNode = node;
|
|
14383
14564
|
let i = exitFns.length;
|
|
@@ -14573,10 +14754,12 @@ function genNodeList(nodes, context, multilines = false, comma = true) {
|
|
|
14573
14754
|
if (isString(node)) push(node, -3);
|
|
14574
14755
|
else if (isArray(node)) genNodeListAsArray(node, context);
|
|
14575
14756
|
else genNode(node, context);
|
|
14576
|
-
if (i < nodes.length - 1)
|
|
14577
|
-
|
|
14578
|
-
|
|
14579
|
-
|
|
14757
|
+
if (i < nodes.length - 1) {
|
|
14758
|
+
if (multilines) {
|
|
14759
|
+
comma && push(",");
|
|
14760
|
+
newline();
|
|
14761
|
+
} else comma && push(", ");
|
|
14762
|
+
}
|
|
14580
14763
|
}
|
|
14581
14764
|
}
|
|
14582
14765
|
function genNode(node, context) {
|
|
@@ -14689,9 +14872,12 @@ function genVNodeCall(node, context) {
|
|
|
14689
14872
|
const { push, helper, pure } = context;
|
|
14690
14873
|
const { tag, props, children, patchFlag, dynamicProps, directives, isBlock, disableTracking, isComponent } = node;
|
|
14691
14874
|
let patchFlagString;
|
|
14692
|
-
if (patchFlag)
|
|
14693
|
-
|
|
14694
|
-
|
|
14875
|
+
if (patchFlag) {
|
|
14876
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
14877
|
+
if (patchFlag < 0) patchFlagString = patchFlag + ` /* ${PatchFlagNames[patchFlag]} */`;
|
|
14878
|
+
else patchFlagString = patchFlag + ` /* ${Object.keys(PatchFlagNames).map(Number).filter((n) => n > 0 && patchFlag & n).map((n) => PatchFlagNames[n]).join(`, `)} */`;
|
|
14879
|
+
} else patchFlagString = String(patchFlag);
|
|
14880
|
+
}
|
|
14695
14881
|
if (directives) push(helper(WITH_DIRECTIVES) + `(`);
|
|
14696
14882
|
if (isBlock) push(`(${helper(OPEN_BLOCK)}(${disableTracking ? `true` : ``}), `);
|
|
14697
14883
|
if (pure) push(PURE_ANNOTATION);
|
|
@@ -14960,16 +15146,17 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
14960
15146
|
const keyProperty = createObjectProperty(`key`, createSimpleExpression(`${keyIndex}`, false, locStub, 2));
|
|
14961
15147
|
const { children } = branch;
|
|
14962
15148
|
const firstChild = children[0];
|
|
14963
|
-
if (children.length !== 1 || firstChild.type !== 1)
|
|
14964
|
-
|
|
14965
|
-
|
|
14966
|
-
|
|
15149
|
+
if (children.length !== 1 || firstChild.type !== 1) {
|
|
15150
|
+
if (children.length === 1 && firstChild.type === 11) {
|
|
15151
|
+
const vnodeCall = firstChild.codegenNode;
|
|
15152
|
+
injectProp(vnodeCall, keyProperty, context);
|
|
15153
|
+
return vnodeCall;
|
|
15154
|
+
} else {
|
|
15155
|
+
let patchFlag = 64;
|
|
15156
|
+
if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
15157
|
+
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
15158
|
+
}
|
|
14967
15159
|
} else {
|
|
14968
|
-
let patchFlag = 64;
|
|
14969
|
-
if (!!(process.env.NODE_ENV !== "production") && !branch.isTemplateIf && children.filter((c) => c.type !== 3).length === 1) patchFlag |= 2048;
|
|
14970
|
-
return createVNodeCall(context, helper(FRAGMENT), createObjectExpression([keyProperty]), children, patchFlag, void 0, void 0, true, false, false, branch.loc);
|
|
14971
|
-
}
|
|
14972
|
-
else {
|
|
14973
15160
|
const ret = firstChild.codegenNode;
|
|
14974
15161
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
14975
15162
|
if (vnodeCall.type === 13) convertToBlock(vnodeCall, context);
|
|
@@ -14990,9 +15177,10 @@ function isSameKey(a, b) {
|
|
|
14990
15177
|
return true;
|
|
14991
15178
|
}
|
|
14992
15179
|
function getParentCondition(node) {
|
|
14993
|
-
while (true) if (node.type === 19)
|
|
14994
|
-
|
|
14995
|
-
|
|
15180
|
+
while (true) if (node.type === 19) {
|
|
15181
|
+
if (node.alternate.type === 19) node = node.alternate;
|
|
15182
|
+
else return node;
|
|
15183
|
+
} else if (node.type === 20) node = node.value;
|
|
14996
15184
|
}
|
|
14997
15185
|
//#endregion
|
|
14998
15186
|
//#region packages/compiler-core/src/transforms/vFor.ts
|
|
@@ -15031,10 +15219,12 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15031
15219
|
childBlock = children[0].codegenNode;
|
|
15032
15220
|
if (isTemplate && keyProperty) injectProp(childBlock, keyProperty, context);
|
|
15033
15221
|
const shouldUseBlock = !isStableFragment || childBlock.isBlockRequired === true;
|
|
15034
|
-
if (childBlock.isBlock !== shouldUseBlock)
|
|
15035
|
-
|
|
15036
|
-
|
|
15037
|
-
|
|
15222
|
+
if (childBlock.isBlock !== shouldUseBlock) {
|
|
15223
|
+
if (childBlock.isBlock) {
|
|
15224
|
+
removeHelper(OPEN_BLOCK);
|
|
15225
|
+
removeHelper(getVNodeBlockHelper(context.inSSR, childBlock.isComponent));
|
|
15226
|
+
} else removeHelper(getVNodeHelper(context.inSSR, childBlock.isComponent));
|
|
15227
|
+
}
|
|
15038
15228
|
childBlock.isBlock = shouldUseBlock;
|
|
15039
15229
|
if (childBlock.isBlock) {
|
|
15040
15230
|
helper(OPEN_BLOCK);
|
|
@@ -15219,8 +15409,10 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
15219
15409
|
return createObjectProperty(`default`, fn);
|
|
15220
15410
|
};
|
|
15221
15411
|
if (!hasTemplateSlots) slotsProperties.push(buildDefaultSlotProperty(void 0, children));
|
|
15222
|
-
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText))
|
|
15223
|
-
|
|
15412
|
+
else if (implicitDefaultChildren.length && !implicitDefaultChildren.every(isWhitespaceText)) {
|
|
15413
|
+
if (hasNamedDefaultSlot) context.onError(createCompilerError(39, implicitDefaultChildren[0].loc));
|
|
15414
|
+
else slotsProperties.push(buildDefaultSlotProperty(void 0, implicitDefaultChildren));
|
|
15415
|
+
}
|
|
15224
15416
|
}
|
|
15225
15417
|
const slotFlag = hasDynamicSlots ? 2 : hasForwardedSlots(node.children) ? 3 : 1;
|
|
15226
15418
|
let slots = createObjectExpression(slotsProperties.concat(createObjectProperty(`_`, createSimpleExpression(slotFlag + (!!(process.env.NODE_ENV !== "production") ? ` /* ${slotFlagsText[slotFlag]} */` : ``), false))), loc);
|
|
@@ -15246,10 +15438,7 @@ function hasForwardedSlots(children) {
|
|
|
15246
15438
|
if (hasForwardedSlots(child.branches)) return true;
|
|
15247
15439
|
break;
|
|
15248
15440
|
case 10:
|
|
15249
|
-
case 11:
|
|
15250
|
-
if (hasForwardedSlots(child.children)) return true;
|
|
15251
|
-
break;
|
|
15252
|
-
default: break;
|
|
15441
|
+
case 11: if (hasForwardedSlots(child.children)) return true;
|
|
15253
15442
|
}
|
|
15254
15443
|
}
|
|
15255
15444
|
return false;
|
|
@@ -15410,31 +15599,32 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15410
15599
|
if (isVBind && isStaticArgOf(arg, "ref")) pushRefVForMarker();
|
|
15411
15600
|
if (!arg && (isVBind || isVOn)) {
|
|
15412
15601
|
hasDynamicKeys = true;
|
|
15413
|
-
if (exp)
|
|
15414
|
-
|
|
15415
|
-
|
|
15416
|
-
if (
|
|
15417
|
-
if (
|
|
15418
|
-
if (
|
|
15419
|
-
|
|
15420
|
-
|
|
15421
|
-
|
|
15422
|
-
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15427
|
-
|
|
15428
|
-
|
|
15429
|
-
|
|
15430
|
-
|
|
15431
|
-
|
|
15432
|
-
|
|
15433
|
-
|
|
15434
|
-
|
|
15435
|
-
|
|
15436
|
-
|
|
15437
|
-
|
|
15602
|
+
if (exp) {
|
|
15603
|
+
if (isVBind) {
|
|
15604
|
+
pushMergeArg();
|
|
15605
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
15606
|
+
if (mergeArgs.some((arg) => {
|
|
15607
|
+
if (arg.type === 15) return arg.properties.some(({ key }) => {
|
|
15608
|
+
if (key.type !== 4 || !key.isStatic) return true;
|
|
15609
|
+
return key.content !== "class" && key.content !== "style" && !isOn(key.content);
|
|
15610
|
+
});
|
|
15611
|
+
else return true;
|
|
15612
|
+
})) checkCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context, loc);
|
|
15613
|
+
}
|
|
15614
|
+
if (isCompatEnabled("COMPILER_V_BIND_OBJECT_ORDER", context)) {
|
|
15615
|
+
mergeArgs.unshift(exp);
|
|
15616
|
+
continue;
|
|
15617
|
+
}
|
|
15618
|
+
pushRefVForMarker();
|
|
15619
|
+
pushMergeArg();
|
|
15620
|
+
mergeArgs.push(exp);
|
|
15621
|
+
} else pushMergeArg({
|
|
15622
|
+
type: 14,
|
|
15623
|
+
loc,
|
|
15624
|
+
callee: context.helper(TO_HANDLERS),
|
|
15625
|
+
arguments: isComponent ? [exp] : [exp, `true`]
|
|
15626
|
+
});
|
|
15627
|
+
} else context.onError(createCompilerError(isVBind ? 34 : 35, loc));
|
|
15438
15628
|
continue;
|
|
15439
15629
|
}
|
|
15440
15630
|
if (isVBind && modifiers.some((mod) => mod.content === "prop")) patchFlag |= 32;
|
|
@@ -15492,9 +15682,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
15492
15682
|
} else propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [propsExpression]);
|
|
15493
15683
|
break;
|
|
15494
15684
|
case 14: break;
|
|
15495
|
-
default:
|
|
15496
|
-
propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
15497
|
-
break;
|
|
15685
|
+
default: propsExpression = createCallExpression(context.helper(NORMALIZE_PROPS), [createCallExpression(context.helper(GUARD_REACTIVE_PROPS), [propsExpression])]);
|
|
15498
15686
|
}
|
|
15499
15687
|
return {
|
|
15500
15688
|
props: propsExpression,
|
|
@@ -15600,10 +15788,12 @@ function processSlotOutlet(node, context) {
|
|
|
15600
15788
|
for (let i = 0; i < node.props.length; i++) {
|
|
15601
15789
|
const p = node.props[i];
|
|
15602
15790
|
if (p.type === 6) {
|
|
15603
|
-
if (p.value)
|
|
15604
|
-
|
|
15605
|
-
|
|
15606
|
-
|
|
15791
|
+
if (p.value) {
|
|
15792
|
+
if (p.name === "name") slotName = JSON.stringify(p.value.content);
|
|
15793
|
+
else {
|
|
15794
|
+
p.name = camelize(p.name);
|
|
15795
|
+
nonNameProps.push(p);
|
|
15796
|
+
}
|
|
15607
15797
|
}
|
|
15608
15798
|
} else if (p.name === "bind" && isStaticArgOf(p.arg, "name")) {
|
|
15609
15799
|
if (p.exp) slotName = p.exp;
|
|
@@ -15629,17 +15819,18 @@ const transformOn$1 = (dir, node, context, augmentor) => {
|
|
|
15629
15819
|
const { loc, modifiers, arg } = dir;
|
|
15630
15820
|
if (!dir.exp && !modifiers.length) context.onError(createCompilerError(35, loc));
|
|
15631
15821
|
let eventName;
|
|
15632
|
-
if (arg.type === 4)
|
|
15633
|
-
|
|
15634
|
-
|
|
15635
|
-
|
|
15636
|
-
|
|
15637
|
-
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
|
|
15822
|
+
if (arg.type === 4) {
|
|
15823
|
+
if (arg.isStatic) {
|
|
15824
|
+
let rawName = arg.content;
|
|
15825
|
+
if (!!(process.env.NODE_ENV !== "production") && rawName.startsWith("vnode")) context.onError(createCompilerError(52, arg.loc));
|
|
15826
|
+
if (rawName.startsWith("vue:")) rawName = `vnode-${rawName.slice(4)}`;
|
|
15827
|
+
eventName = createSimpleExpression(node.tagType !== 0 || rawName.startsWith("vnode") || !/[A-Z]/.test(rawName) ? toHandlerKey(camelize(rawName)) : `on:${rawName}`, true, arg.loc);
|
|
15828
|
+
} else eventName = createCompoundExpression([
|
|
15829
|
+
`${context.helperString(TO_HANDLER_KEY)}(`,
|
|
15830
|
+
arg,
|
|
15831
|
+
`)`
|
|
15832
|
+
]);
|
|
15833
|
+
} else {
|
|
15643
15834
|
eventName = arg;
|
|
15644
15835
|
eventName.children.unshift(`${context.helperString(TO_HANDLER_KEY)}(`);
|
|
15645
15836
|
eventName.children.push(`)`);
|
|
@@ -15675,11 +15866,14 @@ const transformBind = (dir, _node, context) => {
|
|
|
15675
15866
|
arg.children.unshift(`(`);
|
|
15676
15867
|
arg.children.push(`) || ""`);
|
|
15677
15868
|
} else if (!arg.isStatic) arg.content = arg.content ? `${arg.content} || ""` : `""`;
|
|
15678
|
-
if (modifiers.some((mod) => mod.content === "camel"))
|
|
15679
|
-
|
|
15680
|
-
|
|
15681
|
-
|
|
15682
|
-
|
|
15869
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
15870
|
+
if (arg.type === 4) {
|
|
15871
|
+
if (arg.isStatic) arg.content = camelize(arg.content);
|
|
15872
|
+
else arg.content = `${context.helperString(CAMELIZE)}(${arg.content})`;
|
|
15873
|
+
} else {
|
|
15874
|
+
arg.children.unshift(`${context.helperString(CAMELIZE)}(`);
|
|
15875
|
+
arg.children.push(`)`);
|
|
15876
|
+
}
|
|
15683
15877
|
}
|
|
15684
15878
|
if (!context.inSSR) {
|
|
15685
15879
|
if (modifiers.some((mod) => mod.content === "prop")) injectPrefix(arg, ".");
|
|
@@ -15688,9 +15882,10 @@ const transformBind = (dir, _node, context) => {
|
|
|
15688
15882
|
return { props: [createObjectProperty(arg, exp)] };
|
|
15689
15883
|
};
|
|
15690
15884
|
const injectPrefix = (arg, prefix) => {
|
|
15691
|
-
if (arg.type === 4)
|
|
15692
|
-
|
|
15693
|
-
|
|
15885
|
+
if (arg.type === 4) {
|
|
15886
|
+
if (arg.isStatic) arg.content = prefix + arg.content;
|
|
15887
|
+
else arg.content = `\`${prefix}\${${arg.content}}\``;
|
|
15888
|
+
} else {
|
|
15694
15889
|
arg.children.unshift(`'${prefix}' + (`);
|
|
15695
15890
|
arg.children.push(`)`);
|
|
15696
15891
|
}
|
|
@@ -15837,11 +16032,12 @@ function parseFilter(node, context) {
|
|
|
15837
16032
|
if (c === 96 && prev !== 92) inTemplateString = false;
|
|
15838
16033
|
} else if (inRegex) {
|
|
15839
16034
|
if (c === 47 && prev !== 92) inRegex = false;
|
|
15840
|
-
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren)
|
|
15841
|
-
|
|
15842
|
-
|
|
15843
|
-
|
|
15844
|
-
|
|
16035
|
+
} else if (c === 124 && exp.charCodeAt(i + 1) !== 124 && exp.charCodeAt(i - 1) !== 124 && !curly && !square && !paren) {
|
|
16036
|
+
if (expression === void 0) {
|
|
16037
|
+
lastFilterIndex = i + 1;
|
|
16038
|
+
expression = exp.slice(0, i).trim();
|
|
16039
|
+
} else pushFilter();
|
|
16040
|
+
} else {
|
|
15845
16041
|
switch (c) {
|
|
15846
16042
|
case 34:
|
|
15847
16043
|
inDouble = true;
|
|
@@ -15867,9 +16063,7 @@ function parseFilter(node, context) {
|
|
|
15867
16063
|
case 123:
|
|
15868
16064
|
curly++;
|
|
15869
16065
|
break;
|
|
15870
|
-
case 125:
|
|
15871
|
-
curly--;
|
|
15872
|
-
break;
|
|
16066
|
+
case 125: curly--;
|
|
15873
16067
|
}
|
|
15874
16068
|
if (c === 47) {
|
|
15875
16069
|
let j = i - 1;
|
|
@@ -16145,9 +16339,7 @@ const transformModel = (dir, node, context) => {
|
|
|
16145
16339
|
isInvalidType = true;
|
|
16146
16340
|
context.onError(createDOMCompilerError(60, dir.loc));
|
|
16147
16341
|
break;
|
|
16148
|
-
default:
|
|
16149
|
-
process.env.NODE_ENV !== "production" && checkDuplicatedValue();
|
|
16150
|
-
break;
|
|
16342
|
+
default: process.env.NODE_ENV !== "production" && checkDuplicatedValue();
|
|
16151
16343
|
}
|
|
16152
16344
|
} else if (hasDynamicKeyVBind(node)) directiveToUse = V_MODEL_DYNAMIC;
|
|
16153
16345
|
else process.env.NODE_ENV !== "production" && checkDuplicatedValue();
|
|
@@ -16160,10 +16352,10 @@ const transformModel = (dir, node, context) => {
|
|
|
16160
16352
|
};
|
|
16161
16353
|
//#endregion
|
|
16162
16354
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
16163
|
-
const isEventOptionModifier =
|
|
16164
|
-
const isNonKeyModifier =
|
|
16165
|
-
const maybeKeyModifier =
|
|
16166
|
-
const isKeyboardEvent =
|
|
16355
|
+
const isEventOptionModifier = /*@__PURE__*/ makeMap(`passive,once,capture`);
|
|
16356
|
+
const isNonKeyModifier = /*@__PURE__*/ makeMap("stop,prevent,self,ctrl,shift,alt,meta,exact,middle");
|
|
16357
|
+
const maybeKeyModifier = /*@__PURE__*/ makeMap("left,right");
|
|
16358
|
+
const isKeyboardEvent = /*@__PURE__*/ makeMap(`onkeyup,onkeydown,onkeypress`);
|
|
16167
16359
|
const resolveModifiers = (key, modifiers, context, loc) => {
|
|
16168
16360
|
const keyModifiers = [];
|
|
16169
16361
|
const nonKeyModifiers = [];
|
|
@@ -16182,13 +16374,15 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
16182
16374
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
16183
16375
|
else {
|
|
16184
16376
|
const keyString = isString(key) ? key : isStaticExp(key) ? key.content : null;
|
|
16185
|
-
if (maybeKeyModifier(modifier))
|
|
16186
|
-
|
|
16187
|
-
|
|
16188
|
-
|
|
16189
|
-
|
|
16190
|
-
|
|
16191
|
-
|
|
16377
|
+
if (maybeKeyModifier(modifier)) {
|
|
16378
|
+
if (keyString) {
|
|
16379
|
+
if (isKeyboardEvent(keyString.toLowerCase())) keyModifiers.push(modifier);
|
|
16380
|
+
else nonKeyModifiers.push(modifier);
|
|
16381
|
+
} else {
|
|
16382
|
+
keyModifiers.push(modifier);
|
|
16383
|
+
nonKeyModifiers.push(modifier);
|
|
16384
|
+
}
|
|
16385
|
+
} else if (isNonKeyModifier(modifier)) nonKeyModifiers.push(modifier);
|
|
16192
16386
|
else keyModifiers.push(modifier);
|
|
16193
16387
|
}
|
|
16194
16388
|
}
|
|
@@ -16303,7 +16497,7 @@ function isValidHTMLNesting(parent, child) {
|
|
|
16303
16497
|
}
|
|
16304
16498
|
return true;
|
|
16305
16499
|
}
|
|
16306
|
-
const headings = new Set([
|
|
16500
|
+
const headings = /* @__PURE__ */ new Set([
|
|
16307
16501
|
"h1",
|
|
16308
16502
|
"h2",
|
|
16309
16503
|
"h3",
|
|
@@ -16315,7 +16509,7 @@ const emptySet = /* @__PURE__ */ new Set([]);
|
|
|
16315
16509
|
/**
|
|
16316
16510
|
* maps element to set of elements that can be it's children, no other */
|
|
16317
16511
|
const onlyValidChildren = {
|
|
16318
|
-
head: new Set([
|
|
16512
|
+
head: /* @__PURE__ */ new Set([
|
|
16319
16513
|
"base",
|
|
16320
16514
|
"basefront",
|
|
16321
16515
|
"bgsound",
|
|
@@ -16328,24 +16522,24 @@ const onlyValidChildren = {
|
|
|
16328
16522
|
"script",
|
|
16329
16523
|
"template"
|
|
16330
16524
|
]),
|
|
16331
|
-
optgroup: new Set(["option"]),
|
|
16332
|
-
select: new Set([
|
|
16525
|
+
optgroup: /* @__PURE__ */ new Set(["option"]),
|
|
16526
|
+
select: /* @__PURE__ */ new Set([
|
|
16333
16527
|
"optgroup",
|
|
16334
16528
|
"option",
|
|
16335
16529
|
"hr"
|
|
16336
16530
|
]),
|
|
16337
|
-
table: new Set([
|
|
16531
|
+
table: /* @__PURE__ */ new Set([
|
|
16338
16532
|
"caption",
|
|
16339
16533
|
"colgroup",
|
|
16340
16534
|
"tbody",
|
|
16341
16535
|
"tfoot",
|
|
16342
16536
|
"thead"
|
|
16343
16537
|
]),
|
|
16344
|
-
tr: new Set(["td", "th"]),
|
|
16345
|
-
colgroup: new Set(["col"]),
|
|
16346
|
-
tbody: new Set(["tr"]),
|
|
16347
|
-
thead: new Set(["tr"]),
|
|
16348
|
-
tfoot: new Set(["tr"]),
|
|
16538
|
+
tr: /* @__PURE__ */ new Set(["td", "th"]),
|
|
16539
|
+
colgroup: /* @__PURE__ */ new Set(["col"]),
|
|
16540
|
+
tbody: /* @__PURE__ */ new Set(["tr"]),
|
|
16541
|
+
thead: /* @__PURE__ */ new Set(["tr"]),
|
|
16542
|
+
tfoot: /* @__PURE__ */ new Set(["tr"]),
|
|
16349
16543
|
script: emptySet,
|
|
16350
16544
|
iframe: emptySet,
|
|
16351
16545
|
option: emptySet,
|
|
@@ -16356,30 +16550,30 @@ const onlyValidChildren = {
|
|
|
16356
16550
|
/** maps elements to set of elements which can be it's parent, no other */
|
|
16357
16551
|
const onlyValidParents = {
|
|
16358
16552
|
html: emptySet,
|
|
16359
|
-
body: new Set(["html"]),
|
|
16360
|
-
head: new Set(["html"]),
|
|
16361
|
-
td: new Set(["tr"]),
|
|
16362
|
-
colgroup: new Set(["table"]),
|
|
16363
|
-
caption: new Set(["table"]),
|
|
16364
|
-
tbody: new Set(["table"]),
|
|
16365
|
-
tfoot: new Set(["table"]),
|
|
16366
|
-
col: new Set(["colgroup"]),
|
|
16367
|
-
th: new Set(["tr"]),
|
|
16368
|
-
thead: new Set(["table"]),
|
|
16369
|
-
tr: new Set([
|
|
16553
|
+
body: /* @__PURE__ */ new Set(["html"]),
|
|
16554
|
+
head: /* @__PURE__ */ new Set(["html"]),
|
|
16555
|
+
td: /* @__PURE__ */ new Set(["tr"]),
|
|
16556
|
+
colgroup: /* @__PURE__ */ new Set(["table"]),
|
|
16557
|
+
caption: /* @__PURE__ */ new Set(["table"]),
|
|
16558
|
+
tbody: /* @__PURE__ */ new Set(["table"]),
|
|
16559
|
+
tfoot: /* @__PURE__ */ new Set(["table"]),
|
|
16560
|
+
col: /* @__PURE__ */ new Set(["colgroup"]),
|
|
16561
|
+
th: /* @__PURE__ */ new Set(["tr"]),
|
|
16562
|
+
thead: /* @__PURE__ */ new Set(["table"]),
|
|
16563
|
+
tr: /* @__PURE__ */ new Set([
|
|
16370
16564
|
"tbody",
|
|
16371
16565
|
"thead",
|
|
16372
16566
|
"tfoot"
|
|
16373
16567
|
]),
|
|
16374
|
-
dd: new Set(["dl", "div"]),
|
|
16375
|
-
dt: new Set(["dl", "div"]),
|
|
16376
|
-
figcaption: new Set(["figure"]),
|
|
16377
|
-
summary: new Set(["details"]),
|
|
16378
|
-
area: new Set(["map"])
|
|
16568
|
+
dd: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16569
|
+
dt: /* @__PURE__ */ new Set(["dl", "div"]),
|
|
16570
|
+
figcaption: /* @__PURE__ */ new Set(["figure"]),
|
|
16571
|
+
summary: /* @__PURE__ */ new Set(["details"]),
|
|
16572
|
+
area: /* @__PURE__ */ new Set(["map"])
|
|
16379
16573
|
};
|
|
16380
16574
|
/** maps element to set of elements that can not be it's children, others can */
|
|
16381
16575
|
const knownInvalidChildren = {
|
|
16382
|
-
p: new Set([
|
|
16576
|
+
p: /* @__PURE__ */ new Set([
|
|
16383
16577
|
"address",
|
|
16384
16578
|
"article",
|
|
16385
16579
|
"aside",
|
|
@@ -16414,7 +16608,7 @@ const knownInvalidChildren = {
|
|
|
16414
16608
|
"table",
|
|
16415
16609
|
"ul"
|
|
16416
16610
|
]),
|
|
16417
|
-
svg: new Set([
|
|
16611
|
+
svg: /* @__PURE__ */ new Set([
|
|
16418
16612
|
"b",
|
|
16419
16613
|
"blockquote",
|
|
16420
16614
|
"br",
|
|
@@ -16455,12 +16649,12 @@ const knownInvalidChildren = {
|
|
|
16455
16649
|
};
|
|
16456
16650
|
/** maps element to set of elements that can not be it's parent, others can */
|
|
16457
16651
|
const knownInvalidParents = {
|
|
16458
|
-
a: new Set(["a"]),
|
|
16459
|
-
button: new Set(["button"]),
|
|
16460
|
-
dd: new Set(["dd", "dt"]),
|
|
16461
|
-
dt: new Set(["dd", "dt"]),
|
|
16462
|
-
form: new Set(["form"]),
|
|
16463
|
-
li: new Set(["li"]),
|
|
16652
|
+
a: /* @__PURE__ */ new Set(["a"]),
|
|
16653
|
+
button: /* @__PURE__ */ new Set(["button"]),
|
|
16654
|
+
dd: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16655
|
+
dt: /* @__PURE__ */ new Set(["dd", "dt"]),
|
|
16656
|
+
form: /* @__PURE__ */ new Set(["form"]),
|
|
16657
|
+
li: /* @__PURE__ */ new Set(["li"]),
|
|
16464
16658
|
h1: headings,
|
|
16465
16659
|
h2: headings,
|
|
16466
16660
|
h3: headings,
|
|
@@ -16503,10 +16697,12 @@ function compile(src, options = {}) {
|
|
|
16503
16697
|
//#region packages/vue-compat/src/index.ts
|
|
16504
16698
|
const compileCache = Object.create(null);
|
|
16505
16699
|
function compileToFunction(template, options) {
|
|
16506
|
-
if (!isString(template))
|
|
16507
|
-
|
|
16508
|
-
|
|
16509
|
-
|
|
16700
|
+
if (!isString(template)) {
|
|
16701
|
+
if (template.nodeType) template = template.innerHTML;
|
|
16702
|
+
else {
|
|
16703
|
+
process.env.NODE_ENV !== "production" && warn(`invalid template option: `, template);
|
|
16704
|
+
return NOOP;
|
|
16705
|
+
}
|
|
16510
16706
|
}
|
|
16511
16707
|
const key = genCacheKey(template, options);
|
|
16512
16708
|
const cached = compileCache[key];
|
|
@@ -16540,4 +16736,4 @@ Vue.compile = compileToFunction;
|
|
|
16540
16736
|
var esm_index_default = Vue;
|
|
16541
16737
|
const configureCompat = Vue.configureCompat;
|
|
16542
16738
|
//#endregion
|
|
16543
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
|
16739
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, baseUseCssVars, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, ensureVaporSlotFallback, expose, filterModelListeners, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, vdomSlotFallbackKey, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|