@univer-cli/resource-library 1.2.0 → 1.3.0
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/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x368a75=_0x3a82;(function(_0x302917,_0x62054f){const _0x1c22b7=_0x3a82,_0x37aec9=_0x302917();while(!![]){try{const _0x36181f=-parseInt(_0x1c22b7(0xde))/0x1*(-parseInt(_0x1c22b7(0x168))/0x2)+-parseInt(_0x1c22b7(0x11b))/0x3+-parseInt(_0x1c22b7(0x160))/0x4+-parseInt(_0x1c22b7(0x129))/0x5*(-parseInt(_0x1c22b7(0x17e))/0x6)+parseInt(_0x1c22b7(0xee))/0x7*(-parseInt(_0x1c22b7(0x121))/0x8)+parseInt(_0x1c22b7(0x104))/0x9*(parseInt(_0x1c22b7(0x19b))/0xa)+parseInt(_0x1c22b7(0xe3))/0xb*(parseInt(_0x1c22b7(0x105))/0xc);if(_0x36181f===_0x62054f)break;else _0x37aec9['push'](_0x37aec9['shift']());}catch(_0x208775){_0x37aec9['push'](_0x37aec9['shift']());}}}(_0x2a2d,0xc90af));import{randomUUID as _0x5df176}from'node:crypto';import{mkdir as _0x38b345,readFile as _0x1b58a5,readdir as _0x2a9df3,rename as _0x229740,rm as _0x33cbe9,stat as _0xfbcba7,unlink as _0x40efa7,writeFile as _0x32930c}from'node:fs/promises';import{dirname as _0x3af76f,isAbsolute as _0x4b796e,join as _0x121bf7,parse as _0x3fc2f4,resolve as _0xae75d9}from'node:path';import{readFileSync as _0x47e81a}from'node:fs';var h=class extends Error{[_0x368a75(0x125)];[_0x368a75(0x141)];constructor(_0x1de0e1,_0x61a33b,_0x1d99a9,_0x5aea6f){const _0x851b1d=_0x368a75;super(_0x61a33b,_0x5aea6f),this[_0x851b1d(0x125)]=_0x1de0e1,this[_0x851b1d(0x141)]=_0x1d99a9,this[_0x851b1d(0x19e)]='ResourceLibraryError';}};function g(_0x2d9d18){return _0x2d9d18 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x275604){const _0x11918f=_0x368a75;return _[_0x11918f(0x186)](_0x275604)&&_0x275604!=='.'&&_0x275604!=='..';}function x(_0x4fcf07){const _0xe7dffd=_0x368a75;if(!b(_0x4fcf07)||_0x4fcf07[_0xe7dffd(0x14b)]('-')||_0x4fcf07[_0xe7dffd(0x195)]('--')||_0x4fcf07[_0xe7dffd(0x14c)]>v)throw new h(_0xe7dffd(0x142),_0xe7dffd(0x145)+_0x4fcf07+_0xe7dffd(0x136));}function S(_0x209ea1){const _0x59ba87=_0x368a75;if(!b(_0x209ea1)||_0x209ea1[_0x59ba87(0x14c)]+y>v)throw new h('resource-invalid-resource-id','Invalid\x20resource\x20ID\x20\x22'+_0x209ea1+_0x59ba87(0x19a));}function _0x2a2d(){const _0x354c64=['resource-download-too-many-redirects','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','\x22\x20is\x20not\x20an\x20SVG\x20document.','export','resource-cache-root-invalid','551476jXsvwX','get','.id','filter','toLowerCase','10300015fGHrAb','resource-download-failed','status','isFinite','endsWith','\x20must\x20be\x20a\x20non-empty\x20string.','isArray','path','Duplicate\x20','colorEditable','.intrinsicSize.width','56nKqWfo','catalog','manual','signal','.payload','.storagePolicy\x20must\x20be\x20\x22reference\x22.','push','groupId','write','payload','done','].input.registryId','.groupId\x20references\x20unknown\x20group\x20\x22','.source.value','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','cache','https:','download','height','.source','values','has','13374009cejnwJ','12wneGMz','location','registrations[','].input.resources[','string','number','keywords','entries','.groupId','.name','set','.tmp','resource-query-empty','resource-export-failed','].input.groups','\x20contains\x20no\x20usable\x20localized\x20text.','Duplicate\x20export\x20filename\x20\x22','read','downloader','add','maxRedirects','\x20must\x20be\x20a\x20finite\x20number.','1045641bmWKDC','parse','Duplicate\x20registry\x20ID\x20\x22','options','Unknown\x20resource\x20registry\x20\x22','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','1389112kigYUR','.resource-','normalize','resource-manifest-invalid','code','groups','.tagIds','\x20without\x20a\x20Location\x20header.','87510TLBUCX','isFile','destination','\x22;\x20expected\x20<registryId>/<resourceId>.','catch','timeoutMs','trim','label','group','pid','value','concat','byteCount','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','sort','manifest.registrations','sourceUrl','\x20must\x20be\x20an\x20array.','type','\x20ID\x20\x22','ENOENT','Invalid\x20resource\x20handle\x20\x22','Cannot\x20read\x20resource\x20manifest\x20at\x20','output','handle','resource-invalid-registry-id','resourceCount','utf8','Invalid\x20registry\x20ID\x20\x22','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','root','resource-not-found','url','\x20bytes.','startsWith','length','split','fetchImpl','utf-8','\x20ms.','message','size','globalIndex','resource-download-invalid-redirect','Resource\x20download\x20timed\x20out\x20after\x20','clear','registryId','\x22;\x20try\x20resources\x20find\x20<query>.','releaseLock',']\x20must\x20be\x20a\x20string.','tagIds','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','resource-limit-invalid','.description','some','4101128lfloHY','source','registrationIndex','map','Duplicate\x20resource\x20handle\x20\x22','fetch','slice','resource-registry-not-found','2JYjMDA','resources','resourceIndex','].input.tags','resource-download-invalid-utf8','].id','resource-download-insecure-redirect','.intrinsicSize\x20must\x20be\x20positive.','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','manifest','getReader','aborted','.intrinsicSize.height','Failed\x20to\x20download\x20\x22','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','body','defaultLocale','storagePolicy','text','Resource\x20URL\x20must\x20use\x20HTTPS.','clearCache','Invalid\x20resource\x20manifest:\x20','210TcNXqL','resource-download-timeout','resource-download-invalid-svg','.svg','protocol','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','order','tags','test','decode','Unknown\x20resource\x20\x22','cacheRoot','boolean','find','.intrinsicSize','queries','].input.resources','registry','\x20must\x20be\x20a\x20boolean.','intrinsicSize','replace','byteLength','input','includes','.source.type\x20must\x20be\x20\x22url\x22.','resource','image','.payload.colorEditable','\x22:\x20expected\x20filesystem-safe\x20characters.','10FYgUcb','en-US','].input.defaultLocale','name','reference','maxBytes','resource-export-filename-too-long','resource-invalid-svg','isInteger','cacheLocation','headers','registries','description','handles'];_0x2a2d=function(){return _0x354c64;};return _0x2a2d();}function C(_0x1ed114){const _0xa40446=_0x368a75;let _0x18fdf3=_0x1ed114[_0xa40446(0x14d)]('/');if(_0x18fdf3[_0xa40446(0x14c)]!==0x2||_0x18fdf3[0x0]===''||_0x18fdf3[0x1]==='')throw new h('resource-invalid-handle',_0xa40446(0x13e)+_0x1ed114+_0xa40446(0x12c),_0x1ed114);let _0xc1c31b=_0x18fdf3[0x0],_0x2269c1=_0x18fdf3[0x1];return x(_0xc1c31b),S(_0x2269c1),{'registryId':_0xc1c31b,'resourceId':_0x2269c1};}function ee(_0xd95707,_0x19820a){return x(_0xd95707),S(_0x19820a),_0xd95707+'/'+_0x19820a;}function w(_0x410243){const _0x590aff=_0x368a75;let {registryId:_0x406c58,resourceId:_0x32ecf3}=C(_0x410243),_0x1e43a4=_0x406c58+'--'+_0x32ecf3+'.svg';if(_0x1e43a4[_0x590aff(0x14c)]>v)throw new h(_0x590aff(0x1a1),'Resource\x20export\x20filename\x20exceeds\x20'+v+_0x590aff(0x14a),_0x410243);return _0x1e43a4;}function T(_0x33b810){const _0x338de3=_0x368a75;return new h(_0x338de3(0x124),_0x338de3(0x17d)+_0x33b810);}function E(_0xee755a,_0x5e29a2){if(typeof _0xee755a!='object'||!_0xee755a||Array['isArray'](_0xee755a))throw T(_0x5e29a2+'\x20must\x20be\x20an\x20object.');return _0xee755a;}function D(_0x2f26ba,_0x58e0ef,_0x34c5f5=!0x1){const _0x22d6a7=_0x368a75;if(_0x34c5f5&&_0x2f26ba===void 0x0)return[];if(!Array[_0x22d6a7(0xe9)](_0x2f26ba))throw T(_0x58e0ef+_0x22d6a7(0x13a));return _0x2f26ba;}function O(_0x27e8ef,_0x1875a5){const _0x36b33d=_0x368a75;if(typeof _0x27e8ef!=_0x36b33d(0x109)||_0x27e8ef==='')throw T(_0x1875a5+_0x36b33d(0xe8));return _0x27e8ef;}function k(_0x4a157d,_0x4ea609,_0x522473=!0x1){const _0x152d70=_0x368a75;return D(_0x4a157d,_0x4ea609,_0x522473)[_0x152d70(0x163)]((_0x179cda,_0x42d8f1)=>O(_0x179cda,_0x4ea609+'['+_0x42d8f1+']'));}function A(_0xcbae99,_0xc9e9b4){const _0x1de7e1=_0x368a75;return D(_0xcbae99,_0xc9e9b4,!0x0)['map']((_0x5b4493,_0x1b0c29)=>{const _0x3277f1=_0x3a82;if(typeof _0x5b4493!=_0x3277f1(0x109))throw T(_0xc9e9b4+'['+_0x1b0c29+_0x3277f1(0x15a));return _0x5b4493;})[_0x1de7e1(0xe1)](_0x395758=>_0x395758!=='');}function j(_0x1dcd3c,_0x18654b){const _0x7d7c43=_0x368a75;if(typeof _0x1dcd3c!=_0x7d7c43(0x10a)||!Number[_0x7d7c43(0xe6)](_0x1dcd3c))throw T(_0x18654b+_0x7d7c43(0x11a));return _0x1dcd3c;}function M(_0x1a2a0d,_0x2d9ff4){const _0x2a4d0d=_0x368a75;if(typeof _0x1a2a0d!=_0x2a4d0d(0x18a))throw T(_0x2d9ff4+_0x2a4d0d(0x190));return _0x1a2a0d;}function N(_0x3a84cc,_0x58e609,_0x2c8946){const _0x341a5c=_0x368a75;if(typeof _0x3a84cc==_0x341a5c(0x109)&&_0x3a84cc!=='')return _0x3a84cc;let _0x214c80=E(_0x3a84cc,_0x58e609),_0x58a64b=_0x2c8946===void 0x0?void 0x0:_0x214c80[_0x2c8946];if(typeof _0x58a64b==_0x341a5c(0x109)&&_0x58a64b!=='')return _0x58a64b;let _0x857d79=_0x214c80[_0x341a5c(0x19c)];if(typeof _0x857d79==_0x341a5c(0x109)&&_0x857d79!=='')return _0x857d79;let _0x1ab355=Object[_0x341a5c(0x102)](_0x214c80)[_0x341a5c(0x18b)](_0x52f3c1=>typeof _0x52f3c1==_0x341a5c(0x109)&&_0x52f3c1!=='');if(_0x1ab355!==void 0x0)return _0x1ab355;throw T(_0x58e609+_0x341a5c(0x114));}function P(_0x5d9bfb,_0x447674,_0x4c1e94){const _0x27da61=_0x368a75;try{_0x4c1e94===_0x27da61(0x18f)?x(_0x5d9bfb):S(_0x5d9bfb);}catch(_0x3a59b4){throw T(_0x447674+':\x20'+(_0x3a59b4 instanceof Error?_0x3a59b4[_0x27da61(0x151)]:String(_0x3a59b4)));}}function F(_0x4766b3,_0x5868ed,_0x418f56){const _0x138a00=_0x368a75;let _0xb64e45=new Map();for(let [_0x4cdc58,_0x3effcd]of D(_0x4766b3,_0x5868ed,!0x0)[_0x138a00(0x10c)]()){let _0x1532a2=E(_0x3effcd,_0x5868ed+'['+_0x4cdc58+']'),_0x5123a3=O(_0x1532a2['id'],_0x5868ed+'['+_0x4cdc58+_0x138a00(0x16d));if(P(_0x5123a3,_0x5868ed+'['+_0x4cdc58+_0x138a00(0x16d),_0x138a00(0x197)),_0xb64e45[_0x138a00(0x103)](_0x5123a3))throw T(_0x138a00(0xeb)+_0x5868ed+_0x138a00(0x13c)+_0x5123a3+'\x22.');_0xb64e45[_0x138a00(0x10f)](_0x5123a3,N(_0x1532a2[_0x138a00(0x130)],_0x5868ed+'['+_0x4cdc58+'].label',_0x418f56));}return _0xb64e45;}function I(_0x33796c,_0x1f0b16){const _0x33727a=_0x368a75;let _0x17c965=E(_0x33796c[_0x33727a(0x191)],_0x1f0b16+_0x33727a(0x18c)),_0x58becd=j(_0x17c965['width'],_0x1f0b16+_0x33727a(0xed)),_0x4cdb0f=j(_0x17c965[_0x33727a(0x100)],_0x1f0b16+_0x33727a(0x174));if(_0x58becd<=0x0||_0x4cdb0f<=0x0)throw T(_0x1f0b16+_0x33727a(0x16f));return{'width':_0x58becd,'height':_0x4cdb0f};}function L(_0x29d83c,_0x110e03){const _0x4538a6=_0x368a75;if(_0x29d83c['type']!==_0x4538a6(0x198))throw T(_0x110e03+'.type\x20must\x20be\x20\x22image\x22.');if(_0x29d83c[_0x4538a6(0x179)]!==_0x4538a6(0x19f))throw T(_0x110e03+_0x4538a6(0xf3));let _0x3ddeb7=E(_0x29d83c[_0x4538a6(0x161)],_0x110e03+_0x4538a6(0x101));if(_0x3ddeb7[_0x4538a6(0x13b)]!==_0x4538a6(0x149))throw T(_0x110e03+_0x4538a6(0x196));let _0x3fa1dd=O(_0x3ddeb7[_0x4538a6(0x133)],_0x110e03+_0x4538a6(0xfb)),_0x30b25f;try{_0x30b25f=new URL(_0x3fa1dd);}catch{throw T(_0x110e03+'.source.value\x20must\x20be\x20a\x20URL.');}if(_0x30b25f[_0x4538a6(0x182)]!==_0x4538a6(0xfe))throw T(_0x110e03+'.source.value\x20must\x20use\x20HTTPS.');return _0x3fa1dd;}function _0x3a82(_0x353c9b,_0x1c9817){_0x353c9b=_0x353c9b-0xd6;const _0x2a2dd9=_0x2a2d();let _0x3a8265=_0x2a2dd9[_0x353c9b];return _0x3a8265;}function R(_0x442c29){const _0x5d9c68=_0x368a75;return _0x442c29[_0x5d9c68(0x123)]('NFKC')[_0x5d9c68(0xe2)]()[_0x5d9c68(0x12f)]()[_0x5d9c68(0x192)](/\s+/gu,'\x20');}function z(_0x17cbe2){const _0x5385d0=_0x368a75;let _0x2ee3fd=E(_0x17cbe2,_0x5385d0(0x171)),_0xc1157e=new Map(),_0x3ab93d=new Map(),_0x50dc93=[],_0x2432c6=[],_0x3385c4=new Set(),_0x825844=0x0;for(let [_0x70c1d0,_0xd3ca55]of D(_0x2ee3fd['registrations'],_0x5385d0(0x138))[_0x5385d0(0x10c)]()){let _0x333615=E(E(_0xd3ca55,_0x5385d0(0x107)+_0x70c1d0+']')[_0x5385d0(0x194)],_0x5385d0(0x107)+_0x70c1d0+'].input'),_0x73e585=O(_0x333615['registryId'],'registrations['+_0x70c1d0+_0x5385d0(0xf9));if(P(_0x73e585,_0x5385d0(0x107)+_0x70c1d0+'].input.registryId',_0x5385d0(0x18f)),_0xc1157e[_0x5385d0(0x103)](_0x73e585))throw T(_0x5385d0(0x11d)+_0x73e585+'\x22.');let _0x43acbb=_0x333615[_0x5385d0(0x178)]===void 0x0?void 0x0:O(_0x333615['defaultLocale'],_0x5385d0(0x107)+_0x70c1d0+_0x5385d0(0x19d)),_0x2df114=F(_0x333615[_0x5385d0(0x126)],_0x5385d0(0x107)+_0x70c1d0+_0x5385d0(0x113),_0x43acbb),_0x2199e1=F(_0x333615['tags'],_0x5385d0(0x107)+_0x70c1d0+_0x5385d0(0x16b),_0x43acbb),_0x1505dc=[];for(let [_0x3d4d83,_0x36e8cb]of D(_0x333615[_0x5385d0(0x169)],'registrations['+_0x70c1d0+_0x5385d0(0x18e))[_0x5385d0(0x10c)]()){let _0x2345b1=_0x5385d0(0x107)+_0x70c1d0+_0x5385d0(0x108)+_0x3d4d83+']',_0xf7f965=E(_0x36e8cb,_0x2345b1),_0x5877fd=O(_0xf7f965['id'],_0x2345b1+_0x5385d0(0xe0));P(_0x5877fd,_0x2345b1+'.id',_0x5385d0(0x197));let _0x5a714c=ee(_0x73e585,_0x5877fd);if(_0x3ab93d[_0x5385d0(0x103)](_0x5a714c))throw T(_0x5385d0(0x164)+_0x5a714c+'\x22.');let _0x5a4279;try{_0x5a4279=w(_0x5a714c);}catch(_0x510fe0){throw T(_0x2345b1+':\x20'+(_0x510fe0 instanceof Error?_0x510fe0['message']:String(_0x510fe0)));}if(_0x3385c4[_0x5385d0(0x103)](_0x5a4279))throw T(_0x5385d0(0x115)+_0x5a4279+'\x22.');_0x3385c4[_0x5385d0(0x118)](_0x5a4279);let _0x2e21d6=_0xf7f965['groupId']===void 0x0?void 0x0:O(_0xf7f965[_0x5385d0(0xf5)],_0x2345b1+_0x5385d0(0x10d));if(_0x2e21d6!==void 0x0&&!_0x2df114[_0x5385d0(0x103)](_0x2e21d6))throw T(_0x2345b1+_0x5385d0(0xfa)+_0x2e21d6+'\x22.');let _0x285c2c=k(_0xf7f965[_0x5385d0(0x15b)],_0x2345b1+_0x5385d0(0x127),!0x0);for(let _0x1e7c7e of _0x285c2c)if(!_0x2199e1[_0x5385d0(0x103)](_0x1e7c7e))throw T(_0x2345b1+'.tagIds\x20references\x20unknown\x20tag\x20\x22'+_0x1e7c7e+'\x22.');let _0x312485=A(_0xf7f965[_0x5385d0(0x10b)],_0x2345b1+'.keywords'),_0x4c9eb4=N(_0xf7f965[_0x5385d0(0x19e)],_0x2345b1+_0x5385d0(0x10e),_0x43acbb),_0x56e4cd=_0xf7f965[_0x5385d0(0xd7)]===void 0x0?void 0x0:N(_0xf7f965[_0x5385d0(0xd7)],_0x2345b1+_0x5385d0(0x15e),_0x43acbb),_0x1b1483=_0x2e21d6===void 0x0?null:{'id':_0x2e21d6,'label':_0x2df114[_0x5385d0(0xdf)](_0x2e21d6)},_0x23d950=_0x285c2c['map'](_0x14cf69=>({'id':_0x14cf69,'label':_0x2199e1[_0x5385d0(0xdf)](_0x14cf69)})),_0x8d4261=E(_0xf7f965[_0x5385d0(0xf7)],_0x2345b1+_0x5385d0(0xf2)),_0x49622f=_0xf7f965[_0x5385d0(0x184)]===void 0x0?null:j(_0xf7f965[_0x5385d0(0x184)],_0x2345b1+'.order'),_0x191aeb=M(_0x8d4261[_0x5385d0(0xec)],_0x2345b1+_0x5385d0(0x199)),_0x3f27fb={'handle':_0x5a714c,'registryId':_0x73e585,'id':_0x5877fd,'name':_0x4c9eb4,..._0x56e4cd===void 0x0?{}:{'description':_0x56e4cd},'group':_0x1b1483,'tags':_0x23d950,'keywords':_0x312485,'order':_0x49622f,'intrinsicSize':I(_0x8d4261,_0x2345b1+'.payload'),'colorEditable':_0x191aeb,'sourceUrl':L(_0x8d4261,_0x2345b1+_0x5385d0(0xf2)),'registrationIndex':_0x70c1d0,'resourceIndex':_0x3d4d83,'globalIndex':_0x825844,'searchText':R([_0x4c9eb4,_0x56e4cd,_0x1b1483?.[_0x5385d0(0x130)],..._0x23d950[_0x5385d0(0x163)](_0x2f7db2=>_0x2f7db2[_0x5385d0(0x130)]),..._0x312485][_0x5385d0(0xe1)](_0x4f3a48=>_0x4f3a48!==void 0x0)['join']('\x20'))};_0x825844++,_0x1505dc[_0x5385d0(0xf4)](_0x3f27fb),_0x2432c6['push'](_0x3f27fb),_0x3ab93d[_0x5385d0(0x10f)](_0x5a714c,_0x3f27fb);}let _0x24bb1f={'id':_0x73e585,'groups':_0x2df114,'tags':_0x2199e1,'resources':_0x1505dc};_0x50dc93[_0x5385d0(0xf4)](_0x24bb1f),_0xc1157e[_0x5385d0(0x10f)](_0x73e585,_0x24bb1f);}if(_0x50dc93[_0x5385d0(0x14c)]===0x0)throw T('registrations\x20must\x20not\x20be\x20empty.');return{'registries':_0x50dc93,'registryById':_0xc1157e,'resourceByHandle':_0x3ab93d,'resources':_0x2432c6};}function B(_0x2e329c,_0x403aee){const _0x283aaa=_0x368a75;C(_0x403aee);let _0x4ee0ae=_0x2e329c['resourceByHandle']['get'](_0x403aee);if(_0x4ee0ae===void 0x0)throw new h(_0x283aaa(0x148),_0x283aaa(0x188)+_0x403aee+_0x283aaa(0x158),_0x403aee);return _0x4ee0ae;}function te(_0x562ef3){const _0x11ce2b=_0x368a75;return _0x562ef3[_0x11ce2b(0xd6)][_0x11ce2b(0x163)](_0x5c2a87=>({'id':_0x5c2a87['id'],'resourceCount':_0x5c2a87['resources'][_0x11ce2b(0x14c)],'groupCount':_0x5c2a87['groups'][_0x11ce2b(0x152)],'tagCount':_0x5c2a87[_0x11ce2b(0x185)][_0x11ce2b(0x152)],'colorEditableCount':_0x5c2a87['resources']['filter'](_0xd8b5f6=>_0xd8b5f6[_0x11ce2b(0xec)])[_0x11ce2b(0x14c)]}));}function ne(_0x4da5fa){const _0x1cde20=_0x368a75;return{'handle':_0x4da5fa[_0x1cde20(0x141)],'registryId':_0x4da5fa[_0x1cde20(0x157)],'id':_0x4da5fa['id'],'name':_0x4da5fa[_0x1cde20(0x19e)],'group':_0x4da5fa[_0x1cde20(0x131)],'tags':_0x4da5fa[_0x1cde20(0x185)],'keywords':_0x4da5fa[_0x1cde20(0x10b)],'order':_0x4da5fa[_0x1cde20(0x184)],'intrinsicSize':_0x4da5fa['intrinsicSize'],'colorEditable':_0x4da5fa[_0x1cde20(0xec)]};}function re(_0x9bb152,_0x102477){const _0x17eefd=_0x368a75;let _0x2b3b38=(_0x9bb152[_0x17eefd(0x184)]??_0x9bb152[_0x17eefd(0x153)])-(_0x102477['order']??_0x102477[_0x17eefd(0x153)]);if(_0x2b3b38!==0x0)return _0x2b3b38;let _0x231f25=_0x9bb152[_0x17eefd(0x162)]-_0x102477[_0x17eefd(0x162)];if(_0x231f25!==0x0)return _0x231f25;let _0x22a7c7=_0x9bb152[_0x17eefd(0x16a)]-_0x102477[_0x17eefd(0x16a)];return _0x22a7c7===0x0?_0x9bb152[_0x17eefd(0x141)]['localeCompare'](_0x102477[_0x17eefd(0x141)]):_0x22a7c7;}function ie(_0x6b2fd4,_0x4defeb){const _0x1c837b=_0x368a75;let _0x1914dc=_0x4defeb[_0x1c837b(0x18d)]['map'](R)[_0x1c837b(0xe1)](_0x547858=>_0x547858!=='');if(_0x1914dc[_0x1c837b(0x14c)]===0x0)throw new h(_0x1c837b(0x111),_0x1c837b(0x176));let _0x55491c=new Set(_0x4defeb[_0x1c837b(0xd6)]??[]);for(let _0x377008 of _0x55491c)if(!_0x6b2fd4['registryById']['has'](_0x377008))throw new h(_0x1c837b(0x167),_0x1c837b(0x11f)+_0x377008+'\x22.');let _0x164726=_0x4defeb['limit']??_0x6b2fd4[_0x1c837b(0x169)][_0x1c837b(0x14c)];if(!Number[_0x1c837b(0x1a3)](_0x164726)||_0x164726<0x1)throw new h(_0x1c837b(0x15d),_0x1c837b(0x15c)+_0x164726+'\x22.');let _0x299ea3=_0x6b2fd4[_0x1c837b(0x169)][_0x1c837b(0xe1)](_0x3808cf=>_0x55491c[_0x1c837b(0x152)]===0x0||_0x55491c[_0x1c837b(0x103)](_0x3808cf[_0x1c837b(0x157)]))[_0x1c837b(0xe1)](_0x134fa7=>_0x1914dc[_0x1c837b(0x15f)](_0x5bf63f=>_0x134fa7['searchText']['includes'](_0x5bf63f)))[_0x1c837b(0x137)](re);return{'resources':_0x299ea3[_0x1c837b(0x166)](0x0,_0x164726)[_0x1c837b(0x163)](ne),'total':_0x299ea3[_0x1c837b(0x14c)]};}function V(_0x1edec9){return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu['test'](_0x1edec9);}function H(_0x4475cd,_0x2236c0){const _0x39bae3=_0x368a75;return g(_0x2236c0)?{'handle':_0x4475cd,'code':_0x2236c0[_0x39bae3(0x125)],'message':_0x2236c0['message']}:{'handle':_0x4475cd,'code':_0x39bae3(0x112),'message':_0x2236c0 instanceof Error?_0x2236c0[_0x39bae3(0x151)]:String(_0x2236c0)};}var U=class{[_0x368a75(0x11e)];[_0x368a75(0xef)];constructor(_0x526328){const _0x1a0f14=_0x368a75;this[_0x1a0f14(0x11e)]=_0x526328,this['catalog']=z(_0x526328[_0x1a0f14(0x171)]);}get[_0x368a75(0x1a4)](){const _0x1b34a9=_0x368a75;return this[_0x1b34a9(0x11e)][_0x1b34a9(0xfd)]['location'];}['listRegistries'](){return te(this['catalog']);}[_0x368a75(0x18b)](_0xfd056b){const _0x5a0b7e=_0x368a75;return ie(this[_0x5a0b7e(0xef)],_0xfd056b);}async[_0x368a75(0x116)](_0x2d72ce){const _0x31311c=_0x368a75;let _0x2f69c9=B(this[_0x31311c(0xef)],_0x2d72ce['handle']),_0x2fb6b2=await this[_0x31311c(0x11e)][_0x31311c(0xfd)][_0x31311c(0x116)](_0x2d72ce[_0x31311c(0x141)]);if(_0x2fb6b2!==void 0x0&&V(_0x2fb6b2))return{'handle':_0x2d72ce[_0x31311c(0x141)],'svg':_0x2fb6b2};let _0x30cdfe;try{_0x30cdfe=await this[_0x31311c(0x11e)]['downloader'][_0x31311c(0xff)](_0x2f69c9[_0x31311c(0x139)]);}catch(_0x892a1f){throw g(_0x892a1f)?_0x892a1f:new h(_0x31311c(0xe4),_0x31311c(0x175)+_0x2d72ce[_0x31311c(0x141)]+'\x22:\x20'+(_0x892a1f instanceof Error?_0x892a1f['message']:String(_0x892a1f)),_0x2d72ce[_0x31311c(0x141)],{'cause':_0x892a1f});}if(!V(_0x30cdfe))throw new h(_0x31311c(0x1a2),'Downloaded\x20resource\x20\x22'+_0x2d72ce[_0x31311c(0x141)]+_0x31311c(0xdb),_0x2d72ce[_0x31311c(0x141)]);return await this[_0x31311c(0x11e)]['cache'][_0x31311c(0xf6)](_0x2d72ce[_0x31311c(0x141)],_0x30cdfe),{'handle':_0x2d72ce['handle'],'svg':_0x30cdfe};}async[_0x368a75(0xdc)](_0x331ee8){const _0x50bb6e=_0x368a75;let _0x2b546c=[],_0x2514af=[];for(let _0x30a189 of _0x331ee8[_0x50bb6e(0xd8)])try{let {svg:_0x26354b}=await this[_0x50bb6e(0x116)]({'handle':_0x30a189}),_0x4ddded=await this[_0x50bb6e(0x11e)][_0x50bb6e(0x140)][_0x50bb6e(0xf6)](_0x331ee8[_0x50bb6e(0x12b)],w(_0x30a189),_0x26354b);_0x2b546c['push']({'handle':_0x30a189,'path':_0x4ddded});}catch(_0x144123){_0x2514af[_0x50bb6e(0xf4)](H(_0x30a189,_0x144123));}return{'exported':_0x2b546c,'failed':_0x2514af};}async[_0x368a75(0x17c)](){const _0x1150af=_0x368a75;return await this[_0x1150af(0x11e)][_0x1150af(0xfd)][_0x1150af(0x156)]();}};function W(_0x5c8e46){return new U(_0x5c8e46);}function G(_0x181256){const _0x290940=_0x368a75;return _0x181256 instanceof Error&&_0x290940(0x125)in _0x181256;}function K(_0x5d55d3){const _0x2be8aa=_0x368a75;let _0x397f55=_0xae75d9(_0x5d55d3);if(!_0x4b796e(_0x5d55d3)||_0x397f55===_0x3fc2f4(_0x397f55)[_0x2be8aa(0x147)])throw new h(_0x2be8aa(0xdd),_0x2be8aa(0xfc)+_0x5d55d3+'\x22.');return _0x397f55;}async function q(_0x116a9d){const _0x52ccfd=_0x368a75;let _0x27576d;try{_0x27576d=await _0x2a9df3(_0x116a9d,{'withFileTypes':!0x0});}catch(_0x549f19){if(G(_0x549f19)&&_0x549f19[_0x52ccfd(0x125)]==='ENOENT')return{'resourceCount':0x0,'byteCount':0x0};throw _0x549f19;}let _0x1d6b4d=0x0,_0x3888ee=0x0;for(let _0x37ad16 of _0x27576d){let _0x3808c3=_0x121bf7(_0x116a9d,_0x37ad16[_0x52ccfd(0x19e)]);if(_0x37ad16['isDirectory']()){let _0x46b7c1=await q(_0x3808c3);_0x1d6b4d+=_0x46b7c1[_0x52ccfd(0x143)],_0x3888ee+=_0x46b7c1[_0x52ccfd(0x135)];}else{if(_0x37ad16[_0x52ccfd(0x12a)]()&&_0x37ad16['name'][_0x52ccfd(0xe7)](_0x52ccfd(0x181))){let _0x319dd1=await _0xfbcba7(_0x3808c3);_0x1d6b4d++,_0x3888ee+=_0x319dd1['size'];}}}return{'resourceCount':_0x1d6b4d,'byteCount':_0x3888ee};}var J=class{[_0x368a75(0x106)];constructor(_0x3efbe3){const _0x35afa7=_0x368a75;this[_0x35afa7(0x106)]=K(_0x3efbe3);}[_0x368a75(0xea)](_0x6935db){const _0x575f0e=_0x368a75;let {registryId:_0x57d9c7,resourceId:_0x2ff750}=C(_0x6935db);return _0x121bf7(this[_0x575f0e(0x106)],_0x57d9c7,_0x2ff750+_0x575f0e(0x181));}async['read'](_0x1ac85c){const _0x207f60=_0x368a75;try{return await _0x1b58a5(this[_0x207f60(0xea)](_0x1ac85c),_0x207f60(0x144));}catch(_0x131e37){if(G(_0x131e37)&&_0x131e37[_0x207f60(0x125)]===_0x207f60(0x13d))return;throw _0x131e37;}}async[_0x368a75(0xf6)](_0x38fab9,_0x247a91){const _0x15c1e4=_0x368a75;let _0xea8f34=this[_0x15c1e4(0xea)](_0x38fab9);await _0x38b345(_0x3af76f(_0xea8f34),{'recursive':!0x0});let _0x31e2b1=_0x121bf7(_0x3af76f(_0xea8f34),_0x15c1e4(0x122)+process[_0x15c1e4(0x132)]+'-'+_0x5df176()+_0x15c1e4(0x110));try{await _0x32930c(_0x31e2b1,_0x247a91,{'encoding':_0x15c1e4(0x144),'mode':0x180}),await _0x229740(_0x31e2b1,_0xea8f34);}catch(_0x156963){throw await _0x40efa7(_0x31e2b1)[_0x15c1e4(0x12d)](()=>void 0x0),_0x156963;}}async[_0x368a75(0x156)](){const _0x123554=_0x368a75;let _0x3b61d0=await q(this[_0x123554(0x106)]);return await _0x33cbe9(this['location'],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x123554(0x106)],..._0x3b61d0};}},Y=class{async[_0x368a75(0xf6)](_0x145f25,_0x383bee,_0x158342){const _0x48727c=_0x368a75;await _0x38b345(_0x145f25,{'recursive':!0x0});let _0x22b807=_0x121bf7(_0x145f25,_0x383bee);return await _0x32930c(_0x22b807,_0x158342,_0x48727c(0x144)),_0x22b807;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x54a108){const _0x10614b=_0x368a75;return new h('resource-download-too-large','Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20'+_0x54a108+_0x10614b(0x14a));}async function ce(_0x2b3e04,_0x385993){const _0x584dbc=_0x368a75;let _0x4d8a08=Number(_0x2b3e04[_0x584dbc(0x1a5)][_0x584dbc(0xdf)]('content-length'));if(Number[_0x584dbc(0xe6)](_0x4d8a08)&&_0x4d8a08>_0x385993)throw Z(_0x385993);if(_0x2b3e04['body']===null){let _0x5088d1=await _0x2b3e04[_0x584dbc(0x17a)]();if(Buffer[_0x584dbc(0x193)](_0x5088d1)>_0x385993)throw Z(_0x385993);return _0x5088d1;}let _0x9cd52c=_0x2b3e04[_0x584dbc(0x177)][_0x584dbc(0x172)](),_0x17a241=[],_0x1c98ef=0x0;try{for(;;){let _0x3544d4=await _0x9cd52c['read']();if(_0x3544d4[_0x584dbc(0xf8)])break;if(_0x1c98ef+=_0x3544d4[_0x584dbc(0x133)][_0x584dbc(0x193)],_0x1c98ef>_0x385993)throw await _0x9cd52c['cancel']()[_0x584dbc(0x12d)](()=>void 0x0),Z(_0x385993);_0x17a241[_0x584dbc(0xf4)](_0x3544d4['value']);}}finally{_0x9cd52c[_0x584dbc(0x159)]();}try{return new TextDecoder(_0x584dbc(0x14f),{'fatal':!0x0})[_0x584dbc(0x187)](Buffer[_0x584dbc(0x134)](_0x17a241,_0x1c98ef));}catch{throw new h(_0x584dbc(0x16c),_0x584dbc(0x170));}}var Q=class{[_0x368a75(0x14e)];[_0x368a75(0x12e)];[_0x368a75(0x1a0)];[_0x368a75(0x119)];constructor(_0x230f30={}){const _0x3e31b8=_0x368a75;this['fetchImpl']=_0x230f30[_0x3e31b8(0x165)]??fetch,this[_0x3e31b8(0x12e)]=_0x230f30[_0x3e31b8(0x12e)]??X,this[_0x3e31b8(0x1a0)]=_0x230f30[_0x3e31b8(0x1a0)]??ae,this['maxRedirects']=_0x230f30[_0x3e31b8(0x119)]??oe;}async[_0x368a75(0xff)](_0xe524ec){const _0x385d00=_0x368a75;let _0x457ba9=new URL(_0xe524ec);if(_0x457ba9[_0x385d00(0x182)]!==_0x385d00(0xfe))throw new h('resource-download-insecure',_0x385d00(0x17b));let _0x523a0c=new AbortController(),_0x36f09e=setTimeout(()=>_0x523a0c['abort'](),this[_0x385d00(0x12e)]);try{let _0x380a2e=_0x457ba9;for(let _0x27c382=0x0;;_0x27c382++){let _0x324da0=await this['fetchImpl'](_0x380a2e,{'redirect':_0x385d00(0xf0),'signal':_0x523a0c[_0x385d00(0xf1)]});if(se[_0x385d00(0x103)](_0x324da0[_0x385d00(0xe5)])){if(_0x27c382>=this[_0x385d00(0x119)])throw new h(_0x385d00(0xd9),_0x385d00(0x120)+this[_0x385d00(0x119)]+'.');let _0x14dbd4=_0x324da0[_0x385d00(0x1a5)][_0x385d00(0xdf)](_0x385d00(0x106));if(_0x14dbd4===null)throw new h(_0x385d00(0x154),'Resource\x20server\x20returned\x20HTTP\x20'+_0x324da0['status']+_0x385d00(0x128));let _0x1ab3f2;try{_0x1ab3f2=new URL(_0x14dbd4,_0x380a2e);}catch{throw new h(_0x385d00(0x154),_0x385d00(0x183));}if(_0x1ab3f2[_0x385d00(0x182)]!==_0x385d00(0xfe))throw new h(_0x385d00(0x16e),_0x385d00(0xda));_0x380a2e=_0x1ab3f2;continue;}if(!_0x324da0['ok'])throw new h('resource-download-http','Resource\x20server\x20returned\x20HTTP\x20'+_0x324da0[_0x385d00(0xe5)]+'.');if(_0x324da0['url']!==''&&new URL(_0x324da0[_0x385d00(0x149)])[_0x385d00(0x182)]!==_0x385d00(0xfe))throw new h(_0x385d00(0x16e),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x46b65f=await ce(_0x324da0,this[_0x385d00(0x1a0)]);if(!V(_0x46b65f))throw new h(_0x385d00(0x180),_0x385d00(0x146));return _0x46b65f;}}catch(_0x2f3046){throw _0x523a0c['signal'][_0x385d00(0x173)]?new h(_0x385d00(0x17f),_0x385d00(0x155)+this[_0x385d00(0x12e)]+_0x385d00(0x150)):_0x2f3046;}finally{clearTimeout(_0x36f09e);}}};function $(_0x22ccd9){const _0x402110=_0x368a75;try{return JSON[_0x402110(0x11c)](_0x47e81a(_0x22ccd9,_0x402110(0x144)));}catch(_0x212861){throw new h('resource-manifest-read-failed',_0x402110(0x13f)+_0x22ccd9+':\x20'+(_0x212861 instanceof Error?_0x212861[_0x402110(0x151)]:String(_0x212861)),void 0x0,{'cause':_0x212861});}}function le(_0x1e29f3){const _0xe4c366=_0x368a75;let _0x37d23f;return()=>(_0x37d23f??=W({'manifest':$(_0x1e29f3['manifestPath']),'cache':new J(_0x1e29f3[_0xe4c366(0x189)]),'downloader':new Q(_0x1e29f3[_0xe4c366(0x117)]),'output':new Y()}),_0x37d23f);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
|
|
1
|
+
const _0x1987b4=_0x8792;(function(_0x390b18,_0x509e4d){const _0x415cda=_0x8792,_0x4c1945=_0x390b18();while(!![]){try{const _0x529934=parseInt(_0x415cda(0x156))/0x1+parseInt(_0x415cda(0x1d4))/0x2+-parseInt(_0x415cda(0x1c7))/0x3*(-parseInt(_0x415cda(0x140))/0x4)+parseInt(_0x415cda(0x1ae))/0x5*(parseInt(_0x415cda(0x176))/0x6)+-parseInt(_0x415cda(0x1d6))/0x7+parseInt(_0x415cda(0x19f))/0x8*(parseInt(_0x415cda(0x16d))/0x9)+parseInt(_0x415cda(0x1a0))/0xa*(-parseInt(_0x415cda(0x1d9))/0xb);if(_0x529934===_0x509e4d)break;else _0x4c1945['push'](_0x4c1945['shift']());}catch(_0xfea372){_0x4c1945['push'](_0x4c1945['shift']());}}}(_0x4647,0x6e649));import{randomUUID as _0x13f68d}from'node:crypto';import{mkdir as _0x13b129,readFile as _0x23b84d,readdir as _0x2a572b,rename as _0x202301,rm as _0x12636a,stat as _0x55e9ef,unlink as _0x256e70,writeFile as _0x309679}from'node:fs/promises';import{dirname as _0xb78523,isAbsolute as _0x5b3c5f,join as _0x4e56ee,parse as _0x3b9698,resolve as _0x17a86b}from'node:path';import{readFileSync as _0x1b185f}from'node:fs';var h=class extends Error{[_0x1987b4(0x160)];[_0x1987b4(0x178)];constructor(_0x41d980,_0x16fde1,_0x346601,_0x45b6f0){const _0x37f39d=_0x1987b4;super(_0x16fde1,_0x45b6f0),this[_0x37f39d(0x160)]=_0x41d980,this[_0x37f39d(0x178)]=_0x346601,this['name']=_0x37f39d(0x1ca);}};function g(_0x5c7533){return _0x5c7533 instanceof h;}var _=/^[A-Za-z0-9._-]+$/u,v=0xff,y=0x4;function b(_0x2b7880){const _0x504969=_0x1987b4;return _[_0x504969(0x1bc)](_0x2b7880)&&_0x2b7880!=='.'&&_0x2b7880!=='..';}function x(_0x21fc65){const _0x219a2d=_0x1987b4;if(!b(_0x21fc65)||_0x21fc65['startsWith']('-')||_0x21fc65[_0x219a2d(0x1d5)]('--')||_0x21fc65[_0x219a2d(0x1bf)]>v)throw new h(_0x219a2d(0x180),_0x219a2d(0x14e)+_0x21fc65+_0x219a2d(0x136));}function S(_0x4222e7){const _0x4b3c05=_0x1987b4;if(!b(_0x4222e7)||_0x4222e7[_0x4b3c05(0x1bf)]+y>v)throw new h('resource-invalid-resource-id',_0x4b3c05(0x175)+_0x4222e7+_0x4b3c05(0x129));}function C(_0xbd1089){const _0x5a6a35=_0x1987b4;let _0x2dd15b=_0xbd1089['split']('/');if(_0x2dd15b['length']!==0x2||_0x2dd15b[0x0]===''||_0x2dd15b[0x1]==='')throw new h(_0x5a6a35(0x154),_0x5a6a35(0x120)+_0xbd1089+_0x5a6a35(0x19e),_0xbd1089);let _0x2c9353=_0x2dd15b[0x0],_0xce6673=_0x2dd15b[0x1];return x(_0x2c9353),S(_0xce6673),{'registryId':_0x2c9353,'resourceId':_0xce6673};}function ee(_0x3c72c7,_0x5eddf5){return x(_0x3c72c7),S(_0x5eddf5),_0x3c72c7+'/'+_0x5eddf5;}function w(_0x4d1a4b){const _0x2235a4=_0x1987b4;let {registryId:_0x44b4f2,resourceId:_0x19f43d}=C(_0x4d1a4b),_0x1043f4=_0x44b4f2+'--'+_0x19f43d+_0x2235a4(0x17e);if(_0x1043f4[_0x2235a4(0x1bf)]>v)throw new h(_0x2235a4(0x1bb),_0x2235a4(0x131)+v+_0x2235a4(0x12c),_0x4d1a4b);return _0x1043f4;}function T(_0x24c598){const _0x49fe2e=_0x1987b4;return new h(_0x49fe2e(0x17f),'Invalid\x20resource\x20manifest:\x20'+_0x24c598);}function E(_0x524b05,_0x5b47c0){const _0x1a415d=_0x1987b4;if(typeof _0x524b05!=_0x1a415d(0x1cc)||!_0x524b05||Array['isArray'](_0x524b05))throw T(_0x5b47c0+'\x20must\x20be\x20an\x20object.');return _0x524b05;}function D(_0x4e732d,_0x1ad8d4,_0x41a34d=!0x1){const _0x593b7=_0x1987b4;if(_0x41a34d&&_0x4e732d===void 0x0)return[];if(!Array[_0x593b7(0x198)](_0x4e732d))throw T(_0x1ad8d4+_0x593b7(0x174));return _0x4e732d;}function O(_0x5d18ac,_0x250146){const _0x18554a=_0x1987b4;if(typeof _0x5d18ac!='string'||_0x5d18ac==='')throw T(_0x250146+_0x18554a(0x157));return _0x5d18ac;}function k(_0x5bb176,_0x5993df,_0x38d18d=!0x1){return D(_0x5bb176,_0x5993df,_0x38d18d)['map']((_0x405e1b,_0x5a0fdb)=>O(_0x405e1b,_0x5993df+'['+_0x5a0fdb+']'));}function A(_0x26e95b,_0x406d7a){const _0x32ee2f=_0x1987b4;return D(_0x26e95b,_0x406d7a,!0x0)[_0x32ee2f(0x15b)]((_0x2fe1ea,_0x332298)=>{if(typeof _0x2fe1ea!='string')throw T(_0x406d7a+'['+_0x332298+']\x20must\x20be\x20a\x20string.');return _0x2fe1ea;})[_0x32ee2f(0x1b8)](_0x4f8c33=>_0x4f8c33!=='');}function j(_0x3f5b3c,_0xf0983c){const _0x13c944=_0x1987b4;if(typeof _0x3f5b3c!='number'||!Number['isFinite'](_0x3f5b3c))throw T(_0xf0983c+_0x13c944(0x197));return _0x3f5b3c;}function M(_0x2a6962,_0x38cab0){const _0x3ba3a5=_0x1987b4;if(typeof _0x2a6962!=_0x3ba3a5(0x1c3))throw T(_0x38cab0+_0x3ba3a5(0x1b3));return _0x2a6962;}function N(_0x30af7f,_0x190562,_0xfef78b){const _0x389b73=_0x1987b4;if(typeof _0x30af7f==_0x389b73(0x15a)&&_0x30af7f!=='')return _0x30af7f;let _0x2419eb=E(_0x30af7f,_0x190562),_0x3b372f=_0xfef78b===void 0x0?void 0x0:_0x2419eb[_0xfef78b];if(typeof _0x3b372f==_0x389b73(0x15a)&&_0x3b372f!=='')return _0x3b372f;let _0x4c8e68=_0x2419eb[_0x389b73(0x186)];if(typeof _0x4c8e68==_0x389b73(0x15a)&&_0x4c8e68!=='')return _0x4c8e68;let _0x5d5a96=Object[_0x389b73(0x182)](_0x2419eb)[_0x389b73(0x1dc)](_0x16c9fd=>typeof _0x16c9fd==_0x389b73(0x15a)&&_0x16c9fd!=='');if(_0x5d5a96!==void 0x0)return _0x5d5a96;throw T(_0x190562+'\x20contains\x20no\x20usable\x20localized\x20text.');}function _0x8792(_0x294e1b,_0x354913){_0x294e1b=_0x294e1b-0x11e;const _0x4647a6=_0x4647();let _0x879282=_0x4647a6[_0x294e1b];return _0x879282;}function P(_0x46040a,_0x401b0f,_0x3e6731){const _0x38e403=_0x1987b4;try{_0x3e6731==='registry'?x(_0x46040a):S(_0x46040a);}catch(_0x5e1dfb){throw T(_0x401b0f+':\x20'+(_0x5e1dfb instanceof Error?_0x5e1dfb[_0x38e403(0x16a)]:String(_0x5e1dfb)));}}function F(_0xb72fe3,_0x30d959,_0x33bd88){const _0x2ebc62=_0x1987b4;let _0x218c3b=new Map();for(let [_0xc9d8c9,_0x54d659]of D(_0xb72fe3,_0x30d959,!0x0)[_0x2ebc62(0x14d)]()){let _0x1524b7=E(_0x54d659,_0x30d959+'['+_0xc9d8c9+']'),_0x4ed6c4=O(_0x1524b7['id'],_0x30d959+'['+_0xc9d8c9+'].id');if(P(_0x4ed6c4,_0x30d959+'['+_0xc9d8c9+_0x2ebc62(0x194),_0x2ebc62(0x1cf)),_0x218c3b['has'](_0x4ed6c4))throw T(_0x2ebc62(0x171)+_0x30d959+_0x2ebc62(0x191)+_0x4ed6c4+'\x22.');_0x218c3b[_0x2ebc62(0x121)](_0x4ed6c4,N(_0x1524b7[_0x2ebc62(0x1e0)],_0x30d959+'['+_0xc9d8c9+_0x2ebc62(0x126),_0x33bd88));}return _0x218c3b;}function I(_0x263031,_0x49d3c5){const _0x4c05b7=_0x1987b4;let _0x1917a3=E(_0x263031[_0x4c05b7(0x1d8)],_0x49d3c5+'.intrinsicSize'),_0x3d21c4=j(_0x1917a3[_0x4c05b7(0x185)],_0x49d3c5+_0x4c05b7(0x164)),_0x450969=j(_0x1917a3[_0x4c05b7(0x150)],_0x49d3c5+_0x4c05b7(0x139));if(_0x3d21c4<=0x0||_0x450969<=0x0)throw T(_0x49d3c5+'.intrinsicSize\x20must\x20be\x20positive.');return{'width':_0x3d21c4,'height':_0x450969};}function L(_0x53ad90,_0x3de3b9){const _0x5df92f=_0x1987b4;if(_0x53ad90[_0x5df92f(0x190)]!==_0x5df92f(0x1cb))throw T(_0x3de3b9+_0x5df92f(0x17c));if(_0x53ad90[_0x5df92f(0x128)]!=='reference')throw T(_0x3de3b9+_0x5df92f(0x1bd));let _0x1e7e3b=E(_0x53ad90[_0x5df92f(0x1a9)],_0x3de3b9+_0x5df92f(0x123));if(_0x1e7e3b['type']!=='url')throw T(_0x3de3b9+'.source.type\x20must\x20be\x20\x22url\x22.');let _0x5ac088=O(_0x1e7e3b['value'],_0x3de3b9+'.source.value'),_0x196cb9;try{_0x196cb9=new URL(_0x5ac088);}catch{throw T(_0x3de3b9+_0x5df92f(0x144));}if(_0x196cb9[_0x5df92f(0x158)]!==_0x5df92f(0x147))throw T(_0x3de3b9+_0x5df92f(0x18a));return _0x5ac088;}function R(_0x188b06){const _0x469c8a=_0x1987b4;return _0x188b06[_0x469c8a(0x17b)](_0x469c8a(0x18f))[_0x469c8a(0x127)]()['trim']()[_0x469c8a(0x12a)](/\s+/gu,'\x20');}function z(_0x324d30){const _0xca312a=_0x1987b4;let _0x26a28b=E(_0x324d30,'manifest'),_0xf5cf0=new Map(),_0x22548a=new Map(),_0x367089=[],_0x3c60cc=[],_0x28781e=new Set(),_0xbbc1d1=0x0;for(let [_0x28c8af,_0x18c420]of D(_0x26a28b[_0xca312a(0x124)],'manifest.registrations')[_0xca312a(0x14d)]()){let _0x5e748f=E(E(_0x18c420,_0xca312a(0x179)+_0x28c8af+']')[_0xca312a(0x1e3)],'registrations['+_0x28c8af+_0xca312a(0x1a8)),_0xebc9af=O(_0x5e748f[_0xca312a(0x15f)],_0xca312a(0x179)+_0x28c8af+'].input.registryId');if(P(_0xebc9af,_0xca312a(0x179)+_0x28c8af+_0xca312a(0x1ab),'registry'),_0xf5cf0['has'](_0xebc9af))throw T(_0xca312a(0x1d2)+_0xebc9af+'\x22.');let _0xbba36b=_0x5e748f[_0xca312a(0x1dd)]===void 0x0?void 0x0:O(_0x5e748f[_0xca312a(0x1dd)],'registrations['+_0x28c8af+_0xca312a(0x1c6)),_0x3c697a=F(_0x5e748f['groups'],'registrations['+_0x28c8af+_0xca312a(0x1c4),_0xbba36b),_0x48fa39=F(_0x5e748f[_0xca312a(0x1d1)],_0xca312a(0x179)+_0x28c8af+_0xca312a(0x169),_0xbba36b),_0x1629bc=[];for(let [_0x2e360f,_0x484db6]of D(_0x5e748f[_0xca312a(0x13a)],_0xca312a(0x179)+_0x28c8af+_0xca312a(0x155))['entries']()){let _0x1c1c2c=_0xca312a(0x179)+_0x28c8af+_0xca312a(0x16e)+_0x2e360f+']',_0x28faf5=E(_0x484db6,_0x1c1c2c),_0x1f12a9=O(_0x28faf5['id'],_0x1c1c2c+_0xca312a(0x1b1));P(_0x1f12a9,_0x1c1c2c+_0xca312a(0x1b1),'resource');let _0x59a406=ee(_0xebc9af,_0x1f12a9);if(_0x22548a[_0xca312a(0x1b5)](_0x59a406))throw T(_0xca312a(0x1c0)+_0x59a406+'\x22.');let _0x371a92;try{_0x371a92=w(_0x59a406);}catch(_0x1c7eea){throw T(_0x1c1c2c+':\x20'+(_0x1c7eea instanceof Error?_0x1c7eea[_0xca312a(0x16a)]:String(_0x1c7eea)));}if(_0x28781e[_0xca312a(0x1b5)](_0x371a92))throw T(_0xca312a(0x1e1)+_0x371a92+'\x22.');_0x28781e[_0xca312a(0x1b6)](_0x371a92);let _0x139f16=_0x28faf5[_0xca312a(0x18b)]===void 0x0?void 0x0:O(_0x28faf5['groupId'],_0x1c1c2c+_0xca312a(0x167));if(_0x139f16!==void 0x0&&!_0x3c697a[_0xca312a(0x1b5)](_0x139f16))throw T(_0x1c1c2c+'.groupId\x20references\x20unknown\x20group\x20\x22'+_0x139f16+'\x22.');let _0x1a0dfa=k(_0x28faf5['tagIds'],_0x1c1c2c+_0xca312a(0x1be),!0x0);for(let _0x1d6dc3 of _0x1a0dfa)if(!_0x48fa39['has'](_0x1d6dc3))throw T(_0x1c1c2c+_0xca312a(0x13f)+_0x1d6dc3+'\x22.');let _0x18f879=A(_0x28faf5[_0xca312a(0x16c)],_0x1c1c2c+'.keywords'),_0x3be77c=N(_0x28faf5['name'],_0x1c1c2c+_0xca312a(0x1d3),_0xbba36b),_0x10964d=_0x28faf5[_0xca312a(0x199)]===void 0x0?void 0x0:N(_0x28faf5[_0xca312a(0x199)],_0x1c1c2c+'.description',_0xbba36b),_0x4e09f9=_0x139f16===void 0x0?null:{'id':_0x139f16,'label':_0x3c697a[_0xca312a(0x132)](_0x139f16)},_0x1e439d=_0x1a0dfa['map'](_0x4cc493=>({'id':_0x4cc493,'label':_0x48fa39['get'](_0x4cc493)})),_0x281500=E(_0x28faf5[_0xca312a(0x1db)],_0x1c1c2c+'.payload'),_0x400b92=_0x28faf5[_0xca312a(0x1a3)]===void 0x0?null:j(_0x28faf5[_0xca312a(0x1a3)],_0x1c1c2c+_0xca312a(0x13c)),_0x3088f4=M(_0x281500[_0xca312a(0x1a1)],_0x1c1c2c+_0xca312a(0x170)),_0x3f7f33={'handle':_0x59a406,'registryId':_0xebc9af,'id':_0x1f12a9,'name':_0x3be77c,..._0x10964d===void 0x0?{}:{'description':_0x10964d},'group':_0x4e09f9,'tags':_0x1e439d,'keywords':_0x18f879,'order':_0x400b92,'intrinsicSize':I(_0x281500,_0x1c1c2c+'.payload'),'colorEditable':_0x3088f4,'sourceUrl':L(_0x281500,_0x1c1c2c+_0xca312a(0x146)),'registrationIndex':_0x28c8af,'resourceIndex':_0x2e360f,'globalIndex':_0xbbc1d1,'searchText':R([_0x3be77c,_0x10964d,_0x4e09f9?.[_0xca312a(0x1e0)],..._0x1e439d[_0xca312a(0x15b)](_0x48cf10=>_0x48cf10[_0xca312a(0x1e0)]),..._0x18f879][_0xca312a(0x1b8)](_0x372495=>_0x372495!==void 0x0)['join']('\x20'))};_0xbbc1d1++,_0x1629bc[_0xca312a(0x1b4)](_0x3f7f33),_0x3c60cc[_0xca312a(0x1b4)](_0x3f7f33),_0x22548a[_0xca312a(0x121)](_0x59a406,_0x3f7f33);}let _0xd87f6c={'id':_0xebc9af,'groups':_0x3c697a,'tags':_0x48fa39,'resources':_0x1629bc};_0x367089['push'](_0xd87f6c),_0xf5cf0['set'](_0xebc9af,_0xd87f6c);}if(_0x367089[_0xca312a(0x1bf)]===0x0)throw T(_0xca312a(0x1a4));return{'registries':_0x367089,'registryById':_0xf5cf0,'resourceByHandle':_0x22548a,'resources':_0x3c60cc};}function B(_0x40ddfc,_0x143261){const _0x41bc10=_0x1987b4;C(_0x143261);let _0x47826e=_0x40ddfc[_0x41bc10(0x1af)]['get'](_0x143261);if(_0x47826e===void 0x0)throw new h(_0x41bc10(0x1a5),_0x41bc10(0x17a)+_0x143261+'\x22;\x20try\x20resources\x20find\x20<query>.',_0x143261);return _0x47826e;}function te(_0x5c6371){const _0x327dd3=_0x1987b4;return _0x5c6371[_0x327dd3(0x1ac)][_0x327dd3(0x15b)](_0x3e1641=>({'id':_0x3e1641['id'],'resourceCount':_0x3e1641[_0x327dd3(0x13a)][_0x327dd3(0x1bf)],'groupCount':_0x3e1641[_0x327dd3(0x173)][_0x327dd3(0x162)],'tagCount':_0x3e1641['tags'][_0x327dd3(0x162)],'colorEditableCount':_0x3e1641[_0x327dd3(0x13a)]['filter'](_0x1955b7=>_0x1955b7['colorEditable'])[_0x327dd3(0x1bf)]}));}function ne(_0x2a5edf){const _0x597a6e=_0x1987b4;return{'handle':_0x2a5edf[_0x597a6e(0x178)],'registryId':_0x2a5edf['registryId'],'id':_0x2a5edf['id'],'name':_0x2a5edf[_0x597a6e(0x135)],'group':_0x2a5edf['group'],'tags':_0x2a5edf[_0x597a6e(0x1d1)],'keywords':_0x2a5edf['keywords'],'order':_0x2a5edf[_0x597a6e(0x1a3)],'intrinsicSize':_0x2a5edf[_0x597a6e(0x1d8)],'colorEditable':_0x2a5edf['colorEditable']};}function re(_0x5c60eb,_0x266dc8){const _0x4ce186=_0x1987b4;let _0x1db71f=(_0x5c60eb[_0x4ce186(0x1a3)]??_0x5c60eb[_0x4ce186(0x15d)])-(_0x266dc8[_0x4ce186(0x1a3)]??_0x266dc8['globalIndex']);if(_0x1db71f!==0x0)return _0x1db71f;let _0x10e3f3=_0x5c60eb[_0x4ce186(0x1df)]-_0x266dc8[_0x4ce186(0x1df)];if(_0x10e3f3!==0x0)return _0x10e3f3;let _0x5bf9b0=_0x5c60eb[_0x4ce186(0x149)]-_0x266dc8[_0x4ce186(0x149)];return _0x5bf9b0===0x0?_0x5c60eb[_0x4ce186(0x178)]['localeCompare'](_0x266dc8['handle']):_0x5bf9b0;}function ie(_0x26fe82,_0x140929){const _0x37e2a2=_0x1987b4;let _0x41ca17=_0x140929[_0x37e2a2(0x161)][_0x37e2a2(0x15b)](R)[_0x37e2a2(0x1b8)](_0x885606=>_0x885606!=='');if(_0x41ca17[_0x37e2a2(0x1bf)]===0x0)throw new h(_0x37e2a2(0x1c9),_0x37e2a2(0x19b));let _0x21b583=new Set(_0x140929[_0x37e2a2(0x1ac)]??[]);for(let _0x40bb5b of _0x21b583)if(!_0x26fe82[_0x37e2a2(0x143)][_0x37e2a2(0x1b5)](_0x40bb5b))throw new h(_0x37e2a2(0x16b),_0x37e2a2(0x138)+_0x40bb5b+'\x22.');let _0x396a92=_0x140929[_0x37e2a2(0x1b2)]??_0x26fe82[_0x37e2a2(0x13a)][_0x37e2a2(0x1bf)];if(!Number[_0x37e2a2(0x19a)](_0x396a92)||_0x396a92<0x1)throw new h(_0x37e2a2(0x137),_0x37e2a2(0x19c)+_0x396a92+'\x22.');let _0x1a1dcf=_0x26fe82[_0x37e2a2(0x13a)][_0x37e2a2(0x1b8)](_0x4d4a58=>_0x21b583[_0x37e2a2(0x162)]===0x0||_0x21b583[_0x37e2a2(0x1b5)](_0x4d4a58[_0x37e2a2(0x15f)]))[_0x37e2a2(0x1b8)](_0x5d9b27=>_0x41ca17['some'](_0x36c13e=>_0x5d9b27['searchText'][_0x37e2a2(0x1d5)](_0x36c13e)))['sort'](re);return{'resources':_0x1a1dcf[_0x37e2a2(0x1d7)](0x0,_0x396a92)['map'](ne),'total':_0x1a1dcf['length']};}function V(_0x4b0549){const _0x1d9230=_0x1987b4;return/^\s*(?:<\?xml[^>]*>\s*)?(?:<!--[^]*?-->\s*)*<svg(?:\s|>)/iu[_0x1d9230(0x1bc)](_0x4b0549);}function H(_0x32430d,_0x117253){const _0x1c4974=_0x1987b4;return g(_0x117253)?{'handle':_0x32430d,'code':_0x117253[_0x1c4974(0x160)],'message':_0x117253[_0x1c4974(0x16a)]}:{'handle':_0x32430d,'code':'resource-export-failed','message':_0x117253 instanceof Error?_0x117253[_0x1c4974(0x16a)]:String(_0x117253)};}var U=class{['options'];[_0x1987b4(0x1b9)];constructor(_0xe86320){const _0x71f152=_0x1987b4;this[_0x71f152(0x1aa)]=_0xe86320,this['catalog']=z(_0xe86320[_0x71f152(0x181)]);}get[_0x1987b4(0x12e)](){const _0x1f556a=_0x1987b4;return this[_0x1f556a(0x1aa)]['cache'][_0x1f556a(0x195)];}[_0x1987b4(0x1ce)](){const _0x1bb149=_0x1987b4;return te(this[_0x1bb149(0x1b9)]);}[_0x1987b4(0x1dc)](_0x103dce){return ie(this['catalog'],_0x103dce);}async[_0x1987b4(0x12b)](_0x570e37){const _0x4cfee3=_0x1987b4;let _0x2c6fcb=B(this[_0x4cfee3(0x1b9)],_0x570e37[_0x4cfee3(0x178)]),_0xf8d8f6=await this[_0x4cfee3(0x1aa)]['cache'][_0x4cfee3(0x12b)](_0x570e37['handle']);if(_0xf8d8f6!==void 0x0&&V(_0xf8d8f6))return{'handle':_0x570e37[_0x4cfee3(0x178)],'svg':_0xf8d8f6};let _0x3be789;try{_0x3be789=await this[_0x4cfee3(0x1aa)][_0x4cfee3(0x1c1)][_0x4cfee3(0x13d)](_0x2c6fcb['sourceUrl']);}catch(_0x4244dc){throw g(_0x4244dc)?_0x4244dc:new h(_0x4cfee3(0x14a),_0x4cfee3(0x16f)+_0x570e37['handle']+_0x4cfee3(0x192)+(_0x4244dc instanceof Error?_0x4244dc[_0x4cfee3(0x16a)]:String(_0x4244dc)),_0x570e37[_0x4cfee3(0x178)],{'cause':_0x4244dc});}if(!V(_0x3be789))throw new h('resource-invalid-svg','Downloaded\x20resource\x20\x22'+_0x570e37[_0x4cfee3(0x178)]+'\x22\x20is\x20not\x20an\x20SVG\x20document.',_0x570e37['handle']);return await this[_0x4cfee3(0x1aa)][_0x4cfee3(0x1da)][_0x4cfee3(0x1b0)](_0x570e37[_0x4cfee3(0x178)],_0x3be789),{'handle':_0x570e37['handle'],'svg':_0x3be789};}async['export'](_0x535a4b){const _0x2da59e=_0x1987b4;let _0x5b1611=[],_0xf858b0=[];for(let _0x1d9368 of _0x535a4b['handles'])try{let {svg:_0x22c591}=await this[_0x2da59e(0x12b)]({'handle':_0x1d9368}),_0x4fa4e6=await this[_0x2da59e(0x1aa)][_0x2da59e(0x13b)][_0x2da59e(0x1b0)](_0x535a4b['destination'],w(_0x1d9368),_0x22c591);_0x5b1611[_0x2da59e(0x1b4)]({'handle':_0x1d9368,'path':_0x4fa4e6});}catch(_0x82820b){_0xf858b0[_0x2da59e(0x1b4)](H(_0x1d9368,_0x82820b));}return{'exported':_0x5b1611,'failed':_0xf858b0};}async[_0x1987b4(0x15e)](){const _0x5f38d7=_0x1987b4;return await this[_0x5f38d7(0x1aa)][_0x5f38d7(0x1da)][_0x5f38d7(0x148)]();}};function W(_0x26e2a6){return new U(_0x26e2a6);}function G(_0x18bc78){const _0x2c7d38=_0x1987b4;return _0x18bc78 instanceof Error&&_0x2c7d38(0x160)in _0x18bc78;}function K(_0x577b27){const _0x43a342=_0x1987b4;let _0x263530=_0x17a86b(_0x577b27);if(!_0x5b3c5f(_0x577b27)||_0x263530===_0x3b9698(_0x263530)[_0x43a342(0x196)])throw new h(_0x43a342(0x177),_0x43a342(0x1de)+_0x577b27+'\x22.');return _0x263530;}async function q(_0x32e8d5){const _0x284a2f=_0x1987b4;let _0x177252;try{_0x177252=await _0x2a572b(_0x32e8d5,{'withFileTypes':!0x0});}catch(_0x2d9277){if(G(_0x2d9277)&&_0x2d9277[_0x284a2f(0x160)]==='ENOENT')return{'resourceCount':0x0,'byteCount':0x0};throw _0x2d9277;}let _0x4c2101=0x0,_0x371397=0x0;for(let _0x458b87 of _0x177252){let _0x1f3476=_0x4e56ee(_0x32e8d5,_0x458b87[_0x284a2f(0x135)]);if(_0x458b87['isDirectory']()){let _0x2f37e1=await q(_0x1f3476);_0x4c2101+=_0x2f37e1[_0x284a2f(0x189)],_0x371397+=_0x2f37e1['byteCount'];}else{if(_0x458b87['isFile']()&&_0x458b87[_0x284a2f(0x135)][_0x284a2f(0x13e)](_0x284a2f(0x17e))){let _0x4d53b6=await _0x55e9ef(_0x1f3476);_0x4c2101++,_0x371397+=_0x4d53b6[_0x284a2f(0x162)];}}}return{'resourceCount':_0x4c2101,'byteCount':_0x371397};}function _0x4647(){const _0x444c79=['values','Resource\x20response\x20is\x20not\x20an\x20SVG\x20document.','Resource\x20URL\x20must\x20use\x20HTTPS.','width','en-US','resource-download-too-many-redirects','maxRedirects','resourceCount','.source.value\x20must\x20use\x20HTTPS.','groupId','releaseLock','byteLength','manifestPath','NFKC','type','\x20ID\x20\x22','\x22:\x20','parse','].id','location','root','\x20must\x20be\x20a\x20finite\x20number.','isArray','description','isInteger','Resource\x20search\x20needs\x20at\x20least\x20one\x20non-empty\x20query.','Resource\x20search\x20limit\x20must\x20be\x20a\x20positive\x20integer;\x20received\x20\x22','Resource\x20request\x20followed\x20too\x20many\x20redirects;\x20maximum\x20','\x22;\x20expected\x20<registryId>/<resourceId>.','185760UtjhWM','213790gLKMHR','colorEditable','aborted','order','registrations\x20must\x20not\x20be\x20empty.','resource-not-found','utf-8','done','].input','source','options','].input.registryId','registries','timeoutMs','47005ePWzNG','resourceByHandle','write','.id','limit','\x20must\x20be\x20a\x20boolean.','push','has','add','cacheRoot','filter','catalog','\x20without\x20a\x20Location\x20header.','resource-export-filename-too-long','test','.storagePolicy\x20must\x20be\x20\x22reference\x22.','.tagIds','length','Duplicate\x20resource\x20handle\x20\x22','downloader','path','boolean','].input.groups','Resource\x20server\x20returned\x20HTTP\x20','].input.defaultLocale','4953lnyXxV','catch','resource-query-empty','ResourceLibraryError','image','object','resource-download-insecure-redirect','listRegistries','resource','fetchImpl','tags','Duplicate\x20registry\x20ID\x20\x22','.name','709676mGHOhE','includes','3210424CtlmPl','slice','intrinsicSize','649pZvhaq','cache','payload','find','defaultLocale','Resource\x20cache\x20root\x20must\x20be\x20an\x20absolute,\x20dedicated\x20directory\x20below\x20the\x20filesystem\x20root;\x20received\x20\x22','registrationIndex','label','Duplicate\x20export\x20filename\x20\x22','signal','input','maxBytes','value','Invalid\x20resource\x20handle\x20\x22','set','manual','.source','registrations','resource-download-insecure','].label','toLowerCase','storagePolicy','\x22:\x20expected\x20filesystem-safe\x20characters.','replace','read','\x20bytes.','body','cacheLocation','resource-download-invalid-redirect','concat','Resource\x20export\x20filename\x20exceeds\x20','get','Resource\x20response\x20is\x20not\x20valid\x20UTF-8.','status','name','\x22:\x20expected\x20an\x20addressable\x20filesystem-safe\x20component\x20without\x20\x22--\x22.','resource-limit-invalid','Unknown\x20resource\x20registry\x20\x22','.intrinsicSize.height','resources','output','.order','download','endsWith','.tagIds\x20references\x20unknown\x20tag\x20\x22','732UDZELA','cancel','pid','registryById','.source.value\x20must\x20be\x20a\x20URL.','getReader','.payload','https:','clear','resourceIndex','resource-download-failed','resource-download-too-large','resource-download-invalid-utf8','entries','Invalid\x20registry\x20ID\x20\x22','resource-download-timeout','height','utf8','Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.','url','resource-invalid-handle','].input.resources','613825aJFKvD','\x20must\x20be\x20a\x20non-empty\x20string.','protocol','decode','string','map','.resource-','globalIndex','clearCache','registryId','code','queries','size','resource-download-http','.intrinsicSize.width','text','\x20ms.','.groupId','content-length','].input.tags','message','resource-registry-not-found','keywords','36ChoAhh','].input.resources[','Failed\x20to\x20download\x20\x22','.payload.colorEditable','Duplicate\x20','Resource\x20server\x20returned\x20an\x20invalid\x20redirect\x20URL.','groups','\x20must\x20be\x20an\x20array.','Invalid\x20resource\x20ID\x20\x22','516ovVbRR','resource-cache-root-invalid','handle','registrations[','Unknown\x20resource\x20\x22','normalize','.type\x20must\x20be\x20\x22image\x22.','isFinite','.svg','resource-manifest-invalid','resource-invalid-registry-id','manifest'];_0x4647=function(){return _0x444c79;};return _0x4647();}var J=class{[_0x1987b4(0x195)];constructor(_0x163a7){const _0x56070a=_0x1987b4;this[_0x56070a(0x195)]=K(_0x163a7);}[_0x1987b4(0x1c2)](_0x3ae75f){const _0x5d2257=_0x1987b4;let {registryId:_0xdde485,resourceId:_0x4d8483}=C(_0x3ae75f);return _0x4e56ee(this[_0x5d2257(0x195)],_0xdde485,_0x4d8483+_0x5d2257(0x17e));}async[_0x1987b4(0x12b)](_0x549ef7){const _0x27747e=_0x1987b4;try{return await _0x23b84d(this[_0x27747e(0x1c2)](_0x549ef7),_0x27747e(0x151));}catch(_0x4cbb72){if(G(_0x4cbb72)&&_0x4cbb72[_0x27747e(0x160)]==='ENOENT')return;throw _0x4cbb72;}}async[_0x1987b4(0x1b0)](_0x4ddfc8,_0x2201f8){const _0xe862f6=_0x1987b4;let _0x258c61=this[_0xe862f6(0x1c2)](_0x4ddfc8);await _0x13b129(_0xb78523(_0x258c61),{'recursive':!0x0});let _0x5da5ed=_0x4e56ee(_0xb78523(_0x258c61),_0xe862f6(0x15c)+process[_0xe862f6(0x142)]+'-'+_0x13f68d()+'.tmp');try{await _0x309679(_0x5da5ed,_0x2201f8,{'encoding':_0xe862f6(0x151),'mode':0x180}),await _0x202301(_0x5da5ed,_0x258c61);}catch(_0x5e0f06){throw await _0x256e70(_0x5da5ed)[_0xe862f6(0x1c8)](()=>void 0x0),_0x5e0f06;}}async[_0x1987b4(0x148)](){const _0x5b470f=_0x1987b4;let _0x31f5c1=await q(this[_0x5b470f(0x195)]);return await _0x12636a(this[_0x5b470f(0x195)],{'force':!0x0,'recursive':!0x0}),{'path':this[_0x5b470f(0x195)],..._0x31f5c1};}},Y=class{async[_0x1987b4(0x1b0)](_0x4d37f0,_0x238284,_0x58e87b){const _0x481bd5=_0x1987b4;await _0x13b129(_0x4d37f0,{'recursive':!0x0});let _0x12f7f7=_0x4e56ee(_0x4d37f0,_0x238284);return await _0x309679(_0x12f7f7,_0x58e87b,_0x481bd5(0x151)),_0x12f7f7;}},X=0x7530,ae=0xa00000,oe=0xa,se=new Set([0x12d,0x12e,0x12f,0x133,0x134]);function Z(_0x5131a3){const _0x3bee18=_0x1987b4;return new h(_0x3bee18(0x14b),'Resource\x20exceeds\x20the\x20maximum\x20size\x20of\x20'+_0x5131a3+_0x3bee18(0x12c));}async function ce(_0x559b36,_0x1c5eeb){const _0x197eaf=_0x1987b4;let _0x333a3e=Number(_0x559b36['headers']['get'](_0x197eaf(0x168)));if(Number[_0x197eaf(0x17d)](_0x333a3e)&&_0x333a3e>_0x1c5eeb)throw Z(_0x1c5eeb);if(_0x559b36[_0x197eaf(0x12d)]===null){let _0x1a9658=await _0x559b36[_0x197eaf(0x165)]();if(Buffer['byteLength'](_0x1a9658)>_0x1c5eeb)throw Z(_0x1c5eeb);return _0x1a9658;}let _0x53be4b=_0x559b36[_0x197eaf(0x12d)][_0x197eaf(0x145)](),_0x48d1fb=[],_0x2e7ebd=0x0;try{for(;;){let _0x4dca3f=await _0x53be4b[_0x197eaf(0x12b)]();if(_0x4dca3f[_0x197eaf(0x1a7)])break;if(_0x2e7ebd+=_0x4dca3f[_0x197eaf(0x11f)][_0x197eaf(0x18d)],_0x2e7ebd>_0x1c5eeb)throw await _0x53be4b[_0x197eaf(0x141)]()['catch'](()=>void 0x0),Z(_0x1c5eeb);_0x48d1fb[_0x197eaf(0x1b4)](_0x4dca3f['value']);}}finally{_0x53be4b[_0x197eaf(0x18c)]();}try{return new TextDecoder(_0x197eaf(0x1a6),{'fatal':!0x0})[_0x197eaf(0x159)](Buffer[_0x197eaf(0x130)](_0x48d1fb,_0x2e7ebd));}catch{throw new h(_0x197eaf(0x14c),_0x197eaf(0x133));}}var Q=class{['fetchImpl'];[_0x1987b4(0x1ad)];['maxBytes'];['maxRedirects'];constructor(_0x527133={}){const _0x232201=_0x1987b4;this[_0x232201(0x1d0)]=_0x527133['fetch']??fetch,this['timeoutMs']=_0x527133[_0x232201(0x1ad)]??X,this['maxBytes']=_0x527133['maxBytes']??ae,this[_0x232201(0x188)]=_0x527133[_0x232201(0x188)]??oe;}async[_0x1987b4(0x13d)](_0x15c6ef){const _0x16ce78=_0x1987b4;let _0x307a66=new URL(_0x15c6ef);if(_0x307a66[_0x16ce78(0x158)]!==_0x16ce78(0x147))throw new h(_0x16ce78(0x125),_0x16ce78(0x184));let _0x4e8b76=new AbortController(),_0x1e4e3b=setTimeout(()=>_0x4e8b76['abort'](),this[_0x16ce78(0x1ad)]);try{let _0x1d35a7=_0x307a66;for(let _0xc7d779=0x0;;_0xc7d779++){let _0x2316e8=await this['fetchImpl'](_0x1d35a7,{'redirect':_0x16ce78(0x122),'signal':_0x4e8b76['signal']});if(se[_0x16ce78(0x1b5)](_0x2316e8['status'])){if(_0xc7d779>=this[_0x16ce78(0x188)])throw new h(_0x16ce78(0x187),_0x16ce78(0x19d)+this[_0x16ce78(0x188)]+'.');let _0x5a4412=_0x2316e8['headers']['get']('location');if(_0x5a4412===null)throw new h('resource-download-invalid-redirect','Resource\x20server\x20returned\x20HTTP\x20'+_0x2316e8[_0x16ce78(0x134)]+_0x16ce78(0x1ba));let _0x159380;try{_0x159380=new URL(_0x5a4412,_0x1d35a7);}catch{throw new h(_0x16ce78(0x12f),_0x16ce78(0x172));}if(_0x159380[_0x16ce78(0x158)]!==_0x16ce78(0x147))throw new h(_0x16ce78(0x1cd),_0x16ce78(0x152));_0x1d35a7=_0x159380;continue;}if(!_0x2316e8['ok'])throw new h(_0x16ce78(0x163),_0x16ce78(0x1c5)+_0x2316e8[_0x16ce78(0x134)]+'.');if(_0x2316e8[_0x16ce78(0x153)]!==''&&new URL(_0x2316e8[_0x16ce78(0x153)])[_0x16ce78(0x158)]!=='https:')throw new h(_0x16ce78(0x1cd),'Resource\x20request\x20redirected\x20to\x20a\x20non-HTTPS\x20URL.');let _0x1d28fa=await ce(_0x2316e8,this[_0x16ce78(0x11e)]);if(!V(_0x1d28fa))throw new h('resource-download-invalid-svg',_0x16ce78(0x183));return _0x1d28fa;}}catch(_0x49aaac){throw _0x4e8b76[_0x16ce78(0x1e2)][_0x16ce78(0x1a2)]?new h(_0x16ce78(0x14f),'Resource\x20download\x20timed\x20out\x20after\x20'+this[_0x16ce78(0x1ad)]+_0x16ce78(0x166)):_0x49aaac;}finally{clearTimeout(_0x1e4e3b);}}};function $(_0x548a53){const _0x1b354f=_0x1987b4;try{return JSON[_0x1b354f(0x193)](_0x1b185f(_0x548a53,_0x1b354f(0x151)));}catch(_0x4f7771){throw new h('resource-manifest-read-failed','Cannot\x20read\x20resource\x20manifest\x20at\x20'+_0x548a53+':\x20'+(_0x4f7771 instanceof Error?_0x4f7771[_0x1b354f(0x16a)]:String(_0x4f7771)),void 0x0,{'cause':_0x4f7771});}}function le(_0x1d91d6){const _0x1fb081=_0x1987b4;let _0x719b37;return()=>(_0x719b37??=W({'manifest':$(_0x1d91d6[_0x1fb081(0x18e)]),'cache':new J(_0x1d91d6[_0x1fb081(0x1b7)]),'downloader':new Q(_0x1d91d6[_0x1fb081(0x1c1)]),'output':new Y()}),_0x719b37);}export{J as FilesystemResourceCache,Y as FilesystemResourceOutput,Q as HttpsResourceDownloader,h as ResourceLibraryError,le as createNodeResourceLibraryFactory,W as createResourceLibrary,g as isResourceLibraryError,$ as loadResourceManifestFromPath,K as validateResourceCacheRoot};
|