isorite 0.6.0 → 0.8.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/README.md +4 -2
- package/dist/main.js +615 -96
- package/docs/setup-for-agents.md +3 -0
- package/docs/setup.md +20 -0
- package/docs/terminal.md +15 -0
- package/package.json +1 -1
- package/plugin/server.ts +4 -2
- package/web/_app/immutable/assets/0.CTbO0owi.css +1 -0
- package/web/_app/immutable/assets/NoteEditor.8wWtZK_A.css +1 -0
- package/web/_app/immutable/chunks/0M1khDs2.js +2 -0
- package/web/_app/immutable/chunks/2b4Gb5sE.js +1 -0
- package/web/_app/immutable/chunks/84nbDH0I.js +1 -0
- package/web/_app/immutable/chunks/8H7HVH4w.js +1 -0
- package/web/_app/immutable/chunks/8wVGBFSs.js +45 -0
- package/web/_app/immutable/chunks/AF4Hwhju.js +1 -0
- package/web/_app/immutable/chunks/B-65IYX-.js +6 -0
- package/web/_app/immutable/chunks/B45xgp2S.js +1 -0
- package/web/_app/immutable/chunks/B78wSQJQ.js +1 -0
- package/web/_app/immutable/chunks/B85D_PlV.js +5 -0
- package/web/_app/immutable/chunks/B91efLFT.js +673 -0
- package/web/_app/immutable/chunks/B9NhS7L_.js +1 -0
- package/web/_app/immutable/chunks/B9YLdnR_.js +1 -0
- package/web/_app/immutable/chunks/BEHa2uNW.js +1 -0
- package/web/_app/immutable/chunks/BEMVcqjs.js +1 -0
- package/web/_app/immutable/chunks/BEjRio4Q.js +1 -0
- package/web/_app/immutable/chunks/BEn0Cwpx.js +1 -0
- package/web/_app/immutable/chunks/BGbXxNFa.js +2 -0
- package/web/_app/immutable/chunks/BGfruO1u.js +1 -0
- package/web/_app/immutable/chunks/BHEdbvp9.js +1 -0
- package/web/_app/immutable/chunks/BKJx4mf9.js +1 -0
- package/web/_app/immutable/chunks/BL3mLym4.js +5 -0
- package/web/_app/immutable/chunks/BLp5-jwC.js +1 -0
- package/web/_app/immutable/chunks/BN6xhG8e.js +1 -0
- package/web/_app/immutable/chunks/BOVgKnng.js +1 -0
- package/web/_app/immutable/chunks/BPTmHmyx.js +1 -0
- package/web/_app/immutable/chunks/BPW39P52.js +1 -0
- package/web/_app/immutable/chunks/BRKS-CCX.js +5 -0
- package/web/_app/immutable/chunks/BRsoo5mP.js +1 -0
- package/web/_app/immutable/chunks/BSzj6Xyz.js +1 -0
- package/web/_app/immutable/chunks/BUZw3wgd.js +1 -0
- package/web/_app/immutable/chunks/BV0c4Hdn.js +1 -0
- package/web/_app/immutable/chunks/BVIeWmwY.js +1 -0
- package/web/_app/immutable/chunks/BWonG38x.js +1 -0
- package/web/_app/immutable/chunks/BXxG0Yva.js +1 -0
- package/web/_app/immutable/chunks/BZmnMkFw.js +1 -0
- package/web/_app/immutable/chunks/BZyAS7I4.js +1 -0
- package/web/_app/immutable/chunks/B_1Jd8HM.js +1 -0
- package/web/_app/immutable/chunks/Bbt0DTmZ.js +1 -0
- package/web/_app/immutable/chunks/Bffqt7tx.js +9 -0
- package/web/_app/immutable/chunks/BflJGmDX.js +1 -0
- package/web/_app/immutable/chunks/BgczuZKA.js +4 -0
- package/web/_app/immutable/chunks/BguXRgvc.js +2 -0
- package/web/_app/immutable/chunks/BjPiibIz.js +1 -0
- package/web/_app/immutable/chunks/BkSkiI9m.js +1 -0
- package/web/_app/immutable/chunks/Bq5hCPe1.js +2 -0
- package/web/_app/immutable/chunks/BrGmYbJT.js +2 -0
- package/web/_app/immutable/chunks/BrXPCJaM.js +1 -0
- package/web/_app/immutable/chunks/BrqJKzQU.js +2 -0
- package/web/_app/immutable/chunks/Brxvm_b1.js +4 -0
- package/web/_app/immutable/chunks/BsLNwr5A.js +2 -0
- package/web/_app/immutable/chunks/Bsdphhtm.js +1 -0
- package/web/_app/immutable/chunks/Bt6PBEDR.js +1 -0
- package/web/_app/immutable/chunks/BtUtjfIh.js +1 -0
- package/web/_app/immutable/chunks/BthdM_4N.js +1 -0
- package/web/_app/immutable/chunks/Bu8mWwtz.js +1 -0
- package/web/_app/immutable/chunks/BunrC_8P.js +4 -0
- package/web/_app/immutable/chunks/BwTct_5T.js +1 -0
- package/web/_app/immutable/chunks/BxTFtVqu.js +13 -0
- package/web/_app/immutable/chunks/BzI3yqBQ.js +3 -0
- package/web/_app/immutable/chunks/C-dfcq9W.js +7 -0
- package/web/_app/immutable/chunks/C2OyD2Y6.js +1 -0
- package/web/_app/immutable/chunks/C2dAgh7P.js +1 -0
- package/web/_app/immutable/chunks/C357ku5U.js +1 -0
- package/web/_app/immutable/chunks/C4jVoHG1.js +1 -0
- package/web/_app/immutable/chunks/C6Btt2Xs.js +1 -0
- package/web/_app/immutable/chunks/C9zpzAZU.js +1 -0
- package/web/_app/immutable/chunks/CCiHXe5d.js +1 -0
- package/web/_app/immutable/chunks/CDAjAYjS.js +1 -0
- package/web/_app/immutable/chunks/CETSRtnV.js +2 -0
- package/web/_app/immutable/chunks/CEufJyoj.js +1 -0
- package/web/_app/immutable/chunks/CGzfi9Nl.js +1 -0
- package/web/_app/immutable/chunks/CHbKgHy3.js +1 -0
- package/web/_app/immutable/chunks/CKSRTWxH.js +2 -0
- package/web/_app/immutable/chunks/CLVUDRRk.js +2 -0
- package/web/_app/immutable/chunks/CLVgA2GD.js +1 -0
- package/web/_app/immutable/chunks/CO2Y5y64.js +2 -0
- package/web/_app/immutable/chunks/CPF5uNy5.js +1 -0
- package/web/_app/immutable/chunks/CQadubS9.js +2 -0
- package/web/_app/immutable/chunks/CQfgDRfP.js +1 -0
- package/web/_app/immutable/chunks/CRIvE37b.js +2 -0
- package/web/_app/immutable/chunks/CRzLMJPS.js +1 -0
- package/web/_app/immutable/chunks/CTIncYxj.js +1 -0
- package/web/_app/immutable/chunks/CTscJvp6.js +2 -0
- package/web/_app/immutable/chunks/CUpZ7dEl.js +1 -0
- package/web/_app/immutable/chunks/CX-xckzu.js +4 -0
- package/web/_app/immutable/chunks/CXXgtw0p.js +1 -0
- package/web/_app/immutable/chunks/CZ8wTb_M.js +8 -0
- package/web/_app/immutable/chunks/C_eisQCp.js +1 -0
- package/web/_app/immutable/chunks/CdY1YAit.js +2 -0
- package/web/_app/immutable/chunks/Ce_hS451.js +1 -0
- package/web/_app/immutable/chunks/CgA1WoRv.js +1 -0
- package/web/_app/immutable/chunks/CggtIYAM.js +1 -0
- package/web/_app/immutable/chunks/ChfNwlCY.js +1 -0
- package/web/_app/immutable/chunks/ChtP43wD.js +1 -0
- package/web/_app/immutable/chunks/CiVjR8gq.js +3 -0
- package/web/_app/immutable/chunks/CjI9Y6RI.js +1 -0
- package/web/_app/immutable/chunks/ClOhbFR7.js +1 -0
- package/web/_app/immutable/chunks/CnP_Si9g.js +1 -0
- package/web/_app/immutable/chunks/CnaYoQib.js +1 -0
- package/web/_app/immutable/chunks/Co3PbHdE.js +1 -0
- package/web/_app/immutable/chunks/CoyQYage.js +1 -0
- package/web/_app/immutable/chunks/Cp5ooBfH.js +1 -0
- package/web/_app/immutable/chunks/Cp_JbuGh.js +2 -0
- package/web/_app/immutable/chunks/Cq5C893B.js +1 -0
- package/web/_app/immutable/chunks/CqHI_q-D.js +1 -0
- package/web/_app/immutable/chunks/CqftRsjg.js +1 -0
- package/web/_app/immutable/chunks/Cshzl8qu.js +1 -0
- package/web/_app/immutable/chunks/Cx3rYX2g.js +1 -0
- package/web/_app/immutable/chunks/CxDmU1I4.js +1 -0
- package/web/_app/immutable/chunks/CygcOYNo.js +1 -0
- package/web/_app/immutable/chunks/CzMBulkp.js +1 -0
- package/web/_app/immutable/chunks/D1ij_kNL.js +1 -0
- package/web/_app/immutable/chunks/D2Q8cUp1.js +1 -0
- package/web/_app/immutable/chunks/D4SKbj9K.js +6 -0
- package/web/_app/immutable/chunks/D4c0_ac3.js +1 -0
- package/web/_app/immutable/chunks/D4fLEcOQ.js +8 -0
- package/web/_app/immutable/chunks/D5EjA2JK.js +1 -0
- package/web/_app/immutable/chunks/D5jiJvOU.js +1 -0
- package/web/_app/immutable/chunks/D6QVYUu9.js +1 -0
- package/web/_app/immutable/chunks/D6RzAl64.js +1 -0
- package/web/_app/immutable/chunks/D8WpQPaX.js +1 -0
- package/web/_app/immutable/chunks/D9f6rSsU.js +1 -0
- package/web/_app/immutable/chunks/D9qYN0V5.js +1 -0
- package/web/_app/immutable/chunks/DCl_8MCW.js +1 -0
- package/web/_app/immutable/chunks/DECNRCf2.js +1 -0
- package/web/_app/immutable/chunks/DHLQUbN7.js +1 -0
- package/web/_app/immutable/chunks/DIGvaVgJ.js +2 -0
- package/web/_app/immutable/chunks/DKB6_1j6.js +1 -0
- package/web/_app/immutable/chunks/DKNOMI4Y.js +1 -0
- package/web/_app/immutable/chunks/DLa7NjNO.js +1 -0
- package/web/_app/immutable/chunks/DMAYXnpq.js +13 -0
- package/web/_app/immutable/chunks/DNzd62Q_.js +1 -0
- package/web/_app/immutable/chunks/DPCEkfD_.js +1 -0
- package/web/_app/immutable/chunks/DTF72YNO.js +1 -0
- package/web/_app/immutable/chunks/DTdlqvEb.js +12 -0
- package/web/_app/immutable/chunks/DTszW0OQ.js +1 -0
- package/web/_app/immutable/chunks/DWkQyNnU.js +1 -0
- package/web/_app/immutable/chunks/DXiLM1-G.js +1 -0
- package/web/_app/immutable/chunks/DZYaqCwi.js +1 -0
- package/web/_app/immutable/chunks/D_19S_Iu.js +1 -0
- package/web/_app/immutable/chunks/D_JZ0swv.js +1 -0
- package/web/_app/immutable/chunks/D_aBVMvK.js +11 -0
- package/web/_app/immutable/chunks/DciMwFJ1.js +1 -0
- package/web/_app/immutable/chunks/De_zI4J0.js +1 -0
- package/web/_app/immutable/chunks/DgAKBe0r.js +1 -0
- package/web/_app/immutable/chunks/DgZW3JtG.js +1 -0
- package/web/_app/immutable/chunks/Di_ac7WN.js +1 -0
- package/web/_app/immutable/chunks/DjVOVvNP.js +1 -0
- package/web/_app/immutable/chunks/Dp_KdFgX.js +1 -0
- package/web/_app/immutable/chunks/Ds8Pkiic.js +1 -0
- package/web/_app/immutable/chunks/DtbnBenW.js +1 -0
- package/web/_app/immutable/chunks/DuQMFDvy.js +1 -0
- package/web/_app/immutable/chunks/DwuoZtxw.js +1 -0
- package/web/_app/immutable/chunks/DxLkKbK2.js +5 -0
- package/web/_app/immutable/chunks/Dz-mlCAC.js +1 -0
- package/web/_app/immutable/chunks/EQVRMnZU.js +2 -0
- package/web/_app/immutable/chunks/GwMd3KmG.js +1 -0
- package/web/_app/immutable/chunks/K_3X9lyC.js +23 -0
- package/web/_app/immutable/chunks/{ZRnI3PpK.js → NmqB5ax3.js} +1 -1
- package/web/_app/immutable/chunks/PPSTk1ow.js +1 -0
- package/web/_app/immutable/chunks/S7ucR4pR.js +1 -0
- package/web/_app/immutable/chunks/TuFg0KqZ.js +4 -0
- package/web/_app/immutable/chunks/VlUiK86J.js +1 -0
- package/web/_app/immutable/chunks/_rHYGvON.js +1 -0
- package/web/_app/immutable/chunks/bcQIrid8.js +1 -0
- package/web/_app/immutable/chunks/dvrIP-Hm.js +1 -0
- package/web/_app/immutable/chunks/gfMMiTNf.js +1 -0
- package/web/_app/immutable/chunks/gpDK5sbt.js +1 -0
- package/web/_app/immutable/chunks/hOAYc4Tf.js +1 -0
- package/web/_app/immutable/chunks/kS471soi.js +1 -0
- package/web/_app/immutable/chunks/mbLqADPr.js +1 -0
- package/web/_app/immutable/chunks/nMarIA7J.js +3 -0
- package/web/_app/immutable/chunks/oBAE_ms0.js +1 -0
- package/web/_app/immutable/chunks/p9eYesGn.js +1 -0
- package/web/_app/immutable/chunks/qgSLujhx.js +1 -0
- package/web/_app/immutable/chunks/spNKdrPy.js +3 -0
- package/web/_app/immutable/chunks/tLWDfEkZ.js +1 -0
- package/web/_app/immutable/chunks/u8YMmbU0.js +1 -0
- package/web/_app/immutable/chunks/vk5Wkr31.js +1 -0
- package/web/_app/immutable/chunks/wCTXGvXm.js +2 -0
- package/web/_app/immutable/chunks/wj7G6pU5.js +5 -0
- package/web/_app/immutable/chunks/xvONpD0Z.js +1 -0
- package/web/_app/immutable/chunks/yxd8jSz3.js +1 -0
- package/web/_app/immutable/entry/app.DO9lj7h3.js +2 -0
- package/web/_app/immutable/entry/start.Bg5TZs6n.js +1 -0
- package/web/_app/immutable/nodes/0.N1e1uAFq.js +26 -0
- package/web/_app/immutable/nodes/1.BRTPLKyU.js +1 -0
- package/web/_app/immutable/nodes/2.BWh1AYEd.js +1 -0
- package/web/_app/immutable/nodes/3.Cgqgn7Zv.js +1 -0
- package/web/_app/immutable/nodes/4.DYW7Fxdy.js +2 -0
- package/web/_app/immutable/nodes/5.Dkvkif0E.js +5 -0
- package/web/_app/immutable/nodes/6.BinB0fuq.js +1 -0
- package/web/_app/immutable/nodes/{7.BdTE6U4H.js → 7.BxQaF3lD.js} +1 -1
- package/web/_app/version.json +1 -1
- package/web/index.html +22 -18
- package/web/_app/immutable/assets/0.LEIHnkPh.css +0 -1
- package/web/_app/immutable/assets/NoteEditor.BCjOff8L.css +0 -1
- package/web/_app/immutable/chunks/2DHY0Dzh.js +0 -666
- package/web/_app/immutable/chunks/BQRMn_tl.js +0 -1
- package/web/_app/immutable/chunks/C-352d8F.js +0 -1
- package/web/_app/immutable/chunks/CHxNLteG.js +0 -1
- package/web/_app/immutable/chunks/Cf6h5DpS.js +0 -20
- package/web/_app/immutable/chunks/D4A7-5k0.js +0 -1
- package/web/_app/immutable/chunks/Dijhflxl.js +0 -1
- package/web/_app/immutable/chunks/Ps0IPbdL.js +0 -1
- package/web/_app/immutable/chunks/nhmVyQdD.js +0 -3
- package/web/_app/immutable/chunks/rTqzqD6j.js +0 -1
- package/web/_app/immutable/chunks/y24aTX4O.js +0 -1
- package/web/_app/immutable/entry/app.BQ0r6jSu.js +0 -2
- package/web/_app/immutable/entry/start.CIQiYrSU.js +0 -1
- package/web/_app/immutable/nodes/0.zPrOkn79.js +0 -26
- package/web/_app/immutable/nodes/1.DfBkOAo2.js +0 -1
- package/web/_app/immutable/nodes/2.fp8Y5joG.js +0 -1
- package/web/_app/immutable/nodes/3.Do9cwxjS.js +0 -1
- package/web/_app/immutable/nodes/4.CGd6gzGJ.js +0 -2
- package/web/_app/immutable/nodes/5.Dtac-HK8.js +0 -5
- package/web/_app/immutable/nodes/6._-kZkWYe.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t){return e.skipToEnd(),t.cur=o,`error`}function t(t,r){return t.match(/^HTTP\/\d\.\d/)?(r.cur=n,`keyword`):t.match(/^[A-Z]+/)&&/[ \t]/.test(t.peek())?(r.cur=i,`keyword`):e(t,r)}function n(t,n){var i=t.match(/^\d+/);if(!i)return e(t,n);n.cur=r;var a=Number(i[0]);return a>=100&&a<400?`atom`:`error`}function r(e,t){return e.skipToEnd(),t.cur=o,null}function i(e,t){return e.eatWhile(/\S/),t.cur=a,`string.special`}function a(t,n){return t.match(/^HTTP\/\d\.\d$/)?(n.cur=o,`keyword`):e(t,n)}function o(e){return e.sol()&&!e.eat(/[ \t]/)?e.match(/^.*?:/)?`atom`:(e.skipToEnd(),`error`):(e.skipToEnd(),`string`)}function s(e){return e.skipToEnd(),null}var c={name:`http`,token:function(e,t){var n=t.cur;return n!=o&&n!=s&&e.eatSpace()?null:n(e,t)},blankLine:function(e){e.cur=s},startState:function(){return{cur:t}}};export{c as http};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,f as t,i as n,o as r,s as i,u as a,x as o}from"./CX-xckzu.js";import{PeleError as s,g as c,h as l,s as u,u as d,x as f,y as p}from"./8wVGBFSs.js";function m(e){let t=e.trim();return t.length>=2&&t.startsWith(`"`)&&t.endsWith(`"`)?t.slice(1,-1):t}function h(e){return e.map(m).sort()}var g=class{type=`venn`;title;subsets=[];textNodes=[];styles=[];known=new Set;current;indent=!1;setDiagramTitle(e){this.title=e}addSubsetData(e,t,n){let r=h(e);this.current=r,r.length===1&&this.known.add(r[0]),this.subsets.push({sets:r,size:n??10/e.length**2,label:t?m(t):void 0})}addTextData(e,t,n){this.textNodes.push({sets:h(e),id:m(t),label:n?m(n):void 0})}addStyleData(e,t){let n=new Map;for(let[e,r]of t)n.set(e,r&&m(r));this.styles.push({targets:h(e),styles:n})}validateUnionIdentifiers(e){let t=e.map(m).filter(e=>!this.known.has(e));if(t.length>0)throw new s(`unknown set identifier: ${t.join(`, `)}`,`semantic`,{type:`venn`})}getCurrentSets(){return this.current}getIndentMode(){return this.indent}setIndentMode(e){this.indent=e}},_=[`$end`,`INVALID`,`EOF`,`NEWLINE`,`VENN`,`TITLE`,`SET`,`UNION`,`TEXT`,`INDENT_TEXT`,`STYLE`,`BRACKET_LABEL`,`NUMERIC`,`HEXCOLOR`,`RGBCOLOR`,`RGBACOLOR`,`IDENTIFIER`,`STRING`,`COMMA`,`COLON`],v=[[`venn-beta`,4],[`set`,6],[`union`,7],[`text`,8],[`style`,10]],y=class{constructor(e,t){this.src=e,this.host=t}src;host;text=``;start=0;at=0;lineStart=!1;ended=!1;word(e,t){let n=this.src;for(let r=0;r<t.length;r++){let i=n.charCodeAt(e+r),a=t.charCodeAt(r);if(i!==a&&(i+32!==a||i<65||i>90))return!1}return!0}keyword(e,t){return this.word(e,t)&&!c(this.src.charCodeAt(e+t.length))}color(e,t){let n=this.src,r=e+1;for(let e=0;e<t;e++){for(;l(n.charCodeAt(r));)r++;let i=r;for(;p(n.charCodeAt(r))||n.charCodeAt(r)===46;)r++;if(r===i)return-1;for(;l(n.charCodeAt(r));)r++;if(n.charCodeAt(r)!==(e===t-1?41:44))return-1;r++}return r}afterLineFeed(e){let t=e-1;for(;this.src.charCodeAt(t)===32||this.src.charCodeAt(t)===9;)t--;return this.src.charCodeAt(t)===10}lineEnd(e){let t=this.src.indexOf(`
|
|
2
|
+
`,e);return t===-1?this.src.length:t}next(){let e=this.src,t=e.length;for(;;){let n=this.at;if(this.start=n,this.text=``,n>=t)return this.ended?0:(this.ended=!0,2);let r=e.charCodeAt(n);if(r===37&&e.charCodeAt(n+1)===37&&e.charCodeAt(n+2)!==123)this.at=this.lineEnd(n+2);else if(this.lineStart&&this.word(n,`title`)&&this.afterLineFeed(n)&&e.slice(n+5,this.lineEnd(n+5)).trim()===``){let t=this.lineEnd(n+5);for(;e.charCodeAt(t)===10||e.charCodeAt(t)===13;)t++;this.at=t}else{if(this.lineStart){if(r===32||r===9){let t=n+1;for(;e.charCodeAt(t)===32||e.charCodeAt(t)===9;)t++;if(this.at=t,this.keyword(t,`text`)&&this.host.getIndentMode())return this.at=t+4,this.lineStart=!1,this.text=e.slice(n,t),9;continue}r!==10&&r!==13&&(this.host.setIndentMode(!1),this.lineStart=!1)}if(r===10||r===13){for(n++;e.charCodeAt(n)===10||e.charCodeAt(n)===13;)n++;return this.lineStart=!0,this.token(3,n)}if(r===37&&e.charCodeAt(n+1)===37)this.at=this.lineEnd(n);else if(r===32||r===9){for(n++;e.charCodeAt(n)===32||e.charCodeAt(n)===9;)n++;this.at=n}else{if((r|32)>=97&&(r|32)<=122||r===95){let r=e.charCodeAt(n+5);if(this.word(n,`title`)&&l(r)&&r!==10&&r!==13){let r=n+6;for(;r<t;){let t=e.charCodeAt(r);if(t===35||t===10||t===59)break;r++}if(r>n+6)return this.token(5,r)}for(let[e,t]of v)if(this.keyword(n,e))return this.token(t,n+e.length);if(this.word(n,`rgb`)){let t=(e.charCodeAt(n+3)|32)==97,r=n+(t?4:3),i=e.charCodeAt(r)===40?this.color(r,t?4:3):-1;if(i!==-1)return this.token(t?15:14,i)}for(n++;c(e.charCodeAt(n))||e.charCodeAt(n)===45;)n++;return this.token(16,n)}if(r===91){if(e.charCodeAt(n+1)===34){let t=e.indexOf(`"`,n+2);return t===-1||e.charCodeAt(t+1)!==93?1:(this.at=t+2,this.text=e.slice(n+2,t),11)}let r=n+1;for(;r<t&&e.charCodeAt(r)!==93&&e.charCodeAt(r)!==34;)r++;return r===n+1||e.charCodeAt(r)!==93?1:(this.at=r+1,this.text=e.slice(n+1,r).trim(),11)}if(p(r)||r===46||r===43||r===45){(r===43||r===45)&&n++;let t=n;for(;p(e.charCodeAt(n));)n++;if(n>t){if(e.charCodeAt(n)===46&&p(e.charCodeAt(n+1)))for(n+=2;p(e.charCodeAt(n));)n++}else if(e.charCodeAt(n)===46&&p(e.charCodeAt(n+1)))for(n+=2;p(e.charCodeAt(n));)n++;else return 1;return this.token(12,n)}if(r===35){let t=n+1;for(;t<n+9&&f(e.charCodeAt(t));)t++;return t>=n+4?this.token(13,t):1}if(r===34){let t=e.indexOf(`"`,n+1);return t===-1?1:this.token(17,t+1)}return r===44?this.token(18,n+1):r===58?this.token(19,n+1):1}}}}token(e,t){return this.text=this.src.slice(this.at,t),this.at=t,e}},b=`'EOF', 'NEWLINE', 'TITLE', 'SET', 'UNION', 'TEXT', 'INDENT_TEXT', 'STYLE'`,x=`'NUMERIC', 'IDENTIFIER', 'STRING', 'HEXCOLOR', 'RGBCOLOR', 'RGBACOLOR'`;function S(e,t){let n=new y(e,t),r=-1,i=()=>r===-1?r=n.next():r,a=t=>{throw i()===1?u(`venn`,e,n.start,``,!0):u(`venn`,e,n.start,`Expecting ${t}, got '${_[r]}'`)},o=()=>(r=-1,n.text),c=e=>(i()!==e&&a(`'${_[e]}'`),o()),l=()=>(i()!==16&&r!==17&&a(`'IDENTIFIER', 'STRING'`),o()),d=()=>{let e=[l()];for(;i()===18;)o(),e.push(l());return e},f=(e,n)=>{let r=i()===11?o():void 0,a;if(i()===19&&(o(),a=parseFloat(c(12))),n){if(e.length<2)throw new s(`union requires multiple identifiers`,`semantic`,{type:`venn`});t.validateUnionIdentifiers(e)}t.addSubsetData(e,r,a),t.setIndentMode(!0)},p=e=>{let n=i();n!==16&&n!==17&&n!==12&&a(`'NUMERIC', 'IDENTIFIER', 'STRING'`);let r=o(),s=n!==12&&i()===11?o():void 0;t.addTextData(e(),r,s)},m=()=>{let e=d(),n=[];for(;;){let e=c(16);c(19);let t;if(i()===17)t=o();else{let e=[];for(;i()===16||r>=12&&r<=15;)e.push(o());e.length===0&&a(x),t=e.join(` `)}if(n.push([e,t]),i()!==18)break;o()}t.addStyleData(e,n)};for(;i()===3;)o();for(c(4);;){let e=i();if(e===2)return;if((e<3||e>10||e===4)&&a(b),o(),e===5)t.setDiagramTitle(n.text.slice(6));else if(e===6)f([l()],!1);else if(e===7)f(d(),!0);else if(e===8){let e=d();p(()=>e)}else e===9?p(()=>{let e=t.getCurrentSets();if(!e)throw new s(`text requires set`,`semantic`,{type:`venn`});return e}):e===10&&m()}}var C=Math.PI*2;function w(e){let t=new Set,n=new Map;for(let r of e)t.add(JSON.stringify([...r.sets].sort())),r.sets.length===1&&n.set(r.sets[0],r.size);let r=[];for(let i of e){if(i.sets.length<3)continue;let e=[...i.sets].sort();for(let i=0;i<e.length-1;i++)for(let a=i+1;a<e.length;a++){let o=[e[i],e[a]],s=JSON.stringify(o);if(t.has(s))continue;t.add(s);let c=n.get(o[0]),l=n.get(o[1]);r.push({sets:o,size:c!==void 0&&l!==void 0?Math.min(c,l)/4:2.5,label:``})}}return r.length>0?[...e,...r]:e}function T(e,t,n){if(n>=e+t)return 0;let r=Math.min(e,t);if(n<=Math.abs(e-t))return Math.PI*r*r;let i=e*e*Math.acos((n*n+e*e-t*t)/(2*n*e)),a=t*t*Math.acos((n*n+t*t-e*e)/(2*n*t)),o=.5*Math.sqrt(Math.max((-n+e+t)*(n+e-t)*(n-e+t)*(n+e+t),0));return i+a-o}function E(e,t,n){let r=Math.abs(e-t),i=e+t;if(!(n>0))return i;if(n>=Math.PI*Math.min(e,t)**2)return r;for(let a=0;a<48;a++){let a=(r+i)/2;T(e,t,a)>n?r=a:i=a}return(r+i)/2}function D(e,t,n,r,i,a){let o=1/0;for(let n of t){let t=e[n],s=r-t.x,c=i-t.y,l=t.r-Math.sqrt(s*s+c*c);if(l<o){if(l<a)return l;o=l}}for(let t of n){let n=e[t],s=r-n.x,c=i-n.y,l=Math.sqrt(s*s+c*c)-n.r;if(l<o){if(l<a)return l;o=l}}return o}function O(e,t,n){let r=0,i=0,a=e[t[0]];for(let n of t){let o=e[n];r+=o.x/t.length,i+=o.y/t.length,o.r<a.r&&(a=o)}let o=a.r,s=r,c=i,l=D(e,t,n,s,c,-1/0),u=0,d=(a,d)=>{let f=D(e,t,n,a,d,l-o*1e-9);if(!(f>l-o*1e-9))return!1;let p=Math.hypot(a-r,d-i);return f>l+o*1e-9||p<u-o*1e-9?(l=f,u=p,s=a,c=d,!0):!1};for(let e=-10;e<=10;e++)for(let t=-10;t<=10;t++)t*t+e*e<=100&&d(a.x+t*o/10,a.y+e*o/10);let f=o/10;for(let e=0;e<40&&f>o*1e-6;e++){let e=!1;for(let t=0;t<8;t++){let n=t*C/8;d(s+Math.cos(n)*f,c+Math.sin(n)*f)&&(e=!0)}e||(f/=2)}return{x:s,y:c,margin:l}}function k(e){let t=new Map;for(let n of e)for(let e of n.sets)t.has(e)||t.set(e,10);for(let n of e)n.sets.length===1&&t.set(n.sets[0],n.size);let n=new Map,r=[],i=0;for(let e of t.values())Number.isFinite(e)&&e>i&&(i=e);i===0&&(i=10);let a=Math.sqrt(i/Math.PI);for(let[e,i]of t){n.set(e,r.length);let t=Number.isFinite(i)&&i>0?Math.sqrt(i/Math.PI):0;r.push({id:e,x:0,y:0,r:Math.max(t,a*.3)})}let o=r.length;if(o<2)return r;let s=new Map;for(let t of w(e)){if(t.sets.length!==2)continue;let e=n.get(t.sets[0]),r=n.get(t.sets[1]);e!==r&&s.set(Math.min(e,r)*o+Math.max(e,r),t.size)}let c=new Map;for(let[e,t]of s)c.set(e,E(r[Math.floor(e/o)].r,r[e%o].r,t));let l=a*.15,u=(e,t)=>c.get(e*o+t)??r[e].r+r[t].r+l;if(o===2)return r[1].x=u(0,1),r;if(o===3){let t=u(0,1),n=u(0,2),i=u(1,2),o=e.some(e=>new Set(e.sets).size===3);for(let e=0;e<40;e++){let e=t>0?(t*t+n*n-i*i)/(2*t):0;if(r[1].x=t,r[2].x=Math.max(-n,Math.min(n,e)),r[2].y=Math.sqrt(Math.max(n*n-e*e,0)),!o||O(r,[0,1,2],[]).margin>a*.12)break;t*=.94,n*=.94,i*=.94}return r}let d=0;for(let e of r)d+=2*e.r+l;let f=Math.min(300,Math.floor(3e6/(o*o)));if(o<=64){let e=d/C;r.forEach((t,n)=>{let r=n*C/o-Math.PI/2;t.x=Math.cos(r)*e,t.y=Math.sin(r)*e})}else{let e=Math.ceil(Math.sqrt(o)),t=2*a+l;r.forEach((n,r)=>{n.x=r%e*t,n.y=Math.floor(r/e)*t})}let p=new Float64Array(o),m=new Float64Array(o),h=new Int32Array(o);for(let e=0;e<f;e++){p.fill(0),m.fill(0),h.fill(0);for(let e=0;e<o;e++)for(let t=e+1;t<o;t++){let n=c.get(e*o+t),i=r[e].r+r[t].r+l,a=r[t].x-r[e].x,s=r[t].y-r[e].y,u=Math.hypot(a,s);if(n===void 0&&u>=i)continue;u<1e-9&&(a=Math.cos(e+t),s=Math.sin(e+t),u=1);let d=(u-(n??i))/2/u;p[e]+=a*d,m[e]+=s*d,p[t]-=a*d,m[t]-=s*d,h[e]++,h[t]++}for(let e=0;e<o;e++)h[e]!==0&&(r[e].x+=p[e]/h[e],r[e].y+=m[e]/h[e])}return r}function A(e,t){let n=e=>`M${t(e.x-e.r)},${t(e.y)}A${t(e.r)},${t(e.r)} 0 1 1 ${t(e.x+e.r)},${t(e.y)}A${t(e.r)},${t(e.r)} 0 1 1 ${t(e.x-e.r)},${t(e.y)}Z`;if(e.length===1)return n(e[0]);let r=(t,n,r,i)=>{for(let a of e)if(a!==r&&a!==i&&Math.hypot(t-a.x,n-a.y)>a.r*(1+1e-9))return!1;return!0},i=[];for(let t=0;t<e.length;t++)for(let n=t+1;n<e.length;n++){let a=e[t],o=e[n],s=Math.hypot(o.x-a.x,o.y-a.y);if(s>=a.r+o.r||s<=Math.abs(a.r-o.r)||s===0)continue;let c=(a.r*a.r-o.r*o.r+s*s)/(2*s),l=Math.sqrt(Math.max(a.r*a.r-c*c,0)),u=a.x+(o.x-a.x)*c/s,d=a.y+(o.y-a.y)*c/s;for(let e of[1,-1]){let t=u+e*l*(o.y-a.y)/s,n=d-e*l*(o.x-a.x)/s;r(t,n,a,o)&&i.push({x:t,y:n,a,b:o})}}if(i.length<2){let t=e[0];for(let n of e)n.r<t.r&&(t=n);for(let n of e)if(n!==t&&Math.hypot(n.x-t.x,n.y-t.y)+t.r>n.r*(1+1e-9))return``;return n(t)}let a=0,o=0;for(let e of i)a+=e.x/i.length,o+=e.y/i.length;i.sort((e,t)=>Math.atan2(e.y-o,e.x-a)-Math.atan2(t.y-o,t.x-a));let s=``;for(let e=0;e<i.length;e++){let n=i[e],r=i[(e+1)%i.length];e===0&&(s=`M${t(n.x)},${t(n.y)}`);let a,o=0,c=1/0;for(let e of[n.a,n.b]){if(e!==r.a&&e!==r.b)continue;let t=Math.atan2(n.y-e.y,n.x-e.x),i=Math.atan2(r.y-e.y,r.x-e.x)-t;i<=0&&(i+=C);let s=e.x+e.r*Math.cos(t+i/2),l=e.y+e.r*Math.sin(t+i/2),u=Math.hypot(s-(n.x+r.x)/2,l-(n.y+r.y)/2);u<c&&(c=u,a=e,o=+(i>Math.PI))}s+=a===void 0?`L${t(r.x)},${t(r.y)}`:`A${t(a.r)},${t(a.r)} 0 ${o} 1 ${t(r.x)},${t(r.y)}`}return s+`Z`}var j=100,M=1.6,N=i([]);function P(e){return e.length===1?e[0]:JSON.stringify(e)}function F(s,c,l){let u=l.fontSize??16,f=Math.round(u*.875),p=Math.round(u*.8125),h=l.measurer??d(l.fontFamily,l.fontFamilyMono),g=l.padding??8,_=k(s.subsets),v=new Map;_.forEach((e,t)=>v.set(e.id,t));let y=new Map;for(let{targets:e,styles:t}of s.styles){let n=P(e),r=y.get(n);r||y.set(n,r=new Map);for(let[e,n]of t)r.set(e,n)}let b=e=>{let t=y.get(e);if(!t)return N;let n=[];for(let[e,r]of t)n.push(`${e}:${r}`);return i(n)},x=_.map(()=>[]);for(let e=0;e<_.length;e++)for(let t=e+1;t<_.length;t++)Math.hypot(_[e].x-_[t].x,_[e].y-_[t].y)<_[e].r+_[t].r&&(x[e].push(t),x[t].push(e));let S=new Map;for(let e of s.subsets)S.set(P(e.sets),e);let C=new Map;for(let[e,t]of S){let n=[...new Set(t.sets)],r=n.map(e=>v.get(e)),i=new Set(r),o=r[0];for(let e of r)_[e].r<_[o].r&&(o=e);let s=b(e),c=t.label??(t.sets.length===1?t.sets[0]:void 0),l=+!!s.bold|(s.italic?2:0),d=O(_,r,x[o].filter(e=>!i.has(e)));d.margin<_[o].r*.2&&(d=O(_,r,[]));let p={sets:n,inside:r,spot:d,lines:[],style:s};if(c){let e=n.length===1?u:f;p.lines.push({id:void 0,raw:c,size:e,base:l,label:a(c,!1,h,e,4e3,l)})}C.set(e,p)}for(let e of s.textNodes){let t=e.label??e.id;C.get(P(e.sets))?.lines.push({id:e.id,raw:t,size:p,base:0,label:a(t,!1,h,p,4e3)})}let w=0;for(let e of _)e.r>w&&(w=e.r);let T=w>0?j/w:1,E=1;for(let e of C.values()){if(e.spot.margin<=0)continue;let t=0,n=0;for(let r of e.lines)t=Math.max(t,r.label.width),n+=r.label.height;let r=Math.hypot(t,n)/2+4;E=Math.max(E,Math.min(r/(e.spot.margin*T),M))}T*=E;for(let e of C.values()){let t=Math.max(e.spot.margin*T*1.8,72);for(let n of e.lines)n.label.width>t&&(n.label=a(n.raw,!1,h,n.size,t,n.base))}let D=1/0,F=1/0,I=-1/0,L=-1/0;for(let e of _)D=Math.min(D,(e.x-e.r)*T),F=Math.min(F,(e.y-e.r)*T),I=Math.max(I,(e.x+e.r)*T),L=Math.max(L,(e.y+e.r)*T);for(let e of C.values()){let t=0,n=0;for(let r of e.lines)t=Math.max(t,r.label.width),n+=r.label.height;D=Math.min(D,e.spot.x*T-t/2),I=Math.max(I,e.spot.x*T+t/2),F=Math.min(F,e.spot.y*T-n/2),L=Math.max(L,e.spot.y*T+n/2)}_.length===0&&(D=F=I=L=0);let R=a(s.title&&m(s.title),!1,h,u,4e3,1),z=R.height>0?R.height+12:0,B=Math.max(I-D,R.width),V=g+(B-(I-D))/2-D,H=g+z-F,U=Math.ceil(B+2*g),W=Math.ceil(L-F+z+2*g),G=_.map(e=>({id:e.id,x:e.x*T+V,y:e.y*T+H,r:e.r*T})),K=``;G.forEach((e,r)=>{let i=t(r),a=C.get(e.id)?.style??N;K+=`<circle class="pele-venn-set" data-id="${n(e.id)}" cx="${o(e.x)}" cy="${o(e.y)}" r="${o(e.r)}" fill="${i}" fill-opacity="0.2" stroke="${i}"${a.shape}/>`});let q=``,J=``;for(let e of C.values()){let t=n(e.sets.join(`|`));if(e.sets.length>1&&e.style.shape!==``){let n=A(e.inside.map(e=>G[e]),o);n!==``&&(q+=`<path class="pele-venn-overlap" data-id="${t}" d="${n}" fill="none"${e.style.shape}/>`)}let i=0;for(let t of e.lines)i+=t.label.height;if(i===0)continue;let a=e.spot.x*T+V,s=e.spot.y*T+H-i/2,c=``;for(let t of e.lines){let i=t.id===void 0?` class="pele-label"${t.size===u?``:` font-size="${t.size}"`}${e.style.text}`:` class="pele-venn-text" data-id="${n(t.id)}" font-size="${p}" fill="var(--_m)"${b(t.id).text}`;c+=r(t.label,a,s+t.label.height/2,i),s+=t.label.height}J+=`<g class="pele-venn-region" data-id="${t}">${c}</g>`}return{svg:e(`venn`,U,W,u,l,{},r(R,U/2,g+R.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g class="pele-venn-sets">${K}</g>`+(q?`<g class="pele-venn-overlaps">${q}</g>`:``)+(J?`<g class="pele-venn-labels">${J}</g>`:``)),width:U,height:W,links:[]}}var I={type:`venn`,parse(e,t,n){let r=new g;return n&&(r.title=n),S(e,r),r},render:F};export{I as venn};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{A as e,M as t,b as n,f as r,g as i,h as a,o,r as s}from"./BxTFtVqu.js";import{n as c,r as l,t as u}from"./Cq5C893B.js";var d=63,f=64,p=1,m=2,h=3,g=4,_=5,v=6,y=7,b=65,x=66,ee=8,S=9,C=10,w=11,T=12,E=13,D=19,O=20,k=29,A=33,te=34,ne=47,re=0,j=1,M=2,N=3,P=4,F=class{constructor(e,t,n){this.parent=e,this.depth=t,this.type=n,this.hash=(e?e.hash+e.hash<<8:0)+t+(t<<4)+n}};F.top=new F(null,-1,re);function I(e,t){for(let n=0,r=t-e.pos-1;;r--,n++){let t=e.peek(r);if(R(t)||t==-1)return n}}function L(e){return e==32||e==9}function R(e){return e==10||e==13}function z(e){return L(e)||R(e)}function B(e){return e<0||z(e)}var V=new u({start:F.top,reduce(e,t){return e.type==N&&(t==O||t==te)?e.parent:e},shift(e,t,n,r){if(t==h)return new F(e,I(r,r.pos),j);if(t==b||t==_)return new F(e,I(r,r.pos),M);if(t==d)return e.parent;if(t==D||t==A)return new F(e,0,N);if(t==E&&e.type==P)return e.parent;if(t==ne){let t=/[1-9]/.exec(r.read(r.pos,n.pos));if(t)return new F(e,e.depth+ +t[0],P)}return e},hash(e){return e.hash}});function H(e,t,n=0){return e.peek(n)==t&&e.peek(n+1)==t&&e.peek(n+2)==t&&B(e.peek(n+3))}var U=new c((e,t)=>{if(e.next==-1&&t.canShift(f))return e.acceptToken(f);let n=e.peek(-1);if((R(n)||n<0)&&t.context.type!=N){if(H(e,45)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(p,3)}if(H(e,46)){if(t.canShift(d))e.acceptToken(d);else return e.acceptToken(m,3)}let n=0;for(;e.next==32;)n++,e.advance();(n<t.context.depth||n==t.context.depth&&t.context.type==j&&(e.next!=45||!B(e.peek(1))))&&e.next!=-1&&!R(e.next)&&e.next!=35&&e.acceptToken(d,-n)}},{contextual:!0}),W=new c((e,t)=>{if(t.context.type==N)e.next==63&&(e.advance(),B(e.next)&&e.acceptToken(y));else if(e.next==45)e.advance(),B(e.next)&&e.acceptToken(t.context.type==j&&t.context.depth==I(e,e.pos-1)?g:h);else if(e.next==63)e.advance(),B(e.next)&&e.acceptToken(t.context.type==M&&t.context.depth==I(e,e.pos-1)?v:_);else{let n=e.pos;for(;;)if(L(e.next)){if(e.pos==n)return;e.advance()}else if(e.next==33)J(e);else if(e.next==38)Y(e);else if(e.next==42){Y(e);break}else if(e.next==39||e.next==34){if(X(e,!0))break;return}else if(e.next==91||e.next==123){if(!ie(e))return;break}else{$(e,!0,!1,0);break}for(;L(e.next);)e.advance();if(e.next==58){if(e.pos==n&&t.canShift(k))return;B(e.peek(1))&&e.acceptTokenTo(t.context.type==M&&t.context.depth==I(e,n)?x:b,n)}}},{contextual:!0});function G(e){return e>32&&e<127&&e!=34&&e!=37&&e!=44&&e!=60&&e!=62&&e!=92&&e!=94&&e!=96&&e!=123&&e!=124&&e!=125}function K(e){return e>=48&&e<=57||e>=97&&e<=102||e>=65&&e<=70}function q(e,t){return e.next==37?(e.advance(),K(e.next)&&e.advance(),K(e.next)&&e.advance(),!0):G(e.next)||t&&e.next==44?(e.advance(),!0):!1}function J(e){if(e.advance(),e.next==60){for(e.advance();;)if(!q(e,!0)){e.next==62&&e.advance();break}}else for(;q(e,!1););}function Y(e){for(e.advance();!B(e.next)&&Z(e.next)!=`f`;)e.advance()}function X(e,t){let n=e.next,r=!1,i=e.pos;for(e.advance();;){let a=e.next;if(a<0)break;if(e.advance(),a==n){if(a==39){if(e.next==39)e.advance();else break}else break}else if(a==92&&n==34)e.next>=0&&e.advance();else if(R(a)){if(t)return!1;r=!0}else if(t&&e.pos>=i+1024)return!1}return!r}function ie(e){for(let t=[],n=e.pos+1024;;)if(e.next==91||e.next==123)t.push(e.next),e.advance();else if(e.next==39||e.next==34){if(!X(e,!0))return!1}else if(e.next==93||e.next==125){if(t[t.length-1]!=e.next-2)return!1;if(t.pop(),e.advance(),!t.length)return!0}else if(e.next<0||e.pos>n||R(e.next))return!1;else e.advance()}var ae=`iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif`;function Z(e){return e<33?`u`:e>125?`s`:ae[e-33]}function Q(e,t){let n=Z(e);return n!=`u`&&!(t&&n==`f`)}function $(e,t,n,r){if(Z(e.next)==`s`||(e.next==63||e.next==58||e.next==45)&&Q(e.peek(1),n))e.advance();else return!1;let i=e.pos;for(;;){let a=e.next,o=0,s=r+1;for(;z(a);){if(R(a)){if(t)return!1;s=0}else s++;a=e.peek(++o)}if(!(a>=0&&(a==58?Q(e.peek(o+1),n):a==35?e.peek(o-1)!=32:Q(a,n)))||!n&&s<=r||s==0&&!n&&(H(e,45,o)||H(e,46,o)))break;if(t&&Z(a)==`f`)return!1;for(let t=o;t>=0;t--)e.advance();if(t&&e.pos>i+1024)return!1}return!0}var oe=new c((e,t)=>{if(e.next==33)J(e),e.acceptToken(T);else if(e.next==38||e.next==42){let t=e.next==38?C:w;Y(e),e.acceptToken(t)}else e.next==39||e.next==34?(X(e,!1),e.acceptToken(S)):$(e,!1,t.context.type==N,t.context.depth)&&e.acceptToken(ee)}),se=new c((e,t)=>{let n=t.context.type==P?t.context.depth:-1,r=e.pos;scan:for(;;){let i=0,a=e.next;for(;a==32;)a=e.peek(++i);if(!i&&(H(e,45,i)||H(e,46,i))||!R(a)&&(n<0&&(n=Math.max(t.context.depth+1,i)),i<n))break;for(;;){if(e.next<0)break scan;let t=R(e.next);if(e.advance(),t)continue scan;r=e.pos}}e.acceptTokenTo(E,r)}),ce=e({DirectiveName:t.keyword,DirectiveContent:t.attributeValue,"DirectiveEnd DocEnd":t.meta,QuotedLiteral:t.string,BlockLiteralHeader:t.special(t.string),BlockLiteralContent:t.content,Literal:t.content,"Key/Literal Key/QuotedLiteral":t.definition(t.propertyName),"Anchor Alias":t.labelName,Tag:t.typeName,Comment:t.lineComment,": , -":t.separator,"?":t.punctuation,"[ ]":t.squareBracket,"{ }":t.brace}),le=l.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.hQcO'#DWOOQR,59v,59vO.yOWO,59vO/OOaO,59vO/WOaO,59vO/cQgO'#D_OOQR,59x,59xO0VQgO'#DaOOQR,59z,59zOOQP,59|,59|O0yOaO,59|O1ROaO,59|O1aOqO,59|OOQP-E7h-E7hO1oQgO,59XOOQP,59X,59XO2PQaO'#DeO2_QgO'#DeO2oQgO'#DkOOQP'#Dk'#DkQ)jQaOOO3PQdO'#CsOOQO,59^,59^O3kQdO'#CuOOQO,59`,59`OOQO,59c,59cO4VQdO,59cO4aQdO'#CzO4kQ`O'#CzOOQO,59b,59bOOQU,5:Q,5:QOOQR1G.v1G.vO4pQ`O1G.vOOQU-E7d-E7dO4xQdO,59kOOQO,59k,59kO5SQdO'#DQO5^Q`O'#DQOOQO,5:d,5:dOOQU,5:R,5:ROOQR1G/U1G/UO5cQ`O1G/UOOQU-E7e-E7eO5kQgO'#DhO5xQcO1G/XOOQR1G/X1G/XOOQR,59q,59qO6TQgO,59qO6eQdO'#DiO6lQgO'#DiO7PQcO1G/[OOQR1G/[1G/[OOQR,59r,59rO#|QfO,59rOOQR1G/b1G/bO7_OWO1G/bO7dOaO1G/bOOQR,59y,59yOOQR,59{,59{OOQP1G/h1G/hO7lOaO1G/hO7tOaO1G/hO8POaO1G/hOOQP1G.s1G.sO8_QgO,5:POOQP,5:P,5:POOQP,5:V,5:VOOQP-E7i-E7iOOQO,59_,59_OOQO,59a,59aOOQO1G.}1G.}OOQO,59f,59fO8oQdO,59fOOQR7+$b7+$bP,XQ`O'#DfOOQO1G/V1G/VOOQO,59l,59lO8yQdO,59lOOQR7+$p7+$pP9TQ`O'#DgOOQR'#DT'#DTOOQR,5:S,5:SOOQR-E7f-E7fOOQR7+$s7+$sOOQR1G/]1G/]O9YQgO'#DYO9jQ`O'#DYOOQR,5:T,5:TO#|QfO'#DZO9oQcO'#DZOOQR-E7g-E7gOOQR7+$v7+$vOOQR1G/^1G/^OOQR7+$|7+$|O:QOWO7+$|OOQP7+%S7+%SO:VOaO7+%SO:_OaO7+%SOOQP1G/k1G/kOOQO1G/Q1G/QOOQO1G/W1G/WOOQR,59t,59tO:jQgO,59tOOQR,59u,59uO#|QfO,59uOOQR<<Hh<<HhOOQP<<Hn<<HnO:zOaO<<HnOOQR1G/`1G/`OOQR1G/a1G/aOOQPAN>YAN>Y",stateData:";S~O!fOS!gOS^OS~OP_OQbORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!V[O!cTO~O`cO~P]OVkOWROXROYeOZfO[dOcPOmhOqQO~OboO~P!bOVtOWROXROYeOZfO[dOcPOmrOqQO~OpwO~P#WORSOTUOWROXROYYOZZO[XOcPOqQO!PVO!cTO~OSvP!avP!bvP~P#|OWROXROYeOZfO[dOcPOqQO~OmzO~P%OOm!OOUzP!azP!bzP!dzP~P#|O^!SO!b!QO!f!TO!g!RO~ORSOTUOWROXROcPOqQO!PVO!cTO~OY!UOP!QXQ!QX!V!QX!`!QXS!QX!a!QX!b!QXU!QXm!QX!d!QX~P&aO[!WOP!SXQ!SX!V!SX!`!SXS!SX!a!SX!b!SXU!SXm!SX!d!SX~P&aO^!ZO!W![O!b!YO!f!]O!g!YO~OP!_O!V[OQaX!`aX~OPaXQaX!VaX!`aX~P#|OP!bOQ!cO!V[O~OP_O!V[O~P#|OWROXROY!fOcPOqQObfXmfXofXpfX~OWROXRO[!hOcPOqQObhXmhXohXphX~ObeXmlXoeX~ObkXokX~P%OOm!kO~Om!lObnPonP~P%OOb!pOo!oO~Ob!pO~P!bOm!sOosXpsX~OosXpsX~P%OOm!uOotPptP~P%OOo!xOp!yO~Op!yO~P#WOS!|O!a#OO!b#OO~OUyX!ayX!byX!dyX~P#|Om#QO~OU#SO!a#UO!b#UO!d#RO~Om#WOUzX!azX!bzX!dzX~O]#XO~O!b#XO!g#YO~O^#ZO!b#XO!g#YO~OP!RXQ!RX!V!RX!`!RXS!RX!a!RX!b!RXU!RXm!RX!d!RX~P&aOP!TXQ!TX!V!TX!`!TXS!TX!a!TX!b!TXU!TXm!TX!d!TX~P&aO!b#^O!g#^O~O^#_O!b#^O!f#`O!g#^O~O^#_O!W#aO!b#^O!g#^O~OPaaQaa!Vaa!`aa~P#|OP#cO!V[OQ!XX!`!XX~OP!XXQ!XX!V!XX!`!XX~P#|OP_O!V[OQ!_X!`!_X~P#|OWROXROcPOqQObgXmgXogXpgX~OWROXROcPOqQObiXmiXoiXpiX~Obkaoka~P%OObnXonX~P%OOm#kO~Ob#lOo!oO~Oosapsa~P%OOotXptX~P%OOm#pO~Oo!xOp#qO~OSwP!awP!bwP~P#|OS!|O!a#vO!b#vO~OUya!aya!bya!dya~P#|Om#xO~P%OOm#{OU}P!a}P!b}P!d}P~P#|OU#SO!a$OO!b$OO!d#RO~O]$QO~O!b$QO!g$RO~O!b$SO!g$SO~O^$TO!b$SO!g$SO~O^$TO!b$SO!f$UO!g$SO~OP!XaQ!Xa!V!Xa!`!Xa~P#|Obnaona~P%OOotapta~P%OOo!xO~OU|X!a|X!b|X!d|X~P#|Om$ZO~Om$]OU}X!a}X!b}X!d}X~O]$^O~O!b$_O!g$_O~O^$`O!b$_O!g$_O~OU|a!a|a!b|a!d|a~P#|O!b$cO!g$cO~O",goto:",]!mPPPPPPPPPPPPPPPPP!nPP!v#v#|$`#|$c$f$j$nP%VPPP!v%Y%^%a%{&O%a&R&U&X&_&b%aP&e&{&e'O'RPP']'a'g'm's'y(XPPPPPPPP(_)e*X+c,VUaObcR#e!c!{ROPQSTUXY_bcdehknrtvz!O!U!W!_!b!c!f!h!k!l!s!u!|#Q#R#S#W#c#k#p#x#{$Z$]QmPR!qnqfPQThknrtv!k!l!s!u#R#k#pR!gdR!ieTlPnTjPnSiPnSqQvQ{TQ!mkQ!trQ!vtR#y#RR!nkTsQvR!wt!RWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]RySR#t!|R|TR|UQ!PUR#|#SR#z#RR#z#SyZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]R!VXR!XYa]O^abc!a!c!eT!da!eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:`⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document`,maxTerm:74,context:V,nodeProps:[[`isolate`,-3,8,9,14,``],[`openedBy`,18,`[`,32,`{`],[`closedBy`,19,`]`,33,`}`]],propSources:[ce],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR%rX!WQ!VPOX%kXY#PZ]%k]^#P^p%kpq#hq;'S%k;'S;=`&_<%lO%kR&bP;=`<%l%kR&lUoP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'VUmP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR'p[!PP!WQOY#PZp#Ppq#hq{#P{|(f|}#P}!O(f!O!R#P!R![)p![;'S#P;'S;=`#z<%lO#PR(mW!PP!WQOY#PZp#Ppq#hq!R#P!R![)V![;'S#P;'S;=`#z<%lO#PR)^U!PP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR)wY!PP!WQOY#PZp#Ppq#hq{#P{|)V|}#P}!O)V!O;'S#P;'S;=`#z<%lO#PR*nUcP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+XUbP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR+rUqP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,]UpP!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PR,vU`P!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#P",tokenizers:[U,W,oe,se,0,1],topRules:{Stream:[0,15]},tokenPrec:0}),ue=s.define({name:`yaml`,parser:le.configure({props:[n.add({Stream:e=>{for(let t=e.node.resolve(e.pos,-1);t&&t.to>=e.pos;t=t.parent){if(t.name==`BlockLiteralContent`&&t.from<t.to)return e.baseIndentFor(t);if(t.name==`BlockLiteral`)return e.baseIndentFor(t)+e.unit;if(t.name==`BlockSequence`||t.name==`BlockMapping`)return e.column(t.firstChild.from,1);if(t.name==`QuotedLiteral`)return null;if(t.name==`Literal`){let n=e.column(t.from,1);if(n==e.lineIndent(t.from,1))return n;if(t.to>e.pos)return null}}return null},FlowMapping:r({closing:`}`}),FlowSequence:r({closing:`]`})}),i.add({"FlowMapping FlowSequence":a,"Item Pair BlockLiteral":(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*[\]\}]$/}});function de(){return new o(ue)}t.meta;export{de as yaml};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,a as t,b as n,d as r,f as i,i as a,o,s,u as c,x as l}from"./CX-xckzu.js";import{i as u,r as d}from"./DciMwFJ1.js";import{a as f,c as p,d as m,g as h,h as g,n as _,p as v,t as y}from"./BunrC_8P.js";import{t as b}from"./Ce_hS451.js";import{d as x,u as S}from"./8wVGBFSs.js";function C(e){let t=[],n=[];for(let r of e){let e=r.type===`Leaf`,i={name:r.name,children:e?void 0:[]};for(i.classSelector=r.classSelector,r.cssCompiledStyles&&(i.cssCompiledStyles=r.cssCompiledStyles),e&&r.value!==void 0&&(i.value=r.value);n.length>0&&n[n.length-1].level>=r.level;)n.pop();n.length===0?t.push(i):n[n.length-1].node.children.push(i),e||n.push({node:i,level:r.level})}return t}function w(e,t){let n=new Map;for(let t of e.TreemapRows){if(t.$type!==`ClassDefStatement`)continue;let e=n.get(t.className);e||n.set(t.className,e=[]);let r=(t.styleText??``).replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`);for(let t of r.split(`;`))e.push(t)}let r=[];for(let t of e.TreemapRows){if(t.$type!==`TreemapRow`)continue;let e=t.item,i=e.classSelector?n.get(e.classSelector):void 0;r.push({level:t.indent??0,name:e.name,type:e.$type,value:e.$type===`Leaf`?e.value:void 0,classSelector:e.classSelector,cssCompiledStyles:i&&i.length>0?i:void 0})}return{type:`treemap`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
|
+
`):void 0,roots:C(r),classes:n}}var T=[f,y,v,{name:`TREEMAP_KEYWORD`,pattern:/treemap-beta|treemap/y},{name:`CLASS_DEF`,pattern:/classDef\s+([a-zA-Z_][a-zA-Z0-9_]+)(?:\s+([^;\r\n]*))?(?:;)?/y},{name:`STYLE_SEPARATOR`,pattern:/:::/y},{name:`SEPARATOR`,pattern:/:/y},{name:`COMMA`,pattern:/,/y},{name:`INDENTATION`,pattern:/[ \t]{1,}/y},{name:`WS`,pattern:/[ \t]+/y,hidden:!0},{name:`ML_COMMENT`,pattern:/\%\%[^\n]*/y,hidden:!0},{name:`NL`,pattern:/\r?\n/y,hidden:!0},{name:`ID2`,pattern:/[a-zA-Z_][a-zA-Z0-9_]*/y},{name:`NUMBER2`,pattern:/[0-9_\.\,]+/y},{name:`STRING2`,pattern:/"[^"]*"|'[^']*'/y}],E=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/;function D(e){let t=new g(_(e,T,`treemap`),T,`treemap`),n=t.kinds,r={$type:`Treemap`,TreemapRows:[]},i=()=>t.accept(5)?t.expect(12):void 0;for(t.expect(3);t.kind!==-1;){let e=t.kind;if(e===0){r.accDescr=p(t.take());continue}if(e===1){r.accTitle=h(t.take());continue}if(e===2){r.title=m(t.take());continue}e!==8&&e!==14&&e!==4&&t.fail(`a node, a class definition, or a title`);let a=e===8?t.take().length:void 0;if(t.kind===4){let e=E.exec(t.take()),n={$type:`ClassDefStatement`,className:e[1]};e[2]&&(n.styleText=e[2]),a!==void 0&&(n.indent=a),r.TreemapRows.push(n);continue}let o=t.expect(14).slice(1,-1),s=n[t.i]===8?t.i+1:t.i,c;n[s]===6||n[s]===7?(t.i=s+1,t.accept(8),c={$type:`Leaf`,name:o,value:parseFloat(t.expect(13).replace(/,/g,``))}):c={$type:`Section`,name:o};let l=i();l!==void 0&&(c.classSelector=l);let u={$type:`TreemapRow`,item:c};a!==void 0&&(u.indent=a),r.TreemapRows.push(u)}return r}var O=/^(?:.?[<>=^])?([-+( ])?(\$)?0?\d*(,)?(?:\.(\d+))?(~)?([a-zA-Z%])?$/;function k(e){let t=``;for(let n=e.length;n>0;n-=3)t=e.slice(Math.max(0,n-3),n)+(t?`,`+t:``);return t}function A(e){let t=O.exec(e===`$0,0`?`$,`:e)??O.exec(`,`),n=t[1]===`+`,r=t[3]!==void 0,i=t[4]===void 0?void 0:Math.min(Number(t[4]),20),a=t[6]??``;return e=>{let o=Math.abs(e),s,c=``;if(a===`f`?s=o.toFixed(i??6):a===`%`?(s=(o*100).toFixed(i??6),c=`%`):s=a===`d`?Math.round(o).toFixed(0):a===`e`?o.toExponential(i??6):String(Number(o.toPrecision(Math.max(1,i??12)))),t[5]&&s.includes(`.`)&&!s.includes(`e`)&&(s=s.replace(/\.?0+$/,``)),r&&!s.includes(`e`)){let e=s.indexOf(`.`);s=e===-1?k(s):k(s.slice(0,e))+s.slice(e)}return(e<0?`-`:n?`+`:``)+(t[2]??``)+s+c}}function j(e,t,n){return{node:e,parent:t,series:n,value:e.children===void 0&&Number.isFinite(e.value)&&e.value>0?e.value:0,children:[],x:0,y:0,w:0,h:0}}function M(e,t,n,r,i,a,o){let s=t,c=0;for(;c<e.length;){let t=i*a/s,l=Math.min(i,a),u=e[c].value*t,d=u,f=Math.max(l*l*d/(u*u),u*u/(l*l*d)),p=c+1;for(;p<e.length;){let n=e[p].value*t,r=u+n,i=Math.max(l*l*d/(r*r),r*r/(l*l*n));if(i>f)break;f=i,u=r,p++}let m=u/l,h=0;for(let u=c;u<p;u++){let c=e[u],d=u===p-1?l-h:c.value*t/m,f=i>=a?n:n+h,g=i>=a?r+h:r,_=Math.round(f+o/2),v=Math.round(g+o/2);c.x=_,c.y=v,c.w=Math.round(f+(i>=a?m:d)-o/2)-_,c.h=Math.round(g+(i>=a?d:m)-o/2)-v,h+=d,s-=c.value}i>=a?(n+=m,i-=m):(r+=m,a-=m),c=p}}function N(e,t,n,r){let i=e.map((e,t)=>j(e,void 0,t)),a=i.slice();for(let e=0;e<a.length;e++){let t=a[e];for(let e of t.node.children??[]){let n=j(e,t,t.series);t.children.push(n),a.push(n)}}for(let e=a.length-1;e>=0;e--){let t=a[e];t.parent&&(t.parent.value+=t.value)}let{gap:o,header:s,side:c}=r,l=[],u=(e,t,n,r,i)=>{if(r<=0||i<=0)return;let a=e.filter(e=>e.value>0).sort((e,t)=>t.value-e.value),s=0;for(let e of a)s+=e.value;if(a.length!==0&&Number.isFinite(s)){M(a,s,t-o/2,n-o/2,r+o,i+o,o);for(let e of a)e.w>0&&e.h>0&&l.push(e)}};u(i,0,0,t,n);for(let e=0;e<l.length;e++){let t=l[e];t.children.length>0&&u(t.children,t.x+c,t.y+s,t.w-2*c,t.h-s-c)}return l}var P=28,F=6,I=1.25;function L(e,t,n,r,i){let a=e.treemap?.[t];return typeof a==`number`&&a>=r?Math.min(a,i):n}function R(f,p,m){let h=m.fontSize??16,g=Math.round(h*.875),_=Math.round(h*.75),v=Math.round(h*.5625),y=m.measurer??S(m.fontFamily,m.fontFamilyMono),C=p.treemap??{},w=m.padding??L(p,`diagramPadding`,8,0,2e3),T=Math.round(u(m,L(p,`nodeWidth`,64,1,400)*10,200,2*w)),E=Math.round(L(p,`nodeHeight`,40,1,400)*10),D=C.showValues!==!1,O=A(typeof C.valueFormat==`string`?C.valueFormat:`,`),k=N(f.roots,T,E,{gap:L(p,`padding`,4,0,200),header:P,side:F}),j=c(f.title,!1,y,h,d(m),1),M=j.height>0?j.height+8:0,R=w+Math.max(0,(j.width-T)/2),z=w+M,B=``,V=``;for(let e of k){let o=e.node,c=s(o.cssCompiledStyles??[]),u=i(e.series),d=R+e.x,f=z+e.y,p=x(o.name).trim(),m=D?O(e.value):``,S=`data-id="${a(o.name)}">`,C=`<rect x="${l(d)}" y="${l(f)}" width="${l(e.w)}" height="${l(e.h)}" fill="${u}"`;if(o.children!==void 0){let i=``;if(e.h>=P){let n=e.w-2*F-4,r=m?y.width(m,_,0):0,a=r>0&&n-r-12>=3*g,o=b(p,a?n-r-12:n,g,g,y,1),s=f+P/2+1;o&&(i+=`<text x="${l(d+F+2)}" y="${l(s+g*.35)}" font-weight="var(--_hw)"${c.text}>${t(o.text)}</text>`),a&&(i+=`<text class="pele-value" x="${l(d+e.w-F-2)}" y="${l(s+_*.35)}" font-size="${_}" text-anchor="end" fill="var(--_m)"${c.text}>${t(m)}</text>`)}let a=/[";]fill:/.test(c.shape)?``:` fill-opacity="0.12"`;B+=`<g class="pele-node pele-section${n(o.classSelector??``)}" ${S}${C}${r(`${a} stroke="${u}"${c.shape}`)}/>${i}</g>`;continue}let w=``,T=e.w-8,E=Math.min(h,Math.floor((e.h-4)/I)),k=E>=v?b(p,T,E,v,y):void 0;if(k){let n=l(d+e.w/2),r=f+e.h/2,i=Math.max(v,Math.round(k.size*.8)),a=(k.size+i)*I;if(m&&a<=e.h-4&&y.width(m,i,0)<=T){let e=r-a/2+k.size*I/2,o=r+a/2-i*I/2;w=`<text x="${n}" y="${l(e+k.size*.35)}" font-size="${l(k.size)}"${c.text}>${t(k.text)}</text><text class="pele-value" x="${n}" y="${l(o+i*.35)}" font-size="${l(i)}"${c.text}>${t(m)}</text>`}else w=`<text x="${n}" y="${l(r+k.size*.35)}" font-size="${l(k.size)}"${c.text}>${t(k.text)}</text>`}V+=`<g class="pele-node pele-leaf${n(o.classSelector??``)}" ${S}${C}${r(c.shape)}/>${w}</g>`}let H=Math.ceil(Math.max(T,j.width)+2*w),U=Math.ceil(E+M+2*w),W=o(j,H/2,w+j.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(B?`<g class="pele-sections" font-size="${g}">${B}</g>`:``)+(V?`<g class="pele-leaves" text-anchor="middle" fill="var(--_bg)">${V}</g>`:``);return{svg:e(`treemap`,H,U,h,m,f,W),width:H,height:U,links:[]}}var z={type:`treemap`,parse:(e,t,n)=>w(D(e),n),render:R};export{z as treemap};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n){return n===void 0&&(n=``),t===void 0&&(t=`\\b`),RegExp(`^`+n+`((`+e.join(`)|(`)+`))`+t)}var t=`\\\\[0-7]{1,3}`,n=`\\\\x[A-Fa-f0-9]{1,2}`,r=`\\\\[abefnrtv0%?'"\\\\]`,i=`([^\\u0027\\u005C\\uD800-\\uDFFF]|[\\uD800-\\uDFFF][\\uDC00-\\uDFFF])`,a=[`[<>]:`,`[<>=]=`,`<<=?`,`>>>?=?`,`=>`,`--?>`,`<--[->]?`,`\\/\\/`,`\\.{2,3}`,`[\\.\\\\%*+\\-<>!\\/^|&]=?`,`\\?`,`\\$`,`~`,`:`],o=e(`[<>]:,[<>=]=,[!=]==,<<=?,>>>?=?,=>?,--?>,<--[->]?,\\/\\/,[\\\\%*+\\-<>!\\/^|&\\u00F7\\u22BB]=?,\\?,\\$,~,:,\\u00D7,\\u2208,\\u2209,\\u220B,\\u220C,\\u2218,\\u221A,\\u221B,\\u2229,\\u222A,\\u2260,\\u2264,\\u2265,\\u2286,\\u2288,\\u228A,\\u22C5,\\b(in|isa)\\b(?!.?\\()`.split(`,`),``),s=/^[;,()[\]{}]/,c=/^[_A-Za-z\u00A1-\u2217\u2219-\uFFFF][\w\u00A1-\u2217\u2219-\uFFFF]*!*/,l=e([t,n,r,i],`'`),u=[`begin`,`function`,`type`,`struct`,`immutable`,`let`,`macro`,`for`,`while`,`quote`,`if`,`else`,`elseif`,`try`,`finally`,`catch`,`do`],d=[`end`,`else`,`elseif`,`catch`,`finally`],f=`if.else.elseif.while.for.begin.let.end.do.try.catch.finally.return.break.continue.global.local.const.export.import.importall.using.function.where.macro.module.baremodule.struct.type.mutable.immutable.quote.typealias.abstract.primitive.bitstype`.split(`.`),p=[`true`,`false`,`nothing`,`NaN`,`Inf`],m=e(u),h=e(d),g=e(f),_=e(p),v=/^@[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,y=/^:[_A-Za-z\u00A1-\uFFFF][\w\u00A1-\uFFFF]*!*/,b=/^(`|([_A-Za-z\u00A1-\uFFFF]*"("")?))/,x=e(a,``,`@`),S=e(a,``,`:`);function C(e){return e.nestedArrays>0}function w(e){return e.nestedGenerators>0}function T(e,t){return t===void 0&&(t=0),e.scopes.length<=t?null:e.scopes[e.scopes.length-(t+1)]}function E(e,t){if(e.match(`#=`,!1))return t.tokenize=O,t.tokenize(e,t);var n=t.leavingExpr;if(e.sol()&&(n=!1),t.leavingExpr=!1,n&&e.match(/^'+/))return`operator`;if(e.match(/\.{4,}/))return`error`;if(e.match(/\.{1,3}/))return`operator`;if(e.eatSpace())return null;var r=e.peek();if(r===`#`)return e.skipToEnd(),`comment`;if(r===`[`&&(t.scopes.push(`[`),t.nestedArrays++),r===`(`&&(t.scopes.push(`(`),t.nestedGenerators++),C(t)&&r===`]`){for(;t.scopes.length&&T(t)!==`[`;)t.scopes.pop();t.scopes.pop(),t.nestedArrays--,t.leavingExpr=!0}if(w(t)&&r===`)`){for(;t.scopes.length&&T(t)!==`(`;)t.scopes.pop();t.scopes.pop(),t.nestedGenerators--,t.leavingExpr=!0}if(C(t)){if(t.lastToken==`end`&&e.match(`:`))return`operator`;if(e.match(`end`))return`number`}var i;if((i=e.match(m,!1))&&t.scopes.push(i[0]),e.match(h,!1)&&t.scopes.pop(),e.match(/^::(?![:\$])/))return t.tokenize=D,t.tokenize(e,t);if(!n&&(e.match(y)||e.match(S)))return`builtin`;if(e.match(o))return`operator`;if(e.match(/^\.?\d/,!1)){var a=RegExp(/^im\b/),l=!1;if(e.match(/^0x\.[0-9a-f_]+p[\+\-]?[_\d]+/i)&&(l=!0),e.match(/^0x[0-9a-f_]+/i)&&(l=!0),e.match(/^0b[01_]+/i)&&(l=!0),e.match(/^0o[0-7_]+/i)&&(l=!0),e.match(/^(?:(?:\d[_\d]*)?\.(?!\.)(?:\d[_\d]*)?|\d[_\d]*\.(?!\.)(?:\d[_\d]*))?([Eef][\+\-]?[_\d]+)?/i)&&(l=!0),e.match(/^\d[_\d]*(e[\+\-]?\d+)?/i)&&(l=!0),l)return e.match(a),t.leavingExpr=!0,`number`}if(e.match(`'`))return t.tokenize=k,t.tokenize(e,t);if(e.match(b))return t.tokenize=A(e.current()),t.tokenize(e,t);if(e.match(v)||e.match(x))return`meta`;if(e.match(s))return null;if(e.match(g))return`keyword`;if(e.match(_))return`builtin`;var u=t.isDefinition||t.lastToken==`function`||t.lastToken==`macro`||t.lastToken==`type`||t.lastToken==`struct`||t.lastToken==`immutable`;return e.match(c)?u?e.peek()===`.`?(t.isDefinition=!0,`variable`):(t.isDefinition=!1,`def`):(t.leavingExpr=!0,`variable`):(e.next(),`error`)}function D(e,t){return e.match(/.*?(?=[,;{}()=\s]|$)/),e.match(`{`)?t.nestedParameters++:e.match(`}`)&&t.nestedParameters>0&&t.nestedParameters--,t.nestedParameters>0?e.match(/.*?(?={|})/)||e.next():t.nestedParameters==0&&(t.tokenize=E),`builtin`}function O(e,t){return e.match(`#=`)&&t.nestedComments++,e.match(/.*?(?=(#=|=#))/)||e.skipToEnd(),e.match(`=#`)&&(t.nestedComments--,t.nestedComments==0&&(t.tokenize=E)),`comment`}function k(e,t){var n=!1,r;if(e.match(l))n=!0;else if(r=e.match(/\\u([a-f0-9]{1,4})(?=')/i)){var i=parseInt(r[1],16);(i<=55295||i>=57344)&&(n=!0,e.next())}else if(r=e.match(/\\U([A-Fa-f0-9]{5,8})(?=')/)){var i=parseInt(r[1],16);i<=1114111&&(n=!0,e.next())}return n?(t.leavingExpr=!0,t.tokenize=E,`string`):(e.match(/^[^']+(?=')/)||e.skipToEnd(),e.match(`'`)&&(t.tokenize=E),`error`)}function A(e){e.substr(-3)===`"""`?e=`"""`:e.substr(-1)===`"`&&(e=`"`);function t(t,n){if(t.eat(`\\`))t.next();else if(t.match(e))return n.tokenize=E,n.leavingExpr=!0,`string`;else t.eat(/[`"]/);return t.eatWhile(/[^\\`"]/),`string`}return t}var j={name:`julia`,startState:function(){return{tokenize:E,scopes:[],lastToken:null,leavingExpr:!1,isDefinition:!1,nestedArrays:0,nestedComments:0,nestedGenerators:0,nestedParameters:0,firstParenPos:-1}},token:function(e,t){var n=t.tokenize(e,t),r=e.current();return r&&n&&(t.lastToken=r),n},indent:function(e,t,n){var r=0;return(t===`]`||t===`)`||/^end\b/.test(t)||/^else/.test(t)||/^catch\b/.test(t)||/^elseif\b/.test(t)||/^finally/.test(t))&&(r=-1),(e.scopes.length+r)*n.unit},languageData:{indentOnInput:/^\s*(end|else|catch|finally)\b$/,commentTokens:{line:`#`,block:{open:`#=`,close:`=#`}},closeBrackets:{brackets:[`(`,`[`,`{`,`"`]},autocomplete:f.concat(p)}};export{j as julia};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{u as e}from"./CX-xckzu.js";var t=/<(?!br\s*\/?>)/gi,n=/:fa-/g,r=/<br\s*\/?>|fl°°?\w+¶ß|&#?\w+;|[\ud800-\udbff][\udc00-\udfff]|[\s\S]/gi;function i(r,i,a,o,s=0){let c=r;return c!==void 0&&(c.includes(`<`)&&(c=c.replace(t,`<`)),c.includes(`:fa-`)&&(c=c.replace(n,`:fa-`))),e(c,!1,i,a,o,s)}function a(e,t,n,a,o=0){let s=i(e,t,n,a,o);if(e===void 0||s.width<=a)return s;let c=``,l=0;for(let i of e.match(r)??[]){if(i.trim()===``||i.length>2&&i[0]===`<`)l=0;else{let e=t.width(i.length>2?`x`:i,n,o);l>0&&l+e>a&&(c+=`
|
|
2
|
+
`,l=0),l+=e}c+=i}return i(c,t,n,a,o)}export{i as n,a as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=function(e,t){return new URL(e,t).href},t={},n=function(e){return e.pathname.endsWith(`.css`)},r=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},i=function(i,a,o){let s=Promise.resolve();if(a&&a.length>0){let i,c=document.querySelector(`meta[property=csp-nonce]`),l=c?.nonce||c?.getAttribute(`nonce`);function u(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function d(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}s=u(a.map(a=>{a=e(a,o);let s=d(a),c=n(s);return r(t,s.href,()=>{if(i===void 0){i={all:new Set,styles:new Set};let e=document.getElementsByTagName(`link`);for(let t=e.length-1;t>=0;t--){let n=e[t];i.all.add(n.href),n.rel===`stylesheet`&&i.styles.add(n.href)}}if((c?i.styles:i.all).has(s.href))return;let e=document.createElement(`link`);if(e.rel=c?`stylesheet`:`modulepreload`,c||(e.as=`script`),e.crossOrigin=``,e.href=s.href,l&&e.setAttribute(`nonce`,l),document.head.appendChild(e),c)return new Promise((t,n)=>{e.addEventListener(`load`,t),e.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${s}`)))})})}).filter(e=>e!==void 0))}function c(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return s.then(e=>{for(let t of e||[])t.status===`rejected`&&c(t.reason);return i().catch(c)})};export{i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={name:`spreadsheet`,startState:function(){return{stringType:null,stack:[]}},token:function(e,t){if(e){switch(t.stack.length===0&&(e.peek()==`"`||e.peek()==`'`)&&(t.stringType=e.peek(),e.next(),t.stack.unshift(`string`)),t.stack[0]){case`string`:for(;t.stack[0]===`string`&&!e.eol();)e.peek()===t.stringType?(e.next(),t.stack.shift()):e.peek()===`\\`?(e.next(),e.next()):e.match(/^.[^\\\"\']*/);return`string`;case`characterClass`:for(;t.stack[0]===`characterClass`&&!e.eol();)e.match(/^[^\]\\]+/)||e.match(/^\\./)||t.stack.shift();return`operator`}var n=e.peek();switch(n){case`[`:return e.next(),t.stack.unshift(`characterClass`),`bracket`;case`:`:return e.next(),`operator`;case`\\`:return e.match(/\\[a-z]+/)?`string.special`:(e.next(),`atom`);case`.`:case`,`:case`;`:case`*`:case`-`:case`+`:case`^`:case`<`:case`/`:case`=`:return e.next(),`atom`;case`$`:return e.next(),`builtin`}return e.match(/\d+/)?e.match(/^\w+/)?`error`:`number`:e.match(/^[a-zA-Z_]\w*/)?e.match(/(?=[\(.])/,!1)?`keyword`:`variable`:[`[`,`]`,`(`,`)`,`{`,`}`].indexOf(n)==-1?(e.eatSpace()||e.next(),null):(e.next(),`bracket`)}}};export{e as spreadsheet};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,f as t,i as n,o as r,u as i,x as a}from"./CX-xckzu.js";import{n as o,r as s}from"./DciMwFJ1.js";import{a as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C}from"./BunrC_8P.js";import{PeleError as w,u as ee}from"./8wVGBFSs.js";function T(e,t){let n=new Map;for(let{label:t,value:r}of e.sections){if(r<0)throw new w(`"${t}" has invalid value: ${r}. Negative values are not allowed in pie charts. All slice values must be >= 0.`,`semantic`,{type:`pie`});n.has(t)||n.set(t,r)}return{type:`pie`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
|
+
`):void 0,showData:e.showData,sections:n}}function E(e,t){let n=t;for(let t=e.charCodeAt(n);t>=48&&t<=57;t=e.charCodeAt(n))n++;return n}function D(){let e=0,t=0,n=-1;return(r,i)=>{let a=r.charCodeAt(i)===45?i+1:i;if((a<e||a>=t)&&(e=a,t=E(r,a),n=-1,t>a&&r.charCodeAt(t)===46)){let e=E(r,t+1),i=e-t-1;i>0&&r.charCodeAt(e)!==46?n=e:i>1&&(n=e-1)}return t===a?-1:n>=0?n:r.charCodeAt(a)===48?r.charCodeAt(a+1)===46?-1:a+1:r.charCodeAt(t)===46?t-1>a?t-1:-1:t}}var O=[m(`showData`),m(`pie`),{name:`:`,pattern:`:`},{name:`NUMBER_PIE`,pattern:/(?:-?[0-9]+\.[0-9]+(?!\.))|(?:-?(0|[1-9][0-9]*)(?!\.))/y,scanner:D,first:`-0123456789`},c,S,y,g,h,C,b,v,x];function k(e){let t=new p(_(e,O,`pie`),O,`pie`),n={$type:`Pie`,showData:!1,sections:[]},r=()=>{if(t.kind!==-1)for(t.kind!==8&&t.fail(`a line break or the end of input`);t.kind===8;)t.i++};for(;t.kind===8;)t.i++;for(t.expect(1),n.showData=t.accept(0);t.kind!==-1;)switch(t.kind){case 8:t.i++;break;case 4:n.accDescr=l(t.take()),r();break;case 5:n.accTitle=f(t.take()),r();break;case 6:n.title=u(t.take()),r();break;case 7:{let e=d(t.take());t.expect(2);let i=Number(t.expect(3));n.sections.push({$type:`PieSection`,label:e,value:i}),r();break}default:t.fail(`a section, a title, or a line break`)}return n}var A=120,j=12,M=26,N=32,P=28;function F(e,t){return e.pie?.[t]}function I(e,t){return`${a(Math.sin(e)*t)},${a(-Math.cos(e)*t)}`}function te(e,t,n,r){if(t-e>=Math.PI*2-1e-9){let e=(e,t)=>`M0,${a(-e)}A${a(e)},${a(e)} 0 1 ${t} 0,${a(e)}A${a(e)},${a(e)} 0 1 ${t} 0,${a(-e)}Z`;return e(n,1)+(r>0?e(r,0):``)}let i=+(t-e>Math.PI);return r<=0?`M0,0L${I(e,n)}A${a(n)},${a(n)} 0 ${i} 1 ${I(t,n)}Z`:`M${I(e,n)}A${a(n)},${a(n)} 0 ${i} 1 ${I(t,n)}L${I(t,r)}A${a(r)},${a(r)} 0 ${i} 0 ${I(e,r)}Z`}function L(e,t,n){return o(n,A*2,140,(r,i)=>R(e,t,n,r/2,i))}function R(o,c,l,u,d){let f=l.fontSize??16,p=Math.round(f*.875),m=l.measurer??ee(l.fontFamily,l.fontFamilyMono),h=l.padding??8,g=F(c,`textPosition`),_=typeof g==`number`&&g>=0&&g<=1?g:.75,v=F(c,`donutHole`),y=typeof v==`number`&&v>0&&v<=.9?v*u:0,b=String(F(c,`legendPosition`)??`right`),x=d&&(b===`left`||b===`right`)?`bottom`:b,S=[...o.sections],C=0;for(let[,e]of S)C+=e;let w=S.map(([e,t])=>i(o.showData?`${e} [${t}]`:e,!1,m,p,4e3)),T=0;for(let e of w)T=Math.max(T,e.width);T+=w.length>0?j+8:0;let E=w.length*M,D=i(o.title,!1,m,f,s(l),1),O=D.height>0?D.height+16:0,k=S.map(([,e])=>{let t=C>0?e/C:0;return t*100>=1&&(t*100).toFixed(0)!==`0`?t:0}),A=k.map(e=>e===0||e>=.5?!1:2*u*_*Math.sin(e*Math.PI)<m.width((e*100).toFixed(0)+`%`,p,0)+6),I=A.includes(!0)?P:0,L=x===`left`||x===`right`||x===`center`?x:``,R=x===`top`||x===`bottom`,z=(u+I)*2,B=z,V=z;L===`left`||L===`right`?(B+=T>0?N+T:0,V=Math.max(V,E)):R&&(B=Math.max(B,T),V+=E>0?20+E:0),B=Math.max(B,D.width);let H=h+(L===`left`?T+N+z/2:L===`right`?z/2:B/2),U=h+O,W=U+(x===`top`?E+20+z/2:R?z/2:V/2),G=``,K=``,q=``,J=0,Y=u+P/2,ne=[],re=(e,t,n)=>ne.every(r=>Math.abs(e-r.x)>=(n+r.width)/2+2||Math.abs(t-r.y)>=p+2);S.forEach(([e],r)=>{let i=k[r];if(i===0)return;let o=J+i*Math.PI*2;G+=`<path class="pele-slice" data-id="${n(e)}" d="${te(J,o,u,y)}" fill="${t(r)}"/>`;let s=(J+o)/2,c=(i*100).toFixed(0)+`%`;if(A[r]){let e=m.width(c,p,0),t=s;for(let n=0;n<360&&!re(Math.sin(t)*Y,-Math.cos(t)*Y,e);n++)t+=2/Y;let n=Math.sin(t)*Y,r=-Math.cos(t)*Y;ne.push({x:n,y:r,width:e}),q+=`<text x="${a(n)}" y="${a(r+p*.35)}">${c}</text>`}else{let e=u*_;K+=`<text x="${a(Math.sin(s)*e)}" y="${a(-Math.cos(s)*e+p*.35)}">${c}</text>`}J=o}),G===``&&(G=`<circle class="pele-slice" r="${u}" fill="none" stroke="var(--_b)"/>`);let X=``,Z,Q;L===`right`?(Z=H+z/2+N,Q=U+(V-E)/2):L===`left`?(Z=h,Q=U+(V-E)/2):L===`center`?(Z=H-T/2,Q=W-E/2):(Z=h+(B-T)/2,Q=x===`top`?U:U+z+20),w.forEach((e,i)=>{let o=Q+i*M+M/2;X+=`<g class="pele-legend-item" data-id="${n(S[i][0])}"><rect x="${a(Z)}" y="${a(o-j/2)}" width="${j}" height="${j}" rx="2" fill="${t(i)}"/>`+r(e,Z+j+8+e.width/2,o,``)+`</g>`});let $=Math.ceil(B+2*h),ie=Math.ceil(V+O+2*h),ae=r(D,$/2,h+D.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g class="pele-slices" transform="translate(${a(H)},${a(W)})" stroke="var(--_bg)" stroke-width="1" stroke-linejoin="round">${G}</g>`+(K?`<g class="pele-slice-labels" transform="translate(${a(H)},${a(W)})" font-size="${p}" text-anchor="middle" fill="var(--_bg)">${K}</g>`:``)+(q?`<g class="pele-slice-labels" transform="translate(${a(H)},${a(W)})" font-size="${p}" text-anchor="middle">${q}</g>`:``)+(X?`<g class="pele-legend" font-size="${p}">${X}</g>`:``);return{svg:e(`pie`,$,ie,f,l,o,ae),width:$,height:ie,links:[]}}var z={type:`pie`,parse:(e,t,n)=>T(k(e),n),render:L};export{z as pie};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var t=e(`abstract as assert boolean break byte case catch char class const continue def default do double else enum extends final finally float for goto if implements import in instanceof int interface long native new package private protected public return short static strictfp super switch synchronized threadsafe throw throws trait transient try void volatile while`),n=e(`catch class def do else enum finally for if interface switch trait try while`),r=e(`return break continue`),i=e(`null true false this`),a;function o(e,o){var c=e.next();if(c==`"`||c==`'`)return s(c,e,o);if(/[\[\]{}\(\),;\:\.]/.test(c))return a=c,null;if(/\d/.test(c))return e.eatWhile(/[\w\.]/),e.eat(/eE/)&&(e.eat(/\+\-/),e.eatWhile(/\d/)),`number`;if(c==`/`){if(e.eat(`*`))return o.tokenize.push(u),u(e,o);if(e.eat(`/`))return e.skipToEnd(),`comment`;if(d(o.lastToken,!1))return s(c,e,o)}if(c==`-`&&e.eat(`>`))return a=`->`,null;if(/[+\-*&%=<>!?|\/~]/.test(c))return e.eatWhile(/[+\-*&%=<>|~]/),`operator`;if(e.eatWhile(/[\w\$_]/),c==`@`)return e.eatWhile(/[\w\$_\.]/),`meta`;if(o.lastToken==`.`)return`property`;if(e.eat(`:`))return a=`proplabel`,`property`;var l=e.current();return i.propertyIsEnumerable(l)?`atom`:t.propertyIsEnumerable(l)?(n.propertyIsEnumerable(l)?a=`newstatement`:r.propertyIsEnumerable(l)&&(a=`standalone`),`keyword`):`variable`}o.isBase=!0;function s(e,t,n){var r=!1;if(e!=`/`&&t.eat(e)){if(t.eat(e))r=!0;else return`string`}function i(t,n){for(var i=!1,a,o=!r;(a=t.next())!=null;){if(a==e&&!i){if(!r)break;if(t.match(e+e)){o=!0;break}}if(e==`"`&&a==`$`&&!i){if(t.eat(`{`))return n.tokenize.push(c()),`string`;if(t.match(/^\w/,!1))return n.tokenize.push(l),`string`}i=!i&&a==`\\`}return o&&n.tokenize.pop(),`string`}return n.tokenize.push(i),i(t,n)}function c(){var e=1;function t(t,n){if(t.peek()==`}`){if(e--,e==0)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)}else t.peek()==`{`&&e++;return o(t,n)}return t.isBase=!0,t}function l(e,t){var n=e.match(/^(\.|[\w\$_]+)/);return(!n||!e.match(n[0]==`.`?/^[\w$_]/:/^\./))&&t.tokenize.pop(),n?n[0]==`.`?null:`variable`:t.tokenize[t.tokenize.length-1](e,t)}function u(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize.pop();break}n=r==`*`}return`comment`}function d(e,t){return!e||e==`operator`||e==`->`||/[\.\[\{\(,;:]/.test(e)||e==`newstatement`||e==`keyword`||e==`proplabel`||e==`standalone`&&!t}function f(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function p(e,t,n){return e.context=new f(e.indented,t,n,null,e.context)}function m(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}var h={name:`groovy`,startState:function(e){return{tokenize:[o],context:new f(-e,0,`top`,!1),indented:0,startOfLine:!0,lastToken:null}},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0,n.type==`statement`&&!d(t.lastToken,!0)&&(m(t),n=t.context)),e.eatSpace())return null;a=null;var r=t.tokenize[t.tokenize.length-1](e,t);if(r==`comment`)return r;if(n.align??(n.align=!0),(a==`;`||a==`:`)&&n.type==`statement`)m(t);else if(a==`->`&&n.type==`statement`&&n.prev.type==`}`)m(t),t.context.align=!1;else if(a==`{`)p(t,e.column(),`}`);else if(a==`[`)p(t,e.column(),`]`);else if(a==`(`)p(t,e.column(),`)`);else if(a==`}`){for(;n.type==`statement`;)n=m(t);for(n.type==`}`&&(n=m(t));n.type==`statement`;)n=m(t)}else a==n.type?m(t):(n.type==`}`||n.type==`top`||n.type==`statement`&&a==`newstatement`)&&p(t,e.column(),`statement`);return t.startOfLine=!1,t.lastToken=a||r,r},indent:function(e,t,n){if(!e.tokenize[e.tokenize.length-1].isBase)return null;var r=t&&t.charAt(0),i=e.context;i.type==`statement`&&!d(e.lastToken,!0)&&(i=i.prev);var a=r==i.type;return i.type==`statement`?i.indented+(r==`{`?0:n.unit):i.align?i.column+ +!a:i.indented+(a?0:n.unit)},languageData:{indentOnInput:/^\s*[{}]$/,commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}},closeBrackets:{brackets:[`(`,`[`,`{`,`'`,`"`,`'''`,`"""`]}}};export{h as groovy};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{d as e,f as t,m as n,p as r}from"./8wVGBFSs.js";var i=/[&<>"\x00-\x08\x0b\x0c\x0e-\x1f\x7f\ud800-\udfff\ufffe\uffff]/u,a=/[&<>"]|[\x00-\x08\x0b\x0c\x0e-\x1f\x7f\ud800-\udfff\ufffe\uffff]+/gu,o={"&":`&`,"<":`<`,">":`>`,'"':`"`},s=/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f\ud800-\udfff\ufffe\uffff]/u;function c(e){return i.test(e)?e.replace(a,e=>o[e]??``):e}function l(t){return c(e(t))}var u=[];for(let e=0;e<100;e++)u.push(e===0?``:e%10==0?`.`+e/10:`.`+(e<10?`0`+e:e));function d(e){let t=Math.round(e*100);if(t===0)return`0`;if(t>0){if(t<1e11){let e=Math.floor(t/100);return e+u[t-e*100]}}else if(t>-1e11){let e=-t,n=Math.floor(e/100);return`-`+n+u[e-n*100]}return String(t/100)}function f(e,t,n,r,i){let a=e.lines;if(a.length===0)return``;let o=e.lineHeight,s=e.heights,u=e.size*.35,f=n-e.height/2,p=a.length===1&&a[0].length===1?a[0][0]:void 0;if(p&&p.icon===void 0&&p.math===void 0&&p.style===0)return`<text${r} x="${d(t)}" y="${d(f+o/2+u)}" text-anchor="middle">${c(p.text)}</text>`;let m=T(e),h=r,g;r=E(r,m);let _=``,b=``;for(let n=0;n<a.length;n++){let r=a[n],p=s?s[n]:o,x=f+p/2,S=x+u,C=!1;for(let e of r)(e.icon!==void 0||e.math)&&(C=!0);if(C){let a=t-e.widths[n]/2;for(let t of r){if(t.math){let n=`x="${d(a)}" y="${d(x-t.math.height/2)}" width="${d(t.math.width)}" height="${d(t.math.height)}"`;g??=v(h),b+=g.halo===void 0?y(t.math,n,e.size,g.attrs):`<rect ${n} rx="2" fill="${g.halo}"/>`}else if(t.icon!==void 0){let n=e.size*1.1,r=i?.(t.icon)??``;b+=`<svg class="pele-icon" data-icon="${l(t.icon)}" x="${d(a)}" y="${d(x-n/2)}" width="${d(n)}" height="${d(n)}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${r}</svg>`}else t.text!==``&&(_+=`<tspan x="${d(a)}" y="${d(S)}" text-anchor="start"${w(t.style&~m)}>${c(t.text)}</tspan>`);a+=t.width}}else{for(let e=0;e<r.length;e++){let n=r[e],i=e===0?` x="${d(t)}" y="${d(S)}"`:``;_+=`<tspan${i}${w(n.style&~m)}>${c(n.text)}</tspan>`}r.length===0&&(_+=`<tspan x="${d(t)}" y="${d(S)}"> </tspan>`)}f+=p}return`<text${r} text-anchor="middle" xml:space="preserve">${_}</text>${b}`}var p=/ fill="([^"]*)"/,m=/ stroke="([^"]*)"/,h=/ style="([^"]*)"/,g=/(?:^|;)\s*fill:([^;]*)/,_=/(?:^|;)\s*opacity:([^;]*)/;function v(e){let t=h.exec(e)?.[1]??``,n=(g.exec(t)?.[1]??p.exec(e)?.[1]??``).trim();if(n===`none`)return{attrs:``,halo:m.exec(e)?.[1]??`none`};let r=_.exec(t)?.[1].trim();return{attrs:(n===``?``:` color="${n}"`)+(r?` opacity="${r}"`:``)}}function y(e,t,n,r){return`svg`in e?`<svg class="pele-math" ${t} overflow="visible"${r}>${e.svg}</svg>`:`<foreignObject class="pele-math" ${t} overflow="visible"${r}><div xmlns="http://www.w3.org/1999/xhtml" style="display:flex;align-items:center;justify-content:center;width:100%;height:100%;font-size:${d(n)}px;line-height:normal;white-space:nowrap">${e.html}</div></foreignObject>`}var b=` font-weight="var(--_w)"`,x=` font-style="italic"`,S=` text-decoration="underline"`,C=` font-family="var(--_fm)"`,ee=` baseline-shift="sub" font-size="smaller"`,te=` baseline-shift="super" font-size="smaller"`;function w(e){return(e&1?b:``)+(e&2?x:``)+(e&4?C:``)+(e&32?S:``)+(e&8?ee:e&16?te:``)}function T(e){let t=7,n=!1;for(let r of e.lines)for(let e of r)e.icon!==void 0||e.text===``||(t&=e.style,n=!0);return n?t:0}function E(e,t){return e+(t&1&&!e.includes(` font-weight="`)?b:``)+(t&2&&!e.includes(` font-style="`)?x:``)+(t&4&&!e.includes(` font-family="`)?C:``)}var ne=1.5,D=1.3,re=/<br\s*\/?>|\\n|\n/gi,O=/<\/?([a-zA-Z][\w-]*)(?:\s[^<>]*)?\/?>/y,k=/(fa[bklrs]?):fa-([\w-]+)/g,A=/[<\\\n*_]|fa[bklrs]?:fa-/,j=new Map([[`b`,1],[`strong`,1],[`i`,2],[`em`,2],[`cite`,2],[`dfn`,2],[`var`,2],[`code`,4],[`kbd`,4],[`samp`,4],[`tt`,4],[`sub`,8],[`sup`,16],[`u`,32],[`ins`,32]]),ie=24,ae=new Set(`a abbr address article aside audio b bdi bdo big blockquote body br button caption center cite code col colgroup data dd del details dfn dialog div dl dt em embed fieldset figcaption figure font footer form h1 h2 h3 h4 h5 h6 head header hr html i iframe img input ins kbd label legend li link main map mark meta meter nav noscript object ol optgroup option output p picture pre progress q rp rt ruby s samp script section select small source span strike strong style sub summary sup table tbody td template textarea tfoot th thead time title tr track tt u ul var video wbr`.split(` `)),M=`\\u2e80-\\u9fff\\uf900-\\ufaff\\uff00-\\uff60`,N=`、。,.:;!?)]}」』】〕〉》〙〗ー…‥・ゝゞぁぃぅぇぉっゃゅょゎァィゥェォッャュョヮ,.:;!?)\\]}`,oe=`([{「『【〔〈《〘〖([{`,se=RegExp(`[${M}]`),P=`\\u200b\\u00ad`,ce=RegExp(`[${P}]`),le=RegExp(`\\s*(?:[${oe}]*[${M}][${N}]*|[^\\s${M}${P}]+[${P}]*[${N}]*|[${P}]+)\\s*|\\s+`,`g`),F=57344,I=6400,L=/\$\$(.+?)\$\$/g,R=/[\ue000-\uf8ff]/,z=/([\ue000-\uf8ff])/,B,V={lines:[],widths:[],width:0,height:0,size:0,lineHeight:0};function H(e){let t=e.split(`
|
|
2
|
+
`),n=1/0;for(let e of t){if(e.trim()===``)continue;let t=e.length-e.trimStart().length;t<n&&(n=t)}return n===1/0||n===0?e:t.map(e=>e.slice(Math.min(n,e.length-e.trimStart().length))).join(`
|
|
3
|
+
`)}function U(e){return e!==void 0&&e.icon===void 0&&e.math===void 0}function W(e,t,n){if(t!==``){if(B!==void 0&&R.test(t)){let r=B,i=t.split(z);for(let t=0;t<i.length;t++){if(t%2==0){i[t]!==``&&G(e,i[t],n);continue}let a=i[t].charCodeAt(0)-F,o=r.math[a];o?e.push({text:``,style:n,math:o,width:o.width}):G(e,`$$${r.tex[a]}$$`,n)}return}G(e,t,n)}}function G(t,n,r){let i=e(n),a=t[t.length-1];U(a)&&a.style===r?a.text+=i:t.push({text:i,style:r,width:0})}function ue(e,n,r){if(!n.includes(`:fa-`)){W(e,n,r);return}let i=0;k.lastIndex=0;let a;for(;(a=k.exec(n))!==null;){let o=`${a[1]}:fa-${a[2]}`;if(W(e,n.slice(i,a.index),r),i=a.index+a[0].length,t(o)!==``)e.push({text:``,style:r,icon:o,width:0});else if(n[i]===` `)i++;else if(i===n.length){let t=e[e.length-1];U(t)&&(t.text=t.text.trimEnd())}}W(e,n.slice(i),r)}function de(e,t,n,r,i){let a=i.style,o=0,s=``,c=0,l=t.length,u=()=>{ue(e,s,a|(i.shifts[i.shifts.length-1]??0)),s=``};for(;c<l;){let e=t[c];if(e===`<`){O.lastIndex=c;let e=O.exec(t);if(e&&e.index===c){let n=e[1].toLowerCase(),o=t[c+1]===`/`,s=j.get(n)??0;if(s&ie){u();let e=i.shifts.lastIndexOf(s);o?e!==-1&&i.shifts.splice(e,1):i.shifts.push(s)}else s&&(u(),i.style=o?i.style&~s|r&s:i.style|s,a=o?a&~s|r&s:a|s);if(s||ae.has(n)){c+=e[0].length;continue}}}else if(n&&(e===`*`||e===`_`)){let n=t[c+1]===e,i=n?1:2,s=n?2:1,d=(o&i)===0,f=c>0?t[c-1]:` `,p=c+s<l?t[c+s]:` `,m=d&&p.trim()!==``&&t.indexOf(n?e+e:e,c+s)!==-1,h=!d&&f.trim()!==``,g=e===`_`&&/\w/.test(f)&&/\w/.test(p);if((m||h)&&!g){u(),o=m?o|i:o&~i,a=m?a|i:a&~i|r&i,c+=s;continue}}s+=e,c++}u()}function fe(e,t,n){let r=0;for(let i of e)i.width=i.icon===void 0?i.math?i.math.width:t.width(i.text,n,i.style):n*1.25,r+=i.width;return r}function K(e,t,n,r,i,a){let o=[],s=0,c=(e=!1)=>{let r=o[o.length-1];if(U(r)){let i=r.text.trimEnd();if(e&&r.text.endsWith(``)&&(i=i.slice(0,-1)+`-`),i!==r.text){r.text=i;let e=t.width(i,n,r.style);s+=e-r.width,r.width=e}}i.push(o),a.push(s),o=[],s=0};for(let i of e){if(i.icon!==void 0||i.math){let e=i.math?i.math.width:n*1.25;s>0&&s+e>r&&c(),o.push({...i,width:e}),s+=e;continue}let a=i.text.match(le)??[],l=i.text.includes(``),u=l?a.length:0,d=new Float64Array(u),f=new Float64Array(u+1);for(let r=u-1;r>=0;r--){let o=a[r].endsWith(``),s=a[r].trimEnd();d[r]=t.width(o?s.slice(0,-1):s,n,i.style),f[r]=o?r===u-1?i===e[e.length-1]?d[r]:1/0:d[r]+f[r+1]:d[r]}for(let e=0;e<a.length;e++){let u=a[e],p=l?d[e]:t.width(u.trimEnd(),n,i.style),m=!l||!u.endsWith(``)?s+p<=r:s+t.width(u.slice(0,-1)+`-`,n,i.style)<=r||s+f[e]<=r;s>0&&!m&&(c(u.trimStart()===u),u=u.trimStart());let h=o[o.length-1];if(U(h)&&h.style===i.style){if(h.text+=u,p>0||u.trimEnd()!==u){let e=h.width;h.width=t.width(h.text,n,h.style),s+=h.width-e}}else{let e=t.width(u,n,i.style);o.push({text:u,style:i.style,width:e}),s+=e}}}(o.length>0||i.length===0)&&c()}function pe(t,i,a,o,s,c=0){if(t===void 0||t===``)return V;let l=Math.round(o*ne);if(r()&&t.includes(`$$`)&&!R.test(t)){let r={tex:[],math:[]},u=t.replace(L,(e,t)=>r.tex.length===I?e:(r.tex.push(t),String.fromCharCode(F+r.tex.length-1)));if(r.tex.length>0){for(let t of r.tex)r.math.push(n(e(t),o));return q(u,i,a,o,s,c,l,r)}}if(!A.test(t)&&!t.includes(`&`)&&!t.includes(`fl`)){let e=t.trim(),n=a.width(e,o,c);if(n<=s||!(e.includes(` `)||se.test(e)||ce.test(e)))return{lines:[[{text:e,style:c,width:n}]],widths:[n],width:n,height:l,size:o,lineHeight:l};let r=[],i=[];K([{text:e,style:c,width:n}],a,o,s,r,i);let u=0;for(let e of i)e>u&&(u=e);let d=r.length>1?Math.round(o*D):l;return{lines:r,widths:i,width:u,height:r.length*d,size:o,lineHeight:d}}return q(t,i,a,o,s,c,l)}function q(e,t,n,r,i,a,o,s){let c=B;B=s;try{let c=me(e,t,n,r,i,a,o);return s?J(c):c}finally{B=c}}function me(e,t,n,r,i,a,o){let s=t?H(e.replace(/\r\n?/g,`
|
|
4
|
+
`)).trim():e.trim(),c=[],l=[],u=0,d={style:a,shifts:[]};for(let e of s.split(re)){let o=[];de(o,e.trim(),t,a,d);let s=fe(o,n,r);s>i?K(o,n,r,i,c,l):(c.push(o),l.push(s))}for(let e of l)e>u&&(u=e);let f=c.length>1?Math.round(r*D):o;return{lines:c,widths:l,width:u,height:c.length*f,size:r,lineHeight:f}}function J(e){let t;for(let n=0;n<e.lines.length;n++){let r=e.lineHeight;for(let t of e.lines[n])t.math&&(r=Math.max(r,Math.ceil(t.math.height+e.size/4)));r!==e.lineHeight&&t===void 0&&(t=e.lines.map(()=>e.lineHeight)),t&&(t[n]=r)}if(t===void 0)return e.heights===void 0?e:{...e,heights:void 0,height:e.lines.length*e.lineHeight};let n=0;for(let e of t)n+=e;return{...e,heights:t,height:n}}function he(e){for(let t of e)if(t.math)return!0;return!1}function ge(e,t){let n=e.heights;if(!n)return(t+.5)*e.lineHeight;let r=0;for(let e=0;e<t;e++)r+=n[e];return r+n[t]/2}function _e(e,t){let n=e.widths[t],r=e.heights?e.heights[t]:e.lineHeight,i={lines:[e.lines[t]],widths:[n],width:n,height:r,size:e.size,lineHeight:e.lineHeight};return r!==e.lineHeight&&(i.heights=[r]),i}var ve=`--_bg:var(--pele-bg,#fff);--_fg:var(--pele-fg,#1f1f1f);--_m:var(--pele-muted,#6e6e6e);--_l:var(--pele-line,#1f1f1f);--_s:var(--pele-surface,#f3f3f3);--_a:var(--pele-surface-alt,#e6e6e6);--_b:var(--pele-border,#8a8a8a);--_c:var(--pele-accent,#5b7bd5);color:var(--_fg)`,ye=`var(--_fm)`,be=`var(--pele-radius,4px)`,Y=` style="rx:var(--_r)"`;function xe(e){let t=e.indexOf(` style="`);return t<0?e+Y:`${e.slice(0,t+8)}rx:var(--_r);${e.slice(t+8)}`}var Se=`var(--pele-critical,#e45756)`,X=String.raw`(?:"[^"'\\\n<>{}();:@]*"|'[^"'\\\n<>{}();:@]*'|[\p{L}\p{N}_-][\p{L}\p{N}_ .-]*)`,Ce=new RegExp(String.raw`^\s*${X}(?:\s*,\s*${X})*\s*$`,`u`);function Z(e,t){return e&&Ce.test(e)?e:t}function we(e,t,n){return`;--_fm:var(--pele-font-mono,${Z(n,`monospace`)});font:${e}px sans-serif;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;font-family:var(--pele-font,${Z(t,`sans-serif`)})`}var Te=new Set([`fill`,`fill-opacity`,`stroke`,`stroke-width`,`stroke-dasharray`,`stroke-dashoffset`,`stroke-linecap`,`stroke-linejoin`,`stroke-opacity`,`opacity`,`rx`,`ry`]),Ee=new Set([`color`,`font-size`,`font-family`,`font-weight`,`font-style`,`text-decoration`,`letter-spacing`,`word-spacing`,`opacity`]),De=/url\s*\(|expression\s*\(|javascript:|[<>{};\\]|@import|image-set|\/\*/i,Q={shape:``,line:``,text:``,stroke:void 0,bold:!1,italic:!1,fontSize:void 0};function $(e){if(e.length===0)return Q;let t=new Map,n=new Map;for(let r of e){let e=r.indexOf(`:`);if(e<=0)continue;let i=r.slice(0,e).trim().toLowerCase(),a=r.slice(e+1).replace(/!important/gi,``).trim();a===``||De.test(a)||s.test(a)||(Te.has(i)&&t.set(i,a),Ee.has(i)&&n.set(i===`color`?`fill`:i,a))}if(t.size===0&&n.size===0)return Q;let r=``,i=``;for(let[e,n]of t)r+=`${e}:${n};`,e!==`fill`&&e!==`fill-opacity`&&(i+=`${e}:${n};`);let a=``;for(let[e,t]of n)a+=`${e}:${t};`;let o=n.get(`font-weight`),l=n.get(`font-size`),u=l&&/^[\d.]+(px)?$/.test(l)?parseFloat(l):void 0;return{shape:r?` style="${c(r)}"`:``,line:i?` style="${c(i)}"`:``,text:a?` style="${c(a)}"`:``,stroke:t.get(`stroke`),bold:o===`bold`||o===`bolder`||Number(o)>=600,italic:n.get(`font-style`)===`italic`,fontSize:u!==void 0&&u>0&&u<=200?u:void 0}}var Oe=/[^\w-]+/g;function ke(e){let t=e.replace(Oe,` `).trim();return t===``?``:` `+t}var Ae=[`#4c78a8`,`#f58518`,`#54a24b`,`#e45756`,`#72b7b2`,`#eeca3b`,`#b279a2`,`#9d755d`];function je(e){let t=(e%8+8)%8;return`var(--pele-series-${t+1},${Ae[t]})`}var Me=[[`tw`,`title`],[`hw`,`heading`],[`w`,`bold`]],Ne=/var\(--_(r|tw|hw|w)\)/g;function Pe(e,t,n,r,i,a,o){let s=c(i.idPrefix??`pele`),u=``,d=``;a.accTitle&&(u+=`<title id="${s}-title">${l(a.accTitle)}</title>`,d+=` aria-labelledby="${s}-title"`),a.accDescr&&(u+=`<desc id="${s}-desc">${l(a.accDescr)}</desc>`,d+=` aria-describedby="${s}-desc"`);let f=i.responsive===!1?``:`max-width:100%;height:auto;`,p=new Set;for(let[,e]of o.matchAll(Ne))if(p.add(e),p.size===4)break;let m=p.has(`r`)?`;--_r:${be}`:``;for(let[e,t]of Me)p.has(e)&&(m+=`;--_${e}:var(--pele-${t}-weight,bold)`);return`<svg xmlns="http://www.w3.org/2000/svg" class="pele pele-${e}" viewBox="0 0 ${t} ${n}" width="${t}" height="${n}" style="${f}${ve}${m}${c(we(r,i.fontFamily,i.fontFamilyMono))}" fill="var(--_fg)" role="graphics-document document" aria-roledescription="${e}"${d}>`+u+o+`</svg>`}export{Pe as _,c as a,ke as b,T as c,xe as d,je as f,Se as g,J as h,l as i,ye as l,w as m,s as n,f as o,ge as p,Y as r,$ as s,E as t,pe as u,he as v,d as x,_e as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var t=e(`Assert BackQuote D Defun Deriv For ForEach FromFile FromString Function Integrate InverseTaylor Limit LocalSymbols Macro MacroRule MacroRulePattern NIntegrate Rule RulePattern Subst TD TExplicitSum TSum Taylor Taylor1 Taylor2 Taylor3 ToFile ToStdout ToString TraceRule Until While`),n=`(?:(?:\\.\\d+|\\d+\\.\\d*|\\d+)(?:[eE][+-]?\\d+)?)`,r=`(?:[a-zA-Z\\$'][a-zA-Z0-9\\$']*)`,i=new RegExp(n),a=new RegExp(r),o=RegExp(r+`?_`+r),s=RegExp(r+`\\s*\\(`);function c(e,n){var r=e.next();if(r===`"`)return n.tokenize=l,n.tokenize(e,n);if(r===`/`){if(e.eat(`*`))return n.tokenize=u,n.tokenize(e,n);if(e.eat(`/`))return e.skipToEnd(),`comment`}e.backUp(1);var c=e.match(/^(\w+)\s*\(/,!1);c!==null&&t.hasOwnProperty(c[1])&&n.scopes.push(`bodied`);var f=d(n);if(f===`bodied`&&r===`[`&&n.scopes.pop(),(r===`[`||r===`{`||r===`(`)&&n.scopes.push(r),f=d(n),(f===`[`&&r===`]`||f===`{`&&r===`}`||f===`(`&&r===`)`)&&n.scopes.pop(),r===`;`)for(;f===`bodied`;)n.scopes.pop(),f=d(n);return e.match(/\d+ *#/,!0,!1)?`qualifier`:e.match(i,!0,!1)?`number`:e.match(o,!0,!1)?`variableName.special`:e.match(/(?:\[|\]|{|}|\(|\))/,!0,!1)?`bracket`:e.match(s,!0,!1)?(e.backUp(1),`variableName.function`):e.match(a,!0,!1)?`variable`:e.match(/(?:\\|\+|\-|\*|\/|,|;|\.|:|@|~|=|>|<|&|\||_|`|'|\^|\?|!|%|#)/,!0,!1)?`operator`:`error`}function l(e,t){for(var n,r=!1,i=!1;(n=e.next())!=null;){if(n===`"`&&!i){r=!0;break}i=!i&&n===`\\`}return r&&!i&&(t.tokenize=c),`string`}function u(e,t){for(var n,r;(r=e.next())!=null;){if(n===`*`&&r===`/`){t.tokenize=c;break}n=r}return`comment`}function d(e){var t=null;return e.scopes.length>0&&(t=e.scopes[e.scopes.length-1]),t}var f={name:`yacas`,startState:function(){return{tokenize:c,scopes:[]}},token:function(e,t){return e.eatSpace()?null:t.tokenize(e,t)},indent:function(e,t,n){if(e.tokenize!==c&&e.tokenize!==null)return null;var r=0;return(t===`]`||t===`];`||t===`}`||t===`};`||t===`);`)&&(r=-1),(e.scopes.length+r)*n.unit},languageData:{electricInput:/[{}\[\]()\;]/,commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}}}};export{f as yacas};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import{_ as e,a as t,b as n,d as r,i,o as a,s as o,u as s,x as c}from"./CX-xckzu.js";import{a as l,o as u,r as d,t as f}from"./DciMwFJ1.js";import{a as p,d as m,i as h,l as g,s as _,u as v}from"./DECNRCf2.js";import{t as y}from"./CoyQYage.js";import{a as b,i as x,n as S,r as C,s as w,t as T}from"./DKNOMI4Y.js";import{a as E,i as D,n as O,r as k,t as ee}from"./BN6xhG8e.js";import{t as A}from"./D6QVYUu9.js";import{i as te,n as ne,r as re,t as ie}from"./B9YLdnR_.js";import{i as ae,n as oe,r as se,t as ce}from"./vk5Wkr31.js";import{n as le,t as ue}from"./CggtIYAM.js";import{PeleError as j,c as M,d as de,g as N,h as P,i as F,n as I,s as fe,u as pe}from"./8wVGBFSs.js";function L(e){return e===`markdown`||e===`string`||e===`text`?e:`markdown`}function me(e){return e.startsWith(`"`)&&e.endsWith(`"`)?e.substring(1,e.length-1):e}function R(e,t){let n=0;for(let r=0;r<t.length;r++)t[r]===e&&n++;return n}function z(e){let t=e.trim(),n=`arrow_open`;switch(t[0]){case`<`:n=`arrow_point`,t=t.slice(1);break;case`x`:n=`arrow_cross`,t=t.slice(1);break;case`o`:n=`arrow_circle`,t=t.slice(1)}let r=`normal`;return t.includes(`=`)&&(r=`thick`),t.includes(`.`)&&(r=`dotted`),{type:n,stroke:r}}function B(e){let t=e.trim(),n=t.slice(0,-1),r=`arrow_open`;switch(t.slice(-1)){case`x`:r=`arrow_cross`,t.startsWith(`x`)&&(r=`double_`+r,n=n.slice(1));break;case`>`:r=`arrow_point`,t.startsWith(`<`)&&(r=`double_`+r,n=n.slice(1));break;case`o`:r=`arrow_circle`,t.startsWith(`o`)&&(r=`double_`+r,n=n.slice(1))}let i=`normal`,a=n.length-1;n.startsWith(`=`)&&(i=`thick`),n.startsWith(`~`)&&(i=`invisible`);let o=R(`.`,n);return o&&(i=`dotted`,a=o),{type:r,stroke:i,length:a}}var V=class{type=`flowchart`;direction;nodes=new Map;edges=[];subgraphs=[];classes=new Map;tooltips=new Map;defaultEdgeStyle;defaultInterpolate;title;accTitle;accDescr;subgraphLookup=new Map;members=new Set;edgeById=new Map;pairCount=new Map;subCount=0;options;constructor(e={}){this.options=e}addVertex(e,t,n,r,i,a,o,s){if(!e||e.trim().length===0)return;let c;if(s!==void 0){let t=s.includes(`
|
|
2
|
+
`)?s+`
|
|
3
|
+
`:`{
|
|
4
|
+
`+s+`
|
|
5
|
+
}`,n;try{n=I(t)}catch(t){throw new j(`Metadata of "${e}" is not valid YAML. ${t.message}`,`syntax`,{type:`flowchart`})}c=typeof n==`object`&&n&&!Array.isArray(n)?n:void 0}let l=this.subgraphLookup.get(e);if(l&&c){l.metadata={...l.metadata,...c};return}let u=this.edgeById.get(e);if(u){c?.animate!==void 0&&(u.animate=c.animate),c?.animation!==void 0&&(u.animation=c.animation),c?.curve!==void 0&&(u.interpolate=c.curve);return}let d=this.nodes.get(e);if(d===void 0&&(t===void 0&&n===void 0&&r!=null&&this.options.warn?.(`Style applied to unknown node "${e}". This may indicate a typo. The node will be created automatically.`),d={id:e,labelType:`text`,styles:[],classes:[]},this.nodes.set(e,d)),t===void 0?d.text===void 0&&(d.text=e):(d.labelType=t.type,d.text=me(t.text.trim())),n!==void 0&&(d.type=n),r!=null)for(let e of r)d.styles.push(e);if(i!=null)for(let e of i)d.classes.push(e);if(a!==void 0&&(d.dir=a),d.props===void 0?d.props=o??{}:o!==void 0&&Object.assign(d.props,o),c===void 0)return;if(c.shape){let e=String(c.shape);if(e!==e.toLowerCase()||e.includes(`_`))throw new j(`No such shape: ${e}. Shape names should be lowercase.`,`semantic`,{type:`flowchart`});if(!ue(e))throw new j(`No such shape: ${e}.`,`semantic`,{type:`flowchart`});d.type=e}let f=typeof c.label==`string`?c.label:void 0;c.label&&(d.text=String(c.label),d.labelType=L(c.labelType)),c.icon&&(d.icon=String(c.icon),!f?.trim()&&d.text===e&&(d.text=``)),c.form&&(d.form=String(c.form)),c.pos&&(d.pos=String(c.pos)),c.img&&(d.img=String(c.img),!f?.trim()&&d.text===e&&(d.text=``)),c.constraint&&(d.constraint=String(c.constraint)),c.w&&(d.assetWidth=Number(c.w)),c.h&&(d.assetHeight=Number(c.h))}addSingleLink(e,t,n,r){let i={start:e,end:t,type:void 0,text:``,labelType:`text`,classes:[],isUserDefinedId:!1,interpolate:this.defaultInterpolate},a=n?.text;a!==void 0&&(i.text=me(a.text.trim()),i.labelType=L(a.type)),n!==void 0&&(i.type=n.type,i.stroke=n.stroke,i.length=n.length>10?10:n.length);let o=e+`\0`+t,s=this.pairCount.get(o)??0;r&&!this.edgeById.has(r)?(i.id=r,i.isUserDefinedId=!0):i.id=`L_${e}_${t}_${s===0?0:s+1}`;let c=this.options.maxEdges;if(c!==void 0&&this.edges.length>=c)throw new j(`Edge limit exceeded. The limit is ${c}.`,`limit`,{type:`flowchart`});this.edges.push(i),this.pairCount.set(o,s+1),this.edgeById.has(i.id)||this.edgeById.set(i.id,i)}addLink(e,t,n){let r=typeof n?.id==`string`?n.id.replace(`@`,``):void 0,i=e[e.length-1],a=t[0];for(let o of e)for(let e of t)this.addSingleLink(o,e,n,o===i&&e===a?r:void 0)}updateLinkInterpolate(e,t){for(let n of e)n==="default"?this.defaultInterpolate=t:this.edgeAt(n).interpolate=t}updateLink(e,t){for(let n of e){if(n==="default"){this.defaultEdgeStyle=t;continue}let e=this.edgeAt(n);e.style=t,t.length>0&&!t.some(e=>e?.startsWith(`fill`))&&t.push(`fill:none`)}}edgeAt(e){let t=this.edges[Number(e)];if(t===void 0)throw new j(`The index ${e} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`,`semantic`,{type:`flowchart`});return t}addClass(e,t){let n=t.join().replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);for(let t of e.split(`,`)){let e=this.classes.get(t);e===void 0&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e));for(let t of n)t.includes(`color`)&&e.textStyles.push(t.replace(`fill`,`bgFill`)),e.styles.push(t)}}setDirection(e){let t=e.trim();t.includes(`<`)&&(t=`RL`),t.includes(`^`)&&(t=`BT`),t.includes(`>`)&&(t=`LR`),t.includes(`v`)&&(t=`TB`),t===`TD`&&(t=`TB`),this.direction=t}setClass(e,t){for(let n of e.split(`,`))this.nodes.get(n)?.classes.push(t),this.edgeById.get(n)?.classes.push(t),this.subgraphLookup.get(n)?.classes.push(t)}setTooltip(e,t){if(t!==void 0)for(let n of e.split(`,`))this.tooltips.set(n,t)}setLink(e,t,n){let r=t.trim();for(let t of e.split(`,`)){let e=this.nodes.get(t);e!==void 0&&(e.link=r?D(r):void 0,e.linkTarget=n)}this.setClass(e,`clickable`)}setClickEvent(e,t,n){this.setClass(e,`clickable`)}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
6
|
+
`)}addSubGraph(e,t,n){let r=e?.text.trim(),i=n?.text??``;e!==void 0&&e===n&&/\s/.test(i)&&(r=void 0);let a=new Set,o=[],s;for(let e of t)if(typeof e==`string`)e.trim()!==``&&!a.has(e)&&(a.add(e),o.push(e));else if(Array.isArray(e))for(let t of e)t.trim()!==``&&!a.has(t)&&(a.add(t),o.push(t));else s=e.value;s??=this.options.inheritDir?this.direction??this.options.direction:void 0,r??=`subGraph`+this.subCount,i||=``,this.subCount++;let c={id:r,nodes:o,title:i.trim(),classes:[],dir:s,labelType:L(n?.type)},l=this.members;c.nodes=o.filter(e=>!l.has(e)&&e!==r);for(let e of c.nodes)l.add(e);let u=this.subgraphLookup.get(r);if(u)for(let e of c.nodes)u.nodes.push(e);else this.subgraphs.push(c);return this.subgraphLookup.set(r,u??c),r}exists(e,t){for(let n of e)if(n.nodes.includes(t))return!0;return!1}makeUniq(e,t){let n=new Set;for(let e of t)for(let t of e.nodes)n.add(t);return{nodes:e.nodes.filter(e=>!n.has(e))}}destructLink(e,t){let n=B(e);if(!t)return n;let r=z(t);if(r.stroke!==n.stroke)return{type:`INVALID`,stroke:`INVALID`};if(r.type===`arrow_open`)r.type=n.type;else{if(r.type!==n.type)return{type:`INVALID`,stroke:`INVALID`};r.type=`double_`+r.type}return r.type===`double_arrow`&&(r.type=`double_arrow_point`),r.length=n.length,r}subgraph(e){return this.subgraphLookup.get(e)}},H=`$end.INVALID.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.SHAPE_DATA.CALLBACKNAME.CALLBACKARGS.MD_STR.STR.STYLE.DEFAULT.LINKSTYLE.INTERPOLATE.CLASSDEF.CLASS.HREF.CLICK.GRAPH.subgraph.end.LINK_TARGET.NODIR.DIR.direction_tb.direction_bt.direction_rl.direction_lr.direction_td.LINK_ID.NUM.BRKT.STYLE_SEPARATOR.COLON.AMP.SEMI.COMMA.MULT.LINK.START_LINK.EDGE_TEXT.-).TEXT.(-.STADIUMEND.STADIUMSTART.SUBROUTINEEND.SUBROUTINESTART.VERTEX_WITH_PROPS_START.TAGEND.CYLINDEREND.CYLINDERSTART.DOUBLECIRCLEEND.DOUBLECIRCLESTART.TRAPEND.INVTRAPEND.TRAPSTART.INVTRAPSTART.TAGSTART.UP.SEP.DOWN.NODE_STRING.MINUS.UNICODE_TEXT.PIPE.PE.PS.SQE.SQS.DIAMOND_STOP.DIAMOND_START.NEWLINE.SPACE.EOF`.split(`.`),U=new Uint8Array(128);for(let e of`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!"#$%&'*+.\`?\\_/`)U[e.charCodeAt(0)]=1;var he=/accTitle\s*:\s*/y,W=/accDescr\s*:\s*/y,ge=/accDescr\s*\{\s*/y,G=/call\s+/y,_e=/click\s+/y,ve=/(?:\r?\n)*\s*\n/y,K=/\s*(?:LR|RL|TB|BT|TD|BR)\b/y,ye=/\s*[<>^]/y,be=/\s*v\b/y,xe=[/.*direction\s+TB[^\n]*/y,/.*direction\s+BT[^\n]*/y,/.*direction\s+RL[^\n]*/y,/.*direction\s+LR[^\n]*/y,/.*direction\s+TD[^\n]*/y],Se=/[\n\r\u2028\u2029]/g,q=/\s*[xo<]?--+[-xo>]\s*/y,Ce=/\s*[xo<]?--\s*/y,J=/\s*[xo<]?==+[=xo>]\s*/y,we=/\s*[xo<]?==\s*/y,Y=/\s*[xo<]?-?\.+-[xo>]?\s*/y,X=/\s*[xo<]?-\.\s*/y,Z=/\s*~~~+\s*/y,Te=/(?:\r?\n)+/y,Q=/[^\S\n\r]+/y,Ee=/\(\s*\)/y,De=/\n\s*/g;function Oe(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=!0,l=e.indexOf(`direction`),u=e.indexOf(`@`),d=-1,f=0,p=0,m=-1,h=-1,g=-1,_=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},v=e=>{a.push(o),o=e},y=()=>{a.length>0&&(o=a.pop())},b=(t,n)=>(t.lastIndex=n,t.test(e)?t.lastIndex:-1),x=t=>e.startsWith(t,s)&&!N(e.charCodeAt(s+t.length)),S=n=>{let r=n;if(n>=h&&n<=g)r=g;else if(P(e.charCodeAt(n))){for(;r<t&&P(e.charCodeAt(r));)r++;h=n,g=r}let i=e.charCodeAt(r);return i===120||i===111||i===60?e.charCodeAt(r+1):i},C=n=>{let r=n;if(n>=h&&n<=g)r=g;else if(P(e.charCodeAt(n))){for(;r<t&&P(e.charCodeAt(r));)r++;h=n,g=r}return e.charCodeAt(r)===126},w=()=>{e.charCodeAt(s+1)===96?(v(2),s+=2):(v(1),s++)},T=()=>{if(!C(s))return!1;let e=b(Z,s);return e<0?!1:(_(40,s,e),!0)},E=t=>{let n=e.charCodeAt(s+1);return t===40?(n===45?(v(8),_(45,s,s+2)):n===91?(v(7),_(47,s,s+2)):n===40&&e.charCodeAt(s+2)===40?(v(7),_(55,s,s+3)):(v(7),_(69,s,s+1)),!0):t===91?(n===91?(v(7),_(49,s,s+2)):n===40?(v(7),_(53,s,s+2)):n===47?(v(9),_(58,s,s+2)):n===92?(v(9),_(59,s,s+2)):(v(7),_(71,s,s+1)),!0):t===124?(v(7),_(67,s,s+1),!0):t===123&&(v(7),_(73,s,s+1),!0)},D=e=>{c&&(c=!1,v(6)),_(20,s,s+e)},O=()=>{let n=s;for(;n<t;){let r=e.charCodeAt(n);if(r<128&&U[r]===1)n++;else if(r===45&&n+1<t){let t=e.charCodeAt(n+1);if(t===62||t===45||t===46)break;n++}else break}return n!==s&&(_(64,s,n),!0)},k=e=>{let t=S(s),n;if(t===45){if((n=b(q,s))>=0)return _(40,s,n),!0;if((n=b(Ce,s))>=0)return v(10),_(41,s,n),!0;if((n=b(Y,s))>=0)return _(40,s,n),!0;if((n=b(X,s))>=0)return v(12),_(41,s,n),!0}else if(t===61){if((n=b(J,s))>=0)return _(40,s,n),!0;if((n=b(we,s))>=0)return v(11),_(41,s,n),!0}else if(t===46&&(n=b(Y,s))>=0)return _(40,s,n),!0;return e!==45&&e!==61&&e!==46&&T()},ee=a=>{let o;switch(a){case 97:if(e.startsWith(`acc`,s)){if((o=b(he,s))>=0)return v(3),_(2,s,o),!0;if((o=b(W,s))>=0)return v(4),_(4,s,o),!0;if((o=b(ge,s))>=0)return v(5),s=o,!0}break;case 64:if(e.charCodeAt(s+1)===123)return v(16),n.push(7),r.push(``),i.push(s),s+=2,!0;break;case 99:if((o=b(G,s))>=0)return v(14),s=o,!0;if(x(`classDef`))return _(16,s,s+8),!0;if(x(`class`))return _(17,s,s+5),!0;if((o=b(_e,s))>=0)return v(13),s=o,!0;break;case 34:return w(),!0;case 115:if(x(`style`))return _(12,s,s+5),!0;if(x(`swimlane-beta`))return D(13),!0;if(x(`subgraph`))return _(21,s,s+8),!0;break;case 100:if(x(`default`))return _(13,s,s+7),!0;break;case 108:if(x(`linkStyle`))return _(14,s,s+9),!0;break;case 105:if(x(`interpolate`))return _(15,s,s+11),!0;break;case 104:if(e.startsWith(`href`,s)&&P(e.charCodeAt(s+4)))return _(18,s,s+5),!0;break;case 102:if(x(`flowchart-elk`))return D(13),!0;if(x(`flowchart`))return D(9),!0;break;case 103:if(x(`graph`))return D(5),!0;break;case 101:if(x(`end`)){for(o=s+3;o<t&&P(e.charCodeAt(o));)o++;return _(22,s,o),!0}break;case 95:if(x(`_self`))return _(23,s,s+5),!0;if(x(`_blank`))return _(23,s,s+6),!0;if(x(`_parent`))return _(23,s,s+7),!0;if(x(`_top`))return _(23,s,s+4),!0}if(l!==-1&&s>=f&&(l<s&&(l=e.indexOf(`direction`,s)),l!==-1&&(d<s&&(Se.lastIndex=s,d=Se.test(e)?Se.lastIndex-1:t),l<d))){for(let e=0;e<5;e++)if((o=b(xe[e],s))>=0)return _(26+e,s,o),!0;f=d}if(u!==-1&&a!==34&&!P(a)){if(s>=p){u<s&&(u=e.indexOf(`@`,s));let n=s;for(;n<t;){let t=e.charCodeAt(n);if(t===34||P(t))break;n++}if(p=n,m=-1,u!==-1&&u<n)for(let r=Math.min(n,t-1)-1;r>=u;r--){if(e.charCodeAt(r)!==64)continue;let t=e.charCodeAt(r+1);if(t!==123&&t!==34){m=r;break}}}if(m>s)return _(31,s,m+1),!0}if(a>=48&&a<=57){let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t<48||t>57)break;n++}return _(32,s,n),!0}switch(a){case 35:return _(33,s,s+1),!0;case 58:return e.charCodeAt(s+1)===58&&e.charCodeAt(s+2)===58?_(34,s,s+3):_(35,s,s+1),!0;case 38:return _(36,s,s+1),!0;case 59:return _(37,s,s+1),!0;case 44:return _(38,s,s+1),!0;case 42:return _(39,s,s+1),!0;case 120:case 111:return k(a)||O();case 60:return k(a)||_(60,s,s+1),!0;case 45:return k(a)||O()||_(65,s,s+1),!0;case 61:return k(a);case 46:return k(a)||O();case 126:return T();case 40:return E(a);case 91:return e.charCodeAt(s+1)===124?(_(50,s,s+2),!0):E(a);case 124:case 123:return E(a);case 62:return v(7),_(51,s,s+1),!0;case 94:return _(61,s,s+1),!0;case 92:return e.charCodeAt(s+1)===124?(_(62,s,s+2),!0):O();case 118:return N(e.charCodeAt(s+1))?O():(_(63,s,s+1),!0)}return P(a)?k(a)?!0:(o=b(Te,s))>=0?(_(74,s,o),!0):(o=b(Q,s))>=0&&(_(75,s,o),!0):a<128?O():A(a)?(_(66,s,s+1),!0):!1},te=(n,r,i,a)=>{if(n===34)return w(),!0;let o=S(s);if(o===i||o===a){let e=b(r,s);if(e>=0)return y(),_(40,s,e),!0}if(n===i&&(i!==45||e.charCodeAt(s+1)===45))return!1;let c=s+1;for(;c<t;){let t=e.charCodeAt(c);if(t===34)break;if(t===i){if(i!==45||e.charCodeAt(c+1)===45)break}else if(t===120||t===111||t===60||t===a||P(t)){let e=S(c);if((e===i||e===a)&&b(r,c)>=0)break}c++}return _(42,s,c),!0};e:for(;;){if(s>=t){let e=-1;switch(o){case 0:e=76;break;case 3:e=3;break;case 4:e=5;break;case 5:e=6;break;case 13:e=19;break;case 14:e=8;break;case 15:e=9}e!==-1&&_(e,t,t);break}let a=e.charCodeAt(s),c=!0;switch(o){case 0:c=ee(a);break;case 1:if(a===34)e.charCodeAt(s+1)===96?(v(2),s+=2):(y(),s++);else{let n=e.indexOf(`"`,s);_(11,s,n===-1?t:n)}break;case 2:if(a===96)e.charCodeAt(s+1)===34?(y(),s+=2):c=!1;else if(a===34)w();else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===96||t===34)break;n++}_(10,s,n)}break;case 3:case 4:{let n=e.indexOf(`
|
|
7
|
+
`,s);n===-1&&(n=t);let r=o===3?3:5;y(),_(r,s,n);break}case 5:if(a===125)y(),s++;else{let n=e.indexOf(`}`,s);n===-1&&(n=t),_(6,s,n)}break;case 6:{let e;a===34?w():(e=b(ve,s))>=0?(y(),_(24,s,e)):(e=b(K,s))>=0||(e=b(ye,s))>=0||(e=b(be,s))>=0?(y(),_(25,s,e)):c=T()||E(a);break}case 7:{let n=e.charCodeAt(s+1);switch(a){case 34:w();break;case 40:case 91:case 123:E(a);break;case 93:y(),n===41?_(46,s,s+2):n===93?_(48,s,s+2):_(70,s,s+1);break;case 41:y(),n===93?_(52,s,s+2):n===41&&e.charCodeAt(s+2)===41?_(54,s,s+3):_(68,s,s+1);break;case 124:y(),_(67,s,s+1);break;case 125:y(),_(72,s,s+1);break;default:{if((a===126||P(a))&&T())break;let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===91||t===93||t===40||t===41||t===123||t===125||t===124||t===34)break;n++}_(44,s,n)}}break}case 8:{let n=e.charCodeAt(s+1);if(a===34)w();else{if((a===126||P(a))&&T())break;if((a===45||a===47||a===41)&&n===41)y(),_(43,s,s+2);else if(a===40||a===91||a===123)E(a);else if(a===41||a===93||a===125)c=!1;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===34||t===40||t===41||t===91||t===93||t===123||t===125||(t===45||t===47)&&e.charCodeAt(n+1)===41||(t===126||P(t))&&C(n)&&b(Z,n)>=0)break;n++}_(44,s,n)}}break}case 9:{let n=e.charCodeAt(s+1);if(a===34){w();break}if((a===126||P(a))&&T())break;switch(a){case 40:n===45||n===91||n===40&&e.charCodeAt(s+2)===40?E(a):n===93?(y(),_(56,s,s+2)):E(a);break;case 91:case 123:E(a);break;case 92:n===93?(y(),_(56,s,s+2)):_(44,s,s+1);break;case 47:n===93?(y(),_(57,s,s+2)):_(44,s,s+1);break;case 93:case 41:n===93?(y(),_(56,s,s+2)):c=!1;break;case 125:c=!1;break;default:{if((a===63||a===61)&&n===93){y(),_(56,s,s+2);break}let r=s+1;for(;r<t;){let t=e.charCodeAt(r);if(t===92||t===91||t===93||t===40||t===41||t===123||t===125||t===47)break;r++}_(44,s,r)}}break}case 10:c=te(a,q,45,-1);break;case 11:c=te(a,J,61,-1);break;case 12:c=te(a,Y,46,45);break;case 13:if(a===34)w();else if(P(a))y(),s++;else{let n=s+1;for(;n<t&&!P(e.charCodeAt(n));)n++;_(19,s,n)}break;case 14:if(a===40){let e=b(Ee,s);y(),e>=0?s=e:(v(15),s++)}else{let n=e.indexOf(`(`,s);n===-1&&(n=t),_(8,s,n)}break;case 15:if(a===41)y(),s++;else{let n=e.indexOf(`)`,s);n===-1&&(n=t),_(9,s,n)}break;case 16:if(a===34)v(17),_(7,s,s+1);else if(a===125)y(),s++;else if(a===94)c=!1;else{let n=s+1;for(;n<t;){let t=e.charCodeAt(n);if(t===125||t===94||t===34)break;n++}_(7,s,n)}break;case 17:if(a===34)y(),_(7,s,s+1);else{let a=e.indexOf(`"`,s);a===-1&&(a=t),n.push(7),r.push(e.slice(s,a).replace(De,`<br/>`)),i.push(s),s=a}}if(!c)return n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i};continue e}return n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i}}var ke=new Uint8Array(77);for(let e of[32,64,63,65,13,38,35,36,33,39,66])ke[e]=1;var Ae=new Uint8Array(77);for(let e of[32,66,64,25,63,65,38,35,36,33,39])Ae[e]=1;var je=new Uint8Array(77);for(let e of[32,64,75,65,36,66,35,39,33,12,14,16,17,19,20,25,21,22,63,61,41])je[e]=1;var Me=new Uint8Array(77);for(let e of[32,64,35,75,33,12])Me[e]=1;var Ne=`'UNICODE_TEXT', 'TEXT', 'TAGSTART'`,$=[],Pe=/}\s*\n/g;function Fe(e,t){let n=e.includes(`}`)?e.replace(Pe,`}
|
|
8
|
+
`):e,{types:r,texts:i,starts:a}=Oe(n),o=0,s,c=t=>{let i=r[o],s=n===e?a[o]:F([M(e,Pe,2)],a[o]);throw i===1?fe(`flowchart`,e,s,``,!0):fe(`flowchart`,e,s,`Expecting ${t}, got '${H[i]}'`)},l=(e,t=``)=>(r[o]!==e&&c(`'${H[e]}'${t?`, `+t:``}`),i[o++]),u=()=>{let e=r[o];e!==74&&e!==37&&e!==76&&c(`'SEMI', 'NEWLINE', 'EOF'`),o++},d=()=>{ke[r[o]]===0&&c(`'NODE_STRING'`);let e=i[o++];for(;ke[r[o]]===1;)e+=i[o++];return e},f=()=>{Ae[r[o]]===0&&c(`'NODE_STRING'`);let e=i[o++];for(;Ae[r[o]]===1;)e+=i[o++];return e},p=()=>{let e=r[o],t;if(e===11)t=`string`;else if(e===10)t=`markdown`;else if(e===44||e===60||e===51||e===66)t=`text`;else return c(`${Ne}, 'TAGEND', 'STR', 'MD_STR'`);let n=i[o++];for(;;){let e=r[o];if(e!==44&&e!==60&&e!==51&&e!==66)break;n+=i[o++]}return{text:n,type:t}},m=e=>{l(e,Ne)},h=()=>{let e=r[o],t;if(e===11)t=`string`;else if(e===10)t=`markdown`;else if(e===42||e===66)t=`text`;else return c(`'EDGE_TEXT', 'STR', 'MD_STR'`);let n=i[o++];for(;r[o]===42||r[o]===66;)n+=i[o++];return{text:n,type:t}},g=()=>{let e=r[o],t;if(e===11)t=`text`;else if(e===10)t=`markdown`;else if(je[e]===1)t=`text`;else return c(`'NODE_STRING', 'STR', 'MD_STR'`);let n=i[o++];for(;je[r[o]]===1;)n+=i[o++];return{text:n,type:t}},_=()=>{let e=i[o++];for(;r[o]===7;)e+=i[o++];return e},v=()=>{let e=d(),n;switch(r[o]){case 71:o++,n=p(),m(70),t.addVertex(e,n,`square`);break;case 55:o++,n=p(),m(54),t.addVertex(e,n,`doublecircle`);break;case 69:o++,r[o]===69?(o++,n=p(),m(68),l(68),t.addVertex(e,n,`circle`)):(n=p(),m(68),t.addVertex(e,n,`round`));break;case 45:o++,n=p(),m(43),t.addVertex(e,n,`ellipse`);break;case 47:o++,n=p(),m(46),t.addVertex(e,n,`stadium`);break;case 49:o++,n=p(),m(48),t.addVertex(e,n,`subroutine`);break;case 50:{o++;let r=l(64);l(35);let i=l(64);l(67),n=p(),m(70),t.addVertex(e,n,`rect`,void 0,void 0,void 0,{[r]:i});break}case 53:o++,n=p(),m(52),t.addVertex(e,n,`cylinder`);break;case 73:o++,r[o]===73?(o++,n=p(),m(72),l(72),t.addVertex(e,n,`hexagon`)):(n=p(),m(72),t.addVertex(e,n,`diamond`));break;case 51:o++,n=p(),m(70),t.addVertex(e,n,`odd`);break;case 58:o++,n=p(),r[o]===57?(o++,t.addVertex(e,n,`lean_right`)):(m(56),t.addVertex(e,n,`trapezoid`));break;case 59:o++,n=p(),r[o]===56?(o++,t.addVertex(e,n,`lean_left`)):(m(57),t.addVertex(e,n,`inv_trapezoid`));break;default:t.addVertex(e)}return e},y=()=>{let e=v();return r[o]===34&&(o++,t.setClass(e,d())),e},b=()=>{let e=[y()];for(s=void 0;;){let n=r[o]===7?_():void 0;if(r[o]!==75)return s=n,e;do o++;while(r[o]===75);if(r[o]!==36)return n!==void 0&&c(`'AMP'`),e;o++,r[o]!==75&&c(`'SPACE'`);do o++;while(r[o]===75);let i=y();n!==void 0&&t.addVertex(e[e.length-1],void 0,void 0,void 0,void 0,void 0,void 0,n),e.push(i)}},x=()=>{let e;if(r[o]===31&&(e=i[o++]),r[o]===40){let n=t.destructLink(i[o++]);return e!==void 0&&(n.id=e),r[o]===67&&(o++,n.text=p(),m(67),r[o]===75&&o++),n}if(r[o]===41){let n=i[o++],r=h(),a=l(40,`'EDGE_TEXT'`),s=t.destructLink(a,n);return s.text=r,e!==void 0&&(s.id=e),s}return c(`'LINK', 'START_LINK'`)},S=e=>{let n=b();s!==void 0&&t.addVertex(n[n.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s);let i=n;for(;;){let a=r[o];if(a!==40&&a!==41&&a!==31)return i;let c=x(),l=b();s!==void 0&&t.addVertex(l[l.length-1],void 0,void 0,void 0,void 0,void 0,void 0,s),t.addLink(n,l,c),e&&(i=l.concat(i)),n=l}},C=()=>{Me[r[o]]===0&&c(`'NODE_STRING', 'NUM', 'COLON', 'BRKT'`);let e=i[o++];for(;Me[r[o]]===1;)e+=i[o++];return e},w=()=>{let e=[C()];for(;r[o]===38;)o++,e.push(C());return e},T=()=>{o++,l(75);let e;if(r[o]===13)e=[i[o++]];else for(e=[l(32,`'DEFAULT'`)];r[o]===38;)o++,e.push(l(32));if(l(75),r[o]!==15){t.updateLink(e,w());return}o++,l(75);let n=f();if(r[o]===75){o++;let r=w();t.updateLinkInterpolate(e,n),t.updateLink(e,r)}else t.updateLinkInterpolate(e,n)},E=(e,n)=>{if(r[o]!==75){t.setLink(e,n);return}if(o++,r[o]===23){t.setLink(e,n,i[o++]);return}let a=l(11,`'LINK_TARGET'`);r[o]===75?(o++,t.setLink(e,n,l(23))):t.setLink(e,n),t.setTooltip(e,a)},D=()=>{let e=i[o++];switch(r[o]){case 8:{let n=i[o++],a=r[o]===9,s=a?i[o++]:void 0,c;r[o]===75&&(o++,c=l(11)),a?t.setClickEvent(e,n,s):t.setClickEvent(e,n),c!==void 0&&t.setTooltip(e,c);return}case 18:o++,E(e,l(11));return;case 11:E(e,i[o++]);return;default:{let n=f();if(r[o]===75){o++;let r=l(11);t.setClickEvent(e,n),t.setTooltip(e,r)}else t.setClickEvent(e,n)}}},O=()=>{o++;let e=r[o];if(e===74||e===37||e===76)return o++,{id:void 0,title:void 0,list:[],collect:!1};l(75,`'SEMI', 'NEWLINE', 'EOF'`);let t=g(),n=t;return r[o]===71&&(o++,n=p(),m(70)),e=r[o],e!==74&&e!==37&&e!==76&&c(`'SEMI', 'NEWLINE', 'EOF', 'SQS'`),o++,{id:t,title:n,list:[],collect:!1}},k=e=>{let n=r[o];switch(n){case 12:{o++,l(75);let e=d();return l(75),t.addVertex(e,void 0,void 0,w()),u(),$}case 14:return T(),u(),$;case 16:{o++,l(75);let e=d();return l(75),t.addClass(e,w()),u(),$}case 17:{o++,l(75);let e=d();return l(75),t.setClass(e,d()),u(),$}case 19:return D(),u(),$;case 26:case 27:case 28:case 29:case 30:return o++,{stmt:`dir`,value:Ie[n-26]};case 2:{o++;let e=l(3).trim();return t.setAccTitle(e),e}case 4:{o++;let e=l(5).trim();return t.setAccDescription(e),e}case 6:{let e=i[o++].trim();return t.setAccDescription(e),e}default:{ke[n]===0&&c(Le);let t=S(e);return u(),t}}},ee=()=>{let e=[],n=[],a=!1;for(;;){let s=r[o];if(s===0)break;if(s===22){let r=e.pop();if(r===void 0)break;o++;let i=t.addSubGraph(r.id,n,r.title);n=r.list,a=r.collect,a&&n.push(i)}else if(s===37||s===74||s===75||s===76)a&&n.push(i[o]),o++;else if(s===21){let t=O();t.list=n,t.collect=a,e.push(t),n=[],a=!0}else{let e=k(a);a&&(!Array.isArray(e)||e.length>0)&&n.push(e)}}e.length>0&&c(`'end'`)};for(;r[o]===75||r[o]===74;)o++;if(l(20,`'SPACE', 'NEWLINE'`),r[o]===24)o++,t.setDirection(`TB`);else{let e=l(25,`'NODIR'`),n=r[o];if(n===75){do o++;while(r[o]===75);n=r[o],n!==74&&c(`'NEWLINE', 'SPACE'`)}else n!==37&&n!==74&&c(`'SEMI', 'NEWLINE', 'SPACE'`);o++,t.setDirection(e)}ee(),r[o]!==0&&c(Le)}var Ie=[`TB`,`BT`,`RL`,`LR`,`TD`],Le=`'SEMI', 'NEWLINE', 'SPACE', 'EOF', 'subgraph', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'STYLE', 'LINKSTYLE', 'CLASSDEF', 'CLASS', 'CLICK', 'NODE_STRING'`;function Re(e){if(e.img)return`imageSquare`;if(e.icon)return e.form===`circle`?`iconCircle`:e.form===`square`?`iconSquare`:e.form===`rounded`?`iconRounded`:`icon`;switch(e.type){case`square`:case void 0:return`squareRect`;case`round`:return`roundedRect`;default:return e.type}}function ze(e){switch(e){case`arrow_point`:case`arrow_circle`:case`arrow_cross`:return[`none`,e];case`double_arrow_point`:case`double_arrow_circle`:case`double_arrow_cross`:{let t=e.replace(`double_`,``);return[t,t]}}return[`none`,`arrow_point`]}function Be(e,t){let n=[],r=[],i=e.subgraphs,a=t=>{let n=[];for(let r of t){let t=e.classes.get(r);if(t!==void 0){for(let e of t.styles)n.push(e.trim());for(let e of t.textStyles)n.push(e.trim())}}return n},o=new Map;for(let t of i)for(let n of t.nodes)e.subgraph(n)&&o.set(n,t.id);let s=new Map,c=new Map;for(let e of i){let t=o.get(e.id);if(t===void 0)continue;let n=c.get(t);n?n.push(e.id):c.set(t,[e.id])}let l=0;for(let e of i){if(o.has(e.id))continue;let t=[e.id];for(;t.length>0;){let e=t.pop();if(s.has(e))continue;s.set(e,l++);let n=c.get(e);if(n)for(let e=n.length-1;e>=0;e--)t.push(n[e])}}let u=t=>e.subgraph(t)?.metadata?.view===`collapsed`,d=!1;for(let e of i)e.metadata?.view===`collapsed`&&(d=!0);let f=new Map,p=e=>{let t=[],n=new Set,r=e;for(;r!==void 0&&!f.has(r)&&!n.has(r);)n.add(r),t.push(r),r=o.get(r);let i=r===void 0?void 0:f.get(r);for(let e=t.length-1;e>=0;e--)i===void 0&&u(t[e])&&(i=t[e]),f.set(t[e],i);return i},m=new Set,h=new Map;for(let e of d?i:[]){let t=p(e.id);if(t!==void 0){e.id!==t&&(m.add(e.id),h.set(e.id,t));for(let n of e.nodes)n!==t&&(m.add(n),h.set(n,t))}}let g=new Map,_=new Set;for(let e=i.length-1;e>=0;e--){let t=i[e];if(!m.has(t.id)){t.nodes.length>0&&_.add(t.id);for(let e of t.nodes)g.set(e,t.id)}}let v=new Map;for(let e=i.length-1;e>=0;e--){let t=i[e];if(m.has(t.id))continue;let r=t.metadata?.view===`collapsed`,o={id:t.id,label:t.title,labelType:t.labelType,parentId:g.get(t.id),cssStyles:[],cssCompiledStyles:a(t.classes),cssClasses:t.classes.join(` `),shape:r?`collapsedGroup`:`rect`,dir:t.dir,isGroup:!r,colorIndex:s.get(t.id)};r||(o.metadata=t.metadata),n.push(o),v.set(t.id,o)}for(let t of e.nodes.values()){if(m.has(t.id))continue;let r=v.get(t.id);if(r){r.cssStyles=t.styles,r.cssCompiledStyles=a(t.classes),r.cssClasses=t.classes.join(` `);continue}let i=_.has(t.id),o={id:t.id,label:t.text,labelType:t.labelType,parentId:g.get(t.id),cssStyles:t.styles,cssCompiledStyles:a([`default`,`node`,...t.classes]),cssClasses:`default `+t.classes.join(` `),dir:t.dir,link:t.link,linkTarget:t.linkTarget,tooltip:e.tooltips.get(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint,isGroup:i,shape:i?`rect`:Re(t)};n.push(o)}return e.edges.forEach((n,i)=>{let o=h.get(n.start)??n.start,s=h.get(n.end)??n.end;if(o===s&&(h.has(n.start)||h.has(n.end)))return;let[c,l]=ze(n.type),u=[...e.defaultEdgeStyle??[]];n.style&&u.push(...n.style);let d=n.stroke===`invisible`||n.type===`arrow_open`;r.push({id:n.id||`L_${o}_${s}_${i}`,isUserDefinedId:n.isUserDefinedId,start:o,end:s,type:n.type??`normal`,label:n.text,labelType:n.labelType,thickness:n.stroke,pattern:n.stroke,minlen:n.length,classes:n.stroke===`invisible`?``:`edge-thickness-normal edge-pattern-solid flowchart-link`,arrowTypeStart:d?`none`:c,arrowTypeEnd:d?`none`:l,cssCompiledStyles:a(n.classes),style:u,animate:n.animate,animation:n.animation,curve:n.interpolate||e.defaultInterpolate||t})}),{nodes:n,edges:r}}var Ve=40,He=16,Ue=48,We=20,Ge=26,Ke=` fill="var(--_s)" stroke="var(--_b)"`,qe=` stroke="var(--_b)"`;function Je(e,t,n){let r=e[t];return typeof r==`number`&&r>0?Math.min(r,2e3):n}function Ye(e,t){return e!==void 0&&e>0&&e<=4e3?e:t}function Xe(e,t,n,r){let i=i=>u(n,a=>Ze(e,t,n,r,i,a));return l(e.direction)?f(n,i):i(!1)}function Ze(l,u,f,A,ue,j){let M=j?12:We,N=A?u[A.type]:void 0,P=typeof N==`object`&&N&&!Array.isArray(N)?N:u.flowchart??{},F=Be(l,typeof P.curve==`string`?P.curve:void 0);A?.prepare(F);let I=f.fontSize??16,fe=Math.round(I*.875),L=f.measurer??pe(f.fontFamily,f.fontFamilyMono),me=Math.min(Je(P,`wrappingWidth`,200),A&&j?100:1/0),R=f.padding??8,z=f.icons,B=new Map,V=[],H=[];F.nodes.forEach((e,t)=>B.set(e.id,t));for(let e of F.nodes){let t=o(e.cssStyles.length>0?e.cssCompiledStyles.concat(e.cssStyles):e.cssCompiledStyles),n=+!!t.bold|(t.italic?2:0),r=e.labelType===`markdown`,i=t.fontSize??I,a,c;if(e.isGroup){let o=s(e.label,r,L,i,A&&j?Math.max(80,d(f)/2):4e3,n);a={node:e,style:t,label:o,shape:`group`,w:0,h:0,dy:0,loops:0},c=ce(0,0),c.isGroup=!0,c.dir=e.dir?se(e.dir):void 0,c.padX=M,c.padTop=o.height>0?o.height+16:We,c.padBottom=M,c.minW=o.width+2*M-12}else{let o=le(e.shape),l=e.img||e.icon||w(o)?e.label:void 0,u=s(l,r,L,i,me,n),d,f,p=0;if(e.img||e.icon){let t=e.img?80:48,n=Ye(e.assetWidth,t),r=Ye(e.assetHeight,t);d=Math.max(n,u.width+8),f=r+(u.height>0?u.height+6:0),p=e.pos===`t`?-r/2:r/2,u.height===0&&(p=0)}else{let e=x(o,u.width,u.height);d=e.w,f=e.h,p=e.dy}a={node:e,style:t,label:u,shape:o,w:d,h:f,dy:p,loops:0},c=ce(d,f)}c.seq=V.length,V.push(a),H.push(c)}F.nodes.forEach((e,t)=>{H[t].parent=e.parentId===void 0?-1:B.get(e.parentId)??-1});let U=ue?`TB`:se(l.direction),he=e=>{let t;for(let n=H[e].parent,r=0;n>=0&&t===void 0&&r<1e4;n=H[n].parent,r++)t=H[n].dir;return t??=U,t===`LR`||t===`RL`};V.forEach((e,t)=>{e.node.isGroup?H[t].span=1/0:!e.node.img&&!e.node.icon&&(H[t].span=C(e.shape,e.w,e.h,he(t)))});let W=[],ge=[],G=[];for(let e of F.edges){let t=B.get(e.start),n=B.get(e.end);if(t===void 0||n===void 0)continue;let r=s(e.label,e.labelType===`markdown`,L,fe,me);t===n&&(V[t].loops++,he(t)?H[t].h+=2*(Ge+(r.height>0?r.height+8:0)):H[t].w+=2*(Ge+(r.width>0?r.width+12:0))),G.push(e),ge.push(r),W.push({src:t,dst:n,minlen:e.minlen??1,labelW:r.width>0?r.width+12:0,labelH:r.height>0?r.height+4:0,route:[],labelX:0,labelY:0})}let _e={nodeSep:Je(P,`nodeSpacing`,Ve)*(j?.5:1),edgeSep:He,rankSep:Je(P,`rankSpacing`,Ue)*(j?.75:1),portSep:20,tracks:typeof P.curve==`string`&&/^step/.test(P.curve),straight:P.curve===`linear`,headRoom:p(`arrow_point`)},ve=A?A.layout(H,W,U,_e,j):ae(H,W,U,_e),K=y(l.title,L,I,j?d(f):4e3),ye=K.height>0?K.height+12:0,be=Math.max(ve.width,K.width),xe=R+(be-ve.width)/2,Se=R+ye;oe(H,W,xe,Se);let q=Math.ceil(be+2*R),Ce=Math.ceil(ve.height+ye+2*R),J=[],we=new Map,Y=!1;for(let e of H)e.isGroup&&(Y=!0);if(Y)for(let e of W)re(we,e.route);let X=``,Z=``,Te=``;for(let e=0;e<V.length;e++){let o=V[e],s=H[e],l=o.node,u=s.x,d=s.y,p=n(l.cssClasses.replace(/^default\s?/,``)),m=i(l.id);if(s.isGroup&&A?.drawGroup&&s.parent<0){X+=A.drawGroup(s,o.label,o.style,p,m,U,z);continue}if(s.isGroup){let t=ne(s,o.label.width,we,M),n=d-s.h/2+8+o.label.height/2,i=` class="pele-cluster-label" fill="var(--_m)"${o.style.text}`,l=te(s,o.label.width,t,we);l&&(Z+=ie(o.label,t,n,i,m,H,e,z)),X+=`<g class="pele-cluster${p}" data-id="${m}"><rect x="${c(u-s.w/2)}" y="${c(d-s.h/2)}" width="${c(s.w)}" height="${c(s.h)}" fill="var(--_a)" fill-opacity="0.5" stroke="var(--_b)"${r(o.style.shape)}/>`+(l?``:a(o.label,t,n,i,z))+`</g>`;continue}let h=o.w,g=o.h,_;if(l.img){let e=Ye(l.assetWidth,80),n=Ye(l.assetHeight,80),r=o.label.height>0?l.pos===`t`?g/2-n:-g/2:-n/2,i=O(D(l.img),f);_=i===void 0?``:`<image href="${t(i)}" x="${c(-e/2)}" y="${c(r)}" width="${c(e)}" height="${c(n)}" preserveAspectRatio="${l.constraint===`on`?`xMidYMid meet`:`none`}"/>`}else if(l.icon){let e=Ye(l.assetHeight,48),t=o.label.height>0?l.pos===`t`?g/2-e:-g/2:-e/2,n=l.shape===`icon`?``:l.shape===`iconCircle`?`<circle cy="${c(t+e/2)}" r="${c(e/2)}"${Ke}${o.style.shape}/>`:`<rect x="${c(-e/2)}" y="${c(t)}" width="${c(e)}" height="${c(e)}" rx="${l.shape===`iconRounded`?8:0}"${Ke}${o.style.shape}/>`,r=e*.6;_=n+`<svg class="pele-icon" data-icon="${i(l.icon)}" x="${c(-r/2)}" y="${c(t+(e-r)/2)}" width="${c(r)}" height="${c(r)}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${z?.(l.icon)??``}</svg>`}else _=b(o.shape,h,g,Ke+o.style.shape,qe+o.style.line);let v=a(o.label,0,o.dy,` class="pele-label"${o.style.text}`,z);if(/ internal-link(?: |$)/.test(p+` `)&&l.label&&f.links!==!1){let e=de(l.label),n=E(e,f),r=t(e);v=`<a class="internal-link"${n?` href="${r}"${k(f)}`:``} data-href="${r}">${v}</a>`,J.push({id:l.id,href:e,internal:!0})}let y=_+v;l.tooltip&&(y=`<title>${i(l.tooltip)}</title>`+y),l.link&&(y=ee(y,l.link,l.id,J,f,l.linkTarget?` target="${t(l.linkTarget)}"`:``)),Te+=`<g class="pele-node pele-shape-${o.shape}${p}" data-id="${m}" transform="translate(${c(u)},${c(d)})">${y}</g>`}let Q=m();for(let e=0;e<W.length;e++){let t=W[e];t.src===t.dst||G[e].thickness===`invisible`||t.route.length<6||(Q.add(t.src,S(t.route,0,H[t.src]),G[e].arrowTypeStart),Q.add(t.dst,S(t.route,t.route.length-3,H[t.dst]),G[e].arrowTypeEnd))}let Ee=``,De=``,Oe=new Map;for(let e=0;e<W.length;e++){let r=W[e],a=G[e],s=ge[e],c=a.style.length>0||a.cssCompiledStyles.length>0?o(a.cssCompiledStyles.concat(a.style)):void 0;if(a.thickness!==`invisible`){let e=a.arrowTypeStart,o=a.arrowTypeEnd,s;if(r.src===r.dst){let e=V[r.src],t=Oe.get(r.src)??0;Oe.set(r.src,t+1),s=v(H[r.src],e.w,e.h,t,he(r.src),Ge,p(o),r)}else{let t=r.route.slice(),n=Q.of(r.src,S(t,0,H[r.src])),i=Q.of(r.dst,S(t,t.length-3,H[r.dst]));T(t,0,V[r.src],H[r.src]),T(t,t.length-3,V[r.dst],H[r.dst]),s=g(t,a.curve,p(e),p(o),n,i)}let l=c?.stroke&&a.thickness!==`invisible`?t(c.stroke):`var(--_l)`,u=``;a.thickness===`thick`?u+=` stroke-width="2.5"`:a.thickness===`dotted`&&(u+=` stroke-dasharray="3 4"`);let d=n(a.classes.replace(/edge-thickness-normal|edge-pattern-solid|flowchart-link/g,``));Ee+=`<g class="pele-edge${d}" data-id="${i(a.id)}"${c?.line??``}><path d="${s.d}"${u}/>`+_(e,s.sx,s.sy,s.sdx,s.sdy,l)+_(o,s.ex,s.ey,s.edx,s.edy,l)+`</g>`}if(s.width>0){let e=r.labelX,t=r.labelY;De+=h(a.id,s,e,t,c?.text??``,z)}}return{svg:e(A?.type??`flowchart`,q,Ce,I,f,l,a(K,q/2,R+K.height/2,` class="pele-title" font-weight="var(--_tw)"`)+(X?`<g class="pele-clusters">${X}</g>`:``)+(Ee?`<g class="pele-edges" fill="none" stroke="var(--_l)" stroke-linecap="round">${Ee}</g>`:``)+(Z?`<g class="pele-cluster-titles">${Z}</g>`:``)+(De?`<g class="pele-edge-labels" font-size="${fe}">${De}</g>`:``)+`<g class="pele-nodes">${Te}</g>`),width:q,height:Ce,links:J}}var Qe={type:`flowchart`,math:!0,parse(e,t,n,r,i){let a=new V({inheritDir:(t.flowchart??{}).inheritDir===!0,maxEdges:i.maxEdges});return n&&(a.title=n),Fe(e,a),a},render:Xe};export{Xe as n,Qe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){var t=e.match(/^\s*\S/);return e.skipToEnd(),t?`error`:null}var t={name:`asciiarmor`,token:function(t,n){var r;if(n.state==`top`)return t.sol()&&(r=t.match(/^-----BEGIN (.*)?-----\s*$/))?(n.state=`headers`,n.type=r[1],`tag`):e(t);if(n.state==`headers`){if(t.sol()&&t.match(/^\w+:/))return n.state=`header`,`atom`;var i=e(t);return i&&(n.state=`body`),i}if(n.state==`header`)return t.skipToEnd(),n.state=`headers`,`string`;if(n.state==`body`)return t.sol()&&(r=t.match(/^-----END (.*)?-----\s*$/))?r[1]==n.type?(n.state=`end`,`tag`):`error`:t.eatWhile(/[A-Za-z0-9+\/=]/)?null:(t.next(),`error`);if(n.state==`end`)return e(t)},blankLine:function(e){e.state==`headers`&&(e.state=`body`)},startState:function(){return{state:`top`,type:null}}};export{t as asciiArmor};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{_ as e,a as t,c as n,i as r,m as i,o as a,r as o,t as s,u as c,x as l}from"./CX-xckzu.js";import{n as u}from"./DciMwFJ1.js";import{a as d,s as f}from"./DECNRCf2.js";import{c as p,d as m,f as h,g,h as _,l as v,m as y,n as b,o as x,p as S,r as C,s as w,t as T,u as E}from"./BunrC_8P.js";import{t as D}from"./CEufJyoj.js";import{PeleError as O,u as ee}from"./8wVGBFSs.js";var k=class{nodes=new Map;labels;links=[];trends=new Map;pipelines=new Map;annotations=[];notes=[];accelerators=[];deaccelerators=[];annotationsBox;axes={};size;addNode(e){let t=this.nodes.get(e.id)??{id:e.id,label:e.label};this.nodes.set(e.id,{...t,...e,className:e.className??t.className,labelOffsetX:e.labelOffsetX??t.labelOffsetX,labelOffsetY:e.labelOffsetY??t.labelOffsetY}),this.labels=void 0}addLink(e){this.links.push(e)}addTrend(e){this.trends.set(e.nodeId,e)}startPipeline(e){this.pipelines.set(e,{nodeId:e,componentIds:[]});let t=this.nodes.get(e);t&&(t.isPipelineParent=!0)}addPipelineComponent(e,t){this.pipelines.get(e)?.componentIds.push(t);let n=this.nodes.get(t);n&&(n.inPipeline=!0)}addAnnotation(e){this.annotations.push(e)}addNote(e){this.notes.push(e)}addAccelerator(e){this.accelerators.push(e)}addDeaccelerator(e){this.deaccelerators.push(e)}setAnnotationsBox(e,t){this.annotationsBox={x:e,y:t}}setAxes(e){this.axes={...this.axes,...e}}setSize(e,t){this.size={width:e,height:t}}getNode(e){return this.nodes.get(e)}resolveNodeId(e){if(this.nodes.has(e))return e;if(!this.labels){this.labels=new Map;for(let[e,t]of this.nodes)this.labels.has(t.label)||this.labels.set(t.label,e)}return this.labels.get(e)??e}build(){let e=[];for(let t of this.nodes.values()){if(typeof t.x!=`number`||typeof t.y!=`number`)throw new O(`Node "${t.label}" is missing coordinates`,`semantic`,{type:`wardley`});e.push(t)}return{nodes:e,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}};function A(e,t){let n=e<=1?e*100:e;if(n<0||n>100)throw new O(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`,`semantic`,{type:`wardley`});return n}function j(e,t,n){return{x:A(t,`${n} evolution`),y:A(e,`${n} visibility`)}}function M(e){return e===`+<>`?`bidirectional`:e===`+<`?`backward`:e===`+>`?`forward`:void 0}function te(e){if(!e?.startsWith(`+`))return{};let t=e.indexOf(`'`,2),n=e[1]===`'`&&t!==-1?e.slice(2,t):void 0;return e.includes(`<>`)?{flow:`bidirectional`,label:n}:e.includes(`<`)?{flow:`backward`,label:n}:e.includes(`>`)?{flow:`forward`,label:n}:{label:n}}function N(e){return e?[(e.negX?-1:1)*e.offsetX,(e.negY?-1:1)*e.offsetY]:[void 0,void 0]}function ne(e,t){e.size&&t.setSize(e.size.width,e.size.height),e.evolution&&t.setAxes({stages:e.evolution.stages.map(e=>e.secondName?`${e.name.trim()} / ${e.secondName.trim()}`:e.name.trim()),stageBoundaries:e.evolution.stages.filter(e=>e.boundary!==void 0).map(e=>e.boundary)});for(let n of e.anchors){let e=j(n.visibility,n.evolution,`Anchor "${n.name}"`);t.addNode({id:n.name,label:n.name,x:e.x,y:e.y,className:`anchor`})}for(let n of e.components){let e=j(n.visibility,n.evolution,`Component "${n.name}"`),[r,i]=N(n.label);t.addNode({id:n.name,label:n.name,x:e.x,y:e.y,className:`component`,labelOffsetX:r,labelOffsetY:i,inertia:n.inertia,sourceStrategy:n.decorator?.strategy})}for(let n of e.notes){let e=j(n.visibility,n.evolution,`Note "${n.text}"`);t.addNote({text:n.text,x:e.x,y:e.y})}for(let n of e.pipelines){let e=t.getNode(n.parent);if(!e||typeof e.y!=`number`)throw new O(`Pipeline "${n.parent}" must reference an existing component with coordinates.`,`semantic`,{type:`wardley`});let r=e.y;t.startPipeline(n.parent);for(let e of n.components){let i=`${n.parent}_${e.name}`,[a,o]=N(e.label),s=A(e.evolution,`Pipeline component "${e.name}" evolution`);t.addNode({id:i,label:e.name,x:s,y:r,className:`pipeline-component`,labelOffsetX:a,labelOffsetY:o,inertia:void 0,sourceStrategy:void 0}),t.addPipelineComponent(n.parent,i)}}for(let n of e.links){let e=!!n.arrow&&(n.arrow.includes(`-.->`)||n.arrow.includes(`.-.`)),r=te(n.arrow),i=M(n.fromPort)??M(n.toPort)??r.flow;t.addLink({source:t.resolveNodeId(n.from),target:t.resolveNodeId(n.to),dashed:e,label:r.label??n.linkLabel,flow:i})}for(let n of e.evolves){let e=t.getNode(n.component);e?.y!==void 0&&t.addTrend({nodeId:n.component,targetX:A(n.target,`Evolve target for "${n.component}"`),targetY:e.y})}if(e.annotations.length>0){let n=j(e.annotations[0].x,e.annotations[0].y,`Annotations box`);t.setAnnotationsBox(n.x,n.y)}for(let n of e.annotation){let e=j(n.x,n.y,`Annotation ${n.number}`);t.addAnnotation({number:n.number,coordinates:[{x:e.x,y:e.y}],text:n.text})}for(let n of e.accelerators){let e=j(n.x,n.y,`Accelerator "${n.name}"`);t.addAccelerator({name:n.name,x:e.x,y:e.y})}for(let n of e.deaccelerators){let e=j(n.x,n.y,`Deaccelerator "${n.name}"`);t.addDeaccelerator({name:n.name,x:e.x,y:e.y})}}function P(e,t){let n=new k;return ne(e,n),{type:`wardley`,title:e.title||t,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
|
|
2
|
+
`):void 0,...n.build()}}function F(e,t){let n=t;for(let t=e.charCodeAt(n);t>=48&&t<=57;t=e.charCodeAt(n))n++;return n}function I(){let e=0,t=0;return(n,r)=>{if((r<e||r>=t)&&(e=r,t=F(n,r)),t===r||n.charCodeAt(t)!==46)return-1;let i=F(n,t+1);return i>t+1?i:-1}}var L={name:`ARROW`,pattern:/->/y,first:`-`},R={name:`LINK_ARROW`,pattern:/-->|-\.->|>|\+'[^']*'<>|\+'[^']*'<|\+'[^']*'>/y,first:`->+`},z=(e,t)=>({name:e,pattern:new RegExp(t,`y`),first:t[0]}),re=[{name:`[`,pattern:`[`},{name:`,`,pattern:`,`},{name:`]`,pattern:`]`},{name:`@`,pattern:`@`},{name:`/`,pattern:`/`},{name:`(`,pattern:`(`},{name:`)`,pattern:`)`},{name:`-`,pattern:`-`,longer:[L,R,C]},{name:`{`,pattern:`{`},{name:`}`,pattern:`}`},{name:`WARDLEY_NUMBER`,pattern:/[0-9]+\.[0-9]+/y,first:`0123456789`,scanner:I},L,{name:`LINK_PORT`,pattern:/\+<>|\+>|\+</y,first:`+`},R,{name:`LINK_LABEL`,pattern:/;[^\n\r]+/y,first:`;`},{name:`STRATEGY`,pattern:/build|buy|outsource|market/y,first:`bom`},z(`KW_WARDLEY`,`wardley-beta`),z(`KW_SIZE`,`size`),z(`KW_EVOLUTION`,`evolution`),z(`KW_ANCHOR`,`anchor`),z(`KW_COMPONENT`,`component`),z(`KW_LABEL`,`label`),z(`KW_INERTIA`,`inertia`),z(`KW_EVOLVE`,`evolve`),z(`KW_PIPELINE`,`pipeline`),z(`KW_NOTE`,`note`),z(`KW_ANNOTATIONS`,`annotations`),z(`KW_ANNOTATION`,`annotation`),z(`KW_ACCELERATOR`,`accelerator`),z(`KW_DEACCELERATOR`,`deaccelerator`),{name:`NAME_WITH_SPACES`,pattern:/(?!title\s|accTitle|accDescr)[A-Za-z](?:[A-Za-z0-9_()&]|-(?!>))*(?:[ \t]+[A-Za-z(](?:[A-Za-z0-9_()&]|-(?!>))*)*/y,first:`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`},{name:`WS`,pattern:/[ \t]+/y,hidden:!0,first:` `},D(),T,S,{name:`INT`,pattern:/0|[1-9][0-9]*(?!\.)/y,first:`0123456789`},y,{name:`ID`,pattern:/[\w]([-\w]*\w)?/y,first:`_0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz`},v,E,C,x,w];function B(e){let t=new _(b(e,re,`wardley`),re,`wardley`),n={$type:`Wardley`,anchors:[],components:[],links:[],evolves:[],pipelines:[],notes:[],annotations:[],annotation:[],accelerators:[],deaccelerators:[]},r=e=>t.kinds[t.i]===e,i=()=>r(36)||r(37)||r(30),a=()=>r(36)?h(t.take()):r(37)||r(30)?t.take():t.fail(`a name`),o=()=>Number(t.expect(10)),s=()=>parseInt(t.expect(35)),c=()=>r(10)?Number(t.take()):parseInt(t.expect(35)),l=()=>{if(!r(-1))for(r(38)||t.fail(`a line break or the end of input`);r(38);)t.i++},u=e=>{t.expect(0);let n=e();t.expect(1);let r=e();return t.expect(2),[n,r]},d=()=>{t.expect(21),t.expect(0);let e=t.accept(7),n=s();t.expect(1);let r=t.accept(7),i=s();return t.expect(2),{$type:`Label`,negX:e,offsetX:n,negY:r,offsetY:i}},f=()=>{let e={$type:`EvolutionStage`,name:a()};return t.accept(3)&&(e.boundary=o()),t.accept(4)&&(e.secondName=a()),e};for(;r(38);)t.i++;for(t.expect(16);!r(-1);)switch(t.kind){case 38:t.i++;break;case 32:n.accDescr=p(t.take()),l();break;case 33:n.accTitle=g(t.take()),l();break;case 34:n.title=m(t.take()),l();break;case 17:{t.i++;let[e,r]=u(s);l(),n.size={$type:`Size`,width:e,height:r};break}case 18:{t.i++;let e=[f()];for(t.expect(11),e.push(f());t.accept(11);)e.push(f());l(),n.evolution={$type:`Evolution`,stages:e};break}case 19:{t.i++;let e=a(),[r,i]=u(o);l(),n.anchors.push({$type:`Anchor`,name:e,visibility:r,evolution:i});break}case 20:{t.i++;let e={$type:`Component`,name:a(),visibility:0,evolution:0,inertia:!1};[e.visibility,e.evolution]=u(o),r(21)&&(e.label=d()),r(5)&&t.kinds[t.i+1]===15&&(t.i++,e.decorator={$type:`Decorator`,strategy:t.take()},t.expect(6)),t.accept(22)?e.inertia=!0:t.accept(5)&&(t.expect(22),t.expect(6),e.inertia=!0),l(),n.components.push(e);break}case 23:{t.i++;let e=a(),r=o();l(),n.evolves.push({$type:`Evolve`,component:e,target:r});break}case 24:{t.i++;let e=a();for(t.expect(8),t.expect(38);r(38);)t.i++;let i=[];do{t.expect(20);let e={$type:`PipelineComponent`,name:a(),evolution:0};t.expect(0),e.evolution=o(),t.expect(2),r(21)&&(e.label=d()),l(),i.push(e)}while(r(20));t.expect(9),l(),n.pipelines.push({$type:`Pipeline`,parent:e,components:i});break}case 25:{t.i++;let e=h(t.expect(36)),[r,i]=u(o);l(),n.notes.push({$type:`Note`,text:e,visibility:r,evolution:i});break}case 26:{t.i++;let[e,r]=u(c);l(),n.annotations.push({$type:`Annotations`,x:e,y:r});break}case 27:{t.i++;let e=s();t.expect(1);let[r,i]=u(c),a=h(t.expect(36));l(),n.annotation.push({$type:`Annotation`,number:e,x:r,y:i,text:a});break}case 28:case 29:{let e=t.kind===29;t.i++;let r=a(),[i,s]=u(o);l(),e?n.deaccelerators.push({$type:`Deaccelerator`,name:r,x:i,y:s}):n.accelerators.push({$type:`Accelerator`,name:r,x:i,y:s});break}default:{i()||t.fail(`a statement`);let e={$type:`Link`,from:a(),to:``};r(12)&&(e.fromPort=t.take()),(r(13)||r(11))&&(e.arrow=t.take()),e.to=a(),r(12)&&(e.toPort=t.take()),r(14)&&(e.linkLabel=t.take().substring(1).trim()),l(),n.links.push(e)}}return n}var ie=[`Genesis`,`Custom Built`,`Product`,`Commodity`],V=48,H=6,U=10,ae=8,W=15,G=60,oe=30,se=20,K=`var(--_c)`,q=`var(--_l)`;function ce(e,t,n,r,i){let a=e[`wardley-beta`]?.[t];return typeof a==`number`&&a>=r&&a<=i?a:n}function J(e,t,n){return e<t?t:e>n?n:e}function le(e,r,a,o){let c=n(e),u=``,d=a;for(let n of e.lines){let a=!0;for(let e of n){if(e.icon!==void 0)continue;let n=i(e.style&~c);u+=`<tspan${a?` x="${l(r)}" y="${l(d)}"`:``}${n}>${t(e.text)}</tspan>`,a=!1}d+=e.lineHeight}return u===``?``:`<text${s(o,c)} xml:space="preserve">${u}</text>`}function ue(e,t,n,r){return J(typeof t==`number`&&Number.isFinite(t)?t:ce(e,n,r,1,1e6),200,1e4)-2*V}function Y(e,t,n){let r=ue(t,e.size?.width,`width`,900);return u(n,r,160,(i,a)=>X(e,t,n,i,r,a))}function X(t,n,i,s,u,p){let m=i.fontSize??16,h=Math.round(m*.8125),g=Math.round(m*.6875),_=i.measurer??ee(i.fontFamily,i.fontFamilyMono),v=i.padding??8,y=ue(n,t.size?.height,`height`,600)*Math.max(.75,s/u),b=n[`wardley-beta`]?.showGrid===!0,x=0,S=0,C=s,w=y,T=(e,t,n,r)=>{e<x&&(x=e),t<S&&(S=t),n>C&&(C=n),r>w&&(w=r)},E=(e,t,n,r)=>(T(t-e.width/2,n-e.height/2,t+e.width/2,n+e.height/2),a(e,t,n,r,i.icons)),D=(e,t,n,r)=>(T(t,n-e.size,t+e.width,n-e.size+e.height+4),le(e,t,n,r)),O=(e,t,n=p?Math.max(64,Math.min(120,s/2)):4e3,r=0)=>c(e,!1,_,t,n,r),k=e=>e/100*s,A=e=>y-e/100*y,j=t.axes.stages&&t.axes.stages.length>0?t.axes.stages:ie,M=t.axes.stageBoundaries,te=M!==void 0&&M.length===j.length,N=``,ne=``,P=y,F=0;if(j.forEach((e,t)=>{let n=te?F:t/j.length,r=te?J(M[t],0,1):(t+1)/j.length;F=r,t>0&&(N+=`<path class="pele-wardley-stage" d="M${l(n*s)},0V${l(y)}" stroke="var(--_b)" stroke-dasharray="4 4"/>`);let i=O(e,h,Math.max(48,Math.abs(r-n)*s-12));ne+=E(i,(n+r)/2*s,y+8+i.height/2,` class="pele-wardley-stage-label" font-size="${h}" fill="var(--_m)"`),P=Math.max(P,y+8+i.height)}),b)for(let e=1;e<4;e++)N+=`<path class="pele-wardley-grid" d="M${l(s*e/4)},0V${l(y)}M0,${l(y*e/4)}H${l(s)}" stroke="var(--_b)" stroke-dasharray="2 6"/>`;N+=`<path class="pele-wardley-axis" d="M0,0V${l(y)}H${l(s)}" stroke="${q}"/>`;let I=O(t.axes.xLabel??`Evolution`,h),L=O(t.axes.yLabel??`Visibility`,h),R=` class="pele-wardley-axis-label" font-size="${h}" font-weight="var(--_hw)"`,z=E(I,s/2,P+6+I.height/2,R)+a(L,-16,y/2,`${R} transform="rotate(-90 -16 ${l(y/2)})"`);T(-16-L.height/2,0,0,0);let re=P+6+I.height+10,B=new Map;for(let e of t.nodes)B.set(e.id,{x:k(e.x),y:A(e.y),node:e});let V=``,ce=new Map;for(let e of t.pipelines){ce.set(e.nodeId,new Set(e.componentIds));let t=[];for(let n of e.componentIds){let e=B.get(n);e&&t.push(e)}if(t.length===0)continue;t.sort((e,t)=>e.x-t.x);let n=t[0].x,i=t[t.length-1].x,a=t[0].y,s=a-2*H,c=B.get(e.nodeId);c&&(c.x=(n+i)/2,c.y=s-U/6),T(n-W,s,i+W,s+4*H),V+=`<g class="pele-wardley-pipeline" data-id="${r(e.nodeId)}"><rect x="${l(n-W)}" y="${l(s)}" width="${l(i-n+2*W)}" height="${l(4*H)}" fill="var(--_s)" stroke="var(--_b)"${o}/>`+(t.length>1?`<path d="M${l(n)},${l(a)}H${l(i)}" stroke="${q}" stroke-dasharray="4 4"/>`:``)+`</g>`}let Y=new Map,X=(e,t,n)=>{let r=e.node;if(r.className===`anchor`){let e=Y.get(r);return e||Y.set(r,e=O(r.label,h,p?Math.max(64,s/2):4e3,1)),1/Math.hypot(t/(e.width/2+5),n/(h*.8))}return r.isPipelineParent?U/Math.SQRT2:r.sourceStrategy?2*H:H},Z=new Map,de=(e,t,n)=>{Math.abs(t)<.25||Math.abs(n)<.25||Z.set(e,(Z.get(e)??0)|(t>0?n<0?1:2:n<0?4:8))},fe=``;for(let e of t.links){let t=B.get(e.source),n=B.get(e.target);if(!t||!n||t===n||ce.get(e.target)?.has(e.source))continue;let i=n.x-t.x,a=n.y-t.y,o=Math.hypot(i,a);if(o<.01)continue;let s=i/o,c=a/o,u=X(t,s,c),p=X(n,s,c);if(u+p>=o)continue;de(t,s,c),de(n,-s,-c);let m=t.x+s*u,h=t.y+c*u,_=n.x-s*p,v=n.y-c*p,y=``;(e.flow===`forward`||e.flow===`bidirectional`)&&(y+=f(`arrow_point`,_,v,s,c,q),_-=s*d(`arrow_point`),v-=c*d(`arrow_point`)),(e.flow===`backward`||e.flow===`bidirectional`)&&(y+=f(`arrow_point`,m,h,-s,-c,q),m+=s*d(`arrow_point`),h+=c*d(`arrow_point`));let b=``;if(e.label){let r=O(e.label,g+1,200),i=s>=0?1:-1,a=c*i,o=-s*i,l=5+Math.abs(a)*r.width/2+Math.abs(o)*r.height/2;b=E(r,(t.x+n.x)/2+a*l,(t.y+n.y)/2+o*l,` class="pele-edge-label" font-size="${g+1}" fill="var(--_m)"`)}fe+=`<g class="pele-edge${e.dashed?` pele-wardley-dashed`:``}" data-id="${r(e.source)}-${r(e.target)}"><path d="M${l(m)},${l(h)}L${l(_)},${l(v)}" stroke="${q}"${e.dashed?` stroke-dasharray="6 6"`:``}/>`+y+b+`</g>`}let pe=``;for(let e of t.trends){let t=B.get(e.nodeId);if(!t)continue;let n=k(e.targetX),i=A(e.targetY),a=n-t.x,o=i-t.y,s=Math.hypot(a,o),c=``,u=s>0?X(t,a/s,o/s):0;if(s>u+H+4){let e=a/s,r=o/s,p=n-e*(H+2),m=i-r*(H+2);c=`<path d="M${l(t.x+e*u)},${l(t.y+r*u)}L${l(p-e*d(`arrow_point`))},${l(m-r*d(`arrow_point`))}" stroke="${K}" stroke-dasharray="4 4"/>`+f(`arrow_point`,p,m,e,r,K)}T(n-H,i-H,n+H,i+H),pe+=`<g class="pele-wardley-trend" data-id="${r(e.nodeId)}">${c}<circle cx="${l(n)}" cy="${l(i)}" r="${H}" fill="var(--_bg)" stroke="${K}"/></g>`}let me=``,Q=1.2*H,he=.7*H;for(let e of B.values()){let t=e.node,{x:n,y:i}=e,a=t.className===`anchor`,o=t.sourceStrategy,c=``;if(o){let e=o===`outsource`?`var(--_m)`:o===`buy`?`var(--_a)`:o===`build`?`var(--_s)`:`var(--_bg)`;c+=`<circle class="pele-wardley-${o}" cx="${l(n)}" cy="${l(i)}" r="${2*H}" fill="${e}" stroke="${q}"/>`}if(o===`market`){let e=Q*Math.cos(Math.PI/6),t=i+Q*Math.sin(Math.PI/6);c+=`<path d="M${l(n)},${l(i-Q)}L${l(n-e)},${l(t)}H${l(n+e)}Z" fill="none" stroke="${q}"/>`;for(let[r,a]of[[n,i-Q],[n-e,t],[n+e,t]])c+=`<circle cx="${l(r)}" cy="${l(a)}" r="${l(he)}" fill="var(--_bg)" stroke="${q}"/>`}else t.isPipelineParent?c+=`<rect x="${l(n-U/2)}" y="${l(i-U/2)}" width="${U}" height="${U}" fill="var(--_bg)" stroke="${q}"/>`:a||(c+=`<circle cx="${l(n)}" cy="${l(i)}" r="${H}" fill="var(--_bg)" stroke="${q}"/>`);if(t.inertia===!0){let e=(t.isPipelineParent?U/2:H)+10+(o?H+4:0);c+=`<rect class="pele-wardley-inertia" x="${l(n+e)}" y="${l(i-H)}" width="4" height="${2*H}" fill="${q}"/>`}let u=t.labelOffsetX===void 0?void 0:J(t.labelOffsetX,-5e3,5e3),d=t.labelOffsetY===void 0?void 0:J(t.labelOffsetY,-5e3,5e3),f;if(a)f=E(Y.get(t)??O(t.label,h,p?Math.max(64,s/2):4e3,1),n+(u??0),i+(d??-3),` class="pele-label" font-size="${h}" font-weight="var(--_hw)"`);else{let r=O(t.label,h),a=` class="pele-label" font-size="${h}"`,s=ae+(o?10:0);if(u!==void 0||d!==void 0)f=D(r,n+(u??s),i+(d??-s),a);else if(t.inPipeline)f=E(r,n,i+2*H+4+r.height/2,a);else{let t=Z.get(e)??0,o=t&1?t&2?t&4?t&8?1:8:4:2:1,c=o===1||o===2,l=o===1||o===4;f=D(r,c?n+s:n-s-r.width,l?i-s:i+s+h*.75,a)}}T(n-2*H,i-2*H,n+2*H+20,i+2*H),me+=`<g class="pele-node pele-wardley-${a?`anchor`:t.isPipelineParent?`pipeline-parent`:t.inPipeline?`pipeline-component`:`component`}" data-id="${r(t.id)}">${c}${f}</g>`}let ge=``;for(let e of t.annotations){let t=O(String(e.number),g,4e3,1),n=``;for(let r of e.coordinates){let e=k(r.x),i=A(r.y),o=Math.max(10,t.width/2+4);T(e-o,i-o,e+o,i+o),n+=`<circle cx="${l(e)}" cy="${l(i)}" r="${l(o)}" fill="var(--_bg)" stroke="${q}"/>`+a(t,e,i,` font-size="${g}" font-weight="var(--_hw)"`)}ge+=`<g class="pele-wardley-annotation" data-id="${r(String(e.number))}">${n}</g>`}let _e=t.annotations.filter(e=>e.text).sort((e,t)=>e.number-t.number);if(_e.length>0){let e=_e.map(e=>O(`${e.number}. ${e.text}`,h,p?Math.max(80,s-20):320)),n=0,r=0;for(let t of e)n=Math.max(n,t.width),r+=t.height;n+=20,r+=14;let i=t.annotationsBox,a=i?J(k(i.x),0,Math.max(0,s-n)):0,c=i?J(A(i.y),0,Math.max(0,y-r)):re;T(a,c,a+n,c+r);let u=``,d=c+7;for(let t of e)u+=le(t,a+10,d+t.lineHeight/2+h*.35,` font-size="${h}"`),d+=t.height;ge+=`<g class="pele-wardley-annotations"><rect x="${l(a)}" y="${l(c)}" width="${l(n)}" height="${l(r)}" fill="var(--_bg)" stroke="var(--_b)"${o}/>${u}</g>`}let ve=``;for(let e of t.notes)ve+=D(O(e.text,h,Math.min(360,s*.6),1),k(e.x),A(e.y),` class="pele-wardley-note" font-size="${h}" font-weight="var(--_hw)"`);let ye=``,be=(e,t,n,i)=>{let a=k(t),o=A(n),s=oe/2,c=i?a+G:a,u=i?a:a+G,d=i?a+G-se:a+se,f=`M${l(u)},${l(o-s)}H${l(d)}V${l(o-s-8)}L${l(c)},${l(o)}L${l(d)},${l(o+s+8)}V${l(o+s)}H${l(u)}Z`;T(a,o-s-8,a+G,o+s+8),ye+=`<g class="pele-wardley-${i?`accelerator`:`deaccelerator`}" data-id="${r(e)}"><path d="${f}" fill="var(--_s)" stroke="${q}"/>`+E(O(e,g+1,160,1),a+G/2,o+s+8+12,` font-size="${g+1}" font-weight="var(--_hw)"`)+`</g>`};for(let e of t.accelerators)be(e.name,e.x,e.y,!0);for(let e of t.deaccelerators)be(e.name,e.x,e.y,!1);let $=c(t.title,!1,_,m,p?Math.max(80,s):4e3,1),xe=$.height>0?$.height+12:0,Se=Math.min(x,s/2-$.width/2),Ce=Math.max(C,s/2+$.width/2),we=v-Se,Te=v+xe-S,Ee=Math.ceil(Ce-Se+2*v),De=Math.ceil(w-S+xe+2*v),Oe=a($,we+s/2,v+$.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${l(we)},${l(Te)})"><g class="pele-wardley-frame" fill="none">${N}</g>`+ne+z+V+(fe?`<g class="pele-edges" fill="none">${fe}</g>`:``)+(pe?`<g class="pele-wardley-trends" fill="none">${pe}</g>`:``)+me+ge+ve+ye+`</g>`;return{svg:e(`wardley`,Ee,De,m,i,t,Oe),width:Ee,height:De,links:[]}}var Z={type:`wardley`,section:`wardley-beta`,parse:(e,t,n)=>P(B(e),n),render:Y};export{Z as wardley};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n,r,i,a=0){if(e===``||t<=0)return;let o=i.width(e,n,a);if(o<=t)return{text:e,size:n,width:o};let s=Math.max(r,Math.floor(n*t/o));for(;s>=r;){if(o=i.width(e,s,a),o<=t)return{text:e,size:s,width:o};s--}let c=Array.from(e),l=0,u=c.length-1;for(;l<u;){let e=l+u+1>>1;i.width(c.slice(0,e).join(``).trimEnd()+`…`,r,a)<=t?l=e:u=e-1}if(l===0)return;let d=c.slice(0,l).join(``).trimEnd()+`…`;return o=i.width(d,r,a),o<=t?{text:d,size:r,width:o}:void 0}export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e,t,n){for(let r=0;r<n.length;r++){let i=e.charCodeAt(t+r),a=n.charCodeAt(r);if(i!==a&&!(a>=97&&a<=122&&i===a-32))return!1}return!0}export{e as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[[`rect`,`proc`,`process`,`rectangle`,`squareRect`],[`rounded`,`event`,`roundedRect`],[`stadium`,`terminal`,`pill`],[`fr-rect`,`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],[`cyl`,`db`,`database`,`cylinder`],[`datastore`,`data-store`],[`folder`,`directory`],[`bucket`],[`console`],[`browser`],[`person`],[`circle`,`circ`],[`bang`],[`cloud`],[`diam`,`decision`,`diamond`,`question`],[`hex`,`hexagon`,`prepare`],[`lean-r`,`lean-right`,`in-out`,`lean_right`],[`lean-l`,`lean-left`,`out-in`,`lean_left`],[`trap-b`,`priority`,`trapezoid-bottom`,`trapezoid`],[`trap-t`,`manual`,`trapezoid-top`,`inv-trapezoid`,`inv_trapezoid`],[`dbl-circ`,`double-circle`,`doublecircle`],[`text`],[`notch-rect`,`card`,`notched-rectangle`],[`lin-rect`,`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],[`sm-circ`,`start`,`small-circle`,`stateStart`],[`fr-circ`,`stop`,`framed-circle`,`stateEnd`],[`fork`,`join`,`forkJoin`],[`hourglass`,`collate`],[`brace`,`comment`,`brace-l`],[`brace-r`],[`braces`],[`bolt`,`com-link`,`lightning-bolt`],[`doc`,`document`],[`delay`,`half-rounded-rectangle`],[`h-cyl`,`das`,`horizontal-cylinder`],[`lin-cyl`,`disk`,`lined-cylinder`],[`curv-trap`,`curved-trapezoid`,`display`],[`div-rect`,`div-proc`,`divided-rectangle`,`divided-process`],[`tri`,`extract`,`triangle`],[`win-pane`,`internal-storage`,`window-pane`],[`f-circ`,`junction`,`filled-circle`],[`notch-pent`,`loop-limit`,`notched-pentagon`],[`flip-tri`,`manual-file`,`flipped-triangle`],[`sl-rect`,`manual-input`,`sloped-rectangle`],[`docs`,`documents`,`st-doc`,`stacked-document`],[`st-rect`,`procs`,`processes`,`stacked-rectangle`],[`bow-rect`,`stored-data`,`bow-tie-rectangle`],[`cross-circ`,`summary`,`crossed-circle`],[`tag-doc`,`tagged-document`],[`tag-rect`,`tagged-rectangle`,`tag-proc`,`tagged-process`],[`flag`,`paper-tape`],[`odd`,`rect_left_inv_arrow`],[`lin-doc`,`lined-document`]],t=`state.choice.note.composite.rectWithTitle.labelRect.block_arrow.collapsedGroup.iconSquare.iconCircle.icon.iconRounded.imageSquare.anchor.kanbanItem.mindmapCircle.defaultMindmapNode.classBox.erBox.requirementBox.usecaseActor.usecaseActorHollow.usecaseActorAwesome.usecaseActorIcon.usecaseBusiness.usecaseEllipse.usecaseJsonTable`.split(`.`),n=new Map([[`square`,`rect`],[`round`,`rounded`],[`ellipse`,`ellipse`],[`hexagon`,`hex`],[`diamond`,`diam`]]),r=new Map;for(let t of e)for(let e of t)r.set(e,t[0]);for(let e of t)r.set(e,e);function i(e){return r.has(e)}function a(e){return e===void 0?`rect`:n.get(e)??r.get(e)??`rect`}export{a as n,i as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){for(var t={},n=0,r=e.length;n<r;++n)t[e[n]]=!0;return t}var t=`alias.and.BEGIN.begin.break.case.class.def.defined?.do.else.elsif.END.end.ensure.false.for.if.in.module.next.not.or.redo.rescue.retry.return.self.super.then.true.undef.unless.until.when.while.yield.nil.raise.throw.catch.fail.loop.callcc.caller.lambda.proc.public.protected.private.require.load.require_relative.extend.autoload.__END__.__FILE__.__LINE__.__dir__`.split(`.`),n=e(t),r=e([`def`,`class`,`case`,`for`,`while`,`until`,`module`,`catch`,`loop`,`proc`,`begin`]),i=e([`end`,`until`]),a={"[":`]`,"{":`}`,"(":`)`},o={"]":`[`,"}":`{`,")":`(`},s;function c(e,t,n){return n.tokenize.push(e),e(t,n)}function l(e,t){if(e.sol()&&e.match(`=begin`)&&e.eol())return t.tokenize.push(h),`comment`;if(e.eatSpace())return null;var n=e.next(),r;if(n=="`"||n==`'`||n==`"`)return c(p(n,`string`,n==`"`||n=="`"),e,t);if(n==`/`)return u(e)?c(p(n,`string.special`,!0),e,t):`operator`;if(n==`%`){var i=`string`,o=!0;e.eat(`s`)?i=`atom`:e.eat(/[WQ]/)?i=`string`:e.eat(/[r]/)?i=`string.special`:e.eat(/[wxq]/)&&(i=`string`,o=!1);var l=e.eat(/[^\w\s=]/);return l?(a.propertyIsEnumerable(l)&&(l=a[l]),c(p(l,i,o,!0),e,t)):`operator`}if(n==`#`)return e.skipToEnd(),`comment`;if(n==`<`&&(r=e.match(/^<([-~])[\`\"\']?([a-zA-Z_?]\w*)[\`\"\']?(?:;|$)/)))return c(m(r[2],r[1]),e,t);if(n==`0`)return e.eat(`x`)?e.eatWhile(/[\da-fA-F]/):e.eat(`b`)?e.eatWhile(/[01]/):e.eat(`.`)?e.eat(/[\d_]*(?:[eE][+\-]?[\d_]+)?/):e.eatWhile(/[0-7]/),`number`;if(/\d/.test(n))return e.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+\-]?[\d_]+)?/),`number`;if(n==`?`){for(;e.match(/^\\[CM]-/););return e.eat(`\\`)?e.eatWhile(/\w/):e.next(),`string`}if(n==`:`)return e.eat(`'`)?c(p(`'`,`atom`,!1),e,t):e.eat(`"`)?c(p(`"`,`atom`,!0),e,t):e.eat(/[\<\>]/)?(e.eat(/[\<\>]/),`atom`):e.eat(/[\+\-\*\/\&\|\:\!]/)?`atom`:e.eat(/[a-zA-Z$@_\xa1-\uffff]/)?(e.eatWhile(/[\w$\xa1-\uffff]/),e.eat(/[\?\!\=]/),`atom`):`operator`;if(n==`@`&&e.match(/^@?[a-zA-Z_\xa1-\uffff]/))return e.eat(`@`),e.eatWhile(/[\w\xa1-\uffff]/),`propertyName`;if(n==`$`)return e.eat(/[a-zA-Z_]/)?e.eatWhile(/[\w]/):e.eat(/\d/)?e.eat(/\d/):e.next(),`variableName.special`;if(/[a-zA-Z_\xa1-\uffff]/.test(n))return e.eatWhile(/[\w\xa1-\uffff]/),e.eat(/[\?\!]/),e.eat(`:`)?`atom`:`variable`;if(n==`|`&&(t.varList||t.lastTok==`{`||t.lastTok==`do`))return s=`|`,null;if(/[\(\)\[\]{}\\;]/.test(n))return s=n,null;if(n==`-`&&e.eat(`>`))return`operator`;if(/[=+\-\/*:\.^%<>~|]/.test(n)){var d=e.eatWhile(/[=+\-\/*:\.^%<>~|]/);return n==`.`&&!d&&(s=`.`),`operator`}return null}function u(e){for(var t=e.pos,n=0,r,i=!1,a=!1;(r=e.next())!=null;)if(a)a=!1;else{if(`[{(`.indexOf(r)>-1)n++;else if(`]})`.indexOf(r)>-1){if(n--,n<0)break}else if(r==`/`&&n==0){i=!0;break}a=r==`\\`}return e.backUp(e.pos-t),i}function d(e){return e||=1,function(t,n){if(t.peek()==`}`){if(e==1)return n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n);n.tokenize[n.tokenize.length-1]=d(e-1)}else t.peek()==`{`&&(n.tokenize[n.tokenize.length-1]=d(e+1));return l(t,n)}}function f(){var e=!1;return function(t,n){return e?(n.tokenize.pop(),n.tokenize[n.tokenize.length-1](t,n)):(e=!0,l(t,n))}}function p(e,t,n,r){return function(i,a){var o=!1,s;for(a.context.type===`read-quoted-paused`&&(a.context=a.context.prev,i.eat(`}`));(s=i.next())!=null;){if(s==e&&(r||!o)){a.tokenize.pop();break}if(n&&s==`#`&&!o){if(i.eat(`{`)){e==`}`&&(a.context={prev:a.context,type:`read-quoted-paused`}),a.tokenize.push(d());break}if(/[@\$]/.test(i.peek())){a.tokenize.push(f());break}}o=!o&&s==`\\`}return t}}function m(e,t){return function(n,r){return t&&n.eatSpace(),n.match(e)?r.tokenize.pop():n.skipToEnd(),`string`}}function h(e,t){return e.sol()&&e.match(`=end`)&&e.eol()&&t.tokenize.pop(),e.skipToEnd(),`comment`}var g={name:`ruby`,startState:function(e){return{tokenize:[l],indented:0,context:{type:`top`,indented:-e},continuedLine:!1,lastTok:null,varList:!1}},token:function(e,t){s=null,e.sol()&&(t.indented=e.indentation());var a=t.tokenize[t.tokenize.length-1](e,t),o,c=s;if(a==`variable`){var l=e.current();a=t.lastTok==`.`?`property`:n.propertyIsEnumerable(e.current())?`keyword`:/^[A-Z]/.test(l)?`tag`:t.lastTok==`def`||t.lastTok==`class`||t.varList?`def`:`variable`,a==`keyword`&&(c=l,r.propertyIsEnumerable(l)?o=`indent`:i.propertyIsEnumerable(l)?o=`dedent`:((l==`if`||l==`unless`)&&e.column()==e.indentation()||l==`do`&&t.context.indented<t.indented)&&(o=`indent`))}return(s||a&&a!=`comment`)&&(t.lastTok=c),s==`|`&&(t.varList=!t.varList),o==`indent`||/[\(\[\{]/.test(s)?t.context={prev:t.context,type:s||a,indented:t.indented}:(o==`dedent`||/[\)\]\}]/.test(s))&&t.context.prev&&(t.context=t.context.prev),e.eol()&&(t.continuedLine=s==`\\`||a==`operator`),a},indent:function(e,t,n){if(e.tokenize[e.tokenize.length-1]!=l)return null;var r=t&&t.charAt(0),i=e.context,a=i.type==o[r]||i.type==`keyword`&&/^(?:end|until|else|elsif|when|rescue)\b/.test(t);return i.indented+(a?0:n.unit)+(e.continuedLine?n.unit:0)},languageData:{indentOnInput:/^\s*(?:end|rescue|elsif|else|\})$/,commentTokens:{line:`#`},autocomplete:t}};export{g as ruby};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={"+":`inserted`,"-":`deleted`,"@":`meta`},t={name:`diff`,token:function(t){var n=t.string.search(/[\t ]+?$/);if(!t.sol()||n===0)return t.skipToEnd(),(`error `+(e[t.string.charAt(0)]||``)).replace(/ $/,``);var r=e[t.peek()]||t.skipToEnd();return n===-1?t.skipToEnd():t.pos=n,r}};export{t as diff};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{_ as e,b as t,f as n,i as r,o as i,r as a,s as o,u as s,x as c}from"./CX-xckzu.js";import{i as l}from"./DciMwFJ1.js";import{t as u}from"./CgA1WoRv.js";import{PeleError as d,_ as f,b as p,g as m,h,s as g,u as _,y as v}from"./8wVGBFSs.js";var y=/^\d+$/,b=/^#?([\dA-Fa-f]{6}|[\dA-Fa-f]{3})$/,x=/^\d+px$/;function S(e,t,n){return new d(`value for ${e} ${t} is invalid, please use a valid ${n}`,`semantic`,{type:`quadrantChart`})}function C(e){let t=e.trim(),n=t.indexOf(`:`);if(n===-1)return[t,`undefined`];let r=t.slice(n+1).trimStart(),i=r.indexOf(`:`);return[t.slice(0,n).trimEnd(),i===-1?r:r.slice(0,i).trimEnd()]}function w(e){let t={};for(let n of e){let[e,r]=C(n);if(e===`radius`){if(!y.test(r))throw S(e,r,`number`);t.radius=parseInt(r)}else if(e===`color`){if(!b.test(r))throw S(e,r,`hex code`);t.color=r}else if(e===`stroke-color`){if(!b.test(r))throw S(e,r,`hex code`);t.strokeColor=r}else if(e===`stroke-width`){if(!x.test(r))throw S(e,r,`number of pixels (eg. 10px)`);t.strokeWidth=r}else throw new d(`style named ${e} is not supported.`,`semantic`,{type:`quadrantChart`})}return t}function T(e){return{text:e.text.trim(),type:e.type}}var E=class{type=`quadrantChart`;title;accTitle;accDescr;quadrants=[void 0,void 0,void 0,void 0];xAxisLeft;xAxisRight;yAxisBottom;yAxisTop;points=[];classes=new Map;setQuadrant1Text(e){this.quadrants[0]=T(e)}setQuadrant2Text(e){this.quadrants[1]=T(e)}setQuadrant3Text(e){this.quadrants[2]=T(e)}setQuadrant4Text(e){this.quadrants[3]=T(e)}setXAxisLeftText(e){this.xAxisLeft=T(e)}setXAxisRightText(e){this.xAxisRight=T(e)}setYAxisBottomText(e){this.yAxisBottom=T(e)}setYAxisTopText(e){this.yAxisTop=T(e)}addPoint(e,t,n,r,i){this.points.push({x:Number(n),y:Number(r),text:T(e),className:t,...w(i)})}addClass(e,t){this.classes.set(e,w(t))}setDiagramTitle(e){this.title=e}setAccTitle(e){this.accTitle=e.replace(/^\s+/g,``)}setAccDescription(e){this.accDescr=e.replace(/\n\s+/g,`
|
|
2
|
+
`)}},D=`$end.INVALID.NEWLINE.title.title_value.acc_title.acc_title_value.acc_descr.acc_descr_value.acc_descr_multiline_value.X-AXIS.Y-AXIS.AXIS-TEXT-DELIMITER.QUADRANT_1.QUADRANT_2.QUADRANT_3.QUADRANT_4.CLASSDEF.MD_STR.STR.class_name.point_start.point_x.point_y.QUADRANT.ALPHA.UNICODE_TEXT.COLON.PLUS.COMMA.EQUALS.MULT.BRKT.UNDERSCORE.DOT.AMP.MINUS.NUM.SPACE.SEMI.PUNCTUATION.EOF`.split(`.`),O=[41,4,6,8,9,19],k=new Uint8Array(128);for(let[e,t]of[[`:`,27],[`+`,28],[`,`,29],[`=`,30],[`*`,31],[`#`,32],[`_`,33],[`.`,34],[`&`,35],[`-`,36],[` \v\f`,38],[`;`,39],["!$%'`?\\/",40]])for(let n=0;n<e.length;n++)k[e.charCodeAt(n)]=t;function A(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=0,l=0,d=0,g=0,_=0,y=0,b=0,x=0,S=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},C=e=>{a.push(o),o=e},w=()=>{a.length>0&&(o=a.pop())},T=n=>{let r=e.indexOf(`
|
|
3
|
+
`,n);return r===-1?t:r},E=t=>{for(;e.charCodeAt(t)===32;)t++;return t},D=n=>{for(;n<t&&h(e.charCodeAt(n));)n++;return n},A=n=>{let r=e.charCodeAt(n);if(r===49)return n+1;if(r!==48)return-1;let i=n+1;if(i<t&&!f(e.charCodeAt(i))&&v(e.charCodeAt(i+1)))for(i+=2;v(e.charCodeAt(i));)i++;return i};t:for(;s<t;){let n=e.charCodeAt(s),r=e.charCodeAt(s+1);switch(o){case 0:break;case 1:case 2:case 3:S(O[o],s,T(s)),w();continue;case 4:if(n===125)s++,w();else{let n=e.indexOf(`}`,s);S(9,s,n===-1?t:n)}continue;case 5:if(n===34)s++,w();else{let n=e.indexOf(`"`,s);S(19,s,n===-1?t:n)}continue;case 6:if(n===96&&r===34){s+=2,w();continue}if(n!==96&&n!==34){let n=s+1;for(let r=e.charCodeAt(n);n<t&&r!==96&&r!==34;r=e.charCodeAt(++n));S(18,s,n);continue}break t;case 7:if(m(n)){let t=s+1;for(;m(e.charCodeAt(t));)t++;S(20,s,t),w();continue}break t;case 8:{let t=A(s);if(t!==-1){S(22,s,t),C(9);continue}let n=D(s);if(e.charCodeAt(n)===93){s=E(n+1),w();continue}break t}case 9:{let t=D(s);if(e.charCodeAt(t)===44){s=D(t+1),o=10;continue}break t}case 10:{let e=A(s);if(e!==-1){S(23,s,e),w();continue}break t}}if(n===37&&r===37){s=T(s+2);continue}if(n===10||n===13){let t=s+1;for(let n=e.charCodeAt(t);n===10||n===13;n=e.charCodeAt(++t));S(2,s,t);continue}let i=n|32;if(i===116&&u(e,s,`title`)&&!m(e.charCodeAt(s+5))){S(3,s,s+5),C(1);continue}if(i===97&&u(e,s,`acc`)){let t=u(e,s+3,`descr`);if(t||u(e,s+3,`title`)){let n=D(s+8),r=e.charCodeAt(n);if(r===58){S(t?7:5,s,D(n+1)),C(t?3:2);continue}if(r===123&&t){s=D(n+1),C(4);continue}}}let a=s;n===32&&((s<c||s>=l)&&(c=s,l=E(s)),a=l);let f=e.charCodeAt(a),j=f|32,M=0,N=0;if(j===120&&u(e,a,`x-axis`))M=10,N=a+6;else if(j===121&&u(e,a,`y-axis`))M=11,N=a+6;else if(f===45){if(a<d||a>=g)for(d=a,g=a;e.charCodeAt(g)===45;)g++;g-a>=2&&e.charCodeAt(g)===62&&(M=12,N=g+1)}else if(j===113&&u(e,a,`quadrant`)){let t=e.charCodeAt(a+9);e.charCodeAt(a+8)===45&&t>=49&&t<=52?(M=13+t-49,N=a+10):u(e,a+8,`chart`)&&(M=24,N=a+13)}if(M!==0)S(M,s,E(N));else if(i===99&&u(e,s,`classdef`)&&!m(e.charCodeAt(s+8)))S(17,s,s+8);else if(n===34)r===96?(s+=2,C(6)):(s++,C(5));else if(n===58&&r===58&&e.charCodeAt(s+2)===58)s+=3,C(7);else{if(n===58||h(n)){let t=s;if(n!==58&&((s<_||s>=y)&&(_=s,y=D(s)),t=y),e.charCodeAt(t)===58&&((t+1<b||t+1>=x)&&(b=t+1,x=D(t+1)),e.charCodeAt(x)===91)){S(21,s,D(x+1)),C(8);continue}}if(p(n)){let t=s+1;for(;p(e.charCodeAt(t));)t++;S(25,s,t)}else if(n>=128){let t=s+1;for(;e.charCodeAt(t)>=128;)t++;S(26,s,t)}else if(v(n)){let t=s+1;for(;v(e.charCodeAt(t));)t++;S(37,s,t)}else if(k[n]!==0)S(k[n],s,s+1);else break}}return s<t?(n.push(1),r.push(``),i.push(s),{types:n,texts:r,starts:i}):(o<O.length&&(n.push(O[o]),r.push(``),i.push(t)),n.push(0),r.push(``),i.push(t),{types:n,texts:r,starts:i})}function j(...e){let t=new Uint8Array(42);for(let n of e)t[n]=1;return t}var M=j(40,35,37,25,29,28,30,31,34,32,33,26),N=j(25,37,36,29,27,35,32,31,26),P=j(25,37,27,38,32,36),F=j(2,39,41),I=[`setQuadrant1Text`,`setQuadrant2Text`,`setQuadrant3Text`,`setQuadrant4Text`],L=`'STR', 'MD_STR', 'ALPHA', 'NUM', 'UNICODE_TEXT', 'PUNCTUATION'`;function R(e,t){let{types:n,texts:r,starts:i}=A(e),a=0,o=t=>{let r=n[a];throw r===1?g(`quadrantChart`,e,i[a],``,!0):g(`quadrantChart`,e,i[a],`Expecting ${t}, got '${D[r]}'`)},s=e=>(n[a]!==e&&o(`'${D[e]}'`),r[a++]),c=e=>e===19||e===18||M[e]===1,l=()=>{let e=n[a];c(e)||o(L);let t=r[a++];for(;M[n[a]]===1||n[a]===38||n[a]===36;)t+=r[a++];return{text:t,type:e===18?`markdown`:`text`}},u=()=>{let e=[];for(;;){P[n[a]]===0&&o(`'ALPHA', 'NUM', 'COLON', 'SPACE', 'BRKT', 'MINUS'`);let t=r[a++];for(;P[n[a]]===1;)t+=r[a++];if(e.push(t.trim()),n[a]!==29)return e;a++}};for(;F[n[a]]===1||n[a]===38;)a++;for(s(24);n[a]!==0;){for(;n[a]===38;)a++;let e=n[a];switch(e){case 17:{a++,s(38),N[n[a]]===0&&o(`'ALPHA', 'NUM', 'UNICODE_TEXT'`);let e=r[a++];for(;N[n[a]]===1;)e+=r[a++];s(38),t.addClass(e,u());break}case 10:case 11:{a++;let r=l(),i;n[a]===12&&(a++,c(n[a])?i=l():r.text+=` ⟶ `),e===10?(t.setXAxisLeftText(r),i&&t.setXAxisRightText(i)):(t.setYAxisBottomText(r),i&&t.setYAxisTopText(i));break}case 13:case 14:case 15:case 16:a++,t[I[e-13]](l());break;case 3:a++,t.setDiagramTitle(s(4).trim());break;case 5:a++,t.setAccTitle(s(6).trim());break;case 7:a++,t.setAccDescription(s(8).trim());break;case 9:t.setAccDescription(r[a++].trim());break;default:if(c(e)){let e=l(),i=n[a]===20?r[a++]:``;s(21);let o=s(22),c=s(23);t.addPoint(e,i,o,c,P[n[a]]===1?u():[])}}F[n[a]]===0&&o(`'NEWLINE', 'SEMI', 'EOF'`),a++}}var ee=4,te=300;function z(e,t){return e.quadrantChart?.[t]}function B(e,t,n,r){let i=z(e,t);return typeof i==`number`&&i>=0?Math.min(i,r):n}function ne(e){return e.startsWith(`#`)?e:`#`+e}function V(u,d,f){let p=f.fontSize??16,m=Math.round(p*.875),h=Math.round(p*.75),g=f.measurer??_(f.fontFamily,f.fontFamilyMono),v=Math.round(Math.max(100,B(d,`chartWidth`,500,4e3))),y=Math.round(l(f,v,280)),b=Math.round(Math.max(100,B(d,`chartHeight`,500,4e3))*y/v),x=B(d,`quadrantPadding`,f.padding??8,200),S=B(d,`xAxisLabelPadding`,5,200),C=B(d,`yAxisLabelPadding`,5,200),w=u.points.length>0,T=(e,t,n)=>s(e?.text,e?.type===`markdown`,g,t,Math.max(n,40)),E=s(u.title,!1,g,p,Math.max(y-2*x,40),1),D=B(d,`titlePadding`,10,200),O=E.height>0?E.height+D:0,k=!!(u.xAxisLeft?.text||u.xAxisRight?.text),A=!!(u.yAxisBottom?.text||u.yAxisTop?.text),j=w||z(d,`xAxisPosition`)===`bottom`,M=z(d,`yAxisPosition`)===`right`,N=y-2*x,P=T(u.xAxisLeft,m,u.xAxisRight?N/2-16:N),F=T(u.xAxisRight,m,N/2-16),I=Math.max(P.height,F.height),L=k?I+S:0,R=b-2*x-O-L,V=T(u.yAxisBottom,m,u.yAxisTop?R/2-16:R),H=T(u.yAxisTop,m,R/2-16),U=Math.max(V.height,H.height),re=A?U+C:0,W=x+(M?0:re),G=x+O+(j?0:L),K=Math.max(0,N-re),q=Math.max(0,R),J=Math.max(0,(K-ee)/2),Y=Math.max(0,(q-ee)/2),X=[W+J,G,W+K-J,G+q,W,G+Y,W+K,G+q-Y],ie=(e,t,n,r,i)=>{for(let a=e;a<X.length;a+=4)if(t<X[a+2]&&r>X[a]&&n<X[a+3]&&i>X[a+1])return!1;return!0},ae=B(d,`quadrantTextTopPadding`,5,200),oe=``;for(let e=0;e<4;e++){let t=e===0||e===3?W+K-J:W,n=e<2?G:G+q-Y,r=T(u.quadrants[e],p,J-16),o=t+J/2,s=w?n+ae+r.height/2:n+Y/2;X.push(o-r.width/2,s-r.height/2,o+r.width/2,s+r.height/2),oe+=`<g class="pele-quadrant" data-id="${e+1}"><rect x="${c(t)}" y="${c(n)}" width="${c(J)}" height="${c(Y)}"${a}/>`+i(r,o,s,` class="pele-label" fill="var(--_fg)" stroke="none"`)+`</g>`}let Z=``;if(k){let e=j?G+q+S+I/2:G-S-I/2;Z+=i(P,F.height>0?W+K/4:W+P.width/2,e,``)+i(F,W+K*3/4,e,``)}if(A){let e=M?W+K+C+U/2:W-C-U/2,t=(t,n)=>t.height>0?`<g transform="translate(${c(e)},${c(n)}) rotate(-90)">${i(t,0,0,``)}</g>`:``;Z+=t(V,H.height>0?G+q*3/4:G+q-V.width/2)+t(H,G+q/4)}let se=B(d,`pointRadius`,5,200),ce=B(d,`pointTextPadding`,5,200),le=n(0),Q=[],ue=[];for(let e of u.points){if(!(e.x>=0&&e.x<=1&&e.y>=0&&e.y<=1))continue;let n=u.classes.get(e.className),i=Math.min(e.radius??n?.radius??se,2e3),a=e.color??n?.color,s=e.strokeColor??n?.strokeColor,l=e.strokeWidth??n?.strokeWidth,d=[];a&&d.push(`fill:`+ne(a)),l&&(s&&d.push(`stroke:`+ne(s)),d.push(`stroke-width:`+l));let f=W+e.x*K,p=G+(1-e.y)*q;Q.push({cx:f,cy:p,reach:i+(l?Math.min(parseInt(l),400)/2:0),text:T(e.text,h,200)}),ue.push(`<circle class="pele-point${t(e.className)}" data-id="${r(e.text.text)}" cx="${c(f)}" cy="${c(p)}" r="${c(i)}"${l&&!s?` stroke="${le}"`:``}${o(d).shape}/>`)}let $=Q.length<=te;if($)for(let{cx:e,cy:t,reach:n}of Q)X.push(e-n,t-n,e+n,t+n);let de=``;for(let{cx:e,cy:t,reach:n,text:r}of Q){let a=r.width/2,o=r.size*.6+(r.height-r.lineHeight)/2,s=n+ce,c=Math.min(s,Math.max(0,(J-r.width)/2)),l=8+4*(e<W+K/2?t<G+q/2?1:2:t<G+q/2?0:3),u=Math.max(t+s,X[l+3]+ce)+o,d=[e,t+s+o,e,t-s-o,e+s+a,t,e-s-a,t,e,u],f=e,p=d[1],m=!1;for(let e=0;e<20;e+=2){let t=e%10,n=t===8?c:0,i=(t<4||t===8)&&r.width<K?Math.min(Math.max(d[t],W+a+n),W+K-a-n):d[t],s=d[t+1];if(i-a<W||i+a>W+K||s-o<G||s+o>G+q)continue;let l=!$||ie(e<10?0:8,i-a,s-o,i+a,s+o);if((!m||l)&&(f=i,p=s,m=!0),l)break}$&&X.push(f-a,p-o,f+a,p+o),de+=i(r,f,p,` class="pele-label"`)}let fe=i(E,y/2,D/2+E.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g class="pele-quadrants" fill="var(--_s)" stroke="var(--_b)">${oe}</g>`+(Z?`<g class="pele-axis-labels" font-size="${m}" fill="var(--_m)">${Z}</g>`:``)+(Q.length>0?`<g class="pele-points" fill="${le}">${ue.reverse().join(``)}</g><g class="pele-point-labels" font-size="${h}">${de}</g>`:``);return{svg:e(`quadrantChart`,y,b,p,f,u,fe),width:y,height:b,links:[]}}var H={type:`quadrantChart`,parse(e,t,n){let r=new E;return r.title=n,R(e,r),r},render:V};export{H as quadrantChart};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){var t=e.statementIndentUnit,n=e.dontAlignCalls,r=e.noIndentKeywords||[],i=e.multiLineStrings,a=e.hooks||{};function o(e){for(var t={},n=e.split(` `),r=0;r<n.length;++r)t[n[r]]=!0;return t}var s=o(`accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 null or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor`),c=/[\+\-\*\/!~&|^%=?:]/,l=/[\[\]{}()]/,u=/\d[0-9_]*/,d=/\d*\s*'s?d\s*\d[0-9_]*/i,f=/\d*\s*'s?b\s*[xz01][xz01_]*/i,p=/\d*\s*'s?o\s*[xz0-7][xz0-7_]*/i,m=/\d*\s*'s?h\s*[0-9a-fxz?][0-9a-fxz?_]*/i,h=/(\d[\d_]*(\.\d[\d_]*)?E-?[\d_]+)|(\d[\d_]*\.\d[\d_]*)/i,g=/^((\w+)|[)}\]])/,_=/[)}\]]/,v,y,b=o(`case checker class clocking config function generate interface module package primitive program property specify sequence table task`),x={};for(var S in b)x[S]=`end`+S;for(var C in x.begin=`end`,x.casex=`endcase`,x.casez=`endcase`,x.do=`while`,x.fork=`join;join_any;join_none`,x.covergroup=`endgroup`,r){var S=r[C];x[S]&&(x[S]=void 0)}var w=o(`always always_comb always_ff always_latch assert assign assume else export for foreach forever if import initial repeat while`);function T(e,t){var n=e.peek(),r;if(a[n]&&(r=a[n](e,t))!=0||a.tokenBase&&(r=a.tokenBase(e,t))!=0)return r;if(/[,;:\.]/.test(n))return v=e.next(),null;if(l.test(n))return v=e.next(),`bracket`;if(n=="`")return e.next(),e.eatWhile(/[\w\$_]/)?`def`:null;if(n==`$`)return e.next(),e.eatWhile(/[\w\$_]/)?`meta`:null;if(n==`#`)return e.next(),e.eatWhile(/[\d_.]/),`def`;if(n==`"`)return e.next(),t.tokenize=E(n),t.tokenize(e,t);if(n==`/`){if(e.next(),e.eat(`*`))return t.tokenize=D,D(e,t);if(e.eat(`/`))return e.skipToEnd(),`comment`;e.backUp(1)}if(e.match(h)||e.match(d)||e.match(f)||e.match(p)||e.match(m)||e.match(u)||e.match(h))return`number`;if(e.eatWhile(c))return`meta`;if(e.eatWhile(/[\w\$_]/)){var i=e.current();return s[i]?(x[i]&&(v=`newblock`),w[i]&&(v=`newstatement`),y=i,`keyword`):`variable`}return e.next(),null}function E(e){return function(t,n){for(var r=!1,a,o=!1;(a=t.next())!=null;){if(a==e&&!r){o=!0;break}r=!r&&a==`\\`}return(o||!(r||i))&&(n.tokenize=T),`string`}}function D(e,t){for(var n=!1,r;r=e.next();){if(r==`/`&&n){t.tokenize=T;break}n=r==`*`}return`comment`}function O(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function k(e,t,n){var r=e.indented;return e.context=new O(r,t,n,null,e.context)}function A(e){var t=e.context.type;return(t==`)`||t==`]`||t==`}`)&&(e.indented=e.context.indented),e.context=e.context.prev}function j(e,t){if(e==t)return!0;var n=t.split(`;`);for(var r in n)if(e==n[r])return!0;return!1}function M(){var e=[];for(var t in x)if(x[t]){var n=x[t].split(`;`);for(var r in n)e.push(n[r])}return RegExp(`[{}()\\[\\]]|(`+e.join(`|`)+`)$`)}return{name:`verilog`,startState:function(e){var t={tokenize:null,context:new O(-e,0,`top`,!1),indented:0,startOfLine:!0};return a.startState&&a.startState(t),t},token:function(e,t){var n=t.context;if(e.sol()&&(n.align??(n.align=!1),t.indented=e.indentation(),t.startOfLine=!0),a.token){var r=a.token(e,t);if(r!==void 0)return r}if(e.eatSpace())return null;v=null,y=null;var r=(t.tokenize||T)(e,t);if(r==`comment`||r==`meta`||r==`variable`)return r;if(n.align??(n.align=!0),v==n.type)A(t);else if(v==`;`&&n.type==`statement`||n.type&&j(y,n.type))for(n=A(t);n&&n.type==`statement`;)n=A(t);else if(v==`{`)k(t,e.column(),`}`);else if(v==`[`)k(t,e.column(),`]`);else if(v==`(`)k(t,e.column(),`)`);else if(n&&n.type==`endcase`&&v==`:`)k(t,e.column(),`statement`);else if(v==`newstatement`)k(t,e.column(),`statement`);else if(v==`newblock`&&(y!=`function`||!n||n.type!=`statement`&&n.type!=`endgroup`)&&!(y==`task`&&n&&n.type==`statement`)){var i=x[y];k(t,e.column(),i)}return t.startOfLine=!1,r},indent:function(e,r,i){if(e.tokenize!=T&&e.tokenize!=null)return null;if(a.indent){var o=a.indent(e);if(o>=0)return o}var s=e.context,c=r&&r.charAt(0);s.type==`statement`&&c==`}`&&(s=s.prev);var l=!1,u=r.match(g);return u&&(l=j(u[0],s.type)),s.type==`statement`?s.indented+(c==`{`?0:t||i.unit):_.test(s.type)&&s.align&&!n?s.column+ +!l:s.type==`)`&&!l?s.indented+(t||i.unit):s.indented+(l?0:i.unit)},languageData:{indentOnInput:M(),commentTokens:{line:`//`,block:{open:`/*`,close:`*/`}}}}}var t=e({}),n={"|":`link`,">":`property`,$:`variable`,$$:`variable`,"?$":`qualifier`,"?*":`qualifier`,"-":`contentSeparator`,"/":`property`,"/-":`property`,"@":`variableName.special`,"@-":`variableName.special`,"@++":`variableName.special`,"@+=":`variableName.special`,"@+=-":`variableName.special`,"@--":`variableName.special`,"@-=":`variableName.special`,"%+":`tag`,"%-":`tag`,"%":`tag`,">>":`tag`,"<<":`tag`,"<>":`tag`,"#":`tag`,"^":`attribute`,"^^":`attribute`,"^!":`attribute`,"*":`variable`,"**":`variable`,"\\":`keyword`,'"':`comment`},r={"/":`beh-hier`,">":`beh-hier`,"-":`phys-hier`,"|":`pipe`,"?":`when`,"@":`stage`,"\\":`keyword`},i=3,a=/^([~!@#\$%\^&\*-\+=\?\/\\\|'"<>]+)([\d\w_]*)/,o=/^[! ] */,s=/^\/[\/\*]/;e({hooks:{electricInput:!1,token:function(e,t){var c=void 0,l;if(e.sol()&&!t.tlvInBlockComment){e.peek()==`\\`&&(c=`def`,e.skipToEnd(),e.string.match(/\\SV/)?t.tlvCodeActive=!1:e.string.match(/\\TLV/)&&(t.tlvCodeActive=!0)),t.tlvCodeActive&&e.pos==0&&t.indented==0&&(l=e.match(o,!1))&&(t.indented=l[0].length);var u=t.indented,d=u/i;if(d<=t.tlvIndentationStyle.length){var f=e.string.length==u,p=d*i;if(p<e.string.length){var m=e.string.slice(p),h=m[0];r[h]&&(l=m.match(a))&&n[l[1]]&&(u+=i,h==`\\`&&p>0||(t.tlvIndentationStyle[d]=r[h],d++))}if(!f)for(;t.tlvIndentationStyle.length>d;)t.tlvIndentationStyle.pop()}t.tlvNextIndent=u}if(t.tlvCodeActive){var l;if(c===void 0){if(t.tlvInBlockComment)e.match(/^.*?\*\//)?t.tlvInBlockComment=!1:e.skipToEnd(),c=`comment`;else if((l=e.match(s))&&!t.tlvInBlockComment)l[0]==`//`?e.skipToEnd():t.tlvInBlockComment=!0,c=`comment`;else if(l=e.match(a)){var g=l[1],_=l[2];n.hasOwnProperty(g)&&(_.length>0||e.eol())?c=n[g]:e.backUp(e.current().length-1)}else e.match(/^\t+/)?c=`invalid`:e.match(/^[\[\]{}\(\);\:]+/)?c=`meta`:(l=e.match(/^[mM]4([\+_])?[\w\d_]*/))?c=l[1]==`+`?`keyword.special`:`keyword`:e.match(/^ +/)?e.eol()&&(c=`error`):e.match(/^[\w\d_]+/)?c=`number`:e.next()}}else e.match(/^[mM]4([\w\d_]*)/)&&(c=`keyword`);return c},indent:function(e){return e.tlvCodeActive==1?e.tlvNextIndent:-1},startState:function(e){e.tlvIndentationStyle=[],e.tlvCodeActive=!0,e.tlvNextIndent=-1,e.tlvInBlockComment=!1}}});export{t as verilog};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={term:!0,method:!0,accu:!0,rule:!0,then:!0,is:!0,and:!0,or:!0,if:!0,default:!0},t={var_input:!0,var_output:!0,fuzzify:!0,defuzzify:!0,function_block:!0,ruleblock:!0},n={end_ruleblock:!0,end_defuzzify:!0,end_function_block:!0,end_fuzzify:!0,end_var:!0},r={true:!0,false:!0,nan:!0,real:!0,min:!0,max:!0,cog:!0,cogs:!0},i=/[+\-*&^%:=<>!|\/]/;function a(a,s){var c=a.next();if(/[\d\.]/.test(c))return c==`.`?a.match(/^[0-9]+([eE][\-+]?[0-9]+)?/):c==`0`?a.match(/^[xX][0-9a-fA-F]+/)||a.match(/^0[0-7]+/):a.match(/^[0-9]*\.?[0-9]*([eE][\-+]?[0-9]+)?/),`number`;if(c==`/`||c==`(`){if(a.eat(`*`))return s.tokenize=o,o(a,s);if(a.eat(`/`))return a.skipToEnd(),`comment`}if(i.test(c))return a.eatWhile(i),`operator`;a.eatWhile(/[\w\$_\xa1-\uffff]/);var l=a.current().toLowerCase();return e.propertyIsEnumerable(l)||t.propertyIsEnumerable(l)||n.propertyIsEnumerable(l)?`keyword`:r.propertyIsEnumerable(l)?`atom`:`variable`}function o(e,t){for(var n=!1,r;r=e.next();){if((r==`/`||r==`)`)&&n){t.tokenize=a;break}n=r==`*`}return`comment`}function s(e,t,n,r,i){this.indented=e,this.column=t,this.type=n,this.align=r,this.prev=i}function c(e,t,n){return e.context=new s(e.indented,t,n,null,e.context)}function l(e){if(e.context.prev)return e.context.type==`end_block`&&(e.indented=e.context.indented),e.context=e.context.prev}var u={name:`fcl`,startState:function(e){return{tokenize:null,context:new s(-e,0,`top`,!1),indented:0,startOfLine:!0}},token:function(e,r){var i=r.context;if(e.sol()&&(i.align??=!1,r.indented=e.indentation(),r.startOfLine=!0),e.eatSpace())return null;var o=(r.tokenize||a)(e,r);if(o==`comment`)return o;i.align??=!0;var s=e.current().toLowerCase();return t.propertyIsEnumerable(s)?c(r,e.column(),`end_block`):n.propertyIsEnumerable(s)&&l(r),r.startOfLine=!1,o},indent:function(e,t,r){if(e.tokenize!=a&&e.tokenize!=null)return 0;var i=e.context,o=n.propertyIsEnumerable(t);return i.align?i.column+ +!o:i.indented+(o?0:r.unit)},languageData:{commentTokens:{line:`//`,block:{open:`(*`,close:`*)`}}}};export{u as fcl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{$ as e,L as t,Q as n}from"./nMarIA7J.js";import{o as r}from"./BrXPCJaM.js";function i(){try{return new URLSearchParams(location.search).get(`base`)??``}catch{return``}}var a=e=>i()?`${e}@${i()}`:e;function o(e,t=``){return`${location.origin}${location.pathname}?base=${encodeURIComponent(e)}${t}`}var s=class extends Error{status;current;constructor(e,t,n){super(e),this.status=t,this.current=n}};function c(e=new URL(i()?`b/${encodeURIComponent(i())}/api/`:`api/`,document.baseURI).href){let t=null,n=async(t,n)=>{let r;try{r=await fetch(e+t,n)}catch{throw new s(`isorite is not answering`,0)}let i=await r.json().catch(()=>({}));if(!r.ok)throw new s(i.error??r.statusText,r.status,i.current);return i},r=()=>n(`session`),a=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)})},o=e=>`?id=${encodeURIComponent(e)}`;return{session:async()=>{let{token:e,...n}=await r();return t=Promise.resolve(e),n},notes:()=>n(`notes`),readNote:e=>n(`note`+o(e)),saveNote:(e,t)=>a(`PUT`,`note`+o(e),t),createNote:(e,t)=>a(`POST`,`note`+o(e),{text:t}),journal:e=>n(`journal`+o(e)),version:async(e,t)=>(await n(`version`+o(e)+`&entry=`+encodeURIComponent(t))).text,moveNote:(e,t,n)=>a(`POST`,`note/move`+o(e),{to:t,base:n}),deleteNote:async(e,t)=>{await a(`POST`,`note/delete`+o(e),{base:t})},restore:(e,t,n)=>a(`POST`,`note/restore`+o(e),{entry:t,base:n}),map:()=>n(`map`),timeline:()=>n(`timeline`),search:e=>n(`search?q=${encodeURIComponent(e)}`),ask:e=>a(`POST`,`iso/ask`,e),converse:e=>a(`POST`,`iso/converse`,e),understanding:e=>n(`understanding`+o(e)),saveScratchpad:(e,t,n)=>a(`POST`,`understanding/scratchpad`+o(e),{scratchpad:t,base:n}),undoTurn:(e,t)=>a(`POST`,`iso/undo`,{conversation:e,turn:t}),setContext:(e,t,n)=>a(`POST`,`iso/context`,{conversation:e,part:t,on:n}),compact:(e,t)=>a(`POST`,`iso/compact`,{conversation:e,...t===void 0?{}:{keep:t}}),branch:e=>a(`POST`,`iso/branch`,{conversation:e}),agents:()=>n(`agents`),saveAgents:e=>a(`POST`,`agents`,{text:e}),takeItem:(e,t,n)=>a(`POST`,`iso/take`,{conversation:e,turn:t,item:n}),nameRepository:async()=>!1,brokenNews:async()=>[],answer:async(e,t,n)=>{await a(`POST`,`iso/answer`,{turn:e,permission:t,decision:n})},conversation:async e=>{let t=await n(`conversation`+(e?o(e):``));return t.id?t:null},turnContext:e=>n(`turn/context?turn=${encodeURIComponent(JSON.stringify(e))}`),stop:async e=>{await a(`POST`,`iso/stop`,{request:e})},keep:(e,t,n)=>a(`POST`,`proposal/keep`+o(e),{proposal:t,...n===void 0?{}:{region:n}}),revise:async(e,t,n)=>{await a(`POST`,`proposal/revise`+o(e),{proposal:t,text:n})},discard:async(e,t,n)=>{await a(`POST`,`proposal/discard`+o(e),{proposal:t,...n===void 0?{}:{region:n}})},drafts:()=>n(`drafts`),createDraft:()=>a(`POST`,`drafts`,{}),keepDraft:(e,t,n)=>a(`POST`,`draft/keep`+o(e),{proposal:t,folder:n}),discardDraft:async e=>{await a(`POST`,`draft/discard`+o(e),{})},setDone:(e,t,n)=>a(`POST`,`note/done`+o(e),{done:t,base:n}),context:(e,t)=>n(`context`+(e?o(e):``)+(t?`${e?`&`:`?`}choice=${encodeURIComponent(JSON.stringify(t))}`:``)),clearConversation:async()=>{await a(`POST`,`context/clear`,{})},settings:()=>n(`settings`),setKey:e=>a(`PUT`,`settings/key`,{key:e}),spend:()=>n(`spend`),setSpendCap:e=>a(`PUT`,`settings/spend-cap`,{usd:e}),connect:e=>a(`POST`,`settings/connect`,{callback:e}),connected:(e,t)=>a(`POST`,`settings/connected`,{code:e,state:t}),agentTools:()=>n(`agent/tools`),agentLook:e=>a(`POST`,`agent/look`,e),agentWrite:e=>a(`POST`,`agent/write`,e),agentSend:e=>a(`POST`,`agent/send`,e),agentReceived:async(e,t)=>{await a(`POST`,`agent/received`,{id:e,agent:t})},agentStatus:async(e,t,n)=>{await a(`POST`,`agent/status`,{agent:e,session:t,busy:n})},setup:{view:()=>n(`settings/provider`),keep:e=>a(`PUT`,`settings/provider`,e),check:e=>a(`POST`,`settings/provider/check`,{draft:e}),models:async e=>(await a(`POST`,`settings/provider/models`,{draft:e})).models,report:async()=>(await a(`POST`,`settings/report`,{})).text},bases:{list:()=>n(`bases`),lend:async(e,t)=>(await a(`POST`,`bases/lend`,{name:e,lend:t})).bases},terminal:{view:()=>n(`terminal`),prompt:async(e,t)=>{await a(`POST`,`terminal/prompt`,{asked:e,given:t})},stop:async()=>{await a(`POST`,`terminal/stop`,{})},reply:async(e,t)=>{await a(`POST`,`terminal/permission`,{id:e,decision:t})}},events(t){let n=new EventSource(e+`events`),r=e=>{try{t(JSON.parse(e.data))}catch{}};for(let e of[`note-changed`,`journal`,`record`,`iso-start`,`iso-step`,`iso-text`,`iso-item`,`iso-answer`,`iso-taken`,`iso-done`,`iso-stopped`,`iso-failed`,`iso-retry`,`context`,`agent-start`,`agent-step`,`agent-done`,`agent-sent`,`agent-received`,`terminal`])n.addEventListener(e,r);return()=>n.close()}}}var l=class{api;#e=e(null);get session(){return t(this.#e)}set session(e){n(this.#e,e)}#t=e({notes:[],dirs:[]});get listing(){return t(this.#t)}set listing(e){n(this.#t,e)}#n=e(``);get error(){return t(this.#n)}set error(e){n(this.#n,e,!0)}#r=e(``);get open(){return t(this.#r)}set open(e){n(this.#r,e,!0)}#i=e(``);get here(){return t(this.#i)}set here(e){n(this.#i,e,!0)}#a=e(null);get saving(){return t(this.#a)}set saving(e){n(this.#a,e,!0)}#o=e(null);get atlas(){return t(this.#o)}set atlas(e){n(this.#o,e)}#s=e(null);get signIn(){return t(this.#s)}set signIn(e){n(this.#s,e)}#c=e(null);get iso(){return t(this.#c)}set iso(e){n(this.#c,e)}watching=``;listeners=new Set;relist=null;async load(e=c()){this.api=e;try{[this.session,this.listing]=await Promise.all([e.session(),e.notes()])}catch(e){this.error=e.message;return}await this.signedIn(),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 startSignIn(){let{url:e}=await this.api.connect(location.origin+location.pathname);try{sessionStorage.setItem(u,location.hash)}catch{}location.assign(e)}async signedIn(){let e=new URLSearchParams(location.search),t,n;try{if(e.has(`code`)||e.has(`state`)||e.has(`error`)){let t=sessionStorage.getItem(u)??location.hash;return sessionStorage.removeItem(u),sessionStorage.setItem(d,JSON.stringify({code:e.get(`code`),state:e.get(`state`)})),location.replace(location.pathname+t),new Promise(()=>void 0)}let r=sessionStorage.getItem(d);if(r===null)return;sessionStorage.removeItem(d),{code:t,state:n}=JSON.parse(r)}catch{if({code:t,state:n}={code:e.get(`code`),state:e.get(`state`)},!t&&!n)return}if(!t||!n)this.signIn={ok:!1,message:`No key was made: the sign-in was left or refused.`};else try{let e=await this.api.connected(t,n);this.signIn={ok:!0,message:`Signed in at ${e.provider}: a key was made for isorite, and is held on this device.`}}catch(e){this.signIn={ok:!1,message:e.message}}}async refresh(){try{this.listing=await this.api.notes()}catch{}}follow(e){if(e.type===`iso-start`){this.iso={request:e.request,note:e.note,agent:null,state:`reading`,steps:[],message:``,start:e,text:``};return}if((e.type===`agent-start`||e.type===`agent-step`)&&this.iso?.request!==e.request){if(this.iso&&!this.iso.agent&&(this.iso.state===`reading`||this.iso.state===`writing`))return;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===`iso-step`||e.type===`agent-step`?this.iso={...t,state:`reading`,steps:[...t.steps,e.step]}:e.type===`iso-text`?this.iso={...t,state:`writing`,text:e.again?e.delta:(t.text??``)+e.delta}:e.type===`iso-done`||e.type===`agent-done`?this.iso={...t,state:`done`}:e.type===`iso-stopped`?this.iso={...t,state:`stopped`}:e.type===`iso-failed`&&(this.iso={...t,state:`failed`,message:e.message}))}on(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}},u=`isorite.sign-in.back`,d=`isorite.sign-in.code`,f=new l,p=e=>r(`/n/[...id]`,{id:e});function m(e){return e.normalize(`NFKD`).replace(/[̀-ͯ]/g,``).toLowerCase().replace(/[^\p{L}\p{N}]+/gu,`-`).replace(/^-+|-+$/g,``)}function h(e){let t=e.trim().replace(/^\/+/,``).replace(/\.md$/,``),n=t.includes(`/`)?f.listing.notes.filter(e=>e.id===t):f.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{s as a,m as i,h as n,o,p as r,a as s,f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){e={...x,...e};var t=e.inline,n=e.tokenHooks,r=e.documentTypes||{},i=e.mediaTypes||{},a=e.mediaFeatures||{},o=e.mediaValueKeywords||{},s=e.propertyKeywords||{},c=e.nonStandardPropertyKeywords||{},l=e.fontProperties||{},u=e.counterDescriptors||{},d=e.colorKeywords||{},f=e.valueKeywords||{},p=e.allowNested,m=e.lineComment,h=e.supportsAtComponent===!0,g=e.highlightNonStandardPropertyKeywords!==!1,_,v;function y(e,t){return _=t,e}function S(e,t){var r=e.next();if(n[r]){var i=n[r](e,t);if(i!==!1)return i}if(r==`@`)return e.eatWhile(/[\w\\\-]/),y(`def`,e.current());if(r==`=`||(r==`~`||r==`|`)&&e.eat(`=`))return y(null,`compare`);if(r==`"`||r==`'`)return t.tokenize=C(r),t.tokenize(e,t);if(r==`#`)return e.eatWhile(/[\w\\\-]/),y(`atom`,`hash`);if(r==`!`)return e.match(/^\s*\w*/),y(`keyword`,`important`);if(/\d/.test(r)||r==`.`&&e.eat(/\d/))return e.eatWhile(/[\w.%]/),y(`number`,`unit`);if(r===`-`){if(/[\d.]/.test(e.peek()))return e.eatWhile(/[\w.%]/),y(`number`,`unit`);if(e.match(/^-[\w\\\-]*/))return e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?y(`def`,`variable-definition`):y(`variableName`,`variable`);if(e.match(/^\w+-/))return y(`meta`,`meta`)}else if(/[,+>*\/]/.test(r))return y(null,`select-op`);else if(r==`.`&&e.match(/^-?[_a-z][_a-z0-9-]*/i))return y(`qualifier`,`qualifier`);else if(/[:;{}\[\]\(\)]/.test(r))return y(null,r);else if(e.match(/^[\w-.]+(?=\()/))return/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=w),y(`variableName.function`,`variable`);else if(/[\w\\\-]/.test(r))return e.eatWhile(/[\w\\\-]/),y(`property`,`word`);else return y(null,null)}function C(e){return function(t,n){for(var r=!1,i;(i=t.next())!=null;){if(i==e&&!r){e==`)`&&t.backUp(1);break}r=!r&&i==`\\`}return(i==e||!r&&e!=`)`)&&(n.tokenize=null),y(`string`,`string`)}}function w(e,t){return e.next(),t.tokenize=e.match(/^\s*[\"\')]/,!1)?null:C(`)`),y(null,`(`)}function T(e,t,n){this.type=e,this.indent=t,this.prev=n}function E(e,t,n,r){return e.context=new T(n,t.indentation()+(r===!1?0:t.indentUnit),e.context),n}function D(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function O(e,t,n){return j[n.context.type](e,t,n)}function k(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return O(e,t,n)}function A(e){var t=e.current().toLowerCase();v=f.hasOwnProperty(t)?`atom`:d.hasOwnProperty(t)?`keyword`:`variable`}var j={};return j.top=function(e,t,n){if(e==`{`)return E(n,t,`block`);if(e==`}`&&n.context.prev)return D(n);if(h&&/@component/i.test(e))return E(n,t,`atComponentBlock`);if(/^@(-moz-)?document$/i.test(e))return E(n,t,`documentTypes`);if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return E(n,t,`atBlock`);if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,`restricted_atBlock_before`;if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return`keyframes`;if(e&&e.charAt(0)==`@`)return E(n,t,`at`);if(e==`hash`)v=`builtin`;else if(e==`word`)v=`tag`;else if(e==`variable-definition`)return`maybeprop`;else if(e==`interpolation`)return E(n,t,`interpolation`);else if(e==`:`)return`pseudo`;else if(p&&e==`(`)return E(n,t,`parens`);return n.context.type},j.block=function(e,t,n){if(e==`word`){var r=t.current().toLowerCase();return s.hasOwnProperty(r)?(v=`property`,`maybeprop`):c.hasOwnProperty(r)?(v=g?`string.special`:`property`,`maybeprop`):p?(v=t.match(/^\s*:(?:\s|$)/,!1)?`property`:`tag`,`block`):(v=`error`,`maybeprop`)}return e==`meta`?`block`:!p&&(e==`hash`||e==`qualifier`)?(v=`error`,`block`):j.top(e,t,n)},j.maybeprop=function(e,t,n){return e==`:`?E(n,t,`prop`):O(e,t,n)},j.prop=function(e,t,n){if(e==`;`)return D(n);if(e==`{`&&p)return E(n,t,`propBlock`);if(e==`}`||e==`{`)return k(e,t,n);if(e==`(`)return E(n,t,`parens`);if(e==`hash`&&!/^#([0-9a-fA-F]{3,4}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$/.test(t.current()))v=`error`;else if(e==`word`)A(t);else if(e==`interpolation`)return E(n,t,`interpolation`);return`prop`},j.propBlock=function(e,t,n){return e==`}`?D(n):e==`word`?(v=`property`,`maybeprop`):n.context.type},j.parens=function(e,t,n){return e==`{`||e==`}`?k(e,t,n):e==`)`?D(n):e==`(`?E(n,t,`parens`):e==`interpolation`?E(n,t,`interpolation`):(e==`word`&&A(t),`parens`)},j.pseudo=function(e,t,n){return e==`meta`?`pseudo`:e==`word`?(v=`variableName.constant`,n.context.type):O(e,t,n)},j.documentTypes=function(e,t,n){return e==`word`&&r.hasOwnProperty(t.current())?(v=`tag`,n.context.type):j.atBlock(e,t,n)},j.atBlock=function(e,t,n){if(e==`(`)return E(n,t,`atBlock_parens`);if(e==`}`||e==`;`)return k(e,t,n);if(e==`{`)return D(n)&&E(n,t,p?`block`:`top`);if(e==`interpolation`)return E(n,t,`interpolation`);if(e==`word`){var r=t.current().toLowerCase();v=r==`only`||r==`not`||r==`and`||r==`or`?`keyword`:i.hasOwnProperty(r)?`attribute`:a.hasOwnProperty(r)?`property`:o.hasOwnProperty(r)?`keyword`:s.hasOwnProperty(r)?`property`:c.hasOwnProperty(r)?g?`string.special`:`property`:f.hasOwnProperty(r)?`atom`:d.hasOwnProperty(r)?`keyword`:`error`}return n.context.type},j.atComponentBlock=function(e,t,n){return e==`}`?k(e,t,n):e==`{`?D(n)&&E(n,t,p?`block`:`top`,!1):(e==`word`&&(v=`error`),n.context.type)},j.atBlock_parens=function(e,t,n){return e==`)`?D(n):e==`{`||e==`}`?k(e,t,n,2):j.atBlock(e,t,n)},j.restricted_atBlock_before=function(e,t,n){return e==`{`?E(n,t,`restricted_atBlock`):e==`word`&&n.stateArg==`@counter-style`?(v=`variable`,`restricted_atBlock_before`):O(e,t,n)},j.restricted_atBlock=function(e,t,n){return e==`}`?(n.stateArg=null,D(n)):e==`word`?(v=n.stateArg==`@font-face`&&!l.hasOwnProperty(t.current().toLowerCase())||n.stateArg==`@counter-style`&&!u.hasOwnProperty(t.current().toLowerCase())?`error`:`property`,`maybeprop`):`restricted_atBlock`},j.keyframes=function(e,t,n){return e==`word`?(v=`variable`,`keyframes`):e==`{`?E(n,t,`top`):O(e,t,n)},j.at=function(e,t,n){return e==`;`?D(n):e==`{`||e==`}`?k(e,t,n):(e==`word`?v=`tag`:e==`hash`&&(v=`builtin`),`at`)},j.interpolation=function(e,t,n){return e==`}`?D(n):e==`{`||e==`;`?k(e,t,n):(e==`word`?v=`variable`:e!=`variable`&&e!=`(`&&e!=`)`&&(v=`error`),`interpolation`)},{name:e.name,startState:function(){return{tokenize:null,state:t?`block`:`top`,stateArg:null,context:new T(t?`block`:`top`,0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||S)(e,t);return n&&typeof n==`object`&&(_=n[1],n=n[0]),v=n,_!=`comment`&&(t.state=j[t.state](_,e,t)),v},indent:function(e,t,n){var r=e.context,i=t&&t.charAt(0),a=r.indent;return r.type==`prop`&&(i==`}`||i==`)`)&&(r=r.prev),r.prev&&(i==`}`&&(r.type==`block`||r.type==`top`||r.type==`interpolation`||r.type==`restricted_atBlock`)?(r=r.prev,a=r.indent):(i==`)`&&(r.type==`parens`||r.type==`atBlock_parens`)||i==`{`&&(r.type==`at`||r.type==`atBlock`))&&(a=Math.max(0,r.indent-n.unit))),a},languageData:{indentOnInput:/^\s*\}$/,commentTokens:{line:m,block:{open:`/*`,close:`*/`}},autocomplete:b}}}function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}var n=[`domain`,`regexp`,`url`,`url-prefix`],r=t(n),i=[`all`,`aural`,`braille`,`handheld`,`print`,`projection`,`screen`,`tty`,`tv`,`embossed`],a=t(i),o=`width.min-width.max-width.height.min-height.max-height.device-width.min-device-width.max-device-width.device-height.min-device-height.max-device-height.aspect-ratio.min-aspect-ratio.max-aspect-ratio.device-aspect-ratio.min-device-aspect-ratio.max-device-aspect-ratio.color.min-color.max-color.color-index.min-color-index.max-color-index.monochrome.min-monochrome.max-monochrome.resolution.min-resolution.max-resolution.scan.grid.orientation.device-pixel-ratio.min-device-pixel-ratio.max-device-pixel-ratio.pointer.any-pointer.hover.any-hover.prefers-color-scheme.dynamic-range.video-dynamic-range`.split(`.`),s=t(o),c=[`landscape`,`portrait`,`none`,`coarse`,`fine`,`on-demand`,`hover`,`interlace`,`progressive`,`dark`,`light`,`standard`,`high`],l=t(c),u=`align-content.align-items.align-self.alignment-adjust.alignment-baseline.all.anchor-point.animation.animation-delay.animation-direction.animation-duration.animation-fill-mode.animation-iteration-count.animation-name.animation-play-state.animation-timing-function.appearance.azimuth.backdrop-filter.backface-visibility.background.background-attachment.background-blend-mode.background-clip.background-color.background-image.background-origin.background-position.background-position-x.background-position-y.background-repeat.background-size.baseline-shift.binding.bleed.block-size.bookmark-label.bookmark-level.bookmark-state.bookmark-target.border.border-bottom.border-bottom-color.border-bottom-left-radius.border-bottom-right-radius.border-bottom-style.border-bottom-width.border-collapse.border-color.border-image.border-image-outset.border-image-repeat.border-image-slice.border-image-source.border-image-width.border-left.border-left-color.border-left-style.border-left-width.border-radius.border-right.border-right-color.border-right-style.border-right-width.border-spacing.border-style.border-top.border-top-color.border-top-left-radius.border-top-right-radius.border-top-style.border-top-width.border-width.bottom.box-decoration-break.box-shadow.box-sizing.break-after.break-before.break-inside.caption-side.caret-color.clear.clip.color.color-profile.column-count.column-fill.column-gap.column-rule.column-rule-color.column-rule-style.column-rule-width.column-span.column-width.columns.contain.content.counter-increment.counter-reset.crop.cue.cue-after.cue-before.cursor.direction.display.dominant-baseline.drop-initial-after-adjust.drop-initial-after-align.drop-initial-before-adjust.drop-initial-before-align.drop-initial-size.drop-initial-value.elevation.empty-cells.fit.fit-content.fit-position.flex.flex-basis.flex-direction.flex-flow.flex-grow.flex-shrink.flex-wrap.float.float-offset.flow-from.flow-into.font.font-family.font-feature-settings.font-kerning.font-language-override.font-optical-sizing.font-size.font-size-adjust.font-stretch.font-style.font-synthesis.font-variant.font-variant-alternates.font-variant-caps.font-variant-east-asian.font-variant-ligatures.font-variant-numeric.font-variant-position.font-variation-settings.font-weight.gap.grid.grid-area.grid-auto-columns.grid-auto-flow.grid-auto-rows.grid-column.grid-column-end.grid-column-gap.grid-column-start.grid-gap.grid-row.grid-row-end.grid-row-gap.grid-row-start.grid-template.grid-template-areas.grid-template-columns.grid-template-rows.hanging-punctuation.height.hyphens.icon.image-orientation.image-rendering.image-resolution.inline-box-align.inset.inset-block.inset-block-end.inset-block-start.inset-inline.inset-inline-end.inset-inline-start.isolation.justify-content.justify-items.justify-self.left.letter-spacing.line-break.line-height.line-height-step.line-stacking.line-stacking-ruby.line-stacking-shift.line-stacking-strategy.list-style.list-style-image.list-style-position.list-style-type.margin.margin-bottom.margin-left.margin-right.margin-top.marks.marquee-direction.marquee-loop.marquee-play-count.marquee-speed.marquee-style.mask-clip.mask-composite.mask-image.mask-mode.mask-origin.mask-position.mask-repeat.mask-size.mask-type.max-block-size.max-height.max-inline-size.max-width.min-block-size.min-height.min-inline-size.min-width.mix-blend-mode.move-to.nav-down.nav-index.nav-left.nav-right.nav-up.object-fit.object-position.offset.offset-anchor.offset-distance.offset-path.offset-position.offset-rotate.opacity.order.orphans.outline.outline-color.outline-offset.outline-style.outline-width.overflow.overflow-style.overflow-wrap.overflow-x.overflow-y.padding.padding-bottom.padding-left.padding-right.padding-top.page.page-break-after.page-break-before.page-break-inside.page-policy.pause.pause-after.pause-before.perspective.perspective-origin.pitch.pitch-range.place-content.place-items.place-self.play-during.position.presentation-level.punctuation-trim.quotes.region-break-after.region-break-before.region-break-inside.region-fragment.rendering-intent.resize.rest.rest-after.rest-before.richness.right.rotate.rotation.rotation-point.row-gap.ruby-align.ruby-overhang.ruby-position.ruby-span.scale.scroll-behavior.scroll-margin.scroll-margin-block.scroll-margin-block-end.scroll-margin-block-start.scroll-margin-bottom.scroll-margin-inline.scroll-margin-inline-end.scroll-margin-inline-start.scroll-margin-left.scroll-margin-right.scroll-margin-top.scroll-padding.scroll-padding-block.scroll-padding-block-end.scroll-padding-block-start.scroll-padding-bottom.scroll-padding-inline.scroll-padding-inline-end.scroll-padding-inline-start.scroll-padding-left.scroll-padding-right.scroll-padding-top.scroll-snap-align.scroll-snap-type.shape-image-threshold.shape-inside.shape-margin.shape-outside.size.speak.speak-as.speak-header.speak-numeral.speak-punctuation.speech-rate.stress.string-set.tab-size.table-layout.target.target-name.target-new.target-position.text-align.text-align-last.text-combine-upright.text-decoration.text-decoration-color.text-decoration-line.text-decoration-skip.text-decoration-skip-ink.text-decoration-style.text-emphasis.text-emphasis-color.text-emphasis-position.text-emphasis-style.text-height.text-indent.text-justify.text-orientation.text-outline.text-overflow.text-rendering.text-shadow.text-size-adjust.text-space-collapse.text-transform.text-underline-position.text-wrap.top.touch-action.transform.transform-origin.transform-style.transition.transition-delay.transition-duration.transition-property.transition-timing-function.translate.unicode-bidi.user-select.vertical-align.visibility.voice-balance.voice-duration.voice-family.voice-pitch.voice-range.voice-rate.voice-stress.voice-volume.volume.white-space.widows.width.will-change.word-break.word-spacing.word-wrap.writing-mode.z-index.clip-path.clip-rule.mask.enable-background.filter.flood-color.flood-opacity.lighting-color.stop-color.stop-opacity.pointer-events.color-interpolation.color-interpolation-filters.color-rendering.fill.fill-opacity.fill-rule.image-rendering.marker.marker-end.marker-mid.marker-start.paint-order.shape-rendering.stroke.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke-width.text-rendering.baseline-shift.dominant-baseline.glyph-orientation-horizontal.glyph-orientation-vertical.text-anchor.writing-mode`.split(`.`),d=t(u),f=`accent-color.aspect-ratio.border-block.border-block-color.border-block-end.border-block-end-color.border-block-end-style.border-block-end-width.border-block-start.border-block-start-color.border-block-start-style.border-block-start-width.border-block-style.border-block-width.border-inline.border-inline-color.border-inline-end.border-inline-end-color.border-inline-end-style.border-inline-end-width.border-inline-start.border-inline-start-color.border-inline-start-style.border-inline-start-width.border-inline-style.border-inline-width.content-visibility.margin-block.margin-block-end.margin-block-start.margin-inline.margin-inline-end.margin-inline-start.overflow-anchor.overscroll-behavior.padding-block.padding-block-end.padding-block-start.padding-inline.padding-inline-end.padding-inline-start.scroll-snap-stop.scrollbar-3d-light-color.scrollbar-arrow-color.scrollbar-base-color.scrollbar-dark-shadow-color.scrollbar-face-color.scrollbar-highlight-color.scrollbar-shadow-color.scrollbar-track-color.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.shape-inside.zoom`.split(`.`),p=t(f),m=t([`font-display`,`font-family`,`src`,`unicode-range`,`font-variant`,`font-feature-settings`,`font-stretch`,`font-weight`,`font-style`]),h=t([`additive-symbols`,`fallback`,`negative`,`pad`,`prefix`,`range`,`speak-as`,`suffix`,`symbols`,`system`]),g=`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.grey.green.greenyellow.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`.split(`.`),_=t(g),v=`above.absolute.activeborder.additive.activecaption.afar.after-white-space.ahead.alias.all.all-scroll.alphabetic.alternate.always.amharic.amharic-abegede.antialiased.appworkspace.arabic-indic.armenian.asterisks.attr.auto.auto-flow.avoid.avoid-column.avoid-page.avoid-region.axis-pan.background.backwards.baseline.below.bidi-override.binary.bengali.blink.block.block-axis.blur.bold.bolder.border.border-box.both.bottom.break.break-all.break-word.brightness.bullets.button.buttonface.buttonhighlight.buttonshadow.buttontext.calc.cambodian.capitalize.caps-lock-indicator.caption.captiontext.caret.cell.center.checkbox.circle.cjk-decimal.cjk-earthly-branch.cjk-heavenly-stem.cjk-ideographic.clear.clip.close-quote.col-resize.collapse.color.color-burn.color-dodge.column.column-reverse.compact.condensed.conic-gradient.contain.content.contents.content-box.context-menu.continuous.contrast.copy.counter.counters.cover.crop.cross.crosshair.cubic-bezier.currentcolor.cursive.cyclic.darken.dashed.decimal.decimal-leading-zero.default.default-button.dense.destination-atop.destination-in.destination-out.destination-over.devanagari.difference.disc.discard.disclosure-closed.disclosure-open.document.dot-dash.dot-dot-dash.dotted.double.down.drop-shadow.e-resize.ease.ease-in.ease-in-out.ease-out.element.ellipse.ellipsis.embed.end.ethiopic.ethiopic-abegede.ethiopic-abegede-am-et.ethiopic-abegede-gez.ethiopic-abegede-ti-er.ethiopic-abegede-ti-et.ethiopic-halehame-aa-er.ethiopic-halehame-aa-et.ethiopic-halehame-am-et.ethiopic-halehame-gez.ethiopic-halehame-om-et.ethiopic-halehame-sid-et.ethiopic-halehame-so-et.ethiopic-halehame-ti-er.ethiopic-halehame-ti-et.ethiopic-halehame-tig.ethiopic-numeric.ew-resize.exclusion.expanded.extends.extra-condensed.extra-expanded.fantasy.fast.fill.fill-box.fixed.flat.flex.flex-end.flex-start.footnotes.forwards.from.geometricPrecision.georgian.grayscale.graytext.grid.groove.gujarati.gurmukhi.hand.hangul.hangul-consonant.hard-light.hebrew.help.hidden.hide.higher.highlight.highlighttext.hiragana.hiragana-iroha.horizontal.hsl.hsla.hue.hue-rotate.icon.ignore.inactiveborder.inactivecaption.inactivecaptiontext.infinite.infobackground.infotext.inherit.initial.inline.inline-axis.inline-block.inline-flex.inline-grid.inline-table.inset.inside.intrinsic.invert.italic.japanese-formal.japanese-informal.justify.kannada.katakana.katakana-iroha.keep-all.khmer.korean-hangul-formal.korean-hanja-formal.korean-hanja-informal.landscape.lao.large.larger.left.level.lighter.lighten.line-through.linear.linear-gradient.lines.list-item.listbox.listitem.local.logical.loud.lower.lower-alpha.lower-armenian.lower-greek.lower-hexadecimal.lower-latin.lower-norwegian.lower-roman.lowercase.ltr.luminosity.malayalam.manipulation.match.matrix.matrix3d.media-play-button.media-slider.media-sliderthumb.media-volume-slider.media-volume-sliderthumb.medium.menu.menulist.menulist-button.menutext.message-box.middle.min-intrinsic.mix.mongolian.monospace.move.multiple.multiple_mask_images.multiply.myanmar.n-resize.narrower.ne-resize.nesw-resize.no-close-quote.no-drop.no-open-quote.no-repeat.none.normal.not-allowed.nowrap.ns-resize.numbers.numeric.nw-resize.nwse-resize.oblique.octal.opacity.open-quote.optimizeLegibility.optimizeSpeed.oriya.oromo.outset.outside.outside-shape.overlay.overline.padding.padding-box.painted.page.paused.persian.perspective.pinch-zoom.plus-darker.plus-lighter.pointer.polygon.portrait.pre.pre-line.pre-wrap.preserve-3d.progress.push-button.radial-gradient.radio.read-only.read-write.read-write-plaintext-only.rectangle.region.relative.repeat.repeating-linear-gradient.repeating-radial-gradient.repeating-conic-gradient.repeat-x.repeat-y.reset.reverse.rgb.rgba.ridge.right.rotate.rotate3d.rotateX.rotateY.rotateZ.round.row.row-resize.row-reverse.rtl.run-in.running.s-resize.sans-serif.saturate.saturation.scale.scale3d.scaleX.scaleY.scaleZ.screen.scroll.scrollbar.scroll-position.se-resize.searchfield.searchfield-cancel-button.searchfield-decoration.searchfield-results-button.searchfield-results-decoration.self-start.self-end.semi-condensed.semi-expanded.separate.sepia.serif.show.sidama.simp-chinese-formal.simp-chinese-informal.single.skew.skewX.skewY.skip-white-space.slide.slider-horizontal.slider-vertical.sliderthumb-horizontal.sliderthumb-vertical.slow.small.small-caps.small-caption.smaller.soft-light.solid.somali.source-atop.source-in.source-out.source-over.space.space-around.space-between.space-evenly.spell-out.square.square-button.start.static.status-bar.stretch.stroke.stroke-box.sub.subpixel-antialiased.svg_masks.super.sw-resize.symbolic.symbols.system-ui.table.table-caption.table-cell.table-column.table-column-group.table-footer-group.table-header-group.table-row.table-row-group.tamil.telugu.text.text-bottom.text-top.textarea.textfield.thai.thick.thin.threeddarkshadow.threedface.threedhighlight.threedlightshadow.threedshadow.tibetan.tigre.tigrinya-er.tigrinya-er-abegede.tigrinya-et.tigrinya-et-abegede.to.top.trad-chinese-formal.trad-chinese-informal.transform.translate.translate3d.translateX.translateY.translateZ.transparent.ultra-condensed.ultra-expanded.underline.unidirectional-pan.unset.up.upper-alpha.upper-armenian.upper-greek.upper-hexadecimal.upper-latin.upper-norwegian.upper-roman.uppercase.urdu.url.var.vertical.vertical-text.view-box.visible.visibleFill.visiblePainted.visibleStroke.visual.w-resize.wait.wave.wider.window.windowframe.windowtext.words.wrap.wrap-reverse.x-large.x-small.xor.xx-large.xx-small`.split(`.`),y=t(v),b=n.concat(i).concat(o).concat(c).concat(u).concat(f).concat(g).concat(v),x={documentTypes:r,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=S,S(e,t)):!1}}};e({name:`css`});function S(e,t){for(var n=!1,r;(r=e.next())!=null;){if(n&&r==`/`){t.tokenize=null;break}n=r==`*`}return[`comment`,`comment`]}e({name:`scss`,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=S,S(e,t)):[`operator`,`operator`]},":":function(e){return e.match(/^\s*\{/,!1)?[null,null]:!1},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?[`def`,`variable-definition`]:[`variableName.special`,`variable`]},"#":function(e){return e.eat(`{`)?[null,`interpolation`]:!1}}}),e({name:`less`,mediaTypes:a,mediaFeatures:s,mediaValueKeywords:l,propertyKeywords:d,nonStandardPropertyKeywords:p,colorKeywords:_,valueKeywords:y,fontProperties:m,allowNested:!0,lineComment:`//`,tokenHooks:{"/":function(e,t){return e.eat(`/`)?(e.skipToEnd(),[`comment`,`comment`]):e.eat(`*`)?(t.tokenize=S,S(e,t)):[`operator`,`operator`]},"@":function(e){return e.eat(`{`)?[null,`interpolation`]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?[`def`,`variable-definition`]:[`variableName`,`variable`])},"&":function(){return[`atom`,`atom`]}}});var C=e({name:`gss`,documentTypes:r,mediaTypes:a,mediaFeatures:s,propertyKeywords:d,nonStandardPropertyKeywords:p,fontProperties:m,counterDescriptors:h,colorKeywords:_,valueKeywords:y,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return e.eat(`*`)?(t.tokenize=S,S(e,t)):!1}}});export{C as gss};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function e(e){var t,n;e?(t=/^(exx?|(ld|cp)([di]r?)?|[lp]ea|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|[de]i|halt|im|in([di]mr?|ir?|irx|2r?)|ot(dmr?|[id]rx|imr?)|out(0?|[di]r?|[di]2r?)|tst(io)?|slp)(\.([sl]?i)?[sl])?\b/i,n=/^(((call|j[pr]|rst|ret[in]?)(\.([sl]?i)?[sl])?)|(rs|st)mix)\b/i):(t=/^(exx?|(ld|cp|in)([di]r?)?|pop|push|ad[cd]|cpl|daa|dec|inc|neg|sbc|sub|and|bit|[cs]cf|x?or|res|set|r[lr]c?a?|r[lr]d|s[lr]a|srl|djnz|nop|rst|[de]i|halt|im|ot[di]r|out[di]?)\b/i,n=/^(call|j[pr]|ret[in]?|b_?(call|jump))\b/i);var r=/^(af?|bc?|c|de?|e|hl?|l|i[xy]?|r|sp)\b/i,i=/^(n?[zc]|p[oe]?|m)\b/i,a=/^([hl][xy]|i[xy][hl]|slia|sll)\b/i,o=/^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;return{name:`z80`,startState:function(){return{context:0}},token:function(s,c){if(s.column()||(c.context=0),s.eatSpace())return null;var l;if(s.eatWhile(/\w/)){if(e&&s.eat(`.`)&&s.eatWhile(/\w/),l=s.current(),s.indentation()){if((c.context==1||c.context==4)&&r.test(l))return c.context=4,`variable`;if(c.context==2&&i.test(l))return c.context=4,`variableName.special`;if(t.test(l))return c.context=1,`keyword`;if(n.test(l))return c.context=2,`keyword`;if(c.context==4&&o.test(l))return`number`;if(a.test(l))return`error`}else if(s.match(o))return`number`;else return null}else if(s.eat(`;`))return s.skipToEnd(),`comment`;else if(s.eat(`"`)){for(;(l=s.next())&&l!=`"`;)l==`\\`&&s.next();return`string`}else if(s.eat(`'`)){if(s.match(/\\?.'/))return`number`}else if(s.eat(`.`)||s.sol()&&s.eat(`#`)){if(c.context=5,s.eatWhile(/\w/))return`def`}else if(s.eat(`$`)){if(s.eatWhile(/[\da-f]/i))return`number`}else if(s.eat(`%`)){if(s.eatWhile(/[01]/))return`number`}else s.next();return null}}}var t=e(!1);e(!0);export{t as z80};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{o as e,u as t,x as n}from"./CX-xckzu.js";import{l as r}from"./8wVGBFSs.js";function i(e,n,i,a){return r(()=>t(e,!1,n,i,a,1))}function a(t,r,a,o,s,c,l){let u=i(t,r,a,4e3);if(u.height===0)return{width:s,height:c,content:l};let d=u.height+12,f=Math.max(s,Math.ceil(u.width+2*o));return{width:f,height:Math.ceil(c+d),content:e(u,f/2,o+u.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${n((f-s)/2)},${n(d)})">${l}</g>`}}export{a as n,i as t};
|