@univerjs-pro/exchange-client 0.21.1 → 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.
- package/README.md +26 -10
- package/lib/cjs/facade.js +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/locale/ca-ES.js +1 -1
- package/lib/cjs/locale/en-US.js +1 -1
- package/lib/cjs/locale/es-ES.js +1 -1
- package/lib/cjs/locale/fa-IR.js +1 -1
- package/lib/cjs/locale/fr-FR.js +1 -1
- package/lib/cjs/locale/ja-JP.js +1 -1
- package/lib/cjs/locale/ko-KR.js +1 -1
- package/lib/cjs/locale/ru-RU.js +1 -1
- package/lib/cjs/locale/sk-SK.js +1 -1
- package/lib/cjs/locale/vi-VN.js +1 -1
- package/lib/cjs/locale/zh-CN.js +1 -1
- package/lib/cjs/locale/zh-TW.js +1 -1
- package/lib/es/facade.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/es/locale/ca-ES.js +1 -1
- package/lib/es/locale/en-US.js +1 -1
- package/lib/es/locale/es-ES.js +1 -1
- package/lib/es/locale/fa-IR.js +1 -1
- package/lib/es/locale/fr-FR.js +1 -1
- package/lib/es/locale/ja-JP.js +1 -1
- package/lib/es/locale/ko-KR.js +1 -1
- package/lib/es/locale/ru-RU.js +1 -1
- package/lib/es/locale/sk-SK.js +1 -1
- package/lib/es/locale/vi-VN.js +1 -1
- package/lib/es/locale/zh-CN.js +1 -1
- package/lib/es/locale/zh-TW.js +1 -1
- package/lib/facade.js +1 -1
- package/lib/index.js +1 -1
- package/lib/locale/ca-ES.js +1 -1
- package/lib/locale/en-US.js +1 -1
- package/lib/locale/es-ES.js +1 -1
- package/lib/locale/fa-IR.js +1 -1
- package/lib/locale/fr-FR.js +1 -1
- package/lib/locale/ja-JP.js +1 -1
- package/lib/locale/ko-KR.js +1 -1
- package/lib/locale/ru-RU.js +1 -1
- package/lib/locale/sk-SK.js +1 -1
- package/lib/locale/vi-VN.js +1 -1
- package/lib/locale/zh-CN.js +1 -1
- package/lib/locale/zh-TW.js +1 -1
- package/lib/types/services/utils/tool.d.ts +0 -1
- package/lib/umd/facade.js +1 -1
- package/lib/umd/index.js +1 -1
- package/lib/umd/locale/ca-ES.js +1 -1
- package/lib/umd/locale/en-US.js +1 -1
- package/lib/umd/locale/es-ES.js +1 -1
- package/lib/umd/locale/fa-IR.js +1 -1
- package/lib/umd/locale/fr-FR.js +1 -1
- package/lib/umd/locale/ja-JP.js +1 -1
- package/lib/umd/locale/ko-KR.js +1 -1
- package/lib/umd/locale/ru-RU.js +1 -1
- package/lib/umd/locale/sk-SK.js +1 -1
- package/lib/umd/locale/vi-VN.js +1 -1
- package/lib/umd/locale/zh-CN.js +1 -1
- package/lib/umd/locale/zh-TW.js +1 -1
- package/package.json +18 -12
package/README.md
CHANGED
|
@@ -1,24 +1,40 @@
|
|
|
1
1
|
# @univerjs-pro/exchange-client
|
|
2
2
|
|
|
3
|
-
[](https://npmjs.
|
|
4
|
-
[](https://npmjs.com/package/@univerjs-pro/exchange-client)
|
|
4
|
+
[](https://npmjs.com/package/@univerjs-pro/exchange-client)
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
`@univerjs-pro/exchange-client` provides workbook import and export client integration for Univer Pro.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
## Package Overview
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
| Package | UMD global | CSS | Locales | Facade entry |
|
|
11
|
+
| --- | --- | :---: | :---: | :---: |
|
|
12
|
+
| `@univerjs-pro/exchange-client` | `UniverProExchangeClient` | Yes | Yes | Yes |
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
## Installation
|
|
13
15
|
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
+
```sh
|
|
17
|
+
pnpm add @univerjs-pro/exchange-client
|
|
18
|
+
# or
|
|
19
|
+
npm install @univerjs-pro/exchange-client
|
|
16
20
|
```
|
|
17
21
|
|
|
18
|
-
|
|
22
|
+
Keep all `@univerjs/*` and `@univerjs-pro/*` packages on the same version.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
19
25
|
|
|
20
|
-
```
|
|
26
|
+
```ts
|
|
27
|
+
import '@univerjs-pro/exchange-client/lib/index.css';
|
|
28
|
+
import EnUS from '@univerjs-pro/exchange-client/locale/en-US';
|
|
21
29
|
import { UniverExchangeClientPlugin } from '@univerjs-pro/exchange-client';
|
|
22
30
|
|
|
23
31
|
univer.registerPlugin(UniverExchangeClientPlugin);
|
|
32
|
+
|
|
33
|
+
// Merge EnUS into your Univer locale map when this package contributes UI text.
|
|
24
34
|
```
|
|
35
|
+
|
|
36
|
+
## Resources
|
|
37
|
+
|
|
38
|
+
- [Documentation](https://docs.univer.ai/guides/pro)
|
|
39
|
+
- [NPM package](https://npmjs.com/package/@univerjs-pro/exchange-client)
|
|
40
|
+
|
package/lib/cjs/facade.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1850(_0x5691ad,_0x3432d4){_0x5691ad=_0x5691ad-0xd6;const _0x20fd17=_0x20fd();let _0x18504e=_0x20fd17[_0x5691ad];return _0x18504e;}const _0xf23648=_0x1850;(function(_0x5dcd49,_0x35efc9){const _0x27c204=_0x1850,_0xc5a40f=_0x5dcd49();while(!![]){try{const _0x193e9a=-parseInt(_0x27c204(0xe5))/0x1*(parseInt(_0x27c204(0xe6))/0x2)+-parseInt(_0x27c204(0xed))/0x3+parseInt(_0x27c204(0xe0))/0x4+parseInt(_0x27c204(0xd6))/0x5*(-parseInt(_0x27c204(0xee))/0x6)+parseInt(_0x27c204(0xe8))/0x7+parseInt(_0x27c204(0xd7))/0x8*(-parseInt(_0x27c204(0xde))/0x9)+parseInt(_0x27c204(0xea))/0xa;if(_0x193e9a===_0x35efc9)break;else _0xc5a40f['push'](_0xc5a40f['shift']());}catch(_0x33f31d){_0xc5a40f['push'](_0xc5a40f['shift']());}}}(_0x20fd,0xebcaa));let _univerjs_pro_exchange_client=require('@univerjs-pro/exchange-client'),_univerjs_core=require('@univerjs/core'),_univerjs_core_facade=require('@univerjs/core/facade');var FUniverExchangeClientMixin=class extends _univerjs_core_facade[_0xf23648(0xd8)]{async[_0xf23648(0xe4)](_0x2c169c){const _0x1d26ce=_0xf23648,_0x395dc1=this[_0x1d26ce(0xec)][_0x1d26ce(0xdb)](_univerjs_pro_exchange_client['IExchangeService']);if(!_0x395dc1)throw new Error(_0x1d26ce(0xe9));return _0x395dc1['importFileToUnitId'](_0x2c169c,_univerjs_core['UniverInstanceType']['UNIVER_SHEET']);}async['importXLSXToSnapshotAsync'](_0x597443){const _0x1647c8=_0xf23648,_0x186c3a=this['_injector'][_0x1647c8(0xdb)](_univerjs_pro_exchange_client[_0x1647c8(0xdf)]);if(!_0x186c3a)throw new Error(_0x1647c8(0xe9));return _0x186c3a[_0x1647c8(0xda)](_0x597443);}async[_0xf23648(0xe7)](_0x3ebc6a){const _0x451f90=_0xf23648,_0x173eb6=this[_0x451f90(0xec)][_0x451f90(0xdb)](_univerjs_pro_exchange_client['IExchangeService']);if(!_0x173eb6)throw new Error(_0x451f90(0xe9));return _0x173eb6[_0x451f90(0xe1)](_0x3ebc6a);}async[_0xf23648(0xdc)](_0x2cd23a){const _0x1faf39=_0xf23648,_0x2d96b7=this['_injector'][_0x1faf39(0xdb)](_univerjs_pro_exchange_client['IExchangeService']);if(!_0x2d96b7)throw new Error(_0x1faf39(0xe9));return _0x2d96b7['exportXLSXBySnapshot'](_0x2cd23a);}async[_0xf23648(0xdd)](_0x94fa74){const _0x2061b5=_0xf23648,_0x276a54=this[_0x2061b5(0xec)][_0x2061b5(0xdb)](_univerjs_pro_exchange_client['IExchangeService']);if(!_0x276a54)throw new Error(_0x2061b5(0xe9));return _0x276a54['importFileToUnitId'](_0x94fa74,_univerjs_core['UniverInstanceType'][_0x2061b5(0xeb)]);}async[_0xf23648(0xd9)](_0x6efc5c){const _0x5ea947=_0xf23648,_0x1de5a5=this[_0x5ea947(0xec)][_0x5ea947(0xdb)](_univerjs_pro_exchange_client[_0x5ea947(0xdf)]);if(!_0x1de5a5)throw new Error(_0x5ea947(0xe9));return _0x1de5a5['importDOCXToSnapshot'](_0x6efc5c);}async[_0xf23648(0xe2)](_0x4a2e67){const _0x27eac0=_0xf23648,_0x44b9d1=this['_injector'][_0x27eac0(0xdb)](_univerjs_pro_exchange_client[_0x27eac0(0xdf)]);if(!_0x44b9d1)throw new Error(_0x27eac0(0xe9));return _0x44b9d1[_0x27eac0(0xef)](_0x4a2e67);}async[_0xf23648(0xf0)](_0xea29c3){const _0x592338=_0xf23648,_0x1ecb89=this[_0x592338(0xec)][_0x592338(0xdb)](_univerjs_pro_exchange_client[_0x592338(0xdf)]);if(!_0x1ecb89)throw new Error(_0x592338(0xe9));return _0x1ecb89[_0x592338(0xe3)](_0xea29c3);}};function _0x20fd(){const _0x74cfc=['get','exportXLSXBySnapshotAsync','importDOCXToUnitIdAsync','1021509mVhrzz','IExchangeService','2054852rHxVqN','exportXLSXByUnitId','exportDOCXBySnapshotAsync','exportDOCXByUnitId','importXLSXToUnitIdAsync','29IMTZrH','38462TLXUkc','exportXLSXByUnitIdAsync','1199296ujduun','The\x20exchange\x20service\x20is\x20not\x20available','48883820qIRWkt','UNIVER_DOC','_injector','4990065jZRGzM','6LOnJLR','exportDOCXBySnapshot','exportDOCXByUnitIdAsync','6257785vgkzAE','80UPyjHg','FUniver','importDOCXToSnapshotAsync','importXLSXToSnapshot'];_0x20fd=function(){return _0x74cfc;};return _0x20fd();}_univerjs_core_facade['FUniver']['extend'](FUniverExchangeClientMixin);
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x5cc5d6=_0x4a23;(function(_0x2bbf5c,_0x4e2598){const _0x25c945=_0x4a23,_0x2d0da9=_0x2bbf5c();while(!![]){try{const _0x15fb8f=parseInt(_0x25c945(0x10b))/0x1*(parseInt(_0x25c945(0xc1))/0x2)+parseInt(_0x25c945(0xca))/0x3*(parseInt(_0x25c945(0xef))/0x4)+-parseInt(_0x25c945(0x10d))/0x5+-parseInt(_0x25c945(0xd5))/0x6*(-parseInt(_0x25c945(0x152))/0x7)+parseInt(_0x25c945(0x17e))/0x8+-parseInt(_0x25c945(0x107))/0x9+-parseInt(_0x25c945(0xab))/0xa;if(_0x15fb8f===_0x4e2598)break;else _0x2d0da9['push'](_0x2d0da9['shift']());}catch(_0x272b6a){_0x2d0da9['push'](_0x2d0da9['shift']());}}}(_0x5463,0xa6a8f),Object['defineProperty'](exports,Symbol[_0x5cc5d6(0xe3)],{'value':_0x5cc5d6(0x1ec)}));let _univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),_univerjs_ui=require('@univerjs/ui'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),rxjs=require('rxjs'),_univerjs_design=require('@univerjs/design'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_protocol=require('@univerjs/protocol'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),fflate=require('fflate');const EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY=_0x5cc5d6(0x18f),configSymbol=Symbol(EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY),defaultPluginConfig={};var name='@univerjs-pro/exchange-client',version='0.21.1';function _typeof(_0x2e0488){'@babel/helpers - typeof';const _0x436914=_0x5cc5d6;return _typeof=_0x436914(0x1d9)==typeof Symbol&&_0x436914(0x188)==typeof Symbol[_0x436914(0x9f)]?function(_0x37b28f){return typeof _0x37b28f;}:function(_0x220520){const _0xc37f0d=_0x436914;return _0x220520&&_0xc37f0d(0x1d9)==typeof Symbol&&_0x220520[_0xc37f0d(0x145)]===Symbol&&_0x220520!==Symbol[_0xc37f0d(0xb4)]?_0xc37f0d(0x188):typeof _0x220520;},_typeof(_0x2e0488);}function toPrimitive(_0x574a8d,_0x3b1292){const _0xe21df0=_0x5cc5d6;if(_0xe21df0(0x1fa)!=_typeof(_0x574a8d)||!_0x574a8d)return _0x574a8d;var _0x2cf5f7=_0x574a8d[Symbol[_0xe21df0(0x1d8)]];if(void 0x0!==_0x2cf5f7){var _0x109028=_0x2cf5f7['call'](_0x574a8d,_0x3b1292||_0xe21df0(0xcc));if(_0xe21df0(0x1fa)!=_typeof(_0x109028))return _0x109028;throw new TypeError(_0xe21df0(0x17d));}return(_0xe21df0(0x209)===_0x3b1292?String:Number)(_0x574a8d);}function toPropertyKey(_0x291103){const _0x3ce88b=_0x5cc5d6;var _0x1301f6=toPrimitive(_0x291103,_0x3ce88b(0x209));return'symbol'==_typeof(_0x1301f6)?_0x1301f6:_0x1301f6+'';}function _defineProperty(_0x357361,_0x4686df,_0x432038){const _0x21fb6e=_0x5cc5d6;return(_0x4686df=toPropertyKey(_0x4686df))in _0x357361?Object[_0x21fb6e(0x196)](_0x357361,_0x4686df,{'value':_0x432038,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x357361[_0x4686df]=_0x432038,_0x357361;}let UploadNotificationState=function(_0x36be5c){const _0x49d469=_0x5cc5d6;return _0x36be5c[_0x36be5c['UPLOADING']=0x0]='UPLOADING',_0x36be5c[_0x36be5c[_0x49d469(0x14a)]=0x1]=_0x49d469(0x14a),_0x36be5c[_0x36be5c[_0x49d469(0x1f9)]=0x2]=_0x49d469(0x1f9),_0x36be5c;}({});const IUploadNotificationService=(0x0,_univerjs_core['createIdentifier'])(_0x5cc5d6(0x1ce));var UploadNotificationService=class extends _univerjs_core[_0x5cc5d6(0xdf)]{constructor(){const _0xb74938=_0x5cc5d6;super(),_defineProperty(this,'_visible$',new rxjs[(_0xb74938(0x1f5))]()),_defineProperty(this,_0xb74938(0x1fe),new rxjs[(_0xb74938(0x1f5))]()),_defineProperty(this,_0xb74938(0x11b),new rxjs[(_0xb74938(0x1f5))]()),_defineProperty(this,_0xb74938(0x1cd),this[_0xb74938(0x181)][_0xb74938(0x208)]()),_defineProperty(this,_0xb74938(0xb9),this[_0xb74938(0x1fe)][_0xb74938(0x208)]()),_defineProperty(this,_0xb74938(0x128),this['_list$'][_0xb74938(0x208)]()),_defineProperty(this,_0xb74938(0xf3),[]);}[_0x5cc5d6(0xd8)](){const _0x9109ca=_0x5cc5d6;super['dispose'](),this[_0x9109ca(0x181)][_0x9109ca(0xc8)](),this[_0x9109ca(0x1fe)][_0x9109ca(0xc8)](),this[_0x9109ca(0x11b)][_0x9109ca(0xc8)]();}['show'](){const _0x31a3a0=_0x5cc5d6;this[_0x31a3a0(0x181)][_0x31a3a0(0xe7)](!![]);}['hide'](){this['_visible$']['next'](![]);}['updateState'](_0x38ad24){const _0x25b68c=_0x5cc5d6;this[_0x25b68c(0x1fe)][_0x25b68c(0xe7)](_0x38ad24);}[_0x5cc5d6(0x1bc)](_0x3ea891){const _0x574a5c=_0x5cc5d6;this['_list'][_0x574a5c(0x194)](_0x3ea891),this[_0x574a5c(0x11b)]['next'](this[_0x574a5c(0xf3)]);}};function LinkList(_0x234040){const _0x3d9bbc=_0x5cc5d6,{list:_0x296c9c}=_0x234040;function _0x1879e4(_0x226cd8){const _0xb9cd3f=_0x4a23;switch(_0x226cd8){case 0x1:return(0x0,react_jsx_runtime[_0xb9cd3f(0xeb)])(_univerjs_icons[_0xb9cd3f(0x133)],{});case 0x2:return(0x0,react_jsx_runtime[_0xb9cd3f(0xeb)])(_univerjs_icons[_0xb9cd3f(0x120)],{});case 0x3:return(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0xb9cd3f(0x18b)],{});default:return null;}}return(0x0,react_jsx_runtime[_0x3d9bbc(0xeb)])(_0x3d9bbc(0xce),{'className':(0x0,_univerjs_design[_0x3d9bbc(0x123)])('univer-mt-5\x20univer-max-h-72\x20univer-overflow-y-auto\x20univer-overflow-x-hidden',_univerjs_design['scrollbarClassName']),'children':(0x0,react_jsx_runtime[_0x3d9bbc(0xeb)])('ul',{'className':_0x3d9bbc(0xbd),'children':_0x296c9c[_0x3d9bbc(0xb6)]((_0xfa11f5,_0x2be42f)=>{const _0x1e894e=_0x3d9bbc;return(0x0,react_jsx_runtime[_0x1e894e(0xeb)])('li',{'children':(0x0,react_jsx_runtime['jsxs'])('a',{'className':_0x1e894e(0x9b),'href':_0xfa11f5[_0x1e894e(0x1e7)],'target':'_blank','rel':_0x1e894e(0x16e),'children':[(0x0,react_jsx_runtime[_0x1e894e(0x1eb)])(_0x1e894e(0xa4),{'className':'univer-flex\x20univer-w-[calc(100%-48px)]\x20univer-items-center','children':[(0x0,react_jsx_runtime[_0x1e894e(0xeb)])(_0x1e894e(0xa4),{'className':'univer-flex\x20univer-h-5\x20univer-text-xl','children':_0x1879e4(_0xfa11f5['type'])}),(0x0,react_jsx_runtime[_0x1e894e(0xeb)])(_univerjs_design[_0x1e894e(0xde)],{'showIfEllipsis':!![],'title':_0xfa11f5[_0x1e894e(0x1b5)],'asChild':!![],'children':(0x0,react_jsx_runtime[_0x1e894e(0xeb)])(_0x1e894e(0xa4),{'className':_0x1e894e(0x198),'children':_0xfa11f5[_0x1e894e(0x1b5)]})})]}),(0x0,react_jsx_runtime[_0x1e894e(0xeb)])('span',{'className':'univer-flex\x20univer-size-6\x20univer-items-center\x20univer-justify-center\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-p-0\x20univer-text-base\x20univer-text-gray-600\x20univer-outline-none\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-text-gray-200\x20dark:hover:!univer-bg-gray-600','children':(0x0,react_jsx_runtime[_0x1e894e(0xeb)])(_univerjs_icons[_0x1e894e(0xcf)],{})})]})},_0x2be42f);})})});}const DOCX='application/vnd.openxmlformats-officedocument.wordprocessingml.document',XLSX='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',XLSM='application/vnd.ms-excel.sheet.macroEnabled.12',XLTX=_0x5cc5d6(0xff),PPTX=_0x5cc5d6(0x1d3),UNIT_CONTENT_TYPE={[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x131)]]:[''],[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x1d0)]]:[DOCX],[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x126)]]:[XLSX,XLSM,XLTX],[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x1f7)]]:[PPTX],[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x1ca)]]:[''],[_univerjs_core[_0x5cc5d6(0x8e)][_0x5cc5d6(0x189)]]:['']},CONTENT_TYPE_EXTNAME={[DOCX]:_0x5cc5d6(0x100),[XLSX]:'xlsx',[XLSM]:_0x5cc5d6(0x1c7),[XLTX]:_0x5cc5d6(0x13d),[PPTX]:_0x5cc5d6(0xaa)};function downloadFileByURL(_0x267ff3,_0x54dbbf,_0x45f8e3){const _0x499b52=_0x5cc5d6,_0x188c28=document['createElement']('a');_0x188c28[_0x499b52(0x1ae)]=_0x267ff3,_0x188c28[_0x499b52(0x19e)][_0x499b52(0x13c)]=_0x499b52(0x1a2),_0x188c28[_0x499b52(0x1fd)]=_0x54dbbf+'.'+_0x45f8e3,document[_0x499b52(0xb8)]['appendChild'](_0x188c28),_0x188c28['click'](),document[_0x499b52(0xb8)][_0x499b52(0xa0)](_0x188c28);}function downloadFile(_0x454a78,_0x2e75f3,_0x584ce1){const _0x4ceba9=_0x5cc5d6,_0x3ad059=URL[_0x4ceba9(0x1bb)](_0x454a78);downloadFileByURL(_0x3ad059,_0x2e75f3,_0x584ce1),URL[_0x4ceba9(0x1c0)](_0x3ad059);}function getUniverInstanceTypeByFile(_0xf677d8){const _0x2b3426=_0x5cc5d6,_0x279a11=_0xf677d8[_0x2b3426(0x1b5)][_0x2b3426(0x1b0)]('.')[_0x2b3426(0x171)]();if(!_0x279a11)return _univerjs_core[_0x2b3426(0x8e)][_0x2b3426(0x131)];const _0x486c6b=getUnitTypeList();let _0x14aef2=_univerjs_core[_0x2b3426(0x8e)][_0x2b3426(0x131)];return _0x486c6b[_0x2b3426(0x1e8)](_0x2ffec7=>{if(isUniverInstanceTypeFileByExt(_0x279a11,_0x2ffec7))return _0x14aef2=_0x2ffec7,!![];return![];}),_0x14aef2;}function getUnitTypeList(){const _0x354d8d=_0x5cc5d6;return Object[_0x354d8d(0xb2)](_univerjs_core[_0x354d8d(0x8e)])['filter'](_0x3f0e27=>typeof _0x3f0e27===_0x354d8d(0x1be));}function isUniverInstanceTypeFileByExt(_0x111988,_0x49d904){const _0x326f51=_0x5cc5d6;return UNIT_CONTENT_TYPE[_0x49d904][_0x326f51(0xb6)](_0x3699d9=>(CONTENT_TYPE_EXTNAME[_0x3699d9]||'')[_0x326f51(0x1a7)]())[_0x326f51(0xbf)](_0x111988['toLowerCase']());}function getUploadFile(_0x194d60,_0x9eb034=![]){const _0x475f3b=_0x5cc5d6,_0x130b3d=_0x194d60[_0x475f3b(0xb6)](_0x5be223=>UNIT_CONTENT_TYPE[_0x5be223])[_0x475f3b(0xf7)](',');return new Promise((_0x536f6b,_0x5ab98e)=>{const _0x3c8a55=_0x475f3b,_0x147335=document[_0x3c8a55(0x1e4)](_0x3c8a55(0xb3));_0x147335[_0x3c8a55(0x1e9)]=_0x3c8a55(0x14b),_0x147335[_0x3c8a55(0xa7)]=_0x130b3d,_0x147335[_0x3c8a55(0x95)]=_0x9eb034,_0x147335[_0x3c8a55(0x81)]('change',_0x264573=>{const _0x557880=_0x3c8a55,_0x183603=_0x264573[_0x557880(0x156)];if(!_0x183603[_0x557880(0x20a)]||_0x183603[_0x557880(0x20a)]['length']===0x0){_0x5ab98e(null);throw new Error(_0x557880(0x148));}_0x536f6b(_0x183603[_0x557880(0x20a)]);}),_0x147335['click']();});}async function getFileByURL(_0x2660a1,_0x92fc15){const _0xeba1eb=_0x5cc5d6;try{var _0x352ef5,_0x2dac66,_0x396136;const _0xfda46c=await _0x92fc15[_0xeba1eb(0xf0)](_0x2660a1,{'responseType':_0xeba1eb(0x151)}),_0x25594a=_0xfda46c[_0xeba1eb(0xb8)],_0x37a06a=(_0x352ef5=(_0x2dac66=_0xfda46c[_0xeba1eb(0xe5)]['get'](_0xeba1eb(0x130)))===null||_0x2dac66===void 0x0?void 0x0:_0x2dac66['join'](',\x20'))!==null&&_0x352ef5!==void 0x0?_0x352ef5:_0xeba1eb(0x166);let _0xfab042=_0xeba1eb(0x14c)+(CONTENT_TYPE_EXTNAME[_0x37a06a]||_0xeba1eb(0xe4));const _0x56ffe1=(_0x396136=_0xfda46c['headers'][_0xeba1eb(0xf0)](_0xeba1eb(0x16c)))===null||_0x396136===void 0x0?void 0x0:_0x396136[_0xeba1eb(0xf7)](',\x20');if(_0x56ffe1){const _0xcfd05f=_0x56ffe1['match'](/filename=(.+)/);if(_0xcfd05f&&_0xcfd05f[0x1])_0xfab042=_0xcfd05f[0x1];}else _0xfab042=getFileNameFromURL(_0x2660a1)||_0xfab042;return new File([_0x25594a],_0xfab042,{'type':_0x37a06a});}catch(_0x2fc7ce){console['error'](_0xeba1eb(0x1b9),_0x2fc7ce);return;}}function getFileNameFromURL(_0x71cfc9){const _0x366a0f=_0x5cc5d6;try{return new URL(_0x71cfc9)[_0x366a0f(0xbc)][_0x366a0f(0x1b0)]('/')[_0x366a0f(0x171)]();}catch(_0x23e735){console[_0x366a0f(0x125)](_0x366a0f(0x142),_0x23e735);return;}}function bufferToFile(_0x34944b){const _0x5da23e=_0x5cc5d6,_0x4c76f6=new Blob([_0x34944b[_0x5da23e(0x1ed)]],{'type':_0x5da23e(0x80)});return new File([_0x4c76f6],_0x5da23e(0x102));}function replaceType(_0x3eecaa,_0x349831){const _0x5403e7=_0x5cc5d6;return _0x3eecaa[_0x5403e7(0x191)]('{type}',_0x349831);}function replaceTaskID(_0x24cf50,_0x36d2ab){const _0x2b1e72=_0x5cc5d6;return _0x24cf50[_0x2b1e72(0x191)](_0x2b1e72(0x1aa),_0x36d2ab);}function replaceFileID(_0x17defb,_0x2da5e2){return _0x17defb['replace']('{fileID}',_0x2da5e2);}function __decorateParam(_0x272f9a,_0xb8be9d){return function(_0x3c5407,_0x201e20){_0xb8be9d(_0x3c5407,_0x201e20,_0x272f9a);};}function __decorate(_0x273c5a,_0x46d52b,_0xa14ae9,_0x4a277f){const _0x3751aa=_0x5cc5d6;var _0x7af58d=arguments[_0x3751aa(0x186)],_0x2e0b4d=_0x7af58d<0x3?_0x46d52b:_0x4a277f===null?_0x4a277f=Object['getOwnPropertyDescriptor'](_0x46d52b,_0xa14ae9):_0x4a277f,_0x2569c2;if(typeof Reflect===_0x3751aa(0x1fa)&&typeof Reflect[_0x3751aa(0x13a)]==='function')_0x2e0b4d=Reflect['decorate'](_0x273c5a,_0x46d52b,_0xa14ae9,_0x4a277f);else{for(var _0x28ff6a=_0x273c5a[_0x3751aa(0x186)]-0x1;_0x28ff6a>=0x0;_0x28ff6a--)if(_0x2569c2=_0x273c5a[_0x28ff6a])_0x2e0b4d=(_0x7af58d<0x3?_0x2569c2(_0x2e0b4d):_0x7af58d>0x3?_0x2569c2(_0x46d52b,_0xa14ae9,_0x2e0b4d):_0x2569c2(_0x46d52b,_0xa14ae9))||_0x2e0b4d;}return _0x7af58d>0x3&&_0x2e0b4d&&Object[_0x3751aa(0x196)](_0x46d52b,_0xa14ae9,_0x2e0b4d),_0x2e0b4d;}const DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY=_0x5cc5d6(0x13b),DEFAULT_EXCHANGE_IMPORT_SERVER_URL_KEY=_0x5cc5d6(0x161),DEFAULT_EXCHANGE_EXPORT_SERVER_URL_KEY='/universer-api/exchange/{type}/export',DEFAULT_EXCHANGE_GET_TASK_SERVER_URL_KEY='/universer-api/exchange/task/{taskID}',DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY=_0x5cc5d6(0xc0),DEFAULT_EXCHANGE_MAX_TIMEOUT_TIME_KEY=0x1d4c0;let ImportOutputType=function(_0x1d2abd){const _0x4ca0b1=_0x5cc5d6;return _0x1d2abd[_0x1d2abd[_0x4ca0b1(0xe1)]=0x0]=_0x4ca0b1(0xe1),_0x1d2abd[_0x1d2abd[_0x4ca0b1(0x141)]=0x1]=_0x4ca0b1(0x141),_0x1d2abd[_0x1d2abd[_0x4ca0b1(0x11a)]=0x2]=_0x4ca0b1(0x11a),_0x1d2abd[_0x1d2abd[_0x4ca0b1(0x189)]=-0x1]='UNRECOGNIZED',_0x1d2abd;}({});const IRequestService=(0x0,_univerjs_core[_0x5cc5d6(0x129)])(_0x5cc5d6(0x97));let RequestService=class RequestService{constructor(_0x275ec2,_0x1d76c6){const _0x9efdfb=_0x5cc5d6;this[_0x9efdfb(0x1d4)]=_0x275ec2,this[_0x9efdfb(0x162)]=_0x1d76c6,_defineProperty(this,_0x9efdfb(0x1a9),new Set());}['dispose'](){}['setTaskInterrupted'](_0x83b123){const _0xfd3063=_0x5cc5d6;this[_0xfd3063(0x1a9)][_0xfd3063(0x1da)](_0x83b123);}[_0x5cc5d6(0x172)](){const _0x2fdd86=_0x5cc5d6;this[_0x2fdd86(0x1a9)][_0x2fdd86(0x1a5)]();}async[_0x5cc5d6(0xf2)](_0x5e4900,_0x5daab9=0x0,_0xd1e4f0=![]){const _0x4834a3=_0x5cc5d6;if(typeof _0x5e4900==='string'){const _0x171e83=await getFileByURL(_0x5e4900,this[_0x4834a3(0x162)]);if(!_0x171e83)throw new Error('upload\x20request\x20failed:\x20failed\x20to\x20read\x20source\x20file\x20from\x20url');_0x5e4900=_0x171e83;}_0x5daab9=_0x5daab9||_0x5e4900[_0x4834a3(0x13f)];const _0x1c277c=new FormData();_0x1c277c[_0x4834a3(0x119)](_0x4834a3(0x14b),_0x5e4900);try{const _0x3987e8=this['_getUploadFileURL']()+_0x4834a3(0x87)+_0x5daab9+_0x4834a3(0x14e)+_univerjs_protocol[_0x4834a3(0x1c3)][_0x4834a3(0x16a)]+_0x4834a3(0x136)+_0xd1e4f0,_0x46382a={'body':_0x1c277c},_0x3acfb3=(await this['_httpService'][_0x4834a3(0x89)](_0x3987e8,_0x46382a))[_0x4834a3(0xb8)];if(_0x3acfb3[_0x4834a3(0x125)]&&_0x3acfb3[_0x4834a3(0x125)][_0x4834a3(0xaf)]!==_univerjs_protocol['ErrorCode']['OK'])throw new Error(this[_0x4834a3(0x16b)]('upload\x20request\x20failed',_0x3acfb3[_0x4834a3(0x125)]));return _0x3acfb3;}catch(_0x280d34){if(_0x280d34 instanceof Error)throw _0x280d34;throw new Error(this['_buildHttpErrorMessage']('upload\x20request\x20failed',_0x280d34));}}async['import'](_0x511185){const _0x176f40=_0x5cc5d6,{fileID:_0x418013,type:_0x281701,outputType:_0x40b4d9,minSheetColumnCount:_0x38d5d7,minSheetRowCount:_0x36dae8}=_0x511185;try{const _0x1773ba=replaceType(this[_0x176f40(0x182)](),''+_0x281701),_0x46059d={'body':{'fileID':_0x418013,'outputType':_0x40b4d9,'minSheetColumnCount':_0x38d5d7,'minSheetRowCount':_0x36dae8}},_0x3666cd=(await this[_0x176f40(0x162)][_0x176f40(0x89)](_0x1773ba,_0x46059d))[_0x176f40(0xb8)];if(_0x3666cd[_0x176f40(0x125)]&&_0x3666cd[_0x176f40(0x125)][_0x176f40(0xaf)]!==_univerjs_protocol[_0x176f40(0x16f)]['OK'])return;return _0x3666cd;}catch(_0x5ed0b4){return;}}async[_0x5cc5d6(0xee)](_0x3aa8b6){const _0x3882a3=_0x5cc5d6,{unitID:_0x3c2dff,jsonID:_0x39a22f,type:_0x567b9b,sscSwitch:_0x275aa0,useImageUrl:_0xeefa52,ignoreTableExport:_0x51bece}=_0x3aa8b6;try{const _0x4a13fc=replaceType(this[_0x3882a3(0x159)](),''+_0x567b9b),_0x24a7f7={'body':{'unitID':_0x3c2dff,'jsonID':_0x39a22f,'type':_0x567b9b,'sscSwitch':_0x275aa0,'useImageUrl':_0xeefa52,'ignoreTableExport':_0x51bece}},_0x620d7e=(await this[_0x3882a3(0x162)][_0x3882a3(0x89)](_0x4a13fc,_0x24a7f7))[_0x3882a3(0xb8)];if(_0x620d7e[_0x3882a3(0x125)]&&_0x620d7e[_0x3882a3(0x125)][_0x3882a3(0xaf)]!==_univerjs_protocol[_0x3882a3(0x16f)]['OK'])return;return _0x620d7e;}catch(_0x27243b){return;}}async[_0x5cc5d6(0xf8)](_0x40dcc2){return new Promise((_0x11e79d,_0x2ccf8b)=>{const _0x4e1b4c=_0x4a23;try{let _0x75576f=0x0;const _0x3e872e=replaceTaskID(this[_0x4e1b4c(0xbb)](),''+_0x40dcc2),_0x2f8172=this[_0x4e1b4c(0x168)](),_0x2768ff=async()=>{const _0x56eddf=_0x4e1b4c;if(this[_0x56eddf(0x1a9)][_0x56eddf(0x94)](_0x40dcc2))return;const _0x52c733=(await this[_0x56eddf(0x162)][_0x56eddf(0xf0)](_0x3e872e))[_0x56eddf(0xb8)];if(_0x52c733[_0x56eddf(0x125)]&&_0x52c733[_0x56eddf(0x125)][_0x56eddf(0xaf)]===_univerjs_protocol[_0x56eddf(0x16f)]['OK']){if(_0x52c733['status']==='done')_0x11e79d(_0x52c733);else{if(_0x52c733[_0x56eddf(0x18d)]===_0x56eddf(0x197)){let _0x2efa8a=0x3e8;if(_0x75576f>=_0x2f8172){_0x2ccf8b(_0x52c733);return;}else{if(_0x75576f>=0x7530)_0x2efa8a=0x1388;}_0x75576f+=_0x2efa8a,setTimeout(_0x2768ff,_0x2efa8a);}else _0x2ccf8b(_0x52c733);}}else _0x2ccf8b(_0x52c733);};_0x2768ff();}catch(_0x15cffc){_0x2ccf8b(_0x15cffc instanceof Error?_0x15cffc:new Error(String(_0x15cffc)));}});}async['signUrl'](_0x33c3d5){const _0x17aa16=_0x5cc5d6;try{const _0x358651=replaceFileID(this[_0x17aa16(0x1e2)](),''+_0x33c3d5);return(await this['_httpService']['get'](_0x358651))[_0x17aa16(0xb8)];}catch(_0x4b0cb4){return;}}async[_0x5cc5d6(0xc4)](_0x16d04d){const _0x5e7e5f=_0x5cc5d6;try{return(await this[_0x5e7e5f(0x162)][_0x5e7e5f(0xf0)](_0x16d04d,{'responseType':_0x5e7e5f(0xb7)}))['body'];}catch(_0xfc1571){return;}}[_0x5cc5d6(0x16b)](_0x230bda,_0x195c2b){const _0x4bd976=this['_extractErrorDetail'](_0x195c2b);if(!_0x4bd976)return _0x230bda;return _0x230bda+':\x20'+_0x4bd976;}['_buildHttpErrorMessage'](_0x2b2f12,_0x3f6ca1){const _0x4a932b=_0x5cc5d6;if(_0x3f6ca1 instanceof _univerjs_network['HTTPResponseError']){const _0x2e0417=typeof _0x3f6ca1['status']===_0x4a932b(0x1be)?''+_0x3f6ca1[_0x4a932b(0x18d)]+(_0x3f6ca1[_0x4a932b(0x127)]?'\x20'+_0x3f6ca1['statusText']:''):void 0x0,_0x21a924=this[_0x4a932b(0x122)](_0x3f6ca1[_0x4a932b(0x125)]);if(_0x2e0417&&_0x21a924)return _0x2b2f12+':\x20HTTP\x20'+_0x2e0417+_0x4a932b(0x15f)+_0x21a924;if(_0x2e0417)return _0x2b2f12+_0x4a932b(0x103)+_0x2e0417;if(_0x21a924)return _0x2b2f12+':\x20'+_0x21a924;return _0x2b2f12;}const _0x58ca9c=this[_0x4a932b(0x122)](_0x3f6ca1);if(!_0x58ca9c)return _0x2b2f12;return _0x2b2f12+':\x20'+_0x58ca9c;}[_0x5cc5d6(0x122)](_0x218cf0){const _0x11deb3=_0x5cc5d6;if(typeof _0x218cf0===_0x11deb3(0x209)){const _0x5b9419=_0x218cf0[_0x11deb3(0x17c)]();return _0x5b9419['length']>0x0?_0x5b9419:void 0x0;}if(_0x218cf0 instanceof Error)return this[_0x11deb3(0x122)](_0x218cf0[_0x11deb3(0x12c)]);if(!_0x218cf0||typeof _0x218cf0!=='object'||Array['isArray'](_0x218cf0))return;const _0x59bc14=_0x218cf0,_0xa19da4=this[_0x11deb3(0x122)](_0x59bc14[_0x11deb3(0x12c)]);if(_0xa19da4)return _0xa19da4;if(_0x59bc14[_0x11deb3(0x125)]&&typeof _0x59bc14[_0x11deb3(0x125)]===_0x11deb3(0x1fa)&&!Array[_0x11deb3(0x163)](_0x59bc14['error'])){const _0x482ddf=this[_0x11deb3(0x122)](_0x59bc14[_0x11deb3(0x125)]);if(_0x482ddf)return _0x482ddf;}}[_0x5cc5d6(0xc7)](){const _0x54ace2=_0x5cc5d6;var _0x4c3729;const _0x57de45=this[_0x54ace2(0x1d4)]['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x4c3729=_0x57de45===null||_0x57de45===void 0x0?void 0x0:_0x57de45[_0x54ace2(0x183)])!==null&&_0x4c3729!==void 0x0?_0x4c3729:DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY;}['_getImportURL'](){const _0x19973b=_0x5cc5d6;var _0x3157c4;const _0x5917ab=this[_0x19973b(0x1d4)][_0x19973b(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x3157c4=_0x5917ab===null||_0x5917ab===void 0x0?void 0x0:_0x5917ab[_0x19973b(0x11f)])!==null&&_0x3157c4!==void 0x0?_0x3157c4:DEFAULT_EXCHANGE_IMPORT_SERVER_URL_KEY;}[_0x5cc5d6(0x159)](){const _0x4e099e=_0x5cc5d6;var _0xce8cd6;const _0x5a95e8=this['_configService']['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0xce8cd6=_0x5a95e8===null||_0x5a95e8===void 0x0?void 0x0:_0x5a95e8[_0x4e099e(0x206)])!==null&&_0xce8cd6!==void 0x0?_0xce8cd6:DEFAULT_EXCHANGE_EXPORT_SERVER_URL_KEY;}[_0x5cc5d6(0xbb)](){const _0x5cbb86=_0x5cc5d6;var _0x8acf49;const _0x4d8419=this[_0x5cbb86(0x1d4)][_0x5cbb86(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x8acf49=_0x4d8419===null||_0x4d8419===void 0x0?void 0x0:_0x4d8419[_0x5cbb86(0x115)])!==null&&_0x8acf49!==void 0x0?_0x8acf49:DEFAULT_EXCHANGE_GET_TASK_SERVER_URL_KEY;}[_0x5cc5d6(0x1e2)](){const _0x5eca6e=_0x5cc5d6;var _0x28ef9d;const _0x4dd985=this[_0x5eca6e(0x1d4)][_0x5eca6e(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x28ef9d=_0x4dd985===null||_0x4dd985===void 0x0?void 0x0:_0x4dd985[_0x5eca6e(0x124)])!==null&&_0x28ef9d!==void 0x0?_0x28ef9d:DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY;}[_0x5cc5d6(0x168)](){const _0x5bf4f5=_0x5cc5d6;var _0x2c06e5;const _0x5d7fbe=this[_0x5bf4f5(0x1d4)][_0x5bf4f5(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x2c06e5=_0x5d7fbe===null||_0x5d7fbe===void 0x0?void 0x0:_0x5d7fbe[_0x5bf4f5(0x8d)])!==null&&_0x2c06e5!==void 0x0?_0x2c06e5:DEFAULT_EXCHANGE_MAX_TIMEOUT_TIME_KEY;}};function _0x5463(){const _0x214fb4=['_import','toStringTag','xlsx','headers','export\x20error','next','catch','workbook','success','jsx','_importFileToUnitId','UNIVER_EXCHANGE_CLIENT_PLUGIN','export','4MTTyrz','get','toString','upload','_list','_requestState$','_getUnitDocJson','saveSnapshot','join','getTask','importDOCXToUnitId','_clearProgress','IUniverInstanceService','CONNECTOR_DATA_TOO_LARGE','ExchangeService','MessageType','application/vnd.openxmlformats-officedocument.spreadsheetml.template','docx','enableServerSideComputing','file.json',':\x20HTTP\x20','sheetBlocks','upload\x20failed:\x20FileId\x20is\x20empty','downloadFile','10743363hnHtOk','getLatestCsReqIdBySid','exportDOCXByUnitId','unit','400822YMXmbP','b64EncodeUnicode','225750kXIHNo','pluginName','univer-pl-2\x20univer-pr-4','IMPORT','progress$','Method\x20not\x20implemented.','Failed\x20to\x20get\x20jsonID\x20from\x20task','saveSheetBlock','getTaskServerUrl','_importToSnapshot','updateSnapshot','_showUploadMessage','append','JSON','_list$','_emitProgress','EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY','importDOCXToSnapshot','importServerUrl','XlsxMultiIcon','_getUnitIDDoc','_extractErrorDetail','clsx','signUrlServerUrl','error','UNIVER_SHEET','statusText','list$','createIdentifier','ErrorIcon','getDeserializedSheetBlock','message','CONTENT','getUploadFile','UniverNetworkPlugin','Content-Type','UNIVER_UNKNOWN','_export','DocMultiIcon','Inject','_addTotalCount','&flate=','fileID','_progress$','_uploadNotificationService','decorate','/universer-api/stream/file/upload','display','xltx','transformSnapshotToWorkbookData','size','IExchangeService','UNIT','Error\x20getting\x20file\x20name\x20from\x20URL:','univer-flex','floor','constructor','Failed\x20to\x20transform\x20snapshot\x20to\x20string','GET_FILE','No\x20file\x20selected','ignoreTableExport','SUCCESS','file','file.','import\x20error','&source=','_getUnitID','options','blob','38647IQHxMl','keys','importWorkbookDataToUnitId','shift','currentTarget','_completeProgress','snapshot','_getExportURL','setTaskInterrupted','textDecoder','updateState','univer-h-7\x20univer-cursor-pointer\x20univer-select-none\x20univer-rounded-md\x20univer-border-0\x20univer-border-transparent\x20univer-bg-transparent\x20univer-px-2\x20univer-py-0\x20univer-text-sm\x20univer-text-primary-600\x20univer-transition-all\x20univer-duration-150\x20hover:univer-bg-primary-50','UploadNotificationState','\x20-\x20','_requestService','/universer-api/exchange/{type}/import','_httpService','isArray','UniverLicensePlugin','useEffect','application/octet-stream','GET_JSON','_getMaxPollingTime','encode','HttpImport','_buildProtocolErrorMessage','content-disposition','UPLOAD','noreferrer','ErrorCode','univer-mt-3\x20univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-py-0\x20univer-pl-2\x20univer-pr-1','pop','clearTaskInterrupted','UniverExchangeClientPlugin','unitID','minSheetRowCount','IUploadNotificationService','_getMinSheetColumnCount','disableCellImageConversion','Failed\x20to\x20parse\x20json','univer-fixed\x20univer-bottom-12\x20univer-right-3\x20univer-z-[1000]\x20univer-box-border\x20univer-flex\x20univer-w-[372px]\x20univer-flex-col\x20univer-rounded-md\x20univer-bg-white\x20univer-px-3\x20univer-pb-4\x20univer-pt-5\x20univer-shadow-md','stringify','trim','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','6078208mUqOKP','univer-pro.exchange-client.operate.service','Info','_visible$','_getImportURL','uploadFileServerUrl','getCurrentUnitOfType','univer-text-green-500','length','searchParams','symbol','UNRECOGNIZED','onReady','SlideMultiIcon','connectInjector','status','upload\x20failed:\x20missing\x20FileId\x20in\x20response','exchange-client.config','HTTPService','replace','IRequestService','importFileToUnitId','unshift','_messageService','defineProperty','pending','univer-ml-1\x20univer-truncate\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','SIGN_URL','unsubscribe','url','originalMeta','copyFileMeta','style','Get\x20outputType\x20error','useState','_showNetworkError','none','subscribe','_uiPartsService','clear','interrupt','toLowerCase','exchange.interrupt','_taskInterrupted','{taskID}','decode','transformSnapshotJsonToWorkbookData','univer-ml-1.5\x20univer-font-semibold\x20univer-leading-6\x20univer-text-gray-900\x20dark:!univer-text-white','href','exchange.downloadSuccess','split','univer-h-1.5\x20univer-rounded-lg\x20univer-bg-primary-600\x20univer-transition-[width]\x20univer-duration-500','BuiltInUIPart','forEach','getCurrentUnitForType','name','univer-mx-0\x20univer-mb-3\x20univer-mt-4\x20univer-h-1.5\x20univer-w-[324px]\x20univer-rounded-lg\x20univer-bg-gray-200','univer-h-6\x20univer-text-2xl','univer-mb-3\x20univer-py-0\x20univer-pl-2\x20univer-pr-4\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','Error\x20fetching\x20file\x20from\x20URL:','transformWorkbookDataToSnapshot','createObjectURL','pushLink','getUnitOnRev','number','importXLSXToSnapshot','revokeObjectURL','_getUnitJson','_importTaskId','FileSource','uploadFileToUnitId','_getDownloadEndpointURL','_getUnitName','xlsm','Success','exportDOCXBySnapshot','UNIVER_PROJECT','registerDependencies','UPLOADING','visible$','univer-pro.exchange-client.upload-notification.service','univer-mt-5\x20univer-flex\x20univer-flex-col','UNIVER_DOC','exchange.uploadSuccessTip','_sheetBlockCache','application/vnd.openxmlformats-officedocument.presentationml.presentation','_configService','exchange.internalError','RequestService','requestState$','toPrimitive','function','add','_doneUploadTaskCount','sheets','univer-text-sm\x20univer-text-gray-500','blockID','_uploadTaskNotDone','disposeWithMe','parse','_getSignURL','_refresh','createElement','getSheetBlocksFromSnapshot','_univerInstanceService','link','some','type','Plugin','jsxs','Module','buffer','univer-pro.exchange-client.exchange.service','outputType','EXPORT','title','Warning','sign\x20url\x20error','getConfig','Subject','IUIPartsService','UNIVER_SLIDE','UploadNotificationContainer','ERROR','object','exchange.uploadSuccess','onStarting','download','_state$','resolve','_signUrl','_getMinSheetRowCount','show','_showDownloadMessage','location','univer-text-blue-500','exportServerUrl','_totalUploadTaskCount','asObservable','string','files','application/json','addEventListener','interruptImportTask','setConfig','exportXLSXBySnapshot','getSnapshot','_getIgnoreTableExport','?size=','GET_TASK','post','SuccessIcon','exchange.networkError','origin','maxTimeoutTime','UniverInstanceType','taskID','exchange.uploading','jsonID','packageName','LocaleService','has','multiple','Injector','univer-pro.exchange-client.request.service','touchDependencies','b64DecodeUnicode','exchange.downloading','univer-flex\x20univer-justify-between\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-px-2\x20univer-py-1\x20univer-text-gray-900\x20univer-no-underline\x20univer-outline-none\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-text-white\x20dark:hover:!univer-bg-gray-600','workbook.json','Error','IExchangeOperateService','iterator','removeChild','transformDocumentDataToSnapshot','CloseIcon','registerLink','span','signUrl','exchange.cancel','accept','_exchangeService','_getDisableCellImageConversion','pptx','10341410lWFLFh','useDependency','merge','import','code','importXLSXToUnitId','_fileTypeError','values','input','prototype','_exportBySnapshot','map','text','body','state$','UploadNotificationService','_getTaskURL','pathname','univer-m-0\x20univer-flex\x20univer-list-none\x20univer-flex-col\x20univer-gap-2\x20univer-p-0','_upload','includes','/universer-api/file/{fileID}/sign-url','4XihmNp','set','button','getTextFromUrl','data','fetchMissingChangesets','_getUploadFileURL','complete','transformSnapshotToDocumentData','3371064WjzYEs','_injector','default','_addDoneTask','div','ShareRangeIcon','getUnitId','exportXLSXByUnitId','_getLinkByUnitId','Failed\x20to\x20get\x20fileID\x20from\x20task','_registerComponents','294pMauFo','ExchangeOperateService','getUniverInstanceTypeByFile','dispose','IConfigService','BehaviorSubject','transformSnapshotJsonToDocumentData','_localeService','IMessageService','Tooltip','Disposable','FileId','UNDEFINED'];_0x5463=function(){return _0x214fb4;};return _0x5463();}RequestService=__decorate([__decorateParam(0x0,_univerjs_core[_0x5cc5d6(0xd9)]),__decorateParam(0x1,(0x0,_univerjs_core[_0x5cc5d6(0x134)])(_univerjs_network[_0x5cc5d6(0x190)]))],RequestService);function transformWorkbookSnapshotMetaToString(_0x4d67c1){const _0x1e7d21=_0x5cc5d6,_0x455b3e=_0x4d67c1[_0x1e7d21(0xe9)];if(!_0x455b3e)return null;const _0x1feab7={};if(_0x455b3e[_0x1e7d21(0x1dc)])Object['keys'](_0x455b3e[_0x1e7d21(0x1dc)])[_0x1e7d21(0x1b3)](_0x54f663=>{const _0x560a7b=_0x1e7d21,_0x385f82=_0x455b3e[_0x560a7b(0x1dc)][_0x54f663];_0x1feab7[_0x54f663]={..._0x385f82,'originalMeta':(0x0,_univerjs_pro_collaboration[_0x560a7b(0x10c)])(_univerjs_pro_collaboration['textDecoder'][_0x560a7b(0x1ab)](_0x385f82[_0x560a7b(0x19c)]))};});const _0x4b3446=(0x0,_univerjs_pro_collaboration['b64EncodeUnicode'])(_univerjs_pro_collaboration[_0x1e7d21(0x15b)][_0x1e7d21(0x1ab)](_0x455b3e['originalMeta']));return{..._0x4d67c1,'workbook':{..._0x455b3e,'originalMeta':_0x4b3446,'sheets':_0x1feab7},'doc':{}};}function transformDocumentSnapshotMetaToString(_0x263b25){const _0x28d658=_0x5cc5d6,_0x44efce=_0x263b25['doc'];if(!_0x44efce)return null;const _0x2016bd=(0x0,_univerjs_pro_collaboration[_0x28d658(0x10c)])(_univerjs_pro_collaboration['textDecoder'][_0x28d658(0x1ab)](_0x44efce['originalMeta']));return{..._0x263b25,'workbook':{},'doc':{..._0x44efce,'originalMeta':_0x2016bd}};}function transformSheetBlockMetaToString(_0x1d8130){const _0x2ca5c0=_0x5cc5d6,_0x29cb76={};return _0x1d8130[_0x2ca5c0(0x1b3)](_0x55591f=>{const _0x527191=_0x2ca5c0;_0x29cb76[_0x55591f['id']]={..._0x55591f,'data':(0x0,_univerjs_pro_collaboration[_0x527191(0x10c)])(_univerjs_pro_collaboration[_0x527191(0x15b)]['decode'](_0x55591f[_0x527191(0xc5)]))};}),_0x29cb76;}async function transformWorkbookDataToSnapshotJson(_0x2b5787){const _0x426055=_0x5cc5d6;var _0x5b2167;const _0x4207fe={'metadata':void 0x0},_0x1cdc72=_0x2b5787['id'],_0x39c90f=(_0x5b2167=_0x2b5787['rev'])!==null&&_0x5b2167!==void 0x0?_0x5b2167:0x0,_0xdddc2c=new ClientSnapshotServerService(),{snapshot:_0x50e343}=await(0x0,_univerjs_pro_collaboration[_0x426055(0x1ba)])(_0x4207fe,_0x2b5787,_0x1cdc72,_0x39c90f,_0xdddc2c),_0x57e567=await(0x0,_univerjs_pro_collaboration[_0x426055(0x1e5)])(_0x50e343,_0xdddc2c),_0x55af2d=transformWorkbookSnapshotMetaToString(_0x50e343);if(!_0x55af2d)throw new Error(_0x426055(0x146));return{'snapshot':_0x55af2d,'sheetBlocks':transformSheetBlockMetaToString(_0x57e567)};}async function transformDocumentDataToSnapshotJson(_0x3fa7f9){const _0x267c8c=_0x5cc5d6;var _0x48b727;const _0x2eec73={'metadata':void 0x0},_0x45c105=_0x3fa7f9['id'],{snapshot:_0x28fba0}=await(0x0,_univerjs_pro_collaboration[_0x267c8c(0xa1)])(_0x2eec73,_0x3fa7f9,_0x45c105,(_0x48b727=_0x3fa7f9['rev'])!==null&&_0x48b727!==void 0x0?_0x48b727:0x0,new ClientSnapshotServerService()),_0x1eb35c=transformDocumentSnapshotMetaToString(_0x28fba0);if(!_0x1eb35c)throw new Error(_0x267c8c(0x146));return{'snapshot':_0x1eb35c,'sheetBlocks':{}};}async function transformSnapshotJsonToWorkbookData(_0x2b137f){const _0x302616=_0x5cc5d6,_0x197b38=_0x2b137f[_0x302616(0x158)],_0x2a1250=_0x2b137f[_0x302616(0x104)]||{};return await(0x0,_univerjs_pro_collaboration[_0x302616(0x13e)])(_0x197b38,Object[_0x302616(0x153)](_0x2a1250)[_0x302616(0xb6)](_0x2101d6=>_0x2a1250[_0x2101d6])[_0x302616(0xb6)](_0x15b19d=>{const _0x1905bb=_0x302616;return{..._0x15b19d,'data':_0x15b19d[_0x1905bb(0xc5)]?JSON['parse']((0x0,_univerjs_pro_collaboration[_0x1905bb(0x99)])(_0x15b19d[_0x1905bb(0xc5)])):void 0x0};}));}function transformSnapshotJsonToDocumentData(_0x3b9cdf){const _0x17d801=_0x5cc5d6,_0x42728d=_0x3b9cdf[_0x17d801(0x158)];return(0x0,_univerjs_pro_collaboration[_0x17d801(0xc9)])(_0x42728d);}var ClientSnapshotServerService=class{constructor(){const _0x847ce2=_0x5cc5d6;_defineProperty(this,_0x847ce2(0x1d2),new Map());}[_0x5cc5d6(0x1bd)](){return Promise['resolve']({'snapshot':{'unitID':'','type':_univerjs_core['UniverInstanceType']['UNIVER_SHEET'],'rev':0x0,'workbook':void 0x0,'doc':void 0x0},'changesets':[],'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''}});}['getSheetBlock'](_0x3d2d87,_0x3ef56e){const _0x55dd2f=_0x5cc5d6,_0x5b9c52=this['_sheetBlockCache']['get'](_0x3ef56e[_0x55dd2f(0x1de)]);return Promise[_0x55dd2f(0x1ff)]({'block':_0x5b9c52,'error':{'code':_univerjs_protocol[_0x55dd2f(0x16f)]['OK'],'message':''}});}[_0x5cc5d6(0x12b)](_0x40f985,_0x3a00ae){const _0x3be016=_0x5cc5d6,_0x149b13=this[_0x3be016(0x1d2)][_0x3be016(0xf0)](_0x3a00ae[_0x3be016(0x1de)]);return Promise[_0x3be016(0x1ff)]({'block':_0x149b13===void 0x0?void 0x0:{..._0x149b13,'data':JSON[_0x3be016(0x1e1)](_univerjs_pro_collaboration[_0x3be016(0x15b)][_0x3be016(0x1ab)](_0x149b13['data']))},'error':{'code':_univerjs_protocol[_0x3be016(0x16f)]['OK'],'message':''}});}[_0x5cc5d6(0xc6)](){return Promise['resolve']({'changesets':[],'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''}});}['getResourcesRequest'](){const _0x339dc0=_0x5cc5d6;return Promise[_0x339dc0(0x1ff)]({'resources':{},'error':{'code':_univerjs_protocol[_0x339dc0(0x16f)]['OK'],'message':''}});}[_0x5cc5d6(0xf6)](){const _0x23dd44=_0x5cc5d6;return Promise[_0x23dd44(0x1ff)]({'error':{'code':_univerjs_protocol[_0x23dd44(0x16f)]['OK'],'message':''}});}[_0x5cc5d6(0x117)](){return Promise['resolve']({'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''}});}[_0x5cc5d6(0x114)](_0x2ef4b4,_0x3742f5){const _0x1ad8d2=_0x5cc5d6,{block:_0x347294}=_0x3742f5;if(!_0x347294)return Promise['resolve']({'error':{'code':_univerjs_protocol['ErrorCode'][_0x1ad8d2(0xe1)],'message':'block\x20is\x20required'},'blockID':''});return this['_sheetBlockCache'][_0x1ad8d2(0xc2)](_0x347294['id'],_0x347294),Promise['resolve']({'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''},'blockID':_0x347294['id']});}['saveChangeset'](){const _0x2ac278=_0x5cc5d6;return Promise['resolve']({'error':{'code':_univerjs_protocol[_0x2ac278(0x16f)]['OK'],'message':''},'concurrent':[]});}[_0x5cc5d6(0x19d)](){const _0x3ff244=_0x5cc5d6;return Promise[_0x3ff244(0x1ff)]({'error':void 0x0,'fileMetaId':''});}[_0x5cc5d6(0x108)](){const _0x298486=_0x5cc5d6;return Promise[_0x298486(0x1ff)]({'error':void 0x0,'latestReqID':0x0});}};let RequestState=function(_0x8190b8){const _0x5521c6=_0x5cc5d6;return _0x8190b8[_0x8190b8[_0x5521c6(0x16d)]=0x0]=_0x5521c6(0x16d),_0x8190b8[_0x8190b8[_0x5521c6(0x110)]=0x1]='IMPORT',_0x8190b8[_0x8190b8[_0x5521c6(0x1f0)]=0x2]=_0x5521c6(0x1f0),_0x8190b8[_0x8190b8['GET_TASK']=0x3]='GET_TASK',_0x8190b8[_0x8190b8[_0x5521c6(0x199)]=0x4]='SIGN_URL',_0x8190b8[_0x8190b8[_0x5521c6(0x167)]=0x5]=_0x5521c6(0x167),_0x8190b8[_0x8190b8[_0x5521c6(0x147)]=0x6]=_0x5521c6(0x147),_0x8190b8;}({});const IExchangeService=(0x0,_univerjs_core['createIdentifier'])(_0x5cc5d6(0x1ee));let ExchangeService=class ExchangeService extends _univerjs_core[_0x5cc5d6(0xdf)]{constructor(_0x296fc5,_0x190cd1,_0x591fa7){const _0x1b0754=_0x5cc5d6;super(),this[_0x1b0754(0x1d4)]=_0x296fc5,this['_httpService']=_0x190cd1,this[_0x1b0754(0x160)]=_0x591fa7,_defineProperty(this,_0x1b0754(0x1c2),null),_defineProperty(this,_0x1b0754(0xf4),new rxjs['Subject']()),_defineProperty(this,_0x1b0754(0x1d7),this[_0x1b0754(0xf4)]['asObservable']());}['dispose'](){const _0x243e40=_0x5cc5d6;super[_0x243e40(0xd8)](),this['_requestState$']['complete']();}async[_0x5cc5d6(0x11e)](_0x5f266a){const _0x12cb15=_0x5cc5d6,_0x513f5b=await this[_0x12cb15(0x116)](_0x5f266a,_univerjs_core[_0x12cb15(0x8e)][_0x12cb15(0x1d0)]);if(!_0x513f5b||!_0x513f5b[_0x12cb15(0x158)])return;const _0x1ac4a7=transformSnapshotJsonToDocumentData(_0x513f5b);if(!_0x1ac4a7)return;return _0x1ac4a7;}async[_0x5cc5d6(0x109)](_0x32e6ae){const _0x29d1f1=_0x5cc5d6;return this[_0x29d1f1(0x132)](_0x32e6ae,ImportOutputType[_0x29d1f1(0x141)],_univerjs_core[_0x29d1f1(0x8e)][_0x29d1f1(0x1d0)]);}async['exportDOCXBySnapshot'](_0x4139d3){const _0xf2278d=_0x5cc5d6,_0x806ac1=await transformDocumentDataToSnapshotJson(_0x4139d3);return this['_exportBySnapshot'](_0x806ac1,_univerjs_core[_0xf2278d(0x8e)][_0xf2278d(0x1d0)]);}async['importXLSXToSnapshot'](_0x1d03df){const _0x5a110a=_0x5cc5d6,_0x104eab=await this['_importToSnapshot'](_0x1d03df,_univerjs_core[_0x5a110a(0x8e)][_0x5a110a(0x126)]);if(!_0x104eab)return;const _0x1e60c9=await transformSnapshotJsonToWorkbookData(_0x104eab);if(!_0x1e60c9)return;return _0x1e60c9;}async[_0x5cc5d6(0xd1)](_0x538d59){const _0x278cdf=_0x5cc5d6;return this[_0x278cdf(0x132)](_0x538d59,ImportOutputType['UNIT'],_univerjs_core['UniverInstanceType'][_0x278cdf(0x126)]);}async[_0x5cc5d6(0x84)](_0x3e1781){const _0xbc9858=_0x5cc5d6,_0xc2857f=await transformWorkbookDataToSnapshotJson(_0x3e1781);return this[_0xbc9858(0xb5)](_0xc2857f,_univerjs_core['UniverInstanceType'][_0xbc9858(0x126)]);}async[_0x5cc5d6(0x193)](_0x1489b9,_0x212b9e){const _0x43a746=_0x5cc5d6;var _0x5ea785,_0x46987d;const _0x23dc3a=await this[_0x43a746(0xbe)](_0x1489b9);if(!_0x23dc3a)return;const _0x5ddd3c=await this[_0x43a746(0xe2)](_0x23dc3a,ImportOutputType[_0x43a746(0x141)],_0x212b9e);if(!_0x5ddd3c)return;this['_importTaskId']=_0x5ddd3c,this['_requestService'][_0x43a746(0x172)]();const _0x3fd1a6=await this['_requestService'][_0x43a746(0xf8)](_0x5ddd3c)[_0x43a746(0xe8)](_0x29a58e=>{const _0x243009=_0x43a746;var _0x244040;const _0x275bbd=_0x29a58e instanceof Error?_0x29a58e['message']:(_0x244040=_0x29a58e[_0x243009(0x125)])===null||_0x244040===void 0x0?void 0x0:_0x244040[_0x243009(0x12c)];this[_0x243009(0xf4)][_0x243009(0xe7)]({'error':{'code':_univerjs_protocol[_0x243009(0x16f)][_0x243009(0x189)],'message':_0x275bbd||''},'state':RequestState[_0x243009(0x88)]});});if(!_0x3fd1a6)return;const _0x22a37d=(_0x5ea785=_0x3fd1a6['import'])===null||_0x5ea785===void 0x0?void 0x0:_0x5ea785['outputType'],_0x6b156b=((_0x46987d=_0x3fd1a6[_0x43a746(0xae)])===null||_0x46987d===void 0x0?void 0x0:_0x46987d[_0x43a746(0x174)])||'';if(_0x22a37d!==ImportOutputType[_0x43a746(0x141)]){this[_0x43a746(0xf4)][_0x43a746(0xe7)]({'error':{'code':_univerjs_protocol[_0x43a746(0x16f)][_0x43a746(0x189)],'message':_0x43a746(0x19f)},'state':RequestState[_0x43a746(0x88)]});return;}if(_0x6b156b[_0x43a746(0x186)]===0x0){this[_0x43a746(0xf4)][_0x43a746(0xe7)]({'error':{'code':_univerjs_protocol[_0x43a746(0x16f)][_0x43a746(0x189)],'message':'Failed\x20to\x20get\x20unitID\x20from\x20task'},'state':RequestState[_0x43a746(0x88)]});return;}return this[_0x43a746(0xf4)]['next']({'error':_0x3fd1a6[_0x43a746(0x125)],'state':RequestState[_0x43a746(0x88)]}),_0x6b156b;}async[_0x5cc5d6(0x154)](_0x23f22c){const _0x4e50dd=_0x5cc5d6,_0x32687f=await transformWorkbookDataToSnapshotJson(_0x23f22c),_0x4eed6b=typeof _0x23f22c['id']===_0x4e50dd(0x209)&&_0x23f22c['id'][_0x4e50dd(0x17c)]()?_0x23f22c['id'][_0x4e50dd(0x17c)]()+'.json':_0x4e50dd(0x9c),_0x5d8c07=new File([JSON[_0x4e50dd(0x17b)](_0x32687f)],_0x4eed6b,{'type':_0x4e50dd(0x80)});return this[_0x4e50dd(0x193)](_0x5d8c07,_univerjs_core[_0x4e50dd(0x8e)]['UNIVER_SHEET']);}[_0x5cc5d6(0x82)](){const _0x4ead55=_0x5cc5d6;if(this[_0x4ead55(0x1c2)])this['_requestService'][_0x4ead55(0x15a)](this[_0x4ead55(0x1c2)]);}async[_0x5cc5d6(0x116)](_0x1e22dc,_0x13d21){const _0x5f8617=_0x5cc5d6;var _0x147e05,_0x11bd32;const _0x372d45=await this[_0x5f8617(0xbe)](_0x1e22dc);if(!_0x372d45)return;const _0x526d1c=await this[_0x5f8617(0xe2)](_0x372d45,ImportOutputType[_0x5f8617(0x11a)],_0x13d21);if(!_0x526d1c)return;this[_0x5f8617(0x1c2)]=_0x526d1c,this['_requestService'][_0x5f8617(0x172)]();const _0x3a7b9b=await this['_requestService'][_0x5f8617(0xf8)](_0x526d1c)[_0x5f8617(0xe8)](_0x259f88=>{const _0xdfb7c1=_0x5f8617;var _0x270896;const _0x1106bb=_0x259f88 instanceof Error?_0x259f88[_0xdfb7c1(0x12c)]:(_0x270896=_0x259f88[_0xdfb7c1(0x125)])===null||_0x270896===void 0x0?void 0x0:_0x270896[_0xdfb7c1(0x12c)];this[_0xdfb7c1(0xf4)][_0xdfb7c1(0xe7)]({'error':{'code':_univerjs_protocol[_0xdfb7c1(0x16f)][_0xdfb7c1(0x189)],'message':_0x1106bb||''},'state':RequestState['GET_TASK']});});if(!_0x3a7b9b)return;const _0x59172a=(_0x147e05=_0x3a7b9b['import'])===null||_0x147e05===void 0x0?void 0x0:_0x147e05[_0x5f8617(0x1ef)],_0x3a4bc3=((_0x11bd32=_0x3a7b9b[_0x5f8617(0xae)])===null||_0x11bd32===void 0x0?void 0x0:_0x11bd32[_0x5f8617(0x91)])||'';if(_0x59172a!==ImportOutputType[_0x5f8617(0x11a)]){this[_0x5f8617(0xf4)][_0x5f8617(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0x5f8617(0x189)],'message':_0x5f8617(0x19f)},'state':RequestState[_0x5f8617(0x88)]});return;}if(_0x3a4bc3[_0x5f8617(0x186)]===0x0){this[_0x5f8617(0xf4)]['next']({'error':{'code':_univerjs_protocol[_0x5f8617(0x16f)][_0x5f8617(0x189)],'message':_0x5f8617(0x113)},'state':RequestState['GET_TASK']});return;}this['_requestState$'][_0x5f8617(0xe7)]({'error':_0x3a7b9b[_0x5f8617(0x125)],'state':RequestState[_0x5f8617(0x88)]});const _0x26ae9a=await this[_0x5f8617(0x200)](_0x3a4bc3);if(!_0x26ae9a)return;const _0x1761e4=await this[_0x5f8617(0x160)][_0x5f8617(0xc4)](_0x26ae9a);if(!_0x1761e4){this['_requestState$'][_0x5f8617(0xe7)]({'error':{'code':_univerjs_protocol[_0x5f8617(0x16f)][_0x5f8617(0x189)],'message':'Failed\x20to\x20get\x20text\x20from\x20url'},'state':RequestState[_0x5f8617(0x167)]});return;}try{const _0x27a7f6=JSON[_0x5f8617(0x1e1)](_0x1761e4);return this[_0x5f8617(0xf4)][_0x5f8617(0xe7)]({'error':{'code':_univerjs_protocol[_0x5f8617(0x16f)]['OK'],'message':_0x5f8617(0xea)},'state':RequestState[_0x5f8617(0x167)]}),_0x27a7f6;}catch{this[_0x5f8617(0xf4)]['next']({'error':{'code':_univerjs_protocol[_0x5f8617(0x16f)][_0x5f8617(0x189)],'message':_0x5f8617(0x179)},'state':RequestState[_0x5f8617(0x167)]});}}async['_exportBySnapshot'](_0x1ce4d2,_0x3e1e3e){const _0x5d8964=_0x5cc5d6,_0x546f75=JSON['stringify'](_0x1ce4d2),_0x1405ba=_univerjs_pro_collaboration['textEncoder'][_0x5d8964(0x169)](_0x546f75),_0x1f2878=(0x0,fflate['deflateSync'])(_0x1405ba),_0x1c4f34=_0x1405ba[_0x5d8964(0x186)],_0x2c8de2=bufferToFile(_0x1f2878),_0x388395=await this['_upload'](_0x2c8de2,_0x1c4f34,!![]);if(!_0x388395)return;return this[_0x5d8964(0x132)](_0x388395,ImportOutputType['JSON'],_0x3e1e3e);}async[_0x5cc5d6(0x132)](_0x41e532,_0x50490a,_0x519cd0){const _0x55945e=_0x5cc5d6;var _0x31fb8f;const _0x27267e=await this[_0x55945e(0x160)][_0x55945e(0xee)]({'unitID':_0x50490a===ImportOutputType[_0x55945e(0x141)]?_0x41e532:'','jsonID':_0x50490a===ImportOutputType['JSON']?_0x41e532:'','type':_0x519cd0,'sscSwitch':this['_getEnableServerSideComputing'](),'useImageUrl':this[_0x55945e(0xa9)](),'ignoreTableExport':this[_0x55945e(0x86)]()});if(!_0x27267e){this['_requestState$'][_0x55945e(0xe7)]({'error':{'code':_univerjs_protocol[_0x55945e(0x16f)][_0x55945e(0x189)],'message':_0x55945e(0xe6)},'state':RequestState[_0x55945e(0x1f0)]});return;}this[_0x55945e(0xf4)][_0x55945e(0xe7)]({'error':_0x27267e[_0x55945e(0x125)],'state':RequestState[_0x55945e(0x1f0)]});if(_0x27267e[_0x55945e(0x125)]&&_0x27267e[_0x55945e(0x125)][_0x55945e(0xaf)]!==_univerjs_protocol[_0x55945e(0x16f)]['OK'])return;const _0x51a735=_0x27267e[_0x55945e(0x8f)],_0x3fd9c4=await this[_0x55945e(0x160)][_0x55945e(0xf8)](_0x51a735)[_0x55945e(0xe8)](_0x18f11f=>{const _0x46c2af=_0x55945e;var _0x42ec8f;const _0x1e7ede=_0x18f11f instanceof Error?_0x18f11f[_0x46c2af(0x12c)]:(_0x42ec8f=_0x18f11f[_0x46c2af(0x125)])===null||_0x42ec8f===void 0x0?void 0x0:_0x42ec8f['message'];this[_0x46c2af(0xf4)][_0x46c2af(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0x46c2af(0x189)],'message':_0x1e7ede||''},'state':RequestState[_0x46c2af(0x88)]});});if(!_0x3fd9c4)return;const _0x776d03=((_0x31fb8f=_0x3fd9c4[_0x55945e(0xee)])===null||_0x31fb8f===void 0x0?void 0x0:_0x31fb8f[_0x55945e(0x137)])||'';if(_0x776d03[_0x55945e(0x186)]===0x0){this[_0x55945e(0xf4)][_0x55945e(0xe7)]({'error':{'code':_univerjs_protocol[_0x55945e(0x16f)][_0x55945e(0x189)],'message':_0x55945e(0xd3)},'state':RequestState[_0x55945e(0x88)]});return;}this[_0x55945e(0xf4)][_0x55945e(0xe7)]({'error':_0x3fd9c4[_0x55945e(0x125)],'state':RequestState[_0x55945e(0x88)]});const _0x1eb49c=await this[_0x55945e(0x200)](_0x776d03);if(!_0x1eb49c)return;const _0x4cb219=await getFileByURL(_0x1eb49c,this[_0x55945e(0x162)]);if(!_0x4cb219){this[_0x55945e(0xf4)]['next']({'error':{'code':_univerjs_protocol[_0x55945e(0x16f)][_0x55945e(0x189)],'message':'Failed\x20to\x20get\x20file\x20from\x20url'},'state':RequestState['GET_FILE']});return;}return this['_requestState$']['next']({'error':{'code':_univerjs_protocol[_0x55945e(0x16f)]['OK'],'message':'success'},'state':RequestState[_0x55945e(0x147)]}),_0x4cb219;}async[_0x5cc5d6(0xbe)](_0x2c8f4e,_0x5ef08f,_0x12af0b){const _0x335b4b=_0x5cc5d6;let _0x4c7bb1;try{_0x4c7bb1=await this[_0x335b4b(0x160)][_0x335b4b(0xf2)](_0x2c8f4e,_0x5ef08f,_0x12af0b);}catch(_0x2f3126){const _0x741bba=_0x2f3126 instanceof Error?_0x2f3126['message']:String(_0x2f3126);this[_0x335b4b(0xf4)][_0x335b4b(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0x335b4b(0x189)],'message':_0x741bba},'state':RequestState[_0x335b4b(0x16d)]});return;}if(!_0x4c7bb1||typeof _0x4c7bb1['FileId']!==_0x335b4b(0x209)){this[_0x335b4b(0xf4)][_0x335b4b(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0x335b4b(0x189)],'message':_0x335b4b(0x18e)},'state':RequestState[_0x335b4b(0x16d)]});return;}const _0x4a2deb=_0x4c7bb1[_0x335b4b(0xe0)];if(_0x4a2deb['length']===0x0){this[_0x335b4b(0xf4)][_0x335b4b(0xe7)]({'error':{'code':_univerjs_protocol[_0x335b4b(0x16f)]['UNRECOGNIZED'],'message':_0x335b4b(0x105)},'state':RequestState[_0x335b4b(0x16d)]});return;}return this[_0x335b4b(0xf4)][_0x335b4b(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':_0x335b4b(0xea)},'state':RequestState[_0x335b4b(0x16d)]}),_0x4a2deb;}async[_0x5cc5d6(0xe2)](_0x3937da,_0x10f9d7,_0xc91556){const _0x269b89=_0x5cc5d6,_0x1788ec={'fileID':_0x3937da,'type':_0xc91556,'outputType':_0x10f9d7,'fileUrl':'','minSheetRowCount':this[_0x269b89(0x201)](),'minSheetColumnCount':this['_getMinSheetColumnCount']()},_0x383349=await this[_0x269b89(0x160)][_0x269b89(0xae)](_0x1788ec);if(!_0x383349){this[_0x269b89(0xf4)]['next']({'error':{'code':_univerjs_protocol[_0x269b89(0x16f)]['UNRECOGNIZED'],'message':_0x269b89(0x14d)},'state':RequestState['IMPORT']});return;}if(_0x383349[_0x269b89(0x125)]&&_0x383349[_0x269b89(0x125)][_0x269b89(0xaf)]!==_univerjs_protocol[_0x269b89(0x16f)]['OK']){this[_0x269b89(0xf4)][_0x269b89(0xe7)]({'error':_0x383349[_0x269b89(0x125)],'state':RequestState[_0x269b89(0x110)]});return;}const _0x5f0d4f=_0x383349[_0x269b89(0x8f)];if(_0x5f0d4f['length']===0x0){this['_requestState$'][_0x269b89(0xe7)]({'error':{'code':_univerjs_protocol[_0x269b89(0x16f)][_0x269b89(0x189)],'message':'Failed\x20to\x20get\x20taskID\x20from\x20import\x20response'},'state':RequestState[_0x269b89(0x110)]});return;}return this[_0x269b89(0xf4)]['next']({'error':_0x383349[_0x269b89(0x125)],'state':RequestState[_0x269b89(0x110)]}),_0x5f0d4f;}async[_0x5cc5d6(0x200)](_0x127c15){const _0x1ce1e8=_0x5cc5d6,_0xacc3b0=await this[_0x1ce1e8(0x160)][_0x1ce1e8(0xa5)](_0x127c15);if(!_0xacc3b0){this[_0x1ce1e8(0xf4)]['next']({'error':{'code':_univerjs_protocol[_0x1ce1e8(0x16f)][_0x1ce1e8(0x189)],'message':_0x1ce1e8(0x1f3)},'state':RequestState[_0x1ce1e8(0x199)]});return;}if(_0xacc3b0[_0x1ce1e8(0x125)]&&_0xacc3b0[_0x1ce1e8(0x125)]['code']!==_univerjs_protocol['ErrorCode']['OK']){this[_0x1ce1e8(0xf4)]['next']({'error':_0xacc3b0['error'],'state':RequestState['SIGN_URL']});return;}const _0x4f0527=(0x0,_univerjs_core['resolveWithBasePath'])(_0xacc3b0[_0x1ce1e8(0x19b)],this['_getDownloadEndpointURL']());if(_0x4f0527['length']===0x0){this[_0x1ce1e8(0xf4)][_0x1ce1e8(0xe7)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0x1ce1e8(0x189)],'message':'sign\x20url\x20error'},'state':RequestState['SIGN_URL']});return;}return this[_0x1ce1e8(0xf4)][_0x1ce1e8(0xe7)]({'error':_0xacc3b0[_0x1ce1e8(0x125)],'state':RequestState[_0x1ce1e8(0x199)]}),_0x4f0527;}[_0x5cc5d6(0x1c5)](){const _0x4142c2=_0x5cc5d6;var _0x10eda7;const _0x57b573=this[_0x4142c2(0x1d4)][_0x4142c2(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x10eda7=_0x57b573===null||_0x57b573===void 0x0?void 0x0:_0x57b573['downloadEndpointUrl'])!==null&&_0x10eda7!==void 0x0?_0x10eda7:location[_0x4142c2(0x8c)];}[_0x5cc5d6(0x201)](){const _0x3b0f8e=_0x5cc5d6;var _0x3cef8c,_0x5747ef;const _0x1b1f5c=this[_0x3b0f8e(0x1d4)][_0x3b0f8e(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x3cef8c=_0x1b1f5c===null||_0x1b1f5c===void 0x0||(_0x5747ef=_0x1b1f5c[_0x3b0f8e(0x150)])===null||_0x5747ef===void 0x0?void 0x0:_0x5747ef[_0x3b0f8e(0x175)])!==null&&_0x3cef8c!==void 0x0?_0x3cef8c:0x1;}[_0x5cc5d6(0x177)](){const _0x584450=_0x5cc5d6;var _0xa9b0b3,_0x4e0679;const _0x24f7bf=this[_0x584450(0x1d4)][_0x584450(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0xa9b0b3=_0x24f7bf===null||_0x24f7bf===void 0x0||(_0x4e0679=_0x24f7bf[_0x584450(0x150)])===null||_0x4e0679===void 0x0?void 0x0:_0x4e0679['minSheetColumnCount'])!==null&&_0xa9b0b3!==void 0x0?_0xa9b0b3:0x1;}['_getEnableServerSideComputing'](){const _0x47aaf0=_0x5cc5d6;var _0x331af6,_0x21c572;const _0x301d9b=this['_configService'][_0x47aaf0(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x331af6=_0x301d9b===null||_0x301d9b===void 0x0||(_0x21c572=_0x301d9b['options'])===null||_0x21c572===void 0x0?void 0x0:_0x21c572[_0x47aaf0(0x101)])!==null&&_0x331af6!==void 0x0?_0x331af6:![];}['_getDisableCellImageConversion'](){const _0x3135e9=_0x5cc5d6;var _0x5649fe,_0x58eec5;const _0x1088a0=this['_configService'][_0x3135e9(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5649fe=_0x1088a0===null||_0x1088a0===void 0x0||(_0x58eec5=_0x1088a0[_0x3135e9(0x150)])===null||_0x58eec5===void 0x0?void 0x0:_0x58eec5[_0x3135e9(0x178)])!==null&&_0x5649fe!==void 0x0?_0x5649fe:!![];}[_0x5cc5d6(0x86)](){const _0xd42612=_0x5cc5d6;var _0x3d8f37,_0x27a6f7;const _0x4f4056=this['_configService'][_0xd42612(0x1f4)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x3d8f37=_0x4f4056===null||_0x4f4056===void 0x0||(_0x27a6f7=_0x4f4056[_0xd42612(0x150)])===null||_0x27a6f7===void 0x0?void 0x0:_0x27a6f7[_0xd42612(0x149)])!==null&&_0x3d8f37!==void 0x0?_0x3d8f37:![];}};ExchangeService=__decorate([__decorateParam(0x0,_univerjs_core[_0x5cc5d6(0xd9)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network['HTTPService'])),__decorateParam(0x2,(0x0,_univerjs_core['Inject'])(IRequestService))],ExchangeService);const NilProgress={'done':0x0,'count':0x0},IExchangeOperateService=(0x0,_univerjs_core[_0x5cc5d6(0x129)])(_0x5cc5d6(0x17f));let ExchangeOperateService=class ExchangeOperateService extends _univerjs_core['Disposable']{constructor(_0x3b59c1,_0x5ea7da,_0x5b36f4,_0x3ddb2f,_0x402d78,_0xceb906){const _0xc96bdc=_0x5cc5d6;super(),this[_0xc96bdc(0x1e6)]=_0x3b59c1,this['_messageService']=_0x5ea7da,this[_0xc96bdc(0xdc)]=_0x5b36f4,this[_0xc96bdc(0xa8)]=_0x3ddb2f,this[_0xc96bdc(0x139)]=_0x402d78,this['_logService']=_0xceb906,_defineProperty(this,_0xc96bdc(0x138),new rxjs[(_0xc96bdc(0xda))](NilProgress)),_defineProperty(this,_0xc96bdc(0x111),this['_progress$'][_0xc96bdc(0x208)]()),_defineProperty(this,_0xc96bdc(0x207),0x0),_defineProperty(this,_0xc96bdc(0x1db),0x0),this[_0xc96bdc(0x1e0)]((0x0,_univerjs_core['toDisposable'])(this[_0xc96bdc(0xa8)]['requestState$'][_0xc96bdc(0x1a3)](_0x3a49e9=>{const _0x1b7d9c=_0xc96bdc;var _0xc5f38f;if(((_0xc5f38f=_0x3a49e9[_0x1b7d9c(0x125)])===null||_0xc5f38f===void 0x0?void 0x0:_0xc5f38f['code'])===_univerjs_protocol[_0x1b7d9c(0x16f)]['OK'])this[_0x1b7d9c(0xcd)](0x1);else this[_0x1b7d9c(0x1a1)](_0x3a49e9[_0x1b7d9c(0x125)]);})));}[_0x5cc5d6(0x1a6)](){const _0x50daea=_0x5cc5d6;this['_clearProgress'](),this[_0x50daea(0x139)][_0x50daea(0x15c)](UploadNotificationState['ERROR']),this[_0x50daea(0xa8)][_0x50daea(0x82)]();}async[_0x5cc5d6(0x1c4)](_0x39ed7c){const _0x4836c3=_0x5cc5d6;throw new Error(_0x4836c3(0x112));}async[_0x5cc5d6(0xf9)](){const _0x53473c=_0x5cc5d6,_0x45556d=await getUploadFile([_univerjs_core['UniverInstanceType']['UNIVER_DOC']]);if(!_0x45556d)return;if(this['_fileTypeError'](_0x45556d,_univerjs_core[_0x53473c(0x8e)]['UNIVER_DOC']))return;return this[_0x53473c(0xec)](_0x45556d[0x0],_univerjs_core[_0x53473c(0x8e)][_0x53473c(0x1d0)]);}['importDOCXToSnapshot'](){const _0x3d42b9=_0x5cc5d6;throw new Error(_0x3d42b9(0x112));}async[_0x5cc5d6(0x109)](_0x35d08f,_0x5b8139,_0x2e13ec){const _0x2cd5e5=_0x5cc5d6;this[_0x2cd5e5(0x203)](_univerjs_design[_0x2cd5e5(0xfe)][_0x2cd5e5(0x180)]);const _0x49b25e=await this[_0x2cd5e5(0xa8)]['exportDOCXByUnitId'](_0x35d08f||this[_0x2cd5e5(0x121)]());if(!_0x49b25e)return;downloadFile(_0x49b25e,_0x5b8139||this[_0x2cd5e5(0x1c6)](_0x49b25e),'docx'),this[_0x2cd5e5(0x203)](_univerjs_design[_0x2cd5e5(0xfe)][_0x2cd5e5(0x1c8)]);}async[_0x5cc5d6(0x1c9)](){const _0x420119=_0x5cc5d6;this['_showDownloadMessage'](_univerjs_design[_0x420119(0xfe)][_0x420119(0x180)]);const _0x5bdbeb=await this[_0x420119(0xf5)](),_0x57ae6b=await this[_0x420119(0xa8)]['exportDOCXBySnapshot'](_0x5bdbeb);if(!_0x57ae6b)return;downloadFile(_0x57ae6b,this[_0x420119(0x1c6)](_0x57ae6b),_0x420119(0x100)),this[_0x420119(0x203)](_univerjs_design[_0x420119(0xfe)][_0x420119(0x1c8)]);}async[_0x5cc5d6(0xb0)](){const _0x44190a=_0x5cc5d6;if(this[_0x44190a(0x1df)]()){this['_messageService']['show']({'type':_univerjs_design['MessageType'][_0x44190a(0x1f2)],'content':this[_0x44190a(0xdc)]['t'](_0x44190a(0x90))});return;}const _0x32233b=await getUploadFile([_univerjs_core[_0x44190a(0x8e)][_0x44190a(0x126)]]);if(!_0x32233b)return;if(this[_0x44190a(0xb1)](_0x32233b,_univerjs_core[_0x44190a(0x8e)][_0x44190a(0x126)]))return;return this[_0x44190a(0xec)](_0x32233b[0x0],_univerjs_core[_0x44190a(0x8e)]['UNIVER_SHEET']);}async[_0x5cc5d6(0x1bf)](){const _0x51e6d9=_0x5cc5d6;if(this[_0x51e6d9(0x1df)]()){this[_0x51e6d9(0x195)][_0x51e6d9(0x202)]({'type':_univerjs_design[_0x51e6d9(0xfe)][_0x51e6d9(0x1f2)],'content':this[_0x51e6d9(0xdc)]['t']('exchange.uploading')});return;}const _0x2ea80f=await getUploadFile([_univerjs_core[_0x51e6d9(0x8e)][_0x51e6d9(0x126)]]);if(!_0x2ea80f)return;this['_showUploadMessage'](_univerjs_design['MessageType']['Info']);const _0x2bf444=await this['_exchangeService'][_0x51e6d9(0x1bf)](_0x2ea80f[0x0]);if(!_0x2bf444)return;this['_refresh'](_0x2bf444),this[_0x51e6d9(0x118)](_univerjs_design['MessageType'][_0x51e6d9(0x1c8)]);}async[_0x5cc5d6(0xd1)](_0xde9444,_0x3ba8e8,_0x3c1900){const _0x2b5b9a=_0x5cc5d6;this['_showDownloadMessage'](_univerjs_design[_0x2b5b9a(0xfe)]['Info']);const _0x14acc8=await this[_0x2b5b9a(0xa8)][_0x2b5b9a(0xd1)](_0xde9444||this['_getUnitID']());if(!_0x14acc8)return;downloadFile(_0x14acc8,_0x3ba8e8||this[_0x2b5b9a(0x1c6)](_0x14acc8),_0x2b5b9a(0xe4)),this[_0x2b5b9a(0x203)](_univerjs_design[_0x2b5b9a(0xfe)]['Success']);}async[_0x5cc5d6(0x84)](){const _0x22021c=_0x5cc5d6;this[_0x22021c(0x203)](_univerjs_design['MessageType'][_0x22021c(0x180)]);const _0x5b5d59=await this[_0x22021c(0x1c1)](),_0x59f642=await this['_exchangeService'][_0x22021c(0x84)](_0x5b5d59);if(!_0x59f642)return;downloadFile(_0x59f642,this[_0x22021c(0x1c6)](_0x59f642),_0x22021c(0xe4)),this[_0x22021c(0x203)](_univerjs_design[_0x22021c(0xfe)][_0x22021c(0x1c8)]);}[_0x5cc5d6(0xa3)](_0x1cb42b){this['_getLinkByUnitId']=_0x1cb42b;}async['_importFileToUnitId'](_0x4a2f38,_0x360dbe){const _0x3a89cf=_0x5cc5d6;this[_0x3a89cf(0x139)][_0x3a89cf(0x202)](),this['_uploadNotificationService'][_0x3a89cf(0x15c)](UploadNotificationState[_0x3a89cf(0x1cc)]),this[_0x3a89cf(0x135)](0x4),this[_0x3a89cf(0xcd)](0x1);const _0x474e3d=await this['_exchangeService'][_0x3a89cf(0x193)](_0x4a2f38,_0x360dbe);if(!_0x474e3d){this['_clearProgress'](),this[_0x3a89cf(0x139)][_0x3a89cf(0x15c)](UploadNotificationState[_0x3a89cf(0x1f9)]);return;}const _0x16bb01={'link':this[_0x3a89cf(0xd2)](_0x474e3d,_0x360dbe),'name':_0x4a2f38['name'],'type':_0x360dbe};return this[_0x3a89cf(0x139)]['pushLink'](_0x16bb01),this['_completeProgress'](),this['_uploadNotificationService'][_0x3a89cf(0x15c)](UploadNotificationState[_0x3a89cf(0x14a)]),_0x474e3d;}[_0x5cc5d6(0x14f)](){const _0x5c0533=_0x5cc5d6;return this['_univerInstanceService'][_0x5c0533(0x184)](_univerjs_core[_0x5c0533(0x8e)][_0x5c0533(0x126)])[_0x5c0533(0xd0)]();}[_0x5cc5d6(0x121)](){const _0x5d514=_0x5cc5d6;return this[_0x5d514(0x1e6)][_0x5d514(0x184)](_univerjs_core[_0x5d514(0x8e)][_0x5d514(0x1d0)])[_0x5d514(0xd0)]();}[_0x5cc5d6(0x1c6)](_0x35333f){const _0x2a9f57=_0x5cc5d6;var _0x274e72;return((_0x274e72=this[_0x2a9f57(0x1e6)][_0x2a9f57(0x184)](_univerjs_core[_0x2a9f57(0x8e)][_0x2a9f57(0x126)]))===null||_0x274e72===void 0x0?void 0x0:_0x274e72[_0x2a9f57(0x1b5)])||_0x35333f[_0x2a9f57(0x1b5)][_0x2a9f57(0x1b0)]('.')[_0x2a9f57(0x155)]()||document[_0x2a9f57(0x1f1)];}async['_getUnitJson'](){const _0x249236=_0x5cc5d6;return this[_0x249236(0x1e6)][_0x249236(0x184)](_univerjs_core[_0x249236(0x8e)][_0x249236(0x126)])['getSnapshot']();}async[_0x5cc5d6(0xf5)](){const _0x51c634=_0x5cc5d6;return this[_0x51c634(0x1e6)][_0x51c634(0x184)](_univerjs_core[_0x51c634(0x8e)]['UNIVER_DOC'])[_0x51c634(0x85)]();}[_0x5cc5d6(0xd2)](_0x4166d9,_0x5e4553){const _0x459dc1=_0x5cc5d6,_0x5708ef=new URL(window[_0x459dc1(0x204)]['href']);return _0x5708ef[_0x459dc1(0x187)]['set'](_0x459dc1(0x10a),_0x4166d9),_0x5708ef[_0x459dc1(0x187)]['set'](_0x459dc1(0x1e9),''+_0x5e4553),_0x5708ef[_0x459dc1(0xf1)]();}[_0x5cc5d6(0x1e3)](_0x32501c){const _0x16aaf6=_0x5cc5d6,_0x16214e=this[_0x16aaf6(0x1e6)][_0x16aaf6(0x1b4)](_univerjs_core['UniverInstanceType']['UNIVER_SHEET'])[_0x16aaf6(0xd0)]();this[_0x16aaf6(0x1e6)]['disposeUnit'](_0x16214e),this[_0x16aaf6(0x1e6)]['createUnit'](_univerjs_core[_0x16aaf6(0x8e)][_0x16aaf6(0x126)],_0x32501c);}['_showNetworkError'](_0x51096c){const _0x133d4f=_0x5cc5d6;if(_0x51096c){const {code:_0x370a10}=_0x51096c;switch(_0x370a10){case _univerjs_protocol[_0x133d4f(0x16f)][_0x133d4f(0xfc)]:this[_0x133d4f(0x195)][_0x133d4f(0x202)]({'type':_univerjs_design[_0x133d4f(0xfe)]['Error'],'content':this[_0x133d4f(0xdc)]['t']('exchange.tooLarge')});break;case _univerjs_protocol['ErrorCode']['INTERNAL_ERROR']:this[_0x133d4f(0x195)]['show']({'type':_univerjs_design[_0x133d4f(0xfe)][_0x133d4f(0x9d)],'content':this['_localeService']['t'](_0x133d4f(0x1d5))});break;default:this['_messageService'][_0x133d4f(0x202)]({'type':_univerjs_design[_0x133d4f(0xfe)][_0x133d4f(0x9d)],'content':this[_0x133d4f(0xdc)]['t'](_0x133d4f(0x8b))});break;}return null;}return this[_0x133d4f(0x195)]['show']({'type':_univerjs_design[_0x133d4f(0xfe)][_0x133d4f(0x9d)],'content':this['_localeService']['t']('exchange.networkError')}),null;}[_0x5cc5d6(0x203)](_0x377248){const _0x222fbd=_0x5cc5d6;let _0x2e9db3='';switch(_0x377248){case _univerjs_design[_0x222fbd(0xfe)][_0x222fbd(0x1c8)]:_0x2e9db3=this[_0x222fbd(0xdc)]['t'](_0x222fbd(0x1af));break;case _univerjs_design['MessageType'][_0x222fbd(0x180)]:_0x2e9db3=this['_localeService']['t'](_0x222fbd(0x9a));break;default:break;}this[_0x222fbd(0x195)][_0x222fbd(0x202)]({'type':_0x377248,'content':_0x2e9db3});}['_showUploadMessage'](_0x203635){const _0x4bf520=_0x5cc5d6;let _0x36b675='';switch(_0x203635){case _univerjs_design[_0x4bf520(0xfe)][_0x4bf520(0x1c8)]:_0x36b675=this[_0x4bf520(0xdc)]['t'](_0x4bf520(0x1fb));break;case _univerjs_design[_0x4bf520(0xfe)][_0x4bf520(0x180)]:_0x36b675=this[_0x4bf520(0xdc)]['t']('exchange.uploading');break;default:break;}this[_0x4bf520(0x195)]['show']({'type':_0x203635,'content':_0x36b675});}[_0x5cc5d6(0x11c)](){const _0x194b9c=_0x5cc5d6;this[_0x194b9c(0x138)][_0x194b9c(0xe7)]({'done':this['_doneUploadTaskCount'],'count':this[_0x194b9c(0x207)]});}[_0x5cc5d6(0x135)](_0x482868){const _0x4484fc=_0x5cc5d6;this[_0x4484fc(0x207)]+=_0x482868,this[_0x4484fc(0x11c)]();}[_0x5cc5d6(0xcd)](_0x368aab){const _0x54d359=_0x5cc5d6;this[_0x54d359(0x1db)]+=_0x368aab,this[_0x54d359(0x1db)]=Math['min'](this[_0x54d359(0x1db)],this[_0x54d359(0x207)]),this['_emitProgress']();}[_0x5cc5d6(0x157)](){const _0x5d9143=_0x5cc5d6;this[_0x5d9143(0x1db)]=this[_0x5d9143(0x207)],this[_0x5d9143(0x11c)]();}[_0x5cc5d6(0xfa)](){const _0x28b58c=_0x5cc5d6;this[_0x28b58c(0x1db)]=0x0,this[_0x28b58c(0x207)]=0x0,this[_0x28b58c(0x11c)]();}['_fileTypeError'](_0xc295e0,_0xbeceba){const _0x41e455=_0x5cc5d6,_0x592808=_0xc295e0[0x0],_0x3d0ead=_0x592808[_0x41e455(0x1b5)];if(getUniverInstanceTypeByFile(_0x592808)!==_0xbeceba)return this[_0x41e455(0x195)][_0x41e455(0x202)]({'type':_univerjs_design[_0x41e455(0xfe)]['Error'],'content':this[_0x41e455(0xdc)]['t']('exchange.fileTypeError',_0x3d0ead)}),!![];return![];}['_uploadTaskNotDone'](){const _0x22e73f=_0x5cc5d6;return this[_0x22e73f(0x207)]!==0x0&&this['_doneUploadTaskCount']!==this[_0x22e73f(0x207)];}};ExchangeOperateService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x5cc5d6(0xfb)])),__decorateParam(0x1,_univerjs_ui[_0x5cc5d6(0xdd)]),__decorateParam(0x2,(0x0,_univerjs_core[_0x5cc5d6(0x134)])(_univerjs_core[_0x5cc5d6(0x93)])),__decorateParam(0x3,(0x0,_univerjs_core[_0x5cc5d6(0x134)])(IExchangeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0x5cc5d6(0x134)])(IUploadNotificationService)),__decorateParam(0x5,_univerjs_core['ILogService'])],ExchangeOperateService);function UploadButton(_0x3e12cf){const _0x38e3c5=_0x5cc5d6,{onClick:_0x6c807f,children:_0x42eea7,className:_0x4cafa7}=_0x3e12cf;return(0x0,react_jsx_runtime['jsx'])(_0x38e3c5(0xc3),{'className':(0x0,_univerjs_design['clsx'])(_0x38e3c5(0x15d),_0x4cafa7),'type':_0x38e3c5(0xc3),'onClick':_0x6c807f,'children':_0x42eea7});}function UploadAgain(){const _0x303fcc=_0x5cc5d6,_0x1015d0=(0x0,_univerjs_ui[_0x303fcc(0xac)])(IExchangeOperateService),_0x4ad531=(0x0,_univerjs_ui[_0x303fcc(0xac)])(_univerjs_core[_0x303fcc(0x93)]);function _0x5e8154(){const _0x228934=_0x303fcc;_0x1015d0[_0x228934(0xb0)]();}return(0x0,react_jsx_runtime['jsx'])(UploadButton,{'onClick':_0x5e8154,'children':_0x4ad531['t']('exchange.uploadAgain')});}function UploadError(){const _0x3457fc=_0x5cc5d6;return(0x0,react_jsx_runtime['jsxs'])(_0x3457fc(0xce),{'className':_0x3457fc(0x1cf),'children':[(0x0,react_jsx_runtime[_0x3457fc(0xeb)])('span',{'className':_0x3457fc(0x1b8),'children':(0x0,_univerjs_ui[_0x3457fc(0xac)])(_univerjs_core['LocaleService'])['t'](_0x3457fc(0x1a8))}),(0x0,react_jsx_runtime[_0x3457fc(0xeb)])(UploadAgain,{})]});}function UploadSuccess(_0xa753be){const _0x52064e=_0x5cc5d6,{count:_0x143c31}=_0xa753be;return(0x0,react_jsx_runtime[_0x52064e(0x1eb)])(_0x52064e(0xce),{'className':_0x52064e(0x170),'children':[(0x0,react_jsx_runtime[_0x52064e(0xeb)])(_0x52064e(0xa4),{'className':_0x52064e(0x1dd),'children':(0x0,_univerjs_ui[_0x52064e(0xac)])(_univerjs_core[_0x52064e(0x93)])['t'](_0x52064e(0x1d1),''+_0x143c31)}),(0x0,react_jsx_runtime[_0x52064e(0xeb)])(UploadAgain,{})]});}function UploadCancel(){const _0x34abe5=_0x5cc5d6,_0x189ac7=(0x0,_univerjs_ui[_0x34abe5(0xac)])(IExchangeOperateService),_0x4e8088=(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0x34abe5(0x93)]);function _0xe6a876(){_0x189ac7['interrupt']();}return(0x0,react_jsx_runtime[_0x34abe5(0xeb)])(UploadButton,{'onClick':_0xe6a876,'children':_0x4e8088['t'](_0x34abe5(0xa6))});}function UploadProgress(){const _0x156f52=_0x5cc5d6,{count:_0x228d7c,done:_0xf77d31}=(0x0,_univerjs_ui['useObservable'])((0x0,_univerjs_ui['useDependency'])(IExchangeOperateService)[_0x156f52(0x111)]),[_0x10454e,_0x155dbb]=(0x0,react[_0x156f52(0x1a0)])(_0x228d7c>0x0?_0xf77d31/_0x228d7c:0x0);return(0x0,react[_0x156f52(0x165)])(()=>{_0x155dbb(_0x228d7c>0x0?_0xf77d31/_0x228d7c:0x0);},[_0x228d7c,_0xf77d31]),(0x0,react_jsx_runtime['jsx'])(_0x156f52(0xce),{'className':_0x156f52(0x1b6),'children':(0x0,react_jsx_runtime[_0x156f52(0xeb)])('div',{'className':_0x156f52(0x1b1),'style':{'width':Math[_0x156f52(0x144)](_0x10454e*0x64)+'%'}})});}function _0x4a23(_0x3b7b5c,_0xe19c30){_0x3b7b5c=_0x3b7b5c-0x80;const _0x5463c6=_0x5463();let _0x4a2332=_0x5463c6[_0x3b7b5c];return _0x4a2332;}function Uploading(){const _0x368192=_0x5cc5d6;return(0x0,react_jsx_runtime['jsxs'])(_0x368192(0xce),{'className':_0x368192(0x1cf),'children':[(0x0,react_jsx_runtime[_0x368192(0xeb)])('span',{'className':'univer-pl-2\x20univer-pr-4\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','children':(0x0,_univerjs_ui[_0x368192(0xac)])(_univerjs_core[_0x368192(0x93)])['t']('exchange.wait')}),(0x0,react_jsx_runtime['jsx'])(_0x368192(0xce),{'className':_0x368192(0x10f),'children':(0x0,react_jsx_runtime['jsx'])(UploadProgress,{})}),(0x0,react_jsx_runtime['jsx'])(UploadCancel,{})]});}const iconMap={[UploadNotificationState[_0x5cc5d6(0x14a)]]:(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0x5cc5d6(0x8a)],{'className':_0x5cc5d6(0x185)}),[UploadNotificationState['UPLOADING']]:(0x0,react_jsx_runtime[_0x5cc5d6(0xeb)])(_univerjs_icons['ClockIcon'],{'className':_0x5cc5d6(0x205)}),[UploadNotificationState['ERROR']]:(0x0,react_jsx_runtime[_0x5cc5d6(0xeb)])(_univerjs_icons[_0x5cc5d6(0x12a)],{'className':'univer-text-red-500'})};function UploadNotification(){const _0xba6b62=_0x5cc5d6,[_0x1c1441,_0x19fafd]=(0x0,react[_0xba6b62(0x1a0)])(UploadNotificationState[_0xba6b62(0x1cc)]),[_0x3b67ee,_0x111b8e]=(0x0,react[_0xba6b62(0x1a0)])(![]),[_0x27fb88,_0x4cad94]=(0x0,react[_0xba6b62(0x1a0)])([]),_0x135792=(0x0,_univerjs_ui[_0xba6b62(0xac)])(IUploadNotificationService),_0x5c33b1=(0x0,_univerjs_ui[_0xba6b62(0xac)])(_univerjs_core['LocaleService']);(0x0,react[_0xba6b62(0x165)])(()=>{const _0x4aafdc=_0xba6b62,_0x285768=_0x135792['visible$']['subscribe'](_0x2fb499=>{_0x111b8e(_0x2fb499);}),_0x26a4f9=_0x135792['list$'][_0x4aafdc(0x1a3)](_0x55f3c1=>{_0x4cad94(_0x55f3c1);}),_0x34e5ff=_0x135792[_0x4aafdc(0xb9)][_0x4aafdc(0x1a3)](_0x300123=>{_0x19fafd(_0x300123);});return()=>{const _0x605f76=_0x4aafdc;_0x285768[_0x605f76(0x19a)](),_0x26a4f9[_0x605f76(0x19a)](),_0x34e5ff['unsubscribe']();};},[]);function _0x513b0f(){_0x111b8e(![]);}function _0x54cefd(_0x2f7867){const _0x25c36e=_0xba6b62;switch(_0x2f7867){case UploadNotificationState['SUCCESS']:return _0x5c33b1['t'](_0x25c36e(0x1fb));case UploadNotificationState['UPLOADING']:return _0x5c33b1['t'](_0x25c36e(0x90));case UploadNotificationState[_0x25c36e(0x1f9)]:return _0x5c33b1['t']('exchange.unknownMistake');default:return'';}}return _0x3b67ee&&(0x0,react_jsx_runtime[_0xba6b62(0x1eb)])(_0xba6b62(0xce),{'className':_0xba6b62(0x17a),'children':[(0x0,react_jsx_runtime['jsxs'])('div',{'className':'univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-py-0\x20univer-pl-1.5\x20univer-pr-2','children':[(0x0,react_jsx_runtime[_0xba6b62(0x1eb)])('span',{'className':_0xba6b62(0x143),'children':[(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(_0xba6b62(0xa4),{'className':_0xba6b62(0x1b7),'children':iconMap[_0x1c1441]}),(0x0,react_jsx_runtime[_0xba6b62(0xeb)])('span',{'className':_0xba6b62(0x1ad),'children':_0x54cefd(_0x1c1441)})]}),(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(_0xba6b62(0xa4),{'className':'univer-flex\x20univer-size-6\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-text-gray-500\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-bg-gray-600','onClick':_0x513b0f,'children':(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0xba6b62(0xa2)],{})})]}),(0x0,react_jsx_runtime[_0xba6b62(0x1eb)])('div',{'children':[_0x1c1441===UploadNotificationState[_0xba6b62(0x1cc)]&&(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(Uploading,{}),_0x1c1441===UploadNotificationState[_0xba6b62(0x1f9)]&&(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(UploadError,{}),_0x27fb88[_0xba6b62(0x186)]>0x0&&(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(LinkList,{'list':_0x27fb88}),_0x1c1441===UploadNotificationState[_0xba6b62(0x14a)]&&(0x0,react_jsx_runtime[_0xba6b62(0xeb)])(UploadSuccess,{'count':_0x27fb88['length']})]})]});}function UploadNotificationContainer(){return(0x0,react_jsx_runtime['jsx'])(UploadNotification,{});}let ExchangeClientController=class ExchangeClientController extends _univerjs_core[_0x5cc5d6(0xdf)]{constructor(_0x40da63,_0x1834cd){const _0x1cb85c=_0x5cc5d6;super(),this['_injector']=_0x40da63,this[_0x1cb85c(0x1a4)]=_0x1834cd,this['_registerComponents']();}[_0x5cc5d6(0xd4)](){const _0x2f6154=_0x5cc5d6;this[_0x2f6154(0x1e0)](this[_0x2f6154(0x1a4)]['registerComponent'](_univerjs_ui[_0x2f6154(0x1b2)][_0x2f6154(0x12d)],()=>(0x0,_univerjs_ui[_0x2f6154(0x18c)])(UploadNotificationContainer,this[_0x2f6154(0xcb)])));}};ExchangeClientController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0x5cc5d6(0x134)])(_univerjs_core['Injector'])),__decorateParam(0x1,_univerjs_ui[_0x5cc5d6(0x1f6)])],ExchangeClientController);let UniverExchangeClientPlugin=class UniverExchangeClientPlugin extends _univerjs_core[_0x5cc5d6(0x1ea)]{constructor(_0x2e7f1f=defaultPluginConfig,_0x130cda,_0x121540){const _0x53bf0c=_0x5cc5d6;super(),this['_config']=_0x2e7f1f,this[_0x53bf0c(0xcb)]=_0x130cda,this['_configService']=_0x121540;const {..._0x547f18}=(0x0,_univerjs_core[_0x53bf0c(0xad)])({},defaultPluginConfig,this['_config']);this[_0x53bf0c(0x1d4)][_0x53bf0c(0x83)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY,_0x547f18);}[_0x5cc5d6(0x1fc)](){const _0x44b0e4=_0x5cc5d6;(0x0,_univerjs_core[_0x44b0e4(0x1cb)])(this[_0x44b0e4(0xcb)],[[ExchangeClientController],[IExchangeOperateService,{'useClass':ExchangeOperateService}],[IExchangeService,{'useClass':ExchangeService}],[IRequestService,{'useClass':RequestService}],[IUploadNotificationService,{'useClass':UploadNotificationService}]]);}[_0x5cc5d6(0x18a)](){const _0x5eeff1=_0x5cc5d6;(0x0,_univerjs_core[_0x5eeff1(0x98)])(this[_0x5eeff1(0xcb)],[[ExchangeClientController],[IExchangeOperateService]]);}};_defineProperty(UniverExchangeClientPlugin,_0x5cc5d6(0x10e),_0x5cc5d6(0xed)),_defineProperty(UniverExchangeClientPlugin,_0x5cc5d6(0x92),name),_defineProperty(UniverExchangeClientPlugin,'version',version),UniverExchangeClientPlugin=__decorate([(0x0,_univerjs_core['DependentOn'])(_univerjs_network[_0x5cc5d6(0x12f)],_univerjs_pro_license[_0x5cc5d6(0x164)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_core[_0x5cc5d6(0x96)])),__decorateParam(0x2,_univerjs_core['IConfigService'])],UniverExchangeClientPlugin),exports[_0x5cc5d6(0x11d)]=EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY,Object['defineProperty'](exports,_0x5cc5d6(0xd6),{'enumerable':!![],'get':function(){return ExchangeOperateService;}}),Object[_0x5cc5d6(0x196)](exports,_0x5cc5d6(0xfd),{'enumerable':!![],'get':function(){return ExchangeService;}}),exports[_0x5cc5d6(0x9e)]=IExchangeOperateService,exports[_0x5cc5d6(0x140)]=IExchangeService,exports[_0x5cc5d6(0x192)]=IRequestService,exports[_0x5cc5d6(0x176)]=IUploadNotificationService,Object[_0x5cc5d6(0x196)](exports,_0x5cc5d6(0x1d6),{'enumerable':!![],'get':function(){return RequestService;}}),Object[_0x5cc5d6(0x196)](exports,_0x5cc5d6(0x173),{'enumerable':!![],'get':function(){return UniverExchangeClientPlugin;}}),exports[_0x5cc5d6(0x1f8)]=UploadNotificationContainer,exports[_0x5cc5d6(0xba)]=UploadNotificationService,exports[_0x5cc5d6(0x15e)]=UploadNotificationState,exports[_0x5cc5d6(0x106)]=downloadFile,exports[_0x5cc5d6(0xd7)]=getUniverInstanceTypeByFile,exports[_0x5cc5d6(0x12e)]=getUploadFile,exports['transformDocumentDataToSnapshotJson']=transformDocumentDataToSnapshotJson,exports[_0x5cc5d6(0xdb)]=transformSnapshotJsonToDocumentData,exports[_0x5cc5d6(0x1ac)]=transformSnapshotJsonToWorkbookData,exports['transformWorkbookDataToSnapshotJson']=transformWorkbookDataToSnapshotJson;
|
|
1
|
+
const _0xae8de0=_0x2669;(function(_0x249dee,_0xb86309){const _0x1daf78=_0x2669,_0x438c55=_0x249dee();while(!![]){try{const _0x5baddb=-parseInt(_0x1daf78(0x273))/0x1*(-parseInt(_0x1daf78(0x28a))/0x2)+-parseInt(_0x1daf78(0x294))/0x3*(-parseInt(_0x1daf78(0x222))/0x4)+-parseInt(_0x1daf78(0x1fb))/0x5+-parseInt(_0x1daf78(0x1bc))/0x6+parseInt(_0x1daf78(0x2ab))/0x7*(parseInt(_0x1daf78(0x2da))/0x8)+parseInt(_0x1daf78(0x264))/0x9*(parseInt(_0x1daf78(0x297))/0xa)+parseInt(_0x1daf78(0x1a3))/0xb*(parseInt(_0x1daf78(0x292))/0xc);if(_0x5baddb===_0xb86309)break;else _0x438c55['push'](_0x438c55['shift']());}catch(_0x1a3f38){_0x438c55['push'](_0x438c55['shift']());}}}(_0x5023,0x61dbd),Object['defineProperty'](exports,Symbol['toStringTag'],{'value':_0xae8de0(0x2a8)}));let _univerjs_pro_license=require('@univerjs-pro/license'),_univerjs_core=require('@univerjs/core'),_univerjs_network=require('@univerjs/network'),_univerjs_ui=require('@univerjs/ui'),_univerjs_icons=require('@univerjs/icons'),react=require('react'),rxjs=require('rxjs'),_univerjs_design=require('@univerjs/design'),react_jsx_runtime=require('react/jsx-runtime'),_univerjs_protocol=require('@univerjs/protocol'),_univerjs_pro_collaboration=require('@univerjs-pro/collaboration'),fflate=require('fflate');const EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY=_0xae8de0(0x203),configSymbol=Symbol(EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY),defaultPluginConfig={};var name='@univerjs-pro/exchange-client',version='0.22.0';function _typeof(_0x57e2ba){'@babel/helpers - typeof';const _0x29e72b=_0xae8de0;return _typeof='function'==typeof Symbol&&'symbol'==typeof Symbol[_0x29e72b(0x1d3)]?function(_0x21d2d9){return typeof _0x21d2d9;}:function(_0x585854){const _0x1913e9=_0x29e72b;return _0x585854&&_0x1913e9(0x256)==typeof Symbol&&_0x585854['constructor']===Symbol&&_0x585854!==Symbol[_0x1913e9(0x254)]?'symbol':typeof _0x585854;},_typeof(_0x57e2ba);}function toPrimitive(_0x4c2d26,_0x2e0180){const _0x46c87d=_0xae8de0;if(_0x46c87d(0x223)!=_typeof(_0x4c2d26)||!_0x4c2d26)return _0x4c2d26;var _0x47951c=_0x4c2d26[Symbol[_0x46c87d(0x29f)]];if(void 0x0!==_0x47951c){var _0xccbb7b=_0x47951c[_0x46c87d(0x1eb)](_0x4c2d26,_0x2e0180||_0x46c87d(0x1f8));if('object'!=_typeof(_0xccbb7b))return _0xccbb7b;throw new TypeError(_0x46c87d(0x1d9));}return(_0x46c87d(0x257)===_0x2e0180?String:Number)(_0x4c2d26);}function toPropertyKey(_0x353d1c){const _0x4706a3=_0xae8de0;var _0x270953=toPrimitive(_0x353d1c,_0x4706a3(0x257));return _0x4706a3(0x24c)==_typeof(_0x270953)?_0x270953:_0x270953+'';}function _defineProperty(_0x4fb576,_0x5c38d8,_0x30e626){const _0x2318ea=_0xae8de0;return(_0x5c38d8=toPropertyKey(_0x5c38d8))in _0x4fb576?Object[_0x2318ea(0x210)](_0x4fb576,_0x5c38d8,{'value':_0x30e626,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x4fb576[_0x5c38d8]=_0x30e626,_0x4fb576;}let UploadNotificationState=function(_0x4fd62d){const _0x3c1547=_0xae8de0;return _0x4fd62d[_0x4fd62d[_0x3c1547(0x2f0)]=0x0]=_0x3c1547(0x2f0),_0x4fd62d[_0x4fd62d[_0x3c1547(0x2d5)]=0x1]='SUCCESS',_0x4fd62d[_0x4fd62d[_0x3c1547(0x1df)]=0x2]=_0x3c1547(0x1df),_0x4fd62d;}({});const IUploadNotificationService=(0x0,_univerjs_core[_0xae8de0(0x2bc)])(_0xae8de0(0x28e));var UploadNotificationService=class extends _univerjs_core[_0xae8de0(0x1af)]{constructor(){const _0x154869=_0xae8de0;super(),_defineProperty(this,_0x154869(0x261),new rxjs['Subject']()),_defineProperty(this,'_state$',new rxjs[(_0x154869(0x24b))]()),_defineProperty(this,'_list$',new rxjs[(_0x154869(0x24b))]()),_defineProperty(this,_0x154869(0x239),this['_visible$'][_0x154869(0x205)]()),_defineProperty(this,'state$',this[_0x154869(0x28d)][_0x154869(0x205)]()),_defineProperty(this,'list$',this[_0x154869(0x263)][_0x154869(0x205)]()),_defineProperty(this,_0x154869(0x2dc),[]);}[_0xae8de0(0x2d8)](){const _0x5fd942=_0xae8de0;super[_0x5fd942(0x2d8)](),this['_visible$'][_0x5fd942(0x232)](),this[_0x5fd942(0x28d)][_0x5fd942(0x232)](),this['_list$'][_0x5fd942(0x232)]();}[_0xae8de0(0x2ce)](){const _0x5cc8eb=_0xae8de0;this[_0x5cc8eb(0x261)][_0x5cc8eb(0x31c)](!![]);}[_0xae8de0(0x215)](){const _0x1b8233=_0xae8de0;this[_0x1b8233(0x261)][_0x1b8233(0x31c)](![]);}[_0xae8de0(0x279)](_0x1bb4e2){const _0x2b5668=_0xae8de0;this[_0x2b5668(0x28d)][_0x2b5668(0x31c)](_0x1bb4e2);}['pushLink'](_0xf34f5){const _0x27d98a=_0xae8de0;this['_list']['unshift'](_0xf34f5),this['_list$']['next'](this[_0x27d98a(0x2dc)]);}};function LinkList(_0x5bf83d){const _0x239019=_0xae8de0,{list:_0x49ca70}=_0x5bf83d;function _0x3b31b5(_0x53295c){const _0x487769=_0x2669;switch(_0x53295c){case 0x1:return(0x0,react_jsx_runtime[_0x487769(0x1dc)])(_univerjs_icons[_0x487769(0x2b7)],{});case 0x2:return(0x0,react_jsx_runtime['jsx'])(_univerjs_icons['XlsxMultiIcon'],{});case 0x3:return(0x0,react_jsx_runtime[_0x487769(0x1dc)])(_univerjs_icons[_0x487769(0x2b8)],{});default:return null;}}return(0x0,react_jsx_runtime[_0x239019(0x1dc)])('div',{'className':(0x0,_univerjs_design['clsx'])(_0x239019(0x1c4),_univerjs_design[_0x239019(0x2c7)]),'children':(0x0,react_jsx_runtime[_0x239019(0x1dc)])('ul',{'className':_0x239019(0x2f9),'children':_0x49ca70[_0x239019(0x1cd)]((_0x5f1808,_0x494649)=>{const _0x5cfcdf=_0x239019;return(0x0,react_jsx_runtime['jsx'])('li',{'children':(0x0,react_jsx_runtime['jsxs'])('a',{'className':'univer-flex\x20univer-justify-between\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-px-2\x20univer-py-1\x20univer-text-gray-900\x20univer-no-underline\x20univer-outline-none\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-text-white\x20dark:hover:!univer-bg-gray-600','href':_0x5f1808['link'],'target':_0x5cfcdf(0x2dd),'rel':_0x5cfcdf(0x2f5),'children':[(0x0,react_jsx_runtime[_0x5cfcdf(0x219)])('span',{'className':_0x5cfcdf(0x30d),'children':[(0x0,react_jsx_runtime[_0x5cfcdf(0x1dc)])('span',{'className':_0x5cfcdf(0x247),'children':_0x3b31b5(_0x5f1808['type'])}),(0x0,react_jsx_runtime['jsx'])(_univerjs_design[_0x5cfcdf(0x2aa)],{'showIfEllipsis':!![],'title':_0x5f1808[_0x5cfcdf(0x2b1)],'asChild':!![],'children':(0x0,react_jsx_runtime[_0x5cfcdf(0x1dc)])(_0x5cfcdf(0x2a6),{'className':'univer-ml-1\x20univer-truncate\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','children':_0x5f1808['name']})})]}),(0x0,react_jsx_runtime[_0x5cfcdf(0x1dc)])(_0x5cfcdf(0x2a6),{'className':_0x5cfcdf(0x1a4),'children':(0x0,react_jsx_runtime['jsx'])(_univerjs_icons[_0x5cfcdf(0x298)],{})})]})},_0x494649);})})});}const DOCX=_0xae8de0(0x2df),XLSX=_0xae8de0(0x1b7),XLSM='application/vnd.ms-excel.sheet.macroEnabled.12',XLTX=_0xae8de0(0x221),PPTX='application/vnd.openxmlformats-officedocument.presentationml.presentation',UNIT_CONTENT_TYPE={[_univerjs_core[_0xae8de0(0x26e)][_0xae8de0(0x2c3)]]:[''],[_univerjs_core['UniverInstanceType']['UNIVER_DOC']]:[DOCX],[_univerjs_core[_0xae8de0(0x26e)]['UNIVER_SHEET']]:[XLSX,XLSM,XLTX],[_univerjs_core[_0xae8de0(0x26e)][_0xae8de0(0x27b)]]:[PPTX],[_univerjs_core[_0xae8de0(0x26e)][_0xae8de0(0x291)]]:[''],[_univerjs_core[_0xae8de0(0x26e)][_0xae8de0(0x1a0)]]:['']},CONTENT_TYPE_EXTNAME={[DOCX]:_0xae8de0(0x20f),[XLSX]:'xlsx',[XLSM]:_0xae8de0(0x2bd),[XLTX]:'xltx',[PPTX]:_0xae8de0(0x301)};function downloadFileByURL(_0x4a14aa,_0x14d1fb,_0x522d9a){const _0x1b50ce=_0xae8de0,_0x3b1ed1=document['createElement']('a');_0x3b1ed1[_0x1b50ce(0x23a)]=_0x4a14aa,_0x3b1ed1[_0x1b50ce(0x278)][_0x1b50ce(0x290)]=_0x1b50ce(0x283),_0x3b1ed1[_0x1b50ce(0x1ee)]=_0x14d1fb+'.'+_0x522d9a,document['body'][_0x1b50ce(0x2ca)](_0x3b1ed1),_0x3b1ed1[_0x1b50ce(0x233)](),document[_0x1b50ce(0x2c8)][_0x1b50ce(0x196)](_0x3b1ed1);}function downloadFile(_0x461c47,_0x1d30fc,_0x290a8c){const _0x231b36=_0xae8de0,_0x3186c1=URL['createObjectURL'](_0x461c47);downloadFileByURL(_0x3186c1,_0x1d30fc,_0x290a8c),URL[_0x231b36(0x23b)](_0x3186c1);}function getUniverInstanceTypeByFile(_0x2a2aea){const _0x4f47e2=_0xae8de0,_0x5dc48e=_0x2a2aea[_0x4f47e2(0x2b1)]['split']('.')[_0x4f47e2(0x19c)]();if(!_0x5dc48e)return _univerjs_core['UniverInstanceType'][_0x4f47e2(0x2c3)];const _0x4299b8=getUnitTypeList();let _0x2b14ba=_univerjs_core[_0x4f47e2(0x26e)][_0x4f47e2(0x2c3)];return _0x4299b8[_0x4f47e2(0x1c8)](_0x14cad1=>{if(isUniverInstanceTypeFileByExt(_0x5dc48e,_0x14cad1))return _0x2b14ba=_0x14cad1,!![];return![];}),_0x2b14ba;}function getUnitTypeList(){const _0x7d8a9e=_0xae8de0;return Object[_0x7d8a9e(0x206)](_univerjs_core[_0x7d8a9e(0x26e)])[_0x7d8a9e(0x30e)](_0x231384=>typeof _0x231384===_0x7d8a9e(0x1f4));}function isUniverInstanceTypeFileByExt(_0xac4f40,_0x28829f){const _0x14aeff=_0xae8de0;return UNIT_CONTENT_TYPE[_0x28829f]['map'](_0x45b034=>(CONTENT_TYPE_EXTNAME[_0x45b034]||'')['toLowerCase']())[_0x14aeff(0x1f2)](_0xac4f40[_0x14aeff(0x2ac)]());}function getUploadFile(_0x2c25de,_0x1da5ea=![]){const _0x360968=_0xae8de0,_0x4d10f2=_0x2c25de[_0x360968(0x1cd)](_0xa0ece1=>UNIT_CONTENT_TYPE[_0xa0ece1])[_0x360968(0x2a3)](',');return new Promise((_0xf2881a,_0x54a9e7)=>{const _0x44ae6a=_0x360968,_0xc6dc04=document[_0x44ae6a(0x2d3)](_0x44ae6a(0x198));_0xc6dc04[_0x44ae6a(0x241)]=_0x44ae6a(0x20e),_0xc6dc04[_0x44ae6a(0x2c9)]=_0x4d10f2,_0xc6dc04[_0x44ae6a(0x19d)]=_0x1da5ea,_0xc6dc04[_0x44ae6a(0x22b)]('change',_0x2b8201=>{const _0x5053c4=_0x44ae6a,_0x152d10=_0x2b8201[_0x5053c4(0x24f)];if(!_0x152d10[_0x5053c4(0x1c3)]||_0x152d10[_0x5053c4(0x1c3)][_0x5053c4(0x19f)]===0x0){_0x54a9e7(null);throw new Error(_0x5053c4(0x1be));}_0xf2881a(_0x152d10['files']);}),_0xc6dc04[_0x44ae6a(0x233)]();});}async function getFileByURL(_0x2f30de,_0x2f4281){const _0x3ebd32=_0xae8de0;try{var _0x3f2bd2,_0x5a0637,_0x39305f;const _0x4a1d68=await _0x2f4281[_0x3ebd32(0x214)](_0x2f30de,{'responseType':_0x3ebd32(0x1dd)}),_0x202a97=_0x4a1d68[_0x3ebd32(0x2c8)],_0x326d54=(_0x3f2bd2=(_0x5a0637=_0x4a1d68[_0x3ebd32(0x1de)][_0x3ebd32(0x214)](_0x3ebd32(0x26a)))===null||_0x5a0637===void 0x0?void 0x0:_0x5a0637[_0x3ebd32(0x2a3)](',\x20'))!==null&&_0x3f2bd2!==void 0x0?_0x3f2bd2:_0x3ebd32(0x19a);let _0x2a094c='file.'+(CONTENT_TYPE_EXTNAME[_0x326d54]||_0x3ebd32(0x1b8));const _0x1d2a85=(_0x39305f=_0x4a1d68['headers'][_0x3ebd32(0x214)](_0x3ebd32(0x23d)))===null||_0x39305f===void 0x0?void 0x0:_0x39305f[_0x3ebd32(0x2a3)](',\x20');if(_0x1d2a85){const _0x23b27c=_0x1d2a85['match'](/filename=(.+)/);if(_0x23b27c&&_0x23b27c[0x1])_0x2a094c=_0x23b27c[0x1];}else _0x2a094c=getFileNameFromURL(_0x2f30de)||_0x2a094c;return new File([_0x202a97],_0x2a094c,{'type':_0x326d54});}catch(_0x1d8c07){console[_0x3ebd32(0x30c)](_0x3ebd32(0x1d7),_0x1d8c07);return;}}function getFileNameFromURL(_0x39c84d){const _0x1e82a3=_0xae8de0;try{return new URL(_0x39c84d)[_0x1e82a3(0x286)][_0x1e82a3(0x268)]('/')[_0x1e82a3(0x19c)]();}catch(_0x460a7e){console['error']('Error\x20getting\x20file\x20name\x20from\x20URL:',_0x460a7e);return;}}function bufferToFile(_0x6c45b8){const _0x1d2b6=_0xae8de0,_0x4c086b=new Blob([_0x6c45b8[_0x1d2b6(0x2ad)]],{'type':_0x1d2b6(0x2d1)});return new File([_0x4c086b],_0x1d2b6(0x197));}function replaceType(_0x1f5e5a,_0x50e5cc){return _0x1f5e5a['replace']('{type}',_0x50e5cc);}function replaceTaskID(_0x5f18e7,_0x4015ee){const _0x5b411b=_0xae8de0;return _0x5f18e7[_0x5b411b(0x2a7)](_0x5b411b(0x20b),_0x4015ee);}function replaceFileID(_0xbd51cb,_0x1238fd){return _0xbd51cb['replace']('{fileID}',_0x1238fd);}function __decorateParam(_0x459279,_0x3fa569){return function(_0x443b8d,_0x172d18){_0x3fa569(_0x443b8d,_0x172d18,_0x459279);};}function __decorate(_0x23d16b,_0x307571,_0x55e886,_0x5de9bd){const _0x1623a4=_0xae8de0;var _0x59663c=arguments['length'],_0xfac9ce=_0x59663c<0x3?_0x307571:_0x5de9bd===null?_0x5de9bd=Object[_0x1623a4(0x1e4)](_0x307571,_0x55e886):_0x5de9bd,_0x31a4ec;if(typeof Reflect===_0x1623a4(0x223)&&typeof Reflect[_0x1623a4(0x317)]===_0x1623a4(0x256))_0xfac9ce=Reflect['decorate'](_0x23d16b,_0x307571,_0x55e886,_0x5de9bd);else{for(var _0x48eda0=_0x23d16b[_0x1623a4(0x19f)]-0x1;_0x48eda0>=0x0;_0x48eda0--)if(_0x31a4ec=_0x23d16b[_0x48eda0])_0xfac9ce=(_0x59663c<0x3?_0x31a4ec(_0xfac9ce):_0x59663c>0x3?_0x31a4ec(_0x307571,_0x55e886,_0xfac9ce):_0x31a4ec(_0x307571,_0x55e886))||_0xfac9ce;}return _0x59663c>0x3&&_0xfac9ce&&Object['defineProperty'](_0x307571,_0x55e886,_0xfac9ce),_0xfac9ce;}const DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY=_0xae8de0(0x1e6),DEFAULT_EXCHANGE_IMPORT_SERVER_URL_KEY=_0xae8de0(0x1d8),DEFAULT_EXCHANGE_EXPORT_SERVER_URL_KEY=_0xae8de0(0x2ef),DEFAULT_EXCHANGE_GET_TASK_SERVER_URL_KEY=_0xae8de0(0x1ce),DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY=_0xae8de0(0x2c0),DEFAULT_EXCHANGE_MAX_TIMEOUT_TIME_KEY=0x1d4c0,IRequestService=(0x0,_univerjs_core[_0xae8de0(0x2bc)])(_0xae8de0(0x2f3));let RequestService=class RequestService{constructor(_0x24fd41,_0x2055b5){const _0x2be4b6=_0xae8de0;this[_0x2be4b6(0x270)]=_0x24fd41,this[_0x2be4b6(0x2bf)]=_0x2055b5,_defineProperty(this,'_taskInterrupted',new Set());}[_0xae8de0(0x2d8)](){}['setTaskInterrupted'](_0x160e7b){const _0x176e24=_0xae8de0;this['_taskInterrupted'][_0x176e24(0x2a4)](_0x160e7b);}['clearTaskInterrupted'](){const _0x2558bc=_0xae8de0;this['_taskInterrupted'][_0x2558bc(0x29a)]();}async[_0xae8de0(0x22c)](_0xb000a4,_0x5b6c8f=0x0,_0x47f611=![]){const _0x2bd650=_0xae8de0;if(typeof _0xb000a4==='string'){const _0x48722c=await getFileByURL(_0xb000a4,this[_0x2bd650(0x2bf)]);if(!_0x48722c)throw new Error(_0x2bd650(0x25a));_0xb000a4=_0x48722c;}_0x5b6c8f=_0x5b6c8f||_0xb000a4['size'];const _0x58cec3=new FormData();_0x58cec3['append'](_0x2bd650(0x20e),_0xb000a4);try{const _0x355353=this[_0x2bd650(0x302)]()+_0x2bd650(0x299)+_0x5b6c8f+_0x2bd650(0x229)+_univerjs_protocol[_0x2bd650(0x25c)]['HttpImport']+_0x2bd650(0x2f7)+_0x47f611,_0x1aac71={'body':_0x58cec3},_0x1b1952=(await this[_0x2bd650(0x2bf)][_0x2bd650(0x28c)](_0x355353,_0x1aac71))['body'];if(_0x1b1952[_0x2bd650(0x30c)]&&_0x1b1952['error'][_0x2bd650(0x2a2)]!==_univerjs_protocol['ErrorCode']['OK'])throw new Error(this[_0x2bd650(0x28b)](_0x2bd650(0x1fe),_0x1b1952[_0x2bd650(0x30c)]));return _0x1b1952;}catch(_0x447a2f){if(_0x447a2f instanceof Error)throw _0x447a2f;throw new Error(this[_0x2bd650(0x2be)](_0x2bd650(0x1fe),_0x447a2f));}}async[_0xae8de0(0x306)](_0x188db6){const _0x1a6102=_0xae8de0,{fileID:_0x2d497c,type:_0xe007c9,outputType:_0x37a9c3,minSheetColumnCount:_0x258393,minSheetRowCount:_0x3498f2}=_0x188db6;try{const _0xae3be2=replaceType(this['_getImportURL'](),''+_0xe007c9),_0x7dd92d={'body':{'fileID':_0x2d497c,'outputType':_0x37a9c3,'minSheetColumnCount':_0x258393,'minSheetRowCount':_0x3498f2}},_0x3a24c2=(await this[_0x1a6102(0x2bf)]['post'](_0xae3be2,_0x7dd92d))[_0x1a6102(0x2c8)];if(_0x3a24c2[_0x1a6102(0x30c)]&&_0x3a24c2[_0x1a6102(0x30c)]['code']!==_univerjs_protocol[_0x1a6102(0x251)]['OK'])return;return _0x3a24c2;}catch(_0x373c1b){return;}}async[_0xae8de0(0x269)](_0x14e69e){const _0x14e7a3=_0xae8de0,{unitID:_0x3f1a13,jsonID:_0x1f9814,type:_0x13fc5f,sscSwitch:_0x5336b8,useImageUrl:_0x4fe9f2,ignoreTableExport:_0x2ba93b}=_0x14e69e;try{const _0x13b37e=replaceType(this[_0x14e7a3(0x2a1)](),''+_0x13fc5f),_0x4cab3f={'body':{'unitID':_0x3f1a13,'jsonID':_0x1f9814,'type':_0x13fc5f,'sscSwitch':_0x5336b8,'useImageUrl':_0x4fe9f2,'ignoreTableExport':_0x2ba93b}},_0x465bf0=(await this[_0x14e7a3(0x2bf)][_0x14e7a3(0x28c)](_0x13b37e,_0x4cab3f))['body'];if(_0x465bf0[_0x14e7a3(0x30c)]&&_0x465bf0['error'][_0x14e7a3(0x2a2)]!==_univerjs_protocol[_0x14e7a3(0x251)]['OK'])return;return _0x465bf0;}catch(_0x578acc){return;}}async[_0xae8de0(0x228)](_0x4eb4a0){return new Promise((_0x3d0749,_0x5abc8f)=>{const _0x5793e3=_0x2669;try{let _0x2cd33f=0x0;const _0x41f097=replaceTaskID(this[_0x5793e3(0x1ff)](),''+_0x4eb4a0),_0x481e17=this[_0x5793e3(0x2c6)](),_0x172e25=async()=>{const _0x31d052=_0x5793e3;if(this[_0x31d052(0x2de)]['has'](_0x4eb4a0))return;const _0x1ddfb2=(await this[_0x31d052(0x2bf)]['get'](_0x41f097))[_0x31d052(0x2c8)];if(_0x1ddfb2[_0x31d052(0x30c)]&&_0x1ddfb2[_0x31d052(0x30c)][_0x31d052(0x2a2)]===_univerjs_protocol[_0x31d052(0x251)]['OK']){if(_0x1ddfb2[_0x31d052(0x276)]==='done')_0x3d0749(_0x1ddfb2);else{if(_0x1ddfb2[_0x31d052(0x276)]===_0x31d052(0x1c0)){let _0x1ff9c5=0x3e8;if(_0x2cd33f>=_0x481e17){_0x5abc8f(_0x1ddfb2);return;}else{if(_0x2cd33f>=0x7530)_0x1ff9c5=0x1388;}_0x2cd33f+=_0x1ff9c5,setTimeout(_0x172e25,_0x1ff9c5);}else _0x5abc8f(_0x1ddfb2);}}else _0x5abc8f(_0x1ddfb2);};_0x172e25();}catch(_0x50922b){_0x5abc8f(_0x50922b instanceof Error?_0x50922b:new Error(String(_0x50922b)));}});}async['signUrl'](_0x32d617){const _0x39bfc0=_0xae8de0;try{const _0x1c07cb=replaceFileID(this[_0x39bfc0(0x2b5)](),''+_0x32d617);return(await this[_0x39bfc0(0x2bf)][_0x39bfc0(0x214)](_0x1c07cb))[_0x39bfc0(0x2c8)];}catch(_0x2770e0){return;}}async[_0xae8de0(0x217)](_0x5a84ac){const _0x3513b2=_0xae8de0;try{return(await this[_0x3513b2(0x2bf)][_0x3513b2(0x214)](_0x5a84ac,{'responseType':'text'}))[_0x3513b2(0x2c8)];}catch(_0x2a2bb8){return;}}[_0xae8de0(0x28b)](_0x52d72a,_0x3b55db){const _0x2d4e9d=this['_extractErrorDetail'](_0x3b55db);if(!_0x2d4e9d)return _0x52d72a;return _0x52d72a+':\x20'+_0x2d4e9d;}[_0xae8de0(0x2be)](_0x21e6a5,_0x301270){const _0x314a7c=_0xae8de0;if(_0x301270 instanceof _univerjs_network[_0x314a7c(0x230)]){const _0x59905a=typeof _0x301270[_0x314a7c(0x276)]==='number'?''+_0x301270[_0x314a7c(0x276)]+(_0x301270[_0x314a7c(0x231)]?'\x20'+_0x301270[_0x314a7c(0x231)]:''):void 0x0,_0x5b6004=this['_extractErrorDetail'](_0x301270[_0x314a7c(0x30c)]);if(_0x59905a&&_0x5b6004)return _0x21e6a5+':\x20HTTP\x20'+_0x59905a+_0x314a7c(0x1b9)+_0x5b6004;if(_0x59905a)return _0x21e6a5+':\x20HTTP\x20'+_0x59905a;if(_0x5b6004)return _0x21e6a5+':\x20'+_0x5b6004;return _0x21e6a5;}const _0x230a02=this[_0x314a7c(0x281)](_0x301270);if(!_0x230a02)return _0x21e6a5;return _0x21e6a5+':\x20'+_0x230a02;}[_0xae8de0(0x281)](_0x343aa2){const _0x3163ec=_0xae8de0;if(typeof _0x343aa2===_0x3163ec(0x257)){const _0x16cc16=_0x343aa2[_0x3163ec(0x234)]();return _0x16cc16[_0x3163ec(0x19f)]>0x0?_0x16cc16:void 0x0;}if(_0x343aa2 instanceof Error)return this[_0x3163ec(0x281)](_0x343aa2[_0x3163ec(0x307)]);if(!_0x343aa2||typeof _0x343aa2!==_0x3163ec(0x223)||Array['isArray'](_0x343aa2))return;const _0x10f1bf=_0x343aa2,_0x23ec25=this[_0x3163ec(0x281)](_0x10f1bf[_0x3163ec(0x307)]);if(_0x23ec25)return _0x23ec25;if(_0x10f1bf[_0x3163ec(0x30c)]&&typeof _0x10f1bf[_0x3163ec(0x30c)]==='object'&&!Array[_0x3163ec(0x207)](_0x10f1bf[_0x3163ec(0x30c)])){const _0x301300=this[_0x3163ec(0x281)](_0x10f1bf[_0x3163ec(0x30c)]);if(_0x301300)return _0x301300;}}['_getUploadFileURL'](){const _0x3bb684=_0xae8de0;var _0x2b0d98;const _0x4cbe3a=this[_0x3bb684(0x270)][_0x3bb684(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x2b0d98=_0x4cbe3a===null||_0x4cbe3a===void 0x0?void 0x0:_0x4cbe3a[_0x3bb684(0x211)])!==null&&_0x2b0d98!==void 0x0?_0x2b0d98:DEFAULT_EXCHANGE_UPLOAD_FILE_SERVER_URL_KEY;}[_0xae8de0(0x2cf)](){const _0x8c4cb7=_0xae8de0;var _0x5eeef0;const _0x5682d0=this[_0x8c4cb7(0x270)]['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x5eeef0=_0x5682d0===null||_0x5682d0===void 0x0?void 0x0:_0x5682d0[_0x8c4cb7(0x1fd)])!==null&&_0x5eeef0!==void 0x0?_0x5eeef0:DEFAULT_EXCHANGE_IMPORT_SERVER_URL_KEY;}[_0xae8de0(0x2a1)](){const _0x57f192=_0xae8de0;var _0x55aa6c;const _0x17e81b=this['_configService'][_0x57f192(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x55aa6c=_0x17e81b===null||_0x17e81b===void 0x0?void 0x0:_0x17e81b[_0x57f192(0x27a)])!==null&&_0x55aa6c!==void 0x0?_0x55aa6c:DEFAULT_EXCHANGE_EXPORT_SERVER_URL_KEY;}[_0xae8de0(0x1ff)](){const _0x5477ee=_0xae8de0;var _0x10ecdd;const _0x51a007=this[_0x5477ee(0x270)]['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x10ecdd=_0x51a007===null||_0x51a007===void 0x0?void 0x0:_0x51a007['getTaskServerUrl'])!==null&&_0x10ecdd!==void 0x0?_0x10ecdd:DEFAULT_EXCHANGE_GET_TASK_SERVER_URL_KEY;}[_0xae8de0(0x2b5)](){const _0x21d64c=_0xae8de0;var _0x182150;const _0x54de05=this['_configService'][_0x21d64c(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x182150=_0x54de05===null||_0x54de05===void 0x0?void 0x0:_0x54de05[_0x21d64c(0x289)])!==null&&_0x182150!==void 0x0?_0x182150:DEFAULT_EXCHANGE_SIGN_URL_SERVER_URL_KEY;}[_0xae8de0(0x2c6)](){const _0x4985d7=_0xae8de0;var _0x1df9df;const _0x44b5e2=this[_0x4985d7(0x270)][_0x4985d7(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x1df9df=_0x44b5e2===null||_0x44b5e2===void 0x0?void 0x0:_0x44b5e2[_0x4985d7(0x295)])!==null&&_0x1df9df!==void 0x0?_0x1df9df:DEFAULT_EXCHANGE_MAX_TIMEOUT_TIME_KEY;}};RequestService=__decorate([__decorateParam(0x0,_univerjs_core[_0xae8de0(0x1b3)]),__decorateParam(0x1,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(_univerjs_network[_0xae8de0(0x1cc)]))],RequestService);function transformWorkbookSnapshotMetaToString(_0x3ae6b6){const _0x167400=_0xae8de0,_0x1a6fba=_0x3ae6b6[_0x167400(0x1cb)];if(!_0x1a6fba)return null;const _0x73bf93={};if(_0x1a6fba['sheets'])Object['keys'](_0x1a6fba[_0x167400(0x1da)])[_0x167400(0x30a)](_0xeec347=>{const _0x38c3a0=_0x167400,_0x4725e6=_0x1a6fba[_0x38c3a0(0x1da)][_0xeec347];_0x73bf93[_0xeec347]={..._0x4725e6,'originalMeta':(0x0,_univerjs_pro_collaboration[_0x38c3a0(0x1ca)])(_univerjs_pro_collaboration[_0x38c3a0(0x252)]['decode'](_0x4725e6['originalMeta']))};});const _0x2ad5b1=(0x0,_univerjs_pro_collaboration[_0x167400(0x1ca)])(_univerjs_pro_collaboration[_0x167400(0x252)][_0x167400(0x218)](_0x1a6fba[_0x167400(0x2f4)]));return{..._0x3ae6b6,'workbook':{..._0x1a6fba,'originalMeta':_0x2ad5b1,'sheets':_0x73bf93},'doc':{}};}function transformDocumentSnapshotMetaToString(_0x31fd3d){const _0x26fe71=_0xae8de0,_0x31c32a=_0x31fd3d[_0x26fe71(0x1f1)];if(!_0x31c32a)return null;const _0x34fb2c=(0x0,_univerjs_pro_collaboration[_0x26fe71(0x1ca)])(_univerjs_pro_collaboration[_0x26fe71(0x252)][_0x26fe71(0x218)](_0x31c32a['originalMeta']));return{..._0x31fd3d,'workbook':{},'doc':{..._0x31c32a,'originalMeta':_0x34fb2c}};}function transformSheetBlockMetaToString(_0x1e3db7){const _0x5ed46d=_0xae8de0,_0x5c8b59={};return _0x1e3db7[_0x5ed46d(0x30a)](_0x428858=>{const _0x5e869d=_0x5ed46d;_0x5c8b59[_0x428858['id']]={..._0x428858,'data':(0x0,_univerjs_pro_collaboration[_0x5e869d(0x1ca)])(_univerjs_pro_collaboration['textDecoder'][_0x5e869d(0x218)](_0x428858[_0x5e869d(0x250)]))};}),_0x5c8b59;}async function transformWorkbookDataToSnapshotJson(_0x4c785b){const _0x187eb1=_0xae8de0;var _0x2cd010;const _0x114a6b={'metadata':void 0x0},_0x4677e2=_0x4c785b['id'],_0x22b011=(_0x2cd010=_0x4c785b[_0x187eb1(0x227)])!==null&&_0x2cd010!==void 0x0?_0x2cd010:0x0,_0x406e7d=new ClientSnapshotServerService(),{snapshot:_0xb68d68}=await(0x0,_univerjs_pro_collaboration[_0x187eb1(0x199)])(_0x114a6b,_0x4c785b,_0x4677e2,_0x22b011,_0x406e7d),_0x4fd895=await(0x0,_univerjs_pro_collaboration[_0x187eb1(0x1fc)])(_0xb68d68,_0x406e7d),_0x41a899=transformWorkbookSnapshotMetaToString(_0xb68d68);if(!_0x41a899)throw new Error(_0x187eb1(0x27c));return{'snapshot':_0x41a899,'sheetBlocks':transformSheetBlockMetaToString(_0x4fd895)};}async function transformDocumentDataToSnapshotJson(_0x4d6c72){const _0x5e5fff=_0xae8de0;var _0x368a0f;const _0x56ee0f={'metadata':void 0x0},_0x25eea5=_0x4d6c72['id'],{snapshot:_0x449898}=await(0x0,_univerjs_pro_collaboration[_0x5e5fff(0x29b)])(_0x56ee0f,_0x4d6c72,_0x25eea5,(_0x368a0f=_0x4d6c72['rev'])!==null&&_0x368a0f!==void 0x0?_0x368a0f:0x0,new ClientSnapshotServerService()),_0x53fb51=transformDocumentSnapshotMetaToString(_0x449898);if(!_0x53fb51)throw new Error(_0x5e5fff(0x27c));return{'snapshot':_0x53fb51,'sheetBlocks':{}};}async function transformSnapshotJsonToWorkbookData(_0x46adb6){const _0x5874d2=_0xae8de0,_0x58aad6=_0x46adb6['snapshot'],_0x4993d0=_0x46adb6[_0x5874d2(0x2c5)]||{};return await(0x0,_univerjs_pro_collaboration[_0x5874d2(0x2af)])(_0x58aad6,Object['keys'](_0x4993d0)[_0x5874d2(0x1cd)](_0x386233=>_0x4993d0[_0x386233])[_0x5874d2(0x1cd)](_0x2f81b1=>{const _0x31d89d=_0x5874d2;return{..._0x2f81b1,'data':_0x2f81b1[_0x31d89d(0x250)]?JSON[_0x31d89d(0x1f7)]((0x0,_univerjs_pro_collaboration['b64DecodeUnicode'])(_0x2f81b1[_0x31d89d(0x250)])):void 0x0};}));}function _0x5023(){const _0x31a40e=['number','Injector','getUnitOnRev','parse','default','_exportBySnapshot','useEffect','1892430DoxcFI','getSheetBlocksFromSnapshot','importServerUrl','upload\x20request\x20failed','_getTaskURL','saveChangeset','_getEnableServerSideComputing','transformDocumentDataToSnapshotJson','exchange-client.config','unsubscribe','asObservable','values','isArray','textEncoder','_getUnitJson','pushLink','{taskID}','getConfig','registerLink','file','docx','defineProperty','uploadFileServerUrl','subscribe','_logService','get','hide','_getMinSheetRowCount','getTextFromUrl','decode','jsxs','_refresh','sign\x20url\x20error','exchange.networkError','_progress$','exchange.uploading','importWorkbookDataToUnitId','univer-mt-3\x20univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-py-0\x20univer-pl-2\x20univer-pr-1','application/vnd.openxmlformats-officedocument.spreadsheetml.template','20yLhYmq','object','taskID','univer-h-6\x20univer-text-2xl','MessageType','rev','getTask','&source=','title','addEventListener','upload','outputType','univer-text-red-500','exchange.unknownMistake','HTTPResponseError','statusText','complete','click','trim','_export','getSnapshot','clsx','searchParams','visible$','href','revokeObjectURL','resolve','content-disposition','LocaleService','shift','_getIgnoreTableExport','type','importXLSXToUnitId','_getMinSheetColumnCount','univer-pl-2\x20univer-pr-4','.json','_registerComponents','univer-flex\x20univer-h-5\x20univer-text-xl','snapshot','_localeService','success','Subject','symbol','UNIVER_SHEET','univer-flex','currentTarget','data','ErrorCode','textDecoder','_uploadNotificationService','prototype','updateSnapshot','function','string','UniverExchangeClientPlugin','univer-pro.exchange-client.operate.service','upload\x20request\x20failed:\x20failed\x20to\x20read\x20source\x20file\x20from\x20url','options','FileSource','BehaviorSubject','_univerInstanceService','fileID','univer-h-7\x20univer-cursor-pointer\x20univer-select-none\x20univer-rounded-md\x20univer-border-0\x20univer-border-transparent\x20univer-bg-transparent\x20univer-px-2\x20univer-py-0\x20univer-text-sm\x20univer-text-primary-600\x20univer-transition-all\x20univer-duration-150\x20hover:univer-bg-primary-50','_visible$','Error','_list$','2794302mYNnxI','_completeProgress','Failed\x20to\x20get\x20taskID\x20from\x20import\x20response','_showNetworkError','split','export','Content-Type','importFileToUnitId','exchange.uploadSuccessTip','_getUnitIDDoc','UniverInstanceType','exchange.fileTypeError','_configService','getUnitId','setConfig','2403SqhTYm','clearTaskInterrupted','useObservable','status','exchange.wait','style','updateState','exportServerUrl','UNIVER_SLIDE','Failed\x20to\x20transform\x20snapshot\x20to\x20string','importDOCXToUnitId','_requestService','_getUnitDocJson','IMessageService','_extractErrorDetail','pluginName','none','resolveWithBasePath','minSheetRowCount','pathname','ExchangeService','UNIVER_EXCHANGE_CLIENT_PLUGIN','signUrlServerUrl','38RrEthX','_buildProtocolErrorMessage','post','_state$','univer-pro.exchange-client.upload-notification.service','_requestState$','display','UNIVER_PROJECT','182424cMQoyi','univer-flex\x20univer-items-center\x20univer-justify-between\x20univer-py-0\x20univer-pl-1.5\x20univer-pr-2','55122QvjVZR','maxTimeoutTime','UploadNotificationService','20gCpNyD','ShareRangeIcon','?size=','clear','transformDocumentDataToSnapshot','_uploadTaskNotDone','getSheetBlock','univer-text-green-500','toPrimitive','INTERNAL_ERROR','_getExportURL','code','join','add','unitID','span','replace','Module','_emitProgress','Tooltip','217kbTSyd','toLowerCase','buffer','registerComponent','transformSnapshotToWorkbookData','Success','name','univer-flex\x20univer-size-6\x20univer-cursor-pointer\x20univer-items-center\x20univer-justify-center\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-text-gray-500\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-bg-gray-600','getCurrentUnitForType','unit','_getSignURL','transformSnapshotJsonToDocumentData','DocMultiIcon','SlideMultiIcon','IUniverInstanceService','_addDoneTask','univer-ml-1.5\x20univer-font-semibold\x20univer-leading-6\x20univer-text-gray-900\x20dark:!univer-text-white','createIdentifier','xlsm','_buildHttpErrorMessage','_httpService','/universer-api/file/{fileID}/sign-url','registerDependencies','requestState$','UNIVER_UNKNOWN','useState','sheetBlocks','_getMaxPollingTime','scrollbarClassName','body','accept','appendChild','_getLinkByUnitId','IUploadNotificationService','_addTotalCount','show','_getImportURL','univer-mt-5\x20univer-flex\x20univer-flex-col','application/json','Info','createElement','onStarting','SUCCESS','origin','list$','dispose','univer-fixed\x20univer-bottom-12\x20univer-right-3\x20univer-z-[1000]\x20univer-box-border\x20univer-flex\x20univer-w-[372px]\x20univer-flex-col\x20univer-rounded-md\x20univer-bg-white\x20univer-px-3\x20univer-pb-4\x20univer-pt-5\x20univer-shadow-md','101800HJCptW','_importToSnapshot','_list','_blank','_taskInterrupted','application/vnd.openxmlformats-officedocument.wordprocessingml.document','connectInjector','UNDEFINED','transformWorkbookDataToSnapshotJson','Failed\x20to\x20get\x20text\x20from\x20url','transformSnapshotToDocumentData','encode','progress$','univer-pro.exchange-client.exchange.service','UniverNetworkPlugin','_exchangeService','_sheetBlockCache','_uiPartsService','workbook.json','_totalUploadTaskCount','_messageService','/universer-api/exchange/{type}/export','UPLOADING','signUrl','stringify','univer-pro.exchange-client.request.service','originalMeta','noreferrer','getLatestCsReqIdBySid','&flate=','upload\x20failed:\x20FileId\x20is\x20empty','univer-m-0\x20univer-flex\x20univer-list-none\x20univer-flex-col\x20univer-gap-2\x20univer-p-0','ExchangeOperateService','IUIPartsService','exportXLSXBySnapshot','Inject','Failed\x20to\x20get\x20fileID\x20from\x20task','_config','_importFileToUnitId','pptx','_getUploadFileURL','downloadEndpointUrl','merge','exportDOCXByUnitId','import','message','interruptImportTask','getDeserializedSheetBlock','forEach','transformSnapshotJsonToWorkbookData','error','univer-flex\x20univer-w-[calc(100%-48px)]\x20univer-items-center','filter','SuccessIcon','_fileTypeError','Failed\x20to\x20get\x20file\x20from\x20url','IRequestService','UploadNotificationState','state$','UNIVER_DOC','_getUnitID','decorate','DependentOn','_showDownloadMessage','Method\x20not\x20implemented.','set','next','_injector','removeChild','file.json','input','transformWorkbookDataToSnapshot','application/octet-stream','exportDOCXBySnapshot','pop','multiple','_import','length','UNRECOGNIZED','Warning','FileId','33pDIYHH','univer-flex\x20univer-size-6\x20univer-items-center\x20univer-justify-center\x20univer-rounded\x20univer-border-none\x20univer-bg-transparent\x20univer-p-0\x20univer-text-base\x20univer-text-gray-600\x20univer-outline-none\x20univer-transition-colors\x20hover:univer-bg-gray-200\x20dark:!univer-text-gray-200\x20dark:hover:!univer-bg-gray-600','ignoreTableExport','toString','catch','fetchMissingChangesets','useDependency','_signUrl','IExchangeOperateService','exchange.downloading','minSheetColumnCount','uploadFileToUnitId','Disposable','_doneUploadTaskCount','exchange.uploadSuccess','disableCellImageConversion','IConfigService','exportXLSXByUnitId','_showUploadMessage','importXLSXToSnapshot','application/vnd.openxmlformats-officedocument.spreadsheetml.sheet','xlsx','\x20-\x20','import\x20error','button','2515494inqlrV','exchange.tooLarge','No\x20file\x20selected','min','pending','version','_clearProgress','files','univer-mt-5\x20univer-max-h-72\x20univer-overflow-y-auto\x20univer-overflow-x-hidden','BuiltInUIPart','Failed\x20to\x20get\x20jsonID\x20from\x20task','_getUnitName','some','UploadNotificationContainer','b64EncodeUnicode','workbook','HTTPService','map','/universer-api/exchange/task/{taskID}','Failed\x20to\x20parse\x20json','exchange.uploadAgain','importDOCXToSnapshot','exchange.downloadSuccess','iterator','univer-mx-0\x20univer-mb-3\x20univer-mt-4\x20univer-h-1.5\x20univer-w-[324px]\x20univer-rounded-lg\x20univer-bg-gray-200','interrupt','CloseIcon','Error\x20fetching\x20file\x20from\x20URL:','/universer-api/exchange/{type}/import','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','sheets','blockID','jsx','blob','headers','ERROR','Get\x20outputType\x20error','getUploadFile','_importTaskId','disposeWithMe','getOwnPropertyDescriptor','exchange.internalError','/universer-api/stream/file/upload','Failed\x20to\x20get\x20unitID\x20from\x20task','getCurrentUnitOfType','div','block\x20is\x20required','call','_upload','_getDisableCellImageConversion','download','ClockIcon','Plugin','doc','includes','floor'];_0x5023=function(){return _0x31a40e;};return _0x5023();}function transformSnapshotJsonToDocumentData(_0x285d63){const _0x3eba4a=_0xae8de0,_0x42bf62=_0x285d63[_0x3eba4a(0x248)];return(0x0,_univerjs_pro_collaboration[_0x3eba4a(0x2e4)])(_0x42bf62);}var ClientSnapshotServerService=class{constructor(){const _0x5b9130=_0xae8de0;_defineProperty(this,_0x5b9130(0x2ea),new Map());}[_0xae8de0(0x1f6)](){const _0x280566=_0xae8de0;return Promise['resolve']({'snapshot':{'unitID':'','type':_univerjs_core['UniverInstanceType'][_0x280566(0x24d)],'rev':0x0,'workbook':void 0x0,'doc':void 0x0},'changesets':[],'error':{'code':_univerjs_protocol[_0x280566(0x251)]['OK'],'message':''}});}[_0xae8de0(0x29d)](_0x5edc5e,_0xa09a3e){const _0x41a563=_0xae8de0,_0xc26140=this[_0x41a563(0x2ea)]['get'](_0xa09a3e[_0x41a563(0x1db)]);return Promise[_0x41a563(0x23c)]({'block':_0xc26140,'error':{'code':_univerjs_protocol[_0x41a563(0x251)]['OK'],'message':''}});}[_0xae8de0(0x309)](_0x238177,_0x130aa7){const _0x2992a9=_0xae8de0,_0x36dc6d=this['_sheetBlockCache'][_0x2992a9(0x214)](_0x130aa7['blockID']);return Promise[_0x2992a9(0x23c)]({'block':_0x36dc6d===void 0x0?void 0x0:{..._0x36dc6d,'data':JSON[_0x2992a9(0x1f7)](_univerjs_pro_collaboration[_0x2992a9(0x252)]['decode'](_0x36dc6d['data']))},'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''}});}[_0xae8de0(0x1a8)](){const _0x17c1ae=_0xae8de0;return Promise[_0x17c1ae(0x23c)]({'changesets':[],'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':''}});}['getResourcesRequest'](){const _0x517883=_0xae8de0;return Promise['resolve']({'resources':{},'error':{'code':_univerjs_protocol[_0x517883(0x251)]['OK'],'message':''}});}['saveSnapshot'](){const _0x33d2e8=_0xae8de0;return Promise[_0x33d2e8(0x23c)]({'error':{'code':_univerjs_protocol[_0x33d2e8(0x251)]['OK'],'message':''}});}[_0xae8de0(0x255)](){const _0x2d0b2c=_0xae8de0;return Promise[_0x2d0b2c(0x23c)]({'error':{'code':_univerjs_protocol[_0x2d0b2c(0x251)]['OK'],'message':''}});}['saveSheetBlock'](_0x291a0d,_0x4e063c){const _0x512ebd=_0xae8de0,{block:_0x2744f2}=_0x4e063c;if(!_0x2744f2)return Promise['resolve']({'error':{'code':_univerjs_protocol[_0x512ebd(0x251)][_0x512ebd(0x2e1)],'message':_0x512ebd(0x1ea)},'blockID':''});return this[_0x512ebd(0x2ea)][_0x512ebd(0x31b)](_0x2744f2['id'],_0x2744f2),Promise[_0x512ebd(0x23c)]({'error':{'code':_univerjs_protocol[_0x512ebd(0x251)]['OK'],'message':''},'blockID':_0x2744f2['id']});}[_0xae8de0(0x200)](){const _0x40eb8c=_0xae8de0;return Promise[_0x40eb8c(0x23c)]({'error':{'code':_univerjs_protocol[_0x40eb8c(0x251)]['OK'],'message':''},'concurrent':[]});}['copyFileMeta'](){const _0x329468=_0xae8de0;return Promise[_0x329468(0x23c)]({'error':void 0x0,'fileMetaId':''});}[_0xae8de0(0x2f6)](){const _0x573545=_0xae8de0;return Promise[_0x573545(0x23c)]({'error':void 0x0,'latestReqID':0x0});}};const IExchangeService=(0x0,_univerjs_core[_0xae8de0(0x2bc)])(_0xae8de0(0x2e7));let ExchangeService=class ExchangeService extends _univerjs_core['Disposable']{constructor(_0xb4bc56,_0x40b606,_0x143bdb){const _0x2b1a3d=_0xae8de0;super(),this[_0x2b1a3d(0x270)]=_0xb4bc56,this[_0x2b1a3d(0x2bf)]=_0x40b606,this[_0x2b1a3d(0x27e)]=_0x143bdb,_defineProperty(this,_0x2b1a3d(0x1e2),null),_defineProperty(this,_0x2b1a3d(0x28f),new rxjs[(_0x2b1a3d(0x24b))]()),_defineProperty(this,_0x2b1a3d(0x2c2),this[_0x2b1a3d(0x28f)]['asObservable']());}[_0xae8de0(0x2d8)](){const _0x141e25=_0xae8de0;super[_0x141e25(0x2d8)](),this['_requestState$'][_0x141e25(0x232)]();}async[_0xae8de0(0x1d1)](_0x548bc1){const _0x282612=_0xae8de0,_0x7bfc2=await this[_0x282612(0x2db)](_0x548bc1,_univerjs_core[_0x282612(0x26e)][_0x282612(0x315)]);if(!_0x7bfc2||!_0x7bfc2['snapshot'])return;const _0xf2dfc2=transformSnapshotJsonToDocumentData(_0x7bfc2);if(!_0xf2dfc2)return;return _0xf2dfc2;}async['exportDOCXByUnitId'](_0x744b61){const _0x414498=_0xae8de0;return this[_0x414498(0x235)](_0x744b61,0x1,_univerjs_core[_0x414498(0x26e)][_0x414498(0x315)]);}async[_0xae8de0(0x19b)](_0x3f59aa){const _0x500796=_0xae8de0,_0xb52ee7=await transformDocumentDataToSnapshotJson(_0x3f59aa);return this[_0x500796(0x1f9)](_0xb52ee7,_univerjs_core[_0x500796(0x26e)][_0x500796(0x315)]);}async[_0xae8de0(0x1b6)](_0x2a61f7){const _0x1a34ac=_0xae8de0,_0x22a4f8=await this[_0x1a34ac(0x2db)](_0x2a61f7,_univerjs_core[_0x1a34ac(0x26e)]['UNIVER_SHEET']);if(!_0x22a4f8)return;const _0x128c01=await transformSnapshotJsonToWorkbookData(_0x22a4f8);if(!_0x128c01)return;return _0x128c01;}async[_0xae8de0(0x1b4)](_0x12d3c1){const _0x508414=_0xae8de0;return this[_0x508414(0x235)](_0x12d3c1,0x1,_univerjs_core['UniverInstanceType'][_0x508414(0x24d)]);}async[_0xae8de0(0x2fc)](_0x54d54f){const _0x18a7e6=_0xae8de0,_0x56e3af=await transformWorkbookDataToSnapshotJson(_0x54d54f);return this['_exportBySnapshot'](_0x56e3af,_univerjs_core[_0x18a7e6(0x26e)][_0x18a7e6(0x24d)]);}async['importFileToUnitId'](_0x20df5c,_0x6e4adf){const _0x45b9b9=_0xae8de0;var _0x3172bf,_0x3f61ea;const _0x42d9ad=await this['_upload'](_0x20df5c);if(!_0x42d9ad)return;const _0x3b32d1=await this[_0x45b9b9(0x19e)](_0x42d9ad,0x1,_0x6e4adf);if(!_0x3b32d1)return;this[_0x45b9b9(0x1e2)]=_0x3b32d1,this[_0x45b9b9(0x27e)][_0x45b9b9(0x274)]();const _0x1f9139=await this[_0x45b9b9(0x27e)][_0x45b9b9(0x228)](_0x3b32d1)['catch'](_0xbfb8b9=>{const _0x5c2525=_0x45b9b9;var _0x4caea3;const _0x132ff3=_0xbfb8b9 instanceof Error?_0xbfb8b9[_0x5c2525(0x307)]:(_0x4caea3=_0xbfb8b9[_0x5c2525(0x30c)])===null||_0x4caea3===void 0x0?void 0x0:_0x4caea3['message'];this['_requestState$']['next']({'error':{'code':_univerjs_protocol[_0x5c2525(0x251)][_0x5c2525(0x1a0)],'message':_0x132ff3||''},'state':0x3});});if(!_0x1f9139)return;const _0x2473b4=(_0x3172bf=_0x1f9139['import'])===null||_0x3172bf===void 0x0?void 0x0:_0x3172bf['outputType'],_0x230aa6=((_0x3f61ea=_0x1f9139[_0x45b9b9(0x306)])===null||_0x3f61ea===void 0x0?void 0x0:_0x3f61ea[_0x45b9b9(0x2a5)])||'';if(_0x2473b4!==0x1){this[_0x45b9b9(0x28f)][_0x45b9b9(0x31c)]({'error':{'code':_univerjs_protocol['ErrorCode']['UNRECOGNIZED'],'message':_0x45b9b9(0x1e0)},'state':0x3});return;}if(_0x230aa6[_0x45b9b9(0x19f)]===0x0){this[_0x45b9b9(0x28f)]['next']({'error':{'code':_univerjs_protocol[_0x45b9b9(0x251)][_0x45b9b9(0x1a0)],'message':_0x45b9b9(0x1e7)},'state':0x3});return;}return this['_requestState$'][_0x45b9b9(0x31c)]({'error':_0x1f9139[_0x45b9b9(0x30c)],'state':0x3}),_0x230aa6;}async[_0xae8de0(0x21f)](_0x424fd7){const _0x203bb0=_0xae8de0,_0x391a43=await transformWorkbookDataToSnapshotJson(_0x424fd7),_0x555d59=typeof _0x424fd7['id']===_0x203bb0(0x257)&&_0x424fd7['id'][_0x203bb0(0x234)]()?_0x424fd7['id'][_0x203bb0(0x234)]()+_0x203bb0(0x245):_0x203bb0(0x2ec),_0xa3399c=new File([JSON[_0x203bb0(0x2f2)](_0x391a43)],_0x555d59,{'type':'application/json'});return this[_0x203bb0(0x26b)](_0xa3399c,_univerjs_core[_0x203bb0(0x26e)][_0x203bb0(0x24d)]);}[_0xae8de0(0x308)](){const _0x248406=_0xae8de0;if(this[_0x248406(0x1e2)])this[_0x248406(0x27e)]['setTaskInterrupted'](this['_importTaskId']);}async['_importToSnapshot'](_0x38e7ab,_0x515347){const _0x30399f=_0xae8de0;var _0x33ed32,_0x33724e;const _0x491928=await this[_0x30399f(0x1ec)](_0x38e7ab);if(!_0x491928)return;const _0x10e42f=await this[_0x30399f(0x19e)](_0x491928,0x2,_0x515347);if(!_0x10e42f)return;this[_0x30399f(0x1e2)]=_0x10e42f,this[_0x30399f(0x27e)][_0x30399f(0x274)]();const _0x31678d=await this[_0x30399f(0x27e)][_0x30399f(0x228)](_0x10e42f)[_0x30399f(0x1a7)](_0x2541f0=>{const _0x266a1d=_0x30399f;var _0x37706a;const _0x147e24=_0x2541f0 instanceof Error?_0x2541f0[_0x266a1d(0x307)]:(_0x37706a=_0x2541f0[_0x266a1d(0x30c)])===null||_0x37706a===void 0x0?void 0x0:_0x37706a[_0x266a1d(0x307)];this['_requestState$'][_0x266a1d(0x31c)]({'error':{'code':_univerjs_protocol[_0x266a1d(0x251)][_0x266a1d(0x1a0)],'message':_0x147e24||''},'state':0x3});});if(!_0x31678d)return;const _0x414e74=(_0x33ed32=_0x31678d[_0x30399f(0x306)])===null||_0x33ed32===void 0x0?void 0x0:_0x33ed32[_0x30399f(0x22d)],_0x1b4577=((_0x33724e=_0x31678d[_0x30399f(0x306)])===null||_0x33724e===void 0x0?void 0x0:_0x33724e['jsonID'])||'';if(_0x414e74!==0x2){this['_requestState$'][_0x30399f(0x31c)]({'error':{'code':_univerjs_protocol[_0x30399f(0x251)][_0x30399f(0x1a0)],'message':_0x30399f(0x1e0)},'state':0x3});return;}if(_0x1b4577[_0x30399f(0x19f)]===0x0){this[_0x30399f(0x28f)][_0x30399f(0x31c)]({'error':{'code':_univerjs_protocol[_0x30399f(0x251)][_0x30399f(0x1a0)],'message':_0x30399f(0x1c6)},'state':0x3});return;}this[_0x30399f(0x28f)]['next']({'error':_0x31678d['error'],'state':0x3});const _0xd8c5cb=await this[_0x30399f(0x1aa)](_0x1b4577);if(!_0xd8c5cb)return;const _0x4d00e8=await this['_requestService'][_0x30399f(0x217)](_0xd8c5cb);if(!_0x4d00e8){this[_0x30399f(0x28f)]['next']({'error':{'code':_univerjs_protocol[_0x30399f(0x251)][_0x30399f(0x1a0)],'message':_0x30399f(0x2e3)},'state':0x5});return;}try{const _0x2ab048=JSON[_0x30399f(0x1f7)](_0x4d00e8);return this[_0x30399f(0x28f)][_0x30399f(0x31c)]({'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':'success'},'state':0x5}),_0x2ab048;}catch{this[_0x30399f(0x28f)][_0x30399f(0x31c)]({'error':{'code':_univerjs_protocol[_0x30399f(0x251)][_0x30399f(0x1a0)],'message':_0x30399f(0x1cf)},'state':0x5});}}async[_0xae8de0(0x1f9)](_0x2ce27b,_0x5f5bc3){const _0x2a95bf=_0xae8de0,_0x10bbaf=JSON[_0x2a95bf(0x2f2)](_0x2ce27b),_0x51e0dd=_univerjs_pro_collaboration[_0x2a95bf(0x208)][_0x2a95bf(0x2e5)](_0x10bbaf),_0x20d91b=(0x0,fflate['deflateSync'])(_0x51e0dd),_0x1304e6=_0x51e0dd[_0x2a95bf(0x19f)],_0x49270d=bufferToFile(_0x20d91b),_0x280ab1=await this[_0x2a95bf(0x1ec)](_0x49270d,_0x1304e6,!![]);if(!_0x280ab1)return;return this[_0x2a95bf(0x235)](_0x280ab1,0x2,_0x5f5bc3);}async[_0xae8de0(0x235)](_0x4c15c3,_0x579f9e,_0x5e7dcf){const _0x3d6425=_0xae8de0;var _0x9cd40d;const _0x39b9b1=await this[_0x3d6425(0x27e)]['export']({'unitID':_0x579f9e===0x1?_0x4c15c3:'','jsonID':_0x579f9e===0x2?_0x4c15c3:'','type':_0x5e7dcf,'sscSwitch':this[_0x3d6425(0x201)](),'useImageUrl':this[_0x3d6425(0x1ed)](),'ignoreTableExport':this[_0x3d6425(0x240)]()});if(!_0x39b9b1){this[_0x3d6425(0x28f)][_0x3d6425(0x31c)]({'error':{'code':_univerjs_protocol[_0x3d6425(0x251)][_0x3d6425(0x1a0)],'message':'export\x20error'},'state':0x2});return;}this[_0x3d6425(0x28f)][_0x3d6425(0x31c)]({'error':_0x39b9b1[_0x3d6425(0x30c)],'state':0x2});if(_0x39b9b1[_0x3d6425(0x30c)]&&_0x39b9b1[_0x3d6425(0x30c)][_0x3d6425(0x2a2)]!==_univerjs_protocol[_0x3d6425(0x251)]['OK'])return;const _0x259a90=_0x39b9b1[_0x3d6425(0x224)],_0x3a827f=await this[_0x3d6425(0x27e)][_0x3d6425(0x228)](_0x259a90)[_0x3d6425(0x1a7)](_0x5ce68f=>{const _0xb4bbe2=_0x3d6425;var _0x2b8eb5;const _0x5c59e6=_0x5ce68f instanceof Error?_0x5ce68f[_0xb4bbe2(0x307)]:(_0x2b8eb5=_0x5ce68f[_0xb4bbe2(0x30c)])===null||_0x2b8eb5===void 0x0?void 0x0:_0x2b8eb5[_0xb4bbe2(0x307)];this[_0xb4bbe2(0x28f)][_0xb4bbe2(0x31c)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0xb4bbe2(0x1a0)],'message':_0x5c59e6||''},'state':0x3});});if(!_0x3a827f)return;const _0x7299c4=((_0x9cd40d=_0x3a827f[_0x3d6425(0x269)])===null||_0x9cd40d===void 0x0?void 0x0:_0x9cd40d[_0x3d6425(0x25f)])||'';if(_0x7299c4[_0x3d6425(0x19f)]===0x0){this[_0x3d6425(0x28f)][_0x3d6425(0x31c)]({'error':{'code':_univerjs_protocol[_0x3d6425(0x251)][_0x3d6425(0x1a0)],'message':_0x3d6425(0x2fe)},'state':0x3});return;}this[_0x3d6425(0x28f)][_0x3d6425(0x31c)]({'error':_0x3a827f['error'],'state':0x3});const _0x9469cd=await this[_0x3d6425(0x1aa)](_0x7299c4);if(!_0x9469cd)return;const _0xe2833e=await getFileByURL(_0x9469cd,this[_0x3d6425(0x2bf)]);if(!_0xe2833e){this[_0x3d6425(0x28f)]['next']({'error':{'code':_univerjs_protocol['ErrorCode'][_0x3d6425(0x1a0)],'message':_0x3d6425(0x311)},'state':0x6});return;}return this[_0x3d6425(0x28f)][_0x3d6425(0x31c)]({'error':{'code':_univerjs_protocol[_0x3d6425(0x251)]['OK'],'message':_0x3d6425(0x24a)},'state':0x6}),_0xe2833e;}async[_0xae8de0(0x1ec)](_0x3faa7d,_0x113148,_0x5a7180){const _0x4235e9=_0xae8de0;let _0x23c280;try{_0x23c280=await this[_0x4235e9(0x27e)][_0x4235e9(0x22c)](_0x3faa7d,_0x113148,_0x5a7180);}catch(_0x598a6d){const _0x11db6d=_0x598a6d instanceof Error?_0x598a6d[_0x4235e9(0x307)]:String(_0x598a6d);this['_requestState$'][_0x4235e9(0x31c)]({'error':{'code':_univerjs_protocol[_0x4235e9(0x251)][_0x4235e9(0x1a0)],'message':_0x11db6d},'state':0x0});return;}if(!_0x23c280||typeof _0x23c280[_0x4235e9(0x1a2)]!=='string'){this[_0x4235e9(0x28f)][_0x4235e9(0x31c)]({'error':{'code':_univerjs_protocol[_0x4235e9(0x251)][_0x4235e9(0x1a0)],'message':'upload\x20failed:\x20missing\x20FileId\x20in\x20response'},'state':0x0});return;}const _0x393524=_0x23c280[_0x4235e9(0x1a2)];if(_0x393524[_0x4235e9(0x19f)]===0x0){this[_0x4235e9(0x28f)][_0x4235e9(0x31c)]({'error':{'code':_univerjs_protocol[_0x4235e9(0x251)][_0x4235e9(0x1a0)],'message':_0x4235e9(0x2f8)},'state':0x0});return;}return this[_0x4235e9(0x28f)][_0x4235e9(0x31c)]({'error':{'code':_univerjs_protocol['ErrorCode']['OK'],'message':_0x4235e9(0x24a)},'state':0x0}),_0x393524;}async[_0xae8de0(0x19e)](_0x535356,_0x4f495d,_0x1641c9){const _0xe069fc=_0xae8de0,_0x2d55b7={'fileID':_0x535356,'type':_0x1641c9,'outputType':_0x4f495d,'fileUrl':'','minSheetRowCount':this[_0xe069fc(0x216)](),'minSheetColumnCount':this[_0xe069fc(0x243)]()},_0x5a0290=await this[_0xe069fc(0x27e)]['import'](_0x2d55b7);if(!_0x5a0290){this[_0xe069fc(0x28f)][_0xe069fc(0x31c)]({'error':{'code':_univerjs_protocol[_0xe069fc(0x251)][_0xe069fc(0x1a0)],'message':_0xe069fc(0x1ba)},'state':0x1});return;}if(_0x5a0290[_0xe069fc(0x30c)]&&_0x5a0290[_0xe069fc(0x30c)][_0xe069fc(0x2a2)]!==_univerjs_protocol['ErrorCode']['OK']){this['_requestState$']['next']({'error':_0x5a0290['error'],'state':0x1});return;}const _0x12f7b3=_0x5a0290['taskID'];if(_0x12f7b3['length']===0x0){this[_0xe069fc(0x28f)][_0xe069fc(0x31c)]({'error':{'code':_univerjs_protocol['ErrorCode'][_0xe069fc(0x1a0)],'message':_0xe069fc(0x266)},'state':0x1});return;}return this[_0xe069fc(0x28f)][_0xe069fc(0x31c)]({'error':_0x5a0290[_0xe069fc(0x30c)],'state':0x1}),_0x12f7b3;}async[_0xae8de0(0x1aa)](_0x559458){const _0x1da13d=_0xae8de0,_0x145814=await this[_0x1da13d(0x27e)][_0x1da13d(0x2f1)](_0x559458);if(!_0x145814){this[_0x1da13d(0x28f)][_0x1da13d(0x31c)]({'error':{'code':_univerjs_protocol[_0x1da13d(0x251)][_0x1da13d(0x1a0)],'message':_0x1da13d(0x21b)},'state':0x4});return;}if(_0x145814[_0x1da13d(0x30c)]&&_0x145814[_0x1da13d(0x30c)][_0x1da13d(0x2a2)]!==_univerjs_protocol[_0x1da13d(0x251)]['OK']){this['_requestState$']['next']({'error':_0x145814['error'],'state':0x4});return;}const _0x2d7e8c=(0x0,_univerjs_core[_0x1da13d(0x284)])(_0x145814['url'],this['_getDownloadEndpointURL']());if(_0x2d7e8c[_0x1da13d(0x19f)]===0x0){this[_0x1da13d(0x28f)][_0x1da13d(0x31c)]({'error':{'code':_univerjs_protocol[_0x1da13d(0x251)][_0x1da13d(0x1a0)],'message':'sign\x20url\x20error'},'state':0x4});return;}return this[_0x1da13d(0x28f)][_0x1da13d(0x31c)]({'error':_0x145814[_0x1da13d(0x30c)],'state':0x4}),_0x2d7e8c;}['_getDownloadEndpointURL'](){const _0x1e22c3=_0xae8de0;var _0x4f1c38;const _0x195c98=this[_0x1e22c3(0x270)]['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x4f1c38=_0x195c98===null||_0x195c98===void 0x0?void 0x0:_0x195c98[_0x1e22c3(0x303)])!==null&&_0x4f1c38!==void 0x0?_0x4f1c38:location[_0x1e22c3(0x2d6)];}[_0xae8de0(0x216)](){const _0x1b14b9=_0xae8de0;var _0xcf17fb,_0x36206a;const _0x2f5568=this[_0x1b14b9(0x270)][_0x1b14b9(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0xcf17fb=_0x2f5568===null||_0x2f5568===void 0x0||(_0x36206a=_0x2f5568[_0x1b14b9(0x25b)])===null||_0x36206a===void 0x0?void 0x0:_0x36206a[_0x1b14b9(0x285)])!==null&&_0xcf17fb!==void 0x0?_0xcf17fb:0x1;}[_0xae8de0(0x243)](){const _0x2ff1c1=_0xae8de0;var _0x170254,_0x373f83;const _0x2226a6=this[_0x2ff1c1(0x270)][_0x2ff1c1(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x170254=_0x2226a6===null||_0x2226a6===void 0x0||(_0x373f83=_0x2226a6['options'])===null||_0x373f83===void 0x0?void 0x0:_0x373f83[_0x2ff1c1(0x1ad)])!==null&&_0x170254!==void 0x0?_0x170254:0x1;}[_0xae8de0(0x201)](){const _0x851ce=_0xae8de0;var _0x31e987,_0x3d4de0;const _0x201c39=this[_0x851ce(0x270)][_0x851ce(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x31e987=_0x201c39===null||_0x201c39===void 0x0||(_0x3d4de0=_0x201c39[_0x851ce(0x25b)])===null||_0x3d4de0===void 0x0?void 0x0:_0x3d4de0['enableServerSideComputing'])!==null&&_0x31e987!==void 0x0?_0x31e987:![];}[_0xae8de0(0x1ed)](){const _0x22b5fc=_0xae8de0;var _0x57b1af,_0x1fa028;const _0x4c8686=this[_0x22b5fc(0x270)][_0x22b5fc(0x20c)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x57b1af=_0x4c8686===null||_0x4c8686===void 0x0||(_0x1fa028=_0x4c8686[_0x22b5fc(0x25b)])===null||_0x1fa028===void 0x0?void 0x0:_0x1fa028[_0x22b5fc(0x1b2)])!==null&&_0x57b1af!==void 0x0?_0x57b1af:!![];}[_0xae8de0(0x240)](){const _0x1c3486=_0xae8de0;var _0x4c1737,_0x554323;const _0x3ad37a=this[_0x1c3486(0x270)]['getConfig'](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY);return(_0x4c1737=_0x3ad37a===null||_0x3ad37a===void 0x0||(_0x554323=_0x3ad37a[_0x1c3486(0x25b)])===null||_0x554323===void 0x0?void 0x0:_0x554323[_0x1c3486(0x1a5)])!==null&&_0x4c1737!==void 0x0?_0x4c1737:![];}};ExchangeService=__decorate([__decorateParam(0x0,_univerjs_core[_0xae8de0(0x1b3)]),__decorateParam(0x1,(0x0,_univerjs_core['Inject'])(_univerjs_network['HTTPService'])),__decorateParam(0x2,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(IRequestService))],ExchangeService);const NilProgress={'done':0x0,'count':0x0},IExchangeOperateService=(0x0,_univerjs_core['createIdentifier'])(_0xae8de0(0x259));function _0x2669(_0x3ca218,_0x297441){_0x3ca218=_0x3ca218-0x195;const _0x5023e6=_0x5023();let _0x2669b7=_0x5023e6[_0x3ca218];return _0x2669b7;}let ExchangeOperateService=class ExchangeOperateService extends _univerjs_core[_0xae8de0(0x1af)]{constructor(_0x60b9d2,_0x45a7d2,_0x203243,_0x5ed6d0,_0x520052,_0xa008d4){const _0x3ccbfa=_0xae8de0;super(),this[_0x3ccbfa(0x25e)]=_0x60b9d2,this[_0x3ccbfa(0x2ee)]=_0x45a7d2,this['_localeService']=_0x203243,this[_0x3ccbfa(0x2e9)]=_0x5ed6d0,this[_0x3ccbfa(0x253)]=_0x520052,this[_0x3ccbfa(0x213)]=_0xa008d4,_defineProperty(this,'_progress$',new rxjs[(_0x3ccbfa(0x25d))](NilProgress)),_defineProperty(this,_0x3ccbfa(0x2e6),this[_0x3ccbfa(0x21d)]['asObservable']()),_defineProperty(this,_0x3ccbfa(0x2ed),0x0),_defineProperty(this,_0x3ccbfa(0x1b0),0x0),this[_0x3ccbfa(0x1e3)]((0x0,_univerjs_core['toDisposable'])(this[_0x3ccbfa(0x2e9)][_0x3ccbfa(0x2c2)]['subscribe'](_0x55919a=>{const _0x5d9254=_0x3ccbfa;var _0x553bf0;if(((_0x553bf0=_0x55919a[_0x5d9254(0x30c)])===null||_0x553bf0===void 0x0?void 0x0:_0x553bf0[_0x5d9254(0x2a2)])===_univerjs_protocol['ErrorCode']['OK'])this[_0x5d9254(0x2ba)](0x1);else this[_0x5d9254(0x267)](_0x55919a[_0x5d9254(0x30c)]);})));}['interrupt'](){const _0x376292=_0xae8de0;this[_0x376292(0x1c2)](),this['_uploadNotificationService'][_0x376292(0x279)](0x2),this[_0x376292(0x2e9)][_0x376292(0x308)]();}async[_0xae8de0(0x1ae)](_0x1c8b8){const _0x3f1aee=_0xae8de0;throw new Error(_0x3f1aee(0x31a));}async[_0xae8de0(0x27d)](){const _0x50a024=_0xae8de0,_0x1bc649=await getUploadFile([_univerjs_core['UniverInstanceType']['UNIVER_DOC']]);if(!_0x1bc649)return;if(this[_0x50a024(0x310)](_0x1bc649,_univerjs_core[_0x50a024(0x26e)][_0x50a024(0x315)]))return;return this[_0x50a024(0x300)](_0x1bc649[0x0],_univerjs_core[_0x50a024(0x26e)]['UNIVER_DOC']);}['importDOCXToSnapshot'](){const _0x21f286=_0xae8de0;throw new Error(_0x21f286(0x31a));}async['exportDOCXByUnitId'](_0x4b0d5a,_0x30e24c,_0x27a4e0){const _0x39c59c=_0xae8de0;this[_0x39c59c(0x319)](_univerjs_design[_0x39c59c(0x226)][_0x39c59c(0x2d2)]);const _0x47d56d=await this[_0x39c59c(0x2e9)][_0x39c59c(0x305)](_0x4b0d5a||this[_0x39c59c(0x26d)]());if(!_0x47d56d)return;downloadFile(_0x47d56d,_0x30e24c||this[_0x39c59c(0x1c7)](_0x47d56d),_0x39c59c(0x20f)),this['_showDownloadMessage'](_univerjs_design[_0x39c59c(0x226)][_0x39c59c(0x2b0)]);}async[_0xae8de0(0x19b)](){const _0x50ed30=_0xae8de0;this[_0x50ed30(0x319)](_univerjs_design[_0x50ed30(0x226)][_0x50ed30(0x2d2)]);const _0x44d802=await this[_0x50ed30(0x27f)](),_0xe45de=await this['_exchangeService'][_0x50ed30(0x19b)](_0x44d802);if(!_0xe45de)return;downloadFile(_0xe45de,this['_getUnitName'](_0xe45de),_0x50ed30(0x20f)),this['_showDownloadMessage'](_univerjs_design[_0x50ed30(0x226)][_0x50ed30(0x2b0)]);}async[_0xae8de0(0x242)](){const _0x43f819=_0xae8de0;if(this[_0x43f819(0x29c)]()){this['_messageService']['show']({'type':_univerjs_design['MessageType'][_0x43f819(0x1a1)],'content':this['_localeService']['t'](_0x43f819(0x21e))});return;}const _0x4934f2=await getUploadFile([_univerjs_core['UniverInstanceType'][_0x43f819(0x24d)]]);if(!_0x4934f2)return;if(this['_fileTypeError'](_0x4934f2,_univerjs_core[_0x43f819(0x26e)]['UNIVER_SHEET']))return;return this[_0x43f819(0x300)](_0x4934f2[0x0],_univerjs_core[_0x43f819(0x26e)][_0x43f819(0x24d)]);}async[_0xae8de0(0x1b6)](){const _0x13dbef=_0xae8de0;if(this[_0x13dbef(0x29c)]()){this['_messageService'][_0x13dbef(0x2ce)]({'type':_univerjs_design[_0x13dbef(0x226)][_0x13dbef(0x1a1)],'content':this[_0x13dbef(0x249)]['t']('exchange.uploading')});return;}const _0xd56a7d=await getUploadFile([_univerjs_core[_0x13dbef(0x26e)][_0x13dbef(0x24d)]]);if(!_0xd56a7d)return;this[_0x13dbef(0x1b5)](_univerjs_design['MessageType']['Info']);const _0x13809f=await this['_exchangeService'][_0x13dbef(0x1b6)](_0xd56a7d[0x0]);if(!_0x13809f)return;this['_refresh'](_0x13809f),this[_0x13dbef(0x1b5)](_univerjs_design[_0x13dbef(0x226)][_0x13dbef(0x2b0)]);}async[_0xae8de0(0x1b4)](_0x139c3b,_0x35b64d,_0x56e929){const _0x54746a=_0xae8de0;this[_0x54746a(0x319)](_univerjs_design[_0x54746a(0x226)][_0x54746a(0x2d2)]);const _0x21e6a1=await this[_0x54746a(0x2e9)][_0x54746a(0x1b4)](_0x139c3b||this[_0x54746a(0x316)]());if(!_0x21e6a1)return;downloadFile(_0x21e6a1,_0x35b64d||this[_0x54746a(0x1c7)](_0x21e6a1),_0x54746a(0x1b8)),this['_showDownloadMessage'](_univerjs_design['MessageType']['Success']);}async[_0xae8de0(0x2fc)](){const _0x16af0e=_0xae8de0;this[_0x16af0e(0x319)](_univerjs_design[_0x16af0e(0x226)][_0x16af0e(0x2d2)]);const _0x4f770c=await this[_0x16af0e(0x209)](),_0x300892=await this[_0x16af0e(0x2e9)][_0x16af0e(0x2fc)](_0x4f770c);if(!_0x300892)return;downloadFile(_0x300892,this[_0x16af0e(0x1c7)](_0x300892),_0x16af0e(0x1b8)),this['_showDownloadMessage'](_univerjs_design['MessageType']['Success']);}[_0xae8de0(0x20d)](_0x3acde8){const _0x1b47b7=_0xae8de0;this[_0x1b47b7(0x2cb)]=_0x3acde8;}async['_importFileToUnitId'](_0x1fb690,_0x50a681){const _0x7efcac=_0xae8de0;this[_0x7efcac(0x253)][_0x7efcac(0x2ce)](),this['_uploadNotificationService']['updateState'](0x0),this[_0x7efcac(0x2cd)](0x4),this[_0x7efcac(0x2ba)](0x1);const _0x3b8aaf=await this[_0x7efcac(0x2e9)][_0x7efcac(0x26b)](_0x1fb690,_0x50a681);if(!_0x3b8aaf){this['_clearProgress'](),this[_0x7efcac(0x253)][_0x7efcac(0x279)](0x2);return;}const _0x204e70={'link':this[_0x7efcac(0x2cb)](_0x3b8aaf,_0x50a681),'name':_0x1fb690[_0x7efcac(0x2b1)],'type':_0x50a681};return this[_0x7efcac(0x253)][_0x7efcac(0x20a)](_0x204e70),this[_0x7efcac(0x265)](),this[_0x7efcac(0x253)][_0x7efcac(0x279)](0x1),_0x3b8aaf;}[_0xae8de0(0x316)](){const _0x3134aa=_0xae8de0;return this[_0x3134aa(0x25e)][_0x3134aa(0x1e8)](_univerjs_core[_0x3134aa(0x26e)]['UNIVER_SHEET'])['getUnitId']();}[_0xae8de0(0x26d)](){const _0x1c4991=_0xae8de0;return this[_0x1c4991(0x25e)][_0x1c4991(0x1e8)](_univerjs_core['UniverInstanceType'][_0x1c4991(0x315)])['getUnitId']();}['_getUnitName'](_0x2b7762){const _0x34c38f=_0xae8de0;var _0x58c347;return((_0x58c347=this[_0x34c38f(0x25e)][_0x34c38f(0x1e8)](_univerjs_core[_0x34c38f(0x26e)][_0x34c38f(0x24d)]))===null||_0x58c347===void 0x0?void 0x0:_0x58c347['name'])||_0x2b7762[_0x34c38f(0x2b1)]['split']('.')[_0x34c38f(0x23f)]()||document[_0x34c38f(0x22a)];}async[_0xae8de0(0x209)](){const _0x5d08d4=_0xae8de0;return this[_0x5d08d4(0x25e)][_0x5d08d4(0x1e8)](_univerjs_core['UniverInstanceType']['UNIVER_SHEET'])[_0x5d08d4(0x236)]();}async[_0xae8de0(0x27f)](){const _0x384731=_0xae8de0;return this['_univerInstanceService']['getCurrentUnitOfType'](_univerjs_core[_0x384731(0x26e)][_0x384731(0x315)])['getSnapshot']();}['_getLinkByUnitId'](_0x3ec653,_0x2dbea2){const _0x1f13dd=_0xae8de0,_0x3c4318=new URL(window['location'][_0x1f13dd(0x23a)]);return _0x3c4318[_0x1f13dd(0x238)][_0x1f13dd(0x31b)](_0x1f13dd(0x2b4),_0x3ec653),_0x3c4318[_0x1f13dd(0x238)][_0x1f13dd(0x31b)](_0x1f13dd(0x241),''+_0x2dbea2),_0x3c4318[_0x1f13dd(0x1a6)]();}[_0xae8de0(0x21a)](_0x14df30){const _0x5be107=_0xae8de0,_0x558a01=this[_0x5be107(0x25e)][_0x5be107(0x2b3)](_univerjs_core[_0x5be107(0x26e)][_0x5be107(0x24d)])[_0x5be107(0x271)]();this[_0x5be107(0x25e)]['disposeUnit'](_0x558a01),this['_univerInstanceService']['createUnit'](_univerjs_core[_0x5be107(0x26e)][_0x5be107(0x24d)],_0x14df30);}[_0xae8de0(0x267)](_0x30088b){const _0x5139a2=_0xae8de0;if(_0x30088b){const {code:_0x3962bf}=_0x30088b;switch(_0x3962bf){case _univerjs_protocol['ErrorCode']['CONNECTOR_DATA_TOO_LARGE']:this[_0x5139a2(0x2ee)]['show']({'type':_univerjs_design['MessageType'][_0x5139a2(0x262)],'content':this[_0x5139a2(0x249)]['t'](_0x5139a2(0x1bd))});break;case _univerjs_protocol[_0x5139a2(0x251)][_0x5139a2(0x2a0)]:this['_messageService'][_0x5139a2(0x2ce)]({'type':_univerjs_design[_0x5139a2(0x226)][_0x5139a2(0x262)],'content':this[_0x5139a2(0x249)]['t'](_0x5139a2(0x1e5))});break;default:this[_0x5139a2(0x2ee)][_0x5139a2(0x2ce)]({'type':_univerjs_design[_0x5139a2(0x226)][_0x5139a2(0x262)],'content':this[_0x5139a2(0x249)]['t'](_0x5139a2(0x21c))});break;}return null;}return this[_0x5139a2(0x2ee)][_0x5139a2(0x2ce)]({'type':_univerjs_design[_0x5139a2(0x226)]['Error'],'content':this[_0x5139a2(0x249)]['t'](_0x5139a2(0x21c))}),null;}['_showDownloadMessage'](_0x2009b6){const _0xdabaf0=_0xae8de0;let _0x508720='';switch(_0x2009b6){case _univerjs_design[_0xdabaf0(0x226)][_0xdabaf0(0x2b0)]:_0x508720=this[_0xdabaf0(0x249)]['t'](_0xdabaf0(0x1d2));break;case _univerjs_design[_0xdabaf0(0x226)][_0xdabaf0(0x2d2)]:_0x508720=this[_0xdabaf0(0x249)]['t'](_0xdabaf0(0x1ac));break;default:break;}this['_messageService'][_0xdabaf0(0x2ce)]({'type':_0x2009b6,'content':_0x508720});}[_0xae8de0(0x1b5)](_0x5aa40c){const _0x5d4e05=_0xae8de0;let _0xfdef4='';switch(_0x5aa40c){case _univerjs_design['MessageType'][_0x5d4e05(0x2b0)]:_0xfdef4=this[_0x5d4e05(0x249)]['t'](_0x5d4e05(0x1b1));break;case _univerjs_design['MessageType']['Info']:_0xfdef4=this[_0x5d4e05(0x249)]['t'](_0x5d4e05(0x21e));break;default:break;}this[_0x5d4e05(0x2ee)][_0x5d4e05(0x2ce)]({'type':_0x5aa40c,'content':_0xfdef4});}[_0xae8de0(0x2a9)](){const _0x159029=_0xae8de0;this[_0x159029(0x21d)]['next']({'done':this[_0x159029(0x1b0)],'count':this['_totalUploadTaskCount']});}['_addTotalCount'](_0x54081c){const _0x330c2f=_0xae8de0;this[_0x330c2f(0x2ed)]+=_0x54081c,this['_emitProgress']();}['_addDoneTask'](_0xf336bc){const _0x217cab=_0xae8de0;this[_0x217cab(0x1b0)]+=_0xf336bc,this[_0x217cab(0x1b0)]=Math[_0x217cab(0x1bf)](this[_0x217cab(0x1b0)],this[_0x217cab(0x2ed)]),this[_0x217cab(0x2a9)]();}[_0xae8de0(0x265)](){const _0x469653=_0xae8de0;this['_doneUploadTaskCount']=this[_0x469653(0x2ed)],this['_emitProgress']();}[_0xae8de0(0x1c2)](){const _0x52ddf1=_0xae8de0;this[_0x52ddf1(0x1b0)]=0x0,this['_totalUploadTaskCount']=0x0,this[_0x52ddf1(0x2a9)]();}['_fileTypeError'](_0x48957,_0xa341a1){const _0x2b74fc=_0xae8de0,_0x34b2e4=_0x48957[0x0],_0x4a57db=_0x34b2e4['name'];if(getUniverInstanceTypeByFile(_0x34b2e4)!==_0xa341a1)return this[_0x2b74fc(0x2ee)]['show']({'type':_univerjs_design[_0x2b74fc(0x226)][_0x2b74fc(0x262)],'content':this[_0x2b74fc(0x249)]['t'](_0x2b74fc(0x26f),_0x4a57db)}),!![];return![];}['_uploadTaskNotDone'](){const _0x34311e=_0xae8de0;return this[_0x34311e(0x2ed)]!==0x0&&this[_0x34311e(0x1b0)]!==this[_0x34311e(0x2ed)];}};ExchangeOperateService=__decorate([__decorateParam(0x0,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(_univerjs_core[_0xae8de0(0x2b9)])),__decorateParam(0x1,_univerjs_ui[_0xae8de0(0x280)]),__decorateParam(0x2,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(_univerjs_core['LocaleService'])),__decorateParam(0x3,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(IExchangeService)),__decorateParam(0x4,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(IUploadNotificationService)),__decorateParam(0x5,_univerjs_core['ILogService'])],ExchangeOperateService);function UploadButton(_0x5c1f1e){const _0xc73094=_0xae8de0,{onClick:_0x5a93ef,children:_0x1830c4,className:_0x4b118e}=_0x5c1f1e;return(0x0,react_jsx_runtime[_0xc73094(0x1dc)])(_0xc73094(0x1bb),{'className':(0x0,_univerjs_design[_0xc73094(0x237)])(_0xc73094(0x260),_0x4b118e),'type':_0xc73094(0x1bb),'onClick':_0x5a93ef,'children':_0x1830c4});}function UploadAgain(){const _0x487031=_0xae8de0,_0x2fae21=(0x0,_univerjs_ui[_0x487031(0x1a9)])(IExchangeOperateService),_0xbbeb40=(0x0,_univerjs_ui[_0x487031(0x1a9)])(_univerjs_core[_0x487031(0x23e)]);function _0x5e4385(){const _0x238da2=_0x487031;_0x2fae21[_0x238da2(0x242)]();}return(0x0,react_jsx_runtime[_0x487031(0x1dc)])(UploadButton,{'onClick':_0x5e4385,'children':_0xbbeb40['t'](_0x487031(0x1d0))});}function UploadError(){const _0x164ba1=_0xae8de0;return(0x0,react_jsx_runtime['jsxs'])(_0x164ba1(0x1e9),{'className':_0x164ba1(0x2d0),'children':[(0x0,react_jsx_runtime['jsx'])('span',{'className':'univer-mb-3\x20univer-py-0\x20univer-pl-2\x20univer-pr-4\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','children':(0x0,_univerjs_ui['useDependency'])(_univerjs_core[_0x164ba1(0x23e)])['t']('exchange.interrupt')}),(0x0,react_jsx_runtime['jsx'])(UploadAgain,{})]});}function UploadSuccess(_0x503a28){const _0x219066=_0xae8de0,{count:_0x3f1c01}=_0x503a28;return(0x0,react_jsx_runtime[_0x219066(0x219)])(_0x219066(0x1e9),{'className':_0x219066(0x220),'children':[(0x0,react_jsx_runtime[_0x219066(0x1dc)])(_0x219066(0x2a6),{'className':'univer-text-sm\x20univer-text-gray-500','children':(0x0,_univerjs_ui['useDependency'])(_univerjs_core['LocaleService'])['t'](_0x219066(0x26c),''+_0x3f1c01)}),(0x0,react_jsx_runtime['jsx'])(UploadAgain,{})]});}function UploadCancel(){const _0x495ee8=_0xae8de0,_0x8ff914=(0x0,_univerjs_ui[_0x495ee8(0x1a9)])(IExchangeOperateService),_0x3d944b=(0x0,_univerjs_ui[_0x495ee8(0x1a9)])(_univerjs_core[_0x495ee8(0x23e)]);function _0x7c4d11(){const _0x46ffad=_0x495ee8;_0x8ff914[_0x46ffad(0x1d5)]();}return(0x0,react_jsx_runtime['jsx'])(UploadButton,{'onClick':_0x7c4d11,'children':_0x3d944b['t']('exchange.cancel')});}function UploadProgress(){const _0x3c9da6=_0xae8de0,{count:_0x378750,done:_0x112bf5}=(0x0,_univerjs_ui[_0x3c9da6(0x275)])((0x0,_univerjs_ui[_0x3c9da6(0x1a9)])(IExchangeOperateService)[_0x3c9da6(0x2e6)]),[_0x4914a4,_0x484c9c]=(0x0,react[_0x3c9da6(0x2c4)])(_0x378750>0x0?_0x112bf5/_0x378750:0x0);return(0x0,react[_0x3c9da6(0x1fa)])(()=>{_0x484c9c(_0x378750>0x0?_0x112bf5/_0x378750:0x0);},[_0x378750,_0x112bf5]),(0x0,react_jsx_runtime[_0x3c9da6(0x1dc)])(_0x3c9da6(0x1e9),{'className':_0x3c9da6(0x1d4),'children':(0x0,react_jsx_runtime['jsx'])(_0x3c9da6(0x1e9),{'className':'univer-h-1.5\x20univer-rounded-lg\x20univer-bg-primary-600\x20univer-transition-[width]\x20univer-duration-500','style':{'width':Math[_0x3c9da6(0x1f3)](_0x4914a4*0x64)+'%'}})});}function Uploading(){const _0x442fa8=_0xae8de0;return(0x0,react_jsx_runtime[_0x442fa8(0x219)])(_0x442fa8(0x1e9),{'className':_0x442fa8(0x2d0),'children':[(0x0,react_jsx_runtime[_0x442fa8(0x1dc)])(_0x442fa8(0x2a6),{'className':'univer-pl-2\x20univer-pr-4\x20univer-text-sm\x20univer-text-gray-900\x20dark:!univer-text-white','children':(0x0,_univerjs_ui[_0x442fa8(0x1a9)])(_univerjs_core[_0x442fa8(0x23e)])['t'](_0x442fa8(0x277))}),(0x0,react_jsx_runtime['jsx'])(_0x442fa8(0x1e9),{'className':_0x442fa8(0x244),'children':(0x0,react_jsx_runtime[_0x442fa8(0x1dc)])(UploadProgress,{})}),(0x0,react_jsx_runtime[_0x442fa8(0x1dc)])(UploadCancel,{})]});}const iconMap={[0x1]:(0x0,react_jsx_runtime[_0xae8de0(0x1dc)])(_univerjs_icons[_0xae8de0(0x30f)],{'className':_0xae8de0(0x29e)}),[0x0]:(0x0,react_jsx_runtime[_0xae8de0(0x1dc)])(_univerjs_icons[_0xae8de0(0x1ef)],{'className':'univer-text-blue-500'}),[0x2]:(0x0,react_jsx_runtime[_0xae8de0(0x1dc)])(_univerjs_icons['ErrorIcon'],{'className':_0xae8de0(0x22e)})};function UploadNotification(){const _0x4258c6=_0xae8de0,[_0x47b3fc,_0x18488f]=(0x0,react[_0x4258c6(0x2c4)])(0x0),[_0x491f34,_0x186a74]=(0x0,react[_0x4258c6(0x2c4)])(![]),[_0x28a984,_0x4dcba6]=(0x0,react[_0x4258c6(0x2c4)])([]),_0x39ff75=(0x0,_univerjs_ui[_0x4258c6(0x1a9)])(IUploadNotificationService),_0x257a09=(0x0,_univerjs_ui[_0x4258c6(0x1a9)])(_univerjs_core[_0x4258c6(0x23e)]);(0x0,react[_0x4258c6(0x1fa)])(()=>{const _0x198457=_0x4258c6,_0x2797d3=_0x39ff75['visible$'][_0x198457(0x212)](_0xc66c42=>{_0x186a74(_0xc66c42);}),_0x3f6134=_0x39ff75[_0x198457(0x2d7)][_0x198457(0x212)](_0x5c6a81=>{_0x4dcba6(_0x5c6a81);}),_0x2493fd=_0x39ff75[_0x198457(0x314)][_0x198457(0x212)](_0x321b17=>{_0x18488f(_0x321b17);});return()=>{const _0xb0eb59=_0x198457;_0x2797d3[_0xb0eb59(0x204)](),_0x3f6134[_0xb0eb59(0x204)](),_0x2493fd['unsubscribe']();};},[]);function _0x721e2c(){_0x186a74(![]);}function _0x1f60dd(_0x16fe1f){const _0x131d21=_0x4258c6;switch(_0x16fe1f){case 0x1:return _0x257a09['t'](_0x131d21(0x1b1));case 0x0:return _0x257a09['t'](_0x131d21(0x21e));case 0x2:return _0x257a09['t'](_0x131d21(0x22f));default:return'';}}return _0x491f34&&(0x0,react_jsx_runtime['jsxs'])(_0x4258c6(0x1e9),{'className':_0x4258c6(0x2d9),'children':[(0x0,react_jsx_runtime[_0x4258c6(0x219)])(_0x4258c6(0x1e9),{'className':_0x4258c6(0x293),'children':[(0x0,react_jsx_runtime[_0x4258c6(0x219)])('span',{'className':_0x4258c6(0x24e),'children':[(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])('span',{'className':_0x4258c6(0x225),'children':iconMap[_0x47b3fc]}),(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])(_0x4258c6(0x2a6),{'className':_0x4258c6(0x2bb),'children':_0x1f60dd(_0x47b3fc)})]}),(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])('span',{'className':_0x4258c6(0x2b2),'onClick':_0x721e2c,'children':(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])(_univerjs_icons[_0x4258c6(0x1d6)],{})})]}),(0x0,react_jsx_runtime[_0x4258c6(0x219)])(_0x4258c6(0x1e9),{'children':[_0x47b3fc===0x0&&(0x0,react_jsx_runtime['jsx'])(Uploading,{}),_0x47b3fc===0x2&&(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])(UploadError,{}),_0x28a984[_0x4258c6(0x19f)]>0x0&&(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])(LinkList,{'list':_0x28a984}),_0x47b3fc===0x1&&(0x0,react_jsx_runtime[_0x4258c6(0x1dc)])(UploadSuccess,{'count':_0x28a984[_0x4258c6(0x19f)]})]})]});}function UploadNotificationContainer(){return(0x0,react_jsx_runtime['jsx'])(UploadNotification,{});}let ExchangeClientController=class ExchangeClientController extends _univerjs_core[_0xae8de0(0x1af)]{constructor(_0x8e452d,_0xc4c18b){const _0x43e6f2=_0xae8de0;super(),this[_0x43e6f2(0x195)]=_0x8e452d,this['_uiPartsService']=_0xc4c18b,this[_0x43e6f2(0x246)]();}[_0xae8de0(0x246)](){const _0x17808f=_0xae8de0;this['disposeWithMe'](this[_0x17808f(0x2eb)][_0x17808f(0x2ae)](_univerjs_ui[_0x17808f(0x1c5)]['CONTENT'],()=>(0x0,_univerjs_ui[_0x17808f(0x2e0)])(UploadNotificationContainer,this[_0x17808f(0x195)])));}};ExchangeClientController=__decorate([__decorateParam(0x0,(0x0,_univerjs_core['Inject'])(_univerjs_core['Injector'])),__decorateParam(0x1,_univerjs_ui[_0xae8de0(0x2fb)])],ExchangeClientController);let UniverExchangeClientPlugin=class UniverExchangeClientPlugin extends _univerjs_core[_0xae8de0(0x1f0)]{constructor(_0x13a2ae=defaultPluginConfig,_0xab9f6b,_0x1cae5d){const _0x11ef37=_0xae8de0;super(),this[_0x11ef37(0x2ff)]=_0x13a2ae,this[_0x11ef37(0x195)]=_0xab9f6b,this[_0x11ef37(0x270)]=_0x1cae5d;const {..._0x492861}=(0x0,_univerjs_core[_0x11ef37(0x304)])({},defaultPluginConfig,this[_0x11ef37(0x2ff)]);this['_configService'][_0x11ef37(0x272)](EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY,_0x492861);}[_0xae8de0(0x2d4)](){const _0x5f18e2=_0xae8de0;(0x0,_univerjs_core[_0x5f18e2(0x2c1)])(this[_0x5f18e2(0x195)],[[ExchangeClientController],[IExchangeOperateService,{'useClass':ExchangeOperateService}],[IExchangeService,{'useClass':ExchangeService}],[IRequestService,{'useClass':RequestService}],[IUploadNotificationService,{'useClass':UploadNotificationService}]]);}['onReady'](){const _0x541d88=_0xae8de0;(0x0,_univerjs_core['touchDependencies'])(this[_0x541d88(0x195)],[[ExchangeClientController],[IExchangeOperateService]]);}};_defineProperty(UniverExchangeClientPlugin,_0xae8de0(0x282),_0xae8de0(0x288)),_defineProperty(UniverExchangeClientPlugin,'packageName',name),_defineProperty(UniverExchangeClientPlugin,_0xae8de0(0x1c1),version),UniverExchangeClientPlugin=__decorate([(0x0,_univerjs_core[_0xae8de0(0x318)])(_univerjs_network[_0xae8de0(0x2e8)],_univerjs_pro_license['UniverLicensePlugin']),__decorateParam(0x1,(0x0,_univerjs_core[_0xae8de0(0x2fd)])(_univerjs_core[_0xae8de0(0x1f5)])),__decorateParam(0x2,_univerjs_core[_0xae8de0(0x1b3)])],UniverExchangeClientPlugin),exports['EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY']=EXCHANGE_CLIENT_PLUGIN_CONFIG_KEY,Object[_0xae8de0(0x210)](exports,_0xae8de0(0x2fa),{'enumerable':!![],'get':function(){return ExchangeOperateService;}}),Object[_0xae8de0(0x210)](exports,_0xae8de0(0x287),{'enumerable':!![],'get':function(){return ExchangeService;}}),exports[_0xae8de0(0x1ab)]=IExchangeOperateService,exports['IExchangeService']=IExchangeService,exports[_0xae8de0(0x312)]=IRequestService,exports[_0xae8de0(0x2cc)]=IUploadNotificationService,Object[_0xae8de0(0x210)](exports,'RequestService',{'enumerable':!![],'get':function(){return RequestService;}}),Object[_0xae8de0(0x210)](exports,_0xae8de0(0x258),{'enumerable':!![],'get':function(){return UniverExchangeClientPlugin;}}),exports[_0xae8de0(0x1c9)]=UploadNotificationContainer,exports[_0xae8de0(0x296)]=UploadNotificationService,exports[_0xae8de0(0x313)]=UploadNotificationState,exports['downloadFile']=downloadFile,exports['getUniverInstanceTypeByFile']=getUniverInstanceTypeByFile,exports[_0xae8de0(0x1e1)]=getUploadFile,exports[_0xae8de0(0x202)]=transformDocumentDataToSnapshotJson,exports[_0xae8de0(0x2b6)]=transformSnapshotJsonToDocumentData,exports[_0xae8de0(0x30b)]=transformSnapshotJsonToWorkbookData,exports[_0xae8de0(0x2e2)]=transformWorkbookDataToSnapshotJson;
|
package/lib/cjs/locale/ca-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0xca681a=_0x4756;(function(_0x275d20,_0xf5647c){const _0xba3728=_0x4756,_0x49a340=_0x275d20();while(!![]){try{const _0x4607a8=-parseInt(_0xba3728(0x163))/0x1*(-parseInt(_0xba3728(0x175))/0x2)+parseInt(_0xba3728(0x16f))/0x3*(parseInt(_0xba3728(0x16b))/0x4)+-parseInt(_0xba3728(0x16a))/0x5+parseInt(_0xba3728(0x162))/0x6+parseInt(_0xba3728(0x16d))/0x7+-parseInt(_0xba3728(0x169))/0x8+parseInt(_0xba3728(0x16c))/0x9;if(_0x4607a8===_0xf5647c)break;else _0x49a340['push'](_0x49a340['shift']());}catch(_0x4723fe){_0x49a340['push'](_0x49a340['shift']());}}}(_0x1111,0x75aea));const locale$1={'exchange':{'file':_0xca681a(0x170),'upload':'Open(File)','download':'Save\x20As','uploading':_0xca681a(0x173),'uploadSuccess':_0xca681a(0x166),'uploadSuccessTip':'{0}\x20file(s)\x20uploaded\x20successfully','downloading':_0xca681a(0x171),'downloadSuccess':_0xca681a(0x174),'unknownMistake':'Unknown\x20mistake','networkError':_0xca681a(0x168),'tooLarge':_0xca681a(0x172),'internalError':_0xca681a(0x165),'interrupt':_0xca681a(0x16e),'fileTypeError':'Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload','wait':'Please\x20wait...','cancel':_0xca681a(0x167),'uploadAgain':'Upload\x20again'}},locale=locale$1;function _0x4756(_0x11ead1,_0x1c2f9f){_0x11ead1=_0x11ead1-0x162;const _0x11114e=_0x1111();let _0x475623=_0x11114e[_0x11ead1];return _0x475623;}module[_0xca681a(0x164)]=locale;function _0x1111(){const _0x5d164d=['Data\x20is\x20too\x20large','Uploading','Download\x20success','72pnYSUa','1683084SQcAHo','18175IxsJWJ','exports','Internal\x20unknown\x20error','File\x20uploaded\x20successfully','Cancel','Network\x20error','6744648LgzLhK','3905875LOHbTL','148ahktXT','1757961LoEaGJ','4096638xsyGww','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','31695AvEGwg','File','Downloading'];_0x1111=function(){return _0x5d164d;};return _0x1111();}
|
package/lib/cjs/locale/en-US.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const _0x2ac935=_0x1950;(function(_0x1a6cd1,_0x5f0607){const _0x5a09b=_0x1950,_0x4243f7=_0x1a6cd1();while(!![]){try{const _0x22f20=parseInt(_0x5a09b(0x1b4))/0x1*(-parseInt(_0x5a09b(0x1c3))/0x2)+-parseInt(_0x5a09b(0x1b3))/0x3*(-parseInt(_0x5a09b(0x1bf))/0x4)+parseInt(_0x5a09b(0x1bd))/0x5*(-parseInt(_0x5a09b(0x1b8))/0x6)+-parseInt(_0x5a09b(0x1c2))/0x7+parseInt(_0x5a09b(0x1c4))/0x8+parseInt(_0x5a09b(0x1c5))/0x9+parseInt(_0x5a09b(0x1bc))/0xa;if(_0x22f20===_0x5f0607)break;else _0x4243f7['push'](_0x4243f7['shift']());}catch(_0x6a2317){_0x4243f7['push'](_0x4243f7['shift']());}}}(_0x7eba,0x2c5cf));const locale={'exchange':{'file':_0x2ac935(0x1b9),'upload':'Open(File)','download':'Save\x20As','uploading':'Uploading','uploadSuccess':'File\x20uploaded\x20successfully','uploadSuccessTip':_0x2ac935(0x1b2),'downloading':'Downloading','downloadSuccess':_0x2ac935(0x1c0),'unknownMistake':'Unknown\x20mistake','networkError':_0x2ac935(0x1b7),'tooLarge':_0x2ac935(0x1b6),'internalError':_0x2ac935(0x1c1),'interrupt':_0x2ac935(0x1b5),'fileTypeError':_0x2ac935(0x1ba),'wait':_0x2ac935(0x1be),'cancel':_0x2ac935(0x1bb),'uploadAgain':'Upload\x20again'}};function _0x7eba(){const _0x11def1=['Cancel','209560mLDQMN','2765CqrKxS','Please\x20wait...','124INzIcj','Download\x20success','Internal\x20unknown\x20error','2039338vLnmMO','10bMvqmK','2558128oAWrwl','847611hYPwIS','{0}\x20file(s)\x20uploaded\x20successfully','15450VpMSnu','4172KalJgP','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','Data\x20is\x20too\x20large','Network\x20error','1092njTarW','File','Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload'];_0x7eba=function(){return _0x11def1;};return _0x7eba();}function _0x1950(_0x47a296,_0x2a25aa){_0x47a296=_0x47a296-0x1b2;const _0x7ebad4=_0x7eba();let _0x195016=_0x7ebad4[_0x47a296];return _0x195016;}module['exports']=locale;
|
package/lib/cjs/locale/es-ES.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x350fbd=_0x4b48;(function(_0x58aa88,_0x277871){const _0x121b07=_0x4b48,_0x31826d=_0x58aa88();while(!![]){try{const _0x2055d6=parseInt(_0x121b07(0xe0))/0x1*(parseInt(_0x121b07(0xe9))/0x2)+-parseInt(_0x121b07(0xe6))/0x3+parseInt(_0x121b07(0xea))/0x4+parseInt(_0x121b07(0xe4))/0x5+parseInt(_0x121b07(0xde))/0x6+-parseInt(_0x121b07(0xdf))/0x7*(parseInt(_0x121b07(0xeb))/0x8)+parseInt(_0x121b07(0xed))/0x9*(-parseInt(_0x121b07(0xdc))/0xa);if(_0x2055d6===_0x277871)break;else _0x31826d['push'](_0x31826d['shift']());}catch(_0x51d605){_0x31826d['push'](_0x31826d['shift']());}}}(_0x299b,0xdff19));const locale$1={'exchange':{'file':_0x350fbd(0xe7),'upload':'Open(File)','download':'Save\x20As','uploading':'Uploading','uploadSuccess':'File\x20uploaded\x20successfully','uploadSuccessTip':'{0}\x20file(s)\x20uploaded\x20successfully','downloading':'Downloading','downloadSuccess':_0x350fbd(0xdd),'unknownMistake':'Unknown\x20mistake','networkError':_0x350fbd(0xe2),'tooLarge':_0x350fbd(0xe8),'internalError':_0x350fbd(0xe3),'interrupt':_0x350fbd(0xe5),'fileTypeError':'Selected\x20file\x20[{0}]\x20is\x20not\x20supported\x20for\x20upload','wait':'Please\x20wait...','cancel':_0x350fbd(0xe1),'uploadAgain':_0x350fbd(0xec)}},locale=locale$1;module[_0x350fbd(0xdb)]=locale;function _0x4b48(_0x5b1f2f,_0x41a116){_0x5b1f2f=_0x5b1f2f-0xdb;const _0x299b55=_0x299b();let _0x4b4856=_0x299b55[_0x5b1f2f];return _0x4b4856;}function _0x299b(){const _0x2a5f76=['334760eZfiWw','Upload\x20again','315avEMRI','exports','630790dIvDGu','Download\x20success','3394938wrCdiY','91JmDMjn','1JZlGzN','Cancel','Network\x20error','Internal\x20unknown\x20error','5949825QLQGFf','The\x20network\x20connection\x20was\x20interrupted\x20and\x20the\x20file\x20upload\x20failed','961770oneRzC','File','Data\x20is\x20too\x20large','1542962guwFxg','5849376HHThny'];_0x299b=function(){return _0x2a5f76;};return _0x299b();}
|
package/lib/cjs/locale/fa-IR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const _0x24c2c8=_0x5a84;(function(_0xac116f,_0x27c4c3){const _0x586f79=_0x5a84,_0x5a32b9=_0xac116f();while(!![]){try{const _0xf1cb96=parseInt(_0x586f79(0xdb))/0x1*(-parseInt(_0x586f79(0xe0))/0x2)+-parseInt(_0x586f79(0xda))/0x3+parseInt(_0x586f79(0xd1))/0x4+-parseInt(_0x586f79(0xd9))/0x5+-parseInt(_0x586f79(0xe3))/0x6*(parseInt(_0x586f79(0xe4))/0x7)+-parseInt(_0x586f79(0xe6))/0x8*(parseInt(_0x586f79(0xd0))/0x9)+-parseInt(_0x586f79(0xd8))/0xa*(-parseInt(_0x586f79(0xdf))/0xb);if(_0xf1cb96===_0x27c4c3)break;else _0x5a32b9['push'](_0x5a32b9['shift']());}catch(_0x370bf8){_0x5a32b9['push'](_0x5a32b9['shift']());}}}(_0x1ad5,0xb92e4));const locale={'exchange':{'file':_0x24c2c8(0xd2),'upload':_0x24c2c8(0xe2),'download':_0x24c2c8(0xe1),'uploading':_0x24c2c8(0xde),'uploadSuccess':_0x24c2c8(0xe5),'uploadSuccessTip':_0x24c2c8(0xd4),'downloading':'در\x20حال\x20دانلود','downloadSuccess':_0x24c2c8(0xd6),'unknownMistake':_0x24c2c8(0xd5),'networkError':'خطای\x20شبکه','tooLarge':_0x24c2c8(0xd3),'internalError':_0x24c2c8(0xe7),'interrupt':_0x24c2c8(0xdc),'fileTypeError':_0x24c2c8(0xd7),'wait':_0x24c2c8(0xdd),'cancel':'لغو','uploadAgain':'بارگذاری\x20مجدد'}};function _0x5a84(_0x3401f9,_0x164aee){_0x3401f9=_0x3401f9-0xd0;const _0x1ad589=_0x1ad5();let _0x5a8479=_0x1ad589[_0x3401f9];return _0x5a8479;}function _0x1ad5(){const _0x20baad=['55GASPSB','2WeqjOR','ذخیره\x20به\x20عنوان','بازکردن(فایل)','26616PwCEuN','1561VahTLC','فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','1720tCtRpi','خطای\x20داخلی\x20ناشناخته','29241RJHKro','3682904Lkdgjc','فایل','داده\x20خیلی\x20بزرگ\x20است','{0}\x20فایل\x20با\x20موفقیت\x20بارگذاری\x20شد','خطای\x20ناشناخته','دانلود\x20موفقیت\x20آمیز','فایل\x20انتخاب\x20شده\x20[{0}]\x20برای\x20بارگذاری\x20پشتیبانی\x20نمیشود','6653000EUZoRA','6096315FmKRgG','367518pIksaC','459194tuoDPH','اتصال\x20شبکه\x20قطع\x20شد\x20و\x20بارگذاری\x20فایل\x20ناموفق\x20بود.','لطفا\x20صبر\x20کنید...','در\x20حال\x20بارگذاری'];_0x1ad5=function(){return _0x20baad;};return _0x1ad5();}module['exports']=locale;
|
package/lib/cjs/locale/fr-FR.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x3c9c(_0x101757,_0x371bf4){_0x101757=_0x101757-0x99;const _0x35ef68=_0x35ef();let _0x3c9c42=_0x35ef68[_0x101757];return _0x3c9c42;}const _0x5bc332=_0x3c9c;(function(_0x17d00a,_0x101c8f){const _0x42570b=_0x3c9c,_0x4b7414=_0x17d00a();while(!![]){try{const _0x18a8a0=parseInt(_0x42570b(0xa3))/0x1*(-parseInt(_0x42570b(0xb1))/0x2)+-parseInt(_0x42570b(0xab))/0x3+parseInt(_0x42570b(0xa7))/0x4*(-parseInt(_0x42570b(0xa1))/0x5)+parseInt(_0x42570b(0x9a))/0x6*(-parseInt(_0x42570b(0xa9))/0x7)+parseInt(_0x42570b(0xaf))/0x8*(parseInt(_0x42570b(0xae))/0x9)+parseInt(_0x42570b(0xa8))/0xa*(-parseInt(_0x42570b(0x9c))/0xb)+parseInt(_0x42570b(0x9e))/0xc;if(_0x18a8a0===_0x101c8f)break;else _0x4b7414['push'](_0x4b7414['shift']());}catch(_0x581548){_0x4b7414['push'](_0x4b7414['shift']());}}}(_0x35ef,0x2feb2));const locale={'exchange':{'file':_0x5bc332(0xa5),'upload':_0x5bc332(0xaa),'download':_0x5bc332(0xa6),'uploading':_0x5bc332(0x9d),'uploadSuccess':_0x5bc332(0xa4),'uploadSuccessTip':_0x5bc332(0x99),'downloading':'Téléchargement','downloadSuccess':_0x5bc332(0x9b),'unknownMistake':'Erreur\x20inconnue','networkError':_0x5bc332(0xa0),'tooLarge':_0x5bc332(0xad),'internalError':'Erreur\x20interne\x20inconnue','interrupt':'La\x20connexion\x20réseau\x20a\x20été\x20interrompue\x20et\x20le\x20téléchargement\x20du\x20fichier\x20a\x20échoué','fileTypeError':_0x5bc332(0xac),'wait':'Veuillez\x20patienter...','cancel':_0x5bc332(0x9f),'uploadAgain':_0x5bc332(0xb0)}};function _0x35ef(){const _0x8237d8=['exports','1uDIaNl','Fichier\x20téléchargé\x20avec\x20succès','Fichier','Enregistrer\x20sous','10932zhMUIw','10UTrOJc','18242CoXRVE','Ouvrir\x20(Fichier)','261126Mbqwvq','Le\x20fichier\x20sélectionné\x20[{0}]\x20n\x27est\x20pas\x20pris\x20en\x20charge\x20pour\x20le\x20téléchargement','Les\x20données\x20sont\x20trop\x20volumineuses','36tVoPsM','210688rjYFGj','Télécharger\x20à\x20nouveau','753566FQukSh','{0}\x20fichier(s)\x20téléchargé(s)\x20avec\x20succès','222fLENcW','Téléchargement\x20réussi','902737gbDxzF','Téléchargement\x20en\x20cours','12832836xsmqdK','Annuler','Erreur\x20réseau','615zkXrZi'];_0x35ef=function(){return _0x8237d8;};return _0x35ef();}module[_0x5bc332(0xa2)]=locale;
|
package/lib/cjs/locale/ja-JP.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function _0x35fd(_0x138af5,_0x350dcc){_0x138af5=_0x138af5-0xd1;const _0xced4e8=_0xced4();let _0x35fd94=_0xced4e8[_0x138af5];return _0x35fd94;}const _0x3f85ae=_0x35fd;(function(_0x34bd93,_0x1944b){const _0x38ae5b=_0x35fd,_0x55ec75=_0x34bd93();while(!![]){try{const _0xabcfb4=parseInt(_0x38ae5b(0xd7))/0x1+parseInt(_0x38ae5b(0xdf))/0x2+parseInt(_0x38ae5b(0xd5))/0x3+parseInt(_0x38ae5b(0xd8))/0x4*(-parseInt(_0x38ae5b(0xe0))/0x5)+-parseInt(_0x38ae5b(0xe2))/0x6+parseInt(_0x38ae5b(0xe7))/0x7+parseInt(_0x38ae5b(0xe1))/0x8*(-parseInt(_0x38ae5b(0xd6))/0x9);if(_0xabcfb4===_0x1944b)break;else _0x55ec75['push'](_0x55ec75['shift']());}catch(_0x1cbb73){_0x55ec75['push'](_0x55ec75['shift']());}}}(_0xced4,0x25347));function _0xced4(){const _0x15c183=['5UQXgGT','8osrAYK','1254714YDQHyd','不明なエラー','{0}\x20個のファイルが正常にアップロードされました','ダウンロード中','exports','1568889rKEvtz','再度アップロード','内部エラーが発生しました','お待ちください...','データが大きすぎます','18786JRtRgw','917811FUkFDD','249259iNyafV','610252qyiDVc','ファイル','ネットワーク接続が中断され、ファイルのアップロードに失敗しました','ダウンロードが完了しました','キャンセル','選択されたファイル\x20[{0}]\x20はアップロードがサポートされていません','アップロード中','272808NSZUIf'];_0xced4=function(){return _0x15c183;};return _0xced4();}const locale={'exchange':{'file':_0x3f85ae(0xd9),'upload':'開く(ファイル)','download':'名前を付けて保存','uploading':_0x3f85ae(0xde),'uploadSuccess':'ファイルが正常にアップロードされました','uploadSuccessTip':_0x3f85ae(0xe4),'downloading':_0x3f85ae(0xe5),'downloadSuccess':_0x3f85ae(0xdb),'unknownMistake':_0x3f85ae(0xe3),'networkError':'ネットワークエラー','tooLarge':_0x3f85ae(0xd4),'internalError':_0x3f85ae(0xd2),'interrupt':_0x3f85ae(0xda),'fileTypeError':_0x3f85ae(0xdd),'wait':_0x3f85ae(0xd3),'cancel':_0x3f85ae(0xdc),'uploadAgain':_0x3f85ae(0xd1)}};module[_0x3f85ae(0xe6)]=locale;
|