isorite 0.17.0 → 0.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +1541 -59
- package/package.json +4 -1
- package/web/_app/immutable/assets/{0.DVQOzs4l.css → 0.BGpjfMlq.css} +1 -1
- package/web/_app/immutable/chunks/{2BcU70Iq.js → -_CDfwKC.js} +1 -1
- package/web/_app/immutable/chunks/{DrPF-vh8.js → -oRvYXNk.js} +1 -1
- package/web/_app/immutable/chunks/0qd6IUbO.js +1 -0
- package/web/_app/immutable/chunks/{yy6sD_us.js → 7faei0hL.js} +1 -1
- package/web/_app/immutable/chunks/{BNlziJ_1.js → BArcFmbE.js} +3 -3
- package/web/_app/immutable/chunks/{NgkOM4d0.js → BF1TezEe.js} +1 -1
- package/web/_app/immutable/chunks/{DK9wjWIk.js → BF3mdiSX.js} +1 -1
- package/web/_app/immutable/chunks/BFOLKM4z.js +1 -0
- package/web/_app/immutable/chunks/{BbvUCVY_.js → BezGs1Zj.js} +1 -1
- package/web/_app/immutable/chunks/Bg-39frG.js +1 -0
- package/web/_app/immutable/chunks/{CM4EA3Wo.js → BleKqNM1.js} +1 -1
- package/web/_app/immutable/chunks/{BjLgp18-.js → BpHE30PI.js} +1 -1
- package/web/_app/immutable/chunks/{Ds9L6FPB.js → BtF1frCE.js} +1 -1
- package/web/_app/immutable/chunks/{D_xpsaTJ.js → BuNfZSU6.js} +1 -1
- package/web/_app/immutable/chunks/{0KrpTYPM.js → BubCsN15.js} +1 -1
- package/web/_app/immutable/chunks/{_zY4mrA0.js → BvhVny3O.js} +1 -1
- package/web/_app/immutable/chunks/{CcRcjPTM.js → Bvs-JCN-.js} +1 -1
- package/web/_app/immutable/chunks/{1W6iRjg5.js → C-F98t31.js} +1 -1
- package/web/_app/immutable/chunks/{rv_cF9pp.js → C1OaBy7n.js} +1 -1
- package/web/_app/immutable/chunks/{CMN7rSZK.js → C4SqDe8e.js} +1 -1
- package/web/_app/immutable/chunks/{BBU5FdEo.js → C74H8jNb.js} +1 -1
- package/web/_app/immutable/chunks/{Cn7j5NKi.js → C7bouMY8.js} +1 -1
- package/web/_app/immutable/chunks/{vGOSIW7X.js → C8IrXs1w.js} +1 -1
- package/web/_app/immutable/chunks/{CwcA6hab.js → CGGjDDVZ.js} +1 -1
- package/web/_app/immutable/chunks/{CccIbhmH.js → CL9QeiGC.js} +2 -2
- package/web/_app/immutable/chunks/{CabmfniL.js → CMAnq3x6.js} +1 -1
- package/web/_app/immutable/chunks/{Bx_Vz2qr.js → CMe14KUo.js} +1 -1
- package/web/_app/immutable/chunks/{DQJRaTNz.js → CXc9Iibq.js} +1 -1
- package/web/_app/immutable/chunks/Cb-KPahQ.js +1 -0
- package/web/_app/immutable/chunks/{CpJ4vfn-.js → Cf13Ew0A.js} +1 -1
- package/web/_app/immutable/chunks/{CQhfj5-f.js → CkSjC-iE.js} +3 -3
- package/web/_app/immutable/chunks/{sBy91tGs.js → Cn8Mg7_E.js} +1 -1
- package/web/_app/immutable/chunks/{1MewxdCy.js → CoeYsgbS.js} +1 -1
- package/web/_app/immutable/chunks/{DJHLXLij.js → CrqOdm1D.js} +1 -1
- package/web/_app/immutable/chunks/{B-04K_Pl.js → CyJXJYoE.js} +1 -1
- package/web/_app/immutable/chunks/{CxEu-Di8.js → Cz6kYWmu.js} +1 -1
- package/web/_app/immutable/chunks/{ZDjPMhAb.js → CzbFy3_5.js} +1 -1
- package/web/_app/immutable/chunks/{yYKJ4mbq.js → D-9suc4b.js} +1 -1
- package/web/_app/immutable/chunks/{qfBACIi9.js → D37hxBaz.js} +1 -1
- package/web/_app/immutable/chunks/D7yT4F_8.js +517 -0
- package/web/_app/immutable/chunks/{CmFzeyfe.js → DNs5kWvM.js} +1 -1
- package/web/_app/immutable/chunks/DQp-M3XN.js +1 -0
- package/web/_app/immutable/chunks/{C2EzU0qX.js → DR5d84Z7.js} +1 -1
- package/web/_app/immutable/chunks/{C2QvvHIN.js → DaEL1AOW.js} +1 -1
- package/web/_app/immutable/chunks/{BCsFs14H.js → Dazeexma.js} +1 -1
- package/web/_app/immutable/chunks/{DqZ4UzUH.js → Dc2_04md.js} +1 -1
- package/web/_app/immutable/chunks/{DfLI-CvW.js → Dcjgv4h2.js} +1 -1
- package/web/_app/immutable/chunks/{CRbUrapz.js → DgI3Vj5v.js} +1 -1
- package/web/_app/immutable/chunks/{fpNFwizw.js → Dgko1xMH.js} +1 -1
- package/web/_app/immutable/chunks/{DS7XcdHs.js → DlgOmQ_G.js} +1 -1
- package/web/_app/immutable/chunks/{DMTkA0aK.js → DmS5Qyvl.js} +1 -1
- package/web/_app/immutable/chunks/{DeazQJkV.js → DqnDX3G8.js} +1 -1
- package/web/_app/immutable/chunks/{DMpFmiFg.js → DyZdoKBK.js} +1 -1
- package/web/_app/immutable/chunks/{DEwfz-Il.js → DzAOHjhV.js} +1 -1
- package/web/_app/immutable/chunks/{DRKiKCov.js → Iqegk1SI.js} +1 -1
- package/web/_app/immutable/chunks/{Cl-Xmm9N.js → ONqdwA3r.js} +1 -1
- package/web/_app/immutable/chunks/{Dns-yz2Q.js → Oikibjm2.js} +1 -1
- package/web/_app/immutable/chunks/{CdD6waB-.js → T3u7Skc8.js} +1 -1
- package/web/_app/immutable/chunks/{Df3spPXn.js → cWWhqL1F.js} +1 -1
- package/web/_app/immutable/chunks/{CfTuc06U.js → fRXyV4Ec.js} +1 -1
- package/web/_app/immutable/chunks/{Dzu8v7nB.js → jAC4YCqW.js} +1 -1
- package/web/_app/immutable/chunks/{CB6ztdCQ.js → kFEqmLql.js} +1 -1
- package/web/_app/immutable/chunks/{BBhr3bLI.js → y0C1JQ1v.js} +1 -1
- package/web/_app/immutable/chunks/{CAuYgj5q.js → yvD4_bP8.js} +1 -1
- package/web/_app/immutable/entry/app.CyEmP0i2.js +2 -0
- package/web/_app/immutable/entry/start.BxCHvKWL.js +1 -0
- package/web/_app/immutable/nodes/0.Bkbiw_sA.js +11 -0
- package/web/_app/immutable/nodes/1.kdx6h8ts.js +1 -0
- package/web/_app/immutable/nodes/2.CtK7BGB8.js +1 -0
- package/web/_app/immutable/nodes/3.D5PZa2kH.js +1 -0
- package/web/_app/immutable/nodes/4.DzS8oPUH.js +3 -0
- package/web/_app/immutable/nodes/5.B-1BDKsL.js +19 -0
- package/web/_app/immutable/nodes/6.DDT1DtCg.js +1 -0
- package/web/_app/immutable/nodes/7.CCNCaItj.js +1 -0
- package/web/_app/version.json +1 -1
- package/web/index.html +17 -17
- package/web/_app/immutable/chunks/BJOSVfg-.js +0 -1
- package/web/_app/immutable/chunks/CHjmZsHD.js +0 -1
- package/web/_app/immutable/chunks/DH2bqH7t.js +0 -517
- package/web/_app/immutable/chunks/Ddw9FbDu.js +0 -1
- package/web/_app/immutable/chunks/IECP4ppk.js +0 -1
- package/web/_app/immutable/chunks/ZDkogIhD.js +0 -1
- package/web/_app/immutable/entry/app.CX19wIuG.js +0 -2
- package/web/_app/immutable/entry/start.DaiosA4i.js +0 -1
- package/web/_app/immutable/nodes/0.B6_Ycc14.js +0 -3
- package/web/_app/immutable/nodes/1.JA1sPybf.js +0 -1
- package/web/_app/immutable/nodes/2.DN2phYmE.js +0 -1
- package/web/_app/immutable/nodes/3.CbnLNp2F.js +0 -1
- package/web/_app/immutable/nodes/4.CIsG7Kdu.js +0 -3
- package/web/_app/immutable/nodes/5.D__u9ji8.js +0 -19
- package/web/_app/immutable/nodes/6.DBP0fpLt.js +0 -1
- package/web/_app/immutable/nodes/7.DuaH9aUr.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,v as l,x as u}from"./
|
|
1
|
+
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,v as l,x as u}from"./DlgOmQ_G.js";import{a as d,o as f,t as p}from"./DciMwFJ1.js";import{a as m,i as h,l as g,s as _}from"./BF3mdiSX.js";import{n as v}from"./T3u7Skc8.js";import{n as y}from"./BvhVny3O.js";import{o as b,t as ee}from"./-oRvYXNk.js";import{t as x}from"./BZmnMkFw.js";import{t as S}from"./D6QVYUu9.js";import{i as te,n as ne,r as re,t as ie}from"./CXc9Iibq.js";import{i as ae,n as oe,r as se,t as C}from"./CMe14KUo.js";import{_ as w,d as T,g as E,h as D,s as O,u as ce}from"./BArcFmbE.js";function k(e){return e===`#`||e===`+`||e===`~`||e===`-`}var A=class{id=``;memberType;visibility=``;classifier=``;parameters=``;returnType=``;constructor(e,t){this.memberType=t,(t!==`method`||!this.parseMethod(e))&&this.parseAttribute(e),this.id=this.id.startsWith(` `)?` `+this.id.trim():this.id.trim()}parseMethod(e){let t=e.length;for(let n=0;n<t;){let r=n;for(;r<t&&!w(e.charCodeAt(r));)r++;let i=r-1;for(;i>n&&e.charCodeAt(i)!==41;)i--;let a=i-1;for(;a>n&&e.charCodeAt(a)!==40;)a--;if(a>n){let r=e[n],o=k(r)&&a>n+1;o&&(this.visibility=r),this.id=e.slice(o?n+1:n,a),this.parameters=e.slice(a+1,i).trim();let s=i+1,c=``;if(s<t){let t=e[s];(t===`$`||t===`*`||t.trim()===``)&&(c=t.trim(),s++)}let l=s;for(;l<t&&!w(e.charCodeAt(l));)l++;if(this.returnType=e.slice(s,l).trim(),c===``){let e=this.returnType.slice(-1);(e===`$`||e===`*`)&&(c=e,this.returnType=this.returnType.slice(0,-1))}return this.classifier=c,!0}n=r+1}return this.memberType=`attribute`,!1}parseAttribute(e){let t=e.slice(0,1),n=e.slice(-1);k(t)&&(this.visibility=t),(n===`$`||n===`*`)&&(this.classifier=n),this.id=e.substring(this.visibility===``?0:1,this.classifier===``?e.length:e.length-1)}getDisplayDetails(){let e=this.visibility+x(this.id);return this.memberType===`method`&&(e+=`(${x(this.parameters.trim())})`,this.returnType&&(e+=` : `+x(this.returnType))),{displayText:e.trim(),cssStyle:this.parseClassifier()}}parseClassifier(){return this.classifier===`*`?`font-style:italic;`:this.classifier===`$`?`text-decoration:underline;`:``}},j={LINE:0,DOTTED_LINE:1},M={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},N=`classId-`;function P(e){let t=e.indexOf(`~`);if(t<=0)return{className:e,type:``};let n=e.indexOf(`~`,t+1);return{className:e.slice(0,t),type:e.slice(t+1,n===-1?e.length:n)}}function le(e){let t=e.charCodeAt(0);return P(t>=48&&t<=57?N+e:e).className}var F=class{type=`class`;lineType=j;relationType=M;direction=`TB`;classes=new Map;relations=[];notes=new Map;namespaces=new Map;interfaces=[];styleClasses=new Map;title;accTitle;accDescr;namespaceStack=[];withCssClass=new Map;addClass(e){let{className:t,type:n}=P(e);if(this.classes.has(t))return;let r={id:t,type:n,label:t,cssClasses:`default`,methods:[],members:[],annotations:[],styles:[]};this.classes.set(t,r),this.tag(r,`default`)}tag(e,t){let n=this.withCssClass.get(t);n?n.add(e):this.withCssClass.set(t,new Set([e]))}ensure(e){return this.addClass(e),this.classes.get(P(e).className)}setClassLabel(e,t){this.ensure(e).label=t}addRelation(e){let{type1:t,type2:n}=e.relation;t===M.LOLLIPOP&&n===`none`?(this.addClass(e.id2),e.id1=this.addInterface(e.id1,e.id2)):n===M.LOLLIPOP&&t===`none`?(this.addClass(e.id1),e.id2=this.addInterface(e.id2,e.id1)):(this.addClass(e.id1),this.addClass(e.id2)),e.id1=P(e.id1).className,e.id2=P(e.id2).className,e.relationTitle1=e.relationTitle1.trim(),e.relationTitle2=e.relationTitle2.trim(),this.relations.push(e)}addInterface(e,t){let n=`interface${this.interfaces.length}`;return this.interfaces.push({id:n,label:e,classId:t}),n}addAnnotation(e,t){this.ensure(e).annotations.push(t)}addMember(e,t){let n=this.ensure(e);if(typeof t!=`string`)return;let r=t.trim();if(r.startsWith(`<<`)&&r.endsWith(`>>`))n.annotations.push(r.substring(2,r.length-2));else if(r.indexOf(`)`)>0){let e=new A(r,`method`);(e.memberType===`method`?n.methods:n.members).push(e)}else r&&n.members.push(new A(r,`attribute`))}addMembers(e,t){if(Array.isArray(t)){t.reverse();for(let n of t)this.addMember(e,n)}}addNote(e,t){let n=this.notes.size,r=`note${n}`;return this.notes.set(r,{id:r,class:t,text:e,index:n}),r}cleanupLabel(e){return(e.startsWith(`:`)?e.substring(1):e).trim()}setCssClass(e,t){for(let n of e.split(`,`)){let e=this.classes.get(le(n));if(e!==void 0){e.cssClasses+=` `+t;for(let n of t.split(` `))this.tag(e,n)}}}defineClass(e,t){for(let n of e){let e=this.styleClasses.get(n);if(e===void 0&&(e={id:n,styles:[],textStyles:[]},this.styleClasses.set(n,e)),!t)continue;for(let n of t)n.includes(`color`)&&e.textStyles.push(n.replace(`fill`,`bgFill`)),e.styles.push(n);let r=this.withCssClass.get(n);if(r===void 0)continue;let i=t.flatMap(e=>e.split(`,`));for(let e of r)for(let t of i)e.styles.push(t)}}setTooltip(e,t){if(t!==void 0)for(let n of e.split(`,`)){let e=this.classes.get(P(n).className);e&&(e.tooltip=t)}}setLink(e,t,n){let r=T(t).trim();for(let t of e.split(`,`)){let e=this.classes.get(le(t));e&&(e.link=r?b(r):void 0,e.linkTarget=typeof n==`string`?n:`_blank`)}this.setCssClass(e,`clickable`)}setClickEvent(e,t,n){for(let t of e.split(`,`)){let e=this.classes.get(P(t).className);e&&(e.haveCallback=!0)}this.setCssClass(e,`clickable`)}setDirection(e){this.direction=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}addNamespace(e,t){let n=this.namespaceStack[this.namespaceStack.length-1],r=n?`${n}.${e}`:e;this.namespaceStack.push(r);let i=this.namespaces.get(r);if(i)return i.explicit=!0,t&&(i.label=t),r;let a=n||void 0,o=n?n.length+1:0;for(;;){let e=r.indexOf(`.`,o),n=e===-1,i=n?r:r.slice(0,e),s=this.namespaces.get(i);if(s===void 0){let c=r.slice(o,n?r.length:e);s={id:i,label:n&&t?t:c,classes:new Map,notes:new Map,children:new Map,parent:a,explicit:n},this.namespaces.set(i,s)}else n&&(s.explicit=!0);let c=a?this.namespaces.get(a):void 0;if(c&&(c.children.has(i)||c.children.set(i,s),s.parent??=a),n)return r;a=i,o=e+1}}popNamespace(){this.namespaceStack.pop()}addClassesToNamespace(e,t,n){let r=this.namespaces.get(e);if(r!==void 0){for(let n of t){let{className:t}=P(n),i=this.classes.get(t);i!==void 0&&(i.parent=e,r.classes.set(t,i))}for(let t of n){let n=this.notes.get(t);n!==void 0&&(n.parent=e,r.notes.set(t,n))}}}setCssStyle(e,t){let n=this.classes.get(e);if(t&&n)for(let e of t)for(let t of e.split(`,`))n.styles.push(t)}},ue=`$end.INVALID.CLASS_DIAGRAM.NEWLINE.EOF.SQS.STR.SQE.DOT.GENERICTYPE.LABEL.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.STRUCT_START.STRUCT_STOP.NAMESPACE.STYLE_SEPARATOR.ANNOTATION_START.ANNOTATION_END.CLASS.MEMBER.NOTE_FOR.NOTE.CLASSDEF.ALPHA.COMMA.direction_tb.direction_bt.direction_rl.direction_lr.AGGREGATION.EXTENSION.COMPOSITION.DEPENDENCY.LOLLIPOP.LINE.DOTTED_LINE.CALLBACK.LINK.LINK_TARGET.CLICK.CALLBACK_NAME.CALLBACK_ARGS.HREF.STYLE.CSSCLASS.COLON.BRKT.PCT.MINUS.UNICODE_TEXT.BQUOTE_STR.EDGE_STATE.EOF_IN_STRUCT.OPEN_IN_STRUCT.PLUS.EQUALS.PUNCTUATION`.split(`.`),de=[4,6,4,9,44,45,12,14,15,4,56,4,56],fe=[/.*direction\s+TB[^\n]*/y,/.*direction\s+BT[^\n]*/y,/.*direction\s+RL[^\n]*/y,/.*direction\s+LR[^\n]*/y],I=/[\n\r\u2028\u2029]/g;function L(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=e.indexOf(`direction`),l=-1,u=0,d=(t,a,o)=>(n.push(t),r.push(e.slice(a,o)),i.push(a),s=o,!0),f=e=>{a.push(o),o=e},p=()=>{a.length>0&&(o=a.pop())},m=t=>e.startsWith(t,s)&&!E(e.charCodeAt(s+t.length)),h=n=>{for(;n<t&&D(e.charCodeAt(n));)n++;return n},g=n=>{let r=e.indexOf(n,s);return r===-1?t:r},_=n=>{let r=s,i=-1;for(let n=e.charCodeAt(r);r<t&&D(n);n=e.charCodeAt(++r))n===10&&(i=r);i<0?s=r:(n&&p(),d(3,s,i+1))},v=t=>{switch(t){case 99:if(m(`cssClass`))return d(48,s,s+8);if(m(`callback`))return d(40,s,s+8);if(m(`click`))return d(43,s,s+5);break;case 108:if(m(`link`))return d(41,s,s+4);break;case 110:if(m(`note for`))return d(24,s,s+8);if(m(`note`))return d(25,s,s+4);break;case 60:if(e.charCodeAt(s+1)===60)return d(20,s,s+2);break;case 62:if(e.charCodeAt(s+1)===62)return d(21,s,s+2);break;case 104:if(m(`href`))return d(46,s,s+4)}return!1},y=n=>{if(v(n))return!0;let r=e.charCodeAt(s+1);switch(n){case 34:return f(1),s++,!0;case 126:return f(3),s++,!0;case 96:return f(2),s++,!0;case 95:if(m(`_self`))return d(42,s,s+5);if(m(`_blank`))return d(42,s,s+6);if(m(`_parent`))return d(42,s,s+7);if(m(`_top`))return d(42,s,s+4);break;case 60:return r===124?d(34,s,s+2):d(36,s,s+1);case 124:return r===62&&d(34,s,s+2);case 62:return d(36,s,s+1);case 42:return d(35,s,s+1);case 111:if(!E(r))return d(33,s,s+1);break;case 40:return r===41&&d(37,s,s+2);case 45:return r===45?d(38,s,s+2):d(52,s,s+1);case 46:return r===46?d(39,s,s+2):d(8,s,s+1);case 58:{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===58||t===10||t===59)break;n++}return n>s+1?d(10,s,n):r===58&&e.charCodeAt(s+2)===58&&d(19,s,s+3)}case 43:return d(58,s,s+1);case 37:return d(51,s,s+1);case 61:return d(59,s,s+1);case 91:return d(5,s,s+1);case 93:return d(7,s,s+1);case 33:case 35:case 36:case 38:case 39:case 44:case 63:case 92:case 47:return d(60,s,s+1)}if(E(n)){let t=s+1;for(;E(e.charCodeAt(t));)t++;return d(27,s,t)}return S(n)&&d(53,s,s+1)},b=()=>{if(c===-1||s<u||(c<s&&(c=e.indexOf(`direction`,s)),c===-1)||(l<s&&(I.lastIndex=s,l=I.test(e)?I.lastIndex-1:t),c>=l))return!1;for(let t=0;t<4;t++){let n=fe[t];if(n.lastIndex=s,n.test(e))return d(29+t,s,n.lastIndex)}return u=l,!1},ee=n=>{if(b())return!0;if(D(n))return _(!1),!0;switch(n){case 37:if(e.charCodeAt(s+1)===37){let n=g(`
|
|
3
3
|
`);for(;n<t&&(e.charCodeAt(n)===10||e.charCodeAt(n)===13);)n++;return s=n,!0}break;case 97:{let t=e.startsWith(`accTitle`,s);if(!t&&!e.startsWith(`accDescr`,s))break;let n=h(s+8),r=e.charCodeAt(n);if(r===58)return d(t?11:13,s,h(n+1)),f(t?6:7),!0;if(r===123&&!t)return s=h(n+1),f(8),!0;break}case 99:if(m(`classDiagram-v2`))return d(2,s,s+15);if(m(`classDiagram`))return d(2,s,s+12);if(e.startsWith(`call`,s)&&D(e.charCodeAt(s+4)))return s=h(s+4),f(4),!0;if(m(`classDef`))return d(26,s,s+8);if(m(`class`))return f(9),d(22,s,s+5);break;case 91:if(e.startsWith(`*]`,s+1))return d(55,s,s+3);break;case 115:if(m(`style`))return d(47,s,s+5);break;case 110:if(m(`namespace`))return f(11),d(18,s,s+9);break;case 44:return d(28,s,s+1);case 35:return d(50,s,s+1)}return y(n)||n===58&&d(49,s,s+1)};for(;;){if(s>=t){n.push(de[o]),r.push(``),i.push(t);break}let a=e.charCodeAt(s),c=!0;switch(o){case 0:c=ee(a);break;case 9:D(a)?_(!0):a===125?(p(),p(),d(17,s,s+1)):a===123?(f(10),d(16,s,s+1)):c=y(a);break;case 10:if(a===34)f(1),s++;else if(a===125)p(),d(17,s,s+1);else if(a===91&&e.startsWith(`*]`,s+1))d(55,s,s+3);else if(a===123)d(57,s,s+1);else if(a===10)s++;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===123||t===125||t===10)break;n++}d(23,s,n)}break;case 11:D(a)?_(!0):a===123?(f(12),d(16,s,s+1)):a===125?p():a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):c=y(a);break;case 12:D(a)?_(!1):a===125?(p(),d(17,s,s+1)):a===110&&m(`namespace`)?(f(11),d(18,s,s+9)):a===91&&e.startsWith(`*]`,s+1)?d(55,s,s+3):a===99&&m(`class`)?(f(9),d(22,s,s+5)):c=y(a);break;case 1:a===34?(p(),s++):d(6,s,g(`"`));break;case 3:if(a===34)f(1),s++;else{if(v(a))break;a===126?(p(),s++):d(9,s,g(`~`))}break;case 2:if(a===34)f(1),s++;else{if(v(a))break;a===126?(f(3),s++):a===96?(p(),s++):d(54,s,g("`"))}break;case 4:if(a===40){let t=h(s+1);p(),e.charCodeAt(t)===41?s=t+1:(f(5),s++)}else d(44,s,g(`(`));break;case 5:a===41?(p(),s++):d(45,s,g(`)`));break;case 6:case 7:d(o===6?12:14,s,g(`
|
|
4
4
|
`)),p();break;case 8:a===125?(p(),s++):d(15,s,g(`}`))}if(!c)return n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i}}return n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var R=61,z=new Uint8Array(R);for(let e of[53,27,52])z[e]=1;var pe=new Uint8Array(R);for(let e of[27,49,50,47,51,10])pe[e]=1;var B=new Uint8Array(R);B[33]=1,B[34]=2,B[35]=3,B[36]=4,B[37]=5;var V=`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS', 'BQUOTE_STR'`;function me(e,t){let{types:n,texts:r,starts:i}=L(e),a=0,o=t=>{let r=n[a];throw r===1?O(`class`,e,i[a],``,!0):O(`class`,e,i[a],`Expecting ${t}, got '${ue[r]}'`)},s=e=>(n[a]!==e&&o(`'${ue[e]}'`),r[a++]),c=()=>(z[n[a]]===0&&o(`'UNICODE_TEXT', 'NUM', 'ALPHA', 'MINUS'`),r[a++]),l=e=>{let t=``;for(;;){if(n[a]===54){t+=r[a++];break}z[n[a]]===0&&o(V),t+=r[a++];let e=n[a];if(e===8)t+=`.`,a++;else if(z[e]===0&&e!==54)break}return e&&n[a]===9&&(t+=`~`+r[a++]+`~`),t},u=()=>{a++;let e=s(6);return s(7),e},d=()=>{n[a]!==23&&o(`'STRUCT_STOP', 'MEMBER'`);let e=[];for(;n[a]===23;)e.push(r[a++]);return s(17),e.reverse()},f=()=>{a++;let e=l(!0);switch(t.addClass(e),n[a]===5&&t.setClassLabel(e,u()),n[a]){case 19:{a++;let r=c();t.setCssClass(e,r),n[a]===16&&(a++,t.addMembers(e,d()));break}case 16:a++,n[a]===17?a++:t.addMembers(e,d());break;case 20:{a++;let r=c();s(21),t.addAnnotation(e,r),n[a]===16&&(a++,n[a]===17?a++:t.addMembers(e,d()));break}}return e},p=()=>{if(n[a++]===25)return t.addNote(s(6));let e=l(!0);return t.addNote(s(6),e)},m=()=>{let e=[];for(;;){a++;let r=l(!1),i=n[a]===5?t.addNamespace(r,u()):t.addNamespace(r);s(16),n[a]===3&&a++,e.push({id:i,classes:[],notes:[]});let c=!0;for(;c;){let r=e[e.length-1],i=n[a];if(i===18)break;for(i===22?r.classes.push(f()):i===25||i===24?r.notes.push(p()):o(`'NAMESPACE', 'CLASS', 'NOTE_FOR', 'NOTE'`);;){if(n[a]===3){let e=n[a+1];if(e===18||e===22||e===25||e===24){a++;break}a++}s(17);let r=e.pop();if(t.addClassesToNamespace(r.id,r.classes,r.notes),t.popNamespace(),e.length===0){c=!1;break}}}if(e.length===0)return}},h=()=>{let e=B[n[a]];return e===0?`none`:(a++,e-1)},g=()=>{let e=l(!0),i=n[a];if(i===10){t.addMember(e,t.cleanupLabel(r[a++]));return}let s=`none`;if(i===6)s=r[a++],i=n[a];else if(B[i]===0&&i!==38&&i!==39)return;let c=h();i=n[a],i!==38&&i!==39&&o(`'AGGREGATION', 'EXTENSION', 'COMPOSITION', 'DEPENDENCY', 'LOLLIPOP', 'LINE', 'DOTTED_LINE'`),a++;let u=h(),d=n[a]===6?r[a++]:`none`,f={id1:e,id2:l(!0),relation:{type1:c,type2:u,lineType:i===38?0:1},relationTitle1:s,relationTitle2:d};n[a]===10&&(f.title=t.cleanupLabel(r[a++])),t.addRelation(f)},_=()=>{let e=[];for(;;){pe[n[a]]===0&&o(`'ALPHA', 'NUM', 'COLON', 'UNIT', 'SPACE', 'BRKT', 'STYLE', 'PCT', 'LABEL'`);let t=r[a++];for(;pe[n[a]]===1;)t+=r[a++];if(e.push(t),n[a]!==28)return e;a++}},v=e=>{n[a]===6&&t.setTooltip(e,r[a++])},y=e=>{let i=s(6),o=n[a]===6?r[a++]:void 0;n[a]===42?t.setLink(e,i,r[a++]):t.setLink(e,i),o!==void 0&&t.setTooltip(e,o)},b=()=>{let e=n[a];switch(e){case 53:case 27:case 52:case 54:g();return;case 18:m();return;case 22:f();return;case 23:a++;return;case 20:{a++;let e=c();s(21),t.addAnnotation(l(!0),e);return}case 40:{a++;let e=l(!0);t.setClickEvent(e,s(6)),v(e);return}case 41:a++,y(l(!0));return;case 43:{a++;let e=l(!0);if(n[a]===46){a++,y(e);return}let i=s(44);n[a]===45?t.setClickEvent(e,i,r[a++]):t.setClickEvent(e,i),v(e);return}case 47:{a++;let e=s(27);t.setCssStyle(e,_());return}case 48:{a++;let e=s(6);t.setCssClass(e,s(27));return}case 25:case 24:p();return;case 26:{a++;let e=[s(27)];for(;n[a]===28;)a++,e.push(s(27));t.defineClass(e,_());return}case 29:case 30:case 31:case 32:a++,t.setDirection(e===29?`TB`:e===30?`BT`:e===31?`RL`:`LR`);return;case 11:a++,t.setAccTitle(s(12).trim());return;case 13:a++,t.setAccDescription(s(14).trim());return;case 15:t.setAccDescription(r[a++].trim());return}o(`'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'NAMESPACE', 'ANNOTATION_START', 'CLASS', 'MEMBER', 'NOTE_FOR', 'NOTE', 'CLASSDEF', 'direction_tb', 'CALLBACK', 'LINK', 'CLICK', 'STYLE', 'CSSCLASS', 'ALPHA', 'MINUS', 'BQUOTE_STR'`)},ee=n[a]===2;for(ee&&(a++,s(3));b(),!(n[a]!==3||(a++,n[a]===4||n[a]===0)););ee&&s(4),s(0)}function he(e,t,n,r){let i=Int32Array.from(e,(e,t)=>t),a=e=>{for(;i[e]!==e;)i[e]=i[i[e]],e=i[e];return e},o=(e,t)=>{i[a(e)]=a(t)};for(let t=0;t<e.length;t++)e[t].parent>=0&&o(t,e[t].parent);for(let e of t)o(e.src,e.dst);let s=new Map,c=(e,t,n,r=0,i=0)=>{e.left=Math.min(e.left,t-r/2),e.top=Math.min(e.top,n-i/2),e.right=Math.max(e.right,t+r/2),e.bottom=Math.max(e.bottom,n+i/2)};for(let t=0;t<e.length;t++){let n=a(t),r=s.get(n);r||(r={nodes:[],edges:[],left:1/0,top:1/0,right:-1/0,bottom:-1/0},s.set(n,r));let i=e[t];r.nodes.push(i),c(r,i.x,i.y,i.w,i.h)}if(s.size<2)return;for(let e of t){let t=s.get(a(e.src));t.edges.push(e);for(let n=0;n<e.route.length;n+=3)c(t,e.route[n],e.route[n+1]);e.labelW>0&&c(t,e.labelX,e.labelY,e.labelW,e.labelH)}let l=0,u=0,d=0,f=0,p=1/0,m=-1/0,h=[];for(let e of s.values()){let t=e.right-e.left,i=e.bottom-e.top;l>0&&l+t>n&&(u+=d+r,l=0,d=0),h.push(l-e.left,u-e.top),p=Math.min(p,e.left),m=Math.max(m,e.right),f=Math.max(f,l+t),d=Math.max(d,i),l+=t+r}if(f>=m-p)return;let g=0;for(let e of s.values())oe(e.nodes,e.edges,h[g++],h[g++]);return{width:f,height:u+d}}var H=[`aggregation`,`extension`,`composition`,`dependency`,`lollipop`];function U(e){return typeof e==`number`&&H[e]||`none`}function ge(e,t=!0){let n=[],r=[],i=new Map,a=new Map,o=new Map,s=new Map,c=n=>{if(t||n===void 0)return n;let r=[],i=n,a;for(;i;){if(s.has(i)){a=s.get(i);break}let t=e.namespaces.get(i);if(t===void 0)break;if(t.explicit){a=i;break}r.push(i),i=t.parent}for(let e of r)s.set(e,a);return a},l=e=>e===void 0?-1:i.get(e)??-1;for(let r of e.namespaces.values())!t&&!r.explicit||(i.set(r.id,n.length),n.push({id:r.id,label:t?r.label:r.id,isGroup:!0,shape:`rect`,parentId:t?r.parent:void 0,parent:-1}));for(let e of n)e.parent=l(e.parentId);let u=0;for(let t of e.classes.values()){let e=c(t.parent);a.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`classBox`,parentId:e,parent:l(e),classNode:t,colorIndex:u++})}for(let t of e.notes.values()){let e=c(t.parent),i=t.class===void 0?void 0:a.get(t.class);i!==void 0&&r.push({id:`edgeNote${t.index}`,start:t.id,end:n[i].id,source:n.length,target:i,label:void 0,arrowTypeStart:`none`,arrowTypeEnd:`none`,startLabelRight:``,endLabelLeft:``,pattern:`dotted`,classes:`relation`}),n.push({id:t.id,label:t.text,isGroup:!1,shape:`note`,parentId:e,parent:l(e)})}for(let t of e.interfaces){let e=a.get(t.classId);o.set(t.id,n.length),n.push({id:t.id,label:t.label,isGroup:!1,shape:`interface`,parentId:void 0,parent:e===void 0?-1:n[e].parent})}let d=0;for(let t of e.relations){d++;let{type1:e,type2:n}=t.relation,i=e===M.LOLLIPOP&&n===`none`?o:a,s=i===a&&n===M.LOLLIPOP&&e===`none`?o:a;r.push({id:`id_${t.id1}_${t.id2}_${d}`,start:t.id1,end:t.id2,source:i.get(t.id1)??-1,target:s.get(t.id2)??-1,label:t.title,arrowTypeStart:U(e),arrowTypeEnd:U(n),startLabelRight:t.relationTitle1===`none`?``:t.relationTitle1,endLabelLeft:t.relationTitle2===`none`?``:t.relationTitle2,pattern:t.relation.lineType===1?`dashed`:`solid`,classes:`relation`})}return{nodes:n,edges:r}}var W=12,G=16,K=6,q=5;function _e(e){switch(e){case`extension`:return W;case`composition`:case`aggregation`:return G;case`lollipop`:return 2*q;case`dependency`:return m(`arrow_point`)}return 0}function ve(e,t,n,r,i,a){let o=-i,s=r;switch(e){case`extension`:{let e=t-r*W,a=n-i*W;return`<path class="pele-marker" d="M${u(t)},${u(n)}L${u(e+o*K)},${u(a+s*K)}L${u(e-o*K)},${u(a-s*K)}Z" stroke-linejoin="round"/>`}case`composition`:case`aggregation`:{let c=t-r*G/2,l=n-i*G/2,d=K-1;return`<path class="pele-marker" d="M${u(t)},${u(n)}L${u(c+o*d)},${u(l+s*d)}L${u(t-r*G)},${u(n-i*G)}L${u(c-o*d)},${u(l-s*d)}Z" stroke-linejoin="round"${e===`composition`?` fill="${a}"`:``}/>`}case`lollipop`:return`<circle class="pele-marker" cx="${u(t-r*q)}" cy="${u(n-i*q)}" r="${q}"/>`;case`dependency`:return _(`arrow_point`,t,n,r,i,a)}return``}var ye=40,be=16,xe=56,J=20,Se=26,Ce=12,we=8,Te=6,Ee=10,De=64,Oe=8,ke=`var(--_l)`,Ae=new Set([`_self`,`_blank`,`_parent`,`_top`]);function je(e,t,n){let r=e[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}var Me=[],Ne=[];function Pe(e,t,n){let r=T(e.getDisplayDetails().displayText).trim();return{text:r,width:t.width(r,n,e.classifier===`*`?2:0),classifier:e.classifier}}function Fe(e,t,n){let r=r=>f(n,i=>Ie(e,t,n,r,i));return d(e.direction)?p(n,r):r(!1)}function Ie(d,f,p,m,_){let b=f.class??{},S=ge(d,b.hierarchicalNamespaces!==!1),oe=b.hideEmptyMembersBox===!0,w=p.fontSize??16,E=Math.round(w*.875),D=Math.round(w*.8),O=Math.round(D*1.4),k=p.measurer??ce(p.fontFamily,p.fontFamilyMono),A=p.padding??8,j=(e,t)=>{if(!e.includes(`$$`))return;let n=c(e,!1,k,t,4e3);return n.lines.some(l)?n:void 0},M=e=>e?j(e,D)?.width??k.width(T(e),D,0):0,N=m?`TB`:se(d.direction),P=new Map,le=new Map,F=new Map,ue=e=>{let t=P.get(e);if(t===void 0){let n=s([e]);t=n.shape===``&&n.text===``?``:e.slice(0,e.indexOf(`:`)).trim().toLowerCase(),P.set(e,t)}t!==``&&F.set(t,e)},de=e=>{F.clear();let t=le.get(e.cssClasses);if(t===void 0){for(let t of e.cssClasses.split(` `)){let e=d.styleClasses.get(t);if(e)for(let t of e.styles)for(let e of t.split(`,`))ue(e)}t=[...F],le.set(e.cssClasses,t)}else for(let[e,n]of t)F.set(e,n);for(let t of e.styles)ue(t);return s(F.size===0?Ne:[...F.values()])},fe=new Int32Array(S.nodes.length);for(let e of S.nodes)e.parent>=0&&fe[e.parent]++;let I=new Uint8Array(S.nodes.length);for(let e of S.edges){if(e.source<0||e.target<0)continue;let t=S.nodes[e.source].parent,n=S.nodes[e.target].parent;if(t!==n){for(let e=t;e>=0&&I[e]===0;e=S.nodes[e].parent)I[e]=1;for(let e=n;e>=0&&I[e]===0;e=S.nodes[e].parent)I[e]=1}}let L=[],R=[];S.nodes.forEach((e,t)=>{let n,r;if(e.isGroup){let i=c(e.label,!1,k,w,4e3);n=z(e,i,0,0,w),fe[t]>0?(r=C(0,0),r.isGroup=!0,r.padX=J,r.padTop=i.height>0?i.height+16:J,r.padBottom=J,r.minW=i.width+2*J-12+(I[t]===1&&!_?Math.min(i.width+24,240):0)):(n.w=Math.max(i.width+2*J,80),n.h=i.height+2*J,r=C(n.w,n.h))}else if(e.classNode)n=pe(e,e.classNode),r=C(n.w,n.h);else if(e.shape===`note`){let t=c(e.label,!0,k,E,260);n=z(e,t,Math.max(t.width+2*Ce,40),t.height+2*we,E),r=C(n.w,n.h)}else{let t=c(e.label,!1,k,E,200);n=z(e,t,Math.max(t.width,12)+4,Math.max(t.height,12),E),r=C(n.w,n.h)}r.parent=e.parent,r.seq=t,L.push(n),R.push(r)});function z(e,t,n,r,i){return{node:e,style:s(Ne),label:t,w:n,h:r,loops:0,annotations:Ne,attributes:Me,methods:Me,titleH:0,attributesH:0,fontSize:i}}function pe(e,t){let n=de(t),r=n.fontSize??w,i=Math.round(r*.875),a=Math.round(i*1.5),o=t.type?`<`+x(t.type).replace(/</g,`<`).replace(/>/g,`>`)+`>`:``,s=c(t.label+o,!1,k,r,4e3,1|(n.italic?2:0)),l=t.annotations.length>0?t.annotations.map(e=>j(`«${e.trim()}»`,D)??`«${T(e).trim()}»`):Ne,u=t.members.length>0?t.members.map(e=>Pe(e,k,i)):Me,d=t.methods.length>0?t.methods.map(e=>Pe(e,k,i)):Me,f=s.width,p=0;for(let e of l)f=Math.max(f,typeof e==`string`?k.width(e,D,0):e.width),p+=typeof e==`string`?O:Math.max(O,e.height);for(let e of u)f=Math.max(f,e.width);for(let e of d)f=Math.max(f,e.width);let m=!(oe&&u.length===0&&d.length===0),h=e=>m?e>0?2*Te+e*a:Ee:0,g=2*we+p+Math.max(s.height,Math.round(r*1.5)),_=h(u.length);return{node:e,style:n,label:s,w:Math.max(f+2*Ce,De),h:g+_+h(d.length),loops:0,annotations:l,attributes:u,methods:d,titleH:g,attributesH:_,fontSize:r}}let B=[],V=[],me=[],H=[],U=[],W=new Float64Array(L.length*4),G=(e,t,n)=>{W[e*4+t]++,n>W[e*4+t+1]&&(W[e*4+t+1]=n)};for(let e of S.edges){if(e.source<0||e.target<0)continue;let t=c(e.label,!0,k,E,200),n=M(e.startLabelRight),r=M(e.endLabelLeft);e.source===e.target?(L[e.source].loops++,R[e.source].w+=2*(Se+(t.width>0?t.width+12:0))):(G(e.source,0,n),G(e.target,2,r)),H.push(n),U.push(r),V.push(e),me.push(t),B.push({src:e.source,dst:e.target,minlen:1,labelW:t.width>0?t.width+12:0,labelH:t.height>0?t.height+4:0,route:[],labelX:0,labelY:0})}if(N===`TB`||N===`BT`)for(let e=0;e<L.length;e++){if(!L[e].node.classNode)continue;let t=0;for(let n=0;n<4;n+=2){let r=W[e*4+n],i=W[e*4+n+1];r>1&&(t=Math.max(t,(r-1)*(i>0?i+24:14)+24))}t=Math.min(t,480),t>L[e].w&&(R[e].w+=t-L[e].w,L[e].w=t)}let K=!1;for(let e=0;e<V.length&&!K;e++)K=H[e]>0||U[e]>0;let q=0;if(N===`TB`||N===`BT`){let e=e=>e?Math.max(O,j(e,D)?.height??0):0;for(let t of V)q=Math.max(q,e(t.startLabelRight)+e(t.endLabelLeft)-2*O)}let Fe=ae(R,B,N,{nodeSep:je(b,`nodeSpacing`,ye),edgeSep:be,rankSep:je(b,`rankSpacing`,K?xe+16:xe)+q,portSep:20,apart:!0}),Ie=new Map,Y=[],Le=(e,t,n,r,i)=>{let a=e.route,o=R[n],s=y(a,t,o);if(s<0)return;let c=(o.w-L[n].w)/2;s===1?a[t]-=c:s===3&&(a[t]+=c);let l=s&1,u=a[(t===0?3:t-3)+l],d=u-a[t+l],f={route:a,at:t,toward:u,order:i,room:r,side:s,after:l?d>0:d>=0},p=n*4+s,m=Ie.get(p);return m?m.push(f):Ie.set(p,[f]),f},Re=[],ze=[];for(let e=0;e<B.length;e++){let t=B[e],n=t.src!==t.dst&&t.route.length>=6;Re.push(n?Le(t,0,t.src,H[e],e):void 0),ze.push(n?Le(t,t.route.length-3,t.dst,U[e],e):void 0)}let Be=(e,t,n)=>{for(let r=R[e].parent,i=0;r>=0&&i<1e4;r=R[r].parent,i++){let e=R[r],i=Math.abs(t-e.x),a=Math.abs(n-e.y);if(Math.abs(a-e.h/2)<.5&&i<=e.w/2+.5||Math.abs(i-e.w/2)<.5&&a<=e.h/2+.5)return!0}return!1},Ve=[];for(let[e,t]of Ie){if(t.length<2)continue;let n=e>>2,r=e&1,i=r?L[n].h:L[n].w;t.sort((e,t)=>e.toward-t.toward||e.order-t.order);let a=0;for(let e=0;e+1<t.length;e++){let n=t[e],i=t[e+1],o=r?20:24;n.room>0&&n.after&&(o+=r?O+6:n.room),i.room>0&&!i.after&&(o+=r?O+6:i.room),Ve[e]=o,a+=o}let o=Math.min(1,(i-24)/a);if(o<=0)continue;let s=(r?R[n].y:R[n].x)-a*o/2;for(let e=0;e<t.length;e++){let{route:i,at:a}=t[e],c=a===0?3:-3,l=a+c,u=-1;for(let e=l;e>=0&&e<i.length&&Math.abs(i[e+r]-i[l+r])<.5;e+=c)if(Be(n,i[e],i[e+1])){u=e;break}if(u>=0&&Math.abs(i[l+r]-s)<=24)for(let e=l;e!==u+c;e+=c)i[e+r]=s;i[a+r]=s,s+=Ve[e]*o}}let He=(e,t,n,r)=>{if(t===void 0||n<=0)return;let i=t.side&1,a=r?0:e.length-3,o=a+1-i,s=Math.abs(e[(r?3:a-3)+1-i]-e[o]),c=Math.min(i?n+10:O+6,s*.35);if(c<4)return;let l=[e[a],e[a+1],e[a+2]];l[1-i]+=(t.side===0||t.side===3?-1:1)*c,e.splice(r?3:a,0,l[0],l[1],l[2])};for(let e=0;e<B.length;e++)He(B[e].route,Re[e],H[e],!0),He(B[e].route,ze[e],U[e],!1);let X=0,Z=0,Ue=Fe.width,We=Fe.height,Ge=(e,t,n,r,i,a,o)=>{if(!t)return;let s=j(t,D),c=s?Math.max(O,s.height):O,l=r,u=i;a&1?(l+=(a===3?-1:1)*(5+n/2),u+=(o?1:-1)*(7+c/2)):(l+=(o?1:-1)*(9+n/2),u+=(a===0?-1:1)*(3+c/2)),Y.push({text:T(t),math:s,x:l,y:u,w:n,h:c,parent:e}),X=Math.min(X,l-n/2),Ue=Math.max(Ue,l+n/2),Z=Math.min(Z,u-c/2),We=Math.max(We,u+c/2)},Ke=new Map,qe=new Int32Array(B.length);for(let e=0;e<B.length;e++){let t=B[e],n=V[e],r=t.route;if(t.src===t.dst){let r=Ke.get(t.src)??0;Ke.set(t.src,r+1),qe[e]=r;let i=R[t.src],a=L[t.src],o=i.x+a.w/2,s=Math.min(a.h/2-4,8+r*6);Ge(t.src,n.startLabelRight,H[e],o,i.y-s,1,!1),Ge(t.dst,n.endLabelLeft,U[e],o,i.y+s,1,!0),t.labelX=i.x+a.w/2+Se+r*8+4+t.labelW/2,t.labelY=i.y}else if(r.length>=6){let i=r.length-3,a=Re[e],o=ze[e];Ge(t.src,n.startLabelRight,H[e],r[0],r[1],a?a.side:2,!a||a.after),Ge(t.dst,n.endLabelLeft,U[e],r[i],r[i+1],o?o.side:0,!o||o.after)}}let Je=p.maxWidth;if(Je!==void 0&&Je>0&&Ue-X+2*A>Je){let e=Y.map(e=>({...C(e.w,e.h,e.parent),x:e.x,y:e.y})),t=he(R.concat(e),B,Math.max(1,Je-2*A),je(b,`nodeSpacing`,ye));t&&(Y.forEach((t,n)=>{t.x=e[n].x,t.y=e[n].y}),X=Z=0,Ue=t.width,We=t.height)}let Q=A-X,$=A-Z,Ye=Math.ceil(Ue-X+2*A),Xe=Math.ceil(We-Z+2*A),Ze=[],Qe=new Map;if(S.nodes.length>0&&S.nodes[0].isGroup)for(let e of B)re(Qe,e.route);let $e=``,et=``,tt=``;for(let e=0;e<L.length;e++){let t=L[e],n=R[e],r=t.node,s=n.x+Q,c=n.y+$,l=i(r.id),d=n.isGroup?n.w:t.w,f=n.isGroup?n.h:t.h;if(r.isGroup){let r=n.isGroup?ne(n,t.label.width,Qe,J):n.x,i=c-f/2+8+t.label.height/2,p=` class="pele-cluster-label" fill="var(--_m)"`,m=n.isGroup&&te(n,t.label.width,r,Qe);m&&(et+=ie(t.label,r+Q,i,p,l,S.nodes,e)),$e+=`<g class="pele-cluster pele-namespace" data-id="${l}"><rect x="${u(s-d/2)}" y="${u(c-f/2)}" width="${u(d)}" height="${u(f)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${o}/>`+(m?``:a(t.label,r+Q,i,p))+`</g>`;continue}let m=` transform="translate(${u(s)},${u(c)})"`;if(r.classNode)tt+=nt(t,r.classNode,l,m);else if(r.shape===`note`){let e=d/2,n=-f/2;tt+=`<g class="pele-node pele-note" data-id="${l}"${m}><path d="M${u(-e)},${u(n)}H${u(e-Oe)}L${u(e)},${u(n+Oe)}V${u(-n)}H${u(-e)}Z" fill="var(--_a)" stroke="var(--_b)" stroke-linejoin="round"/><path d="M${u(e-Oe)},${u(n)}V${u(n+Oe)}H${u(e)}" fill="none" stroke="var(--_b)" stroke-linejoin="round"/>`+a(t.label,0,0,` class="pele-label" font-size="${E}"`,p.icons)+`</g>`}else tt+=`<g class="pele-node pele-interface" data-id="${l}"${m}>`+a(t.label,0,0,` class="pele-label" font-size="${E}"`,p.icons)+`</g>`}function nt(e,o,s,c){let{w:l,h:d,style:f}=e,m=-l/2,h=-d/2,g=Math.round(e.fontSize*.875),_=Math.round(g*1.5),v=`<rect x="${u(m)}" y="${u(h)}" width="${u(l)}" height="${u(d)}" fill="var(--_s)" stroke="var(--_b)"${r(f.shape)}/>`,y=h+e.titleH,b=y+e.attributesH;if(d>e.titleH){let e=f.stroke?` style="stroke:${t(f.stroke)}"`:``;v+=`<path class="pele-divider" d="M${u(m)},${u(y)}H${u(-m)}M${u(m)},${u(b)}H${u(-m)}" fill="none" stroke="var(--_b)"${e}/>`}let x=h+we;for(let n of e.annotations)if(typeof n==`string`)v+=`<text class="pele-annotation" x="0" y="${u(x+O/2+D*.35)}" text-anchor="middle" font-size="${D}" fill="var(--_m)">${t(n)}</text>`,x+=O;else{let e=Math.max(O,n.height);v+=a(n,0,x+e/2,` class="pele-annotation" font-size="${D}" fill="var(--_m)"`,p.icons),x+=e}let S=e.fontSize===w?``:` font-size="${u(e.fontSize)}"`;v+=a(e.label,0,(x+y-we)/2,` class="pele-label"${S} font-weight="var(--_hw)"${f.text}`,p.icons);let te=(e,n,r)=>{let i=``,a=r+Te+_/2+g*.35;for(let r of e){let e=r.classifier===`$`?` pele-static"${f.text?f.text.slice(0,-1)+`text-decoration:underline"`:` style="text-decoration:underline"`}`:r.classifier===`*`?` pele-abstract" font-style="italic"${f.text}`:`"${f.text}`;i+=`<text class="pele-member pele-${n}${e} x="${u(m+Ce)}" y="${u(a)}">${t(r.text)}</text>`,a+=_}return i};return(e.attributes.length>0||e.methods.length>0)&&(v+=`<g class="pele-members" font-size="${g}">${te(e.attributes,`attribute`,y)}${te(e.methods,`method`,b)}</g>`),o.tooltip&&(v=`<title>${i(o.tooltip)}</title>`+v),o.link&&(v=ee(v,o.link,o.id,Ze,p,o.linkTarget&&Ae.has(o.linkTarget)?` target="${o.linkTarget}"`:``)),`<g class="pele-node pele-class${n(o.cssClasses.replace(/^default\s?/,``))}" data-id="${s}"${c}>${v}</g>`}let rt=``,it=``;for(let e=0;e<B.length;e++){let t=B[e],n=V[e],r=me[e],a=n.arrowTypeStart,o=n.arrowTypeEnd,s=_e(a),c=_e(o),l;if(t.src===t.dst){let n=R[t.src],r=L[t.src],i=qe[e],a=n.x+Q+r.w/2,o=n.y+$,d=Math.min(r.h/2-4,8+i*6),f=Se+i*8;l={d:`M${u(a+s)},${u(o-d)}C${u(a+f+s)},${u(o-d)} ${u(a+f+c)},${u(o+d)} ${u(a+c)},${u(o+d)}`,sx:a,sy:o-d,sdx:-1,sdy:0,ex:a,ey:o+d,edx:-1,edy:0}}else{let e=t.route;for(let t=0;t<e.length;t+=3)e[t]+=Q,e[t+1]+=$;l=g(e,void 0,s,c)}let d=n.pattern===`dashed`?` stroke-dasharray="6 4"`:n.pattern===`dotted`?` stroke-dasharray="2 4"`:``;if(rt+=`<g class="pele-edge${n.pattern===`dotted`?` pele-note-edge`:` pele-relation`}" data-id="${i(n.id)}"><path d="${l.d}"${d}/>`+ve(a,l.sx,l.sy,l.sdx,l.sdy,ke)+ve(o,l.ex,l.ey,l.edx,l.edy,ke)+`</g>`,r.width>0){let e=t.labelX+Q,i=t.labelY+$;it+=h(n.id,r,e,i,``,p.icons)}}let at=``;for(let e of Y)at+=e.math?a(e.math,e.x+Q,e.y+$,` class="pele-cardinality"`,p.icons):`<text class="pele-cardinality" x="${u(e.x+Q)}" y="${u(e.y+$+D*.35)}" text-anchor="middle">${t(e.text)}</text>`;let ot=v(d.title,k,w,A,Ye,Xe,($e?`<g class="pele-clusters">${$e}</g>`:``)+(rt?`<g class="pele-edges" fill="none" stroke="${ke}" stroke-linecap="round">${rt}</g>`:``)+(et?`<g class="pele-cluster-titles">${et}</g>`:``)+(it?`<g class="pele-edge-labels" font-size="${E}">${it}</g>`:``)+(at?`<g class="pele-cardinalities" font-size="${D}" fill="var(--_m)">${at}</g>`:``)+`<g class="pele-nodes">${tt}</g>`);return{svg:e(`class`,ot.width,ot.height,w,p,d,ot.content),width:ot.width,height:ot.height,links:Ze}}var Y={type:`class`,math:!0,parse(e,t,n){let r=new F;return n&&(r.title=n),me(e,r),r},render:Fe};export{Y as classDiagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as e,b as t,f as n,i as r,o as i,p as a,u as o,x as s,y as c}from"./
|
|
1
|
+
import{_ as e,b as t,f as n,i as r,o as i,p as a,u as o,x as s,y as c}from"./DlgOmQ_G.js";import{r as l,t as u}from"./DciMwFJ1.js";import{n as d,r as f,t as p}from"./-_CDfwKC.js";import{t as m}from"./T3u7Skc8.js";import{a as ee,i as h,o as g}from"./BvhVny3O.js";import{PeleError as _,f as v,u as y}from"./BArcFmbE.js";var b=11,x=class{type=`mindmap`;title;nodes=[];getType=p;baseLevel=0;open=[];addNode(e,t,n,r){let i=this.nodes.length===0;i&&(this.baseLevel=e),e-=this.baseLevel;let a=this.open,o=a.length;for(;o>0&&a[o-1].level>=e;)o--;let s=a[o-1];if(!s&&!i)throw new _(`There can be only one root. No parent could be found for ("${n}")`,`semantic`,{type:`mindmap`});let c={id:this.nodes.length,nodeId:t,level:e,descr:n,type:r,children:[],isRoot:i};s&&(c.section=s.isRoot?s.children.length%b:s.section,s.children.push(c)),a.length=o,a.push(c),this.nodes.push(c)}decorateNode(e){let t=this.nodes[this.nodes.length-1];!e||!t||(e.icon&&(t.icon=e.icon),e.class&&(t.class=e.class))}};function S(e,t){f(e,t,!1)}var te=[``,`rounded`,`rect`,`circle`,`cloud`,`bang`,`hex`],ne=`stadium`,re=36,ie=8,ae=18,oe=52,se=28,ce=6,le=12,ue=.22,C=6,w=28,de=12,fe=8,pe=10;function me(e,t,n,r){if(e.lines.length<2)return i(e,t+e.width/2,n,` class="pele-label"`,r);let o=``,s=n-e.height/2;for(let n=0;n<e.lines.length;n++)o+=i(c(e,n),t+e.widths[n]/2,s+a(e,n),` class="pele-label"`,r);return o}function he(e,t,n){return u(n,r=>T(e,t,n,r))}function T(a,c,u,f){let p=u.fontSize??16,_=u.measurer??y(u.fontFamily,u.fontFamilyMono),b=u.padding??8,x=u.icons,S=c.mindmap?.maxNodeWidth,he=typeof S==`number`&&S>0?Math.min(S,2e3):200,T=p*1.25,E=a.nodes,D=E.length,O=new Int32Array(D),k=new Int32Array(D);for(let e=0;e<D;e++)for(let t of E[e].children)O[t.id]=e,k[t.id]=k[e]+1;let ge=f&&u.maxWidth!==void 0&&u.maxWidth>0?u.maxWidth-2*b:1/0,A=Array(D),j=Array(D),M=new Float64Array(D),N=new Float64Array(D),P=new Float64Array(D),F=new Float64Array(D),I=new Uint8Array(D);for(let e=0;e<D;e++){let t=E[e];I[e]=+(t.icon!==void 0&&v(t.icon)!==``);let n=Math.min(he,Math.max(72,ge-k[e]*w-2*ce-(I[e]?T+C:0))),r=A[e]=o(t.descr,!0,_,p,n),i=r.width+(I[e]?T+(r.width>0?C:0):0),a=Math.max(r.height,Math.round(p*1.5)),s=te[t.type]||(e===0?ne:``);if(f&&e===0&&s!==`rect`&&s!==`rounded`&&(s=ne),j[e]=s,s===``){let n=t.children.length>0;M[e]=i+2*(n?le:ce),N[e]=a+(n?6:0),F[e]=N[e]/2}else{let t=h(s,i,a);M[e]=t.w,N[e]=t.h,P[e]=t.dy,F[e]=t.h/2}}let L=new Float64Array(D),R=new Float64Array(D),z=new Float64Array(D),_e=new Float64Array(D),ve=0,ye=(e,t,n,r)=>{let i=0,a=0;for(let o=t;o<n;o++){let t=e[o].id;R[t]=i,a=e[o].children.length>0||o+1<n&&e[o+1].children.length>0?Math.max(r,ae):r,i+=L[t]+a}ve=i-a;let o=e[t].id,s=e[n-1].id;return(R[o]+z[o]+F[o]+R[s]+z[s]+F[s])/2};for(let e=D-1;e>0;e--){let t=E[e].children;if(t.length===0){L[e]=N[e];continue}let n=ye(t,0,t.length,ie)-F[e],r=Math.min(0,n);L[e]=Math.max(ve,n+N[e])-r,z[e]=n-r,_e[e]=-r}let B=new Float64Array(D),V=new Float64Array(D),H=new Float64Array(D),U=new Int8Array(D),be=new Float64Array(D);if(f){let e=0;for(let t=0;t<D;t++)t>0&&O[t]===0&&(e+=pe),B[t]=k[t]*w+M[t]/2,V[t]=e,e+=N[t]+pe}else if(D>0){let e=E[0].children,t=e.length,n=0;for(let t of e)n+=L[t.id];let r=t,i=1/0,a=0;for(let o=1;o<t;o++){a+=L[e[o-1].id];let s=Math.abs(2*a-n+(2*o-t)*se);s<i&&(i=s,r=o)}for(let n=0,i=r,a=1;n<t;n=i,i=t,a=-1){let t=ye(e,n,i,se);for(let r=n;r<i;r++){let n=e[r].id;H[n]=R[n]-t,U[n]=a}}V[0]=-N[0]/2;for(let e=0;e<D;e++){e>0&&(V[e]=H[e]+z[e]);for(let t of E[e].children){let n=t.id;e>0&&(U[n]=U[e],H[n]=H[e]+_e[e]+R[n]),B[n]=B[e]+U[n]*(M[e]/2+(e>0?re:oe)+M[n]/2)}}}let W=0,G=0,K=0,q=0,J=``,Y=``,X=``,Z=``,xe=e=>{X!==``&&(J+=`<g class="pele-branch pele-section-${e??0}"><g class="pele-edges" fill="none" stroke="${Z}" stroke-width="1.5">${Y}</g>${X}</g>`,Y=X=``)};for(let e=1;e<=D;e++){let a=e%D,o=E[a],c=j[a],l=A[a],u=B[a],p=V[a];if(W=Math.min(W,u-M[a]/2),G=Math.max(G,u+M[a]/2),K=Math.min(K,p),q=Math.max(q,p+N[a]),(a===0||O[a]===0)&&xe(E[e-1].section),a>0&&f){O[a]===0&&(Z=n(o.section??0));let e=O[a],t=e===0?Math.min(Math.max(de,N[0]/2),w-fe):de,r=B[e]-M[e]/2+Math.min(t,M[e]/2),i=be[e]||V[e]+N[e],l=u-M[a]/2+(c?g(c,M[a],N[a],3):0),d=p+F[a],f=Math.max(0,Math.min(fe,l-r,d-i));be[e]=d-f,Y+=`<path class="pele-edge" d="M${s(r)},${s(i)}V${s(d-f)}Q${s(r)},${s(d)} ${s(r+f)},${s(d)}H${s(l)}"/>`}else if(a>0){O[a]===0&&(Z=n(o.section??0));let e=O[a],t=U[a],r=t>0?1:3,i=B[e]+t*(M[e]/2-(j[e]?g(j[e],M[e],N[e],r):0)),l=V[e]+F[e],d=u-t*M[a]/2+(c?t*g(c,M[a],N[a],4-r):0),f=p+F[a],m=s((i+d)/2);Y+=`<path class="pele-edge" d="M${s(i)},${s(l)}C${m},${s(l)} ${m},${s(f)} ${s(d)},${s(f)}"/>`}let m=!c&&o.children.length>0,h=` fill="${Z}" fill-opacity="${ue}" stroke="${Z}"`,_=``;c?_=a>0?ee(c,M[a],N[a],h,` stroke="${Z}"`):ee(c,M[a],N[a],` fill="var(--_s)" stroke="var(--_b)"`,` stroke="var(--_b)"`):m&&(_=`<rect x="${s(-M[a]/2)}" y="${s(-N[a]/2)}" width="${s(M[a])}" height="${s(N[a])}" rx="${s(N[a]/2)}"${h}/>`);let v=0;o.icon&&I[a]&&(v=(T+(l.width>0?C:0))/2,_+=d(o.icon,-v-l.width/2,P[a]-T/2,T,x));let y=`<g class="pele-node pele-shape-${c||(m?`branch`:`text`)}${a>0?``:` pele-root`}${t(o.class??``)}" data-id="${r(o.nodeId)}" transform="translate(${s(u)},${s(p+N[a]/2)})">`+_+(f&&!c?me(l,v-l.width/2,P[a],x):i(l,v,P[a],` class="pele-label"`,x))+`</g>`;a>0?X+=y:J+=y}let Q=m(a.title,_,p,l(u)),Se=Q.height>0?Q.height+16:0,Ce=Math.max(G-W,Q.width),$=Math.ceil(Ce+2*b),we=Math.ceil(q-K+Se+2*b),Te=i(Q,$/2,b+Q.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${s(b-W+(Ce-G+W)/2)},${s(b+Se-K)})">${J}</g>`;return{svg:e(`mindmap`,$,we,p,u,{},Te),width:$,height:we,links:[]}}var E={type:`mindmap`,math:!0,parse(e,t,n){let r=new x;return r.title=n,S(e,r),r},render:he};export{E as mindmap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,i as t,o as n,r,u as i,x as a}from"./
|
|
1
|
+
import{_ as e,i as t,o as n,r,u as i,x as a}from"./DlgOmQ_G.js";import{r as o,t as s}from"./DciMwFJ1.js";import{s as c}from"./BF3mdiSX.js";import{r as l}from"./CMAnq3x6.js";import{g as u,h as d,s as f,u as p}from"./BArcFmbE.js";var m=class{type=`ishikawa`;title;root;stack=[];baseLevel;addNode(e,t){let n={text:t,children:[]};if(!this.root){this.root=n,this.stack=[{level:0,node:n}];return}this.baseLevel??=e;let r=Math.max(e-this.baseLevel+1,1),i=this.stack;for(;i.length>1&&i[i.length-1].level>=r;)i.pop();i[i.length-1].node.children.push(n),i.push({level:r,node:n})}},h=[`$end`,`EOF`,`SPACELINE`,`NL`,`ISHIKAWA`,`SPACELIST`,`TEXT`];function g(e,t){let n=0;for(;n<13;){let r=e.charCodeAt(t+n),i=`ishikawa-beta`.charCodeAt(n);if(r!==i&&(r+32!==i||r<65||r>90))break;n++}return n===13&&!u(e.charCodeAt(t+13))?13:n>=8&&!u(e.charCodeAt(t+8))?8:0}function _(e){let t=[],n=[],r=[],i=e.length,a=0;for(;a<i;){let o=a,s=-1;for(;o<i&&d(e.charCodeAt(o));)e.charCodeAt(o)===10&&(s=o),o++;let c,l;if(e.charCodeAt(o)===37&&e.charCodeAt(o+1)===37)for(c=2,l=o+2;l<i;){let t=e.charCodeAt(l);if(t===10||t===13||t===8232||t===8233)break;l++}else if(o===a){let t=g(e,a);t>0?(c=4,l=a+t):(c=6,l=e.indexOf(`
|
|
2
2
|
`,a),l===-1&&(l=i))}else s>a?(c=2,l=s+1):s===a?(c=3,l=a+1):(c=5,l=o);t.push(c),n.push(a),r.push(l),a=l}return t.push(1,0),n.push(i,i),r.push(i,i),{types:t,starts:n,ends:r}}var v=`'SPACELINE', 'NL', 'EOF'`;function y(e,t){let{types:n,starts:r,ends:i}=_(e),a=0,o=t=>{throw f(`ishikawa`,e,r[a],`Expecting ${t}, got '${h[n[a]]}'`)};if(n[a]===2){for(a++;n[a]===2||n[a]===3;)a++;n[a]!==4&&o(`'SPACELINE', 'NL', 'ISHIKAWA'`)}else n[a]!==4&&o(`'SPACELINE', 'ISHIKAWA'`);for(a++,n[a]===3&&a++;;){let s=n[a];if(s===6||s===5&&n[a+1]===6){let c=s===6?a:a+1;a=c+1,n[a]!==2&&n[a]!==3&&n[a]!==1&&o(v),t.addNode(s===6?0:i[c-1]-r[c-1],e.slice(r[c],i[c]).trim())}else s===2||s===5?(a++,n[a]!==2&&n[a]!==3&&n[a]!==1&&o(s===5?`${v}, 'TEXT'`:v)):o(`'SPACELINE', 'SPACELIST', 'TEXT'`);for(a++;n[a]===3||n[a]===1;)a++;if(n[a]===0)return}}var b=.5,x=Math.hypot(b,1),S=14,C=6,w=8,T=22,E=18,D=5,O=26,k=34,A=28,j=10,M=5;function N(e,t,n,r,a){let o=i(e.text,!1,n,r,180),s=Math.round(a*1.5),c=[],l=[],u=[],d=(e,n,r)=>{let i=e.length;for(let a=i-1;a>=0;a--)u.push({node:e[t?i-1-a:a],depth:n,parent:r,slot:a,bone:-1})};for(d(e.children,2,-1);u.length>0;){let e=u.pop();if(e.bone!==-1){l.push(e.bone);continue}let t=c.length;c.push({label:i(e.node.text,!1,n,a,200),depth:e.depth,parent:e.parent,slot:e.slot,kids:e.node.children.length,rise:0,at:0,textEnd:0}),e.depth%2==0?l.push(t):(e.bone=t,u.push(e)),d(e.node.children,e.depth+1,t)}let f=S;for(let e of l){let t=Math.max(c[e].label.height,s)+C;c[e].rise=f+t/2,f+=t}let p=o.width+2*j,m=p/2;for(let e of c){let t=e.parent===-1?void 0:c[e.parent];e.depth%2==0?(e.at=t?t.at:0,e.textEnd=e.at-(e.kids>0?(e.kids+1)*T:E)-D):(e.at=t.at-(t.kids-e.slot)*T,e.textEnd=e.at-D),m=Math.max(m,e.label.width-e.textEnd)}return{node:e,label:o,boxW:p,boxH:o.height+2*M,bones:c,rise:f+w,reach:m}}function P(e,t,n){return s(n,r=>F(e,t,n,r))}function F(o,s,l,u){let d=l.fontSize??16,f=Math.round(d*.875),m=l.measurer??p(l.fontFamily,l.fontFamilyMono),h=l.padding??8;if(u)return I(o,l);let g=o.root,_=i(o.title,!1,m,d,4e3,1),v=_.height>0?_.height+12:0,y=``,S=0,C=0,w=0,T=0;if(g){let e=i(g.text,!1,m,d,200,1),o=Math.max(e.height+24,48),s=e.width+24+o/2,l=g.children.map((e,t)=>N(e,t%2==0,m,d,f));for(let e of l)e.rise=Math.max(e.rise,o/2+14);let u=[],p=-k;for(let e=0;e<l.length;e+=2){if(e>0){let t=0;for(let n=0;n<2;n++){let r=l[e-2+n],i=l[e+n];r&&(t=Math.max(t,r.reach+(i?i.boxW/2:0)))}p-=t+O}u.push(p,p)}let h=l.length>0?p-A:-k;C=s,S=h,w=-o/2,T=o/2;let _=``;l.forEach((e,i)=>{let o=i%2==0?-1:1,s=u[i],l=(e,t)=>s+e-t*b,d=l(0,e.rise),p=o*e.rise,m=`M${a(s-b/x*7)},${a(o*7/x)}L${a(d)},${a(p)}`,h=``;for(let t of e.bones){let r=o*t.rise;if(t.depth%2==0)m+=`M${a(l(t.at,t.rise))},${a(r)}H${a(l(t.textEnd+D,t.rise))}`;else{let n=e.bones[t.parent].rise;m+=`M${a(l(t.at,n))},${a(o*n)}L${a(l(t.at,t.rise))},${a(r)}`}let i=l(t.textEnd,t.rise);h+=n(t.label,i-t.label.width/2,r,t.depth>2?` fill="var(--_m)"`:``),S=Math.min(S,i-t.label.width)}let g=p+o*(e.boxH/2);S=Math.min(S,d-e.boxW/2),C=Math.max(C,d+e.boxW/2),w=Math.min(w,g-e.boxH/2),T=Math.max(T,g+e.boxH/2),_+=`<g class="pele-ishikawa-category" data-id="${t(e.node.text)}"><path class="pele-ishikawa-bones" d="${m}" fill="none" stroke="var(--_l)"/>`+c(`arrow_point`,s,0,b/x,-o/x,`var(--_l)`)+`<rect x="${a(d-e.boxW/2)}" y="${a(g-e.boxH/2)}" width="${a(e.boxW)}" height="${a(e.boxH)}" fill="var(--_s)" stroke="var(--_b)"${r}/>`+n(e.label,d,g,` class="pele-label"`)+(h?`<g class="pele-ishikawa-causes" font-size="${f}">${h}</g>`:``)+`</g>`});let v=o/2;y=`<path class="pele-ishikawa-spine" d="M${a(h)},0H${a(-7)}" fill="none" stroke="var(--_l)"/>`+c(`arrow_point`,0,0,1,0,`var(--_l)`)+_+`<g class="pele-ishikawa-head" data-id="${t(g.text)}"><path d="M0,${a(-v)}H${a(s-v)}A${a(v)},${a(v)} 0 0 1 ${a(s-v)},${a(v)}H0Z" fill="var(--_s)" stroke="var(--_b)" stroke-linejoin="round"/>`+n(e,12+e.width/2,0,` class="pele-label" font-weight="var(--_hw)"`)+`</g>`}let E=Math.max(C-S,_.width),j=Math.ceil(E+2*h),M=Math.ceil(T-w+v+2*h),P=h+(E-(C-S))/2-S,F=h+v-w;return{svg:e(`ishikawa`,j,M,d,l,{},n(_,j/2,h+_.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(y?`<g transform="translate(${a(P)},${a(F)})">${y}</g>`:``)),width:j,height:M,links:[]}}function I(r,s){let c=s.fontSize??16,u=Math.round(c*.875),d=s.measurer??p(s.fontFamily,s.fontFamilyMono),f=s.padding??8,m=Math.max(140,(s.maxWidth??320)-2*f),h=i(r.title,!1,d,c,o(s),1),g=[],_=r.root?[{node:r.root,depth:0,parent:-1}]:[],v=0;for(;_.length;){let e=_.pop(),t=g.length;g.push({...e,x:0,y:0,w:0,h:0}),v=Math.max(v,e.depth);for(let n=e.node.children.length-1;n>=0;n--)_.push({node:e.node.children[n],depth:e.depth+1,parent:t})}let y=Math.min(20,Math.max(2,(m-120)/Math.max(1,v))),b=f+(h.height?h.height+12:0),x=h.width,S=``,C=``;for(let e of g){e.x=f+e.depth*y;let r=Math.max(60,m-e.depth*y-20);e.label=l(i(e.node.text,!1,d,e.depth<2?c:u,r,+(e.depth<2)),d,r),e.w=e.label.width+20,e.h=e.label.height+12,e.y=b,b+=e.h+12,x=Math.max(x,e.x-f+e.w);let o=e.depth<2;if(S+=`<g class="pele-node ${e.depth===0?`pele-ishikawa-head`:e.depth===1?`pele-ishikawa-category`:`pele-ishikawa-cause`}" data-id="${t(e.node.text)}">`+(o?`<rect x="${a(e.x)}" y="${a(e.y)}" width="${a(e.w)}" height="${a(e.h)}" rx="${e.depth===0?12:4}" fill="var(--_s)" stroke="var(--_b)"/>`:``)+n(e.label,e.x+e.w/2,e.y+e.h/2,` class="pele-label"${e.depth<2?` font-weight="var(--_hw)"`:``}${e.depth>1?` font-size="${u}"`:``}`)+`</g>`,e.parent>=0){let t=g[e.parent],n=t.x+y/2;C+=`<path class="pele-edge" d="M${a(n)},${a(t.y+t.h)}V${a(e.y+e.h/2)}H${a(e.x)}" fill="none" stroke="var(--_b)"/>`}}let w=Math.ceil(x+2*f),T=Math.ceil(Math.max(f+h.height,b-12)+f),E=n(h,w/2,f+h.height/2,` class="pele-title" font-weight="var(--_tw)"`)+C+S;return{svg:e(`ishikawa`,w,T,c,s,{},E),width:w,height:T,links:[]}}var L={type:`ishikawa`,parse(e,t,n){let r=new m;return r.title=n,y(e,r),r},render:P};export{L as ishikawa};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,M as t,bt as n,o as r,r as i}from"./BxTFtVqu.js";import{c as a}from"./
|
|
1
|
+
import{A as e,M as t,bt as n,o as r,r as i}from"./BxTFtVqu.js";import{c as a}from"./CkSjC-iE.js";import{n as o,r as s}from"./Cq5C893B.js";import{javascriptLanguage as c}from"./K_3X9lyC.js";var l=1,u=33,d=34,f=35,p=36,m=new o(e=>{let t=e.pos;for(;;){if(e.next==10){e.advance();break}if(e.next==123&&e.peek(1)==123||e.next<0)break;e.advance()}e.pos>t&&e.acceptToken(l)});function h(e,t,n){return new o(r=>{let i=r.pos;for(;r.next!=e&&r.next>=0&&(n||r.next!=38&&(r.next!=123||r.peek(1)!=123));)r.advance();r.pos>i&&r.acceptToken(t)})}var g=h(39,u,!1),_=h(34,d,!1),v=h(39,f,!0),y=h(34,p,!0),b=s.deserialize({version:14,states:"(jOVOq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Text Content }} {{ Interpolation InterpolationContent Entity InvalidEntity Attribute BoundAttributeName [ Identifier ] ( ) ReferenceName # Is ExpressionAttributeValue AttributeInterpolation AttributeInterpolation EventName DirectiveName * StatementAttributeValue AttributeName AttributeValue`,maxTerm:42,nodeProps:[[`openedBy`,3,`{{`,15,`(`],[`closedBy`,4,`}}`,14,`)`],[`isolate`,-4,5,19,25,27,``]],skippedNodes:[0],repeatNodeCount:4,tokenData:"0r~RyOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mqr#rrs%jst&Qtv#rvw&hwx)zxy*byz*xz{+`{}#r}!O+v!O!P-]!P!Q#r!Q![+v![!]+v!]!_#r!_!`-s!`!c#r!c!}+v!}#O.Z#O#P#r#P#Q.q#Q#R#r#R#S+v#S#T#r#T#o+v#o#p/X#p#q#r#q#r0Z#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vQ#wTUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rQ$ZSO#q#r#r;'S#r;'S;=`$g<%lO#rQ$jP;=`<%l#rR$t[UQvPOX#rXY$mYZ$mZ]#r]^$m^p#rpq$mq#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR%qTyPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&XTaPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR&oXUQWPOp'[pq#rq!]'[!]!^#r!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R'aXUQOp'[pq#rq!]'[!]!^'|!^#q'[#q#r(d#r;'S'[;'S;=`)t<%lO'[R(TTVPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR(gXOp'[pq#rq!]'[!]!^'|!^#q'[#q#r)S#r;'S'[;'S;=`)t<%lO'[P)VUOp)Sq!])S!]!^)i!^;'S)S;'S;=`)n<%lO)SP)nOVPP)qP;=`<%l)SR)wP;=`<%l'[R*RTzPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR*iT^PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+PT_PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+gThPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR+}b[PUQO}#r}!O+v!O!Q#r!Q![+v![!]+v!]!c#r!c!}+v!}#R#r#R#S+v#S#T#r#T#o+v#o#q#r#q#r$W#r%W#r%W;'S+v;'S;:j-V;:j;=`$g<%lO+vR-YP;=`<%l+vR-dTwPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR-zTUQbPO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.bTZPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR.xT]PUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/^VUQO#o#r#o#p/s#p#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#rR/zTSPUQO#q#r#q#r$W#r;'S#r;'S;=`$g<%lO#r~0^TO#q#r#q#r0m#r;'S#r;'S;=`$g<%lO#r~0rOR~",tokenizers:[m,g,_,v,y,0,1],topRules:{Content:[0,2],Attribute:[1,9]},tokenPrec:0}),x=c.parser.configure({top:`SingleExpression`}),S=b.configure({props:[e({Text:t.content,Is:t.definitionOperator,AttributeName:t.attributeName,"AttributeValue ExpressionAttributeValue StatementAttributeValue":t.attributeValue,Entity:t.character,InvalidEntity:t.invalid,"BoundAttributeName/Identifier":t.attributeName,"EventName/Identifier":t.special(t.attributeName),"ReferenceName/Identifier":t.variableName,"DirectiveName/Identifier":t.keyword,"{{ }}":t.brace,"( )":t.paren,"[ ]":t.bracket,"# '*'":t.punctuation})]}),C={parser:x},w={parser:c.parser},T=S.configure({wrap:n((e,t)=>e.name==`InterpolationContent`?C:null)}),E=S.configure({wrap:n((e,t)=>e.name==`InterpolationContent`?C:e.name==`AttributeInterpolation`?e.node.parent?.name==`StatementAttributeValue`?w:C:null),top:`Attribute`}),D={parser:T},O={parser:E},k=a({selfClosingTags:!0});function A(e){return e.configure({wrap:n(M)},`angular`)}var j=A(k.language);function M(e,t){switch(e.name){case`Attribute`:return/^[*#(\[]|\{\{/.test(t.read(e.from,e.to))?O:null;case`Text`:return D}return null}function N(e={}){let t=k;if(e.base){if(e.base.language.name!=`html`||!(e.base.language instanceof i))throw RangeError(`The base option must be the result of calling html(...)`);t=e.base}return new r(t.language==k.language?j:A(t.language),[t.support,t.language.data.of({closeBrackets:{brackets:[`[`,`{`,`"`]},indentOnInput:/^\s*[\}\]]$/})])}export{N as angular};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as e,D as t,F as n,J as r,M as i,b as a,bt as o,f as s,g as c,o as l,r as u}from"./BxTFtVqu.js";import{c as d}from"./CQhfj5-f.js";import{i as f,n as p,r as m}from"./Cq5C893B.js";var h=1,g=2,_=3,v=155,y=4,b=156;function x(e){return e>=65&&e<=90||e>=97&&e<=122}var S=new p(e=>{let t=e.pos;for(;;){let{next:n}=e;if(n<0)break;if(n==123){let n=e.peek(1);if(n==123){if(e.pos>t)break;e.acceptToken(h,2);return}if(n==35){if(e.pos>t)break;e.acceptToken(g,2);return}if(n==37){if(e.pos>t)break;let n=2,r=2;for(;;){let t=e.peek(n);if(t==32||t==10)++n;else if(t==35)for(++n;;){let t=e.peek(n);if(t<0||t==10)break;n++}else if(t==45&&r==2)r=++n;else{e.acceptToken(_,r);return}}}}if(e.advance(),n==10)break}e.pos>t&&e.acceptToken(v)});function C(e,t,n){return new p(r=>{let i=r.pos;for(;;){let{next:t}=r;if(t==123&&r.peek(1)==37){let t=2;for(;;t++){let e=r.peek(t);if(e!=32&&e!=10)break}let a=``;for(;;t++){let e=r.peek(t);if(!x(e))break;a+=String.fromCharCode(e)}if(a==e){if(r.pos>i)break;r.acceptToken(n,2);break}}else if(t<0)break;if(r.advance(),t==10)break}r.pos>i&&r.acceptToken(t)})}var w=C(`endraw`,b,y),T={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},E={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},D=m.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(RQSO'#DXO(YQ`O'#DZOOQO'#Fr'#FrOvQSO'#CuO(aOPO'#CbOOOP'#Fd'#FdO!kOPO,59}OOOP,59},59}O(oOPO,59}O(}QWO'#E|OOOP,5:Y,5:YO)[OPO,5:YO!yOPO,5:YO)jQWO'#E|OOOQ'#Ff'#FfO)tOQO'#DxO)|OQO,5:aOOOP,5:g,5:gO#^OPO,5:gO*RQWO'#E|OOOP,5:n,5:nO#lOPO,5:nO*YQWO'#E|OOOP,5:v,5:vO#zOPO,5:vO*aQWO'#E|OOOP,5:{,5:{O$YOPO,5:{O*hQWO'#E|OOOP,5;Q,5;QO$hOPO,5;QO*oQWO'#E|OOOP,5;V,5;VO*vOPO,5;VO$vOPO,5;VO+UQWO'#E|OOOP,5;^,5;^O%UOPO,5;^O+`QWO'#E|OOOP,5;c,5;cO%dOPO,5;cO+gQWO'#E|O+nQSO,5;hOvQSO,5:OO+uQSO,5:ZO+zQSO,5:bO+uQSO,5:hO+uQSO,5:oO,PQSO,5:wO,XQpO,5:|O+uQSO,5;RO,^QSO,5;WO,fQSO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STVWXYZ[]^oqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kS&c$u$wR'd&cQ%Q#WQ%S#YT&i%Q%SQ%W#]R&n%WQoSR#`oQ%s$YQ&S$dQ&W$gW&w%s&S&W(qR(q(fQxUR#mxS'P%z%{R'p'PQ'u'VR(c'uQ'y'XQ(e'wT(g'y(eQ'}'^R(j'}Q!uaR$m!u!bcOTVWXYZ[]^dqtu{!O!R!U!X![!]!`!c#b#c#i#k#{#}%[%a%kTnSoQgRQ#WhQ#YiQ#[jQ#_lQ$U!eQ$W!fQ$i!pQ$j!qQ$k!rQ$l!sQ$p!xS$q!y)gQ$r!zQ$s!{Q$t!|Q$u!}Q$z#RQ${#SQ$|#TQ$}#UQ%O#VQ%]#eQ%l$OQ&h%PQ&k%UQ&l%VQ&y%tQ'U&UQ'V&VQ'X&XQ'a&bQ'e&dQ'f&gQ'g(yQ'i&xQ'm&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:`⚠ {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}`,maxTerm:173,nodeProps:[[`closedBy`,1,`}}`,2,`#}`,-2,3,4,`%}`,32,`)`],[`openedBy`,7,`{{`,31,`(`,57,`{%`,140,`{#`],[`group`,-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,`Expression`,-11,53,64,71,77,84,92,97,102,107,114,119,`Statement`]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&nwx&{xy)nyz)sz{)x{|*V|}+|}!O,R!O!P,g!P!Q,o!Q![+h![!],w!^!_,|!_!`-U!`!a,|!c!}-^!}#O.U#P#Q.Z#R#S-^#T#o-^#o#p.`#p#q.e#q#r.j#r#s.w%W;'S-^;'S;:j.O<%lO-^~#_S$d~XY#YYZ#Y]^#Ypq#Y~#nP!_!`#q~#vOb~~#yWOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~$hOe~~$kYOY#vYZ#vZr#vrs%Zs#O#v#O#P$h#P;'S#v;'S;=`&O;=`<%l#v<%lO#v~%`We~OY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x<%lO#v~%{P;=`<%l#v~&RXOY#vZr#vrs$cs#O#v#O#P$h#P;'S#v;'S;=`%x;=`<%l#v<%lO#v~&sP`~#q#r&v~&{O!Z~~'OWOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~'kYOY&{YZ&{Zw&{wx(Zx#O&{#O#P'h#P;'S&{;'S;=`)O;=`<%l&{<%lO&{~(`We~OY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x<%lO&{~({P;=`<%l&{~)RXOY&{Zw&{wx$cx#O&{#O#P'h#P;'S&{;'S;=`(x;=`<%l&{<%lO&{~)sOp~~)xOo~~)}P`~z{*Q~*VO`~~*[Qa~!O!P*b!Q![+h~*eP!Q![*h~*mSf~!Q![*h!g!h*y#R#S*h#X#Y*y~*|R{|+V}!O+V!Q![+]~+YP!Q![+]~+bQf~!Q![+]#R#S+]~+mTf~!O!P*b!Q![+h!g!h*y#R#S+h#X#Y*y~,ROt~~,WRa~uv,a!O!P*b!Q![+h~,dP#q#r&v~,lPZ~!Q![*h~,tP`~!P!Q*Q~,|O!P~~-RPb~!_!`#q~-ZPs~!_!`#q!`-iVm`[p!XS$gY!Q![-^!c!}-^#R#S-^#T#o-^%W;'S-^;'S;:j.O<%lO-^!`.RP;=`<%l-^~.ZO$i~~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[S,w,1,2,3,4,5,new f(`b~RPstU~XP#q#r[~aO$Q~~`,17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:e=>T[e]||-1},{term:55,get:e=>E[e]||-1}],tokenPrec:3602});function O(e,t){return e.split(` `).map(e=>({label:e,type:t}))}var k=O(`abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr`,`function`),A=O(`boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace`,`function`),j=O(`loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller`,`keyword`),M=A.concat(j),N=O(`raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends`,`keyword`);function P(e){let{state:n,pos:r}=e,i=t(n).resolveInner(r,-1).enterUnfinishedNodesBefore(r),a=i.childBefore(r)?.name||i.name;if(i.name==`FilterName`)return{type:`filter`,node:i};if(e.explicit&&(a==`FilterOp`||a==`filter`))return{type:`filter`};if(i.name==`TagName`)return{type:`tag`,node:i};if(e.explicit&&a==`{%`)return{type:`tag`};if(i.name==`PropertyName`&&i.parent.name==`MemberExpression`)return{type:`prop`,node:i,target:i.parent};if(i.name==`.`&&i.parent.name==`MemberExpression`)return{type:`prop`,target:i.parent};if(i.name==`MemberExpression`&&a==`.`)return{type:`prop`,target:i};if(i.name==`VariableName`)return{type:`expr`,from:i.from};if(i.name==`Comment`||i.name==`StringLiteral`||i.name==`NumberLiteral`)return null;let o=e.matchBefore(/[\w\u00c0-\uffff]+$/);return o?{type:`expr`,from:o.from}:e.explicit?{type:`expr`}:null}function F(e,t,n,r){let i=[];for(;;){let n=t.getChild(`Expression`);if(!n)return[];if(n.name==`VariableName`){i.unshift(e.sliceDoc(n.from,n.to));break}if(n.name==`MemberExpression`){let r=n.getChild(`PropertyName`);r&&i.unshift(e.sliceDoc(r.from,r.to)),t=n}else return[]}return r(i,e,n)}function I(e={}){let t=e.tags?e.tags.concat(N):N,n=e.variables?e.variables.concat(M):M,{properties:r}=e;return e=>{let i=P(e);if(!i)return null;let a=i.from??(i.node?i.node.from:e.pos),o;return o=i.type==`filter`?k:i.type==`tag`?t:i.type==`expr`?n:r?F(e.state,i.target,e,r):[],o.length?{options:o,from:a,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var L=n.inputHandler.of((e,t,n,i)=>i!=`%`||t!=n||e.state.doc.sliceString(t-1,n+1)!=`{}`?!1:(e.dispatch(e.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:`%%`},range:r.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:`input.type`}),!0));function R(e){return t=>{let n=e.test(t.textAfter);return t.lineIndent(t.node.from)+(n?0:t.unit)}}var z=u.define({name:`jinja`,parser:D.configure({props:[e({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":i.keyword,"required scoped recursive with without context ignore missing":i.modifier,self:i.self,"loop super":i.standard(i.variableName),"if elif else endif for endfor call endcall":i.controlKeyword,"block endblock set endset macro endmacro import from include":i.definitionKeyword,"Comment/...":i.blockComment,VariableName:i.variableName,Definition:i.definition(i.variableName),PropertyName:i.propertyName,FilterName:i.special(i.variableName),ArithOp:i.arithmeticOperator,AssignOp:i.definitionOperator,"not and or":i.logicOperator,CompareOp:i.compareOperator,"in is":i.operatorKeyword,"FilterOp ConcatOp":i.operator,StringLiteral:i.string,NumberLiteral:i.number,BooleanLiteral:i.bool,"{% %} {# #} {{ }} { }":i.brace,"( )":i.paren,".":i.derefOperator,": , .":i.punctuation}),a.add({Tag:s({closing:`%}`}),"IfStatement ForStatement":R(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:R(/^\s*(\{%-?\s*)?end\w/)}),c.add({"Statement Comment"(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`Tag`&&t.name!=`{#`?null:{from:t.to,to:n.name==`EndTag`||n.name==`#}`?n.from:e.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),B=d();function V(e){return z.configure({wrap:o(t=>t.type.isTop?{parser:e.parser,overlay:e=>e.name==`Text`||e.name==`RawText`}:null)},`jinja`)}var H=V(B.language);function U(e={}){let t=e.base||B,n=t.language==B.language?H:V(t.language);return new l(n,[t.support,n.data.of({autocomplete:I(e)}),t.language.data.of({closeBrackets:{brackets:[`{`]}}),L])}export{U as jinja};
|
|
1
|
+
import{A as e,D as t,F as n,J as r,M as i,b as a,bt as o,f as s,g as c,o as l,r as u}from"./BxTFtVqu.js";import{c as d}from"./CkSjC-iE.js";import{i as f,n as p,r as m}from"./Cq5C893B.js";var h=1,g=2,_=3,v=155,y=4,b=156;function x(e){return e>=65&&e<=90||e>=97&&e<=122}var S=new p(e=>{let t=e.pos;for(;;){let{next:n}=e;if(n<0)break;if(n==123){let n=e.peek(1);if(n==123){if(e.pos>t)break;e.acceptToken(h,2);return}if(n==35){if(e.pos>t)break;e.acceptToken(g,2);return}if(n==37){if(e.pos>t)break;let n=2,r=2;for(;;){let t=e.peek(n);if(t==32||t==10)++n;else if(t==35)for(++n;;){let t=e.peek(n);if(t<0||t==10)break;n++}else if(t==45&&r==2)r=++n;else{e.acceptToken(_,r);return}}}}if(e.advance(),n==10)break}e.pos>t&&e.acceptToken(v)});function C(e,t,n){return new p(r=>{let i=r.pos;for(;;){let{next:t}=r;if(t==123&&r.peek(1)==37){let t=2;for(;;t++){let e=r.peek(t);if(e!=32&&e!=10)break}let a=``;for(;;t++){let e=r.peek(t);if(!x(e))break;a+=String.fromCharCode(e)}if(a==e){if(r.pos>i)break;r.acceptToken(n,2);break}}else if(t<0)break;if(r.advance(),t==10)break}r.pos>i&&r.acceptToken(t)})}var w=C(`endraw`,b,y),T={__proto__:null,in:38,is:40,and:46,or:48,not:52,if:78,else:80,true:98,false:98,self:100,super:102,loop:104,recursive:136,scoped:160,required:162,as:256,import:260,ignore:268,missing:270,with:272,without:274,context:276},E={__proto__:null,if:112,elif:118,else:122,endif:126,for:132,endfor:140,raw:146,endraw:152,block:158,endblock:166,macro:172,endmacro:182,call:188,endcall:192,filter:198,endfilter:202,set:208,endset:212,trans:218,pluralize:222,endtrans:226,with:232,endwith:236,autoescape:242,endautoescape:246,import:254,from:258,include:266},D=m.deserialize({version:14,states:"!*dQVOPOOOOOP'#F`'#F`OeOTO'#CbOvQSO'#CdO!kOPO'#DcO!yOPO'#DnO#XOQO'#DuO#^OPO'#D{O#lOPO'#ESO#zOPO'#E[O$YOPO'#EaO$hOPO'#EfO$vOPO'#EkO%UOPO'#ErO%dOPO'#EwOOOP'#F|'#F|O%rQWO'#E|O&sO#tO'#F]OOOP'#Fq'#FqOOOP'#F_'#F_QVOPOOOOOP-E9^-E9^OOQO'#Ce'#CeO'sQSO,59OO'zQSO'#DWO(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&}Q'r'TQ'w'WS(R(z)zQ(S({Q(T(|Q(U(}Q(W)PQ(X)QQ(Y)RQ(Z)SQ([)TQ(]'hQ(m(QQ(o(`Q(t)WQ(u(pQ(w(rQ(x(vQ)U)ZQ)V)[Q)X)bQ)Y)cQ)])fQ)^)lQ)_)mQ)`)nQ)a)sQ)d*TQ)e*UQ)o)hQ)p)iQ)q)jQ)r)kQ)t)yQ)u*PQ)v*QQ)w*RQ)x*SQ*V){Q*W)|Q*X)}R*Y*OQ$c!lT$y#O)OR$x!}R#XhR#^jR%|$^R$h!o",nodeNames:`⚠ {{ {# {% {% Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression ConcatOp ArithOp ArithOp CompareOp in is StringLiteral NumberLiteral and or NotExpression not FilterExpression FilterOp FilterName FilterCall ) ( ArgumentList NamedArgument AssignOp , NamedArgument ConditionalExpression if else CallExpression ArrayExpression TupleExpression ParenthesizedExpression DictExpression Entry : Entry BooleanLiteral self super loop IfStatement Tag TagName if %} Tag elif Tag else EndTag endif ForStatement Tag for Definition recursive EndTag endfor RawStatement Tag raw RawText EndTag endraw BlockStatement Tag block scoped required EndTag endblock MacroStatement Tag macro ParamList OptionalParameter OptionalParameter EndTag endmacro CallStatement Tag call EndTag endcall FilterStatement Tag filter EndTag endfilter SetStatement Tag set EndTag endset TransStatement Tag trans Tag pluralize EndTag endtrans WithStatement Tag with EndTag endwith AutoescapeStatement Tag autoescape EndTag endautoescape Tag Tag Tag import as from import ImportItem Tag include ignore missing with without context Comment #}`,maxTerm:173,nodeProps:[[`closedBy`,1,`}}`,2,`#}`,-2,3,4,`%}`,32,`)`],[`openedBy`,7,`{{`,31,`(`,57,`{%`,140,`{#`],[`group`,-18,9,10,13,14,21,22,25,27,38,41,42,43,44,45,49,50,51,52,`Expression`,-11,53,64,71,77,84,92,97,102,107,114,119,`Statement`]],skippedNodes:[0],repeatNodeCount:13,tokenData:".|~RqXY#YYZ#Y]^#Ypq#Yqr#krs#vuv&n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~.`O$h~~.eO$n~~.jOl~^.oP$m[#q#r.rQ.wOVQ~.|O_~",tokenizers:[S,w,1,2,3,4,5,new f(`b~RPstU~XP#q#r[~aO$Q~~`,17,173)],topRules:{Template:[0,5]},specialized:[{term:161,get:e=>T[e]||-1},{term:55,get:e=>E[e]||-1}],tokenPrec:3602});function O(e,t){return e.split(` `).map(e=>({label:e,type:t}))}var k=O(`abs attr batch capitalize center default dictsort escape filesizeformat first float forceescape format groupby indent int items join last length list lower map max min pprint random reject rejectattr replace reverse round safe select selectattr slice sort string striptags sum title tojson trim truncate unique upper urlencode urlize wordcount wordwrap xmlattr`,`function`),A=O(`boolean callable defined divisibleby eq escaped even filter float ge gt in integer iterable le lower lt mapping ne none number odd sameas sequence string test undefined upper range lipsum dict joiner namespace`,`function`),j=O(`loop super self true false varargs kwargs caller name arguments catch_kwargs catch_varargs caller`,`keyword`),M=A.concat(j),N=O(`raw endraw filter endfilter trans pluralize endtrans with endwith autoescape endautoescape if elif else endif for endfor call endcall block endblock set endset macro endmacro import include break continue debug do extends`,`keyword`);function P(e){let{state:n,pos:r}=e,i=t(n).resolveInner(r,-1).enterUnfinishedNodesBefore(r),a=i.childBefore(r)?.name||i.name;if(i.name==`FilterName`)return{type:`filter`,node:i};if(e.explicit&&(a==`FilterOp`||a==`filter`))return{type:`filter`};if(i.name==`TagName`)return{type:`tag`,node:i};if(e.explicit&&a==`{%`)return{type:`tag`};if(i.name==`PropertyName`&&i.parent.name==`MemberExpression`)return{type:`prop`,node:i,target:i.parent};if(i.name==`.`&&i.parent.name==`MemberExpression`)return{type:`prop`,target:i.parent};if(i.name==`MemberExpression`&&a==`.`)return{type:`prop`,target:i};if(i.name==`VariableName`)return{type:`expr`,from:i.from};if(i.name==`Comment`||i.name==`StringLiteral`||i.name==`NumberLiteral`)return null;let o=e.matchBefore(/[\w\u00c0-\uffff]+$/);return o?{type:`expr`,from:o.from}:e.explicit?{type:`expr`}:null}function F(e,t,n,r){let i=[];for(;;){let n=t.getChild(`Expression`);if(!n)return[];if(n.name==`VariableName`){i.unshift(e.sliceDoc(n.from,n.to));break}if(n.name==`MemberExpression`){let r=n.getChild(`PropertyName`);r&&i.unshift(e.sliceDoc(r.from,r.to)),t=n}else return[]}return r(i,e,n)}function I(e={}){let t=e.tags?e.tags.concat(N):N,n=e.variables?e.variables.concat(M):M,{properties:r}=e;return e=>{let i=P(e);if(!i)return null;let a=i.from??(i.node?i.node.from:e.pos),o;return o=i.type==`filter`?k:i.type==`tag`?t:i.type==`expr`?n:r?F(e.state,i.target,e,r):[],o.length?{options:o,from:a,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var L=n.inputHandler.of((e,t,n,i)=>i!=`%`||t!=n||e.state.doc.sliceString(t-1,n+1)!=`{}`?!1:(e.dispatch(e.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:`%%`},range:r.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:`input.type`}),!0));function R(e){return t=>{let n=e.test(t.textAfter);return t.lineIndent(t.node.from)+(n?0:t.unit)}}var z=u.define({name:`jinja`,parser:D.configure({props:[e({"TagName raw endraw filter endfilter as trans pluralize endtrans with endwith autoescape endautoescape":i.keyword,"required scoped recursive with without context ignore missing":i.modifier,self:i.self,"loop super":i.standard(i.variableName),"if elif else endif for endfor call endcall":i.controlKeyword,"block endblock set endset macro endmacro import from include":i.definitionKeyword,"Comment/...":i.blockComment,VariableName:i.variableName,Definition:i.definition(i.variableName),PropertyName:i.propertyName,FilterName:i.special(i.variableName),ArithOp:i.arithmeticOperator,AssignOp:i.definitionOperator,"not and or":i.logicOperator,CompareOp:i.compareOperator,"in is":i.operatorKeyword,"FilterOp ConcatOp":i.operator,StringLiteral:i.string,NumberLiteral:i.number,BooleanLiteral:i.bool,"{% %} {# #} {{ }} { }":i.brace,"( )":i.paren,".":i.derefOperator,": , .":i.punctuation}),a.add({Tag:s({closing:`%}`}),"IfStatement ForStatement":R(/^\s*(\{%-?\s*)?(endif|endfor|else|elif)\b/),Statement:R(/^\s*(\{%-?\s*)?end\w/)}),c.add({"Statement Comment"(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`Tag`&&t.name!=`{#`?null:{from:t.to,to:n.name==`EndTag`||n.name==`#}`?n.from:e.to}}})]}),languageData:{indentOnInput:/^\s*{%-?\s*(?:end|elif|else)$/}}),B=d();function V(e){return z.configure({wrap:o(t=>t.type.isTop?{parser:e.parser,overlay:e=>e.name==`Text`||e.name==`RawText`}:null)},`jinja`)}var H=V(B.language);function U(e={}){let t=e.base||B,n=t.language==B.language?H:V(t.language);return new l(n,[t.support,n.data.of({autocomplete:I(e)}),t.language.data.of({closeBrackets:{brackets:[`{`]}}),L])}export{U as jinja};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,x as l}from"./
|
|
1
|
+
import{_ as e,a as t,b as n,d as r,i,o as a,r as o,s,u as c,x as l}from"./DlgOmQ_G.js";import{o as u,r as d}from"./DciMwFJ1.js";import{s as f}from"./BF3mdiSX.js";import{t as p}from"./T3u7Skc8.js";import{r as m}from"./CMAnq3x6.js";import{PeleError as h,g,h as _,n as v,s as y,u as b,y as x}from"./BArcFmbE.js";var S=`aliceblue antiquewhite aqua aquamarine azure beige bisque black blanchedalmond blue blueviolet brown burlywood cadetblue chartreuse chocolate coral cornflowerblue cornsilk crimson cyan darkblue darkcyan darkgoldenrod darkgray darkgreen darkgrey darkkhaki darkmagenta darkolivegreen darkorange darkorchid darkred darksalmon darkseagreen darkslateblue darkslategray darkslategrey darkturquoise darkviolet deeppink deepskyblue dimgray dimgrey dodgerblue firebrick floralwhite forestgreen fuchsia gainsboro ghostwhite gold goldenrod gray green greenyellow grey honeydew hotpink indianred indigo ivory khaki lavender lavenderblush lawngreen lemonchiffon lightblue lightcoral lightcyan lightgoldenrodyellow lightgray lightgreen lightgrey lightpink lightsalmon lightseagreen lightskyblue lightslategray lightslategrey lightsteelblue lightyellow lime limegreen linen magenta maroon mediumaquamarine mediumblue mediumorchid mediumpurple mediumseagreen mediumslateblue mediumspringgreen mediumturquoise mediumvioletred midnightblue mintcream mistyrose moccasin navajowhite navy oldlace olive olivedrab orange orangered orchid palegoldenrod palegreen paleturquoise palevioletred papayawhip peachpuff peru pink plum powderblue purple rebeccapurple red rosybrown royalblue saddlebrown salmon sandybrown seagreen seashell sienna silver skyblue slateblue slategray slategrey snow springgreen steelblue tan teal thistle tomato turquoise violet wheat white whitesmoke yellow yellowgreen transparent currentcolor inherit initial unset revert accentcolor accentcolortext activetext buttonborder buttonface buttontext canvas canvastext field fieldtext graytext highlight highlighttext linktext mark marktext selecteditem selecteditemtext visitedtext activeborder activecaption appworkspace background buttonhighlight buttonshadow captiontext inactiveborder inactivecaption inactivecaptiontext infobackground infotext menu menutext scrollbar threeddarkshadow threedface threedhighlight threedlightshadow threedshadow window windowframe windowtext`,C,w=/^[+-]?(?:\d+(?:\.\d+)?|\.\d+)(?:e[+-]?\d+)?(%|deg|grad|rad|turn)?$/i;function T(e){if(e.toLowerCase()===`none`)return 4;let t=w.exec(e);return t?t[1]===void 0?1:t[1]===`%`?2:3:0}function ee(e,t){let n=T(e);return n===1||n===2||t&&n===4}function E(e){let t=e.startsWith(`hsl`),n=e.indexOf(`(`),r=e.slice(0,n);if(r!==`rgb`&&r!==`rgba`&&r!==`hsl`&&r!==`hsla`||e.length>120||e.indexOf(`)`)!==e.length-1)return!1;let i=e.slice(n+1,-1).trim(),a,o,s=i.includes(`,`);if(s)a=i.split(`,`).map(e=>e.trim()),a.length===4&&(o=a.pop());else{let e=i.split(`/`);if(e.length>2)return!1;a=e[0].trim().split(/\s+/),e.length===2&&(o=e[1].trim())}if(a.length!==3||o!==void 0&&!ee(o,!s))return!1;let c=a.map(T);if(s)return t?(c[0]===1||c[0]===3)&&c[1]===2&&c[2]===2:(c[0]===1||c[0]===2)&&c[1]===c[0]&&c[2]===c[0];for(let e=0;e<3;e++){let n=c[e];if(!(n===1||n===4||(t&&e===0?n===3:n===2)))return!1}return!0}function te(e){return e.includes(`(`)?E(e):(C??=new Set(S.split(` `)),C.has(e.toLowerCase()))}var ne=/^:?wrap:/,D=/^:?nowrap:/,re=/^:?(?:no)?wrap:/,ie=/^(?:rgba?|hsla?)\s*\(/,O=/[\r\u2028\u2029]/,ae=/^\w*/;function k(e){throw new h(e,`semantic`,{type:`sequence`})}function A(e){let t=e.trim(),n=ne.test(t)?!0:!D.test(t)&&void 0;return{text:(n===void 0?t:t.replace(re,``)).trim(),wrap:n}}function oe(e){let t=ie.exec(e);if(t){let n=e.lastIndexOf(`)`);if(n>=t[0].length)return O.test(e.slice(t[0].length))?void 0:[e.slice(0,n+1),e.slice(n+1)]}if(O.test(e))return;let n=ae.exec(e)[0];return[n,e.slice(n.length)]}function se(e){return typeof e==`string`?[...e].map((e,t)=>[String(t),e]):typeof e==`object`&&e?Object.entries(e):[]}var j=class{type=`sequence`;actors=new Map;createdActors=new Map;destroyedActors=new Map;boxes=[];messages=[];notes=[];title;accTitle;accDescr;prevActor;currentBox;lastCreated;lastDestroyed;wrapEnabled;sequenceWrap;active=new Map;constructor(e={}){this.wrapEnabled=e.wrap,this.sequenceWrap=e.sequenceWrap??!1}autoWrap(){return this.wrapEnabled??this.sequenceWrap}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}setDiagramTitle(e){this.title=e}parseMessage(e){return A(e)}parseBoxData(e){let t=oe(e),n=t?.[0]?t[0].trim():`transparent`,r=t?.[1]?t[1].trim():void 0;if(te(n)||(n=`transparent`,r=e.trim()),r===void 0)return{text:void 0,color:n,wrap:void 0};let{text:i,wrap:a}=A(r);return{text:i||void 0,color:n,wrap:a}}addBox(e){this.currentBox={name:e.text,wrap:e.wrap??this.autoWrap(),fill:e.color,actorKeys:[]},this.boxes.push(this.currentBox)}addActor(e,t,n,r,i){let a=this.currentBox,o;if(i!==void 0){let t;try{t=v(i.includes(`
|
|
3
3
|
`)?i+`
|
|
4
4
|
`:`{
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,t as r}from"./
|
|
1
|
+
import{i as e,n as t,r as n,t as r}from"./DNs5kWvM.js";import{_ as i,d as a,f as o,i as s,o as c,x as l}from"./DlgOmQ_G.js";import{n as u,t as d}from"./D37hxBaz.js";import{t as f}from"./DciMwFJ1.js";import{s as p}from"./BF3mdiSX.js";import{PeleError as m,g as h,h as g,s as _,u as ee}from"./BArcFmbE.js";var v=class{type=`timeline`;title;accTitle;accDescr;direction=`LR`;sections=[];periods=[];currentSection=``;getCommonDb(){return this}setDiagramTitle(e){this.title=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
2
|
`)}setDirection(e){this.direction=e}addSection(e){this.currentSection=e,this.sections.push(e)}addTask(e,t,n){this.periods.push({text:e,events:n?[n]:[],section:this.currentSection,sectionIndex:this.sections.length-1})}addEvent(e){let t=this.periods[this.periods.length-1];if(!t)throw new m(`An event needs a time period before it.`,`semantic`,{type:`timeline`});t.events.push(e)}},y=[`$end`,`EOF`,`INVALID`,`NEWLINE`,`timeline`,`timeline_lr`,`timeline_td`,`title`,`acc_title`,`acc_title_value`,`acc_descr`,`acc_descr_value`,`acc_descr_multiline_value`,`section`,`period`,`event`];function b(i){let a=i.length,o=[],s=[],c=[],l={types:o,texts:s,starts:c},u=0,d=(e,t)=>{o.push(e),s.push(i.slice(u,t)),c.push(u),u=t};for(;u=t(i,u),!(u>=a);){let t=i.charCodeAt(u),o=u+1;if(t===10){for(;i.charCodeAt(o)===10;)o++;d(3,o)}else{if(r(i,u,`timeline`)){for(o=u+8;i.charCodeAt(o)===32||i.charCodeAt(o)===9;)o++;let e=r(i,o,`lr`);if(o>u+8&&(e||r(i,o,`td`))&&!h(i.charCodeAt(o+2))){d(e?5:6,o+2);continue}if(!h(i.charCodeAt(u+8))){d(4,u+8);continue}}if(r(i,u,`title`)){for(o=u+5;i.charCodeAt(o)!==10&&g(i.charCodeAt(o));)o++;if(o===a||i.charCodeAt(o)===10){u=o;continue}let e=i.charCodeAt(u+5);if(e!==13&&g(e)){d(7,n(i,u+6));continue}}if(o=e(i,u,l,8),o!==u)u=o;else{if(r(i,u,`section`)&&g(i.charCodeAt(u+7))){for(o=u+8;o<a&&i.charCodeAt(o)!==58&&i.charCodeAt(o)!==10;)o++;if(o>u+8){d(13,o);continue}}if(t!==58){o=u+1;for(let e=i.charCodeAt(o);o<a&&e!==35&&e!==58&&e!==10;e=i.charCodeAt(++o));d(14,o)}else{if(g(i.charCodeAt(u+1))){for(o=u+2;o<a;o++){let e=i.charCodeAt(o);if(e===10||e===58&&g(i.charCodeAt(o+1)))break}if(o>u+2){d(15,o);continue}}d(2,u+1)}}}}return(c.length===0||c[c.length-1]<a)&&d(1,a),d(0,a),l}var x=`'EOF', 'SPACE', 'NEWLINE', 'title', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'section', 'period', 'event'`;function S(e,t){let{types:n,texts:r,starts:i}=b(e),a=(t,r)=>{let a=n[t]===0?`1`:y[n[t]];throw _(`timeline`,e,i[t],`Expecting ${r}, got '${a}'`)},o=n[0];o!==4&&o!==5&&o!==6&&a(0,`'timeline', 'timeline_lr', 'timeline_td'`),o!==4&&t.setDirection(o===5?`LR`:`TD`);for(let e=1;;e++){let i=r[e];switch(n[e]){case 3:break;case 7:t.getCommonDb().setDiagramTitle(i.substring(6));break;case 8:t.getCommonDb().setAccTitle(r[++e].trim());break;case 10:t.getCommonDb().setAccDescription(r[++e].trim());break;case 12:t.getCommonDb().setAccDescription(i.trim());break;case 13:t.addSection(i.substring(8));break;case 14:t.addTask(i,0,``);break;case 15:t.addEvent(i.substring(2));break;case 1:return;default:a(e,x)}}}var C=12,te=8,ne=152,re=216,ie=264,w=20,T=20,E=14,D=8,O=8,k=12,A=` fill="var(--_bg)"`,ae=` fill="none" stroke="var(--_b)"`;function j(e,t,n,r,i){return`<rect x="${l(e)}" y="${l(t)}" width="${l(n)}" height="${l(r)}"${a(i)}/>`}function M(e,t,n){return e.direction===`TD`?N(e,t,n,!0):f(n,r=>N(e,t,n,r))}function N(e,t,n,r){let a=n.fontSize??16,f=Math.round(a*.875),m=n.measurer??ee(n.fontFamily,n.fontFamilyMono),h=n.padding??8,g=t.timeline?.disableMulticolor!==!0,_=e.periods,v=e.sections.length>0,y=e.sections.map((e,t)=>({section:t,periods:[]})),b={section:-1,periods:[]};_.forEach((e,t)=>(y[e.sectionIndex]??b).periods.push(t)),b.periods.length>0&&y.unshift(b);let x=r&&n.maxWidth!==void 0&&n.maxWidth>0?n.maxWidth-2*h:1/0,S=T+E*2+4*C,M=Math.min(ne,Math.max(80,Math.round((x-S)*.38))),N=Math.min(ie,Math.max(110,x-S-M)),P=M,F=()=>r?N:P,I=_.map(e=>u(e.text,m,a,P)),L=_.map(e=>e.events.map(e=>u(e,m,f,F()))),R=0;for(let e of I)R=Math.max(R,e.width);if(!r)for(let e of L)for(let t of e)R=Math.max(R,t.width);let oe=R>P;if(r)for(let e of L)for(let t of e)oe||=t.width>N;oe&&(P=Math.min(Math.max(Math.ceil(R),M),x===1/0?re:M),I=_.map(e=>d(e.text,m,a,P)),L=_.map(e=>e.events.map(e=>d(e,m,f,F()))));let se=Math.round(a*1.5),z=P+2*C,B=F()+2*C,V=e=>Math.max(e.height,se)+2*te,H=e=>Math.max(e.height,Math.round(f*1.5))+2*te,ce=(e,t)=>e.section>=0?o(e.section):v?`var(--_m)`:o(g?t:0),le=!1;for(let e of L)e.length>0&&(le=!0);let U=0;for(let e of y)U+=Math.max(e.periods.length,1);let W=z+w,G=_.length>0,K=r?z+(le?T+E*2+B:G?T+k:0):U>0?U*W-w+(G?k+8:0):0,q=d(e.title,m,a,Math.max(K,320),1),ue=q.height>0?q.height+16:0,de=Math.max(K,q.width),J=h+(de-K)/2,Y=h+ue,fe=(t,n)=>d(e.sections[t.section],m,a,n-2*C,1),X=(e,t,n,r,i,a)=>j(n,r,i,a,` fill="${o(e.section)}"`)+c(t,n+i/2,r+a/2,` font-weight="var(--_hw)"`+A),pe=(e,t,n,r,i)=>j(n,r,z,i,` fill="${t}"`)+c(I[e],n+z/2,r+i/2,A),me=(e,t,n,r,i)=>`<g class="pele-node pele-event">`+j(n,r,B,i,` fill="${t}" fill-opacity="0.16"`)+c(e,n+B/2,r+i/2,` font-size="${f}"`)+`</g>`,he=(e,t,n)=>`<circle class="pele-dot" cx="${l(e)}" cy="${l(t)}" r="4" fill="${n}" stroke="var(--_bg)" stroke-width="2"/>`,ge=t=>t.section>=0?`<g class="pele-cluster pele-section" data-id="${s(e.sections[t.section].trim())}">`:``,_e=e=>`<g class="pele-node pele-period" data-id="${s(_[e].text.trim())}">`,Z=``,Q;if(r){let e=J+z+T,t=e+E,n=t+E,r=Y;for(let i of y){if(Z+=ge(i),i.section>=0){let e=fe(i,K),t=V(e);Z+=X(i,e,J,r,K,t),r+=t+O+4}for(let a of i.periods){let o=ce(i,a),s=V(I[a]),c=L[a].length>0?H(L[a][0]):s,u=r+Math.max(s,c)/2,d=`M${l(J+z)},${l(u)}H${l(e)}`,f=``,p=u-c/2,m=u;for(let e of L[a]){let r=H(e);m=p+r/2,d+=`M${l(t)},${l(m)}H${l(n)}`,f+=me(e,o,n,p,r),p+=r+D}f&&(d+=`M${l(e)},${l(u)}H${l(t)}V${l(m)}`),Z+=_e(a)+pe(a,o,J,u-s/2,s)+`<path class="pele-edge" d="${d}"${ae}/>`+he(e,u,o)+f+`</g>`,r=Math.max(u+s/2,p-D)+w}i.periods.length===0&&(r+=w-O-4),i.section>=0&&(Z+=`</g>`)}if(y.length>0&&(r-=w),G){let t=r+k+8;Z=`<path class="pele-axis" d="M${l(e)},${l(Y)}V${l(t-8+1)}" fill="none" stroke="var(--_l)"/>`+p(`arrow_point`,e,t,0,1,`var(--_l)`)+Z,r=t}Q=r+h}else{let e=0,t=y.map(t=>{if(t.section<0)return;let n=fe(t,Math.max(t.periods.length,1)*W-w);return e=Math.max(e,V(n)),n}),n=0;for(let e of I)n=Math.max(n,V(e));let r=Y+(v?e+O:0),i=r+n+(n>0?T:0),a=i+T,o=G?i+k:Y+e,s=0;if(y.forEach((c,u)=>{let d=Math.max(c.periods.length,1),f=J+s*W;Z+=ge(c);let p=t[u];p&&(Z+=X(c,p,f,Y,d*W-w,e)),c.periods.forEach((e,t)=>{let s=ce(c,e),u=f+t*W,d=u+z/2,p=`M${l(d)},${l(r+n)}V${l(L[e].length>0?a:i)}`,m=``,h=a;for(let t of L[e]){let e=H(t);h>a&&(p+=`M${l(d)},${l(h-D)}V${l(h)}`),m+=me(t,s,u,h,e),h+=e+D}o=Math.max(o,h-D),Z+=_e(e)+pe(e,s,u,r,n)+`<path class="pele-edge" d="${p}"${ae}/>`+he(d,i,s)+m+`</g>`}),c.section>=0&&(Z+=`</g>`),s+=d}),G){let e=J+K;Z=`<path class="pele-axis" d="M${l(J)},${l(i)}H${l(e-8+1)}" fill="none" stroke="var(--_l)"/>`+p(`arrow_point`,e,i,1,0,`var(--_l)`)+Z}Q=o+h}let $=Math.ceil(de+2*h),ve=Math.ceil(Math.max(Q,h*2)),ye=c(q,$/2,h+q.height/2,` class="pele-title" font-weight="var(--_tw)"`)+Z;return{svg:i(`timeline`,$,ve,a,n,e,ye),width:$,height:ve,links:[]}}var P={type:`timeline`,parse(e,t,n){let r=new v;return r.title=n,S(e,r),r},render:M};export{P as timeline};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{_ as e,i as t,o as n,r,u as i,x as a}from"./
|
|
1
|
+
import{_ as e,i as t,o as n,r,u as i,x as a}from"./DlgOmQ_G.js";import{o,r as s}from"./DciMwFJ1.js";import{a as c,i as l,s as u}from"./BF3mdiSX.js";import{a as d,c as f,d as p,f as m,g as h,h as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T}from"./jAC4YCqW.js";import{PeleError as E,u as ee}from"./BArcFmbE.js";function D(e){throw new E(e,`semantic`,{type:`architecture`})}var O=class{type=`architecture`;title;accTitle;accDescr;nodes=new Map;groups=new Map;edges=[];layoutHints=[];registered=new Map;register(e,t,n){this.registered.has(t)&&D(`The ${e} id [${t}] is already in use by another ${this.registered.get(t)}`),n!==void 0&&(t===n&&D(`The ${e} [${t}] cannot be placed within itself`),this.registered.has(n)||D(`The ${e} [${t}]'s parent does not exist. Please make sure the parent is created before this ${e}`),this.registered.get(n)===`node`&&D(`The ${e} [${t}]'s parent is not a group`)),this.registered.set(t,e===`group`?`group`:`node`)}addService({id:e,icon:t,iconText:n,title:r,in:i}){this.register(`service`,e,i),this.nodes.set(e,{id:e,type:`service`,icon:t,iconText:n,title:r,in:i})}addJunction({id:e,in:t}){this.register(`junction`,e,t),this.nodes.set(e,{id:e,type:`junction`,in:t})}addGroup({id:e,icon:t,title:n,in:r}){this.register(`group`,e,r),this.groups.set(e,{id:e,icon:t,title:n,in:r})}addEdge({lhsId:e,rhsId:t,lhsDir:n,rhsDir:r,lhsInto:i,rhsInto:a,lhsGroup:o,rhsGroup:s,title:c}){let l=[[`left`,e,o],[`right`,t,s]];for(let[e,t]of l)this.registered.has(t)||D(`The ${e}-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);for(let[e,t]of l)this.nodes.has(t)||D(`The ${e}-hand id [${t}] is a group. Add {group} to a service inside it instead.`);let u=this.nodes.get(e).in;if(u!==void 0&&u===this.nodes.get(t).in)for(let[e,t,n]of l)n&&D(`The ${e}-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);this.edges.push({lhsId:e,lhsDir:n,lhsInto:i,lhsGroup:o,rhsId:t,rhsDir:r,rhsInto:a,rhsGroup:s,title:c})}addLayoutHint(e){e.members.length<2&&D(`An align directive requires at least two members; got ${e.members.length}`);let t=new Set;for(let n of e.members)this.registered.get(n)!==`node`&&D(`align ${e.direction} references [${n}], which is not a service or junction`),t.has(n)&&D(`align ${e.direction} lists [${n}] more than once`),t.add(n);this.layoutHints.push(e)}};function k(e,t){e.accDescr&&(t.accDescr=e.accDescr.replace(/\n\s+/g,`
|
|
2
2
|
`)),e.accTitle&&(t.accTitle=e.accTitle.replace(/^\s+/g,``)),e.title&&(t.title=e.title);for(let n of e.groups)t.addGroup(n);for(let n of e.services)t.addService(n);for(let n of e.junctions)t.addJunction(n);for(let n of e.edges)t.addEdge(n);for(let n of e.alignments)t.addLayoutHint({direction:n.direction,members:[...n.members]})}var A={name:`ID`,pattern:/[\w]([-\w]*\w)?/y};function j(e){return{name:e,pattern:e,longer:[A]}}var M=[j(`architecture-beta`),j(`junction`),j(`service`),j(`column`),j(`group`),j(`align`),j(`row`),{name:`--`,pattern:`--`,longer:[S]},j(`in`),{name:`:`,pattern:`:`},{name:`-`,pattern:`-`,longer:[S]},{name:`ARROW_DIRECTION`,pattern:/L|R|T|B/y},{name:`ARROW_GROUP`,pattern:/\{group\}/y},{name:`ARROW_INTO`,pattern:/<|>/y},d,w,x,v,A,_,T,S,b,C,{name:`ARCH_ICON`,pattern:/\([\w-:]+\)/y},{name:`ARCH_TITLE`,pattern:/\[(?:"([^"\\]|\\.)*"|'([^'\\]|\\.)*'|[^\[\]\r\n]+)\]/y}];function N(e){let t=e.slice(1,-1).trim();return(t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`))&&(t=t.slice(1,-1).replace(/\\"/g,`"`).replace(/\\'/g,`'`)),t.trim()}function P(e){let t=new g(y(e,M,`architecture`),M,`architecture`),n={$type:`Architecture`,groups:[],services:[],junctions:[],edges:[],alignments:[]},r=e=>t.kinds[t.i]===e,i=()=>{if(t.kind!==-1)for(t.kind!==19&&t.fail(`a line break or the end of input`);t.kind===19;)t.i++};for(;t.kind===19;)t.i++;for(t.expect(0);t.kind!==-1;){switch(t.kind){case 19:t.i++;continue;case 14:n.accDescr=f(t.take());break;case 15:n.accTitle=h(t.take());break;case 16:n.title=p(t.take());break;case 4:{t.i++;let e={$type:`Group`,id:t.expect(18)};r(24)&&(e.icon=t.take().slice(1,-1)),r(25)&&(e.title=N(t.take())),t.accept(8)&&(e.in=t.expect(18)),n.groups.push(e);break}case 2:{t.i++;let e={$type:`Service`,id:t.expect(18)};r(17)?e.iconText=m(t.take()):r(24)&&(e.icon=t.take().slice(1,-1)),r(25)&&(e.title=N(t.take())),t.accept(8)&&(e.in=t.expect(18)),n.services.push(e);break}case 1:{t.i++;let e={$type:`Junction`,id:t.expect(18)};t.accept(8)&&(e.in=t.expect(18)),n.junctions.push(e);break}case 18:{let e=t.take(),i=t.accept(12);t.expect(9);let a=t.expect(11),o=t.accept(13),s;t.accept(7)||(r(10)||t.fail(`'--' or '-'`),t.i++,s=N(t.expect(25)),t.expect(10));let c=t.accept(13),l=t.expect(11);t.expect(9);let u=t.expect(18),d=t.accept(12);n.edges.push({$type:`Edge`,lhsId:e,lhsGroup:i,lhsDir:a,lhsInto:o,title:s,rhsInto:c,rhsDir:l,rhsId:u,rhsGroup:d});break}case 5:{t.i++,!r(6)&&!r(3)&&t.fail(`'row' or 'column'`);let e=t.take(),i=[t.expect(18),t.expect(18)];for(;r(18);)i.push(t.take());n.alignments.push({$type:`Alignment`,direction:e,members:i});break}default:t.fail(`a group, a service, a junction, an edge, an alignment, a title, or a line break`)}i()}return n}var F=new Map([[`database`,`M4 6a8 3 0 1 0 16 0a8 3 0 1 0-16 0M4 6v12a8 3 0 0 0 16 0V6M4 12a8 3 0 0 0 16 0`],[`server`,`M3 4h18v7H3zM3 13h18v7H3zM7 7.5h.01M7 16.5h.01M11 7.5h6M11 16.5h6`],[`disk`,`M5 3h14v18H5zM12 6.5a4 4 0 1 0 0 8a4 4 0 1 0 0-8M12 10.5h.01M8 18h3`],[`internet`,`M3 12a9 9 0 1 0 18 0a9 9 0 1 0-18 0M3 12h18M12 3a13 13 0 0 0 0 18M12 3a13 13 0 0 1 0 18`],[`cloud`,`M7 18a4 4 0 0 1-.5-7.97A6 6 0 0 1 18 9.5a4.25 4.25 0 0 1-.5 8.5z`]]);function I(e){let t=F.get(e);return t===void 0?``:`<path d="${t}" stroke="var(--_fg)" stroke-width="1.5"/>`}var L=[-1,1,0,0],R=[0,0,-1,1];function te(e){return e===`L`?0:e===`R`?1:e===`T`?2:3}var z=64,B=2**25,V=2**26;function ne(e,t,n,r){let i=e.length,a=t.length,o=a,s=new Map,c=new Map,l=new Int32Array(i+a).fill(o),u=new Int32Array(a+1),d=[];for(let e=0;e<=a;e++)d.push([]);t.forEach((e,t)=>{c.set(e.id,t);let n=e.in===void 0?void 0:c.get(e.in);n!==void 0&&n!==t?(l[i+t]=n,u[t]=u[n]+1):u[t]=1}),e.forEach((e,t)=>{s.set(e.id,t);let n=e.in===void 0?void 0:c.get(e.in);n!==void 0&&(l[t]=n),d[l[t]].push(t)});for(let e=0;e<a;e++)d[l[i+e]].push(i+e);let f=[],p=[],m=[],h=[],g=[],_=[],v=Array(i+a),y=Array(i+a),b=(e,t,n,r,a)=>{if(e===t)return;let o=e,s=t,c=l[e],d=l[t];for(;c!==d;)u[c]>=u[d]?(o=i+c,c=l[o]):(s=i+d,d=l[s]);let v=f.length;f.push(e),p.push(t),m.push(n),h.push(r),g.push(o),_.push(s),(a[o]??=[]).push(v),(a[s]??=[]).push(v)};for(let e of r){let t=e.direction===`row`;for(let n=1;n<e.members.length;n++){let r=s.get(e.members[n-1]),i=s.get(e.members[n]);r!==void 0&&i!==void 0&&b(r,i,t?1:3,t?0:2,v)}}for(let e of[!1,!0])for(let t of n){if(t.lhsDir===t.rhsDir!==e)continue;let n=s.get(t.lhsId),r=s.get(t.rhsId);n!==void 0&&r!==void 0&&b(n,r,te(t.lhsDir),te(t.rhsDir),y)}let x=new Int32Array(i+a),S=new Int32Array(i+a),C=new Int32Array(i+a).fill(1),w=new Int32Array(i+a).fill(1),T=new Uint8Array(i+a),E=[],ee=new Map,D=[],O=new Map,k=0,A=0,j=0,M=(e,t)=>{A=0,j=0;for(let n=e;n!==t;n=i+l[n])A+=x[n],j+=S[n]},N=(e,t,n)=>{if(x[e]=t,S[e]=n,T[e]=1,E.push(e),C[e]*w[e]>z)D.push(e);else for(let r=n;r<n+w[e];r++)for(let n=t;n<t+C[e];n++)ee.set((n+B)*V+r+B,e)},P=(e,t,n,r,i)=>x[e]<t+r&&t<x[e]+C[e]&&S[e]<n+i&&n<S[e]+w[e],F=(e,t,n,r)=>{if(n*r>z){for(let i=k;i<E.length;i++)if(P(E[i],e,t,n,r))return E[i];return-1}for(let i=t;i<t+r;i++)for(let t=e;t<e+n;t++){let e=ee.get((t+B)*V+i+B);if(e!==void 0)return e}for(let i of D)if(P(i,e,t,n,r))return i;return-1},I=(e,t,n,r,i,a)=>{let o=`${e},${t},${n},${r},${i},${a}`,s=O.get(o)??0;for(;;){let o=F(e+s*i,t+s*a,n,r);if(o<0)break;s=i>0?x[o]+C[o]-e:i<0?e+n-x[o]:a>0?S[o]+w[o]-t:t+r-S[o]}return O.set(o,s),s},ne=(e,t)=>{let n=g[t]===e,r=n?_[t]:g[t];if(T[r])return;let i=n?m[t]:h[t],a=n?h[t]:m[t];M(n?f[t]:p[t],e);let o=A,s=j;M(n?p[t]:f[t],r);let c=L[i],l=R[i],u=0,d=0,v=L[i]+L[a]===0&&R[i]+R[a]===0;i===a?(c=+(L[i]===0),l=1-c):v||(u=-L[a],d=-R[a]);let b,E;if(c===0?(E=l>0?S[e]+w[e]:S[e]-w[r],b=x[e]+o+u-A):(b=c>0?x[e]+C[e]:x[e]-C[r],E=S[e]+s+d-j),v){let e=y[r];if(e!==void 0&&e.length>1){let t=[];for(let n of e){let e=_[n]===r,o=e?g[n]:_[n];if(!T[o]||(e?m[n]:h[n])!==i||(e?h[n]:m[n])!==a)continue;M(e?f[n]:p[n],o);let s=c===0?x[o]+A:S[o]+j;M(e?p[n]:f[n],r),t.push(s-(c===0?A:j))}t.length>1&&(t.sort((e,t)=>e-t),c===0?b=t[t.length-1>>1]:E=t[t.length-1>>1])}let t=+(c===0),n=1-t,o=I(b,E,C[r],w[r],t,n),s=o===0?0:I(b,E,C[r],w[r],-t,-n),l=o<=s?o:-s;b+=t*l,E+=n*l}else{let e=I(b,E,C[r],w[r],c,l);b+=c*e,E+=l*e}N(r,b,E)},H=e=>{let t=d[e];if(t.length===0)return;E.length=0;let n=[];for(let e of t){if(T[e])continue;k=E.length,n.push(k),ee.clear(),D.length=0,O.clear(),N(e,0,0);let t=k,r=k,i=0;for(;;){if(t<E.length){let e=E[t++],n=v[e];if(n!==void 0)for(let t of n)ne(e,t);continue}if(r>=E.length)break;let e=y[E[r]];e===void 0||i>=e.length?(r++,i=0):ne(E[r],e[i++])}}n.push(E.length);let r=n.length-1,o=Array(r),s=Array(r),c=Array(r),l=Array(r),u=0,f=0;for(let e=0;e<r;e++){let t=1/0,r=1/0,i=-1/0,a=-1/0;for(let o=n[e];o<n[e+1];o++){let e=E[o];t=Math.min(t,x[e]),r=Math.min(r,S[e]),i=Math.max(i,x[e]+C[e]),a=Math.max(a,S[e]+w[e])}o[e]=t,s[e]=r,c[e]=i-t,l[e]=a-r,u+=c[e]*l[e],f=Math.max(f,c[e])}let p=Math.max(f,Math.ceil(Math.sqrt(u*2))),m=0,h=0,g=0,_=0;for(let e=0;e<r;e++){m>0&&m+c[e]>p&&(h+=g,m=0,g=0);for(let t=n[e];t<n[e+1];t++)x[E[t]]+=m-o[e],S[E[t]]+=h-s[e];m+=c[e],g=Math.max(g,l[e]),_=Math.max(_,m)}e<a&&(C[i+e]=_,w[i+e]=h+g)};for(let e=a-1;e>=0;e--)H(e);H(o);let U=new Int32Array(a),W=new Int32Array(a),re=new Int32Array(a),ie=new Uint8Array(a);for(let e=0;e<a;e++){let t=l[i+e];re[e]=t===o?-1:t,U[e]=x[i+e]+(t===o?0:U[t]),W[e]=S[i+e]+(t===o?0:W[t]),d[e].length===0&&(ie[e]=1)}let ae=new Int32Array(i),oe=new Int32Array(i),se=new Int32Array(i);for(let e=0;e<i;e++){let t=l[e];se[e]=t===o?-1:t,ae[e]=x[e]+(t===o?0:U[t]),oe[e]=S[e]+(t===o?0:W[t])}return{col:ae,row:oe,groupCol:U,groupRow:W,groupCols:C.slice(i),groupRows:w.slice(i),groupParent:re,groupEmpty:ie,nodeParent:se}}var H=12,U=6,W=4,re=3,ie=[-1,1,0,0],ae=[0,0,-1,1];function oe(e,t,n,r,i){let a=e.architecture,o=typeof a==`object`&&a&&!Array.isArray(a)?a[t]:void 0;return typeof o==`number`&&Number.isFinite(o)?Math.min(i,Math.max(r,o)):n}function se(e){let t=new Map;for(let n of e.sort((e,t)=>e-t))t.has(n)||t.set(n,t.size);return t}function ce(e,n,r,i,o){return`<svg class="pele-icon" data-icon="${t(e)}" x="${a(n)}" y="${a(r)}" width="${a(i)}" height="${a(i)}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${o?.(e)??I(e)}</svg>`}function le(e,t,n,r){let i=e.lines.length>n;if(!i&&e.width<=t)return e;let a=r.width(`…`,e.size,0),o=[],s=[],c=0;for(let l=0;l<Math.min(n,e.lines.length);l++){let u=e.lines[l].map(e=>({...e})),d=e.widths[l];if(d>t||i&&l===n-1)for(;;){let n=u[u.length-1];if(n===void 0){u.push({text:`…`,style:0,width:a}),d=a;break}let i=d-n.width;if(n.icon===void 0&&i+a<t){let o=0,s=n.text.length;for(;o<s;){let c=o+s+1>>1;i+r.width(n.text.slice(0,c),e.size,n.style)+a<=t?o=c:s=c-1}let c=o>0?n.text.charCodeAt(o-1):0;c>=55296&&c<=56319&&o--,n.text=n.text.slice(0,o).trimEnd()+`…`,n.width=r.width(n.text,e.size,n.style),d=i+n.width;break}u.pop(),d=i}o.push(u),s.push(d),c=Math.max(c,d)}return{...e,lines:o,widths:s,width:c,height:o.length*e.lineHeight}}function ue(e,t){let{x:n,y:r,dx:i,dy:a}=e,{x:o,y:s,dx:c,dy:l}=t,u=n+i*H,d=r+a*H,f=o+c*H,p=s+l*H;if(i*c+a*l===0){let e=i===0?n:o,t=i===0?s:r;return(e-n)*i+(t-r)*a>0&&(e-o)*c+(t-s)*l>0?[n,r,e,t,o,s]:i===0?[n,r,u,d,f,d,f,p,o,s]:[n,r,u,d,u,p,f,p,o,s]}let m=i!==0,h=m?s-r:o-n;if(i===-c&&a===-l){if((o-n)*i+(s-r)*a>0){if(Math.abs(h)<.5)return[n,r,o,s];if(m){let a=i>0?e.x1:t.x1,c=i>0?t.x0:e.x0,l=a<c?(a+c)/2:(n+o)/2;return[n,r,l,r,l,s,o,s]}let c=a>0?e.y1:t.y1,l=a>0?t.y0:e.y0,u=c<l?(c+l)/2:(r+s)/2;return[n,r,n,u,o,u,o,s]}}else if(Math.abs(h)>=1){if(m){let e=i>0?Math.max(n,o)+H:Math.min(n,o)-H;return[n,r,e,r,e,s,o,s]}let e=a>0?Math.max(r,s)+H:Math.min(r,s)-H;return[n,r,n,e,o,e,o,s]}if(m){let i=e.y1+H<=t.y0?(e.y1+t.y0)/2:t.y1+H<=e.y0?(t.y1+e.y0)/2:Math.max(e.y1,t.y1)+H;return[n,r,u,r,u,i,f,i,f,s,o,s]}let g=e.x1+H<=t.x0?(e.x1+t.x0)/2:t.x1+H<=e.x0?(t.x1+e.x0)/2:Math.max(e.x1,t.x1)+H;return[n,r,n,d,g,d,g,p,o,p,o,s]}function de(e){let t=[e[0],e[1]];for(let n=2;n<e.length;n+=2){let r=e[n],i=e[n+1],a=t.length,o=Math.abs(r-t[a-2])<.01,s=Math.abs(i-t[a-1])<.01;o&&s||(a>=4&&(o&&Math.abs(t[a-4]-t[a-2])<.01||s&&Math.abs(t[a-3]-t[a-1])<.01)?(t[a-2]=r,t[a-1]=i):t.push(r,i))}return t}function fe(e,t,n){let r=e.length/2,i=Array(r),o=Array(r);for(let t=0;t<r;t++)i[t]=e[t*2],o[t]=e[t*2+1];let s=(e,t,n)=>{let r=Math.hypot(i[t]-i[e],o[t]-o[e]),a=Math.min(n,Math.max(0,r-1));r>0&&a>0&&(i[e]+=(i[t]-i[e])/r*a,o[e]+=(o[t]-o[e])/r*a)};s(0,1,t),s(r-1,r-2,n);let c=`M${a(i[0])},${a(o[0])}`;for(let e=1;e<r-1;e++){let t=Math.hypot(i[e]-i[e-1],o[e]-o[e-1]),n=Math.hypot(i[e+1]-i[e],o[e+1]-o[e]),r=Math.min(U,t/2,n/2);if(r<.5){c+=`L${a(i[e])},${a(o[e])}`;continue}let s=i[e]-(i[e]-i[e-1])/t*r,l=o[e]-(o[e]-o[e-1])/t*r,u=i[e]+(i[e+1]-i[e])/n*r,d=o[e]+(o[e+1]-o[e])/n*r;c+=`L${a(s)},${a(l)}Q${a(i[e])},${a(o[e])} ${a(u)},${a(d)}`}return c+`L${a(i[r-1])},${a(o[r-1])}`}function G(e,t,n){return o(n,r=>K(e,t,n,r))}function K(o,d,f,p){let m=oe(d,`iconSize`,48,8,512),h=oe(d,`fontSize`,f.fontSize??16,4,128),g=Math.min(oe(d,`padding`,20,0,256),p?12:1/0),_=Math.round(h*.875),v=f.measurer??ee(f.fontFamily,f.fontFamilyMono),y=f.padding??8,b=f.icons,x=m/2,S=[...o.nodes.values()],C=[...o.groups.values()],w=S.length,T=C.length,E=ne(S,C,o.edges,o.layoutHints),D=new Map;S.forEach((e,t)=>D.set(e.id,t));let O=Array(w),k=new Float64Array(w),A=new Float64Array(w),j=p?Math.max(m,64):Math.max(m*2.25,96);for(let e=0;e<w;e++){let t=S[e],n=i(t.type===`service`?t.title:void 0,!0,v,h,j);O[e]=n,k[e]=Math.max(m,2*Math.ceil(n.width/2)),A[e]=m+(n.height>0?W+n.height:0)}let M=[],N=[];for(let e=0;e<w;e++)M.push(E.col[e]),N.push(E.row[e]);for(let e=0;e<T;e++)E.groupEmpty[e]&&(M.push(E.groupCol[e]),N.push(E.groupRow[e]));let P=se(M),F=se(N),I=P.size,L=F.size,R=new Float64Array(I),z=new Float64Array(L),B=p?Math.max(24,2*H):Math.max(40,Math.round(m*.75)),V=new Float64Array(I).fill(B),U=new Float64Array(L).fill(B),G=new Int32Array(w),K=new Int32Array(w);for(let e=0;e<w;e++){let t=G[e]=P.get(E.col[e]),n=K[e]=F.get(E.row[e]);R[t]=Math.max(R[t],k[e]),z[n]=Math.max(z[n],A[e])}for(let e=0;e<T;e++){if(!E.groupEmpty[e])continue;let t=P.get(E.groupCol[e]),n=F.get(E.groupRow[e]);R[t]=Math.max(R[t],m),z[n]=Math.max(z[n],x)}let pe=o.edges.length,me=Array(pe),he=new Int32Array(pe*2);for(let e=0;e<pe;e++){let t=o.edges[e],n=he[e*2]=D.get(t.lhsId)??-1,r=he[e*2+1]=D.get(t.rhsId)??-1,a=i(t.title,!0,v,_,160);if(me[e]=a,!(a.width===0||n<0||r<0)){if(G[n]!==G[r]){let e=Math.min(G[n],G[r]);V[e]=Math.max(V[e],Math.ceil(a.width)+28)}else if(R[G[n]]=Math.max(R[G[n]],2*Math.ceil(a.width/2)+8),K[n]!==K[r]){let e=Math.min(K[n],K[r]);U[e]=Math.max(U[e],Math.ceil(a.height)+24)}}}let ge=Array(T),q=new Int32Array(T),J=new Int32Array(T),_e=new Int32Array(T),Y=new Int32Array(T),ve=new Float64Array(T),ye=new Float64Array(T),be=new Float64Array(T),xe=new Float64Array(T),X=new Float64Array(T),Se=new Float64Array(T),Ce=new Float64Array(I),we=new Float64Array(I),Te=new Float64Array(L),Ee=new Float64Array(L),De=Math.round(h*1.25);for(let e=0;e<T;e++){q[e]=P.get(E.groupCol[e]),J[e]=P.get(E.groupCol[e]+E.groupCols[e]-1),_e[e]=F.get(E.groupRow[e]),Y[e]=F.get(E.groupRow[e]+E.groupRows[e]-1);let t=i(C[e].title,!0,v,h,p?Math.max(80,s(f)/2):320);ge[e]=t;let n=C[e].icon?De:0;X[e]=t.width+n+(t.width>0&&n>0?6:0),Se[e]=Math.max(t.height,n)}for(let e=T-1;e>=0;e--){let t=g+ve[e],n=g+ye[e],r=(Se[e]>0?Math.max(g,Se[e]+12):g)+be[e],i=g+xe[e];if(X[e]>0){let r=t+n;for(let t=q[e];t<=J[e];t++)r+=R[t]+(t<J[e]?we[t]+V[t]+Ce[t+1]:0);X[e]+20>r&&(n+=Math.ceil(X[e]+20-r))}ve[e]=t,ye[e]=n,be[e]=r,xe[e]=i,Ce[q[e]]=Math.max(Ce[q[e]],t),we[J[e]]=Math.max(we[J[e]],n),Te[_e[e]]=Math.max(Te[_e[e]],r),Ee[Y[e]]=Math.max(Ee[Y[e]],i);let a=E.groupParent[e];a<0||(q[a]===q[e]&&(ve[a]=Math.max(ve[a],t)),J[a]===J[e]&&(ye[a]=Math.max(ye[a],n)),_e[a]===_e[e]&&(be[a]=Math.max(be[a],r)),Y[a]===Y[e]&&(xe[a]=Math.max(xe[a],i)))}let Oe=new Float64Array(I),Z=new Float64Array(L),ke=0;for(let e=0;e<I;e++)Oe[e]=ke+Ce[e],ke=Oe[e]+R[e]+we[e]+(e<I-1?V[e]:0);let Ae=0;for(let e=0;e<L;e++)Z[e]=Ae+Te[e],Ae=Z[e]+z[e]+Ee[e]+(e<L-1?U[e]:0);let Q=0,je=0,Me=ke,Ne=Ae,Pe=e=>Oe[q[e]]-ve[e],Fe=e=>Oe[J[e]]+R[J[e]]+ye[e],Ie=e=>Z[_e[e]]-be[e],Le=e=>Z[Y[e]]+z[Y[e]]+xe[e],Re=e=>Oe[G[e]]+R[G[e]]/2,ze=(e,t,n)=>{let r=ie[t],i=ae[t],a=Re(e),o=Z[K[e]],s={x:a,y:o+x,dx:r,dy:i,x0:a-k[e]/2,y0:o,x1:a+k[e]/2,y1:o+A[e],gap:0,wire:!1};S[e].type===`junction`?(s.x0=s.x1=a,s.y0=s.y1=s.y,s.gap=re):r===0?s.y=i<0?o:o+A[e]+(O[e].height>0?2:0):s.x=a+r*x;let c=n?E.nodeParent[e]:-1;return c>=0&&(s.x0=Pe(c),s.x1=Fe(c),s.y0=Ie(c),s.y1=Le(c),s.gap=0,s.wire=S[e].type===`junction`,r===0?s.y=i<0?s.y0:s.y1:s.x=r<0?s.x0:s.x1),s},Be=``,Ve=``,$=[],He=c(`arrow_point`);for(let e=0;e<pe;e++){let n=o.edges[e],r=he[e*2],i=he[e*2+1];if(r<0||i<0)continue;let a=ze(r,te(n.lhsDir),n.lhsGroup),s=ze(i,te(n.rhsDir),n.rhsGroup);a.x===s.x&&a.y===s.y&&a.dx===s.dx&&(a.x-=8*Math.abs(a.dy),a.y-=8*Math.abs(a.dx),s.x+=8*Math.abs(a.dy),s.y+=8*Math.abs(a.dx));let c=ue(a,s);a.wire&&c.unshift(Re(r),Z[K[r]]+x),s.wire&&c.push(Re(i),Z[K[i]]+x);let d=de(c);if(d.length<4)continue;let f=t(`${n.lhsId}-${n.rhsId}`);Be+=`<g class="pele-edge" data-id="${f}"><path d="${fe(d,n.lhsInto&&!a.wire?He+a.gap:0,n.rhsInto&&!s.wire?He+s.gap:0)}"/>`+(n.lhsInto?u(`arrow_point`,a.x+a.dx*a.gap,a.y+a.dy*a.gap,-a.dx,-a.dy,`var(--_l)`):``)+(n.rhsInto?u(`arrow_point`,s.x+s.dx*s.gap,s.y+s.dy*s.gap,-s.dx,-s.dy,`var(--_l)`):``)+`</g>`;let p=-1,m=-1,h=-1,g=-1,_=me[e];for(let e=0;e<d.length;e+=2)Q=Math.min(Q,d[e]-4),Me=Math.max(Me,d[e]+4),je=Math.min(je,d[e+1]-4),Ne=Math.max(Ne,d[e+1]+4);for(let e=0;e+3<d.length;e+=2){let t=Math.abs(d[e+1]-d[e+3])<.01,n=Math.abs(d[e]-d[e+2])+Math.abs(d[e+1]-d[e+3]);t||$.push(d[e],Math.min(d[e+1],d[e+3]),Math.max(d[e+1],d[e+3])),n>m&&(p=e,m=n),t&&n>g&&(h=e,g=n)}if(_.width>0){let e=g>=_.width+8?h:p,t=(d[e]+d[e+2])/2,r=(d[e+1]+d[e+3])/2,i=_.width+8,o=Math.abs(d[e]-d[e+2])<.01;for(let e of[a,s])t+i/2<=e.x0||t-i/2>=e.x1||r+_.height/2<=e.y0||r-_.height/2>=e.y1||(o?t=t>=(e.x0+e.x1)/2?e.x1+i/2+4:e.x0-i/2-4:r=r>=(e.y0+e.y1)/2?e.y1+_.height/2+4:e.y0-_.height/2-4);Q=Math.min(Q,t-i/2),Me=Math.max(Me,t+i/2),je=Math.min(je,r-_.height/2),Ne=Math.max(Ne,r+_.height/2),Ve+=l(`${n.lhsId}-${n.rhsId}`,_,t,r,``,b)}}let Ue=``;for(let e=0;e<T;e++){let i=C[e],o=Pe(e),s=Ie(e),c=Fe(e)-o,l=ge[e],u=``;if(X[e]>0){let t=s+Se[e]+12,r=[];for(let e=0;e<$.length;e+=3)$[e+1]<t&&$[e+2]>s&&$[e]>o&&$[e]<o+c&&r.push($[e]);r.sort((e,t)=>e-t),r.push(o+c-4);let a=o+10;for(let t of r){if(t-6-a>=X[e])break;a=Math.max(a,t+6)}a+X[e]>o+c-4&&(a=o+10);let d=s+6+Se[e]/2,f=a;i.icon&&(u+=ce(i.icon,a,d-De/2,De,b),f+=De+6),u+=n(l,f+l.width/2,d,` class="pele-cluster-label" fill="var(--_m)"`,b)}Ue+=`<g class="pele-cluster" data-id="${t(i.id)}"><rect x="${a(o)}" y="${a(s)}" width="${a(c)}" height="${a(Le(e)-s)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${r}/>`+u+`</g>`}let We=``,Ge=m*.5,Ke=Math.max(6,Math.round(h*.75));for(let e=0;e<w;e++){let o=S[e],s=`data-id="${t(o.id)}" transform="translate(${a(Re(e))},${a(Z[K[e]])})"`;if(o.type===`junction`){We+=`<g class="pele-node pele-junction" ${s}><circle cy="${a(x)}" r="${re}" fill="var(--_l)"/></g>`;continue}let c=``;if(o.icon)c=ce(o.icon,-Ge/2,(m-Ge)/2,Ge,b);else if(o.iconText){let e=i(o.iconText,!1,v,Ke,m-8),t=Math.max(1,Math.floor((m-4)/(e.lineHeight||1)));c=n(le(e,m-8,t,v),0,x,` class="pele-icon-text" font-size="${Ke}"`,b)}We+=`<g class="pele-node pele-service" ${s}><rect x="${a(-x)}" width="${a(m)}" height="${a(m)}" fill="var(--_s)" stroke="var(--_b)"${r}/>`+c+n(O[e],0,m+W+O[e].height/2,` class="pele-label"`,b)+`</g>`}let qe=i(o.title,!1,v,h,p?s(f):4e3,1),Je=qe.height>0?qe.height+12:0,Ye=Math.ceil(Math.max(Me-Q,qe.width)+2*y),Xe=Math.ceil(Ne-je+Je+2*y),Ze=Math.round((Ye-(Me-Q))/2-Q),Qe=Math.round(y+Je-je),$e=(Ue?`<g class="pele-clusters">${Ue}</g>`:``)+(Be?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round" stroke-linejoin="round">${Be}</g>`:``)+(Ve?`<g class="pele-edge-labels" font-size="${_}">${Ve}</g>`:``)+(We?`<g class="pele-nodes">${We}</g>`:``);return{svg:e(`architecture`,Ye,Xe,h,f,o,n(qe,Ye/2,y+qe.height/2,` class="pele-title" font-weight="var(--_tw)"`)+($e?`<g transform="translate(${Ze},${Qe})">${$e}</g>`:``)),width:Ye,height:Xe,links:[]}}var pe={type:`architecture`,parse(e,t,n){let r=new O;return n&&(r.title=n),k(P(e),r),r},render:G};export{pe as architecture};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{H as e,at as t,it as n,yt as r}from"./Cz6kYWmu.js";import{s as i}from"./DQp-M3XN.js";var a=Symbol.for(`yaml.alias`),o=Symbol.for(`yaml.document`),s=Symbol.for(`yaml.map`),c=Symbol.for(`yaml.pair`),l=Symbol.for(`yaml.scalar`),u=Symbol.for(`yaml.seq`),d=Symbol.for(`yaml.node.type`),f=e=>!!e&&typeof e==`object`&&e[d]===a,p=e=>!!e&&typeof e==`object`&&e[d]===o,m=e=>!!e&&typeof e==`object`&&e[d]===s,h=e=>!!e&&typeof e==`object`&&e[d]===c,g=e=>!!e&&typeof e==`object`&&e[d]===l,_=e=>!!e&&typeof e==`object`&&e[d]===u;function v(e){if(e&&typeof e==`object`)switch(e[d]){case s:case u:return!0}return!1}function y(e){if(e&&typeof e==`object`)switch(e[d]){case a:case s:case l:case u:return!0}return!1}var b=e=>(g(e)||v(e))&&!!e.anchor,x=Symbol(`break visit`),S=Symbol(`skip children`),C=Symbol(`remove node`);function w(e,t){let n=E(t);p(e)?T(null,e.contents,n,Object.freeze([e]))===C&&(e.contents=null):T(null,e,n,Object.freeze([]))}w.BREAK=x,w.SKIP=S,w.REMOVE=C;function T(e,t,n,r){let i=ee(e,t,n,r);if(y(i)||h(i))return te(e,r,i),T(e,i,n,r);if(typeof i!=`symbol`){if(v(t)){r=Object.freeze(r.concat(t));for(let e=0;e<t.items.length;++e){let i=T(e,t.items[e],n,r);if(typeof i==`number`)e=i-1;else if(i===x)return x;else i===C&&(t.items.splice(e,1),--e)}}else if(h(t)){r=Object.freeze(r.concat(t));let e=T(`key`,t.key,n,r);if(e===x)return x;e===C&&(t.key=null);let i=T(`value`,t.value,n,r);if(i===x)return x;i===C&&(t.value=null)}}return i}function E(e){return typeof e==`object`&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function ee(e,t,n,r){if(typeof n==`function`)return n(e,t,r);if(m(t))return n.Map?.(e,t,r);if(_(t))return n.Seq?.(e,t,r);if(h(t))return n.Pair?.(e,t,r);if(g(t))return n.Scalar?.(e,t,r);if(f(t))return n.Alias?.(e,t,r)}function te(e,t,n){let r=t[t.length-1];if(v(r))r.items[e]=n;else if(h(r))e===`key`?r.key=n:r.value=n;else if(p(r))r.contents=n;else{let e=f(r)?`alias`:`scalar`;throw Error(`Cannot replace node with ${e} parent`)}}var ne={"!":`%21`,",":`%2C`,"[":`%5B`,"]":`%5D`,"{":`%7B`,"}":`%7D`},re=e=>e.replace(/[!,[\]{}]/g,e=>ne[e]),ie=class e{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},e.defaultYaml,t),this.tags=Object.assign({},e.defaultTags,n)}clone(){let t=new e(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){let t=new e(this.yaml,this.tags);switch(this.yaml.version){case`1.1`:this.atNextDocument=!0;break;case`1.2`:this.atNextDocument=!1,this.yaml={explicit:e.defaultYaml.explicit,version:`1.2`},this.tags=Object.assign({},e.defaultTags)}return t}add(t,n){this.atNextDocument&&=(this.yaml={explicit:e.defaultYaml.explicit,version:`1.1`},this.tags=Object.assign({},e.defaultTags),!1);let r=t.trim().split(/[ \t]+/),i=r.shift();switch(i){case`%TAG`:{if(r.length!==2&&(n(0,`%TAG directive should contain exactly two parts`),r.length<2))return!1;let[e,t]=r;return this.tags[e]=t,!0}case`%YAML`:{if(this.yaml.explicit=!0,r.length!==1)return n(0,`%YAML directive should contain exactly one part`),!1;let[e]=r;if(e===`1.1`||e===`1.2`)return this.yaml.version=e,!0;{let t=/^\d+\.\d+$/.test(e);return n(6,`Unsupported YAML version ${e}`,t),!1}}default:return n(0,`Unknown directive ${i}`,!0),!1}}tagName(e,t){if(e===`!`)return`!`;if(e[0]!==`!`)return t(`Not a valid tag: ${e}`),null;if(e[1]===`<`){let n=e.slice(2,-1);return n===`!`||n===`!!`?(t(`Verbatim tags aren't resolved, so ${e} is invalid.`),null):(e[e.length-1]!==`>`&&t(`Verbatim tags must end with a >`),n)}let[,n,r]=e.match(/^(.*!)([^!]*)$/s);r||t(`The ${e} tag has no suffix`);let i=this.tags[n];if(i)try{return i+decodeURIComponent(r)}catch(e){return t(String(e)),null}return n===`!`?e:(t(`Could not resolve tag: ${e}`),null)}tagString(e){for(let[t,n]of Object.entries(this.tags))if(e.startsWith(n))return t+re(e.substring(n.length));return e[0]===`!`?e:`!<${e}>`}toString(e){let t=this.yaml.explicit?[`%YAML ${this.yaml.version||`1.2`}`]:[],n=Object.entries(this.tags),r;if(e&&n.length>0&&y(e.contents)){let t={};w(e.contents,(e,n)=>{y(n)&&n.tag&&(t[n.tag]=!0)}),r=Object.keys(t)}else r=[];for(let[i,a]of n)(i!==`!!`||a!==`tag:yaml.org,2002:`)&&(!e||r.some(e=>e.startsWith(a)))&&t.push(`%TAG ${i} ${a}`);return t.join(`
|
|
2
2
|
`)}};ie.defaultYaml={explicit:!1,version:`1.2`},ie.defaultTags={"!!":`tag:yaml.org,2002:`};function ae(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){let t=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw Error(t)}return!0}function oe(e){let t=new Set;return w(e,{Value(e,n){n.anchor&&t.add(n.anchor)}}),t}function se(e,t){for(let n=1;;++n){let r=`${e}${n}`;if(!t.has(r))return r}}function ce(e,t){let n=[],r=new Map,i=null;return{onAnchor:r=>{n.push(r),i??=oe(e);let a=se(t,i);return i.add(a),a},setAnchors:()=>{for(let e of n){let t=r.get(e);if(typeof t==`object`&&t.anchor&&(g(t.node)||v(t.node)))t.node.anchor=t.anchor;else{let t=Error(`Failed to resolve repeated object (this should not happen)`);throw t.source=e,t}}},sourceObjects:r}}function le(e,t,n,r){if(r&&typeof r==`object`){if(Array.isArray(r))for(let t=0,n=r.length;t<n;++t){let n=r[t],i=le(e,r,String(t),n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}else if(r instanceof Map)for(let t of Array.from(r.keys())){let n=r.get(t),i=le(e,r,t,n);i===void 0?r.delete(t):i!==n&&r.set(t,i)}else if(r instanceof Set)for(let t of Array.from(r)){let n=le(e,r,t,t);n===void 0?r.delete(t):n!==t&&(r.delete(t),r.add(n))}else for(let[t,n]of Object.entries(r)){let i=le(e,r,t,n);i===void 0?delete r[t]:i!==n&&(r[t]=i)}}return e.call(t,n,r)}function D(e,t,n){if(Array.isArray(e))return e.map((e,t)=>D(e,String(t),n));if(e&&typeof e.toJSON==`function`){if(!n||!b(e))return e.toJSON(t,n);let r={aliasCount:0,count:1,res:void 0};n.anchors.set(e,r),n.onCreate=e=>{r.res=e,delete n.onCreate};let i=e.toJSON(t,n);return n.onCreate&&n.onCreate(i),i}return typeof e==`bigint`&&!n?.keep?Number(e):e}var ue=class{constructor(e){Object.defineProperty(this,d,{value:e})}clone(){let e=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(e.range=this.range.slice()),e}toJS(e,{mapAsMap:t,maxAliasCount:n,onAnchor:r,reviver:i}={}){if(!p(e))throw TypeError(`A document argument is required`);let a={anchors:new Map,doc:e,keep:!0,mapAsMap:t===!0,mapKeyWarned:!1,maxAliasCount:typeof n==`number`?n:100},o=D(this,``,a);if(typeof r==`function`)for(let{count:e,res:t}of a.anchors.values())r(t,e);return typeof i==`function`?le(i,{"":o},``,o):o}},de=class extends ue{constructor(e){super(a),this.source=e,Object.defineProperty(this,"tag",{set(){throw Error(`Alias nodes cannot have tags`)}})}resolve(e,t){if(t?.maxAliasCount===0)throw ReferenceError(`Alias resolution is disabled`);let n;t?.aliasResolveCache?n=t.aliasResolveCache:(n=[],w(e,{Node:(e,t)=>{(f(t)||b(t))&&n.push(t)}}),t&&(t.aliasResolveCache=n));let r;for(let e of n){if(e===this)break;e.anchor===this.source&&(r=e)}if(r&&t){let{anchors:e,doc:n,maxAliasCount:i}=t,a=e.get(r);if(a||=(D(r,null,t),e.get(r)),a?.res===void 0)throw ReferenceError(`This should not happen: Alias anchor was not resolved?`);if(i>=0&&(a.count+=1,a.aliasCount===0&&(a.aliasCount=fe(n,r,e)),a.count*a.aliasCount>i))throw ReferenceError(`Excessive alias count indicates a resource exhaustion attack`)}return r}toJSON(e,t){if(!t)return{source:this.source};let n=this.resolve(t.doc,t);if(!n){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(e)}return t.anchors.get(n).res}toString(e,t,n){let r=`*${this.source}`;if(e){if(ae(this.source),e.options.verifyAliasOrder&&!e.anchors.has(this.source)){let e=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(e)}if(e.implicitKey)return`${r} `}return r}};function fe(e,t,n){if(f(t)){let r=t.resolve(e),i=n&&r&&n.get(r);return i?i.count*i.aliasCount:0}if(v(t)){let r=0;for(let i of t.items){let t=fe(e,i,n);t>r&&(r=t)}return r}if(h(t)){let r=fe(e,t.key,n),i=fe(e,t.value,n);return Math.max(r,i)}return 1}var pe=e=>!e||typeof e!=`function`&&typeof e!=`object`,O=class extends ue{constructor(e){super(l),this.value=e}toJSON(e,t){return t?.keep?this.value:D(this.value,e,t)}toString(){return String(this.value)}};O.BLOCK_FOLDED=`BLOCK_FOLDED`,O.BLOCK_LITERAL=`BLOCK_LITERAL`,O.PLAIN=`PLAIN`,O.QUOTE_DOUBLE=`QUOTE_DOUBLE`,O.QUOTE_SINGLE=`QUOTE_SINGLE`;var me=`tag:yaml.org,2002:`;function he(e,t,n){if(t){let e=n.filter(e=>e.tag===t),r=e.find(e=>!e.format)??e[0];if(!r)throw Error(`Tag ${t} not found`);return r}return n.find(t=>t.identify?.(e)&&!t.format)}function ge(e,t,n){if(p(e)&&(e=e.contents),y(e))return e;if(h(e)){let t=n.schema[s].createNode?.(n.schema,null,n);return t.items.push(e),t}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<`u`&&e instanceof BigInt)&&(e=e.valueOf());let{aliasDuplicateObjects:r,onAnchor:i,onTagObj:a,schema:o,sourceObjects:c}=n,l;if(r&&e&&typeof e==`object`){if(l=c.get(e),l)return l.anchor??(l.anchor=i(e)),new de(l.anchor);l={anchor:null,node:null},c.set(e,l)}t?.startsWith(`!!`)&&(t=me+t.slice(2));let d=he(e,t,o.tags);if(!d){if(e&&typeof e.toJSON==`function`&&(e=e.toJSON()),!e||typeof e!=`object`){let t=new O(e);return l&&(l.node=t),t}d=e instanceof Map?o[s]:Symbol.iterator in Object(e)?o[u]:o[s]}a&&(a(d),delete n.onTagObj);let f=d?.createNode?d.createNode(n.schema,e,n):typeof d?.nodeClass?.from==`function`?d.nodeClass.from(n.schema,e,n):new O(e);return t?f.tag=t:d.default||(f.tag=d.tag),l&&(l.node=f),f}function _e(e,t,n){let r=n;for(let e=t.length-1;e>=0;--e){let n=t[e];if(typeof n==`number`&&Number.isInteger(n)&&n>=0){let e=[];e[n]=r,r=e}else r=new Map([[n,r]])}return ge(r,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error(`This should not happen, please report a bug.`)},schema:e,sourceObjects:new Map})}var ve=e=>e==null||typeof e==`object`&&!!e[Symbol.iterator]().next().done,ye=class extends ue{constructor(e,t){super(e),Object.defineProperty(this,"schema",{value:t,configurable:!0,enumerable:!1,writable:!0})}clone(e){let t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return e&&(t.schema=e),t.items=t.items.map(t=>y(t)||h(t)?t.clone(e):t),this.range&&(t.range=this.range.slice()),t}addIn(e,t){if(ve(e))this.add(t);else{let[n,...r]=e,i=this.get(n,!0);if(v(i))i.addIn(r,t);else if(i===void 0&&this.schema)this.set(n,_e(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}deleteIn(e){let[t,...n]=e;if(n.length===0)return this.delete(t);let r=this.get(t,!0);if(v(r))return r.deleteIn(n);throw Error(`Expected YAML collection at ${t}. Remaining path: ${n}`)}getIn(e,t){let[n,...r]=e,i=this.get(n,!0);return r.length===0?!t&&g(i)?i.value:i:v(i)?i.getIn(r,t):void 0}hasAllNullValues(e){return this.items.every(t=>{if(!h(t))return!1;let n=t.value;return n==null||e&&g(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag})}hasIn(e){let[t,...n]=e;if(n.length===0)return this.has(t);let r=this.get(t,!0);return v(r)?r.hasIn(n):!1}setIn(e,t){let[n,...r]=e;if(r.length===0)this.set(n,t);else{let e=this.get(n,!0);if(v(e))e.setIn(r,t);else if(e===void 0&&this.schema)this.set(n,_e(this.schema,r,t));else throw Error(`Expected YAML collection at ${n}. Remaining path: ${r}`)}}},be=e=>e.replace(/^(?!$)(?: $)?/gm,`#`);function k(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}var A=(e,t,n)=>e.endsWith(`
|
|
3
3
|
`)?k(n,t):n.includes(`
|
|
4
4
|
`)?`
|
|
@@ -149,4 +149,4 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
|
|
|
149
149
|
`?(m.push(p),p={t:[],w:[]}):(p.t.push(e),p.w.push(l[t]))}),t.ins.length&&m.push(p),o.push(...m),s=t.at+t.del.length}o.push(...n.slice(s)),n=o,r=$s(r,a.hunks)}return(n??[]).map(e=>{let t=[],n=0;return e.t.forEach((r,i)=>{let a=e.w[i],o=t.at(-1);o&&o.who===a&&o.to===n?o.to+=r.length:t.push({from:n,to:n+r.length,who:a}),n+=r.length}),t})}var ac=(e,t)=>nc(e,t)?.text??null;function oc(e){let t=new Map,n=(e,n)=>{let r=t.get(e);if(!r)return;let i=r.form===`rewrite`&&n!==void 0?(r.open??[]).filter(e=>e!==n):[];r.form===`rewrite`&&i.length?t.set(e,{...r,open:i}):t.delete(e)};for(let r of e)if(r.kind===`proposal`)t.set(r.id,r.form===`rewrite`?{...r,open:r.regions.map((e,t)=>t)}:r);else if(r.kind===`discard`)n(r.proposal,r.region);else if(r.kind===`change`&&r.proposal&&r.why===`keep`)n(r.proposal,r.region);else if(r.kind===`revise`){let e=t.get(r.proposal);if(!e)continue;e.form===`insert`&&r.text!==void 0&&t.set(e.id,{...e,text:r.text}),e.form===`rewrite`&&r.regions&&t.set(e.id,{...e,regions:e.regions.map((e,t)=>({old:e.old,new:r.regions[t]??e.new}))})}return[...t.values()]}function sc(e,t){if(!t.text)return null;let n=-1;for(let r=0;r<=t.nth&&(n=e.indexOf(t.text,n+1),!(n<0));r++);if(n<0){let r=e.indexOf(t.text);if(r<0||e.indexOf(t.text,r+1)>=0)return null;n=r}return{from:n,to:n+t.text.length}}function cc(e,t){if(t.form===`rewrite`)return{form:`rewrite`,regions:t.regions.map(t=>sc(e,t.old))};let n=Js(e),r=t.after?Ys(n,t.after):-1,i=t.before?Ys(n,t.before):-1;if(r>=0)return{form:`insert`,line:n[r].to};if(i>=0)return{form:`insert`,line:n[i].from};if(!t.after&&!t.before){if(n.length)return{form:`insert`,line:n[n.length-1].to};let t=e.split(`
|
|
150
150
|
`),r=t.length;for(;r>0&&!t[r-1].trim();)r--;return{form:`insert`,line:r}}return!t.after&&n.length?{form:`insert`,line:n[0].from}:null}function lc(e){let t=[],n=new Map,r=new Map,i=e=>e.why===`start`||!e.hunks.length&&e.before===null?[(e.text??``).split(`
|
|
151
151
|
`).length,0]:[e.hunks.reduce((e,t)=>e+t.ins.length,0),e.hunks.reduce((e,t)=>e+t.del.length,0)];for(let a of e){let e={ids:[a.id],at:a.at,session:a.session,who:a.who,added:0,removed:0};if(a.kind===`proposal`){let i={...e,what:`offered`,asked:a.asked};n.set(a.id,i),r.set(a.id,a.asked),t.push(i)}else if(a.kind===`discard`){let e=n.get(a.proposal);e&&(e.what=`discarded`,e.ids.push(a.id))}else if(a.kind===`change`){let r=a.proposal?n.get(a.proposal):void 0,[o,s]=i(a);if(a.why===`keep`&&r){r.what=`kept`,r.ids.push(a.id),r.at=a.at,r.added+=o,r.removed+=s;continue}let c=t[t.length-1];if(a.why===`edit`&&c&&c.what===`edited`&&c.who===a.who&&c.session===a.session&&Date.parse(a.at)-Date.parse(c.at)<=6e5){c.ids.push(a.id),c.at=a.at,c.added+=o,c.removed+=s;continue}let l=a.why===`start`?a.who===`external`?`found`:`wrote`:a.why===`edit`?`edited`:a.why===`restore`?`restored`:a.why===`keep`?`kept`:a.why===`move`?`moved`:`changed elsewhere`;t.push({...e,what:l,added:o,removed:s,...a.asked?{asked:a.asked}:{}})}}return t}function uc(e,t){let n=0;for(let r of e){if(t<r.at)break;if(t<r.at+r.del.length)return null;n+=r.ins.length-r.del.length}return t+n}function dc(e){if(e.why===`start`||!e.hunks.length&&e.before===null)return(e.text??``).split(`
|
|
152
|
-
`).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function fc(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!tc(t))continue;let e=new Set;for(let n of r){let r=uc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of dc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function pc(e,t){let n=e.edges.some(([,,e])=>e>=Ks.requires)?Ks.requires:Ks.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=Ks.uses?a:o).add(c===t?l:c),u>=Ks.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}function mc(){try{return new URLSearchParams(location.search).get(`base`)??``}catch{return``}}var hc=e=>mc()?`${e}@${mc()}`:e;function gc(e,t=``){return`${location.origin}${location.pathname}?base=${encodeURIComponent(e)}${t}`}var _c=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function vc(e=new URL(mc()?`b/${encodeURIComponent(mc())}/api/`:`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new _c(`isorite is not answering`,0)}let i=await r.json().catch(()=>({}));if(!r.ok)throw new _c(i.error??r.statusText,r.status,i.current);return i},r=()=>n(`session`),i=async(e,i,a)=>{t??=r().then(e=>e.token);let o={"Content-Type":`application/json`,"x-isorite-token":await t};return n(i,{method:e,headers:o,body:JSON.stringify(a)})},a=e=>`?id=${encodeURIComponent(e)}`,o=(t,n=`notes`)=>`${e}file?${n===`code`?`code`:`path`}=${encodeURIComponent(t)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+a(e)),fileUrl:o,pictures:()=>n(`pictures`),code:(e,t)=>n(`code?href=${encodeURIComponent(e)}${t?`&full=1`:``}`),savePicture:async(e,i)=>{t??=r().then(e=>e.token);let a=Ds(e)??`application/octet-stream`;return n(`file?path=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":a,"x-isorite-token":await t},body:i})},file:async(e,t)=>{let n;try{n=await fetch(o(e,t))}catch{throw new _c(`isorite is not answering`,0)}if(n.status===404)return null;if(!n.ok)throw new _c((await n.json().catch(()=>({}))).error??n.statusText,n.status);return{bytes:new Uint8Array(await n.arrayBuffer()),type:n.headers.get(`content-type`)??``,version:(n.headers.get(`etag`)??``).replaceAll(`"`,``)}},saveNote:(e,t)=>i(`PUT`,`note`+a(e),t),createNote:(e,t)=>i(`POST`,`note`+a(e),{text:t}),journal:e=>n(`journal`+a(e)),version:async(e,t)=>(await n(`version`+a(e)+`&entry=`+encodeURIComponent(t))).text,makeFolder:e=>i(`POST`,`folder`,{path:e}),moveFolder:async(e,t)=>{await i(`POST`,`folder/move`,{from:e,to:t})},deleteFolder:async e=>{await i(`POST`,`folder/delete`,{path:e})},moveNote:(e,t,n)=>i(`POST`,`note/move`+a(e),{to:t,base:n}),deleteNote:async(e,t)=>{await i(`POST`,`note/delete`+a(e),{base:t})},restore:(e,t,n)=>i(`POST`,`note/restore`+a(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),agents:()=>n(`agents`),saveAgents:e=>i(`POST`,`agents`,{text:e}),nameRepository:async()=>!1,agentNotes:()=>n(`agents/notes`),setAgentNotes:e=>i(`POST`,`agents/notes`,{may:e}),brokenNews:async()=>[],conversations:()=>n(`conversations`),deleteConversation:async e=>{await i(`POST`,`conversation/delete`,{id:e})},conversation:async e=>{let t=await n(`conversation`+(e?a(e):``));return t.id?t:null},keep:(e,t,n)=>i(`POST`,`proposal/keep`+a(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await i(`POST`,`proposal/revise`+a(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await i(`POST`,`proposal/discard`+a(e),{proposal:t,...n===void 0?{}:{region:n}})},setDone:(e,t,n)=>i(`POST`,`note/done`+a(e),{done:t,base:n}),agentTools:()=>n(`agent/tools`),agentLook:e=>i(`POST`,`agent/look`,e),agentWrite:e=>i(`POST`,`agent/write`,e),agentSend:e=>i(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await i(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await i(`POST`,`agent/status`,{agent:e,session:t,busy:n})},agentTake:e=>i(`POST`,`agent/take`,{id:e}),agentChanged:async()=>{throw Error(`only isorite acp tells the server of an agent's change`)},keepAgentRecord:async()=>{throw Error(`only the server keeps an agent's session`)},agentRecords:()=>n(`agent/records`),agentRecord:(e,t)=>n(`agent/record?agent=${encodeURIComponent(e)}&session=${encodeURIComponent(t)}`),deleteAgentRecord:async()=>{throw Error(`a kept session is removed through the pane's drawer`)},bases:{list:()=>n(`bases`),lend:async(e,t)=>(await i(`POST`,`bases/lend`,{name:e,lend:t})).bases},own:{repo:()=>n(`own/repo`),choose:e=>i(`POST`,`own/choose`,{choice:e})},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await i(`POST`,`terminal/prompt`,{asked:e,given:t})},stop:async()=>{await i(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await i(`POST`,`terminal/permission`,{id:e,decision:t})},take:e=>i(`POST`,`agent/take`,{id:e}),give:async e=>{await i(`POST`,`acp/give`,{given:e})},follow:async(e,t)=>{await i(`POST`,`acp/follow`,{agent:e,session:t})},fresh:async e=>{await i(`POST`,`acp/new`,{agent:e})},list:async()=>{await i(`POST`,`acp/list`,{})},set:async(e,t,n)=>{await i(`POST`,`acp/set`,{kind:e,id:t,value:n})},forget:async(e,t)=>{await i(`POST`,`acp/forget`,{agent:e,session:t})},project:()=>n(`connect`),writeProject:async()=>(await i(`POST`,`connect`,{})).written,chosen:()=>n(`acp/agent`),registry:()=>n(`acp/registry`),detected:()=>n(`acp/detected`),choose:e=>i(`POST`,`acp/choose`,{choice:e})},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`agent-item`,`agent-taken`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var yc=new class{api;#e=t(null);get session(){return e(this.#e)}set session(e){n(this.#e,e)}#t=t({notes:[],dirs:[]});get listing(){return e(this.#t)}set listing(e){n(this.#t,e)}#n=t(``);get error(){return e(this.#n)}set error(e){n(this.#n,e,!0)}#r=t(``);get open(){return e(this.#r)}set open(e){n(this.#r,e,!0)}#i=t(``);get here(){return e(this.#i)}set here(e){n(this.#i,e,!0)}#a=t(null);get saving(){return e(this.#a)}set saving(e){n(this.#a,e,!0)}#o=t(null);get atlas(){return e(this.#o)}set atlas(e){n(this.#o,e)}#s=t(null);get iso(){return e(this.#s)}set iso(e){n(this.#s,e)}listeners=new Set;relist=null;async load(e=vc()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}e.events(e=>{this.follow(e);for(let t of this.listeners)t(e);e.type===`note-changed`&&(this.relist&&clearTimeout(this.relist),this.relist=setTimeout(()=>{this.refresh()},300))})}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){(e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request&&(this.iso={request:e.request,note:``,agent:e.agent,state:`reading`,steps:[],message:``});let t=this.iso;t&&`request`in e&&e.request===t.request&&(e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`agent-done`&&(this.iso={...t,state:`done`}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},bc=e=>i(`/n/[...id]`,{id:e}),xc=e=>{let[t=``,n=``]=e.trim().replace(/^code:/,``).split(`#`);return`${i(`/code/[...path]`,{path:t})}${n?`?at=${encodeURIComponent(n)}`:``}`};function Sc(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function Cc(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?yc.listing.notes.filter(e=>e.id===t):yc.listing.notes.filter(e=>e.id.split(`/`).at(-1)===t),r=n.length===1?n[0]:null;return r?{id:r.id,title:r.title,kind:r.kind??`note`,done:!!r.done}:null}export{Ts as A,Is as C,Ns as D,Ms as E,Cr as M,vr as N,js as O,Rs as S,Ps as T,fc as _,Sc as a,Ks as b,gc as c,sc as d,ec as f,ac as g,oc as h,bc as i,$ as j,Os as k,hc as l,lc as m,xc as n,_c as o,cc as p,Cc as r,mc as s,yc as t,pc as u,ic as v,ks as w,Gs as x,Js as y};
|
|
152
|
+
`).map((e,t)=>t);let t=[],n=0;for(let r of e.hunks){for(let e=0;e<r.ins.length;e++)t.push(r.at+n+e);n+=r.ins.length-r.del.length}return t}function fc(e,t){let n=new Set(t),r=new Set,i=!1;for(let t of e){if(!tc(t))continue;let e=new Set;for(let n of r){let r=uc(t.hunks,n);r!==null&&e.add(r)}if(r=e,n.has(t.id))for(let e of dc(t))r.add(e),i=!0}let a=[...r].sort((e,t)=>e-t),o=[];for(let e of a){let t=o[o.length-1];t&&t.to===e?t.to=e+1:o.push({from:e,to:e+1})}return{runs:o,removed:i&&!o.length}}``.isWellFormed;function pc(e,t){let n=e.edges.some(([,,e])=>e>=Ks.requires)?Ks.requires:Ks.uses,r=new Map,i=new Map,a=new Set,o=new Set,s=[];for(let[c,l,u]of e.edges)if(c!==l){if(u<n){if(c!==t&&l!==t)continue;(u>=Ks.uses?a:o).add(c===t?l:c),u>=Ks.uses&&s.push({from:c,to:l,kind:`uses`})}else r.set(c,[...r.get(c)??[],l]),i.set(l,[...i.get(l)??[],c])}let c={},l={},u=new Set([t]),d=[],f=[],p=[t];for(let e=0;e<p.length;e++){let t=p[e];for(let e of r.get(t)??[])f.push({from:t,to:e,kind:`requires`}),!u.has(e)&&(u.add(e),d.push(e),p.push(e),c[e]=(c[t]??0)+1,l[e]=t)}let m=new Map;for(let e of f)m.set(e.from,(m.get(e.from)??new Set).add(e.to));for(let e of f){let t=new Set,n=[...m.get(e.from)].filter(t=>t!==e.to),r=!1;for(;n.length&&!r;){let i=n.pop();i===e.to?r=!0:i!==e.from&&!t.has(i)&&(t.add(i),n.push(...m.get(i)??[]))}r&&(e.spare=!0,m.get(e.from).delete(e.to))}let h=[...new Set(i.get(t)??[])];for(let e of h)f.push({from:e,to:t,kind:`builds`});let g=new Set([...d,...h]);return{requires:d,depth:c,via:l,builds:h,uses:[...a].filter(e=>!g.has(e)),also:[...o].filter(e=>!g.has(e)&&!a.has(e)),links:[...f,...s.filter(e=>!g.has(e.from===t?e.to:e.from))]}}function mc(){try{return new URLSearchParams(location.search).get(`base`)??``}catch{return``}}var hc=e=>mc()?`${e}@${mc()}`:e;function gc(e,t=``){return`${location.origin}${location.pathname}?base=${encodeURIComponent(e)}${t}`}var _c=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function vc(e=new URL(mc()?`b/${encodeURIComponent(mc())}/api/`:`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new _c(`isorite is not answering`,0)}let i=await r.json().catch(()=>({}));if(!r.ok)throw new _c(i.error??r.statusText,r.status,i.current);return i},r=()=>n(`session`),i=async(e,i,a)=>{t??=r().then(e=>e.token);let o={"Content-Type":`application/json`,"x-isorite-token":await t};return n(i,{method:e,headers:o,body:JSON.stringify(a)})},a=e=>`?id=${encodeURIComponent(e)}`,o=(t,n=`notes`)=>`${e}file?${n===`code`?`code`:`path`}=${encodeURIComponent(t)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+a(e)),fileUrl:o,pictures:()=>n(`pictures`),code:(e,t)=>n(`code?href=${encodeURIComponent(e)}${t?`&full=1`:``}`),savePicture:async(e,i)=>{t??=r().then(e=>e.token);let a=Ds(e)??`application/octet-stream`;return n(`file?path=${encodeURIComponent(e)}`,{method:`POST`,headers:{"Content-Type":a,"x-isorite-token":await t},body:i})},file:async(e,t)=>{let n;try{n=await fetch(o(e,t))}catch{throw new _c(`isorite is not answering`,0)}if(n.status===404)return null;if(!n.ok)throw new _c((await n.json().catch(()=>({}))).error??n.statusText,n.status);return{bytes:new Uint8Array(await n.arrayBuffer()),type:n.headers.get(`content-type`)??``,version:(n.headers.get(`etag`)??``).replaceAll(`"`,``)}},saveNote:(e,t)=>i(`PUT`,`note`+a(e),t),createNote:(e,t)=>i(`POST`,`note`+a(e),{text:t}),journal:e=>n(`journal`+a(e)),version:async(e,t)=>(await n(`version`+a(e)+`&entry=`+encodeURIComponent(t))).text,makeFolder:e=>i(`POST`,`folder`,{path:e}),moveFolder:async(e,t)=>{await i(`POST`,`folder/move`,{from:e,to:t})},deleteFolder:async e=>{await i(`POST`,`folder/delete`,{path:e})},moveNote:(e,t,n)=>i(`POST`,`note/move`+a(e),{to:t,base:n}),deleteNote:async(e,t)=>{await i(`POST`,`note/delete`+a(e),{base:t})},restore:(e,t,n)=>i(`POST`,`note/restore`+a(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),agents:()=>n(`agents`),saveAgents:e=>i(`POST`,`agents`,{text:e}),nameRepository:async()=>!1,agentNotes:()=>n(`agents/notes`),setAgentNotes:e=>i(`POST`,`agents/notes`,{may:e}),brokenNews:async()=>[],conversations:()=>n(`conversations`),deleteConversation:async e=>{await i(`POST`,`conversation/delete`,{id:e})},conversation:async e=>{let t=await n(`conversation`+(e?a(e):``));return t.id?t:null},keep:(e,t,n)=>i(`POST`,`proposal/keep`+a(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await i(`POST`,`proposal/revise`+a(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await i(`POST`,`proposal/discard`+a(e),{proposal:t,...n===void 0?{}:{region:n}})},setDone:(e,t,n)=>i(`POST`,`note/done`+a(e),{done:t,base:n}),agentTools:()=>n(`agent/tools`),agentLook:e=>i(`POST`,`agent/look`,e),agentWrite:e=>i(`POST`,`agent/write`,e),agentSend:e=>i(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await i(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await i(`POST`,`agent/status`,{agent:e,session:t,busy:n})},agentTake:e=>i(`POST`,`agent/take`,{id:e}),agentChanged:async()=>{throw Error(`only isorite acp tells the server of an agent's change`)},keepAgentRecord:async()=>{throw Error(`only the server keeps an agent's session`)},agentRecords:()=>n(`agent/records`),agentRecord:(e,t)=>n(`agent/record?agent=${encodeURIComponent(e)}&session=${encodeURIComponent(t)}`),deleteAgentRecord:async()=>{throw Error(`a kept session is removed through the pane's drawer`)},bases:{list:()=>n(`bases`),lend:async(e,t)=>(await i(`POST`,`bases/lend`,{name:e,lend:t})).bases},own:{repo:()=>n(`own/repo`),choose:e=>i(`POST`,`own/choose`,{choice:e})},pi:{state:()=>n(`pi`),setKey:async(e,t)=>{await i(`POST`,`pi/key`,{provider:e,key:t})},removeKey:async e=>{await i(`POST`,`pi/key/remove`,{provider:e})},choose:async(e,t)=>{await i(`POST`,`pi/choose`,{provider:e,model:t})},setReach:async(e,t)=>{await i(`POST`,`pi/reach`,{files:e,shell:t})}},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await i(`POST`,`terminal/prompt`,{asked:e,given:t})},steer:async(e,t)=>{await i(`POST`,`terminal/steer`,{asked:e,given:t})},stop:async()=>{await i(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await i(`POST`,`terminal/permission`,{id:e,decision:t})},take:e=>i(`POST`,`agent/take`,{id:e}),give:async e=>{await i(`POST`,`acp/give`,{given:e})},withdraw:async e=>{await i(`POST`,`terminal/withdraw`,{given:e})},follow:async(e,t)=>{await i(`POST`,`acp/follow`,{agent:e,session:t})},fork:async(e,t)=>{await i(`POST`,`acp/fork`,{agent:e,session:t})},fresh:async e=>{await i(`POST`,`acp/new`,{agent:e})},list:async()=>{await i(`POST`,`acp/list`,{})},set:async(e,t,n)=>{await i(`POST`,`acp/set`,{kind:e,id:t,value:n})},forget:async(e,t)=>{await i(`POST`,`acp/forget`,{agent:e,session:t})},project:()=>n(`connect`),writeProject:async()=>(await i(`POST`,`connect`,{})).written,chosen:()=>n(`acp/agent`),registry:()=>n(`acp/registry`),detected:()=>n(`acp/detected`),choose:e=>i(`POST`,`acp/choose`,{choice:e})},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`agent-item`,`agent-taken`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var yc=new class{api;#e=t(null);get session(){return e(this.#e)}set session(e){n(this.#e,e)}#t=t({notes:[],dirs:[]});get listing(){return e(this.#t)}set listing(e){n(this.#t,e)}#n=t(``);get error(){return e(this.#n)}set error(e){n(this.#n,e,!0)}#r=t(``);get open(){return e(this.#r)}set open(e){n(this.#r,e,!0)}#i=t(``);get here(){return e(this.#i)}set here(e){n(this.#i,e,!0)}#a=t(null);get saving(){return e(this.#a)}set saving(e){n(this.#a,e,!0)}#o=t(null);get atlas(){return e(this.#o)}set atlas(e){n(this.#o,e)}#s=t(null);get iso(){return e(this.#s)}set iso(e){n(this.#s,e)}listeners=new Set;relist=null;async load(e=vc()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}e.events(e=>{this.follow(e);for(let t of this.listeners)t(e);e.type===`note-changed`&&(this.relist&&clearTimeout(this.relist),this.relist=setTimeout(()=>{this.refresh()},300))})}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){(e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request&&(this.iso={request:e.request,note:``,agent:e.agent,state:`reading`,steps:[],message:``});let t=this.iso;t&&`request`in e&&e.request===t.request&&(e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`agent-done`&&(this.iso={...t,state:`done`}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},bc=e=>i(`/n/[...id]`,{id:e}),xc=e=>{let[t=``,n=``]=e.trim().replace(/^code:/,``).split(`#`);return`${i(`/code/[...path]`,{path:t})}${n?`?at=${encodeURIComponent(n)}`:``}`};function Sc(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function Cc(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?yc.listing.notes.filter(e=>e.id===t):yc.listing.notes.filter(e=>e.id.split(`/`).at(-1)===t),r=n.length===1?n[0]:null;return r?{id:r.id,title:r.title,kind:r.kind??`note`,done:!!r.done}:null}export{Ts as A,Is as C,Ns as D,Ms as E,Cr as M,vr as N,js as O,Rs as S,Ps as T,fc as _,Sc as a,Ks as b,gc as c,sc as d,ec as f,ac as g,oc as h,bc as i,$ as j,Os as k,hc as l,lc as m,xc as n,_c as o,cc as p,Cc as r,mc as s,yc as t,pc as u,ic as v,ks as w,Gs as x,Js as y};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,c as t,h as n,m as r,o as i,t as a,x as o}from"./
|
|
1
|
+
import{a as e,c as t,h as n,m as r,o as i,t as a,x as o}from"./DlgOmQ_G.js";var s=/\s/;function c(e,t,n,r,i=0){let a=[];for(let o of e.split(`
|
|
2
2
|
`)){let e=Array.from(o);e.length===0&&a.push(``);let c=0;for(;c<e.length;){let o=a=>t.width(e.slice(c,c+a).join(``),n,i)<=r,l=1;for(;l<e.length-c&&o(l);)l=Math.min(e.length-c,l*2);let u=1;for(;u<l;){let e=Math.ceil((u+l)/2);o(e)?u=e:l=e-1}let d=u,f=c+d<e.length;if(f&&!s.test(e[c+d])){for(let t=d-1;t>0;t--)if(s.test(e[c+t])){d=t+1;break}}let p=e.slice(c,c+d).join(``);for(a.push(f&&p.trimEnd()||p),c+=d;f&&c<e.length&&s.test(e[c]);)c++}}e===``&&(a.length=0);let o=a.map(e=>t.width(e,n,i)),c=0;for(let e of o)c=Math.max(c,e);let l=Math.round(n*1.5);return{lines:a.map((e,t)=>[{text:e,style:i,width:o[t]}]),widths:o,width:c,height:a.length*l,size:n,lineHeight:l}}function l(e,t,r){if(e.width<=r)return e;let i=[],a=[];for(let n=0;n<e.lines.length;n++){if(e.widths[n]<=r){i.push(e.lines[n]),a.push(e.widths[n]);continue}let o=[],s=0,c=()=>{i.push(o),a.push(s),o=[],s=0};for(let i of e.lines[n])if(i.icon!==void 0||i.math)o.length&&s+i.width>r&&c(),o.push(i),s+=i.width;else for(let n of Array.from(i.text)){let a=o[o.length-1],l=a&&a.icon===void 0&&a.math===void 0&&a.style===i.style,u=t.width(l?a.text+n:n,e.size,i.style)-(l?a.width:0);o.length&&s+u>r&&(c(),a=void 0,u=t.width(n,e.size,i.style)),a&&a.icon===void 0&&a.math===void 0&&a.style===i.style?(a.text+=n,a.width+=u):o.push({text:n,style:i.style,width:u}),s+=u}(o.length||!e.lines[n].length)&&c()}let o=0;for(let e of a)o=Math.max(o,e);let s={...e,lines:i,widths:a,width:o,height:i.length*e.lineHeight};return e.heights?n(s):s}function u(n,s,c,l){let u=t(n),d=`<text`+a(l,u),f=``;for(let t=0;t<n.lines.length;t++){let a=n.lines[t],p=c+(t+.5)*n.lineHeight;if(a.some(e=>e.icon!==void 0)){let e=n.widths[t];f+=i({...n,lines:[a],widths:[e],width:e,height:n.lineHeight},s+e/2,p,l);continue}let m=``;for(let t of a){let n=r(t.style&~u);m+=n?`<tspan${n}>${e(t.text)}</tspan>`:e(t.text)}m!==``&&(f+=`${d} x="${o(s)}" y="${o(p+n.size*.35)}" text-anchor="start" xml:space="preserve">${m}</text>`)}return f}export{u as n,l as r,c as t};
|