import{C as De}from"./DDaJwTPR.js";import{a3 as Q,a4 as G,a5 as Le,a6 as Re,a7 as Fe,a8 as qe,k as P,m as ie,F as le,J as x,b as U,O as X,C as v,D as ee,U as re,V as B,u as D,L as Ve,l as J,t as Se,X as $,a9 as Be,a0 as Pe,a1 as $e,W as je,Y as Ke}from"./CM4q4bzC.js";import{i as Ge,h as ze,j as Ue,k as He,l as We,m as ce,o as Qe,p as Xe}from"./DX1dFNZx.js";import{g as be}from"./ByEtNf4R.js";/**
* @vue/compiler-core v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const Je=Symbol(""),Ze=Symbol(""),Ye=Symbol(""),et=Symbol("");function tt(t){Object.getOwnPropertySymbols(t).forEach(e=>{})}const xe={start:{line:1,column:1,offset:0},end:{line:1,column:1,offset:0},source:""};function it(t,e=""){return{type:0,source:e,children:t,helpers:new Set,components:[],directives:[],hoists:[],imports:[],cached:[],temps:0,codegenNode:void 0,loc:xe}}function ne(t,e=!1,i=xe,s=0){return{type:4,loc:i,content:t,isStatic:e,constType:e?3:s}}const he=new Uint8Array([123,123]),ue=new Uint8Array([125,125]);function fe(t){return t>=97&&t<=122||t>=65&&t<=90}function T(t){return t===32||t===10||t===9||t===12||t===13}function O(t){return t===47||t===62||T(t)}function Z(t){const e=new Uint8Array(t.length);for(let i=0;i<t.length;i++)e[i]=t.charCodeAt(i);return e}const S={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])};class nt{constructor(e,i){this.stack=e,this.cbs=i,this.state=1,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=1,this.inRCDATA=!1,this.inXML=!1,this.inVPre=!1,this.newlines=[],this.mode=0,this.delimiterOpen=he,this.delimiterClose=ue,this.delimiterIndex=-1,this.currentSequence=void 0,this.sequenceIndex=0}get inSFCRoot(){return this.mode===2&&this.stack.length===0}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=he,this.delimiterClose=ue}getPos(e){let i=1,s=e+1;for(let n=this.newlines.length-1;n>=0;n--){const a=this.newlines[n];if(e>a){i=n+2,s=e-a;break}}return{column:s,line:i,offset:e}}peek(){return this.buffer.charCodeAt(this.index+1)}stateText(e){e===60?(this.index>this.sectionStart&&this.cbs.ontext(this.sectionStart,this.index),this.state=5,this.sectionStart=this.index):!this.inVPre&&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 i=this.index+1-this.delimiterOpen.length;i>this.sectionStart&&this.cbs.ontext(this.sectionStart,i),this.state=3,this.sectionStart=i}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.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):this.delimiterIndex++:(this.state=3,this.stateInterpolation(e))}stateSpecialStartSequence(e){const i=this.sequenceIndex===this.currentSequence.length;if(!(i?O(e):(e|32)===this.currentSequence[this.sequenceIndex]))this.inRCDATA=!1;else if(!i){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=6,this.stateInTagName(e)}stateInRCDATA(e){if(this.sequenceIndex===this.currentSequence.length){if(e===62||T(e)){const i=this.index-this.currentSequence.length;if(this.sectionStart<i){const s=this.index;this.index=i,this.cbs.ontext(this.sectionStart,i),this.index=s}this.sectionStart=i+2,this.stateInClosingTagName(e),this.inRCDATA=!1;return}this.sequenceIndex=0}(e|32)===this.currentSequence[this.sequenceIndex]?this.sequenceIndex+=1:this.sequenceIndex===0?this.currentSequence===S.TitleEnd||this.currentSequence===S.TextareaEnd&&!this.inSFCRoot?!this.inVPre&&e===this.delimiterOpen[0]&&(this.state=2,this.delimiterIndex=0,this.stateInterpolationOpen(e)):this.fastForwardTo(60)&&(this.sequenceIndex=1):this.sequenceIndex=+(e===60)}stateCDATASequence(e){e===S.Cdata[this.sequenceIndex]?++this.sequenceIndex===S.Cdata.length&&(this.state=28,this.currentSequence=S.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 i=this.buffer.charCodeAt(this.index);if(i===10&&this.newlines.push(this.index),i===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===S.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):this.sequenceIndex===0?this.fastForwardTo(this.currentSequence[0])&&(this.sequenceIndex=1):e!==this.currentSequence[this.sequenceIndex-1]&&(this.sequenceIndex=0)}startSpecial(e,i){this.enterRCDATA(e,i),this.state=31}enterRCDATA(e,i){this.inRCDATA=!0,this.currentSequence=e,this.sequenceIndex=i}stateBeforeTagName(e){e===33?(this.state=22,this.sectionStart=this.index+1):e===63?(this.state=24,this.sectionStart=this.index+1):fe(e)?(this.sectionStart=this.index,this.mode===0?this.state=6:this.inSFCRoot?this.state=34:this.inXML?this.state=6:e===116?this.state=30:this.state=e===115?29:6):e===47?this.state=8:(this.state=1,this.stateText(e))}stateInTagName(e){O(e)&&this.handleTagName(e)}stateInSFCRootTagName(e){if(O(e)){const i=this.buffer.slice(this.sectionStart,this.index);i!=="template"&&this.enterRCDATA(Z("</"+i),0),this.handleTagName(e)}}handleTagName(e){this.cbs.onopentagname(this.sectionStart,this.index),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)}stateBeforeClosingTagName(e){T(e)||(e===62?(this.state=1,this.sectionStart=this.index+1):(this.state=fe(e)?9:27,this.sectionStart=this.index))}stateInClosingTagName(e){(e===62||T(e))&&(this.cbs.onclosetag(this.sectionStart,this.index),this.sectionStart=-1,this.state=10,this.stateAfterClosingTagName(e))}stateAfterClosingTagName(e){e===62&&(this.state=1,this.sectionStart=this.index+1)}stateBeforeAttrName(e){e===62?(this.cbs.onopentagend(this.index),this.inRCDATA?this.state=32:this.state=1,this.sectionStart=this.index+1):e===47?this.state=7:e===60&&this.peek()===47?(this.cbs.onopentagend(this.index),this.state=5,this.sectionStart=this.index):T(e)||this.handleAttrStart(e)}handleAttrStart(e){e===118&&this.peek()===45?(this.state=13,this.sectionStart=this.index):e===46||e===58||e===64||e===35?(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){e===62?(this.cbs.onselfclosingtag(this.index),this.state=1,this.sectionStart=this.index+1,this.inRCDATA=!1):T(e)||(this.state=11,this.stateBeforeAttrName(e))}stateInAttrName(e){(e===61||O(e))&&(this.cbs.onattribname(this.sectionStart,this.index),this.handleAttrNameEnd(e))}stateInDirName(e){e===61||O(e)?(this.cbs.ondirname(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===58?(this.cbs.ondirname(this.sectionStart,this.index),this.state=14,this.sectionStart=this.index+1):e===46&&(this.cbs.ondirname(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDirArg(e){e===61||O(e)?(this.cbs.ondirarg(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===91?this.state=15:e===46&&(this.cbs.ondirarg(this.sectionStart,this.index),this.state=16,this.sectionStart=this.index+1)}stateInDynamicDirArg(e){e===93?this.state=14:(e===61||O(e))&&(this.cbs.ondirarg(this.sectionStart,this.index+1),this.handleAttrNameEnd(e))}stateInDirModifier(e){e===61||O(e)?(this.cbs.ondirmodifier(this.sectionStart,this.index),this.handleAttrNameEnd(e)):e===46&&(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){e===61?this.state=18:e===47||e===62?(this.cbs.onattribend(0,this.sectionStart),this.sectionStart=-1,this.state=11,this.stateBeforeAttrName(e)):T(e)||(this.cbs.onattribend(0,this.sectionStart),this.handleAttrStart(e))}stateBeforeAttrValue(e){e===34?(this.state=19,this.sectionStart=this.index+1):e===39?(this.state=20,this.sectionStart=this.index+1):T(e)||(this.sectionStart=this.index,this.state=21,this.stateInAttrValueNoQuotes(e))}handleInAttrValue(e,i){(e===i||this.fastForwardTo(i))&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(i===34?3:2,this.index+1),this.state=11)}stateInAttrValueDoubleQuotes(e){this.handleInAttrValue(e,34)}stateInAttrValueSingleQuotes(e){this.handleInAttrValue(e,39)}stateInAttrValueNoQuotes(e){T(e)||e===62?(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=-1,this.cbs.onattribend(1,this.index),this.state=11,this.stateBeforeAttrName(e)):(e===39||e===60||e===61||e===96)&&this.cbs.onerr(18,this.index)}stateBeforeDeclaration(e){e===91?(this.state=26,this.sequenceIndex=0):this.state=e===45?25:23}stateInDeclaration(e){(e===62||this.fastForwardTo(62))&&(this.state=1,this.sectionStart=this.index+1)}stateInProcessingInstruction(e){(e===62||this.fastForwardTo(62))&&(this.cbs.onprocessinginstruction(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeComment(e){e===45?(this.state=28,this.currentSequence=S.CommentEnd,this.sequenceIndex=2,this.sectionStart=this.index+1):this.state=23}stateInSpecialComment(e){(e===62||this.fastForwardTo(62))&&(this.cbs.oncomment(this.sectionStart,this.index),this.state=1,this.sectionStart=this.index+1)}stateBeforeSpecialS(e){e===S.ScriptEnd[3]?this.startSpecial(S.ScriptEnd,4):e===S.StyleEnd[3]?this.startSpecial(S.StyleEnd,4):(this.state=6,this.stateInTagName(e))}stateBeforeSpecialT(e){e===S.TitleEnd[3]?this.startSpecial(S.TitleEnd,4):e===S.TextareaEnd[3]?this.startSpecial(S.TextareaEnd,4):(this.state=6,this.stateInTagName(e))}startEntity(){}stateInEntity(){}parse(e){for(this.buffer=e;this.index<this.buffer.length;){const i=this.buffer.charCodeAt(this.index);switch(i===10&&this.newlines.push(this.index),this.state){case 1:{this.stateText(i);break}case 2:{this.stateInterpolationOpen(i);break}case 3:{this.stateInterpolation(i);break}case 4:{this.stateInterpolationClose(i);break}case 31:{this.stateSpecialStartSequence(i);break}case 32:{this.stateInRCDATA(i);break}case 26:{this.stateCDATASequence(i);break}case 19:{this.stateInAttrValueDoubleQuotes(i);break}case 12:{this.stateInAttrName(i);break}case 13:{this.stateInDirName(i);break}case 14:{this.stateInDirArg(i);break}case 15:{this.stateInDynamicDirArg(i);break}case 16:{this.stateInDirModifier(i);break}case 28:{this.stateInCommentLike(i);break}case 27:{this.stateInSpecialComment(i);break}case 11:{this.stateBeforeAttrName(i);break}case 6:{this.stateInTagName(i);break}case 34:{this.stateInSFCRootTagName(i);break}case 9:{this.stateInClosingTagName(i);break}case 5:{this.stateBeforeTagName(i);break}case 17:{this.stateAfterAttrName(i);break}case 20:{this.stateInAttrValueSingleQuotes(i);break}case 18:{this.stateBeforeAttrValue(i);break}case 8:{this.stateBeforeClosingTagName(i);break}case 10:{this.stateAfterClosingTagName(i);break}case 29:{this.stateBeforeSpecialS(i);break}case 30:{this.stateBeforeSpecialT(i);break}case 21:{this.stateInAttrValueNoQuotes(i);break}case 7:{this.stateInSelfClosingTag(i);break}case 23:{this.stateInDeclaration(i);break}case 22:{this.stateBeforeDeclaration(i);break}case 25:{this.stateBeforeComment(i);break}case 24:{this.stateInProcessingInstruction(i);break}case 33:{this.stateInEntity();break}}this.index++}this.cleanup(),this.finish()}cleanup(){this.sectionStart!==this.index&&(this.state===1||this.state===32&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===19||this.state===20||this.state===21)&&(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||(this.state===28?this.currentSequence===S.CdataEnd?this.cbs.oncdata(this.sectionStart,e):this.cbs.oncomment(this.sectionStart,e):this.state===6||this.state===11||this.state===18||this.state===17||this.state===12||this.state===13||this.state===14||this.state===15||this.state===16||this.state===20||this.state===19||this.state===21||this.state===9||this.cbs.ontext(this.sectionStart,e))}emitCodePoint(e,i){}}function de(t,{compatConfig:e}){const i=e&&e[t];return t==="MODE"?i||3:i}function Ie(t,e){const i=de("MODE",e),s=de(t,e);return i===3?s===!0:s!==!1}function Y(t,e,i,...s){return Ie(t,e)}function st(t){throw t}function at(t){}function rt(t,e,i,s){const n=`https://vuejs.org/error-reference/#compiler-${t}`,a=new SyntaxError(String(n));return a.code=t,a.loc=e,a}const ot=t=>t.type===4&&t.isStatic;function lt(t){switch(t){case"Teleport":case"teleport":return Je;case"Suspense":case"suspense":return Ze;case"KeepAlive":case"keep-alive":return Ye;case"BaseTransition":case"base-transition":return et}}function ct(t,e){return!!(t&&ot(t)&&t.content===e)}const ht=/([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/,Te={parseMode:"base",ns:0,delimiters:["{{","}}"],getNamespace:()=>0,isVoidTag:G,isPreTag:G,isIgnoreNewlineTag:G,isCustomElement:G,onError:st,onWarn:at,comments:!1,prefixIdentifiers:!1};let h=Te,j=null,w="",b=null,o=null,I="",N=-1,F=-1,oe=0,L=!1,se=null;const u=[],d=new nt(u,{onerr:_,ontext(t,e){z(g(t,e),t,e)},ontextentity(t,e,i){z(t,e,i)},oninterpolation(t,e){if(L)return z(g(t,e),t,e);let i=t+d.delimiterOpen.length,s=e-d.delimiterClose.length;for(;T(w.charCodeAt(i));)i++;for(;T(w.charCodeAt(s-1));)s--;let n=g(i,s);n.includes("&")&&(n=h.decodeEntities(n,!1)),ae({type:5,content:W(n,!1,p(i,s)),loc:p(t,e)})},onopentagname(t,e){const i=g(t,e);b={type:1,tag:i,ns:h.getNamespace(i,u[0],h.ns),tagType:0,props:[],children:[],loc:p(t-1,e),codegenNode:void 0}},onopentagend(t){pe(t)},onclosetag(t,e){const i=g(t,e);if(!h.isVoidTag(i)){let s=!1;for(let n=0;n<u.length;n++)if(u[n].tag.toLowerCase()===i.toLowerCase()){s=!0,n>0&&_(24,u[0].loc.start.offset);for(let r=0;r<=n;r++){const l=u.shift();H(l,e,r<n)}break}s||_(23,ye(t,60))}},onselfclosingtag(t){const e=b.tag;b.isSelfClosing=!0,pe(t),u[0]&&u[0].tag===e&&H(u.shift(),t)},onattribname(t,e){o={type:6,name:g(t,e),nameLoc:p(t,e),value:void 0,loc:p(t)}},ondirname(t,e){const i=g(t,e),s=i==="."||i===":"?"bind":i==="@"?"on":i==="#"?"slot":i.slice(2);if(!L&&s===""&&_(26,t),L||s==="")o={type:6,name:i,nameLoc:p(t,e),value:void 0,loc:p(t)};else if(o={type:7,name:s,rawName:i,exp:void 0,arg:void 0,modifiers:i==="."?[ne("prop")]:[],loc:p(t)},s==="pre"){L=d.inVPre=!0,se=b;const n=b.props;for(let a=0;a<n.length;a++)n[a].type===7&&(n[a]=It(n[a]))}},ondirarg(t,e){if(t===e)return;const i=g(t,e);if(L)o.name+=i,q(o.nameLoc,e);else{const s=i[0]!=="[";o.arg=W(s?i:i.slice(1,-1),s,p(t,e),s?3:0)}},ondirmodifier(t,e){const i=g(t,e);if(L)o.name+="."+i,q(o.nameLoc,e);else if(o.name==="slot"){const s=o.arg;s&&(s.content+="."+i,q(s.loc,e))}else{const s=ne(i,!0,p(t,e));o.modifiers.push(s)}},onattribdata(t,e){I+=g(t,e),N<0&&(N=t),F=e},onattribentity(t,e,i){I+=t,N<0&&(N=e),F=i},onattribnameend(t){const e=o.loc.start.offset,i=g(e,t);o.type===7&&(o.rawName=i),b.props.some(s=>(s.type===7?s.rawName:s.name)===i)&&_(2,e)},onattribend(t,e){if(b&&o){if(q(o.loc,e),t!==0)if(I.includes("&")&&(I=h.decodeEntities(I,!0)),o.type===6)o.name==="class"&&(I=Ce(I).trim()),t===1&&!I&&_(13,e),o.value={type:2,content:I,loc:t===1?p(N,F):p(N-1,F+1)},d.inSFCRoot&&b.tag==="template"&&o.name==="lang"&&I&&I!=="html"&&d.enterRCDATA(Z("</template"),0);else{let i=0;o.exp=W(I,!1,p(N,F),0,i),o.name==="for"&&(o.forParseResult=ft(o.exp));let s=-1;o.name==="bind"&&(s=o.modifiers.findIndex(n=>n.content==="sync"))>-1&&Y("COMPILER_V_BIND_SYNC",h,o.loc,o.rawName)&&(o.name="model",o.modifiers.splice(s,1))}(o.type!==7||o.name!=="pre")&&b.props.push(o)}I="",N=F=-1},oncomment(t,e){h.comments&&ae({type:3,content:g(t,e),loc:p(t-4,e+3)})},onend(){const t=w.length;for(let e=0;e<u.length;e++)H(u[e],t-1),_(24,u[e].loc.start.offset)},oncdata(t,e){u[0].ns!==0?z(g(t,e),t,e):_(1,t-9)},onprocessinginstruction(t){(u[0]?u[0].ns:h.ns)===0&&_(21,t-1)}}),me=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,ut=/^\(|\)$/g;function ft(t){const e=t.loc,i=t.content,s=i.match(ht);if(!s)return;const[,n,a]=s,r=(k,M,R=!1)=>{const K=e.start.offset+M,te=K+k.length;return W(k,!1,p(K,te),0,R?1:0)},l={source:r(a.trim(),i.indexOf(a,n.length)),value:void 0,key:void 0,index:void 0,finalized:!1};let c=n.trim().replace(ut,"").trim();const f=n.indexOf(c),A=c.match(me);if(A){c=c.replace(me,"").trim();const k=A[1].trim();let M;if(k&&(M=i.indexOf(k,f+c.length),l.key=r(k,M,!0)),A[2]){const R=A[2].trim();R&&(l.index=r(R,i.indexOf(R,l.key?M+k.length:f+c.length),!0))}}return c&&(l.value=r(c,f,!0)),l}function g(t,e){return w.slice(t,e)}function pe(t){d.inSFCRoot&&(b.innerLoc=p(t+1,t+1)),ae(b);const{tag:e,ns:i}=b;i===0&&h.isPreTag(e)&&oe++,h.isVoidTag(e)?H(b,t):(u.unshift(b),(i===1||i===2)&&(d.inXML=!0)),b=null}function z(t,e,i){{const a=u[0]&&u[0].tag;a!=="script"&&a!=="style"&&t.includes("&")&&(t=h.decodeEntities(t,!1))}const s=u[0]||j,n=s.children[s.children.length-1];n&&n.type===2?(n.content+=t,q(n.loc,i)):s.children.push({type:2,content:t,loc:p(e,i)})}function H(t,e,i=!1){i?q(t.loc,ye(e,60)):q(t.loc,dt(e,62)+1),d.inSFCRoot&&(t.children.length?t.innerLoc.end=Q({},t.children[t.children.length-1].loc.end):t.innerLoc.end=Q({},t.innerLoc.start),t.innerLoc.source=g(t.innerLoc.start.offset,t.innerLoc.end.offset));const{tag:s,ns:n,children:a}=t;if(L||(s==="slot"?t.tagType=2:ge(t)?t.tagType=3:pt(t)&&(t.tagType=1)),d.inRCDATA||(t.children=Ae(a)),n===0&&h.isIgnoreNewlineTag(s)){const r=a[0];r&&r.type===2&&(r.content=r.content.replace(/^\r?\n/,""))}n===0&&h.isPreTag(s)&&oe--,se===t&&(L=d.inVPre=!1,se=null),d.inXML&&(u[0]?u[0].ns:h.ns)===0&&(d.inXML=!1);{const r=t.props;if(!d.inSFCRoot&&Ie("COMPILER_NATIVE_TEMPLATE",h)&&t.tag==="template"&&!ge(t)){const c=u[0]||j,f=c.children.indexOf(t);c.children.splice(f,1,...t.children)}const l=r.find(c=>c.type===6&&c.name==="inline-template");l&&Y("COMPILER_INLINE_TEMPLATE",h,l.loc)&&t.children.length&&(l.value={type:2,content:g(t.children[0].loc.start.offset,t.children[t.children.length-1].loc.end.offset),loc:l.loc})}}function dt(t,e){let i=t;for(;w.charCodeAt(i)!==e&&i<w.length-1;)i++;return i}function ye(t,e){let i=t;for(;w.charCodeAt(i)!==e&&i>=0;)i--;return i}const mt=new Set(["if","else","else-if","for","slot"]);function ge({tag:t,props:e}){if(t==="template"){for(let i=0;i<e.length;i++)if(e[i].type===7&&mt.has(e[i].name))return!0}return!1}function pt({tag:t,props:e}){if(h.isCustomElement(t))return!1;if(t==="component"||gt(t.charCodeAt(0))||lt(t)||h.isBuiltInComponent&&h.isBuiltInComponent(t)||h.isNativeTag&&!h.isNativeTag(t))return!0;for(let i=0;i<e.length;i++){const s=e[i];if(s.type===6){if(s.name==="is"&&s.value){if(s.value.content.startsWith("vue:"))return!0;if(Y("COMPILER_IS_ON_ELEMENT",h,s.loc))return!0}}else if(s.name==="bind"&&ct(s.arg,"is")&&Y("COMPILER_IS_ON_ELEMENT",h,s.loc))return!0}return!1}function gt(t){return t>64&&t<91}const St=/\r\n/g;function Ae(t,e){const i=h.whitespace!=="preserve";let s=!1;for(let n=0;n<t.length;n++){const a=t[n];if(a.type===2)if(oe)a.content=a.content.replace(St,`
`);else if(bt(a.content)){const r=t[n-1]&&t[n-1].type,l=t[n+1]&&t[n+1].type;!r||!l||i&&(r===3&&(l===3||l===1)||r===1&&(l===3||l===1&&xt(a.content)))?(s=!0,t[n]=null):a.content=" "}else i&&(a.content=Ce(a.content))}return s?t.filter(Boolean):t}function bt(t){for(let e=0;e<t.length;e++)if(!T(t.charCodeAt(e)))return!1;return!0}function xt(t){for(let e=0;e<t.length;e++){const i=t.charCodeAt(e);if(i===10||i===13)return!0}return!1}function Ce(t){let e="",i=!1;for(let s=0;s<t.length;s++)T(t.charCodeAt(s))?i||(e+=" ",i=!0):(e+=t[s],i=!1);return e}function ae(t){(u[0]||j).children.push(t)}function p(t,e){return{start:d.getPos(t),end:e==null?e:d.getPos(e),source:e==null?e:g(t,e)}}function q(t,e){t.end=d.getPos(e),t.source=g(t.start.offset,e)}function It(t){const e={type:6,name:t.rawName,nameLoc:p(t.loc.start.offset,t.loc.start.offset+t.rawName.length),value:void 0,loc:t.loc};if(t.exp){const i=t.exp.loc;i.end.offset<t.loc.end.offset&&(i.start.offset--,i.start.column--,i.end.offset++,i.end.column++),e.value={type:2,content:t.exp.content,loc:i}}return e}function W(t,e=!1,i,s=0,n=0){return ne(t,e,i,s)}function _(t,e,i){h.onError(rt(t,p(e,e)))}function Tt(){d.reset(),b=null,o=null,I="",N=-1,F=-1,u.length=0}function yt(t,e){if(Tt(),w=t,h=Q({},Te),e){let n;for(n in e)e[n]!=null&&(h[n]=e[n])}d.mode=h.parseMode==="html"?1:h.parseMode==="sfc"?2:0,d.inXML=h.ns===1||h.ns===2;const i=e&&e.delimiters;i&&(d.delimiterOpen=Z(i[0]),d.delimiterClose=Z(i[1]));const s=j=it([],t);return d.parse(w),s.loc=p(0,t.length),s.children=Ae(s.children),j=null,s}new RegExp("\\b"+"arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b")+"\\b");/**
* @vue/compiler-dom v3.5.8
* (c) 2018-present Yuxi (Evan) You and Vue contributors
* @license MIT
**/const At=Symbol(""),Ct=Symbol(""),kt=Symbol(""),Et=Symbol(""),_t=Symbol(""),Nt=Symbol(""),vt=Symbol(""),wt=Symbol(""),ke=Symbol(""),Ee=Symbol("");tt({[At]:"vModelRadio",[Ct]:"vModelCheckbox",[kt]:"vModelText",[Et]:"vModelSelect",[_t]:"vModelDynamic",[Nt]:"withModifiers",[vt]:"withKeys",[wt]:"vShow",[ke]:"Transition",[Ee]:"TransitionGroup"});let V;function Mt(t,e=!1){return V||(V=document.createElement("div")),e?(V.innerHTML=`<div foo="${t.replace(/"/g,"&quot;")}">`,V.children[0].getAttribute("foo")):(V.innerHTML=t,V.textContent)}const Ot={parseMode:"html",isVoidTag:Le,isNativeTag:t=>Re(t)||Fe(t)||qe(t),isPreTag:t=>t==="pre",isIgnoreNewlineTag:t=>t==="pre"||t==="textarea",decodeEntities:Mt,isBuiltInComponent:t=>{if(t==="Transition"||t==="transition")return ke;if(t==="TransitionGroup"||t==="transition-group")return Ee},getNamespace(t,e,i){let s=e?e.ns:i;if(e&&s===2)if(e.tag==="annotation-xml"){if(t==="svg")return 1;e.props.some(n=>n.type===6&&n.name==="encoding"&&n.value!=null&&(n.value.content==="text/html"||n.value.content==="application/xhtml+xml"))&&(s=0)}else/^m(?:[ions]|text)$/.test(e.tag)&&t!=="mglyph"&&t!=="malignmark"&&(s=0);else e&&s===1&&(e.tag==="foreignObject"||e.tag==="desc"||e.tag==="title")&&(s=0);if(s===0){if(t==="svg")return 1;if(t==="math")return 2}return s}};function Dt(t,e={}){return yt(t,Q({},Ot,e))}const _e=P({name:"SofieText",props:{value:{type:String,required:!0}},setup(t,{attrs:e}){const i=ze();function s(n){var l;if(n.type===2)return le(n.content);if(n.type===5){if(n.content.type===4){const c=n.content.content.match(/FORM-(\d+)/);if(c)return ie(De,null,()=>{var f;return ie(we,{...((f=i.components)==null?void 0:f.form)??{},formId:+c[1]})})}return le(n.loc.source)}if(n.type!==1)return[];const a=Object.fromEntries(((l=n.props)==null?void 0:l.map(c=>{var f;return[c.name,c.type===6?(f=c.value)==null?void 0:f.content:void 0]}))??[]),r=n.children.flatMap(s);if(["P"].includes(n.tag.toUpperCase())){const c=[];let f=[];for(const A of r)typeof A.type=="object"?(f.length&&c.push(x(n.tag,a,f)),c.push(A),f=[]):f.push(A);return f.length&&c.push(x(n.tag,a,f)),c}return x(n.tag,a,r)}return()=>{var n;return ie("div",Ge(e,((n=i.components)==null?void 0:n.text)??{}),t.value?Dt(t.value,{whitespace:"condense",onError:()=>null}).children.flatMap(s):[])}}});function Lt(t,e={}){const i=Ue(t,e),s=U(!1),n=U(),a=U([]);return i.onError(r=>{a.value=[],r.graphQLErrors.forEach(l=>{var c,f;((c=l.extensions)==null?void 0:c.category)==="validation"&&(a.value.push(l),(f=n.value)==null||f.setErrors(l.extensions.validation))})}),i.onDone(()=>{var r;s.value=!0,(r=n.value)==null||r.clearErrors(),a.value=[]}),{...i,mutate(r=null,l){return s.value=!1,He(l)?(n.value=l,i.mutate(r)):i.mutate(r,l)},finished:s,form:n,validationErrors:a}}const Rt=["Nederland","België","Duitsland","Nederlandse Antillen","Afghanistan","Albanië","Algerije","Amerikaanse Overzeese eilanden","Andorra","Angola","Anguilla","Antartica","Antigua","Argentinië","Armenië","Aruba","Australië","Azerbeidzjan","Bahama's","Bahrein","Bangladesh","Barbados","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnië-Herzegovina","Botswana","Bouvet","Brazilië","Brits Indiaanse Oceaangebied","Brunei","Bulgarije","Burkina Faso","Burundi","Cambodja","Canada","Centraal-Afrikaanse Republiek","Chili","China","Colombia","Comoren","Congo","Congo","Cookeiland","Costa Rica","Cuba","Cyprus","Denemarken","Djibouti","Dominica","Dominicaanse Republiek","Ecuador","Egypte","El Salvador","Equatoriaal Guinee","Eritrea","Estland","Ethiopië","Faeröer","Falklandeilanden","Fiji","Filipijnen","Finland","Frankrijk","Frans-Guyana","Frans-Polynesië","Franse zuidelijke territoria","Gabon","Gambia","Georgië","Ghana","Gibraltar","Grenada","Griekenland","Groenland","Guadeloupe","Guam","Guatemala","Guiee-Bissau","Guinee","Guyana","Haïti","Heard en McDonald eiland","Honduras","Hongarije","Hongkong","Ierland","Ijsland","India","Indonesië","Irak","Iran","Israël","Italië","Ivoorkust","Jamaica","Japan","Jemen","Joegoslavië","Jordanië","Kaaimaneilanden","Kaapverdië","Kameroen","Kazachstan","Kenia","Kersteiland","Kirgizië","Kiribati","Koeweit","Kokoseiland","Kroatië","Laos","Lesotho","Letland","Libanon","Liberia","Libië","Liechtenstein","Litouwen","Luxemburg","Maagdeneilanden (UK)","Maagdeneilanden (VS)","Macau","Macedonië","Madagaskar","Malawi","Malediven","Maleisië","Mali","Malta","Marokko","Marshalleilanden","Martinique","Mauretanië","Mauritius","Mayotte","Mexico","Micronesië","Moldavië","Monaco","Mongolië","Monsterrat","Mozambique","Myanmar","Namibië","Nauru","Nepal","Nicaragua","Nieuw-Caledonië","Nieuw-Zeeland","Niger","Nigeria","Niue","Noord-Korea","Noordelijke Mariana-eilanden","Noorwegen","Norkfolkeiland","Oekraïne","Oezbekistan","Oman","Oost-Timor","Oostenrijk","Pakistan","Palau","Panama","Papoea Nieuw-Guinea","Paraguay","Peru","Pitcairneiland","Polen","Portugal","Puerto Rico","Qatar","Reunion","Roemenië","Rusland","Rwanda","Samoa","Samoa","San Marino","Sao Tomé en Principe","Saudi-Arabië","Senegal","Seychellen","Sierra Leone","Singapore","Slovenië","Slowakije","Solomoneilanden","Somalië","Spanje","Sri Lanka","St. Helena","St. Kitts","St. Lucia","St. Pierre","St. Vincent","Sudan","Suriname","Svalbard en Jan Mayen","Swaziland","Syrië","Tadzjikistan","Taiwan","Tanzania","Thailand","Togo","Tokelau","Tonga","Trinidad en Tobago","Tsjaad","Tsjechië","Tunesië","Turkije","Turkmenistan","Turks- en Caico-eiland","Tuvalu","Uganda","Uruguay","Vanuatu","Vaticaanstad","Venezuela","Verenigd Koninkrijk","Verenigde Arabische Emiraten","Verenigde Staten","Vietnam","Wallis en Futuna","West-Sahara","Wit-Rusland","Zambia","Zimbabwe","Zuid-Afrika","Zuid-Georgië","Zuid-Korea","Zweden","Zwitserland"],Ft={class:"flex w-full justify-between space-x-2"},qt={class:"flex gap-2"},Vt=P({__name:"Address",props:{context:{}},setup(t){const e=t;function i(n){e.context.node.input(s(n)?n:{})}function s(n){return e.context.attrs.required?n?Object.entries(n).every(([a,r])=>a==="house_number_suffix"||(r==null?void 0:r.length)>0):!1:!0}return(n,a)=>{const r=X("FormKit");return v(),ee(r,{type:"group",ignore:!0,onInput:i},{default:re(()=>[B("div",Ft,[x(r,{name:"zipcode",label:n.$t("sofie.address.zipcode"),type:"text","outer-class":"grow"},null,8,["label"]),x(r,{name:"house_number",label:n.$t("sofie.address.house_number"),type:"text","outer-class":"grow"},null,8,["label"]),x(r,{name:"house_number_suffix",label:n.$t("sofie.address.house_number_suffix"),type:"text","outer-class":"w-1/5"},null,8,["label"])]),B("div",qt,[x(r,{name:"street",label:n.$t("sofie.address.street"),type:"text","outer-class":"grow"},null,8,["label"]),x(r,{name:"city",label:n.$t("sofie.address.city"),type:"text","outer-class":"grow"},null,8,["label"])]),x(r,{name:"country",label:n.$t("sofie.address.country"),options:D(Rt),type:"select","outer-class":"grow"},null,8,["label","options"])]),_:1})}}}),Ne=P({__name:"Explanation",props:{value:{}},setup(t){return(e,i)=>{const s=_e;return v(),ee(s,{value:e.value},null,8,["value"])}}}),Bt={class:"flex gap-6"},Pt={class:"w-3/6"},$t={class:"w-3/5"},jt=P({__name:"Name",props:{context:{}},setup(t){const e=t;function i(n){e.context.node.input(s(n)?n:{})}function s(n){return e.context.attrs.required?!!(n!=null&&n.first_name)&&!!(n!=null&&n.last_name):!0}return(n,a)=>{const r=X("FormKit");return v(),ee(r,{type:"group",ignore:!0,onInput:a[0]||(a[0]=l=>i(l))},{default:re(()=>[B("div",Bt,[B("div",Pt,[x(r,{type:"text",name:"first_name",label:n.$t("sofie.name.first_name")},null,8,["label"])]),B("div",$t,[x(r,{type:"text",name:"last_name",label:n.$t("sofie.name.last_name")},null,8,["label"])])])]),_:1})}}}),Kt=be`
  query form($id: ID!) {
    form(id: $id) {
      schema: schema_v2
    }
  }
`,Gt=be`
  mutation submitForm($id: ID!, $data: String!, $attachments: [FormFieldAttachment!]) {
    submitForm(form_id: $id, form_data: $data, attachments: $attachments) {
      confirm_url
    }
  }
`;function zt(t){const e=We(Kt,{id:t},{errorPolicy:"all"}),i=J(()=>{var n;return((n=e.result.value)==null?void 0:n.form)??{}}),s=J(()=>{var n,a;return(n=i.value)!=null&&n.schema?Wt((a=i.value)==null?void 0:a.schema):[]});return{...e,form:i,schema:s,plugin:ve,library:Ht}}function Ut(t={}){const e=Se(t);function i(n){return n&&{id:n.id,data:JSON.stringify(n.data),attachments:n.attachments}}const s=Lt(Gt,J(()=>({...e.value,variables:i(e.value.variables)})));return{...s,mutate(n,a){return s.mutate(i(n),a)}}}const Ht=Ve({explanation:Ne}),ve=()=>{};ve.library=t=>{switch(t.props.type){case"address":return t.define(ce(Vt));case"explanation":return t.define({type:"input",component:Ne});case"name":return t.define(ce(jt))}};function Wt(t){return t.map(e=>{switch(e.type){case"attachment":return{...e,$formkit:"file"};case"explanation":return{...e,$cmp:"explanation",props:{__raw__value:e.value}}}const i={...e,required:void 0,$formkit:e.type};return delete i.type,i.options&&Object.keys(i.options).length>0&&["checkbox","radio","select"].includes(e.type)?i.multiple=!1:delete i.options,e.required&&(i.validation="required"),i})}const Qt={key:0},Xt={key:1},we=P({__name:"SofieForm",props:{confirmationText:{},formId:{}},setup(t){const e=t,{t:i}=Qe(),{loading:s,schema:n,plugin:a,library:r,onError:l}=zt(Se(()=>+e.formId)),{loading:c,finished:f,mutate:A,onDone:k}=Ut(),M=U(!1);function R(m){return typeof m=="object"&&"$formkit"in m}function K(m){var E;return((E=n.value.find(y=>R(y)&&y.name===m))==null?void 0:E.$formkit)==="file"}function te(m,E){const y={data:m,attachments:[]};return Object.keys(m).forEach(C=>{!K(C)||m[C].length<1||(y.attachments.push({field_name:C,attachment:m[C][0].file}),m[C]=C)}),A({id:+e.formId,...y},E)}const Me=J(()=>c.value||s.value);return l(m=>{var y;((y=m.graphQLErrors)==null?void 0:y.find(C=>C.message==="Forbidden"))&&(M.value=!0)}),k(async({data:m})=>{var E;(E=m==null?void 0:m.submitForm)!=null&&E.confirm_url&&await Xe(m.submitForm.confirm_url,{external:!0})}),(m,E)=>{const y=_e,C=X("FormKitSchema"),Oe=X("FormKit");return v(),$("div",null,[D(f)?(v(),$("div",Qt,[Be(m.$slots,"confirmation",{},()=>[x(y,{value:m.confirmationText??D(i)("sofie.form.confirmation_text")},null,8,["value"])])])):D(M)?(v(),$("div",Xt,[x(y,{value:m.$t("sofie.form.private_text")},null,8,["value"])])):(v(),ee(Oe,{key:2,id:`form-${e.formId}`,type:"form",preserve:!0,disabled:D(Me),plugins:[D(a)],onSubmit:te},{default:re(()=>[x(C,{schema:D(n),library:D(r)},null,8,["schema","library"])]),_:1},8,["id","disabled","plugins"]))])}}}),Jt={key:0,class:"dark flex w-full max-w-xl flex-col items-center rounded-2xl bg-black p-12 sm:min-w-[36rem]"},Zt={class:"mb-6 text-center font-sans text-3xl font-bold md:text-4xl"},ni=P({__name:"ElementForm",props:{blok:{}},setup(t){return(e,i)=>{const s=we,n=Pe("editable");return $e((v(),$("div",null,[e.blok.form_id?(v(),$("div",Jt,[B("h2",Zt,je(e.blok.title),1),x(s,{class:"w-full","form-id":e.blok.form_id},null,8,["form-id"])])):Ke("",!0)])),[[n,e.blok]])}}});export{ni as default};
