@univer-cli/generic-keyed-instance-pool 1.0.0-rc.0 → 1.0.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
- const _0x49b1f4=_0x447a;(function(_0xa7ea34,_0x201ce5){const _0x39d74a=_0x447a,_0x1cbd6c=_0xa7ea34();while(!![]){try{const _0x39a173=-parseInt(_0x39d74a(0xdb))/0x1*(parseInt(_0x39d74a(0xe1))/0x2)+parseInt(_0x39d74a(0x105))/0x3*(-parseInt(_0x39d74a(0xef))/0x4)+-parseInt(_0x39d74a(0x100))/0x5+-parseInt(_0x39d74a(0xf8))/0x6*(-parseInt(_0x39d74a(0xea))/0x7)+parseInt(_0x39d74a(0xcf))/0x8+parseInt(_0x39d74a(0xfd))/0x9+-parseInt(_0x39d74a(0xeb))/0xa*(-parseInt(_0x39d74a(0xdc))/0xb);if(_0x39a173===_0x201ce5)break;else _0x1cbd6c['push'](_0x1cbd6c['shift']());}catch(_0x3a4e93){_0x1cbd6c['push'](_0x1cbd6c['shift']());}}}(_0x30a1,0xed1c2));var e=class extends Error{[_0x49b1f4(0xf9)];constructor(_0x378308,_0x5d091f,_0x23f8f3){const _0x2e889d=_0x49b1f4;super(_0x5d091f,_0x23f8f3),this['name']='InstancePoolError',this[_0x2e889d(0xf9)]=_0x378308;}},t=0x493e0,n=0x14;function r(_0x2f9139){const _0x2114b6=_0x49b1f4;let _0xa40c40=new Map(),_0x163108=new Set(),_0x3607f7=new Map(),_0x47c51d=_0x2f9139['cache']?.[_0x2114b6(0xcc)]??t,_0x4de7f7=_0x2f9139[_0x2114b6(0x109)]?.['maxEntries']??n,_0x1c8be2=!0x1,_0xfaf7be,_0x4311bd=0x0;i(_0x47c51d,_0x4de7f7);let _0x45afbd={async 'acquire'(_0x510996){const _0xb5239b=_0x2114b6;_0x514e6b(),a(_0x510996);let _0x25b0ba=_0xa40c40[_0xb5239b(0xd4)](_0x510996['key']);if(_0x25b0ba)return _0x25b0ba['busy']?await o(_0x510996,_0x25b0ba[_0xb5239b(0xd1)]):(c(_0x25b0ba),_0x25b0ba['busy']=!0x0,_0x4769eb({'key':_0x510996[_0xb5239b(0xee)],'type':_0xb5239b(0xed)}),_0x197c06(_0x510996[_0xb5239b(0xee)],_0x25b0ba));let _0x32729b=_0x3607f7[_0xb5239b(0xd4)](_0x510996[_0xb5239b(0xee)]);if(_0x32729b)return await o(_0x510996,_0x32729b);let _0x16a462,_0x457504=new Promise(_0x433146=>{_0x16a462=_0x433146;});_0x163108[_0xb5239b(0xff)](_0x457504),_0x3607f7[_0xb5239b(0x101)](_0x510996[_0xb5239b(0xee)],[]);let _0x353adf=Date[_0xb5239b(0xda)]();_0x4769eb({'key':_0x510996[_0xb5239b(0xee)],'type':_0xb5239b(0xcd)});try{await _0x2d956c();let _0xc79106=await _0x2f9139['factory'][_0xb5239b(0xe4)](_0x510996);if(_0x1c8be2)throw await _0x2f9139['factory'][_0xb5239b(0x10a)]({'instance':_0xc79106,'key':_0x510996[_0xb5239b(0xee)]}),l();let _0x2f7c71={'busy':!0x0,'closed':!0x1,'instance':_0xc79106,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x3607f7[_0xb5239b(0xd4)](_0x510996['key'])??[]};return _0xa40c40[_0xb5239b(0x101)](_0x510996[_0xb5239b(0xee)],_0x2f7c71),_0x4769eb({'durationMs':Date[_0xb5239b(0xda)]()-_0x353adf,'key':_0x510996[_0xb5239b(0xee)],'type':_0xb5239b(0xdf)}),_0x197c06(_0x510996[_0xb5239b(0xee)],_0x2f7c71);}catch(_0x44ac86){throw s(_0x3607f7[_0xb5239b(0xd4)](_0x510996[_0xb5239b(0xee)])??[],_0x44ac86),_0x44ac86;}finally{_0x3607f7[_0xb5239b(0x108)](_0x510996[_0xb5239b(0xee)]),_0x163108[_0xb5239b(0x108)](_0x457504),_0x16a462();}},async 'close'(){if(_0xfaf7be)return await _0xfaf7be;_0x1c8be2=!0x0,_0xfaf7be=_0x4ff87b(),await _0xfaf7be;}};return _0x45afbd;function _0x197c06(_0x56f3ef,_0x10e982){const _0x973f9d=_0x2114b6;let _0x34c778=!0x1;return{'instance':_0x10e982[_0x973f9d(0xd9)],'key':_0x56f3ef,async 'invalidate'(){const _0x5a11b8=_0x973f9d;_0x34c778||(_0x34c778=!0x0,_0x10e982[_0x5a11b8(0xce)]=!0x0,await _0xd4d282(_0x56f3ef,_0x10e982,_0x5a11b8(0xfe)));},async 'release'(){const _0x38b3b7=_0x973f9d;if(_0x34c778||(_0x34c778=!0x0,_0x10e982[_0x38b3b7(0xf2)]))return;if(_0x10e982[_0x38b3b7(0xce)]){await _0xd4d282(_0x56f3ef,_0x10e982,_0x38b3b7(0xfe));return;}let _0x51357f=_0x10e982[_0x38b3b7(0xd1)][_0x38b3b7(0xe8)]();_0x51357f?_0x51357f[_0x38b3b7(0xd3)](_0x197c06(_0x56f3ef,_0x10e982)):(_0x10e982[_0x38b3b7(0xf7)]=!0x1,_0x10e982['lastIdleSequence']=++_0x4311bd,_0x110f75(_0x56f3ef,_0x10e982));}};}async function _0xd4d282(_0x25b5be,_0xcb567d,_0x33bbc6){const _0x55651a=_0x2114b6;let _0xf3df20=_0xcb567d[_0x55651a(0xd1)][_0x55651a(0xd0)](0x0);_0xa40c40[_0x55651a(0xd4)](_0x25b5be)===_0xcb567d&&_0xa40c40['delete'](_0x25b5be);try{await _0x18f9d2(_0x25b5be,_0xcb567d,_0x33bbc6);}finally{_0x33bbc6&&_0x4769eb({'key':_0x25b5be,'reason':_0x33bbc6,'type':_0x55651a(0xdd)}),_0x1c8be2?s(_0xf3df20,l()):_0x18e03c(_0xf3df20);}}function _0x110f75(_0x2352be,_0x5686a4){const _0x402ce3=_0x2114b6;c(_0x5686a4),_0x5686a4[_0x402ce3(0x102)]=setTimeout(()=>{const _0x44f4e5=_0x402ce3;_0x5686a4[_0x44f4e5(0xf7)]||_0xa40c40[_0x44f4e5(0xd4)](_0x2352be)!==_0x5686a4||(_0xa40c40[_0x44f4e5(0x108)](_0x2352be),_0x18f9d2(_0x2352be,_0x5686a4,'ttl')[_0x44f4e5(0xe0)](()=>_0x4769eb({'key':_0x2352be,'reason':_0x44f4e5(0xd5),'type':_0x44f4e5(0xdd)}))[_0x44f4e5(0x10b)](()=>void 0x0));},_0x47c51d),_0x5686a4[_0x402ce3(0x102)][_0x402ce3(0x103)]?.();}async function _0x2d956c(){const _0x52b2cd=_0x2114b6;for(;_0xa40c40['size']+_0x3607f7[_0x52b2cd(0xfc)]>_0x4de7f7;){let _0x3b7363;for(let _0x43d2dc of _0xa40c40)_0x43d2dc[0x1][_0x52b2cd(0xf7)]||(!_0x3b7363||_0x43d2dc[0x1]['lastIdleSequence']<_0x3b7363[0x1][_0x52b2cd(0xfa)])&&(_0x3b7363=_0x43d2dc);if(!_0x3b7363)throw new e(_0x52b2cd(0xf4),_0x52b2cd(0xe9)+_0x4de7f7+_0x52b2cd(0xe5));_0xa40c40[_0x52b2cd(0x108)](_0x3b7363[0x0]),await _0x18f9d2(_0x3b7363[0x0],_0x3b7363[0x1],_0x52b2cd(0xde)),_0x4769eb({'key':_0x3b7363[0x0],'reason':_0x52b2cd(0xde),'type':_0x52b2cd(0xdd)});}}async function _0x4ff87b(){const _0x21c20a=_0x2114b6;let _0x5912b0=l(),_0x12dc7f=[..._0xa40c40[_0x21c20a(0xf3)]()];for(let [,_0x56ce54]of _0x12dc7f)s(_0x56ce54[_0x21c20a(0xd1)],_0x5912b0);for(let _0x25ffcb of _0x3607f7['values']())s(_0x25ffcb,_0x5912b0);_0xa40c40['clear']();let _0x307e39=(await Promise['allSettled']([..._0x12dc7f[_0x21c20a(0xd2)](async([_0x3bb123,_0x366294])=>await _0x18f9d2(_0x3bb123,_0x366294)),..._0x163108]))['find'](_0x450067=>_0x450067[_0x21c20a(0x107)]===_0x21c20a(0xd8));if(_0x307e39?.['status']===_0x21c20a(0xd8))throw _0x307e39[_0x21c20a(0xd7)];}function _0x4769eb(_0x19a9ab){const _0x5a19e2=_0x2114b6;try{_0x2f9139[_0x5a19e2(0xd6)]?.(_0x19a9ab);}catch{}}function _0x514e6b(){if(_0x1c8be2)throw l();}function _0x18e03c(_0x25dbca){const _0x2766a2=_0x2114b6;for(let _0x21827f of _0x25dbca)_0x45afbd[_0x2766a2(0xf5)](_0x21827f[_0x2766a2(0x104)])[_0x2766a2(0xe0)](_0x21827f[_0x2766a2(0xd3)],_0x21827f[_0x2766a2(0x10c)]);}async function _0x18f9d2(_0x2c55dd,_0x2d350c,_0x20deb2){const _0x39427a=_0x2114b6;_0x2d350c[_0x39427a(0xf2)]||(_0x2d350c[_0x39427a(0xf2)]=!0x0,c(_0x2d350c),_0x20deb2&&_0x4769eb({'key':_0x2c55dd,'reason':_0x20deb2,'type':'destroy-start'}),await _0x2f9139[_0x39427a(0xe3)][_0x39427a(0x10a)]({'instance':_0x2d350c[_0x39427a(0xd9)],'key':_0x2c55dd}));}}function i(_0x512ce8,_0x25155b){const _0x515948=_0x49b1f4;if(!Number[_0x515948(0xf0)](_0x512ce8)||_0x512ce8<0x0)throw new e(_0x515948(0xfb),_0x515948(0xec));if(!Number[_0x515948(0xe2)](_0x25155b)||_0x25155b<=0x0)throw new e(_0x515948(0xfb),_0x515948(0xe7));}function a(_0x1fdfb8){const _0x4194ba=_0x49b1f4;if(_0x1fdfb8[_0x4194ba(0xee)][_0x4194ba(0x106)]===0x0)throw new e('INSTANCE_POOL_INVALID_INPUT',_0x4194ba(0xe6));}function o(_0x210963,_0x81168d){return new Promise((_0x553a42,_0x5cc9a1)=>{_0x81168d['push']({'input':_0x210963,'reject':_0x5cc9a1,'resolve':_0x553a42});});}function s(_0x1da466,_0x37a45d){const _0x89763=_0x49b1f4;for(let _0x549955 of _0x1da466[_0x89763(0xd0)](0x0))_0x549955[_0x89763(0x10c)](_0x37a45d);}function c(_0x4b907b){const _0x471815=_0x49b1f4;_0x4b907b[_0x471815(0x102)]!==void 0x0&&(clearTimeout(_0x4b907b[_0x471815(0x102)]),delete _0x4b907b['idleTimer']);}function _0x447a(_0x2eaf0a,_0x3bfe85){_0x2eaf0a=_0x2eaf0a-0xcc;const _0x30a1a1=_0x30a1();let _0x447ad7=_0x30a1a1[_0x2eaf0a];return _0x447ad7;}function l(){const _0x41f6bf=_0x49b1f4;return new e(_0x41f6bf(0xf6),_0x41f6bf(0xf1));}export{e as InstancePoolError,r as createGenericKeyedInstancePool};function _0x30a1(){const _0x383e6e=['cache','destroy','catch','reject','idleTtlMs','create-start','invalidated','4810008cqrwGK','splice','waiters','map','resolve','get','ttl','onEvent','reason','rejected','instance','now','1lvOQTA','123068MHMpEN','evicted','lru','create-complete','then','2609990mxTIzn','isSafeInteger','factory','create','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','key\x20must\x20not\x20be\x20empty','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','shift','Instance\x20pool\x20capacity\x20','124243LkXSFg','1490RBOnKU','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','cache-hit','key','2877164aHuoqg','isFinite','Instance\x20pool\x20is\x20closed','closed','entries','INSTANCE_POOL_CAPACITY_EXCEEDED','acquire','INSTANCE_POOL_CLOSED','busy','60NKDZBp','code','lastIdleSequence','INSTANCE_POOL_INVALID_INPUT','size','10716696ruMpJD','invalidate','add','3205045LkkxHH','set','idleTimer','unref','input','3MuOweq','length','status','delete'];_0x30a1=function(){return _0x383e6e;};return _0x30a1();}
1
+ function _0x2bf6(){const _0x50b432=['11WDMYeQ','idleTtlMs','waiters','map','isSafeInteger','find','acquire','idleTimer','input','delete','invalidated','lastIdleSequence','INSTANCE_POOL_CLOSED','rejected','clear','catch','50508QTDFCS','invalidate','73140bGaTnh','1551haZrKS','InstancePoolError','allSettled','get','length','36qYkVyj','1181068fszGSU','16359BeNIyL','cache','\x20is\x20occupied\x20by\x20active\x20or\x20loading\x20instances','cache-hit','maxEntries','add','cache.maxEntries\x20must\x20be\x20a\x20positive\x20integer','INSTANCE_POOL_INVALID_INPUT','lru','820mbdcEd','shift','INSTANCE_POOL_CAPACITY_EXCEEDED','37460obeVhS','size','closed','reason','set','factory','push','destroy','then','code','now','169DVHLzN','7xahrPZ','Instance\x20pool\x20is\x20closed','busy','66juFbbU','208262RHZimZ','cache.idleTtlMs\x20must\x20be\x20a\x20finite\x20non-negative\x20number','splice','key','status','destroy-start','resolve','9100656cnQAOg','reject','ttl'];_0x2bf6=function(){return _0x50b432;};return _0x2bf6();}(function(_0x36b7b4,_0x11f7e1){const _0x56d932=_0x5b0a,_0x1639b0=_0x36b7b4();while(!![]){try{const _0x10d07b=-parseInt(_0x56d932(0x9e))/0x1*(-parseInt(_0x56d932(0x94))/0x2)+-parseInt(_0x56d932(0xb8))/0x3*(-parseInt(_0x56d932(0xc1))/0x4)+-parseInt(_0x56d932(0xb0))/0x5*(-parseInt(_0x56d932(0x93))/0x6)+parseInt(_0x56d932(0x90))/0x7*(-parseInt(_0x56d932(0x9b))/0x8)+parseInt(_0x56d932(0xb6))/0x9*(-parseInt(_0x56d932(0xc4))/0xa)+parseInt(_0x56d932(0xb1))/0xb*(parseInt(_0x56d932(0xae))/0xc)+-parseInt(_0x56d932(0x8f))/0xd*(parseInt(_0x56d932(0xb7))/0xe);if(_0x10d07b===_0x11f7e1)break;else _0x1639b0['push'](_0x1639b0['shift']());}catch(_0x289dc5){_0x1639b0['push'](_0x1639b0['shift']());}}}(_0x2bf6,0xbb99b));var e=class extends Error{['code'];constructor(_0x19bf3a,_0x59ce12,_0xc43940){const _0x19d4a1=_0x5b0a;super(_0x59ce12,_0xc43940),this['name']=_0x19d4a1(0xb2),this[_0x19d4a1(0x8d)]=_0x19bf3a;}},t=0x493e0,n=0x14;function r(_0x34279f){const _0xf3a111=_0x5b0a;let _0x6641b6=new Map(),_0xd60387=new Set(),_0x1c478c=new Map(),_0x15fcf0=_0x34279f['cache']?.[_0xf3a111(0x9f)]??t,_0x203c6d=_0x34279f[_0xf3a111(0xb9)]?.[_0xf3a111(0xbc)]??n,_0xd1bc30=!0x1,_0x1716fa,_0x4eb9a4=0x0;i(_0x15fcf0,_0x203c6d);let _0x140b18={async 'acquire'(_0x180523){const _0x27965b=_0xf3a111;_0x3a38ad(),a(_0x180523);let _0x89a1ea=_0x6641b6[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)]);if(_0x89a1ea)return _0x89a1ea['busy']?await o(_0x180523,_0x89a1ea[_0x27965b(0xa0)]):(c(_0x89a1ea),_0x89a1ea[_0x27965b(0x92)]=!0x0,_0x177521({'key':_0x180523[_0x27965b(0x97)],'type':_0x27965b(0xbb)}),_0x3e9f1c(_0x180523[_0x27965b(0x97)],_0x89a1ea));let _0x1a77f1=_0x1c478c[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)]);if(_0x1a77f1)return await o(_0x180523,_0x1a77f1);let _0x2872cc,_0x364554=new Promise(_0x275c79=>{_0x2872cc=_0x275c79;});_0xd60387[_0x27965b(0xbd)](_0x364554),_0x1c478c[_0x27965b(0xc8)](_0x180523['key'],[]);let _0x4f7ba9=Date['now']();_0x177521({'key':_0x180523[_0x27965b(0x97)],'type':'create-start'});try{await _0x1b8459();let _0x3ebbb5=await _0x34279f['factory']['create'](_0x180523);if(_0xd1bc30)throw await _0x34279f[_0x27965b(0xc9)][_0x27965b(0xcb)]({'instance':_0x3ebbb5,'key':_0x180523['key']}),l();let _0xa03658={'busy':!0x0,'closed':!0x1,'instance':_0x3ebbb5,'invalidated':!0x1,'lastIdleSequence':0x0,'waiters':_0x1c478c[_0x27965b(0xb4)](_0x180523[_0x27965b(0x97)])??[]};return _0x6641b6[_0x27965b(0xc8)](_0x180523[_0x27965b(0x97)],_0xa03658),_0x177521({'durationMs':Date[_0x27965b(0x8e)]()-_0x4f7ba9,'key':_0x180523[_0x27965b(0x97)],'type':'create-complete'}),_0x3e9f1c(_0x180523[_0x27965b(0x97)],_0xa03658);}catch(_0x51d0f5){throw s(_0x1c478c['get'](_0x180523['key'])??[],_0x51d0f5),_0x51d0f5;}finally{_0x1c478c[_0x27965b(0xa7)](_0x180523[_0x27965b(0x97)]),_0xd60387['delete'](_0x364554),_0x2872cc();}},async 'close'(){if(_0x1716fa)return await _0x1716fa;_0xd1bc30=!0x0,_0x1716fa=_0x409f40(),await _0x1716fa;}};return _0x140b18;function _0x3e9f1c(_0x22f791,_0x3b8457){let _0x5b9a0d=!0x1;return{'instance':_0x3b8457['instance'],'key':_0x22f791,async 'invalidate'(){const _0x3dbf80=_0x5b0a;_0x5b9a0d||(_0x5b9a0d=!0x0,_0x3b8457[_0x3dbf80(0xa8)]=!0x0,await _0x57c627(_0x22f791,_0x3b8457,_0x3dbf80(0xaf)));},async 'release'(){const _0x1e2d16=_0x5b0a;if(_0x5b9a0d||(_0x5b9a0d=!0x0,_0x3b8457[_0x1e2d16(0xc6)]))return;if(_0x3b8457[_0x1e2d16(0xa8)]){await _0x57c627(_0x22f791,_0x3b8457,_0x1e2d16(0xaf));return;}let _0x65443c=_0x3b8457[_0x1e2d16(0xa0)][_0x1e2d16(0xc2)]();_0x65443c?_0x65443c[_0x1e2d16(0x9a)](_0x3e9f1c(_0x22f791,_0x3b8457)):(_0x3b8457[_0x1e2d16(0x92)]=!0x1,_0x3b8457['lastIdleSequence']=++_0x4eb9a4,_0x39c684(_0x22f791,_0x3b8457));}};}async function _0x57c627(_0x5343ed,_0x371c97,_0x1331e8){const _0x27e94f=_0xf3a111;let _0x55657e=_0x371c97[_0x27e94f(0xa0)][_0x27e94f(0x96)](0x0);_0x6641b6[_0x27e94f(0xb4)](_0x5343ed)===_0x371c97&&_0x6641b6[_0x27e94f(0xa7)](_0x5343ed);try{await _0x12006c(_0x5343ed,_0x371c97,_0x1331e8);}finally{_0x1331e8&&_0x177521({'key':_0x5343ed,'reason':_0x1331e8,'type':'evicted'}),_0xd1bc30?s(_0x55657e,l()):_0x298e16(_0x55657e);}}function _0x39c684(_0x487665,_0x550c85){const _0x15f2bc=_0xf3a111;c(_0x550c85),_0x550c85[_0x15f2bc(0xa5)]=setTimeout(()=>{const _0x4586d3=_0x15f2bc;_0x550c85[_0x4586d3(0x92)]||_0x6641b6['get'](_0x487665)!==_0x550c85||(_0x6641b6[_0x4586d3(0xa7)](_0x487665),_0x12006c(_0x487665,_0x550c85,_0x4586d3(0x9d))[_0x4586d3(0xcc)](()=>_0x177521({'key':_0x487665,'reason':_0x4586d3(0x9d),'type':'evicted'}))[_0x4586d3(0xad)](()=>void 0x0));},_0x15fcf0),_0x550c85['idleTimer']['unref']?.();}async function _0x1b8459(){const _0x360581=_0xf3a111;for(;_0x6641b6['size']+_0x1c478c[_0x360581(0xc5)]>_0x203c6d;){let _0x3b1477;for(let _0x55f5f0 of _0x6641b6)_0x55f5f0[0x1][_0x360581(0x92)]||(!_0x3b1477||_0x55f5f0[0x1]['lastIdleSequence']<_0x3b1477[0x1][_0x360581(0xa9)])&&(_0x3b1477=_0x55f5f0);if(!_0x3b1477)throw new e(_0x360581(0xc3),'Instance\x20pool\x20capacity\x20'+_0x203c6d+_0x360581(0xba));_0x6641b6[_0x360581(0xa7)](_0x3b1477[0x0]),await _0x12006c(_0x3b1477[0x0],_0x3b1477[0x1],_0x360581(0xc0)),_0x177521({'key':_0x3b1477[0x0],'reason':_0x360581(0xc0),'type':'evicted'});}}async function _0x409f40(){const _0x293a67=_0xf3a111;let _0x5342ac=l(),_0x41d7fe=[..._0x6641b6['entries']()];for(let [,_0x403728]of _0x41d7fe)s(_0x403728[_0x293a67(0xa0)],_0x5342ac);for(let _0x1096f7 of _0x1c478c['values']())s(_0x1096f7,_0x5342ac);_0x6641b6[_0x293a67(0xac)]();let _0x2d04df=(await Promise[_0x293a67(0xb3)]([..._0x41d7fe[_0x293a67(0xa1)](async([_0xadde28,_0x49b9ab])=>await _0x12006c(_0xadde28,_0x49b9ab)),..._0xd60387]))[_0x293a67(0xa3)](_0x3450bc=>_0x3450bc[_0x293a67(0x98)]===_0x293a67(0xab));if(_0x2d04df?.[_0x293a67(0x98)]===_0x293a67(0xab))throw _0x2d04df[_0x293a67(0xc7)];}function _0x177521(_0x548bcf){try{_0x34279f['onEvent']?.(_0x548bcf);}catch{}}function _0x3a38ad(){if(_0xd1bc30)throw l();}function _0x298e16(_0x4f2cf2){const _0x125b33=_0xf3a111;for(let _0x2a00db of _0x4f2cf2)_0x140b18[_0x125b33(0xa4)](_0x2a00db[_0x125b33(0xa6)])[_0x125b33(0xcc)](_0x2a00db[_0x125b33(0x9a)],_0x2a00db[_0x125b33(0x9c)]);}async function _0x12006c(_0x29758b,_0x6e6455,_0x387d6c){const _0x5d1510=_0xf3a111;_0x6e6455[_0x5d1510(0xc6)]||(_0x6e6455[_0x5d1510(0xc6)]=!0x0,c(_0x6e6455),_0x387d6c&&_0x177521({'key':_0x29758b,'reason':_0x387d6c,'type':_0x5d1510(0x99)}),await _0x34279f[_0x5d1510(0xc9)]['destroy']({'instance':_0x6e6455['instance'],'key':_0x29758b}));}}function _0x5b0a(_0x4c05dc,_0x3e227e){_0x4c05dc=_0x4c05dc-0x8d;const _0x2bf60d=_0x2bf6();let _0x5b0a60=_0x2bf60d[_0x4c05dc];return _0x5b0a60;}function i(_0x2f4f54,_0x5d2e44){const _0x28f447=_0x5b0a;if(!Number['isFinite'](_0x2f4f54)||_0x2f4f54<0x0)throw new e(_0x28f447(0xbf),_0x28f447(0x95));if(!Number[_0x28f447(0xa2)](_0x5d2e44)||_0x5d2e44<=0x0)throw new e(_0x28f447(0xbf),_0x28f447(0xbe));}function a(_0x598615){const _0x2cf786=_0x5b0a;if(_0x598615[_0x2cf786(0x97)][_0x2cf786(0xb5)]===0x0)throw new e(_0x2cf786(0xbf),'key\x20must\x20not\x20be\x20empty');}function o(_0x3ad033,_0x61eecd){return new Promise((_0x4a3d78,_0x18b3ff)=>{const _0x3f6bc1=_0x5b0a;_0x61eecd[_0x3f6bc1(0xca)]({'input':_0x3ad033,'reject':_0x18b3ff,'resolve':_0x4a3d78});});}function s(_0x38a5ea,_0x3b84a6){const _0x4fa799=_0x5b0a;for(let _0x10e205 of _0x38a5ea[_0x4fa799(0x96)](0x0))_0x10e205[_0x4fa799(0x9c)](_0x3b84a6);}function c(_0x44c222){const _0x57f339=_0x5b0a;_0x44c222[_0x57f339(0xa5)]!==void 0x0&&(clearTimeout(_0x44c222[_0x57f339(0xa5)]),delete _0x44c222[_0x57f339(0xa5)]);}function l(){const _0x53b6eb=_0x5b0a;return new e(_0x53b6eb(0xaa),_0x53b6eb(0x91));}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.0.0-rc.0",
4
+ "version": "1.0.0",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",