view x/static/js/8762.3d2b9142.chunk.js @ 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

"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[8762],{58762:(e,t,a)=>{a.r(t),a.d(t,{default:()=>D});var s=a(7552),n=a(68446),o=a(943),r=a(58181),i=a(55851),l=a(75785),c=a(45331),d=a(70087),m=a(66765),p=a(81453),u=a(93091),v=a.n(u),g=a(74893),b=a(69500);const h=(0,g.A)((0,b.jsx)("path",{d:"M3 14h4v-4H3zm0 5h4v-4H3zM3 9h4V5H3zm5 5h13v-4H8zm0 5h13v-4H8zM8 5v4h13V5z"}),"ViewList");var A=a(99546);const y=(0,n.observer)((function({session:e,sessionSnapshot:t,onClick:a,secondaryAction:n}){const{views:o=[]}=t,r=(0,A.sum)(o.map((e=>e.tracks?.length??0))),i=o.length;return s.createElement(c.Ay,{secondaryAction:n},s.createElement(d.A,{onClick:a},s.createElement(m.A,null,s.createElement(h,null)),s.createElement(p.A,{primary:t.name,secondary:e.name===t.name?"Currently open":`${i} ${v()("view",i)}; ${r} open ${v()("track",r)}`})))})),f=(0,l.n9)()((e=>({root:{margin:e.spacing(1)}}))),C=(0,n.observer)((function({session:e}){const{classes:t}=f(),a=JSON.parse(localStorage.getItem(e.previousAutosaveId)||"{}").session;return a?s.createElement(o.A,{className:t.root},s.createElement(r.A,{subheader:s.createElement(i.A,null,"Previous autosaved entry")},s.createElement(y,{session:e,sessionSnapshot:a,onClick:()=>{e.loadAutosaveSession()}}))):null}));var E=a(61723),k=a(36715),S=a(25762),$=a(29499),x=a(99123),w=a(58507),I=a(5401),O=a(49823);function N({open:e,sessionNameToDelete:t,handleClose:a}){return s.createElement(O.Dialog,{open:e,title:`Delete session "${t}"?`},s.createElement($.A,null,s.createElement(x.A,null,"This action cannot be undone")),s.createElement(w.A,null,s.createElement(I.A,{onClick:()=>{a()},color:"primary"},"Cancel"),s.createElement(I.A,{onClick:()=>{a(!0)},color:"primary",autoFocus:!0},"Delete")))}const V=(0,l.n9)()((e=>({root:{margin:e.spacing(1)},message:{padding:e.spacing(3)}}))),z=(0,n.observer)((function({session:e}){const{classes:t}=V(),[a,n]=(0,s.useState)(),l=void 0!==a?e.savedSessions[a].name:"";return s.createElement(o.A,{className:t.root},s.createElement(r.A,{subheader:s.createElement(i.A,null,"Saved sessions")},e.savedSessions.length?e.savedSessions.map(((t,a)=>s.createElement(y,{onClick:()=>{e.activateSession(t.name)},sessionSnapshot:t,session:e,key:t.name,secondaryAction:s.createElement(E.A,{edge:"end",disabled:e.name===t.name,onClick:()=>{n(a)}},s.createElement(S.A,null))}))):s.createElement(k.A,{className:t.message},"No saved sessions found")),l?s.createElement(s.Suspense,{fallback:null},s.createElement(N,{open:!0,sessionNameToDelete:l,handleClose:function(t=!1){t&&void 0!==a&&e.removeSavedSession(e.savedSessions[a]),n(void 0)}})):null)})),D=(0,n.observer)((function({session:e}){return s.createElement(s.Fragment,null,s.createElement(C,{session:e}),s.createElement(z,{session:e}))}))},70087:(e,t,a)=>{a.d(t,{A:()=>A});var s=a(7552),n=a(93878),o=a(70799),r=a(72639),i=a(51148),l=a(60129),c=a(4785),d=a(55270),m=a(48054),p=a(82910),u=a(51584),v=a(57406),g=a(2451),b=a(69500);const h=(0,i.Ay)(m.A,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiListItemButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:a}=e;return[t.root,a.dense&&t.dense,"flex-start"===a.alignItems&&t.alignItemsFlexStart,a.divider&&t.divider,!a.disableGutters&&t.gutters]}})((0,l.A)((({theme:e})=>({display:"flex",flexGrow:1,justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minWidth:0,boxSizing:"border-box",textAlign:"left",paddingTop:8,paddingBottom:8,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{textDecoration:"none",backgroundColor:(e.vars||e).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},[`&.${g.A.selected}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,r.X4)(e.palette.primary.main,e.palette.action.selectedOpacity),[`&.${g.A.focusVisible}`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.focusOpacity}))`:(0,r.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.focusOpacity)}},[`&.${g.A.selected}:hover`]:{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / calc(${e.vars.palette.action.selectedOpacity} + ${e.vars.palette.action.hoverOpacity}))`:(0,r.X4)(e.palette.primary.main,e.palette.action.selectedOpacity+e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:e.vars?`rgba(${e.vars.palette.primary.mainChannel} / ${e.vars.palette.action.selectedOpacity})`:(0,r.X4)(e.palette.primary.main,e.palette.action.selectedOpacity)}},[`&.${g.A.focusVisible}`]:{backgroundColor:(e.vars||e).palette.action.focus},[`&.${g.A.disabled}`]:{opacity:(e.vars||e).palette.action.disabledOpacity},variants:[{props:({ownerState:e})=>e.divider,style:{borderBottom:`1px solid ${(e.vars||e).palette.divider}`,backgroundClip:"padding-box"}},{props:{alignItems:"flex-start"},style:{alignItems:"flex-start"}},{props:({ownerState:e})=>!e.disableGutters,style:{paddingLeft:16,paddingRight:16}},{props:({ownerState:e})=>e.dense,style:{paddingTop:4,paddingBottom:4}}]})))),A=s.forwardRef((function(e,t){const a=(0,c.b)({props:e,name:"MuiListItemButton"}),{alignItems:r="center",autoFocus:i=!1,component:l="div",children:d,dense:m=!1,disableGutters:A=!1,divider:y=!1,focusVisibleClassName:f,selected:C=!1,className:E,...k}=a,S=s.useContext(v.A),$=s.useMemo((()=>({dense:m||S.dense||!1,alignItems:r,disableGutters:A})),[r,S.dense,m,A]),x=s.useRef(null);(0,p.A)((()=>{i&&x.current&&x.current.focus()}),[i]);const w={...a,alignItems:r,dense:$.dense,disableGutters:A,divider:y,selected:C},I=(e=>{const{alignItems:t,classes:a,dense:s,disabled:n,disableGutters:r,divider:i,selected:l}=e,c={root:["root",s&&"dense",!r&&"gutters",i&&"divider",n&&"disabled","flex-start"===t&&"alignItemsFlexStart",l&&"selected"]},d=(0,o.A)(c,g.Y,a);return{...a,...d}})(w),O=(0,u.A)(x,t);return(0,b.jsx)(v.A.Provider,{value:$,children:(0,b.jsx)(h,{ref:O,href:k.href||k.to,component:(k.href||k.to)&&"div"===l?"button":l,focusVisibleClassName:(0,n.A)(I.focusVisible,f),ownerState:w,className:(0,n.A)(I.root,E),...k,classes:I,children:d})})}))}}]);
//# sourceMappingURL=8762.3d2b9142.chunk.js.map