"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5122],{5122:function(e,O,t){t.r(O),t.d(O,{completeFromSchema:function(){return C},xml:function(){return w},xmlLanguage:function(){return W}});var n=t(53105),l=t(35524);let a=null,r=null,s=0;function o(e,O){var t;let n=e.pos+O;if(r==e&&s==n)return a;for(;9==(t=e.peek(O))||10==t||13==t||32==t;)O++;let l="";for(;;){let t=e.peek(O);if(!(45==t||46==t||58==t||t>=65&&t<=90||95==t||t>=97&&t<=122||t>=161))break;l+=String.fromCharCode(t),O++}return r=e,s=n,a=l||null}function y(e,O){this.name=e,this.parent=O,this.hash=O?O.hash:0;for(let O=0;O1==O?new y(o(n,1)||"",e):e,reduce:(e,O)=>11==O&&e?e.parent:e,reuse(e,O,t,n){let l=O.type.id;return 1==l||13==l?new y(o(n,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),p=new n.Jq((e,O)=>{if(60==e.next){if(e.advance(),47==e.next){e.advance();let t=o(e,0);if(!t)return e.acceptToken(5);if(O.context&&t==O.context.name)return e.acceptToken(2);for(let n=O.context;n;n=n.parent)if(n.name==t)return e.acceptToken(3,-2);e.acceptToken(4)}else if(33!=e.next&&63!=e.next)return e.acceptToken(1)}},{contextual:!0});function $(e,O){return new n.Jq(t=>{for(let n=0,l=0;;l++){if(t.next<0){l&&t.acceptToken(e);break}if(t.next==O.charCodeAt(n)){if(++n==O.length){l>=O.length&&t.acceptToken(e,1-O.length);break}}else n=t.next==O.charCodeAt(0)?1:0;t.advance()}})}let c=$(35,"-->"),S=$(36,"?>"),u=$(37,"]]>"),m=(0,l.Gv)({Text:l.pJ.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":l.pJ.angleBracket,TagName:l.pJ.tagName,"MismatchedCloseTag/Tagname":[l.pJ.tagName,l.pJ.invalid],AttributeName:l.pJ.attributeName,AttributeValue:l.pJ.attributeValue,Is:l.pJ.definitionOperator,"EntityReference CharacterReference":l.pJ.character,Comment:l.pJ.blockComment,ProcessingInst:l.pJ.processingInstruction,DoctypeDecl:l.pJ.documentMeta,Cdata:l.pJ.special(l.pJ.string)}),f=n.WQ.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<`#X;'S%y;'S;=`&_<%lO%yX>eV{WOr%ysv%yw#T%y#T#U>z#U;'S%y;'S;=`&_<%lO%yX?PV{WOr%ysv%yw#h%y#h#i?f#i;'S%y;'S;=`&_<%lO%yX?kV{WOr%ysv%yw#T%y#T#U",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=e.textContent?e.textContent.map(e=>({label:e,type:"text"})):[]}}let v=/^[:\-\.\w\u00b7-\uffff]*$/;function T(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function b(e){return"string"==typeof e?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function C(e,O){let t=[],n=[],l=Object.create(null);for(let e of O){let O=T(e);t.push(O),e.global&&n.push(O),e.values&&(l[e.name]=e.values.map(b))}let a=[],r=[],s=Object.create(null);for(let O of e){let e=n,o=l;O.attributes&&(e=e.concat(O.attributes.map(e=>"string"==typeof e?t.find(O=>O.label==e)||{label:e,type:"property"}:(e.values&&(o==l&&(o=Object.create(o)),o[e.name]=e.values.map(b)),T(e)))));let y=new h(O,e,o);s[y.name]=y,a.push(y),O.top&&r.push(y)}r.length||(r=a);for(let O=0;O{var O;let{doc:t}=e.state,o=function(e,O){var t;let n=(0,g.qz)(e).resolveInner(O,-1),l=null;for(let e=n;!l&&e.parent;e=e.parent)("OpenTag"==e.name||"CloseTag"==e.name||"SelfClosingTag"==e.name||"MismatchedCloseTag"==e.name)&&(l=e);if(l&&(l.to>O||l.lastChild.type.isError)){let e=l.parent;if("TagName"==n.name)return"CloseTag"==l.name||"MismatchedCloseTag"==l.name?{type:"closeTag",from:n.from,context:e}:{type:"openTag",from:n.from,context:_(e)};if("AttributeName"==n.name)return{type:"attrName",from:n.from,context:l};if("AttributeValue"==n.name)return{type:"attrValue",from:n.from,context:l};let t=n==l||"Attribute"==n.name?n.childBefore(O):n;return(null==t?void 0:t.name)=="StartTag"?{type:"openTag",from:O,context:_(e)}:(null==t?void 0:t.name)=="StartCloseTag"&&t.to<=O?{type:"closeTag",from:O,context:e}:(null==t?void 0:t.name)=="Is"?{type:"attrValue",from:O,context:l}:t?{type:"attrName",from:O,context:l}:null}if("StartCloseTag"==n.name)return{type:"closeTag",from:O,context:n.parent};for(;n.parent&&n.to==O&&!(null===(t=n.lastChild)||void 0===t?void 0:t.type.isError);)n=n.parent;return"Element"==n.name||"Text"==n.name||"Document"==n.name?{type:"tag",from:O,context:"Element"==n.name?n:_(n)}:null}(e.state,e.pos);if(!o||"tag"==o.type&&!e.explicit)return null;let{type:y,from:i,context:p}=o;if("openTag"==y){let e=r,O=P(t,p);if(O){let t=s[O];e=(null==t?void 0:t.children)||a}return{from:i,options:e.map(e=>e.completion),validFor:v}}if("closeTag"==y){let n=P(t,p);return n?{from:i,to:e.pos+(">"==t.sliceString(e.pos,e.pos+1)?1:0),options:[(null===(O=s[n])||void 0===O?void 0:O.closeNameCompletion)||{label:n+">",type:"type"}],validFor:v}:null}if("attrName"==y){let e=s[d(t,p)];return{from:i,options:(null==e?void 0:e.attrs)||n,validFor:v}}if("attrValue"==y){let O,n;let a=(n=(O=p&&p.getChildren("Attribute").find(e=>e.from<=i&&e.to>=i))&&O.getChild("AttributeName"))?t.sliceString(n.from,n.to):"";if(!a)return null;let r=s[d(t,p)],o=((null==r?void 0:r.attrValues)||l)[a];return o&&o.length?{from:i,to:e.pos+('"'==t.sliceString(e.pos,e.pos+1)?1:0),options:o,validFor:/^"[^"]*"?$/}:null}{if("tag"!=y)return null;let O=P(t,p),n=s[O],l=[],o=p&&p.lastChild;O&&(!o||"CloseTag"!=o.name||d(t,o)!=O)&&l.push(n?n.closeCompletion:{label:"",type:"type",boost:2});let $=l.concat(((null==n?void 0:n.children)||(p?a:r)).map(e=>e.openCompletion));if(p&&(null==n?void 0:n.text.length)){let O=p.firstChild;O.to>e.pos-20&&!/\S/.test(e.state.sliceDoc(O.to,e.pos))&&($=$.concat(n.text))}return{from:i,options:$,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}}}let W=g.qp.define({name:"xml",parser:f.configure({props:[g.uj.add({Element(e){let O=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(O?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit}),g.x0.add({Element(e){let O=e.firstChild,t=e.lastChild;return O&&"OpenTag"==O.name?{from:O.to,to:"CloseTag"==t.name?t.from:e.to}:null}}),g.a0.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:""}},indentOnInput:/^\s*<\/$/}});function w(e={}){return new g.ri(W,W.data.of({autocomplete:C(e.elements||[],e.attributes||[])}))}}}]); //# sourceMappingURL=5122.9d657dc7673fd6f5.js.map