@marimo-team/frontend 0.13.3-dev2 → 0.13.3-dev20
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-C1PO4Eh8.js → ConnectedDataExplorerComponent-DyDnPMLM.js} +2 -2
- package/dist/assets/{VegaLite-BqWBGtcw.js → VegaLite-DmwkC8UF.js} +1 -1
- package/dist/assets/{_baseEach-DcvRaUqZ.js → _baseEach-BjLk1c2j.js} +1 -1
- package/dist/assets/_baseMap-B__tF64v.js +1 -0
- package/dist/assets/{_baseUniq-UrrkDFIh.js → _baseUniq-QLlUR-Ju.js} +1 -1
- package/dist/assets/{_createAggregator-Db7GKMVO.js → _createAggregator-DpFQELkr.js} +1 -1
- package/dist/assets/{any-language-editor-BIkeE1o1.js → any-language-editor-f0TtuGjg.js} +1 -1
- package/dist/assets/arc-Cuwikxov.js +1 -0
- package/dist/assets/{architectureDiagram-IEHRJDOE-CN65q_SA.js → architectureDiagram-IEHRJDOE-DYcKbjLE.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-CfNXQMI0.js → blockDiagram-JOT3LUYC-Debmtsz3.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-Bs5gWUqE.js → c4Diagram-VJAJSXHY-CQggngBS.js} +1 -1
- package/dist/assets/channel-vj7PXloM.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-D0txaY8N.js → chunk-4BMEZGHF-BX16tFbF.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-BNCpt79P.js → chunk-A2AXSNBT-O936rMnf.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-CljEDC3k.js → chunk-AEK57VVT-CeaPcBYn.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-DhdC-PPt.js → chunk-D6G4REZN-Dg1mKAx3.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-DKFxiL5W.js → chunk-RZ5BOZE2-WKzQqQl8.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-CQ7BUR2s.js → chunk-XZIHB7SX-CxJ_dJEH.js} +1 -1
- package/dist/assets/{circle-play-DXAzp5Br.js → circle-play-BT7rJ1XZ.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-ATWiZ22w.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-ATWiZ22w.js +1 -0
- package/dist/assets/clone-B7lXwUJu.js +1 -0
- package/dist/assets/{compile-CQN9liLI.js → compile-CanfFuVE.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-COMryHCq.js → dagre-OKDRZEBW-CGgC0ais.js} +1 -1
- package/dist/assets/{data-editor-CQwErt0H.js → data-editor-DY3cW4wP.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-BIx_FJbl.js → diagram-SSKATNLV-CWvv040C.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-D0mn-sIo.js → diagram-VNBRO52H-lKD9X8te.js} +1 -1
- package/dist/assets/edit-page-40Ncrm2R.js +8 -0
- package/dist/assets/{erDiagram-Q7BY3M3F-BmLCaZb2.js → erDiagram-Q7BY3M3F-BaFsDI9p.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-Ch9v3phO.js → flowDiagram-4HSFHLVR-DHJEE8j4.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-BMXEfw9_.js → ganttDiagram-APWFNJXF-B-h2aBuY.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-C72_5-Yf.js → gitGraphDiagram-7IBYFJ6S-D5aP1m7t.js} +1 -1
- package/dist/assets/{graph-DDMp0SkN.js → graph-BVxE4QPt.js} +1 -1
- package/dist/assets/home-page-Bb-4Zz_d.js +7 -0
- package/dist/assets/{index-ZHL_h-ix.js → index-1AgE_oo7.js} +1 -1
- package/dist/assets/{index-DRiz12RW.js → index-BC9ZoS-A.js} +1 -1
- package/dist/assets/{index-DhgFpHNY.js → index-BOCOTrzd.js} +1 -1
- package/dist/assets/index-Bb1EGAg6.js +86 -0
- package/dist/assets/{index-LSw3G-7I.js → index-BdgAMi-M.js} +1 -1
- package/dist/assets/{index-CXamZ6r-.js → index-BkZAJwaw.js} +1 -1
- package/dist/assets/{index-HAeGfu0c.js → index-BzZl14XL.js} +1 -1
- package/dist/assets/{index-njffvOtg.js → index-C4VEoghR.js} +1 -1
- package/dist/assets/{index-DmuzKaTQ.js → index-C7tYStwr.js} +1 -1
- package/dist/assets/{index-DhvEzwrI.js → index-CFv0Q_Q-.js} +1 -1
- package/dist/assets/index-CLiZgAaX.css +1 -0
- package/dist/assets/{index-CL9LzxWq.js → index-CqWM0m_m.js} +1 -1
- package/dist/assets/{index-DAzta4T2.js → index-CzLZ5-tX.js} +1 -1
- package/dist/assets/{index-6k1lNBqU.js → index-DEwjvIU2.js} +1 -1
- package/dist/assets/{index-C5bNWtPH.js → index-DgUOXGAt.js} +1 -1
- package/dist/assets/{index-Bg4hudVn.js → index-RPtZdkVX.js} +1 -1
- package/dist/assets/{index-2xROAjYB.js → index-bhpFPYWH.js} +1 -1
- package/dist/assets/{index-V85VQWft.js → index-m6jeZ1ab.js} +1 -1
- package/dist/assets/{index-Bt2jaLVe.js → index-oJ_lWGwb.js} +1 -1
- package/dist/assets/infoDiagram-PH2N3AL5-BO-sHbNs.js +1 -0
- package/dist/assets/{journeyDiagram-U35MCT3I-BGUXbSjP.js → journeyDiagram-U35MCT3I-DSNJegq9.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-C_qCcbLg.js → kanban-definition-NDS4AKOZ-BneCW-8Y.js} +1 -1
- package/dist/assets/{layout-Y06N3Idv.js → layout-BNftbRmT.js} +1 -1
- package/dist/assets/{linear-Dq8VgtL9.js → linear-CHLIkvIo.js} +1 -1
- package/dist/assets/{mermaid-BtH6pufx.js → mermaid-eHJ6jOkA.js} +2 -2
- package/dist/assets/{min-BxKBE9q5.js → min-BQ9kKkRS.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-C9mWNdUw.js → mindmap-definition-ALO5MXBD-DM_5ncY8.js} +1 -1
- package/dist/assets/{pieDiagram-IB7DONF6-BJ_NNwd7.js → pieDiagram-IB7DONF6-CbQSY1k3.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-BeCn-poJ.js → quadrantDiagram-7GDLP6J5-DspDfeos.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-Lw80dNWq.js → radar-MK3ICKWK-Bi6m2xMK.js} +1 -1
- package/dist/assets/{react-plotly-bXcA3Oem.js → react-plotly-Cs57ACV_.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-Bf09XgQL.js → requirementDiagram-KVF5MWMF-BgtJKHf-.js} +1 -1
- package/dist/assets/{run-page-Caj78R3N.js → run-page-Dr2Dd649.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-BasKcAIU.js → sankeyDiagram-QLVOVGJD-Csi0JR-y.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-B4wbGDY9.js → sequenceDiagram-X6HHIX6F-h7px9830.js} +1 -1
- package/dist/assets/{slides-component-Dewl09xb.js → slides-component-B-Vskq16.js} +1 -1
- package/dist/assets/{sortBy-Y9lsWL6x.js → sortBy-aXftTJXQ.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-DzQcroNm.js → stateDiagram-DGXRK772-DKqLzgbG.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-C_EsHIvv.js +1 -0
- package/dist/assets/{step-5BjdtTEt.js → step-BwsUM5iJ.js} +1 -1
- package/dist/assets/{terminal-Ba7mwSwE.js → terminal-ecSq2QMz.js} +1 -1
- package/dist/assets/{time-Ds2n30Z-.js → time-BaUofeny.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-D2dECT0g.js → timeline-definition-BDJGKUSR-PELQgpMR.js} +1 -1
- package/dist/assets/tracing-CYFz_cwN.js +8 -0
- package/dist/assets/tree-D2vb8coz.js +8 -0
- package/dist/assets/{useMarimoWebSocket-h085xAJU.js → useMarimoWebSocket-a_dpioTf.js} +3 -3
- package/dist/assets/{vega-component-jNVzqtQY.js → vega-component-DGI_42-j.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-BpRQRngT.js → xychartDiagram-VJFVF3MP-CHS_iWsN.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +30 -30
- package/dist/assets/_baseMap-CR8id7xY.js +0 -1
- package/dist/assets/arc-cUKDg37C.js +0 -1
- package/dist/assets/channel-B6y9toXP.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-UkrlvT7O.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-UkrlvT7O.js +0 -1
- package/dist/assets/clone-C8kdvCe8.js +0 -1
- package/dist/assets/edit-page-BT3YDHNk.js +0 -8
- package/dist/assets/home-page-D9OulSaa.js +0 -7
- package/dist/assets/index-D6Vy1ePY.css +0 -1
- package/dist/assets/index-DDkFi47m.js +0 -79
- package/dist/assets/infoDiagram-PH2N3AL5-VUnTMwg0.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-BLEQ_efC.js +0 -1
- package/dist/assets/tracing-B8PfHMLs.js +0 -8
- package/dist/assets/tree-BTDCSBxT.js +0 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ap as r,aq as n,ae as t,ar as a,as as e,at as i,z as u,au as o,A as s}from"./index-
|
|
1
|
+
import{ap as r,aq as n,ae as t,ar as a,as as e,at as i,z as u,au as o,A as s}from"./index-Bb1EGAg6.js";import{a as f}from"./_baseEach-BjLk1c2j.js";import{b as c}from"./_baseMap-B__tF64v.js";function l(n,t){if(n!==t){var a=void 0!==n,e=null===n,i=n==n,u=r(n),o=void 0!==t,s=null===t,f=t==t,c=r(t);if(!s&&!c&&!u&&n>t||u&&o&&f&&!s&&!c||e&&o&&f||!a&&f||!i)return 1;if(!e&&!u&&!c&&n<t||c&&a&&i&&!e&&!u||s&&a&&i||!o&&i||!f)return-1}return 0}function v(r,u,o){u=u.length?n(u,(function(r){return t(r)?function(n){return a(n,1===r.length?r[0]:r)}:r})):[e];var s=-1;return u=n(u,i(f)),function(r,n){var t=r.length;for(r.sort(n);t--;)r[t]=r[t].value;return r}(c(r,(function(r,t,a){return{criteria:n(u,(function(n){return n(r)})),index:++s,value:r}})),(function(r,n){return function(r,n,t){for(var a=-1,e=r.criteria,i=n.criteria,u=e.length,o=t.length;++a<u;){var s=l(e[a],i[a]);if(s)return a>=o?s:s*("desc"==t[a]?-1:1)}return r.index-n.index}(r,n,o)}))}var d=u((function(r,n){if(null==r)return[];var t=n.length;return t>1&&o(r,n[0],n[1])?n=[]:t>2&&o(n[0],n[1],n[2])&&(n=[n[0]]),v(r,s(n),[])}));export{d as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as t,a as e,S as a}from"./chunk-AEK57VVT-CljEDC3k.js";import{_ as i,c as r,l as n,d as s,j as d,u as o}from"./mermaid-BtH6pufx.js";import{s as g}from"./transform-DjHZbYKP.js";import{G as p}from"./graph-DDMp0SkN.js";import{l as h}from"./layout-Y06N3Idv.js";import{l as c,k as l}from"./step-5BjdtTEt.js";import"./chunk-RZ5BOZE2-DKFxiL5W.js";import"./index-DDkFi47m.js";import"./timer-DFzT7np-.js";import"./_baseUniq-UrrkDFIh.js";import"./_baseEach-DcvRaUqZ.js";import"./min-BxKBE9q5.js";import"./_baseMap-CR8id7xY.js";import"./sortBy-Y9lsWL6x.js";var x,f={},u=i(((t,e)=>{f[t]=e}),"set"),y=i((t=>f[t]),"get"),m=i((()=>Object.keys(f)),"keys"),w=i((()=>m().length),"size"),b={get:y,set:u,keys:m,size:w},B=i((t=>t.append("circle").attr("class","start-state").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit).attr("cy",r().state.padding+r().state.sizeUnit)),"drawStartState"),k=i((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",r().state.textHeight).attr("class","divider").attr("x2",2*r().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),E=i(((t,e)=>{const a=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+2*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",i.width+2*r().state.padding).attr("height",i.height+2*r().state.padding).attr("rx",r().state.radius),a}),"drawSimpleState"),S=i(((t,e)=>{const a=i((function(t,e,a){const i=t.append("tspan").attr("x",2*r().state.padding).text(e);a||i.attr("dy",r().state.textHeight)}),"addTspan"),n=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+1.3*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,d=t.append("text").attr("x",r().state.padding).attr("y",s+.4*r().state.padding+r().state.dividerMargin+r().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach((function(t){o||(a(d,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+s+r().state.dividerMargin/2).attr("y2",r().state.padding+s+r().state.dividerMargin/2).attr("class","descr-divider"),h=d.node().getBBox(),c=Math.max(h.width,n.width);return p.attr("x2",c+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",c+2*r().state.padding).attr("height",h.height+s+2*r().state.padding).attr("rx",r().state.radius),t}),"drawDescrState"),N=i(((t,e,a)=>{const i=r().state.padding,n=2*r().state.padding,s=t.node().getBBox(),d=s.width,o=s.x,g=t.append("text").attr("x",0).attr("y",r().state.titleShift).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,d);c===d&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>d&&(h=(d-c)/2+i),Math.abs(o-l.x)<i&&p>d&&(h=o-(p-d)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=d&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",l.height+3+2*r().state.textHeight).attr("rx",r().state.radius),t}),"addTitleAndBox"),M=i((t=>(t.append("circle").attr("class","end-state-outer").attr("r",r().state.sizeUnit+r().state.miniPadding).attr("cx",r().state.padding+r().state.sizeUnit+r().state.miniPadding).attr("cy",r().state.padding+r().state.sizeUnit+r().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit+2).attr("cy",r().state.padding+r().state.sizeUnit+2))),"drawEndState"),j=i(((t,e)=>{let a=r().state.forkWidth,i=r().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",r().state.padding).attr("y",r().state.padding)}),"drawForkJoinState"),v=i(((t,e,a,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(d.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const d of g){const t=d.trim();if(t.length>0){const i=s.append("tspan");if(i.text(t),0===p){p+=i.node().getBBox().height}n+=p,i.attr("x",e+r().state.noteMargin),i.attr("y",a+n+1.25*r().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}}),"_drawLongText"),z=i(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",r().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=v(t,0,0,i);return a.attr("height",s+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),H=i((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&B(n),"end"===e.type&&M(n),"fork"!==e.type&&"join"!==e.type||j(n,e),"note"===e.type&&z(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&E(n,e),"default"===e.type&&e.descriptions.length>0&&S(n,e);const s=n.node().getBBox();return i.width=s.width+2*r().state.padding,i.height=s.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,e,s){const g=i((function(t){switch(t){case a.relationType.AGGREGATION:return"aggregation";case a.relationType.EXTENSION:return"extension";case a.relationType.COMPOSITION:return"composition";case a.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.points,h=c().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",h(p)).attr("id","edge"+T).attr("class","transition");let f="";if(r().state.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),x.attr("marker-end","url("+f+"#"+g(a.relationType.DEPENDENCY)+"End)"),void 0!==s.title){const a=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(e.points),p=d.getRows(s.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const e=a.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=e.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+h),0===h){const t=e.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(e)}let f=h*p.length;if(p.length>1){const t=(p.length-1)*h*.5;c.forEach(((e,a)=>e.attr("y",g+a*h-t))),f=h*p.length}const u=a.node().getBBox();a.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-r().state.padding/2).attr("y",g-f/2-r().state.padding/2-3.5).attr("width",l+r().state.padding).attr("height",f+r().state.padding),n.info(u)}T++}),"drawEdge"),L={},A=i((function(){}),"setConf"),G=i((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),O=i((function(t,e,a,i){x=r().state;const d=r().securityLevel;let o;"sandbox"===d&&(o=g("#i"+e));const p=g("sandbox"===d?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===d?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);G(c);const l=i.db.getRootDoc();U(l,c,void 0,!1,p,h,i);const f=x.padding,u=c.node().getBBox(),y=u.width+2*f,m=u.height+2*f;s(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=i(((t,e,a,i,r,s,o)=>{const g=new p({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let d;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");d=U(t.doc,a,t.id,!i,r,s,o);{a=N(a,t,i);let e=a.node().getBBox();d.width=e.width,d.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else d=H(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=H(e,a,g);"left of"===t.note.position?(g.setNode(d.id+"-note",i),g.setNode(d.id,d)):(g.setNode(d.id,d),g.setNode(d.id+"-note",i)),g.setParent(d.id,d.id+"-group"),g.setParent(d.id+"-note",d.id+"-group")}else g.setNode(d.id,d)}n.debug("Count=",g.nodeCount(),g);let m=0;u.forEach((function(t){m++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:R(t.title),height:x.labelHeight*d.getRows(t.title).length,labelpos:"c"},"id"+m)})),h(g),n.debug("Graph after layout",g.nodes());const w=e.node();g.nodes().forEach((function(t){if(void 0!==t&&void 0!==g.node(t)){n.warn("Node "+t+": "+JSON.stringify(g.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(L[t]?L[t].y:0)-g.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2);s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))}));let b=w.getBBox();g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),D(e,g.edge(t),g.edge(t).relation))})),b=w.getBBox();const B={id:a||"root",label:a||"root",width:0,height:0};return B.width=b.width+2*x.padding,B.height=b.height+2*x.padding,n.debug("Doc rendered",B,g),B}),"renderDoc"),P={setConf:A,draw:O},C={parser:e,get db(){return new a(1)},renderer:P,styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{C as diagram};
|
|
1
|
+
import{s as t,a as e,S as a}from"./chunk-AEK57VVT-CeaPcBYn.js";import{_ as i,c as r,l as n,d as s,j as d,u as o}from"./mermaid-eHJ6jOkA.js";import{s as g}from"./transform-DjHZbYKP.js";import{G as p}from"./graph-BVxE4QPt.js";import{l as h}from"./layout-BNftbRmT.js";import{l as c,k as l}from"./step-BwsUM5iJ.js";import"./chunk-RZ5BOZE2-WKzQqQl8.js";import"./index-Bb1EGAg6.js";import"./timer-DFzT7np-.js";import"./_baseUniq-QLlUR-Ju.js";import"./_baseEach-BjLk1c2j.js";import"./min-BQ9kKkRS.js";import"./_baseMap-B__tF64v.js";import"./sortBy-aXftTJXQ.js";var x,f={},u=i(((t,e)=>{f[t]=e}),"set"),y=i((t=>f[t]),"get"),m=i((()=>Object.keys(f)),"keys"),w=i((()=>m().length),"size"),b={get:y,set:u,keys:m,size:w},B=i((t=>t.append("circle").attr("class","start-state").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit).attr("cy",r().state.padding+r().state.sizeUnit)),"drawStartState"),k=i((t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",r().state.textHeight).attr("class","divider").attr("x2",2*r().state.textHeight).attr("y1",0).attr("y2",0)),"drawDivider"),E=i(((t,e)=>{const a=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+2*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),i=a.node().getBBox();return t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",i.width+2*r().state.padding).attr("height",i.height+2*r().state.padding).attr("rx",r().state.radius),a}),"drawSimpleState"),S=i(((t,e)=>{const a=i((function(t,e,a){const i=t.append("tspan").attr("x",2*r().state.padding).text(e);a||i.attr("dy",r().state.textHeight)}),"addTspan"),n=t.append("text").attr("x",2*r().state.padding).attr("y",r().state.textHeight+1.3*r().state.padding).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,d=t.append("text").attr("x",r().state.padding).attr("y",s+.4*r().state.padding+r().state.dividerMargin+r().state.textHeight).attr("class","state-description");let o=!0,g=!0;e.descriptions.forEach((function(t){o||(a(d,t,g),g=!1),o=!1}));const p=t.append("line").attr("x1",r().state.padding).attr("y1",r().state.padding+s+r().state.dividerMargin/2).attr("y2",r().state.padding+s+r().state.dividerMargin/2).attr("class","descr-divider"),h=d.node().getBBox(),c=Math.max(h.width,n.width);return p.attr("x2",c+3*r().state.padding),t.insert("rect",":first-child").attr("x",r().state.padding).attr("y",r().state.padding).attr("width",c+2*r().state.padding).attr("height",h.height+s+2*r().state.padding).attr("rx",r().state.radius),t}),"drawDescrState"),N=i(((t,e,a)=>{const i=r().state.padding,n=2*r().state.padding,s=t.node().getBBox(),d=s.width,o=s.x,g=t.append("text").attr("x",0).attr("y",r().state.titleShift).attr("font-size",r().state.fontSize).attr("class","state-title").text(e.id),p=g.node().getBBox().width+n;let h,c=Math.max(p,d);c===d&&(c+=n);const l=t.node().getBBox();e.doc,h=o-i,p>d&&(h=(d-c)/2+i),Math.abs(o-l.x)<i&&p>d&&(h=o-(p-d)/2);const x=1-r().state.textHeight;return t.insert("rect",":first-child").attr("x",h).attr("y",x).attr("class",a?"alt-composit":"composit").attr("width",c).attr("height",l.height+r().state.textHeight+r().state.titleShift+1).attr("rx","0"),g.attr("x",h+i),p<=d&&g.attr("x",o+(c-n)/2-p/2+i),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",3*r().state.textHeight).attr("rx",r().state.radius),t.insert("rect",":first-child").attr("x",h).attr("y",r().state.titleShift-r().state.textHeight-r().state.padding).attr("width",c).attr("height",l.height+3+2*r().state.textHeight).attr("rx",r().state.radius),t}),"addTitleAndBox"),M=i((t=>(t.append("circle").attr("class","end-state-outer").attr("r",r().state.sizeUnit+r().state.miniPadding).attr("cx",r().state.padding+r().state.sizeUnit+r().state.miniPadding).attr("cy",r().state.padding+r().state.sizeUnit+r().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",r().state.sizeUnit).attr("cx",r().state.padding+r().state.sizeUnit+2).attr("cy",r().state.padding+r().state.sizeUnit+2))),"drawEndState"),j=i(((t,e)=>{let a=r().state.forkWidth,i=r().state.forkHeight;if(e.parentId){let t=a;a=i,i=t}return t.append("rect").style("stroke","black").style("fill","black").attr("width",a).attr("height",i).attr("x",r().state.padding).attr("y",r().state.padding)}),"drawForkJoinState"),v=i(((t,e,a,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let o=t.replace(/\r\n/g,"<br/>");o=o.replace(/\n/g,"<br/>");const g=o.split(d.lineBreakRegex);let p=1.25*r().state.noteMargin;for(const d of g){const t=d.trim();if(t.length>0){const i=s.append("tspan");if(i.text(t),0===p){p+=i.node().getBBox().height}n+=p,i.attr("x",e+r().state.noteMargin),i.attr("y",a+n+1.25*r().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}}),"_drawLongText"),z=i(((t,e)=>{e.attr("class","state-note");const a=e.append("rect").attr("x",0).attr("y",r().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=v(t,0,0,i);return a.attr("height",s+2*r().state.noteMargin),a.attr("width",n+2*r().state.noteMargin),a}),"drawNote"),H=i((function(t,e){const a=e.id,i={id:a,label:e.id,width:0,height:0},n=t.append("g").attr("id",a).attr("class","stateGroup");"start"===e.type&&B(n),"end"===e.type&&M(n),"fork"!==e.type&&"join"!==e.type||j(n,e),"note"===e.type&&z(e.note.text,n),"divider"===e.type&&k(n),"default"===e.type&&0===e.descriptions.length&&E(n,e),"default"===e.type&&e.descriptions.length>0&&S(n,e);const s=n.node().getBBox();return i.width=s.width+2*r().state.padding,i.height=s.height+2*r().state.padding,b.set(a,i),i}),"drawState"),T=0,D=i((function(t,e,s){const g=i((function(t){switch(t){case a.relationType.AGGREGATION:return"aggregation";case a.relationType.EXTENSION:return"extension";case a.relationType.COMPOSITION:return"composition";case a.relationType.DEPENDENCY:return"dependency"}}),"getRelationType");e.points=e.points.filter((t=>!Number.isNaN(t.y)));const p=e.points,h=c().x((function(t){return t.x})).y((function(t){return t.y})).curve(l),x=t.append("path").attr("d",h(p)).attr("id","edge"+T).attr("class","transition");let f="";if(r().state.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),x.attr("marker-end","url("+f+"#"+g(a.relationType.DEPENDENCY)+"End)"),void 0!==s.title){const a=t.append("g").attr("class","stateLabel"),{x:i,y:g}=o.calcLabelPosition(e.points),p=d.getRows(s.title);let h=0;const c=[];let l=0,x=0;for(let t=0;t<=p.length;t++){const e=a.append("text").attr("text-anchor","middle").text(p[t]).attr("x",i).attr("y",g+h),r=e.node().getBBox();if(l=Math.max(l,r.width),x=Math.min(x,r.x),n.info(r.x,i,g+h),0===h){const t=e.node().getBBox();h=t.height,n.info("Title height",h,g)}c.push(e)}let f=h*p.length;if(p.length>1){const t=(p.length-1)*h*.5;c.forEach(((e,a)=>e.attr("y",g+a*h-t))),f=h*p.length}const u=a.node().getBBox();a.insert("rect",":first-child").attr("class","box").attr("x",i-l/2-r().state.padding/2).attr("y",g-f/2-r().state.padding/2-3.5).attr("width",l+r().state.padding).attr("height",f+r().state.padding),n.info(u)}T++}),"drawEdge"),L={},A=i((function(){}),"setConf"),G=i((function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"insertMarkers"),O=i((function(t,e,a,i){x=r().state;const d=r().securityLevel;let o;"sandbox"===d&&(o=g("#i"+e));const p=g("sandbox"===d?o.nodes()[0].contentDocument.body:"body"),h="sandbox"===d?o.nodes()[0].contentDocument:document;n.debug("Rendering diagram "+t);const c=p.select(`[id='${e}']`);G(c);const l=i.db.getRootDoc();U(l,c,void 0,!1,p,h,i);const f=x.padding,u=c.node().getBBox(),y=u.width+2*f,m=u.height+2*f;s(c,m,1.75*y,x.useMaxWidth),c.attr("viewBox",`${u.x-x.padding} ${u.y-x.padding} `+y+" "+m)}),"draw"),R=i((t=>t?t.length*x.fontSizeFactor:1),"getLabelWidth"),U=i(((t,e,a,i,r,s,o)=>{const g=new p({compound:!0,multigraph:!0});let c,l=!0;for(c=0;c<t.length;c++)if("relation"===t[c].stmt){l=!1;break}a?g.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,isMultiGraph:!0}):g.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:l?1:x.edgeLengthFactor,nodeSep:l?1:50,ranker:"tight-tree",isMultiGraph:!0}),g.setDefaultEdgeLabel((function(){return{}}));const f=o.db.getStates(),u=o.db.getRelations(),y=Object.keys(f);for(const n of y){const t=f[n];let d;if(a&&(t.parentId=a),t.doc){let a=e.append("g").attr("id",t.id).attr("class","stateGroup");d=U(t.doc,a,t.id,!i,r,s,o);{a=N(a,t,i);let e=a.node().getBBox();d.width=e.width,d.height=e.height+x.padding/2,L[t.id]={y:x.compositTitleSize}}}else d=H(e,t,g);if(t.note){const a={descriptions:[],id:t.id+"-note",note:t.note,type:"note"},i=H(e,a,g);"left of"===t.note.position?(g.setNode(d.id+"-note",i),g.setNode(d.id,d)):(g.setNode(d.id,d),g.setNode(d.id+"-note",i)),g.setParent(d.id,d.id+"-group"),g.setParent(d.id+"-note",d.id+"-group")}else g.setNode(d.id,d)}n.debug("Count=",g.nodeCount(),g);let m=0;u.forEach((function(t){m++,n.debug("Setting edge",t),g.setEdge(t.id1,t.id2,{relation:t,width:R(t.title),height:x.labelHeight*d.getRows(t.title).length,labelpos:"c"},"id"+m)})),h(g),n.debug("Graph after layout",g.nodes());const w=e.node();g.nodes().forEach((function(t){if(void 0!==t&&void 0!==g.node(t)){n.warn("Node "+t+": "+JSON.stringify(g.node(t))),r.select("#"+w.id+" #"+t).attr("transform","translate("+(g.node(t).x-g.node(t).width/2)+","+(g.node(t).y+(L[t]?L[t].y:0)-g.node(t).height/2)+" )"),r.select("#"+w.id+" #"+t).attr("data-x-shift",g.node(t).x-g.node(t).width/2);s.querySelectorAll("#"+w.id+" #"+t+" .divider").forEach((t=>{const e=t.parentElement;let a=0,i=0;e&&(e.parentElement&&(a=e.parentElement.getBBox().width),i=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(i)&&(i=0)),t.setAttribute("x1",0-i+8),t.setAttribute("x2",a-i-8)}))}else n.debug("No Node "+t+": "+JSON.stringify(g.node(t)))}));let b=w.getBBox();g.edges().forEach((function(t){void 0!==t&&void 0!==g.edge(t)&&(n.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(g.edge(t))),D(e,g.edge(t),g.edge(t).relation))})),b=w.getBBox();const B={id:a||"root",label:a||"root",width:0,height:0};return B.width=b.width+2*x.padding,B.height=b.height+2*x.padding,n.debug("Doc rendered",B,g),B}),"renderDoc"),P={setConf:A,draw:O},C={parser:e,get db(){return new a(1)},renderer:P,styles:t,init:i((t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute}),"init")};export{C as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as r,b as t,a as s,S as e}from"./chunk-AEK57VVT-CeaPcBYn.js";import{_ as a}from"./mermaid-eHJ6jOkA.js";import"./transform-DjHZbYKP.js";import"./chunk-RZ5BOZE2-WKzQqQl8.js";import"./index-Bb1EGAg6.js";import"./step-BwsUM5iJ.js";import"./timer-DFzT7np-.js";var i={parser:s,get db(){return new e(2)},renderer:t,styles:r,init:a((r=>{r.state||(r.state={}),r.state.arrowMarkerAbsolute=r.arrowMarkerAbsolute}),"init")};export{i as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function t(t){return function(){return t}}const i=Math.abs,s=Math.atan2,n=Math.cos,_=Math.max,h=Math.min,e=Math.sin,o=Math.sqrt,a=1e-12,c=Math.PI,r=c/2,l=2*c;function x(t){return t>1?0:t<-1?c:Math.acos(t)}function u(t){return t>=1?r:t<=-1?-r:Math.asin(t)}const y=Math.PI,p=2*y,f=1e-6,d=p-f;function b(t){this._+=t[0];for(let i=1,s=t.length;i<s;++i)this._+=arguments[i]+t[i]}class w{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?b:function(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return b;const s=10**i;return function(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=Math.round(arguments[i]*s)/s+t[i]}}(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,s,n){this._append`Q${+t},${+i},${this._x1=+s},${this._y1=+n}`}bezierCurveTo(t,i,s,n,_,h){this._append`C${+t},${+i},${+s},${+n},${this._x1=+_},${this._y1=+h}`}arcTo(t,i,s,n,_){if(t=+t,i=+i,s=+s,n=+n,(_=+_)<0)throw new Error(`negative radius: ${_}`);let h=this._x1,e=this._y1,o=s-t,a=n-i,c=h-t,r=e-i,l=c*c+r*r;if(null===this._x1)this._append`M${this._x1=t},${this._y1=i}`;else if(l>f)if(Math.abs(r*o-a*c)>f&&_){let x=s-h,u=n-e,p=o*o+a*a,d=x*x+u*u,b=Math.sqrt(p),w=Math.sqrt(l),T=_*Math.tan((y-Math.acos((p+l-d)/(2*b*w)))/2),v=T/w,$=T/b;Math.abs(v-1)>f&&this._append`L${t+v*c},${i+v*r}`,this._append`A${_},${_},0,0,${+(r*x>c*u)},${this._x1=t+$*o},${this._y1=i+$*a}`}else this._append`L${this._x1=t},${this._y1=i}`;else;}arc(t,i,s,n,_,h){if(t=+t,i=+i,h=!!h,(s=+s)<0)throw new Error(`negative radius: ${s}`);let e=s*Math.cos(n),o=s*Math.sin(n),a=t+e,c=i+o,r=1^h,l=h?n-_:_-n;null===this._x1?this._append`M${a},${c}`:(Math.abs(this._x1-a)>f||Math.abs(this._y1-c)>f)&&this._append`L${a},${c}`,s&&(l<0&&(l=l%p+p),l>d?this._append`A${s},${s},0,1,${r},${t-e},${i-o}A${s},${s},0,1,${r},${this._x1=a},${this._y1=c}`:l>f&&this._append`A${s},${s},0,${+(l>=y)},${r},${this._x1=t+s*Math.cos(_)},${this._y1=i+s*Math.sin(_)}`)}rect(t,i,s,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${s=+s}v${+n}h${-s}Z`}toString(){return this._}}function T(){return new w}function v(t){let i=3;return t.digits=function(s){if(!arguments.length)return i;if(null==s)i=null;else{const t=Math.floor(s);if(!(t>=0))throw new RangeError(`invalid digits: ${s}`);i=t}return t},()=>new w(i)}function $(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function k(t){this._context=t}function N(t){return new k(t)}function M(t){return t[0]}function E(t){return t[1]}function S(i,s){var n=t(!0),_=null,h=N,e=null,o=v(a);function a(t){var a,c,r,l=(t=$(t)).length,x=!1;for(null==_&&(e=h(r=o())),a=0;a<=l;++a)!(a<l&&n(c=t[a],a,t))===x&&((x=!x)?e.lineStart():e.lineEnd()),x&&e.point(+i(c,a,t),+s(c,a,t));if(r)return e=null,r+""||null}return i="function"==typeof i?i:void 0===i?M:t(i),s="function"==typeof s?s:void 0===s?E:t(s),a.x=function(s){return arguments.length?(i="function"==typeof s?s:t(+s),a):i},a.y=function(i){return arguments.length?(s="function"==typeof i?i:t(+i),a):s},a.defined=function(i){return arguments.length?(n="function"==typeof i?i:t(!!i),a):n},a.curve=function(t){return arguments.length?(h=t,null!=_&&(e=h(_)),a):h},a.context=function(t){return arguments.length?(null==t?_=e=null:e=h(_=t),a):_},a}function m(){}function P(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function g(t){this._context=t}function C(t){return new g(t)}function z(t){this._context=t}function A(t){return new z(t)}function q(t){this._context=t}function L(t){return new q(t)}function j(t,i){this._basis=new g(t),this._beta=i}T.prototype=w.prototype,k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:P(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},z.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,n):this._context.moveTo(s,n);break;case 3:this._point=4;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},j.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var n,_=t[0],h=i[0],e=t[s]-_,o=i[s]-h,a=-1;++a<=s;)n=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+n*e),this._beta*i[a]+(1-this._beta)*(h+n*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const I=function t(i){function s(t){return 1===i?new g(t):new j(t,i)}return s.beta=function(i){return t(+i)},s}(.85);function Z(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function B(t,i){this._context=t,this._k=(1-i)/6}B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const D=function t(i){function s(t){return new B(t,i)}return s.tension=function(i){return t(+i)},s}(0);function F(t,i){this._context=t,this._k=(1-i)/6}F.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const G=function t(i){function s(t){return new F(t,i)}return s.tension=function(i){return t(+i)},s}(0);function H(t,i){this._context=t,this._k=(1-i)/6}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const J=function t(i){function s(t){return new H(t,i)}return s.tension=function(i){return t(+i)},s}(0);function K(t,i,s){var n=t._x1,_=t._y1,h=t._x2,e=t._y2;if(t._l01_a>a){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,_=(_*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>a){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,e=(e*r+t._y1*t._l23_2a-s*t._l12_2a)/l}t._context.bezierCurveTo(n,_,h,e,t._x2,t._y2)}function O(t,i){this._context=t,this._alpha=i}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Q=function t(i){function s(t){return i?new O(t,i):new B(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function R(t,i){this._context=t,this._alpha=i}R.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const U=function t(i){function s(t){return i?new R(t,i):new F(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function V(t,i){this._context=t,this._alpha=i}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const W=function t(i){function s(t){return i?new V(t,i):new H(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function X(t){this._context=t}function Y(t){return new X(t)}function tt(t){return t<0?-1:1}function it(t,i,s){var n=t._x1-t._x0,_=i-t._x1,h=(t._y1-t._y0)/(n||_<0&&-0),e=(s-t._y1)/(_||n<0&&-0),o=(h*_+e*n)/(n+_);return(tt(h)+tt(e))*Math.min(Math.abs(h),Math.abs(e),.5*Math.abs(o))||0}function st(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function nt(t,i,s){var n=t._x0,_=t._y0,h=t._x1,e=t._y1,o=(h-n)/3;t._context.bezierCurveTo(n+o,_+o*i,h-o,e-o*s,h,e)}function _t(t){this._context=t}function ht(t){this._context=new et(t)}function et(t){this._context=t}function ot(t){return new _t(t)}function at(t){return new ht(t)}function ct(t){this._context=t}function rt(t){var i,s,n=t.length-1,_=new Array(n),h=new Array(n),e=new Array(n);for(_[0]=0,h[0]=2,e[0]=t[0]+2*t[1],i=1;i<n-1;++i)_[i]=1,h[i]=4,e[i]=4*t[i]+2*t[i+1];for(_[n-1]=2,h[n-1]=7,e[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)s=_[i]/h[i-1],h[i]-=s,e[i]-=s*e[i-1];for(_[n-1]=e[n-1]/h[n-1],i=n-2;i>=0;--i)_[i]=(e[i]-_[i+1])/h[i];for(h[n-1]=(t[n]+_[n-1])/2,i=0;i<n-1;++i)h[i]=2*t[i+1]-_[i+1];return[_,h]}function lt(t){return new ct(t)}function xt(t,i){this._context=t,this._t=i}function ut(t){return new xt(t,.5)}function yt(t){return new xt(t,0)}function pt(t){return new xt(t,1)}X.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},_t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nt(this,this._t0,st(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,nt(this,st(this,s=it(this,t,i)),s);break;default:nt(this,this._t0,s=it(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}},(ht.prototype=Object.create(_t.prototype)).point=function(t,i){_t.prototype.point.call(this,i,t)},et.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,n,_,h){this._context.bezierCurveTo(i,t,n,s,h,_)}},ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===s)this._context.lineTo(t[1],i[1]);else for(var n=rt(t),_=rt(i),h=0,e=1;e<s;++h,++e)this._context.bezierCurveTo(n[0][h],_[0][h],n[1][h],_[1][h],t[e],i[e]);(this._line||0!==this._line&&1===s)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}}this._x=t,this._y=i}};export{Q as A,W as B,U as C,D,J as E,G as F,I as G,L as H,A as I,M as J,E as K,T as L,i as a,t as b,n as c,o as d,a as e,s as f,u as g,r as h,x as i,_ as j,C as k,S as l,h as m,$ as n,yt as o,c as p,pt as q,ut as r,e as s,l as t,lt as u,at as v,v as w,ot as x,Y as y,N as z};
|
|
1
|
+
function t(t){return function(){return t}}const i=Math.abs,s=Math.atan2,n=Math.cos,_=Math.max,h=Math.min,e=Math.sin,o=Math.sqrt,a=1e-12,c=Math.PI,r=c/2,l=2*c;function x(t){return t>1?0:t<-1?c:Math.acos(t)}function u(t){return t>=1?r:t<=-1?-r:Math.asin(t)}const y=Math.PI,p=2*y,f=1e-6,d=p-f;function b(t){this._+=t[0];for(let i=1,s=t.length;i<s;++i)this._+=arguments[i]+t[i]}class w{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?b:function(t){let i=Math.floor(t);if(!(i>=0))throw new Error(`invalid digits: ${t}`);if(i>15)return b;const s=10**i;return function(t){this._+=t[0];for(let i=1,n=t.length;i<n;++i)this._+=Math.round(arguments[i]*s)/s+t[i]}}(t)}moveTo(t,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,i){this._append`L${this._x1=+t},${this._y1=+i}`}quadraticCurveTo(t,i,s,n){this._append`Q${+t},${+i},${this._x1=+s},${this._y1=+n}`}bezierCurveTo(t,i,s,n,_,h){this._append`C${+t},${+i},${+s},${+n},${this._x1=+_},${this._y1=+h}`}arcTo(t,i,s,n,_){if(t=+t,i=+i,s=+s,n=+n,(_=+_)<0)throw new Error(`negative radius: ${_}`);let h=this._x1,e=this._y1,o=s-t,a=n-i,c=h-t,r=e-i,l=c*c+r*r;if(null===this._x1)this._append`M${this._x1=t},${this._y1=i}`;else if(l>f)if(Math.abs(r*o-a*c)>f&&_){let x=s-h,u=n-e,p=o*o+a*a,d=x*x+u*u,b=Math.sqrt(p),w=Math.sqrt(l),T=_*Math.tan((y-Math.acos((p+l-d)/(2*b*w)))/2),v=T/w,$=T/b;Math.abs(v-1)>f&&this._append`L${t+v*c},${i+v*r}`,this._append`A${_},${_},0,0,${+(r*x>c*u)},${this._x1=t+$*o},${this._y1=i+$*a}`}else this._append`L${this._x1=t},${this._y1=i}`;else;}arc(t,i,s,n,_,h){if(t=+t,i=+i,h=!!h,(s=+s)<0)throw new Error(`negative radius: ${s}`);let e=s*Math.cos(n),o=s*Math.sin(n),a=t+e,c=i+o,r=1^h,l=h?n-_:_-n;null===this._x1?this._append`M${a},${c}`:(Math.abs(this._x1-a)>f||Math.abs(this._y1-c)>f)&&this._append`L${a},${c}`,s&&(l<0&&(l=l%p+p),l>d?this._append`A${s},${s},0,1,${r},${t-e},${i-o}A${s},${s},0,1,${r},${this._x1=a},${this._y1=c}`:l>f&&this._append`A${s},${s},0,${+(l>=y)},${r},${this._x1=t+s*Math.cos(_)},${this._y1=i+s*Math.sin(_)}`)}rect(t,i,s,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+i}h${s=+s}v${+n}h${-s}Z`}toString(){return this._}}function T(){return new w}function v(t){let i=3;return t.digits=function(s){if(!arguments.length)return i;if(null==s)i=null;else{const t=Math.floor(s);if(!(t>=0))throw new RangeError(`invalid digits: ${s}`);i=t}return t},()=>new w(i)}function $(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function k(t){this._context=t}function N(t){return new k(t)}function M(t){return t[0]}function E(t){return t[1]}function S(i,s){var n=t(!0),_=null,h=N,e=null,o=v(a);function a(t){var a,c,r,l=(t=$(t)).length,x=!1;for(null==_&&(e=h(r=o())),a=0;a<=l;++a)!(a<l&&n(c=t[a],a,t))===x&&((x=!x)?e.lineStart():e.lineEnd()),x&&e.point(+i(c,a,t),+s(c,a,t));if(r)return e=null,r+""||null}return i="function"==typeof i?i:void 0===i?M:t(i),s="function"==typeof s?s:void 0===s?E:t(s),a.x=function(s){return arguments.length?(i="function"==typeof s?s:t(+s),a):i},a.y=function(i){return arguments.length?(s="function"==typeof i?i:t(+i),a):s},a.defined=function(i){return arguments.length?(n="function"==typeof i?i:t(!!i),a):n},a.curve=function(t){return arguments.length?(h=t,null!=_&&(e=h(_)),a):h},a.context=function(t){return arguments.length?(null==t?_=e=null:e=h(_=t),a):_},a}function m(){}function P(t,i,s){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+i)/6,(t._y0+4*t._y1+s)/6)}function g(t){this._context=t}function C(t){return new g(t)}function z(t){this._context=t}function A(t){return new z(t)}function q(t){this._context=t}function L(t){return new q(t)}function j(t,i){this._basis=new g(t),this._beta=i}T.prototype=w.prototype,k.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:this._context.lineTo(t,i)}}},g.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:P(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},z.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x2=t,this._y2=i;break;case 1:this._point=2,this._x3=t,this._y3=i;break;case 2:this._point=3,this._x4=t,this._y4=i,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+i)/6);break;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},q.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var s=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+i)/6;this._line?this._context.lineTo(s,n):this._context.moveTo(s,n);break;case 3:this._point=4;default:P(this,t,i)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i}},j.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,i=this._y,s=t.length-1;if(s>0)for(var n,_=t[0],h=i[0],e=t[s]-_,o=i[s]-h,a=-1;++a<=s;)n=a/s,this._basis.point(this._beta*t[a]+(1-this._beta)*(_+n*e),this._beta*i[a]+(1-this._beta)*(h+n*o));this._x=this._y=null,this._basis.lineEnd()},point:function(t,i){this._x.push(+t),this._y.push(+i)}};const I=function t(i){function s(t){return 1===i?new g(t):new j(t,i)}return s.beta=function(i){return t(+i)},s}(.85);function Z(t,i,s){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-i),t._y2+t._k*(t._y1-s),t._x2,t._y2)}function B(t,i){this._context=t,this._k=(1-i)/6}B.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Z(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2,this._x1=t,this._y1=i;break;case 2:this._point=3;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const D=function t(i){function s(t){return new B(t,i)}return s.tension=function(i){return t(+i)},s}(0);function F(t,i){this._context=t,this._k=(1-i)/6}F.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const G=function t(i){function s(t){return new F(t,i)}return s.tension=function(i){return t(+i)},s}(0);function H(t,i){this._context=t,this._k=(1-i)/6}H.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Z(this,t,i)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const J=function t(i){function s(t){return new H(t,i)}return s.tension=function(i){return t(+i)},s}(0);function K(t,i,s){var n=t._x1,_=t._y1,h=t._x2,e=t._y2;if(t._l01_a>a){var o=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,_=(_*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>a){var r=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);h=(h*r+t._x1*t._l23_2a-i*t._l12_2a)/l,e=(e*r+t._y1*t._l23_2a-s*t._l12_2a)/l}t._context.bezierCurveTo(n,_,h,e,t._x2,t._y2)}function O(t,i){this._context=t,this._alpha=i}O.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const Q=function t(i){function s(t){return i?new O(t,i):new B(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function R(t,i){this._context=t,this._alpha=i}R.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=i;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=i);break;case 2:this._point=3,this._x5=t,this._y5=i;break;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const U=function t(i){function s(t){return i?new R(t,i):new F(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function V(t,i){this._context=t,this._alpha=i}V.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){if(t=+t,i=+i,this._point){var s=this._x2-t,n=this._y2-i;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(s*s+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:K(this,t,i)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=i}};const W=function t(i){function s(t){return i?new V(t,i):new H(t,0)}return s.alpha=function(i){return t(+i)},s}(.5);function X(t){this._context=t}function Y(t){return new X(t)}function tt(t){return t<0?-1:1}function it(t,i,s){var n=t._x1-t._x0,_=i-t._x1,h=(t._y1-t._y0)/(n||_<0&&-0),e=(s-t._y1)/(_||n<0&&-0),o=(h*_+e*n)/(n+_);return(tt(h)+tt(e))*Math.min(Math.abs(h),Math.abs(e),.5*Math.abs(o))||0}function st(t,i){var s=t._x1-t._x0;return s?(3*(t._y1-t._y0)/s-i)/2:i}function nt(t,i,s){var n=t._x0,_=t._y0,h=t._x1,e=t._y1,o=(h-n)/3;t._context.bezierCurveTo(n+o,_+o*i,h-o,e-o*s,h,e)}function _t(t){this._context=t}function ht(t){this._context=new et(t)}function et(t){this._context=t}function ot(t){return new _t(t)}function at(t){return new ht(t)}function ct(t){this._context=t}function rt(t){var i,s,n=t.length-1,_=new Array(n),h=new Array(n),e=new Array(n);for(_[0]=0,h[0]=2,e[0]=t[0]+2*t[1],i=1;i<n-1;++i)_[i]=1,h[i]=4,e[i]=4*t[i]+2*t[i+1];for(_[n-1]=2,h[n-1]=7,e[n-1]=8*t[n-1]+t[n],i=1;i<n;++i)s=_[i]/h[i-1],h[i]-=s,e[i]-=s*e[i-1];for(_[n-1]=e[n-1]/h[n-1],i=n-2;i>=0;--i)_[i]=(e[i]-_[i+1])/h[i];for(h[n-1]=(t[n]+_[n-1])/2,i=0;i<n-1;++i)h[i]=2*t[i+1]-_[i+1];return[_,h]}function lt(t){return new ct(t)}function xt(t,i){this._context=t,this._t=i}function ut(t){return new xt(t,.5)}function yt(t){return new xt(t,0)}function pt(t){return new xt(t,1)}X.prototype={areaStart:m,areaEnd:m,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,i){t=+t,i=+i,this._point?this._context.lineTo(t,i):(this._point=1,this._context.moveTo(t,i))}},_t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:nt(this,this._t0,st(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,i){var s=NaN;if(i=+i,(t=+t)!==this._x1||i!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;break;case 2:this._point=3,nt(this,st(this,s=it(this,t,i)),s);break;default:nt(this,this._t0,s=it(this,t,i))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=i,this._t0=s}}},(ht.prototype=Object.create(_t.prototype)).point=function(t,i){_t.prototype.point.call(this,i,t)},et.prototype={moveTo:function(t,i){this._context.moveTo(i,t)},closePath:function(){this._context.closePath()},lineTo:function(t,i){this._context.lineTo(i,t)},bezierCurveTo:function(t,i,s,n,_,h){this._context.bezierCurveTo(i,t,n,s,h,_)}},ct.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,i=this._y,s=t.length;if(s)if(this._line?this._context.lineTo(t[0],i[0]):this._context.moveTo(t[0],i[0]),2===s)this._context.lineTo(t[1],i[1]);else for(var n=rt(t),_=rt(i),h=0,e=1;e<s;++h,++e)this._context.bezierCurveTo(n[0][h],_[0][h],n[1][h],_[1][h],t[e],i[e]);(this._line||0!==this._line&&1===s)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,i){this._x.push(+t),this._y.push(+i)}},xt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,i){switch(t=+t,i=+i,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,i):this._context.moveTo(t,i);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,i),this._context.lineTo(t,i);else{var s=this._x*(1-this._t)+t*this._t;this._context.lineTo(s,this._y),this._context.lineTo(s,i)}}this._x=t,this._y=i}};export{Q as A,W as B,U as C,D,J as E,G as F,I as G,L as H,A as I,M as J,E as K,T as L,t as a,o as b,n as c,i as d,a as e,s as f,u as g,r as h,_ as i,x as j,C as k,S as l,h as m,$ as n,yt as o,c as p,pt as q,ut as r,e as s,l as t,lt as u,at as v,v as w,ot as x,Y as y,N as z};
|