@sjcrh/proteinpaint-client 2.63.0 → 2.63.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -7
- package/dist/{2dmaf-70c0b6bb.js → 2dmaf-0cabb4a4.js} +1 -1
- package/dist/{ColorScale-b44d51ef.js → ColorScale-9800a609.js} +1 -1
- package/dist/{DEanalysis-b86d0874.js → DEanalysis-567989ff.js} +1 -1
- package/dist/{Disco-16cd51c0.js → Disco-5d1404ce.js} +1 -1
- package/dist/{Disco.UI-a38a12e6.js → Disco.UI-54228bb6.js} +1 -1
- package/dist/{DragControls-0c173a20.js → DragControls-a05737c2.js} +1 -1
- package/dist/{DziViewer-5c2d68e7.js → DziViewer-3f466d90.js} +2 -2
- package/dist/{FilterRxComp-0e75dd8d.js → FilterRxComp-fc769f34.js} +1 -1
- package/dist/{FilterStateless-ad3df967.js → FilterStateless-8f30f856.js} +1 -1
- package/dist/{HicApp-bcf8330c.js → HicApp-aac413df.js} +1 -1
- package/dist/{OrbitControls-c33cf781.js → OrbitControls-8b7f91ca.js} +1 -1
- package/dist/app-59194db0.js +1 -0
- package/dist/{app-f91922b4.js → app-71453429.js} +1 -1
- package/dist/{app-bfce9bf5.js → app-fb676934.js} +1 -1
- package/dist/app.js +1 -1
- package/dist/{bam-95f36008.js → bam-e7f6baea.js} +1 -1
- package/dist/{barchart-e2af00a8.js → barchart-ef4874c8.js} +1 -1
- package/dist/{barchart.events-272fd122.js → barchart.events-e24facf7.js} +1 -1
- package/dist/{bars.renderer-f0e5af5a.js → bars.renderer-c46d3f44.js} +1 -1
- package/dist/{block-ec76524e.js → block-4f585abe.js} +1 -1
- package/dist/block.lazyload-6f83d057.js +1 -0
- package/dist/{block.legend-f8cad7e4.js → block.legend-cec87c6f.js} +1 -1
- package/dist/{block.mds-20655637.js → block.mds-f5a11c42.js} +1 -1
- package/dist/{block.mds.cnv-5feb86a0.js → block.mds.cnv-25423c1e.js} +1 -1
- package/dist/{block.mds.expressionrank-c7043f35.js → block.mds.expressionrank-fc1996d5.js} +1 -1
- package/dist/{block.mds.expressionstat-4bf457f3.js → block.mds.expressionstat-45b6bf47.js} +1 -1
- package/dist/{block.mds.geneboxplot-132e5fe6.js → block.mds.geneboxplot-037df46d.js} +1 -1
- package/dist/{block.mds.junction-1f9810df.js → block.mds.junction-00161de6.js} +1 -1
- package/dist/{block.mds.svcnv-094c416f.js → block.mds.svcnv-0c257af4.js} +1 -1
- package/dist/{block.mds.svcnv.share-bb976e02.js → block.mds.svcnv.share-c0b9dfad.js} +1 -1
- package/dist/{block.mds2-7045e32c.js → block.mds2-9009f8d8.js} +1 -1
- package/dist/{block.svg-d8d76ba7.js → block.svg-86bbfcb0.js} +1 -1
- package/dist/{block.tk.aicheck-317d04bd.js → block.tk.aicheck-a5697794.js} +1 -1
- package/dist/{block.tk.ase-d1577ec1.js → block.tk.ase-ad1be47c.js} +1 -1
- package/dist/{block.tk.bam-3cdc13a0.js → block.tk.bam-14339d16.js} +1 -1
- package/dist/{block.tk.bedgraphdot-5304e06c.js → block.tk.bedgraphdot-efe19e56.js} +1 -1
- package/dist/{block.tk.bigwig.ui-0c96dce5.js → block.tk.bigwig.ui-a92f286b.js} +1 -1
- package/dist/{block.tk.hicstraw-39d89269.js → block.tk.hicstraw-57fbbe61.js} +1 -1
- package/dist/{block.tk.junction-b45b3a95.js → block.tk.junction-64c39cd5.js} +1 -1
- package/dist/{block.tk.junction.textmatrixui-6ec019e1.js → block.tk.junction.textmatrixui-09e5e02f.js} +1 -1
- package/dist/{block.tk.ld-5c54e58b.js → block.tk.ld-f681d099.js} +1 -1
- package/dist/{block.tk.menu-30a2c3a5.js → block.tk.menu-2563364c.js} +1 -1
- package/dist/{block.tk.pgv-7ff2dfaf.js → block.tk.pgv-9dfc00c0.js} +1 -1
- package/dist/{boxplot-7de25274.js → boxplot-a2e1ace0.js} +1 -1
- package/dist/brainImaging-21701238.js +1 -0
- package/dist/{brush-db0ed33a.js → brush-bb4566a3.js} +1 -1
- package/dist/{categorical-bc309399.js → categorical-a00f4ffc.js} +1 -1
- package/dist/{condition-f0eb2343.js → condition-2034db37.js} +1 -1
- package/dist/{controls-8d4972c8.js → controls-0467d2ec.js} +1 -1
- package/dist/{controls.btns-bad9e4cf.js → controls.btns-ad7b28a2.js} +1 -1
- package/dist/{controls.config-e0f394cb.js → controls.config-6cf816fb.js} +1 -1
- package/dist/{controls.divide-d8ac5a9b.js → controls.divide-3c0d52d7.js} +1 -1
- package/dist/{controls.overlay-3ac8773d.js → controls.overlay-3a55c2ec.js} +1 -1
- package/dist/{controls.term1-008f4be4.js → controls.term1-59f4cd60.js} +1 -1
- package/dist/cuminc-8d21132b.js +1 -0
- package/dist/{customdata.inputui-58cd9b32.js → customdata.inputui-40ba6d7f.js} +1 -1
- package/dist/{dataDownload-91da6dd6.js → dataDownload-bfa92dad.js} +1 -1
- package/dist/{databrowser.ui-c50862e4.js → databrowser.ui-4799f04d.js} +1 -1
- package/dist/{density-7c3f91eb.js → density-4c2b53f6.js} +1 -1
- package/dist/{dictionary-48a38837.js → dictionary-89e860ee.js} +1 -1
- package/dist/{drag-c354e2c6.js → drag-88d451b4.js} +1 -1
- package/dist/{e2pca-3bba91fa.js → e2pca-8a3f2566.js} +1 -1
- package/dist/{ep-144d8973.js → ep-5399c5cc.js} +1 -1
- package/dist/{fusion.parse-ae1253f4.js → fusion.parse-fc25e5bd.js} +1 -1
- package/dist/{geneExpClustering-96d09008.js → geneExpClustering-a916ebda.js} +1 -1
- package/dist/{geneExpression-d6494fd3.js → geneExpression-501e95c0.js} +1 -1
- package/dist/{geneExpression-9ca2da4f.js → geneExpression-9047481a.js} +1 -1
- package/dist/{geneExpression-be9b5da2.js → geneExpression-da4b50f0.js} +1 -1
- package/dist/{geneORA-85850143.js → geneORA-ffb2497e.js} +1 -1
- package/dist/{geneVariant-3df05e0c.js → geneVariant-7ab521d6.js} +1 -1
- package/dist/{geneVariant-3d674865.js → geneVariant-d79431a2.js} +1 -1
- package/dist/{genefusion.ui-3e2a3a73.js → genefusion.ui-3ce190c7.js} +1 -1
- package/dist/{geneset-3b761b2c.js → geneset-3522bcda.js} +1 -1
- package/dist/{genomeBrowser-2105a98f.js → genomeBrowser-9b72eb22.js} +1 -1
- package/dist/{genomeBrowser.controls-f9b9bf42.js → genomeBrowser.controls-bef8bf99.js} +1 -1
- package/dist/{groupsetting-4901d033.js → groupsetting-574ad150.js} +1 -1
- package/dist/{hierCluster-a7ff7f5a.js → hierCluster-3b14b2b3.js} +1 -1
- package/dist/{hierCluster.config-3d124abf.js → hierCluster.config-f8686a30.js} +1 -1
- package/dist/{hierCluster.interactivity-3463cc0b.js → hierCluster.interactivity-3b5f1e81.js} +1 -1
- package/dist/{hierCluster.renderers-668d0075.js → hierCluster.renderers-9f9a7cad.js} +1 -1
- package/dist/{html.legend-3e428f9e.js → html.legend-ef8066dd.js} +1 -1
- package/dist/{imagePlot-6d89200c.js → imagePlot-095b9a92.js} +1 -1
- package/dist/{lasso-393c1570.js → lasso-ef63631b.js} +1 -1
- package/dist/{launch.adhoc-9c59874e.js → launch.adhoc-1b356f97.js} +1 -1
- package/dist/{legacyDataset-26ead9cc.js → legacyDataset-056e9d4c.js} +1 -1
- package/dist/{log-4d74231e.js → log-ca1e2a74.js} +1 -1
- package/dist/{lollipop-59f65024.js → lollipop-6ad9ec3c.js} +1 -1
- package/dist/{maf-72e5b7da.js → maf-dfada1c8.js} +1 -1
- package/dist/{maftimeline-ed8aaae8.js → maftimeline-1b715a01.js} +1 -1
- package/dist/{matrix-3d09a31f.js → matrix-3fae58f8.js} +1 -1
- package/dist/matrix.cells-3620eb3a.js +1 -0
- package/dist/{matrix.cluster-acdfc6a7.js → matrix.cluster-15b8a865.js} +1 -1
- package/dist/{matrix.config-cd01ebbd.js → matrix.config-8247bea5.js} +1 -1
- package/dist/{matrix.controls-86eb8d5c.js → matrix.controls-dea65894.js} +1 -1
- package/dist/{matrix.data-e2d7ac16.js → matrix.data-121a1a8c.js} +1 -1
- package/dist/{matrix.dom-e5f91cc0.js → matrix.dom-83c5fa39.js} +1 -1
- package/dist/{matrix.groups-f1969b5c.js → matrix.groups-2e1202ef.js} +1 -1
- package/dist/{matrix.interactivity-92bc8332.js → matrix.interactivity-2b076155.js} +1 -1
- package/dist/{matrix.layout-29a8f334.js → matrix.layout-8dc54c05.js} +1 -1
- package/dist/{matrix.legend-8c28039e.js → matrix.legend-e0078739.js} +1 -1
- package/dist/matrix.renderers-0c8eddc9.js +1 -0
- package/dist/{matrix.serieses-e079f04a.js → matrix.serieses-2898da6b.js} +1 -1
- package/dist/{matrix.sort-e1f83454.js → matrix.sort-249d4a35.js} +1 -1
- package/dist/{matrix.sorterUi-2025f39d.js → matrix.sorterUi-d26208c8.js} +1 -1
- package/dist/{mavb-37fffd68.js → mavb-9a6fa2e9.js} +1 -1
- package/dist/{mds.fimo-68f0eaf5.js → mds.fimo-ce97371c.js} +1 -1
- package/dist/{mds.samplescatterplot-362f3591.js → mds.samplescatterplot-a54b9e93.js} +1 -1
- package/dist/{mds.survivalplot-f5bda05a.js → mds.survivalplot-c5093f73.js} +1 -1
- package/dist/{mdsjsonform-7f0b6cc7.js → mdsjsonform-09b4e1cb.js} +1 -1
- package/dist/metaboliteIntensity-eeb5ad12.js +1 -0
- package/dist/niceNumLabels-ddb76164.js +1 -0
- package/dist/{nodrag-777a34a5.js → nodrag-bed2488c.js} +1 -1
- package/dist/{numeric-2eb8c25b.js → numeric-d5536b1c.js} +1 -1
- package/dist/numeric.binary-d67da945.js +1 -0
- package/dist/numeric.continuous-9a0c88bc.js +1 -0
- package/dist/numeric.discrete-921f7097.js +1 -0
- package/dist/numeric.spline-649308d5.js +1 -0
- package/dist/{numeric.toggle-5316211b.js → numeric.toggle-52789fd2.js} +1 -1
- package/dist/{oncomatrix-cd9fa01b.js → oncomatrix-6950c48c.js} +1 -1
- package/dist/{parseData-1bfa9946.js → parseData-480d1ff3.js} +1 -1
- package/dist/{plot.2dvaf-1ed153c1.js → plot.2dvaf-1ecc4bbc.js} +1 -1
- package/dist/plot.app-c841507a.js +1 -0
- package/dist/{plot.barplot-61742e94.js → plot.barplot-24140b0f.js} +1 -1
- package/dist/{plot.boxplot-fe966ac3.js → plot.boxplot-87fe8ab2.js} +1 -1
- package/dist/{plot.brainImaging-d2c23bb7.js → plot.brainImaging-325ebded.js} +1 -1
- package/dist/{plot.disco-70d493f4.js → plot.disco-621d1b8e.js} +1 -1
- package/dist/{plot.dzi-14e6fdc4.js → plot.dzi-3a7e478e.js} +1 -1
- package/dist/{plot.ssgq-9d364d41.js → plot.ssgq-1949c207.js} +1 -1
- package/dist/{plot.vaf2cov-4d28015b.js → plot.vaf2cov-d03c6409.js} +1 -1
- package/dist/{profileBarchart-c104f8e2.js → profileBarchart-11755d7c.js} +1 -1
- package/dist/{profileHome-a555583d.js → profileHome-9c5e266b.js} +1 -1
- package/dist/{profilePlot-5ce5b6a0.js → profilePlot-8ee3034a.js} +1 -1
- package/dist/{profilePolar-610213d4.js → profilePolar-9fe70c32.js} +1 -1
- package/dist/{profileRadar-fddb18f7.js → profileRadar-0e744181.js} +1 -1
- package/dist/{profileRadarFacility-2c2db1dd.js → profileRadarFacility-102544c5.js} +1 -1
- package/dist/{recover-a08c8d01.js → recover-b1ec4fed.js} +1 -1
- package/dist/{regression.inputs-5718cf72.js → regression.inputs-ad548745.js} +1 -1
- package/dist/{regression.inputs.values.table-d587c1cf.js → regression.inputs.values.table-1618447a.js} +1 -1
- package/dist/{regression.results-748024be.js → regression.results-25008028.js} +1 -1
- package/dist/{renderPvalueTable-c435aefd.js → renderPvalueTable-46056189.js} +1 -1
- package/dist/sampleScatter-47dd82cb.js +1 -0
- package/dist/{sampleScatter.interactivity-e9c30652.js → sampleScatter.interactivity-cfa3451d.js} +1 -1
- package/dist/{sampleScatter.rendererThree-3e6c032e.js → sampleScatter.rendererThree-c5321d24.js} +2 -2
- package/dist/{sampleView-d6a91293.js → sampleView-30b97c7d.js} +1 -1
- package/dist/{samplelst-821ec148.js → samplelst-2bdc1b9d.js} +1 -1
- package/dist/{samplematrix-7aa0a780.js → samplematrix-4f0ec523.js} +1 -1
- package/dist/{scatter-2e2c76f4.js → scatter-8a337eeb.js} +1 -1
- package/dist/{selectGenomeWithTklst-51cd21a4.js → selectGenomeWithTklst-895106fb.js} +1 -1
- package/dist/{singleCellPlot-c7347a27.js → singleCellPlot-360eaec6.js} +1 -1
- package/dist/{singlecell-a668bb17.js → singlecell-29c1cbb1.js} +1 -1
- package/dist/{singlecell-7c851ef8.js → singlecell-75f8af89.js} +1 -1
- package/dist/{snplocus-fe6f4ba1.js → snplocus-0cafa73c.js} +1 -1
- package/dist/{snplst-751cea95.js → snplst-2284d5ce.js} +1 -1
- package/dist/{spliceevent.a53ss.diagram-b157f95d.js → spliceevent.a53ss.diagram-44ccabf9.js} +1 -1
- package/dist/{spliceevent.exonskip.diagram-071a3467.js → spliceevent.exonskip.diagram-c8d1bdf0.js} +1 -1
- package/dist/spliceevent.exonskip.getdefault-9fe16119.js +1 -0
- package/dist/{spliceevent.noeventdiagram-1c731f35.js → spliceevent.noeventdiagram-5e244090.js} +1 -1
- package/dist/{spliceevent.phrase-7a3bfb00.js → spliceevent.phrase-186eb050.js} +1 -1
- package/dist/{stattable-a7713026.js → stattable-886f7dad.js} +1 -1
- package/dist/{style.gdc-40ec2784.js → style.gdc-4ac9b96b.js} +1 -1
- package/dist/{summary-592d8f81.js → summary-ee2045a5.js} +1 -1
- package/dist/{sunburst-452df940.js → sunburst-bbff8818.js} +1 -1
- package/dist/survival-04e279f8.js +1 -0
- package/dist/{survival-450b6df4.js → survival-d7bd3c6b.js} +1 -1
- package/dist/{svg.download-56529955.js → svg.download-54c99186.js} +1 -1
- package/dist/{svg.legend-c82b153f.js → svg.legend-28652faa.js} +1 -1
- package/dist/{svgraph-3c5cd8d2.js → svgraph-a12d89da.js} +1 -1
- package/dist/{svmr-3dd531ef.js → svmr-248055c8.js} +1 -1
- package/dist/{table-d6c411fd.js → table-1dae543a.js} +1 -1
- package/dist/{table-bf604c50.js → table-b4a61573.js} +1 -1
- package/dist/{termInfo-96285f4a.js → termInfo-4c759483.js} +1 -1
- package/dist/{termsetting-9a7511e6.js → termsetting-636d2271.js} +1 -1
- package/dist/{tk-6a8e5bb0.js → tk-741d4674.js} +1 -1
- package/dist/{tp.ui-221efed6.js → tp.ui-23151bb1.js} +1 -1
- package/dist/{tvs.density-9fdae0cc.js → tvs.density-9fe0c7fd.js} +1 -1
- package/dist/{tvs.geneVariant-149e25b7.js → tvs.geneVariant-1b179327.js} +1 -1
- package/dist/tvs.numeric-b4cfc975.js +1 -0
- package/dist/{tvs.samplelst-a38e9c2b.js → tvs.samplelst-681358bc.js} +1 -1
- package/dist/{uiUtils-a6de7f14.js → uiUtils-74700a01.js} +1 -1
- package/dist/{variantBrowser-05375469.js → variantBrowser-910b4bcd.js} +1 -1
- package/dist/{vcf-58904308.js → vcf-16ba1e06.js} +1 -1
- package/dist/{violin-c1b78717.js → violin-a41b2e2b.js} +1 -1
- package/dist/{violin.interactivity-534d6993.js → violin.interactivity-bcf0ccc2.js} +1 -1
- package/dist/{violin.renderer-16540fb8.js → violin.renderer-149310eb.js} +1 -1
- package/dist/{violinRenderer-688abcb2.js → violinRenderer-71c9f3ab.js} +1 -1
- package/dist/{viridis-d3cf2713.js → viridis-81de7bcd.js} +1 -1
- package/dist/{y-2d48b9e4.js → y-76c7da8c.js} +1 -1
- package/dist/{zoom-2d4ede33.js → zoom-a40839cf.js} +1 -1
- package/package.json +7 -7
- package/dist/app-de19f41c.js +0 -1
- package/dist/block.lazyload-ebd949e4.js +0 -1
- package/dist/brainImaging-007edaa3.js +0 -1
- package/dist/cuminc-72257faf.js +0 -1
- package/dist/matrix.cells-a5157233.js +0 -1
- package/dist/matrix.renderers-3b8dfd04.js +0 -1
- package/dist/metaboliteIntensity-512257f3.js +0 -1
- package/dist/niceNumLabels-8fdc6507.js +0 -1
- package/dist/numeric.binary-0a3b17d2.js +0 -1
- package/dist/numeric.continuous-f77038de.js +0 -1
- package/dist/numeric.discrete-b977e88f.js +0 -1
- package/dist/numeric.spline-d64b1abe.js +0 -1
- package/dist/plot.app-91a1d78d.js +0 -1
- package/dist/sampleScatter-031f47de.js +0 -1
- package/dist/spliceevent.exonskip.getdefault-93feb627.js +0 -1
- package/dist/survival-6a4c4f12.js +0 -1
- package/dist/tvs.numeric-f9ce58bc.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aB as t,aS as e}from"./app-
|
|
1
|
+
import{aB as t,aS as e}from"./app-71453429.js";const i={isVisible:false,term:null};class s{constructor(t){this.vocabApi=t.vocabApi||t.app&&t.app.vocabApi;this.state=Object.assign({},i,t.state?t.state:{});this.api=this;l(this);n(this);this.initUI(t)}async main(t={}){e(this.state,t);this.dom.content_holder.style("display",this.state.isVisible?"block":"none");this.dom.icon_holder.style("background-color",this.state.isVisible?"darkgray":"transparent").style("color",this.state.isVisible?"white":"#797a7a");if(!this.state.isVisible)return;const i=await this.vocabApi.getTermInfo(this.state.term.id);this.render(i)}}const o=t(s);function n(t){t.initUI=function(e){t.dom={content_holder:e.content_holder.style("margin-left","25px").attr("class","term_info_div").style("display",t.state.isVisible?"block":"none").style("white-space","normal").style("padding-bottom","20px"),details:e.content_holder.append("div"),tbody:e.content_holder.append("table").append("tbody"),icon_holder:e.icon_holder.style("margin","1px 0px 1px 5px").style("padding","2px 5px").style("font-family","Times New Roman").style("font-size","14px").style("font-weight","bold").style("cursor","pointer").style("background-color","transparent").style("color","#797a7a").style("align-items","center").style("justify-content","center").style("border","none").style("border-radius","3px").attr("title","Term Information").html("ⓘ").on("mouseenter",(()=>{if(t.state.isVisible==true)return;t.dom.icon_holder.style("color","blue")})).on("mouseleave",(()=>{if(t.state.isVisible==true)return;t.dom.icon_holder.style("color","#797a7a")})).on("click",t.toggleDescription)}};t.render=function(e){t.dom.tbody.selectAll("*").remove();if(e.terminfo.src){for(let i of e.terminfo.src){const e=t.dom.tbody.append("tr").append("td").style("padding","5px 0");e.append("div").style("font-weight","bold").text("Source");e.append("div").style("margin-left","20px").text(i.pub);e.append("div").style("margin-left","20px").html(i.title+": <i>"+i.section+"</i>")}}if(e.terminfo.rubric){const i=t.dom.tbody.append("tr").append("td").style("padding","5px 0").append("div").style("font-weight","bold").text("Grading Rubric").append("ol").style("margin","0px");for(let t of e.terminfo.rubric){i.append("li").style("font-weight","normal").text(t)}}t.dom.details.selectAll("*").remove();if(e.terminfo.description){t.dom.details.append("div").style("padding-top","20px").style("padding-bottom","10px").style("font-weight","bold").text("Description");for(const i of e.terminfo.description){t.renderDetail(i,t.dom.details.append("div").style("padding-bottom","3px"))}}};t.renderDetail=function(e,i){if(Array.isArray(e.value)){i.append("span").html("<i>"+e.label+"</i>");const s=i.append("div").style("padding-left","20px");for(const i of e.value){i.label="- "+i.label;t.renderDetail(i,s.append("div"))}}else{i.html("<i>"+e.label+":"+"</i>"+" "+e.value)}}}function l(t){t.toggleDescription=function(){t.state.isVisible=!t.state.isVisible;t.main({isVisible:t.state.isVisible})}}export{o as termInfoInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{aD as t,aB as e,M as i,aI as n,aS as r,q as s}from"./app-f91922b4.js";import o from"path";import{d as a,T as l}from"./FilterRxComp-0e75dd8d.js";var d=function(t,e){var i=[];for(var n=0;n<t.length;n++){var r=e(t[n],n);if(c(r))i.push.apply(i,r);else i.push(r)}return i};var c=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};var p=u;function u(t,e,i){if(t instanceof RegExp)t=h(t,i);if(e instanceof RegExp)e=h(e,i);var n=f(t,e,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+t.length,n[1]),post:i.slice(n[1]+e.length)}}function h(t,e){var i=e.match(t);return i?i[0]:null}u.range=f;function f(t,e,i){var n,r,s,o,a;var l=i.indexOf(t);var d=i.indexOf(e,l+1);var c=l;if(l>=0&&d>0){if(t===e){return[l,d]}n=[];s=i.length;while(c>=0&&!a){if(c==l){n.push(c);l=i.indexOf(t,c+1)}else if(n.length==1){a=[n.pop(),d]}else{r=n.pop();if(r<s){s=r;o=d}d=i.indexOf(e,c+1)}c=l<d&&l>=0?l:d}if(n.length){a=[s,o]}}return a}var m=_;var v="\0SLASH"+Math.random()+"\0";var b="\0OPEN"+Math.random()+"\0";var y="\0CLOSE"+Math.random()+"\0";var g="\0COMMA"+Math.random()+"\0";var x="\0PERIOD"+Math.random()+"\0";function w(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function j(t){return t.split("\\\\").join(v).split("\\{").join(b).split("\\}").join(y).split("\\,").join(g).split("\\.").join(x)}function k(t){return t.split(v).join("\\").split(b).join("{").split(y).join("}").split(g).join(",").split(x).join(".")}function O(t){if(!t)return[""];var e=[];var i=p("{","}",t);if(!i)return t.split(",");var n=i.pre;var r=i.body;var s=i.post;var o=n.split(",");o[o.length-1]+="{"+r+"}";var a=O(s);if(s.length){o[o.length-1]+=a.shift();o.push.apply(o,a)}e.push.apply(e,o);return e}function _(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return q(j(t),true).map(k)}function A(t){return"{"+t+"}"}function T(t){return/^-?0\d/.test(t)}function E(t,e){return t<=e}function S(t,e){return t>=e}function q(t,e){var i=[];var n=p("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var r=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=r||s;var a=n.body.indexOf(",")>=0;if(!o&&!a){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+y+n.post;return q(t)}return[t]}var l;if(o){l=n.body.split(/\.\./)}else{l=O(n.body);if(l.length===1){l=q(l[0],false).map(A);if(l.length===1){var c=n.post.length?q(n.post,false):[""];return c.map((function(t){return n.pre+l[0]+t}))}}}var u=n.pre;var c=n.post.length?q(n.post,false):[""];var h;if(o){var f=w(l[0]);var m=w(l[1]);var v=Math.max(l[0].length,l[1].length);var b=l.length==3?Math.abs(w(l[2])):1;var g=E;var x=m<f;if(x){b*=-1;g=S}var j=l.some(T);h=[];for(var k=f;g(k,m);k+=b){var _;if(s){_=String.fromCharCode(k);if(_==="\\")_=""}else{_=String(k);if(j){var M=v-_.length;if(M>0){var I=new Array(M+1).join("0");if(k<0)_="-"+I+_.slice(1);else _=I+_}}}h.push(_)}}else{h=d(l,(function(t){return q(t,false)}))}for(var C=0;C<h.length;C++){for(var $=0;$<c.length;$++){var P=u+h[C]+c[$];if(!e||o||P)i.push(P)}}return i}var M=U;U.Minimatch=G;var I=function(){try{return o}catch(t){}}()||{sep:"/"};U.sep=I.sep;var C=U.GLOBSTAR=G.GLOBSTAR={};var $={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var P="[^/]";var N=P+"*?";var R="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var D="(?:(?!(?:\\/|^)\\.).)*?";var V=B("().*{}+?[]^$\\!");function B(t){return t.split("").reduce((function(t,e){t[e]=true;return t}),{})}var L=/\/+/;U.filter=J;function J(t,e){e=e||{};return function(i,n,r){return U(i,t,e)}}function Q(t,e){e=e||{};var i={};Object.keys(t).forEach((function(e){i[e]=t[e]}));Object.keys(e).forEach((function(t){i[t]=e[t]}));return i}U.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return U}var e=U;var i=function i(n,r,s){return e(n,r,Q(t,s))};i.Minimatch=function i(n,r){return new e.Minimatch(n,Q(t,r))};i.Minimatch.defaults=function i(n){return e.defaults(Q(t,n)).Minimatch};i.filter=function i(n,r){return e.filter(n,Q(t,r))};i.defaults=function i(n){return e.defaults(Q(t,n))};i.makeRe=function i(n,r){return e.makeRe(n,Q(t,r))};i.braceExpand=function i(n,r){return e.braceExpand(n,Q(t,r))};i.match=function(i,n,r){return e.match(i,n,Q(t,r))};return i};G.defaults=function(t){return U.defaults(t).Minimatch};function U(t,e,i){X(e);if(!i)i={};if(!i.nocomment&&e.charAt(0)==="#"){return false}return new G(e,i).match(t)}function G(t,e){if(!(this instanceof G)){return new G(t,e)}X(t);if(!e)e={};t=t.trim();if(!e.allowWindowsEscape&&I.sep!=="/"){t=t.split(I.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!e.partial;this.make()}G.prototype.debug=function(){};G.prototype.make=H;function H(){var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(e.debug)this.debug=function t(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(t){return t.split(L)}));this.debug(this.pattern,i);i=i.map((function(t,e,i){return t.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}G.prototype.parseNegate=F;function F(){var t=this.pattern;var e=false;var i=this.options;var n=0;if(i.nonegate)return;for(var r=0,s=t.length;r<s&&t.charAt(r)==="!";r++){e=!e;n++}if(n)this.pattern=t.substr(n);this.negate=e}U.braceExpand=function(t,e){return z(t,e)};G.prototype.braceExpand=z;function z(t,e){if(!e){if(this instanceof G){e=this.options}else{e={}}}t=typeof t==="undefined"?this.pattern:t;X(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return m(t)}var W=1024*64;var X=function(t){if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>W){throw new TypeError("pattern is too long")}};G.prototype.parse=Z;var Y={};function Z(t,e){X(t);var i=this.options;if(t==="**"){if(!i.noglobstar)return C;else t="*"}if(t==="")return"";var n="";var r=!!i.nocase;var s=false;var o=[];var a=[];var l;var d=false;var c=-1;var p=-1;var u=t.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var h=this;function f(){if(l){switch(l){case"*":n+=N;r=true;break;case"?":n+=P;r=true;break;default:n+="\\"+l;break}h.debug("clearStateChar %j %j",l,n);l=false}}for(var m=0,v=t.length,b;m<v&&(b=t.charAt(m));m++){this.debug("%s\t%s %s %j",t,m,n,b);if(s&&V[b]){n+="\\"+b;s=false;continue}switch(b){case"/":{return false}case"\\":f();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,m,n,b);if(d){this.debug(" in class");if(b==="!"&&m===p+1)b="^";n+=b;continue}h.debug("call clearStateChar %j",l);f();l=b;if(i.noext)f();continue;case"(":if(d){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:m-1,reStart:n.length,open:$[l].open,close:$[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(d||!o.length){n+="\\)";continue}f();r=true;var y=o.pop();n+=y.close;if(y.type==="!"){a.push(y)}y.reEnd=n.length;continue;case"|":if(d||!o.length||s){n+="\\|";s=false;continue}f();n+="|";continue;case"[":f();if(d){n+="\\"+b;continue}d=true;p=m;c=n.length;n+=b;continue;case"]":if(m===p+1||!d){n+="\\"+b;s=false;continue}var g=t.substring(p+1,m);try{RegExp("["+g+"]")}catch(t){var x=this.parse(g,Y);n=n.substr(0,c)+"\\["+x[0]+"\\]";r=r||x[1];d=false;continue}r=true;d=false;n+=b;continue;default:f();if(s){s=false}else if(V[b]&&!(b==="^"&&d)){n+="\\"}n+=b}}if(d){g=t.substr(p+1);x=this.parse(g,Y);n=n.substr(0,c)+"\\["+x[0];r=r||x[1]}for(y=o.pop();y;y=o.pop()){var w=n.slice(y.reStart+y.open.length);this.debug("setting tail",n,y);w=w.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,i){if(!i){i="\\"}return e+e+i+"|"}));this.debug("tail=%j\n %s",w,w,y,n);var j=y.type==="*"?N:y.type==="?"?P:"\\"+y.type;r=true;n=n.slice(0,y.reStart)+j+"\\("+w}f();if(s){n+="\\\\"}var k=false;switch(n.charAt(0)){case"[":case".":case"(":k=true}for(var O=a.length-1;O>-1;O--){var _=a[O];var A=n.slice(0,_.reStart);var T=n.slice(_.reStart,_.reEnd-8);var E=n.slice(_.reEnd-8,_.reEnd);var S=n.slice(_.reEnd);E+=S;var q=A.split("(").length-1;var M=S;for(m=0;m<q;m++){M=M.replace(/\)[+*?]?/,"")}S=M;var I="";if(S===""&&e!==Y){I="$"}var R=A+T+S+I+E;n=R}if(n!==""&&r){n="(?=.)"+n}if(k){n=u+n}if(e===Y){return[n,r]}if(!r){return tt(t)}var D=i.nocase?"i":"";try{var B=new RegExp("^"+n+"$",D)}catch(t){return new RegExp("$.")}B._glob=t;B._src=n;return B}U.makeRe=function(t,e){return new G(t,e||{}).makeRe()};G.prototype.makeRe=K;function K(){if(this.regexp||this.regexp===false)return this.regexp;var t=this.set;if(!t.length){this.regexp=false;return this.regexp}var e=this.options;var i=e.noglobstar?N:e.dot?R:D;var n=e.nocase?"i":"";var r=t.map((function(t){return t.map((function(t){return t===C?i:typeof t==="string"?et(t):t._src})).join("\\/")})).join("|");r="^(?:"+r+")$";if(this.negate)r="^(?!"+r+").*$";try{this.regexp=new RegExp(r,n)}catch(t){this.regexp=false}return this.regexp}U.match=function(t,e,i){i=i||{};var n=new G(e,i);t=t.filter((function(t){return n.match(t)}));if(n.options.nonull&&!t.length){t.push(e)}return t};G.prototype.match=function t(e,i){if(typeof i==="undefined")i=this.partial;this.debug("match",e,this.pattern);if(this.comment)return false;if(this.empty)return e==="";if(e==="/"&&i)return true;var n=this.options;if(I.sep!=="/"){e=e.split(I.sep).join("/")}e=e.split(L);this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);var s;var o;for(o=e.length-1;o>=0;o--){s=e[o];if(s)break}for(o=0;o<r.length;o++){var a=r[o];var l=e;if(n.matchBase&&a.length===1){l=[s]}var d=this.matchOne(l,a,i);if(d){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate};G.prototype.matchOne=function(t,e,i){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e});this.debug("matchOne",t.length,e.length);for(var r=0,s=0,o=t.length,a=e.length;r<o&&s<a;r++,s++){this.debug("matchOne loop");var l=e[s];var d=t[r];this.debug(e,l,d);if(l===false)return false;if(l===C){this.debug("GLOBSTAR",[e,l,d]);var c=r;var p=s+1;if(p===a){this.debug("** at the end");for(;r<o;r++){if(t[r]==="."||t[r]===".."||!n.dot&&t[r].charAt(0)===".")return false}return true}while(c<o){var u=t[c];this.debug("\nglobstar while",t,c,e,p,u);if(this.matchOne(t.slice(c),e.slice(p),i)){this.debug("globstar found match!",c,o,u);return true}else{if(u==="."||u===".."||!n.dot&&u.charAt(0)==="."){this.debug("dot detected!",t,c,e,p);break}this.debug("globstar swallow a segment, and continue");c++}}if(i){this.debug("\n>>> no match, partial?",t,c,e,p);if(c===o)return true}return false}var h;if(typeof l==="string"){h=d===l;this.debug("string match",l,d,h)}else{h=d.match(l);this.debug("pattern match",l,d,h)}if(!h)return false}if(r===o&&s===a){return true}else if(r===o){return i}else if(s===a){return r===o-1&&t[r]===""}throw new Error("wtf?")};function tt(t){return t.replace(/\\(.)/g,"$1")}function et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function it(t){switch(t){case"./handlers/categorical.ts":return import("./categorical-bc309399.js");case"./handlers/condition.ts":return import("./condition-f0eb2343.js");case"./handlers/density.ts":return import("./density-7c3f91eb.js");case"./handlers/geneExpression.ts":return import("./geneExpression-be9b5da2.js");case"./handlers/geneVariant.ts":return import("./geneVariant-3d674865.js");case"./handlers/groupsetting.ts":return import("./groupsetting-4901d033.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-512257f3.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-0a3b17d2.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-f77038de.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-b977e88f.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-d64b1abe.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-5316211b.js");case"./handlers/numeric.ts":return import("./numeric-2eb8c25b.js");case"./handlers/samplelst.ts":return import("./samplelst-821ec148.js");case"./handlers/snplocus.ts":return import("./snplocus-fe6f4ba1.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-751cea95.js");case"./handlers/survival.ts":return import("./survival-6a4c4f12.js");default:return new Promise((function(e,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}function nt(t){switch(t){case"./handlers/categorical.ts":return import("./categorical-bc309399.js");case"./handlers/condition.ts":return import("./condition-f0eb2343.js");case"./handlers/density.ts":return import("./density-7c3f91eb.js");case"./handlers/geneExpression.ts":return import("./geneExpression-be9b5da2.js");case"./handlers/geneVariant.ts":return import("./geneVariant-3d674865.js");case"./handlers/groupsetting.ts":return import("./groupsetting-4901d033.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-512257f3.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-0a3b17d2.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-f77038de.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-b977e88f.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-d64b1abe.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-5316211b.js");case"./handlers/numeric.ts":return import("./numeric-2eb8c25b.js");case"./handlers/samplelst.ts":return import("./samplelst-821ec148.js");case"./handlers/snplocus.ts":return import("./snplocus-fe6f4ba1.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-751cea95.js");case"./handlers/survival.ts":return import("./survival-6a4c4f12.js");default:return new Promise((function(e,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}const rt=`_ts_${(+new Date).toString().slice(-8)}`;let st=0;function ot(e){return t(this,void 0,void 0,(function*(){if(!e)return`${st++}${rt}`;delete e.$id;return yield lt(JSON.stringify(e))}))}const at=new TextEncoder;function lt(e){return t(this,void 0,void 0,(function*(){const t=at.encode(e);const i=yield crypto.subtle.digest("SHA-1",t);const n=Array.from(new Uint8Array(i));const r=n.map((t=>t.toString(16).padStart(2,"0"))).join("");return dt(r).replace("=","-")}))}function dt(t){return btoa([...t].reduce(((e,i,n)=>e+=!(n-1&1)?String.fromCharCode(parseInt(t.substring(n-1,n+1),16)):""),""))}const ct={menuOptions:"edit",menuLayout:"vertical"};class pt{constructor(t){this.opts=this.validateOpts(t);this.vocabApi=t.vocabApi;this.activeCohort=t.activeCohort;this.placeholder=t.placeholder;this.durations={exit:0};this.disable_terms=t.disable_terms;this.usecase=t.usecase;this.abbrCutoff=t.abbrCutoff;this.numqByTermIdModeType={};this.dom={holder:t.holder,tip:t.tip||new i({padding:"0px",parent_menu:this.opts.holder&&this.opts.holder.node()&&this.opts.holder.node().closest(".sja_menu_div")})};this.dom.tip2=new i({padding:"0px",parent_menu:this.dom.tip.d.node()});ft(this);ht(this);this.initUI();const e=vt(this);this.handlerByType={default:e};this.handler=e;this.hasError=false;this.api={main:this.main.bind(this),runCallback:this.runCallback.bind(this),showTree:this.showTree,showMenu:this.showMenu.bind(this),showGeneSearch:this.showGeneSearch,hasError:()=>this.hasError,validateQ:t=>{if(!this.handler||!this.handler.validateQ)return;try{this.handler.validateQ(t)}catch(t){this.hasError=true;throw t}}}}runCallback(t=null){var e,i;const s=this.term?{term:this.term,q:this.q,isAtomic:true}:{};if("$id"in this)s.$id=this.$id;if(((e=s.q)===null||e===void 0?void 0:e.reuseId)&&s.q.reuseId===((i=this.data.q)===null||i===void 0?void 0:i.reuseId)){if(!n(s.q,this.data.q)){delete s.q.reuseId;delete s.q.name}}const o=t?JSON.parse(JSON.stringify(t)):{};if(this.opts.callback)this.opts.callback(t?r(JSON.stringify(s),o):s)}validateOpts(t){const e=Object.assign({},ct,t);if(!e.holder&&e.renderAs!="none")throw".holder missing";if(typeof e.callback!="function")throw".callback() is not a function";if(!e.vocabApi)throw".vocabApi missing";if(typeof e.vocabApi!="object");if("placeholder"in e&&!e.placeholder&&"placeholderIcon"in e&&!e.placeholderIcon)throw"must specify a non-empty opts.placeholder and/or .placeholderIcon";if(!("placeholder"in e))e.placeholder="Select term ";if(!("placeholderIcon"in e))e.placeholderIcon="+";if(!Number.isInteger(e.abbrCutoff))e.abbrCutoff=18;this.validateMenuOptions(e);if(!e.numericEditMenuVersion)e.numericEditMenuVersion=["discrete"];this.mayValidate_noTermPromptOptions(e);return e}main(e={}){return t(this,void 0,void 0,(function*(){try{if(this.doNotHideTipInMain){delete this.doNotHideTipInMain}else{this.dom.tip.hide()}this.hasError=false;delete this.error;this.validateMainData(e);this.data=e;this.term=e.term;this.q=JSON.parse(JSON.stringify(e.q));if("$id"in e)this.$id=e.$id;if("disable_terms"in e)this.disable_terms=e.disable_terms;if("filter"in e)this.filter=e.filter;if("activeCohort"in e)this.activeCohort=e.activeCohort;if("sampleCounts"in e)this.sampleCounts=e.sampleCounts;if("menuOptions"in e)this.opts.menuOptions=e.menuOptions;yield this.setHandler(this.term?this.term.type:null);if(e.term&&this.handler&&this.handler.validateQ)this.handler.validateQ(e);if(this.handler.postMain)yield this.handler.postMain();if(this.opts.renderAs!="none")this.updateUI()}catch(t){this.hasError=true;throw t}}))}validateMainData(t){if(t.term){if(!t.term.type)throw"data.term.type missing";if(a(t.term.type)){if(!t.term.id&&t.term.type!=l.SAMPLELST)throw"data.term.id missing";if(!t.term.name)throw"data.term.name missing"}}if(!t.q)t.q={};if(typeof t.q!="object")throw"data.q{} is not object";if(t.disable_terms){if(!Array.isArray(t.disable_terms))throw"data.disable_terms[] is not array"}this.mayValidate_noTermPromptOptions(t)}validateMenuOptions(t){if(!t.menuOptions)t.menuOptions=ct.menuOptions;if(t.menuOptions=="all")t.menuOptions="*";for(const e of["edit","replace","remove"]){if(M(e,t.menuOptions))return}throw`no matches found for termsetting opts.menuOptions='${t.menuOptions}'`}mayValidate_noTermPromptOptions(t){if(!t.noTermPromptOptions)return;if(!Array.isArray(t.noTermPromptOptions))throw"noTermPromptOptions[] is not array";for(const e of t.noTermPromptOptions){if(e.isDictionary);else{if(!e.termtype)throw"element of noTermPromptOptions[] missing both isDictionary=true and .termtype"}if(!e.text&&!e.html)throw"element of noTermPromptOptions[] missing both .text and .html";if(e.q&&typeof e.q!="object")throw"type.q{} is not object"}this.noTermPromptOptions=t.noTermPromptOptions}setHandler(e){return t(this,void 0,void 0,(function*(){if(!e){this.handler=this.handlerByType.default;return}const t=e=="integer"||e=="float"?"numeric":e;if(!this.handlerByType[t]){try{const e=yield nt(`./handlers/${t}.ts`);this.handlerByType[t]=yield e.getHandler(this)}catch(e){throw`error with handler='./handlers/${t}.ts': ${e}`}}this.handler=this.handlerByType[t]}))}}const ut=e(pt);function ht(e){e.initUI=()=>{if(e.opts.$id){e.dom.tip.d.attr("id",e.opts.$id+"-ts-tip")}if(!e.dom.holder)return;e.dom.nopilldiv=e.dom.holder.append("div").style("cursor","pointer").on("click",e.clickNoPillDiv).on(`keyup.sjpp-termdb`,(t=>{if(t.key=="Enter")e.showTree(t)}));e.dom.pilldiv=e.dom.holder.append("div");if(e.opts.placeholder){e.dom.nopilldiv.append("div").html(e.placeholder).attr("class","sja_clbtext2").style("padding","3px 6px 3px 6px").style("display","inline-block")}if(e.opts.placeholderIcon){e.dom.nopilldiv.append("div").attr("class","sja_filter_tag_btn add_term_btn").style("padding","3px 6px 3px 6px").style("display","inline-block").style("border-radius","6px").style("background-color","#4888BF").text(e.opts.placeholderIcon)}e.dom.btnDiv=e.dom.holder.append("div")};e.updateUI=()=>t(this,void 0,void 0,(function*(){if(!e.term){e.dom.nopilldiv.style("display","block");e.dom.pilldiv.style("display","none");e.dom.btnDiv.style("display","none");return}if(e.term.hashtmldetail){if(e.opts.buttons&&!e.opts.buttons.includes("info"))e.opts.buttons.unshift("info");else e.opts.buttons=["info"]}if(e.opts.buttons){e.dom.btnDiv.selectAll("div").data(e.opts.buttons).enter().append("div").style("display","inline-block").style("padding","0px 5px").style("cursor","pointer").style("color","#999").style("font-size",".8em").html((t=>t.toUpperCase())).on("click",((t,i)=>{if(i=="delete")e.removeTerm();else if(i=="replace"){e.showTree(t.target)}else throw"unknown button"}));if(e.term.hashtmldetail){const t=e.dom.btnDiv.selectAll("div").filter((function(){return s(this).text()==="INFO"}));const i=s(e.dom.holder.node().parentNode).append("div");const n=yield import("./termInfo-96285f4a.js");n.termInfoInit({vocabApi:e.opts.vocabApi,icon_holder:t,content_holder:i,id:e.term.id,state:{term:e.term}})}}e.dom.nopilldiv.style("display","none");e.dom.pilldiv.style("display",e.opts.buttons?"inline-block":"block");e.dom.btnDiv.style("display",e.opts.buttons?"inline-block":"none");const t=e.dom.pilldiv.selectAll(".ts_pill").data([e.term],(t=>t.id));t.exit().each(e.exitPill);t.transition().duration(200).each(e.updatePill);t.enter().append("div").attr("class","ts_pill").style("display","grid").style("grid-template-columns","auto").style("grid-template-areas",'"left right"').style("cursor","pointer").style("margin","2px").on("click",e.showMenu).transition().duration(200).each(e.enterPill)}));e.enterPill=function(){return t(this,void 0,void 0,(function*(){const t=s(this);e.dom.pill_termname=t.append("div").attr("class","term_name_btn sja_filter_tag_btn").attr("tabindex",0).style("display","flex").style("grid-area","left").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","6px").html(e.handler.getPillName).on(`keyup.sjpp-termdb`,(t=>{if(t.key=="Enter")t.target.click()}));e.updatePill.call(this)}))};e.updatePill=function(){return t(this,void 0,void 0,(function*(){const t=s(this);const i=e.handler.getPillStatus()||{};e.dom.pill_termname.style("border-radius",i.text?"6px 0 0 6px":"6px").html(e.handler.getPillName);const n=t.selectAll(".ts_summary_btn").data(i.text?[{txt:i.text}]:[],(t=>t.txt));n.exit().remove();const r=n.enter().append("div").attr("class","ts_summary_btn sja_filter_tag_btn").style("display","flex").style("grid-area","right").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","0 6px 6px 0").style("font-style","italic").html((t=>t.txt)).style("opacity",0).transition().duration(200).style("opacity",1);if(i.bgcolor){r.transition().duration(200).style("background-color",i.bgcolor)}}))};e.exitPill=function(){s(this).style("opacity",1).transition().duration(e.durations.exit).style("opacity",0).remove()}}function ft(e){e.removeTerm=()=>{e.opts.callback(null)};e.cancelGroupsetting=()=>{e.opts.callback({id:e.term.id,term:e.term,q:{mode:"discrete",type:"values",isAtomic:true,groupsetting:{inuse:false}}})};e.clickNoPillDiv=()=>t(this,void 0,void 0,(function*(){if(!e.noTermPromptOptions||e.noTermPromptOptions.length==0){yield e.showTree(e.dom.nopilldiv.node());return}e.dom.tip.clear().showunder(e.dom.nopilldiv.node());for(const i of e.noTermPromptOptions){const n=e.dom.tip.d.append("div").attr("class","sja_menuoption sja_sharp_border").on("click",(()=>t(this,void 0,void 0,(function*(){e.dom.tip.clear();if(i.isDictionary){yield e.showTree(e.dom.tip.d.node())}else if(i.termtype){if(i.q)e.q=structuredClone(i.q);yield e.setHandler(i.termtype);e.handler.showEditMenu(e.dom.tip.d)}else{throw"termtype missing"}}))));if(i.text)n.text(i.text);else if(i.html)n.html(i.html)}}));e.showTree=function(i,n){return t(this,void 0,void 0,(function*(){e.dom.tip.clear();if(i)e.dom.tip.showunder(i instanceof Element?i:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);if(!e.usecase)e.usecase={target:"default"};const r=yield import("./app-bfce9bf5.js");r.appInit({holder:e.dom.tip.d,vocabApi:e.vocabApi,state:{activeCohort:e.activeCohort,tree:{usecase:e.usecase}},tree:{disable_terms:e.disable_terms,click_term:i=>t(this,void 0,void 0,(function*(){e.dom.tip.hide();let t;if(i.term)t=i;else{const e=i;t={term:e,q:{isAtomic:true},isAtomic:true}}if(e.opts.customFillTw)e.opts.customFillTw(t);yield wt(t,e.vocabApi,e.opts.defaultQ4fillTW);e.opts.callback(t)}))}})}))};e.showMenu=(t,i=null,n=null)=>{var r,o,a,l;const d=e.dom.tip;d.clear();if(e.opts.renderAs=="none"&&i)e.dom.holder=s(i);if(e.dom.holder){const i=(r=e.dom.holder)===null||r===void 0?void 0:r.node();if(i)d.showunder(i);else d.show(t.clientX,t.clientY)}const c=[];if(((o=e.q.groupsetting)===null||o===void 0?void 0:o.inuse)&&e.q.mode!="binary"){c.push({label:"Cancel grouping",callback:e.cancelGroupsetting})}if(e.q&&!((a=e.q.groupsetting)===null||a===void 0?void 0:a.disabled)&&M("edit",e.opts.menuOptions)){c.push({label:"Edit",callback:e.handler.showEditMenu})}if(M("replace",e.opts.menuOptions)){c.push({label:"Replace",callback:e.showTree})}if(M("remove",e.opts.menuOptions)){c.push({label:"Remove",callback:e.removeTerm})}if(e.opts.customMenuOptions)c.push(...e.opts.customMenuOptions);e.openMenu=n||d.d;e.openMenu.selectAll("div").data(c).enter().append("div").attr("class","sja_menuoption sja_sharp_border").attr("tabindex",((t,e)=>e+1)).style("display",e.opts.menuLayout=="horizontal"?"inline-block":"block").text((t=>t.label)).on("click",((t,i)=>{e.dom.tip.clear();i.callback(e.dom.tip.d)})).on("keyup",(t=>{if(t.key=="Enter")t.target.click()}));(l=e.openMenu.select(".sja_menuoption").node())===null||l===void 0?void 0:l.focus()};e.showReuseMenu=function(i){return t(this,void 0,void 0,(function*(){const n=i.append("div");n.style("display","block").style("padding","10px").append("span").style("color","#aaa").html("Save current setting as ");const r=e.vocabApi.getCustomTermQLst(e.term);const o=n.append("input").attr("type","text").attr("placeholder",r.nextReuseId).attr("value",e.q.reuseId||r.nextReuseId);n.append("button").style("margin-left","5px").html("Save").on("click",(()=>{const t=o.property("value").trim()||r.nextReuseId;e.q.reuseId=t;e.vocabApi.cacheTermQ(e.term,e.q);e.runCallback();e.dom.tip.hide()}));const a=i.append("div").style("margin","10px");const l={term:e.term,q:{}};yield xt(l,e.vocabApi);l.q.reuseId="Default";r.push(l.q);if(r.length>1){a.append("div").style("color","#aaa").html("Previously saved settings")}a.append("table").selectAll("tr").data(r).enter().append("tr").style("margin","2px 5px").each((function(i){const n=s(this);const r=mt(e.q,i);const o=i.name||i.reuseId;n.append("td").style("min-width","180px").style("text-align","center").html(o);const a=n.append("td").style("text-align","center");if(r){a.html(`In use <span style='color:#5a5;font-weight:600'>✓</span>`)}else{a.append("button").style("min-width","80px").html("Use").on("click",(()=>{if(i.reuseId==="Default"){delete i.reuseId;delete i.name}e.q=i;e.dom.tip.hide();e.runCallback()}))}const l=n.append("td").style("text-align","center");if(!r&&i.reuseId!="Default"){l.append("button").style("min-width","80px").html("Delete").on("click",(()=>t(this,void 0,void 0,(function*(){yield e.vocabApi.uncacheTermQ(e.term,i);e.dom.tip.hide();e.runCallback()}))))}}));i.append("div").style("margin","20px 5px 5px 5px").style("padding","5px").style("font-size","0.8em").style("color","#aaa").html(`Saving the setting will allow it to be reused at another chart.<br/>`+`The setting will be reusable in your current or saved session.`)}))};e.showGeneSearch=function(i,n){e.dom.tip.clear();if(i)e.dom.tip.showunder(i instanceof Element?i:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);const r=new Set;const s=e.dom.tip.d.append("div").style("padding","5px");const o=s.append("label");o.append("span").text("Search: ");const a=o.append("input").attr("type","text").on("input",(()=>t(this,void 0,void 0,(function*(){const t=a.property("value");try{const i=!t?{lst:[]}:yield e.vocabApi.findTerm(t,e.activeCohort,e.usecase,"gene");l.selectAll("*").remove();l.selectAll("div").data(i.lst.filter((t=>!r.has(t)))).enter().append("div").attr("class","ts_pill sja_filter_tag_btn sja_tree_click_term").style("display","block").style("margin","2px 3px").style("width","fit-content").text((t=>t.name)).on("click",(t=>{e.dom.tip.hide();e.runCallback({term:{name:t.name,type:"geneVariant"},q:{exclude:[]}})}))}catch(t){alert("Search error: "+t)}}))));const l=e.dom.tip.d.append("div").style("margin","5px").style("padding-left","5px").style("border-left","2px solid #ccc")}}function mt(t,e){const i=[t,e].map((t=>JSON.parse(JSON.stringify(t))));for(const t of i){delete t.binLabelFormatter;if(t.reuseId==="Default")delete t.reuseId;if(t.mode==="continuous")delete t.mode;if(t.mode==="discrete"&&t.type=="custom-bin"&&t.lst){for(const e of t.lst){delete e.range}}}return n(...i)}function vt(t){return{showEditMenu(){},getPillStatus(){},getPillName(e){return bt(t,e)}}}function bt(t,e){if(!t.opts.abbrCutoff)return e.name;return e.name.length<=t.opts.abbrCutoff+2?e.name:'<label title="'+e.name+'">'+e.name.substring(0,t.opts.abbrCutoff)+"..."+"</label>"}function yt(e,i,n){return t(this,void 0,void 0,(function*(){yield gt(e,i);const t=[];for(const r of e){t.push(xt(r,i,n))}yield Promise.all(t)}))}function gt(e,i){return t(this,void 0,void 0,(function*(){const t=[];for(const i of e){if(i.term)continue;if(i.id===undefined||i.id==="")throw".id is required";t.push(i.id)}const n=t.length?yield i.getTerms(t):{};for(const i of t){if(!n[i])throw`missing dictionary term for id=${i}`;for(const t of e){if(t.id in n)t.term=n[t.id]}}}))}function xt(e,i,n){return t(this,void 0,void 0,(function*(){e.isAtomic=true;if(!e.term&&e.id){yield gt([e],i)}delete e.id;if(!e.q)e.q={};if(!e.$id)e.$id=yield ot(i.getTwMinCopy(e));e.q.isAtomic=true;yield wt(e,i,n);jt(e);return e}))}function wt(e,i,n){return t(this,void 0,void 0,(function*(){if(!e.$id)e.$id=yield ot(i.getTwMinCopy(e));const t=e.term.type;const r=t=="float"||t=="integer"?"numeric":t;let s;if(e.term.type){try{s=yield it(`./handlers/${r}.ts`)}catch(t){throw`Type ${r} does not exist`}}else throw`Type not defined for ${JSON.stringify(e)}`;yield s.fillTW(e,i,n?n[r]:null)}))}function jt(t){if(!("mode"in t.q)){return}if(typeof t.q.mode!="string")throw"q.mode not string"}function kt(t,e){if(!t.hiddenValues){t.hiddenValues={};if(e.values){for(const i in e.values){if(e.values[i].uncomputable)t.hiddenValues[i]=1}}}}export{yt as a,bt as b,xt as f,ot as g,kt as s,ut as t};
|
|
1
|
+
import{aD as t,aB as e,M as i,aI as n,aS as r,q as s}from"./app-71453429.js";import o from"path";import{d as a,T as l}from"./FilterRxComp-fc769f34.js";var d=function(t,e){var i=[];for(var n=0;n<t.length;n++){var r=e(t[n],n);if(c(r))i.push.apply(i,r);else i.push(r)}return i};var c=Array.isArray||function(t){return Object.prototype.toString.call(t)==="[object Array]"};var p=u;function u(t,e,i){if(t instanceof RegExp)t=h(t,i);if(e instanceof RegExp)e=h(e,i);var n=f(t,e,i);return n&&{start:n[0],end:n[1],pre:i.slice(0,n[0]),body:i.slice(n[0]+t.length,n[1]),post:i.slice(n[1]+e.length)}}function h(t,e){var i=e.match(t);return i?i[0]:null}u.range=f;function f(t,e,i){var n,r,s,o,a;var l=i.indexOf(t);var d=i.indexOf(e,l+1);var c=l;if(l>=0&&d>0){if(t===e){return[l,d]}n=[];s=i.length;while(c>=0&&!a){if(c==l){n.push(c);l=i.indexOf(t,c+1)}else if(n.length==1){a=[n.pop(),d]}else{r=n.pop();if(r<s){s=r;o=d}d=i.indexOf(e,c+1)}c=l<d&&l>=0?l:d}if(n.length){a=[s,o]}}return a}var m=_;var v="\0SLASH"+Math.random()+"\0";var y="\0OPEN"+Math.random()+"\0";var g="\0CLOSE"+Math.random()+"\0";var b="\0COMMA"+Math.random()+"\0";var x="\0PERIOD"+Math.random()+"\0";function w(t){return parseInt(t,10)==t?parseInt(t,10):t.charCodeAt(0)}function j(t){return t.split("\\\\").join(v).split("\\{").join(y).split("\\}").join(g).split("\\,").join(b).split("\\.").join(x)}function k(t){return t.split(v).join("\\").split(y).join("{").split(g).join("}").split(b).join(",").split(x).join(".")}function O(t){if(!t)return[""];var e=[];var i=p("{","}",t);if(!i)return t.split(",");var n=i.pre;var r=i.body;var s=i.post;var o=n.split(",");o[o.length-1]+="{"+r+"}";var a=O(s);if(s.length){o[o.length-1]+=a.shift();o.push.apply(o,a)}e.push.apply(e,o);return e}function _(t){if(!t)return[];if(t.substr(0,2)==="{}"){t="\\{\\}"+t.substr(2)}return q(j(t),true).map(k)}function A(t){return"{"+t+"}"}function T(t){return/^-?0\d/.test(t)}function E(t,e){return t<=e}function S(t,e){return t>=e}function q(t,e){var i=[];var n=p("{","}",t);if(!n||/\$$/.test(n.pre))return[t];var r=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(n.body);var s=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(n.body);var o=r||s;var a=n.body.indexOf(",")>=0;if(!o&&!a){if(n.post.match(/,.*\}/)){t=n.pre+"{"+n.body+g+n.post;return q(t)}return[t]}var l;if(o){l=n.body.split(/\.\./)}else{l=O(n.body);if(l.length===1){l=q(l[0],false).map(A);if(l.length===1){var c=n.post.length?q(n.post,false):[""];return c.map((function(t){return n.pre+l[0]+t}))}}}var u=n.pre;var c=n.post.length?q(n.post,false):[""];var h;if(o){var f=w(l[0]);var m=w(l[1]);var v=Math.max(l[0].length,l[1].length);var y=l.length==3?Math.abs(w(l[2])):1;var b=E;var x=m<f;if(x){y*=-1;b=S}var j=l.some(T);h=[];for(var k=f;b(k,m);k+=y){var _;if(s){_=String.fromCharCode(k);if(_==="\\")_=""}else{_=String(k);if(j){var M=v-_.length;if(M>0){var I=new Array(M+1).join("0");if(k<0)_="-"+I+_.slice(1);else _=I+_}}}h.push(_)}}else{h=d(l,(function(t){return q(t,false)}))}for(var C=0;C<h.length;C++){for(var $=0;$<c.length;$++){var P=u+h[C]+c[$];if(!e||o||P)i.push(P)}}return i}var M=U;U.Minimatch=G;var I=function(){try{return o}catch(t){}}()||{sep:"/"};U.sep=I.sep;var C=U.GLOBSTAR=G.GLOBSTAR={};var $={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}};var P="[^/]";var N=P+"*?";var R="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?";var D="(?:(?!(?:\\/|^)\\.).)*?";var V=B("().*{}+?[]^$\\!");function B(t){return t.split("").reduce((function(t,e){t[e]=true;return t}),{})}var L=/\/+/;U.filter=J;function J(t,e){e=e||{};return function(i,n,r){return U(i,t,e)}}function Q(t,e){e=e||{};var i={};Object.keys(t).forEach((function(e){i[e]=t[e]}));Object.keys(e).forEach((function(t){i[t]=e[t]}));return i}U.defaults=function(t){if(!t||typeof t!=="object"||!Object.keys(t).length){return U}var e=U;var i=function i(n,r,s){return e(n,r,Q(t,s))};i.Minimatch=function i(n,r){return new e.Minimatch(n,Q(t,r))};i.Minimatch.defaults=function i(n){return e.defaults(Q(t,n)).Minimatch};i.filter=function i(n,r){return e.filter(n,Q(t,r))};i.defaults=function i(n){return e.defaults(Q(t,n))};i.makeRe=function i(n,r){return e.makeRe(n,Q(t,r))};i.braceExpand=function i(n,r){return e.braceExpand(n,Q(t,r))};i.match=function(i,n,r){return e.match(i,n,Q(t,r))};return i};G.defaults=function(t){return U.defaults(t).Minimatch};function U(t,e,i){X(e);if(!i)i={};if(!i.nocomment&&e.charAt(0)==="#"){return false}return new G(e,i).match(t)}function G(t,e){if(!(this instanceof G)){return new G(t,e)}X(t);if(!e)e={};t=t.trim();if(!e.allowWindowsEscape&&I.sep!=="/"){t=t.split(I.sep).join("/")}this.options=e;this.set=[];this.pattern=t;this.regexp=null;this.negate=false;this.comment=false;this.empty=false;this.partial=!!e.partial;this.make()}G.prototype.debug=function(){};G.prototype.make=H;function H(){var t=this.pattern;var e=this.options;if(!e.nocomment&&t.charAt(0)==="#"){this.comment=true;return}if(!t){this.empty=true;return}this.parseNegate();var i=this.globSet=this.braceExpand();if(e.debug)this.debug=function t(){console.error.apply(console,arguments)};this.debug(this.pattern,i);i=this.globParts=i.map((function(t){return t.split(L)}));this.debug(this.pattern,i);i=i.map((function(t,e,i){return t.map(this.parse,this)}),this);this.debug(this.pattern,i);i=i.filter((function(t){return t.indexOf(false)===-1}));this.debug(this.pattern,i);this.set=i}G.prototype.parseNegate=F;function F(){var t=this.pattern;var e=false;var i=this.options;var n=0;if(i.nonegate)return;for(var r=0,s=t.length;r<s&&t.charAt(r)==="!";r++){e=!e;n++}if(n)this.pattern=t.substr(n);this.negate=e}U.braceExpand=function(t,e){return z(t,e)};G.prototype.braceExpand=z;function z(t,e){if(!e){if(this instanceof G){e=this.options}else{e={}}}t=typeof t==="undefined"?this.pattern:t;X(t);if(e.nobrace||!/\{(?:(?!\{).)*\}/.test(t)){return[t]}return m(t)}var W=1024*64;var X=function(t){if(typeof t!=="string"){throw new TypeError("invalid pattern")}if(t.length>W){throw new TypeError("pattern is too long")}};G.prototype.parse=Z;var Y={};function Z(t,e){X(t);var i=this.options;if(t==="**"){if(!i.noglobstar)return C;else t="*"}if(t==="")return"";var n="";var r=!!i.nocase;var s=false;var o=[];var a=[];var l;var d=false;var c=-1;var p=-1;var u=t.charAt(0)==="."?"":i.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)";var h=this;function f(){if(l){switch(l){case"*":n+=N;r=true;break;case"?":n+=P;r=true;break;default:n+="\\"+l;break}h.debug("clearStateChar %j %j",l,n);l=false}}for(var m=0,v=t.length,y;m<v&&(y=t.charAt(m));m++){this.debug("%s\t%s %s %j",t,m,n,y);if(s&&V[y]){n+="\\"+y;s=false;continue}switch(y){case"/":{return false}case"\\":f();s=true;continue;case"?":case"*":case"+":case"@":case"!":this.debug("%s\t%s %s %j <-- stateChar",t,m,n,y);if(d){this.debug(" in class");if(y==="!"&&m===p+1)y="^";n+=y;continue}h.debug("call clearStateChar %j",l);f();l=y;if(i.noext)f();continue;case"(":if(d){n+="(";continue}if(!l){n+="\\(";continue}o.push({type:l,start:m-1,reStart:n.length,open:$[l].open,close:$[l].close});n+=l==="!"?"(?:(?!(?:":"(?:";this.debug("plType %j %j",l,n);l=false;continue;case")":if(d||!o.length){n+="\\)";continue}f();r=true;var g=o.pop();n+=g.close;if(g.type==="!"){a.push(g)}g.reEnd=n.length;continue;case"|":if(d||!o.length||s){n+="\\|";s=false;continue}f();n+="|";continue;case"[":f();if(d){n+="\\"+y;continue}d=true;p=m;c=n.length;n+=y;continue;case"]":if(m===p+1||!d){n+="\\"+y;s=false;continue}var b=t.substring(p+1,m);try{RegExp("["+b+"]")}catch(t){var x=this.parse(b,Y);n=n.substr(0,c)+"\\["+x[0]+"\\]";r=r||x[1];d=false;continue}r=true;d=false;n+=y;continue;default:f();if(s){s=false}else if(V[y]&&!(y==="^"&&d)){n+="\\"}n+=y}}if(d){b=t.substr(p+1);x=this.parse(b,Y);n=n.substr(0,c)+"\\["+x[0];r=r||x[1]}for(g=o.pop();g;g=o.pop()){var w=n.slice(g.reStart+g.open.length);this.debug("setting tail",n,g);w=w.replace(/((?:\\{2}){0,64})(\\?)\|/g,(function(t,e,i){if(!i){i="\\"}return e+e+i+"|"}));this.debug("tail=%j\n %s",w,w,g,n);var j=g.type==="*"?N:g.type==="?"?P:"\\"+g.type;r=true;n=n.slice(0,g.reStart)+j+"\\("+w}f();if(s){n+="\\\\"}var k=false;switch(n.charAt(0)){case"[":case".":case"(":k=true}for(var O=a.length-1;O>-1;O--){var _=a[O];var A=n.slice(0,_.reStart);var T=n.slice(_.reStart,_.reEnd-8);var E=n.slice(_.reEnd-8,_.reEnd);var S=n.slice(_.reEnd);E+=S;var q=A.split("(").length-1;var M=S;for(m=0;m<q;m++){M=M.replace(/\)[+*?]?/,"")}S=M;var I="";if(S===""&&e!==Y){I="$"}var R=A+T+S+I+E;n=R}if(n!==""&&r){n="(?=.)"+n}if(k){n=u+n}if(e===Y){return[n,r]}if(!r){return tt(t)}var D=i.nocase?"i":"";try{var B=new RegExp("^"+n+"$",D)}catch(t){return new RegExp("$.")}B._glob=t;B._src=n;return B}U.makeRe=function(t,e){return new G(t,e||{}).makeRe()};G.prototype.makeRe=K;function K(){if(this.regexp||this.regexp===false)return this.regexp;var t=this.set;if(!t.length){this.regexp=false;return this.regexp}var e=this.options;var i=e.noglobstar?N:e.dot?R:D;var n=e.nocase?"i":"";var r=t.map((function(t){return t.map((function(t){return t===C?i:typeof t==="string"?et(t):t._src})).join("\\/")})).join("|");r="^(?:"+r+")$";if(this.negate)r="^(?!"+r+").*$";try{this.regexp=new RegExp(r,n)}catch(t){this.regexp=false}return this.regexp}U.match=function(t,e,i){i=i||{};var n=new G(e,i);t=t.filter((function(t){return n.match(t)}));if(n.options.nonull&&!t.length){t.push(e)}return t};G.prototype.match=function t(e,i){if(typeof i==="undefined")i=this.partial;this.debug("match",e,this.pattern);if(this.comment)return false;if(this.empty)return e==="";if(e==="/"&&i)return true;var n=this.options;if(I.sep!=="/"){e=e.split(I.sep).join("/")}e=e.split(L);this.debug(this.pattern,"split",e);var r=this.set;this.debug(this.pattern,"set",r);var s;var o;for(o=e.length-1;o>=0;o--){s=e[o];if(s)break}for(o=0;o<r.length;o++){var a=r[o];var l=e;if(n.matchBase&&a.length===1){l=[s]}var d=this.matchOne(l,a,i);if(d){if(n.flipNegate)return true;return!this.negate}}if(n.flipNegate)return false;return this.negate};G.prototype.matchOne=function(t,e,i){var n=this.options;this.debug("matchOne",{this:this,file:t,pattern:e});this.debug("matchOne",t.length,e.length);for(var r=0,s=0,o=t.length,a=e.length;r<o&&s<a;r++,s++){this.debug("matchOne loop");var l=e[s];var d=t[r];this.debug(e,l,d);if(l===false)return false;if(l===C){this.debug("GLOBSTAR",[e,l,d]);var c=r;var p=s+1;if(p===a){this.debug("** at the end");for(;r<o;r++){if(t[r]==="."||t[r]===".."||!n.dot&&t[r].charAt(0)===".")return false}return true}while(c<o){var u=t[c];this.debug("\nglobstar while",t,c,e,p,u);if(this.matchOne(t.slice(c),e.slice(p),i)){this.debug("globstar found match!",c,o,u);return true}else{if(u==="."||u===".."||!n.dot&&u.charAt(0)==="."){this.debug("dot detected!",t,c,e,p);break}this.debug("globstar swallow a segment, and continue");c++}}if(i){this.debug("\n>>> no match, partial?",t,c,e,p);if(c===o)return true}return false}var h;if(typeof l==="string"){h=d===l;this.debug("string match",l,d,h)}else{h=d.match(l);this.debug("pattern match",l,d,h)}if(!h)return false}if(r===o&&s===a){return true}else if(r===o){return i}else if(s===a){return r===o-1&&t[r]===""}throw new Error("wtf?")};function tt(t){return t.replace(/\\(.)/g,"$1")}function et(t){return t.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&")}function it(t){switch(t){case"./handlers/categorical.ts":return import("./categorical-a00f4ffc.js");case"./handlers/condition.ts":return import("./condition-2034db37.js");case"./handlers/density.ts":return import("./density-4c2b53f6.js");case"./handlers/geneExpression.ts":return import("./geneExpression-da4b50f0.js");case"./handlers/geneVariant.ts":return import("./geneVariant-d79431a2.js");case"./handlers/groupsetting.ts":return import("./groupsetting-574ad150.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-eeb5ad12.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-d67da945.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-9a0c88bc.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-921f7097.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-649308d5.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-52789fd2.js");case"./handlers/numeric.ts":return import("./numeric-d5536b1c.js");case"./handlers/samplelst.ts":return import("./samplelst-2bdc1b9d.js");case"./handlers/snplocus.ts":return import("./snplocus-0cafa73c.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-2284d5ce.js");case"./handlers/survival.ts":return import("./survival-04e279f8.js");default:return new Promise((function(e,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}function nt(t){switch(t){case"./handlers/categorical.ts":return import("./categorical-a00f4ffc.js");case"./handlers/condition.ts":return import("./condition-2034db37.js");case"./handlers/density.ts":return import("./density-4c2b53f6.js");case"./handlers/geneExpression.ts":return import("./geneExpression-da4b50f0.js");case"./handlers/geneVariant.ts":return import("./geneVariant-d79431a2.js");case"./handlers/groupsetting.ts":return import("./groupsetting-574ad150.js");case"./handlers/metaboliteIntensity.ts":return import("./metaboliteIntensity-eeb5ad12.js");case"./handlers/numeric.binary.ts":return import("./numeric.binary-d67da945.js");case"./handlers/numeric.continuous.ts":return import("./numeric.continuous-9a0c88bc.js");case"./handlers/numeric.discrete.ts":return import("./numeric.discrete-921f7097.js");case"./handlers/numeric.spline.ts":return import("./numeric.spline-649308d5.js");case"./handlers/numeric.toggle.ts":return import("./numeric.toggle-52789fd2.js");case"./handlers/numeric.ts":return import("./numeric-d5536b1c.js");case"./handlers/samplelst.ts":return import("./samplelst-2bdc1b9d.js");case"./handlers/snplocus.ts":return import("./snplocus-0cafa73c.js");case"./handlers/snplst.sampleSum.ts":return import("./snplst.sampleSum-e47d05f0.js");case"./handlers/snplst.ts":return import("./snplst-2284d5ce.js");case"./handlers/survival.ts":return import("./survival-04e279f8.js");default:return new Promise((function(e,i){(typeof queueMicrotask==="function"?queueMicrotask:setTimeout)(i.bind(null,new Error("Unknown variable dynamic import: "+t)))}))}}const rt=`_ts_${(+new Date).toString().slice(-8)}`;let st=0;function ot(e){return t(this,void 0,void 0,(function*(){if(!e)return`${st++}${rt}`;delete e.$id;return yield lt(JSON.stringify(e))}))}const at=new TextEncoder;function lt(e){return t(this,void 0,void 0,(function*(){const t=at.encode(e);const i=yield crypto.subtle.digest("SHA-1",t);const n=Array.from(new Uint8Array(i));const r=n.map((t=>t.toString(16).padStart(2,"0"))).join("");return dt(r).replace("=","-")}))}function dt(t){return btoa([...t].reduce(((e,i,n)=>e+=!(n-1&1)?String.fromCharCode(parseInt(t.substring(n-1,n+1),16)):""),""))}const ct={menuOptions:"edit",menuLayout:"vertical"};class pt{constructor(t){this.opts=this.validateOpts(t);this.vocabApi=t.vocabApi;this.activeCohort=t.activeCohort;this.placeholder=t.placeholder;this.durations={exit:0};this.disable_terms=t.disable_terms;this.usecase=t.usecase;this.abbrCutoff=t.abbrCutoff;this.numqByTermIdModeType={};this.dom={holder:t.holder,tip:t.tip||new i({padding:"0px",parent_menu:this.opts.holder&&this.opts.holder.node()&&this.opts.holder.node().closest(".sja_menu_div")})};this.dom.tip2=new i({padding:"0px",parent_menu:this.dom.tip.d.node()});ft(this);ht(this);this.initUI();const e=vt(this);this.handlerByType={default:e};this.handler=e;this.hasError=false;this.api={main:this.main.bind(this),runCallback:this.runCallback.bind(this),showTree:this.showTree,showMenu:this.showMenu.bind(this),showGeneSearch:this.showGeneSearch,hasError:()=>this.hasError,validateQ:t=>{if(!this.handler||!this.handler.validateQ)return;try{this.handler.validateQ(t)}catch(t){this.hasError=true;throw t}}}}runCallback(t=null){var e,i;const s=this.term?{term:this.term,q:this.q,isAtomic:true}:{};if("$id"in this)s.$id=this.$id;if(((e=s.q)===null||e===void 0?void 0:e.reuseId)&&s.q.reuseId===((i=this.data.q)===null||i===void 0?void 0:i.reuseId)){if(!n(s.q,this.data.q)){delete s.q.reuseId;delete s.q.name}}const o=t?JSON.parse(JSON.stringify(t)):{};if(this.opts.callback)this.opts.callback(t?r(JSON.stringify(s),o):s)}validateOpts(t){const e=Object.assign({},ct,t);if(!e.holder&&e.renderAs!="none")throw".holder missing";if(typeof e.callback!="function")throw".callback() is not a function";if(!e.vocabApi)throw".vocabApi missing";if(typeof e.vocabApi!="object");if("placeholder"in e&&!e.placeholder&&"placeholderIcon"in e&&!e.placeholderIcon)throw"must specify a non-empty opts.placeholder and/or .placeholderIcon";if(!("placeholder"in e))e.placeholder="Select term ";if(!("placeholderIcon"in e))e.placeholderIcon="+";if(!Number.isInteger(e.abbrCutoff))e.abbrCutoff=18;this.validateMenuOptions(e);if(!e.numericEditMenuVersion)e.numericEditMenuVersion=["discrete"];this.mayValidate_noTermPromptOptions(e);return e}main(e={}){return t(this,void 0,void 0,(function*(){try{if(this.doNotHideTipInMain){delete this.doNotHideTipInMain}else{this.dom.tip.hide()}this.hasError=false;delete this.error;this.validateMainData(e);this.data=e;this.term=e.term;this.q=JSON.parse(JSON.stringify(e.q));if("$id"in e)this.$id=e.$id;if("disable_terms"in e)this.disable_terms=e.disable_terms;if("filter"in e)this.filter=e.filter;if("activeCohort"in e)this.activeCohort=e.activeCohort;if("sampleCounts"in e)this.sampleCounts=e.sampleCounts;if("menuOptions"in e)this.opts.menuOptions=e.menuOptions;yield this.setHandler(this.term?this.term.type:null);if(e.term&&this.handler&&this.handler.validateQ)this.handler.validateQ(e);if(this.handler.postMain)yield this.handler.postMain();if(this.opts.renderAs!="none")this.updateUI()}catch(t){this.hasError=true;throw t}}))}validateMainData(t){if(t.term){if(!t.term.type)throw"data.term.type missing";if(a(t.term.type)){if(!t.term.id&&t.term.type!=l.SAMPLELST)throw"data.term.id missing";if(!t.term.name)throw"data.term.name missing"}}if(!t.q)t.q={};if(typeof t.q!="object")throw"data.q{} is not object";if(t.disable_terms){if(!Array.isArray(t.disable_terms))throw"data.disable_terms[] is not array"}this.mayValidate_noTermPromptOptions(t)}validateMenuOptions(t){if(!t.menuOptions)t.menuOptions=ct.menuOptions;if(t.menuOptions=="all")t.menuOptions="*";for(const e of["edit","replace","remove"]){if(M(e,t.menuOptions))return}throw`no matches found for termsetting opts.menuOptions='${t.menuOptions}'`}mayValidate_noTermPromptOptions(t){if(!t.noTermPromptOptions)return;if(!Array.isArray(t.noTermPromptOptions))throw"noTermPromptOptions[] is not array";for(const e of t.noTermPromptOptions){if(e.isDictionary);else{if(!e.termtype)throw"element of noTermPromptOptions[] missing both isDictionary=true and .termtype"}if(!e.text&&!e.html)throw"element of noTermPromptOptions[] missing both .text and .html";if(e.q&&typeof e.q!="object")throw"type.q{} is not object"}this.noTermPromptOptions=t.noTermPromptOptions}setHandler(e){return t(this,void 0,void 0,(function*(){if(!e){this.handler=this.handlerByType.default;return}const t=e=="integer"||e=="float"?"numeric":e;if(!this.handlerByType[t]){try{const e=yield nt(`./handlers/${t}.ts`);this.handlerByType[t]=yield e.getHandler(this)}catch(e){throw`error with handler='./handlers/${t}.ts': ${e}`}}this.handler=this.handlerByType[t]}))}}const ut=e(pt);function ht(e){e.initUI=()=>{if(e.opts.$id){e.dom.tip.d.attr("id",e.opts.$id+"-ts-tip")}if(!e.dom.holder)return;e.dom.nopilldiv=e.dom.holder.append("div").style("cursor","pointer").on("click",e.clickNoPillDiv).on(`keyup.sjpp-termdb`,(t=>{if(t.key=="Enter")e.showTree(t)}));e.dom.pilldiv=e.dom.holder.append("div");if(e.opts.placeholder){e.dom.nopilldiv.append("div").html(e.placeholder).attr("class","sja_clbtext2").style("padding","3px 6px 3px 6px").style("display","inline-block")}if(e.opts.placeholderIcon){e.dom.nopilldiv.append("div").attr("class","sja_filter_tag_btn add_term_btn").style("padding","3px 6px 3px 6px").style("display","inline-block").style("border-radius","6px").style("background-color","#4888BF").text(e.opts.placeholderIcon)}e.dom.btnDiv=e.dom.holder.append("div")};e.updateUI=()=>t(this,void 0,void 0,(function*(){if(!e.term){e.dom.nopilldiv.style("display","block");e.dom.pilldiv.style("display","none");e.dom.btnDiv.style("display","none");return}if(e.term.hashtmldetail){if(e.opts.buttons&&!e.opts.buttons.includes("info"))e.opts.buttons.unshift("info");else e.opts.buttons=["info"]}if(e.opts.buttons){e.dom.btnDiv.selectAll("div").data(e.opts.buttons).enter().append("div").style("display","inline-block").style("padding","0px 5px").style("cursor","pointer").style("color","#999").style("font-size",".8em").html((t=>t.toUpperCase())).on("click",((t,i)=>{if(i=="delete")e.removeTerm();else if(i=="replace"){e.showTree(t.target)}else throw"unknown button"}));if(e.term.hashtmldetail){const t=e.dom.btnDiv.selectAll("div").filter((function(){return s(this).text()==="INFO"}));const i=s(e.dom.holder.node().parentNode).append("div");const n=yield import("./termInfo-4c759483.js");n.termInfoInit({vocabApi:e.opts.vocabApi,icon_holder:t,content_holder:i,id:e.term.id,state:{term:e.term}})}}e.dom.nopilldiv.style("display","none");e.dom.pilldiv.style("display",e.opts.buttons?"inline-block":"block");e.dom.btnDiv.style("display",e.opts.buttons?"inline-block":"none");const t=e.dom.pilldiv.selectAll(".ts_pill").data([e.term],(t=>t.id));t.exit().each(e.exitPill);t.transition().duration(200).each(e.updatePill);t.enter().append("div").attr("class","ts_pill").style("display","grid").style("grid-template-columns","auto").style("grid-template-areas",'"left right"').style("cursor","pointer").style("margin","2px").on("click",e.showMenu).transition().duration(200).each(e.enterPill)}));e.enterPill=function(){return t(this,void 0,void 0,(function*(){const t=s(this);e.dom.pill_termname=t.append("div").attr("class","term_name_btn sja_filter_tag_btn").attr("tabindex",0).style("display","flex").style("grid-area","left").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","6px").html(e.handler.getPillName).on(`keyup.sjpp-termdb`,(t=>{if(t.key=="Enter")t.target.click()}));e.updatePill.call(this)}))};e.updatePill=function(){return t(this,void 0,void 0,(function*(){const t=s(this);const i=e.handler.getPillStatus()||{};e.dom.pill_termname.style("border-radius",i.text?"6px 0 0 6px":"6px").html(e.handler.getPillName);const n=t.selectAll(".ts_summary_btn").data(i.text?[{txt:i.text}]:[],(t=>t.txt));n.exit().remove();const r=n.enter().append("div").attr("class","ts_summary_btn sja_filter_tag_btn").style("display","flex").style("grid-area","right").style("position","relative").style("align-items","center").style("padding","3px 6px 3px 6px").style("border-radius","0 6px 6px 0").style("font-style","italic").html((t=>t.txt)).style("opacity",0).transition().duration(200).style("opacity",1);if(i.bgcolor){r.transition().duration(200).style("background-color",i.bgcolor)}}))};e.exitPill=function(){s(this).style("opacity",1).transition().duration(e.durations.exit).style("opacity",0).remove()}}function ft(e){e.removeTerm=()=>{e.opts.callback(null)};e.cancelGroupsetting=()=>{e.opts.callback({id:e.term.id,term:e.term,q:{mode:"discrete",type:"values",isAtomic:true,groupsetting:{inuse:false}}})};e.clickNoPillDiv=()=>t(this,void 0,void 0,(function*(){if(!e.noTermPromptOptions||e.noTermPromptOptions.length==0){yield e.showTree(e.dom.nopilldiv.node());return}e.dom.tip.clear().showunder(e.dom.nopilldiv.node());for(const i of e.noTermPromptOptions){const n=e.dom.tip.d.append("div").attr("class","sja_menuoption sja_sharp_border").on("click",(()=>t(this,void 0,void 0,(function*(){e.dom.tip.clear();if(i.isDictionary){yield e.showTree(e.dom.tip.d.node())}else if(i.termtype){if(i.q)e.q=structuredClone(i.q);yield e.setHandler(i.termtype);e.handler.showEditMenu(e.dom.tip.d)}else{throw"termtype missing"}}))));if(i.text)n.text(i.text);else if(i.html)n.html(i.html)}}));e.showTree=function(i,n){return t(this,void 0,void 0,(function*(){e.dom.tip.clear();if(i)e.dom.tip.showunder(i instanceof Element?i:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);if(!e.usecase)e.usecase={target:"default"};const r=yield import("./app-fb676934.js");r.appInit({holder:e.dom.tip.d,vocabApi:e.vocabApi,state:{activeCohort:e.activeCohort,tree:{usecase:e.usecase}},tree:{disable_terms:e.disable_terms,click_term:i=>t(this,void 0,void 0,(function*(){e.dom.tip.hide();let t;if(i.term)t=i;else{const e=i;t={term:e,q:{isAtomic:true},isAtomic:true}}if(e.opts.customFillTw)e.opts.customFillTw(t);yield wt(t,e.vocabApi,e.opts.defaultQ4fillTW);e.opts.callback(t)}))}})}))};e.showMenu=(t,i=null,n=null)=>{var r,o,a,l;const d=e.dom.tip;d.clear();if(e.opts.renderAs=="none"&&i)e.dom.holder=s(i);if(e.dom.holder){const i=(r=e.dom.holder)===null||r===void 0?void 0:r.node();if(i)d.showunder(i);else d.show(t.clientX,t.clientY)}const c=[];if(((o=e.q.groupsetting)===null||o===void 0?void 0:o.inuse)&&e.q.mode!="binary"){c.push({label:"Cancel grouping",callback:e.cancelGroupsetting})}if(e.q&&!((a=e.q.groupsetting)===null||a===void 0?void 0:a.disabled)&&M("edit",e.opts.menuOptions)){c.push({label:"Edit",callback:e.handler.showEditMenu})}if(M("replace",e.opts.menuOptions)){c.push({label:"Replace",callback:e.showTree})}if(M("remove",e.opts.menuOptions)){c.push({label:"Remove",callback:e.removeTerm})}if(e.opts.customMenuOptions)c.push(...e.opts.customMenuOptions);e.openMenu=n||d.d;e.openMenu.selectAll("div").data(c).enter().append("div").attr("class","sja_menuoption sja_sharp_border").attr("tabindex",((t,e)=>e+1)).style("display",e.opts.menuLayout=="horizontal"?"inline-block":"block").text((t=>t.label)).on("click",((t,i)=>{e.dom.tip.clear();i.callback(e.dom.tip.d)})).on("keyup",(t=>{if(t.key=="Enter")t.target.click()}));(l=e.openMenu.select(".sja_menuoption").node())===null||l===void 0?void 0:l.focus()};e.showReuseMenu=function(i){return t(this,void 0,void 0,(function*(){const n=i.append("div");n.style("display","block").style("padding","10px").append("span").style("color","#aaa").html("Save current setting as ");const r=e.vocabApi.getCustomTermQLst(e.term);const o=n.append("input").attr("type","text").attr("placeholder",r.nextReuseId).attr("value",e.q.reuseId||r.nextReuseId);n.append("button").style("margin-left","5px").html("Save").on("click",(()=>{const t=o.property("value").trim()||r.nextReuseId;e.q.reuseId=t;e.vocabApi.cacheTermQ(e.term,e.q);e.runCallback();e.dom.tip.hide()}));const a=i.append("div").style("margin","10px");const l={term:e.term,q:{}};yield xt(l,e.vocabApi);l.q.reuseId="Default";r.push(l.q);if(r.length>1){a.append("div").style("color","#aaa").html("Previously saved settings")}a.append("table").selectAll("tr").data(r).enter().append("tr").style("margin","2px 5px").each((function(i){const n=s(this);const r=mt(e.q,i);const o=i.name||i.reuseId;n.append("td").style("min-width","180px").style("text-align","center").html(o);const a=n.append("td").style("text-align","center");if(r){a.html(`In use <span style='color:#5a5;font-weight:600'>✓</span>`)}else{a.append("button").style("min-width","80px").html("Use").on("click",(()=>{if(i.reuseId==="Default"){delete i.reuseId;delete i.name}e.q=i;e.dom.tip.hide();e.runCallback()}))}const l=n.append("td").style("text-align","center");if(!r&&i.reuseId!="Default"){l.append("button").style("min-width","80px").html("Delete").on("click",(()=>t(this,void 0,void 0,(function*(){yield e.vocabApi.uncacheTermQ(e.term,i);e.dom.tip.hide();e.runCallback()}))))}}));i.append("div").style("margin","20px 5px 5px 5px").style("padding","5px").style("font-size","0.8em").style("color","#aaa").html(`Saving the setting will allow it to be reused at another chart.<br/>`+`The setting will be reusable in your current or saved session.`)}))};e.showGeneSearch=function(i,n){e.dom.tip.clear();if(i)e.dom.tip.showunder(i instanceof Element?i:this instanceof Element?this:e.dom.holder.node());else e.dom.tip.show(n.clientX,n.clientY);const r=new Set;const s=e.dom.tip.d.append("div").style("padding","5px");const o=s.append("label");o.append("span").text("Search: ");const a=o.append("input").attr("type","text").on("input",(()=>t(this,void 0,void 0,(function*(){const t=a.property("value");try{const i=!t?{lst:[]}:yield e.vocabApi.findTerm(t,e.activeCohort,e.usecase,"gene");l.selectAll("*").remove();l.selectAll("div").data(i.lst.filter((t=>!r.has(t)))).enter().append("div").attr("class","ts_pill sja_filter_tag_btn sja_tree_click_term").style("display","block").style("margin","2px 3px").style("width","fit-content").text((t=>t.name)).on("click",(t=>{e.dom.tip.hide();e.runCallback({term:{name:t.name,type:"geneVariant"},q:{exclude:[]}})}))}catch(t){alert("Search error: "+t)}}))));const l=e.dom.tip.d.append("div").style("margin","5px").style("padding-left","5px").style("border-left","2px solid #ccc")}}function mt(t,e){const i=[t,e].map((t=>JSON.parse(JSON.stringify(t))));for(const t of i){delete t.binLabelFormatter;if(t.reuseId==="Default")delete t.reuseId;if(t.mode==="continuous")delete t.mode;if(t.mode==="discrete"&&t.type=="custom-bin"&&t.lst){for(const e of t.lst){delete e.range}}}return n(...i)}function vt(t){return{showEditMenu(){},getPillStatus(){},getPillName(e){return yt(t,e)}}}function yt(t,e){if(!t.opts.abbrCutoff)return e.name;return e.name.length<=t.opts.abbrCutoff+2?e.name:'<label title="'+e.name+'">'+e.name.substring(0,t.opts.abbrCutoff)+"..."+"</label>"}function gt(e,i,n){return t(this,void 0,void 0,(function*(){yield bt(e,i);const t=[];for(const r of e){t.push(xt(r,i,n))}yield Promise.all(t)}))}function bt(e,i){return t(this,void 0,void 0,(function*(){const t=[];for(const i of e){if(i.term)continue;if(i.id===undefined||i.id==="")throw".id is required";t.push(i.id)}const n=t.length?yield i.getTerms(t):{};for(const i of t){if(!n[i])throw`missing dictionary term for id=${i}`;for(const t of e){if(t.id in n)t.term=n[t.id]}}}))}function xt(e,i,n){return t(this,void 0,void 0,(function*(){e.isAtomic=true;if(!e.term&&e.id){yield bt([e],i)}delete e.id;if(!e.q)e.q={};if(!e.$id)e.$id=yield ot(i.getTwMinCopy(e));e.q.isAtomic=true;yield wt(e,i,n);jt(e);return e}))}function wt(e,i,n){return t(this,void 0,void 0,(function*(){if(!e.$id)e.$id=yield ot(i.getTwMinCopy(e));const t=e.term.type;const r=t=="float"||t=="integer"?"numeric":t;let s;if(e.term.type){try{s=yield it(`./handlers/${r}.ts`)}catch(t){throw`Type ${r} does not exist`}}else throw`Type not defined for ${JSON.stringify(e)}`;yield s.fillTW(e,i,n?n[r]:null)}))}function jt(t){if(!("mode"in t.q)){return}if(typeof t.q.mode!="string")throw"q.mode not string"}function kt(t,e){if(!t.hiddenValues){t.hiddenValues={};if(e.values){for(const i in e.values){if(e.values[i].uncomputable)t.hiddenValues[i]=1}}}}export{gt as a,yt as b,xt as f,ot as g,kt as s,ut as t};
|