(window.webpackJsonp=window.webpackJsonp||[]).push([["u1O4"],{"8uWu":function(e,t,n){"use strict";var r=n("TqRt");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var r={},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&Object.prototype.hasOwnProperty.call(e,l)){var s=o?Object.getOwnPropertyDescriptor(e,l):null;s&&(s.get||s.set)?Object.defineProperty(r,l,s):r[l]=e[l]}r.default=e,n&&n.set(e,r);return r}(n("q1tI")),l=n("mR6N"),s=r(n("Pwnf")),u=r(n("CnBM")),i=r(n("lTCR")),a=n("Pk2J"),c=r(n("Q8Wn")),d=r(n("uEGL")),f=r(n("A1nh")),p=r(n("cfQQ")),g=r(n("4Du/")),m=r(n("yA8i")),h=n("8r+/"),b=n("dt1K"),j=n("hDgO");let v;function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}const P=(0,u.default)({loader:()=>Promise.all([n.e("corelibs"),n.e("moment"),n.e("shared"),n.e("6YAN"),n.e("5CJo"),n.e("2UsG"),n.e("hAup"),n.e("7DhS"),n.e("2Uus"),n.e("1BNf"),n.e("s7JZ"),n.e("Gvib"),n.e("69An")]).then(n.t.bind(null,"ChPQ",7)),modules:["ChPQ"],loading:()=>o.createElement("div",{className:(0,l.css)(w.assignmentLoadingIndicator)},o.createElement(f.default,{size:"xsmall",light:!0}))}),S=(0,h.gqlOp)((0,i.default)(v||(v=(e=>e)`
    query getAllSubject {
        domains: studentListTopics {
            subjects: topics {
                id
                slug
            }
        }
    }
`)));class O extends o.Component{render(){const{contentDescriptor:e,contentPath:t,contentTitle:n,initialAssignment:r,subjectSlugs:l,location:{pathname:s},profile:u,profileLoading:i,profileError:a}=this.props;if(i||a||null==u||!u.get("hasClasses"))return null;const c=l&&(0,b.getMostRelevantSubjectSlugFromUrl)(l,s)||"";return o.createElement(P,{contentDescriptor:e,contentTitle:n,contentPath:t,initialAssignment:r,subjectSlug:c})}}const w=l.StyleSheet.create({assignmentLoadingIndicator:{display:"flex",alignItems:"center",justifyContent:"center",height:j.topBarHeightDesktop,backgroundColor:s.default.darkBlue,[d.default.smOrSmaller]:{height:j.topBarHeightMobile}}});var M=(0,a.compose)(g.default,p.default,(0,m.default)({query:S,curriculum:c.default.curriculum,fetchPolicy:"cache-first",mapResultToProps:({data:e})=>{const t=[];if(null==e||!e.domains)return{subjectSlugs:t};for(const n of e.domains)for(const e of n.subjects)t.push(e.slug);return{subjectSlugs:t}}}))(O);t.default=M},dt1K:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getMostRelevantSubjectSlugFromUrl=void 0;t.getMostRelevantSubjectSlugFromUrl=(e,t)=>t.slice(1).split("/").reverse().find((t=>e.includes(t)))||"other"}}]);
//# sourceMappingURL=../../sourcemaps/en/u1O4.95318e5c186b3ab0fc1c.js.map