Mercurial > repos > fubar > jbrowse2
view x/static/js/5930.0ffd2546.chunk.js.map @ 125:49f3d3878413 draft
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/jbrowse2 commit 5ea1f9c1eef1de76232e69aa6d34cda77d90d566
author | fubar |
---|---|
date | Sat, 05 Oct 2024 23:58:05 +0000 |
parents | |
children |
line wrap: on
line source
{"version":3,"file":"static/js/5930.0ffd2546.chunk.js","mappings":"4QAIA,MAAMA,GAAYC,E,SAAAA,KAAAA,CAAa,CAC7BC,MAAO,CACLC,QAAS,WAIE,SAASC,GAAU,QAChCC,EAAO,SACPC,EAAQ,MACRC,EAAK,SACLC,IAOA,MAAM,QAAEC,GAAYT,IACpB,OACEU,EAAAA,cAACC,EAAAA,EAAgB,CACfL,SAAUA,EACVM,UAAWH,EAAQP,MACnBW,QAASH,EAAAA,cAACI,EAAAA,EAAQ,CAACT,QAASA,EAASG,SAAUA,IAC/CD,MAAOA,GAGb,CCPA,SAASQ,EAASC,GAChB,OAAOA,EAAIC,KAAI,EAAGC,KAAIC,cAAaC,MAAW,IACzCA,EACHD,SAAUA,EAASF,KAAI,EAAGC,QAAOE,KAAWA,OAEhD,CAEA,MAyKA,GAzKuCC,EAAAA,EAAAA,WAAS,UAAU,MACxDC,EAAK,YACLC,EAAW,QACXC,EAAO,aACPC,EAAY,SACZC,EAAQ,KACRC,IAmBA,MAAOC,EAAYC,IAAiBC,EAAAA,EAAAA,WAAS,IACtCC,EAAQC,IAAaF,EAAAA,EAAAA,WAAS,GAErC,OACEpB,EAAAA,cAACuB,EAAAA,OAAM,CACLC,MAAI,EACJC,QAASZ,EACTa,MAAM,6CAEN1B,EAAAA,cAAC2B,EAAAA,EAAa,KACZ3B,EAAAA,cAACN,EAAS,CACRC,QAASuB,EACTrB,MAAM,gCACNC,SAAU8B,IACRT,EAAcS,EAAMC,OAAOlC,QAAQ,IAItCuB,EACClB,EAAAA,cAACN,EAAS,CACRC,QAAS0B,EACTzB,UAAWsB,EACXr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YAAWtB,GAE1B,WACC,IACE,MAAMgC,EAAWX,EAAQG,gBAAgBgB,IAAIrC,GACvCmE,GAAKL,EACX,GAAIM,OAAOC,MAAMF,GACf,MAAM,IAAI5C,MAAM,2BAElB,MAAM,QAAEC,EAAO,IAAEC,EAAG,YAAEC,EAAW,QAAEC,GAEjC1B,EAAS2B,2BAA2B,CAAE7B,UAAS8B,aAE3CI,EAAsBf,EAAQgB,QAClC,sBACA,CACEC,KAAM,sBACNC,YAAa,GACXrC,EAAQsC,IAAI,SAAWtC,EAAQsC,IAAI,OAAS,0BAE9CC,MAAO,CACL,CACEH,KAAM,mBACNH,QAvFNzC,GAuFuBwC,EAAAA,EAAAA,aAAY7B,EAAK8B,QAtFjDzC,EAAIC,KAAI,EAAGC,KAAIC,cAAaC,MAAW,IACzCA,EACHD,SAAUA,EAASF,KAAI,EAAGC,QAAOE,KAAWA,mBA0F1BsC,EAAoBK,MAAM,GAAIU,gBAClCsB,EAAAA,EAAAA,gBACE,CACE,CACE9C,UACAyB,MAAOsB,KAAKC,IAAI,EAAG/C,EAAM0C,GACzBjB,IAAKzB,EAAM0C,EACXnE,gBAEF,CACEwB,QAASE,EACTuB,MAAOsB,KAAKC,IAAI,EAAG7C,EAAUwC,GAC7BjB,IAAKvB,EAAUwC,EACfnE,iBAGJmE,GAGN,CAAE,MAAOZ,GACPC,QAAQC,MAAMF,GACdrC,EAAQwC,OAAO,GAAGH,IACpB,CAnHd,IAAkBhE,CAoHL,EAlDA,GAmDDO,GAAa,EAEf6D,QAAQ,YACRC,MAAM,UACNC,WAAS,GACV,MAGD5E,EAAAA,cAAC+B,EAAAA,EAAM,CACL4C,MAAM,YACND,QAAQ,YACR1C,QAASA,KACPnB,GAAa,GAEhB,WAMT,G","sources":["../../../packages/sv-core/src/Checkbox2.tsx","../../../packages/sv-core/src/BreakendMultiLevelOptionDialog.tsx","../../../packages/sv-core/src/BreakendSingleLevelOptionDialog.tsx"],"sourcesContent":["import React from 'react'\nimport { Checkbox, FormControlLabel } from '@mui/material'\nimport { makeStyles } from 'tss-react/mui'\n\nconst useStyles = makeStyles()({\n block: {\n display: 'block',\n },\n})\n\nexport default function Checkbox2({\n checked,\n disabled,\n label,\n onChange,\n}: {\n checked: boolean\n disabled?: boolean\n label: string\n onChange: (event: React.ChangeEvent<HTMLInputElement>) => void\n}) {\n const { classes } = useStyles()\n return (\n <FormControlLabel\n disabled={disabled}\n className={classes.block}\n control={<Checkbox checked={checked} onChange={onChange} />}\n label={label}\n />\n )\n}\n","import React, { useState } from 'react'\nimport { observer } from 'mobx-react'\nimport { Button, DialogActions, DialogContent } from '@mui/material'\nimport { getSnapshot } from 'mobx-state-tree'\nimport { Dialog } from '@jbrowse/core/ui'\nimport { when } from 'mobx'\nimport { getSession, Feature } from '@jbrowse/core/util'\nimport type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\nimport type { Assembly } from '@jbrowse/core/assemblyManager/assembly'\n\n// locals\nimport Checkbox2 from './Checkbox2'\n\ninterface Display {\n id: string\n [key: string]: unknown\n}\ninterface Track {\n id: string\n displays: Display[]\n [key: string]: unknown\n}\n\nfunction stripIds(arr: Track[]) {\n return arr.map(({ id, displays, ...rest }) => ({\n ...rest,\n displays: displays.map(({ id, ...rest }) => rest),\n }))\n}\n\nconst BreakendMultiLevelOptionDialog = observer(function ({\n model,\n handleClose,\n feature,\n assemblyName,\n viewType,\n view,\n}: {\n model: unknown\n handleClose: () => void\n feature: Feature\n view: LinearGenomeViewModel\n assemblyName: string\n viewType: {\n getBreakendCoveringRegions: (arg: {\n feature: Feature\n assembly: Assembly\n }) => {\n pos: number\n refName: string\n mateRefName: string\n matePos: number\n }\n }\n}) {\n const [copyTracks, setCopyTracks] = useState(true)\n const [mirror, setMirror] = useState(true)\n\n return (\n <Dialog\n open\n onClose={handleClose}\n title=\"Multi-level breakpoint split view options\"\n >\n <DialogContent>\n <Checkbox2\n checked={copyTracks}\n label=\"Copy tracks into the new view\"\n onChange={event => {\n setCopyTracks(event.target.checked)\n }}\n />\n\n {copyTracks ? (\n <Checkbox2\n checked={mirror}\n disabled={!copyTracks}\n label=\"Mirror the copied tracks (only available if copying tracks and using two level)\"\n onChange={event => {\n setMirror(event.target.checked)\n }}\n />\n ) : null}\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n const session = getSession(model)\n try {\n const asm =\n await session.assemblyManager.waitForAssembly(assemblyName)\n if (!asm) {\n throw new Error(`assembly ${assemblyName} not found`)\n }\n\n const { refName, pos, mateRefName, matePos } =\n viewType.getBreakendCoveringRegions({\n feature,\n assembly: asm,\n })\n\n const viewTracks = getSnapshot(view.tracks) as Track[]\n const breakpointSplitView = session.addView(\n 'BreakpointSplitView',\n {\n type: 'BreakpointSplitView',\n displayName: `${\n feature.get('name') || feature.get('id') || 'breakend'\n } split detail`,\n\n views: [\n {\n type: 'LinearGenomeView',\n hideHeader: true,\n tracks: stripIds(getSnapshot(view.tracks)),\n },\n {\n type: 'LinearGenomeView',\n hideHeader: true,\n tracks: stripIds(\n mirror ? [...viewTracks].reverse() : viewTracks,\n ),\n },\n ],\n },\n ) as unknown as { views: LinearGenomeViewModel[] }\n const r1 = asm.regions!.find(r => r.refName === refName)\n const r2 = asm.regions!.find(r => r.refName === mateRefName)\n if (!r1 || !r2) {\n throw new Error(\"can't find regions\")\n }\n await Promise.all([\n breakpointSplitView.views[0]!.navToLocations([\n {\n refName,\n start: r1.start,\n end: pos,\n assemblyName,\n },\n {\n refName,\n start: pos + 1,\n end: r1.end,\n assemblyName,\n },\n ]),\n breakpointSplitView.views[1]!.navToLocations([\n {\n refName: mateRefName,\n start: r2.start,\n end: matePos,\n assemblyName,\n },\n {\n refName: mateRefName,\n start: matePos + 1,\n end: r2.end,\n assemblyName,\n },\n ]),\n ])\n await when(\n () =>\n breakpointSplitView.views[1]!.initialized &&\n breakpointSplitView.views[0]!.initialized,\n )\n breakpointSplitView.views[1]!.zoomTo(10)\n breakpointSplitView.views[0]!.zoomTo(10)\n breakpointSplitView.views[1]!.centerAt(matePos, mateRefName)\n breakpointSplitView.views[0]!.centerAt(pos, refName)\n } catch (e) {\n console.error(e)\n session.notify(`${e}`)\n }\n })()\n handleClose()\n }}\n variant=\"contained\"\n color=\"primary\"\n autoFocus\n >\n OK\n </Button>\n <Button\n color=\"secondary\"\n variant=\"contained\"\n onClick={() => {\n handleClose()\n }}\n >\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default BreakendMultiLevelOptionDialog\n","import React, { useState } from 'react'\nimport { observer } from 'mobx-react'\nimport { Button, DialogActions, DialogContent, TextField } from '@mui/material'\nimport { getSnapshot } from 'mobx-state-tree'\nimport { Dialog } from '@jbrowse/core/ui'\nimport {\n getSession,\n Feature,\n gatherOverlaps,\n useLocalStorage,\n} from '@jbrowse/core/util'\nimport type { LinearGenomeViewModel } from '@jbrowse/plugin-linear-genome-view'\nimport type { Assembly } from '@jbrowse/core/assemblyManager/assembly'\n\n// locals\nimport Checkbox2 from './Checkbox2'\n\ninterface Display {\n id: string\n [key: string]: unknown\n}\ninterface Track {\n id: string\n displays: Display[]\n [key: string]: unknown\n}\n\nfunction stripIds(arr: Track[]) {\n return arr.map(({ id, displays, ...rest }) => ({\n ...rest,\n displays: displays.map(({ id, ...rest }) => rest),\n }))\n}\n\nconst BreakendSingleLevelOptionDialog = observer(function ({\n model,\n handleClose,\n feature,\n assemblyName,\n viewType,\n view,\n}: {\n model: unknown\n handleClose: () => void\n feature: Feature\n view: LinearGenomeViewModel\n assemblyName: string\n viewType: {\n getBreakendCoveringRegions: (arg: {\n feature: Feature\n assembly: Assembly\n }) => {\n pos: number\n refName: string\n mateRefName: string\n matePos: number\n }\n }\n}) {\n const [copyTracks, setCopyTracks] = useState(true)\n const [windowSize, setWindowSize] = useLocalStorage(\n 'breakpointWindowSize',\n '5000',\n )\n\n return (\n <Dialog\n open\n onClose={handleClose}\n title=\"Single-level breakpoint split view options\"\n >\n <DialogContent>\n <Checkbox2\n checked={copyTracks}\n label=\"Copy tracks into the new view\"\n onChange={event => {\n setCopyTracks(event.target.checked)\n }}\n />\n\n <TextField\n label=\"Window size (bp)\"\n value={windowSize}\n onChange={event => {\n setWindowSize(event.target.value)\n }}\n />\n </DialogContent>\n <DialogActions>\n <Button\n onClick={() => {\n const session = getSession(model)\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n ;(async () => {\n try {\n const assembly = session.assemblyManager.get(assemblyName)\n const w = +windowSize\n if (Number.isNaN(w)) {\n throw new Error('windowSize not a number')\n }\n const { refName, pos, mateRefName, matePos } =\n // @ts-expect-error\n viewType.getBreakendCoveringRegions({ feature, assembly })\n\n const breakpointSplitView = session.addView(\n 'BreakpointSplitView',\n {\n type: 'BreakpointSplitView',\n displayName: `${\n feature.get('name') || feature.get('id') || 'breakend'\n } split detail`,\n views: [\n {\n type: 'LinearGenomeView',\n tracks: stripIds(getSnapshot(view.tracks)),\n },\n ],\n },\n ) as unknown as { views: LinearGenomeViewModel[] }\n\n await breakpointSplitView.views[0]!.navToLocations(\n gatherOverlaps(\n [\n {\n refName,\n start: Math.max(0, pos - w),\n end: pos + w,\n assemblyName,\n },\n {\n refName: mateRefName,\n start: Math.max(0, matePos - w),\n end: matePos + w,\n assemblyName,\n },\n ],\n w,\n ),\n )\n } catch (e) {\n console.error(e)\n session.notify(`${e}`)\n }\n })()\n handleClose()\n }}\n variant=\"contained\"\n color=\"primary\"\n autoFocus\n >\n OK\n </Button>\n <Button\n color=\"secondary\"\n variant=\"contained\"\n onClick={() => {\n handleClose()\n }}\n >\n Cancel\n </Button>\n </DialogActions>\n </Dialog>\n )\n})\n\nexport default BreakendSingleLevelOptionDialog\n"],"names":["useStyles","makeStyles","block","display","Checkbox2","checked","disabled","label","onChange","classes","React","FormControlLabel","className","control","Checkbox","stripIds","arr","map","id","displays","rest","observer","model","handleClose","feature","assemblyName","viewType","view","copyTracks","setCopyTracks","useState","mirror","setMirror","Dialog","open","onClose","title","DialogContent","event","target","DialogActions","Button","onClick","session","getSession","asm","assemblyManager","waitForAssembly","Error","refName","pos","mateRefName","matePos","getBreakendCoveringRegions","assembly","viewTracks","getSnapshot","tracks","breakpointSplitView","addView","type","displayName","get","views","hideHeader","reverse","r1","regions","find","r","r2","Promise","all","navToLocations","start","end","when","initialized","zoomTo","centerAt","e","console","error","notify","variant","color","autoFocus","windowSize","setWindowSize","useLocalStorage","TextField","value","w","Number","isNaN","gatherOverlaps","Math","max"],"sourceRoot":""}