@tangle-network/sandbox 0.1.1 → 0.2.1

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,2 +1,2 @@
1
- import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-BuS8nl3b.js";
1
+ import { _ as CollaborationTransportConfig, a as CollaborationClient, c as CollaborationClientConfig, d as CollaborationDocumentRef, f as CollaborationFileBridgeOptions, g as CollaborationTokenRefreshResponse, h as CollaborationTokenRefreshRequest, i as parseCollaborationDocumentId, l as CollaborationDocumentAdapter, m as CollaborationPermissions, n as buildCollaborationDocumentId, o as CollaborationBootstrapRequest, p as CollaborationFileEvent, r as normalizeCollaborationPath, s as CollaborationBootstrapResponse, t as CollaborationFileBridge, u as CollaborationDocumentChange, v as SaveCollaborationSnapshotRequest, y as SaveCollaborationSnapshotResponse } from "../index-CCsA3S0D.js";
2
2
  export { CollaborationBootstrapRequest, CollaborationBootstrapResponse, CollaborationClient, CollaborationClientConfig, CollaborationDocumentAdapter, CollaborationDocumentChange, CollaborationDocumentRef, CollaborationFileBridge, CollaborationFileBridgeOptions, CollaborationFileEvent, CollaborationPermissions, CollaborationTokenRefreshRequest, CollaborationTokenRefreshResponse, CollaborationTransportConfig, SaveCollaborationSnapshotRequest, SaveCollaborationSnapshotResponse, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -1 +1,2 @@
1
- (function(_0x55f71c,_0x3a569a){var _0x1aa43a=a0_0x3024,_0x1924cc=_0x55f71c();while(!![]){try{var _0x3be371=-parseInt(_0x1aa43a(0x185))/0x1*(parseInt(_0x1aa43a(0x187))/0x2)+-parseInt(_0x1aa43a(0x1aa))/0x3*(parseInt(_0x1aa43a(0x1ab))/0x4)+-parseInt(_0x1aa43a(0x190))/0x5*(-parseInt(_0x1aa43a(0x1a1))/0x6)+-parseInt(_0x1aa43a(0x1a3))/0x7*(parseInt(_0x1aa43a(0x1a5))/0x8)+-parseInt(_0x1aa43a(0x194))/0x9+-parseInt(_0x1aa43a(0x1a8))/0xa*(parseInt(_0x1aa43a(0x186))/0xb)+-parseInt(_0x1aa43a(0x1af))/0xc*(-parseInt(_0x1aa43a(0x17d))/0xd);if(_0x3be371===_0x3a569a)break;else _0x1924cc['push'](_0x1924cc['shift']());}catch(_0x49659f){_0x1924cc['push'](_0x1924cc['shift']());}}}(a0_0x51d1,0x428e5));function a0_0x5764(_0x5a9e84,_0x25dd3a){var _0x334905=a0_0x3024,_0x3e0926={'\x44\x6c\x70\x69\x45':_0x334905(0x182),'\x57\x53\x52\x5a\x62':function(_0x51b50f,_0x1a5390){return _0x51b50f%_0x1a5390;},'\x71\x79\x77\x56\x4b':function(_0x2d28d5,_0x40a07e){return _0x2d28d5&_0x40a07e;},'\x75\x57\x52\x48\x75':_0x334905(0x19e),'\x74\x50\x68\x63\x56':_0x334905(0x17f)},_0xbd1a72='\x34\x7c\x31\x7c\x33\x7c\x35\x7c\x36\x7c\x32\x7c\x30'['\x73\x70\x6c\x69\x74']('\x7c'),_0xd2b32c=0x0;while(!![]){switch(_0xbd1a72[_0xd2b32c++]){case'\x30':return!_0x6f6429?(_0x7dba4f=a0_0x5764['\x59\x50\x46\x4a\x66\x57'](_0x7dba4f),a0_0x5764[_0x3e0926[_0x334905(0x199)]][_0x45d05a]=_0x7dba4f):_0x7dba4f=_0x6f6429,_0x7dba4f;case'\x31':_0x5a9e84=_0x5a9e84-0x116;continue;case'\x32':var _0x43b66c=_0xb0f50[0x0],_0x45d05a=_0x5a9e84+_0x43b66c,_0x6f6429=a0_0x5764[_0x3e0926[_0x334905(0x199)]][_0x45d05a];continue;case'\x33':var _0xb0f50=a0_0x4615();continue;case'\x34':var _0x2a4a6e={'\x45\x4c\x4a\x66\x67':'\x63\x68\x61\x72\x41\x74','\x55\x48\x6a\x45\x44':function(_0x5c272a,_0x4871af){return _0x5c272a+_0x4871af;},'\x5a\x4b\x4f\x71\x75':function(_0x32bd6c,_0x4863f9){return _0x32bd6c*_0x4863f9;},'\x51\x55\x58\x55\x74':function(_0x559784,_0xd002c){return _0x3e0926['\x57\x53\x52\x5a\x62'](_0x559784,_0xd002c);},'\x6b\x63\x51\x6a\x56':function(_0x578e75,_0x5eeafb){var _0x4147bc=_0x334905;return _0x3e0926[_0x4147bc(0x18e)](_0x578e75,_0x5eeafb);},'\x72\x43\x42\x6e\x61':'\x6c\x65\x6e\x67\x74\x68','\x4f\x78\x46\x55\x54':function(_0x24f32f,_0x1d9b49){return _0x24f32f<_0x1d9b49;},'\x58\x7a\x4d\x4f\x44':_0x3e0926[_0x334905(0x1a6)],'\x62\x6f\x66\x4a\x6d':function(_0x19f12e,_0x3e9df0){return _0x19f12e(_0x3e9df0);}};continue;case'\x35':var _0x7dba4f=_0xb0f50[_0x5a9e84];continue;case'\x36':if(a0_0x5764['\x5a\x54\x6b\x58\x74\x57']===undefined){var _0x14989c=function(_0x1f9f0d){var _0x11cffc=_0x334905,_0x10a076=_0x11cffc(0x18c),_0x2fd18e='',_0x227722='';for(var _0x4fffed=0x0,_0x4c63c3,_0x63eee9,_0x209b2d=0x0;_0x63eee9=_0x1f9f0d[_0x2a4a6e['\x45\x4c\x4a\x66\x67']](_0x209b2d++);~_0x63eee9&&(_0x4c63c3=_0x4fffed%0x4?_0x2a4a6e['\x55\x48\x6a\x45\x44'](_0x2a4a6e['\x5a\x4b\x4f\x71\x75'](_0x4c63c3,0x40),_0x63eee9):_0x63eee9,_0x2a4a6e['\x51\x55\x58\x55\x74'](_0x4fffed++,0x4))?_0x2fd18e+=String[_0x11cffc(0x193)](0xff&_0x4c63c3>>_0x2a4a6e[_0x11cffc(0x191)](-0x2*_0x4fffed,0x6)):0x0){_0x63eee9=_0x10a076['\x69\x6e\x64\x65\x78\x4f\x66'](_0x63eee9);}for(var _0x2acf67=0x0,_0x172ff7=_0x2fd18e[_0x2a4a6e[_0x11cffc(0x188)]];_0x2a4a6e[_0x11cffc(0x1ae)](_0x2acf67,_0x172ff7);_0x2acf67++){_0x227722+=_0x2a4a6e[_0x11cffc(0x189)]('\x25',('\x30\x30'+_0x2fd18e[_0x2a4a6e[_0x11cffc(0x184)]](_0x2acf67)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))[_0x11cffc(0x18b)](-0x2));}return _0x2a4a6e[_0x11cffc(0x1a0)](decodeURIComponent,_0x227722);};a0_0x5764[_0x334905(0x1a4)]=_0x14989c,a0_0x5764[_0x334905(0x182)]={},a0_0x5764[_0x3e0926['\x74\x50\x68\x63\x56']]=!![];}continue;}break;}}(function(_0x8dda3c,_0x251641){var _0x396bf6=a0_0x3024,_0x1053fa={'\x79\x76\x4b\x6b\x44':function(_0x19959b){return _0x19959b();},'\x6e\x77\x67\x4b\x49':function(_0xf370fe,_0x495755){return _0xf370fe+_0x495755;},'\x56\x56\x65\x4a\x43':function(_0x1bf298,_0x102d0a){return _0x1bf298*_0x102d0a;},'\x76\x72\x56\x64\x73':function(_0x23ead1,_0x5b66e5){return _0x23ead1(_0x5b66e5);},'\x70\x77\x68\x4e\x59':function(_0x30602d,_0x45bff9){return _0x30602d*_0x45bff9;},'\x72\x78\x4a\x48\x74':function(_0x129855,_0xf84943){return _0x129855/_0xf84943;},'\x47\x4d\x42\x6a\x69':function(_0x2300e2,_0x214b50){return _0x2300e2(_0x214b50);},'\x7a\x68\x4a\x55\x4c':function(_0xbcbe8,_0x1e0d85){return _0xbcbe8/_0x1e0d85;},'\x79\x6e\x66\x51\x78':function(_0x221f97,_0x2bb43c){return _0x221f97/_0x2bb43c;},'\x4b\x4f\x59\x51\x75':_0x396bf6(0x1b0)},_0x22c891=a0_0x5764,_0x6fd393=_0x1053fa[_0x396bf6(0x1a7)](_0x8dda3c);while(!![]){try{var _0x224ded=_0x1053fa[_0x396bf6(0x180)](-parseInt(_0x22c891(0x117))/0x1,_0x1053fa[_0x396bf6(0x1a2)](parseInt(_0x22c891(0x11c))/0x2,-parseInt(_0x22c891(0x116))/0x3))+_0x1053fa[_0x396bf6(0x19b)](parseInt,_0x22c891(0x11f))/0x4+_0x1053fa['\x70\x77\x68\x4e\x59'](_0x1053fa[_0x396bf6(0x18f)](parseInt(_0x1053fa[_0x396bf6(0x19d)](_0x22c891,0x11a)),0x5),-parseInt(_0x22c891(0x119))/0x6)+_0x1053fa[_0x396bf6(0x18f)](-parseInt(_0x22c891(0x118)),0x7)+_0x1053fa[_0x396bf6(0x19c)](-_0x1053fa[_0x396bf6(0x19d)](parseInt,_0x22c891(0x11e)),0x8)+_0x1053fa[_0x396bf6(0x19c)](parseInt(_0x22c891(0x11b)),0x9)*_0x1053fa[_0x396bf6(0x19f)](parseInt(_0x22c891(0x11d)),0xa);if(_0x224ded===_0x251641)break;else _0x6fd393[_0x1053fa[_0x396bf6(0x18a)]](_0x6fd393[_0x396bf6(0x192)]());}catch(_0x5dc955){_0x6fd393[_0x1053fa[_0x396bf6(0x18a)]](_0x6fd393[_0x396bf6(0x192)]());}}}(a0_0x4615,0x9200b));import{a as a0_0x2c3732,i as a0_0x127389,n as a0_0xc382ee,r as a0_0x3a0735,t as a0_0x37e17f}from'\x2e\x2e\x2f\x63\x6f\x6c\x6c\x61\x62\x6f\x72\x61\x74\x69\x6f\x6e\x2d\x43\x56\x76\x68\x50\x55\x38\x4d\x2e\x6a\x73';function a0_0x3024(_0x1c274c,_0xf11580){_0x1c274c=_0x1c274c-0x17d;var _0x51d1de=a0_0x51d1();var _0x3024e8=_0x51d1de[_0x1c274c];if(a0_0x3024['\x65\x6c\x6e\x76\x4b\x6d']===undefined){var _0x2654d1=function(_0x247f73){var _0x11dabe='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';var _0x3c93cf='',_0xb454a9='';for(var _0x4b74d1=0x0,_0x546b64,_0x13db9d,_0x4a7d88=0x0;_0x13db9d=_0x247f73['\x63\x68\x61\x72\x41\x74'](_0x4a7d88++);~_0x13db9d&&(_0x546b64=_0x4b74d1%0x4?_0x546b64*0x40+_0x13db9d:_0x13db9d,_0x4b74d1++%0x4)?_0x3c93cf+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x546b64>>(-0x2*_0x4b74d1&0x6)):0x0){_0x13db9d=_0x11dabe['\x69\x6e\x64\x65\x78\x4f\x66'](_0x13db9d);}for(var _0x454715=0x0,_0x2ec8a8=_0x3c93cf['\x6c\x65\x6e\x67\x74\x68'];_0x454715<_0x2ec8a8;_0x454715++){_0xb454a9+='\x25'+('\x30\x30'+_0x3c93cf['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x454715)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0xb454a9);};a0_0x3024['\x6d\x48\x65\x4c\x52\x56']=_0x2654d1,a0_0x3024['\x7a\x6a\x45\x68\x66\x42']={},a0_0x3024['\x65\x6c\x6e\x76\x4b\x6d']=!![];}var _0x1c84b2=_0x51d1de[0x0],_0x248b25=_0x1c274c+_0x1c84b2,_0x5d23cc=a0_0x3024['\x7a\x6a\x45\x68\x66\x42'][_0x248b25];return!_0x5d23cc?(_0x3024e8=a0_0x3024['\x6d\x48\x65\x4c\x52\x56'](_0x3024e8),a0_0x3024['\x7a\x6a\x45\x68\x66\x42'][_0x248b25]=_0x3024e8):_0x3024e8=_0x5d23cc,_0x3024e8;}function a0_0x51d1(){var _0x57ec50=['\x43\x78\x4c\x33\x76\x4b\x53','\x43\x4e\x48\x6b\x73\x68\x71','\x6e\x75\x6a\x71\x76\x75\x7a\x4f\x42\x57','\x41\x32\x6e\x72\x41\x4c\x79','\x43\x32\x48\x50\x7a\x4e\x71','\x7a\x4e\x6a\x56\x42\x75\x6e\x4f\x79\x78\x6a\x64\x42\x32\x72\x4c','\x6e\x64\x47\x58\x6f\x64\x69\x30\x6d\x67\x72\x6d\x43\x30\x66\x7a\x73\x57','\x42\x4b\x50\x6c\x6d\x32\x35\x4b\x71\x5a\x76\x59\x7a\x75\x48\x51\x43\x4e\x76\x75\x41\x61','\x42\x4b\x54\x4d\x45\x4b\x65\x59\x72\x65\x50\x31\x79\x71','\x76\x32\x48\x6b\x41\x32\x65','\x45\x77\x7a\x4d\x45\x65\x34','\x72\x67\x58\x57\x41\x75\x75','\x42\x78\x72\x4c\x77\x4d\x39\x30\x45\x74\x6e\x54\x7a\x65\x58\x53\x44\x65\x54\x32\x73\x68\x72\x4f\x74\x57','\x44\x4e\x6a\x77\x7a\x68\x6d','\x45\x4d\x48\x6b\x76\x75\x57','\x72\x30\x31\x63\x41\x4d\x4b','\x79\x32\x48\x48\x43\x4b\x6e\x56\x7a\x67\x76\x62\x44\x61','\x45\x77\x35\x4d\x75\x78\x47','\x79\x4d\x39\x4d\x73\x4d\x30','\x6d\x74\x4b\x57\x6d\x74\x6d\x30\x73\x68\x4c\x4b\x43\x77\x6a\x76','\x76\x4c\x7a\x4c\x73\x4b\x6d','\x6e\x33\x6e\x57\x75\x33\x7a\x77\x71\x71','\x77\x76\x62\x67\x73\x4d\x7a\x78','\x6d\x5a\x71\x58\x6d\x74\x61\x5a\x6d\x4c\x48\x4f\x44\x4c\x6e\x36\x44\x47','\x44\x76\x44\x73\x73\x68\x75','\x45\x78\x7a\x6c\x41\x30\x71','\x6d\x74\x61\x57\x41\x77\x58\x58\x45\x68\x72\x33','\x42\x4b\x50\x35\x77\x77\x39\x4b\x72\x31\x44\x55\x41\x68\x7a\x6f\x72\x64\x66\x69\x7a\x78\x72\x58','\x6d\x74\x71\x30\x73\x78\x6e\x33\x77\x65\x44\x31','\x6d\x74\x69\x30\x6d\x74\x7a\x72\x76\x30\x7a\x79\x7a\x78\x43','\x42\x74\x69\x31\x73\x33\x6e\x6c\x7a\x4d\x7a\x36\x79\x71','\x41\x67\x44\x32\x43\x66\x79','\x74\x33\x48\x67\x76\x76\x71','\x6d\x5a\x7a\x33\x75\x31\x50\x73\x72\x32\x71','\x43\x68\x76\x5a\x41\x61','\x6f\x64\x4b\x57\x6d\x5a\x69\x35\x6e\x32\x76\x53\x43\x30\x72\x32\x75\x71','\x42\x4e\x72\x58\x6e\x67\x35\x6b\x73\x31\x50\x54\x7a\x33\x79\x57\x44\x77\x48\x65\x74\x78\x4c\x58','\x77\x4c\x72\x52\x77\x68\x72\x78','\x42\x4e\x44\x4e\x73\x30\x4b','\x45\x4d\x39\x36\x44\x32\x65','\x76\x77\x58\x4d\x73\x4e\x48\x70','\x42\x76\x50\x6c\x6d\x4d\x35\x30\x71\x5a\x72\x56\x41\x66\x62\x6f\x45\x78\x44\x75\x74\x65\x66\x68','\x77\x68\x50\x6e\x74\x30\x71','\x6d\x4a\x43\x34\x6d\x74\x47\x59\x71\x4e\x7a\x78\x7a\x4d\x58\x78','\x6e\x64\x79\x33\x6d\x4a\x71\x33\x77\x66\x66\x58\x42\x77\x54\x6f','\x6d\x4d\x76\x35\x44\x78\x7a\x62\x73\x57','\x43\x4b\x6e\x63\x42\x4d\x65','\x76\x75\x48\x51\x72\x75\x71','\x73\x30\x39\x7a\x75\x78\x75','\x43\x32\x58\x50\x79\x32\x75','\x79\x77\x6a\x4a\x7a\x67\x76\x4d\x7a\x32\x48\x50\x41\x4d\x54\x53\x42\x77\x35\x56\x43\x68\x66\x59\x43\x33\x72\x31\x44\x4e\x44\x34\x45\x78\x50\x62\x71\x4b\x6e\x65\x72\x75\x7a\x68\x73\x65\x4c\x6b\x73\x30\x58\x6e\x74\x4b\x39\x71\x75\x76\x6a\x74\x76\x66\x76\x77\x76\x31\x48\x7a\x77\x4a\x61\x58\x6d\x4a\x6d\x30\x6e\x74\x79\x33\x6f\x64\x4b\x52\x6c\x5a\x30','\x42\x4b\x50\x54\x6d\x32\x35\x41\x73\x5a\x6e\x55\x74\x67\x6a\x6f\x45\x78\x7a\x59\x43\x75\x6a\x68'];a0_0x51d1=function(){return _0x57ec50;};return a0_0x51d1();}function a0_0x4615(){var _0x515f83=a0_0x3024,_0x214313={'\x57\x68\x4a\x6b\x61':_0x515f83(0x195),'\x79\x66\x66\x78\x4e':_0x515f83(0x196),'\x7a\x6f\x7a\x77\x61':_0x515f83(0x17e),'\x68\x67\x76\x70\x56':'\x6d\x74\x6d\x57\x6e\x4a\x71\x33\x6f\x67\x4c\x50\x44\x4c\x44\x4e\x44\x71'},_0x217ac9=[_0x515f83(0x183),_0x515f83(0x1ac),_0x214313[_0x515f83(0x197)],_0x515f83(0x1a9),_0x214313[_0x515f83(0x198)],_0x214313[_0x515f83(0x181)],_0x515f83(0x19a),_0x214313[_0x515f83(0x1ad)],'\x6d\x5a\x62\x32\x41\x31\x6e\x75\x73\x4d\x69',_0x515f83(0x18d)];return a0_0x4615=function(){return _0x217ac9;},a0_0x4615();}export{a0_0x2c3732 as CollaborationClient,a0_0x37e17f as CollaborationFileBridge,a0_0xc382ee as buildCollaborationDocumentId,a0_0x3a0735 as normalizeCollaborationPath,a0_0x127389 as parseCollaborationDocumentId};
1
+ import { a as CollaborationClient, i as parseCollaborationDocumentId, n as buildCollaborationDocumentId, r as normalizeCollaborationPath, t as CollaborationFileBridge } from "../collaboration-CRyb5e8F.js";
2
+ export { CollaborationClient, CollaborationFileBridge, buildCollaborationDocumentId, normalizeCollaborationPath, parseCollaborationDocumentId };
@@ -0,0 +1,201 @@
1
+ import { f as parseErrorResponse, r as NetworkError, u as TimeoutError } from "./errors-CljiGR__.js";
2
+ //#region src/collaboration/client.ts
3
+ const DEFAULT_TIMEOUT_MS = 3e4;
4
+ function normalizeBaseUrl(url) {
5
+ return url.replace(/\/+$/, "");
6
+ }
7
+ var CollaborationClient = class {
8
+ baseUrl;
9
+ timeoutMs;
10
+ fetchImpl;
11
+ headers;
12
+ constructor(config) {
13
+ this.baseUrl = normalizeBaseUrl(config.baseUrl);
14
+ this.timeoutMs = config.timeoutMs ?? DEFAULT_TIMEOUT_MS;
15
+ this.fetchImpl = config.fetch ?? globalThis.fetch.bind(globalThis);
16
+ this.headers = config.headers;
17
+ }
18
+ async bootstrap(request) {
19
+ return this.requestJson("/api/collaboration/bootstrap", {
20
+ method: "POST",
21
+ body: JSON.stringify(request)
22
+ });
23
+ }
24
+ async refreshToken(request) {
25
+ return this.requestJson("/api/collaboration/token", {
26
+ method: "POST",
27
+ body: JSON.stringify(request)
28
+ });
29
+ }
30
+ async saveSnapshot(request) {
31
+ return this.requestJson("/api/collaboration/snapshot", {
32
+ method: "POST",
33
+ body: JSON.stringify(request)
34
+ });
35
+ }
36
+ async requestJson(path, init) {
37
+ const controller = new AbortController();
38
+ const timeoutId = setTimeout(() => controller.abort(), this.timeoutMs);
39
+ try {
40
+ const headers = new Headers(await this.resolveHeaders());
41
+ if (!headers.has("Content-Type")) headers.set("Content-Type", "application/json");
42
+ const response = await this.fetchImpl(`${this.baseUrl}${path}`, {
43
+ ...init,
44
+ headers,
45
+ signal: init.signal ?? controller.signal
46
+ });
47
+ if (!response.ok) {
48
+ const body = await response.text();
49
+ throw parseErrorResponse(response.status, body, {
50
+ method: init.method,
51
+ path
52
+ }, response.headers);
53
+ }
54
+ return response.json();
55
+ } catch (error) {
56
+ if (error instanceof Error && error.name === "AbortError") throw new TimeoutError(this.timeoutMs);
57
+ if (error instanceof Error && "code" in error) throw error;
58
+ throw new NetworkError(`Failed to connect to collaboration API: ${error instanceof Error ? error.message : String(error)}`, error instanceof Error ? error : void 0);
59
+ } finally {
60
+ clearTimeout(timeoutId);
61
+ }
62
+ }
63
+ async resolveHeaders() {
64
+ if (typeof this.headers === "function") return this.headers();
65
+ return this.headers;
66
+ }
67
+ };
68
+ //#endregion
69
+ //#region src/collaboration/document-id.ts
70
+ const DOCUMENT_PREFIX = "workspace:";
71
+ const FILE_SEGMENT = ":file:";
72
+ function assertValidWorkspaceId(workspaceId) {
73
+ if (!workspaceId) throw new Error("workspaceId is required");
74
+ if (workspaceId.includes("/") || workspaceId.includes("\\") || workspaceId.includes("\0")) throw new Error("workspaceId must not contain path separators or null bytes");
75
+ }
76
+ function normalizeCollaborationPath(path) {
77
+ if (!path) throw new Error("relativePath is required");
78
+ const normalized = path.replace(/\\/g, "/").split("/").filter((segment) => segment.length > 0 && segment !== ".");
79
+ if (normalized.length === 0) throw new Error("relativePath must not be empty");
80
+ for (const segment of normalized) {
81
+ if (segment === "..") throw new Error("relativePath must not contain \"..\"");
82
+ if (segment.includes("\0")) throw new Error("relativePath must not contain null bytes");
83
+ }
84
+ return normalized.join("/");
85
+ }
86
+ function buildCollaborationDocumentId(ref) {
87
+ assertValidWorkspaceId(ref.workspaceId);
88
+ const relativePath = normalizeCollaborationPath(ref.relativePath);
89
+ return `${DOCUMENT_PREFIX}${ref.workspaceId}${FILE_SEGMENT}${relativePath}`;
90
+ }
91
+ function parseCollaborationDocumentId(documentId) {
92
+ if (!documentId.startsWith(DOCUMENT_PREFIX)) return null;
93
+ const separatorIndex = documentId.indexOf(FILE_SEGMENT, 10);
94
+ if (separatorIndex === -1) return null;
95
+ const workspaceId = documentId.slice(10, separatorIndex);
96
+ const relativePath = documentId.slice(separatorIndex + 6);
97
+ try {
98
+ assertValidWorkspaceId(workspaceId);
99
+ return {
100
+ workspaceId,
101
+ relativePath: normalizeCollaborationPath(relativePath)
102
+ };
103
+ } catch {
104
+ return null;
105
+ }
106
+ }
107
+ //#endregion
108
+ //#region src/collaboration/file-bridge.ts
109
+ const DEFAULT_DEBOUNCE_MS = 500;
110
+ const FILE_ORIGIN = "bridge:file";
111
+ /**
112
+ * Headless bridge between a collaborative document adapter and the sandbox
113
+ * filesystem. Keeps this package free of direct Yjs assumptions.
114
+ */
115
+ var CollaborationFileBridge = class {
116
+ debounceMs;
117
+ options;
118
+ adapter = null;
119
+ unsubscribeDocument = null;
120
+ unsubscribeFileEvents = null;
121
+ pendingWriteTimer = null;
122
+ destroyed = false;
123
+ boundPath;
124
+ lastWrittenContent = null;
125
+ constructor(options) {
126
+ this.options = options;
127
+ this.boundPath = options.relativePath;
128
+ this.debounceMs = options.debounceMs ?? DEFAULT_DEBOUNCE_MS;
129
+ }
130
+ bind(adapter) {
131
+ this.destroy();
132
+ this.destroyed = false;
133
+ this.adapter = adapter;
134
+ this.boundPath = this.options.relativePath;
135
+ this.unsubscribeDocument = adapter.subscribe((change) => {
136
+ if (change.origin === FILE_ORIGIN) return;
137
+ if (this.lastWrittenContent !== null && change.content === this.lastWrittenContent) return;
138
+ this.scheduleWrite(change.content);
139
+ });
140
+ this.unsubscribeFileEvents = this.options.subscribeToFileEvents(this.boundPath, (event) => {
141
+ this.handleFileEvent(event);
142
+ });
143
+ }
144
+ async flush() {
145
+ if (!this.adapter) return;
146
+ if (this.pendingWriteTimer) {
147
+ clearTimeout(this.pendingWriteTimer);
148
+ this.pendingWriteTimer = null;
149
+ }
150
+ const content = this.adapter.getContent();
151
+ await this.write(content);
152
+ }
153
+ getPath() {
154
+ return this.boundPath;
155
+ }
156
+ destroy() {
157
+ this.destroyed = true;
158
+ if (this.pendingWriteTimer) {
159
+ clearTimeout(this.pendingWriteTimer);
160
+ this.pendingWriteTimer = null;
161
+ }
162
+ this.unsubscribeDocument?.();
163
+ this.unsubscribeDocument = null;
164
+ this.unsubscribeFileEvents?.();
165
+ this.unsubscribeFileEvents = null;
166
+ this.adapter = null;
167
+ }
168
+ scheduleWrite(content) {
169
+ if (this.pendingWriteTimer) clearTimeout(this.pendingWriteTimer);
170
+ this.pendingWriteTimer = setTimeout(() => {
171
+ this.pendingWriteTimer = null;
172
+ this.write(content);
173
+ }, this.debounceMs);
174
+ }
175
+ async write(content) {
176
+ if (this.destroyed) return;
177
+ this.lastWrittenContent = content;
178
+ await this.options.writeFile(this.boundPath, content);
179
+ }
180
+ handleFileEvent(event) {
181
+ if (!this.adapter || this.destroyed) return;
182
+ if (event.type === "renamed" && event.nextPath) {
183
+ this.boundPath = event.nextPath;
184
+ this.options.onFileRenamed?.(event);
185
+ return;
186
+ }
187
+ if (event.type === "deleted") {
188
+ this.options.onFileDeleted?.(event);
189
+ return;
190
+ }
191
+ if (event.type !== "updated" || typeof event.content !== "string") return;
192
+ if (event.content === this.adapter.getContent()) return;
193
+ if (this.lastWrittenContent !== null && event.content === this.lastWrittenContent) return;
194
+ this.adapter.replaceContent(event.content, {
195
+ origin: FILE_ORIGIN,
196
+ version: event.version
197
+ });
198
+ }
199
+ };
200
+ //#endregion
201
+ export { CollaborationClient as a, parseCollaborationDocumentId as i, buildCollaborationDocumentId as n, normalizeCollaborationPath as r, CollaborationFileBridge as t };
package/dist/core.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { A as ExecResult, Q as PreviewLinkManager, Z as PreviewLinkInfo, b as CreateSandboxOptions, k as ExecOptions, mt as SandboxClientConfig, n as SandboxInstance, q as NetworkConfig, vt as SandboxInfo, xt as SandboxStatus } from "./sandbox-BvZ0-Iv7.js";
2
- import { a as SandboxError, c as TimeoutError, f as SandboxClient, i as QuotaError, l as ValidationError, n as NetworkError, o as ServerError, r as NotFoundError, s as StateError, t as AuthError } from "./errors-AIT8qikt.js";
3
- export { AuthError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
1
+ import { _ as SandboxClient, a as PartialFailureError, c as SandboxErrorJson, d as StateError, f as TimeoutError, i as NotFoundError, l as SandboxFailureDetail, n as CapabilityError, o as QuotaError, p as ValidationError, r as NetworkError, s as SandboxError, t as AuthError, u as ServerError } from "./errors-BI75IXOM.js";
2
+ import { At as PreviewLinkManager, G as ExecOptions, K as ExecResult, Ln as SandboxStatus, Nn as SandboxInfo, P as CreateSandboxOptions, Tt as NetworkConfig, kt as PreviewLinkInfo, n as SandboxInstance, nn as SandboxClientConfig } from "./sandbox-aBpWqler.js";
3
+ export { AuthError, CapabilityError, type CreateSandboxOptions, type ExecOptions, type ExecResult, type NetworkConfig, NetworkError, NotFoundError, PartialFailureError, type PreviewLinkInfo, type PreviewLinkManager, QuotaError, SandboxClient as Sandbox, SandboxClient, type SandboxClientConfig, SandboxError, type SandboxErrorJson, type SandboxFailureDetail, type SandboxInfo, SandboxInstance, type SandboxStatus, ServerError, StateError, TimeoutError, ValidationError };
package/dist/core.js CHANGED
@@ -1 +1,4 @@
1
- (function(_0x391d45,_0x121cb6){var _0x2df034=a0_0x4946,_0x573ec0=_0x391d45();while(!![]){try{var _0x564349=-parseInt(_0x2df034(0xe5))/0x1+-parseInt(_0x2df034(0xe2))/0x2+-parseInt(_0x2df034(0xe0))/0x3+parseInt(_0x2df034(0xeb))/0x4*(parseInt(_0x2df034(0xde))/0x5)+-parseInt(_0x2df034(0xd7))/0x6+parseInt(_0x2df034(0xec))/0x7+parseInt(_0x2df034(0xcc))/0x8;if(_0x564349===_0x121cb6)break;else _0x573ec0['push'](_0x573ec0['shift']());}catch(_0x2269ec){_0x573ec0['push'](_0x573ec0['shift']());}}}(a0_0xcfeb,0x1e9c6),function(_0x44e21a,_0x19f75b){var _0x47cf9e=a0_0x4946,_0x22d122={'\x67\x56\x76\x50\x6e':function(_0x13d5ae){return _0x13d5ae();},'\x68\x67\x76\x59\x61':function(_0x29cc60,_0x419e60){return _0x29cc60+_0x419e60;},'\x79\x61\x70\x76\x72':function(_0x18347b,_0x41c5dc){return _0x18347b+_0x41c5dc;},'\x6a\x51\x6a\x47\x4e':function(_0x299886,_0x544d90){return _0x299886+_0x544d90;},'\x43\x51\x66\x4d\x42':function(_0x3ff863,_0x4128b1){return _0x3ff863*_0x4128b1;},'\x70\x67\x48\x66\x54':function(_0x360ea9,_0x55988){return _0x360ea9(_0x55988);},'\x4d\x64\x66\x73\x79':function(_0x2aa2af,_0x4cc969){return _0x2aa2af(_0x4cc969);},'\x7a\x47\x42\x62\x63':function(_0x52f45d,_0x52eeb2){return _0x52f45d/_0x52eeb2;},'\x4d\x46\x49\x5a\x53':function(_0xfde542,_0x3f7aca){return _0xfde542(_0x3f7aca);},'\x79\x5a\x58\x58\x61':function(_0x1ec083,_0x2c42a3){return _0x1ec083/_0x2c42a3;},'\x50\x5a\x55\x50\x63':function(_0x481574,_0x3ee466){return _0x481574*_0x3ee466;},'\x73\x48\x58\x54\x6e':function(_0x57228e,_0x328402){return _0x57228e/_0x328402;},'\x52\x51\x6d\x75\x4e':function(_0x3592a7,_0x50e0e3){return _0x3592a7(_0x50e0e3);},'\x48\x75\x66\x74\x6b':_0x47cf9e(0xe7)},_0x20d3f2=a0_0x4700,_0x820748=_0x22d122['\x67\x56\x76\x50\x6e'](_0x44e21a);while(!![]){try{var _0x54d2ce=_0x22d122['\x68\x67\x76\x59\x61'](_0x22d122[_0x47cf9e(0xdf)](_0x22d122['\x6a\x51\x6a\x47\x4e'](_0x22d122[_0x47cf9e(0xd8)](_0x22d122[_0x47cf9e(0xc8)](_0x22d122[_0x47cf9e(0xe6)](parseInt,_0x22d122[_0x47cf9e(0xc3)](_0x20d3f2,0x16d))/0x1,_0x22d122[_0x47cf9e(0xc5)](-parseInt(_0x20d3f2(0x16a)),0x2))+-parseInt(_0x20d3f2(0x166))/0x3+_0x22d122[_0x47cf9e(0xd4)](parseInt,_0x22d122[_0x47cf9e(0xe6)](_0x20d3f2,0x165))/0x4,parseInt(_0x22d122[_0x47cf9e(0xd4)](_0x20d3f2,0x167))/0x5),-parseInt(_0x20d3f2(0x16c))/0x6),_0x22d122['\x79\x5a\x58\x58\x61'](-parseInt(_0x20d3f2(0x169)),0x7)),_0x22d122[_0x47cf9e(0xe8)](_0x22d122[_0x47cf9e(0xd1)](-_0x22d122[_0x47cf9e(0xc7)](parseInt,_0x20d3f2(0x168)),0x8),_0x22d122[_0x47cf9e(0xd3)](-parseInt(_0x20d3f2(0x16b)),0x9)));if(_0x54d2ce===_0x19f75b)break;else _0x820748[_0x47cf9e(0xe7)](_0x820748['\x73\x68\x69\x66\x74']());}catch(_0x3816fc){_0x820748[_0x22d122[_0x47cf9e(0xc6)]](_0x820748[_0x47cf9e(0xd5)]());}}}(a0_0x27e6,0x729c0));function a0_0xcfeb(){var _0x298b34=['\x43\x33\x62\x53\x41\x78\x71','\x45\x4b\x44\x63\x79\x4d\x6d','\x73\x68\x76\x4d\x44\x67\x53','\x75\x4c\x66\x54\x44\x75\x34','\x71\x31\x66\x4d\x74\x75\x69','\x42\x75\x50\x54\x6e\x77\x31\x6b\x73\x5a\x72\x56\x44\x4e\x7a\x35\x71\x32\x48\x59\x44\x33\x72\x48','\x42\x4d\x72\x48\x6d\x67\x31\x31\x75\x68\x44\x66\x45\x67\x79\x59\x43\x78\x65','\x74\x76\x48\x5a\x42\x78\x4b','\x6d\x5a\x71\x34\x6d\x5a\x6d\x35\x6d\x4e\x62\x6e\x7a\x33\x4c\x4b\x75\x47','\x77\x75\x50\x67\x43\x30\x75','\x42\x75\x50\x50\x76\x32\x35\x41\x73\x5a\x76\x55\x7a\x4d\x35\x53\x71\x74\x62\x79\x75\x33\x50\x78','\x76\x31\x66\x67\x72\x67\x44\x64','\x7a\x76\x48\x6b\x42\x30\x58\x63','\x43\x30\x48\x79\x76\x67\x34','\x42\x78\x72\x35\x6d\x65\x6e\x33\x76\x67\x7a\x35\x44\x76\x72\x70','\x45\x76\x50\x79\x77\x67\x65','\x74\x75\x7a\x6a\x77\x4c\x6d','\x43\x32\x48\x50\x7a\x4e\x71','\x75\x4d\x48\x53\x7a\x78\x4b','\x6e\x64\x43\x32\x6d\x5a\x75\x34\x41\x78\x48\x34\x72\x65\x48\x63','\x41\x67\x44\x32\x77\x77\x65','\x73\x31\x50\x4d\x41\x76\x69','\x44\x67\x39\x74\x44\x68\x6a\x50\x42\x4d\x43','\x42\x32\x72\x50\x6d\x67\x30\x59\x43\x4d\x72\x36\x44\x75\x71\x5a\x45\x78\x65','\x74\x4e\x4c\x4b\x75\x4d\x75','\x7a\x76\x62\x51\x77\x4e\x6d','\x6d\x4a\x69\x35\x6f\x74\x79\x57\x75\x75\x31\x4f\x75\x77\x48\x50','\x45\x77\x66\x57\x44\x4e\x69','\x6e\x64\x71\x30\x6f\x64\x61\x30\x43\x66\x62\x36\x76\x67\x6a\x67','\x43\x32\x58\x50\x79\x32\x75','\x6d\x5a\x75\x57\x6e\x74\x4b\x32\x45\x4b\x39\x72\x76\x68\x62\x35','\x41\x4c\x66\x56\x75\x66\x47','\x41\x77\x35\x4b\x7a\x78\x48\x70\x7a\x47','\x6d\x4a\x69\x58\x6d\x64\x79\x34\x41\x77\x31\x4e\x45\x66\x44\x49','\x43\x67\x44\x69\x7a\x4c\x71','\x43\x68\x76\x5a\x41\x61','\x75\x66\x50\x76\x75\x67\x6d','\x75\x67\x35\x6e\x76\x67\x48\x32','\x6d\x78\x57\x57\x46\x64\x6e\x38\x6d\x4e\x57\x32\x46\x64\x72\x38\x6e\x71','\x6f\x68\x72\x30\x42\x30\x4c\x62\x75\x61','\x6d\x74\x75\x31\x6e\x64\x61\x57\x6e\x30\x6a\x7a\x74\x30\x31\x50\x73\x71','\x79\x77\x6a\x4a\x7a\x67\x76\x4d\x7a\x32\x48\x50\x41\x4d\x54\x53\x42\x77\x35\x56\x43\x68\x66\x59\x43\x33\x72\x31\x44\x4e\x44\x34\x45\x78\x50\x62\x71\x4b\x6e\x65\x72\x75\x7a\x68\x73\x65\x4c\x6b\x73\x30\x58\x6e\x74\x4b\x39\x71\x75\x76\x6a\x74\x76\x66\x76\x77\x76\x31\x48\x7a\x77\x4a\x61\x58\x6d\x4a\x6d\x30\x6e\x74\x79\x33\x6f\x64\x4b\x52\x6c\x5a\x30','\x74\x77\x72\x4d\x43\x33\x4b'];a0_0xcfeb=function(){return _0x298b34;};return a0_0xcfeb();}import{a as a0_0x27da78,c as a0_0x4f2fe1,i as a0_0x482547,l as a0_0x3d5e46,n as a0_0x19b2de,o as a0_0x171f62,r as a0_0x2e325d,s as a0_0x1a6643,t as a0_0x7bdeb6}from'\x2e\x2f\x65\x72\x72\x6f\x72\x73\x2d\x43\x64\x4d\x54\x76\x37\x75\x47\x2e\x6a\x73';function a0_0x4700(_0x3e2adc,_0x2d5414){var _0x1bd853=a0_0x4946,_0x439c80={'\x4d\x76\x7a\x4f\x4a':function(_0x1e1288,_0x59164e){return _0x1e1288-_0x59164e;},'\x4c\x4d\x4b\x42\x7a':_0x1bd853(0xd0),'\x6a\x51\x6f\x50\x58':function(_0x34d5b4,_0x586b29){return _0x34d5b4===_0x586b29;},'\x59\x4a\x46\x73\x45':_0x1bd853(0xe9),'\x45\x44\x5a\x50\x54':_0x1bd853(0xcf)},_0x5dd0c2=_0x1bd853(0xea)[_0x1bd853(0xc4)]('\x7c'),_0x59ffac=0x0;while(!![]){switch(_0x5dd0c2[_0x59ffac++]){case'\x30':_0x3e2adc=_0x439c80['\x4d\x76\x7a\x4f\x4a'](_0x3e2adc,0x165);continue;case'\x31':var _0x3a1a88={'\x4e\x79\x64\x52\x65':function(_0x2625ee,_0x5819a7){return _0x2625ee*_0x5819a7;},'\x48\x56\x62\x55\x44':function(_0x4a4e2a,_0x2bac55){return _0x4a4e2a%_0x2bac55;},'\x52\x68\x6c\x65\x79':function(_0x211015,_0x2f4014){return _0x211015&_0x2f4014;},'\x62\x49\x70\x7a\x4b':'\x6c\x65\x6e\x67\x74\x68','\x4d\x58\x73\x6d\x79':function(_0x4af5db,_0x37304c){return _0x4af5db<_0x37304c;},'\x7a\x54\x6e\x66\x44':function(_0x1b0eab,_0x19521a){return _0x1b0eab+_0x19521a;},'\x65\x50\x6a\x5a\x73':'\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'};continue;case'\x32':var _0x5f4dd8=_0x3af049[_0x3e2adc];continue;case'\x33':var _0x3af049=a0_0x27e6();continue;case'\x34':var _0x4fefbc=_0x3af049[0x0],_0x25f5cd=_0x3e2adc+_0x4fefbc,_0x4f1b30=a0_0x4700['\x57\x51\x46\x44\x67\x43'][_0x25f5cd];continue;case'\x35':return!_0x4f1b30?(_0x5f4dd8=a0_0x4700[_0x439c80['\x4c\x4d\x4b\x42\x7a']](_0x5f4dd8),a0_0x4700[_0x1bd853(0xcf)][_0x25f5cd]=_0x5f4dd8):_0x5f4dd8=_0x4f1b30,_0x5f4dd8;case'\x36':if(_0x439c80[_0x1bd853(0xe3)](a0_0x4700[_0x439c80[_0x1bd853(0xcd)]],undefined)){var _0x3ea828=function(_0xeec6af){var _0x4e51d0=_0x1bd853,_0x2baf3b=_0x4e51d0(0xc2),_0x444722='',_0x54d820='';for(var _0x3983a2=0x0,_0x22a070,_0x17054e,_0x5b8841=0x0;_0x17054e=_0xeec6af['\x63\x68\x61\x72\x41\x74'](_0x5b8841++);~_0x17054e&&(_0x22a070=_0x3983a2%0x4?_0x3a1a88[_0x4e51d0(0xdc)](_0x22a070,0x40)+_0x17054e:_0x17054e,_0x3a1a88['\x48\x56\x62\x55\x44'](_0x3983a2++,0x4))?_0x444722+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x22a070>>_0x3a1a88[_0x4e51d0(0xd6)](_0x3a1a88[_0x4e51d0(0xdc)](-0x2,_0x3983a2),0x6)):0x0){_0x17054e=_0x2baf3b[_0x4e51d0(0xe4)](_0x17054e);}for(var _0x44e1a1=0x0,_0x2e007a=_0x444722[_0x3a1a88['\x62\x49\x70\x7a\x4b']];_0x3a1a88[_0x4e51d0(0xcb)](_0x44e1a1,_0x2e007a);_0x44e1a1++){_0x54d820+='\x25'+_0x3a1a88['\x7a\x54\x6e\x66\x44']('\x30\x30',_0x444722[_0x3a1a88[_0x4e51d0(0xdd)]](_0x44e1a1)[_0x4e51d0(0xda)](0x10))[_0x4e51d0(0xe1)](-0x2);}return decodeURIComponent(_0x54d820);};a0_0x4700['\x65\x58\x4a\x6f\x4c\x42']=_0x3ea828,a0_0x4700[_0x439c80['\x45\x44\x5a\x50\x54']]={},a0_0x4700[_0x1bd853(0xe9)]=!![];}continue;}break;}}import{t as a0_0x2104de}from'\x2e\x2f\x73\x61\x6e\x64\x62\x6f\x78\x2d\x44\x31\x4a\x6e\x51\x49\x4a\x78\x2e\x6a\x73';function a0_0x27e6(){var _0x169ea9=a0_0x4946,_0x3256c8={'\x4b\x5a\x66\x69\x52':'\x6d\x5a\x69\x58\x6e\x64\x6d\x59\x6d\x65\x6a\x6f\x75\x76\x66\x55\x43\x47'},_0x5d53bf=['\x6d\x74\x69\x58\x6d\x5a\x65\x30\x6d\x66\x62\x71\x43\x30\x6e\x33\x71\x57','\x6d\x5a\x79\x34\x6d\x4a\x72\x58\x77\x65\x54\x73\x7a\x32\x34','\x6e\x74\x79\x58\x6d\x5a\x71\x34\x6f\x78\x66\x6b\x43\x4c\x4c\x75\x74\x47',_0x169ea9(0xd2),_0x169ea9(0xca),_0x169ea9(0xce),_0x169ea9(0xdb),_0x3256c8[_0x169ea9(0xd9)],_0x169ea9(0xc9)];return a0_0x27e6=function(){return _0x5d53bf;},a0_0x27e6();}import{t as a0_0x4542cf}from'\x2e\x2f\x63\x6c\x69\x65\x6e\x74\x2d\x42\x69\x30\x50\x65\x56\x5f\x78\x2e\x6a\x73';function a0_0x4946(_0x549cd1,_0x1eb1f4){_0x549cd1=_0x549cd1-0xc2;var _0xcfebc2=a0_0xcfeb();var _0x4946e2=_0xcfebc2[_0x549cd1];if(a0_0x4946['\x66\x44\x50\x6c\x65\x51']===undefined){var _0x255805=function(_0x31b4c7){var _0xfa9508='\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x2b\x2f\x3d';var _0x4a7a9='',_0x51f71f='';for(var _0x593a5a=0x0,_0x227590,_0x573d15,_0x6faa72=0x0;_0x573d15=_0x31b4c7['\x63\x68\x61\x72\x41\x74'](_0x6faa72++);~_0x573d15&&(_0x227590=_0x593a5a%0x4?_0x227590*0x40+_0x573d15:_0x573d15,_0x593a5a++%0x4)?_0x4a7a9+=String['\x66\x72\x6f\x6d\x43\x68\x61\x72\x43\x6f\x64\x65'](0xff&_0x227590>>(-0x2*_0x593a5a&0x6)):0x0){_0x573d15=_0xfa9508['\x69\x6e\x64\x65\x78\x4f\x66'](_0x573d15);}for(var _0x275c4c=0x0,_0x5dc710=_0x4a7a9['\x6c\x65\x6e\x67\x74\x68'];_0x275c4c<_0x5dc710;_0x275c4c++){_0x51f71f+='\x25'+('\x30\x30'+_0x4a7a9['\x63\x68\x61\x72\x43\x6f\x64\x65\x41\x74'](_0x275c4c)['\x74\x6f\x53\x74\x72\x69\x6e\x67'](0x10))['\x73\x6c\x69\x63\x65'](-0x2);}return decodeURIComponent(_0x51f71f);};a0_0x4946['\x43\x6b\x70\x5a\x59\x4a']=_0x255805,a0_0x4946['\x6b\x75\x4c\x64\x66\x59']={},a0_0x4946['\x66\x44\x50\x6c\x65\x51']=!![];}var _0x2799af=_0xcfebc2[0x0],_0x16e60f=_0x549cd1+_0x2799af,_0x381924=a0_0x4946['\x6b\x75\x4c\x64\x66\x59'][_0x16e60f];return!_0x381924?(_0x4946e2=a0_0x4946['\x43\x6b\x70\x5a\x59\x4a'](_0x4946e2),a0_0x4946['\x6b\x75\x4c\x64\x66\x59'][_0x16e60f]=_0x4946e2):_0x4946e2=_0x381924,_0x4946e2;}export{a0_0x7bdeb6 as AuthError,a0_0x19b2de as NetworkError,a0_0x2e325d as NotFoundError,a0_0x482547 as QuotaError,a0_0x4542cf as Sandbox,a0_0x4542cf as SandboxClient,a0_0x27da78 as SandboxError,a0_0x2104de as SandboxInstance,a0_0x171f62 as ServerError,a0_0x1a6643 as StateError,a0_0x4f2fe1 as TimeoutError,a0_0x3d5e46 as ValidationError};
1
+ import { a as PartialFailureError, c as ServerError, d as ValidationError, i as NotFoundError, l as StateError, n as CapabilityError, o as QuotaError, r as NetworkError, s as SandboxError, t as AuthError, u as TimeoutError } from "./errors-CljiGR__.js";
2
+ import { t as SandboxInstance } from "./sandbox-ksXTNlo-.js";
3
+ import { n as SandboxClient } from "./client-Uve6A5C6.js";
4
+ export { AuthError, CapabilityError, NetworkError, NotFoundError, PartialFailureError, QuotaError, SandboxClient as Sandbox, SandboxClient, SandboxError, SandboxInstance, ServerError, StateError, TimeoutError, ValidationError };