@univer-cli/generic-keyed-instance-pool 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.
Files changed (2) hide show
  1. package/dist/index.mjs +1 -1
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- function _0x3470(_0x1fbfa3,_0x49d6a4){_0x1fbfa3=_0x1fbfa3-0x1e2;const _0x20ea51=_0x20ea();let _0x34708b=_0x20ea51[_0x1fbfa3];return _0x34708b;}(function(_0x32bb74,_0x1f89bd){const _0x34a1e1=_0x3470,_0x421c1d=_0x32bb74();while(!![]){try{const _0x461236=parseInt(_0x34a1e1(0x1ee))/0x1+parseInt(_0x34a1e1(0x201))/0x2+parseInt(_0x34a1e1(0x21d))/0x3+parseInt(_0x34a1e1(0x21b))/0x4*(parseInt(_0x34a1e1(0x205))/0x5)+parseInt(_0x34a1e1(0x20a))/0x6+parseInt(_0x34a1e1(0x21e))/0x7*(parseInt(_0x34a1e1(0x1f9))/0x8)+-parseInt(_0x34a1e1(0x1ed))/0x9;if(_0x461236===_0x1f89bd)break;else _0x421c1d['push'](_0x421c1d['shift']());}catch(_0x249e03){_0x421c1d['push'](_0x421c1d['shift']());}}}(_0x20ea,0xe7240));function _0x20ea(){const _0x54bd27=['clear','rejected','3737612BddiTr','then','123336uPGzYM','973IeGfBP','shift','get','lastIdleSequence','key\x20must\x20not\x20be\x20empty','splice','length','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','catch','entries','Instance\x20pool\x20capacity\x20','find','status','ttl','unref','busy','27268488lDqNxq','923908LncCCc','isFinite','resolve','maxEntries','factory','destroy','reject','cache','closed','values','create-start','57016AzIheM','InstancePoolError','now','create-complete','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','create','key','map','1484638wLwSpr','code','INSTANCE_POOL_INVALID_INPUT','input','5eHuIrz','delete','set','invalidated','allSettled','2065134bFIlFQ','lru','evicted','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','waiters','instance','INSTANCE_POOL_CLOSED','Instance\x20pool\x20is\x20closed','isSafeInteger','idleTimer','name','size','reason','add','invalidate'];_0x20ea=function(){return _0x54bd27;};return _0x20ea();}var e=class extends Error{['code'];constructor(_0x3c2738,_0x5e7853,_0xf7c0af){const _0x4670d3=_0x3470;super(_0x5e7853,_0xf7c0af),this[_0x4670d3(0x214)]=_0x4670d3(0x1fa),this[_0x4670d3(0x202)]=_0x3c2738;}},t=0x493e0,n=0x14;function r(_0xefe6b4){const _0x295f7a=_0x3470;let _0xf2ad7d=new Map(),_0xb483e3=new Set(),_0xf1dad2=new Map(),_0xc0ce5e=_0xefe6b4[_0x295f7a(0x1f5)]?.['idleTtlMs']??t,_0x52a02f=_0xefe6b4[_0x295f7a(0x1f5)]?.[_0x295f7a(0x1f1)]??n,_0x3a4123=!0x1,_0x684a1,_0x2e8cbf=0x0;i(_0xc0ce5e,_0x52a02f);let _0x1a5cd9={async 'acquire'(_0x3b0283){const _0x1af351=_0x295f7a;_0x5132b4(),a(_0x3b0283);let _0x49a7df=_0xf2ad7d['get'](_0x3b0283['key']);if(_0x49a7df)return _0x49a7df[_0x1af351(0x1ec)]?await o(_0x3b0283,_0x49a7df[_0x1af351(0x20e)]):(c(_0x49a7df),_0x49a7df[_0x1af351(0x1ec)]=!0x0,_0x3504fc({'key':_0x3b0283[_0x1af351(0x1ff)],'type':'cache-hit'}),_0x30d9cc(_0x3b0283['key'],_0x49a7df));let _0x4ca41b=_0xf1dad2['get'](_0x3b0283[_0x1af351(0x1ff)]);if(_0x4ca41b)return await o(_0x3b0283,_0x4ca41b);let _0x4a58bd,_0x57d0d5=new Promise(_0x3e6d68=>{_0x4a58bd=_0x3e6d68;});_0xb483e3[_0x1af351(0x217)](_0x57d0d5),_0xf1dad2[_0x1af351(0x207)](_0x3b0283[_0x1af351(0x1ff)],[]);let _0x1e7ab5=Date[_0x1af351(0x1fb)]();_0x3504fc({'key':_0x3b0283[_0x1af351(0x1ff)],'type':_0x1af351(0x1f8)});try{await _0x549955();let _0x278f89=await _0xefe6b4[_0x1af351(0x1f2)][_0x1af351(0x1fe)](_0x3b0283);if(_0x3a4123)throw await _0xefe6b4[_0x1af351(0x1f2)][_0x1af351(0x1f3)]({'instance':_0x278f89,'key':_0x3b0283[_0x1af351(0x1ff)]}),l();let _0x5ce187={'busy':!0x0,'closed':!0x1,'instance':_0x278f89,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0xf1dad2['get'](_0x3b0283[_0x1af351(0x1ff)])??[]};return _0xf2ad7d['set'](_0x3b0283[_0x1af351(0x1ff)],_0x5ce187),_0x3504fc({'durationMs':Date['now']()-_0x1e7ab5,'key':_0x3b0283['key'],'type':_0x1af351(0x1fc)}),_0x30d9cc(_0x3b0283[_0x1af351(0x1ff)],_0x5ce187);}catch(_0x264691){throw s(_0xf1dad2[_0x1af351(0x220)](_0x3b0283[_0x1af351(0x1ff)])??[],_0x264691),_0x264691;}finally{_0xf1dad2['delete'](_0x3b0283[_0x1af351(0x1ff)]),_0xb483e3['delete'](_0x57d0d5),_0x4a58bd();}},async 'close'(){if(_0x684a1)return await _0x684a1;_0x3a4123=!0x0,_0x684a1=_0x56195b(),await _0x684a1;}};return _0x1a5cd9;function _0x30d9cc(_0x47b057,_0x4c75f5){const _0x1dfde9=_0x295f7a;let _0x2edf9a=!0x1;return{'instance':_0x4c75f5[_0x1dfde9(0x20f)],'key':_0x47b057,async 'invalidate'(){const _0x2a6379=_0x1dfde9;_0x2edf9a||(_0x2edf9a=!0x0,_0x4c75f5['invalidated']=!0x0,await _0x323f18(_0x47b057,_0x4c75f5,_0x2a6379(0x218)));},async 'release'(){const _0x57934e=_0x1dfde9;if(_0x2edf9a||(_0x2edf9a=!0x0,_0x4c75f5[_0x57934e(0x1f6)]))return;if(_0x4c75f5[_0x57934e(0x208)]){await _0x323f18(_0x47b057,_0x4c75f5,_0x57934e(0x218));return;}let _0x1fc751=_0x4c75f5[_0x57934e(0x20e)][_0x57934e(0x21f)]();_0x1fc751?_0x1fc751[_0x57934e(0x1f0)](_0x30d9cc(_0x47b057,_0x4c75f5)):(_0x4c75f5[_0x57934e(0x1ec)]=!0x1,_0x4c75f5[_0x57934e(0x221)]=++_0x2e8cbf,_0x5a23dd(_0x47b057,_0x4c75f5));}};}async function _0x323f18(_0x3f20ec,_0x399853,_0x1a18fe){const _0x59b1fc=_0x295f7a;let _0x4c8f27=_0x399853[_0x59b1fc(0x20e)][_0x59b1fc(0x1e2)](0x0);_0xf2ad7d['get'](_0x3f20ec)===_0x399853&&_0xf2ad7d['delete'](_0x3f20ec);try{await _0x2af5d3(_0x3f20ec,_0x399853,_0x1a18fe);}finally{_0x1a18fe&&_0x3504fc({'key':_0x3f20ec,'reason':_0x1a18fe,'type':'evicted'}),_0x3a4123?s(_0x4c8f27,l()):_0x531aa5(_0x4c8f27);}}function _0x5a23dd(_0x168bb8,_0x4bb0c9){const _0x1e3118=_0x295f7a;c(_0x4bb0c9),_0x4bb0c9[_0x1e3118(0x213)]=setTimeout(()=>{const _0x1e48cc=_0x1e3118;_0x4bb0c9['busy']||_0xf2ad7d[_0x1e48cc(0x220)](_0x168bb8)!==_0x4bb0c9||(_0xf2ad7d[_0x1e48cc(0x206)](_0x168bb8),_0x2af5d3(_0x168bb8,_0x4bb0c9,'ttl')[_0x1e48cc(0x21c)](()=>_0x3504fc({'key':_0x168bb8,'reason':_0x1e48cc(0x1ea),'type':_0x1e48cc(0x20c)}))[_0x1e48cc(0x1e5)](()=>void 0x0));},_0xc0ce5e),_0x4bb0c9['idleTimer'][_0x1e3118(0x1eb)]?.();}async function _0x549955(){const _0x5453bc=_0x295f7a;for(;_0xf2ad7d[_0x5453bc(0x215)]+_0xf1dad2[_0x5453bc(0x215)]>_0x52a02f;){let _0x140477;for(let _0xf5bcb7 of _0xf2ad7d)_0xf5bcb7[0x1][_0x5453bc(0x1ec)]||(!_0x140477||_0xf5bcb7[0x1][_0x5453bc(0x221)]<_0x140477[0x1]['lastIdleSequence'])&&(_0x140477=_0xf5bcb7);if(!_0x140477)throw new e('INSTANCE_POOL_CAPACITY_EXCEEDED',_0x5453bc(0x1e7)+_0x52a02f+_0x5453bc(0x1fd));_0xf2ad7d['delete'](_0x140477[0x0]),await _0x2af5d3(_0x140477[0x0],_0x140477[0x1],_0x5453bc(0x20b)),_0x3504fc({'key':_0x140477[0x0],'reason':_0x5453bc(0x20b),'type':_0x5453bc(0x20c)});}}async function _0x56195b(){const _0x5c83e7=_0x295f7a;let _0x715c96=l(),_0x198371=[..._0xf2ad7d[_0x5c83e7(0x1e6)]()];for(let [,_0x2d94fc]of _0x198371)s(_0x2d94fc['waiters'],_0x715c96);for(let _0x2a9c2d of _0xf1dad2[_0x5c83e7(0x1f7)]())s(_0x2a9c2d,_0x715c96);_0xf2ad7d[_0x5c83e7(0x219)]();let _0x4df899=(await Promise[_0x5c83e7(0x209)]([..._0x198371[_0x5c83e7(0x200)](async([_0x26bf10,_0x262910])=>await _0x2af5d3(_0x26bf10,_0x262910)),..._0xb483e3]))[_0x5c83e7(0x1e8)](_0x3ee192=>_0x3ee192[_0x5c83e7(0x1e9)]===_0x5c83e7(0x21a));if(_0x4df899?.[_0x5c83e7(0x1e9)]===_0x5c83e7(0x21a))throw _0x4df899[_0x5c83e7(0x216)];}function _0x3504fc(_0x5db225){try{_0xefe6b4['onEvent']?.(_0x5db225);}catch{}}function _0x5132b4(){if(_0x3a4123)throw l();}function _0x531aa5(_0x3c6ca2){const _0x1f5bd1=_0x295f7a;for(let _0x6c4f91 of _0x3c6ca2)_0x1a5cd9['acquire'](_0x6c4f91[_0x1f5bd1(0x204)])[_0x1f5bd1(0x21c)](_0x6c4f91['resolve'],_0x6c4f91[_0x1f5bd1(0x1f4)]);}async function _0x2af5d3(_0x276ae7,_0x4297b7,_0x2b2e8a){const _0x1c6e3d=_0x295f7a;_0x4297b7[_0x1c6e3d(0x1f6)]||(_0x4297b7[_0x1c6e3d(0x1f6)]=!0x0,c(_0x4297b7),_0x2b2e8a&&_0x3504fc({'key':_0x276ae7,'reason':_0x2b2e8a,'type':'destroy-start'}),await _0xefe6b4[_0x1c6e3d(0x1f2)]['destroy']({'instance':_0x4297b7[_0x1c6e3d(0x20f)],'key':_0x276ae7}));}}function i(_0x4ef97a,_0x484008){const _0x25bfba=_0x3470;if(!Number[_0x25bfba(0x1ef)](_0x4ef97a)||_0x4ef97a<0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x25bfba(0x1e4));if(!Number[_0x25bfba(0x212)](_0x484008)||_0x484008<=0x0)throw new e(_0x25bfba(0x203),_0x25bfba(0x20d));}function a(_0x49c5b9){const _0x3009b1=_0x3470;if(_0x49c5b9['key'][_0x3009b1(0x1e3)]===0x0)throw new e(_0x3009b1(0x203),_0x3009b1(0x222));}function o(_0xf1601a,_0x5ab5f1){return new Promise((_0x25fefd,_0x6536ae)=>{_0x5ab5f1['push']({'input':_0xf1601a,'reject':_0x6536ae,'resolve':_0x25fefd});});}function s(_0x195c77,_0x3cc301){const _0x29f110=_0x3470;for(let _0xd97174 of _0x195c77['splice'](0x0))_0xd97174[_0x29f110(0x1f4)](_0x3cc301);}function c(_0x570ac1){const _0x1009b7=_0x3470;_0x570ac1[_0x1009b7(0x213)]!==void 0x0&&(clearTimeout(_0x570ac1['idleTimer']),delete _0x570ac1[_0x1009b7(0x213)]);}function l(){const _0x38cc92=_0x3470;return new e(_0x38cc92(0x210),_0x38cc92(0x211));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
1
+ function _0x4366(){const _0x18dd73=['length','invalidate','evicted','INSTANCE_POOL_CAPACITY_EXCEEDED','entries','factory','invalidated','reason','1165200liWSeN','get','rejected','lastIdleSequence','waiters','create','busy','916304PWFSDn','input','273034JqBPOn','44194TMQbFE','idleTtlMs','INSTANCE_POOL_INVALID_INPUT','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','closed','delete','9ccqDEQ','splice','name','key\x20must\x20not\x20be\x20empty','destroy','values','key','Instance\x20pool\x20is\x20closed','isSafeInteger','destroy-start','now','acquire','status','resolve','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','InstancePoolError','map','create-start','then','lru','find','ttl','size','idleTimer','allSettled','set','517804SyBicS','3OIiQby','cache-hit','88818JPsnit','isFinite','catch','2112544imGKYo','cache','instance','reject','shift','10RGStTu','clear','unref','Instance\x20pool\x20capacity\x20','code','maxEntries'];_0x4366=function(){return _0x18dd73;};return _0x4366();}const _0x1c36ef=_0x2faf;(function(_0xcb62aa,_0x43a6e0){const _0x60e8b0=_0x2faf,_0x1139e5=_0xcb62aa();while(!![]){try{const _0x3039ca=parseInt(_0x60e8b0(0x1e8))/0x1+-parseInt(_0x60e8b0(0x1e9))/0x2*(parseInt(_0x60e8b0(0x1c7))/0x3)+-parseInt(_0x60e8b0(0x1c6))/0x4*(-parseInt(_0x60e8b0(0x1d1))/0x5)+-parseInt(_0x60e8b0(0x1c9))/0x6+-parseInt(_0x60e8b0(0x1cc))/0x7+parseInt(_0x60e8b0(0x1e6))/0x8+parseInt(_0x60e8b0(0x1ef))/0x9*(-parseInt(_0x60e8b0(0x1df))/0xa);if(_0x3039ca===_0x43a6e0)break;else _0x1139e5['push'](_0x1139e5['shift']());}catch(_0x3c0008){_0x1139e5['push'](_0x1139e5['shift']());}}}(_0x4366,0x2eb1e));var e=class extends Error{[_0x1c36ef(0x1d5)];constructor(_0x3b10ad,_0x14c35a,_0x5c2b63){const _0x2b237f=_0x1c36ef;super(_0x14c35a,_0x5c2b63),this[_0x2b237f(0x1f1)]=_0x2b237f(0x1bb),this[_0x2b237f(0x1d5)]=_0x3b10ad;}},t=0x493e0,n=0x14;function r(_0x5bc29e){const _0x4a97e9=_0x1c36ef;let _0x4fc69c=new Map(),_0x2c581f=new Set(),_0x764fe7=new Map(),_0x105dea=_0x5bc29e['cache']?.[_0x4a97e9(0x1ea)]??t,_0x504b1e=_0x5bc29e[_0x4a97e9(0x1cd)]?.[_0x4a97e9(0x1d6)]??n,_0x469360=!0x1,_0x40aa42,_0x288f00=0x0;i(_0x105dea,_0x504b1e);let _0x25ba18={async 'acquire'(_0x3253a0){const _0x143837=_0x4a97e9;_0x5c95be(),a(_0x3253a0);let _0x2df2ea=_0x4fc69c[_0x143837(0x1e0)](_0x3253a0['key']);if(_0x2df2ea)return _0x2df2ea[_0x143837(0x1e5)]?await o(_0x3253a0,_0x2df2ea[_0x143837(0x1e3)]):(c(_0x2df2ea),_0x2df2ea[_0x143837(0x1e5)]=!0x0,_0x2b8746({'key':_0x3253a0['key'],'type':_0x143837(0x1c8)}),_0x31ce2f(_0x3253a0[_0x143837(0x1f5)],_0x2df2ea));let _0x26a2a7=_0x764fe7[_0x143837(0x1e0)](_0x3253a0[_0x143837(0x1f5)]);if(_0x26a2a7)return await o(_0x3253a0,_0x26a2a7);let _0x2ed863,_0x5626ba=new Promise(_0x44c1e7=>{_0x2ed863=_0x44c1e7;});_0x2c581f['add'](_0x5626ba),_0x764fe7[_0x143837(0x1c5)](_0x3253a0[_0x143837(0x1f5)],[]);let _0x2b4b30=Date[_0x143837(0x1b6)]();_0x2b8746({'key':_0x3253a0[_0x143837(0x1f5)],'type':_0x143837(0x1bd)});try{await _0x21b3a4();let _0x699251=await _0x5bc29e['factory'][_0x143837(0x1e4)](_0x3253a0);if(_0x469360)throw await _0x5bc29e[_0x143837(0x1dc)][_0x143837(0x1f3)]({'instance':_0x699251,'key':_0x3253a0[_0x143837(0x1f5)]}),l();let _0xb8fa9d={'busy':!0x0,'closed':!0x1,'instance':_0x699251,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x764fe7[_0x143837(0x1e0)](_0x3253a0[_0x143837(0x1f5)])??[]};return _0x4fc69c[_0x143837(0x1c5)](_0x3253a0[_0x143837(0x1f5)],_0xb8fa9d),_0x2b8746({'durationMs':Date['now']()-_0x2b4b30,'key':_0x3253a0[_0x143837(0x1f5)],'type':'create-complete'}),_0x31ce2f(_0x3253a0[_0x143837(0x1f5)],_0xb8fa9d);}catch(_0x1a1483){throw s(_0x764fe7[_0x143837(0x1e0)](_0x3253a0[_0x143837(0x1f5)])??[],_0x1a1483),_0x1a1483;}finally{_0x764fe7[_0x143837(0x1ee)](_0x3253a0['key']),_0x2c581f[_0x143837(0x1ee)](_0x5626ba),_0x2ed863();}},async 'close'(){if(_0x40aa42)return await _0x40aa42;_0x469360=!0x0,_0x40aa42=_0x2a8ae1(),await _0x40aa42;}};return _0x25ba18;function _0x31ce2f(_0x2bf4f6,_0x40807f){const _0x2ab93b=_0x4a97e9;let _0x38adc1=!0x1;return{'instance':_0x40807f[_0x2ab93b(0x1ce)],'key':_0x2bf4f6,async 'invalidate'(){const _0x2719a8=_0x2ab93b;_0x38adc1||(_0x38adc1=!0x0,_0x40807f[_0x2719a8(0x1dd)]=!0x0,await _0x3f4e37(_0x2bf4f6,_0x40807f,'invalidate'));},async 'release'(){const _0x1a0ed9=_0x2ab93b;if(_0x38adc1||(_0x38adc1=!0x0,_0x40807f[_0x1a0ed9(0x1ed)]))return;if(_0x40807f[_0x1a0ed9(0x1dd)]){await _0x3f4e37(_0x2bf4f6,_0x40807f,_0x1a0ed9(0x1d8));return;}let _0xdb953e=_0x40807f[_0x1a0ed9(0x1e3)][_0x1a0ed9(0x1d0)]();_0xdb953e?_0xdb953e[_0x1a0ed9(0x1b9)](_0x31ce2f(_0x2bf4f6,_0x40807f)):(_0x40807f['busy']=!0x1,_0x40807f[_0x1a0ed9(0x1e2)]=++_0x288f00,_0x3f0f57(_0x2bf4f6,_0x40807f));}};}async function _0x3f4e37(_0x15c99f,_0xf2717c,_0x32516b){const _0x3d311e=_0x4a97e9;let _0x59431a=_0xf2717c[_0x3d311e(0x1e3)]['splice'](0x0);_0x4fc69c[_0x3d311e(0x1e0)](_0x15c99f)===_0xf2717c&&_0x4fc69c[_0x3d311e(0x1ee)](_0x15c99f);try{await _0x21cd53(_0x15c99f,_0xf2717c,_0x32516b);}finally{_0x32516b&&_0x2b8746({'key':_0x15c99f,'reason':_0x32516b,'type':'evicted'}),_0x469360?s(_0x59431a,l()):_0x2f7494(_0x59431a);}}function _0x3f0f57(_0x31509a,_0x4162cd){const _0x160804=_0x4a97e9;c(_0x4162cd),_0x4162cd['idleTimer']=setTimeout(()=>{const _0x34e1b9=_0x2faf;_0x4162cd[_0x34e1b9(0x1e5)]||_0x4fc69c[_0x34e1b9(0x1e0)](_0x31509a)!==_0x4162cd||(_0x4fc69c[_0x34e1b9(0x1ee)](_0x31509a),_0x21cd53(_0x31509a,_0x4162cd,_0x34e1b9(0x1c1))[_0x34e1b9(0x1be)](()=>_0x2b8746({'key':_0x31509a,'reason':'ttl','type':_0x34e1b9(0x1d9)}))[_0x34e1b9(0x1cb)](()=>void 0x0));},_0x105dea),_0x4162cd[_0x160804(0x1c3)][_0x160804(0x1d3)]?.();}async function _0x21b3a4(){const _0x1c5cbb=_0x4a97e9;for(;_0x4fc69c[_0x1c5cbb(0x1c2)]+_0x764fe7['size']>_0x504b1e;){let _0x372485;for(let _0x3f3aef of _0x4fc69c)_0x3f3aef[0x1][_0x1c5cbb(0x1e5)]||(!_0x372485||_0x3f3aef[0x1]['lastIdleSequence']<_0x372485[0x1][_0x1c5cbb(0x1e2)])&&(_0x372485=_0x3f3aef);if(!_0x372485)throw new e(_0x1c5cbb(0x1da),_0x1c5cbb(0x1d4)+_0x504b1e+_0x1c5cbb(0x1ec));_0x4fc69c['delete'](_0x372485[0x0]),await _0x21cd53(_0x372485[0x0],_0x372485[0x1],_0x1c5cbb(0x1bf)),_0x2b8746({'key':_0x372485[0x0],'reason':'lru','type':_0x1c5cbb(0x1d9)});}}async function _0x2a8ae1(){const _0x18b549=_0x4a97e9;let _0x345522=l(),_0x34d87a=[..._0x4fc69c[_0x18b549(0x1db)]()];for(let [,_0x1a5817]of _0x34d87a)s(_0x1a5817[_0x18b549(0x1e3)],_0x345522);for(let _0x5cf6ba of _0x764fe7[_0x18b549(0x1f4)]())s(_0x5cf6ba,_0x345522);_0x4fc69c[_0x18b549(0x1d2)]();let _0x2283e0=(await Promise[_0x18b549(0x1c4)]([..._0x34d87a[_0x18b549(0x1bc)](async([_0x1d6716,_0x301129])=>await _0x21cd53(_0x1d6716,_0x301129)),..._0x2c581f]))[_0x18b549(0x1c0)](_0x368657=>_0x368657['status']===_0x18b549(0x1e1));if(_0x2283e0?.[_0x18b549(0x1b8)]==='rejected')throw _0x2283e0[_0x18b549(0x1de)];}function _0x2b8746(_0xb55331){try{_0x5bc29e['onEvent']?.(_0xb55331);}catch{}}function _0x5c95be(){if(_0x469360)throw l();}function _0x2f7494(_0x1db34f){const _0x30e3aa=_0x4a97e9;for(let _0x104020 of _0x1db34f)_0x25ba18[_0x30e3aa(0x1b7)](_0x104020[_0x30e3aa(0x1e7)])[_0x30e3aa(0x1be)](_0x104020[_0x30e3aa(0x1b9)],_0x104020['reject']);}async function _0x21cd53(_0x1e48df,_0x3e6490,_0x41ecbf){const _0x197631=_0x4a97e9;_0x3e6490[_0x197631(0x1ed)]||(_0x3e6490[_0x197631(0x1ed)]=!0x0,c(_0x3e6490),_0x41ecbf&&_0x2b8746({'key':_0x1e48df,'reason':_0x41ecbf,'type':_0x197631(0x1f8)}),await _0x5bc29e[_0x197631(0x1dc)]['destroy']({'instance':_0x3e6490[_0x197631(0x1ce)],'key':_0x1e48df}));}}function i(_0x2e74d9,_0x4101b9){const _0x2e16e5=_0x1c36ef;if(!Number[_0x2e16e5(0x1ca)](_0x2e74d9)||_0x2e74d9<0x0)throw new e(_0x2e16e5(0x1eb),'cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number');if(!Number[_0x2e16e5(0x1f7)](_0x4101b9)||_0x4101b9<=0x0)throw new e(_0x2e16e5(0x1eb),_0x2e16e5(0x1ba));}function _0x2faf(_0x58d4e9,_0x85f15f){_0x58d4e9=_0x58d4e9-0x1b6;const _0x436608=_0x4366();let _0x2faf63=_0x436608[_0x58d4e9];return _0x2faf63;}function a(_0x180a81){const _0x1397d4=_0x1c36ef;if(_0x180a81[_0x1397d4(0x1f5)][_0x1397d4(0x1d7)]===0x0)throw new e(_0x1397d4(0x1eb),_0x1397d4(0x1f2));}function o(_0x5536a7,_0x508c5a){return new Promise((_0xaa33fd,_0x1a5702)=>{_0x508c5a['push']({'input':_0x5536a7,'reject':_0x1a5702,'resolve':_0xaa33fd});});}function s(_0x405967,_0x7a9e29){const _0x5d872d=_0x1c36ef;for(let _0x107527 of _0x405967[_0x5d872d(0x1f0)](0x0))_0x107527[_0x5d872d(0x1cf)](_0x7a9e29);}function c(_0x51bd1a){const _0x35f9ed=_0x1c36ef;_0x51bd1a[_0x35f9ed(0x1c3)]!==void 0x0&&(clearTimeout(_0x51bd1a[_0x35f9ed(0x1c3)]),delete _0x51bd1a[_0x35f9ed(0x1c3)]);}function l(){const _0x4c84ed=_0x1c36ef;return new e('INSTANCE_POOL_CLOSED',_0x4c84ed(0x1f6));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@univer-cli/generic-keyed-instance-pool",
3
3
  "type": "module",
4
- "version": "1.2.0",
4
+ "version": "1.3.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",