(this["webpackJsonpuniadmin-ui"]=this["webpackJsonpuniadmin-ui"]||[]).push([[33],{905:function(e,r,t){"use strict";t.r(r);t(262),t(61),t(132),t(268),t(278);var n=t(0),a=t.n(n),o=(t(12),t(1)),i=t(7),c=t.n(i),s=t(52),u=t.n(s),f=t(9),d=t(614),p=t(4),l=t.n(p),m=t(19),v=window,h={},y={},b={};function w(e,r,t){"string"!==typeof e&&(t=r,r=e,e=void 0),Array.isArray(r)||(t=r,r=void 0);var n=document.currentScript&&document.currentScript.src;(e=e||n)&&(h[e]={deps:r,factory:t,src:n,loaded:!1},y[e]&&(y[e].map((function(e){return e()})),delete y[e]))}function g(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];var n=r.map((function(e){return new Promise((function(r,t){if("!"===e.charAt(0)&&(e=e.slice(1),delete h[e],delete b[e]),h[e]){var n=h[e];if(n.loaded)r(n.factory);else if("function"===typeof n.factory){(n.deps?g.apply(void 0,Object(m.a)(n.deps)):Promise.resolve([])).then((function(e){Array.isArray(e)||(e=[e]),n.factory=n.factory.apply(n,Object(m.a)(e)),n.loaded=!0,r(n.factory)})).catch(t)}else n.loaded=!0,r(n.factory)}else if(/^\w+$/.test(e))y[e]=y[e]||[],y[e].push((function(){g(e).then(r).catch(t)}));else if(!b[e]){var a=document.createElement("script");"undefined"!==typeof a.addEventListener?(a.addEventListener("load",(function(){var n=Object.keys(h).find((function(e){return h[e].src===a.src}));void 0===n&&t("module:".concat(e," missing!")),g(n).then(r).catch(t),document.body.removeChild(a)})),a.src=e,a.async=!0,document.body.appendChild(a),b[e]=!0):t('Your browser is too OLD to run "pico" loader')}}))}));return n.length>1?Promise.all(n):n[0]}function k(){if(v.define){if(!v.define.amd||!v.define.amd.pico)throw new Error("Incompatible mix of defines found!")}else v.define=w;return g.apply(void 0,arguments)}w.amd={pico:!0};var x=t(2);r.default=function(){var e=Object(o.a)(a.a.mark((function e(r){var n,i,s;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(x.a.configStore.gpuiUri){e.next=2;break}throw new Error("\u672a\u6307\u5b9agpui.webview.js\u5730\u5740, \u8bf7\u914d\u7f6e`gpuiUri`");case 2:return w("mobx",f),e.next=5,k(x.a.configStore.gpuiUri);case 5:n=e.sent,x.a.envStore.setGPUI(n),Object(f.reaction)((function(){return n.params.accessToken}),(function(e){x.a.loginAuthStore.setAuth({accessToken:e}),l.a.additionalHeaders={"X-Gapper-OAuth-Token":e}}),{fireImmediately:!0}),Object(f.reaction)((function(){return n.params.colors}),(function(e){var r=(e||{}).primaryColor;if(!r)try{var t=document.getElementById("colors");r=JSON.parse((null===t||void 0===t?void 0:t.textContent)||"{}").primaryColor}catch(n){}r||(r="#2b9f7f"),d.a.setVars({primaryColor:r,antdPrimaryColor:r})}),{fireImmediately:!0}),x.a.loginAuthStore.setRefreshTokenFunc(Object(o.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n.root.refreshAccessToken();case 2:case"end":return e.stop()}}),e)})))),l.a.refreshAccessToken=x.a.loginAuthStore.refreshTokenFunc,i=function(){var e=Object(o.a)(a.a.mark((function e(){var r,t,n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,x.a.currentUserStore.getCurrentUser();case 3:r=e.sent,t=r.super_admin,n=r.permissions,x.a.authStore.initPermissions({isSuperAdmin:1===t,permissions:n}),e.next=11;break;case 9:e.prev=9,e.t0=e.catch(0);case 11:case"end":return e.stop()}}),e,null,[[0,9]])})));return function(){return e.apply(this,arguments)}}(),s=setInterval(Object(o.a)(a.a.mark((function e(){var o,f;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.params.accessToken){e.next=9;break}return clearInterval(s),e.next=4,Promise.all([i(),x.a.groupStore.getRootGroup(),x.a.groupStore.getActiveGroup(),x.a.configurationStore.getGroupTypes()]);case 4:return e.next=6,Promise.all([t.e(5),t.e(7),t.e(29)]).then(t.bind(null,634));case 6:o=e.sent,f=o.default||o,u.a.render(c.a.createElement(f,null),r);case 9:case"end":return e.stop()}}),e)}))),500);case 13:case"end":return e.stop()}}),e)})));return function(r){return e.apply(this,arguments)}}()}}]);