2 lines
5.1 KiB
JavaScript
2 lines
5.1 KiB
JavaScript
!function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,r(o.key),o)}}function r(t){var r=function(t,r){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var o=n.call(t,r||"default");if("object"!=e(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(t)}(t,"string");return"symbol"==e(r)?r:r+""}function n(t,r,n){return r=c(r),function(t,r){if(r&&("object"==e(r)||"function"==typeof r))return r;if(void 0!==r)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(t)}(t,i()?Reflect.construct(r,n||[],c(t).constructor):r.apply(t,n))}function o(e){var t="function"==typeof Map?new Map:void 0;return o=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return function(e,t,r){if(i())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,t);var o=new(e.bind.apply(e,n));return r&&a(o,r.prototype),o}(e,arguments,c(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,e)},o(e)}function i(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(i=function(){return!!e})()}function a(e,t){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},a(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}System.register(["./index-legacy-D6gbX9g9.js","./_plugin-vue_export-helper-legacy-DySZQj4h.js"],(function(e,r){"use strict";var i,c,u,f,l,p,s,d,y,b;return{setters:[function(e){i=e.J,c=e.t,u=e.v,f=e.x,l=e.y,p=e.S,s=e.A,d=e.n,y=e.l},function(e){b=e._}],execute:function(){var r=document.createElement("style");r.textContent=".db-management[data-v-5a69b61d]{height:100%;display:flex}.db-management .dir[data-v-5a69b61d]{background:#fff;border-radius:2px;margin-right:12px;padding:20px;min-width:212px;box-sizing:border-box}.db-management .detail[data-v-5a69b61d]{flex:1;overflow:hidden}\n/*$vite$:1*/",document.head.appendChild(r);var v=function(e){function r(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),n(this,r,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&a(e,t)}(r,e),o=r,i&&t(o.prototype,i),c&&t(o,c),Object.defineProperty(o,"prototype",{writable:!1}),o;var o,i,c}(o(Error));function m(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(function(e,t){var r=t.charCodeAt(0).toString(16).toUpperCase();return r.length<2&&(r="0"+r),"%"+r})))}(t)}catch(r){return atob(t)}}v.prototype.name="InvalidTokenError";var g={style:{width:"100%",height:"100%",display:"flex","justify-content":"center","align-items":"center"}},h={name:"db-management-embed-auto-login"};e("default",b(Object.assign(h,{props:{redirect:{type:String,default:function(){return"/private/db-management/project/embed"}}},setup:function(e){var t=e,r=d(),n=y(),o=i(),a=c(!0),b=c();return u((function(){if(r.query.categoryName)if(r.query.token)try{!function(e,t){if("string"!=typeof e)throw new v("Invalid token specified: must be a string");t||(t={});var r,n=!0===t.header?0:1,o=e.split(".")[n];if("string"!=typeof o)throw new v("Invalid token specified: missing part #".concat(n+1));try{r=m(o)}catch(i){throw new v("Invalid token specified: invalid base64 for part #".concat(n+1," (").concat(i.message,")"))}try{return JSON.parse(r)}catch(i){throw new v("Invalid token specified: invalid json for part #".concat(n+1," (").concat(i.message,")"))}}(decodeURIComponent(r.query.token||"").replace(/^Bearer\s/,"")),o.login(decodeURIComponent(r.query.token||"").replace(/^Bearer\s/,"")),a.value=!1,console.log(t.redirect),n.replace({path:t.redirect,query:{categoryName:r.query.categoryName}})}catch(e){b.value="异常的令牌:<".concat(e,">")}else b.value="令牌是必须的参数!";else b.value="分类名称是必须的参数!"})),function(e,t){return f(),l("div",g,p(s(b)?s(b):"登录中..."),1)}}}),[["__scopeId","data-v-5a69b61d"]]))}}}))}();
|