storage-378460c7.js 1.3 KB

1
  1. var p=Object.defineProperty,u=Object.defineProperties;var L=Object.getOwnPropertyDescriptors;var C=Object.getOwnPropertySymbols;var G=Object.prototype.hasOwnProperty,h=Object.prototype.propertyIsEnumerable;var d=(e,o,t)=>o in e?p(e,o,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[o]=t,m=(e,o)=>{for(var t in o||(o={}))G.call(o,t)&&d(e,t,o[t]);if(C)for(var t of C(o))h.call(o,t)&&d(e,t,o[t]);return e},S=(e,o)=>u(e,L(o));var l=(e,o,t)=>new Promise((a,s)=>{var r=n=>{try{c(t.next(n))}catch(g){s(g)}},f=n=>{try{c(t.throw(n))}catch(g){s(g)}},c=n=>n.done?a(n.value):Promise.resolve(n.value).then(r,f);c((t=t.apply(e,o)).next())});import{aH as b,aI as q,af as v}from"./index-7f9b3dc0.js";import{f as E}from"./project.api-ce920c4d.js";import{u as I}from"./chartEditStore-a7c7155c.js";const i=I(),_=()=>l(void 0,null,function*(){const e=b(),o=q(v.GO_CHART_STORAGE_LIST);if(!o||o.findIndex(t=>t.id===e.toString())===-1){const t=yield E({id:e}),a=S(m({},JSON.parse(t.data.Data.content)),{id:e}),{editCanvasConfig:s,requestGlobalConfig:r,componentList:f}=a;return i.editCanvasConfig=s,i.requestGlobalConfig=r,i.componentList=f,a}else for(let t=0;t<o.length;t++)if(e.toString()===o[t].id){const{editCanvasConfig:a,requestGlobalConfig:s,componentList:r}=o[t];return i.editCanvasConfig=a,i.requestGlobalConfig=s,i.componentList=r,o[t]}});export{_ as g};