"use strict";exports.id=1924,exports.ids=[1924],exports.modules={41924:(a,b,c)=>{c.d(b,{getPluginRegistry:()=>r,getThemeRegistry:()=>s});var d=c(51455),e=c(73024),f=c(77598),g=c(76760),h=c.n(g),i=c(67605),j=c(67311);function k(){return h().join((0,j.WI)(),"plugins")}async function l(a){(0,e.existsSync)(a)||await (0,d.mkdir)(a,{recursive:!0})}async function m(a,b){try{let b=await (0,d.readFile)(a,"utf-8");return JSON.parse(b)}catch(c){if("ENOENT"===c.code)return b;return i.v.warn(`Failed to read ${a}`,{error:c instanceof Error?c.message:"Unknown error"}),b}}async function n(a,b){let c=h().dirname(a);await l(c);let e=a+".tmp";await (0,d.writeFile)(e,JSON.stringify(b,null,2),"utf-8"),await (0,d.rename)(e,a)}let o=()=>h().join(k(),"registry.json"),p=/^[0-9a-f]{64}$/;async function q(a){let b=!1;for(let c of a.plugins){if(!c.bundleHash||p.test(c.bundleHash))continue;let a=h().join(k(),`${c.id}.js`);try{let b=await (0,d.readFile)(a);c.bundleHash=(0,f.createHash)("sha256").update(b).digest("hex")}catch{delete c.bundleHash}b=!0}return b}async function r(){let a=await m(o(),{plugins:[]});if(await q(a))try{await n(o(),a)}catch{}return a}async function s(){return m(h().join(h().join((0,j.WI)(),"themes"),"registry.json"),{themes:[]})}}};