this.webpackChunk([33],{2047:function(e,t,a){"use strict";a.r(t);var n=a(9),r=a(0),c=a.n(r),i=a(358),l=a(916),o=a(908),u=a(686),s=a(99),m=a(958),p=a(162),d=a(16),f=a(7),g=a(223),v=a.n(g),E=a(469),b=a(87),h=Object(i.a)((function(){return{compact:{paddingRight:0,paddingTop:0,paddingBottom:0}}})),S=["clipPos","flags"];function y(e){var t=h(),a=e.feature.flags;return c.a.createElement(E.BaseCard,Object.assign({},e,{title:"Flags"}),c.a.createElement(E.SimpleValue,{name:"Flag",value:a}),c.a.createElement(l.a,null,["read paired","read mapped in proper pair","read unmapped","mate unmapped","read reverse strand","mate reverse strand","first in pair","second in pair","not primary alignment","read fails platform/vendor quality checks","read is PCR or optical duplicate","supplementary alignment"].map((function(e,n){var r=a&1<<n,i="".concat(e,"_").concat(r);return c.a.createElement(o.a,{key:i,control:c.a.createElement(u.a,{className:t.compact,checked:Boolean(r),name:e,readOnly:!0}),label:e})}))))}function O(e){var t=e.value,a=Object(r.useState)(!1),i=Object(n.a)(a,2),l=i[0],o=i[1],u=String(t);return u.length>100?c.a.createElement(c.a.Fragment,null,c.a.createElement("button",{type:"button",onClick:function(){return v()(u)}},"Copy"),c.a.createElement("button",{type:"button",onClick:function(){return o((function(e){return!e}))}},l?"Show less":"Show more"),c.a.createElement("div",null,l?u:"".concat(u.slice(0,100),"..."))):c.a.createElement("div",null,u)}function j(e){var t=e.tag,a=e.model,r=Object(f.getSession)(a);return c.a.createElement(E.BaseCard,Object.assign({},e,{title:"Supplementary alignments"}),c.a.createElement(s.a,null,"List of supplementary alignment locations"),c.a.createElement("ul",null,t.split(";").filter((function(e){return!!e})).map((function(e,t){var i=e.split(","),l=Object(n.a)(i,4),o=l[0],u=l[1],s=l[2],p=function(e){for(var t=Object(b.parseCigar)(e),a=0,n=0;n<t.length;n+=2){var r=+t[n],c=t[n+1];"H"!==c&&"S"!==c&&"I"!==c&&(a+=r)}return a}(l[3]),d=Math.floor(p/5),f=+u,g=+u+p,v="".concat(o,":").concat(Math.max(1,f-d),"-").concat(g+d),E="".concat(o,":").concat(f,"-").concat(g," (").concat(s,")");return c.a.createElement("li",{key:"".concat(v,"-").concat(t)},c.a.createElement(m.a,{onClick:function(){var e=a.view;e?e.navToLocString(v):r.notify("No view associated with this feature detail panel anymore","warning")},href:"#"},E))}))))}function w(e){var t=e.locString,a=e.model,n=Object(f.getSession)(a);return c.a.createElement(m.a,{onClick:function(){var e=a.view;e?e.navToLocString(t):n.notify("No view associated with this feature detail panel anymore","warning")},href:"#"},t)}t.default=Object(d.observer)((function(e){var t=e.model,a=JSON.parse(JSON.stringify(t.featureData)),n=a.tags&&a.tags.SA||a.SA;return c.a.createElement(p.a,{"data-testid":"alignment-side-drawer"},c.a.createElement(E.FeatureDetails,Object.assign({},e,{omit:S,feature:a,formatter:function(e,a){return"next_segment_position"===a?c.a.createElement(w,{model:t,locString:e}):c.a.createElement(O,{value:e})}})),n?c.a.createElement(j,{model:t,tag:n}):null,c.a.createElement(y,Object.assign({feature:a},e)))}))}});
//# sourceMappingURL=33.755b57b40b029263b59b.worker.js.map