@unotest/viewer 0.17.0 → 0.19.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 _0x23e6d6=_0x56a8;(function(_0x58f3ff,_0x1b70a0){const _0x2db3aa={_0x517407:0x80,_0x28caf0:0x82,_0x3c18af:0x85,_0x2f4547:0x87,_0x4dca8a:0x83},_0x34bad3=_0x56a8,_0x5a1d5d=_0x58f3ff();while(!![]){try{const _0x4352a8=parseInt(_0x34bad3(0x7e))/0x1*(-parseInt(_0x34bad3(0x7d))/0x2)+parseInt(_0x34bad3(_0x2db3aa._0x517407))/0x3+parseInt(_0x34bad3(0x77))/0x4*(-parseInt(_0x34bad3(0x8a))/0x5)+parseInt(_0x34bad3(_0x2db3aa._0x28caf0))/0x6*(-parseInt(_0x34bad3(_0x2db3aa._0x3c18af))/0x7)+parseInt(_0x34bad3(0x8b))/0x8+-parseInt(_0x34bad3(_0x2db3aa._0x2f4547))/0x9+parseInt(_0x34bad3(_0x2db3aa._0x4dca8a))/0xa;if(_0x4352a8===_0x1b70a0)break;else _0x5a1d5d['push'](_0x5a1d5d['shift']());}catch(_0x3f7fa8){_0x5a1d5d['push'](_0x5a1d5d['shift']());}}}(_0x2765,0x7fca6));function _0x56a8(_0x294de2,_0x10a63f){_0x294de2=_0x294de2-0x77;const _0x27655b=_0x2765();let _0x56a822=_0x27655b[_0x294de2];if(_0x56a8['OCDGAd']===undefined){var _0x5d3727=function(_0x8d8a5a){const _0x649a13='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x31e334='',_0x42733a='';for(let _0x45f273=0x0,_0x5d2047,_0x370f6f,_0x56b41f=0x0;_0x370f6f=_0x8d8a5a['charAt'](_0x56b41f++);~_0x370f6f&&(_0x5d2047=_0x45f273%0x4?_0x5d2047*0x40+_0x370f6f:_0x370f6f,_0x45f273++%0x4)?_0x31e334+=String['fromCharCode'](0xff&_0x5d2047>>(-0x2*_0x45f273&0x6)):0x0){_0x370f6f=_0x649a13['indexOf'](_0x370f6f);}for(let _0x20d5c7=0x0,_0x33501a=_0x31e334['length'];_0x20d5c7<_0x33501a;_0x20d5c7++){_0x42733a+='%'+('00'+_0x31e334['charCodeAt'](_0x20d5c7)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x42733a);};_0x56a8['HlhDBJ']=_0x5d3727,_0x56a8['yZZxuE']={},_0x56a8['OCDGAd']=!![];}const _0x3174ee=_0x27655b[0x0],_0x1ce93b=_0x294de2+_0x3174ee,_0x49ec9a=_0x56a8['yZZxuE'][_0x1ce93b];return!_0x49ec9a?(_0x56a822=_0x56a8['HlhDBJ'](_0x56a822),_0x56a8['yZZxuE'][_0x1ce93b]=_0x56a822):_0x56a822=_0x49ec9a,_0x56a822;}var __defProp=Object[_0x23e6d6(0x89)],__name=(_0x31e334,_0x42733a)=>__defProp(_0x31e334,'name',{'value':_0x42733a,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x23e6d6(0x79);function encodeViewerSession(_0x45f273){const _0x11d7d5={_0x240f1a:0x7b,_0x3f10fa:0x8c},_0x459d26=_0x23e6d6;return Buffer['from'](JSON['stringify'](_0x45f273),_0x459d26(_0x11d7d5._0x240f1a))[_0x459d26(0x86)](_0x459d26(_0x11d7d5._0x3f10fa));}__name(encodeViewerSession,_0x23e6d6(0x7c));function decodeViewerSession(_0x5d2047){const _0x3d5ceb={_0x25d26f:0x8c,_0x30d8ca:0x7b},_0x38b405=_0x23e6d6;if(_0x5d2047===void 0x0||_0x5d2047==='')return null;let _0x370f6f;try{_0x370f6f=JSON['parse'](Buffer[_0x38b405(0x7a)](_0x5d2047,_0x38b405(_0x3d5ceb._0x25d26f))[_0x38b405(0x86)](_0x38b405(_0x3d5ceb._0x30d8ca)));}catch{return null;}if(typeof _0x370f6f!==_0x38b405(0x84)||_0x370f6f===null)return null;const {capabilities:_0x56b41f,identity:_0x20d5c7}=_0x370f6f,_0x33501a=readCapabilities(_0x56b41f);if(_0x33501a===null)return null;return{'capabilities':_0x33501a,'identity':readIdentity(_0x20d5c7)};}__name(decodeViewerSession,_0x23e6d6(0x78));function readCapabilities(_0x512f83){const _0x1f5e15={_0x449987:0x84,_0x463ba2:0x7f},_0x14752e=_0x23e6d6;if(typeof _0x512f83!==_0x14752e(_0x1f5e15._0x449987)||_0x512f83===null)return null;const _0x20e4b0=_0x512f83,_0xebab5c=__name(_0x3c48b1=>_0x20e4b0[_0x3c48b1]===!![],'flag');return{'canRun':_0xebab5c(_0x14752e(_0x1f5e15._0x463ba2)),'canEditFiles':_0xebab5c(_0x14752e(0x88)),'canTerminal':_0xebab5c(_0x14752e(0x8e)),'canBrowseFs':_0xebab5c(_0x14752e(0x81))};}__name(readCapabilities,'readCapabilities');function readIdentity(_0x38064e){const _0x4463c8={_0x5841ad:0x84,_0x129b84:0x8f},_0xf87761=_0x23e6d6;if(typeof _0x38064e!==_0xf87761(_0x4463c8._0x5841ad)||_0x38064e===null)return null;const _0x480346=_0x38064e,{user:_0x27ad65,role:_0x76eb00}=_0x480346;if(typeof _0x27ad65!=='string'||typeof _0x76eb00!==_0xf87761(0x8d))return null;return{'user':_0x27ad65,'role':_0x76eb00,...typeof _0x480346['env']===_0xf87761(0x8d)?{'env':_0x480346['env']}:{},...typeof _0x480346[_0xf87761(0x8f)]===_0xf87761(0x8d)?{'logoutUrl':_0x480346[_0xf87761(_0x4463c8._0x129b84)]}:{}};}__name(readIdentity,'readIdentity');export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};function _0x2765(){const _0x36ec87=['nte2mJG1nNjht0zisG','yMfZzty0DxjS','C3rYAw5N','y2fUvgvYBwLUywW','Bg9NB3v0vxjS','nJG0qLrZCfDb','zgvJB2rLvMLLD2vYu2vZC2LVBG','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','zNjVBq','DxrMoa','zw5JB2rLvMLLD2vYu2vZC2LVBG','mKjxuvv4Eq','mZi2mdy1rMf5v1zy','y2fUuNvU','mZaYnJa4mNr5tKDtDW','y2fUqNjVD3nLrNm','nde0wNrSAM5N','mtGWntaYmhPVqxjzDG','B2jQzwn0','mtuWnZfeyKf3AMO','Dg9tDhjPBMC','mJq1mtm0oe9fwfHIyq','y2fUrwrPDezPBgvZ','zgvMAw5LuhjVCgvYDhK','mty0otv2q3rMsfu'];_0x2765=function(){return _0x36ec87;};return _0x2765();}
1
+ const _0x23cff9=_0x2627;(function(_0x2c1a97,_0x4ae410){const _0x4b7d2b={_0x598371:0x1f3,_0x390f7e:0x20d,_0x7ecbeb:0x1ff,_0x46ebaa:0x20c},_0x3a7106=_0x2627,_0x555ac5=_0x2c1a97();while(!![]){try{const _0x501c7e=-parseInt(_0x3a7106(0x208))/0x1+-parseInt(_0x3a7106(0x1f1))/0x2+parseInt(_0x3a7106(_0x4b7d2b._0x598371))/0x3+parseInt(_0x3a7106(0x203))/0x4+parseInt(_0x3a7106(0x205))/0x5*(-parseInt(_0x3a7106(_0x4b7d2b._0x390f7e))/0x6)+-parseInt(_0x3a7106(_0x4b7d2b._0x7ecbeb))/0x7*(parseInt(_0x3a7106(0x1f2))/0x8)+parseInt(_0x3a7106(_0x4b7d2b._0x46ebaa))/0x9;if(_0x501c7e===_0x4ae410)break;else _0x555ac5['push'](_0x555ac5['shift']());}catch(_0x472529){_0x555ac5['push'](_0x555ac5['shift']());}}}(_0x2cc6,0xa3ed2));var __defProp=Object[_0x23cff9(0x1f9)],__name=(_0x26e756,_0x1eeafc)=>__defProp(_0x26e756,_0x23cff9(0x1f4),{'value':_0x1eeafc,'configurable':!![]}),FULL_CAPABILITIES={'canRun':!![],'canEditFiles':!![],'canTerminal':!![],'canBrowseFs':!![]},STANDALONE_SESSION={'capabilities':FULL_CAPABILITIES,'identity':null},VIEWER_SESSION_HEADER=_0x23cff9(0x204);function encodeViewerSession(_0xd43048){const _0x537b0d={_0xd94fc:0x1f5,_0x1804f4:0x1fd},_0x478c01=_0x23cff9;return Buffer[_0x478c01(_0x537b0d._0xd94fc)](JSON['stringify'](_0xd43048),_0x478c01(0x202))['toString'](_0x478c01(_0x537b0d._0x1804f4));}function _0x2627(_0x23fac5,_0x478424){_0x23fac5=_0x23fac5-0x1f1;const _0x2cc6f2=_0x2cc6();let _0x2627f2=_0x2cc6f2[_0x23fac5];if(_0x2627['xlgCna']===undefined){var _0x29030f=function(_0x3569ea){const _0x25f0e3='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=';let _0x26e756='',_0x1eeafc='';for(let _0xd43048=0x0,_0x50643b,_0x3840b4,_0x5ba8e2=0x0;_0x3840b4=_0x3569ea['charAt'](_0x5ba8e2++);~_0x3840b4&&(_0x50643b=_0xd43048%0x4?_0x50643b*0x40+_0x3840b4:_0x3840b4,_0xd43048++%0x4)?_0x26e756+=String['fromCharCode'](0xff&_0x50643b>>(-0x2*_0xd43048&0x6)):0x0){_0x3840b4=_0x25f0e3['indexOf'](_0x3840b4);}for(let _0x412a61=0x0,_0x270fa6=_0x26e756['length'];_0x412a61<_0x270fa6;_0x412a61++){_0x1eeafc+='%'+('00'+_0x26e756['charCodeAt'](_0x412a61)['toString'](0x10))['slice'](-0x2);}return decodeURIComponent(_0x1eeafc);};_0x2627['wmuSIO']=_0x29030f,_0x2627['BFDMPP']={},_0x2627['xlgCna']=!![];}const _0x113b39=_0x2cc6f2[0x0],_0x2c10ee=_0x23fac5+_0x113b39,_0x18a91d=_0x2627['BFDMPP'][_0x2c10ee];return!_0x18a91d?(_0x2627f2=_0x2627['wmuSIO'](_0x2627f2),_0x2627['BFDMPP'][_0x2c10ee]=_0x2627f2):_0x2627f2=_0x18a91d,_0x2627f2;}__name(encodeViewerSession,_0x23cff9(0x1f6));function _0x2cc6(){const _0x3954b4=['C3rYAw5N','nZu0mdrOrwPWy1u','CMvHzenHCgfIAwXPDgLLCW','zMXHzW','DxrMoa','ndCWnJK2ngLpr3PXva','Ec11BM90zxn0lxzPzxDLCI1ZzxnZAw9U','ndm3odKWv3nTqKTk','y2fUqNjVD3nLrNm','y2fUuNvU','mZa1nJm5Ew50EKDM','B2jQzwn0','y2fUvgvYBwLUywW','Dg9tDhjPBMC','ndy3mde4muL3Ag55uW','mZzLzhPmsLm','mteYnJa4nMroCxzgDq','mZyWrNLpqKDx','mJu2nda0nKTXy1bUuG','BMfTzq','zNjVBq','zw5JB2rLvMLLD2vYu2vZC2LVBG','CgfYC2u','zw52','zgvMAw5LuhjVCgvYDhK','Bg9NB3v0vxjS','zgvJB2rLvMLLD2vYu2vZC2LVBG','y2fUrwrPDezPBgvZ','yMfZzty0DxjS'];_0x2cc6=function(){return _0x3954b4;};return _0x2cc6();}function decodeViewerSession(_0x50643b){const _0x32e473={_0x19fac1:0x1f7,_0x1a4e97:0x1fd,_0x1386fc:0x202},_0x152ec1=_0x23cff9;if(_0x50643b===void 0x0||_0x50643b==='')return null;let _0x3840b4;try{_0x3840b4=JSON[_0x152ec1(_0x32e473._0x19fac1)](Buffer['from'](_0x50643b,_0x152ec1(_0x32e473._0x1a4e97))[_0x152ec1(0x20b)](_0x152ec1(_0x32e473._0x1386fc)));}catch{return null;}if(typeof _0x3840b4!=='object'||_0x3840b4===null)return null;const {capabilities:_0x5ba8e2,identity:_0x412a61}=_0x3840b4,_0x270fa6=readCapabilities(_0x5ba8e2);if(_0x270fa6===null)return null;return{'capabilities':_0x270fa6,'identity':readIdentity(_0x412a61)};}__name(decodeViewerSession,_0x23cff9(0x1fb));function readCapabilities(_0x33abfb){const _0x118453={_0x43a661:0x201,_0x49732a:0x207,_0x7d733:0x1fc,_0x48afa5:0x206},_0x5d2060=_0x23cff9;if(typeof _0x33abfb!==_0x5d2060(0x209)||_0x33abfb===null)return null;const _0x5e94d1=_0x33abfb,_0x203125=__name(_0x50db0a=>_0x5e94d1[_0x50db0a]===!![],_0x5d2060(_0x118453._0x43a661));return{'canRun':_0x203125(_0x5d2060(_0x118453._0x49732a)),'canEditFiles':_0x203125(_0x5d2060(_0x118453._0x7d733)),'canTerminal':_0x203125(_0x5d2060(0x20a)),'canBrowseFs':_0x203125(_0x5d2060(_0x118453._0x48afa5))};}__name(readCapabilities,_0x23cff9(0x200));function readIdentity(_0x55071b){const _0x3b6584={_0xde73e2:0x1f8,_0x5ba58c:0x1fa},_0x5e0c5f=_0x23cff9;if(typeof _0x55071b!=='object'||_0x55071b===null)return null;const _0x580d7f=_0x55071b,{user:_0x3c5fed,role:_0x153ad9}=_0x580d7f;if(typeof _0x3c5fed!==_0x5e0c5f(0x1fe)||typeof _0x153ad9!==_0x5e0c5f(0x1fe))return null;return{'user':_0x3c5fed,'role':_0x153ad9,...typeof _0x580d7f[_0x5e0c5f(_0x3b6584._0xde73e2)]===_0x5e0c5f(0x1fe)?{'env':_0x580d7f['env']}:{},...typeof _0x580d7f['logoutUrl']===_0x5e0c5f(0x1fe)?{'logoutUrl':_0x580d7f[_0x5e0c5f(_0x3b6584._0x5ba58c)]}:{}};}__name(readIdentity,'readIdentity');export{FULL_CAPABILITIES,STANDALONE_SESSION,VIEWER_SESSION_HEADER,decodeViewerSession,encodeViewerSession};