function makeMap(str, expectsLowerCase) { const map = /* @__PURE__ */ Object.create(null); const list = str.split(","); for (let i = 0; i < list.length; i++) { map[list[i]] = true; } return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val]; } const EMPTY_OBJ = Object.freeze({}) ; const NOOP = () => { }; const NO = () => false; const onRE = /^on[^a-z]/; const isOn = (key) => onRE.test(key); const extend = Object.assign; const isArray = Array.isArray; const isString = (val) => typeof val === "string"; const isSymbol = (val) => typeof val === "symbol"; const isObject = (val) => val !== null && typeof val === "object"; const isReservedProp = /* @__PURE__ */ makeMap( // the leading comma is intentional so empty string "" is also included ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" ); const isBuiltInDirective = /* @__PURE__ */ makeMap( "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" ); const cacheStringFunction = (fn) => { const cache = /* @__PURE__ */ Object.create(null); return (str) => { const hit = cache[str]; return hit || (cache[str] = fn(str)); }; }; const camelizeRE = /-(\w)/g; const camelize = cacheStringFunction((str) => { return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); }); const hyphenateRE = /\B([A-Z])/g; const hyphenate = cacheStringFunction( (str) => str.replace(hyphenateRE, "-$1").toLowerCase() ); const capitalize = cacheStringFunction( (str) => str.charAt(0).toUpperCase() + str.slice(1) ); const toHandlerKey = cacheStringFunction( (str) => str ? `on${capitalize(str)}` : `` ); const PatchFlagNames = { [1]: `TEXT`, [2]: `CLASS`, [4]: `STYLE`, [8]: `PROPS`, [16]: `FULL_PROPS`, [32]: `HYDRATE_EVENTS`, [64]: `STABLE_FRAGMENT`, [128]: `KEYED_FRAGMENT`, [256]: `UNKEYED_FRAGMENT`, [512]: `NEED_PATCH`, [1024]: `DYNAMIC_SLOTS`, [2048]: `DEV_ROOT_FRAGMENT`, [-1]: `HOISTED`, [-2]: `BAIL` }; const slotFlagsText = { [1]: "STABLE", [2]: "DYNAMIC", [3]: "FORWARDED" }; const range = 2; function generateCodeFrame(source, start = 0, end = source.length) { let lines = source.split(/(\r?\n)/); const newlineSequences = lines.filter((_, idx) => idx % 2 === 1); lines = lines.filter((_, idx) => idx % 2 === 0); let count = 0; const res = []; for (let i = 0; i < lines.length; i++) { count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0); if (count >= start) { for (let j = i - range; j <= i + range || end > count; j++) { if (j < 0 || j >= lines.length) continue; const line = j + 1; res.push( `${line}${" ".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}` ); const lineLength = lines[j].length; const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0; if (j === i) { const pad = start - (count - (lineLength + newLineSeqLength)); const length = Math.max( 1, end > count ? lineLength - pad : end - start ); res.push(` | ` + " ".repeat(pad) + "^".repeat(length)); } else if (j > i) { if (end > count) { const length = Math.max(Math.min(end - count, lineLength), 1); res.push(` | ` + "^".repeat(length)); } count += lineLength + newLineSeqLength; } } break; } } return res.join("\n"); } const listDelimiterRE = /;(?![^(]*\))/g; const propertyDelimiterRE = /:([^]+)/; const styleCommentRE = /\/\*[^]*?\*\//g; function parseStringStyle(cssText) { const ret = {}; cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { if (item) { const tmp = item.split(propertyDelimiterRE); tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); } }); return ret; } const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; const SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; const VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS); const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS); const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS); function defaultOnError(error) { throw error; } function defaultOnWarn(msg) { console.warn(`[Vue warn] ${msg.message}`); } function createCompilerError(code, loc, messages, additionalMessage) { const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ; const error = new SyntaxError(String(msg)); error.code = code; error.loc = loc; return error; } const errorMessages = { // parse errors [0]: "Illegal comment.", [1]: "CDATA section is allowed only in XML context.", [2]: "Duplicate attribute.", [3]: "End tag cannot have attributes.", [4]: "Illegal '/' in tags.", [5]: "Unexpected EOF in tag.", [6]: "Unexpected EOF in CDATA section.", [7]: "Unexpected EOF in comment.", [8]: "Unexpected EOF in script.", [9]: "Unexpected EOF in tag.", [10]: "Incorrectly closed comment.", [11]: "Incorrectly opened comment.", [12]: "Illegal tag name. Use '<' to print '<'.", [13]: "Attribute value was expected.", [14]: "End tag name was expected.", [15]: "Whitespace was expected.", [16]: "Unexpected '