!function(){function e(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,r,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.toStringTag||"@@toStringTag";function u(e,o,a,i){var u=o&&o.prototype instanceof s?o:s,l=Object.create(u.prototype);return n(l,"_invoke",function(e,n,o){var a,i,u,s=0,l=o||[],f=!1,p={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(e,n){return a=e,i=0,u=t,p.n=n,c}};function m(e,n){for(i=e,u=n,r=0;!f&&s&&!o&&r<l.length;r++){var o,a=l[r],m=p.p,d=a[2];e>3?(o=d===n)&&(u=a[(i=a[4])?5:(i=3,3)],a[4]=a[5]=t):a[0]<=m&&((o=e<2&&m<a[1])?(i=0,p.v=n,p.n=a[1]):m<d&&(o=e<3||a[0]>n||n>d)&&(a[4]=e,a[5]=n,p.n=d,i=0))}if(o||e>1)return c;throw f=!0,n}return function(o,l,d){if(s>1)throw TypeError("Generator is already running");for(f&&1===l&&m(l,d),i=l,u=d;(r=i<2?t:u)||!f;){a||(i?i<3?(i>1&&(p.n=-1),m(i,u)):p.n=u:p.v=u);try{if(s=2,a){if(i||(o="next"),r=a[o]){if(!(r=r.call(a,u)))throw TypeError("iterator result is not an object");if(!r.done)return r;u=r.value,i<2&&(i=0)}else 1===i&&(r=a.return)&&r.call(a),i<2&&(u=TypeError("The iterator does not provide a '"+o+"' method"),i=1);a=t}else if((r=(f=p.n<0)?u:e.call(n,p))!==c)break}catch(r){a=t,i=1,u=r}finally{s=1}}return{value:r,done:f}}}(e,a,i),!0),l}var c={};function s(){}function l(){}function f(){}r=Object.getPrototypeOf;var p=[][a]?r(r([][a]())):(n(r={},a,function(){return this}),r),m=f.prototype=s.prototype=Object.create(p);function d(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,n(e,i,"GeneratorFunction")),e.prototype=Object.create(m),e}return l.prototype=f,n(m,"constructor",f),n(f,"constructor",l),l.displayName="GeneratorFunction",n(f,i,"GeneratorFunction"),n(m),n(m,i,"Generator"),n(m,a,function(){return this}),n(m,"toString",function(){return"[object Generator]"}),(e=function(){return{w:u,m:d}})()}function n(e,t,r,o){var a=Object.defineProperty;try{a({},"",{})}catch(e){a=0}n=function(e,t,r,o){function i(t,r){n(e,t,function(e){return this._invoke(t,r,e)})}t?a?a(e,t,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[t]=r:(i("next",0),i("throw",1),i("return",2))},n(e,t,r,o)}function t(e,n,t,r,o,a,i){try{var u=e[a](i),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,o)}function r(e){return function(){var n=this,r=arguments;return new Promise(function(o,a){var i=e.apply(n,r);function u(e){t(i,o,a,u,c,"next",e)}function c(e){t(i,o,a,u,c,"throw",e)}u(void 0)})}}System.register(["./base-lib-legacy.js?v=1761009159","./database-legacy.js?v=1761009159","./utils-lib-legacy.js?v=1761009159","./__commonjsHelpers__-legacy.js?v=1761009159"],function(n,t){"use strict";var o,a,i,u,c,s,l,f,p,m,d,v,b,y,g,h,_,j;return{setters:[function(e){o=e.c,a=e.o,i=e.q,u=e.v,c=e.x,s=e.e,l=e.B,f=e.y,p=e.ak,m=e.al,d=e.ab,v=e.a9},function(e){b=e.setModulePermission,y=e.getModulePermission},function(e){g=e.P,h=e.aK,_=e.M,j=e._},null],execute:function(){var t={class:"p-[1.6rem]"},w=o({__name:"index",props:{compData:{default:function(){return{name:""}}}},setup:function(n,o){var j=o.expose,w=n,O=a({permission:[]}),P=function(){var n=r(e().m(function n(t){var r;return e().w(function(e){for(;;)switch(e.p=e.n){case 0:return e.p=0,e.n=1,g({loading:"正在修改权限，请稍后...",request:b({data:JSON.stringify({user_name:w.compData.name,db_permission:O.permission})},"mongodb"),message:!0});case 1:t(),e.n=3;break;case 2:e.p=2,r=e.v,h(r,"修改权限-onConfirm");case 3:return e.a(2)}},n,null,[[0,2]])}));return function(e){return n.apply(this,arguments)}}(),S=function(){var n=r(e().m(function n(){var t;return e().w(function(e){for(;;)switch(e.n){case 0:return e.n=1,g({loading:"正在获取权限，请稍后...",request:y({data:JSON.stringify({user_name:w.compData.name})},"mongodb"),data:{status:Boolean,msg:String,data:Object}});case 1:t=e.v,O.permission=t.roles,t.status||_.error(t.msg);case 2:return e.a(2)}},n)}));return function(){return n.apply(this,arguments)}}();return i(S),j({onConfirm:P}),function(e,n){var r=p,o=m,a=d,i=v;return u(),c("div",t,[s(i,{class:"m-[1.6rem]",ref:"permissionForm",model:f(O),"label-width":"5rem"},{default:l(function(){return[s(a,{label:"访问权限",prop:"permission"},{default:l(function(){return[s(o,{modelValue:f(O).permission,"onUpdate:modelValue":n[0]||(n[0]=function(e){return f(O).permission=e}),class:"!w-[32rem]",multiple:"",placeholder:"请选择"},{default:l(function(){return[s(r,{label:"数据库所有者",value:"dbOwner"}),s(r,{label:"读取数据",value:"read"}),s(r,{label:"读取和写入数据",value:"readWrite"}),s(r,{label:"用户管理员",value:"userAdmin"})]}),_:1},8,["modelValue"])]}),_:1})]}),_:1},8,["model"])])}}});n("default",j(w,[["__scopeId","data-v-bd53bbc1"]]))}}})}();
