@unotest/viewer 0.20.0 → 0.22.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.
@@ -1 +1 @@
1
- const _0x290d37=_0x2277;(function(_0x41aebc,_0x4ca85f){const _0x4ba4d2={_0x45cb6a:0x17b,_0x25d29a:0x177,_0x427ba2:0x183,_0x5d5fa5:0x173},_0x29bca8=_0x2277,_0x3fb7da=_0x41aebc();while(!![]){try{const _0xb82afe=parseInt(_0x29bca8(0x187))/0x1+parseInt(_0x29bca8(0x172))/0x2+-parseInt(_0x29bca8(_0x4ba4d2._0x45cb6a))/0x3+-parseInt(_0x29bca8(0x184))/0x4+parseInt(_0x29bca8(_0x4ba4d2._0x25d29a))/0x5*(parseInt(_0x29bca8(_0x4ba4d2._0x427ba2))/0x6)+-parseInt(_0x29bca8(0x186))/0x7+-parseInt(_0x29bca8(_0x4ba4d2._0x5d5fa5))/0x8;if(_0xb82afe===_0x4ca85f)break;else _0x3fb7da['push'](_0x3fb7da['shift']());}catch(_0x7ca8b6){_0x3fb7da['push'](_0x3fb7da['shift']());}}}(_0x3c75,0xb662a));var __defProp=Object[_0x290d37(0x18a)],__name=(_0x2b9c62,_0x284141)=>__defProp(_0x2b9c62,'name',{'value':_0x284141,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x290d37(0x17d);function encodeViewerSession(_0x35201e){const _0x2bd2f6={_0x550db7:0x179,_0x2e4028:0x17f,_0x59a70a:0x182},_0x345857=_0x290d37;return Buffer[_0x345857(_0x2bd2f6._0x550db7)](JSON[_0x345857(0x174)](_0x35201e),_0x345857(_0x2bd2f6._0x2e4028))['toString'](_0x345857(_0x2bd2f6._0x59a70a));}function _0x3c75(){const _0x2e74cd=['mtqZotiXnLjbDNzxAW','y2fUuNvU','y2fUrwrPDezPBgvZ','zgvMAw5LuhjVCgvYDhK','y2fUqNjVD3nLrNm','Bg9NB3v0vxjS','mJGXmJy2nKvvsMXLDG','mtC4ndC1mtjjsKfdquq','C3rYAw5NAwz5','y2fUvgvYBwLUywW','zw52','ntuWndq1q1r2Bwjt','CMvHzenHCgfIAwXPDgLLCW','zNjVBq','B2jQzwn0','mJC5mZm1nhnHzMLSuG','CMvHzeLKzw50Axr5','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','C3rYAw5N','DxrMoa','zw5JB2rLvMLLD2vYu2vZC2LVBG','CgfYC2u','yMfZzty0DxjS','nZjishDlBg0','nty0mZCYueLjEhz4','zMXHzW','ode0ote5t25Iy21y'];_0x3c75=function(){return _0x2e74cd;};return _0x3c75();}__name(encodeViewerSession,_0x290d37(0x180));function decodeViewerSession(_0x2a254a){const _0x53579f={_0x5cdc78:0x181,_0x40db3b:0x182,_0x2ffbb6:0x17a},_0x8ab928=_0x290d37;if(_0x2a254a===void 0x0||_0x2a254a==='')return null;let _0x4ba04b;try{_0x4ba04b=JSON[_0x8ab928(_0x53579f._0x5cdc78)](Buffer[_0x8ab928(0x179)](_0x2a254a,_0x8ab928(_0x53579f._0x40db3b))['toString']('utf8'));}catch{return null;}if(typeof _0x4ba04b!==_0x8ab928(_0x53579f._0x2ffbb6)||_0x4ba04b===null)return null;const {capabilities:_0x50a5a,identity:_0x466644}=_0x4ba04b,_0x1304aa=readCapabilities(_0x50a5a);if(_0x1304aa===null)return null;return{'capabilities':_0x1304aa,'identity':readIdentity(_0x466644)};}__name(decodeViewerSession,'decodeViewerSession');function readCapabilities(_0x5b91eb){const _0x4b487d={_0x55d3b1:0x185,_0x2c2662:0x189,_0x17061b:0x18b},_0x55c37b=_0x290d37;if(typeof _0x5b91eb!==_0x55c37b(0x17a)||_0x5b91eb===null)return null;const _0xee680e=_0x5b91eb,_0x45d29a=__name(_0xc33e1c=>_0xee680e[_0xc33e1c]===!![],_0x55c37b(_0x4b487d._0x55d3b1));return{'canRun':_0x45d29a(_0x55c37b(0x188)),'canEditFiles':_0x45d29a(_0x55c37b(_0x4b487d._0x2c2662)),'canTerminal':_0x45d29a(_0x55c37b(0x175)),'canBrowseFs':_0x45d29a(_0x55c37b(_0x4b487d._0x17061b))};}__name(readCapabilities,_0x290d37(0x178));function readIdentity(_0x37b438){const _0x53345d={_0x6d46a:0x17a,_0x5b9eef:0x17e,_0x1a98c1:0x18c},_0x520af0=_0x290d37;if(typeof _0x37b438!==_0x520af0(_0x53345d._0x6d46a)||_0x37b438===null)return null;const _0x5d7ed6=_0x37b438,{user:_0x5afaf9,role:_0x93093a}=_0x5d7ed6;if(typeof _0x5afaf9!==_0x520af0(0x17e)||typeof _0x93093a!==_0x520af0(0x17e))return null;return{'user':_0x5afaf9,'role':_0x93093a,...typeof _0x5d7ed6[_0x520af0(0x176)]===_0x520af0(_0x53345d._0x5b9eef)?{'env':_0x5d7ed6[_0x520af0(0x176)]}:{},...typeof _0x5d7ed6[_0x520af0(_0x53345d._0x1a98c1)]===_0x520af0(0x17e)?{'logoutUrl':_0x5d7ed6[_0x520af0(_0x53345d._0x1a98c1)]}:{}};}function _0x2277(_0x5e5bfb,_0x301358){_0x5e5bfb=_0x5e5bfb-0x172;const _0x3c75bc=_0x3c75();let _0x227704=_0x3c75bc[_0x5e5bfb];if(_0x2277['pbzNID']===undefined){var _0x458ed2=function(_0x8b5b0b){const _0x22899a='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x2b9c62='',_0x284141='';for(let _0x35201e=0x0,_0x2a254a,_0x4ba04b,_0x50a5a=0x0;_0x4ba04b=_0x8b5b0b['charAt'](_0x50a5a++);~_0x4ba04b&&(_0x2a254a=_0x35201e%0x4?_0x2a254a*0x40+_0x4ba04b:_0x4ba04b,_0x35201e++%0x4)?_0x2b9c62+=String['fromCharCode'](0xff&_0x2a254a>>(-0x2*_0x35201e&0x6)):0x0){_0x4ba04b=_0x22899a['indexOf'](_0x4ba04b);}for(let _0x466644=0x0,_0x1304aa=_0x2b9c62['length'];_0x466644<_0x1304aa;_0x466644++){_0x284141+='%'+('00'+_0x2b9c62['charCodeAt'](_0x466644)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x284141);};_0x2277['zovCRm']=_0x458ed2,_0x2277['FInrQj']={},_0x2277['pbzNID']=!![];}const _0x2cafe6=_0x3c75bc[0x0],_0x3cbdb6=_0x5e5bfb+_0x2cafe6,_0x348191=_0x2277['FInrQj'][_0x3cbdb6];return!_0x348191?(_0x227704=_0x2277['zovCRm'](_0x227704),_0x2277['FInrQj'][_0x3cbdb6]=_0x227704):_0x227704=_0x348191,_0x227704;}__name(readIdentity,_0x290d37(0x17c));export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};
1
+ const _0x3891bf=_0x50fd;function _0x5b5d(){const _0x382c95=['B2jQzwn0','mtK3nJG2mMnJs0L2BG','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','CMvHzenHCgfIAwXPDgLLCW','mJu3nZy0mgv6BxHWsa','odaZEgzdCuX4','ntGWmtfqBKT3wuu','CMvHzeLKzw50Axr5','C3rYAw5N','zw5JB2rLvMLLD2vYu2vZC2LVBG','zNjVBq','ntzxDxDdDK0','DxrMoa','y2fUuNvU','mJKWmdq1CKz4yxHO','C3rYAw5NAwz5','mtu5ngLLCvz2yW','Bg9NB3v0vxjS','nvbdweTTwG','zgvJB2rLvMLLD2vYu2vZC2LVBG','mJC3mfnNsNrKCq','y2fUrwrPDezPBgvZ','CgfYC2u','nZaWmLznDLv4DW','Dg9tDhjPBMC','BMfTzq','ndj2ELL4zvC','zMXHzW','mJKWnZzdt1ftuhC','y2fUvgvYBwLUywW','odrwBu5VELG','mta3ufH3BLPw','yMfZzty0DxjS','zw52'];_0x5b5d=function(){return _0x382c95;};return _0x5b5d();}(function(_0x1fac3a,_0x1e235e){const _0x45e32e={_0x4f8f80:0xea,_0x279d81:0xfd,_0x2b4c77:0xe9,_0x1594b7:0xfb,_0x40d0f0:0xf8,_0x3919b5:0x104,_0x2407f7:0x101,_0x29d62c:0xf2},_0x1d9da3=_0x50fd,_0x53d1b1=_0x1fac3a();while(!![]){try{const _0x2da88d=parseInt(_0x1d9da3(_0x45e32e._0x4f8f80))/0x1*(-parseInt(_0x1d9da3(_0x45e32e._0x279d81))/0x2)+-parseInt(_0x1d9da3(0xf3))/0x3*(-parseInt(_0x1d9da3(_0x45e32e._0x2b4c77))/0x4)+parseInt(_0x1d9da3(0xff))/0x5*(-parseInt(_0x1d9da3(0xee))/0x6)+-parseInt(_0x1d9da3(_0x45e32e._0x1594b7))/0x7*(parseInt(_0x1d9da3(_0x45e32e._0x40d0f0))/0x8)+parseInt(_0x1d9da3(_0x45e32e._0x3919b5))/0x9*(-parseInt(_0x1d9da3(_0x45e32e._0x2407f7))/0xa)+parseInt(_0x1d9da3(_0x45e32e._0x29d62c))/0xb*(parseInt(_0x1d9da3(0xe7))/0xc)+-parseInt(_0x1d9da3(0xf1))/0xd*(-parseInt(_0x1d9da3(0xe5))/0xe);if(_0x2da88d===_0x1e235e)break;else _0x53d1b1['push'](_0x53d1b1['shift']());}catch(_0x499c2b){_0x53d1b1['push'](_0x53d1b1['shift']());}}}(_0x5b5d,0x3edd1));var __defProp=Object['defineProperty'],__name=(_0xf654a2,_0xdb69c2)=>__defProp(_0xf654a2,_0x3891bf(0xe4),{'value':_0xdb69c2,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x3891bf(0xef);function encodeViewerSession(_0x36da37){const _0x5a2769={_0x23509d:0x105},_0x72455f=_0x3891bf;return Buffer[_0x72455f(0xf7)](JSON[_0x72455f(0xfc)](_0x36da37),_0x72455f(0xf9))[_0x72455f(_0x5a2769._0x23509d)](_0x72455f(0xeb));}__name(encodeViewerSession,_0x3891bf(0xf6));function decodeViewerSession(_0x2f122e){const _0x23ea2d={_0x47b667:0x103,_0x3eda89:0xeb,_0x5eaf18:0xed},_0x14e892=_0x3891bf;if(_0x2f122e===void 0x0||_0x2f122e==='')return null;let _0x5415cd;try{_0x5415cd=JSON[_0x14e892(_0x23ea2d._0x47b667)](Buffer[_0x14e892(0xf7)](_0x2f122e,_0x14e892(_0x23ea2d._0x3eda89))['toString']('utf8'));}catch{return null;}if(typeof _0x5415cd!==_0x14e892(_0x23ea2d._0x5eaf18)||_0x5415cd===null)return null;const {capabilities:_0x368d34,identity:_0x496825}=_0x5415cd,_0x113808=readCapabilities(_0x368d34);if(_0x113808===null)return null;return{'capabilities':_0x113808,'identity':readIdentity(_0x496825)};}__name(decodeViewerSession,_0x3891bf(0x100));function readCapabilities(_0x35ebdc){const _0x3fa755={_0x1acdf5:0xed,_0x2574be:0xe6,_0x1e649e:0xe8},_0x1fa116=_0x3891bf;if(typeof _0x35ebdc!==_0x1fa116(_0x3fa755._0x1acdf5)||_0x35ebdc===null)return null;const _0xc0afc4=_0x35ebdc,_0x197b44=__name(_0x2b28e1=>_0xc0afc4[_0x2b28e1]===!![],_0x1fa116(_0x3fa755._0x2574be));return{'canRun':_0x197b44(_0x1fa116(0xfa)),'canEditFiles':_0x197b44(_0x1fa116(0x102)),'canTerminal':_0x197b44(_0x1fa116(_0x3fa755._0x1e649e)),'canBrowseFs':_0x197b44('canBrowseFs')};}__name(readCapabilities,_0x3891bf(0xf0));function readIdentity(_0x187941){const _0x49b911={_0x34fde1:0xf5,_0x30024f:0xfe},_0x14eb9e=_0x3891bf;if(typeof _0x187941!==_0x14eb9e(0xed)||_0x187941===null)return null;const _0x4d6f25=_0x187941,{user:_0x1c333e,role:_0xc15268}=_0x4d6f25;if(typeof _0x1c333e!==_0x14eb9e(0xf5)||typeof _0xc15268!==_0x14eb9e(_0x49b911._0x34fde1))return null;return{'user':_0x1c333e,'role':_0xc15268,...typeof _0x4d6f25[_0x14eb9e(0xec)]===_0x14eb9e(0xf5)?{'env':_0x4d6f25['env']}:{},...typeof _0x4d6f25[_0x14eb9e(_0x49b911._0x30024f)]===_0x14eb9e(0xf5)?{'logoutUrl':_0x4d6f25['logoutUrl']}:{}};}__name(readIdentity,_0x3891bf(0xf4));function _0x50fd(_0xf0cc1b,_0x573410){_0xf0cc1b=_0xf0cc1b-0xe4;const _0x5b5dba=_0x5b5d();let _0x50fd97=_0x5b5dba[_0xf0cc1b];if(_0x50fd['vkCqoV']===undefined){var _0x96c9f8=function(_0xb457c2){const _0x570c84='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0xf654a2='',_0xdb69c2='';for(let _0x36da37=0x0,_0x2f122e,_0x5415cd,_0x368d34=0x0;_0x5415cd=_0xb457c2['charAt'](_0x368d34++);~_0x5415cd&&(_0x2f122e=_0x36da37%0x4?_0x2f122e*0x40+_0x5415cd:_0x5415cd,_0x36da37++%0x4)?_0xf654a2+=String['fromCharCode'](0xff&_0x2f122e>>(-0x2*_0x36da37&0x6)):0x0){_0x5415cd=_0x570c84['indexOf'](_0x5415cd);}for(let _0x496825=0x0,_0x113808=_0xf654a2['length'];_0x496825<_0x113808;_0x496825++){_0xdb69c2+='%'+('00'+_0xf654a2['charCodeAt'](_0x496825)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0xdb69c2);};_0x50fd['PTNtZX']=_0x96c9f8,_0x50fd['VkzGhS']={},_0x50fd['vkCqoV']=!![];}const _0x45b460=_0x5b5dba[0x0],_0x2839bd=_0xf0cc1b+_0x45b460,_0x4f8669=_0x50fd['VkzGhS'][_0x2839bd];return!_0x4f8669?(_0x50fd97=_0x50fd['PTNtZX'](_0x50fd97),_0x50fd['VkzGhS'][_0x2839bd]=_0x50fd97):_0x50fd97=_0x4f8669,_0x50fd97;}export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};