@marimo-team/frontend 0.13.16-dev68 → 0.13.16-dev69
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{ConnectedDataExplorerComponent-DO1X5t3_.js → ConnectedDataExplorerComponent-DRBR54Od.js} +1 -1
- package/dist/assets/{ImageComparisonComponent-BRHsIFdl.js → ImageComparisonComponent-DSOodUYh.js} +1 -1
- package/dist/assets/{VegaLite-CTDBvdM2.js → VegaLite-Bwm5rsCl.js} +1 -1
- package/dist/assets/{_baseEach-BVFB920C.js → _baseEach-DMClerTq.js} +1 -1
- package/dist/assets/_baseMap-CD9hnB3A.js +1 -0
- package/dist/assets/{_baseUniq-BqLOmozF.js → _baseUniq-D3VxhdrA.js} +1 -1
- package/dist/assets/{_createAggregator-EVnMhDXv.js → _createAggregator-Chjh3Q_B.js} +1 -1
- package/dist/assets/{any-language-editor-6cmKD7qY.js → any-language-editor-B5YpYwHL.js} +2 -2
- package/dist/assets/{architectureDiagram-IEHRJDOE-zGzI8CmL.js → architectureDiagram-IEHRJDOE-DUO1IVyn.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-Cr6phlxU.js → blockDiagram-JOT3LUYC-BDha9Wes.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-BI-mJU-E.js → c4Diagram-VJAJSXHY-CzzillVi.js} +1 -1
- package/dist/assets/channel-D-Qw4Rvo.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-tctP1gpO.js → chunk-4BMEZGHF-Bd4h9Ve1.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-Bf3bdgRc.js → chunk-A2AXSNBT-C9dYNlCp.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-BcgLyeS3.js → chunk-AEK57VVT-ex6RRDX-.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-Dbiqmk9b.js → chunk-D6G4REZN-BZj0iHgv.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-D9r8J2lR.js → chunk-RZ5BOZE2-Nztj68nn.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-DFzhomWc.js → chunk-XZIHB7SX-DmtX4Foe.js} +1 -1
- package/dist/assets/{circle-play-BueOSRvA.js → circle-play-p8Sj7AdH.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-BLhpZLAI.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-BLhpZLAI.js +1 -0
- package/dist/assets/clone-CjChZECf.js +1 -0
- package/dist/assets/{compile-BKKk1JJ1.js → compile-Cy--pw_w.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-4xuzeIwA.js → dagre-OKDRZEBW-C5g3Ibk1.js} +1 -1
- package/dist/assets/{data-editor-lWMiyofT.js → data-editor-CqJ6Gyd8.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-Dt_tH0-0.js → diagram-SSKATNLV-BUhH-mdF.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-BgC9h1DB.js → diagram-VNBRO52H-D_3Wxl4t.js} +1 -1
- package/dist/assets/{edit-page-CpSDHxPZ.js → edit-page-IF5Nbx5y.js} +3 -3
- package/dist/assets/{erDiagram-Q7BY3M3F-oBnZtiop.js → erDiagram-Q7BY3M3F-BTIsVAg4.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-C-0FT1a4.js → flowDiagram-4HSFHLVR-BzxvBNyx.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-BfA9NXYc.js → ganttDiagram-APWFNJXF-C1oSDNmR.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-D6ux_YkC.js → gitGraphDiagram-7IBYFJ6S-vn7ob0pJ.js} +1 -1
- package/dist/assets/{graph-D4xQPS7C.js → graph-uTLBHozV.js} +1 -1
- package/dist/assets/{home-page-DIY13QYF.js → home-page-WDzb-8-d.js} +2 -2
- package/dist/assets/{index-CL--UF-b.js → index-BAf07p45.js} +1 -1
- package/dist/assets/{index-BFXhm8PD.js → index-BEVBc6Xg.js} +1 -1
- package/dist/assets/{index-DlF0C0Q6.js → index-BQG1kyOa.js} +1 -1
- package/dist/assets/{index-BZ_INonm.js → index-Bto6WZu4.js} +1 -1
- package/dist/assets/{index-B5f4ymFd.js → index-C5z9w9IC.js} +1 -1
- package/dist/assets/{index-DUy9jgvk.js → index-CAMg0OHB.js} +1 -1
- package/dist/assets/{index-DoKLXy0k.js → index-CDZpqLcS.js} +1 -1
- package/dist/assets/{index-C8t4MIbp.js → index-CNf099oP.js} +213 -212
- package/dist/assets/{index-DvroVzok.js → index-COVmIxVW.js} +1 -1
- package/dist/assets/index-CgF_B7vt.js +1 -0
- package/dist/assets/{index-uDomeUkX.js → index-D1SXFm6O.js} +1 -1
- package/dist/assets/{index-D89vnocT.js → index-D2pgOx78.js} +1 -1
- package/dist/assets/{index-D9_Lthsv.js → index-D4lX6WOv.js} +1 -1
- package/dist/assets/{index-Cj-7a49z.js → index-DAwRoOnr.js} +1 -1
- package/dist/assets/{index-liBV1mSa.js → index-DR7SMDML.js} +1 -1
- package/dist/assets/{index-BnTpR30W.js → index-DXk_ND4z.js} +1 -1
- package/dist/assets/{index-FDQjjJkM.js → index-DjRR0PIf.js} +1 -1
- package/dist/assets/{index-BIkeuZud.js → index-QCjeiAOJ.js} +1 -1
- package/dist/assets/{index-BE4kLpSd.js → index-YXkxUEQg.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-Bj0Zs9-M.js +2 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-Cl6JSN-v.js → journeyDiagram-U35MCT3I-DsM9d_To.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-COuADwHh.js → kanban-definition-NDS4AKOZ-odt1CP6v.js} +1 -1
- package/dist/assets/{layout-eoHpCARJ.js → layout-D8ZgQVhR.js} +1 -1
- package/dist/assets/{linear-Cl3X6A1r.js → linear-C3K_catQ.js} +1 -1
- package/dist/assets/{mermaid-CFEC0Mqo.js → mermaid-C_X-At-F.js} +4 -4
- package/dist/assets/{min-ogz7IAZ2.js → min-CH5ifDe0.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-BtYle1QQ.js → mindmap-definition-ALO5MXBD-BgX3xjF9.js} +1 -1
- package/dist/assets/{panels-DB-VkiLn.js → panels-CZwW1Bfb.js} +3 -3
- package/dist/assets/{pieDiagram-IB7DONF6-C2rPH5pG.js → pieDiagram-IB7DONF6-DfWM7U-d.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-7MFt64Vg.js → quadrantDiagram-7GDLP6J5-y2t2FYO7.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-C4wSDma6.js → radar-MK3ICKWK-DJQCLSI4.js} +1 -1
- package/dist/assets/{react-plotly-Bx0wbWWf.js → react-plotly-V2SyWtzI.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-Df2vMpIG.js → requirementDiagram-KVF5MWMF-Bm99LLLS.js} +1 -1
- package/dist/assets/{run-page-DpdUdMHC.js → run-page-CU9QDjtU.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-CXoXWkyb.js → sankeyDiagram-QLVOVGJD-IXoqsOAr.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-CNnoJiBp.js → sequenceDiagram-X6HHIX6F-Dyv8Vefc.js} +1 -1
- package/dist/assets/{slides-component-BNKp10nR.js → slides-component-Bva6SRT1.js} +1 -1
- package/dist/assets/{sortBy-B5XStDG7.js → sortBy-DPKLLWQt.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-Ch0aesyU.js → stateDiagram-DGXRK772-DWnDtoyM.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-CSEDwWkR.js +1 -0
- package/dist/assets/{terminal-DxX8pl7V.js → terminal-DDRrFKFT.js} +1 -1
- package/dist/assets/{time-BednD4nz.js → time-SdDHpgFE.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-C8bKNv2S.js → timeline-definition-BDJGKUSR-Cpcz0qZ7.js} +1 -1
- package/dist/assets/{tracing-c5ycTiSU.js → tracing-fC96q6kX.js} +2 -2
- package/dist/assets/{tree-DDkiCSOz.js → tree-agTB8sa3.js} +2 -2
- package/dist/assets/{vega-component-CZ5d79tE.js → vega-component-D7Uk-3Bo.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-DuAJbXov.js → xychartDiagram-VJFVF3MP-CQT-fJDG.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +5 -7
- package/dist/assets/_baseMap-v-baff1g.js +0 -1
- package/dist/assets/channel-BTkMiZey.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-BOJFgEFg.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-BOJFgEFg.js +0 -1
- package/dist/assets/clone-CGX7ghhc.js +0 -1
- package/dist/assets/index-DrTm6PYl.js +0 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BTR3q0ih.js +0 -2
- package/dist/assets/stateDiagram-v2-YXO3MK2T-CgLlVBPr.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
var P1;import{_ as f,n as Pt,l as J,c as R1,o as Wt,r as jt,u as Z1,b as zt,s as Kt,p as Yt,a as Ht,g as qt,q as Xt,j as Qt,t as Jt,J as Zt,v as te,x as tt,y as ee,z as se,A as ie}from"./mermaid-
|
1
|
+
var P1;import{_ as f,n as Pt,l as J,c as R1,o as Wt,r as jt,u as Z1,b as zt,s as Kt,p as Yt,a as Ht,g as qt,q as Xt,j as Qt,t as Jt,J as Zt,v as te,x as tt,y as ee,z as se,A as ie}from"./mermaid-C_X-At-F.js";import{g as ne,s as ae}from"./chunk-RZ5BOZE2-Nztj68nn.js";import{s as k1}from"./transform-Cyp0GDF-.js";import{c as ue}from"./channel-D-Qw4Rvo.js";import"./index-CNf099oP.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var re=(P1=class{constructor(){this.vertexCounter=0,this.config=R1(),this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=zt,this.setAccDescription=Kt,this.setDiagramTitle=Yt,this.getAccTitle=Ht,this.getAccDescription=qt,this.getDiagramTitle=Xt,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}sanitizeText(i){return Qt.sanitizeText(i,this.config)}lookUpDomId(i){for(const a of this.vertices.values())if(a.id===i)return a.domId;return i}addVertex(i,a,n,r,u,p,d={},c){var j,y;if(!i||i.trim().length===0)return;let o;if(c!==void 0){let g;g=c.includes(`
|
2
2
|
`)?c+`
|
3
3
|
`:`{
|
4
4
|
`+c+`
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{_ as d,g as le,s as de,q as ue,p as he,a as fe,b as me,c as ot,d as ye,am as V,l as mt,j as ke,i as pe,y as ge,u as be}from"./mermaid-CFEC0Mqo.js";import{y as gt,bT as Wt,bL as Ot,bK as xe,cp as Te,cq as ve,cr as we,cs as _e,ct as De,cu as $e,bJ as Pt,bI as zt,bH as Bt,bx as Nt,bG as Ht}from"./index-C8t4MIbp.js";import{s as bt}from"./transform-Cyp0GDF-.js";import{t as Ce,m as Se,a as Ee,i as Me}from"./time-BednD4nz.js";import{l as Ae}from"./linear-Cl3X6A1r.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";function Ie(t){return t}var jt=1e-6;function Le(t){return"translate("+t+",0)"}function Ye(t){return"translate(0,"+t+")"}function Fe(t){return n=>+t(n)}function We(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),r=>+t(r)+n}function Oe(){return!this.__axis}function Gt(t,n){var r=[],s=null,i=null,c=6,h=6,A=3,x=typeof window<"u"&&window.devicePixelRatio>1?0:.5,$=t===1||t===4?-1:1,L=t===4||t===2?"x":"y",W=t===1||t===3?Le:Ye;function S(_){var k=s??(n.ticks?n.ticks.apply(n,r):n.domain()),y=i??(n.tickFormat?n.tickFormat.apply(n,r):Ie),E=Math.max(c,0)+A,M=n.range(),P=+M[0]+x,z=+M[M.length-1]+x,G=(n.bandwidth?We:Fe)(n.copy(),x),B=_.selection?_.selection():_,O=B.selectAll(".domain").data([null]),Y=B.selectAll(".tick").data(k,n).order(),p=Y.exit(),w=Y.enter().append("g").attr("class","tick"),g=Y.select("line"),b=Y.select("text");O=O.merge(O.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Y=Y.merge(w),g=g.merge(w.append("line").attr("stroke","currentColor").attr(L+"2",$*c)),b=b.merge(w.append("text").attr("fill","currentColor").attr(L,$*E).attr("dy",t===1?"0em":t===3?"0.71em":"0.32em")),_!==B&&(O=O.transition(_),Y=Y.transition(_),g=g.transition(_),b=b.transition(_),p=p.transition(_).attr("opacity",jt).attr("transform",function(f){return isFinite(f=G(f))?W(f+x):this.getAttribute("transform")}),w.attr("opacity",jt).attr("transform",function(f){var o=this.parentNode.__axis;return W((o&&isFinite(o=o(f))?o:G(f))+x)})),p.remove(),O.attr("d",t===4||t===2?h?"M"+$*h+","+P+"H"+x+"V"+z+"H"+$*h:"M"+x+","+P+"V"+z:h?"M"+P+","+$*h+"V"+x+"H"+z+"V"+$*h:"M"+P+","+x+"H"+z),Y.attr("opacity",1).attr("transform",function(f){return W(G(f)+x)}),g.attr(L+"2",$*c),b.attr(L,$*E).text(y),B.filter(Oe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===2?"start":t===4?"end":"middle"),B.each(function(){this.__axis=G})}return S.scale=function(_){return arguments.length?(n=_,S):n},S.ticks=function(){return r=Array.from(arguments),S},S.tickArguments=function(_){return arguments.length?(r=_==null?[]:Array.from(_),S):r.slice()},S.tickValues=function(_){return arguments.length?(s=_==null?null:Array.from(_),S):s&&s.slice()},S.tickFormat=function(_){return arguments.length?(i=_,S):i},S.tickSize=function(_){return arguments.length?(c=h=+_,S):c},S.tickSizeInner=function(_){return arguments.length?(c=+_,S):c},S.tickSizeOuter=function(_){return arguments.length?(h=+_,S):h},S.tickPadding=function(_){return arguments.length?(A=+_,S):A},S.offset=function(_){return arguments.length?(x=+_,S):x},S}var Vt,yt,Rt={exports:{}};const Pe=gt(Vt?Rt.exports:(Vt=1,Rt.exports=(yt="day",function(t,n,r){var s=function(h){return h.add(4-h.isoWeekday(),yt)},i=n.prototype;i.isoWeekYear=function(){return s(this).year()},i.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),yt);var A,x,$,L=s(this),W=(A=this.isoWeekYear(),$=4-(x=(this.$u?r.utc:r)().year(A).startOf("year")).isoWeekday(),x.isoWeekday()>4&&($+=7),x.add($,yt));return L.diff(W,"week")+1},i.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var c=i.startOf;i.startOf=function(h,A){var x=this.$utils(),$=!!x.u(A)||A;return x.p(h)==="isoweek"?$?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(h,A)}})));var Zt,qt={exports:{}},ze=(Zt||(Zt=1,qt.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,s=/\d\d/,i=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,h={},A=function(k){return(k=+k)+(k>68?1900:2e3)},x=function(k){return function(y){this[k]=+y}},$=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),M=60*E[1]+(+E[2]||0);return M===0?0:E[0]==="+"?-M:M}(k)}],L=function(k){var y=h[k];return y&&(y.indexOf?y:y.s.concat(y.f))},W=function(k,y){var E,M=h.meridiem;if(M){for(var P=1;P<=24;P+=1)if(k.indexOf(M(P,0,y))>-1){E=P>12;break}}else E=k===(y?"pm":"PM");return E},S={A:[c,function(k){this.afternoon=W(k,!1)}],a:[c,function(k){this.afternoon=W(k,!0)}],Q:[r,function(k){this.month=3*(k-1)+1}],S:[r,function(k){this.milliseconds=100*+k}],SS:[s,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[i,x("seconds")],ss:[i,x("seconds")],m:[i,x("minutes")],mm:[i,x("minutes")],H:[i,x("hours")],h:[i,x("hours")],HH:[i,x("hours")],hh:[i,x("hours")],D:[i,x("day")],DD:[s,x("day")],Do:[c,function(k){var y=h.ordinal,E=k.match(/\d+/);if(this.day=E[0],y)for(var M=1;M<=31;M+=1)y(M).replace(/\[|\]/g,"")===k&&(this.day=M)}],w:[i,x("week")],ww:[s,x("week")],M:[i,x("month")],MM:[s,x("month")],MMM:[c,function(k){var y=L("months"),E=(L("monthsShort")||y.map(function(M){return M.slice(0,3)})).indexOf(k)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[c,function(k){var y=L("months").indexOf(k)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,x("year")],YY:[s,function(k){this.year=A(k)}],YYYY:[/\d{4}/,x("year")],Z:$,ZZ:$};function _(k){var y,E;y=k,E=h&&h.formats;for(var M=(k=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,w,g){var b=g&&g.toUpperCase();return w||E[g]||t[g]||E[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,o,m){return o||m.slice(1)})})).match(n),P=M.length,z=0;z<P;z+=1){var G=M[z],B=S[G],O=B&&B[0],Y=B&&B[1];M[z]=Y?{regex:O,parser:Y}:G.replace(/^\[|\]$/g,"")}return function(p){for(var w={},g=0,b=0;g<P;g+=1){var f=M[g];if(typeof f=="string")b+=f.length;else{var o=f.regex,m=f.parser,u=p.slice(b),l=o.exec(u)[0];m.call(w,l),p=p.replace(l,"")}}return function(T){var e=T.afternoon;if(e!==void 0){var v=T.hours;e?v<12&&(T.hours+=12):v===12&&(T.hours=0),delete T.afternoon}}(w),w}}return function(k,y,E){E.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(A=k.parseTwoDigitYear);var M=y.prototype,P=M.parse;M.parse=function(z){var G=z.date,B=z.utc,O=z.args;this.$u=B;var Y=O[1];if(typeof Y=="string"){var p=O[2]===!0,w=O[3]===!0,g=p||w,b=O[2];w&&(b=O[2]),h=this.$locale(),!p&&b&&(h=E.Ls[b]),this.$d=function(u,l,T,e){try{if(["x","X"].indexOf(l)>-1)return new Date((l==="X"?1e3:1)*u);var v=_(l)(u),a=v.year,D=v.month,I=v.day,F=v.hours,C=v.minutes,q=v.seconds,tt=v.milliseconds,st=v.zone,ft=v.week,rt=new Date,H=I||(a||D?1:rt.getDate()),U=a||rt.getFullYear(),j=0;a&&!D||(j=D>0?D-1:rt.getMonth());var et,X=F||0,R=C||0,at=q||0,J=tt||0;return st?new Date(Date.UTC(U,j,H,X,R,at,J+60*st.offset*1e3)):T?new Date(Date.UTC(U,j,H,X,R,at,J)):(et=new Date(U,j,H,X,R,at,J),ft&&(et=e(et).week(ft).toDate()),et)}catch{return new Date("")}}(G,Y,B,E),this.init(),b&&b!==!0&&(this.$L=this.locale(b).$L),g&&G!=this.format(Y)&&(this.$d=new Date("")),h={}}else if(Y instanceof Array)for(var f=Y.length,o=1;o<=f;o+=1){O[1]=Y[o-1];var m=E.apply(this,O);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}o===f&&(this.$d=new Date(""))}else P.call(this,z)}}}()),qt.exports);const Be=gt(ze);var Ut,Qt={exports:{}},Ne=(Ut||(Ut=1,Qt.exports=function(t,n){var r=n.prototype,s=r.format;r.format=function(i){var c=this,h=this.$locale();if(!this.isValid())return s.bind(this)(i);var A=this.$utils(),x=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function($){switch($){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return h.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return h.ordinal(c.week(),"W");case"w":case"ww":return A.s(c.week(),$==="w"?1:2,"0");case"W":case"WW":return A.s(c.isoWeek(),$==="W"?1:2,"0");case"k":case"kk":return A.s(String(c.$H===0?24:c.$H),$==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return $}});return s.bind(this)(x)}}),Qt.exports);const He=gt(Ne);var xt=function(){var t=d(function(o,m,u,l){for(u=u||{},l=o.length;l--;u[o[l]]=m);return u},"o"),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],s=[1,27],i=[1,28],c=[1,29],h=[1,30],A=[1,31],x=[1,32],$=[1,33],L=[1,34],W=[1,9],S=[1,10],_=[1,11],k=[1,12],y=[1,13],E=[1,14],M=[1,15],P=[1,16],z=[1,19],G=[1,20],B=[1,21],O=[1,22],Y=[1,23],p=[1,25],w=[1,35],g={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(o,m,u,l,T,e,v){var a=e.length-1;switch(T){case 1:return e[a-1];case 2:case 6:case 7:this.$=[];break;case 3:e[a-1].push(e[a]),this.$=e[a-1];break;case 4:case 5:this.$=e[a];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(e[a].substr(11)),this.$=e[a].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=e[a].substr(18);break;case 19:l.TopAxis(),this.$=e[a].substr(8);break;case 20:l.setAxisFormat(e[a].substr(11)),this.$=e[a].substr(11);break;case 21:l.setTickInterval(e[a].substr(13)),this.$=e[a].substr(13);break;case 22:l.setExcludes(e[a].substr(9)),this.$=e[a].substr(9);break;case 23:l.setIncludes(e[a].substr(9)),this.$=e[a].substr(9);break;case 24:l.setTodayMarker(e[a].substr(12)),this.$=e[a].substr(12);break;case 27:l.setDiagramTitle(e[a].substr(6)),this.$=e[a].substr(6);break;case 28:this.$=e[a].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=e[a].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(e[a].substr(8)),this.$=e[a].substr(8);break;case 33:l.addTask(e[a-1],e[a]),this.$="task";break;case 34:this.$=e[a-1],l.setClickEvent(e[a-1],e[a],null);break;case 35:this.$=e[a-2],l.setClickEvent(e[a-2],e[a-1],e[a]);break;case 36:this.$=e[a-2],l.setClickEvent(e[a-2],e[a-1],null),l.setLink(e[a-2],e[a]);break;case 37:this.$=e[a-3],l.setClickEvent(e[a-3],e[a-2],e[a-1]),l.setLink(e[a-3],e[a]);break;case 38:this.$=e[a-2],l.setClickEvent(e[a-2],e[a],null),l.setLink(e[a-2],e[a-1]);break;case 39:this.$=e[a-3],l.setClickEvent(e[a-3],e[a-1],e[a]),l.setLink(e[a-3],e[a-2]);break;case 40:this.$=e[a-1],l.setLink(e[a-1],e[a]);break;case 41:case 47:this.$=e[a-1]+" "+e[a];break;case 42:case 43:case 45:this.$=e[a-2]+" "+e[a-1]+" "+e[a];break;case 44:case 46:this.$=e[a-3]+" "+e[a-2]+" "+e[a-1]+" "+e[a]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:s,14:i,15:c,16:h,17:A,18:x,19:18,20:$,21:L,22:W,23:S,24:_,25:k,26:y,27:E,28:M,29:P,30:z,31:G,33:B,35:O,36:Y,37:24,38:p,40:w},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:36,11:17,12:r,13:s,14:i,15:c,16:h,17:A,18:x,19:18,20:$,21:L,22:W,23:S,24:_,25:k,26:y,27:E,28:M,29:P,30:z,31:G,33:B,35:O,36:Y,37:24,38:p,40:w},t(n,[2,5]),t(n,[2,6]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,20]),t(n,[2,21]),t(n,[2,22]),t(n,[2,23]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),t(n,[2,27]),{32:[1,37]},{34:[1,38]},t(n,[2,30]),t(n,[2,31]),t(n,[2,32]),{39:[1,39]},t(n,[2,8]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),{41:[1,40],43:[1,41]},t(n,[2,4]),t(n,[2,28]),t(n,[2,29]),t(n,[2,33]),t(n,[2,34],{42:[1,42],43:[1,43]}),t(n,[2,40],{41:[1,44]}),t(n,[2,35],{43:[1,45]}),t(n,[2,36]),t(n,[2,38],{42:[1,46]}),t(n,[2,37]),t(n,[2,39])],defaultActions:{},parseError:d(function(o,m){if(!m.recoverable){var u=new Error(o);throw u.hash=m,u}this.trace(o)},"parseError"),parse:d(function(o){var m=this,u=[0],l=[],T=[null],e=[],v=this.table,a="",D=0,I=0,F=e.slice.call(arguments,1),C=Object.create(this.lexer),q={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(q.yy[tt]=this.yy[tt]);C.setInput(o,q.yy),q.yy.lexer=C,q.yy.parser=this,C.yylloc===void 0&&(C.yylloc={});var st=C.yylloc;e.push(st);var ft=C.options&&C.options.ranges;function rt(){var Z;return typeof(Z=l.pop()||C.lex()||1)!="number"&&(Z instanceof Array&&(Z=(l=Z).pop()),Z=m.symbols_[Z]||Z),Z}typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,d(function(Z){u.length=u.length-2*Z,T.length=T.length-Z,e.length=e.length-Z},"popStack"),d(rt,"lex");for(var H,U,j,et,X,R,at,J,nt={};;){if(U=u[u.length-1],this.defaultActions[U]?j=this.defaultActions[U]:(H==null&&(H=rt()),j=v[U]&&v[U][H]),j===void 0||!j.length||!j[0]){var Ft="";for(X in J=[],v[U])this.terminals_[X]&&X>2&&J.push("'"+this.terminals_[X]+"'");Ft=C.showPosition?"Parse error on line "+(D+1)+`:
|
1
|
+
import{_ as d,g as le,s as de,q as ue,p as he,a as fe,b as me,c as ot,d as ye,am as V,l as mt,j as ke,i as pe,y as ge,u as be}from"./mermaid-C_X-At-F.js";import{y as gt,bT as Wt,bL as Ot,bK as xe,cp as Te,cq as ve,cr as we,cs as _e,ct as De,cu as $e,bJ as Pt,bI as zt,bH as Bt,bx as Nt,bG as Ht}from"./index-CNf099oP.js";import{s as bt}from"./transform-Cyp0GDF-.js";import{t as Ce,m as Se,a as Ee,i as Me}from"./time-SdDHpgFE.js";import{l as Ae}from"./linear-C3K_catQ.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";import"./init-DLRA0X12.js";function Ie(t){return t}var jt=1e-6;function Le(t){return"translate("+t+",0)"}function Ye(t){return"translate(0,"+t+")"}function Fe(t){return n=>+t(n)}function We(t,n){return n=Math.max(0,t.bandwidth()-2*n)/2,t.round()&&(n=Math.round(n)),r=>+t(r)+n}function Oe(){return!this.__axis}function Gt(t,n){var r=[],s=null,i=null,c=6,h=6,A=3,x=typeof window<"u"&&window.devicePixelRatio>1?0:.5,$=t===1||t===4?-1:1,L=t===4||t===2?"x":"y",W=t===1||t===3?Le:Ye;function S(_){var k=s??(n.ticks?n.ticks.apply(n,r):n.domain()),y=i??(n.tickFormat?n.tickFormat.apply(n,r):Ie),E=Math.max(c,0)+A,M=n.range(),P=+M[0]+x,z=+M[M.length-1]+x,G=(n.bandwidth?We:Fe)(n.copy(),x),B=_.selection?_.selection():_,O=B.selectAll(".domain").data([null]),Y=B.selectAll(".tick").data(k,n).order(),p=Y.exit(),w=Y.enter().append("g").attr("class","tick"),g=Y.select("line"),b=Y.select("text");O=O.merge(O.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),Y=Y.merge(w),g=g.merge(w.append("line").attr("stroke","currentColor").attr(L+"2",$*c)),b=b.merge(w.append("text").attr("fill","currentColor").attr(L,$*E).attr("dy",t===1?"0em":t===3?"0.71em":"0.32em")),_!==B&&(O=O.transition(_),Y=Y.transition(_),g=g.transition(_),b=b.transition(_),p=p.transition(_).attr("opacity",jt).attr("transform",function(f){return isFinite(f=G(f))?W(f+x):this.getAttribute("transform")}),w.attr("opacity",jt).attr("transform",function(f){var o=this.parentNode.__axis;return W((o&&isFinite(o=o(f))?o:G(f))+x)})),p.remove(),O.attr("d",t===4||t===2?h?"M"+$*h+","+P+"H"+x+"V"+z+"H"+$*h:"M"+x+","+P+"V"+z:h?"M"+P+","+$*h+"V"+x+"H"+z+"V"+$*h:"M"+P+","+x+"H"+z),Y.attr("opacity",1).attr("transform",function(f){return W(G(f)+x)}),g.attr(L+"2",$*c),b.attr(L,$*E).text(y),B.filter(Oe).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===2?"start":t===4?"end":"middle"),B.each(function(){this.__axis=G})}return S.scale=function(_){return arguments.length?(n=_,S):n},S.ticks=function(){return r=Array.from(arguments),S},S.tickArguments=function(_){return arguments.length?(r=_==null?[]:Array.from(_),S):r.slice()},S.tickValues=function(_){return arguments.length?(s=_==null?null:Array.from(_),S):s&&s.slice()},S.tickFormat=function(_){return arguments.length?(i=_,S):i},S.tickSize=function(_){return arguments.length?(c=h=+_,S):c},S.tickSizeInner=function(_){return arguments.length?(c=+_,S):c},S.tickSizeOuter=function(_){return arguments.length?(h=+_,S):h},S.tickPadding=function(_){return arguments.length?(A=+_,S):A},S.offset=function(_){return arguments.length?(x=+_,S):x},S}var Vt,yt,Rt={exports:{}};const Pe=gt(Vt?Rt.exports:(Vt=1,Rt.exports=(yt="day",function(t,n,r){var s=function(h){return h.add(4-h.isoWeekday(),yt)},i=n.prototype;i.isoWeekYear=function(){return s(this).year()},i.isoWeek=function(h){if(!this.$utils().u(h))return this.add(7*(h-this.isoWeek()),yt);var A,x,$,L=s(this),W=(A=this.isoWeekYear(),$=4-(x=(this.$u?r.utc:r)().year(A).startOf("year")).isoWeekday(),x.isoWeekday()>4&&($+=7),x.add($,yt));return L.diff(W,"week")+1},i.isoWeekday=function(h){return this.$utils().u(h)?this.day()||7:this.day(this.day()%7?h:h-7)};var c=i.startOf;i.startOf=function(h,A){var x=this.$utils(),$=!!x.u(A)||A;return x.p(h)==="isoweek"?$?this.date(this.date()-(this.isoWeekday()-1)).startOf("day"):this.date(this.date()-1-(this.isoWeekday()-1)+7).endOf("day"):c.bind(this)(h,A)}})));var Zt,qt={exports:{}},ze=(Zt||(Zt=1,qt.exports=function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},n=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,s=/\d\d/,i=/\d\d?/,c=/\d*[^-_:/,()\s\d]+/,h={},A=function(k){return(k=+k)+(k>68?1900:2e3)},x=function(k){return function(y){this[k]=+y}},$=[/[+-]\d\d:?(\d\d)?|Z/,function(k){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),M=60*E[1]+(+E[2]||0);return M===0?0:E[0]==="+"?-M:M}(k)}],L=function(k){var y=h[k];return y&&(y.indexOf?y:y.s.concat(y.f))},W=function(k,y){var E,M=h.meridiem;if(M){for(var P=1;P<=24;P+=1)if(k.indexOf(M(P,0,y))>-1){E=P>12;break}}else E=k===(y?"pm":"PM");return E},S={A:[c,function(k){this.afternoon=W(k,!1)}],a:[c,function(k){this.afternoon=W(k,!0)}],Q:[r,function(k){this.month=3*(k-1)+1}],S:[r,function(k){this.milliseconds=100*+k}],SS:[s,function(k){this.milliseconds=10*+k}],SSS:[/\d{3}/,function(k){this.milliseconds=+k}],s:[i,x("seconds")],ss:[i,x("seconds")],m:[i,x("minutes")],mm:[i,x("minutes")],H:[i,x("hours")],h:[i,x("hours")],HH:[i,x("hours")],hh:[i,x("hours")],D:[i,x("day")],DD:[s,x("day")],Do:[c,function(k){var y=h.ordinal,E=k.match(/\d+/);if(this.day=E[0],y)for(var M=1;M<=31;M+=1)y(M).replace(/\[|\]/g,"")===k&&(this.day=M)}],w:[i,x("week")],ww:[s,x("week")],M:[i,x("month")],MM:[s,x("month")],MMM:[c,function(k){var y=L("months"),E=(L("monthsShort")||y.map(function(M){return M.slice(0,3)})).indexOf(k)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[c,function(k){var y=L("months").indexOf(k)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,x("year")],YY:[s,function(k){this.year=A(k)}],YYYY:[/\d{4}/,x("year")],Z:$,ZZ:$};function _(k){var y,E;y=k,E=h&&h.formats;for(var M=(k=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(p,w,g){var b=g&&g.toUpperCase();return w||E[g]||t[g]||E[b].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(f,o,m){return o||m.slice(1)})})).match(n),P=M.length,z=0;z<P;z+=1){var G=M[z],B=S[G],O=B&&B[0],Y=B&&B[1];M[z]=Y?{regex:O,parser:Y}:G.replace(/^\[|\]$/g,"")}return function(p){for(var w={},g=0,b=0;g<P;g+=1){var f=M[g];if(typeof f=="string")b+=f.length;else{var o=f.regex,m=f.parser,u=p.slice(b),l=o.exec(u)[0];m.call(w,l),p=p.replace(l,"")}}return function(T){var e=T.afternoon;if(e!==void 0){var v=T.hours;e?v<12&&(T.hours+=12):v===12&&(T.hours=0),delete T.afternoon}}(w),w}}return function(k,y,E){E.p.customParseFormat=!0,k&&k.parseTwoDigitYear&&(A=k.parseTwoDigitYear);var M=y.prototype,P=M.parse;M.parse=function(z){var G=z.date,B=z.utc,O=z.args;this.$u=B;var Y=O[1];if(typeof Y=="string"){var p=O[2]===!0,w=O[3]===!0,g=p||w,b=O[2];w&&(b=O[2]),h=this.$locale(),!p&&b&&(h=E.Ls[b]),this.$d=function(u,l,T,e){try{if(["x","X"].indexOf(l)>-1)return new Date((l==="X"?1e3:1)*u);var v=_(l)(u),a=v.year,D=v.month,I=v.day,F=v.hours,C=v.minutes,q=v.seconds,tt=v.milliseconds,st=v.zone,ft=v.week,rt=new Date,H=I||(a||D?1:rt.getDate()),U=a||rt.getFullYear(),j=0;a&&!D||(j=D>0?D-1:rt.getMonth());var et,X=F||0,R=C||0,at=q||0,J=tt||0;return st?new Date(Date.UTC(U,j,H,X,R,at,J+60*st.offset*1e3)):T?new Date(Date.UTC(U,j,H,X,R,at,J)):(et=new Date(U,j,H,X,R,at,J),ft&&(et=e(et).week(ft).toDate()),et)}catch{return new Date("")}}(G,Y,B,E),this.init(),b&&b!==!0&&(this.$L=this.locale(b).$L),g&&G!=this.format(Y)&&(this.$d=new Date("")),h={}}else if(Y instanceof Array)for(var f=Y.length,o=1;o<=f;o+=1){O[1]=Y[o-1];var m=E.apply(this,O);if(m.isValid()){this.$d=m.$d,this.$L=m.$L,this.init();break}o===f&&(this.$d=new Date(""))}else P.call(this,z)}}}()),qt.exports);const Be=gt(ze);var Ut,Qt={exports:{}},Ne=(Ut||(Ut=1,Qt.exports=function(t,n){var r=n.prototype,s=r.format;r.format=function(i){var c=this,h=this.$locale();if(!this.isValid())return s.bind(this)(i);var A=this.$utils(),x=(i||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function($){switch($){case"Q":return Math.ceil((c.$M+1)/3);case"Do":return h.ordinal(c.$D);case"gggg":return c.weekYear();case"GGGG":return c.isoWeekYear();case"wo":return h.ordinal(c.week(),"W");case"w":case"ww":return A.s(c.week(),$==="w"?1:2,"0");case"W":case"WW":return A.s(c.isoWeek(),$==="W"?1:2,"0");case"k":case"kk":return A.s(String(c.$H===0?24:c.$H),$==="k"?1:2,"0");case"X":return Math.floor(c.$d.getTime()/1e3);case"x":return c.$d.getTime();case"z":return"["+c.offsetName()+"]";case"zzz":return"["+c.offsetName("long")+"]";default:return $}});return s.bind(this)(x)}}),Qt.exports);const He=gt(Ne);var xt=function(){var t=d(function(o,m,u,l){for(u=u||{},l=o.length;l--;u[o[l]]=m);return u},"o"),n=[6,8,10,12,13,14,15,16,17,18,20,21,22,23,24,25,26,27,28,29,30,31,33,35,36,38,40],r=[1,26],s=[1,27],i=[1,28],c=[1,29],h=[1,30],A=[1,31],x=[1,32],$=[1,33],L=[1,34],W=[1,9],S=[1,10],_=[1,11],k=[1,12],y=[1,13],E=[1,14],M=[1,15],P=[1,16],z=[1,19],G=[1,20],B=[1,21],O=[1,22],Y=[1,23],p=[1,25],w=[1,35],g={trace:d(function(){},"trace"),yy:{},symbols_:{error:2,start:3,gantt:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NL:10,weekday:11,weekday_monday:12,weekday_tuesday:13,weekday_wednesday:14,weekday_thursday:15,weekday_friday:16,weekday_saturday:17,weekday_sunday:18,weekend:19,weekend_friday:20,weekend_saturday:21,dateFormat:22,inclusiveEndDates:23,topAxis:24,axisFormat:25,tickInterval:26,excludes:27,includes:28,todayMarker:29,title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,section:36,clickStatement:37,taskTxt:38,taskData:39,click:40,callbackname:41,callbackargs:42,href:43,clickStatementDebug:44,$accept:0,$end:1},terminals_:{2:"error",4:"gantt",6:"EOF",8:"SPACE",10:"NL",12:"weekday_monday",13:"weekday_tuesday",14:"weekday_wednesday",15:"weekday_thursday",16:"weekday_friday",17:"weekday_saturday",18:"weekday_sunday",20:"weekend_friday",21:"weekend_saturday",22:"dateFormat",23:"inclusiveEndDates",24:"topAxis",25:"axisFormat",26:"tickInterval",27:"excludes",28:"includes",29:"todayMarker",30:"title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"section",38:"taskTxt",39:"taskData",40:"click",41:"callbackname",42:"callbackargs",43:"href"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[11,1],[19,1],[19,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,2],[37,2],[37,3],[37,3],[37,4],[37,3],[37,4],[37,2],[44,2],[44,3],[44,3],[44,4],[44,3],[44,4],[44,2]],performAction:d(function(o,m,u,l,T,e,v){var a=e.length-1;switch(T){case 1:return e[a-1];case 2:case 6:case 7:this.$=[];break;case 3:e[a-1].push(e[a]),this.$=e[a-1];break;case 4:case 5:this.$=e[a];break;case 8:l.setWeekday("monday");break;case 9:l.setWeekday("tuesday");break;case 10:l.setWeekday("wednesday");break;case 11:l.setWeekday("thursday");break;case 12:l.setWeekday("friday");break;case 13:l.setWeekday("saturday");break;case 14:l.setWeekday("sunday");break;case 15:l.setWeekend("friday");break;case 16:l.setWeekend("saturday");break;case 17:l.setDateFormat(e[a].substr(11)),this.$=e[a].substr(11);break;case 18:l.enableInclusiveEndDates(),this.$=e[a].substr(18);break;case 19:l.TopAxis(),this.$=e[a].substr(8);break;case 20:l.setAxisFormat(e[a].substr(11)),this.$=e[a].substr(11);break;case 21:l.setTickInterval(e[a].substr(13)),this.$=e[a].substr(13);break;case 22:l.setExcludes(e[a].substr(9)),this.$=e[a].substr(9);break;case 23:l.setIncludes(e[a].substr(9)),this.$=e[a].substr(9);break;case 24:l.setTodayMarker(e[a].substr(12)),this.$=e[a].substr(12);break;case 27:l.setDiagramTitle(e[a].substr(6)),this.$=e[a].substr(6);break;case 28:this.$=e[a].trim(),l.setAccTitle(this.$);break;case 29:case 30:this.$=e[a].trim(),l.setAccDescription(this.$);break;case 31:l.addSection(e[a].substr(8)),this.$=e[a].substr(8);break;case 33:l.addTask(e[a-1],e[a]),this.$="task";break;case 34:this.$=e[a-1],l.setClickEvent(e[a-1],e[a],null);break;case 35:this.$=e[a-2],l.setClickEvent(e[a-2],e[a-1],e[a]);break;case 36:this.$=e[a-2],l.setClickEvent(e[a-2],e[a-1],null),l.setLink(e[a-2],e[a]);break;case 37:this.$=e[a-3],l.setClickEvent(e[a-3],e[a-2],e[a-1]),l.setLink(e[a-3],e[a]);break;case 38:this.$=e[a-2],l.setClickEvent(e[a-2],e[a],null),l.setLink(e[a-2],e[a-1]);break;case 39:this.$=e[a-3],l.setClickEvent(e[a-3],e[a-1],e[a]),l.setLink(e[a-3],e[a-2]);break;case 40:this.$=e[a-1],l.setLink(e[a-1],e[a]);break;case 41:case 47:this.$=e[a-1]+" "+e[a];break;case 42:case 43:case 45:this.$=e[a-2]+" "+e[a-1]+" "+e[a];break;case 44:case 46:this.$=e[a-3]+" "+e[a-2]+" "+e[a-1]+" "+e[a]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:r,13:s,14:i,15:c,16:h,17:A,18:x,19:18,20:$,21:L,22:W,23:S,24:_,25:k,26:y,27:E,28:M,29:P,30:z,31:G,33:B,35:O,36:Y,37:24,38:p,40:w},t(n,[2,7],{1:[2,1]}),t(n,[2,3]),{9:36,11:17,12:r,13:s,14:i,15:c,16:h,17:A,18:x,19:18,20:$,21:L,22:W,23:S,24:_,25:k,26:y,27:E,28:M,29:P,30:z,31:G,33:B,35:O,36:Y,37:24,38:p,40:w},t(n,[2,5]),t(n,[2,6]),t(n,[2,17]),t(n,[2,18]),t(n,[2,19]),t(n,[2,20]),t(n,[2,21]),t(n,[2,22]),t(n,[2,23]),t(n,[2,24]),t(n,[2,25]),t(n,[2,26]),t(n,[2,27]),{32:[1,37]},{34:[1,38]},t(n,[2,30]),t(n,[2,31]),t(n,[2,32]),{39:[1,39]},t(n,[2,8]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),{41:[1,40],43:[1,41]},t(n,[2,4]),t(n,[2,28]),t(n,[2,29]),t(n,[2,33]),t(n,[2,34],{42:[1,42],43:[1,43]}),t(n,[2,40],{41:[1,44]}),t(n,[2,35],{43:[1,45]}),t(n,[2,36]),t(n,[2,38],{42:[1,46]}),t(n,[2,37]),t(n,[2,39])],defaultActions:{},parseError:d(function(o,m){if(!m.recoverable){var u=new Error(o);throw u.hash=m,u}this.trace(o)},"parseError"),parse:d(function(o){var m=this,u=[0],l=[],T=[null],e=[],v=this.table,a="",D=0,I=0,F=e.slice.call(arguments,1),C=Object.create(this.lexer),q={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(q.yy[tt]=this.yy[tt]);C.setInput(o,q.yy),q.yy.lexer=C,q.yy.parser=this,C.yylloc===void 0&&(C.yylloc={});var st=C.yylloc;e.push(st);var ft=C.options&&C.options.ranges;function rt(){var Z;return typeof(Z=l.pop()||C.lex()||1)!="number"&&(Z instanceof Array&&(Z=(l=Z).pop()),Z=m.symbols_[Z]||Z),Z}typeof q.yy.parseError=="function"?this.parseError=q.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,d(function(Z){u.length=u.length-2*Z,T.length=T.length-Z,e.length=e.length-Z},"popStack"),d(rt,"lex");for(var H,U,j,et,X,R,at,J,nt={};;){if(U=u[u.length-1],this.defaultActions[U]?j=this.defaultActions[U]:(H==null&&(H=rt()),j=v[U]&&v[U][H]),j===void 0||!j.length||!j[0]){var Ft="";for(X in J=[],v[U])this.terminals_[X]&&X>2&&J.push("'"+this.terminals_[X]+"'");Ft=C.showPosition?"Parse error on line "+(D+1)+`:
|
2
2
|
`+C.showPosition()+`
|
3
3
|
Expecting `+J.join(", ")+", got '"+(this.terminals_[H]||H)+"'":"Parse error on line "+(D+1)+": Unexpected "+(H==1?"end of input":"'"+(this.terminals_[H]||H)+"'"),this.parseError(Ft,{text:C.match,token:this.terminals_[H]||H,line:C.yylineno,loc:st,expected:J})}if(j[0]instanceof Array&&j.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+H);switch(j[0]){case 1:u.push(H),T.push(C.yytext),e.push(C.yylloc),u.push(j[1]),H=null,I=C.yyleng,a=C.yytext,D=C.yylineno,st=C.yylloc;break;case 2:if(R=this.productions_[j[1]][1],nt.$=T[T.length-R],nt._$={first_line:e[e.length-(R||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(R||1)].first_column,last_column:e[e.length-1].last_column},ft&&(nt._$.range=[e[e.length-(R||1)].range[0],e[e.length-1].range[1]]),(et=this.performAction.apply(nt,[a,I,D,q.yy,j[1],T,e].concat(F)))!==void 0)return et;R&&(u=u.slice(0,-1*R*2),T=T.slice(0,-1*R),e=e.slice(0,-1*R)),u.push(this.productions_[j[1]][0]),T.push(nt.$),e.push(nt._$),at=v[u[u.length-2]][u[u.length-1]],u.push(at);break;case 3:return!0}}return!0},"parse")},b=function(){return{EOF:1,parseError:d(function(o,m){if(!this.yy.parser)throw new Error(o);this.yy.parser.parseError(o,m)},"parseError"),setInput:d(function(o,m){return this.yy=m||this.yy||{},this._input=o,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:d(function(){var o=this._input[0];return this.yytext+=o,this.yyleng++,this.offset++,this.match+=o,this.matched+=o,o.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),o},"input"),unput:d(function(o){var m=o.length,u=o.split(/(?:\r\n?|\n)/g);this._input=o+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-m),this.offset-=m;var l=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),u.length-1&&(this.yylineno-=u.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:u?(u.length===l.length?this.yylloc.first_column:0)+l[l.length-u.length].length-u[0].length:this.yylloc.first_column-m},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-m]),this.yyleng=this.yytext.length,this},"unput"),more:d(function(){return this._more=!0,this},"more"),reject:d(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:d(function(o){this.unput(this.match.slice(o))},"less"),pastInput:d(function(){var o=this.matched.substr(0,this.matched.length-this.match.length);return(o.length>20?"...":"")+o.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:d(function(){var o=this.match;return o.length<20&&(o+=this._input.substr(0,20-o.length)),(o.substr(0,20)+(o.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:d(function(){var o=this.pastInput(),m=new Array(o.length+1).join("-");return o+this.upcomingInput()+`
|
package/dist/assets/{gitGraphDiagram-7IBYFJ6S-D6ux_YkC.js → gitGraphDiagram-7IBYFJ6S-vn7ob0pJ.js}
RENAMED
@@ -1,4 +1,4 @@
|
|
1
|
-
import{p as Y}from"./chunk-4BMEZGHF-tctP1gpO.js";import{I as U}from"./chunk-XZIHB7SX-DFzhomWc.js";import{_ as d,q as V,p as X,s as Z,g as J,a as Q,b as tt,l as w,c as rt,u as et,D as ot,y as nt,j as C,E as at,F as st,G as ct,H as it}from"./mermaid-CFEC0Mqo.js";import{p as ht}from"./radar-MK3ICKWK-C4wSDma6.js";import{s as dt}from"./transform-Cyp0GDF-.js";import"./index-C8t4MIbp.js";import"./step-BwsUM5iJ.js";import"./_baseEach-BVFB920C.js";import"./_baseUniq-BqLOmozF.js";import"./min-ogz7IAZ2.js";import"./_baseMap-v-baff1g.js";import"./clone-CGX7ghhc.js";import"./_createAggregator-EVnMhDXv.js";import"./timer-DFzT7np-.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},mt=ct.gitGraph,R=d(()=>at({...mt,...st().gitGraph}),"getConfig"),i=new U(()=>{const e=R(),t=e.mainBranchName,o=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:o}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function G(){return it({length:7})}function D(e,t){const o=Object.create(null);return e.reduce((a,r)=>{const n=t(r);return o[n]||(o[n]=!0,a.push(r)),a},[])}d(G,"getID"),d(D,"uniqBy");var $t=d(function(e){i.records.direction=e},"setDirection"),lt=d(function(e){w.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(t){w.error("error while parsing gitGraph options",t.message)}},"setOptions"),yt=d(function(){return i.records.options},"getOptions"),gt=d(function(e){let t=e.msg,o=e.id;const a=e.type;let r=e.tags;w.info("commit",t,o,a,r),w.debug("Entering commit:",t,o,a,r);const n=R();o=C.sanitizeText(o,n),t=C.sanitizeText(t,n),r=r==null?void 0:r.map(s=>C.sanitizeText(s,n));const c={id:o||i.records.seq+"-"+G(),message:t,seq:i.records.seq++,type:a??p.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),pt=d(function(e){let t=e.name;const o=e.order;if(t=C.sanitizeText(t,R()),i.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);i.records.branches.set(t,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(t,{name:t,order:o}),N(t),w.debug("in createBranch")},"branch"),xt=d(e=>{let t=e.branch,o=e.id;const a=e.type,r=e.tags,n=R();t=C.sanitizeText(t,n),o&&(o=C.sanitizeText(o,n));const c=i.records.branches.get(i.records.currBranch),s=i.records.branches.get(t),m=c?i.records.commits.get(c):void 0,y=s?i.records.commits.get(s):void 0;if(m&&y&&m.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(i.records.currBranch===t){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(m===void 0||!m){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},l}if(!i.records.branches.has(t)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},l}if(y===void 0||!y){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},l}if(m===y){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(o&&i.records.commits.has(o)){const l=new Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom Id");throw l.hash={text:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,token:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${t} ${o}_UNIQUE ${a} ${r==null?void 0:r.join(" ")}`]},l}const $=s||"",h={id:o||`${i.records.seq}-${G()}`,message:`merged branch ${t} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,$],branch:i.records.currBranch,type:p.MERGE,customType:a,customId:!!o,tags:r??[]};i.records.head=h,i.records.commits.set(h.id,h),i.records.branches.set(i.records.currBranch,h.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),ft=d(function(e){let t=e.id,o=e.targetId,a=e.tags,r=e.parent;w.debug("Entering cherryPick:",t,o,a);const n=R();if(t=C.sanitizeText(t,n),o=C.sanitizeText(o,n),a=a==null?void 0:a.map(m=>C.sanitizeText(m,n)),r=C.sanitizeText(r,n),!t||!i.records.commits.has(t)){const m=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},m}const c=i.records.commits.get(t);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&(!Array.isArray(c.parents)||!c.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const s=c.branch;if(c.type===p.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!i.records.commits.has(o)){if(s===i.records.currBranch){const h=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const m=i.records.branches.get(i.records.currBranch);if(m===void 0||!m){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const y=i.records.commits.get(m);if(y===void 0||!y){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const $={id:i.records.seq+"-"+G(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${r}`:""}`]};i.records.head=$,i.records.commits.set($.id,$),i.records.branches.set(i.records.currBranch,$.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),N=d(function(e){if(e=C.sanitizeText(e,R()),!i.records.branches.has(e)){const t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}{i.records.currBranch=e;const t=i.records.branches.get(i.records.currBranch);i.records.head=t!==void 0&&t?i.records.commits.get(t)??null:null}},"checkout");function q(e,t,o){const a=e.indexOf(t);a===-1?e.push(o):e.splice(a,1,o)}function H(e){const t=e.reduce((r,n)=>r.seq>n.seq?r:n,e[0]);let o="";e.forEach(function(r){o+=r===t?" *":" |"});const a=[o,t.id,t.seq];for(const r in i.records.branches)i.records.branches.get(r)===t.id&&a.push(r);if(w.debug(a.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){const r=i.records.commits.get(t.parents[0]);q(e,t,r),t.parents[1]&&e.push(i.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){const r=i.records.commits.get(t.parents[0]);q(e,t,r)}}H(e=D(e,r=>r.id))}d(q,"upsert"),d(H,"prettyPrintCommitHistory");var ut=d(function(){w.debug(i.records.commits),H([W()[0]])},"prettyPrint"),bt=d(function(){i.reset(),nt()},"clear"),wt=d(function(){return[...i.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Bt=d(function(){return i.records.branches},"getBranches"),Et=d(function(){return i.records.commits},"getCommits"),W=d(function(){const e=[...i.records.commits.values()];return e.forEach(function(t){w.debug(t.id)}),e.sort((t,o)=>t.seq-o.seq),e},"getCommitsArray"),j={commitType:p,getConfig:R,setDirection:$t,setOptions:lt,getOptions:yt,commit:gt,branch:pt,merge:xt,cherryPick:ft,checkout:N,prettyPrint:ut,clear:bt,getBranchesAsObjArray:wt,getBranches:Bt,getCommits:Et,getCommitsArray:W,getCurrentBranch:d(function(){return i.records.currBranch},"getCurrentBranch"),getDirection:d(function(){return i.records.direction},"getDirection"),getHead:d(function(){return i.records.head},"getHead"),setAccTitle:tt,getAccTitle:Q,getAccDescription:J,setAccDescription:Z,setDiagramTitle:X,getDiagramTitle:V},kt=d((e,t)=>{Y(e,t),e.dir&&t.setDirection(e.dir);for(const o of e.statements)Ct(o,t)},"populate"),Ct=d((e,t)=>{const o={Commit:d(a=>t.commit(Lt(a)),"Commit"),Branch:d(a=>t.branch(Tt(a)),"Branch"),Merge:d(a=>t.merge(Mt(a)),"Merge"),Checkout:d(a=>t.checkout(vt(a)),"Checkout"),CherryPicking:d(a=>t.cherryPick(Pt(a)),"CherryPicking")}[e.$type];o?o(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Lt=d(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),Tt=d(e=>({name:e.name,order:e.order??0}),"parseBranch"),Mt=d(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),vt=d(e=>e.branch,"parseCheckout"),Pt=d(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Rt={parse:d(async e=>{const t=await ht("gitGraph",e);w.debug(t),kt(t,j)},"parse")},z=rt(),f=z==null?void 0:z.gitGraph,T=10,M=40,E=new Map,k=new Map,I=new Map,O=[],v=0,g="LR",It=d(()=>{E.clear(),k.clear(),I.clear(),v=0,O=[],g="LR"},"clear"),F=d(e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=o.trim(),t.appendChild(a)}),t},"drawText"),_=d(e=>{let t,o,a;return g==="BT"?(o=d((r,n)=>r<=n,"comparisonFunc"),a=1/0):(o=d((r,n)=>r>=n,"comparisonFunc"),a=0),e.forEach(r=>{var c,s;const n=g==="TB"||g=="BT"?(c=k.get(r))==null?void 0:c.y:(s=k.get(r))==null?void 0:s.x;n!==void 0&&o(n,a)&&(t=r,a=n)}),t},"findClosestParent"),At=d(e=>{let t="",o=1/0;return e.forEach(a=>{const r=k.get(a).y;r<=o&&(t=a,o=r)}),t||void 0},"findClosestParentBT"),Gt=d((e,t,o)=>{let a=o,r=o;const n=[];e.forEach(c=>{const s=t.get(c);if(!s)throw new Error(`Commit not found for key ${c}`);s.parents.length?(a=qt(s),r=Math.max(a,r)):n.push(s),Ht(s,a)}),a=r,n.forEach(c=>{zt(c,a,o)}),e.forEach(c=>{const s=t.get(c);if(s!=null&&s.parents.length){const m=At(s.parents);a=k.get(m).y-M,a<=r&&(r=a);const y=E.get(s.branch).pos,$=a-T;k.set(s.id,{x:y,y:$})}})},"setParallelBTPos"),Ot=d(e=>{var a;const t=_(e.parents.filter(r=>r!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);const o=(a=k.get(t))==null?void 0:a.y;if(o===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return o},"findClosestParentPos"),qt=d(e=>Ot(e)+M,"calculateCommitPosition"),Ht=d((e,t)=>{const o=E.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const a=o.pos,r=t+T;return k.set(e.id,{x:a,y:r}),{x:a,y:r}},"setCommitPosition"),zt=d((e,t,o)=>{const a=E.get(e.branch);if(!a)throw new Error(`Branch not found for commit ${e.id}`);const r=t+o,n=a.pos;k.set(e.id,{x:n,y:r})},"setRootPosition"),St=d((e,t,o,a,r,n)=>{if(n===p.HIGHLIGHT)e.append("rect").attr("x",o.x-10).attr("y",o.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${r%8} ${a}-outer`),e.append("rect").attr("x",o.x-6).attr("y",o.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${r%8} ${a}-inner`);else if(n===p.CHERRY_PICK)e.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",10).attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`);else{const c=e.append("circle");if(c.attr("cx",o.x),c.attr("cy",o.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${r%8}`),n===p.MERGE){const s=e.append("circle");s.attr("cx",o.x),s.attr("cy",o.y),s.attr("r",6),s.attr("class",`commit ${a} ${t.id} commit${r%8}`)}n===p.REVERSE&&e.append("path").attr("d",`M ${o.x-5},${o.y-5}L${o.x+5},${o.y+5}M${o.x-5},${o.y+5}L${o.x+5},${o.y-5}`).attr("class",`commit ${a} ${t.id} commit${r%8}`)}},"drawCommitBullet"),Dt=d((e,t,o,a)=>{var r;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){const n=e.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),s=n.append("text").attr("x",a).attr("y",o.y+25).attr("class","commit-label").text(t.id),m=(r=s.node())==null?void 0:r.getBBox();if(m&&(c.attr("x",o.posWithOffset-m.width/2-2).attr("y",o.y+13.5).attr("width",m.width+4).attr("height",m.height+4),g==="TB"||g==="BT"?(c.attr("x",o.x-(m.width+16+5)).attr("y",o.y-12),s.attr("x",o.x-(m.width+16)).attr("y",o.y+m.height-12)):s.attr("x",o.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),c.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{const y=-7.5-(m.width+10)/25*9.5,$=10+m.width/25*8.5;n.attr("transform","translate("+y+", "+$+") rotate(-45, "+a+", "+o.y+")")}}},"drawCommitLabel"),Nt=d((e,t,o,a)=>{var r;if(t.tags.length>0){let n=0,c=0,s=0;const m=[];for(const y of t.tags.reverse()){const $=e.insert("polygon"),h=e.append("circle"),l=e.append("text").attr("y",o.y-16-n).attr("class","tag-label").text(y),x=(r=l.node())==null?void 0:r.getBBox();if(!x)throw new Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),l.attr("x",o.posWithOffset-x.width/2),m.push({tag:l,hole:h,rect:$,yOffset:n}),n+=20}for(const{tag:y,hole:$,rect:h,yOffset:l}of m){const x=s/2,u=o.y-19.2-l;if(h.attr("class","tag-label-bkg").attr("points",`
|
1
|
+
import{p as Y}from"./chunk-4BMEZGHF-Bd4h9Ve1.js";import{I as U}from"./chunk-XZIHB7SX-DmtX4Foe.js";import{_ as d,q as V,p as X,s as Z,g as J,a as Q,b as tt,l as w,c as rt,u as et,D as ot,y as nt,j as C,E as at,F as st,G as ct,H as it}from"./mermaid-C_X-At-F.js";import{p as ht}from"./radar-MK3ICKWK-DJQCLSI4.js";import{s as dt}from"./transform-Cyp0GDF-.js";import"./index-CNf099oP.js";import"./step-BwsUM5iJ.js";import"./_baseEach-DMClerTq.js";import"./_baseUniq-D3VxhdrA.js";import"./min-CH5ifDe0.js";import"./_baseMap-CD9hnB3A.js";import"./clone-CjChZECf.js";import"./_createAggregator-Chjh3Q_B.js";import"./timer-DFzT7np-.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},mt=ct.gitGraph,R=d(()=>at({...mt,...st().gitGraph}),"getConfig"),i=new U(()=>{const e=R(),t=e.mainBranchName,o=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:o}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}});function G(){return it({length:7})}function D(e,t){const o=Object.create(null);return e.reduce((a,r)=>{const n=t(r);return o[n]||(o[n]=!0,a.push(r)),a},[])}d(G,"getID"),d(D,"uniqBy");var $t=d(function(e){i.records.direction=e},"setDirection"),lt=d(function(e){w.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(t){w.error("error while parsing gitGraph options",t.message)}},"setOptions"),yt=d(function(){return i.records.options},"getOptions"),gt=d(function(e){let t=e.msg,o=e.id;const a=e.type;let r=e.tags;w.info("commit",t,o,a,r),w.debug("Entering commit:",t,o,a,r);const n=R();o=C.sanitizeText(o,n),t=C.sanitizeText(t,n),r=r==null?void 0:r.map(s=>C.sanitizeText(s,n));const c={id:o||i.records.seq+"-"+G(),message:t,seq:i.records.seq++,type:a??p.NORMAL,tags:r??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=c,w.info("main branch",n.mainBranchName),i.records.commits.set(c.id,c),i.records.branches.set(i.records.currBranch,c.id),w.debug("in pushCommit "+c.id)},"commit"),pt=d(function(e){let t=e.name;const o=e.order;if(t=C.sanitizeText(t,R()),i.records.branches.has(t))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);i.records.branches.set(t,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(t,{name:t,order:o}),N(t),w.debug("in createBranch")},"branch"),xt=d(e=>{let t=e.branch,o=e.id;const a=e.type,r=e.tags,n=R();t=C.sanitizeText(t,n),o&&(o=C.sanitizeText(o,n));const c=i.records.branches.get(i.records.currBranch),s=i.records.branches.get(t),m=c?i.records.commits.get(c):void 0,y=s?i.records.commits.get(s):void 0;if(m&&y&&m.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(i.records.currBranch===t){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(m===void 0||!m){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["commit"]},l}if(!i.records.branches.has(t)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},l}if(y===void 0||!y){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:['"commit"']},l}if(m===y){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${t}`,token:`merge ${t}`,expected:["branch abc"]},l}if(o&&i.records.commits.has(o)){const l=new Error('Incorrect usage of "merge". Commit with id:'+o+" already exists, use different custom Id");throw l.hash={text:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,token:`merge ${t} ${o} ${a} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${t} ${o}_UNIQUE ${a} ${r==null?void 0:r.join(" ")}`]},l}const $=s||"",h={id:o||`${i.records.seq}-${G()}`,message:`merged branch ${t} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,$],branch:i.records.currBranch,type:p.MERGE,customType:a,customId:!!o,tags:r??[]};i.records.head=h,i.records.commits.set(h.id,h),i.records.branches.set(i.records.currBranch,h.id),w.debug(i.records.branches),w.debug("in mergeBranch")},"merge"),ft=d(function(e){let t=e.id,o=e.targetId,a=e.tags,r=e.parent;w.debug("Entering cherryPick:",t,o,a);const n=R();if(t=C.sanitizeText(t,n),o=C.sanitizeText(o,n),a=a==null?void 0:a.map(m=>C.sanitizeText(m,n)),r=C.sanitizeText(r,n),!t||!i.records.commits.has(t)){const m=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw m.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},m}const c=i.records.commits.get(t);if(c===void 0||!c)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&(!Array.isArray(c.parents)||!c.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const s=c.branch;if(c.type===p.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!o||!i.records.commits.has(o)){if(s===i.records.currBranch){const h=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const m=i.records.branches.get(i.records.currBranch);if(m===void 0||!m){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const y=i.records.commits.get(m);if(y===void 0||!y){const h=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw h.hash={text:`cherryPick ${t} ${o}`,token:`cherryPick ${t} ${o}`,expected:["cherry-pick abc"]},h}const $={id:i.records.seq+"-"+G(),message:`cherry-picked ${c==null?void 0:c.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,c.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:a?a.filter(Boolean):[`cherry-pick:${c.id}${c.type===p.MERGE?`|parent:${r}`:""}`]};i.records.head=$,i.records.commits.set($.id,$),i.records.branches.set(i.records.currBranch,$.id),w.debug(i.records.branches),w.debug("in cherryPick")}},"cherryPick"),N=d(function(e){if(e=C.sanitizeText(e,R()),!i.records.branches.has(e)){const t=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}{i.records.currBranch=e;const t=i.records.branches.get(i.records.currBranch);i.records.head=t!==void 0&&t?i.records.commits.get(t)??null:null}},"checkout");function q(e,t,o){const a=e.indexOf(t);a===-1?e.push(o):e.splice(a,1,o)}function H(e){const t=e.reduce((r,n)=>r.seq>n.seq?r:n,e[0]);let o="";e.forEach(function(r){o+=r===t?" *":" |"});const a=[o,t.id,t.seq];for(const r in i.records.branches)i.records.branches.get(r)===t.id&&a.push(r);if(w.debug(a.join(" ")),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){const r=i.records.commits.get(t.parents[0]);q(e,t,r),t.parents[1]&&e.push(i.records.commits.get(t.parents[1]))}else{if(t.parents.length==0)return;if(t.parents[0]){const r=i.records.commits.get(t.parents[0]);q(e,t,r)}}H(e=D(e,r=>r.id))}d(q,"upsert"),d(H,"prettyPrintCommitHistory");var ut=d(function(){w.debug(i.records.commits),H([W()[0]])},"prettyPrint"),bt=d(function(){i.reset(),nt()},"clear"),wt=d(function(){return[...i.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Bt=d(function(){return i.records.branches},"getBranches"),Et=d(function(){return i.records.commits},"getCommits"),W=d(function(){const e=[...i.records.commits.values()];return e.forEach(function(t){w.debug(t.id)}),e.sort((t,o)=>t.seq-o.seq),e},"getCommitsArray"),j={commitType:p,getConfig:R,setDirection:$t,setOptions:lt,getOptions:yt,commit:gt,branch:pt,merge:xt,cherryPick:ft,checkout:N,prettyPrint:ut,clear:bt,getBranchesAsObjArray:wt,getBranches:Bt,getCommits:Et,getCommitsArray:W,getCurrentBranch:d(function(){return i.records.currBranch},"getCurrentBranch"),getDirection:d(function(){return i.records.direction},"getDirection"),getHead:d(function(){return i.records.head},"getHead"),setAccTitle:tt,getAccTitle:Q,getAccDescription:J,setAccDescription:Z,setDiagramTitle:X,getDiagramTitle:V},kt=d((e,t)=>{Y(e,t),e.dir&&t.setDirection(e.dir);for(const o of e.statements)Ct(o,t)},"populate"),Ct=d((e,t)=>{const o={Commit:d(a=>t.commit(Lt(a)),"Commit"),Branch:d(a=>t.branch(Tt(a)),"Branch"),Merge:d(a=>t.merge(Mt(a)),"Merge"),Checkout:d(a=>t.checkout(vt(a)),"Checkout"),CherryPicking:d(a=>t.cherryPick(Pt(a)),"CherryPicking")}[e.$type];o?o(e):w.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Lt=d(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),Tt=d(e=>({name:e.name,order:e.order??0}),"parseBranch"),Mt=d(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),vt=d(e=>e.branch,"parseCheckout"),Pt=d(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Rt={parse:d(async e=>{const t=await ht("gitGraph",e);w.debug(t),kt(t,j)},"parse")},z=rt(),f=z==null?void 0:z.gitGraph,T=10,M=40,E=new Map,k=new Map,I=new Map,O=[],v=0,g="LR",It=d(()=>{E.clear(),k.clear(),I.clear(),v=0,O=[],g="LR"},"clear"),F=d(e=>{const t=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),a.setAttribute("dy","1em"),a.setAttribute("x","0"),a.setAttribute("class","row"),a.textContent=o.trim(),t.appendChild(a)}),t},"drawText"),_=d(e=>{let t,o,a;return g==="BT"?(o=d((r,n)=>r<=n,"comparisonFunc"),a=1/0):(o=d((r,n)=>r>=n,"comparisonFunc"),a=0),e.forEach(r=>{var c,s;const n=g==="TB"||g=="BT"?(c=k.get(r))==null?void 0:c.y:(s=k.get(r))==null?void 0:s.x;n!==void 0&&o(n,a)&&(t=r,a=n)}),t},"findClosestParent"),At=d(e=>{let t="",o=1/0;return e.forEach(a=>{const r=k.get(a).y;r<=o&&(t=a,o=r)}),t||void 0},"findClosestParentBT"),Gt=d((e,t,o)=>{let a=o,r=o;const n=[];e.forEach(c=>{const s=t.get(c);if(!s)throw new Error(`Commit not found for key ${c}`);s.parents.length?(a=qt(s),r=Math.max(a,r)):n.push(s),Ht(s,a)}),a=r,n.forEach(c=>{zt(c,a,o)}),e.forEach(c=>{const s=t.get(c);if(s!=null&&s.parents.length){const m=At(s.parents);a=k.get(m).y-M,a<=r&&(r=a);const y=E.get(s.branch).pos,$=a-T;k.set(s.id,{x:y,y:$})}})},"setParallelBTPos"),Ot=d(e=>{var a;const t=_(e.parents.filter(r=>r!==null));if(!t)throw new Error(`Closest parent not found for commit ${e.id}`);const o=(a=k.get(t))==null?void 0:a.y;if(o===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return o},"findClosestParentPos"),qt=d(e=>Ot(e)+M,"calculateCommitPosition"),Ht=d((e,t)=>{const o=E.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const a=o.pos,r=t+T;return k.set(e.id,{x:a,y:r}),{x:a,y:r}},"setCommitPosition"),zt=d((e,t,o)=>{const a=E.get(e.branch);if(!a)throw new Error(`Branch not found for commit ${e.id}`);const r=t+o,n=a.pos;k.set(e.id,{x:n,y:r})},"setRootPosition"),St=d((e,t,o,a,r,n)=>{if(n===p.HIGHLIGHT)e.append("rect").attr("x",o.x-10).attr("y",o.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${r%8} ${a}-outer`),e.append("rect").attr("x",o.x-6).attr("y",o.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${r%8} ${a}-inner`);else if(n===p.CHERRY_PICK)e.append("circle").attr("cx",o.x).attr("cy",o.y).attr("r",10).attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x-3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("circle").attr("cx",o.x+3).attr("cy",o.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x+3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`),e.append("line").attr("x1",o.x-3).attr("y1",o.y+1).attr("x2",o.x).attr("y2",o.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} ${a}`);else{const c=e.append("circle");if(c.attr("cx",o.x),c.attr("cy",o.y),c.attr("r",t.type===p.MERGE?9:10),c.attr("class",`commit ${t.id} commit${r%8}`),n===p.MERGE){const s=e.append("circle");s.attr("cx",o.x),s.attr("cy",o.y),s.attr("r",6),s.attr("class",`commit ${a} ${t.id} commit${r%8}`)}n===p.REVERSE&&e.append("path").attr("d",`M ${o.x-5},${o.y-5}L${o.x+5},${o.y+5}M${o.x-5},${o.y+5}L${o.x+5},${o.y-5}`).attr("class",`commit ${a} ${t.id} commit${r%8}`)}},"drawCommitBullet"),Dt=d((e,t,o,a)=>{var r;if(t.type!==p.CHERRY_PICK&&(t.customId&&t.type===p.MERGE||t.type!==p.MERGE)&&(f!=null&&f.showCommitLabel)){const n=e.append("g"),c=n.insert("rect").attr("class","commit-label-bkg"),s=n.append("text").attr("x",a).attr("y",o.y+25).attr("class","commit-label").text(t.id),m=(r=s.node())==null?void 0:r.getBBox();if(m&&(c.attr("x",o.posWithOffset-m.width/2-2).attr("y",o.y+13.5).attr("width",m.width+4).attr("height",m.height+4),g==="TB"||g==="BT"?(c.attr("x",o.x-(m.width+16+5)).attr("y",o.y-12),s.attr("x",o.x-(m.width+16)).attr("y",o.y+m.height-12)):s.attr("x",o.posWithOffset-m.width/2),f.rotateCommitLabel))if(g==="TB"||g==="BT")s.attr("transform","rotate(-45, "+o.x+", "+o.y+")"),c.attr("transform","rotate(-45, "+o.x+", "+o.y+")");else{const y=-7.5-(m.width+10)/25*9.5,$=10+m.width/25*8.5;n.attr("transform","translate("+y+", "+$+") rotate(-45, "+a+", "+o.y+")")}}},"drawCommitLabel"),Nt=d((e,t,o,a)=>{var r;if(t.tags.length>0){let n=0,c=0,s=0;const m=[];for(const y of t.tags.reverse()){const $=e.insert("polygon"),h=e.append("circle"),l=e.append("text").attr("y",o.y-16-n).attr("class","tag-label").text(y),x=(r=l.node())==null?void 0:r.getBBox();if(!x)throw new Error("Tag bbox not found");c=Math.max(c,x.width),s=Math.max(s,x.height),l.attr("x",o.posWithOffset-x.width/2),m.push({tag:l,hole:h,rect:$,yOffset:n}),n+=20}for(const{tag:y,hole:$,rect:h,yOffset:l}of m){const x=s/2,u=o.y-19.2-l;if(h.attr("class","tag-label-bkg").attr("points",`
|
2
2
|
${a-c/2-2},${u+2}
|
3
3
|
${a-c/2-2},${u-2}
|
4
4
|
${o.posWithOffset-c/2-4},${u-x-2}
|
@@ -1 +1 @@
|
|
1
|
-
import{H as M,J as G,K as k,M as f,O as y,P as _}from"./index-
|
1
|
+
import{H as M,J as G,K as k,M as f,O as y,P as _}from"./index-CNf099oP.js";import{a as x,f as m,c as d,i as l,v,r as z}from"./_baseUniq-D3VxhdrA.js";import{a9 as N}from"./mermaid-C_X-At-F.js";var H=M(function(o){return x(G(o,1,k,!0))}),a="\0";class b{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return y(t)||(t=f(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var t=this;return m(this.nodes(),function(e){return N(t._in[e])})}sinks(){var t=this;return m(this.nodes(),function(e){return N(t._out[e])})}setNodes(t,e){var s=arguments,r=this;return d(t,function(i){s.length>1?r.setNode(i,e):r.setNode(i)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=a,this._children[t]={},this._children[a][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],d(this.children(t),s=>{this.setParent(s)}),delete this._children[t]),d(_(this._in[t]),e),delete this._in[t],delete this._preds[t],d(_(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(e))e=a;else{for(var s=e+="";!l(s);s=this.parent(s))if(s===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==a)return e}}children(t){if(l(t)&&(t=a),this._isCompound){var e=this._children[t];if(e)return _(e)}else{if(t===a)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return _(e)}successors(t){var e=this._sucs[t];if(e)return _(e)}neighbors(t){var e=this.predecessors(t);if(e)return H(e,this.successors(t))}isLeaf(t){return(this.isDirected()?this.successors(t):this.neighbors(t)).length===0}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){t(h)&&e.setNode(h,n)}),d(this._edgeObjs,function(n){e.hasNode(n.v)&&e.hasNode(n.w)&&e.setEdge(n,s.edge(n))});var r={};function i(n){var h=s.parent(n);return h===void 0||e.hasNode(h)?(r[n]=h,h):h in r?r[h]:i(h)}return this._isCompound&&d(e.nodes(),function(n){e.setParent(n,i(n))}),e}setDefaultEdgeLabel(t){return y(t)||(t=f(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return v(this._edgeObjs)}setPath(t,e){var s=this,r=arguments;return z(t,function(i,n){return r.length>1?s.setEdge(i,n,e):s.setEdge(i,n),n}),this}setEdge(){var t,e,s,r,i=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(t=n.v,e=n.w,s=n.name,arguments.length===2&&(r=arguments[1],i=!0)):(t=n,e=arguments[1],s=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,e=""+e,l(s)||(s=""+s);var h=c(this._isDirected,t,e,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return i&&(this._edgeLabels[h]=r),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[h]=i?r:this._defaultEdgeLabelFn(t,e,s);var u=function(j,P,D,O){var g=""+P,p=""+D;if(!j&&g>p){var F=g;g=p,p=F}var w={v:g,w:p};return O&&(w.name=O),w}(this._isDirected,t,e,s);return t=u.v,e=u.w,Object.freeze(u),this._edgeObjs[h]=u,E(this._preds[e],t),E(this._sucs[t],e),this._in[e][h]=u,this._out[t][h]=u,this._edgeCount++,this}edge(t,e,s){var r=arguments.length===1?C(this._isDirected,arguments[0]):c(this._isDirected,t,e,s);return this._edgeLabels[r]}hasEdge(t,e,s){var r=arguments.length===1?C(this._isDirected,arguments[0]):c(this._isDirected,t,e,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,r)}removeEdge(t,e,s){var r=arguments.length===1?C(this._isDirected,arguments[0]):c(this._isDirected,t,e,s),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],L(this._preds[e],t),L(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this}inEdges(t,e){var s=this._in[t];if(s){var r=v(s);return e?m(r,function(i){return i.v===e}):r}}outEdges(t,e){var s=this._out[t];if(s){var r=v(s);return e?m(r,function(i){return i.w===e}):r}}nodeEdges(t,e){var s=this.inEdges(t,e);if(s)return s.concat(this.outEdges(t,e))}}function E(o,t){o[t]?o[t]++:o[t]=1}function L(o,t){--o[t]||delete o[t]}function c(o,t,e,s){var r=""+t,i=""+e;if(!o&&r>i){var n=r;r=i,i=n}return r+""+i+""+(l(s)?"\0":s)}function C(o,t){return c(o,t.v,t.w,t.name)}b.prototype._nodeCount=0,b.prototype._edgeCount=0;export{b as G};
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import{u as I,R as J,aE as ie,aF as Q,
|
1
|
+
import{u as I,R as J,aE as ie,aF as Q,c as _,j as s,aG as le,aH as ce,aI as de,aJ as H,aK as me,aL as he,aM as ue,aN as q,ae as P,aO as xe,aP as fe,aQ as U,aR as pe,W as B,aS as be,Q as z,aT as F,aU as ge,aV as ye,aW as je,aX as K,aY as ve,aZ as ke,a_ as we,a$ as Y,b0 as Ne,b1 as _e,b2 as X,b3 as Se,a0 as ze,b4 as Ce,b5 as Me,V as Ie,a5 as Pe,a6 as De,b6 as E,b7 as Oe,b8 as Te,b9 as Ae,ao as Re,a4 as We,ba as $e,bb as Le,bc as Ve,bd as He,be as Ue,bf as Be,bg as Fe,bh as Ye,bi as Ee,bj as Z,ab as Ge}from"./index-CNf099oP.js";import{G as Je,A as Qe,B as qe,a as Ke,M as Xe,Y as Ze,L as et,u as tt,C as at,S as st,T as rt,P as ot}from"./tree-agTB8sa3.js";import{C as nt}from"./circle-play-p8Sj7AdH.js";import"./index-D1SXFm6O.js";/**
|
2
2
|
* @license lucide-react v0.503.0 - ISC
|
3
3
|
*
|
4
4
|
* This source code is licensed under the ISC license.
|
5
5
|
* See the LICENSE file in the root directory of this source tree.
|
6
|
-
*/const it=I("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),lt=I("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]),ct=I("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),dt=I("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]),mt=I("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),ee=J.createContext({runningNotebooks:new Map,setRunningNotebooks:ie.NOOP}),te=J.createContext(""),ht=Q("marimo:home:include-markdown",!1,void 0,{getOnInit:!0}),ae=Q("marimo:home:expanded-folders",{},void 0,{getOnInit:!0}),ut={intro:["Introduction",it,"Get started with marimo basics"],dataflow:["Dataflow",Qe,"Learn how cells interact with each other"],ui:["UI Elements",mt,"Create interactive UI components"],markdown:["Markdown",q,"Format text with parameterized markdown"],plots:["Plots",ue,"Create interactive visualizations"],sql:["SQL",he,"Query databases directly in marimo"],layout:["Layout",Je,"Customize the layout of your cells' output"],fileformat:["File format",me,"Understand marimo's pure-Python file format"],"for-jupyter-users":["For Jupyter users",dt,"Transiting from Jupyter to marimo"],"markdown-format":["Markdown format",H,"Using marimo to edit markdown files"]},xt=()=>{const e=_.c(3);let t,a,r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ct,{className:"w-4 h-4 mr-2"}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(pe,{asChild:!0,children:s.jsxs(B,{"data-testid":"open-tutorial-button",size:"xs",variant:"outline",children:[t,"Tutorials",s.jsx(be,{className:"w-3 h-3 ml-1"})]})}),e[1]=a):a=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(le,{children:[a,s.jsx(ce,{side:"bottom",align:"end",className:"no-print",children:de.entries(ut).map(bt)})]}),e[2]=r):r=e[2],r},ft=[{title:"Documentation",description:"Official marimo documentation and API reference",icon:qe,url:P.docsPage},{title:"GitHub",description:"View source code, report issues, or contribute",icon:Ke,url:P.githubPage},{title:"Community",description:"Join the marimo Discord community",icon:Xe,url:P.discordLink},{title:"YouTube",description:"Watch tutorials and demos",icon:Ze,url:P.youtube},{title:"Changelog",description:"See what's new in marimo",icon:q,url:P.releasesPage}],pt=()=>{const e=_.c(2);let t,a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(W,{Icon:et,children:"Resources"}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-2",children:[t,s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:ft.map(gt)})]}),e[1]=a):a=e[1],a},W=e=>{const t=_.c(8),{Icon:a,control:r,children:o}=e;let n,i,l;return t[0]!==a?(n=s.jsx(a,{className:"h-5 w-5"}),t[0]=a,t[1]=n):n=t[1],t[2]!==o||t[3]!==n?(i=s.jsxs("h2",{className:"flex items-center gap-2 text-xl font-semibold text-muted-foreground select-none",children:[n,o]}),t[2]=o,t[3]=n,t[4]=i):i=t[4],t[5]!==r||t[6]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i,r]}),t[5]=r,t[6]=i,t[7]=l):l=t[7],l};function bt(e){const[t,a]=e,[r,o,n]=a;return s.jsxs(xe,{onSelect:async()=>{const i=await fe({tutorialId:t});i&&window.open(U(`?file=${i.path}`).toString(),"_blank")},children:[s.jsx(o,{strokeWidth:1.5,className:"w-4 h-4 mr-3 self-start mt-1.5 text-muted-foreground"}),s.jsx("div",{className:"flex items-center",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:r}),s.jsx("span",{className:"text-xs text-muted-foreground pr-1",children:n})]})})]},t)}function gt(e){return s.jsxs("a",{href:e.url,target:"_blank",className:"flex items-start gap-3 py-3 px-3 rounded-lg border hover:bg-accent/20 transition-colors shadow-xs",children:[s.jsx(e.icon,{className:"w-5 h-5 mt-1.5 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:e.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.title)}function se(e){return`${Ge()}-${encodeURIComponent(e)}`}const yt=()=>{const e=_.c(52),[t,a]=z.useState(0);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];const o=F(zt,r);let n,i,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(Ct)},i={delayMs:1e4,whenVisible:!0},e[1]=n,e[2]=i):(n=e[1],i=e[2]),tt(n,i),e[3]!==t?(l=[t],e[3]=t,e[4]=l):l=e[4];const d=F(It,l);let x,m,h,c,u,f,b,p,g,j,y,v,w,N,k,S,D,C,M,O;if(e[5]!==o||e[6]!==d){b=Symbol.for("react.early_return_sentinel");e:{const $=ge(o,d);if($.error)throw $.error;const G=$.data;if(!G){let R;e[20]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Y,{centered:!0,size:"xlarge"}),e[20]=R):R=e[20],b=R;break e}const[ne,L]=G;let T,A;c=ne,h=z.Suspense,m=ee.Provider,u={runningNotebooks:L,setRunningNotebooks:d.setData},e[21]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(xt,{}),A=s.jsx(at,{showAppConfig:!1}),e[21]=T,e[22]=A):(T=e[21],A=e[22]);const V=`This will shutdown the notebook server and terminate all running notebooks (${L.size}). You'll lose all data that's in memory.`;e[23]!==V?(f=s.jsxs("div",{className:"absolute top-3 right-5 flex gap-3 z-50",children:[T,A,s.jsx(st,{description:V})]}),e[23]=V,e[24]=f):f=e[24],j="flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",e[25]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),v=s.jsx(St,{}),w=s.jsx(pt,{}),e[25]=y,e[26]=v,e[27]=w):(y=e[25],v=e[26],w=e[27]),x=re,e[28]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(W,{Icon:nt,children:"Running notebooks"}),e[28]=p):p=e[28],g=[...L.values()]}e[5]=o,e[6]=d,e[7]=x,e[8]=m,e[9]=h,e[10]=c,e[11]=u,e[12]=f,e[13]=b,e[14]=p,e[15]=g,e[16]=j,e[17]=y,e[18]=v,e[19]=w}else x=e[7],m=e[8],h=e[9],c=e[10],u=e[11],f=e[12],b=e[13],p=e[14],g=e[15],j=e[16],y=e[17],v=e[18],w=e[19];return b!==Symbol.for("react.early_return_sentinel")?b:(e[29]!==x||e[30]!==p||e[31]!==g?(N=s.jsx(x,{header:p,files:g}),e[29]=x,e[30]=p,e[31]=g,e[32]=N):N=e[32],e[33]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(W,{Icon:Ne,children:"Recent notebooks"}),e[33]=k):k=e[33],e[34]!==c.files?(S=s.jsx(re,{header:k,files:c.files}),e[34]=c.files,e[35]=S):S=e[35],e[36]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(_e,{children:s.jsx(jt,{})}),e[36]=D):D=e[36],e[37]!==N||e[38]!==S||e[39]!==j||e[40]!==y||e[41]!==v||e[42]!==w?(C=s.jsxs("div",{className:j,children:[y,v,w,N,S,D]}),e[37]=N,e[38]=S,e[39]=j,e[40]=y,e[41]=v,e[42]=w,e[43]=C):C=e[43],e[44]!==m||e[45]!==u||e[46]!==f||e[47]!==C?(M=s.jsxs(m,{value:u,children:[f,C]}),e[44]=m,e[45]=u,e[46]=f,e[47]=C,e[48]=M):M=e[48],e[49]!==h||e[50]!==M?(O=s.jsx(h,{children:M}),e[49]=h,e[50]=M,e[51]=O):O=e[51],O)},jt=()=>{const e=_.c(39),[t,a]=X(ht),[r,o]=z.useState("");let n,i;e[0]!==t?(n=()=>Le({includeMarkdown:t}),i=[t],e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);const l=F(n,i);if(l.error){let k,S;return e[3]!==l.error?(k=Se(l.error),e[3]=l.error,e[4]=k):k=e[4],e[5]!==k?(S=s.jsx(Ve,{kind:"danger",className:"rounded p-4",children:k}),e[5]=k,e[6]=S):S=e[6],S}if(l.loading||!l.data){let k;return e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Y,{centered:!0,size:"xlarge",className:"mt-6"}),e[7]=k):k=e[7],k}const d=l.data;let x,m,h,c,u,f,b,p,g,j,y,v,w,N;return e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(He,{size:13}),m=k=>o(k.target.value),e[8]=x,e[9]=m):(x=e[8],m=e[9]),e[10]!==r?(h=s.jsx(Ue,{id:"search",value:r,icon:x,onChange:m,placeholder:"Search",className:"mb-0 border-border"}),e[10]=r,e[11]=h):h=e[11],e[12]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(vt,{}),e[12]=c):c=e[12],e[13]!==a?(u=k=>a(!!k),e[13]=a,e[14]=u):u=e[14],e[15]!==t||e[16]!==u?(f=s.jsx(Be,{"data-testid":"include-markdown-checkbox",id:"include-markdown",checked:t,onCheckedChange:u}),e[15]=t,e[16]=u,e[17]=f):f=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Fe,{htmlFor:"include-markdown",children:"Include markdown"}),e[18]=b):b=e[18],e[19]!==h||e[20]!==f?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[h,c,f,b]}),e[19]=h,e[20]=f,e[21]=p):p=e[21],e[22]!==l?(g=s.jsx(Ye,{className:"w-4 h-4 ml-1 cursor-pointer opacity-70 hover:opacity-100",onClick:()=>l.reload()}),e[22]=l,e[23]=g):g=e[23],e[24]!==l.loading?(j=l.loading&&s.jsx(Y,{size:"small"}),e[24]=l.loading,e[25]=j):j=e[25],e[26]!==g||e[27]!==j||e[28]!==p?(y=s.jsxs(W,{Icon:lt,control:p,children:["Workspace",g,j]}),e[26]=g,e[27]=j,e[28]=p,e[29]=y):y=e[29],e[30]!==r||e[31]!==d.files?(v=s.jsx("div",{className:"flex flex-col divide-y divide-[var(--slate-3)] border rounded overflow-hidden max-h-[48rem] overflow-y-auto shadow-sm bg-background",children:s.jsx(kt,{searchText:r,files:d.files})}),e[30]=r,e[31]=d.files,e[32]=v):v=e[32],e[33]!==y||e[34]!==v?(w=s.jsxs("div",{className:"flex flex-col gap-2",children:[y,v]}),e[33]=y,e[34]=v,e[35]=w):w=e[35],e[36]!==w||e[37]!==d.root?(N=s.jsx(te.Provider,{value:d.root,children:w}),e[36]=w,e[37]=d.root,e[38]=N):N=e[38],N},vt=()=>{const e=_.c(5),t=ze(ae);let a,r,o;return e[0]!==t?(a=()=>{t({})},e[0]=t,e[1]=a):a=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ee,{className:"w-4 h-4 mr-1"}),e[2]=r):r=e[2],e[3]!==a?(o=s.jsxs(B,{variant:"text",size:"sm",className:"h-fit hidden sm:flex",onClick:a,children:[r,"Collapse all"]}),e[3]=a,e[4]=o):o=e[4],o},kt=e=>{const t=_.c(12),{files:a,searchText:r}=e,[o,n]=X(ae),i=Object.keys(o).length===0,l=z.useRef();let d,x,m,h;if(t[0]!==i?(d=()=>{var c;i&&((c=l.current)==null||c.closeAll())},x=[i],t[0]=i,t[1]=d,t[2]=x):(d=t[1],x=t[2]),z.useEffect(d,x),a.length===0){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"flex flex-col px-5 py-10 items-center justify-center",children:s.jsx("p",{className:"text-center text-muted-foreground",children:"No files in this workspace"})}),t[3]=c):c=t[3],c}return t[4]!==o||t[5]!==n?(m=async c=>{const u=o[c]??!1;n({...o,[c]:!u})},t[4]=o,t[5]=n,t[6]=m):m=t[6],t[7]!==a||t[8]!==o||t[9]!==r||t[10]!==m?(h=s.jsx(rt,{ref:l,width:"100%",height:500,searchTerm:r,className:"h-full",idAccessor:Pt,data:a,openByDefault:!1,initialOpenState:o,onToggle:m,padding:5,rowHeight:35,indent:15,overscanCount:1e3,renderCursor:Dt,disableDrop:!0,disableDrag:!0,disableEdit:!0,disableMultiSelection:!0,children:wt}),t[7]=a,t[8]=o,t[9]=r,t[10]=m,t[11]=h):h=t[11],h},wt=e=>{const t=_.c(19),{node:a,style:r}=e,o=a.data.isDirectory?"directory":Ce(a.data.name),n=Me[o];let i;t[0]!==n?(i=s.jsx(n,{className:"w-5 h-5 flex-shrink-0",strokeWidth:1.5}),t[0]=n,t[1]=i):i=t[1];const l=i,d=z.useContext(te);let x;t[2]!==l||t[3]!==a.data.isDirectory||t[4]!==a.data.name||t[5]!==a.data.path||t[6]!==d?(x=()=>{if(a.data.isDirectory)return s.jsxs("span",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",children:[l,a.data.name]});const p=a.data.path.startsWith(d)&&Z.isAbsolute(a.data.path)?Z.rest(a.data.path,d):a.data.path,g=p.endsWith(".md")||p.endsWith(".qmd");return s.jsxs("a",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",href:U(`?file=${p}`).toString(),target:se(p),children:[l,s.jsxs("span",{className:"flex-1 overflow-hidden text-ellipsis",children:[a.data.name,g&&s.jsx(H,{className:"ml-2 inline opacity-80"})]}),s.jsx(oe,{filePath:p}),s.jsx(E,{size:20,className:"group-hover:opacity-100 opacity-0 text-primary"})]})},t[2]=l,t[3]=a.data.isDirectory,t[4]=a.data.name,t[5]=a.data.path,t[6]=d,t[7]=x):x=t[7];const m=x;let h,c,u,f,b;return t[8]===Symbol.for("react.memo_cache_sentinel")?(h=Ie("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group h-full"),t[8]=h):h=t[8],t[9]!==a?(c=p=>{p.stopPropagation(),a.data.isDirectory&&a.toggle()},u=s.jsx(Nt,{node:a}),t[9]=a,t[10]=c,t[11]=u):(c=t[10],u=t[11]),t[12]!==m?(f=m(),t[12]=m,t[13]=f):f=t[13],t[14]!==r||t[15]!==c||t[16]!==u||t[17]!==f?(b=s.jsxs("div",{style:r,className:h,onClick:c,children:[u,f]}),t[14]=r,t[15]=c,t[16]=u,t[17]=f,t[18]=b):b=t[18],b},Nt=e=>{const t=_.c(3),{node:a}=e;if(!a.data.isDirectory){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"w-5 h-5 flex-shrink-0"}),t[0]=o):o=t[0],o}let r;return t[1]!==a.isOpen?(r=a.isOpen?s.jsx(Pe,{className:"w-5 h-5 flex-shrink-0"}):s.jsx(De,{className:"w-5 h-5 flex-shrink-0"}),t[1]=a.isOpen,t[2]=r):r=t[2],r},re=e=>{const t=_.c(7),{header:a,files:r}=e;if(r.length===0)return null;let o,n,i;return t[0]!==r?(o=r.map(Ot),t[0]=r,t[1]=o):o=t[1],t[2]!==o?(n=s.jsx("div",{className:"flex flex-col divide-y divide-[var(--slate-3)] border rounded overflow-hidden max-h-[48rem] overflow-y-auto shadow-sm bg-background",children:o}),t[2]=o,t[3]=n):n=t[3],t[4]!==a||t[5]!==n?(i=s.jsxs("div",{className:"flex flex-col gap-2",children:[a,n]}),t[4]=a,t[5]=n,t[6]=i):i=t[6],i},_t=e=>{const t=_.c(40),{file:a}=e;let r;t[0]!==a.path?(r=ve(a.path),t[0]=a.path,t[1]=r):r=t[1];const o=r;let n,i,l,d;if(t[2]!==a.initializationId||t[3]!==a.path||t[4]!==o){const w=U(o?`?file=${a.initializationId}&session_id=${a.path}`:`?file=${a.path}`);let N;t[9]!==a.path?(N=a.path.endsWith(".md"),t[9]=a.path,t[10]=N):N=t[10],n=N,i="py-1.5 px-4 hover:bg-[var(--blue-2)] hover:text-primary transition-all duration-300 cursor-pointer group relative flex gap-4 items-center",l=a.path,d=w.toString(),t[2]=a.initializationId,t[3]=a.path,t[4]=o,t[5]=n,t[6]=i,t[7]=l,t[8]=d}else n=t[5],i=t[6],l=t[7],d=t[8];const x=a.initializationId||a.path;let m,h,c,u,f,b,p,g,j,y,v;return t[11]!==x?(m=se(x),t[11]=x,t[12]=m):m=t[12],t[13]!==n?(h=n&&s.jsx("span",{className:"opacity-80",children:s.jsx(H,{})}),t[13]=n,t[14]=h):h=t[14],t[15]!==a.name||t[16]!==h?(c=s.jsxs("span",{className:"flex items-center gap-2",children:[a.name,h]}),t[15]=a.name,t[16]=h,t[17]=c):c=t[17],t[18]!==a.path?(u=s.jsx("p",{title:a.path,className:"text-sm text-muted-foreground overflow-hidden whitespace-nowrap overflow-ellipsis",children:a.path}),t[18]=a.path,t[19]=u):u=t[19],t[20]!==c||t[21]!==u?(f=s.jsxs("div",{className:"flex flex-col justify-between flex-1",children:[c,u]}),t[20]=c,t[21]=u,t[22]=f):f=t[22],t[23]!==a.path?(b=s.jsx("div",{children:s.jsx(oe,{filePath:a.path})}),t[23]=a.path,t[24]=b):b=t[24],t[25]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(E,{size:20,className:"group-hover:opacity-100 opacity-0 transition-all duration-300 text-primary"}),t[25]=p):p=t[25],t[26]!==b?(g=s.jsxs("div",{className:"flex gap-3 items-center",children:[b,p]}),t[26]=b,t[27]=g):g=t[27],t[28]!==a.lastModified?(j=!!a.lastModified&&s.jsx("div",{className:"text-xs text-muted-foreground opacity-80",children:ke(1e3*a.lastModified)}),t[28]=a.lastModified,t[29]=j):j=t[29],t[30]!==g||t[31]!==j?(y=s.jsxs("div",{className:"flex flex-col gap-1 items-end",children:[g,j]}),t[30]=g,t[31]=j,t[32]=y):y=t[32],t[33]!==f||t[34]!==y||t[35]!==i||t[36]!==l||t[37]!==d||t[38]!==m?(v=s.jsxs("a",{className:i,href:d,target:m,children:[f,y]},l),t[33]=f,t[34]=y,t[35]=i,t[36]=l,t[37]=d,t[38]=m,t[39]=v):v=t[39],v},oe=e=>{const t=_.c(9),{filePath:a}=e,{openConfirm:r,closeModal:o}=we(),{runningNotebooks:n,setRunningNotebooks:i}=z.useContext(ee);if(!n.has(a))return null;let l,d,x;return t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i?(l=m=>{m.stopPropagation(),m.preventDefault(),r({title:"Shutdown",description:"This will terminate the Python kernel. You'll lose all data that's in memory.",variant:"destructive",confirmAction:s.jsx(Oe,{onClick:h=>{const c=n.get(a);Te(c==null?void 0:c.sessionId),Ae({sessionId:c.sessionId}).then(u=>{i(K.keyBy(u.files,Tt))}),o(),Re({description:"Notebook has been shutdown."})},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=l):l=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ot,{size:14}),t[6]=d):d=t[6],t[7]!==l?(x=s.jsx(We,{content:"Shutdown",children:s.jsx(B,{size:"icon",variant:"outline",className:"opacity-80 hover:opacity-100 hover:bg-accent text-destructive border-destructive hover:border-destructive hover:text-destructive bg-background hover:bg-[var(--red-1)]",onClick:l,children:d})}),t[7]=l,t[8]=x):x=t[8],x},St=()=>{const e=_.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$e(),e[0]=t):t=e[0];const a=t;let r,o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h2",{className:"text-lg font-semibold",children:"Create a new notebook"}),e[1]=r):r=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("a",{className:`relative rounded-lg p-6 group
|
6
|
+
*/const it=I("book-open",[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]]),lt=I("book-text",[["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}],["path",{d:"M8 11h8",key:"vwpz6n"}],["path",{d:"M8 7h6",key:"1f0q6e"}]]),ct=I("graduation-cap",[["path",{d:"M21.42 10.922a1 1 0 0 0-.019-1.838L12.83 5.18a2 2 0 0 0-1.66 0L2.6 9.08a1 1 0 0 0 0 1.832l8.57 3.908a2 2 0 0 0 1.66 0z",key:"j76jl0"}],["path",{d:"M22 10v6",key:"1lu8f3"}],["path",{d:"M6 12.5V16a6 3 0 0 0 12 0v-3.5",key:"1r8lef"}]]),dt=I("orbit",[["path",{d:"M20.341 6.484A10 10 0 0 1 10.266 21.85",key:"1enhxb"}],["path",{d:"M3.659 17.516A10 10 0 0 1 13.74 2.152",key:"1crzgf"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["circle",{cx:"19",cy:"5",r:"2",key:"mhkx31"}],["circle",{cx:"5",cy:"19",r:"2",key:"v8kfzx"}]]),mt=I("panels-top-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]]),ee=J.createContext({runningNotebooks:new Map,setRunningNotebooks:ie.NOOP}),te=J.createContext(""),ht=Q("marimo:home:include-markdown",!1,void 0,{getOnInit:!0}),ae=Q("marimo:home:expanded-folders",{},void 0,{getOnInit:!0}),ut={intro:["Introduction",it,"Get started with marimo basics"],dataflow:["Dataflow",Qe,"Learn how cells interact with each other"],ui:["UI Elements",mt,"Create interactive UI components"],markdown:["Markdown",q,"Format text with parameterized markdown"],plots:["Plots",ue,"Create interactive visualizations"],sql:["SQL",he,"Query databases directly in marimo"],layout:["Layout",Je,"Customize the layout of your cells' output"],fileformat:["File format",me,"Understand marimo's pure-Python file format"],"for-jupyter-users":["For Jupyter users",dt,"Transiting from Jupyter to marimo"],"markdown-format":["Markdown format",H,"Using marimo to edit markdown files"]},xt=()=>{const e=_.c(3);let t,a,r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ct,{className:"w-4 h-4 mr-2"}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx(pe,{asChild:!0,children:s.jsxs(B,{"data-testid":"open-tutorial-button",size:"xs",variant:"outline",children:[t,"Tutorials",s.jsx(be,{className:"w-3 h-3 ml-1"})]})}),e[1]=a):a=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs(le,{children:[a,s.jsx(ce,{side:"bottom",align:"end",className:"no-print",children:de.entries(ut).map(bt)})]}),e[2]=r):r=e[2],r},ft=[{title:"Documentation",description:"Official marimo documentation and API reference",icon:qe,url:P.docsPage},{title:"GitHub",description:"View source code, report issues, or contribute",icon:Ke,url:P.githubPage},{title:"Community",description:"Join the marimo Discord community",icon:Xe,url:P.discordLink},{title:"YouTube",description:"Watch tutorials and demos",icon:Ze,url:P.youtube},{title:"Changelog",description:"See what's new in marimo",icon:q,url:P.releasesPage}],pt=()=>{const e=_.c(2);let t,a;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(W,{Icon:et,children:"Resources"}),e[0]=t):t=e[0],e[1]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsxs("div",{className:"flex flex-col gap-2",children:[t,s.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:ft.map(gt)})]}),e[1]=a):a=e[1],a},W=e=>{const t=_.c(8),{Icon:a,control:r,children:o}=e;let n,i,l;return t[0]!==a?(n=s.jsx(a,{className:"h-5 w-5"}),t[0]=a,t[1]=n):n=t[1],t[2]!==o||t[3]!==n?(i=s.jsxs("h2",{className:"flex items-center gap-2 text-xl font-semibold text-muted-foreground select-none",children:[n,o]}),t[2]=o,t[3]=n,t[4]=i):i=t[4],t[5]!==r||t[6]!==i?(l=s.jsxs("div",{className:"flex items-center justify-between gap-2",children:[i,r]}),t[5]=r,t[6]=i,t[7]=l):l=t[7],l};function bt(e){const[t,a]=e,[r,o,n]=a;return s.jsxs(xe,{onSelect:async()=>{const i=await fe({tutorialId:t});i&&window.open(U(`?file=${i.path}`).toString(),"_blank")},children:[s.jsx(o,{strokeWidth:1.5,className:"w-4 h-4 mr-3 self-start mt-1.5 text-muted-foreground"}),s.jsx("div",{className:"flex items-center",children:s.jsxs("div",{className:"flex flex-col",children:[s.jsx("span",{children:r}),s.jsx("span",{className:"text-xs text-muted-foreground pr-1",children:n})]})})]},t)}function gt(e){return s.jsxs("a",{href:e.url,target:"_blank",className:"flex items-start gap-3 py-3 px-3 rounded-lg border hover:bg-accent/20 transition-colors shadow-xs",children:[s.jsx(e.icon,{className:"w-5 h-5 mt-1.5 text-primary"}),s.jsxs("div",{children:[s.jsx("h3",{className:"font-medium",children:e.title}),s.jsx("p",{className:"text-sm text-muted-foreground",children:e.description})]})]},e.title)}function se(e){return`${Ge()}-${encodeURIComponent(e)}`}const yt=()=>{const e=_.c(52),[t,a]=z.useState(0);let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=[],e[0]=r):r=e[0];const o=F(zt,r);let n,i,l;e[1]===Symbol.for("react.memo_cache_sentinel")?(n=()=>{a(Ct)},i={delayMs:1e4,whenVisible:!0},e[1]=n,e[2]=i):(n=e[1],i=e[2]),tt(n,i),e[3]!==t?(l=[t],e[3]=t,e[4]=l):l=e[4];const d=F(It,l);let x,m,h,c,u,f,b,p,g,j,y,v,w,N,k,S,D,C,M,O;if(e[5]!==o||e[6]!==d){b=Symbol.for("react.early_return_sentinel");e:{const $=ge(o,d);if($.error)throw $.error;const G=$.data;if(!G){let R;e[20]===Symbol.for("react.memo_cache_sentinel")?(R=s.jsx(Y,{centered:!0,size:"xlarge"}),e[20]=R):R=e[20],b=R;break e}const[ne,L]=G;let T,A;c=ne,h=z.Suspense,m=ee.Provider,u={runningNotebooks:L,setRunningNotebooks:d.setData},e[21]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(xt,{}),A=s.jsx(at,{showAppConfig:!1}),e[21]=T,e[22]=A):(T=e[21],A=e[22]);const V=`This will shutdown the notebook server and terminate all running notebooks (${L.size}). You'll lose all data that's in memory.`;e[23]!==V?(f=s.jsxs("div",{className:"absolute top-3 right-5 flex gap-3 z-50",children:[T,A,s.jsx(st,{description:V})]}),e[23]=V,e[24]=f):f=e[24],j="flex flex-col gap-6 max-w-6xl container pt-5 pb-20 z-10",e[25]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx("img",{src:"logo.png",alt:"marimo logo",className:"w-48 mb-2"}),v=s.jsx(St,{}),w=s.jsx(pt,{}),e[25]=y,e[26]=v,e[27]=w):(y=e[25],v=e[26],w=e[27]),x=re,e[28]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(W,{Icon:nt,children:"Running notebooks"}),e[28]=p):p=e[28],g=[...L.values()]}e[5]=o,e[6]=d,e[7]=x,e[8]=m,e[9]=h,e[10]=c,e[11]=u,e[12]=f,e[13]=b,e[14]=p,e[15]=g,e[16]=j,e[17]=y,e[18]=v,e[19]=w}else x=e[7],m=e[8],h=e[9],c=e[10],u=e[11],f=e[12],b=e[13],p=e[14],g=e[15],j=e[16],y=e[17],v=e[18],w=e[19];return b!==Symbol.for("react.early_return_sentinel")?b:(e[29]!==x||e[30]!==p||e[31]!==g?(N=s.jsx(x,{header:p,files:g}),e[29]=x,e[30]=p,e[31]=g,e[32]=N):N=e[32],e[33]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(W,{Icon:Ne,children:"Recent notebooks"}),e[33]=k):k=e[33],e[34]!==c.files?(S=s.jsx(re,{header:k,files:c.files}),e[34]=c.files,e[35]=S):S=e[35],e[36]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(_e,{children:s.jsx(jt,{})}),e[36]=D):D=e[36],e[37]!==N||e[38]!==S||e[39]!==j||e[40]!==y||e[41]!==v||e[42]!==w?(C=s.jsxs("div",{className:j,children:[y,v,w,N,S,D]}),e[37]=N,e[38]=S,e[39]=j,e[40]=y,e[41]=v,e[42]=w,e[43]=C):C=e[43],e[44]!==m||e[45]!==u||e[46]!==f||e[47]!==C?(M=s.jsxs(m,{value:u,children:[f,C]}),e[44]=m,e[45]=u,e[46]=f,e[47]=C,e[48]=M):M=e[48],e[49]!==h||e[50]!==M?(O=s.jsx(h,{children:M}),e[49]=h,e[50]=M,e[51]=O):O=e[51],O)},jt=()=>{const e=_.c(39),[t,a]=X(ht),[r,o]=z.useState("");let n,i;e[0]!==t?(n=()=>Le({includeMarkdown:t}),i=[t],e[0]=t,e[1]=n,e[2]=i):(n=e[1],i=e[2]);const l=F(n,i);if(l.error){let k,S;return e[3]!==l.error?(k=Se(l.error),e[3]=l.error,e[4]=k):k=e[4],e[5]!==k?(S=s.jsx(Ve,{kind:"danger",className:"rounded p-4",children:k}),e[5]=k,e[6]=S):S=e[6],S}if(l.loading||!l.data){let k;return e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(Y,{centered:!0,size:"xlarge",className:"mt-6"}),e[7]=k):k=e[7],k}const d=l.data;let x,m,h,c,u,f,b,p,g,j,y,v,w,N;return e[8]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx(He,{size:13}),m=k=>o(k.target.value),e[8]=x,e[9]=m):(x=e[8],m=e[9]),e[10]!==r?(h=s.jsx(Ue,{id:"search",value:r,icon:x,onChange:m,placeholder:"Search",className:"mb-0 border-border"}),e[10]=r,e[11]=h):h=e[11],e[12]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(vt,{}),e[12]=c):c=e[12],e[13]!==a?(u=k=>a(!!k),e[13]=a,e[14]=u):u=e[14],e[15]!==t||e[16]!==u?(f=s.jsx(Be,{"data-testid":"include-markdown-checkbox",id:"include-markdown",checked:t,onCheckedChange:u}),e[15]=t,e[16]=u,e[17]=f):f=e[17],e[18]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Fe,{htmlFor:"include-markdown",children:"Include markdown"}),e[18]=b):b=e[18],e[19]!==h||e[20]!==f?(p=s.jsxs("div",{className:"flex items-center gap-2",children:[h,c,f,b]}),e[19]=h,e[20]=f,e[21]=p):p=e[21],e[22]!==l?(g=s.jsx(Ye,{className:"w-4 h-4 ml-1 cursor-pointer opacity-70 hover:opacity-100",onClick:()=>l.reload()}),e[22]=l,e[23]=g):g=e[23],e[24]!==l.loading?(j=l.loading&&s.jsx(Y,{size:"small"}),e[24]=l.loading,e[25]=j):j=e[25],e[26]!==g||e[27]!==j||e[28]!==p?(y=s.jsxs(W,{Icon:lt,control:p,children:["Workspace",g,j]}),e[26]=g,e[27]=j,e[28]=p,e[29]=y):y=e[29],e[30]!==r||e[31]!==d.files?(v=s.jsx("div",{className:"flex flex-col divide-y divide-[var(--slate-3)] border rounded overflow-hidden max-h-[48rem] overflow-y-auto shadow-sm bg-background",children:s.jsx(kt,{searchText:r,files:d.files})}),e[30]=r,e[31]=d.files,e[32]=v):v=e[32],e[33]!==y||e[34]!==v?(w=s.jsxs("div",{className:"flex flex-col gap-2",children:[y,v]}),e[33]=y,e[34]=v,e[35]=w):w=e[35],e[36]!==w||e[37]!==d.root?(N=s.jsx(te.Provider,{value:d.root,children:w}),e[36]=w,e[37]=d.root,e[38]=N):N=e[38],N},vt=()=>{const e=_.c(5),t=ze(ae);let a,r,o;return e[0]!==t?(a=()=>{t({})},e[0]=t,e[1]=a):a=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ee,{className:"w-4 h-4 mr-1"}),e[2]=r):r=e[2],e[3]!==a?(o=s.jsxs(B,{variant:"text",size:"sm",className:"h-fit hidden sm:flex",onClick:a,children:[r,"Collapse all"]}),e[3]=a,e[4]=o):o=e[4],o},kt=e=>{const t=_.c(12),{files:a,searchText:r}=e,[o,n]=X(ae),i=Object.keys(o).length===0,l=z.useRef(void 0);let d,x,m,h;if(t[0]!==i?(d=()=>{var c;i&&((c=l.current)==null||c.closeAll())},x=[i],t[0]=i,t[1]=d,t[2]=x):(d=t[1],x=t[2]),z.useEffect(d,x),a.length===0){let c;return t[3]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"flex flex-col px-5 py-10 items-center justify-center",children:s.jsx("p",{className:"text-center text-muted-foreground",children:"No files in this workspace"})}),t[3]=c):c=t[3],c}return t[4]!==o||t[5]!==n?(m=async c=>{const u=o[c]??!1;n({...o,[c]:!u})},t[4]=o,t[5]=n,t[6]=m):m=t[6],t[7]!==a||t[8]!==o||t[9]!==r||t[10]!==m?(h=s.jsx(rt,{ref:l,width:"100%",height:500,searchTerm:r,className:"h-full",idAccessor:Pt,data:a,openByDefault:!1,initialOpenState:o,onToggle:m,padding:5,rowHeight:35,indent:15,overscanCount:1e3,renderCursor:Dt,disableDrop:!0,disableDrag:!0,disableEdit:!0,disableMultiSelection:!0,children:wt}),t[7]=a,t[8]=o,t[9]=r,t[10]=m,t[11]=h):h=t[11],h},wt=e=>{const t=_.c(19),{node:a,style:r}=e,o=a.data.isDirectory?"directory":Ce(a.data.name),n=Me[o];let i;t[0]!==n?(i=s.jsx(n,{className:"w-5 h-5 flex-shrink-0",strokeWidth:1.5}),t[0]=n,t[1]=i):i=t[1];const l=i,d=z.useContext(te);let x;t[2]!==l||t[3]!==a.data.isDirectory||t[4]!==a.data.name||t[5]!==a.data.path||t[6]!==d?(x=()=>{if(a.data.isDirectory)return s.jsxs("span",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",children:[l,a.data.name]});const p=a.data.path.startsWith(d)&&Z.isAbsolute(a.data.path)?Z.rest(a.data.path,d):a.data.path,g=p.endsWith(".md")||p.endsWith(".qmd");return s.jsxs("a",{className:"flex items-center pl-1 cursor-pointer hover:bg-accent/50 hover:text-accent-foreground rounded-l flex-1 overflow-hidden h-full pr-3 gap-2",href:U(`?file=${p}`).toString(),target:se(p),children:[l,s.jsxs("span",{className:"flex-1 overflow-hidden text-ellipsis",children:[a.data.name,g&&s.jsx(H,{className:"ml-2 inline opacity-80"})]}),s.jsx(oe,{filePath:p}),s.jsx(E,{size:20,className:"group-hover:opacity-100 opacity-0 text-primary"})]})},t[2]=l,t[3]=a.data.isDirectory,t[4]=a.data.name,t[5]=a.data.path,t[6]=d,t[7]=x):x=t[7];const m=x;let h,c,u,f,b;return t[8]===Symbol.for("react.memo_cache_sentinel")?(h=Ie("flex items-center cursor-pointer ml-1 text-muted-foreground whitespace-nowrap group h-full"),t[8]=h):h=t[8],t[9]!==a?(c=p=>{p.stopPropagation(),a.data.isDirectory&&a.toggle()},u=s.jsx(Nt,{node:a}),t[9]=a,t[10]=c,t[11]=u):(c=t[10],u=t[11]),t[12]!==m?(f=m(),t[12]=m,t[13]=f):f=t[13],t[14]!==r||t[15]!==c||t[16]!==u||t[17]!==f?(b=s.jsxs("div",{style:r,className:h,onClick:c,children:[u,f]}),t[14]=r,t[15]=c,t[16]=u,t[17]=f,t[18]=b):b=t[18],b},Nt=e=>{const t=_.c(3),{node:a}=e;if(!a.data.isDirectory){let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx("span",{className:"w-5 h-5 flex-shrink-0"}),t[0]=o):o=t[0],o}let r;return t[1]!==a.isOpen?(r=a.isOpen?s.jsx(Pe,{className:"w-5 h-5 flex-shrink-0"}):s.jsx(De,{className:"w-5 h-5 flex-shrink-0"}),t[1]=a.isOpen,t[2]=r):r=t[2],r},re=e=>{const t=_.c(7),{header:a,files:r}=e;if(r.length===0)return null;let o,n,i;return t[0]!==r?(o=r.map(Ot),t[0]=r,t[1]=o):o=t[1],t[2]!==o?(n=s.jsx("div",{className:"flex flex-col divide-y divide-[var(--slate-3)] border rounded overflow-hidden max-h-[48rem] overflow-y-auto shadow-sm bg-background",children:o}),t[2]=o,t[3]=n):n=t[3],t[4]!==a||t[5]!==n?(i=s.jsxs("div",{className:"flex flex-col gap-2",children:[a,n]}),t[4]=a,t[5]=n,t[6]=i):i=t[6],i},_t=e=>{const t=_.c(40),{file:a}=e;let r;t[0]!==a.path?(r=ve(a.path),t[0]=a.path,t[1]=r):r=t[1];const o=r;let n,i,l,d;if(t[2]!==a.initializationId||t[3]!==a.path||t[4]!==o){const w=U(o?`?file=${a.initializationId}&session_id=${a.path}`:`?file=${a.path}`);let N;t[9]!==a.path?(N=a.path.endsWith(".md"),t[9]=a.path,t[10]=N):N=t[10],n=N,i="py-1.5 px-4 hover:bg-[var(--blue-2)] hover:text-primary transition-all duration-300 cursor-pointer group relative flex gap-4 items-center",l=a.path,d=w.toString(),t[2]=a.initializationId,t[3]=a.path,t[4]=o,t[5]=n,t[6]=i,t[7]=l,t[8]=d}else n=t[5],i=t[6],l=t[7],d=t[8];const x=a.initializationId||a.path;let m,h,c,u,f,b,p,g,j,y,v;return t[11]!==x?(m=se(x),t[11]=x,t[12]=m):m=t[12],t[13]!==n?(h=n&&s.jsx("span",{className:"opacity-80",children:s.jsx(H,{})}),t[13]=n,t[14]=h):h=t[14],t[15]!==a.name||t[16]!==h?(c=s.jsxs("span",{className:"flex items-center gap-2",children:[a.name,h]}),t[15]=a.name,t[16]=h,t[17]=c):c=t[17],t[18]!==a.path?(u=s.jsx("p",{title:a.path,className:"text-sm text-muted-foreground overflow-hidden whitespace-nowrap overflow-ellipsis",children:a.path}),t[18]=a.path,t[19]=u):u=t[19],t[20]!==c||t[21]!==u?(f=s.jsxs("div",{className:"flex flex-col justify-between flex-1",children:[c,u]}),t[20]=c,t[21]=u,t[22]=f):f=t[22],t[23]!==a.path?(b=s.jsx("div",{children:s.jsx(oe,{filePath:a.path})}),t[23]=a.path,t[24]=b):b=t[24],t[25]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(E,{size:20,className:"group-hover:opacity-100 opacity-0 transition-all duration-300 text-primary"}),t[25]=p):p=t[25],t[26]!==b?(g=s.jsxs("div",{className:"flex gap-3 items-center",children:[b,p]}),t[26]=b,t[27]=g):g=t[27],t[28]!==a.lastModified?(j=!!a.lastModified&&s.jsx("div",{className:"text-xs text-muted-foreground opacity-80",children:ke(1e3*a.lastModified)}),t[28]=a.lastModified,t[29]=j):j=t[29],t[30]!==g||t[31]!==j?(y=s.jsxs("div",{className:"flex flex-col gap-1 items-end",children:[g,j]}),t[30]=g,t[31]=j,t[32]=y):y=t[32],t[33]!==f||t[34]!==y||t[35]!==i||t[36]!==l||t[37]!==d||t[38]!==m?(v=s.jsxs("a",{className:i,href:d,target:m,children:[f,y]},l),t[33]=f,t[34]=y,t[35]=i,t[36]=l,t[37]=d,t[38]=m,t[39]=v):v=t[39],v},oe=e=>{const t=_.c(9),{filePath:a}=e,{openConfirm:r,closeModal:o}=we(),{runningNotebooks:n,setRunningNotebooks:i}=z.useContext(ee);if(!n.has(a))return null;let l,d,x;return t[0]!==o||t[1]!==a||t[2]!==r||t[3]!==n||t[4]!==i?(l=m=>{m.stopPropagation(),m.preventDefault(),r({title:"Shutdown",description:"This will terminate the Python kernel. You'll lose all data that's in memory.",variant:"destructive",confirmAction:s.jsx(Oe,{onClick:h=>{const c=n.get(a);Te(c==null?void 0:c.sessionId),Ae({sessionId:c.sessionId}).then(u=>{i(K.keyBy(u.files,Tt))}),o(),Re({description:"Notebook has been shutdown."})},"aria-label":"Confirm Shutdown",children:"Shutdown"})})},t[0]=o,t[1]=a,t[2]=r,t[3]=n,t[4]=i,t[5]=l):l=t[5],t[6]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ot,{size:14}),t[6]=d):d=t[6],t[7]!==l?(x=s.jsx(We,{content:"Shutdown",children:s.jsx(B,{size:"icon",variant:"outline",className:"opacity-80 hover:opacity-100 hover:bg-accent text-destructive border-destructive hover:border-destructive hover:text-destructive bg-background hover:bg-[var(--red-1)]",onClick:l,children:d})}),t[7]=l,t[8]=x):x=t[8],x},St=()=>{const e=_.c(3);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=$e(),e[0]=t):t=e[0];const a=t;let r,o;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx("h2",{className:"text-lg font-semibold",children:"Create a new notebook"}),e[1]=r):r=e[1],e[2]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsxs("a",{className:`relative rounded-lg p-6 group
|
7
7
|
text-primary hover:bg-[var(--blue-2)] shadow-mdSolid shadow-accent border bg-[var(--blue-1)]
|
8
8
|
transition-all duration-300 cursor-pointer
|
9
9
|
`,href:a,target:"_blank",rel:"noreferrer",children:[r,s.jsx("div",{className:"group-hover:opacity-100 opacity-0 absolute right-5 top-0 bottom-0 rounded-lg flex items-center justify-center transition-all duration-300",children:s.jsx(E,{size:24})})]}),e[2]=o):o=e[2],o};function zt(){return ye()}function Ct(e){return e+1}function Mt(e){return e.path}async function It(){const e=await je();return K.keyBy(e.files,Mt)}function Pt(e){return e.path}function Dt(){return null}function Ot(e){return s.jsx(_t,{file:e},e.path)}function Tt(e){return e.path}export{yt as default};
|
@@ -1 +1 @@
|
|
1
|
-
import{f as j,l as Q,s as I,A as N,t as g,b as U,c as z,i as q,g as D,G as B,r as F}from"./index-C8t4MIbp.js";function M(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let E=null,G=null,R=0;function W(e,t){let O=e.pos+t;if(G==e&&R==O)return E;for(;(l=e.peek(t))==9||l==10||l==13||l==32;)t++;var l;let p="";for(;;){let $=e.peek(t);if(!M($))break;p+=String.fromCharCode($),t++}return G=e,R=O,E=p||null}function Z(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let O=0;O<e.length;O++)this.hash+=(this.hash<<4)+e.charCodeAt(O)+(e.charCodeAt(O)<<8)}const J=new N({start:null,shift:(e,t,O,l)=>t==1?new Z(W(l,1)||"",e):e,reduce:(e,t)=>t==11&&e?e.parent:e,reuse(e,t,O,l){let p=t.type.id;return p==1||p==13?new Z(W(l,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),K=new Q((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let O=W(e,0);if(!O)return e.acceptToken(5);if(t.context&&O==t.context.name)return e.acceptToken(2);for(let l=t.context;l;l=l.parent)if(l.name==O)return e.acceptToken(3,-2);e.acceptToken(4)}else if(e.next!=33&&e.next!=63)return e.acceptToken(1)}},{contextual:!0});function b(e,t){return new Q(O=>{let l=0,p=t.charCodeAt(0);e:for(;!(O.next<0);O.advance(),l++)if(O.next==p){for(let $=1;$<t.length;$++)if(O.peek($)!=t.charCodeAt($))continue e;break}l&&O.acceptToken(e)})}const H=b(35,"-->"),L=b(36,"?>"),ee=b(37,"]]>"),te=I({Text:g.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":g.angleBracket,TagName:g.tagName,"MismatchedCloseTag/Tagname":[g.tagName,g.invalid],AttributeName:g.attributeName,AttributeValue:g.attributeValue,Is:g.definitionOperator,"EntityReference CharacterReference":g.character,Comment:g.blockComment,ProcessingInst:g.processingInstruction,DoctypeDecl:g.documentMeta,Cdata:g.special(g.string)}),Oe=j.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(eO#tO'#CnOOOO1G.q1G.qO(sOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO({O#tO,59YOOOO,59Y,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.t",stateData:")Z~OPQOSVOTWOVWOWWOXWOiXOxPO}TO!PUO~OuZOw]O~O^`Oy^O~OPQOQcOSVOTWOVWOWWOXWOxPO}TO!PUO~ORdO~P!SOseO|gO~OthO!OjO~O^lOy^O~OuZOwoO~O^qOy^O~O[vO`sOdwOy^O~ORyO~P!SO^{Oy^O~OseO|}O~OthO!O!PO~O^!QOy^O~O[!SOy^O~O[!VO`sOd!WOy^O~Oa!YOy^O~Oy^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oy^O~O[!_Oy^O~O[!aOy^O~O[!cO`sOd!dOy^O~O[!cO`sOd!dO~Oa!eOy^O~Oy^Oz!gO~Oy^O[ma`madma~O[!jOy^O~O[!kOy^O~O[!lO`sOd!mO~OW!pOX!pOz!rO{!pO~O[!sOy^O~OW!pOX!pOz!vO{!pO~O",goto:"%[wPPPPPPPPPPxxP!OP!UPP!_!iP!oxxxP!u!{#R$Z$j$p$v$|PPPP%SXWORYbXRORYb_t`qru!T!U!bQ!h!YS!o!e!fR!t!nQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!i!nQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!i!]R!n!eQu`S!UqrU![u!U!bR!b!TQ!q!gR!u!qQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"\u26A0 StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:47,context:J,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"]],propSources:[te],skippedNodes:[0],repeatNodeCount:8,tokenData:"Jy~R!XOX$nXY&kYZ&kZ]$n]^&k^p$npq&kqr$nrs'ssv$nvw(Zw}$n}!O,^!O!P$n!P!Q.m!Q![$n![!]0V!]!^$n!^!_3h!_!`El!`!aF_!a!bGQ!b!c$n!c!}0V!}#P$n#P#QHj#Q#R$n#R#S0V#S#T$n#T#o0V#o%W$n%W%o0V%o%p$n%p&a0V&a&b$n&b1p0V1p4U$n4U4d0V4d4e$n4e$IS0V$IS$I`$n$I`$Ib0V$Ib$Kh$n$Kh%#t0V%#t&/x$n&/x&Et0V&Et&FV$n&FV;'S0V;'S;:j3b;:j;=`&e<%l?&r$n?&r?Ah0V?Ah?BY$n?BY?Mn0V?MnO$nX$uWVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nP%dTVPOv%_w!^%_!_;'S%_;'S;=`%s<%lO%_P%vP;=`<%l%_W&OT{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yW&bP;=`<%l%yX&hP;=`<%l$n_&t_VP{WyUOX$nXY&kYZ&kZ]$n]^&k^p$npq&kqr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZ'zTzYVPOv%_w!^%_!_;'S%_;'S;=`%s<%lO%_~(^ast)c![!]*g!c!}*g#R#S*g#T#o*g%W%o*g%p&a*g&b1p*g4U4d*g4e$IS*g$I`$Ib*g$Kh%#t*g&/x&Et*g&FV;'S*g;'S;:j,W?&r?Ah*g?BY?Mn*g~)fQ!Q![)l#l#m)z~)oQ!Q![)l!]!^)u~)zOX~~)}R!Q![*W!c!i*W#T#Z*W~*ZS!Q![*W!]!^)u!c!i*W#T#Z*W~*jg}!O*g!O!P*g!Q![*g![!]*g!]!^,R!c!}*g#R#S*g#T#o*g$}%O*g%W%o*g%p&a*g&b1p*g1p4U*g4U4d*g4e$IS*g$I`$Ib*g$Je$Jg*g$Kh%#t*g&/x&Et*g&FV;'S*g;'S;:j,W?&r?Ah*g?BY?Mn*g~,WOW~~,ZP;=`<%l*gZ,eYVP{WOr$nrs%_sv$nw}$n}!O-T!O!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZ-[YVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!a-z!a;'S$n;'S;=`&e<%lO$nZ.TW|QVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n].tYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!a/d!a;'S$n;'S;=`&e<%lO$n]/mWdSVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_0b!O`S^QVP{WOr$nrs%_sv$nw}$n}!O0V!O!P0V!P!Q$n!Q![0V![!]0V!]!^$n!^!_%y!_!c$n!c!}0V!}#R$n#R#S0V#S#T$n#T#o0V#o$}$n$}%O0V%O%W$n%W%o0V%o%p$n%p&a0V&a&b$n&b1p0V1p4U0V4U4d0V4d4e$n4e$IS0V$IS$I`$n$I`$Ib0V$Ib$Je$n$Je$Jg0V$Jg$Kh$n$Kh%#t0V%#t&/x$n&/x&Et0V&Et&FV$n&FV;'S0V;'S;:j3b;:j;=`&e<%l?&r$n?&r?Ah0V?Ah?BY$n?BY?Mn0V?MnO$n_3eP;=`<%l0VX3mW{WOq%yqr4Vsv%yw!a%y!a!bEU!b;'S%y;'S;=`&_<%lO%yX4[]{WOr%ysv%yw}%y}!O5T!O!f%y!f!g6V!g!}%y!}#O;f#O#W%y#W#XAr#X;'S%y;'S;=`&_<%lO%yX5YV{WOr%ysv%yw}%y}!O5o!O;'S%y;'S;=`&_<%lO%yX5vT}P{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yX6[V{WOr%ysv%yw!q%y!q!r6q!r;'S%y;'S;=`&_<%lO%yX6vV{WOr%ysv%yw!e%y!e!f7]!f;'S%y;'S;=`&_<%lO%yX7bV{WOr%ysv%yw!v%y!v!w7w!w;'S%y;'S;=`&_<%lO%yX7|V{WOr%ysv%yw!{%y!{!|8c!|;'S%y;'S;=`&_<%lO%yX8hV{WOr%ysv%yw!r%y!r!s8}!s;'S%y;'S;=`&_<%lO%yX9SV{WOr%ysv%yw!g%y!g!h9i!h;'S%y;'S;=`&_<%lO%yX9nX{WOr9irs:Zsv9ivw:Zw!`9i!`!a:x!a;'S9i;'S;=`;`<%lO9iP:^TO!`:Z!`!a:m!a;'S:Z;'S;=`:r<%lO:ZP:rOiPP:uP;=`<%l:ZX;PTiP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yX;cP;=`<%l9iX;kX{WOr%ysv%yw!e%y!e!f<W!f#V%y#V#W?f#W;'S%y;'S;=`&_<%lO%yX<]V{WOr%ysv%yw!f%y!f!g<r!g;'S%y;'S;=`&_<%lO%yX<wV{WOr%ysv%yw!c%y!c!d=^!d;'S%y;'S;=`&_<%lO%yX=cV{WOr%ysv%yw!v%y!v!w=x!w;'S%y;'S;=`&_<%lO%yX=}V{WOr%ysv%yw!c%y!c!d>d!d;'S%y;'S;=`&_<%lO%yX>iV{WOr%ysv%yw!}%y!}#O?O#O;'S%y;'S;=`&_<%lO%yX?VT{WxPOr%ysv%yw;'S%y;'S;=`&_<%lO%yX?kV{WOr%ysv%yw#W%y#W#X@Q#X;'S%y;'S;=`&_<%lO%yX@VV{WOr%ysv%yw#T%y#T#U@l#U;'S%y;'S;=`&_<%lO%yX@qV{WOr%ysv%yw#h%y#h#iAW#i;'S%y;'S;=`&_<%lO%yXA]V{WOr%ysv%yw#T%y#T#U>d#U;'S%y;'S;=`&_<%lO%yXAwV{WOr%ysv%yw#c%y#c#dB^#d;'S%y;'S;=`&_<%lO%yXBcV{WOr%ysv%yw#V%y#V#WBx#W;'S%y;'S;=`&_<%lO%yXB}V{WOr%ysv%yw#h%y#h#iCd#i;'S%y;'S;=`&_<%lO%yXCiV{WOr%ysv%yw#m%y#m#nDO#n;'S%y;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",tokenizers:[K,H,L,ee,0,1,2,3],topRules:{Document:[0,6]},tokenPrec:0});function T(e,t){let O=t&&t.getChild("TagName");return O?e.sliceString(O.from,O.to):""}function v(e,t){let O=t&&t.firstChild;return O&&O.name=="OpenTag"?T(e,O):""}function C(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}class ne{constructor(t,O,l){this.attrs=O,this.attrValues=l,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(p=>({label:p,type:"text"})):[]}}const w=/^[:\-\.\w\u00b7-\uffff]*$/;function Y(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function k(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function A(e,t){let O=[],l=[],p=Object.create(null);for(let a of t){let S=Y(a);O.push(S),a.global&&l.push(S),a.values&&(p[a.name]=a.values.map(k))}let $=[],h=[],V=Object.create(null);for(let a of e){let S=l,y=p;a.attributes&&(S=S.concat(a.attributes.map(m=>typeof m=="string"?O.find(P=>P.label==m)||{label:m,type:"property"}:(m.values&&(y==p&&(y=Object.create(y)),y[m.name]=m.values.map(k)),Y(m)))));let u=new ne(a,S,y);V[u.name]=u,$.push(u),a.top&&h.push(u)}h.length||(h=$);for(let a=0;a<$.length;a++){let S=e[a],y=$[a];if(S.children)for(let u of S.children)V[u]&&y.children.push(V[u]);else y.children=$}return a=>{var S;let{doc:y}=a.state,u=function(i,r){var c;let n=F(i).resolveInner(r,-1),s=null;for(let o=n;!s&&o.parent;o=o.parent)o.name!="OpenTag"&&o.name!="CloseTag"&&o.name!="SelfClosingTag"&&o.name!="MismatchedCloseTag"||(s=o);if(s&&(s.to>r||s.lastChild.type.isError)){let o=s.parent;if(n.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:n.from,context:o}:{type:"openTag",from:n.from,context:C(o)};if(n.name=="AttributeName")return{type:"attrName",from:n.from,context:s};if(n.name=="AttributeValue")return{type:"attrValue",from:n.from,context:s};let d=n==s||n.name=="Attribute"?n.childBefore(r):n;return(d==null?void 0:d.name)=="StartTag"?{type:"openTag",from:r,context:C(o)}:(d==null?void 0:d.name)=="StartCloseTag"&&d.to<=r?{type:"closeTag",from:r,context:o}:(d==null?void 0:d.name)=="Is"?{type:"attrValue",from:r,context:s}:d?{type:"attrName",from:r,context:s}:null}if(n.name=="StartCloseTag")return{type:"closeTag",from:r,context:n.parent};for(;n.parent&&n.to==r&&!(!((c=n.lastChild)===null||c===void 0)&&c.type.isError);)n=n.parent;return n.name=="Element"||n.name=="Text"||n.name=="Document"?{type:"tag",from:r,context:n.name=="Element"?n:C(n)}:null}(a.state,a.pos);if(!u||u.type=="tag"&&!a.explicit)return null;let{type:m,from:P,context:f}=u;if(m=="openTag"){let i=h,r=v(y,f);if(r){let c=V[r];i=(c==null?void 0:c.children)||$}return{from:P,options:i.map(c=>c.completion),validFor:w}}if(m=="closeTag"){let i=v(y,f);return i?{from:P,to:a.pos+(y.sliceString(a.pos,a.pos+1)==">"?1:0),options:[((S=V[i])===null||S===void 0?void 0:S.closeNameCompletion)||{label:i+">",type:"type"}],validFor:w}:null}if(m=="attrName"){let i=V[T(y,f)];return{from:P,options:(i==null?void 0:i.attrs)||l,validFor:w}}if(m=="attrValue"){let i=function(n,s,o){let d=s&&s.getChildren("Attribute").find(X=>X.from<=o&&X.to>=o),_=d&&d.getChild("AttributeName");return _?n.sliceString(_.from,_.to):""}(y,f,P);if(!i)return null;let r=V[T(y,f)],c=((r==null?void 0:r.attrValues)||p)[i];return c&&c.length?{from:P,to:a.pos+(y.sliceString(a.pos,a.pos+1)=='"'?1:0),options:c,validFor:/^"[^"]*"?$/}:null}if(m=="tag"){let i=v(y,f),r=V[i],c=[],n=f&&f.lastChild;!i||n&&n.name=="CloseTag"&&T(y,n)==i||c.push(r?r.closeCompletion:{label:"</"+i+">",type:"type",boost:2});let s=c.concat(((r==null?void 0:r.children)||(f?$:h)).map(o=>o.openCompletion));if(f&&(r!=null&&r.text.length)){let o=f.firstChild;o.to>a.pos-20&&!/\S/.test(a.state.sliceDoc(o.to,a.pos))&&(s=s.concat(r.text))}return{from:P,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}return null}}const x=z.define({name:"xml",parser:Oe.configure({props:[q.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit}),D.add({Element(e){let t=e.firstChild,O=e.lastChild;return t&&t.name=="OpenTag"?{from:t.to,to:O.name=="CloseTag"?O.from:e.to}:null}}),B.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function ae(e={}){return new U(x,x.data.of({autocomplete:A(e.elements||[],e.attributes||[])}))}export{A as completeFromSchema,ae as xml,x as xmlLanguage};
|
1
|
+
import{f as j,l as Q,s as I,A as N,t as g,b as U,d as z,i as q,g as D,G as B,r as F}from"./index-CNf099oP.js";function M(e){return e==45||e==46||e==58||e>=65&&e<=90||e==95||e>=97&&e<=122||e>=161}let E=null,G=null,R=0;function W(e,t){let O=e.pos+t;if(G==e&&R==O)return E;for(;(l=e.peek(t))==9||l==10||l==13||l==32;)t++;var l;let p="";for(;;){let $=e.peek(t);if(!M($))break;p+=String.fromCharCode($),t++}return G=e,R=O,E=p||null}function Z(e,t){this.name=e,this.parent=t,this.hash=t?t.hash:0;for(let O=0;O<e.length;O++)this.hash+=(this.hash<<4)+e.charCodeAt(O)+(e.charCodeAt(O)<<8)}const J=new N({start:null,shift:(e,t,O,l)=>t==1?new Z(W(l,1)||"",e):e,reduce:(e,t)=>t==11&&e?e.parent:e,reuse(e,t,O,l){let p=t.type.id;return p==1||p==13?new Z(W(l,1)||"",e):e},hash:e=>e?e.hash:0,strict:!1}),K=new Q((e,t)=>{if(e.next==60){if(e.advance(),e.next==47){e.advance();let O=W(e,0);if(!O)return e.acceptToken(5);if(t.context&&O==t.context.name)return e.acceptToken(2);for(let l=t.context;l;l=l.parent)if(l.name==O)return e.acceptToken(3,-2);e.acceptToken(4)}else if(e.next!=33&&e.next!=63)return e.acceptToken(1)}},{contextual:!0});function b(e,t){return new Q(O=>{let l=0,p=t.charCodeAt(0);e:for(;!(O.next<0);O.advance(),l++)if(O.next==p){for(let $=1;$<t.length;$++)if(O.peek($)!=t.charCodeAt($))continue e;break}l&&O.acceptToken(e)})}const H=b(35,"-->"),L=b(36,"?>"),ee=b(37,"]]>"),te=I({Text:g.content,"StartTag StartCloseTag EndTag SelfCloseEndTag":g.angleBracket,TagName:g.tagName,"MismatchedCloseTag/Tagname":[g.tagName,g.invalid],AttributeName:g.attributeName,AttributeValue:g.attributeValue,Is:g.definitionOperator,"EntityReference CharacterReference":g.character,Comment:g.blockComment,ProcessingInst:g.processingInstruction,DoctypeDecl:g.documentMeta,Cdata:g.special(g.string)}),Oe=j.deserialize({version:14,states:",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(eO#tO'#CnOOOO1G.q1G.qO(sOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO({O#tO,59YOOOO,59Y,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.t",stateData:")Z~OPQOSVOTWOVWOWWOXWOiXOxPO}TO!PUO~OuZOw]O~O^`Oy^O~OPQOQcOSVOTWOVWOWWOXWOxPO}TO!PUO~ORdO~P!SOseO|gO~OthO!OjO~O^lOy^O~OuZOwoO~O^qOy^O~O[vO`sOdwOy^O~ORyO~P!SO^{Oy^O~OseO|}O~OthO!O!PO~O^!QOy^O~O[!SOy^O~O[!VO`sOd!WOy^O~Oa!YOy^O~Oy^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oy^O~O[!_Oy^O~O[!aOy^O~O[!cO`sOd!dOy^O~O[!cO`sOd!dO~Oa!eOy^O~Oy^Oz!gO~Oy^O[ma`madma~O[!jOy^O~O[!kOy^O~O[!lO`sOd!mO~OW!pOX!pOz!rO{!pO~O[!sOy^O~OW!pOX!pOz!vO{!pO~O",goto:"%[wPPPPPPPPPPxxP!OP!UPP!_!iP!oxxxP!u!{#R$Z$j$p$v$|PPPP%SXWORYbXRORYb_t`qru!T!U!bQ!h!YS!o!e!fR!t!nQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!i!nQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!i!]R!n!eQu`S!UqrU![u!U!bR!b!TQ!q!gR!u!qQbRRxbQfTR|fQiUR!OiSXOYTaRb",nodeNames:"\u26A0 StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",maxTerm:47,context:J,nodeProps:[["closedBy",1,"SelfCloseEndTag EndTag",13,"CloseTag MissingCloseTag"],["openedBy",12,"StartTag StartCloseTag",19,"OpenTag",20,"StartTag"]],propSources:[te],skippedNodes:[0],repeatNodeCount:8,tokenData:"Jy~R!XOX$nXY&kYZ&kZ]$n]^&k^p$npq&kqr$nrs'ssv$nvw(Zw}$n}!O,^!O!P$n!P!Q.m!Q![$n![!]0V!]!^$n!^!_3h!_!`El!`!aF_!a!bGQ!b!c$n!c!}0V!}#P$n#P#QHj#Q#R$n#R#S0V#S#T$n#T#o0V#o%W$n%W%o0V%o%p$n%p&a0V&a&b$n&b1p0V1p4U$n4U4d0V4d4e$n4e$IS0V$IS$I`$n$I`$Ib0V$Ib$Kh$n$Kh%#t0V%#t&/x$n&/x&Et0V&Et&FV$n&FV;'S0V;'S;:j3b;:j;=`&e<%l?&r$n?&r?Ah0V?Ah?BY$n?BY?Mn0V?MnO$nX$uWVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nP%dTVPOv%_w!^%_!_;'S%_;'S;=`%s<%lO%_P%vP;=`<%l%_W&OT{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yW&bP;=`<%l%yX&hP;=`<%l$n_&t_VP{WyUOX$nXY&kYZ&kZ]$n]^&k^p$npq&kqr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZ'zTzYVPOv%_w!^%_!_;'S%_;'S;=`%s<%lO%_~(^ast)c![!]*g!c!}*g#R#S*g#T#o*g%W%o*g%p&a*g&b1p*g4U4d*g4e$IS*g$I`$Ib*g$Kh%#t*g&/x&Et*g&FV;'S*g;'S;:j,W?&r?Ah*g?BY?Mn*g~)fQ!Q![)l#l#m)z~)oQ!Q![)l!]!^)u~)zOX~~)}R!Q![*W!c!i*W#T#Z*W~*ZS!Q![*W!]!^)u!c!i*W#T#Z*W~*jg}!O*g!O!P*g!Q![*g![!]*g!]!^,R!c!}*g#R#S*g#T#o*g$}%O*g%W%o*g%p&a*g&b1p*g1p4U*g4U4d*g4e$IS*g$I`$Ib*g$Je$Jg*g$Kh%#t*g&/x&Et*g&FV;'S*g;'S;:j,W?&r?Ah*g?BY?Mn*g~,WOW~~,ZP;=`<%l*gZ,eYVP{WOr$nrs%_sv$nw}$n}!O-T!O!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZ-[YVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!a-z!a;'S$n;'S;=`&e<%lO$nZ.TW|QVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n].tYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!a/d!a;'S$n;'S;=`&e<%lO$n]/mWdSVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_0b!O`S^QVP{WOr$nrs%_sv$nw}$n}!O0V!O!P0V!P!Q$n!Q![0V![!]0V!]!^$n!^!_%y!_!c$n!c!}0V!}#R$n#R#S0V#S#T$n#T#o0V#o$}$n$}%O0V%O%W$n%W%o0V%o%p$n%p&a0V&a&b$n&b1p0V1p4U0V4U4d0V4d4e$n4e$IS0V$IS$I`$n$I`$Ib0V$Ib$Je$n$Je$Jg0V$Jg$Kh$n$Kh%#t0V%#t&/x$n&/x&Et0V&Et&FV$n&FV;'S0V;'S;:j3b;:j;=`&e<%l?&r$n?&r?Ah0V?Ah?BY$n?BY?Mn0V?MnO$n_3eP;=`<%l0VX3mW{WOq%yqr4Vsv%yw!a%y!a!bEU!b;'S%y;'S;=`&_<%lO%yX4[]{WOr%ysv%yw}%y}!O5T!O!f%y!f!g6V!g!}%y!}#O;f#O#W%y#W#XAr#X;'S%y;'S;=`&_<%lO%yX5YV{WOr%ysv%yw}%y}!O5o!O;'S%y;'S;=`&_<%lO%yX5vT}P{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yX6[V{WOr%ysv%yw!q%y!q!r6q!r;'S%y;'S;=`&_<%lO%yX6vV{WOr%ysv%yw!e%y!e!f7]!f;'S%y;'S;=`&_<%lO%yX7bV{WOr%ysv%yw!v%y!v!w7w!w;'S%y;'S;=`&_<%lO%yX7|V{WOr%ysv%yw!{%y!{!|8c!|;'S%y;'S;=`&_<%lO%yX8hV{WOr%ysv%yw!r%y!r!s8}!s;'S%y;'S;=`&_<%lO%yX9SV{WOr%ysv%yw!g%y!g!h9i!h;'S%y;'S;=`&_<%lO%yX9nX{WOr9irs:Zsv9ivw:Zw!`9i!`!a:x!a;'S9i;'S;=`;`<%lO9iP:^TO!`:Z!`!a:m!a;'S:Z;'S;=`:r<%lO:ZP:rOiPP:uP;=`<%l:ZX;PTiP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yX;cP;=`<%l9iX;kX{WOr%ysv%yw!e%y!e!f<W!f#V%y#V#W?f#W;'S%y;'S;=`&_<%lO%yX<]V{WOr%ysv%yw!f%y!f!g<r!g;'S%y;'S;=`&_<%lO%yX<wV{WOr%ysv%yw!c%y!c!d=^!d;'S%y;'S;=`&_<%lO%yX=cV{WOr%ysv%yw!v%y!v!w=x!w;'S%y;'S;=`&_<%lO%yX=}V{WOr%ysv%yw!c%y!c!d>d!d;'S%y;'S;=`&_<%lO%yX>iV{WOr%ysv%yw!}%y!}#O?O#O;'S%y;'S;=`&_<%lO%yX?VT{WxPOr%ysv%yw;'S%y;'S;=`&_<%lO%yX?kV{WOr%ysv%yw#W%y#W#X@Q#X;'S%y;'S;=`&_<%lO%yX@VV{WOr%ysv%yw#T%y#T#U@l#U;'S%y;'S;=`&_<%lO%yX@qV{WOr%ysv%yw#h%y#h#iAW#i;'S%y;'S;=`&_<%lO%yXA]V{WOr%ysv%yw#T%y#T#U>d#U;'S%y;'S;=`&_<%lO%yXAwV{WOr%ysv%yw#c%y#c#dB^#d;'S%y;'S;=`&_<%lO%yXBcV{WOr%ysv%yw#V%y#V#WBx#W;'S%y;'S;=`&_<%lO%yXB}V{WOr%ysv%yw#h%y#h#iCd#i;'S%y;'S;=`&_<%lO%yXCiV{WOr%ysv%yw#m%y#m#nDO#n;'S%y;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",tokenizers:[K,H,L,ee,0,1,2,3],topRules:{Document:[0,6]},tokenPrec:0});function T(e,t){let O=t&&t.getChild("TagName");return O?e.sliceString(O.from,O.to):""}function v(e,t){let O=t&&t.firstChild;return O&&O.name=="OpenTag"?T(e,O):""}function C(e){for(let t=e&&e.parent;t;t=t.parent)if(t.name=="Element")return t;return null}class ne{constructor(t,O,l){this.attrs=O,this.attrValues=l,this.children=[],this.name=t.name,this.completion=Object.assign(Object.assign({type:"type"},t.completion||{}),{label:this.name}),this.openCompletion=Object.assign(Object.assign({},this.completion),{label:"<"+this.name}),this.closeCompletion=Object.assign(Object.assign({},this.completion),{label:"</"+this.name+">",boost:2}),this.closeNameCompletion=Object.assign(Object.assign({},this.completion),{label:this.name+">"}),this.text=t.textContent?t.textContent.map(p=>({label:p,type:"text"})):[]}}const w=/^[:\-\.\w\u00b7-\uffff]*$/;function Y(e){return Object.assign(Object.assign({type:"property"},e.completion||{}),{label:e.name})}function k(e){return typeof e=="string"?{label:`"${e}"`,type:"constant"}:/^"/.test(e.label)?e:Object.assign(Object.assign({},e),{label:`"${e.label}"`})}function A(e,t){let O=[],l=[],p=Object.create(null);for(let a of t){let S=Y(a);O.push(S),a.global&&l.push(S),a.values&&(p[a.name]=a.values.map(k))}let $=[],h=[],V=Object.create(null);for(let a of e){let S=l,y=p;a.attributes&&(S=S.concat(a.attributes.map(m=>typeof m=="string"?O.find(P=>P.label==m)||{label:m,type:"property"}:(m.values&&(y==p&&(y=Object.create(y)),y[m.name]=m.values.map(k)),Y(m)))));let u=new ne(a,S,y);V[u.name]=u,$.push(u),a.top&&h.push(u)}h.length||(h=$);for(let a=0;a<$.length;a++){let S=e[a],y=$[a];if(S.children)for(let u of S.children)V[u]&&y.children.push(V[u]);else y.children=$}return a=>{var S;let{doc:y}=a.state,u=function(i,r){var c;let n=F(i).resolveInner(r,-1),s=null;for(let o=n;!s&&o.parent;o=o.parent)o.name!="OpenTag"&&o.name!="CloseTag"&&o.name!="SelfClosingTag"&&o.name!="MismatchedCloseTag"||(s=o);if(s&&(s.to>r||s.lastChild.type.isError)){let o=s.parent;if(n.name=="TagName")return s.name=="CloseTag"||s.name=="MismatchedCloseTag"?{type:"closeTag",from:n.from,context:o}:{type:"openTag",from:n.from,context:C(o)};if(n.name=="AttributeName")return{type:"attrName",from:n.from,context:s};if(n.name=="AttributeValue")return{type:"attrValue",from:n.from,context:s};let d=n==s||n.name=="Attribute"?n.childBefore(r):n;return(d==null?void 0:d.name)=="StartTag"?{type:"openTag",from:r,context:C(o)}:(d==null?void 0:d.name)=="StartCloseTag"&&d.to<=r?{type:"closeTag",from:r,context:o}:(d==null?void 0:d.name)=="Is"?{type:"attrValue",from:r,context:s}:d?{type:"attrName",from:r,context:s}:null}if(n.name=="StartCloseTag")return{type:"closeTag",from:r,context:n.parent};for(;n.parent&&n.to==r&&!(!((c=n.lastChild)===null||c===void 0)&&c.type.isError);)n=n.parent;return n.name=="Element"||n.name=="Text"||n.name=="Document"?{type:"tag",from:r,context:n.name=="Element"?n:C(n)}:null}(a.state,a.pos);if(!u||u.type=="tag"&&!a.explicit)return null;let{type:m,from:P,context:f}=u;if(m=="openTag"){let i=h,r=v(y,f);if(r){let c=V[r];i=(c==null?void 0:c.children)||$}return{from:P,options:i.map(c=>c.completion),validFor:w}}if(m=="closeTag"){let i=v(y,f);return i?{from:P,to:a.pos+(y.sliceString(a.pos,a.pos+1)==">"?1:0),options:[((S=V[i])===null||S===void 0?void 0:S.closeNameCompletion)||{label:i+">",type:"type"}],validFor:w}:null}if(m=="attrName"){let i=V[T(y,f)];return{from:P,options:(i==null?void 0:i.attrs)||l,validFor:w}}if(m=="attrValue"){let i=function(n,s,o){let d=s&&s.getChildren("Attribute").find(X=>X.from<=o&&X.to>=o),_=d&&d.getChild("AttributeName");return _?n.sliceString(_.from,_.to):""}(y,f,P);if(!i)return null;let r=V[T(y,f)],c=((r==null?void 0:r.attrValues)||p)[i];return c&&c.length?{from:P,to:a.pos+(y.sliceString(a.pos,a.pos+1)=='"'?1:0),options:c,validFor:/^"[^"]*"?$/}:null}if(m=="tag"){let i=v(y,f),r=V[i],c=[],n=f&&f.lastChild;!i||n&&n.name=="CloseTag"&&T(y,n)==i||c.push(r?r.closeCompletion:{label:"</"+i+">",type:"type",boost:2});let s=c.concat(((r==null?void 0:r.children)||(f?$:h)).map(o=>o.openCompletion));if(f&&(r!=null&&r.text.length)){let o=f.firstChild;o.to>a.pos-20&&!/\S/.test(a.state.sliceDoc(o.to,a.pos))&&(s=s.concat(r.text))}return{from:P,options:s,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}return null}}const x=z.define({name:"xml",parser:Oe.configure({props:[q.add({Element(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"OpenTag CloseTag SelfClosingTag":e=>e.column(e.node.from)+e.unit}),D.add({Element(e){let t=e.firstChild,O=e.lastChild;return t&&t.name=="OpenTag"?{from:t.to,to:O.name=="CloseTag"?O.from:e.to}:null}}),B.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/$/}});function ae(e={}){return new U(x,x.data.of({autocomplete:A(e.elements||[],e.attributes||[])}))}export{A as completeFromSchema,ae as xml,x as xmlLanguage};
|
@@ -1 +1 @@
|
|
1
|
-
import{V as m}from"./VegaLite-
|
1
|
+
import{V as m}from"./VegaLite-Bwm5rsCl.js";import{a as E}from"./VegaLite-Bwm5rsCl.js";import{R as s}from"./index-CNf099oP.js";import"./compile-Cy--pw_w.js";import"./time-SdDHpgFE.js";import"./timer-DFzT7np-.js";import"./linear-C3K_catQ.js";import"./init-DLRA0X12.js";import"./range-CtcPcB_L.js";import"./zoom-COrs4lFh.js";import"./ordinal-DDUp3AbE.js";import"./colors-bszWmPJw.js";import"./arc-Cuwikxov.js";import"./step-BwsUM5iJ.js";import"./index-D1SXFm6O.js";function i(){return i=Object.assign||function(o){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(o[e]=r[e])}return o},i.apply(this,arguments)}function c(o){let{mode:t,spec:r}=o;class e extends s.PureComponent{render(){return s.createElement(m,i({mode:t,spec:r},this.props))}}var n,p,a;return a=function(){return r},(p="getSpec")in(n=e)?Object.defineProperty(n,p,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[p]=a,e}export{m as Vega,E as VegaLite,c as createClassFromSpec};
|