@kdujs/compiler-dom
Version:
@kdujs/compiler-dom
7 lines • 80 kB
JavaScript
/**
* @kdujs/compiler-dom v3.4.27
* (c) 2021-present NKDuy
* @license MIT
**/
var KduCompilerDOM=function(e){"use strict";
/*! #__NO_SIDE_EFFECTS__ */function t(e,t){const n=new Set(e.split(","));return t?e=>n.has(e.toLowerCase()):e=>n.has(e)}const n={},s=()=>{},i=()=>!1,o=e=>111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&(e.charCodeAt(2)>122||e.charCodeAt(2)<97),r=Object.assign,a=Array.isArray,c=e=>"string"==typeof e,l=e=>"symbol"==typeof e,h=e=>null!==e&&"object"==typeof e,p=t(",key,ref,ref_for,ref_key,onKnodeBeforeMount,onKnodeMounted,onKnodeBeforeUpdate,onKnodeUpdated,onKnodeBeforeUnmount,onKnodeUnmounted"),d=t("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"),u=e=>{const t=Object.create(null);return n=>t[n]||(t[n]=e(n))},f=/-(\w)/g,m=u((e=>e.replace(f,((e,t)=>t?t.toUpperCase():"")))),E=u((e=>e.charAt(0).toUpperCase()+e.slice(1))),_=u((e=>e?`on${E(e)}`:""));const S=/;(?![^(]*\))/g,T=/:([^]+)/,g=/\/\*[^]*?\*\//g;const N=t("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"),I=t("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"),y=t("annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"),O=t("area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"),A=Symbol(""),C=Symbol(""),b=Symbol(""),R=Symbol(""),x=Symbol(""),L=Symbol(""),M=Symbol(""),k=Symbol(""),P=Symbol(""),D=Symbol(""),v=Symbol(""),X=Symbol(""),w=Symbol(""),K=Symbol(""),U=Symbol(""),F=Symbol(""),B=Symbol(""),$=Symbol(""),H=Symbol(""),V=Symbol(""),G=Symbol(""),q=Symbol(""),J=Symbol(""),j=Symbol(""),W=Symbol(""),Y=Symbol(""),Q=Symbol(""),z=Symbol(""),Z=Symbol(""),ee=Symbol(""),te=Symbol(""),ne=Symbol(""),se=Symbol(""),ie=Symbol(""),oe=Symbol(""),re=Symbol(""),ae=Symbol(""),ce=Symbol(""),le=Symbol(""),he={[A]:"Fragment",[C]:"Teleport",[b]:"Suspense",[R]:"KeepAlive",[x]:"BaseTransition",[L]:"openBlock",[M]:"createBlock",[k]:"createElementBlock",[P]:"createKNode",[D]:"createElementKNode",[v]:"createCommentKNode",[X]:"createTextKNode",[w]:"createStaticKNode",[K]:"resolveComponent",[U]:"resolveDynamicComponent",[F]:"resolveDirective",[B]:"resolveFilter",[$]:"withDirectives",[H]:"renderList",[V]:"renderSlot",[G]:"createSlots",[q]:"toDisplayString",[J]:"mergeProps",[j]:"normalizeClass",[W]:"normalizeStyle",[Y]:"normalizeProps",[Q]:"guardReactiveProps",[z]:"toHandlers",[Z]:"camelize",[ee]:"capitalize",[te]:"toHandlerKey",[ne]:"setBlockTracking",[se]:"pushScopeId",[ie]:"popScopeId",[oe]:"withCtx",[re]:"unref",[ae]:"isRef",[ce]:"withMemo",[le]:"isMemoSame"};function pe(e){Object.getOwnPropertySymbols(e).forEach((t=>{he[t]=e[t]}))}const de={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function ue(e,t=""){return{type:0,source:t,children:e,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:0,temps:0,codegenNode:void 0,loc:de}}function fe(e,t,n,s,i,o,r,a=!1,c=!1,l=!1,h=de){return e&&(a?(e.helper(L),e.helper(Ce(e.inSSR,l))):e.helper(Ae(e.inSSR,l)),r&&e.helper($)),{type:13,tag:t,props:n,children:s,patchFlag:i,dynamicProps:o,directives:r,isBlock:a,disableTracking:c,isComponent:l,loc:h}}function me(e,t=de){return{type:17,loc:t,elements:e}}function Ee(e,t=de){return{type:15,loc:t,properties:e}}function _e(e,t){return{type:16,loc:de,key:c(e)?Se(e,!0):e,value:t}}function Se(e,t=!1,n=de,s=0){return{type:4,loc:n,content:e,isStatic:t,constType:t?3:s}}function Te(e,t=de){return{type:8,loc:t,children:e}}function ge(e,t=[],n=de){return{type:14,loc:n,callee:e,arguments:t}}function Ne(e,t=void 0,n=!1,s=!1,i=de){return{type:18,params:e,returns:t,newline:n,isSlot:s,loc:i}}function Ie(e,t,n,s=!0){return{type:19,test:e,consequent:t,alternate:n,newline:s,loc:de}}function ye(e,t,n=!1){return{type:20,index:e,value:t,isKNode:n,loc:de}}function Oe(e){return{type:21,body:e,loc:de}}function Ae(e,t){return e||t?P:D}function Ce(e,t){return e||t?M:k}function be(e,{helper:t,removeHelper:n,inSSR:s}){e.isBlock||(e.isBlock=!0,n(Ae(s,e.isComponent)),t(L),t(Ce(s,e.isComponent)))}var Re=Object.defineProperty,xe=(e,t,n)=>(((e,t,n)=>{t in e?Re(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);const Le=new Uint8Array([123,123]),Me=new Uint8Array([125,125]);function ke(e){return e>=97&&e<=122||e>=65&&e<=90}function Pe(e){return 32===e||10===e||9===e||12===e||13===e}function De(e){return 47===e||62===e||Pe(e)}function ve(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++)t[n]=e.charCodeAt(n);return t}const Xe={Cdata:new Uint8Array([67,68,65,84,65,91]),CdataEnd:new Uint8Array([93,93,62]),CommentEnd:new Uint8Array([45,45,62]),ScriptEnd:new Uint8Array([60,47,115,99,114,105,112,116]),StyleEnd:new Uint8Array([60,47,115,116,121,108,101]),TitleEnd:new Uint8Array([60,47,116,105,116,108,101]),TextareaEnd:new Uint8Array([60,47,116,101,120,116,97,114,101,97])};const we={COMPILER_IS_ON_ELEMENT:{message:'Platform-native elements with "is" prop will no longer be treated as components in Kdu 3 unless the "is" value is explicitly prefixed with "kdu:".',link:"https://kdujs-v3-migration.web.app/breaking-changes/custom-elements-interop.html"},COMPILER_K_BIND_SYNC:{message:e=>`.sync modifier for k-bind has been removed. Use k-model with argument instead. \`k-bind:${e}.sync\` should be changed to \`k-model:${e}\`.`,link:"https://kdujs-v3-migration.web.app/breaking-changes/k-model.html"},COMPILER_K_BIND_OBJECT_ORDER:{message:'k-bind="obj" usage is now order sensitive and behaves like JavaScript object spread: it will now overwrite an existing non-mergeable attribute that appears before k-bind in the case of conflict. To retain 2.x behavior, move k-bind to make it the first attribute. You can also suppress this warning if the usage is intended.',link:"https://kdujs-v3-migration.web.app/breaking-changes/k-bind.html"},COMPILER_K_ON_NATIVE:{message:".native modifier for k-on has been removed as is no longer necessary.",link:"https://kdujs-v3-migration.web.app/breaking-changes/k-on-native-modifier-removed.html"},COMPILER_K_IF_K_FOR_PRECEDENCE:{message:"k-if / k-for precedence when used on the same element has changed in Kdu 3: k-if now takes higher precedence and will no longer have access to k-for scope variables. It is best to avoid the ambiguity with <template> tags or use a computed property that filters k-for data source.",link:"https://kdujs-v3-migration.web.app/breaking-changes/k-if-k-for.html"},COMPILER_NATIVE_TEMPLATE:{message:"<template> with no special directives will render as a native template element instead of its inner content in Kdu 3."},COMPILER_INLINE_TEMPLATE:{message:'"inline-template" has been removed in Kdu 3.',link:"https://kdujs-v3-migration.web.app/breaking-changes/inline-template-attribute.html"},COMPILER_FILTERS:{message:'filters have been removed in Kdu 3. The "|" symbol will be treated as native JavaScript bitwise OR operator. Use method calls or computed properties instead.',link:"https://kdujs-v3-migration.web.app/breaking-changes/filters.html"}};function Ke(e,{compatConfig:t}){const n=t&&t[e];return"MODE"===e?n||3:n}function Ue(e,t){const n=Ke("MODE",t),s=Ke(e,t);return 3===n?!0===s:!1!==s}function Fe(e,t,n,...s){return Ue(e,t)}function Be(e){throw e}function $e(e){}function He(e,t,n,s){const i=new SyntaxError(String(`https://kdu-js.web.app/error-reference/#compiler-${e}`));return i.code=e,i.loc=t,i}const Ve={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 '\x3c!--' in comment.",17:"Attribute name cannot contain U+0022 (\"), U+0027 ('), and U+003C (<).",18:"Unquoted attribute value cannot contain U+0022 (\"), U+0027 ('), U+003C (<), U+003D (=), and U+0060 (`).",19:"Attribute name cannot start with '='.",21:"'<?' is allowed only in XML context.",20:"Unexpected null character.",22:"Illegal '/' in tags.",23:"Invalid end tag.",24:"Element is missing end tag.",25:"Interpolation end sign was not found.",27:"End bracket for dynamic directive argument was not found. Note that dynamic directive argument cannot contain spaces.",26:"Legal directive name was expected.",28:"k-if/k-else-if is missing expression.",29:"k-if/else branches must use unique keys.",30:"k-else/k-else-if has no adjacent k-if or k-else-if.",31:"k-for is missing expression.",32:"k-for has invalid expression.",33:"<template k-for> key should be placed on the <template> tag.",34:"k-bind is missing expression.",52:"k-bind with same-name shorthand only allows static argument.",35:"k-on is missing expression.",36:"Unexpected custom directive on <slot> outlet.",37:"Mixed k-slot usage on both the component and nested <template>. When there are multiple named slots, all slots should use <template> syntax to avoid scope ambiguity.",38:"Duplicate slot names found. ",39:"Extraneous children found when component already has explicitly named default slot. These children will be ignored.",40:"k-slot can only be used on components or <template> tags.",41:"k-model is missing expression.",42:"k-model value must be a valid JavaScript member expression.",43:"k-model cannot be used on k-for or k-slot scope variables because they are not writable.",44:"k-model cannot be used on a prop, because local prop bindings are not writable.\nUse a k-bind binding combined with a k-on listener that emits update:x event instead.",45:"Error parsing JavaScript expression: ",46:"<KeepAlive> expects exactly one child component.",51:"@knode-* hooks in templates are no longer supported. Use the kdu: prefix instead. For example, @knode-mounted should be changed to @kdu:mounted. @knode-* hooks support has been removed in 3.4.",47:'"prefixIdentifiers" option is not supported in this build of compiler.',48:"ES module mode is not supported in this build of compiler.",49:'"cacheHandlers" option is only supported when the "prefixIdentifiers" option is enabled.',50:'"scopeId" option is only supported in module mode.',53:""};function Ge(e,t=[]){switch(e.type){case"Identifier":t.push(e);break;case"MemberExpression":let n=e;for(;"MemberExpression"===n.type;)n=n.object;t.push(n);break;case"ObjectPattern":for(const s of e.properties)Ge("RestElement"===s.type?s.argument:s.value,t);break;case"ArrayPattern":e.elements.forEach((e=>{e&&Ge(e,t)}));break;case"RestElement":Ge(e.argument,t);break;case"AssignmentPattern":Ge(e.left,t)}return t}const qe=e=>e&&("ObjectProperty"===e.type||"ObjectMethod"===e.type)&&!e.computed,Je=["TSAsExpression","TSTypeAssertion","TSNonNullExpression","TSInstantiationExpression","TSSatisfiesExpression"];const je=e=>4===e.type&&e.isStatic;function We(e){switch(e){case"Teleport":case"teleport":return C;case"Suspense":case"suspense":return b;case"KeepAlive":case"keep-alive":return R;case"BaseTransition":case"base-transition":return x}}const Ye=/^\d|[^\$\w]/,Qe=e=>!Ye.test(e),ze=/[A-Za-z_$\xA0-\uFFFF]/,Ze=/[\.\?\w$\xA0-\uFFFF]/,et=/\s+[.[]\s*|\s*[.[]\s+/g,tt=e=>{e=e.trim().replace(et,(e=>e.trim()));let t=0,n=[],s=0,i=0,o=null;for(let r=0;r<e.length;r++){const a=e.charAt(r);switch(t){case 0:if("["===a)n.push(t),t=1,s++;else if("("===a)n.push(t),t=2,i++;else if(!(0===r?ze:Ze).test(a))return!1;break;case 1:"'"===a||'"'===a||"`"===a?(n.push(t),t=3,o=a):"["===a?s++:"]"===a&&(--s||(t=n.pop()));break;case 2:if("'"===a||'"'===a||"`"===a)n.push(t),t=3,o=a;else if("("===a)i++;else if(")"===a){if(r===e.length-1)return!1;--i||(t=n.pop())}break;case 3:a===o&&(t=n.pop(),o=null)}}return!s&&!i},nt=s,st=tt;function it(e,t,n=t.length){let s=0,i=-1;for(let o=0;o<n;o++)10===t.charCodeAt(o)&&(s++,i=o);return e.offset+=n,e.line+=s,e.column=-1===i?e.column+n:n-i,e}function ot(e,t,n=!1){for(let s=0;s<e.props.length;s++){const i=e.props[s];if(7===i.type&&(n||i.exp)&&(c(t)?i.name===t:t.test(i.name)))return i}}function rt(e,t,n=!1,s=!1){for(let i=0;i<e.props.length;i++){const o=e.props[i];if(6===o.type){if(n)continue;if(o.name===t&&(o.value||s))return o}else if("bind"===o.name&&(o.exp||s)&&at(o.arg,t))return o}}function at(e,t){return!(!e||!je(e)||e.content!==t)}function ct(e){return e.props.some((e=>!(7!==e.type||"bind"!==e.name||e.arg&&4===e.arg.type&&e.arg.isStatic)))}function lt(e){return 5===e.type||2===e.type}function ht(e){return 7===e.type&&"slot"===e.name}function pt(e){return 1===e.type&&3===e.tagType}function dt(e){return 1===e.type&&2===e.tagType}const ut=new Set([Y,Q]);function ft(e,t=[]){if(e&&!c(e)&&14===e.type){const n=e.callee;if(!c(n)&&ut.has(n))return ft(e.arguments[0],t.concat(e))}return[e,t]}function mt(e,t,n){let s,i,o=13===e.type?e.props:e.arguments[2],r=[];if(o&&!c(o)&&14===o.type){const e=ft(o);o=e[0],r=e[1],i=r[r.length-1]}if(null==o||c(o))s=Ee([t]);else if(14===o.type){const e=o.arguments[0];c(e)||15!==e.type?o.callee===z?s=ge(n.helper(J),[Ee([t]),o]):o.arguments.unshift(Ee([t])):Et(t,e)||e.properties.unshift(t),!s&&(s=o)}else 15===o.type?(Et(t,o)||o.properties.unshift(t),s=o):(s=ge(n.helper(J),[Ee([t]),o]),i&&i.callee===Q&&(i=r[r.length-2]));13===e.type?i?i.arguments[0]=s:e.props=s:i?i.arguments[0]=s:e.arguments[2]=s}function Et(e,t){let n=!1;if(4===e.key.type){const s=e.key.content;n=t.properties.some((e=>4===e.key.type&&e.key.content===s))}return n}function _t(e,t){return`_${t}_${e.replace(/[^\w]/g,((t,n)=>"-"===t?"_":e.charCodeAt(n).toString()))}`}function St(e){return 14===e.type&&e.callee===ce?e.arguments[1].returns:e}const Tt=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,gt={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:i,isPreTag:i,isCustomElement:i,onError:Be,onWarn:$e,comments:!1,prefixIdentifiers:!1};let Nt=gt,It=null,yt="",Ot=null,At=null,Ct="",bt=-1,Rt=-1,xt=0,Lt=!1,Mt=null;const kt=[],Pt=new class{constructor(e,t){this.stack=e,this.cbs=t,xe(this,"state",1),xe(this,"buffer",""),xe(this,"sectionStart",0),xe(this,"index",0),xe(this,"entityStart",0),xe(this,"baseState",1),xe(this,"inRCDATA",!1),xe(this,"inXML",!1),xe(this,"inKPre",!1),xe(this,"newlines",[]),xe(this,"entityDecoder"),xe(this,"mode",0),xe(this,"delimiterOpen",Le),xe(this,"delimiterClose",Me),xe(this,"delimiterIndex",-1),xe(this,"currentSequence"),xe(this,"sequenceIndex",0)}get inSFCRoot(){return 2===this.mode&&0===this.stack.length}reset(){this.state=1,this.mode=0,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=1,this.inRCDATA=!1,this.currentSequence=void 0,this.newlines.length=0,this.delimiterOpen=Le,this.delimiterClose=Me}getPos(e){let t=1,n=e+1;for(let s=this.newlines.length-1;s>=0;s--){const i=this.newlines[s];if(e>i){t=s+2,n=e-i;break}}return{column:n,line:t,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){60===e?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):this.inKPre||e!==this.delimiterOpen[0]||(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e))}stateInterpolationOpen(e){if(e===this.delimiterOpen[this.delimiterIndex])if(this.delimiterIndex===this.delimiterOpen.length-1){const e=this.index+1-this.delimiterOpen.length;e>this.sectionStart&&this.cbs.ontext(this.sectionStart,e),this.state=3,this.sectionStart=e}else this.delimiterIndex++;else this.inRCDATA?(this.state=32,this.stateInRCDATA(e)):(this.state=1,this.stateText(e))}stateInterpolation(e){e===this.delimiterClose[0]&&(this.state=4,this.delimiterIndex=0,this.stateInterpolationClose(e))}stateInterpolationClose(e){e===this.delimiterClose[this.delimiterIndex]?this.delimiterIndex===this.delimiterClose.length-1?(this.cbs.oninterpolation(this.sectionStart,this.index+1),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const t=this.sequenceIndex===this.currentSequence.length;if(t?De(e):(32|e)===this.currentSequence[this.sequenceIndex]){if(!t)return void this.sequenceIndex++}else this.inRCDATA=!1;this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(62===e||Pe(e)){const t=this.index-this.currentSequence.length;if(this.sectionStart<t){const e=this.index;this.index=t,this.cbs.ontext(this.sectionStart,t),this.index=e}return this.sectionStart=t+2,this.stateInClosingTagName(e),void(this.inRCDATA=!1)}this.sequenceIndex=0}(32|e)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:0===this.sequenceIndex?this.currentSequence===Xe.TitleEnd||this.currentSequence===Xe.TextareaEnd&&!this.inSFCRoot?e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=Number(60===e)}stateCDATASequence(e){e===Xe.Cdata[this.sequenceIndex]?++this.sequenceIndex===Xe.Cdata.length&&(this.state=28,this.currentSequence=Xe.CdataEnd,this.sequenceIndex=0,this.sectionStart=this.index+1):(this.sequenceIndex=0,this.state=23,this.stateInDeclaration(e))}fastForwardTo(e){for(;++this.index<this.buffer.length;){const t=this.buffer.charCodeAt(this.index);if(10===t&&this.newlines.push(this.index),t===e)return!0}return this.index=this.buffer.length-1,!1}stateInCommentLike(e){e===this.currentSequence[this.sequenceIndex]?++this.sequenceIndex===this.currentSequence.length&&(this.currentSequence===Xe.CdataEnd?this.cbs.oncdata(this.sectionStart,this.index-2):this.cbs.oncomment(this.sectionStart,this.index-2),this.sequenceIndex=0,this.sectionStart=this.index+1,this.state=1):0===this.sequenceIndex?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,t){this.enterRCDATA(e,t),this.state=31}enterRCDATA(e,t){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=t}stateBeforeTagName(e){33===e?(this.state=22,this.sectionStart=this.index+1):63===e?(this.state=24,this.sectionStart=this.index+1):ke(e)?(this.sectionStart=this.index,this.state=0===this.mode?6:this.inSFCRoot?34:this.inXML?6:116===e?30:115===e?29:6):47===e?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){De(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(De(e)){const t=this.buffer.slice(this.sectionStart,this.index);"template"!==t&&this.enterRCDATA(ve("</"+t),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){Pe(e)||(62===e?(this.state=1,this.sectionStart=this.index+1):(this.state=ke(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(62===e||Pe(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){62===e&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){62===e?(this.cbs.onopentagend(this.index),this.state=this.inRCDATA?32:1,this.sectionStart=this.index+1):47===e?this.state=7:60===e&&47===this.peek()?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):Pe(e)||this.handleAttrStart(e)}handleAttrStart(e){118===e&&45===this.peek()?(this.state=13,this.sectionStart=this.index):46===e||58===e||64===e||35===e?(this.cbs.ondirname(this.index,this.index+1),this.state=14,this.sectionStart=this.index+1):(this.state=12,this.sectionStart=this.index)}stateInSelfClosingTag(e){62===e?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):Pe(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(61===e||De(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){61===e||De(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):58===e?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):46===e&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){61===e||De(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):91===e?this.state=15:46===e&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){93===e?this.state=14:(61===e||De(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){61===e||De(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):46===e&&(this.cbs.ondirmodifier(this.sectionStart,this.index),this.sectionStart=this.index+1)}handleAttrNameEnd(e){this.sectionStart=this.index,this.state=17,this.cbs.onattribnameend(this.index),this.stateAfterAttrName(e)}stateAfterAttrName(e){61===e?this.state=18:47===e||62===e?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):Pe(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){34===e?(this.state=19,this.sectionStart=this.index+1):39===e?(this.state=20,this.sectionStart=this.index+1):Pe(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,t){(e===t||this.fastForwardTo(t))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(34===t?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){Pe(e)||62===e?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):39!==e&&60!==e&&61!==e&&96!==e||this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){91===e?(this.state=26,this.sequenceIndex=0):this.state=45===e?25:23}stateInDeclaration(e){(62===e||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(62===e||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){45===e?(this.state=28,this.currentSequence=Xe.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(62===e||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===Xe.ScriptEnd[3]?this.startSpecial(Xe.ScriptEnd,4):e===Xe.StyleEnd[3]?this.startSpecial(Xe.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===Xe.TitleEnd[3]?this.startSpecial(Xe.TitleEnd,4):e===Xe.TextareaEnd[3]?this.startSpecial(Xe.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const e=this.buffer.charCodeAt(this.index);switch(10===e&&this.newlines.push(this.index),this.state){case 1:this.stateText(e);break;case 2:this.stateInterpolationOpen(e);break;case 3:this.stateInterpolation(e);break;case 4:this.stateInterpolationClose(e);break;case 31:this.stateSpecialStartSequence(e);break;case 32:this.stateInRCDATA(e);break;case 26:this.stateCDATASequence(e);break;case 19:this.stateInAttrValueDoubleQuotes(e);break;case 12:this.stateInAttrName(e);break;case 13:this.stateInDirName(e);break;case 14:this.stateInDirArg(e);break;case 15:this.stateInDynamicDirArg(e);break;case 16:this.stateInDirModifier(e);break;case 28:this.stateInCommentLike(e);break;case 27:this.stateInSpecialComment(e);break;case 11:this.stateBeforeAttrName(e);break;case 6:this.stateInTagName(e);break;case 34:this.stateInSFCRootTagName(e);break;case 9:this.stateInClosingTagName(e);break;case 5:this.stateBeforeTagName(e);break;case 17:this.stateAfterAttrName(e);break;case 20:this.stateInAttrValueSingleQuotes(e);break;case 18:this.stateBeforeAttrValue(e);break;case 8:this.stateBeforeClosingTagName(e);break;case 10:this.stateAfterClosingTagName(e);break;case 29:this.stateBeforeSpecialS(e);break;case 30:this.stateBeforeSpecialT(e);break;case 21:this.stateInAttrValueNoQuotes(e);break;case 7:this.stateInSelfClosingTag(e);break;case 23:this.stateInDeclaration(e);break;case 22:this.stateBeforeDeclaration(e);break;case 25:this.stateBeforeComment(e);break;case 24:this.stateInProcessingInstruction(e);break;case 33:this.stateInEntity()}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(1===this.state||32===this.state&&0===this.sequenceIndex?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):19!==this.state&&20!==this.state&&21!==this.state||(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}finish(){this.handleTrailingData(),this.cbs.onend()}handleTrailingData(){const e=this.buffer.length;this.sectionStart>=e||(28===this.state?this.currentSequence===Xe.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):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===this.state||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,t){}}(kt,{onerr:Zt,ontext(e,t){Kt(Xt(e,t),e,t)},ontextentity(e,t,n){Kt(e,t,n)},oninterpolation(e,t){if(Lt)return Kt(Xt(e,t),e,t);let n=e+Pt.delimiterOpen.length,s=t-Pt.delimiterClose.length;for(;Pe(yt.charCodeAt(n));)n++;for(;Pe(yt.charCodeAt(s-1));)s--;let i=Xt(n,s);i.includes("&")&&(i=Nt.decodeEntities(i,!1)),jt({type:5,content:zt(i,!1,Wt(n,s)),loc:Wt(e,t)})},onopentagname(e,t){const n=Xt(e,t);Ot={type:1,tag:n,ns:Nt.getNamespace(n,kt[0],Nt.ns),tagType:0,props:[],children:[],loc:Wt(e-1,t),codegenNode:void 0}},onopentagend(e){wt(e)},onclosetag(e,t){const n=Xt(e,t);if(!Nt.isVoidTag(n)){let s=!1;for(let e=0;e<kt.length;e++){if(kt[e].tag.toLowerCase()===n.toLowerCase()){s=!0;for(let n=0;n<=e;n++){Ut(kt.shift(),t,n<e)}break}}s||Ft(e,60)}},onselfclosingtag(e){const t=Ot.tag;Ot.isSelfClosing=!0,wt(e),kt[0]&&kt[0].tag===t&&Ut(kt.shift(),e)},onattribname(e,t){At={type:6,name:Xt(e,t),nameLoc:Wt(e,t),value:void 0,loc:Wt(e)}},ondirname(e,t){const n=Xt(e,t),s="."===n||":"===n?"bind":"@"===n?"on":"#"===n?"slot":n.slice(2);if(Lt||""===s)At={type:6,name:n,nameLoc:Wt(e,t),value:void 0,loc:Wt(e)};else if(At={type:7,name:s,rawName:n,exp:void 0,arg:void 0,modifiers:"."===n?["prop"]:[],loc:Wt(e)},"pre"===s){Lt=Pt.inKPre=!0,Mt=Ot;const e=Ot.props;for(let t=0;t<e.length;t++)7===e[t].type&&(e[t]=Qt(e[t]))}},ondirarg(e,t){if(e===t)return;const n=Xt(e,t);if(Lt)At.name+=n,Yt(At.nameLoc,t);else{const s="["!==n[0];At.arg=zt(s?n:n.slice(1,-1),s,Wt(e,t),s?3:0)}},ondirmodifier(e,t){const n=Xt(e,t);if(Lt)At.name+="."+n,Yt(At.nameLoc,t);else if("slot"===At.name){const e=At.arg;e&&(e.content+="."+n,Yt(e.loc,t))}else At.modifiers.push(n)},onattribdata(e,t){Ct+=Xt(e,t),bt<0&&(bt=e),Rt=t},onattribentity(e,t,n){Ct+=e,bt<0&&(bt=t),Rt=n},onattribnameend(e){const t=Xt(At.loc.start.offset,e);7===At.type&&(At.rawName=t),Ot.props.some((e=>(7===e.type?e.rawName:e.name)===t))},onattribend(e,t){if(Ot&&At){if(Yt(At.loc,t),0!==e)if(Ct.includes("&")&&(Ct=Nt.decodeEntities(Ct,!0)),6===At.type)"class"===At.name&&(Ct=Jt(Ct).trim()),At.value={type:2,content:Ct,loc:1===e?Wt(bt,Rt):Wt(bt-1,Rt+1)},Pt.inSFCRoot&&"template"===Ot.tag&&"lang"===At.name&&Ct&&"html"!==Ct&&Pt.enterRCDATA(ve("</template"),0);else{let e=0;At.exp=zt(Ct,!1,Wt(bt,Rt),0,e),"for"===At.name&&(At.forParseResult=function(e){const t=e.loc,n=e.content,s=n.match(Tt);if(!s)return;const[,i,o]=s,r=(e,n,s=!1)=>{const i=t.start.offset+n;return zt(e,!1,Wt(i,i+e.length),0,s?1:0)},a={source:r(o.trim(),n.indexOf(o,i.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=i.trim().replace(vt,"").trim();const l=i.indexOf(c),h=c.match(Dt);if(h){c=c.replace(Dt,"").trim();const e=h[1].trim();let t;if(e&&(t=n.indexOf(e,l+c.length),a.key=r(e,t,!0)),h[2]){const s=h[2].trim();s&&(a.index=r(s,n.indexOf(s,a.key?t+e.length:l+c.length),!0))}}c&&(a.value=r(c,l,!0));return a}(At.exp));let t=-1;"bind"===At.name&&(t=At.modifiers.indexOf("sync"))>-1&&Fe("COMPILER_K_BIND_SYNC",Nt,0)&&(At.name="model",At.modifiers.splice(t,1))}7===At.type&&"pre"===At.name||Ot.props.push(At)}Ct="",bt=Rt=-1},oncomment(e,t){Nt.comments&&jt({type:3,content:Xt(e,t),loc:Wt(e-4,t+3)})},onend(){const e=yt.length;for(let t=0;t<kt.length;t++)Ut(kt[t],e-1)},oncdata(e,t){0!==kt[0].ns&&Kt(Xt(e,t),e,t)},onprocessinginstruction(e){0===(kt[0]?kt[0].ns:Nt.ns)&&Zt(21,e-1)}}),Dt=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,vt=/^\(|\)$/g;function Xt(e,t){return yt.slice(e,t)}function wt(e){Pt.inSFCRoot&&(Ot.innerLoc=Wt(e+1,e+1)),jt(Ot);const{tag:t,ns:n}=Ot;0===n&&Nt.isPreTag(t)&&xt++,Nt.isVoidTag(t)?Ut(Ot,e):(kt.unshift(Ot),1!==n&&2!==n||(Pt.inXML=!0)),Ot=null}function Kt(e,t,n){{const t=kt[0]&&kt[0].tag;"script"!==t&&"style"!==t&&e.includes("&")&&(e=Nt.decodeEntities(e,!1))}const s=kt[0]||It,i=s.children[s.children.length-1];i&&2===i.type?(i.content+=e,Yt(i.loc,n)):s.children.push({type:2,content:e,loc:Wt(t,n)})}function Ut(e,t,n=!1){Yt(e.loc,n?Ft(t,60):function(e,t){let n=e;for(;yt.charCodeAt(n)!==t&&n<yt.length-1;)n++;return n}(t,62)+1),Pt.inSFCRoot&&(e.innerLoc.end=r({},e.children.length?e.children[e.children.length-1].loc.end:e.innerLoc.start),e.innerLoc.source=Xt(e.innerLoc.start.offset,e.innerLoc.end.offset));const{tag:s,ns:i}=e;Lt||("slot"===s?e.tagType=2:$t(e)?e.tagType=3:function({tag:e,props:t}){if(Nt.isCustomElement(e))return!1;if("component"===e||(n=e.charCodeAt(0),n>64&&n<91)||We(e)||Nt.isBuiltInComponent&&Nt.isBuiltInComponent(e)||Nt.isNativeTag&&!Nt.isNativeTag(e))return!0;var n;for(let s=0;s<t.length;s++){const e=t[s];if(6===e.type){if("is"===e.name&&e.value){if(e.value.content.startsWith("kdu:"))return!0;if(Fe("COMPILER_IS_ON_ELEMENT",Nt))return!0}}else if("bind"===e.name&&at(e.arg,"is")&&Fe("COMPILER_IS_ON_ELEMENT",Nt))return!0}return!1}(e)&&(e.tagType=1)),Pt.inRCDATA||(e.children=Vt(e.children,e.tag)),0===i&&Nt.isPreTag(s)&&xt--,Mt===e&&(Lt=Pt.inKPre=!1,Mt=null),Pt.inXML&&0===(kt[0]?kt[0].ns:Nt.ns)&&(Pt.inXML=!1);{const t=e.props;if(!Pt.inSFCRoot&&Ue("COMPILER_NATIVE_TEMPLATE",Nt)&&"template"===e.tag&&!$t(e)){const t=kt[0]||It,n=t.children.indexOf(e);t.children.splice(n,1,...e.children)}const n=t.find((e=>6===e.type&&"inline-template"===e.name));n&&Fe("COMPILER_INLINE_TEMPLATE",Nt)&&e.children.length&&(n.value={type:2,content:Xt(e.children[0].loc.start.offset,e.children[e.children.length-1].loc.end.offset),loc:n.loc})}}function Ft(e,t){let n=e;for(;yt.charCodeAt(n)!==t&&n>=0;)n--;return n}const Bt=new Set(["if","else","else-if","for","slot"]);function $t({tag:e,props:t}){if("template"===e)for(let n=0;n<t.length;n++)if(7===t[n].type&&Bt.has(t[n].name))return!0;return!1}const Ht=/\r\n/g;function Vt(e,t){const n="preserve"!==Nt.whitespace;let s=!1;for(let i=0;i<e.length;i++){const t=e[i];if(2===t.type)if(xt)t.content=t.content.replace(Ht,"\n");else if(Gt(t.content)){const o=e[i-1]&&e[i-1].type,r=e[i+1]&&e[i+1].type;!o||!r||n&&(3===o&&(3===r||1===r)||1===o&&(3===r||1===r&&qt(t.content)))?(s=!0,e[i]=null):t.content=" "}else n&&(t.content=Jt(t.content))}if(xt&&t&&Nt.isPreTag(t)){const t=e[0];t&&2===t.type&&(t.content=t.content.replace(/^\r?\n/,""))}return s?e.filter(Boolean):e}function Gt(e){for(let t=0;t<e.length;t++)if(!Pe(e.charCodeAt(t)))return!1;return!0}function qt(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(10===n||13===n)return!0}return!1}function Jt(e){let t="",n=!1;for(let s=0;s<e.length;s++)Pe(e.charCodeAt(s))?n||(t+=" ",n=!0):(t+=e[s],n=!1);return t}function jt(e){(kt[0]||It).children.push(e)}function Wt(e,t){return{start:Pt.getPos(e),end:null==t?t:Pt.getPos(t),source:null==t?t:Xt(e,t)}}function Yt(e,t){e.end=Pt.getPos(t),e.source=Xt(e.start.offset,t)}function Qt(e){const t={type:6,name:e.rawName,nameLoc:Wt(e.loc.start.offset,e.loc.start.offset+e.rawName.length),value:void 0,loc:e.loc};if(e.exp){const n=e.exp.loc;n.end.offset<e.loc.end.offset&&(n.start.offset--,n.start.column--,n.end.offset++,n.end.column++),t.value={type:2,content:e.exp.content,loc:n}}return t}function zt(e,t=!1,n,s=0,i=0){return Se(e,t,n,s)}function Zt(e,t,n){Nt.onError(He(e,Wt(t,t)))}function en(e,t){if(Pt.reset(),Ot=null,At=null,Ct="",bt=-1,Rt=-1,kt.length=0,yt=e,Nt=r({},gt),t){let e;for(e in t)null!=t[e]&&(Nt[e]=t[e])}Pt.mode="html"===Nt.parseMode?1:"sfc"===Nt.parseMode?2:0,Pt.inXML=1===Nt.ns||2===Nt.ns;const n=t&&t.delimiters;n&&(Pt.delimiterOpen=ve(n[0]),Pt.delimiterClose=ve(n[1]));const s=It=ue([],e);return Pt.parse(yt),s.loc=Wt(0,e.length),s.children=Vt(s.children),It=null,s}function tn(e,t){sn(e,t,nn(e,e.children[0]))}function nn(e,t){const{children:n}=e;return 1===n.length&&1===t.type&&!dt(t)}function sn(e,t,n=!1){const{children:s}=e,i=s.length;let o=0;for(let r=0;r<s.length;r++){const e=s[r];if(1===e.type&&0===e.tagType){const s=n?0:on(e,t);if(s>0){if(s>=2){e.codegenNode.patchFlag="-1",e.codegenNode=t.hoist(e.codegenNode),o++;continue}}else{const n=e.codegenNode;if(13===n.type){const s=hn(n);if((!s||512===s||1===s)&&cn(e,t)>=2){const s=ln(e);s&&(n.props=t.hoist(s))}n.dynamicProps&&(n.dynamicProps=t.hoist(n.dynamicProps))}}}if(1===e.type){const n=1===e.tagType;n&&t.scopes.kSlot++,sn(e,t),n&&t.scopes.kSlot--}else if(11===e.type)sn(e,t,1===e.children.length);else if(9===e.type)for(let n=0;n<e.branches.length;n++)sn(e.branches[n],t,1===e.branches[n].children.length)}if(o&&t.transformHoist&&t.transformHoist(s,t,e),o&&o===i&&1===e.type&&0===e.tagType&&e.codegenNode&&13===e.codegenNode.type&&a(e.codegenNode.children)){const n=t.hoist(me(e.codegenNode.children));t.hmr&&(n.content=`[...${n.content}]`),e.codegenNode.children=n}}function on(e,t){const{constantCache:n}=t;switch(e.type){case 1:if(0!==e.tagType)return 0;const s=n.get(e);if(void 0!==s)return s;const i=e.codegenNode;if(13!==i.type)return 0;if(i.isBlock&&"svg"!==e.tag&&"foreignObject"!==e.tag)return 0;if(hn(i))return n.set(e,0),0;{let s=3;const o=cn(e,t);if(0===o)return n.set(e,0),0;o<s&&(s=o);for(let i=0;i<e.children.length;i++){const o=on(e.children[i],t);if(0===o)return n.set(e,0),0;o<s&&(s=o)}if(s>1)for(let i=0;i<e.props.length;i++){const o=e.props[i];if(7===o.type&&"bind"===o.name&&o.exp){const i=on(o.exp,t);if(0===i)return n.set(e,0),0;i<s&&(s=i)}}if(i.isBlock){for(let t=0;t<e.props.length;t++){if(7===e.props[t].type)return n.set(e,0),0}t.removeHelper(L),t.removeHelper(Ce(t.inSSR,i.isComponent)),i.isBlock=!1,t.helper(Ae(t.inSSR,i.isComponent))}return n.set(e,s),s}case 2:case 3:return 3;case 9:case 11:case 10:default:return 0;case 5:case 12:return on(e.content,t);case 4:return e.constType;case 8:let o=3;for(let n=0;n<e.children.length;n++){const s=e.children[n];if(c(s)||l(s))continue;const i=on(s,t);if(0===i)return 0;i<o&&(o=i)}return o}}const rn=new Set([j,W,Y,Q]);function an(e,t){if(14===e.type&&!c(e.callee)&&rn.has(e.callee)){const n=e.arguments[0];if(4===n.type)return on(n,t);if(14===n.type)return an(n,t)}return 0}function cn(e,t){let n=3;const s=ln(e);if(s&&15===s.type){const{properties:e}=s;for(let s=0;s<e.length;s++){const{key:i,value:o}=e[s],r=on(i,t);if(0===r)return r;let a;if(r<n&&(n=r),a=4===o.type?on(o,t):14===o.type?an(o,t):0,0===a)return a;a<n&&(n=a)}}return n}function ln(e){const t=e.codegenNode;if(13===t.type)return t.props}function hn(e){const t=e.patchFlag;return t?parseInt(t,10):void 0}function pn(e,{filename:t="",prefixIdentifiers:i=!1,hoistStatic:o=!1,hmr:r=!1,cacheHandlers:a=!1,nodeTransforms:l=[],directiveTransforms:h={},transformHoist:p=null,isBuiltInComponent:d=s,isCustomElement:u=s,expressionPlugins:f=[],scopeId:_=null,slotted:S=!0,ssr:T=!1,inSSR:g=!1,ssrCssVars:N="",bindingMetadata:I=n,inline:y=!1,isTS:O=!1,onError:A=Be,onWarn:C=$e,compatConfig:b}){const R=t.replace(/\?.*$/,"").match(/([^/\\]+)\.\w+$/),x={filename:t,selfName:R&&E(m(R[1])),prefixIdentifiers:i,hoistStatic:o,hmr:r,cacheHandlers:a,nodeTransforms:l,directiveTransforms:h,transformHoist:p,isBuiltInComponent:d,isCustomElement:u,expressionPlugins:f,scopeId:_,slotted:S,ssr:T,inSSR:g,ssrCssVars:N,bindingMetadata:I,inline:y,isTS:O,onError:A,onWarn:C,compatConfig:b,root:e,helpers:new Map,components:new Set,directives:new Set,hoists:[],imports:[],constantCache:new WeakMap,temps:0,cached:0,identifiers:Object.create(null),scopes:{kFor:0,kSlot:0,kPre:0,kOnce:0},parent:null,grandParent:null,currentNode:e,childIndex:0,inKOnce:!1,helper(e){const t=x.helpers.get(e)||0;return x.helpers.set(e,t+1),e},removeHelper(e){const t=x.helpers.get(e);if(t){const n=t-1;n?x.helpers.set(e,n):x.helpers.delete(e)}},helperString:e=>`_${he[x.helper(e)]}`,replaceNode(e){x.parent.children[x.childIndex]=x.currentNode=e},removeNode(e){const t=e?x.parent.children.indexOf(e):x.currentNode?x.childIndex:-1;e&&e!==x.currentNode?x.childIndex>t&&(x.childIndex--,x.onNodeRemoved()):(x.currentNode=null,x.onNodeRemoved()),x.parent.children.splice(t,1)},onNodeRemoved:s,addIdentifiers(e){},removeIdentifiers(e){},hoist(e){c(e)&&(e=Se(e)),x.hoists.push(e);const t=Se(`_hoisted_${x.hoists.length}`,!1,e.loc,2);return t.hoisted=e,t},cache:(e,t=!1)=>ye(x.cached++,e,t)};return x.filters=new Set,x}function dn(e,t){const n=pn(e,t);un(e,n),t.hoistStatic&&tn(e,n),t.ssr||function(e,t){const{helper:n}=t,{children:s}=e;if(1===s.length){const n=s[0];if(nn(e,n)&&n.codegenNode){const s=n.codegenNode;13===s.type&&be(s,t),e.codegenNode=s}else e.codegenNode=n}else if(s.length>1){let s=64;e.codegenNode=fe(t,n(A),void 0,e.children,s+"",void 0,void 0,!0,void 0,!1)}}(e,n),e.helpers=new Set([...n.helpers.keys()]),e.components=[...n.components],e.directives=[...n.directives],e.imports=n.imports,e.hoists=n.hoists,e.temps=n.temps,e.cached=n.cached,e.transformed=!0,e.filters=[...n.filters]}function un(e,t){t.currentNode=e;const{nodeTransforms:n}=t,s=[];for(let o=0;o<n.length;o++){const i=n[o](e,t);if(i&&(a(i)?s.push(...i):s.push(i)),!t.currentNode)return;e=t.currentNode}switch(e.type){case 3:t.ssr||t.helper(v);break;case 5:t.ssr||t.helper(q);break;case 9:for(let n=0;n<e.branches.length;n++)un(e.branches[n],t);break;case 10:case 11:case 1:case 0:!function(e,t){let n=0;const s=()=>{n--};for(;n<e.children.length;n++){const i=e.children[n];c(i)||(t.grandParent=t.parent,t.parent=e,t.childIndex=n,t.onNodeRemoved=s,un(i,t))}}(e,t)}t.currentNode=e;let i=s.length;for(;i--;)s[i]()}function fn(e,t){const n=c(e)?t=>t===e:t=>e.test(t);return(e,s)=>{if(1===e.type){const{props:i}=e;if(3===e.tagType&&i.some(ht))return;const o=[];for(let r=0;r<i.length;r++){const a=i[r];if(7===a.type&&n(a.name)){i.splice(r,1),r--;const n=t(e,a,s);n&&o.push(n)}}return o}}}const mn="/*#__PURE__*/",En=e=>`${he[e]}: _${he[e]}`;function _n(e,t={}){const n=function(e,{mode:t="function",prefixIdentifiers:n="module"===t,sourceMap:s=!1,filename:i="template.kdu.html",scopeId:o=null,optimizeImports:r=!1,runtimeGlobalName:a="Kdu",runtimeModuleName:c="kdu",ssrRuntimeModuleName:l="kdu/server-renderer",ssr:h=!1,isTS:p=!1,inSSR:d=!1}){const u={mode:t,prefixIdentifiers:n,sourceMap:s,filename:i,scopeId:o,optimizeImports:r,runtimeGlobalName:a,runtimeModuleName:c,ssrRuntimeModuleName:l,ssr:h,isTS:p,inSSR:d,source:e.source,code:"",column:1,line:1,offset:0,indentLevel:0,pure:!1,map:void 0,helper:e=>`_${he[e]}`,push(e,t=-2,n){u.code+=e},indent(){f(++u.indentLevel)},deindent(e=!1){e?--u.indentLevel:f(--u.indentLevel)},newline(){f(u.indentLevel)}};function f(e){u.push("\n"+" ".repeat(e),0)}return u}(e,t);t.onContextCreated&&t.onContextCreated(n);const{mode:s,push:i,prefixIdentifiers:o,indent:r,deindent:a,newline:c,ssr:l}=n,h=Array.from(e.helpers),p=h.length>0,d=!o&&"module"!==s;!function(e,t){const{push:n,newline:s,runtimeGlobalName:i}=t,o=i,r=Array.from(e.helpers);if(r.length>0&&(n(`const _Kdu = ${o}\n`,-1),e.hoists.length)){n(`const { ${[P,D,v,X,w].filter((e=>r.includes(e))).map(En).join(", ")} } = _Kdu\n`,-1)}(function(e,t){if(!e.length)return;t.pure=!0;const{push:n,newline:s}=t;s();for(let i=0;i<e.length;i++){const o=e[i];o&&(n(`const _hoisted_${i+1} = `),Nn(o,t),s())}t.pure=!1})(e.hoists,t),s(),n("return ")}(e,n);if(i(`function ${l?"ssrRender":"render"}(${(l?["_ctx","_push","_parent","_attrs"]:["_ctx","_cache"]).join(", ")}) {`),r(),d&&(i("with (_ctx) {"),r(),p&&(i(`const { ${h.map(En).join(", ")} } = _Kdu\n`,-1),c())),e.components.length&&(Sn(e.components,"component",n),(e.directives.length||e.temps>0)&&c()),e.directives.length&&(Sn(e.directives,"directive",n),e.temps>0&&c()),e.filters&&e.filters.length&&(c(),Sn(e.filters,"filter",n),c()),e.temps>0){i("let ");for(let t=0;t<e.temps;t++)i(`${t>0?", ":""}_temp${t}`)}return(e.components.length||e.directives.length||e.temps)&&(i("\n",0),c()),l||i("return "),e.codegenNode?Nn(e.codegenNode,n):i("null"),d&&(a(),i("}")),a(),i("}"),{ast:e,code:n.code,preamble:"",map:n.map?n.map.toJSON():void 0}}function Sn(e,t,{helper:n,push:s,newline:i,isTS:o}){const r=n("filter"===t?B:"component"===t?K:F);for(let a=0;a<e.length;a++){let n=e[a];const c=n.endsWith("__self");c&&(n=n.slice(0,-6)),s(`const ${_t(n,t)} = ${r}(${JSON.stringify(n)}${c?", true":""})${o?"!":""}`),a<e.length-1&&i()}}function Tn(e,t){const n=e.length>3||!1;t.push("["),n&&t.indent(),gn(e,t,n),n&&t.deindent(),t.push("]")}function gn(e,t,n=!1,s=!0){const{push:i,newline:o}=t;for(let r=0;r<e.length;r++){const l=e[r];c(l)?i(l,-3):a(l)?Tn(l,t):Nn(l,t),r<e.length-1&&(n?(s&&i(","),o()):s&&i(", "))}}function Nn(e,t){if(c(e))t.push(e,-3);else if(l(e))t.push(t.helper(e));else switch(e.type){case 1:case 9:case 11:case 12:Nn(e.codegenNode,t);break;case 2:!function(e,t){t.push(JSON.stringify(e.content),-3,e)}(e,t);break;case 4:In(e,t);break;case 5:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(mn);n(`${s(q)}(`),Nn(e.content,t),n(")")}(e,t);break;case 8:yn(e,t);break;case 3:!function(e,t){const{push:n,helper:s,pure:i}=t;i&&n(mn);n(`${s(v)}(${JSON.stringify(e.content)})`,-3,e)}(e,t);break;case 13:!function(e,t){const{push:n,helper:s,pure:i}=t,{tag:o,props:r,children:a,patchFlag:c,dynamicProps:l,directives:h,isBlock:p,disableTracking:d,isComponent:u}=e;h&&n(s($)+"(");p&&n(`(${s(L)}(${d?"true":""}), `);i&&n(mn);const f=p?Ce(t.inSSR,u):Ae(t.inSSR,u);n(s(f)+"(",-2,e),gn(function(e){let t=e.length;for(;t--&&null==e[t];);return e.slice(0,t+1).map((e=>e||"null"))}([o,r,a,c,l]),t),n(")"),p&&n(")");h&&(n(", "),Nn(h,t),n(")"))}(e,t);break;case 14:!function(e,t){const{push:n,helper:s,pure:i}=t,o=c(e.callee)?e.callee:s(e.callee);i&&n(mn);n(o+"(",-2,e),gn(e.arguments,t),n(")")}(e,t);break;case 15:!function(e,t){const{push:n,indent:s,deindent:i,newline:o}=t,{properties:r}=e;if(!r.length)return void n("{}",-2,e);const a=r.length>1||!1;n(a?"{":"{ "),a&&s();for(let c=0;c<r.length;c++){const{key:e,value:s}=r[c];On(e,t),n(": "),Nn(s,t),c<r.length-1&&(n(","),o())}a&&i(),n(a?"}":" }")}(e,t);break;case 17:!function(e,t){Tn(e.elements,t)}(e,t);break;case 18:!function(e,t){const{push:n,indent:s,deindent:i}=t,{params:o,returns:r,body:c,newline:l,isSlot:h}=e;h&&n(`_${he[oe]}(`);n("(",-2,e),a(o)?gn(o,t):o&&Nn(o,t);n(") => "),(l||c)&&(n("{"),s());r?(l&&n("return "),a(r)?Tn(r,t):Nn(r,t)):c&&Nn(c,t);(l||c)&&(i(),n("}"));h&&(e.isNonScopedSlot&&n(", undefined, true"),n(")"))}(e,t);break;case 19:!function(e,t){const{test:n,consequent:s,alternate:i,newline:o}=e,{push:r,indent:a,deindent:c,newline:l}=t;if(4===n.type){const e=!Qe(n.content);e&&r("("),In(n,t),e&&r(")")}else r("("),Nn(n,t),r(")");o&&a(),t.indentLevel++,o||r(" "),r("? "),Nn(s,t),t.indentLevel--,o&&l(),o||r(" "),r(": ");const h=19===i.type;h||t.indentLevel++;Nn(i,t),h||t.indentLevel--;o&&c(!0)}(e,t);break;case 20:!function(e,t){const{push:n,helper:s,indent:i,deindent:o,newline:r}=t;n(`_cache[${e.index}] || (`),e.isKNode&&(i(),n(`${s(ne)}(-1),`),r());n(`_cache[${e.index}] = `),Nn(e.value,t),e.isKNode&&(n(","),r(),n(`${s(ne)}(1),`),r(),n(`_cache[${e.index}]`),o());n(")")}(e,t);break;case 21:gn(e.body,t,!0,!1)}}function In(e,t){const{content:n,isStatic:s}=e;t.push(s?JSON.stringify(n):n,-3,e)}function yn(e,t){for(let n=0;n<e.children.length;n++){const s=e.children[n];c(s)?t.push(s,-3):Nn(s,t)}}function On(e,t){const{push:n}=t;if(8===e.type)n("["),yn(e,t),n("]");else if(e.isStatic){n(Qe(e.content)?e.content:JSON.stringify(e.content),-2,e)}else n(`[${e.content}]`,-3,e)}function An(e,t,n=!1,s=!1,i=Object.create(t.identifiers)){return e}const Cn=fn(/^(if|else|else-if)$/,((e,t,n)=>bn(e,t,n,((e,t,s)=>{const i=n.parent.children;let o=i.indexOf(e),r=0;for(;o-- >=0;){const e=i[o];e&&9===e.type&&(r+=e.branches.length)}return()=>{if(s)e.codegenNode=xn(t,r,n);else{const s=function(e){for(;;)if(19===e.type){if(19!==e.alternate.type)return e;e=e.alternate}else 20===e.type&&(e=e.value)}(e.codegenNode);s.alternate=xn(t,r+e.branches.length-1,n)}}}))));function bn(e,t,n,s){if(!("else"===t.name||t.exp&&t.exp.content.trim())){const s=t.exp?t.exp.loc:e.loc;n.onError(He(28,t.loc)),t.exp=Se("true",!1,s)}if("if"===t.name){const i=Rn(e,t),o={type:9,loc:e.loc,branches:[i]};if(n.replaceNode(o),s)return s(o,i,!0)}else{const i=n.parent.children;let o=i.indexOf(e);for(;o-- >=-1;){const r=i[o];if(r&&3===r.type)n.removeNode(r);else{if(!r||2!==r.type||r.content.trim().length){if(r&&9===r.type){"else-if"===t.name&&void 0===r.branches[r.branches.length-1].condition&&n.onError(He(30,e.loc)),n.removeNode();const i=Rn(e,t);r.branches.push(i);const o=s&&s(r,i,!1);un(i,n),o&&o(),n.currentNode=null}else n.onError(He(30,e.loc));break}n.removeNode(r)}}}}function Rn(e,t){const n=3===e.tagType;return{type:10,loc:e.loc,condition:"else"===t.name?void 0:t.exp,children:n&&!ot(e,"for")?e.children:[e],userKey:rt(e,"key"),isTemplateIf:n}}function xn(e,t,n){return e.condition?Ie(e.condition,Ln(e,t,n),ge(n.helper(v),['""',"true"])):Ln(e,t,n)}function Ln(e,t,n){const{helper:s}=n,i=_e("key",Se(`${t}`,!1,de,2)),{children:o}=e,r=o[0];if(1!==o.length||1!==r.type){if(1===o.length&&11===r.type){const e=r.codegenNode;return mt(e,i,n),e}{let t=64;return fe(n,s(A),Ee([i]),o,t+"",void 0,void 0,!0,!1,!1,e.loc)}}{const e=r.codegenNode,t=St(e);return 13===t.type&&be(t,n),mt(t,i,n),e}}const Mn=fn("for",((e,t,n)=>{const{helper:s,removeHelper:i}=n;return kn(e,t,n,(t=>{const o=ge(s(H),[t.source]),r=pt(e),a=ot(e,"memo"),c=rt(e,"key"),l=c&&(6===c.type?Se(c.value.content,!0):c.exp),h=c?_e("key",l):null,p=4===t.source.type&&t.source.constType>0,d=p?64:c?128:256;return t.codegenNode=fe(n,s(A),void 0,o,d+"",void 0,void 0,!0,!p,!1,e.loc),()=>{let c;const{children:d}=t,u=1!==d.length||1!==d[0].type,f=dt(e)?e:r&&1===e.children.length&&dt(e.children[0])?e.children[0]:null;if(f?(c=f.codegenNode,r&&h&&mt(c,h,n)):u?c=fe(n,s(A),h?Ee([h]):void 0,e.children,"64",void 0,void 0,!0,void 0,!1):(c=d[0].codegenNode,r&&h&&mt(c,h,n),c.isBlock!==!p&&(c.isBlock?(i(L),i(Ce(n.inSSR,c.isComponent))):i(Ae(n.inSSR,c.isComponent))),c.isBlock=!p,c.isBlock?(s(L),s(Ce(n.inSSR,c.isComponent))):s(Ae(n.inSSR,c.isComponent))),a){const e=Ne(Dn(t.parseResult,[Se("_cached")]));e.body=Oe([Te(["const _memo = (",a.exp,")"]),Te(["if (_cached",...l?[" && _cached.key === ",l]:[],` && ${n.helperString(le)}(_cached, _memo)) return _cached`]),Te(["const _item = ",c]),Se("_item.memo = _memo"),Se("return _item")]),o.arguments.push(e,Se("_cache"),Se(String(n.cached++)))}else o.arguments.push(Ne(Dn(t.parseResult),c,!0))}}))}));function kn(e,t,n,s){if(!t.exp)return void n.onError(He(31,t.loc));const i=t.forParseResult;if(!i)return void n.onError(He(32,t.loc));Pn(i);const{scopes:o}=n,{source:r,value:a,key:c,index:l}=i,h={type:11,loc:t.loc,source:r,valueAlias:a,keyAlias:c,objectIndexAlias:l,parseResult:i,children:pt(e)?e.children:[e]};n.replaceNode(h),o.kFor++;const p=s&&s(h);return()=>{o.kFor--,p&&p()}}function Pn(e,t){e.finalized||(e.finalized=!0)}function Dn({value:e,key:t,index:n},s=[]){return function(e){let t=e.length;for(;t--&&!e[t];);return e.slice(0,t+1).map(((e,t)=>e||Se("_".repeat(t+1),!1)))}([e,t,n,...s])}const vn=Se("undefined",!1),Xn=(e,t)=>{if(1===e.type&&(1===e.tagType||3===e.tagType)){const n=ot(e,"slot");if(n)return t.scopes.kSlot++,()=>{t.scopes.kSlot--}}},wn=(e,t,n,s)=>Ne(e,n,!1,!0,n.length?n[0].loc:s);function Kn(e,t,n=wn){t.helper(oe);const{children:s,loc:i}=e,o=[],r=[];let a=t.scopes.kSlot>0||t.scopes.kFor>0;const c=ot(e,"slot",!0);if(c){const{arg:e,exp:t}=c;e&&!je(e)&&(a=!0),o.push(_e(e||Se("default",!0),n(t,void 0,s,i)))}let l=!1,h=!1;const p=[],d=new Set;let u=0;for(let E=0;E<s.length;E++){const e=s[E];let i;if(!pt(e)||!(i=ot(e,"slot",!0))){3!==e.type&&p.push(e);continue}if(c){t.onError(He(37,i.loc));break}l=!0;const{children:f,l