@vancone/console-component 0.1.1-beta.35 → 0.1.1-beta.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vancone/console-component",
3
3
  "private": false,
4
- "version": "0.1.1-beta.35",
4
+ "version": "0.1.1-beta.36",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "packages/dist/**"
@@ -680,7 +680,7 @@ const $n = { class: "header" }, En = { class: "title" }, On = { class: "right" }
680
680
  (p(), I(st((a = o.menu.meta) == null ? void 0 : a.icon), { class: "menu-icon" })),
681
681
  ((i = t.menu.meta) == null ? void 0 : i.svgXml) !== void 0 ? (p(), V("div", {
682
682
  key: 0,
683
- class: "app-icon",
683
+ class: "menu-icon",
684
684
  innerHTML: t.menu.meta.svgXml
685
685
  }, null, 8, Dn)) : W("", !0)
686
686
  ]),
@@ -713,7 +713,7 @@ const $n = { class: "header" }, En = { class: "title" }, On = { class: "right" }
713
713
  (p(), I(st((a = o.$props.menu.meta) == null ? void 0 : a.icon), { class: "menu-icon" })),
714
714
  ((i = t.menu.meta) == null ? void 0 : i.svgXml) !== void 0 ? (p(), V("div", {
715
715
  key: 0,
716
- class: "app-icon",
716
+ class: "menu-icon",
717
717
  innerHTML: t.menu.meta.svgXml
718
718
  }, null, 8, Rn)) : W("", !0)
719
719
  ])
@@ -723,7 +723,7 @@ const $n = { class: "header" }, En = { class: "title" }, On = { class: "right" }
723
723
  }, 8, ["index"]));
724
724
  };
725
725
  }
726
- }), Gn = /* @__PURE__ */ ye(Ln, [["__scopeId", "data-v-3b879904"]]), be = A({}), jn = {}, Ot = A([]);
726
+ }), Gn = /* @__PURE__ */ ye(Ln, [["__scopeId", "data-v-7391484d"]]), be = A({}), jn = {}, Ot = A([]);
727
727
  var Jt = !1;
728
728
  function Ze(e, t, o) {
729
729
  return Array.isArray(e) ? (e.length = Math.max(e.length, t), e.splice(t, 1, o), o) : (e[t] = o, o);
@@ -1,4 +1,4 @@
1
- (function(E,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router"),require("axios"),require("element-plus"),require("@element-plus/icons-vue"),require("vue-i18n"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","axios","element-plus","@element-plus/icons-vue","vue-i18n","lodash"],e):(E=typeof globalThis!="undefined"?globalThis:E||self,e(E["console-component"]={},E.Vue,E.vueRouter,E.axios,E.ElementPlus,E.iconsVue,E.VueI18n,E.lodash))})(this,function(E,e,z,qe,ge,Z,_e,pe){"use strict";var mr=Object.defineProperty,ur=Object.defineProperties;var hr=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var gr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var qt=(E,e,z)=>e in E?mr(E,e,{enumerable:!0,configurable:!0,writable:!0,value:z}):E[e]=z,ze=(E,e)=>{for(var z in e||(e={}))gr.call(e,z)&&qt(E,z,e[z]);if(zt)for(var z of zt(e))_r.call(e,z)&&qt(E,z,e[z]);return E},Ht=(E,e)=>ur(E,hr(e));var he=(E,e,z)=>new Promise((qe,ge)=>{var Z=Y=>{try{pe(z.next(Y))}catch(Oe){ge(Oe)}},_e=Y=>{try{pe(z.throw(Y))}catch(Oe){ge(Oe)}},pe=Y=>Y.done?qe(Y.value):Promise.resolve(Y.value).then(Z,_e);pe((z=z.apply(E,e)).next())});const Y=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Oe={},Wt={class:"building"};function Jt(t,o){return e.openBlock(),e.createElementBlock("div",Wt)}const nt=Y(Oe,[["render",Jt],["__scopeId","data-v-07bd45d2"]]),ie=qe.create({timeout:2*60*1e3,withCredentials:!0});ie.interceptors.request.use(t=>t),ie.interceptors.response.use(t=>{const{headers:o,method:n}=t.config,{code:r,message:a}=t.data,{"No-Success-Message":s}=o,i=n!=="get";return r===0?(i&&!s&&ge.ElMessage({message:a,type:"success"}),Promise.resolve(t)):(ge.ElMessage({type:"error",message:a}),Promise.reject(new Error(`${r}`)))},t=>{var r;const{config:o,response:n}=t;if(n){const{status:a}=n;if(a===401){const l=window.escape(window.location.href);let c=(r=n.data.data)!=null?r:"https://passport.vancone.com";window.location.href=`${c}/?from=${l}`}const{message:s,error:i}=n.data;ge.ElMessage({type:"error",message:s||i})}return Promise.reject(new Error(t.message||"Response Error"))});const rt=()=>{const{origin:t}=window.location;return t.includes("beta")||t.includes("localhost")?"passport.beta.vancone.com":"passport.vancone.com"},at=rt();function Yt(){return ie.get(`//${at}/api/passport/service/v1/account`)}function Kt(){return ie.delete(`//${at}/api/passport/service/v1/login`)}function Qt(){return ie.get("https://app-center.vancone.com/api/app-center/v1/app-group?pageSize=1000")}function Xt(){return ie.get("https://app-center.vancone.com/api/app-center/v1/store/app?pageSize=1000")}const Zt={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function vt(t,o){return e.openBlock(),e.createElementBlock("svg",Zt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M480 544v352H128V544zm416 288v64H544v-64zM416 608H192v224h224zm480 83.072v64H544v-64zM896 544v64H544v-64zM480 128v352H128V128zm416 0v352H544V128zm-480 64H192v224h224zm416 0H608v224h224z"},null,-1)]))}const eo={render:vt},to={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function oo(t,o){return e.openBlock(),e.createElementBlock("svg",to,o[0]||(o[0]=[e.createElementVNode("path",{d:"M487.01 113.079a56.076 56.076 0 0 1 73.216 21.918l1.901 3.536 100.401 203.215L886.93 374.32a56.076 56.076 0 0 1 33.939 92.647l-2.877 3.024-162.329 158.061L793.99 851.31a56.076 56.076 0 0 1-77.726 60.855l-3.609-1.707-200.801-105.472-200.802 105.448a56.076 56.076 0 0 1-81.871-55.345l.512-3.78 38.351-223.256-162.328-158.061a56.076 56.076 0 0 1 27.282-94.989l3.78-.682 224.377-32.573L461.58 138.533a56.08 56.08 0 0 1 25.43-25.454M409.722 408.6l-228.206 33.134 165.132 160.744-39.01 227.133 204.216-107.252 204.19 107.252-39.01-227.133 165.133-160.744L613.96 408.6 511.854 201.9 409.698 408.6z"},null,-1)]))}const no={render:oo},ro={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function ao(t,o){return e.openBlock(),e.createElementBlock("svg",ro,o[0]||(o[0]=[e.createElementVNode("path",{d:"M512 109.714c222.184 0 402.286 180.102 402.286 402.286S734.184 914.286 512 914.286l-2.901-.122c-104.546-8.314-189.416-43.52-253.075-105.13l-.024 80.87h-73.143V658.287h207.238v73.143H283.99c52.858 65.048 128.561 101.4 229.45 109.714l7.63-.122C698.662 836.218 841.144 690.737 841.144 512c0-181.784-147.359-329.143-329.143-329.143S182.857 330.216 182.857 512h-73.143c0-222.184 180.102-402.286 402.286-402.286m-48.762 182.857h73.143V475.43h182.857v73.142h-256z"},null,-1)]))}const so={render:ao},lo={class:"app-catalog-wrapper"},io={class:"catalog-wrapper"},co={class:"service-list"},po={class:"app-icon-container"},fo=["href"],mo=["innerHTML"],uo={key:1,class:"app-icon"},ho=Y(e.defineComponent({__name:"AppCatalog",props:{visible:{type:Boolean}},setup(t){const o=e.reactive([]);function n(){Qt().then(({data:r})=>{o.splice(0,o.length,...r.data.list),Xt().then(({data:a})=>{const s=a.data;o.forEach(i=>{i.apps=s.filter(l=>l.groupId===i.id)})})})}return n(),(r,a)=>{const s=e.resolveComponent("el-input"),i=e.resolveComponent("el-scrollbar"),l=e.resolveComponent("el-tab-pane"),c=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(c,{"tab-position":"left"},{default:e.withCtx(()=>[e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(eo),{class:"left-icon"})]),default:e.withCtx(()=>[a[0]||(a[0]=e.createElementVNode("h1",{class:"catalog-title"},"Apps",-1)),e.createVNode(s,{class:"search-box","prefix-icon":e.unref(Z.Search),placeholder:"Search apps"},null,8,["prefix-icon"]),e.createVNode(i,{class:"right-area",style:{width:"100%",height:"400px"}},{default:e.withCtx(()=>[e.createElementVNode("div",io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,f=>(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("h1",null,e.toDisplayString(f.name),1),e.createElementVNode("div",po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.apps,b=>{var k,x;return e.openBlock(),e.createElementBlock("a",{style:e.normalizeStyle([{"text-decoration":"none"},{pointerEvents:((k=b.homepageUrl)==null?void 0:k.length)>0?"auto":"none"}]),target:"_blank",href:b.homepageUrl},[b.iconSvg!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:b.iconSvg},null,8,mo)):(e.openBlock(),e.createElementBlock("div",uo," ")),e.createElementVNode("h2",{style:e.normalizeStyle({color:((x=b.homepageUrl)==null?void 0:x.length)>0?"#555":"#bbb"})},e.toDisplayString(b.name),5)],12,fo)}),256))])]))),256))])]),_:1})]),_:1}),e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(no),{class:"left-icon"})]),default:e.withCtx(()=>[a[1]||(a[1]=e.createElementVNode("h1",{class:"catalog-title"},"Favorites",-1))]),_:1}),e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(so),{class:"left-icon"})]),default:e.withCtx(()=>[a[2]||(a[2]=e.createElementVNode("h1",{class:"catalog-title"},"Recently",-1))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-fcfb021b"]]),st={common:{header:{product:"Products",help:"Help",notification:"Notification",workbench:"Workbench",userCenter:"User Center",switchLanguage:"Languages",signOut:"Sign out"},table:{create:"Create",delete:"Delete",add:"Add",remove:"Remove",search:"Search",edit:"Edit",operation:"Operations",viewSelected:"View Selected",warning:"Warning",select:"Select"},basic:{cancel:"Cancel",confirm:"Confirm",createdTime:"Created Time",description:"Description",detail:"Details",more:"More",name:"Name",no:"No",save:"Save",summary:"Summary",type:"Type",updatedTime:"Updated Time",yes:"Yes"}}},lt={common:{header:{product:"产品",help:"帮助",notification:"通知",workbench:"工作台",userCenter:"用户中心",switchLanguage:"语言",signOut:"退出登录"},table:{create:"创建",delete:"删除",add:"添加",remove:"移除",search:"搜索",edit:"编辑",operation:"操作",viewSelected:"查看已选",warning:"风险提示",select:"选择"},basic:{cancel:"取消",confirm:"确认",createdTime:"创建时间",description:"描述",detail:"详情",more:"更多",name:"名称",no:"否",save:"保存",summary:"基本信息",type:"类型",updatedTime:"更新时间",yes:"是"}}},Pe=_e.createI18n({legacy:!1,locale:localStorage.getItem("locale")||navigator.language.slice(0,2),messages:{en:st,zh:lt}}),go={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function _o(t,o){return e.openBlock(),e.createElementBlock("svg",go,o[0]||(o[0]=[e.createElementVNode("path",{d:"M22.6 29.1h6.6v-6.6h-6.6m0-3.2h6.6v-6.6h-6.6m-9.9-3.3h6.6V2.9h-6.6m9.9 6.5h6.6V2.9h-6.6m-9.9 16.4h6.6v-6.6h-6.6m-9.8 6.6h6.6v-6.6H2.9m0 16.4h6.6v-6.6H2.9m9.8 6.6h6.6v-6.6h-6.6M2.9 9.4h6.6V2.9H2.9z"},null,-1)]))}const bo={render:_o},yo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function wo(t,o){return e.openBlock(),e.createElementBlock("svg",yo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M651.404 284.363c-14.446-23.404-34.322-43.717-58.832-56.969A164.4 164.4 0 0 0 512 206.328a157.8 157.8 0 0 0-63.864 12.893 163.8 163.8 0 0 0-52.22 35.105c-14.77 14.405-26.455 32.338-35.04 51.895a164 164 0 0 0-12.829 63.958c0 15.233 6.615 28.88 15.993 39.036 10.063 9.363 23.72 15.988 38.92 15.988a56.73 56.73 0 0 0 38.528-15.988c10.134-10.155 16.747-23.803 16.747-39.036a54.8 54.8 0 0 1 3.918-21.066c3.126-6.232 6.614-12.495 11.643-17.17a60.4 60.4 0 0 1 17.143-11.703c6.614-2.304 14.053-4.646 21.061-4.646a53.95 53.95 0 0 1 38.167 16.35c18.652 18.364 21.384 49.946 7.759 71.803-5.47 7.779-12.83 13.685-19.443 19.915-19.874 16.78-39.748 33.96-55.31 62.045-15.598 27.258-25.733 65.537-25.733 122.47a55.76 55.76 0 0 0 16.352 39.035c9.38 9.758 23.36 15.591 38.204 15.591 15.167 0 29.578-5.833 38.921-15.591a55.6 55.6 0 0 0 16.354-39.036c0-32.769 5.067-53.803 13.228-68.635 8.59-14.873 18.687-24.198 28.822-32.806 9.74-8.57 19.048-16.383 27.638-25.35 8.158-8.966 15.992-18.69 22.21-30.825 5.462-9.327 9.344-21.03 12.435-34.318 7.008-29.276 7.008-63.197-2.3-92.47-4.313-13.647-10.136-27.69-17.899-39.394zM512 706.508a53.51 53.51 0 0 0-38.204 15.988 54.725 54.725 0 0 0 0 78.035A53.51 53.51 0 0 0 512 816.519c15.167 0 29.578-6.232 38.921-15.988a54.72 54.72 0 0 0 0-78.035c-9.343-9.758-23.754-15.988-38.921-15.988m350.046-543.104c-88.409-88.95-211.463-144.363-347.744-145.12-137.826-.792-260.887 54.627-351.194 144.365-89.598 89.7-144.835 213-144.835 348.757a528.6 528.6 0 0 0 10.099 100.288c7.008 31.581 16.352 63.597 28.788 92.47 37.808 90.493 102.03 165.394 180.305 218.113a493.11 493.11 0 0 0 623.435-61.29c90.315-89.34 144.798-213.035 144.798-349.585 0-135.362-54.483-258.228-143.649-348.001zm-137.86 668.742a383.537 383.537 0 0 1-565.784-170.902c-10.135-22.614-17.106-46.814-22.57-71.768-4.636-25.388-7.758-51.132-7.758-78.07a381.15 381.15 0 0 1 112.92-271.516c69.29-69.463 165.86-112.387 272.562-112.387a385.85 385.85 0 0 1 352.768 234.1 398 398 0 0 1 29.58 149.803 393.7 393.7 0 0 1-29.58 149.834 387.25 387.25 0 0 1-142.137 170.906"},null,-1)]))}const Co={render:wo},ko={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function No(t,o){return e.openBlock(),e.createElementBlock("svg",ko,o[0]||(o[0]=[e.createElementVNode("path",{d:"M358.4 871.2H45.152C19.936 871.2 0 843.904 0 819.2s19.936-50.624 45.152-50.624h56.64l-1.088-283.168c0-204.608 164.032-374.56 337.056-412.576v-1.28C437.76 32.032 470.496 0 510.848 0s73.088 32.032 73.088 71.552v1.28C756.96 110.848 922.08 280.8 922.08 485.408v283.168h55.008c25.216 0 46.944 25.92 46.944 50.624s-21.696 52-46.944 52H665.632c-.416 84.48-69.024 152.8-153.6 152.8s-153.184-68.352-153.6-152.8zm102.4 0c.416 27.904 23.168 50.4 51.2 50.4s50.784-22.496 51.2-50.4zm357.216-103.328v-282.56c0-179.808-149.536-329.984-307.104-329.984S204.544 305.472 204.544 485.312v282.56z"},null,-1)]))}const Vo={render:No},xo={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function Eo(t,o){return e.openBlock(),e.createElementBlock("svg",xo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M23.8 22.1H8.2c-2.5 0-4.5-2.1-4.5-4.5V7.9c0-2.5 2.1-4.5 4.5-4.5h15.6c2.5 0 4.5 2.1 4.5 4.5v9.7c0 2.4-2.1 4.5-4.5 4.5M16 23.2v5M8.3 28.9h15.4",style:{fill:"none","stroke-width":"3","stroke-miterlimit":"10"}},null,-1)]))}const So={render:Eo};function fe(t,o,n){switch(o){case"POST":return ie.post(t,n);case"PUT":return ie.put(t,n);case"DELETE":return ie.delete(t+"/"+n);default:return ie.get(t,{params:n})}}const Bo={class:"header"},$o={class:"title"},Oo={class:"right"},Po={class:"icon-wrapper"},Io={class:"user-wrapper"},To={style:{"font-size":"11px","font-weight":"bold"}},Do={class:"user-popover-header"},Ao={style:{"font-size":"15px","font-weight":"bold"}},Mo=["onClick"],He=Y(e.defineComponent({__name:"Header",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const{t:o}=_e.useI18n(),n=e.ref(),r=e.ref(),a=e.ref(),s=e.ref(),i=e.ref(!1),l=t,c=e.ref(),f=e.reactive({id:"",name:""}),b=e.ref(""),k=e.ref(Pe.global.locale),x=e.reactive([{id:"en",name:"English"},{id:"zh",name:"简体中文"}]);e.onMounted(()=>{var P,I,H;b.value=decodeURIComponent(S("passport_username").replace(/\+/g," ")),b.value===""&&Yt().then(({data:h})=>{var m;h.code==0&&(b.value=(m=h.data.name)!=null?m:h.data.displayId)}),(P=l.headerProjectConfig)!=null&&P.api?fe((I=l.headerProjectConfig)==null?void 0:I.api,"GET",{}).then(({data:h})=>{c.value=h.data}):(H=l.headerProjectConfig)!=null&&H.items&&(c.value=l.headerProjectConfig.items)});function S(P){for(var I=P+"=",H=document.cookie.split(";"),h=0;h<H.length;h++){for(var m=H[h];m.charAt(0)==" ";)m=m.substring(1);if(m.indexOf(I)!=-1)return m.substring(I.length,m.length)}return""}function M(){Kt().then(()=>{const P=escape(window.location.href);window.location.href=`//${rt()}/?from=${P}#login`})}function O(P){Pe.global.locale.value=P,k.value=P,localStorage.setItem("locale",P)}function q(){window.open("https://passport.vancone.com/#/account/profile","_blank")}function U(){window.open(l.helpDocUrl,"_blank")}function ee(P){if(P==="allProjects")alert("show all projects");else for(let I of c.value)if(console.log("project.id",I.id,"command",P),I.id===P){Object.assign(f,I);break}}return(P,I)=>{const H=e.resolveComponent("el-icon"),h=e.resolveComponent("el-dropdown-item"),m=e.resolveComponent("el-dropdown-menu"),_=e.resolveComponent("el-dropdown"),V=e.resolveComponent("el-popover"),p=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-avatar"),w=e.resolveComponent("el-menu-item"),N=e.resolveComponent("el-menu"),T=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Bo,[e.createElementVNode("div",$o,[e.createElementVNode("div",{ref_key:"appCatalogButtonRef",ref:s,class:"icon-wrapper",style:{"margin-left":"8px"}},[e.createVNode(e.unref(bo))],512),e.createElementVNode("h1",null,e.toDisplayString(P.title),1),l.headerProjectConfig?(e.openBlock(),e.createBlock(_,{key:0,placement:"bottom-start",onCommand:ee},{dropdown:e.withCtx(()=>[e.createVNode(m,{style:{width:"300px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,B=>(e.openBlock(),e.createBlock(h,{command:B.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.name),1)]),_:2},1032,["command"]))),256)),e.createVNode(h,{divided:"",command:"allProjects"},{default:e.withCtx(()=>I[2]||(I[2]=[e.createTextVNode("全部项目")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(f.name)+" ",1),e.createVNode(H,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowDown))]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:"app-popover","virtual-ref":s.value,trigger:"click","show-arrow":!1,"popper-style":"width: 500px; height: 500px; padding: 0; inset: 49px auto auto 0px"},{default:e.withCtx(()=>[e.createVNode(ho,{visible:!0})]),_:1},8,["virtual-ref"]),e.createElementVNode("div",Oo,[e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.workbench"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",Po,[e.createVNode(e.unref(So))])]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.help"),placement:"bottom"},{default:e.withCtx(()=>[l.helpDocUrl!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-wrapper",onClick:U},[e.createVNode(e.unref(Co))])):e.createCommentVNode("",!0)]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.notification"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"icon-wrapper",onClick:I[0]||(I[0]=B=>i.value=!0)},[e.createVNode(e.unref(Vo))])]),_:1},8,["content"]),e.createElementVNode("div",Io,[e.createVNode(d,{size:30,src:"",ref_key:"avatarRef",ref:n},{default:e.withCtx(()=>[e.createElementVNode("span",To,e.toDisplayString(b.value.substring(0,2)),1)]),_:1},512),e.createVNode(V,{teleported:!1,width:"280",effect:"dark",ref_key:"popoverRef",ref:r,"virtual-ref":n.value,trigger:"hover","virtual-triggering":""},{default:e.withCtx(()=>[e.createElementVNode("div",Do,[e.createVNode(d,{size:48,src:""},{default:e.withCtx(()=>[e.createElementVNode("span",Ao,e.toDisplayString(b.value.substring(0,2)),1)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),e.createVNode(N,{class:"user-menu"},{default:e.withCtx(()=>[e.createVNode(w,{onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.userCenter")),1)]),_:1}),e.createVNode(w,{ref_key:"switchLanguageRef",ref:a,style:{display:"flext","justify-content":"space-between"}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("common.header.switchLanguage")),1),e.createVNode(H,{style:{left:"15px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowRight))]),_:1})]),_:1},512),e.createVNode(V,{teleported:!1,width:"150",effect:"dark",ref:"popover2Ref",placement:"left-start","virtual-ref":a.value,trigger:"hover","virtual-triggering":"","popper-style":"height: 80px; left: -165px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,B=>(e.openBlock(),e.createElementBlock("div",{class:"select-list",onClick:$=>O(B.id)},[e.createElementVNode("span",null,e.toDisplayString(B.name),1),B.id===k.value?(e.openBlock(),e.createBlock(H,{key:0,style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Check))]),_:1})):e.createCommentVNode("",!0)],8,Mo))),256))]),_:1},8,["virtual-ref"]),e.createVNode(w,{onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.signOut")),1)]),_:1})]),_:1})]),_:1},8,["virtual-ref"])])])]),e.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":I[1]||(I[1]=B=>i.value=B),direction:"rtl",title:"Message Center"},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-b04b3245"]]),Uo={class:"menu-icon-wrapper",style:{"margin-left":"3px"}},Fo=["innerHTML"],Ro={class:"menu-icon-wrapper"},Lo=["innerHTML"],Go=Y(e.defineComponent({__name:"SideMenuItem",props:{menu:{}},setup(t){const o=t;return e.nextTick(()=>console.log("menu",o.menu)),(n,r)=>{const a=e.resolveComponent("SideMenuItem",!0),s=e.resolveComponent("el-sub-menu"),i=e.resolveComponent("el-menu-item");return n.menu.children&&n.menu.children.length>0?(e.openBlock(),e.createBlock(s,{key:0,index:n.menu.path},{title:e.withCtx(()=>{var l,c,f,b;return[e.createElementVNode("div",Uo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((l=n.menu.meta)==null?void 0:l.icon),{class:"menu-icon"})),((c=o.menu.meta)==null?void 0:c.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:o.menu.meta.svgXml},null,8,Fo)):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(n.$t((b=(f=n.menu.meta)==null?void 0:f.title)!=null?b:"")),1)]}),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menu.children,l=>(e.openBlock(),e.createBlock(a,{key:l.path,route:l,menu:l},null,8,["route","menu"]))),128))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:o.menu.path,style:{height:"40px"}},{title:e.withCtx(()=>{var l,c;return[e.createElementVNode("span",null,e.toDisplayString(n.$t((c=(l=n.menu.meta)==null?void 0:l.title)!=null?c:"")),1)]}),default:e.withCtx(()=>{var l,c;return[e.createElementVNode("div",Ro,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((l=n.$props.menu.meta)==null?void 0:l.icon),{class:"menu-icon"})),((c=o.menu.meta)==null?void 0:c.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:o.menu.meta.svgXml},null,8,Lo)):e.createCommentVNode("",!0)])]}),_:1},8,["index"]))}}}),[["__scopeId","data-v-3b879904"]]),re=e.ref({}),it={},We=e.ref([]);var ct=!1;function Me(t,o,n){return Array.isArray(t)?(t.length=Math.max(t.length,o),t.splice(o,1,n),n):(t[o]=n,n)}function Je(t,o){if(Array.isArray(t)){t.splice(o,1);return}delete t[o]}function jo(){return dt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function dt(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:{}}const zo=typeof Proxy=="function",qo="devtools-plugin:setup",Ho="plugin:settings:set";let Ee,Ye;function Wo(){var t;return Ee!==void 0||(typeof window!="undefined"&&window.performance?(Ee=!0,Ye=window.performance):typeof globalThis!="undefined"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(Ee=!0,Ye=globalThis.perf_hooks.performance):Ee=!1),Ee}function Jo(){return Wo()?Ye.now():Date.now()}class Yo{constructor(o,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=n;const r={};if(o.settings)for(const i in o.settings){const l=o.settings[i];r[i]=l.defaultValue}const a=`__vue-devtools-plugin-settings__${o.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(a),l=JSON.parse(i);Object.assign(s,l)}catch(i){}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(a,JSON.stringify(i))}catch(l){}s=i},now(){return Jo()}},n&&n.on(Ho,(i,l)=>{i===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(i,l)=>this.target?this.target.on[l]:(...c)=>{this.onQueue.push({method:l,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...c)=>(this.targetQueue.push({method:l,args:c,resolve:()=>{}}),this.fallbacks[l](...c)):(...c)=>new Promise(f=>{this.targetQueue.push({method:l,args:c,resolve:f})})})}setRealTarget(o){return he(this,null,function*(){this.target=o;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(yield this.target[n.method](...n.args))})}}function pt(t,o){const n=t,r=dt(),a=jo(),s=zo&&n.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))a.emit(qo,t,o);else{const i=s?new Yo(n,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:o,proxy:i}),i&&o(i.proxiedTarget)}}/*!
1
+ (function(E,e){typeof exports=="object"&&typeof module!="undefined"?e(exports,require("vue"),require("vue-router"),require("axios"),require("element-plus"),require("@element-plus/icons-vue"),require("vue-i18n"),require("lodash")):typeof define=="function"&&define.amd?define(["exports","vue","vue-router","axios","element-plus","@element-plus/icons-vue","vue-i18n","lodash"],e):(E=typeof globalThis!="undefined"?globalThis:E||self,e(E["console-component"]={},E.Vue,E.vueRouter,E.axios,E.ElementPlus,E.iconsVue,E.VueI18n,E.lodash))})(this,function(E,e,z,qe,ge,Z,_e,pe){"use strict";var mr=Object.defineProperty,ur=Object.defineProperties;var hr=Object.getOwnPropertyDescriptors;var zt=Object.getOwnPropertySymbols;var gr=Object.prototype.hasOwnProperty,_r=Object.prototype.propertyIsEnumerable;var qt=(E,e,z)=>e in E?mr(E,e,{enumerable:!0,configurable:!0,writable:!0,value:z}):E[e]=z,ze=(E,e)=>{for(var z in e||(e={}))gr.call(e,z)&&qt(E,z,e[z]);if(zt)for(var z of zt(e))_r.call(e,z)&&qt(E,z,e[z]);return E},Ht=(E,e)=>ur(E,hr(e));var he=(E,e,z)=>new Promise((qe,ge)=>{var Z=Y=>{try{pe(z.next(Y))}catch(Oe){ge(Oe)}},_e=Y=>{try{pe(z.throw(Y))}catch(Oe){ge(Oe)}},pe=Y=>Y.done?qe(Y.value):Promise.resolve(Y.value).then(Z,_e);pe((z=z.apply(E,e)).next())});const Y=(t,o)=>{const n=t.__vccOpts||t;for(const[r,a]of o)n[r]=a;return n},Oe={},Wt={class:"building"};function Jt(t,o){return e.openBlock(),e.createElementBlock("div",Wt)}const nt=Y(Oe,[["render",Jt],["__scopeId","data-v-07bd45d2"]]),ie=qe.create({timeout:2*60*1e3,withCredentials:!0});ie.interceptors.request.use(t=>t),ie.interceptors.response.use(t=>{const{headers:o,method:n}=t.config,{code:r,message:a}=t.data,{"No-Success-Message":s}=o,i=n!=="get";return r===0?(i&&!s&&ge.ElMessage({message:a,type:"success"}),Promise.resolve(t)):(ge.ElMessage({type:"error",message:a}),Promise.reject(new Error(`${r}`)))},t=>{var r;const{config:o,response:n}=t;if(n){const{status:a}=n;if(a===401){const l=window.escape(window.location.href);let c=(r=n.data.data)!=null?r:"https://passport.vancone.com";window.location.href=`${c}/?from=${l}`}const{message:s,error:i}=n.data;ge.ElMessage({type:"error",message:s||i})}return Promise.reject(new Error(t.message||"Response Error"))});const rt=()=>{const{origin:t}=window.location;return t.includes("beta")||t.includes("localhost")?"passport.beta.vancone.com":"passport.vancone.com"},at=rt();function Yt(){return ie.get(`//${at}/api/passport/service/v1/account`)}function Kt(){return ie.delete(`//${at}/api/passport/service/v1/login`)}function Qt(){return ie.get("https://app-center.vancone.com/api/app-center/v1/app-group?pageSize=1000")}function Xt(){return ie.get("https://app-center.vancone.com/api/app-center/v1/store/app?pageSize=1000")}const Zt={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function vt(t,o){return e.openBlock(),e.createElementBlock("svg",Zt,o[0]||(o[0]=[e.createElementVNode("path",{d:"M480 544v352H128V544zm416 288v64H544v-64zM416 608H192v224h224zm480 83.072v64H544v-64zM896 544v64H544v-64zM480 128v352H128V128zm416 0v352H544V128zm-480 64H192v224h224zm416 0H608v224h224z"},null,-1)]))}const eo={render:vt},to={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function oo(t,o){return e.openBlock(),e.createElementBlock("svg",to,o[0]||(o[0]=[e.createElementVNode("path",{d:"M487.01 113.079a56.076 56.076 0 0 1 73.216 21.918l1.901 3.536 100.401 203.215L886.93 374.32a56.076 56.076 0 0 1 33.939 92.647l-2.877 3.024-162.329 158.061L793.99 851.31a56.076 56.076 0 0 1-77.726 60.855l-3.609-1.707-200.801-105.472-200.802 105.448a56.076 56.076 0 0 1-81.871-55.345l.512-3.78 38.351-223.256-162.328-158.061a56.076 56.076 0 0 1 27.282-94.989l3.78-.682 224.377-32.573L461.58 138.533a56.08 56.08 0 0 1 25.43-25.454M409.722 408.6l-228.206 33.134 165.132 160.744-39.01 227.133 204.216-107.252 204.19 107.252-39.01-227.133 165.133-160.744L613.96 408.6 511.854 201.9 409.698 408.6z"},null,-1)]))}const no={render:oo},ro={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"};function ao(t,o){return e.openBlock(),e.createElementBlock("svg",ro,o[0]||(o[0]=[e.createElementVNode("path",{d:"M512 109.714c222.184 0 402.286 180.102 402.286 402.286S734.184 914.286 512 914.286l-2.901-.122c-104.546-8.314-189.416-43.52-253.075-105.13l-.024 80.87h-73.143V658.287h207.238v73.143H283.99c52.858 65.048 128.561 101.4 229.45 109.714l7.63-.122C698.662 836.218 841.144 690.737 841.144 512c0-181.784-147.359-329.143-329.143-329.143S182.857 330.216 182.857 512h-73.143c0-222.184 180.102-402.286 402.286-402.286m-48.762 182.857h73.143V475.43h182.857v73.142h-256z"},null,-1)]))}const so={render:ao},lo={class:"app-catalog-wrapper"},io={class:"catalog-wrapper"},co={class:"service-list"},po={class:"app-icon-container"},fo=["href"],mo=["innerHTML"],uo={key:1,class:"app-icon"},ho=Y(e.defineComponent({__name:"AppCatalog",props:{visible:{type:Boolean}},setup(t){const o=e.reactive([]);function n(){Qt().then(({data:r})=>{o.splice(0,o.length,...r.data.list),Xt().then(({data:a})=>{const s=a.data;o.forEach(i=>{i.apps=s.filter(l=>l.groupId===i.id)})})})}return n(),(r,a)=>{const s=e.resolveComponent("el-input"),i=e.resolveComponent("el-scrollbar"),l=e.resolveComponent("el-tab-pane"),c=e.resolveComponent("el-tabs");return e.openBlock(),e.createElementBlock("div",lo,[e.createVNode(c,{"tab-position":"left"},{default:e.withCtx(()=>[e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(eo),{class:"left-icon"})]),default:e.withCtx(()=>[a[0]||(a[0]=e.createElementVNode("h1",{class:"catalog-title"},"Apps",-1)),e.createVNode(s,{class:"search-box","prefix-icon":e.unref(Z.Search),placeholder:"Search apps"},null,8,["prefix-icon"]),e.createVNode(i,{class:"right-area",style:{width:"100%",height:"400px"}},{default:e.withCtx(()=>[e.createElementVNode("div",io,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o,f=>(e.openBlock(),e.createElementBlock("div",co,[e.createElementVNode("h1",null,e.toDisplayString(f.name),1),e.createElementVNode("div",po,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(f.apps,b=>{var k,x;return e.openBlock(),e.createElementBlock("a",{style:e.normalizeStyle([{"text-decoration":"none"},{pointerEvents:((k=b.homepageUrl)==null?void 0:k.length)>0?"auto":"none"}]),target:"_blank",href:b.homepageUrl},[b.iconSvg!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"app-icon",innerHTML:b.iconSvg},null,8,mo)):(e.openBlock(),e.createElementBlock("div",uo," ")),e.createElementVNode("h2",{style:e.normalizeStyle({color:((x=b.homepageUrl)==null?void 0:x.length)>0?"#555":"#bbb"})},e.toDisplayString(b.name),5)],12,fo)}),256))])]))),256))])]),_:1})]),_:1}),e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(no),{class:"left-icon"})]),default:e.withCtx(()=>[a[1]||(a[1]=e.createElementVNode("h1",{class:"catalog-title"},"Favorites",-1))]),_:1}),e.createVNode(l,null,{label:e.withCtx(()=>[e.createVNode(e.unref(so),{class:"left-icon"})]),default:e.withCtx(()=>[a[2]||(a[2]=e.createElementVNode("h1",{class:"catalog-title"},"Recently",-1))]),_:1})]),_:1})])}}}),[["__scopeId","data-v-fcfb021b"]]),st={common:{header:{product:"Products",help:"Help",notification:"Notification",workbench:"Workbench",userCenter:"User Center",switchLanguage:"Languages",signOut:"Sign out"},table:{create:"Create",delete:"Delete",add:"Add",remove:"Remove",search:"Search",edit:"Edit",operation:"Operations",viewSelected:"View Selected",warning:"Warning",select:"Select"},basic:{cancel:"Cancel",confirm:"Confirm",createdTime:"Created Time",description:"Description",detail:"Details",more:"More",name:"Name",no:"No",save:"Save",summary:"Summary",type:"Type",updatedTime:"Updated Time",yes:"Yes"}}},lt={common:{header:{product:"产品",help:"帮助",notification:"通知",workbench:"工作台",userCenter:"用户中心",switchLanguage:"语言",signOut:"退出登录"},table:{create:"创建",delete:"删除",add:"添加",remove:"移除",search:"搜索",edit:"编辑",operation:"操作",viewSelected:"查看已选",warning:"风险提示",select:"选择"},basic:{cancel:"取消",confirm:"确认",createdTime:"创建时间",description:"描述",detail:"详情",more:"更多",name:"名称",no:"否",save:"保存",summary:"基本信息",type:"类型",updatedTime:"更新时间",yes:"是"}}},Pe=_e.createI18n({legacy:!1,locale:localStorage.getItem("locale")||navigator.language.slice(0,2),messages:{en:st,zh:lt}}),go={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function _o(t,o){return e.openBlock(),e.createElementBlock("svg",go,o[0]||(o[0]=[e.createElementVNode("path",{d:"M22.6 29.1h6.6v-6.6h-6.6m0-3.2h6.6v-6.6h-6.6m-9.9-3.3h6.6V2.9h-6.6m9.9 6.5h6.6V2.9h-6.6m-9.9 16.4h6.6v-6.6h-6.6m-9.8 6.6h6.6v-6.6H2.9m0 16.4h6.6v-6.6H2.9m9.8 6.6h6.6v-6.6h-6.6M2.9 9.4h6.6V2.9H2.9z"},null,-1)]))}const bo={render:_o},yo={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function wo(t,o){return e.openBlock(),e.createElementBlock("svg",yo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M651.404 284.363c-14.446-23.404-34.322-43.717-58.832-56.969A164.4 164.4 0 0 0 512 206.328a157.8 157.8 0 0 0-63.864 12.893 163.8 163.8 0 0 0-52.22 35.105c-14.77 14.405-26.455 32.338-35.04 51.895a164 164 0 0 0-12.829 63.958c0 15.233 6.615 28.88 15.993 39.036 10.063 9.363 23.72 15.988 38.92 15.988a56.73 56.73 0 0 0 38.528-15.988c10.134-10.155 16.747-23.803 16.747-39.036a54.8 54.8 0 0 1 3.918-21.066c3.126-6.232 6.614-12.495 11.643-17.17a60.4 60.4 0 0 1 17.143-11.703c6.614-2.304 14.053-4.646 21.061-4.646a53.95 53.95 0 0 1 38.167 16.35c18.652 18.364 21.384 49.946 7.759 71.803-5.47 7.779-12.83 13.685-19.443 19.915-19.874 16.78-39.748 33.96-55.31 62.045-15.598 27.258-25.733 65.537-25.733 122.47a55.76 55.76 0 0 0 16.352 39.035c9.38 9.758 23.36 15.591 38.204 15.591 15.167 0 29.578-5.833 38.921-15.591a55.6 55.6 0 0 0 16.354-39.036c0-32.769 5.067-53.803 13.228-68.635 8.59-14.873 18.687-24.198 28.822-32.806 9.74-8.57 19.048-16.383 27.638-25.35 8.158-8.966 15.992-18.69 22.21-30.825 5.462-9.327 9.344-21.03 12.435-34.318 7.008-29.276 7.008-63.197-2.3-92.47-4.313-13.647-10.136-27.69-17.899-39.394zM512 706.508a53.51 53.51 0 0 0-38.204 15.988 54.725 54.725 0 0 0 0 78.035A53.51 53.51 0 0 0 512 816.519c15.167 0 29.578-6.232 38.921-15.988a54.72 54.72 0 0 0 0-78.035c-9.343-9.758-23.754-15.988-38.921-15.988m350.046-543.104c-88.409-88.95-211.463-144.363-347.744-145.12-137.826-.792-260.887 54.627-351.194 144.365-89.598 89.7-144.835 213-144.835 348.757a528.6 528.6 0 0 0 10.099 100.288c7.008 31.581 16.352 63.597 28.788 92.47 37.808 90.493 102.03 165.394 180.305 218.113a493.11 493.11 0 0 0 623.435-61.29c90.315-89.34 144.798-213.035 144.798-349.585 0-135.362-54.483-258.228-143.649-348.001zm-137.86 668.742a383.537 383.537 0 0 1-565.784-170.902c-10.135-22.614-17.106-46.814-22.57-71.768-4.636-25.388-7.758-51.132-7.758-78.07a381.15 381.15 0 0 1 112.92-271.516c69.29-69.463 165.86-112.387 272.562-112.387a385.85 385.85 0 0 1 352.768 234.1 398 398 0 0 1 29.58 149.803 393.7 393.7 0 0 1-29.58 149.834 387.25 387.25 0 0 1-142.137 170.906"},null,-1)]))}const Co={render:wo},ko={xmlns:"http://www.w3.org/2000/svg",width:"200",height:"200",class:"icon",viewBox:"0 0 1024 1024"};function No(t,o){return e.openBlock(),e.createElementBlock("svg",ko,o[0]||(o[0]=[e.createElementVNode("path",{d:"M358.4 871.2H45.152C19.936 871.2 0 843.904 0 819.2s19.936-50.624 45.152-50.624h56.64l-1.088-283.168c0-204.608 164.032-374.56 337.056-412.576v-1.28C437.76 32.032 470.496 0 510.848 0s73.088 32.032 73.088 71.552v1.28C756.96 110.848 922.08 280.8 922.08 485.408v283.168h55.008c25.216 0 46.944 25.92 46.944 50.624s-21.696 52-46.944 52H665.632c-.416 84.48-69.024 152.8-153.6 152.8s-153.184-68.352-153.6-152.8zm102.4 0c.416 27.904 23.168 50.4 51.2 50.4s50.784-22.496 51.2-50.4zm357.216-103.328v-282.56c0-179.808-149.536-329.984-307.104-329.984S204.544 305.472 204.544 485.312v282.56z"},null,-1)]))}const Vo={render:No},xo={xmlns:"http://www.w3.org/2000/svg","xml:space":"preserve",viewBox:"0 0 32 32"};function Eo(t,o){return e.openBlock(),e.createElementBlock("svg",xo,o[0]||(o[0]=[e.createElementVNode("path",{d:"M23.8 22.1H8.2c-2.5 0-4.5-2.1-4.5-4.5V7.9c0-2.5 2.1-4.5 4.5-4.5h15.6c2.5 0 4.5 2.1 4.5 4.5v9.7c0 2.4-2.1 4.5-4.5 4.5M16 23.2v5M8.3 28.9h15.4",style:{fill:"none","stroke-width":"3","stroke-miterlimit":"10"}},null,-1)]))}const So={render:Eo};function fe(t,o,n){switch(o){case"POST":return ie.post(t,n);case"PUT":return ie.put(t,n);case"DELETE":return ie.delete(t+"/"+n);default:return ie.get(t,{params:n})}}const Bo={class:"header"},$o={class:"title"},Oo={class:"right"},Po={class:"icon-wrapper"},Io={class:"user-wrapper"},To={style:{"font-size":"11px","font-weight":"bold"}},Do={class:"user-popover-header"},Ao={style:{"font-size":"15px","font-weight":"bold"}},Mo=["onClick"],He=Y(e.defineComponent({__name:"Header",props:{title:{},headerProjectConfig:{},helpDocUrl:{}},setup(t){const{t:o}=_e.useI18n(),n=e.ref(),r=e.ref(),a=e.ref(),s=e.ref(),i=e.ref(!1),l=t,c=e.ref(),f=e.reactive({id:"",name:""}),b=e.ref(""),k=e.ref(Pe.global.locale),x=e.reactive([{id:"en",name:"English"},{id:"zh",name:"简体中文"}]);e.onMounted(()=>{var P,I,H;b.value=decodeURIComponent(S("passport_username").replace(/\+/g," ")),b.value===""&&Yt().then(({data:h})=>{var m;h.code==0&&(b.value=(m=h.data.name)!=null?m:h.data.displayId)}),(P=l.headerProjectConfig)!=null&&P.api?fe((I=l.headerProjectConfig)==null?void 0:I.api,"GET",{}).then(({data:h})=>{c.value=h.data}):(H=l.headerProjectConfig)!=null&&H.items&&(c.value=l.headerProjectConfig.items)});function S(P){for(var I=P+"=",H=document.cookie.split(";"),h=0;h<H.length;h++){for(var m=H[h];m.charAt(0)==" ";)m=m.substring(1);if(m.indexOf(I)!=-1)return m.substring(I.length,m.length)}return""}function M(){Kt().then(()=>{const P=escape(window.location.href);window.location.href=`//${rt()}/?from=${P}#login`})}function O(P){Pe.global.locale.value=P,k.value=P,localStorage.setItem("locale",P)}function q(){window.open("https://passport.vancone.com/#/account/profile","_blank")}function U(){window.open(l.helpDocUrl,"_blank")}function ee(P){if(P==="allProjects")alert("show all projects");else for(let I of c.value)if(console.log("project.id",I.id,"command",P),I.id===P){Object.assign(f,I);break}}return(P,I)=>{const H=e.resolveComponent("el-icon"),h=e.resolveComponent("el-dropdown-item"),m=e.resolveComponent("el-dropdown-menu"),_=e.resolveComponent("el-dropdown"),V=e.resolveComponent("el-popover"),p=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-avatar"),w=e.resolveComponent("el-menu-item"),N=e.resolveComponent("el-menu"),T=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",Bo,[e.createElementVNode("div",$o,[e.createElementVNode("div",{ref_key:"appCatalogButtonRef",ref:s,class:"icon-wrapper",style:{"margin-left":"8px"}},[e.createVNode(e.unref(bo))],512),e.createElementVNode("h1",null,e.toDisplayString(P.title),1),l.headerProjectConfig?(e.openBlock(),e.createBlock(_,{key:0,placement:"bottom-start",onCommand:ee},{dropdown:e.withCtx(()=>[e.createVNode(m,{style:{width:"300px"}},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value,B=>(e.openBlock(),e.createBlock(h,{command:B.id},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(B.name),1)]),_:2},1032,["command"]))),256)),e.createVNode(h,{divided:"",command:"allProjects"},{default:e.withCtx(()=>I[2]||(I[2]=[e.createTextVNode("全部项目")])),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,[e.createTextVNode(e.toDisplayString(f.name)+" ",1),e.createVNode(H,{class:"el-icon--right"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowDown))]),_:1})])]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(V,{class:"app-popover","virtual-ref":s.value,trigger:"click","show-arrow":!1,"popper-style":"width: 500px; height: 500px; padding: 0; inset: 49px auto auto 0px"},{default:e.withCtx(()=>[e.createVNode(ho,{visible:!0})]),_:1},8,["virtual-ref"]),e.createElementVNode("div",Oo,[e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.workbench"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",Po,[e.createVNode(e.unref(So))])]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.help"),placement:"bottom"},{default:e.withCtx(()=>[l.helpDocUrl!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"icon-wrapper",onClick:U},[e.createVNode(e.unref(Co))])):e.createCommentVNode("",!0)]),_:1},8,["content"]),e.createVNode(p,{effect:"dark",content:e.unref(o)("common.header.notification"),placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("div",{class:"icon-wrapper",onClick:I[0]||(I[0]=B=>i.value=!0)},[e.createVNode(e.unref(Vo))])]),_:1},8,["content"]),e.createElementVNode("div",Io,[e.createVNode(d,{size:30,src:"",ref_key:"avatarRef",ref:n},{default:e.withCtx(()=>[e.createElementVNode("span",To,e.toDisplayString(b.value.substring(0,2)),1)]),_:1},512),e.createVNode(V,{teleported:!1,width:"280",effect:"dark",ref_key:"popoverRef",ref:r,"virtual-ref":n.value,trigger:"hover","virtual-triggering":""},{default:e.withCtx(()=>[e.createElementVNode("div",Do,[e.createVNode(d,{size:48,src:""},{default:e.withCtx(()=>[e.createElementVNode("span",Ao,e.toDisplayString(b.value.substring(0,2)),1)]),_:1}),e.createElementVNode("span",null,e.toDisplayString(b.value),1)]),e.createVNode(N,{class:"user-menu"},{default:e.withCtx(()=>[e.createVNode(w,{onClick:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.userCenter")),1)]),_:1}),e.createVNode(w,{ref_key:"switchLanguageRef",ref:a,style:{display:"flext","justify-content":"space-between"}},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(e.unref(o)("common.header.switchLanguage")),1),e.createVNode(H,{style:{left:"15px"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.ArrowRight))]),_:1})]),_:1},512),e.createVNode(V,{teleported:!1,width:"150",effect:"dark",ref:"popover2Ref",placement:"left-start","virtual-ref":a.value,trigger:"hover","virtual-triggering":"","popper-style":"height: 80px; left: -165px"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(x,B=>(e.openBlock(),e.createElementBlock("div",{class:"select-list",onClick:$=>O(B.id)},[e.createElementVNode("span",null,e.toDisplayString(B.name),1),B.id===k.value?(e.openBlock(),e.createBlock(H,{key:0,style:{color:"#8ba74f"}},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Check))]),_:1})):e.createCommentVNode("",!0)],8,Mo))),256))]),_:1},8,["virtual-ref"]),e.createVNode(w,{onClick:M},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("common.header.signOut")),1)]),_:1})]),_:1})]),_:1},8,["virtual-ref"])])])]),e.createVNode(T,{modelValue:i.value,"onUpdate:modelValue":I[1]||(I[1]=B=>i.value=B),direction:"rtl",title:"Message Center"},null,8,["modelValue"])],64)}}}),[["__scopeId","data-v-b04b3245"]]),Uo={class:"menu-icon-wrapper",style:{"margin-left":"3px"}},Fo=["innerHTML"],Ro={class:"menu-icon-wrapper"},Lo=["innerHTML"],Go=Y(e.defineComponent({__name:"SideMenuItem",props:{menu:{}},setup(t){const o=t;return e.nextTick(()=>console.log("menu",o.menu)),(n,r)=>{const a=e.resolveComponent("SideMenuItem",!0),s=e.resolveComponent("el-sub-menu"),i=e.resolveComponent("el-menu-item");return n.menu.children&&n.menu.children.length>0?(e.openBlock(),e.createBlock(s,{key:0,index:n.menu.path},{title:e.withCtx(()=>{var l,c,f,b;return[e.createElementVNode("div",Uo,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((l=n.menu.meta)==null?void 0:l.icon),{class:"menu-icon"})),((c=o.menu.meta)==null?void 0:c.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-icon",innerHTML:o.menu.meta.svgXml},null,8,Fo)):e.createCommentVNode("",!0)]),e.createElementVNode("span",null,e.toDisplayString(n.$t((b=(f=n.menu.meta)==null?void 0:f.title)!=null?b:"")),1)]}),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.menu.children,l=>(e.openBlock(),e.createBlock(a,{key:l.path,route:l,menu:l},null,8,["route","menu"]))),128))]),_:1},8,["index"])):(e.openBlock(),e.createBlock(i,{key:1,index:o.menu.path,style:{height:"40px"}},{title:e.withCtx(()=>{var l,c;return[e.createElementVNode("span",null,e.toDisplayString(n.$t((c=(l=n.menu.meta)==null?void 0:l.title)!=null?c:"")),1)]}),default:e.withCtx(()=>{var l,c;return[e.createElementVNode("div",Ro,[(e.openBlock(),e.createBlock(e.resolveDynamicComponent((l=n.$props.menu.meta)==null?void 0:l.icon),{class:"menu-icon"})),((c=o.menu.meta)==null?void 0:c.svgXml)!==void 0?(e.openBlock(),e.createElementBlock("div",{key:0,class:"menu-icon",innerHTML:o.menu.meta.svgXml},null,8,Lo)):e.createCommentVNode("",!0)])]}),_:1},8,["index"]))}}}),[["__scopeId","data-v-7391484d"]]),re=e.ref({}),it={},We=e.ref([]);var ct=!1;function Me(t,o,n){return Array.isArray(t)?(t.length=Math.max(t.length,o),t.splice(o,1,n),n):(t[o]=n,n)}function Je(t,o){if(Array.isArray(t)){t.splice(o,1);return}delete t[o]}function jo(){return dt().__VUE_DEVTOOLS_GLOBAL_HOOK__}function dt(){return typeof navigator!="undefined"&&typeof window!="undefined"?window:typeof globalThis!="undefined"?globalThis:{}}const zo=typeof Proxy=="function",qo="devtools-plugin:setup",Ho="plugin:settings:set";let Ee,Ye;function Wo(){var t;return Ee!==void 0||(typeof window!="undefined"&&window.performance?(Ee=!0,Ye=window.performance):typeof globalThis!="undefined"&&(!((t=globalThis.perf_hooks)===null||t===void 0)&&t.performance)?(Ee=!0,Ye=globalThis.perf_hooks.performance):Ee=!1),Ee}function Jo(){return Wo()?Ye.now():Date.now()}class Yo{constructor(o,n){this.target=null,this.targetQueue=[],this.onQueue=[],this.plugin=o,this.hook=n;const r={};if(o.settings)for(const i in o.settings){const l=o.settings[i];r[i]=l.defaultValue}const a=`__vue-devtools-plugin-settings__${o.id}`;let s=Object.assign({},r);try{const i=localStorage.getItem(a),l=JSON.parse(i);Object.assign(s,l)}catch(i){}this.fallbacks={getSettings(){return s},setSettings(i){try{localStorage.setItem(a,JSON.stringify(i))}catch(l){}s=i},now(){return Jo()}},n&&n.on(Ho,(i,l)=>{i===this.plugin.id&&this.fallbacks.setSettings(l)}),this.proxiedOn=new Proxy({},{get:(i,l)=>this.target?this.target.on[l]:(...c)=>{this.onQueue.push({method:l,args:c})}}),this.proxiedTarget=new Proxy({},{get:(i,l)=>this.target?this.target[l]:l==="on"?this.proxiedOn:Object.keys(this.fallbacks).includes(l)?(...c)=>(this.targetQueue.push({method:l,args:c,resolve:()=>{}}),this.fallbacks[l](...c)):(...c)=>new Promise(f=>{this.targetQueue.push({method:l,args:c,resolve:f})})})}setRealTarget(o){return he(this,null,function*(){this.target=o;for(const n of this.onQueue)this.target.on[n.method](...n.args);for(const n of this.targetQueue)n.resolve(yield this.target[n.method](...n.args))})}}function pt(t,o){const n=t,r=dt(),a=jo(),s=zo&&n.enableEarlyProxy;if(a&&(r.__VUE_DEVTOOLS_PLUGIN_API_AVAILABLE__||!s))a.emit(qo,t,o);else{const i=s?new Yo(n,a):null;(r.__VUE_DEVTOOLS_PLUGINS__=r.__VUE_DEVTOOLS_PLUGINS__||[]).push({pluginDescriptor:n,setupFn:o,proxy:i}),i&&o(i.proxiedTarget)}}/*!
2
2
  * pinia v2.2.6
3
3
  * (c) 2024 Eduardo San Martin Morote
4
4
  * @license MIT