"use strict";(globalThis.webpackChunk_jbrowse_web=globalThis.webpackChunk_jbrowse_web||[]).push([[9372],{29372:(e,t,r)=>{r.r(t),r.d(t,{default:()=>x});var a=r(7552),s=r(75785),n=r(68446),i=r(99546),o=r(63896),l=r(67314),c=r(48171),m=r(59705),d=r(5401),u=r(49823),h=r(84313),p=r(6184),b=r(5658),g=r(50574);const f=(0,n.observer)((function({model:e,selectedAsm:t,value:r,setValue:s,setOption:n}){const o=(0,i.getSession)(e),{assemblyManager:l,textSearchManager:c}=o,{rankSearchResults:m}=e,d=e.searchScope(t),u=l.get(t);return a.createElement(b.A,{fetchResults:e=>(0,g.Jf)({queryString:e,assembly:u,textSearchManager:c,rankSearchResults:m,searchScope:d}),model:e,assemblyName:t,value:r,minWidth:270,onChange:e=>s(e),onSelect:e=>n(e),TextFieldProps:{variant:"outlined",helperText:"Enter sequence name, feature name, or location"}})})),v=(0,s.n9)()((e=>({importFormContainer:{padding:e.spacing(2)},button:{margin:e.spacing(2)},container:{padding:e.spacing(4)}}))),x=(0,n.observer)((function({model:e}){const{classes:t}=v(),r=(0,i.getSession)(e),{assemblyNames:s,assemblyManager:n}=r,{error:b}=e,[g,x]=(0,a.useState)(s[0]),[A,S]=(0,a.useState)(),y=n.get(g),k=s.length?y?.error:"No configured assemblies",w=k||b,[E,C]=(0,a.useState)(""),M=y?.regions,W=!!M,N=M?M[0]?.refName:"";return(0,a.useEffect)((()=>{C(N)}),[N,g]),a.createElement("div",{className:t.container},w?a.createElement(u.ErrorMessage,{error:w}):null,a.createElement(o.A,{className:t.importFormContainer},a.createElement("form",{onSubmit:async t=>{if(t.preventDefault(),e.setError(void 0),E)try{A?.getDisplayString()===E&&A.hasLocation()?await(0,p.Kd)({option:A,model:e,assemblyName:g}):A?.results?.length?e.setSearchResults(A.results,A.getLabel(),g):y&&await(0,p.cm)({input:E,assembly:y,model:e})}catch(e){console.error(e),r.notify(`${e}`,"warning")}}},a.createElement(l.Ay,{container:!0,spacing:1,justifyContent:"center",alignItems:"center"},a.createElement(l.Ay,{item:!0},a.createElement(c.A,null,a.createElement(u.AssemblySelector,{onChange:e=>x(e),localStorageKey:"lgv",session:r,selected:g}))),a.createElement(l.Ay,{item:!0},g?k?a.createElement(h.A,{style:{color:"red"}}):W?a.createElement(c.A,null,a.createElement(f,{value:E,setValue:C,selectedAsm:g,setOption:S,model:e})):a.createElement(m.A,{size:20,disableShrink:!0}):null),a.createElement(l.Ay,{item:!0},a.createElement(c.A,null,a.createElement(d.A,{type:"submit",disabled:!E,className:t.button,variant:"contained",color:"primary"},"Open")),a.createElement(c.A,null,a.createElement(d.A,{disabled:!E,className:t.button,onClick:()=>{e.setError(void 0),e.showAllRegionsInAssembly(g)},variant:"contained",color:"secondary"},"Show all regions in assembly")))))))}))},59705:(e,t,r)=>{r.d(t,{A:()=>E});var a=r(83673),s=r(6614),n=r(7552),i=r(93878),o=r(70799),l=r(64761),c=r(15622),m=r(4785),d=r(51148),u=r(72489),h=r(69500);const p=["className","color","disableShrink","size","style","thickness","value","variant"];let b,g,f,v,x=e=>e;const A=(0,l.i7)(b||(b=x`
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
`)),S=(0,l.i7)(g||(g=x`
  0% {
    stroke-dasharray: 1px, 200px;
    stroke-dashoffset: 0;
  }

  50% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -15px;
  }

  100% {
    stroke-dasharray: 100px, 200px;
    stroke-dashoffset: -125px;
  }
`)),y=(0,d.Ay)("span",{name:"MuiCircularProgress",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[r.variant],t[`color${(0,c.A)(r.color)}`]]}})((({ownerState:e,theme:t})=>(0,s.A)({display:"inline-block"},"determinate"===e.variant&&{transition:t.transitions.create("transform")},"inherit"!==e.color&&{color:(t.vars||t).palette[e.color].main})),(({ownerState:e})=>"indeterminate"===e.variant&&(0,l.AH)(f||(f=x`
      animation: ${0} 1.4s linear infinite;
    `),A))),k=(0,d.Ay)("svg",{name:"MuiCircularProgress",slot:"Svg",overridesResolver:(e,t)=>t.svg})({display:"block"}),w=(0,d.Ay)("circle",{name:"MuiCircularProgress",slot:"Circle",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.circle,t[`circle${(0,c.A)(r.variant)}`],r.disableShrink&&t.circleDisableShrink]}})((({ownerState:e,theme:t})=>(0,s.A)({stroke:"currentColor"},"determinate"===e.variant&&{transition:t.transitions.create("stroke-dashoffset")},"indeterminate"===e.variant&&{strokeDasharray:"80px, 200px",strokeDashoffset:0})),(({ownerState:e})=>"indeterminate"===e.variant&&!e.disableShrink&&(0,l.AH)(v||(v=x`
      animation: ${0} 1.4s ease-in-out infinite;
    `),S))),E=n.forwardRef((function(e,t){const r=(0,m.b)({props:e,name:"MuiCircularProgress"}),{className:n,color:l="primary",disableShrink:d=!1,size:b=40,style:g,thickness:f=3.6,value:v=0,variant:x="indeterminate"}=r,A=(0,a.A)(r,p),S=(0,s.A)({},r,{color:l,disableShrink:d,size:b,thickness:f,value:v,variant:x}),E=(e=>{const{classes:t,variant:r,color:a,disableShrink:s}=e,n={root:["root",r,`color${(0,c.A)(a)}`],svg:["svg"],circle:["circle",`circle${(0,c.A)(r)}`,s&&"circleDisableShrink"]};return(0,o.A)(n,u.b,t)})(S),C={},M={},W={};if("determinate"===x){const e=2*Math.PI*((44-f)/2);C.strokeDasharray=e.toFixed(3),W["aria-valuenow"]=Math.round(v),C.strokeDashoffset=`${((100-v)/100*e).toFixed(3)}px`,M.transform="rotate(-90deg)"}return(0,h.jsx)(y,(0,s.A)({className:(0,i.A)(E.root,n),style:(0,s.A)({width:b,height:b},M,g),ownerState:S,ref:t,role:"progressbar"},W,A,{children:(0,h.jsx)(k,{className:E.svg,ownerState:S,viewBox:"22 22 44 44",children:(0,h.jsx)(w,{className:E.circle,style:C,ownerState:S,cx:44,cy:44,r:(44-f)/2,fill:"none",strokeWidth:f})})}))}))},72489:(e,t,r)=>{r.d(t,{A:()=>i,b:()=>n});var a=r(33761),s=r(85693);function n(e){return(0,s.Ay)("MuiCircularProgress",e)}const i=(0,a.A)("MuiCircularProgress",["root","determinate","indeterminate","colorPrimary","colorSecondary","svg","circle","circleDeterminate","circleIndeterminate","circleDisableShrink"])},63896:(e,t,r)=>{r.d(t,{A:()=>y});var a=r(83673),s=r(6614),n=r(7552),i=r(93878),o=r(85693),l=r(70799),c=r(33283),m=r(97269),d=r(49267),u=r(25269),h=r(69500);const p=["className","component","disableGutters","fixed","maxWidth","classes"],b=(0,u.A)(),g=(0,d.A)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,c.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),f=e=>(0,m.A)({props:e,name:"MuiContainer",defaultTheme:b});var v=r(15622),x=r(51148),A=r(4785);const S=function(e={}){const{createStyledComponent:t=g,useThemeProps:r=f,componentName:m="MuiContainer"}=e,d=t((({theme:e,ownerState:t})=>(0,s.A)({width:"100%",marginLeft:"auto",boxSizing:"border-box",marginRight:"auto",display:"block"},!t.disableGutters&&{paddingLeft:e.spacing(2),paddingRight:e.spacing(2),[e.breakpoints.up("sm")]:{paddingLeft:e.spacing(3),paddingRight:e.spacing(3)}})),(({theme:e,ownerState:t})=>t.fixed&&Object.keys(e.breakpoints.values).reduce(((t,r)=>{const a=r,s=e.breakpoints.values[a];return 0!==s&&(t[e.breakpoints.up(a)]={maxWidth:`${s}${e.breakpoints.unit}`}),t}),{})),(({theme:e,ownerState:t})=>(0,s.A)({},"xs"===t.maxWidth&&{[e.breakpoints.up("xs")]:{maxWidth:Math.max(e.breakpoints.values.xs,444)}},t.maxWidth&&"xs"!==t.maxWidth&&{[e.breakpoints.up(t.maxWidth)]:{maxWidth:`${e.breakpoints.values[t.maxWidth]}${e.breakpoints.unit}`}}))),u=n.forwardRef((function(e,t){const n=r(e),{className:u,component:b="div",disableGutters:g=!1,fixed:f=!1,maxWidth:v="lg"}=n,x=(0,a.A)(n,p),A=(0,s.A)({},n,{component:b,disableGutters:g,fixed:f,maxWidth:v}),S=((e,t)=>{const{classes:r,fixed:a,disableGutters:s,maxWidth:n}=e,i={root:["root",n&&`maxWidth${(0,c.A)(String(n))}`,a&&"fixed",s&&"disableGutters"]};return(0,l.A)(i,(e=>(0,o.Ay)(t,e)),r)})(A,m);return(0,h.jsx)(d,(0,s.A)({as:b,ownerState:A,className:(0,i.A)(S.root,u),ref:t},x))}));return u}({createStyledComponent:(0,x.Ay)("div",{name:"MuiContainer",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:r}=e;return[t.root,t[`maxWidth${(0,v.A)(String(r.maxWidth))}`],r.fixed&&t.fixed,r.disableGutters&&t.disableGutters]}}),useThemeProps:e=>(0,A.b)({props:e,name:"MuiContainer"})}),y=S}}]);
//# sourceMappingURL=9372.6e7e0534.chunk.js.map