%PDF- %PDF-
Direktori : /www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/ |
Current File : //www/varak.net/nextcloud.varak.net/apps_old/apps/text/js/infoDiagram-94cd232f-2GiJfq5o.chunk.mjs |
/*! third party licenses: js/vendor.LICENSE.txt */ import{l as U,aH as H,i as M}from"./mermaid.core-CHhv7cmw.chunk.mjs";import"./NcNoteCard-CImn6F9p-7OG_jBLc.chunk.mjs";import"./modulepreload-polyfill-DMTabKmO.chunk.mjs";import"./emoji-picker-SoWZqoso.chunk.mjs";import"./vue.runtime.esm-fZsuJKoo.chunk.mjs";var A=function(){var a=function(c,t,i,e){for(i=i||{},e=c.length;e--;i[c[e]]=t);return i},p=[6,9,10],_={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(c,t,i,e,s,n,o){switch(n.length-1,s){case 1:return e;case 4:break;case 6:e.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},a(p,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},a(p,[2,3]),a(p,[2,4]),a(p,[2,5]),a(p,[2,6])],defaultActions:{4:[2,1]},parseError:function(c,t){if(t.recoverable)this.trace(c);else{var i=new Error(c);throw i.hash=t,i}},parse:function(c){var t=this,i=[0],e=[],s=[null],n=[],o=this.table,O="",k=0,$=0,T=2,L=1,z=n.slice.call(arguments,1),r=Object.create(this.lexer),f={yy:{}};for(var I in this.yy)Object.prototype.hasOwnProperty.call(this.yy,I)&&(f.yy[I]=this.yy[I]);r.setInput(c,f.yy),f.yy.lexer=r,f.yy.parser=this,typeof r.yylloc>"u"&&(r.yylloc={});var w=r.yylloc;n.push(w);var F=r.options&&r.options.ranges;typeof f.yy.parseError=="function"?this.parseError=f.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(){var u;return u=e.pop()||r.lex()||L,typeof u!="number"&&(u instanceof Array&&(e=u,u=e.pop()),u=t.symbols_[u]||u),u}for(var h,g,l,E,m={},x,y,j,b;;){if(g=i[i.length-1],this.defaultActions[g]?l=this.defaultActions[g]:((h===null||typeof h>"u")&&(h=R()),l=o[g]&&o[g][h]),typeof l>"u"||!l.length||!l[0]){var S="";b=[];for(x in o[g])this.terminals_[x]&&x>T&&b.push("'"+this.terminals_[x]+"'");r.showPosition?S="Parse error on line "+(k+1)+":\n"+r.showPosition()+"\nExpecting "+b.join(", ")+", got '"+(this.terminals_[h]||h)+"'":S="Parse error on line "+(k+1)+": Unexpected "+(h==L?"end of input":"'"+(this.terminals_[h]||h)+"'"),this.parseError(S,{text:r.match,token:this.terminals_[h]||h,line:r.yylineno,loc:w,expected:b})}if(l[0]instanceof Array&&l.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+h);switch(l[0]){case 1:i.push(h),s.push(r.yytext),n.push(r.yylloc),i.push(l[1]),h=null,$=r.yyleng,O=r.yytext,k=r.yylineno,w=r.yylloc;break;case 2:if(y=this.productions_[l[1]][1],m.$=s[s.length-y],m._$={first_line:n[n.length-(y||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(y||1)].first_column,last_column:n[n.length-1].last_column},F&&(m._$.range=[n[n.length-(y||1)].range[0],n[n.length-1].range[1]]),E=this.performAction.apply(m,[O,$,k,f.yy,l[1],s,n].concat(z)),typeof E<"u")return E;y&&(i=i.slice(0,-1*y*2),s=s.slice(0,-1*y),n=n.slice(0,-1*y)),i.push(this.productions_[l[1]][0]),s.push(m.$),n.push(m._$),j=o[i[i.length-2]][i[i.length-1]],i.push(j);break;case 3:return!0}}return!0}},d=function(){var c={EOF:1,parseError:function(t,i){if(this.yy.parser)this.yy.parser.parseError(t,i);else throw new Error(t)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var i=t.match(/(?:\r\n?|\n).*/g);return i?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,e=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),e.length-1&&(this.yylineno-=e.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:e?(e.length===s.length?this.yylloc.first_column:0)+s[s.length-e.length].length-e[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var e,s,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),s=t[0].match(/(?:\r\n?|\n).*/g),s&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],e=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),e)return e;if(this._backtrack){for(var o in n)this[o]=n[o];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,i,e,s;this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),o=0;o<n.length;o++)if(e=this._input.match(this.rules[n[o]]),e&&(!i||e[0].length>i[0].length)){if(i=e,s=o,this.options.backtrack_lexer){if(t=this.test_match(e,n[o]),t!==!1)return t;if(this._backtrack){i=!1;continue}else return!1}else if(!this.options.flex)break}return i?(t=this.test_match(i,n[s]),t!==!1?t:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){var t=this.conditionStack.length-1;return t>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return t=this.conditionStack.length-1-Math.abs(t||0),t>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,e,s){switch(e){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return c}();_.lexer=d;function v(){this.yy={}}return v.prototype=_,_.Parser=v,new v}();A.parser=A;const X=A,N={info:!1};let P=N.info;const Y=a=>{P=a},q=()=>P,B=()=>{P=N.info},C={clear:B,setInfo:Y,getInfo:q},D=(a,p,_)=>{U.debug("rendering info diagram\n"+a);const d=H(p);M(d,100,400,!0),d.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text("v".concat(_))},G={draw:D},Z={parser:X,db:C,renderer:G};export{Z as diagram};