@marimo-team/frontend 0.14.8-dev8 → 0.14.8-dev9
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-CYmpnTn_.js → ConnectedDataExplorerComponent-Dgb4evDM.js} +1 -1
- package/dist/assets/{ImageComparisonComponent--5-lO_ES.js → ImageComparisonComponent-CYLLP2Ek.js} +1 -1
- package/dist/assets/{VegaLite-DLW84dFp.js → VegaLite-Byuc9HjF.js} +1 -1
- package/dist/assets/{_baseEach-FnH5SKIB.js → _baseEach-6MHNR_Pm.js} +1 -1
- package/dist/assets/_baseMap-_1wf2RNm.js +1 -0
- package/dist/assets/{_baseUniq-BzMvLNro.js → _baseUniq-Bsn6wvQA.js} +1 -1
- package/dist/assets/{_createAggregator-Cvb8EMxO.js → _createAggregator-CLwaUrk2.js} +1 -1
- package/dist/assets/{any-language-editor-DxHcCRUo.js → any-language-editor-D1-wajW_.js} +1 -1
- package/dist/assets/{architectureDiagram-IEHRJDOE-CO83sI0X.js → architectureDiagram-IEHRJDOE-C0U1Eedd.js} +1 -1
- package/dist/assets/{blockDiagram-JOT3LUYC-oxKIgJ23.js → blockDiagram-JOT3LUYC-BrSo70tz.js} +1 -1
- package/dist/assets/{c4Diagram-VJAJSXHY-B1nBFpfO.js → c4Diagram-VJAJSXHY-CD6JO-0Q.js} +1 -1
- package/dist/assets/channel-Bj1QAQF4.js +1 -0
- package/dist/assets/{chunk-4BMEZGHF-BPuJg8QQ.js → chunk-4BMEZGHF-BVhacirt.js} +1 -1
- package/dist/assets/{chunk-A2AXSNBT-CFIg1rGY.js → chunk-A2AXSNBT-Bhagzotk.js} +1 -1
- package/dist/assets/{chunk-AEK57VVT-CuK-nwV4.js → chunk-AEK57VVT-BUt4fWBU.js} +1 -1
- package/dist/assets/{chunk-D6G4REZN-BNb4759I.js → chunk-D6G4REZN-3A-1N-Bx.js} +1 -1
- package/dist/assets/{chunk-RZ5BOZE2-BeZYs5Ig.js → chunk-RZ5BOZE2-BvGg5Ad5.js} +1 -1
- package/dist/assets/{chunk-XZIHB7SX-D72sGxGq.js → chunk-XZIHB7SX-qFX3K-h3.js} +1 -1
- package/dist/assets/{circle-play-Cvl-9kpT.js → circle-play-C-FzGo4q.js} +1 -1
- package/dist/assets/classDiagram-GIVACNV2-UVDFb9da.js +1 -0
- package/dist/assets/classDiagram-v2-COTLJTTW-UVDFb9da.js +1 -0
- package/dist/assets/clone-BlkjaVo9.js +1 -0
- package/dist/assets/{compile-BMCn2vE3.js → compile-BkD0vkR5.js} +1 -1
- package/dist/assets/{dagre-OKDRZEBW-BbWEbhHb.js → dagre-OKDRZEBW-Cizv3xrb.js} +1 -1
- package/dist/assets/{data-editor-DO8px2IC.js → data-editor-pNYnj_rT.js} +1 -1
- package/dist/assets/{diagram-SSKATNLV-CmcpVSp6.js → diagram-SSKATNLV-BqqwfmYX.js} +1 -1
- package/dist/assets/{diagram-VNBRO52H-CjiRqp8W.js → diagram-VNBRO52H-DuciCp2W.js} +1 -1
- package/dist/assets/{edit-page-DpIs4Jeh.js → edit-page-BLaffrTE.js} +44 -44
- package/dist/assets/{erDiagram-Q7BY3M3F-D23p5cbI.js → erDiagram-Q7BY3M3F-P6axxYAk.js} +1 -1
- package/dist/assets/{flowDiagram-4HSFHLVR-3ExDKEGl.js → flowDiagram-4HSFHLVR-Bnsq5u-0.js} +1 -1
- package/dist/assets/{ganttDiagram-APWFNJXF-D9VTD9XD.js → ganttDiagram-APWFNJXF-Ld8jhdTu.js} +1 -1
- package/dist/assets/{gitGraphDiagram-7IBYFJ6S-Bn_pINfE.js → gitGraphDiagram-7IBYFJ6S-Cqs2EjRy.js} +1 -1
- package/dist/assets/{graph-Cv0AtaRf.js → graph-CIH2GQ51.js} +1 -1
- package/dist/assets/{home-page-CRP3IHpV.js → home-page-CrCjPLno.js} +1 -1
- package/dist/assets/{index-BTMKLO1n.js → index-2juiKmzh.js} +1 -1
- package/dist/assets/{index-G5_5OkDd.js → index-B725LHBp.js} +1 -1
- package/dist/assets/{index-Cd9N2R3M.js → index-BIHhaFPx.js} +1 -1
- package/dist/assets/{index-B6DH7WAG.js → index-BQaHnozn.js} +1 -1
- package/dist/assets/{index-DdLVbr3B.js → index-BgUxY5Si.js} +1 -1
- package/dist/assets/{index-BKIw-nTk.js → index-BgVM0N6Q.js} +1 -1
- package/dist/assets/{index-D-01nLUB.js → index-Bim2uhxc.js} +1 -1
- package/dist/assets/{index-DW39dZX6.js → index-BuPaMPZS.js} +1 -1
- package/dist/assets/{index-UohZ6mc7.js → index-BzqZ_6cl.js} +1 -1
- package/dist/assets/{index-DJwntWVz.js → index-C9s7wpCG.js} +1 -1
- package/dist/assets/{index-CH_vjHJs.js → index-CX02FBw9.js} +1 -1
- package/dist/assets/{index-C1GzY49R.js → index-CfektYKc.js} +1 -1
- package/dist/assets/{index-BoVrSPna.js → index-DIOux9Rd.js} +1 -1
- package/dist/assets/{index-CfCsWmku.js → index-DuRflRhD.js} +1 -1
- package/dist/assets/{index-Cb2EzYJO.js → index-QthAcefu.js} +1 -1
- package/dist/assets/{index-DlZmbF5y.js → index-eTpeTAvV.js} +1 -1
- package/dist/assets/{index-l_wokygA.js → index-jgUiUrDR.js} +162 -162
- package/dist/assets/{index-B2gQZNft.js → index-uKHcJyiC.js} +1 -1
- package/dist/assets/{index-Dneegn3v.js → index-xggWyI0a.js} +1 -1
- package/dist/assets/{infoDiagram-PH2N3AL5-Bf4uF_kd.js → infoDiagram-PH2N3AL5-Du_lo9xe.js} +1 -1
- package/dist/assets/{journeyDiagram-U35MCT3I-Dm-d6spo.js → journeyDiagram-U35MCT3I-CwfdkzJ0.js} +1 -1
- package/dist/assets/{kanban-definition-NDS4AKOZ-Dp7Lt7a7.js → kanban-definition-NDS4AKOZ-B_lx6PJd.js} +1 -1
- package/dist/assets/{layout-DBIauRjl.js → layout-C5kPa4yS.js} +1 -1
- package/dist/assets/{mermaid-Cb2iP_U0.js → mermaid-B7Nz4kzp.js} +4 -4
- package/dist/assets/{min-DWa_Ex5z.js → min-M3nZZf4_.js} +1 -1
- package/dist/assets/{mindmap-definition-ALO5MXBD-BK82nZEj.js → mindmap-definition-ALO5MXBD-DjXnAr08.js} +1 -1
- package/dist/assets/{pieDiagram-IB7DONF6-CrSKNHpL.js → pieDiagram-IB7DONF6-DKAAam0A.js} +1 -1
- package/dist/assets/{quadrantDiagram-7GDLP6J5-DBYendvc.js → quadrantDiagram-7GDLP6J5-C8jEDsmL.js} +1 -1
- package/dist/assets/{radar-MK3ICKWK-D4iXNJyD.js → radar-MK3ICKWK-BQ7QRUVq.js} +1 -1
- package/dist/assets/{react-plotly-jrAUcM2q.js → react-plotly-Reh2raq7.js} +1 -1
- package/dist/assets/{requirementDiagram-KVF5MWMF-Cvshvvk-.js → requirementDiagram-KVF5MWMF-AEggFxKQ.js} +1 -1
- package/dist/assets/{run-page-Bep2eRDR.js → run-page-CjDDCCGY.js} +1 -1
- package/dist/assets/{sankeyDiagram-QLVOVGJD-Dp3RYFKL.js → sankeyDiagram-QLVOVGJD-gX20aHSj.js} +1 -1
- package/dist/assets/{sequenceDiagram-X6HHIX6F-DkbSZR7j.js → sequenceDiagram-X6HHIX6F-B3rT7R0R.js} +1 -1
- package/dist/assets/{shutdown-button-D0N1es_c.js → shutdown-button-Bj1uRucX.js} +11 -11
- package/dist/assets/{slides-component-DN5s759D.js → slides-component-S7_QnsnB.js} +1 -1
- package/dist/assets/{sortBy-C53me3k8.js → sortBy-EwO_LOkf.js} +1 -1
- package/dist/assets/{stateDiagram-DGXRK772-DL3Ta588.js → stateDiagram-DGXRK772-D6PN5xO7.js} +1 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-UBeNvudT.js +1 -0
- package/dist/assets/{storage-BhACHptC.js → storage-mO56v_mR.js} +3 -3
- package/dist/assets/{terminal-GCVl-wqy.js → terminal-87tuZyuY.js} +1 -1
- package/dist/assets/{timeline-definition-BDJGKUSR-Dea-r6Ah.js → timeline-definition-BDJGKUSR-BoKGEjbf.js} +1 -1
- package/dist/assets/{tracing-ChqPtgQh.js → tracing-Bk2J7-fB.js} +2 -2
- package/dist/assets/{transform-Bze8Q3sQ.js → transform-DDoQUs93.js} +1 -1
- package/dist/assets/{vega-component-DJl4V3OP.js → vega-component-D35_Bdao.js} +1 -1
- package/dist/assets/{worker-CJ614ngf.js → worker-D-0VSZQ3.js} +1 -1
- package/dist/assets/{xychartDiagram-VJFVF3MP-JON3t4jP.js → xychartDiagram-VJFVF3MP-BOUSi4dh.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/_baseMap-KGy9mFen.js +0 -1
- package/dist/assets/channel-BzmH5ale.js +0 -1
- package/dist/assets/classDiagram-GIVACNV2-DHdsmdYC.js +0 -1
- package/dist/assets/classDiagram-v2-COTLJTTW-DHdsmdYC.js +0 -1
- package/dist/assets/clone-CLY66C3E.js +0 -1
- package/dist/assets/stateDiagram-v2-YXO3MK2T-CzvyvBru.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import{a as ve,Y as ae,ca as De,j as pe,cb as Re,L as xe}from"./index-
|
1
|
+
import{a as ve,Y as ae,ca as De,j as pe,cb as Re,L as xe}from"./index-jgUiUrDR.js";var ge,me={exports:{}},fe,Se,Ae=ge?me.exports:(ge=1,me.exports=(fe={},(()=>{var J=fe;function Y(z,q,B){return z.addEventListener(q,B),{dispose:()=>{B&&z.removeEventListener(q,B)}}}Object.defineProperty(J,"__esModule",{value:!0}),J.AttachAddon=void 0,J.AttachAddon=class{constructor(z,q){this._disposables=[],this._socket=z,this._socket.binaryType="arraybuffer",this._bidirectional=!(q&&q.bidirectional===!1)}activate(z){this._disposables.push(Y(this._socket,"message",q=>{const B=q.data;z.write(typeof B=="string"?B:new Uint8Array(B))})),this._bidirectional&&(this._disposables.push(z.onData(q=>this._sendData(q))),this._disposables.push(z.onBinary(q=>this._sendBinary(q)))),this._disposables.push(Y(this._socket,"close",()=>this.dispose())),this._disposables.push(Y(this._socket,"error",()=>this.dispose()))}dispose(){for(const z of this._disposables)z.dispose()}_sendData(z){this._checkOpenSocket()&&this._socket.send(z)}_sendBinary(z){if(!this._checkOpenSocket())return;const q=new Uint8Array(z.length);for(let B=0;B<z.length;++B)q[B]=255&z.charCodeAt(B);this._socket.send(q)}_checkOpenSocket(){switch(this._socket.readyState){case WebSocket.OPEN:return!0;case WebSocket.CONNECTING:throw new Error("Attach addon was loaded before socket was open");case WebSocket.CLOSING:return console.warn("Attach addon socket is closing"),!1;case WebSocket.CLOSED:throw new Error("Attach addon socket is closed");default:throw new Error("Unexpected socket state")}}}})(),fe)),Ce={exports:{}},be,we,Be=Se?Ce.exports:(Se=1,be=()=>(()=>{var J,Y={};return J=Y,Object.defineProperty(J,"__esModule",{value:!0}),J.FitAddon=void 0,J.FitAddon=class{activate(z){this._terminal=z}dispose(){}fit(){const z=this.proposeDimensions();if(!z||!this._terminal||isNaN(z.cols)||isNaN(z.rows))return;const q=this._terminal._core;this._terminal.rows===z.rows&&this._terminal.cols===z.cols||(q._renderService.clear(),this._terminal.resize(z.cols,z.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const z=this._terminal._core,q=z._renderService.dimensions;if(q.css.cell.width===0||q.css.cell.height===0)return;const B=this._terminal.options.scrollback===0?0:z.viewport.scrollBarWidth,r=window.getComputedStyle(this._terminal.element.parentElement),o=parseInt(r.getPropertyValue("height")),l=Math.max(0,parseInt(r.getPropertyValue("width"))),_=window.getComputedStyle(this._terminal.element),n=o-(parseInt(_.getPropertyValue("padding-top"))+parseInt(_.getPropertyValue("padding-bottom"))),d=l-(parseInt(_.getPropertyValue("padding-right"))+parseInt(_.getPropertyValue("padding-left")))-B;return{cols:Math.max(2,Math.floor(d/q.css.cell.width)),rows:Math.max(1,Math.floor(n/q.css.cell.height))}}},Y})(),Ce.exports=be()),ye={exports:{}},Ee,Te=(we||(we=1,Ee=ye,function(J,Y){Ee.exports=Y()}(globalThis,()=>(()=>{var J={4567:function(B,r,o){var l=this&&this.__decorate||function(e,t,a,f){var u,p=arguments.length,c=p<3?t:f===null?f=Object.getOwnPropertyDescriptor(t,a):f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(e,t,a,f);else for(var m=e.length-1;m>=0;m--)(u=e[m])&&(c=(p<3?u(c):p>3?u(t,a,c):u(t,a))||c);return p>3&&c&&Object.defineProperty(t,a,c),c},_=this&&this.__param||function(e,t){return function(a,f){t(a,f,e)}};Object.defineProperty(r,"__esModule",{value:!0}),r.AccessibilityManager=void 0;const n=o(9042),d=o(9924),v=o(844),g=o(4725),h=o(2585),i=o(3656);let s=r.AccessibilityManager=class extends v.Disposable{constructor(e,t,a,f){super(),this._terminal=e,this._coreBrowserService=a,this._renderService=f,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let u=0;u<this._terminal.rows;u++)this._rowElements[u]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[u]);if(this._topBoundaryFocusListener=u=>this._handleBoundaryFocus(u,0),this._bottomBoundaryFocusListener=u=>this._handleBoundaryFocus(u,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new d.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize(u=>this._handleResize(u.rows))),this.register(this._terminal.onRender(u=>this._refreshRows(u.start,u.end))),this.register(this._terminal.onScroll(()=>this._refreshRows())),this.register(this._terminal.onA11yChar(u=>this._handleChar(u))),this.register(this._terminal.onLineFeed(()=>this._handleChar(`
|
2
2
|
`))),this.register(this._terminal.onA11yTab(u=>this._handleTab(u))),this.register(this._terminal.onKey(u=>this._handleKey(u.key))),this.register(this._terminal.onBlur(()=>this._clearLiveRegion())),this.register(this._renderService.onDimensionsChange(()=>this._refreshRowsDimensions())),this.register((0,i.addDisposableDomListener)(document,"selectionchange",()=>this._handleSelectionChange())),this.register(this._coreBrowserService.onDprChange(()=>this._refreshRowsDimensions())),this._refreshRows(),this.register((0,v.toDisposable)(()=>{this._accessibilityContainer.remove(),this._rowElements.length=0}))}_handleTab(e){for(let t=0;t<e;t++)this._handleChar(" ")}_handleChar(e){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==e&&(this._charsToAnnounce+=e):this._charsToAnnounce+=e,e===`
|
3
3
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=n.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(e){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(e)||this._charsToConsume.push(e)}_refreshRows(e,t){this._liveRegionDebouncer.refresh(e,t,this._terminal.rows)}_renderRows(e,t){const a=this._terminal.buffer,f=a.lines.length.toString();for(let u=e;u<=t;u++){const p=a.lines.get(a.ydisp+u),c=[],m=(p==null?void 0:p.translateToString(!0,void 0,void 0,c))||"",y=(a.ydisp+u+1).toString(),k=this._rowElements[u];k&&(m.length===0?(k.innerText="\xA0",this._rowColumns.set(k,[0,1])):(k.textContent=m,this._rowColumns.set(k,c)),k.setAttribute("aria-posinset",y),k.setAttribute("aria-setsize",f))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(e,t){const a=e.target,f=this._rowElements[t===0?1:this._rowElements.length-2];if(a.getAttribute("aria-posinset")===(t===0?"1":`${this._terminal.buffer.lines.length}`)||e.relatedTarget!==f)return;let u,p;if(t===0?(u=a,p=this._rowElements.pop(),this._rowContainer.removeChild(p)):(u=this._rowElements.shift(),p=a,this._rowContainer.removeChild(u)),u.removeEventListener("focus",this._topBoundaryFocusListener),p.removeEventListener("focus",this._bottomBoundaryFocusListener),t===0){const c=this._createAccessibilityTreeNode();this._rowElements.unshift(c),this._rowContainer.insertAdjacentElement("afterbegin",c)}else{const c=this._createAccessibilityTreeNode();this._rowElements.push(c),this._rowContainer.appendChild(c)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(t===0?-1:1),this._rowElements[t===0?1:this._rowElements.length-2].focus(),e.preventDefault(),e.stopImmediatePropagation()}_handleSelectionChange(){var m;if(this._rowElements.length===0)return;const e=document.getSelection();if(!e)return;if(e.isCollapsed)return void(this._rowContainer.contains(e.anchorNode)&&this._terminal.clearSelection());if(!e.anchorNode||!e.focusNode)return void console.error("anchorNode and/or focusNode are null");let t={node:e.anchorNode,offset:e.anchorOffset},a={node:e.focusNode,offset:e.focusOffset};if((t.node.compareDocumentPosition(a.node)&Node.DOCUMENT_POSITION_PRECEDING||t.node===a.node&&t.offset>a.offset)&&([t,a]=[a,t]),t.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(t={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(t.node))return;const f=this._rowElements.slice(-1)[0];if(a.node.compareDocumentPosition(f)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(a={node:f,offset:((m=f.textContent)==null?void 0:m.length)??0}),!this._rowContainer.contains(a.node))return;const u=({node:y,offset:k})=>{const L=y instanceof Text?y.parentNode:y;let w=parseInt(L==null?void 0:L.getAttribute("aria-posinset"),10)-1;if(isNaN(w))return console.warn("row is invalid. Race condition?"),null;const x=this._rowColumns.get(L);if(!x)return console.warn("columns is null. Race condition?"),null;let T=k<x.length?x[k]:x.slice(-1)[0]+1;return T>=this._terminal.cols&&(++w,T=0),{row:w,column:T}},p=u(t),c=u(a);if(p&&c){if(p.row>c.row||p.row===c.row&&p.column>=c.column)throw new Error("invalid range");this._terminal.select(p.column,p.row,(c.row-p.row)*this._terminal.cols-p.column+c.column)}}_handleResize(e){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let t=this._rowContainer.children.length;t<this._terminal.rows;t++)this._rowElements[t]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[t]);for(;this._rowElements.length>e;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const e=this._coreBrowserService.mainDocument.createElement("div");return e.setAttribute("role","listitem"),e.tabIndex=-1,this._refreshRowDimensions(e),e}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let e=0;e<this._terminal.rows;e++)this._refreshRowDimensions(this._rowElements[e])}}_refreshRowDimensions(e){e.style.height=`${this._renderService.dimensions.css.cell.height}px`}};r.AccessibilityManager=s=l([_(1,h.IInstantiationService),_(2,g.ICoreBrowserService),_(3,g.IRenderService)],s)},3614:(B,r)=>{function o(d){return d.replace(/\r?\n/g,"\r")}function l(d,v){return v?"\x1B[200~"+d+"\x1B[201~":d}function _(d,v,g,h){d=l(d=o(d),g.decPrivateModes.bracketedPasteMode&&h.rawOptions.ignoreBracketedPasteMode!==!0),g.triggerDataEvent(d,!0),v.value=""}function n(d,v,g){const h=g.getBoundingClientRect(),i=d.clientX-h.left-10,s=d.clientY-h.top-10;v.style.width="20px",v.style.height="20px",v.style.left=`${i}px`,v.style.top=`${s}px`,v.style.zIndex="1000",v.focus()}Object.defineProperty(r,"__esModule",{value:!0}),r.rightClickHandler=r.moveTextAreaUnderMouseCursor=r.paste=r.handlePasteEvent=r.copyHandler=r.bracketTextForPaste=r.prepareTextForTerminal=void 0,r.prepareTextForTerminal=o,r.bracketTextForPaste=l,r.copyHandler=function(d,v){d.clipboardData&&d.clipboardData.setData("text/plain",v.selectionText),d.preventDefault()},r.handlePasteEvent=function(d,v,g,h){d.stopPropagation(),d.clipboardData&&_(d.clipboardData.getData("text/plain"),v,g,h)},r.paste=_,r.moveTextAreaUnderMouseCursor=n,r.rightClickHandler=function(d,v,g,h,i){n(d,v,g),i&&h.rightClickSelect(d),v.value=h.selectionText,v.select()}},7239:(B,r,o)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.ColorContrastCache=void 0;const l=o(1505);r.ColorContrastCache=class{constructor(){this._color=new l.TwoKeyMap,this._css=new l.TwoKeyMap}setCss(_,n,d){this._css.set(_,n,d)}getCss(_,n){return this._css.get(_,n)}setColor(_,n,d){this._color.set(_,n,d)}getColor(_,n){return this._color.get(_,n)}clear(){this._color.clear(),this._css.clear()}}},3656:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.addDisposableDomListener=void 0,r.addDisposableDomListener=function(o,l,_,n){o.addEventListener(l,_,n);let d=!1;return{dispose:()=>{d||(d=!0,o.removeEventListener(l,_,n))}}}},3551:function(B,r,o){var l=this&&this.__decorate||function(s,e,t,a){var f,u=arguments.length,p=u<3?e:a===null?a=Object.getOwnPropertyDescriptor(e,t):a;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")p=Reflect.decorate(s,e,t,a);else for(var c=s.length-1;c>=0;c--)(f=s[c])&&(p=(u<3?f(p):u>3?f(e,t,p):f(e,t))||p);return u>3&&p&&Object.defineProperty(e,t,p),p},_=this&&this.__param||function(s,e){return function(t,a){e(t,a,s)}};Object.defineProperty(r,"__esModule",{value:!0}),r.Linkifier=void 0;const n=o(3656),d=o(8460),v=o(844),g=o(2585),h=o(4725);let i=r.Linkifier=class extends v.Disposable{get currentLink(){return this._currentLink}constructor(s,e,t,a,f){super(),this._element=s,this._mouseService=e,this._renderService=t,this._bufferService=a,this._linkProviderService=f,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new d.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new d.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,v.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,v.toDisposable)(()=>{var u;this._lastMouseEvent=void 0,(u=this._activeProviderReplies)==null||u.clear()})),this.register(this._bufferService.onResize(()=>{this._clearCurrentLink(),this._wasResized=!0})),this.register((0,n.addDisposableDomListener)(this._element,"mouseleave",()=>{this._isMouseOut=!0,this._clearCurrentLink()})),this.register((0,n.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,n.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(s){this._lastMouseEvent=s;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);if(!e)return;this._isMouseOut=!1;const t=s.composedPath();for(let a=0;a<t.length;a++){const f=t[a];if(f.classList.contains("xterm"))break;if(f.classList.contains("xterm-hover"))return}this._lastBufferCell&&e.x===this._lastBufferCell.x&&e.y===this._lastBufferCell.y||(this._handleHover(e),this._lastBufferCell=e)}_handleHover(s){if(this._activeLine!==s.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(s,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,s)||(this._clearCurrentLink(),this._askForLink(s,!0))}_askForLink(s,e){var a,f;this._activeProviderReplies&&e||((a=this._activeProviderReplies)==null||a.forEach(u=>{u==null||u.forEach(p=>{p.link.dispose&&p.link.dispose()})}),this._activeProviderReplies=new Map,this._activeLine=s.y);let t=!1;for(const[u,p]of this._linkProviderService.linkProviders.entries())e?(f=this._activeProviderReplies)!=null&&f.get(u)&&(t=this._checkLinkProviderResult(u,s,t)):p.provideLinks(s.y,c=>{var y,k;if(this._isMouseOut)return;const m=c==null?void 0:c.map(L=>({link:L}));(y=this._activeProviderReplies)==null||y.set(u,m),t=this._checkLinkProviderResult(u,s,t),((k=this._activeProviderReplies)==null?void 0:k.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(s.y,this._activeProviderReplies)})}_removeIntersectingLinks(s,e){const t=new Set;for(let a=0;a<e.size;a++){const f=e.get(a);if(f)for(let u=0;u<f.length;u++){const p=f[u],c=p.link.range.start.y<s?0:p.link.range.start.x,m=p.link.range.end.y>s?this._bufferService.cols:p.link.range.end.x;for(let y=c;y<=m;y++){if(t.has(y)){f.splice(u--,1);break}t.add(y)}}}}_checkLinkProviderResult(s,e,t){var u;if(!this._activeProviderReplies)return t;const a=this._activeProviderReplies.get(s);let f=!1;for(let p=0;p<s;p++)this._activeProviderReplies.has(p)&&!this._activeProviderReplies.get(p)||(f=!0);if(!f&&a){const p=a.find(c=>this._linkAtPosition(c.link,e));p&&(t=!0,this._handleNewLink(p))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!t)for(let p=0;p<this._activeProviderReplies.size;p++){const c=(u=this._activeProviderReplies.get(p))==null?void 0:u.find(m=>this._linkAtPosition(m.link,e));if(c){t=!0,this._handleNewLink(c);break}}return t}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(s){if(!this._currentLink)return;const e=this._positionFromMouseEvent(s,this._element,this._mouseService);e&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,e)&&this._currentLink.link.activate(s,this._currentLink.link.text)}_clearCurrentLink(s,e){this._currentLink&&this._lastMouseEvent&&(!s||!e||this._currentLink.link.range.start.y>=s&&this._currentLink.link.range.end.y<=e)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,v.disposeArray)(this._linkCacheDisposables))}_handleNewLink(s){if(!this._lastMouseEvent)return;const e=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);e&&this._linkAtPosition(s.link,e)&&(this._currentLink=s,this._currentLink.state={decorations:{underline:s.link.decorations===void 0||s.link.decorations.underline,pointerCursor:s.link.decorations===void 0||s.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,s.link,this._lastMouseEvent),s.link.decorations={},Object.defineProperties(s.link.decorations,{pointerCursor:{get:()=>{var t,a;return(a=(t=this._currentLink)==null?void 0:t.state)==null?void 0:a.decorations.pointerCursor},set:t=>{var a;(a=this._currentLink)!=null&&a.state&&this._currentLink.state.decorations.pointerCursor!==t&&(this._currentLink.state.decorations.pointerCursor=t,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",t))}},underline:{get:()=>{var t,a;return(a=(t=this._currentLink)==null?void 0:t.state)==null?void 0:a.decorations.underline},set:t=>{var a,f,u;(a=this._currentLink)!=null&&a.state&&((u=(f=this._currentLink)==null?void 0:f.state)==null?void 0:u.decorations.underline)!==t&&(this._currentLink.state.decorations.underline=t,this._currentLink.state.isHovered&&this._fireUnderlineEvent(s.link,t))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange(t=>{if(!this._currentLink)return;const a=t.start===0?0:t.start+1+this._bufferService.buffer.ydisp,f=this._bufferService.buffer.ydisp+1+t.end;if(this._currentLink.link.range.start.y>=a&&this._currentLink.link.range.end.y<=f&&(this._clearCurrentLink(a,f),this._lastMouseEvent)){const u=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);u&&this._askForLink(u,!1)}})))}_linkHover(s,e,t){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!0),this._currentLink.state.decorations.pointerCursor&&s.classList.add("xterm-cursor-pointer")),e.hover&&e.hover(t,e.text)}_fireUnderlineEvent(s,e){const t=s.range,a=this._bufferService.buffer.ydisp,f=this._createLinkUnderlineEvent(t.start.x-1,t.start.y-a-1,t.end.x,t.end.y-a-1,void 0);(e?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(f)}_linkLeave(s,e,t){var a;(a=this._currentLink)!=null&&a.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(e,!1),this._currentLink.state.decorations.pointerCursor&&s.classList.remove("xterm-cursor-pointer")),e.leave&&e.leave(t,e.text)}_linkAtPosition(s,e){const t=s.range.start.y*this._bufferService.cols+s.range.start.x,a=s.range.end.y*this._bufferService.cols+s.range.end.x,f=e.y*this._bufferService.cols+e.x;return t<=f&&f<=a}_positionFromMouseEvent(s,e,t){const a=t.getCoords(s,e,this._bufferService.cols,this._bufferService.rows);if(a)return{x:a[0],y:a[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(s,e,t,a,f){return{x1:s,y1:e,x2:t,y2:a,cols:this._bufferService.cols,fg:f}}};r.Linkifier=i=l([_(1,h.IMouseService),_(2,h.IRenderService),_(3,g.IBufferService),_(4,h.ILinkProviderService)],i)},9042:(B,r)=>{Object.defineProperty(r,"__esModule",{value:!0}),r.tooMuchOutput=r.promptLabel=void 0,r.promptLabel="Terminal input",r.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(B,r,o){var l=this&&this.__decorate||function(h,i,s,e){var t,a=arguments.length,f=a<3?i:e===null?e=Object.getOwnPropertyDescriptor(i,s):e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(h,i,s,e);else for(var u=h.length-1;u>=0;u--)(t=h[u])&&(f=(a<3?t(f):a>3?t(i,s,f):t(i,s))||f);return a>3&&f&&Object.defineProperty(i,s,f),f},_=this&&this.__param||function(h,i){return function(s,e){i(s,e,h)}};Object.defineProperty(r,"__esModule",{value:!0}),r.OscLinkProvider=void 0;const n=o(511),d=o(2585);let v=r.OscLinkProvider=class{constructor(h,i,s){this._bufferService=h,this._optionsService=i,this._oscLinkService=s}provideLinks(h,i){var m;const s=this._bufferService.buffer.lines.get(h-1);if(!s)return void i(void 0);const e=[],t=this._optionsService.rawOptions.linkHandler,a=new n.CellData,f=s.getTrimmedLength();let u=-1,p=-1,c=!1;for(let y=0;y<f;y++)if(p!==-1||s.hasContent(y)){if(s.loadCell(y,a),a.hasExtendedAttrs()&&a.extended.urlId){if(p===-1){p=y,u=a.extended.urlId;continue}c=a.extended.urlId!==u}else p!==-1&&(c=!0);if(c||p!==-1&&y===f-1){const k=(m=this._oscLinkService.getLinkData(u))==null?void 0:m.uri;if(k){const L={start:{x:p+1,y:h},end:{x:y+(c||y!==f-1?0:1),y:h}};let w=!1;if(!(t!=null&&t.allowNonHttpProtocols))try{const x=new URL(k);["http:","https:"].includes(x.protocol)||(w=!0)}catch{w=!0}w||e.push({text:k,range:L,activate:(x,T)=>t?t.activate(x,T,L):g(0,T),hover:(x,T)=>{var P;return(P=t==null?void 0:t.hover)==null?void 0:P.call(t,x,T,L)},leave:(x,T)=>{var P;return(P=t==null?void 0:t.leave)==null?void 0:P.call(t,x,T,L)}})}c=!1,a.hasExtendedAttrs()&&a.extended.urlId?(p=y,u=a.extended.urlId):(p=-1,u=-1)}}i(e)}};function g(h,i){if(confirm(`Do you want to navigate to ${i}?
|
4
4
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{_ as r,c as yt,l as $,S as gt,T as ft,V as mt,W as xt,B as bt,X as _t,y as kt}from"./mermaid-
|
1
|
+
import{_ as r,c as yt,l as $,S as gt,T as ft,V as mt,W as xt,B as bt,X as _t,y as kt}from"./mermaid-B7Nz4kzp.js";import{s as V}from"./transform-DDoQUs93.js";import{B as K}from"./index-jgUiUrDR.js";var G=function(){var n=r(function(s,h,l,p){for(l=l||{},p=s.length;p--;l[s[p]]=h);return l},"o"),t=[6,8,10,11,12,14,16,17,20,21],e=[1,9],o=[1,10],i=[1,11],a=[1,12],u=[1,13],f=[1,16],d=[1,17],g={trace:r(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:r(function(s,h,l,p,y,c,k){var x=c.length-1;switch(y){case 1:return c[x-1];case 2:case 6:case 7:this.$=[];break;case 3:c[x-1].push(c[x]),this.$=c[x-1];break;case 4:case 5:this.$=c[x];break;case 8:p.getCommonDb().setDiagramTitle(c[x].substr(6)),this.$=c[x].substr(6);break;case 9:this.$=c[x].trim(),p.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=c[x].trim(),p.getCommonDb().setAccDescription(this.$);break;case 12:p.addSection(c[x].substr(8)),this.$=c[x].substr(8);break;case 15:p.addTask(c[x],0,""),this.$=c[x];break;case 16:p.addEvent(c[x].substr(2)),this.$=c[x]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},n(t,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,7],{1:[2,1]}),n(t,[2,3]),{9:18,11:e,12:o,14:i,16:a,17:u,18:14,19:15,20:f,21:d},n(t,[2,5]),n(t,[2,6]),n(t,[2,8]),{13:[1,19]},{15:[1,20]},n(t,[2,11]),n(t,[2,12]),n(t,[2,13]),n(t,[2,14]),n(t,[2,15]),n(t,[2,16]),n(t,[2,4]),n(t,[2,9]),n(t,[2,10])],defaultActions:{},parseError:r(function(s,h){if(!h.recoverable){var l=new Error(s);throw l.hash=h,l}this.trace(s)},"parseError"),parse:r(function(s){var h=this,l=[0],p=[],y=[null],c=[],k=this.table,x="",N=0,P=0,D=c.slice.call(arguments,1),b=Object.create(this.lexer),I={yy:{}};for(var M in this.yy)Object.prototype.hasOwnProperty.call(this.yy,M)&&(I.yy[M]=this.yy[M]);b.setInput(s,I.yy),I.yy.lexer=b,I.yy.parser=this,b.yylloc===void 0&&(b.yylloc={});var v=b.yylloc;c.push(v);var A=b.options&&b.options.ranges;function L(){var T;return typeof(T=p.pop()||b.lex()||1)!="number"&&(T instanceof Array&&(T=(p=T).pop()),T=h.symbols_[T]||T),T}typeof I.yy.parseError=="function"?this.parseError=I.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,r(function(T){l.length=l.length-2*T,y.length=y.length-T,c.length=c.length-T},"popStack"),r(L,"lex");for(var w,E,S,Y,z,C,Z,B,O={};;){if(E=l[l.length-1],this.defaultActions[E]?S=this.defaultActions[E]:(w==null&&(w=L()),S=k[E]&&k[E][w]),S===void 0||!S.length||!S[0]){var J="";for(z in B=[],k[E])this.terminals_[z]&&z>2&&B.push("'"+this.terminals_[z]+"'");J=b.showPosition?"Parse error on line "+(N+1)+`:
|
2
2
|
`+b.showPosition()+`
|
3
3
|
Expecting `+B.join(", ")+", got '"+(this.terminals_[w]||w)+"'":"Parse error on line "+(N+1)+": Unexpected "+(w==1?"end of input":"'"+(this.terminals_[w]||w)+"'"),this.parseError(J,{text:b.match,token:this.terminals_[w]||w,line:b.yylineno,loc:v,expected:B})}if(S[0]instanceof Array&&S.length>1)throw new Error("Parse Error: multiple actions possible at state: "+E+", token: "+w);switch(S[0]){case 1:l.push(w),y.push(b.yytext),c.push(b.yylloc),l.push(S[1]),w=null,P=b.yyleng,x=b.yytext,N=b.yylineno,v=b.yylloc;break;case 2:if(C=this.productions_[S[1]][1],O.$=y[y.length-C],O._$={first_line:c[c.length-(C||1)].first_line,last_line:c[c.length-1].last_line,first_column:c[c.length-(C||1)].first_column,last_column:c[c.length-1].last_column},A&&(O._$.range=[c[c.length-(C||1)].range[0],c[c.length-1].range[1]]),(Y=this.performAction.apply(O,[x,P,N,I.yy,S[1],y,c].concat(D)))!==void 0)return Y;C&&(l=l.slice(0,-1*C*2),y=y.slice(0,-1*C),c=c.slice(0,-1*C)),l.push(this.productions_[S[1]][0]),y.push(O.$),c.push(O._$),Z=k[l[l.length-2]][l[l.length-1]],l.push(Z);break;case 3:return!0}}return!0},"parse")},_=function(){return{EOF:1,parseError:r(function(s,h){if(!this.yy.parser)throw new Error(s);this.yy.parser.parseError(s,h)},"parseError"),setInput:r(function(s,h){return this.yy=h||this.yy||{},this._input=s,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:r(function(){var s=this._input[0];return this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s,s.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),s},"input"),unput:r(function(s){var h=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-h),this.offset-=h;var p=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),l.length-1&&(this.yylineno-=l.length-1);var y=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:l?(l.length===p.length?this.yylloc.first_column:0)+p[p.length-l.length].length-l[0].length:this.yylloc.first_column-h},this.options.ranges&&(this.yylloc.range=[y[0],y[0]+this.yyleng-h]),this.yyleng=this.yytext.length,this},"unput"),more:r(function(){return this._more=!0,this},"more"),reject:r(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:r(function(s){this.unput(this.match.slice(s))},"less"),pastInput:r(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:r(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:r(function(){var s=this.pastInput(),h=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
@@ -1,2 +1,2 @@
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
2
|
-
import{u as G,c as N,a4 as O,a5 as J,$ as K,Y as k,j as s,a as Q,a6 as W,a7 as X,a8 as q,a9 as Z,a0 as ee,aa as te,ab as A,ac as re,ad as se,ae as ie,__tla as ae}from"./index-l_wokygA.js";import{P as le,C as oe,f as V,E as ne,a as me,u as ce,__tla as pe}from"./edit-page-DpIs4Jeh.js";import{c as de}from"./compile-BMCn2vE3.js";import{r as ue,u as he,__tla as xe}from"./storage-BhACHptC.js";import{A as ge}from"./shutdown-button-D0N1es_c.js";import{C as fe}from"./circle-play-Cvl-9kpT.js";import"./_createAggregator-Cvb8EMxO.js";import"./_baseEach-FnH5SKIB.js";import"./transform-Bze8Q3sQ.js";import"./sortBy-C53me3k8.js";import"./_baseMap-KGy9mFen.js";import"./index-DW39dZX6.js";import"./index-DJwntWVz.js";import"./index-Dneegn3v.js";import"./index-D-01nLUB.js";import"./index-CfCsWmku.js";import"./index-Cd9N2R3M.js";import"./index-BKIw-nTk.js";import"./index-Cb2EzYJO.js";import"./index-BoVrSPna.js";import"./index-UohZ6mc7.js";import"./index-DlZmbF5y.js";import"./index-B6DH7WAG.js";import"./index-CH_vjHJs.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./index-C1GzY49R.js";let U,w,ve=Promise.all([(()=>{try{return ae}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return xe}catch{}})()]).then(async()=>{const Y=G("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),$="hoveredCellId",C="cellHover",R="startTimestamp",P="endTimestamp";let E,L,M,z,B,H,D,F;E=J(new Map),U=()=>{const t=N.c(28),{runIds:e,runMap:r}=O(ue),o=O(E),{clearRuns:a}=he(),{theme:l}=K(),[i,u]=k.useState("above");let m;t[0]!==i?(m=()=>{u(i==="above"?"sideBySide":"above")},t[0]=i,t[1]=m):m=t[1];const x=m;if(e.length===0){let h;return t[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(le,{title:"No traces",description:s.jsx("span",{children:"Cells that have ran will appear here."}),icon:s.jsx(ge,{})}),t[2]=h):h=t[2],h}let d;t[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=d):d=t[3];const c=i==="sideBySide";let g,p,y,f,v,I;if(t[4]!==c||t[5]!==x?(g=s.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[d,s.jsx("input",{type:"checkbox",name:"chartPosition",id:"chartPosition",onClick:x,defaultChecked:c,className:"h-3 cursor-pointer"})]}),t[4]=c,t[5]=x,t[6]=g):g=t[6],t[7]!==a?(p=s.jsx(oe,{dataTestId:"clear-traces-button",onClick:a}),t[7]=a,t[8]=p):p=t[8],t[9]!==g||t[10]!==p?(y=s.jsxs("div",{className:"flex flex-row justify-end gap-3",children:[g,p]}),t[9]=g,t[10]=p,t[11]=y):y=t[11],t[12]!==i||t[13]!==o||t[14]!==e||t[15]!==r||t[16]!==l){let h;t[18]!==i||t[19]!==o||t[20]!==r||t[21]!==l?(h=(S,n)=>{const j=r.get(S);if(j)return s.jsx(z,{run:j,isExpanded:o.get(j.runId),isMostRecentRun:n===0,chartPosition:i,theme:l},j.runId)},t[18]=i,t[19]=o,t[20]=r,t[21]=l,t[22]=h):h=t[22],f=e.map(h),t[12]=i,t[13]=o,t[14]=e,t[15]=r,t[16]=l,t[17]=f}else f=t[17];return t[23]!==f?(v=s.jsx("div",{className:"flex flex-col gap-3",children:f}),t[23]=f,t[24]=v):v=t[24],t[25]!==y||t[26]!==v?(I=s.jsxs("div",{className:"py-1 px-2 overflow-y-scroll",children:[y,v]}),t[25]=y,t[26]=v,t[27]=I):I=t[27],I},L=Q.lazy(()=>W(()=>import("./index-G5_5OkDd.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(t=>({default:t.Vega}))),M=t=>{const e=N.c(10),{ref:r,width:o}=ce(),a=o===void 0?300:o,l=t.theme==="dark"?"dark":void 0,i=a-50;let u,m;return e[0]!==t.height||e[1]!==t.signalListeners||e[2]!==t.vegaSpec||e[3]!==l||e[4]!==i?(u=s.jsx(k.Suspense,{children:s.jsx(L,{spec:t.vegaSpec,theme:l,width:i,height:t.height,signalListeners:t.signalListeners,actions:!1})}),e[0]=t.height,e[1]=t.signalListeners,e[2]=t.vegaSpec,e[3]=l,e[4]=i,e[5]=u):u=e[5],e[6]!==t.className||e[7]!==r||e[8]!==u?(m=s.jsx("div",{className:t.className,ref:r,children:u}),e[6]=t.className,e[7]=r,e[8]=u,e[9]=m):m=e[9],m},z=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:o,theme:a})=>{const l=X(E),i=(o=o??e)?re:se,u=s.jsx(i,{height:16,className:"inline"}),m=s.jsxs("span",{className:"text-sm cursor-pointer",onClick:()=>{l(x=>{const d=new Map(x);return d.set(t.runId,!o),d})},children:["Run - ",q(t.runStartTime),u]});return o?s.jsx(B,{run:t,chartPosition:r,theme:a,title:m},t.runId):s.jsx("div",{className:"flex flex-col",children:s.jsx("pre",{className:"font-mono font-semibold",children:m})},t.runId)},B=t=>{const e=N.c(32),{run:r,chartPosition:o,theme:a,title:l}=t,[i,u]=k.useState();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={[C]:(S,n)=>{var _;const j=n,b=(_=j.cell)==null?void 0:_[0];u(b??null)}},e[0]=m):m=e[0];const x=m,d=Z();let c,g;if(e[1]!==d||e[2]!==o||e[3]!==r.cellRuns||e[4]!==r.runId||e[5]!==a){const S=[...r.cellRuns.values()].map(n=>{const j=n.elapsedTime??0;return{cell:n.cellId,cellNum:d.inOrderIds.indexOf(n.cellId),startTimestamp:w(n.startTime),endTimestamp:w(n.startTime+j),elapsedTime:V(1e3*j),status:n.status}});c=`hiddenInputElement-${r.runId}`,g=de(function(n,j,b,_){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",background:_==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:$,bind:{element:`#${j}`}},{name:C,select:{type:"point",on:"mouseover",fields:["cell"],clear:"mouseout"}}],height:{step:b==="above"?21:26},encoding:{y:{field:"cellNum",scale:{paddingInner:.2},sort:{field:R},title:"cell",axis:b==="sideBySide"?null:void 0},x:{field:R,type:"temporal",axis:{orient:"top",title:null}},x2:{field:P,type:"temporal"},tooltip:[{field:R,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"Start"},{field:P,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"End"}],size:{value:{expr:`${$} == toString(datum.cell) ? 19.5 : 18`}},color:{field:"status",scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:n},config:{view:{stroke:"transparent"}}}}(S,c,o,a)),e[1]=d,e[2]=o,e[3]=r.cellRuns,e[4]=r.runId,e[5]=a,e[6]=c,e[7]=g}else c=e[6],g=e[7];const p=g.spec;let y;e[8]!==c||e[9]!==i||e[10]!==r?(y=s.jsx(H,{run:r,hoveredCellId:i,hiddenInputElementId:c}),e[8]=c,e[9]=i,e[10]=r,e[11]=y):y=e[11];const f=y;if(o==="above"){let S,n,j;return e[12]!==a||e[13]!==p?(S=s.jsx(M,{vegaSpec:p,height:120,signalListeners:x,theme:a}),e[12]=a,e[13]=p,e[14]=S):S=e[14],e[15]!==S||e[16]!==l||e[17]!==f?(n=s.jsxs("pre",{className:"font-mono font-semibold",children:[l,S,f]}),e[15]=S,e[16]=l,e[17]=f,e[18]=n):n=e[18],e[19]!==r.runId||e[20]!==n?(j=s.jsx("div",{className:"flex flex-col",children:n},r.runId),e[19]=r.runId,e[20]=n,e[21]=j):j=e[21],j}let v,I,h;return e[22]!==l||e[23]!==f?(v=s.jsxs("pre",{className:"font-mono font-semibold",children:[l,f]}),e[22]=l,e[23]=f,e[24]=v):v=e[24],e[25]!==a||e[26]!==p?(I=s.jsx(M,{className:"-mt-0.5 flex-1",vegaSpec:p,height:100,signalListeners:x,theme:a}),e[25]=a,e[26]=p,e[27]=I):I=e[27],e[28]!==r.runId||e[29]!==v||e[30]!==I?(h=s.jsxs("div",{className:"flex flex-row",children:[v,I]},r.runId),e[28]=r.runId,e[29]=v,e[30]=I,e[31]=h):h=e[31],h},H=t=>{const e=N.c(12),{run:r,hoveredCellId:o,hiddenInputElementId:a}=t,l=k.useRef(null);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=p=>{l.current&&(l.current.value=String(p),l.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=i):i=e[0];const u=i,m=o||"";let x,d,c,g;return e[1]!==a||e[2]!==m?(x=s.jsx("input",{type:"text",id:a,defaultValue:m,hidden:!0,ref:l}),e[1]=a,e[2]=m,e[3]=x):x=e[3],e[4]!==r.cellRuns?(d=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=d):d=e[5],e[6]!==o||e[7]!==d?(c=d.map(p=>s.jsx(F,{cellRun:p,hovered:p.cellId===o,dispatchHoverEvent:u},p.cellId)),e[6]=o,e[7]=d,e[8]=c):c=e[8],e[9]!==x||e[10]!==c?(g=s.jsxs("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[x,c]}),e[9]=x,e[10]=c,e[11]=g):g=e[11],g},D={success:s.jsx(me,{color:"green",size:14}),running:s.jsx(fe,{color:"var(--blue-10)",size:14}),error:s.jsx(ie,{color:"red",size:14}),queued:s.jsx(Y,{color:"grey",size:14})},F=t=>{const e=N.c(39),{cellRun:r,hovered:o,dispatchHoverEvent:a}=t;let l;e[0]!==r.elapsedTime?(l=r.elapsedTime?V(1e3*r.elapsedTime):"-",e[0]=r.elapsedTime,e[1]=l):l=e[1];const i=l;let u;e[2]!==r.elapsedTime||e[3]!==i?(u=r.elapsedTime?s.jsxs("span",{children:["This cell took ",s.jsx(ne,{elapsedTime:i})," to run"]}):s.jsx("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=i,e[4]=u):u=e[4];const m=u;let x;e[5]!==r.cellId||e[6]!==a?(x=()=>{a(r.cellId)},e[5]=r.cellId,e[6]=a,e[7]=x):x=e[7];const d=x;let c;e[8]!==a?(c=()=>{a(null)},e[8]=a,e[9]=c):c=e[9];const g=c,p=o&&"bg-[var(--gray-3)] opacity-100";let y,f,v,I,h,S,n;e[10]!==p?(y=ee("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-[var(--gray-3)] hover:opacity-100",p),e[10]=p,e[11]=y):y=e[11],e[12]!==r.startTime?(f=q(r.startTime),e[12]=r.startTime,e[13]=f):f=e[13],e[14]!==f?(v=s.jsxs("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:["[",f,"]"]}),e[14]=f,e[15]=v):v=e[15],e[16]!==r.cellId?(I=s.jsxs("span",{className:"text-[var(--gray-10)] w-16",children:["(",s.jsx(te,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=I):I=e[17],e[18]!==r.code?(h=s.jsx("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=h):h=e[19],e[20]!==i?(S=s.jsx("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:i}),e[20]=i,e[21]=S):S=e[21],e[22]!==m||e[23]!==S?(n=s.jsx(A,{content:m,children:S}),e[22]=m,e[23]=S,e[24]=n):n=e[24];const j=D[r.status];let b,_,T;return e[25]!==r.status||e[26]!==j?(b=s.jsx(A,{content:r.status,children:j}),e[25]=r.status,e[26]=j,e[27]=b):b=e[27],e[28]!==n||e[29]!==b?(_=s.jsxs("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[n,b]}),e[28]=n,e[29]=b,e[30]=_):_=e[30],e[31]!==d||e[32]!==g||e[33]!==h||e[34]!==_||e[35]!==y||e[36]!==v||e[37]!==I?(T=s.jsxs("div",{className:y,onMouseEnter:d,onMouseLeave:g,children:[v,I,h,_]}),e[31]=d,e[32]=g,e[33]=h,e[34]=_,e[35]=y,e[36]=v,e[37]=I,e[38]=T):T=e[38],T},w=function(t){try{const e=new Date(1e3*t),r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),u=String(e.getSeconds()).padStart(2,"0");return`${r}-${o}-${a} ${l}:${i}:${u}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}});export{U as Tracing,ve as __tla,w as formatChartTime};
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B725LHBp.js","./VegaLite-Byuc9HjF.js","./index-jgUiUrDR.js","./index-7fo-bO1b.css","./compile-BkD0vkR5.js","./index-CfektYKc.js"])))=>i.map(i=>d[i]);
|
2
|
+
import{u as G,c as N,a4 as O,a5 as J,$ as K,Y as k,j as s,a as Q,a6 as W,a7 as X,a8 as q,a9 as Z,a0 as ee,aa as te,ab as A,ac as re,ad as se,ae as ie,__tla as ae}from"./index-jgUiUrDR.js";import{P as le,C as oe,f as V,E as ne,a as me,u as ce,__tla as pe}from"./edit-page-BLaffrTE.js";import{c as de}from"./compile-BkD0vkR5.js";import{r as ue,u as he,__tla as xe}from"./storage-mO56v_mR.js";import{A as ge}from"./shutdown-button-Bj1uRucX.js";import{C as fe}from"./circle-play-C-FzGo4q.js";import"./_createAggregator-CLwaUrk2.js";import"./_baseEach-6MHNR_Pm.js";import"./transform-DDoQUs93.js";import"./sortBy-EwO_LOkf.js";import"./_baseMap-_1wf2RNm.js";import"./index-BuPaMPZS.js";import"./index-C9s7wpCG.js";import"./index-xggWyI0a.js";import"./index-Bim2uhxc.js";import"./index-DuRflRhD.js";import"./index-BIHhaFPx.js";import"./index-BgVM0N6Q.js";import"./index-QthAcefu.js";import"./index-DIOux9Rd.js";import"./index-BzqZ_6cl.js";import"./index-eTpeTAvV.js";import"./index-BQaHnozn.js";import"./index-CX02FBw9.js";import"./apl-CXdQSnD-.js";import"./asciiarmor-D5V0T9Cu.js";import"./asterisk-B46aRdXb.js";import"./brainfuck-CtZaYBKt.js";import"./clike-BgBwzOhw.js";import"./cmake-DXn5xaP-.js";import"./cobol-stawOqaz.js";import"./coffeescript-BTDxI-eT.js";import"./commonlisp-vq6DHwts.js";import"./crystal-CRzZ78HM.js";import"./cypher-gJDei3ni.js";import"./d-BShv7fp-.js";import"./diff-UJJ5BM9S.js";import"./dockerfile-knGOOxt4.js";import"./simple-mode-C3vEBAcb.js";import"./dtd-DI9Herc-.js";import"./dylan-DkEP81N9.js";import"./ebnf-B-Df8AvO.js";import"./ecl-DPFc0Uaf.js";import"./eiffel-DR5c0IrL.js";import"./elm-DompmV0j.js";import"./erlang-BuqgqA5h.js";import"./factor-CFXhaUWb.js";import"./fcl-CVaBTCzQ.js";import"./forth-POgR1ypr.js";import"./fortran-DL7KluxX.js";import"./gas-bV0CklSb.js";import"./gherkin-B6X1vGSW.js";import"./groovy-DnIzCrpZ.js";import"./haskell-CLQs6EAM.js";import"./haxe-D25e-2l-.js";import"./http-BKJkqRj4.js";import"./idl-pcmmZuaN.js";import"./jinja2-DhgKlfW7.js";import"./julia-DjdwvFuI.js";import"./livescript-HO6ttBFx.js";import"./lua-8DXOpKDz.js";import"./mathematica-IIbmv7SK.js";import"./mbox-z_N2Mo3d.js";import"./mirc-DkvFAiy5.js";import"./modelica-DSrSSXCg.js";import"./mscgen-B2igx18G.js";import"./mumps-zvxmGV4l.js";import"./nginx-B4hAVlXN.js";import"./nsis-BvKfQ9lQ.js";import"./ntriples-BSwWqoLa.js";import"./octave-C4hdQ5Hf.js";import"./oz-qQq7irPq.js";import"./pascal-CafrKXZF.js";import"./perl-tdMlh9QA.js";import"./pig-CwGJVRC4.js";import"./powershell-D1ly3AHC.js";import"./properties-_nPj978X.js";import"./protobuf-B4y9do6W.js";import"./puppet-Bc-yJKzi.js";import"./q-B0kTJ4cI.js";import"./r-BA4EbLKE.js";import"./ruby-CR-u2WLS.js";import"./sas-Bqaci40L.js";import"./scheme-qjP0V5Ag.js";import"./shell-BLav31RL.js";import"./sieve-r025o_jW.js";import"./smalltalk-C7J3IyEP.js";import"./solr-78MBEUkU.js";import"./sparql-BRLJFz69.js";import"./spreadsheet-CGlWr0eM.js";import"./stylus-Bdo_Aemu.js";import"./swift-B_XXVlXX.js";import"./tcl-B2fODqDH.js";import"./textile-BuVhTOzU.js";import"./tiddlywiki-BgR6AEZu.js";import"./tiki-CI-ztowC.js";import"./toml-wcPdHu67.js";import"./troff-Ce85hlLp.js";import"./ttcn-BxnYHtq8.js";import"./turtle-BkSuIpt-.js";import"./vb-BHgjm0DN.js";import"./vbscript-Dawdd5GZ.js";import"./velocity-BdD_26Jv.js";import"./verilog-B4LBqg_1.js";import"./vhdl-CWWH2SUo.js";import"./webidl-CGwyPRYs.js";import"./xquery-CVDBqZPY.js";import"./yacas-I8QjZlxf.js";import"./z80-D8p3gKXp.js";import"./index-CfektYKc.js";let U,w,ve=Promise.all([(()=>{try{return ae}catch{}})(),(()=>{try{return pe}catch{}})(),(()=>{try{return xe}catch{}})()]).then(async()=>{const Y=G("circle-ellipsis",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M17 12h.01",key:"1m0b6t"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M7 12h.01",key:"eqddd0"}]]),$="hoveredCellId",C="cellHover",R="startTimestamp",P="endTimestamp";let E,L,M,z,B,H,D,F;E=J(new Map),U=()=>{const t=N.c(28),{runIds:e,runMap:r}=O(ue),o=O(E),{clearRuns:a}=he(),{theme:l}=K(),[i,u]=k.useState("above");let m;t[0]!==i?(m=()=>{u(i==="above"?"sideBySide":"above")},t[0]=i,t[1]=m):m=t[1];const x=m;if(e.length===0){let h;return t[2]===Symbol.for("react.memo_cache_sentinel")?(h=s.jsx(le,{title:"No traces",description:s.jsx("span",{children:"Cells that have ran will appear here."}),icon:s.jsx(ge,{})}),t[2]=h):h=t[2],h}let d;t[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx("label",{htmlFor:"chartPosition",className:"text-xs",children:"Inline chart"}),t[3]=d):d=t[3];const c=i==="sideBySide";let g,p,y,f,v,I;if(t[4]!==c||t[5]!==x?(g=s.jsxs("div",{className:"flex flex-row gap-1 items-center",children:[d,s.jsx("input",{type:"checkbox",name:"chartPosition",id:"chartPosition",onClick:x,defaultChecked:c,className:"h-3 cursor-pointer"})]}),t[4]=c,t[5]=x,t[6]=g):g=t[6],t[7]!==a?(p=s.jsx(oe,{dataTestId:"clear-traces-button",onClick:a}),t[7]=a,t[8]=p):p=t[8],t[9]!==g||t[10]!==p?(y=s.jsxs("div",{className:"flex flex-row justify-end gap-3",children:[g,p]}),t[9]=g,t[10]=p,t[11]=y):y=t[11],t[12]!==i||t[13]!==o||t[14]!==e||t[15]!==r||t[16]!==l){let h;t[18]!==i||t[19]!==o||t[20]!==r||t[21]!==l?(h=(S,n)=>{const j=r.get(S);if(j)return s.jsx(z,{run:j,isExpanded:o.get(j.runId),isMostRecentRun:n===0,chartPosition:i,theme:l},j.runId)},t[18]=i,t[19]=o,t[20]=r,t[21]=l,t[22]=h):h=t[22],f=e.map(h),t[12]=i,t[13]=o,t[14]=e,t[15]=r,t[16]=l,t[17]=f}else f=t[17];return t[23]!==f?(v=s.jsx("div",{className:"flex flex-col gap-3",children:f}),t[23]=f,t[24]=v):v=t[24],t[25]!==y||t[26]!==v?(I=s.jsxs("div",{className:"py-1 px-2 overflow-y-scroll",children:[y,v]}),t[25]=y,t[26]=v,t[27]=I):I=t[27],I},L=Q.lazy(()=>W(()=>import("./index-B725LHBp.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url).then(t=>({default:t.Vega}))),M=t=>{const e=N.c(10),{ref:r,width:o}=ce(),a=o===void 0?300:o,l=t.theme==="dark"?"dark":void 0,i=a-50;let u,m;return e[0]!==t.height||e[1]!==t.signalListeners||e[2]!==t.vegaSpec||e[3]!==l||e[4]!==i?(u=s.jsx(k.Suspense,{children:s.jsx(L,{spec:t.vegaSpec,theme:l,width:i,height:t.height,signalListeners:t.signalListeners,actions:!1})}),e[0]=t.height,e[1]=t.signalListeners,e[2]=t.vegaSpec,e[3]=l,e[4]=i,e[5]=u):u=e[5],e[6]!==t.className||e[7]!==r||e[8]!==u?(m=s.jsx("div",{className:t.className,ref:r,children:u}),e[6]=t.className,e[7]=r,e[8]=u,e[9]=m):m=e[9],m},z=({run:t,isMostRecentRun:e,chartPosition:r,isExpanded:o,theme:a})=>{const l=X(E),i=(o=o??e)?re:se,u=s.jsx(i,{height:16,className:"inline"}),m=s.jsxs("span",{className:"text-sm cursor-pointer",onClick:()=>{l(x=>{const d=new Map(x);return d.set(t.runId,!o),d})},children:["Run - ",q(t.runStartTime),u]});return o?s.jsx(B,{run:t,chartPosition:r,theme:a,title:m},t.runId):s.jsx("div",{className:"flex flex-col",children:s.jsx("pre",{className:"font-mono font-semibold",children:m})},t.runId)},B=t=>{const e=N.c(32),{run:r,chartPosition:o,theme:a,title:l}=t,[i,u]=k.useState();let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m={[C]:(S,n)=>{var _;const j=n,b=(_=j.cell)==null?void 0:_[0];u(b??null)}},e[0]=m):m=e[0];const x=m,d=Z();let c,g;if(e[1]!==d||e[2]!==o||e[3]!==r.cellRuns||e[4]!==r.runId||e[5]!==a){const S=[...r.cellRuns.values()].map(n=>{const j=n.elapsedTime??0;return{cell:n.cellId,cellNum:d.inOrderIds.indexOf(n.cellId),startTimestamp:w(n.startTime),endTimestamp:w(n.startTime+j),elapsedTime:V(1e3*j),status:n.status}});c=`hiddenInputElement-${r.runId}`,g=de(function(n,j,b,_){return{$schema:"https://vega.github.io/schema/vega-lite/v5.json",background:_==="dark"?"black":void 0,mark:{type:"bar",cornerRadius:2},params:[{name:$,bind:{element:`#${j}`}},{name:C,select:{type:"point",on:"mouseover",fields:["cell"],clear:"mouseout"}}],height:{step:b==="above"?21:26},encoding:{y:{field:"cellNum",scale:{paddingInner:.2},sort:{field:R},title:"cell",axis:b==="sideBySide"?null:void 0},x:{field:R,type:"temporal",axis:{orient:"top",title:null}},x2:{field:P,type:"temporal"},tooltip:[{field:R,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"Start"},{field:P,type:"temporal",timeUnit:"hoursminutessecondsmilliseconds",title:"End"}],size:{value:{expr:`${$} == toString(datum.cell) ? 19.5 : 18`}},color:{field:"status",scale:{domain:["success","error"],range:["#37BE5F","red"]},legend:null}},data:{values:n},config:{view:{stroke:"transparent"}}}}(S,c,o,a)),e[1]=d,e[2]=o,e[3]=r.cellRuns,e[4]=r.runId,e[5]=a,e[6]=c,e[7]=g}else c=e[6],g=e[7];const p=g.spec;let y;e[8]!==c||e[9]!==i||e[10]!==r?(y=s.jsx(H,{run:r,hoveredCellId:i,hiddenInputElementId:c}),e[8]=c,e[9]=i,e[10]=r,e[11]=y):y=e[11];const f=y;if(o==="above"){let S,n,j;return e[12]!==a||e[13]!==p?(S=s.jsx(M,{vegaSpec:p,height:120,signalListeners:x,theme:a}),e[12]=a,e[13]=p,e[14]=S):S=e[14],e[15]!==S||e[16]!==l||e[17]!==f?(n=s.jsxs("pre",{className:"font-mono font-semibold",children:[l,S,f]}),e[15]=S,e[16]=l,e[17]=f,e[18]=n):n=e[18],e[19]!==r.runId||e[20]!==n?(j=s.jsx("div",{className:"flex flex-col",children:n},r.runId),e[19]=r.runId,e[20]=n,e[21]=j):j=e[21],j}let v,I,h;return e[22]!==l||e[23]!==f?(v=s.jsxs("pre",{className:"font-mono font-semibold",children:[l,f]}),e[22]=l,e[23]=f,e[24]=v):v=e[24],e[25]!==a||e[26]!==p?(I=s.jsx(M,{className:"-mt-0.5 flex-1",vegaSpec:p,height:100,signalListeners:x,theme:a}),e[25]=a,e[26]=p,e[27]=I):I=e[27],e[28]!==r.runId||e[29]!==v||e[30]!==I?(h=s.jsxs("div",{className:"flex flex-row",children:[v,I]},r.runId),e[28]=r.runId,e[29]=v,e[30]=I,e[31]=h):h=e[31],h},H=t=>{const e=N.c(12),{run:r,hoveredCellId:o,hiddenInputElementId:a}=t,l=k.useRef(null);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=p=>{l.current&&(l.current.value=String(p),l.current.dispatchEvent(new Event("input",{bubbles:!0})))},e[0]=i):i=e[0];const u=i,m=o||"";let x,d,c,g;return e[1]!==a||e[2]!==m?(x=s.jsx("input",{type:"text",id:a,defaultValue:m,hidden:!0,ref:l}),e[1]=a,e[2]=m,e[3]=x):x=e[3],e[4]!==r.cellRuns?(d=[...r.cellRuns.values()],e[4]=r.cellRuns,e[5]=d):d=e[5],e[6]!==o||e[7]!==d?(c=d.map(p=>s.jsx(F,{cellRun:p,hovered:p.cellId===o,dispatchHoverEvent:u},p.cellId)),e[6]=o,e[7]=d,e[8]=c):c=e[8],e[9]!==x||e[10]!==c?(g=s.jsxs("div",{className:"text-xs mt-0.5 ml-3 flex flex-col gap-0.5",children:[x,c]}),e[9]=x,e[10]=c,e[11]=g):g=e[11],g},D={success:s.jsx(me,{color:"green",size:14}),running:s.jsx(fe,{color:"var(--blue-10)",size:14}),error:s.jsx(ie,{color:"red",size:14}),queued:s.jsx(Y,{color:"grey",size:14})},F=t=>{const e=N.c(39),{cellRun:r,hovered:o,dispatchHoverEvent:a}=t;let l;e[0]!==r.elapsedTime?(l=r.elapsedTime?V(1e3*r.elapsedTime):"-",e[0]=r.elapsedTime,e[1]=l):l=e[1];const i=l;let u;e[2]!==r.elapsedTime||e[3]!==i?(u=r.elapsedTime?s.jsxs("span",{children:["This cell took ",s.jsx(ne,{elapsedTime:i})," to run"]}):s.jsx("span",{children:"This cell has not been run"}),e[2]=r.elapsedTime,e[3]=i,e[4]=u):u=e[4];const m=u;let x;e[5]!==r.cellId||e[6]!==a?(x=()=>{a(r.cellId)},e[5]=r.cellId,e[6]=a,e[7]=x):x=e[7];const d=x;let c;e[8]!==a?(c=()=>{a(null)},e[8]=a,e[9]=c):c=e[9];const g=c,p=o&&"bg-[var(--gray-3)] opacity-100";let y,f,v,I,h,S,n;e[10]!==p?(y=ee("flex flex-row gap-2 py-1 px-1 opacity-70 hover:bg-[var(--gray-3)] hover:opacity-100",p),e[10]=p,e[11]=y):y=e[11],e[12]!==r.startTime?(f=q(r.startTime),e[12]=r.startTime,e[13]=f):f=e[13],e[14]!==f?(v=s.jsxs("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:["[",f,"]"]}),e[14]=f,e[15]=v):v=e[15],e[16]!==r.cellId?(I=s.jsxs("span",{className:"text-[var(--gray-10)] w-16",children:["(",s.jsx(te,{cellId:r.cellId}),")"]}),e[16]=r.cellId,e[17]=I):I=e[17],e[18]!==r.code?(h=s.jsx("span",{className:"w-40 truncate -ml-1",children:r.code}),e[18]=r.code,e[19]=h):h=e[19],e[20]!==i?(S=s.jsx("span",{className:"text-[var(--gray-10)] dark:text-[var(--gray-11)]",children:i}),e[20]=i,e[21]=S):S=e[21],e[22]!==m||e[23]!==S?(n=s.jsx(A,{content:m,children:S}),e[22]=m,e[23]=S,e[24]=n):n=e[24];const j=D[r.status];let b,_,T;return e[25]!==r.status||e[26]!==j?(b=s.jsx(A,{content:r.status,children:j}),e[25]=r.status,e[26]=j,e[27]=b):b=e[27],e[28]!==n||e[29]!==b?(_=s.jsxs("div",{className:"flex flex-row gap-1 w-16 justify-end -ml-2",children:[n,b]}),e[28]=n,e[29]=b,e[30]=_):_=e[30],e[31]!==d||e[32]!==g||e[33]!==h||e[34]!==_||e[35]!==y||e[36]!==v||e[37]!==I?(T=s.jsxs("div",{className:y,onMouseEnter:d,onMouseLeave:g,children:[v,I,h,_]}),e[31]=d,e[32]=g,e[33]=h,e[34]=_,e[35]=y,e[36]=v,e[37]=I,e[38]=T):T=e[38],T},w=function(t){try{const e=new Date(1e3*t),r=e.getFullYear(),o=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),l=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),u=String(e.getSeconds()).padStart(2,"0");return`${r}-${o}-${a} ${l}:${i}:${u}.${String(e.getMilliseconds()).padStart(3,"0")}`}catch{return""}}});export{U as Tracing,ve as __tla,w as formatChartTime};
|
@@ -1 +1 @@
|
|
1
|
-
import{dv as it,dw as ot,dx as ut,dy as st,dz as V,dA as at,dB as X,dC as lt,dD as ct,dE as ft}from"./index-l_wokygA.js";function j(t,n,e){var r=new it;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var D="http://www.w3.org/1999/xhtml";const H={svg:"http://www.w3.org/2000/svg",xhtml:D,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function T(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),H.hasOwnProperty(n)?{space:H[n],local:t}:t}function ht(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===D&&n.documentElement.namespaceURI===D?n.createElement(t):n.createElementNS(e,t)}}function pt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function I(t){var n=T(t);return(n.local?pt:ht)(n)}function _t(){}function M(t){return t==null?_t:function(){return this.querySelector(t)}}function vt(){return[]}function R(t){return t==null?vt:function(){return this.querySelectorAll(t)}}function dt(t){return function(){return(n=t.apply(this,arguments))==null?[]:Array.isArray(n)?n:Array.from(n);var n}}function U(t){return function(){return this.matches(t)}}function Y(t){return function(n){return n.matches(t)}}var yt=Array.prototype.find;function mt(){return this.firstElementChild}var gt=Array.prototype.filter;function wt(){return Array.from(this.children)}function $(t){return new Array(t.length)}function L(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function At(t,n,e,r,i,u){for(var s,o=0,l=n.length,a=u.length;o<a;++o)(s=n[o])?(s.__data__=u[o],r[o]=s):e[o]=new L(t,u[o]);for(;o<l;++o)(s=n[o])&&(i[o]=s)}function xt(t,n,e,r,i,u,s){var o,l,a,c=new Map,f=n.length,h=u.length,p=new Array(f);for(o=0;o<f;++o)(l=n[o])&&(p[o]=a=s.call(l,l.__data__,o,n)+"",c.has(a)?i[o]=l:c.set(a,l));for(o=0;o<h;++o)a=s.call(t,u[o],o,u)+"",(l=c.get(a))?(r[o]=l,l.__data__=u[o],c.delete(a)):e[o]=new L(t,u[o]);for(o=0;o<f;++o)(l=n[o])&&c.get(p[o])===l&&(i[o]=l)}function bt(t){return t.__data__}function Et(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function St(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Nt(t){return function(){this.removeAttribute(t)}}function Ct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kt(t,n){return function(){this.setAttribute(t,n)}}function Pt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Tt(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Lt(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function F(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Bt(t){return function(){this.style.removeProperty(t)}}function Dt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Mt(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function C(t,n){return t.style.getPropertyValue(n)||F(t).getComputedStyle(t,null).getPropertyValue(n)}function qt(t){return function(){delete this[t]}}function Ot(t,n){return function(){this[t]=n}}function zt(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function G(t){return t.trim().split(/^|\s+/)}function q(t){return t.classList||new J(t)}function J(t){this._node=t,this._names=G(t.getAttribute("class")||"")}function K(t,n){for(var e=q(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Q(t,n){for(var e=q(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Vt(t){return function(){K(this,t)}}function Xt(t){return function(){Q(this,t)}}function jt(t,n){return function(){(n.apply(this,arguments)?K:Q)(this,t)}}function Ht(){this.textContent=""}function It(t){return function(){this.textContent=t}}function Rt(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function Ut(){this.innerHTML=""}function Yt(t){return function(){this.innerHTML=t}}function $t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function Ft(){this.nextSibling&&this.parentNode.appendChild(this)}function Gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jt(){return null}function Kt(){var t=this.parentNode;t&&t.removeChild(this)}function Qt(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Wt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Zt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r<u;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function tn(t,n,e){return function(){var r,i=this.__on,u=function(l){return function(a){l.call(this,a,this.__data__)}}(n);if(i){for(var s=0,o=i.length;s<o;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=u,r.options=e),void(r.value=n)}this.addEventListener(t.type,u,e),r={type:t.type,name:t.name,value:n,listener:u,options:e},i?i.push(r):this.__on=[r]}}function W(t,n,e){var r=F(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function nn(t,n){return function(){return W(this,t,n)}}function en(t,n){return function(){return W(this,t,n.apply(this,arguments))}}L.prototype={constructor:L,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},J.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Z=[null];function g(t,n){this._groups=t,this._parents=n}function k(){return new g([[document.documentElement]],Z)}function rn(t){return typeof t=="string"?new g([[document.querySelector(t)]],[document.documentElement]):new g([[t]],Z)}g.prototype=k.prototype={constructor:g,select:function(t){typeof t!="function"&&(t=M(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s,o=n[i],l=o.length,a=r[i]=new Array(l),c=0;c<l;++c)(u=o[c])&&(s=t.call(u,u.__data__,c,o))&&("__data__"in u&&(s.__data__=u.__data__),a[c]=s);return new g(r,this._parents)},selectAll:function(t){t=typeof t=="function"?dt(t):R(t);for(var n=this._groups,e=n.length,r=[],i=[],u=0;u<e;++u)for(var s,o=n[u],l=o.length,a=0;a<l;++a)(s=o[a])&&(r.push(t.call(s,s.__data__,a,o)),i.push(s));return new g(r,i)},selectChild:function(t){return this.select(t==null?mt:function(n){return function(){return yt.call(this.children,n)}}(typeof t=="function"?t:Y(t)))},selectChildren:function(t){return this.selectAll(t==null?wt:function(n){return function(){return gt.call(this.children,n)}}(typeof t=="function"?t:Y(t)))},filter:function(t){typeof t!="function"&&(t=U(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s=n[i],o=s.length,l=r[i]=[],a=0;a<o;++a)(u=s[a])&&t.call(u,u.__data__,a,s)&&l.push(u);return new g(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,bt);var e,r=n?xt:At,i=this._parents,u=this._groups;typeof t!="function"&&(e=t,t=function(){return e});for(var s=u.length,o=new Array(s),l=new Array(s),a=new Array(s),c=0;c<s;++c){var f=i[c],h=u[c],p=h.length,_=Et(t.call(f,f&&f.__data__,c,i)),y=_.length,m=l[c]=new Array(y),d=o[c]=new Array(y);r(f,h,m,d,a[c]=new Array(p),_,n);for(var x,S,v=0,P=0;v<y;++v)if(x=m[v]){for(v>=P&&(P=v+1);!(S=d[P])&&++P<y;);x._next=S||null}}return(o=new g(o,i))._enter=l,o._exit=a,o},enter:function(){return new g(this._enter||this._groups.map($),this._parents)},exit:function(){return new g(this._exit||this._groups.map($),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,u=this.exit();return typeof t=="function"?(r=t(r))&&(r=r.selection()):r=r.append(t+""),n!=null&&(i=n(i))&&(i=i.selection()),e==null?u.remove():e(u),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,u=r.length,s=Math.min(i,u),o=new Array(i),l=0;l<s;++l)for(var a,c=e[l],f=r[l],h=c.length,p=o[l]=new Array(h),_=0;_<h;++_)(a=c[_]||f[_])&&(p[_]=a);for(;l<i;++l)o[l]=e[l];return new g(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],u=i.length-1,s=i[u];--u>=0;)(r=i[u])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function n(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}t||(t=St);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u<r;++u){for(var s,o=e[u],l=o.length,a=i[u]=new Array(l),c=0;c<l;++c)(s=o[c])&&(a[c]=s);a.sort(n)}return new g(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,u=r.length;i<u;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,u=n[e],s=0,o=u.length;s<o;++s)(i=u[s])&&t.call(i,i.__data__,s,u);return this},attr:function(t,n){var e=T(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Ct:Nt:typeof n=="function"?e.local?Lt:Tt:e.local?Pt:kt)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((n==null?Bt:typeof n=="function"?Mt:Dt)(t,n,e??"")):C(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((n==null?qt:typeof n=="function"?zt:Ot)(t,n)):this.node()[t]},classed:function(t,n){var e=G(t+"");if(arguments.length<2){for(var r=q(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?jt:n?Vt:Xt)(e,n))},text:function(t){return arguments.length?this.each(t==null?Ht:(typeof t=="function"?Rt:It)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(t==null?Ut:(typeof t=="function"?$t:Yt)(t)):this.node().innerHTML},raise:function(){return this.each(Ft)},lower:function(){return this.each(Gt)},append:function(t){var n=typeof t=="function"?t:I(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e=typeof t=="function"?t:I(t),r=n==null?Jt:typeof n=="function"?n:M(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Kt)},clone:function(t){return this.select(t?Wt:Qt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,u=function(f){return f.trim().split(/^|\s+/).map(function(h){var p="",_=h.indexOf(".");return _>=0&&(p=h.slice(_+1),h=h.slice(0,_)),{type:h,name:p}})}(t+""),s=u.length;if(!(arguments.length<2)){for(o=n?tn:Zt,r=0;r<s;++r)this.each(o(u[r],n,e));return this}var o=this.node().__on;if(o){for(var l,a=0,c=o.length;a<c;++a)for(r=0,l=o[a];r<s;++r)if((i=u[r]).type===l.type&&i.name===l.name)return l.value}},dispatch:function(t,n){return this.each((typeof n=="function"?en:nn)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],u=0,s=i.length;u<s;++u)(r=i[u])&&(yield r)}};var on=ut("start","end","cancel","interrupt"),un=[];function B(t,n,e,r,i,u){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};(function(o,l,a){var c,f=o.__transition;function h(m){a.state=1,a.timer.restart(p,a.delay,a.time),a.delay<=m&&p(m-a.delay)}function p(m){var d,x,S,v;if(a.state!==1)return y();for(d in f)if((v=f[d]).name===a.name){if(v.state===3)return j(p);v.state===4?(v.state=6,v.timer.stop(),v.on.call("interrupt",o,o.__data__,v.index,v.group),delete f[d]):+d<l&&(v.state=6,v.timer.stop(),v.on.call("cancel",o,o.__data__,v.index,v.group),delete f[d])}if(j(function(){a.state===3&&(a.state=4,a.timer.restart(_,a.delay,a.time),_(m))}),a.state=2,a.on.call("start",o,o.__data__,a.index,a.group),a.state===2){for(a.state=3,c=new Array(S=a.tween.length),d=0,x=-1;d<S;++d)(v=a.tween[d].value.call(o,o.__data__,a.index,a.group))&&(c[++x]=v);c.length=x+1}}function _(m){for(var d=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(y),a.state=5,1),x=-1,S=c.length;++x<S;)c[x].call(o,d);a.state===5&&(a.on.call("end",o,o.__data__,a.index,a.group),y())}function y(){for(var m in a.state=6,a.timer.stop(),delete f[l],f)return;delete o.__transition}f[l]=a,a.timer=ot(h,0,a.time)})(t,e,{name:n,index:r,group:i,on,tween:un,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:0})}function O(t,n){var e=w(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function A(t,n){var e=w(t,n);if(e.state>3)throw new Error("too late; already running");return e}function w(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function tt(t,n){var e,r,i,u=t.__transition,s=!0;if(u){for(i in n=n==null?null:n+"",u)(e=u[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete u[i]):s=!1;s&&delete t.__transition}}function sn(t,n){var e,r;return function(){var i=A(this,t),u=i.tween;if(u!==e){for(var s=0,o=(r=e=u).length;s<o;++s)if(r[s].name===n){(r=r.slice()).splice(s,1);break}}i.tween=r}}function an(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var u=A(this,t),s=u.tween;if(s!==r){i=(r=s).slice();for(var o={name:n,value:e},l=0,a=i.length;l<a;++l)if(i[l].name===n){i[l]=o;break}l===a&&i.push(o)}u.tween=i}}function z(t,n,e){var r=t._id;return t.each(function(){var i=A(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return w(i,r).value[n]}}function nt(t,n){var e;return(typeof n=="number"?st:n instanceof X?V:(e=X(n))?(n=e,V):at)(t,n)}function ln(t){return function(){this.removeAttribute(t)}}function cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fn(t,n,e){var r,i,u=e+"";return function(){var s=this.getAttribute(t);return s===u?null:s===r?i:i=n(r=s,e)}}function hn(t,n,e){var r,i,u=e+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===u?null:s===r?i:i=n(r=s,e)}}function pn(t,n,e){var r,i,u;return function(){var s,o,l=e(this);if(l!=null)return(s=this.getAttribute(t))===(o=l+"")?null:s===r&&o===i?u:(i=o,u=n(r=s,l));this.removeAttribute(t)}}function _n(t,n,e){var r,i,u;return function(){var s,o,l=e(this);if(l!=null)return(s=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:s===r&&o===i?u:(i=o,u=n(r=s,l));this.removeAttributeNS(t.space,t.local)}}function vn(t,n){var e,r;function i(){var u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&function(s,o){return function(l){this.setAttributeNS(s.space,s.local,o.call(this,l))}}(t,u)),e}return i._value=n,i}function dn(t,n){var e,r;function i(){var u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&function(s,o){return function(l){this.setAttribute(s,o.call(this,l))}}(t,u)),e}return i._value=n,i}function yn(t,n){return function(){O(this,t).delay=+n.apply(this,arguments)}}function mn(t,n){return n=+n,function(){O(this,t).delay=n}}function gn(t,n){return function(){A(this,t).duration=+n.apply(this,arguments)}}function wn(t,n){return n=+n,function(){A(this,t).duration=n}}var An=k.prototype.constructor;function et(t){return function(){this.style.removeProperty(t)}}var xn=0;function b(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function rt(){return++xn}var E=k.prototype;b.prototype={constructor:b,select:function(t){var n=this._name,e=this._id;typeof t!="function"&&(t=M(t));for(var r=this._groups,i=r.length,u=new Array(i),s=0;s<i;++s)for(var o,l,a=r[s],c=a.length,f=u[s]=new Array(c),h=0;h<c;++h)(o=a[h])&&(l=t.call(o,o.__data__,h,a))&&("__data__"in o&&(l.__data__=o.__data__),f[h]=l,B(f[h],n,e,h,f,w(o,e)));return new b(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;typeof t!="function"&&(t=R(t));for(var r=this._groups,i=r.length,u=[],s=[],o=0;o<i;++o)for(var l,a=r[o],c=a.length,f=0;f<c;++f)if(l=a[f]){for(var h,p=t.call(l,l.__data__,f,a),_=w(l,e),y=0,m=p.length;y<m;++y)(h=p[y])&&B(h,n,e,y,p,_);u.push(p),s.push(l)}return new b(u,s,n,e)},selectChild:E.selectChild,selectChildren:E.selectChildren,filter:function(t){typeof t!="function"&&(t=U(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s=n[i],o=s.length,l=r[i]=[],a=0;a<o;++a)(u=s[a])&&t.call(u,u.__data__,a,s)&&l.push(u);return new b(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,u=Math.min(r,i),s=new Array(r),o=0;o<u;++o)for(var l,a=n[o],c=e[o],f=a.length,h=s[o]=new Array(f),p=0;p<f;++p)(l=a[p]||c[p])&&(h[p]=l);for(;o<r;++o)s[o]=n[o];return new b(s,this._parents,this._name,this._id)},selection:function(){return new An(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=rt(),r=this._groups,i=r.length,u=0;u<i;++u)for(var s,o=r[u],l=o.length,a=0;a<l;++a)if(s=o[a]){var c=w(s,n);B(s,t,e,a,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new b(r,this._parents,t,e)},call:E.call,nodes:E.nodes,node:E.node,size:E.size,empty:E.empty,each:E.each,on:function(t,n){var e=this._id;return arguments.length<2?w(this.node(),e).on.on(t):this.each(function(r,i,u){var s,o,l=function(a){return(a+"").trim().split(/^|\s+/).every(function(c){var f=c.indexOf(".");return f>=0&&(c=c.slice(0,f)),!c||c==="start"})}(i)?O:A;return function(){var a=l(this,r),c=a.on;c!==s&&(o=(s=c).copy()).on(i,u),a.on=o}}(e,t,n))},attr:function(t,n){var e=T(t),r=e==="transform"?lt:nt;return this.attrTween(t,typeof n=="function"?(e.local?_n:pn)(e,r,z(this,"attr."+t,n)):n==null?(e.local?cn:ln)(e):(e.local?hn:fn)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=T(t);return this.tween(e,(r.local?vn:dn)(r,n))},style:function(t,n,e){var r=(t+="")=="transform"?ct:nt;return n==null?this.styleTween(t,function(i,u){var s,o,l;return function(){var a=C(this,i),c=(this.style.removeProperty(i),C(this,i));return a===c?null:a===s&&c===o?l:l=u(s=a,o=c)}}(t,r)).on("end.style."+t,et(t)):typeof n=="function"?this.styleTween(t,function(i,u,s){var o,l,a;return function(){var c=C(this,i),f=s(this),h=f+"";return f==null&&(this.style.removeProperty(i),h=f=C(this,i)),c===h?null:c===o&&h===l?a:(l=h,a=u(o=c,f))}}(t,r,z(this,"style."+t,n))).each(function(i,u){var s,o,l,a,c="style."+u,f="end."+c;return function(){var h=A(this,i),p=h.on,_=h.value[c]==null?a||(a=et(u)):void 0;p===s&&l===_||(o=(s=p).copy()).on(f,l=_),h.on=o}}(this._id,t)):this.styleTween(t,function(i,u,s){var o,l,a=s+"";return function(){var c=C(this,i);return c===a?null:c===o?l:l=u(o=c,s)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,function(i,u,s){var o,l;function a(){var c=u.apply(this,arguments);return c!==l&&(o=(l=c)&&function(f,h,p){return function(_){this.style.setProperty(f,h.call(this,_),p)}}(i,c,s)),o}return a._value=u,a}(t,n,e??""))},text:function(t){return this.tween("text",typeof t=="function"?function(n){return function(){var e=n(this);this.textContent=e??""}}(z(this,"text",t)):function(n){return function(){this.textContent=n}}(t==null?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,function(e){var r,i;function u(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&function(o){return function(l){this.textContent=o.call(this,l)}}(s)),r}return u._value=e,u}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=w(this.node(),e).tween,u=0,s=i.length;u<s;++u)if((r=i[u]).name===t)return r.value;return null}return this.each((n==null?sn:an)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?yn:mn)(n,t)):w(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?gn:wn)(n,t)):w(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(e,r){if(typeof r!="function")throw new Error;return function(){A(this,e).ease=r}}(n,t)):w(this.node(),n).ease},easeVarying:function(t){if(typeof t!="function")throw new Error;return this.each(function(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;A(this,n).ease=r}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(u,s){var o={value:s},l={value:function(){--i===0&&u()}};e.each(function(){var a=A(this,r),c=a.on;c!==t&&((n=(t=c).copy())._.cancel.push(o),n._.interrupt.push(o),n._.end.push(l)),a.on=n}),i===0&&u()})},[Symbol.iterator]:E[Symbol.iterator]};var bn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function En(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function N(t,n,e){this.k=t,this.x=n,this.y=e}k.prototype.interrupt=function(t){return this.each(function(){tt(this,t)})},k.prototype.transition=function(t){var n,e;t instanceof b?(n=t._id,t=t._name):(n=rt(),(e=bn).time=ft(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,u=0;u<i;++u)for(var s,o=r[u],l=o.length,a=0;a<l;++a)(s=o[a])&&B(s,t,n,a,o,e||En(s,n));return new b(r,this._parents,t,n)},N.prototype={constructor:N,scale:function(t){return t===1?this:new N(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new N(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Sn=new N(1,0,0);N.prototype;export{N as T,tt as a,Sn as i,rn as s};
|
1
|
+
import{dv as it,dw as ot,dx as ut,dy as st,dz as V,dA as at,dB as X,dC as lt,dD as ct,dE as ft}from"./index-jgUiUrDR.js";function j(t,n,e){var r=new it;return n=n==null?0:+n,r.restart(i=>{r.stop(),t(i+n)},n,e),r}var D="http://www.w3.org/1999/xhtml";const H={svg:"http://www.w3.org/2000/svg",xhtml:D,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function T(t){var n=t+="",e=n.indexOf(":");return e>=0&&(n=t.slice(0,e))!=="xmlns"&&(t=t.slice(e+1)),H.hasOwnProperty(n)?{space:H[n],local:t}:t}function ht(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===D&&n.documentElement.namespaceURI===D?n.createElement(t):n.createElementNS(e,t)}}function pt(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function I(t){var n=T(t);return(n.local?pt:ht)(n)}function _t(){}function M(t){return t==null?_t:function(){return this.querySelector(t)}}function vt(){return[]}function R(t){return t==null?vt:function(){return this.querySelectorAll(t)}}function dt(t){return function(){return(n=t.apply(this,arguments))==null?[]:Array.isArray(n)?n:Array.from(n);var n}}function U(t){return function(){return this.matches(t)}}function Y(t){return function(n){return n.matches(t)}}var yt=Array.prototype.find;function mt(){return this.firstElementChild}var gt=Array.prototype.filter;function wt(){return Array.from(this.children)}function $(t){return new Array(t.length)}function L(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}function At(t,n,e,r,i,u){for(var s,o=0,l=n.length,a=u.length;o<a;++o)(s=n[o])?(s.__data__=u[o],r[o]=s):e[o]=new L(t,u[o]);for(;o<l;++o)(s=n[o])&&(i[o]=s)}function xt(t,n,e,r,i,u,s){var o,l,a,c=new Map,f=n.length,h=u.length,p=new Array(f);for(o=0;o<f;++o)(l=n[o])&&(p[o]=a=s.call(l,l.__data__,o,n)+"",c.has(a)?i[o]=l:c.set(a,l));for(o=0;o<h;++o)a=s.call(t,u[o],o,u)+"",(l=c.get(a))?(r[o]=l,l.__data__=u[o],c.delete(a)):e[o]=new L(t,u[o]);for(o=0;o<f;++o)(l=n[o])&&c.get(p[o])===l&&(i[o]=l)}function bt(t){return t.__data__}function Et(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function St(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function Nt(t){return function(){this.removeAttribute(t)}}function Ct(t){return function(){this.removeAttributeNS(t.space,t.local)}}function kt(t,n){return function(){this.setAttribute(t,n)}}function Pt(t,n){return function(){this.setAttributeNS(t.space,t.local,n)}}function Tt(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttribute(t):this.setAttribute(t,e)}}function Lt(t,n){return function(){var e=n.apply(this,arguments);e==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,e)}}function F(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Bt(t){return function(){this.style.removeProperty(t)}}function Dt(t,n,e){return function(){this.style.setProperty(t,n,e)}}function Mt(t,n,e){return function(){var r=n.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,e)}}function C(t,n){return t.style.getPropertyValue(n)||F(t).getComputedStyle(t,null).getPropertyValue(n)}function qt(t){return function(){delete this[t]}}function Ot(t,n){return function(){this[t]=n}}function zt(t,n){return function(){var e=n.apply(this,arguments);e==null?delete this[t]:this[t]=e}}function G(t){return t.trim().split(/^|\s+/)}function q(t){return t.classList||new J(t)}function J(t){this._node=t,this._names=G(t.getAttribute("class")||"")}function K(t,n){for(var e=q(t),r=-1,i=n.length;++r<i;)e.add(n[r])}function Q(t,n){for(var e=q(t),r=-1,i=n.length;++r<i;)e.remove(n[r])}function Vt(t){return function(){K(this,t)}}function Xt(t){return function(){Q(this,t)}}function jt(t,n){return function(){(n.apply(this,arguments)?K:Q)(this,t)}}function Ht(){this.textContent=""}function It(t){return function(){this.textContent=t}}function Rt(t){return function(){var n=t.apply(this,arguments);this.textContent=n??""}}function Ut(){this.innerHTML=""}function Yt(t){return function(){this.innerHTML=t}}function $t(t){return function(){var n=t.apply(this,arguments);this.innerHTML=n??""}}function Ft(){this.nextSibling&&this.parentNode.appendChild(this)}function Gt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Jt(){return null}function Kt(){var t=this.parentNode;t&&t.removeChild(this)}function Qt(){var t=this.cloneNode(!1),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Wt(){var t=this.cloneNode(!0),n=this.parentNode;return n?n.insertBefore(t,this.nextSibling):t}function Zt(t){return function(){var n=this.__on;if(n){for(var e,r=0,i=-1,u=n.length;r<u;++r)e=n[r],t.type&&e.type!==t.type||e.name!==t.name?n[++i]=e:this.removeEventListener(e.type,e.listener,e.options);++i?n.length=i:delete this.__on}}}function tn(t,n,e){return function(){var r,i=this.__on,u=function(l){return function(a){l.call(this,a,this.__data__)}}(n);if(i){for(var s=0,o=i.length;s<o;++s)if((r=i[s]).type===t.type&&r.name===t.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=u,r.options=e),void(r.value=n)}this.addEventListener(t.type,u,e),r={type:t.type,name:t.name,value:n,listener:u,options:e},i?i.push(r):this.__on=[r]}}function W(t,n,e){var r=F(t),i=r.CustomEvent;typeof i=="function"?i=new i(n,e):(i=r.document.createEvent("Event"),e?(i.initEvent(n,e.bubbles,e.cancelable),i.detail=e.detail):i.initEvent(n,!1,!1)),t.dispatchEvent(i)}function nn(t,n){return function(){return W(this,t,n)}}function en(t,n){return function(){return W(this,t,n.apply(this,arguments))}}L.prototype={constructor:L,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},J.prototype={add:function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var n=this._names.indexOf(t);n>=0&&(this._names.splice(n,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var Z=[null];function g(t,n){this._groups=t,this._parents=n}function k(){return new g([[document.documentElement]],Z)}function rn(t){return typeof t=="string"?new g([[document.querySelector(t)]],[document.documentElement]):new g([[t]],Z)}g.prototype=k.prototype={constructor:g,select:function(t){typeof t!="function"&&(t=M(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s,o=n[i],l=o.length,a=r[i]=new Array(l),c=0;c<l;++c)(u=o[c])&&(s=t.call(u,u.__data__,c,o))&&("__data__"in u&&(s.__data__=u.__data__),a[c]=s);return new g(r,this._parents)},selectAll:function(t){t=typeof t=="function"?dt(t):R(t);for(var n=this._groups,e=n.length,r=[],i=[],u=0;u<e;++u)for(var s,o=n[u],l=o.length,a=0;a<l;++a)(s=o[a])&&(r.push(t.call(s,s.__data__,a,o)),i.push(s));return new g(r,i)},selectChild:function(t){return this.select(t==null?mt:function(n){return function(){return yt.call(this.children,n)}}(typeof t=="function"?t:Y(t)))},selectChildren:function(t){return this.selectAll(t==null?wt:function(n){return function(){return gt.call(this.children,n)}}(typeof t=="function"?t:Y(t)))},filter:function(t){typeof t!="function"&&(t=U(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s=n[i],o=s.length,l=r[i]=[],a=0;a<o;++a)(u=s[a])&&t.call(u,u.__data__,a,s)&&l.push(u);return new g(r,this._parents)},data:function(t,n){if(!arguments.length)return Array.from(this,bt);var e,r=n?xt:At,i=this._parents,u=this._groups;typeof t!="function"&&(e=t,t=function(){return e});for(var s=u.length,o=new Array(s),l=new Array(s),a=new Array(s),c=0;c<s;++c){var f=i[c],h=u[c],p=h.length,_=Et(t.call(f,f&&f.__data__,c,i)),y=_.length,m=l[c]=new Array(y),d=o[c]=new Array(y);r(f,h,m,d,a[c]=new Array(p),_,n);for(var x,S,v=0,P=0;v<y;++v)if(x=m[v]){for(v>=P&&(P=v+1);!(S=d[P])&&++P<y;);x._next=S||null}}return(o=new g(o,i))._enter=l,o._exit=a,o},enter:function(){return new g(this._enter||this._groups.map($),this._parents)},exit:function(){return new g(this._exit||this._groups.map($),this._parents)},join:function(t,n,e){var r=this.enter(),i=this,u=this.exit();return typeof t=="function"?(r=t(r))&&(r=r.selection()):r=r.append(t+""),n!=null&&(i=n(i))&&(i=i.selection()),e==null?u.remove():e(u),r&&i?r.merge(i).order():i},merge:function(t){for(var n=t.selection?t.selection():t,e=this._groups,r=n._groups,i=e.length,u=r.length,s=Math.min(i,u),o=new Array(i),l=0;l<s;++l)for(var a,c=e[l],f=r[l],h=c.length,p=o[l]=new Array(h),_=0;_<h;++_)(a=c[_]||f[_])&&(p[_]=a);for(;l<i;++l)o[l]=e[l];return new g(o,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,n=-1,e=t.length;++n<e;)for(var r,i=t[n],u=i.length-1,s=i[u];--u>=0;)(r=i[u])&&(s&&4^r.compareDocumentPosition(s)&&s.parentNode.insertBefore(r,s),s=r);return this},sort:function(t){function n(f,h){return f&&h?t(f.__data__,h.__data__):!f-!h}t||(t=St);for(var e=this._groups,r=e.length,i=new Array(r),u=0;u<r;++u){for(var s,o=e[u],l=o.length,a=i[u]=new Array(l),c=0;c<l;++c)(s=o[c])&&(a[c]=s);a.sort(n)}return new g(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r=t[n],i=0,u=r.length;i<u;++i){var s=r[i];if(s)return s}return null},size:function(){let t=0;for(const n of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var n=this._groups,e=0,r=n.length;e<r;++e)for(var i,u=n[e],s=0,o=u.length;s<o;++s)(i=u[s])&&t.call(i,i.__data__,s,u);return this},attr:function(t,n){var e=T(t);if(arguments.length<2){var r=this.node();return e.local?r.getAttributeNS(e.space,e.local):r.getAttribute(e)}return this.each((n==null?e.local?Ct:Nt:typeof n=="function"?e.local?Lt:Tt:e.local?Pt:kt)(e,n))},style:function(t,n,e){return arguments.length>1?this.each((n==null?Bt:typeof n=="function"?Mt:Dt)(t,n,e??"")):C(this.node(),t)},property:function(t,n){return arguments.length>1?this.each((n==null?qt:typeof n=="function"?zt:Ot)(t,n)):this.node()[t]},classed:function(t,n){var e=G(t+"");if(arguments.length<2){for(var r=q(this.node()),i=-1,u=e.length;++i<u;)if(!r.contains(e[i]))return!1;return!0}return this.each((typeof n=="function"?jt:n?Vt:Xt)(e,n))},text:function(t){return arguments.length?this.each(t==null?Ht:(typeof t=="function"?Rt:It)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(t==null?Ut:(typeof t=="function"?$t:Yt)(t)):this.node().innerHTML},raise:function(){return this.each(Ft)},lower:function(){return this.each(Gt)},append:function(t){var n=typeof t=="function"?t:I(t);return this.select(function(){return this.appendChild(n.apply(this,arguments))})},insert:function(t,n){var e=typeof t=="function"?t:I(t),r=n==null?Jt:typeof n=="function"?n:M(n);return this.select(function(){return this.insertBefore(e.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Kt)},clone:function(t){return this.select(t?Wt:Qt)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,n,e){var r,i,u=function(f){return f.trim().split(/^|\s+/).map(function(h){var p="",_=h.indexOf(".");return _>=0&&(p=h.slice(_+1),h=h.slice(0,_)),{type:h,name:p}})}(t+""),s=u.length;if(!(arguments.length<2)){for(o=n?tn:Zt,r=0;r<s;++r)this.each(o(u[r],n,e));return this}var o=this.node().__on;if(o){for(var l,a=0,c=o.length;a<c;++a)for(r=0,l=o[a];r<s;++r)if((i=u[r]).type===l.type&&i.name===l.name)return l.value}},dispatch:function(t,n){return this.each((typeof n=="function"?en:nn)(t,n))},[Symbol.iterator]:function*(){for(var t=this._groups,n=0,e=t.length;n<e;++n)for(var r,i=t[n],u=0,s=i.length;u<s;++u)(r=i[u])&&(yield r)}};var on=ut("start","end","cancel","interrupt"),un=[];function B(t,n,e,r,i,u){var s=t.__transition;if(s){if(e in s)return}else t.__transition={};(function(o,l,a){var c,f=o.__transition;function h(m){a.state=1,a.timer.restart(p,a.delay,a.time),a.delay<=m&&p(m-a.delay)}function p(m){var d,x,S,v;if(a.state!==1)return y();for(d in f)if((v=f[d]).name===a.name){if(v.state===3)return j(p);v.state===4?(v.state=6,v.timer.stop(),v.on.call("interrupt",o,o.__data__,v.index,v.group),delete f[d]):+d<l&&(v.state=6,v.timer.stop(),v.on.call("cancel",o,o.__data__,v.index,v.group),delete f[d])}if(j(function(){a.state===3&&(a.state=4,a.timer.restart(_,a.delay,a.time),_(m))}),a.state=2,a.on.call("start",o,o.__data__,a.index,a.group),a.state===2){for(a.state=3,c=new Array(S=a.tween.length),d=0,x=-1;d<S;++d)(v=a.tween[d].value.call(o,o.__data__,a.index,a.group))&&(c[++x]=v);c.length=x+1}}function _(m){for(var d=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(y),a.state=5,1),x=-1,S=c.length;++x<S;)c[x].call(o,d);a.state===5&&(a.on.call("end",o,o.__data__,a.index,a.group),y())}function y(){for(var m in a.state=6,a.timer.stop(),delete f[l],f)return;delete o.__transition}f[l]=a,a.timer=ot(h,0,a.time)})(t,e,{name:n,index:r,group:i,on,tween:un,time:u.time,delay:u.delay,duration:u.duration,ease:u.ease,timer:null,state:0})}function O(t,n){var e=w(t,n);if(e.state>0)throw new Error("too late; already scheduled");return e}function A(t,n){var e=w(t,n);if(e.state>3)throw new Error("too late; already running");return e}function w(t,n){var e=t.__transition;if(!e||!(e=e[n]))throw new Error("transition not found");return e}function tt(t,n){var e,r,i,u=t.__transition,s=!0;if(u){for(i in n=n==null?null:n+"",u)(e=u[i]).name===n?(r=e.state>2&&e.state<5,e.state=6,e.timer.stop(),e.on.call(r?"interrupt":"cancel",t,t.__data__,e.index,e.group),delete u[i]):s=!1;s&&delete t.__transition}}function sn(t,n){var e,r;return function(){var i=A(this,t),u=i.tween;if(u!==e){for(var s=0,o=(r=e=u).length;s<o;++s)if(r[s].name===n){(r=r.slice()).splice(s,1);break}}i.tween=r}}function an(t,n,e){var r,i;if(typeof e!="function")throw new Error;return function(){var u=A(this,t),s=u.tween;if(s!==r){i=(r=s).slice();for(var o={name:n,value:e},l=0,a=i.length;l<a;++l)if(i[l].name===n){i[l]=o;break}l===a&&i.push(o)}u.tween=i}}function z(t,n,e){var r=t._id;return t.each(function(){var i=A(this,r);(i.value||(i.value={}))[n]=e.apply(this,arguments)}),function(i){return w(i,r).value[n]}}function nt(t,n){var e;return(typeof n=="number"?st:n instanceof X?V:(e=X(n))?(n=e,V):at)(t,n)}function ln(t){return function(){this.removeAttribute(t)}}function cn(t){return function(){this.removeAttributeNS(t.space,t.local)}}function fn(t,n,e){var r,i,u=e+"";return function(){var s=this.getAttribute(t);return s===u?null:s===r?i:i=n(r=s,e)}}function hn(t,n,e){var r,i,u=e+"";return function(){var s=this.getAttributeNS(t.space,t.local);return s===u?null:s===r?i:i=n(r=s,e)}}function pn(t,n,e){var r,i,u;return function(){var s,o,l=e(this);if(l!=null)return(s=this.getAttribute(t))===(o=l+"")?null:s===r&&o===i?u:(i=o,u=n(r=s,l));this.removeAttribute(t)}}function _n(t,n,e){var r,i,u;return function(){var s,o,l=e(this);if(l!=null)return(s=this.getAttributeNS(t.space,t.local))===(o=l+"")?null:s===r&&o===i?u:(i=o,u=n(r=s,l));this.removeAttributeNS(t.space,t.local)}}function vn(t,n){var e,r;function i(){var u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&function(s,o){return function(l){this.setAttributeNS(s.space,s.local,o.call(this,l))}}(t,u)),e}return i._value=n,i}function dn(t,n){var e,r;function i(){var u=n.apply(this,arguments);return u!==r&&(e=(r=u)&&function(s,o){return function(l){this.setAttribute(s,o.call(this,l))}}(t,u)),e}return i._value=n,i}function yn(t,n){return function(){O(this,t).delay=+n.apply(this,arguments)}}function mn(t,n){return n=+n,function(){O(this,t).delay=n}}function gn(t,n){return function(){A(this,t).duration=+n.apply(this,arguments)}}function wn(t,n){return n=+n,function(){A(this,t).duration=n}}var An=k.prototype.constructor;function et(t){return function(){this.style.removeProperty(t)}}var xn=0;function b(t,n,e,r){this._groups=t,this._parents=n,this._name=e,this._id=r}function rt(){return++xn}var E=k.prototype;b.prototype={constructor:b,select:function(t){var n=this._name,e=this._id;typeof t!="function"&&(t=M(t));for(var r=this._groups,i=r.length,u=new Array(i),s=0;s<i;++s)for(var o,l,a=r[s],c=a.length,f=u[s]=new Array(c),h=0;h<c;++h)(o=a[h])&&(l=t.call(o,o.__data__,h,a))&&("__data__"in o&&(l.__data__=o.__data__),f[h]=l,B(f[h],n,e,h,f,w(o,e)));return new b(u,this._parents,n,e)},selectAll:function(t){var n=this._name,e=this._id;typeof t!="function"&&(t=R(t));for(var r=this._groups,i=r.length,u=[],s=[],o=0;o<i;++o)for(var l,a=r[o],c=a.length,f=0;f<c;++f)if(l=a[f]){for(var h,p=t.call(l,l.__data__,f,a),_=w(l,e),y=0,m=p.length;y<m;++y)(h=p[y])&&B(h,n,e,y,p,_);u.push(p),s.push(l)}return new b(u,s,n,e)},selectChild:E.selectChild,selectChildren:E.selectChildren,filter:function(t){typeof t!="function"&&(t=U(t));for(var n=this._groups,e=n.length,r=new Array(e),i=0;i<e;++i)for(var u,s=n[i],o=s.length,l=r[i]=[],a=0;a<o;++a)(u=s[a])&&t.call(u,u.__data__,a,s)&&l.push(u);return new b(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var n=this._groups,e=t._groups,r=n.length,i=e.length,u=Math.min(r,i),s=new Array(r),o=0;o<u;++o)for(var l,a=n[o],c=e[o],f=a.length,h=s[o]=new Array(f),p=0;p<f;++p)(l=a[p]||c[p])&&(h[p]=l);for(;o<r;++o)s[o]=n[o];return new b(s,this._parents,this._name,this._id)},selection:function(){return new An(this._groups,this._parents)},transition:function(){for(var t=this._name,n=this._id,e=rt(),r=this._groups,i=r.length,u=0;u<i;++u)for(var s,o=r[u],l=o.length,a=0;a<l;++a)if(s=o[a]){var c=w(s,n);B(s,t,e,a,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new b(r,this._parents,t,e)},call:E.call,nodes:E.nodes,node:E.node,size:E.size,empty:E.empty,each:E.each,on:function(t,n){var e=this._id;return arguments.length<2?w(this.node(),e).on.on(t):this.each(function(r,i,u){var s,o,l=function(a){return(a+"").trim().split(/^|\s+/).every(function(c){var f=c.indexOf(".");return f>=0&&(c=c.slice(0,f)),!c||c==="start"})}(i)?O:A;return function(){var a=l(this,r),c=a.on;c!==s&&(o=(s=c).copy()).on(i,u),a.on=o}}(e,t,n))},attr:function(t,n){var e=T(t),r=e==="transform"?lt:nt;return this.attrTween(t,typeof n=="function"?(e.local?_n:pn)(e,r,z(this,"attr."+t,n)):n==null?(e.local?cn:ln)(e):(e.local?hn:fn)(e,r,n))},attrTween:function(t,n){var e="attr."+t;if(arguments.length<2)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;var r=T(t);return this.tween(e,(r.local?vn:dn)(r,n))},style:function(t,n,e){var r=(t+="")=="transform"?ct:nt;return n==null?this.styleTween(t,function(i,u){var s,o,l;return function(){var a=C(this,i),c=(this.style.removeProperty(i),C(this,i));return a===c?null:a===s&&c===o?l:l=u(s=a,o=c)}}(t,r)).on("end.style."+t,et(t)):typeof n=="function"?this.styleTween(t,function(i,u,s){var o,l,a;return function(){var c=C(this,i),f=s(this),h=f+"";return f==null&&(this.style.removeProperty(i),h=f=C(this,i)),c===h?null:c===o&&h===l?a:(l=h,a=u(o=c,f))}}(t,r,z(this,"style."+t,n))).each(function(i,u){var s,o,l,a,c="style."+u,f="end."+c;return function(){var h=A(this,i),p=h.on,_=h.value[c]==null?a||(a=et(u)):void 0;p===s&&l===_||(o=(s=p).copy()).on(f,l=_),h.on=o}}(this._id,t)):this.styleTween(t,function(i,u,s){var o,l,a=s+"";return function(){var c=C(this,i);return c===a?null:c===o?l:l=u(o=c,s)}}(t,r,n),e).on("end.style."+t,null)},styleTween:function(t,n,e){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(n==null)return this.tween(r,null);if(typeof n!="function")throw new Error;return this.tween(r,function(i,u,s){var o,l;function a(){var c=u.apply(this,arguments);return c!==l&&(o=(l=c)&&function(f,h,p){return function(_){this.style.setProperty(f,h.call(this,_),p)}}(i,c,s)),o}return a._value=u,a}(t,n,e??""))},text:function(t){return this.tween("text",typeof t=="function"?function(n){return function(){var e=n(this);this.textContent=e??""}}(z(this,"text",t)):function(n){return function(){this.textContent=n}}(t==null?"":t+""))},textTween:function(t){var n="text";if(arguments.length<1)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;return this.tween(n,function(e){var r,i;function u(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&function(o){return function(l){this.textContent=o.call(this,l)}}(s)),r}return u._value=e,u}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var n=this.parentNode;for(var e in this.__transition)if(+e!==t)return;n&&n.removeChild(this)}}(this._id))},tween:function(t,n){var e=this._id;if(t+="",arguments.length<2){for(var r,i=w(this.node(),e).tween,u=0,s=i.length;u<s;++u)if((r=i[u]).name===t)return r.value;return null}return this.each((n==null?sn:an)(e,t,n))},delay:function(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?yn:mn)(n,t)):w(this.node(),n).delay},duration:function(t){var n=this._id;return arguments.length?this.each((typeof t=="function"?gn:wn)(n,t)):w(this.node(),n).duration},ease:function(t){var n=this._id;return arguments.length?this.each(function(e,r){if(typeof r!="function")throw new Error;return function(){A(this,e).ease=r}}(n,t)):w(this.node(),n).ease},easeVarying:function(t){if(typeof t!="function")throw new Error;return this.each(function(n,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;A(this,n).ease=r}}(this._id,t))},end:function(){var t,n,e=this,r=e._id,i=e.size();return new Promise(function(u,s){var o={value:s},l={value:function(){--i===0&&u()}};e.each(function(){var a=A(this,r),c=a.on;c!==t&&((n=(t=c).copy())._.cancel.push(o),n._.interrupt.push(o),n._.end.push(l)),a.on=n}),i===0&&u()})},[Symbol.iterator]:E[Symbol.iterator]};var bn={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};function En(t,n){for(var e;!(e=t.__transition)||!(e=e[n]);)if(!(t=t.parentNode))throw new Error(`transition ${n} not found`);return e}function N(t,n,e){this.k=t,this.x=n,this.y=e}k.prototype.interrupt=function(t){return this.each(function(){tt(this,t)})},k.prototype.transition=function(t){var n,e;t instanceof b?(n=t._id,t=t._name):(n=rt(),(e=bn).time=ft(),t=t==null?null:t+"");for(var r=this._groups,i=r.length,u=0;u<i;++u)for(var s,o=r[u],l=o.length,a=0;a<l;++a)(s=o[a])&&B(s,t,n,a,o,e||En(s,n));return new b(r,this._parents,t,n)},N.prototype={constructor:N,scale:function(t){return t===1?this:new N(this.k*t,this.x,this.y)},translate:function(t,n){return t===0&n===0?this:new N(this.k,this.x+this.k*t,this.y+this.k*n)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Sn=new N(1,0,0);N.prototype;export{N as T,tt as a,Sn as i,rn as s};
|
@@ -1 +1 @@
|
|
1
|
-
import{aQ as Z,aR as F,c as E,aS as W,aT as $,aU as D,j as g,E as G,$ as C,Y as j,aV as K,aW as I,aX as R,L as _,aY as V,aZ as Y,a_ as q,a$ as Q,b0 as U,ab as X,b1 as B}from"./index-
|
1
|
+
import{aQ as Z,aR as F,c as E,aS as W,aT as $,aU as D,j as g,E as G,$ as C,Y as j,aV as K,aW as I,aX as R,L as _,aY as V,aZ as Y,a_ as q,a$ as Q,b0 as U,ab as X,b1 as B}from"./index-jgUiUrDR.js";import{M as y}from"./compile-BkD0vkR5.js";import{a as J}from"./VegaLite-Byuc9HjF.js";import"./index-CfektYKc.js";const L=new Set(["boxplot","errorband","errorbar"]),S={getMarkType(e){const t=typeof e=="string"?e:e.type;if(L.has(t))throw new Error("Not supported");return t},isInteractive(e){const t=typeof e=="string"?e:e.type;return!L.has(t)},makeClickable(e){const t=typeof e=="string"?e:e.type;return t in y?typeof e=="string"?{type:e,cursor:"pointer",tooltip:!0}:{...e,type:t,cursor:"pointer",tooltip:!0}:e},getOpacity:e=>typeof e=="string"?null:"opacity"in e&&typeof e.opacity=="number"?e.opacity:null},ee=new Set(["color","fill","fillOpacity","opacity","shape","size"]);function te(e,t,r,i){const u={and:r.map(d=>({param:d}))};if(e==="opacity"){const d=S.getOpacity(i)||1;return{...t,opacity:{condition:{test:u,value:d},value:d/5}}}return t}const w={point:e=>e==null?"select_point":`select_point_${e}`,interval:e=>e==null?"select_interval":`select_interval_${e}`,legendSelection:e=>`legend_selection_${e}`,HIGHLIGHT:"highlight",PAN_ZOOM:"pan_zoom",hasPoint:e=>e.some(t=>t.startsWith("select_point")),hasInterval:e=>e.some(t=>t.startsWith("select_interval")),hasLegend:e=>e.some(t=>t.startsWith("legend_selection")),hasPanZoom:e=>e.some(t=>t.startsWith("pan_zoom"))},P={highlight:()=>({name:w.HIGHLIGHT,select:{type:"point",on:"mouseover"}}),interval:(e,t)=>({name:w.interval(t),select:{type:"interval",encodings:T(e),mark:{fill:"#669EFF",fillOpacity:.07,stroke:"#669EFF",strokeOpacity:.4},on:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]",translate:"[mousedown[!event.metaKey], mouseup] > mousemove[!event.metaKey]"}}),point:(e,t)=>({name:w.point(t),select:{type:"point",encodings:T(e),on:"click[!event.metaKey]"}}),legend:e=>({name:w.legendSelection(e),select:{type:"point",fields:[e]},bind:"legend"}),panZoom:()=>({name:w.PAN_ZOOM,bind:"scales",select:{type:"interval",on:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",translate:"[mousedown[event.metaKey], window:mouseup] > window:mousemove!",zoom:"wheel![event.metaKey]"}})};function T(e){switch(S.getMarkType(e.mark)){case y.image:case y.trail:return;case y.area:case y.arc:return["color"];case y.bar:{const t=function(r){var d,l;if(!r||!("mark"in r))return;const i=(d=r.encoding)==null?void 0:d.x,u=(l=r.encoding)==null?void 0:l.y;if(i&&"type"in i&&i.type==="nominal")return"vertical";if(u&&"type"in u&&u.type==="nominal"||i&&"aggregate"in i)return"horizontal";if(u&&"aggregate"in u)return"vertical"}(e);return t==="horizontal"?["y"]:t==="vertical"?["x"]:void 0}case y.circle:case y.geoshape:case y.line:case y.point:case y.rect:case y.rule:case y.square:case y.text:case y.tick:return["x","y"]}}function z(e){return"params"in e&&e.params&&e.params.length>0?e.params.filter(t=>t!=null&&"select"in t&&t.select!==void 0).map(t=>t.name):"layer"in e?[...new Set(e.layer.flatMap(z))]:[]}function ae(e,t){var f,v;let{chartSelection:r=!0,fieldSelection:i=!0}=t;if(!r&&!i)return e;if(((f=e.params)==null?void 0:f.some(c=>c.bind==="legend"))&&(i=!1),((v=e.params)==null?void 0:v.some(c=>!c.bind))&&(r=!1),"vconcat"in e){const c=e.vconcat.map(o=>"mark"in o?O(o):o);return{...e,vconcat:c}}if("hconcat"in e){const c=e.hconcat.map(o=>"mark"in o?O(o):o);return{...e,hconcat:c}}if("layer"in e){const c=e.layer.map((o,p)=>{if(!("mark"in o))return o;let s=o;return s=A(s,r,p),s=O(s),p===0&&(s=H(s)),s});return{...e,layer:c}}if(!("mark"in e)||!S.isInteractive(e.mark))return e;let l=e;return l=function(c,o){if(o===!1)return c;let p=function(h){if(!h||!("encoding"in h))return[];const{encoding:b}=h;return b?Object.entries(b).flatMap(a=>{const[n,m]=a;return m&&ee.has(n)?"field"in m&&typeof m.field=="string"?[m.field]:"condition"in m&&m.condition&&typeof m.condition=="object"&&"field"in m.condition&&m.condition.field&&typeof m.condition.field=="string"?[m.condition.field]:[]:[]}):[]}(c);Array.isArray(o)&&(p=p.filter(h=>o.includes(h)));const s=p.map(h=>P.legend(h)),x=[...c.params||[],...s];return{...c,params:x}}(l,i),l=A(l,r,void 0),l=O(l),l=H(l),l}function A(e,t,r){if(t===!1)return e;let i;try{i=S.getMarkType(e.mark)}catch{return e}if(i==="geoshape")return e;const u=t===!0?function(f){switch(f){case"arc":case"area":return["point"];case"text":case"bar":default:return["point","interval"];case"line":return}}(i):[t];if(!u)return e;const d=u.map(f=>f==="interval"?P.interval(e,r):P.point(e,r)),l=[...e.params||[],...d];return{...e,params:l}}function H(e){let t;try{t=S.getMarkType(e.mark)}catch{}if(t==="geoshape")return e;const r=e.params||[];return r.some(i=>i.bind==="scales")?e:{...e,params:[...r,P.panZoom()]}}function O(e){const t="encoding"in e?e.encoding:void 0,r=e.params||[],i=r.map(u=>u.name);return r.length===0?e:S.isInteractive(e.mark)?{...e,mark:S.makeClickable(e.mark),encoding:te("opacity",t||{},i,e.mark)}:e}$("arrow",D);const ne=e=>{const t=E.c(11),{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:l}=e;let f,v;t[0]!==l?(f=async()=>async function(s){if(!s)return s;const x="datasets"in s?{...s.datasets}:{},h=async a=>{if(!a)return a;if("layer"in a){const k=await Promise.all(a.layer.map(h));a={...a,layer:k}}if("hconcat"in a){const k=await Promise.all(a.hconcat.map(h));a={...a,hconcat:k}}if("vconcat"in a){const k=await Promise.all(a.vconcat.map(h));a={...a,vconcat:k}}if("spec"in a&&(a={...a,spec:await h(a.spec)}),!a.data||!("url"in a.data))return a;let n;try{n=Z(a.data.url)}catch{return a}const m=await F(n.href,a.data.format);return x[n.pathname]=m,{...a,data:{name:n.pathname}}},b=await h(s);return Object.keys(x).length===0?b:{...b,datasets:x}}(l),v=[l],t[0]=l,t[1]=f,t[2]=v):(f=t[1],v=t[2]);const{data:c,error:o}=W(f,v);if(o){let s;return t[3]!==o?(s=g.jsx(G,{error:o}),t[3]=o,t[4]=s):s=t[4],s}if(!c)return null;let p;return t[5]!==u||t[6]!==d||t[7]!==c||t[8]!==i||t[9]!==r?(p=g.jsx(re,{value:r,setValue:i,chartSelection:u,fieldSelection:d,spec:c}),t[5]=u,t[6]=d,t[7]=c,t[8]=i,t[9]=r,t[10]=p):p=t[10],p},re=({value:e,setValue:t,chartSelection:r,fieldSelection:i,spec:u})=>{const{theme:d}=C(),l=j.useRef(void 0),[f,v]=j.useState(),c=K(u),o=j.useMemo(()=>ae(function(n){return n.data&&"url"in n.data&&(n.data.url=Z(n.data.url).href),n}(c),{chartSelection:r,fieldSelection:i}),[c,r,i]),p=j.useMemo(()=>z(o),[o]),s=I(n=>{t({...e,...n})}),x=K(p),h=j.useMemo(()=>x.reduce((n,m)=>(w.PAN_ZOOM===m||(n[m]=R((k,N)=>{_.debug("[Vega signal]",k,N);let M=V.mapValues(N,se);M=V.mapValues(M,oe),s({[k]:M})},100)),n),{}),[x,s]),b=I(n=>{_.error(n),_.debug(o),v(n)}),a=I(n=>{_.debug("[Vega view] created",n),l.current=n,v(void 0)});return g.jsxs(g.Fragment,{children:[f&&g.jsxs(Y,{variant:"destructive",children:[g.jsx(q,{children:f.message}),g.jsx("div",{className:"text-md",children:f.stack})]}),g.jsxs("div",{className:"relative",onPointerDown:Q.stopPropagation(),children:[g.jsx(J,{spec:o,theme:d==="dark"?"dark":void 0,actions:ie,signalListeners:h,onError:b,onNewView:a}),(()=>{const n=[];return w.hasPoint(p)&&n.push(["Point selection","click to select a point; hold shift for multi-select"]),w.hasInterval(p)&&n.push(["Interval selection","click and drag to select an interval"]),w.hasLegend(p)&&n.push(["Legend selection","click to select a legend item; hold shift for multi-select"]),w.hasPanZoom(p)&&n.push(["Pan","hold the meta key and drag"],["Zoom","hold the meta key and scroll"]),n.length===0?null:g.jsx(X,{delayDuration:300,side:"left",content:g.jsx("div",{className:"text-xs flex flex-col",children:n.map((m,k)=>g.jsxs("div",{children:[g.jsxs("span",{className:"font-bold tracking-wide",children:[m[0],":"]})," ",m[1]]},k))}),children:g.jsx(B,{className:"absolute bottom-1 right-0 m-2 h-4 w-4 cursor-help text-muted-foreground hover:text-foreground"})})})()]})]})},ie={source:!1,compiled:!1};function oe(e){return e instanceof Set?[...e]:e}function se(e){return Array.isArray(e)?e.map(t=>t instanceof Date&&U(t)?new Date(t).getTime():t):e}export{ne as default};
|