define(["gpui-style-inject","react","mobx"],(function(e,t,r){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var i=n(e),a=n(t),c=o(t);
/*! *****************************************************************************
    Copyright (c) Microsoft Corporation.

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
    REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
    AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
    INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
    LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
    OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
    PERFORMANCE OF THIS SOFTWARE.
    ***************************************************************************** */
function l(e,t,r,n){var o,i=arguments.length,a=i<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,r,n);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(i<3?o(a):i>3?o(t,r,a):o(t,r))||a);return i>3&&a&&Object.defineProperty(t,r,a),a}i.default("html, body, #root {\n  width: 100%;\n  height: 100%;\n  margin: 0;\n  padding: 0;\n  overflow: hidden; }\n\n.g__index {\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  height: 100%; }\n");var s="index-module_list__brmfx",u="index-module_item__-r1wX",d="index-module_border__nrw1R";if(i.default(".index-module_list__brmfx {\n  display: flex;\n  flex-direction: column;\n  justify-content: space-between;\n  align-content: space-around;\n  width: 100%;\n  height: 100%; }\n  .index-module_list__brmfx .index-module_item__-r1wX {\n    cursor: pointer;\n    position: relative;\n    width: 100%;\n    height: 15vh;\n    line-height: 15vh;\n    font-size: 5.8vh;\n    color: #a5c6fc;\n    text-align: center;\n    z-index: 1; }\n    .index-module_list__brmfx .index-module_item__-r1wX .index-module_border__nrw1R {\n      position: absolute;\n      top: 0;\n      left: 0;\n      width: 100%;\n      height: 100%;\n      z-index: -1; }\n"),!t.useState)throw new Error("mobx-react-lite requires React with Hooks support");if(!r.spy)throw new Error("mobx-react-lite requires mobx at least version 4 to be available");function f(){return f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},f.apply(this,arguments)}function p(){var e=t.useState(0)[1];return t.useCallback((function(){e((function(e){return e+1}))}),[])}function h(e){return r.getDependencyTree(e)}var m,v=1e4,b=1e4,y=new Set;function w(){void 0===m&&(m=setTimeout(g,b))}function g(){m=void 0;var e=Date.now();y.forEach((function(t){var r=t.current;r&&e>=r.cleanAt&&(r.reaction.dispose(),t.current=null,y.delete(t))})),y.size>0&&w()}var _={};function x(e){return"observer"+e}function O(e,t,n){void 0===t&&(t="observed"),void 0===n&&(n=_);var o,i=(n.useForceUpdate||p)(),c=a.default.useRef(null);if(!c.current){var l=new r.Reaction(x(t),(function(){s.mounted?i():(l.dispose(),c.current=null)})),s=function(e){return{cleanAt:Date.now()+v,reaction:e}}(l);c.current=s,o=c,y.add(o),w()}var u,d,f=c.current.reaction;if(a.default.useDebugValue(f,h),a.default.useEffect((function(){var e;return e=c,y.delete(e),c.current?c.current.mounted=!0:(c.current={reaction:new r.Reaction(x(t),(function(){i()})),cleanAt:1/0},i()),function(){c.current.reaction.dispose(),c.current=null}}),[]),f.track((function(){try{u=e()}catch(e){d=e}})),d)throw d;return u}function j(e,r){var n,o,i,a=f({forwardRef:!1},r),c=e.displayName||e.name,l=function(t,r){return O((function(){return e(t,r)}),c)};return l.displayName=c,n=a.forwardRef?t.memo(t.forwardRef(l)):t.memo(l),o=e,i=n,Object.keys(o).forEach((function(e){R[e]||Object.defineProperty(i,e,Object.getOwnPropertyDescriptor(o,e))})),n.displayName=c,n}var R={$$typeof:!0,render:!0,compare:!0,type:!0};function E(e){var t=e.children,r=e.render,n=t||r;return"function"!=typeof n?null:O(n)}function k(e,t,r,n,o){var i="children"===t?"render":"children",a="function"==typeof e[t],c="function"==typeof e[i];return a&&c?new Error("MobX Observer: Do not use children and render in the same time in`"+r):a||c?null:new Error("Invalid prop `"+o+"` of type `"+typeof e[t]+"` supplied to `"+r+"`, expected `function`.")}E.propTypes={children:k,render:k},E.displayName="Observer";var S=0;var C={};function P(e){return C[e]||(C[e]=function(e){if("function"==typeof Symbol)return Symbol(e);var t="__$mobx-react "+e+" ("+S+")";return S++,t}(e)),C[e]}function D(e,t){if(N(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var r=Object.keys(e),n=Object.keys(t);if(r.length!==n.length)return!1;for(var o=0;o<r.length;o++)if(!Object.hasOwnProperty.call(t,r[o])||!N(e[r[o]],t[r[o]]))return!1;return!0}function N(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}function $(e,t,r){Object.hasOwnProperty.call(e,t)?e[t]=r:Object.defineProperty(e,t,{enumerable:!1,configurable:!0,writable:!0,value:r})}var M=P("patchMixins"),U=P("patchedDefinition");function L(e,t){for(var r=this,n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];t.locks++;try{var a;return null!=e&&(a=e.apply(this,o)),a}finally{t.locks--,0===t.locks&&t.methods.forEach((function(e){e.apply(r,o)}))}}function B(e,t){return function(){for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];L.call.apply(L,[this,e,t].concat(n))}}function z(e,t,r){var n=function(e,t){var r=e[M]=e[M]||{},n=r[t]=r[t]||{};return n.locks=n.locks||0,n.methods=n.methods||[],n}(e,t);n.methods.indexOf(r)<0&&n.methods.push(r);var o=Object.getOwnPropertyDescriptor(e,t);if(!o||!o[U]){var i=e[t],a=A(e,t,o?o.enumerable:void 0,n,i);Object.defineProperty(e,t,a)}}function A(e,t,r,n,o){var i,a=B(o,n);return(i={})[U]=!0,i.get=function(){return a},i.set=function(o){if(this===e)a=B(o,n);else{var i=A(this,t,r,n,o);Object.defineProperty(this,t,i)}},i.configurable=!0,i.enumerable=r,i}var T=r.$mobx||"$mobx",q=P("isUnmounted"),I=P("skipRender"),W=P("isForcingUpdate");function X(e){var r=e.prototype;if(r.componentWillReact)throw new Error("The componentWillReact life-cycle event is no longer supported");if(e.__proto__!==t.PureComponent)if(r.shouldComponentUpdate){if(r.shouldComponentUpdate!==H)throw new Error("It is not allowed to use shouldComponentUpdate in observer based components.")}else r.shouldComponentUpdate=H;Y(r,"props"),Y(r,"state");var n=r.render;return r.render=function(){return F.call(this,n)},z(r,"componentWillUnmount",(function(){this.render[T]&&this.render[T].dispose(),this[q]=!0})),e}function F(e){var n=this;$(this,I,!1),$(this,W,!1);var o,i=(o=this).displayName||o.name||o.constructor&&(o.constructor.displayName||o.constructor.name)||"<component>",a=e.bind(this),c=!1,l=new r.Reaction(i+".render()",(function(){if(!c&&(c=!0,!0!==n[q])){var e=!0;try{$(n,W,!0),n[I]||t.Component.prototype.forceUpdate.call(n),e=!1}finally{$(n,W,!1),e&&l.dispose()}}}));function s(){c=!1;var e=void 0,t=void 0;if(l.track((function(){try{t=r._allowStateChanges(!1,a)}catch(t){e=t}})),e)throw e;return t}return l.reactComponent=this,s[T]=l,this.render=s,s.call(this)}function H(e,t){return this.state!==t||!D(this.props,e)}function Y(e,t){var n=P("reactProp_"+t+"_valueHolder"),o=P("reactProp_"+t+"_atomHolder");function i(){return this[o]||$(this,o,r.createAtom("reactive "+t)),this[o]}Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get:function(){var e=!1;return r._allowStateReadsStart&&r._allowStateReadsEnd&&(e=r._allowStateReadsStart(!0)),i.call(this).reportObserved(),r._allowStateReadsStart&&r._allowStateReadsEnd&&r._allowStateReadsEnd(e),this[n]},set:function(e){this[W]||D(this[n],e)?$(this,n,e):($(this,n,e),$(this,I,!0),i.call(this).reportChanged(),$(this,I,!1))}})}var V="function"==typeof Symbol&&Symbol.for,Z=V?Symbol.for("react.forward_ref"):"function"==typeof t.forwardRef&&t.forwardRef((function(e){return null})).$$typeof,G=V?Symbol.for("react.memo"):"function"==typeof t.memo&&t.memo((function(e){return null})).$$typeof;if(!t.Component)throw new Error("mobx-react requires React to be available");if(!r.observable)throw new Error("mobx-react requires mobx to be available");let J=class extends c.Component{constructor(e){super(e),this.padding="16vh 4vh 4vh",this.gotoDetail=e=>{const t=this.props.gpui.params;this.props.gpui.root.navigate("@component:godiva/set",{base_url:t.base_url,set_id:t.page.set_id,share_id:t.page.share_id,"@theme":"normal",showSearchBar:"true",criteria:[{id:"__1",alias:"建设模式",key:t.page.filter_key,type:"string",level:!1,filter:{name:"",show:!1,type:"select",params:{isMultiple:!1,searchMode:"contain",default:e}}}],defaultTextColor:"#D4D4D4",padding:t.page.padding},{styles:{"@theme":"page"},mode:"replace"})},this.renderBorder=()=>c.createElement("div",{className:d},c.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",version:"1.1",viewBox:"0 0 774 124"},c.createElement("path",{stroke:"rgb(70, 137, 247)",strokeWidth:"3",d:"M2,22 L2,103 L22,123 L753,123 L773,103 L773,22 L753,2 L22,2 L2,22 Z",fill:"rgb(26,48,125)"}))),r.reaction((()=>e.gpui.params.padding),(e=>{this.padding=e||"16vh 4vh 4vh"}),{fireImmediately:!0})}render(){return c.createElement("div",{className:"g__index",style:{padding:this.padding}},c.createElement("div",{className:s},c.createElement("div",{className:u,onClick:()=>this.gotoDetail("直接建设")},this.renderBorder(),"直接建设"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("学科共建")},this.renderBorder(),"学科共建"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("学科托管")},this.renderBorder(),"学科托管"),c.createElement("div",{className:u,onClick:()=>this.gotoDetail("校企合作")},this.renderBorder(),"校企合作")))}};return l([r.observable],J.prototype,"padding",void 0),J=l([function(e){if(!0===e.isMobxInjector&&console.warn("Mobx observer: You are trying to use 'observer' on a component that already has 'inject'. Please apply 'observer' before applying 'inject'"),G&&e.$$typeof===G)throw new Error("Mobx observer: You are trying to use 'observer' on a function component wrapped in either another observer or 'React.memo'. The observer already applies 'React.memo' for you.");if(Z&&e.$$typeof===Z){var r=e.render;if("function"!=typeof r)throw new Error("render property of ForwardRef was not a function");return t.forwardRef((function(){var e=arguments;return t.createElement(E,null,(function(){return r.apply(void 0,e)}))}))}return"function"!=typeof e||e.prototype&&e.prototype.render||e.isReactClass||Object.prototype.isPrototypeOf.call(t.Component,e)?X(e):j(e)}],J),J}));
