@shopify/cli
Version:
A CLI tool to build for the Shopify platform
15 lines • 169 kB
JavaScript
import{b as ln,g as Bt}from"./chunk-VPRTJUIN.js";function fn(e){return this[e<0?this.length+e:e]}function vn(e){if(typeof e=="string")return hr;if(Array.isArray(e))return dr;if(!e)return;let{type:t}=e;if(vr.has(t))return t}function Sn(e){let t=e===null?"null":typeof e;if(t!=="string"&&t!=="object")return`Unexpected doc '${t}',
Expected it to be 'string' or 'object'.`;if(Er(e))throw new Error("doc is valid.");let r=Object.prototype.toString.call(e);if(r!=="[object Object]")return`Unexpected doc '${r}'.`;let n=En([...vr].map(a=>`'${a}'`));return`Unexpected doc.type '${e.type}'.
Expected it to be ${n}.`}function Sr(e,t){if(typeof e=="string")return t(e);let r=new Map;return n(e);function n(i){if(r.has(i))return r.get(i);let s=a(i);return r.set(i,s),s}function a(i){switch(Er(i)){case dr:return t(i.map(n));case _t:return t({...i,parts:i.parts.map(n)});case Ct:return t({...i,breakContents:n(i.breakContents),flatContents:n(i.flatContents)});case ft:{let{expandedStates:s,contents:o}=i;return s?(s=s.map(n),o=s[0]):o=n(o),t({...i,contents:o,expandedStates:s})}case gt:case mt:case vt:case Cr:case fr:return t({...i,contents:n(i.contents)});case hr:case mr:case gr:case _r:case te:case Et:return t(i);default:throw new Tn(i)}}}function L(e,t=Bn){return Sr(e,r=>typeof r=="string"?re(t,r.split(`
`)):r)}function O(e){return W(e),{type:mt,contents:e}}function wn(e,t){return bn(e),W(t),{type:gt,contents:t,n:e}}function yn(e){return wn(Number.NEGATIVE_INFINITY,e)}function Tr(e){return kn(e),{type:_t,parts:e}}function A(e,t={}){return W(e),Ar(t.expandedStates,!0),{type:ft,id:t.id,contents:e,break:!!t.shouldBreak,expandedStates:t.expandedStates}}function Ce(e,t="",r={}){return W(e),t!==""&&W(t),{type:Ct,breakContents:e,flatContents:t,groupId:r.groupId}}function Dn(e,t){return W(e),{type:vt,contents:e,groupId:t.groupId,negate:t.negate}}function re(e,t){W(e),Ar(t);let r=[];for(let n=0;n<t.length;n++)n!==0&&r.push(e),r.push(t[n]);return r}function Fn(e,t){let{preferred:r,alternate:n}=t===!0||t==="'"?Ln:On,{length:a}=e,i=0,s=0;for(let o=0;o<a;o++){let l=e.charCodeAt(o);l===r.codePoint?i++:l===n.codePoint&&s++}return(i>s?n:r).character}function In(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function wr(e,t,r){if(e.kind==="text"||e.kind==="comment")return null;if(e.kind==="yaml"&&delete t.value,e.kind==="attribute"){let{fullName:n,value:a}=e;n==="style"||n==="class"||n==="srcset"&&(r.fullName==="img"||r.fullName==="source")||n==="allow"&&r.fullName==="iframe"||n.startsWith("on")||n.startsWith("@")||n.startsWith(":")||n.startsWith(".")||n.startsWith("#")||n.startsWith("v-")||n==="vars"&&r.fullName==="style"||(n==="setup"||n==="generic")&&r.fullName==="script"||n==="slot-scope"||n.startsWith("(")||n.startsWith("[")||n.startsWith("*")||n.startsWith("bind")||n.startsWith("i18n")||n.startsWith("on-")||n.startsWith("ng-")||a?.includes("{{")?delete t.value:a&&(t.value=b(0,a,/'|"|'/gu,'"'))}if(e.kind==="docType"&&(t.value=b(0,e.value.toLowerCase(),/\s+/gu," ")),e.kind==="angularControlFlowBlock"&&e.parameters?.children)for(let n of t.parameters.children)zn.has(e.name)?delete n.expression:n.expression=n.expression.trim();e.kind==="angularIcuExpression"&&(t.switchValue=e.switchValue.trim()),e.kind==="angularLetDeclarationInitializer"&&delete t.value,e.kind==="element"&&e.isVoid&&!e.isSelfClosing&&(t.isSelfClosing=!0)}function Te(e,t=!0){return[O([k,e]),t?k:""]}function ne(e,t){let r=e.type==="NGRoot"?e.node.type==="NGMicrosyntax"&&e.node.body.length===1&&e.node.body[0].type==="NGMicrosyntaxExpression"?e.node.body[0].expression:e.node:e.type==="JsExpressionRoot"?e.node:e;return r&&(r.type==="ObjectExpression"||r.type==="ArrayExpression"||(t.parser==="__vue_expression"||t.parser==="__vue_ts_expression"||t.parser==="__ng_binding"||t.parser==="__ng_directive")&&(r.type==="TemplateLiteral"||r.type==="StringLiteral"))}async function N(e,t,r,n){r={__isInHtmlAttribute:!0,__embeddedInHtml:!0,...r};let a=!0;n&&(r.__onHtmlBindingRoot=(s,o)=>{a=n(s,o)});let i=await t(e,r,t);return a?A(i):Te(i)}function jn(e,t,r,n){let{node:a}=r,i=n.originalText.slice(a.sourceSpan.start.offset,a.sourceSpan.end.offset);return/^\s*$/u.test(i)?"":N(i,e,{parser:"__ng_directive",__isInHtmlAttribute:!1},ne)}function Jn(){let e=globalThis,t=e.Deno?.build?.os;return typeof t=="string"?t==="windows":e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}function yr(e){if(e=e instanceof URL?e:new URL(e),e.protocol!=="file:")throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function Zn(e){return e=yr(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function ea(e){e=yr(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return e.hostname!==""&&(t=`\\\\${e.hostname}${t}`),t}function ta(e){return Qn?ea(e):Zn(e)}function aa(e){return Array.isArray(e)&&e.length>0}function Ot(e,t){if(!t)return;let r=ra(t).toLowerCase();return e.find(({filenames:n})=>n?.some(a=>a.toLowerCase()===r))??e.find(({extensions:n})=>n?.some(a=>r.endsWith(a)))}function ia(e,t){if(t)return e.find(({name:r})=>r.toLowerCase()===t)??e.find(({aliases:r})=>r?.includes(t))??e.find(({extensions:r})=>r?.includes(`.${t}`))}function Ft(e,t){if(t){if(na(t))try{t=ta(t)}catch{return}if(typeof t=="string")return e.find(({isSupported:r})=>r?.({filepath:t}))}}function oa(e,t){let r=Yn(0,e.plugins).flatMap(n=>n.languages??[]);return(ia(r,t.language)??Ot(r,t.physicalFile)??Ot(r,t.file)??Ft(r,t.physicalFile)??Ft(r,t.file)??sa?.(r,t.physicalFile))?.parsers[0]}function ua(e){return!!e?.[Dr]}function la(e){let t=e.slice(0,oe);if(t!=="---"&&t!=="+++")return;let r=e.indexOf(`
`,oe);if(r===-1)return;let n=e.slice(oe,r).trim(),a=e.indexOf(`
${t}`,r),i=n;if(i||(i=t==="+++"?"toml":"yaml"),a===-1&&t==="---"&&i==="yaml"&&(a=e.indexOf(`
...`,r)),a===-1)return;let s=a+1+oe,o=e.charAt(s+1);if(!/\s?/u.test(o))return;let l=e.slice(0,s),c;return{language:i,explicitLanguage:n||null,value:e.slice(r+1,a),startDelimiter:t,endDelimiter:l.slice(-oe),raw:l,start:{line:1,column:0,index:0},end:{index:l.length,get line(){return c??(c=l.split(`
`)),c.length},get column(){return c??(c=l.split(`
`)),ee(0,c,-1).length}},[Dr]:!0}}function ca(e){let t=la(e);return t?{frontMatter:t,get content(){let{raw:r}=t;return b(0,r,/[^\n]/gu," ")+e.slice(r.length)}}:{content:e}}function ma(e){return e.kind==="element"&&!e.hasExplicitNamespace&&!["html","svg"].includes(e.namespace)}function Nr(e,t){return!!(e.kind==="ieConditionalComment"&&e.lastChild&&!e.lastChild.isSelfClosing&&!e.lastChild.endSourceSpan||e.kind==="ieConditionalComment"&&!e.complete||Z(e)&&e.children.some(r=>r.kind!=="text"&&r.kind!=="interpolation")||kt(e,t)&&!I(e,t)&&e.kind!=="interpolation")}function Ue(e){return e.kind==="attribute"||!e.parent||!e.prev?!1:_a(e.prev)}function _a(e){return e.kind==="comment"&&e.value.trim()==="prettier-ignore"}function D(e){return e.kind==="text"||e.kind==="comment"}function I(e,t){return e.kind==="element"&&(e.fullName==="script"||e.fullName==="style"||e.fullName==="svg:style"||e.fullName==="svg:script"||e.fullName==="mj-style"&&t.parser==="mjml"||ke(e)&&(e.name==="script"||e.name==="style"))}function Ca(e,t){return e.children&&!I(e,t)}function va(e,t){return I(e,t)||e.kind==="interpolation"||Br(e)}function Br(e){return Mr(e).startsWith("pre")}function Ea(e,t){let r=n();if(r&&!e.prev&&e.parent?.tagDefinition?.ignoreFirstLf)return e.kind==="interpolation";return r;function n(){return Ve(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.prev&&(e.prev.kind==="text"||e.prev.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Z(e.parent)?!0:!(!e.prev&&(e.parent.kind==="root"||Z(e)&&e.parent||I(e.parent,t)||We(e.parent,t)||!xa(e.parent.cssDisplay))||e.prev&&!La(e.prev.cssDisplay))}}function Sa(e,t){return Ve(e)||e.kind==="angularControlFlowBlock"?!1:(e.kind==="text"||e.kind==="interpolation")&&e.next&&(e.next.kind==="text"||e.next.kind==="interpolation")?!0:!e.parent||e.parent.cssDisplay==="none"?!1:Z(e.parent)?!0:!(!e.next&&(e.parent.kind==="root"||Z(e)&&e.parent||I(e.parent,t)||We(e.parent,t)||!Na(e.parent.cssDisplay))||e.next&&!Ba(e.next.cssDisplay))}function Aa(e,t){return Oa(e.cssDisplay)&&!I(e,t)}function Le(e){return Ve(e)||e.next&&e.sourceSpan.end&&e.sourceSpan.end.line+1<e.next.sourceSpan.start.line}function Ta(e){return Lr(e)||e.kind==="element"&&e.children.length>0&&(["body","script","style"].includes(e.name)||e.children.some(t=>ba(t)))||e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.kind!=="text"&&Fr(e.firstChild)&&(!e.lastChild.isTrailingSpaceSensitive||Pr(e.lastChild))}function Lr(e){return e.kind==="element"&&e.children.length>0&&(["html","head","ul","ol","select"].includes(e.name)||e.cssDisplay.startsWith("table")&&e.cssDisplay!=="table-cell")}function Ye(e){return Ir(e)||e.prev&&ka(e.prev)||Or(e)}function ka(e){return Ir(e)||e.kind==="element"&&e.fullName==="br"||Or(e)}function Or(e){return Fr(e)&&Pr(e)}function Fr(e){return e.hasLeadingSpaces&&(e.prev?e.prev.sourceSpan.end.line<e.sourceSpan.start.line:e.parent.kind==="root"||e.parent.startSourceSpan.end.line<e.sourceSpan.start.line)}function Pr(e){return e.hasTrailingSpaces&&(e.next?e.next.sourceSpan.start.line>e.sourceSpan.end.line:e.parent.kind==="root"||e.parent.endSourceSpan&&e.parent.endSourceSpan.start.line>e.sourceSpan.end.line)}function Ir(e){switch(e.kind){case"ieConditionalComment":case"comment":case"directive":return!0;case"element":return["script","select"].includes(e.name)}return!1}function Tt(e){return e.lastChild?Tt(e.lastChild):e}function ba(e){return e.children?.some(t=>t.kind!=="text")}function Rr(e){if(e)switch(e){case"module":case"text/javascript":case"text/babel":case"text/jsx":case"application/javascript":return"babel";case"application/x-typescript":return"typescript";case"text/markdown":return"markdown";case"text/html":return"html";case"text/x-handlebars-template":return"glimmer";default:if(e.endsWith("json")||e.endsWith("importmap")||e==="speculationrules")return"json"}}function wa(e,t){let{name:r,attrMap:n}=e;if(r!=="script"||Object.prototype.hasOwnProperty.call(n,"src"))return;let{type:a,lang:i}=e.attrMap;return!i&&!a?"babel":At(t,{language:i})??Rr(a)}function ya(e,t){if(!kt(e,t))return;let{attrMap:r}=e;if(Object.prototype.hasOwnProperty.call(r,"src"))return;let{type:n,lang:a}=r;return At(t,{language:a})??Rr(n)}function Da(e,t){if(e.name==="style"){let{lang:r}=e.attrMap;return r?At(t,{language:r}):"css"}if(e.name==="mj-style"&&t.parser==="mjml")return"css"}function Rt(e,t){return wa(e,t)??Da(e,t)??ya(e,t)}function be(e){return e==="block"||e==="list-item"||e.startsWith("table")}function xa(e){return!be(e)&&e!=="inline-block"}function Na(e){return!be(e)&&e!=="inline-block"}function Ba(e){return!be(e)}function La(e){return!be(e)}function Oa(e){return!be(e)&&e!=="inline-block"}function Z(e){return Mr(e).startsWith("pre")}function Fa(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.parent}return!1}function Pa(e,t){if(ae(e,t))return"block";if(e.prev?.kind==="comment"){let n=e.prev.value.match(/^\s*display:\s*([a-z]+)\s*$/u);if(n)return n[1]}let r=!1;if(e.kind==="element"&&e.namespace==="svg")if(Fa(e,n=>n.fullName==="svg:foreignObject"))r=!0;else return e.name==="svg"?"inline-block":"block";switch(t.htmlWhitespaceSensitivity){case"strict":return"inline";case"ignore":return"block";default:if(e.kind==="element"&&(!e.namespace||r||ke(e))&&Object.prototype.hasOwnProperty.call(Pt,e.name))return Pt[e.name]}return ha}function Mr(e){return e.kind==="element"&&(!e.namespace||ke(e))&&Object.prototype.hasOwnProperty.call(It,e.name)?It[e.name]:da}function qr(e){return b(0,b(0,e,"'","'"),""",'"')}function w(e){return qr(e.value)}function We(e,t){return ae(e,t)&&!Ia.has(e.fullName)}function ae(e,t){return t.parser==="vue"&&e.kind==="element"&&e.parent.kind==="root"&&e.fullName.toLowerCase()!=="html"}function kt(e,t){return ae(e,t)&&(We(e,t)||e.attrMap.lang&&e.attrMap.lang!=="html")}function Ra(e){let t=e.fullName;return t.charAt(0)==="#"||t==="slot-scope"||t==="v-slot"||t.startsWith("v-slot:")}function Ma(e,t){let r=e.parent;if(!ae(r,t))return!1;let n=r.fullName,a=e.fullName;return n==="script"&&a==="setup"||n==="style"&&a==="vars"}function Hr(e,t=e.value){return e.parent.isWhitespaceSensitive?e.parent.isIndentationSensitive?L(t):L(x.dedentString(xr(t)),E):re(S,x.split(t))}function Vr(e,t){return ae(e,t)&&e.name==="script"}function qa(e){let{valueSpan:t,value:r}=e;return t.end.offset-t.start.offset===r.length+2}function Ur(e,t){if(qa(e))return!1;let{value:r}=e;return/^PRETTIER_HTML_PLACEHOLDER_\d+_\d+_IN_JS$/u.test(r)||t.parser==="lwc"&&r.startsWith("{")&&r.endsWith("}")}async function Va(e,t,r){let n=w(r.node),a=[];for(let[i,s]of n.split(Wr).entries())if(i%2===0)a.push(L(s));else try{a.push(A(["{{",O([S,await N(s,e,{parser:"__ng_interpolation",__isInHtmlInterpolation:!0})]),S,"}}"]))}catch{a.push("{{",L(s),"}}")}return a}function Wa(e,t,{node:r}){let n=w(r);return Te(Tr(Hr(r,n.trim())),!n.includes("@@"))}function Ja(e){let t=[];for(let r of e.split(";")){if(r=x.trim(r),!r)continue;let[n,...a]=x.split(r);t.push({name:n,value:a})}return t}function ei(e,t,r){let{node:n}=r,a=Qa(w(n));return a.length===0?[""]:Te(a.map(({name:i,value:s},o)=>[[i,...s].join(" "),o===a.length-1?Ce(";"):[";",S]]))}function Mt(e){return e===" "||e===`
`||e==="\f"||e==="\r"||e===" "}function si(e){let t=e.length,r,n,a,i,s,o=0,l;function c(h){let f,v=h.exec(e.substring(o));if(v)return[f]=v,o+=f.length,f}let p=[];for(;;){if(c(ri),o>=t){if(p.length===0)throw new Error("Must contain one or more image candidate strings.");return p}l=o,r=c(ni),n=[],r.slice(-1)===","?(r=r.replace(ai,""),g()):C()}function C(){for(c(ti),a="",i="in descriptor";;){if(s=e.charAt(o),i==="in descriptor")if(Mt(s))a&&(n.push(a),a="",i="after descriptor");else if(s===","){o+=1,a&&n.push(a),g();return}else if(s==="(")a+=s,i="in parens";else if(s===""){a&&n.push(a),g();return}else a+=s;else if(i==="in parens")if(s===")")a+=s,i="in descriptor";else if(s===""){n.push(a),g();return}else a+=s;else if(i==="after descriptor"&&!Mt(s))if(s===""){g();return}else i="in descriptor",o-=1;o+=1}}function g(){let h=!1,f,v,B,F,q={},R,Ne,G,se,Ke;for(F=0;F<n.length;F++)R=n[F],Ne=R[R.length-1],G=R.substring(0,R.length-1),se=parseInt(G,10),Ke=parseFloat(G),qt.test(G)&&Ne==="w"?((f||v)&&(h=!0),se===0?h=!0:f=se):ii.test(G)&&Ne==="x"?((f||v||B)&&(h=!0),Ke<0?h=!0:v=Ke):qt.test(G)&&Ne==="h"?((B||v)&&(h=!0),se===0?h=!0:B=se):h=!0;if(!h)q.source={value:r,startOffset:l},f&&(q.width={value:f}),v&&(q.density={value:v}),B&&(q.height={value:B}),p.push(q);else throw new Error(`Invalid srcset descriptor found in "${e}" at "${R}".`)}}function ci(e,t,r){let n=w(r.node),a=oi(n),i=li.filter(h=>a.some(f=>Object.prototype.hasOwnProperty.call(f,h)));if(i.length>1)throw new Error("Mixed descriptor in srcset is not supported");let[s]=i,o=zr[s],l=a.map(h=>h.source.value),c=Math.max(...l.map(h=>h.length)),p=a.map(h=>h[s]?String(h[s].value):""),C=p.map(h=>{let f=h.indexOf(".");return f===-1?h.length:f}),g=Math.max(...C);return Te(re([",",S],l.map((h,f)=>{let v=[h],B=p[f];if(B){let F=c-h.length+1,q=g-C[f],R=" ".repeat(F+q);v.push(Ce(R," "),B+o)}return v})))}function di(e,t){let{root:r}=e;return Qe.has(r)||Qe.set(r,r.children.some(n=>Vr(n,t)&&["ts","typescript"].includes(n.attrMap.lang))),Qe.get(r)}function mi(e,t,r){let n=w(r.node);return N(`type T<${n}> = any`,e,{parser:"babel-ts",__isEmbeddedTypescriptGenericParameters:!0},ne)}function gi(e,t,r,n){let a=w(r.node),i=ie(r,n)?"babel-ts":"babel";return N(`function _(${a}) {}`,e,{parser:i,__isVueBindings:!0})}async function fi(e,t,r,n){let a=w(r.node),{left:i,operator:s,right:o}=_i(a),l=ie(r,n);return[A(await N(`function _(${i}) {}`,e,{parser:l?"babel-ts":"babel",__isVueForBindingLeft:!0}))," ",s," ",await N(o,e,{parser:l?"__ts_expression":"__js_expression"})]}function _i(e){let t=/(.*?)\s+(in|of)\s+(.*)/su,r=/,([^,\]}]*)(?:,([^,\]}]*))?$/u,n=/^\(|\)$/gu,a=e.match(t);if(!a)return;let i={for:a[3].trim()};if(!i.for)return;let s=b(0,a[1].trim(),n,""),o=s.match(r);o?(i.alias=s.replace(r,""),i.iterator1=o[1].trim(),o[2]&&(i.iterator2=o[2].trim())):i.alias=s;let l=[i.alias,i.iterator1,i.iterator2];if(!l.some((c,p)=>!c&&(p===0||l.slice(p+1).some(Boolean))))return{left:l.filter(Boolean).join(","),operator:a[2],right:i.for}}async function vi(e,t,r,n){try{return await $r(e,t,r,n)}catch(s){if(s.cause?.code!=="BABEL_PARSER_SYNTAX_ERROR")throw s}let a=w(r.node),i=ie(r,n)?"__vue_ts_event_binding":"__vue_event_binding";return N(a,e,{parser:i},ne)}function Ei(e,t,r,n){let a=w(r.node),i=ie(r,n)?"__vue_ts_expression":"__vue_expression";return N(a,e,{parser:i},ne)}function $r(e,t,r,n){let a=w(r.node),i=ie(r,n)?"__ts_expression":"__js_expression";return N(a,e,{parser:i},ne)}function Ti(e,t){let{node:r}=e,{value:n}=r;if(n)return Ur(r,t)?[r.rawName,"=",n]:Ai.find(({test:a})=>a(e,t))?.print}function ki(e){return async(t,r,n,a)=>{let i=await e(t,r,n,a);if(i)return i=Sr(i,s=>typeof s=="string"?b(0,s,'"',"""):s),[n.node.rawName,'="',A(i),'"']}}function rt(e,t){return[e.isSelfClosing?"":wi(e,t),me(e,t)]}function wi(e,t){return e.lastChild&&ve(e.lastChild)?"":[yi(e,t),bt(e,t)]}function me(e,t){return(e.next?$(e.next):De(e.parent))?"":[ye(e,t),z(e,t)]}function yi(e,t){return De(e)?ye(e.lastChild,t):""}function z(e,t){return ve(e)?bt(e.parent,t):$e(e)?wt(e.next,t):""}function bt(e,t){if(jr(e,t))return"";switch(e.kind){case"ieConditionalComment":return"<!";case"element":if(e.hasHtmComponentClosingTag)return"<//";default:return`</${e.rawName}`}}function ye(e,t){if(jr(e,t))return"";switch(e.kind){case"ieConditionalComment":case"ieConditionalEndComment":return"[endif]-->";case"ieConditionalStartComment":return"]><!-->";case"interpolation":return"}}";case"angularIcuExpression":return"}";case"element":if(e.isSelfClosing)return"/>";default:return">"}}function jr(e,t){return!e.isSelfClosing&&!e.endSourceSpan&&(Ue(e)||Nr(e.parent,t))}function $(e){return e.prev&&e.prev.kind!=="docType"&&e.kind!=="angularControlFlowBlock"&&!D(e.prev)&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function De(e){return e.lastChild?.isTrailingSpaceSensitive&&!e.lastChild.hasTrailingSpaces&&!D(Tt(e.lastChild))&&!Z(e)}function ve(e){return!e.next&&!e.hasTrailingSpaces&&e.isTrailingSpaceSensitive&&D(Tt(e))}function $e(e){return e.next&&!D(e.next)&&D(e)&&e.isTrailingSpaceSensitive&&!e.hasTrailingSpaces}function Di(e){let t=e.trim().match(/^prettier-ignore-attribute(?:\s+(.+))?$/su);return t?t[1]?t[1].split(/\s+/u):!0:!1}function je(e){return!e.prev&&e.isLeadingSpaceSensitive&&!e.hasLeadingSpaces}function xi(e,t,r){let{node:n}=e;if(!St(n.attrs))return n.isSelfClosing?" ":"";let a=n.prev?.kind==="comment"&&Di(n.prev.value),i=typeof a=="boolean"?()=>a:Array.isArray(a)?p=>a.includes(p.rawName):()=>!1,s=e.map(({node:p})=>i(p)?L(t.originalText.slice(we(p),ze(p))):r(),"attrs"),o=n.kind==="element"&&n.fullName==="script"&&n.attrs.length===1&&n.attrs[0].fullName==="src"&&n.children.length===0,l=t.singleAttributePerLine&&n.attrs.length>1&&!ae(n,t)?E:S,c=[O([o?" ":S,re(l,s)])];return n.firstChild&&je(n.firstChild)||n.isSelfClosing&&De(n.parent)||o?c.push(n.isSelfClosing?" ":""):c.push(t.bracketSameLine?n.isSelfClosing?" ":"":n.isSelfClosing?S:k),c}function Ni(e){return e.firstChild&&je(e.firstChild)?"":yt(e)}function nt(e,t,r){let{node:n}=e;return[ge(n,t),xi(e,t,r),n.isSelfClosing?"":Ni(n)]}function ge(e,t){return e.prev&&$e(e.prev)?"":[j(e,t),wt(e,t)]}function j(e,t){return je(e)?yt(e.parent):$(e)?ye(e.prev,t):""}function wt(e,t){switch(e.kind){case"ieConditionalComment":case"ieConditionalStartComment":return`<!--[if ${e.condition}`;case"ieConditionalEndComment":return"<!--<!";case"interpolation":return"{{";case"docType":{if(e.value==="html"){let{filepath:n}=t;if(n&&/\.html?$/u.test(n))return Ht}let r=we(e);return t.originalText.slice(r,r+Ht.length)}case"angularIcuExpression":return"{";case"element":if(e.condition)return`<!--[if ${e.condition}]><!--><${e.rawName}`;default:return`<${e.rawName}`}}function yt(e){switch(e.kind){case"ieConditionalComment":return"]>";case"element":if(e.condition)return"><!--<![endif]-->";default:return">"}}function Bi(e,t){if(!e.endSourceSpan)return"";let r=e.startSourceSpan.end.offset;e.firstChild&&je(e.firstChild)&&(r-=yt(e).length);let n=e.endSourceSpan.start.offset;return e.lastChild&&ve(e.lastChild)?n+=bt(e,t).length:De(e)&&(n-=ye(e.lastChild,t).length),t.originalText.slice(r,n)}function Oi(e,t){let{node:r}=e;switch(r.kind){case"element":if(I(r,t)||r.kind==="interpolation")return;if(!r.isSelfClosing&&kt(r,t)){let n=Rt(r,t);return n?async(a,i)=>{let s=Xr(r,t),o=/^\s*$/u.test(s),l="";return o||(l=await a(xr(s),{parser:n,__embeddedInHtml:!0}),o=l===""),[j(r,t),A(nt(e,t,i)),o?"":E,l,o?"":E,rt(r,t),z(r,t)]}:void 0}break;case"text":if(I(r.parent,t)){let n=Rt(r.parent,t);if(n)return async a=>{let i=n==="markdown"?x.dedentString(r.value.replace(/^[^\S\n]*\n/u,"")):r.value,s={parser:n,__embeddedInHtml:!0};if(t.parser==="html"&&n==="babel"){let o="script",{attrMap:l}=r.parent;l&&(l.type==="module"||(l.type==="text/babel"||l.type==="text/jsx")&&l["data-type"]==="module")&&(o="module"),s.__babelSourceType=o}return[Ae,j(r,t),await a(i,s),z(r,t)]}}else if(r.parent.kind==="interpolation")return async n=>{let a={__isInHtmlInterpolation:!0,__embeddedInHtml:!0};return t.parser==="angular"?a.parser="__ng_interpolation":t.parser==="vue"?a.parser=ie(e,t)?"__vue_ts_expression":"__vue_expression":a.parser="__js_expression",[O([S,await n(r.value,a)]),r.parent.next&&$(r.parent.next)?" ":S]};break;case"attribute":return bi(e,t);case"angularControlFlowBlockParameters":return Li.has(e.parent.name)?Xn:void 0;case"angularLetDeclarationInitializer":return n=>N(r.value,n,{parser:"__ng_binding",__isInHtmlAttribute:!1})}}function fe(e){if(ue!==null&&typeof ue.property){let t=ue;return ue=fe.prototype=null,t}return ue=fe.prototype=e??Object.create(null),new fe}function Ii(e){return fe(e)}function Ri(e,t="type"){Ii(e);function r(n){let a=n[t],i=e[a];if(!Array.isArray(i))throw Object.assign(new Error(`Missing visitor keys for '${a}'.`),{node:n});return i}return r}function Gr(e){let t=ze(e);return e.kind==="element"&&!e.endSourceSpan&&St(e.children)?Math.max(t,Gr(ee(0,e.children,-1))):t}function le(e,t,r){let n=e.node;if(Ue(n)){let a=Gr(n);return[j(n,t),L(x.trimEnd(t.originalText.slice(we(n)+(n.prev&&$e(n.prev)?wt(n).length:0),a-(n.next&&$(n.next)?ye(n,t).length:0)))),z(n,t)]}return r()}function Oe(e,t){return D(e)&&D(t)?e.isTrailingSpaceSensitive?e.hasTrailingSpaces?Ye(t)?E:S:"":Ye(t)?E:k:$e(e)&&(Ue(t)||t.firstChild||t.isSelfClosing||t.kind==="element"&&t.attrs.length>0)||e.kind==="element"&&e.isSelfClosing&&$(t)?"":!t.isLeadingSpaceSensitive||Ye(t)||$(t)&&e.lastChild&&ve(e.lastChild)&&e.lastChild.lastChild&&ve(e.lastChild.lastChild)?E:t.hasLeadingSpaces?S:k}function Dt(e,t,r){let{node:n}=e;if(Lr(n))return[Ae,...e.map(()=>{let i=e.node,s=i.prev?Oe(i.prev,i):"";return[s?[s,Le(i.prev)?E:""]:"",le(e,t,r)]},"children")];let a=n.children.map(()=>Symbol(""));return e.map(({node:i,index:s})=>{if(D(i)){if(i.prev&&D(i.prev)){let h=Oe(i.prev,i);if(h)return Le(i.prev)?[E,E,le(e,t,r)]:[h,le(e,t,r)]}return le(e,t,r)}let o=[],l=[],c=[],p=[],C=i.prev?Oe(i.prev,i):"",g=i.next?Oe(i,i.next):"";return C&&(Le(i.prev)?o.push(E,E):C===E?o.push(E):D(i.prev)?l.push(C):l.push(Ce("",k,{groupId:a[s-1]}))),g&&(Le(i)?D(i.next)&&p.push(E,E):g===E?D(i.next)&&p.push(E):c.push(g)),[...o,A([...l,A([le(e,t,r),...c],{id:a[s]})]),...p]},"children")}function Ki(e,t,r){let{node:n}=e,a=[];if(Qi(e)&&a.push("} "),a.push("@",n.name),n.parameters&&a.push(" (",A(r("parameters")),")"),!Ji(n)){a.push(" {");let i=Kr(n);n.children.length>0?(n.firstChild.hasLeadingSpaces=!0,n.lastChild.hasTrailingSpaces=!0,a.push(O([E,Dt(e,t,r)])),i&&a.push(E,"}")):i&&a.push("}")}return A(a,{shouldBreak:!0})}function Kr(e){return!(e.next?.kind==="angularControlFlowBlock"&&Gi.get(e.name)?.has(e.next.name))}function Ji(e){return Yi(e)&&e.endSourceSpan&&e.endSourceSpan.start.offset===e.endSourceSpan.end.offset}function Qi(e){let{previous:t}=e;return t?.kind==="angularControlFlowBlock"&&!Ue(t)&&!Kr(t)}function Zi(e,t,r){return[O([k,re([";",S],e.map(r,"children"))]),k]}function es(e,t,r){let{node:n}=e;return[ge(n,t),A([n.switchValue.trim(),", ",n.type,n.cases.length>0?[",",O([S,re(S,e.map(r,"cases"))])]:"",k]),me(n,t)]}function ts(e,t,r){let{node:n}=e;return[n.value," {",A([O([k,e.map(({node:a,isLast:i})=>{let s=[r()];return a.kind==="text"&&(a.hasLeadingSpaces&&s.unshift(S),a.hasTrailingSpaces&&!i&&s.push(S)),s},"expression")]),k]),"}"]}function rs(e,t,r){let{node:n}=e;if(Nr(n,t))return[j(n,t),A(nt(e,t,r)),L(Xr(n,t)),...rt(n,t),z(n,t)];let a=n.children.length===1&&(n.firstChild.kind==="interpolation"||n.firstChild.kind==="angularIcuExpression")&&n.firstChild.isLeadingSpaceSensitive&&!n.firstChild.hasLeadingSpaces&&n.lastChild.isTrailingSpaceSensitive&&!n.lastChild.hasTrailingSpaces,i=Symbol("element-attr-group-id"),s=p=>A([A(nt(e,t,r),{id:i}),p,rt(n,t)]),o=p=>a?Dn(p,{groupId:i}):(I(n,t)||We(n,t))&&n.parent.kind==="root"&&t.parser==="vue"&&!t.vueIndentScriptAndStyle?p:O(p),l=()=>a?Ce(k,"",{groupId:i}):n.firstChild.hasLeadingSpaces&&n.firstChild.isLeadingSpaceSensitive?S:n.firstChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive?yn(k):k,c=()=>(n.next?$(n.next):De(n.parent))?n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?" ":"":a?Ce(k,"",{groupId:i}):n.lastChild.hasTrailingSpaces&&n.lastChild.isTrailingSpaceSensitive?S:(n.lastChild.kind==="comment"||n.lastChild.kind==="text"&&n.isWhitespaceSensitive&&n.isIndentationSensitive)&&new RegExp(`\\n[\\t ]{${t.tabWidth*(e.ancestors.length-1)}}$`,"u").test(n.lastChild.value)?"":k;return n.children.length===0?s(n.hasDanglingSpaces&&n.isDanglingSpaceSensitive?S:""):s([Ta(n)?Ae:"",o([l(),Dt(e,t,r)]),c()])}function Xe(e,t=!0){if(e[0]!=":")return[null,e];let r=e.indexOf(":",1);if(r===-1){if(t)throw new Error(`Unsupported format "${e}" expecting ":namespace:name"`);return[null,e]}return[e.slice(1,r),e.slice(r+1)]}function Vt(e){return Xe(e)[1]==="ng-container"}function Ut(e){return Xe(e)[1]==="ng-content"}function Ie(e){return e===null?null:Xe(e)[0]}function _e(e,t){return e?`:${e}:${t}`:t}function as(e){return e.replace(ns,(...t)=>t[1].toUpperCase())}function $t(){return Re||(Re={},ce(Y.HTML,["iframe|srcdoc","*|innerHTML","*|outerHTML"]),ce(Y.STYLE,["*|style"]),ce(Y.URL,["*|formAction","area|href","a|href","a|xlink:href","form|action","annotation|href","annotation|xlink:href","annotation-xml|href","annotation-xml|xlink:href","maction|href","maction|xlink:href","malignmark|href","malignmark|xlink:href","math|href","math|xlink:href","mroot|href","mroot|xlink:href","msqrt|href","msqrt|xlink:href","merror|href","merror|xlink:href","mfrac|href","mfrac|xlink:href","mglyph|href","mglyph|xlink:href","msub|href","msub|xlink:href","msup|href","msup|xlink:href","msubsup|href","msubsup|xlink:href","mmultiscripts|href","mmultiscripts|xlink:href","mprescripts|href","mprescripts|xlink:href","mi|href","mi|xlink:href","mn|href","mn|xlink:href","mo|href","mo|xlink:href","mpadded|href","mpadded|xlink:href","mphantom|href","mphantom|xlink:href","mrow|href","mrow|xlink:href","ms|href","ms|xlink:href","mspace|href","mspace|xlink:href","mstyle|href","mstyle|xlink:href","mtable|href","mtable|xlink:href","mtd|href","mtd|xlink:href","mtr|href","mtr|xlink:href","mtext|href","mtext|xlink:href","mover|href","mover|xlink:href","munder|href","munder|xlink:href","munderover|href","munderover|xlink:href","semantics|href","semantics|xlink:href","none|href","none|xlink:href","img|src","video|src"]),ce(Y.RESOURCE_URL,["base|href","embed|src","frame|src","iframe|src","link|href","object|codebase","object|data","script|src","script|href","script|xlink:href"]),ce(Y.ATTRIBUTE_NO_BINDING,["animate|attributeName","set|attributeName","animateMotion|attributeName","animateTransform|attributeName","unknown|attributeName","iframe|sandbox","iframe|allow","iframe|allowFullscreen","iframe|referrerPolicy","iframe|csp","iframe|fetchPriority","unknown|sandbox","unknown|allow","unknown|allowFullscreen","unknown|referrerPolicy","unknown|csp","unknown|fetchPriority"])),Re}function ce(e,t){for(let r of t)Re[r.toLowerCase()]=e}function ds(e){switch(e){case"width":case"height":case"minWidth":case"minHeight":case"maxWidth":case"maxHeight":case"left":case"top":case"bottom":case"right":case"fontSize":case"outlineWidth":case"outlineOffset":case"paddingTop":case"paddingLeft":case"paddingBottom":case"paddingRight":case"marginTop":case"marginLeft":case"marginBottom":case"marginRight":case"borderRadius":case"borderWidth":case"borderTopWidth":case"borderLeftWidth":case"borderRightWidth":case"borderBottomWidth":case"textIndent":return!0;default:return!1}}function at(e){return pe||(jt=new m({canSelfClose:!0}),pe=Object.assign(Object.create(null),{base:new m({isVoid:!0}),meta:new m({isVoid:!0}),area:new m({isVoid:!0}),embed:new m({isVoid:!0}),link:new m({isVoid:!0}),img:new m({isVoid:!0}),input:new m({isVoid:!0}),param:new m({isVoid:!0}),hr:new m({isVoid:!0}),br:new m({isVoid:!0}),source:new m({isVoid:!0}),track:new m({isVoid:!0}),wbr:new m({isVoid:!0}),p:new m({closedByChildren:["address","article","aside","blockquote","div","dl","fieldset","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","main","nav","ol","p","pre","section","table","ul"],closedByParent:!0}),thead:new m({closedByChildren:["tbody","tfoot"]}),tbody:new m({closedByChildren:["tbody","tfoot"],closedByParent:!0}),tfoot:new m({closedByChildren:["tbody"],closedByParent:!0}),tr:new m({closedByChildren:["tr"],closedByParent:!0}),td:new m({closedByChildren:["td","th"],closedByParent:!0}),th:new m({closedByChildren:["td","th"],closedByParent:!0}),col:new m({isVoid:!0}),svg:new m({implicitNamespacePrefix:"svg"}),foreignObject:new m({implicitNamespacePrefix:"svg",preventNamespaceInheritance:!0}),math:new m({implicitNamespacePrefix:"math"}),li:new m({closedByChildren:["li"],closedByParent:!0}),dt:new m({closedByChildren:["dt","dd"]}),dd:new m({closedByChildren:["dt","dd"],closedByParent:!0}),rb:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rt:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),rtc:new m({closedByChildren:["rb","rtc","rp"],closedByParent:!0}),rp:new m({closedByChildren:["rb","rt","rtc","rp"],closedByParent:!0}),optgroup:new m({closedByChildren:["optgroup"],closedByParent:!0}),option:new m({closedByChildren:["option","optgroup"],closedByParent:!0}),pre:new m({ignoreFirstLf:!0}),listing:new m({ignoreFirstLf:!0}),style:new m({contentType:P.RAW_TEXT}),script:new m({contentType:P.RAW_TEXT}),title:new m({contentType:{default:P.ESCAPABLE_RAW_TEXT,svg:P.PARSABLE_DATA}}),textarea:new m({contentType:P.ESCAPABLE_RAW_TEXT,ignoreFirstLf:!0})}),new hs().allKnownElementNames().forEach(t=>{!pe[t]&&Ie(t)===null&&(pe[t]=new m({canSelfClose:!1}))})),pe[e]??jt}function Me(e){return e>=9&&e<=32||e==160}function Ge(e){return 48<=e&&e<=57}function Ee(e){return e>=97&&e<=122||e>=65&&e<=90}function ms(e){return e>=97&&e<=102||e>=65&&e<=70||Ge(e)}function qe(e){return e===10||e===13}function Xt(e){return 48<=e&&e<=55}function Ze(e){return e===39||e===34||e===96}function Zr(e,t,r=null){let n=[],a=e.visit?i=>e.visit(i,r)||i.visit(e,r):i=>i.visit(e,r);return t.forEach(i=>{let s=a(i);s&&n.push(s)}),n}function ws(e,t,r,n={}){let a=new Ns(new Qr(e,t),r,n);return a.tokenize(),new bs(Rs(a.tokens),a.errors,a.nonNormalizedIcuExpressions)}function V(e){return`Unexpected character "${e===0?"EOF":String.fromCharCode(e)}"`}function Jt(e){return`Unknown entity "${e}" - use the "&#<decimal>;" or "&#x<hex>;" syntax`}function Ds(e,t){return`Unable to parse entity "${t}" - ${e} character reference entities must end with ";"`}function _(e){return!Me(e)||e===0}function U(e){return Me(e)||e===62||e===60||e===47||e===39||e===34||e===61||e===0}function Bs(e){return(e<97||122<e)&&(e<65||90<e)&&(e<48||e>57)}function Ls(e){return e===59||e===0||!ms(e)}function Os(e){return e===59||e===0||!Ee(e)}function Fs(e){return e!==125}function Ps(e,t){return Qt(e)===Qt(t)}function Qt(e){return e>=97&&e<=122?e-97+65:e}function Is(e){return Ee(e)||Ge(e)||e===95}function Zt(e){return e!==59&&_(e)}function Fe(e){return e===95||e>=65&&e<=90}function er(e){return Ee(e)||Ge(e)||e===95}function tr(e){return e===47||e===62||e===60||e===0}function Rs(e){let t=[],r;for(let n=0;n<e.length;n++){let a=e[n];r&&r.type===u.TEXT&&a.type===u.TEXT||r&&r.type===u.ATTR_VALUE_TEXT&&a.type===u.ATTR_VALUE_TEXT?(r.parts[0]+=a.parts[0],r.sourceSpan.end=a.sourceSpan.end):(r=a,t.push(r))}return t}function rr(e,t){return e.length>0&&e[e.length-1]===t}function nr(e,t){return Se[t]!==void 0?Se[t]||e:/^#x[a-f0-9]+$/i.test(t)?String.fromCodePoint(parseInt(t.slice(2),16)):/^#\d+$/.test(t)?String.fromCodePoint(parseInt(t.slice(1),10)):e}function lt(e,t={}){let{canSelfClose:r=!1,allowHtmComponentClosingTags:n=!1,isTagNameCaseSensitive:a=!1,getTagContentType:i,tokenizeAngularBlocks:s=!1,tokenizeAngularLetDeclaration:o=!1,enableAngularSelectorlessSyntax:l=!1}=t;return Ws().parse(e,"angular-html-parser",{tokenizeExpansionForms:s,canSelfClose:r,allowHtmComponentClosingTags:n,tokenizeBlocks:s,tokenizeLet:o,selectorlessEnabled:l},a,i)}function $s(e,t){for(let r of zs)r(e,t);return e}function js(e){e.walk(t=>{if(t.kind==="element"&&t.tagDefinition.ignoreFirstLf&&t.children.length>0&&t.children[0].kind==="text"&&t.children[0].value[0]===`
`){let r=t.children[0];r.value.length===1?t.removeChild(r):r.value=r.value.slice(1)}})}function Xs(e){let t=r=>r.kind==="element"&&r.prev?.kind==="ieConditionalStartComment"&&r.prev.sourceSpan.end.offset===r.startSourceSpan.start.offset&&r.firstChild?.kind==="ieConditionalEndComment"&&r.firstChild.sourceSpan.start.offset===r.startSourceSpan.end.offset;e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let a=r.children[n];if(!t(a))continue;let i=a.prev,s=a.firstChild;r.removeChild(i),n--;let o=new d(i.sourceSpan.start,s.sourceSpan.end),l=new d(o.start,a.sourceSpan.end);a.condition=i.condition,a.sourceSpan=l,a.startSourceSpan=o,a.removeChild(s)}})}function Gs(e,t,r){e.walk(n=>{if(n.children)for(let a=0;a<n.children.length;a++){let i=n.children[a];if(i.kind!=="text"&&!t(i))continue;i.kind!=="text"&&(i.kind="text",i.value=r(i));let s=i.prev;!s||s.kind!=="text"||(s.value+=i.value,s.sourceSpan=new d(s.sourceSpan.start,i.sourceSpan.end),n.removeChild(i),a--)}})}function Ks(e){return Gs(e,t=>t.kind==="cdata",t=>`<![CDATA[${t.value}]]>`)}function Ys(e){let t=r=>r.kind==="element"&&r.attrs.length===0&&r.children.length===1&&r.firstChild.kind==="text"&&!x.hasWhitespaceCharacter(r.children[0].value)&&!r.firstChild.hasLeadingSpaces&&!r.firstChild.hasTrailingSpaces&&r.isLeadingSpaceSensitive&&!r.hasLeadingSpaces&&r.isTrailingSpaceSensitive&&!r.hasTrailingSpaces&&r.prev?.kind==="text"&&r.next?.kind==="text";e.walk(r=>{if(r.children)for(let n=0;n<r.children.length;n++){let a=r.children[n];if(!t(a))continue;let i=a.prev,s=a.next;i.value+=`<${a.rawName}>`+a.firstChild.value+`</${a.rawName}>`+s.value,i.sourceSpan=new d(i.sourceSpan.start,s.sourceSpan.end),i.isTrailingSpaceSensitive=s.isTrailingSpaceSensitive,i.hasTrailingSpaces=s.hasTrailingSpaces,r.removeChild(a),n--,r.removeChild(s)}})}function Js(e,t){if(t.parser==="html")return;let r=/\{\{(.+?)\}\}/su;e.walk(n=>{if(Ca(n,t))for(let a of n.children){if(a.kind!=="text")continue;let i=a.sourceSpan.start,s=null,o=a.value.split(r);for(let l=0;l<o.length;l++,i=s){let c=o[l];if(l%2===0){s=i.moveBy(c.length),c.length>0&&n.insertChildBefore(a,{kind:"text",value:c,sourceSpan:new d(i,s)});continue}s=i.moveBy(c.length+4),n.insertChildBefore(a,{kind:"interpolation",sourceSpan:new d(i,s),children:c.length===0?[]:[{kind:"text",value:c,sourceSpan:new d(i.moveBy(2),s.moveBy(-2))}]})}n.removeChild(a)}})}function Qs(e,t){e.walk(r=>{let n=r.$children;if(!n)return;if(n.length===0||n.length===1&&n[0].kind==="text"&&x.trim(n[0].value).length===0){r.hasDanglingSpaces=n.length>0,r.$children=[];return}let a=va(r,t),i=Br(r);if(!a)for(let s=0;s<n.length;s++){let o=n[s];if(o.kind!=="text")continue;let{leadingWhitespace:l,text:c,trailingWhitespace:p}=fa(o.value),C=o.prev,g=o.next;c?(o.value=c,o.sourceSpan=new d(o.sourceSpan.start.moveBy(l.length),o.sourceSpan.end.moveBy(-p.length)),l&&(C&&(C.hasTrailingSpaces=!0),o.hasLeadingSpaces=!0),p&&(o.hasTrailingSpaces=!0,g&&(g.hasLeadingSpaces=!0))):(r.removeChild(o),s--,(l||p)&&(C&&(C.hasTrailingSpaces=!0),g&&(g.hasLeadingSpaces=!0)))}r.isWhitespaceSensitive=a,r.isIndentationSensitive=i})}function Zs(e){e.walk(t=>{t.isSelfClosing=!t.children||t.kind==="element"&&(t.tagDefinition.isVoid||t.endSourceSpan&&t.startSourceSpan.start===t.endSourceSpan.start&&t.startSourceSpan.end===t.endSourceSpan.end)})}function eo(e,t){e.walk(r=>{r.kind==="element"&&(r.hasHtmComponentClosingTag=r.endSourceSpan&&/^<\s*\/\s*\/\s*>$/u.test(t.originalText.slice(r.endSourceSpan.start.offset,r.endSourceSpan.end.offset)))})}function to(e,t){e.walk(r=>{r.cssDisplay=Pa(r,t)})}function ro(e,t){e.walk(r=>{let{children:n}=r;if(n){if(n.length===0){r.isDanglingSpaceSensitive=Aa(r,t);return}for(let a of n)a.isLeadingSpaceSensitive=Ea(a,t),a.isTrailingSpaceSensitive=Sa(a,t);for(let a=0;a<n.length;a++){let i=n[a];i.isLeadingSpaceSensitive=(a===0||i.prev.isTrailingSpaceSensitive)&&i.isLeadingSpaceSensitive,i.isTrailingSpaceSensitive=(a===n.length-1||i.next.isLeadingSpaceSensitive)&&i.isTrailingSpaceSensitive}}})}function ao(e,t,r){let{node:n}=e;switch(n.kind){case"root":return t.__onHtmlRoot&&t.__onHtmlRoot(n),[A(Dt(e,t,r)),E];case"element":case"ieConditionalComment":return rs(e,t,r);case"angularControlFlowBlock":return Ki(e,t,r);case"angularControlFlowBlockParameters":return Zi(e,t,r);case"angularControlFlowBlockParameter":return x.trim(n.expression);case"angularLetDeclaration":return A(["@let ",A([n.id," =",A(O([S,r("init")]))]),";"]);case"angularLetDeclarationInitializer":return n.value;case"angularIcuExpression":return es(e,t,r);case"angularIcuCase":return ts(e,t,r);case"ieConditionalStartComment":case"ieConditionalEndComment":return[ge(n),me(n)];case"interpolation":return[ge(n,t),...e.map(r,"children"),me(n,t)];case"text":{if(n.parent.kind==="interpolation"){let o=/\n[^\S\n]*$/u,l=o.test(n.value),c=l?n.value.replace(o,""):n.value;return[L(c),l?E:""]}let a=j(n,t),i=Hr(n),s=z(n,t);return i[0]=[a,i[0]],i.push([i.pop(),s]),Tr(i)}case"docType":return[A([ge(n,t)," ",b(0,n.value.replace(/^html\b/iu,"html"),/\s+/gu," ")]),me(n,t)];case"comment":return[j(n,t),L(t.originalText.slice(we(n),ze(n))),z(n,t)];case"attribute":{if(n.value===null)return n.rawName;let a=qr(n.value),i=Ur(n,t)?"":Pn(a,'"');return[n.rawName,"=",i,L(i==='"'?b(0,a,'"',"""):b(0,a,"'","'")),i]}default:throw new Un(n,"HTML")}}function co(e,t){let r=new SyntaxError(e+" ("+t.loc.start.line+":"+t.loc.start.column+")");return Object.assign(r,t)}function an(e){return{...ho,...e}}function sn(e){let{canSelfClose:t,allowHtmComponentClosingTags:r,isTagNameCaseSensitive:n,shouldParseAsRawText:a,tokenizeAngularBlocks:i,tokenizeAngularLetDeclaration:s}=e;return{canSelfClose:t,allowHtmComponentClosingTags:r,isTagNameCaseSensitive:n,getTagContentType:a?(...o)=>a(...o)?P.RAW_TEXT:void 0:void 0,tokenizeAngularBlocks:i,tokenizeAngularLetDeclaration:s}}function _o(e,t){let r=e.map(t);return r.some((n,a)=>n!==e[a])?r:e}function vo(e,t){if(e.value)for(let{regex:r,parse:n}of Co){let a=e.value.match(r);if(a)return n(e,a,t)}return null}function Eo(e,t,r){let{openingTagSuffix:n,condition:a,data:i}=t.groups,s=4+n.length,o=e.sourceSpan.start.moveBy(s),l=o.moveBy(i.length),[c,p]=(()=>{try{return[!0,r(i,o).children]}catch{return[!1,[{kind:"text",value:i,sourceSpan:new d(o,l)}]]}})();return{kind:"ieConditionalComment",complete:c,children:p,condition:b(0,a.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan,startSourceSpan:new d(e.sourceSpan.start,o),endSourceSpan:new d(l,e.sourceSpan.end)}}function So(e,t){let{condition:r}=t.groups;return{kind:"ieConditionalStartComment",condition:b(0,r.trim(),/\s+/gu," "),sourceSpan:e.sourceSpan}}function Ao(e){return{kind:"ieConditionalEndComment",sourceSpan:e.sourceSpan}}function ko(e,t,r,n){Zr(new To,e.children,{parseOptions:r}),t&&e.children.unshift(t);let a=new fo(e);return a.walk(i=>{if(i.kind==="comment"){let s=vo(i,n);s&&i.parent.replaceChild(i,s)}bo(i),wo(i),yo(i)}),a}function bo(e){if(e.kind==="block"){if(e.name=b(0,e.name.toLowerCase(),/\s+/gu," ").trim(),e.kind="angularControlFlowBlock",!St(e.parameters)){delete e.parameters;return}for(let t of e.parameters)t.kind="angularControlFlowBlockParameter";e.parameters={kind:"angularControlFlowBlockParameters",children:e.parameters,sourceSpan:new d(e.parameters[0].sourceSpan.start,ee(0,e.parameters,-1).sourceSpan.end)}}}function wo(e){e.kind==="letDeclaration"&&(e.kind="angularLetDeclaration",e.id=e.name,e.init={kind:"angularLetDeclarationInitializer",sourceSpan:new d(e.valueSpan.start,e.valueSpan.end),value:e.value},delete e.name,delete e.value)}function yo(e){e.kind==="expansion"&&(e.kind="angularIcuExpression"),e.kind==="expansionCase"&&(e.kind="angularIcuCase")}function or(e,t){let r=e.toLowerCase();return t(r)?r:e}function ur(e){let t=e.name.startsWith(":")?e.name.slice(1).split(":")[0]:null,r=e.nameSpan.toString(),n=t!==null&&r.startsWith(`${t}:`),a=n?r.slice(t.length+1):r;e.name=a,e.namespace=t,e.hasExplicitNamespace=n}function Do(e){switch(e.kind){case"element":ur(e);for(let t of e.attrs)ur(t),t.valueSpan?(t.value=t.valueSpan.toString(),/["']/u.test(t.value[0])&&(t.value=t.value.slice(1,-1))):t.value=null;break;case"comment":e.value=e.sourceSpan.toString().slice(4,-3);break;case"text":e.value=e.sourceSpan.toString();break}}function xo(e,t){if(e.kind==="element"){let r=at(t.isTagNameCaseSensitive?e.name:e.name.toLowerCase());!e.namespace||e.namespace===r.implicitNamespacePrefix||ke(e)?e.tagDefinition=r:e.tagDefinition=at("")}}function No(e){e.sourceSpan&&e.endSourceSpan&&(e.sourceSpan=new d(e.sourceSpan.start,e.endSourceSpan.end))}function Bo(e,t){if(e.kind==="element"&&(t.normalizeTagName&&(!e.namespace||e.namespace===e.tagDefinition.implicitNamespacePrefix||ke(e))&&(e.name=or(e.name,r=>mo.has(r))),t.normalizeAttributeName))for(let r of e.attrs)r.namespace||(r.name=or(r.name,n=>tt.has(e.name)&&(tt.get("*").has(n)||tt.get(e.name).has(n))))}function on(e,t){let{rootNodes:r,errors:n}=lt(e,sn(t));return n.length>0&&ht(n[0]),{parseOptions:t,rootNodes:r}}function Lo(e,t){let r=sn(t),{rootNodes:n,errors:a}=lt(e,r);if(n.some(l=>l.kind==="docType"&&l.value==="html"||l.kind==="element"&&l.name.toLowerCase()==="html"))return on(e,Nt);let i,s=()=>i??(i=lt(e,{...r,getTagContentType:void 0})),o=l=>{let{offset:c}=l.startSourceSpan.start;return s().rootNodes.find(p=>p.kind==="element"&&p.startSourceSpan.start.offset===c)??l};for(let[l,c]of n.entries())if(c.kind==="element"){if(c.isVoid)a=s().errors,n[l]=o(c);else if(Oo(c)){let{endSourceSpan:p,startSourceSpan:C}=c,g=s().errors.find(h=>h.span.start.offset>C.start.offset&&h.span.start.offset<p.end.offset);g&&ht(g),n[l]=o(c)}}return a.length>0&&ht(a[0]),{parseOptions:t,rootNodes:n}}function Oo(e){if(e.kind!=="element"||e.name!=="template")return!1;let t=e.attrs.find(r=>r.name==="lang")?.value;return!t||t==="html"}function ht(e){let{msg:t,span:{start:r,end:n}}=e;throw po(t,{loc:{start:{line:r.line+1,column:r.col+1},end:{line:n.line+1,column:n.col+1}},cause:e})}function Fo(e,t,r,n,a,i){let{offset:s}=n,o=b(0,t.slice(0,s),/[^\n]/gu," ")+r,l=un(o,e,{...a,shouldParseFrontMatter:!1},i);l.sourceSpan=new d(n,ee(0,l.children,-1).sourceSpan.end);let c=l.children[0];return c.length===s?l.children.shift():(c.sourceSpan=new d(c.sourceSpan.start.moveBy(s),c.sourceSpan.end),c.value=c.value.slice(s)),l}function un(e,t,r,n={}){let{frontMatter:a,content:i}=r.shouldParseFrontMatter?pa(e):{content:e},s=new Qr(e,n.filepath),o=new it(s,0,0,0),l=o.moveBy(e.length),{parseOptions:c,rootNodes:p}=t(i,r),C={kind:"root",sourceSpan:new d(o,l),children:p},g;if(a){let[h,f]=[a.start,a.end].map(v=>new it(s,v.index,v.line-1,v.column));g={...a,kind:"frontMatter",sourceSpan:new d(h,f)}}return ko(C,g,c,(h,f)=>Fo(t,e,h,f,c,n))}function xe(e){let t=an(e),r=t.name==="vue"?Lo:on;return{parse:(n,a)=>un(n,r,t,a),hasPragma:$i,hasIgnorePragma:ji,astFormat:"html",locStart:we,locEnd:ze}}var lr,cr,cn,pr,Lt,pn,Be,hn,dn,dt,mn,gn,b,_n,ee,Cn,He,hr,dr,mr,mt,gt,gr,ft,_t,Ct,vt,fr,_r,te,Cr,Et,vr,Er,En,An,Tn,W,Ar,kn,bn,Ae,S,k,xn,E,Nn,Bn,kr,br,Ln,On,Pn,Rn,Mn,qn,Hn,x,Vn,Un,Wn,zn,$n,Xn,Gn,Kn,Yn,Qn,ra,na,St,sa,At,Dr,Ve,oe,pa,ha,Pt,da,It,ke,ga,xr,fa,Ia,Wr,Ha,Je,Ua,za,$a,ja,Xa,Ga,Ka,Ya,Qa,Za,ti,ri,ni,ai,qt,ii,oi,ui,zr,li,pi,hi,Qe,ie,Ci,Si,Ai,bi,we,ze,Ht,Xr,Li,Fi,ue,Pi,Mi,y,qi,Hi,Vi,Ui,Wi,zi,$i,ji,Xi,Gi,Yi,P,Wt,zt,Y,ns,Re,is,ss,os,us,ls,cs,Yr,ps,hs,m,jt,pe,it,Qr,d,Gt,J,X,gs,fs,_s,Cs,vs,H,Es,Ss,K,M,As,Kt,Yt,Ts,Se,ks,u,bs,ys,st,xs,he,Ns,en,Ms,xt,T,qs,Hs,Vs,Us,et,Ws,zs,no,io,so,oo,ar,ir,uo,lo,nn,po,ho,tt,mo,Pe,sr,Q,ct,pt,go,fo,Co,To,Nt,Po,Io,Ro,Mo,qo,Ho,Vo,Uo=ln(()=>{Bt();lr=Object.defineProperty,cr=e=>{throw TypeError(e)},cn=(e,t,r)=>t in e?lr(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,pr=(e,t)=>{for(var r in t)lr(e,r,{get:t[r],enumerable:!0})},Lt=(e,t,r)=>cn(e,typeof t!="symbol"?t+"":t,r),pn=(e,t,r)=>t.has(e)||cr("Cannot "+r),Be=(e,t,r)=>(pn(e,t,"read from private field"),r?r.call(e):t.get(e)),hn=(e,t,r)=>t.has(e)?cr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),dn={};pr(dn,{languages:()=>oo,options:()=>lo,parsers:()=>nn,printers:()=>Vo});dt=(e,t)=>(r,n,...a)=>r|1&&n==null?void 0:(t.call(n)??n[e]).apply(n,a),mn=String.prototype.replaceAll??function(e,t){return e.global?this.replace(e,t):this.split(e).join(t)},gn=dt("replaceAll",function(){if(typeof this=="string")return mn}),b=gn;_n=dt("at",function(){if(Array.isArray(this)||typeof this=="string")return fn}),ee=_n,Cn=()=>{},He=Cn,hr="string",dr="array",mr="cursor",mt="indent",gt="align",gr="trim",ft="group",_t="fill",Ct="if-break",vt="indent-if-break",fr="line-suffix",_r="line-suffix-boundary",te="line",Cr="label",Et="break-parent",vr=new Set([mr,mt,gt,gr,ft,_t,Ct,vt,fr,_r,te,Cr,Et]);Er=vn,En=e=>new Intl.ListFormat("en-US",{type:"disjunction"}).format(e);An=class extends Error{name="InvalidDocError";constructor(e){super(Sn(e)),this.doc=e}},Tn=An;W=He,Ar=He,kn=He,bn=He;Ae={type:Et};S={type:te},k={type:te,soft:!0},xn={type:te,hard:!0},E=[xn,Ae],Nn={type:te,hard:!0,literal:!0},Bn=[Nn,Ae],kr=Object.freeze({character:"'",codePoint:39}),br=Object.freeze({character:'"',codePoint:34}),Ln=Object.freeze({preferred:kr,alternate:br}),On=Object.freeze({preferred:br,alternate:kr});Pn=Fn;Rn=class{#e;constructor(e){this.#e=new Set(e)}getLeadingWhitespaceCount(e){let t=this.#e,r=0;for(let n=0;n<e.length&&t.has(e.charAt(n));n++)r++;return r}getTrailingWhitespaceCount(e){let t=this.#e,r=0;for(let n=e.length-1;n>=0&&t.has(e.charAt(n));n--)r++;return r}getLeadingWhitespace(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(0,t)}getTrailingWhitespace(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(e.length-t)}hasLeadingWhitespace(e){return this.#e.has(e.charAt(0))}hasTrailingWhitespace(e){return this.#e.has(ee(0,e,-1))}trimStart(e){let t=this.getLeadingWhitespaceCount(e);return e.slice(t)}trimEnd(e){let t=this.getTrailingWhitespaceCount(e);return e.slice(0,e.length-t)}trim(e){return this.trimEnd(this.trimStart(e))}split(e,t=!1){let r=`[${In([...this.#e].join(""))}]+`,n=new RegExp(t?`(${r})`:r,"u");return e.split(n)}hasWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,r=>t.has(r))}hasNonWhitespaceCharacter(e){let t=this.#e;return Array.prototype.some.call(e,r=>!t.has(r))}isWhitespaceOnly(e){let t=this.#e;return Array.prototype.every.call(e,r=>t.has(r))}#t(e){let t=Number.POSITIVE_INFINITY;for(let r of e.split(`
`)){if(r.length===0)continue;let n=this.getLeadingWhitespaceCount(r);if(n===0)return 0;r.length!==n&&n<t&&(t=n)}return t===Number.POSITIVE_INFINITY?0:t}dedentString(e){let t=this.#t(e);return t===0?e:e.split(`
`).map(r=>r.slice(t)).join(`
`)}},Mn=Rn,qn=[" ",`
`,"\f","\r"," "],Hn=new Mn(qn),x=Hn,Vn=class extends Error{name="UnexpectedNodeError";constructor(e,t,r="type"){super(`Unexpected ${t} node ${r}: ${JSON.stringify(e[r])}.`),this.node=e}},Un=Vn,Wn=new Set(["sourceSpan","startSourceSpan","endSourceSpan","nameSpan","valueSpan","keySpan","tagDefinition","tokens","valueTokens","switchValueSourceSpan","expSourceSpan","valueSourceSpan"]),zn=new Set(["if","else if","for","switch","case"]);wr.ignoredProperties=Wn;$n=wr;Xn=jn,Gn=Array.prototype.toReversed??function(){return[...this].reverse()},Kn=dt("toReversed",function(){if(Array.isArray(this))return Gn}),Yn=Kn;Qn=Jn();ra=e=>String(e).split(/[/\\]/u).pop(),na=e=>String(e).startsWith("file:");St=aa;sa=void 0;At=oa,Dr=Symbol.for("PRETTIER_IS_FRONT_MATTER");Ve=ua,oe=3;pa=ca,ha="inline",Pt={area:"none",base:"none",basefont:"none",datalist:"none",head:"none",link:"none",meta:"none",noembed:"none",noframes:"none",param:"block",rp:"none",script:"block",style:"none",template:"inline",title:"none",html:"block",body:"block",address:"block",blockquote:"block",center:"block",dialog:"block",div:"block",figure:"block",figcaption:"block",footer:"block",form:"block",header:"block",hr:"block",legend:"block",listing:"block",main:"block",p:"block",plaintext:"block",pre:"block",search:"block",xmp:"block",slot:"contents",ruby:"ruby",rt:"ruby-text",article:"block",aside:"block",h1:"block",h2:"block",h3:"block",h4:"block",h5:"block",h6:"block",hgroup:"block",nav:"block",section:"block",dir:"block",dd:"block",dl:"block",dt:"block",menu:"block",ol:"block",ul:"block",li:"list-item",table:"table",caption:"table-caption",colgroup:"table-column-group",col:"table-column",thead:"table-header-group",tbody:"table-row-group",tfoot:"table-footer-group",tr:"table-row",t