@univerjs-pro/sheets-shape 0.15.5 → 0.16.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 +30 -0
- package/lib/cjs/index.js +1 -1
- package/lib/es/index.js +1 -1
- package/lib/index.js +1 -1
- package/lib/types/index.d.ts +1 -1
- package/lib/types/services/sheet-shape-services.d.ts +1 -1
- package/lib/umd/index.js +1 -1
- package/package.json +6 -6
package/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# @univerjs-pro/sheets-shape
|
|
2
|
+
|
|
3
|
+
[](https://npmjs.org/packages/@univerjs-pro/sheets-shape)
|
|
4
|
+
[](https://img.shields.io/npm/l/@univerjs-pro/sheets-shape)
|
|
5
|
+
|
|
6
|
+
## Introduction
|
|
7
|
+
|
|
8
|
+
Sheets Shape provides the core shape/drawing model and services for Univer Sheets. It allows users to insert, update, and remove various shapes (rectangles, circles, connectors, etc.) on spreadsheet worksheets. This package handles shape data management, mutations, and the underlying shape model logic. It is typically used together with `@univerjs-pro/sheets-shape-ui`, which provides the UI interactions for shapes.
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
### Installation
|
|
13
|
+
|
|
14
|
+
```shell
|
|
15
|
+
# Using npm
|
|
16
|
+
npm install @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
|
|
17
|
+
|
|
18
|
+
# Using pnpm
|
|
19
|
+
pnpm add @univerjs-pro/sheets-shape-ui @univerjs-pro/sheets-shape
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Import
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
import { UniverSheetsShapePlugin } from '@univerjs-pro/sheets-shape';
|
|
26
|
+
import { UniverSheetsShapeUIPlugin } from '@univerjs-pro/sheets-shape-ui';
|
|
27
|
+
|
|
28
|
+
univer.registerPlugin(UniverSheetsShapePlugin);
|
|
29
|
+
univer.registerPlugin(UniverSheetsShapeUIPlugin);
|
|
30
|
+
```
|
package/lib/cjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';const _0x5ac028=_0x5dec;(function(_0x148783,_0x3d02c8){const _0x61365e=_0x5dec,_0x340768=_0x148783();while(!![]){try{const _0x79d1f8=-parseInt(_0x61365e(0x8f))/0x1+-parseInt(_0x61365e(0x90))/0x2+parseInt(_0x61365e(0xb8))/0x3*(parseInt(_0x61365e(0x93))/0x4)+-parseInt(_0x61365e(0xbf))/0x5+parseInt(_0x61365e(0xc7))/0x6+parseInt(_0x61365e(0xa8))/0x7+parseInt(_0x61365e(0xb4))/0x8;if(_0x79d1f8===_0x3d02c8)break;else _0x340768['push'](_0x340768['shift']());}catch(_0x14200c){_0x340768['push'](_0x340768['shift']());}}}(_0x44af,0x8872e));var D=Object[_0x5ac028(0xcb)],C=(_0x129afa,_0x3c9e55,_0x43a49b)=>_0x3c9e55 in _0x129afa?D(_0x129afa,_0x3c9e55,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x43a49b}):_0x129afa[_0x3c9e55]=_0x43a49b,S=(_0x3a3ed5,_0x2ca470,_0x48ff6c)=>C(_0x3a3ed5,typeof _0x2ca470!=_0x5ac028(0xb6)?_0x2ca470+'':_0x2ca470,_0x48ff6c);Object[_0x5ac028(0xcb)](exports,Symbol[_0x5ac028(0xd3)],{'value':_0x5ac028(0xe0)});const p=require('@univerjs/core'),l=require('@univerjs-pro/engine-shape'),b=require('@univerjs-pro/license');function _0x5dec(_0x5ea418,_0x3b9629){_0x5ea418=_0x5ea418-0x8f;const _0x44af68=_0x44af();let _0x5dec21=_0x44af68[_0x5ea418];return _0x5dec21;}class f extends p[_0x5ac028(0xca)]{constructor(){const _0x40d50a=_0x5ac028;super(),S(this,_0x40d50a(0xe2),new Map()),S(this,_0x40d50a(0x9e),new Set()),S(this,_0x40d50a(0xd5),new Set());}[_0x5ac028(0x98)](_0x5e086d,_0x37ac39,_0x5d6a12){const _0x1eb9a1=_0x5ac028,_0x39d242=new l['ShapeModel'](_0x5e086d,_0x37ac39,_0x5d6a12);return this['_shapes'][_0x1eb9a1(0xe5)](_0x37ac39,_0x39d242),l['isConnectorShape'](_0x5e086d)&&this[_0x1eb9a1(0x9e)]['add'](_0x37ac39),_0x39d242;}[_0x5ac028(0xe8)](_0xa88c63){const _0x57d444=_0x5ac028;var _0x555522,_0x14f74a;const _0x149b8e=[];for(const _0x57f3d7 of this['_linesIds']){const _0x52faba=this[_0x57d444(0xe2)][_0x57d444(0xae)](_0x57f3d7);if(_0x52faba){const _0x308d89=_0x52faba['getShapeRelation']();_0x308d89&&(((_0x555522=_0x308d89[_0x57d444(0x9a)])==null?void 0x0:_0x555522[_0x57d444(0xb3)])===_0xa88c63&&_0x149b8e[_0x57d444(0xb0)]({..._0x308d89[_0x57d444(0x9a)],'lineShapeId':_0x57f3d7,'isFrom':!0x0}),((_0x14f74a=_0x308d89['to'])==null?void 0x0:_0x14f74a[_0x57d444(0xb3)])===_0xa88c63&&_0x149b8e[_0x57d444(0xb0)]({..._0x308d89['to'],'lineShapeId':_0x57f3d7,'isFrom':!0x1}));}}return _0x149b8e;}[_0x5ac028(0x97)](_0x5324b8){const _0x11a2f6=_0x5ac028,_0x17591a=this[_0x11a2f6(0xe2)][_0x11a2f6(0xae)](_0x5324b8);if(_0x17591a)return _0x17591a['getShapeRelation']();}[_0x5ac028(0x9f)](_0x412364){const _0x2a7f84=_0x5ac028,_0x4b6df7=this['_shapes'][_0x2a7f84(0xae)](_0x412364);if(_0x4b6df7)return _0x4b6df7[_0x2a7f84(0x9f)]();}['hasShape'](_0x1e377f){const _0x2e48c5=_0x5ac028;return this['_shapes'][_0x2e48c5(0xaf)](_0x1e377f);}[_0x5ac028(0xd4)](_0x58451e){const _0x3531cb=_0x5ac028,_0xe73a9e=this['_shapes']['get'](_0x58451e);_0xe73a9e&&(l[_0x3531cb(0xc0)](_0xe73a9e[_0x3531cb(0x9f)]())&&this[_0x3531cb(0x9e)][_0x3531cb(0x9d)](_0x58451e),this['_shapes']['delete'](_0x58451e));}[_0x5ac028(0xb5)](){const _0x182e01=_0x5ac028,_0x25fd2f=[];return this['_shapes'][_0x182e01(0xb2)](_0x242104=>{const _0x4c2d07=_0x182e01;_0x25fd2f['push'](_0x242104[_0x4c2d07(0xb5)]());}),_0x25fd2f;}[_0x5ac028(0xa6)](_0x1d4e86){const _0x4fec52=_0x5ac028;for(const _0x501b81 of _0x1d4e86){const {id:_0x808acc,shapeType:_0x48fb34}=_0x501b81,_0x1ea410=this[_0x4fec52(0x98)](_0x48fb34,_0x808acc,_0x501b81[_0x4fec52(0x95)]);_0x1ea410&&_0x1ea410['isLineShape']()&&this['_linesIds'][_0x4fec52(0xd2)](_0x808acc);}}['dispose'](){const _0x3da40e=_0x5ac028;this[_0x3da40e(0xe4)]||(this[_0x3da40e(0xe2)][_0x3da40e(0xb2)](_0x4e22cc=>{const _0x5ea275=_0x3da40e;_0x4e22cc[_0x5ea275(0xbe)]();}),this[_0x3da40e(0xe2)][_0x3da40e(0xab)](),this[_0x3da40e(0x9e)][_0x3da40e(0xab)](),this[_0x3da40e(0xd5)][_0x3da40e(0xab)](),super[_0x3da40e(0xbe)]());}}var R=Object['getOwnPropertyDescriptor'],J=(_0x3ef6ce,_0xa4d714,_0x4d5432,_0x1d59ca)=>{for(var _0xa866f3=_0x1d59ca>0x1?void 0x0:_0x1d59ca?R(_0xa4d714,_0x4d5432):_0xa4d714,_0x5a3789=_0x3ef6ce['length']-0x1,_0x1317f6;_0x5a3789>=0x0;_0x5a3789--)(_0x1317f6=_0x3ef6ce[_0x5a3789])&&(_0xa866f3=_0x1317f6(_0xa866f3)||_0xa866f3);return _0xa866f3;},j=(_0x29556d,_0x3048f2)=>(_0x233793,_0x57b6b1)=>_0x3048f2(_0x233793,_0x57b6b1,_0x29556d);const w=_0x5ac028(0xe9);exports[_0x5ac028(0x96)]=class extends p[_0x5ac028(0xca)]{constructor(_0x2579ae){const _0x100a7e=_0x5ac028;super(),S(this,_0x100a7e(0xc4),new Map()),(this[_0x100a7e(0xa9)]=_0x2579ae,this[_0x100a7e(0xc1)]());}['_ensureShapeModelManager'](_0x5bcb4b,_0x6cd117){const _0x2b2629=_0x5ac028;let _0x5f04db=this[_0x2b2629(0xc4)][_0x2b2629(0xae)](_0x5bcb4b);_0x5f04db||(_0x5f04db=new Map(),this[_0x2b2629(0xc4)]['set'](_0x5bcb4b,_0x5f04db));let _0x5eacc5=_0x5f04db['get'](_0x6cd117);return _0x5eacc5||(_0x5eacc5=new f(),_0x5f04db['set'](_0x6cd117,_0x5eacc5)),_0x5eacc5;}['insertShape'](_0x26d39c,_0x55f09b,_0x19b726,_0x195e93,_0x41d75a){const _0x59c9bb=_0x5ac028;this[_0x59c9bb(0xa3)](_0x26d39c,_0x55f09b)[_0x59c9bb(0x98)](_0x19b726,_0x195e93,_0x41d75a);}[_0x5ac028(0xd4)](_0x3f395d,_0x32af11,_0x37464f){const _0x79ad83=_0x5ac028;this[_0x79ad83(0xa3)](_0x3f395d,_0x32af11)['removeShape'](_0x37464f);}['getBasicShapeType'](_0x21a8d8,_0x59a809,_0x11fc52){const _0x141380=_0x5ac028;return this[_0x141380(0xa3)](_0x21a8d8,_0x59a809)['getShapeType'](_0x11fc52);}['getShapeType'](_0x34ff97,_0x4de1ab,_0x4a3f5e){const _0x47d0d8=_0x5ac028;return this[_0x47d0d8(0xa3)](_0x34ff97,_0x4de1ab)['getShapeType'](_0x4a3f5e);}[_0x5ac028(0xdd)](_0x59fd00,_0x2e7fd2,_0xbe1c82){const _0x452ad8=_0x5ac028;return this['_ensureShapeModelManager'](_0x59fd00,_0x2e7fd2)[_0x452ad8(0xdd)](_0xbe1c82);}['getShapeTypeById'](_0xb66460,_0x3fee97,_0x570bec){const _0x2f50a9=_0x5ac028;return this[_0x2f50a9(0xa3)](_0xb66460,_0x3fee97)['getShapeType'](_0x570bec);}[_0x5ac028(0xdc)](_0x1f65f9,_0x4fa392,_0x5cfdac){const _0x39053c=_0x5ac028,_0xca710f=this[_0x39053c(0xa3)](_0x1f65f9,_0x4fa392);if(!_0xca710f[_0x39053c(0x9f)](_0x5cfdac))return;const _0x3c7c5a=_0xca710f[_0x39053c(0xe2)][_0x39053c(0xae)](_0x5cfdac);if(_0x3c7c5a)return _0x3c7c5a[_0x39053c(0xe3)]();}[_0x5ac028(0xcc)](_0x1f84bc,_0x3679ff,_0x117655){const _0x4723dd=_0x5ac028;return this[_0x4723dd(0xa3)](_0x1f84bc,_0x3679ff)[_0x4723dd(0xe2)][_0x4723dd(0xae)](_0x117655);}[_0x5ac028(0xe8)](_0x2eaf32,_0x5b313f,_0x4088f9){const _0x3282f3=_0x5ac028;return this[_0x3282f3(0xa3)](_0x2eaf32,_0x5b313f)[_0x3282f3(0xe8)](_0x4088f9);}[_0x5ac028(0x97)](_0x1d9910,_0x379a64,_0x47bde0){const _0x4222be=_0x5ac028,_0x4cb61e=this[_0x4222be(0xa3)](_0x1d9910,_0x379a64)['_shapes'][_0x4222be(0xae)](_0x47bde0);if(_0x4cb61e)return _0x4cb61e[_0x4222be(0xeb)]();}[_0x5ac028(0xc8)](){}[_0x5ac028(0xde)](_0x4f754e){const _0x39ca05=_0x5ac028,_0x18dd45={},_0x4ffd4d=this[_0x39ca05(0xc4)]['get'](_0x4f754e);return _0x4ffd4d&&_0x4ffd4d[_0x39ca05(0xb2)]((_0x292e75,_0x3e3c54)=>{const _0x5f56b7=_0x39ca05;_0x18dd45[_0x3e3c54]=_0x292e75[_0x5f56b7(0xb5)]();}),JSON['stringify'](_0x18dd45);}[_0x5ac028(0xc6)](_0x53e2c9,_0x88f328){const _0x3da50b=_0x5ac028;Object['keys'](_0x88f328)[_0x3da50b(0xb2)](_0x421b78=>{const _0x115ee6=_0x3da50b;this[_0x115ee6(0xa3)](_0x53e2c9,_0x421b78)[_0x115ee6(0xa6)](_0x88f328[_0x421b78]);});}['toJSON'](){const _0x32104f=_0x5ac028,_0x25fd1a={};return this[_0x32104f(0xc4)][_0x32104f(0xb2)]((_0x24b0ae,_0x1753e0)=>{const _0x389194=_0x32104f;_0x25fd1a[_0x1753e0]={},_0x24b0ae[_0x389194(0xb2)]((_0x4e9b99,_0x6dd72a)=>{const _0x246d04=_0x389194;_0x25fd1a[_0x1753e0][_0x6dd72a]=_0x4e9b99[_0x246d04(0xb5)]();});}),_0x25fd1a;}[_0x5ac028(0xa6)](_0x52ec9e){const _0x3cae21=_0x5ac028;Object['keys'](_0x52ec9e)[_0x3cae21(0xb2)](_0x3ed5bb=>{const _0x133d57=_0x3cae21,_0x583461=_0x52ec9e[_0x3ed5bb];Object['keys'](_0x583461)[_0x133d57(0xb2)](_0x4081f3=>{const _0x81971a=_0x133d57;this[_0x81971a(0xa3)](_0x3ed5bb,_0x4081f3)[_0x81971a(0xa6)](_0x583461[_0x4081f3]);});});}['_initSnapshot'](){const _0x484d61=_0x5ac028;this['_resourcesManagerService'][_0x484d61(0xb7)]({'pluginName':w,'businesses':[p[_0x484d61(0xda)][_0x484d61(0xa4)]],'toJson':_0x4c8b68=>this[_0x484d61(0xde)](_0x4c8b68),'parseJson':_0x522c46=>JSON[_0x484d61(0xd1)](_0x522c46),'onLoad':(_0x1abc4f,_0x1dc39c)=>{this['_deserializeShapeForUnit'](_0x1abc4f,_0x1dc39c);},'onUnLoad':_0x2245bf=>{const _0xf00a0a=_0x484d61,_0x3fa437=this[_0xf00a0a(0xc4)][_0xf00a0a(0xae)](_0x2245bf);_0x3fa437&&(_0x3fa437[_0xf00a0a(0xb2)](_0x145eb4=>{_0x145eb4['dispose']();}),this['_shapeModelManagerMap'][_0xf00a0a(0x9d)](_0x2245bf));}});}[_0x5ac028(0xbe)](){const _0x2b148d=_0x5ac028;this[_0x2b148d(0xc4)][_0x2b148d(0xb2)](_0x331971=>{_0x331971['forEach'](_0x24db90=>{_0x24db90['dispose']();});});}},exports[_0x5ac028(0x96)]=J([j(0x0,p[_0x5ac028(0xe6)])],exports['SheetsShapeServices']);const d={'id':_0x5ac028(0xd0),'type':p[_0x5ac028(0xb1)][_0x5ac028(0xc2)],'handler':(_0x5ac145,_0x120f7f)=>{const _0x2e349e=_0x5ac028,{unitId:_0x24ce31,subUnitId:_0x53dbc8,shapeType:_0x297ed6,shapeId:_0x5462b7,shapeData:_0x185509}=_0x120f7f,_0x37cec5=_0x5ac145[_0x2e349e(0xae)](exports[_0x2e349e(0x96)])['getShapeModel'](_0x24ce31,_0x53dbc8,_0x5462b7);return _0x37cec5&&(_0x37cec5[_0x2e349e(0xc8)](_0x297ed6),_0x185509&&(_0x37cec5==null||_0x37cec5[_0x2e349e(0xa5)](_0x185509))),!0x0;}},H={'id':_0x5ac028(0xdf),'type':p[_0x5ac028(0xb1)][_0x5ac028(0xe7)],'handler':(_0x4e99c4,_0x5a93b3)=>{const _0x5ce4e8=_0x5ac028;if(!_0x5a93b3)return!0x1;const _0x54c0f1=_0x4e99c4[_0x5ce4e8(0xae)](p[_0x5ce4e8(0x94)]),_0x5a3a5c=_0x4e99c4[_0x5ce4e8(0xae)](exports['SheetsShapeServices']),_0x14c3d4=_0x4e99c4[_0x5ce4e8(0xae)](p['IUndoRedoService']),_0x543076=[],_0x2408f7=[],{unitId:_0x17c5ca,subUnitId:_0x144b52,shapeId:_0x115f28,shapeType:_0x11943f,shapeData:_0x2189e3}=_0x5a93b3,_0x3c2148=_0x5a3a5c['getShapeModel'](_0x17c5ca,_0x144b52,_0x115f28);if(_0x3c2148){const _0x2007b0=_0x3c2148[_0x5ce4e8(0x9f)](),_0x4af3a7=Object['assign']({},_0x3c2148[_0x5ce4e8(0xe3)]()),_0x1f4e52={'unitId':_0x17c5ca,'subUnitId':_0x144b52,'shapeId':_0x115f28,'shapeType':_0x11943f,'shapeData':_0x2189e3},_0x3688f8={'unitId':_0x17c5ca,'subUnitId':_0x144b52,'shapeId':_0x115f28,'shapeType':_0x2007b0,'shapeData':_0x4af3a7};return _0x543076[_0x5ce4e8(0xb0)]({'id':d['id'],'params':_0x1f4e52}),_0x2408f7[_0x5ce4e8(0xb0)]({'id':d['id'],'params':_0x3688f8}),_0x543076[_0x5ce4e8(0xbd)](_0x2acb96=>_0x54c0f1[_0x5ce4e8(0xc3)](_0x2acb96['id'],_0x2acb96[_0x5ce4e8(0xaa)]))&&_0x14c3d4[_0x5ce4e8(0xcf)]({'unitID':_0x17c5ca,'redoMutations':[..._0x543076],'undoMutations':[..._0x2408f7]}),!0x0;}return!0x1;}},m={'id':_0x5ac028(0xe1),'type':p[_0x5ac028(0xb1)]['MUTATION'],'handler':(_0x399059,_0x54c40f)=>{const _0x5e702c=_0x5ac028,{unitId:_0x556cb8,subUnitId:_0x46c33d,shapeType:_0x4113c1,shapeId:_0x36457d,shapeData:_0x26a23b}=_0x54c40f;return _0x399059['get'](exports[_0x5e702c(0x96)])[_0x5e702c(0x9c)](_0x556cb8,_0x46c33d,_0x4113c1,_0x36457d,_0x26a23b),!0x0;}},v={'id':_0x5ac028(0xdb),'type':p[_0x5ac028(0xb1)][_0x5ac028(0xc2)],'handler':(_0x2f8bab,_0x56a513)=>{const _0x1d4786=_0x5ac028,{unitId:_0x642aab,subUnitId:_0x1f8742,shapeId:_0x3c1c1e}=_0x56a513;return _0x2f8bab[_0x1d4786(0xae)](exports[_0x1d4786(0x96)])[_0x1d4786(0xd4)](_0x642aab,_0x1f8742,_0x3c1c1e),!0x0;}},y={'id':_0x5ac028(0xbb),'type':p['CommandType'][_0x5ac028(0xc2)],'handler':(_0x1fc1ff,_0x254fd0)=>{const _0x3f6928=_0x5ac028,{unitId:_0x1f7147,subUnitId:_0x2a82e4,shapeType:_0x3e92fe,shapeId:_0x277b72,shapeData:_0xe72d5f}=_0x254fd0,_0x524367=_0x1fc1ff[_0x3f6928(0xae)](exports['SheetsShapeServices'])[_0x3f6928(0xcc)](_0x1f7147,_0x2a82e4,_0x277b72);return _0x524367&&(_0x3e92fe!==void 0x0&&_0x524367[_0x3f6928(0xc8)](_0x3e92fe),_0xe72d5f&&(_0x524367==null||_0x524367[_0x3f6928(0xa5)](_0xe72d5f,!0x0))),!0x0;}},A=_0x5ac028(0x92),_={};var L=Object[_0x5ac028(0xcb)],F=Object['getOwnPropertyDescriptor'],B=(_0xc877cd,_0x473b12,_0x16203c)=>_0x473b12 in _0xc877cd?L(_0xc877cd,_0x473b12,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x16203c}):_0xc877cd[_0x473b12]=_0x16203c,G=(_0x32d818,_0x477dfb,_0x252a84,_0x3c66f3)=>{for(var _0xe3c76c=_0x3c66f3>0x1?void 0x0:_0x3c66f3?F(_0x477dfb,_0x252a84):_0x477dfb,_0x39ae76=_0x32d818['length']-0x1,_0x1d2098;_0x39ae76>=0x0;_0x39ae76--)(_0x1d2098=_0x32d818[_0x39ae76])&&(_0xe3c76c=_0x1d2098(_0xe3c76c)||_0xe3c76c);return _0xe3c76c;},g=(_0x308ac4,_0x1ddc50)=>(_0x416a4b,_0x3d5048)=>_0x1ddc50(_0x416a4b,_0x3d5048,_0x308ac4),T=(_0x5d20a2,_0x5524b0,_0x56a4ae)=>B(_0x5d20a2,typeof _0x5524b0!='symbol'?_0x5524b0+'':_0x5524b0,_0x56a4ae);const x=_0x5ac028(0xe9);exports[_0x5ac028(0xd8)]=class extends p[_0x5ac028(0xa1)]{constructor(_0x465d47=_,_0x36315c,_0x170eac,_0x5260c2){const _0x318352=_0x5ac028;super(),this[_0x318352(0xc5)]=_0x465d47,this[_0x318352(0xd6)]=_0x36315c,this['_commandService']=_0x170eac,this[_0x318352(0xac)]=_0x5260c2;const {..._0x27efd9}=p['merge']({},_,this['_config']);this[_0x318352(0xac)]['setConfig'](A,_0x27efd9),this[_0x318352(0xd9)]();}[_0x5ac028(0x91)](){const _0x2d25e0=_0x5ac028;p[_0x2d25e0(0xa0)](this[_0x2d25e0(0xd6)],[]);}[_0x5ac028(0xa2)](){const _0x5c11aa=_0x5ac028,_0x157006=this[_0x5c11aa(0xd6)];[[f],[exports['SheetsShapeServices']]][_0x5c11aa(0xb2)](_0x560de8=>_0x157006[_0x5c11aa(0xd2)](_0x560de8));}[_0x5ac028(0xd9)](){const _0x1fc66b=_0x5ac028;[m,v,d,y]['forEach'](_0x94b501=>this[_0x1fc66b(0xa7)](this[_0x1fc66b(0xad)][_0x1fc66b(0xec)](_0x94b501)));}},T(exports[_0x5ac028(0xd8)],_0x5ac028(0xcd),p[_0x5ac028(0xda)]['UNIVER_SHEET']),T(exports[_0x5ac028(0xd8)],_0x5ac028(0xce),x),exports[_0x5ac028(0xd8)]=G([p['DependentOn'](b[_0x5ac028(0xc9)]),g(0x1,p[_0x5ac028(0xbc)](p['Injector'])),g(0x2,p[_0x5ac028(0x94)]),g(0x3,p[_0x5ac028(0xea)])],exports[_0x5ac028(0xd8)]),exports[_0x5ac028(0x9b)]=m,exports[_0x5ac028(0xd7)]=v,exports[_0x5ac028(0xb9)]=y,exports[_0x5ac028(0xba)]=H,exports[_0x5ac028(0x99)]=d;function _0x44af(){const _0x1d5219=['get','has','push','CommandType','forEach','shapeId','5406416ddscQE','toJSON','symbol','registerPluginResource','6LhBAgk','UpdateSheetsShapeDataMutation','UpdateSheetsShapeTypeCommand','sheet.mutation.update-shape-data','Inject','every','dispose','4066340AeJpqN','isConnectorShape','_initSnapshot','MUTATION','syncExecuteCommand','_shapeModelManagerMap','_config','_deserializeShapeForUnit','1229364bHIRvW','setShapeType','UniverLicensePlugin','Disposable','defineProperty','getShapeModel','type','pluginName','pushUndoRedo','sheet.mutation.update-shape-type','parse','add','toStringTag','removeShape','_groupIds','_injector','RemoveSheetsShapeMutation','UniverSheetsShapePlugin','_initCommands','UniverInstanceType','sheet.mutation.remove-shape','getShapeDataById','hasShape','_serializeShapeForUnit','sheet.command.update-shape-type','Module','sheet.mutation.insert-shape','_shapes','getShapeData','_disposed','set','IResourceManagerService','COMMAND','getBasicShapeRelation','SHEET_SHAPE_PLUGIN','IConfigService','getShapeRelation','registerCommand','198198WEWTsq','454088erxJkT','onRendered','sheets-shape.config','744528KKPWUl','ICommandService','shapeData','SheetsShapeServices','getLineShapeRelation','addShape','UpdateSheetsShapeTypeMutation','from','InsertSheetsShapeMutation','insertShape','delete','_linesIds','getShapeType','touchDependencies','Plugin','onStarting','_ensureShapeModelManager','UNIVER_SHEET','setShapeData','fromJSON','disposeWithMe','3811108iuEYfP','_resourcesManagerService','params','clear','_configService','_commandService'];_0x44af=function(){return _0x1d5219;};return _0x44af();}
|
|
1
|
+
'use strict';const _0x23824f=_0x4c8e;(function(_0x2745a8,_0x2f304c){const _0x525436=_0x4c8e,_0x3479e1=_0x2745a8();while(!![]){try{const _0x2beda9=-parseInt(_0x525436(0xd3))/0x1*(-parseInt(_0x525436(0xf3))/0x2)+-parseInt(_0x525436(0xe1))/0x3+-parseInt(_0x525436(0xc7))/0x4+-parseInt(_0x525436(0xcc))/0x5+parseInt(_0x525436(0xd9))/0x6*(parseInt(_0x525436(0xcd))/0x7)+-parseInt(_0x525436(0xfe))/0x8*(parseInt(_0x525436(0xd6))/0x9)+parseInt(_0x525436(0xbb))/0xa;if(_0x2beda9===_0x2f304c)break;else _0x3479e1['push'](_0x3479e1['shift']());}catch(_0x4a95d0){_0x3479e1['push'](_0x3479e1['shift']());}}}(_0x14cf,0xe29da));var D=Object[_0x23824f(0xe9)],C=(_0x5a8902,_0x1e7b78,_0x471d54)=>_0x1e7b78 in _0x5a8902?D(_0x5a8902,_0x1e7b78,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x471d54}):_0x5a8902[_0x1e7b78]=_0x471d54,S=(_0x14c1f7,_0x7e9171,_0x25f15e)=>C(_0x14c1f7,typeof _0x7e9171!=_0x23824f(0xc3)?_0x7e9171+'':_0x7e9171,_0x25f15e);Object[_0x23824f(0xe9)](exports,Symbol[_0x23824f(0xe7)],{'value':_0x23824f(0xae)});const p=require('@univerjs/core'),l=require('@univerjs-pro/engine-shape'),b=require('@univerjs-pro/license');class f extends p[_0x23824f(0xd5)]{constructor(){const _0x4f8f2a=_0x23824f;super(),S(this,_0x4f8f2a(0xce),new Map()),S(this,'_linesIds',new Set()),S(this,_0x4f8f2a(0xbf),new Set());}[_0x23824f(0xc2)](_0x101b70,_0x527467,_0x19bb6f){const _0x4074f6=_0x23824f,_0x14d68c=new l[(_0x4074f6(0xe5))](_0x101b70,_0x527467,_0x19bb6f);return this['_shapes'][_0x4074f6(0xaf)](_0x527467,_0x14d68c),l[_0x4074f6(0x100)](_0x101b70)&&this[_0x4074f6(0xb9)][_0x4074f6(0xbc)](_0x527467),_0x14d68c;}[_0x23824f(0xa7)](_0x580222){const _0x1aa8d9=_0x23824f;var _0x5c5947,_0x331968;const _0x2ae2fd=[];for(const _0x2ee907 of this[_0x1aa8d9(0xb9)]){const _0x59eefa=this[_0x1aa8d9(0xce)][_0x1aa8d9(0xb7)](_0x2ee907);if(_0x59eefa){const _0x4bc9c4=_0x59eefa[_0x1aa8d9(0xa9)]();_0x4bc9c4&&(((_0x5c5947=_0x4bc9c4['from'])==null?void 0x0:_0x5c5947['shapeId'])===_0x580222&&_0x2ae2fd[_0x1aa8d9(0xff)]({..._0x4bc9c4[_0x1aa8d9(0xfb)],'lineShapeId':_0x2ee907,'isFrom':!0x0}),((_0x331968=_0x4bc9c4['to'])==null?void 0x0:_0x331968['shapeId'])===_0x580222&&_0x2ae2fd[_0x1aa8d9(0xff)]({..._0x4bc9c4['to'],'lineShapeId':_0x2ee907,'isFrom':!0x1}));}}return _0x2ae2fd;}[_0x23824f(0xec)](_0x31f949){const _0x543d0a=_0x23824f,_0x53abaa=this[_0x543d0a(0xce)]['get'](_0x31f949);if(_0x53abaa)return _0x53abaa[_0x543d0a(0xa9)]();}[_0x23824f(0xf8)](_0x182e27){const _0x22aec1=_0x23824f,_0x97a98f=this['_shapes'][_0x22aec1(0xb7)](_0x182e27);if(_0x97a98f)return _0x97a98f[_0x22aec1(0xf8)]();}['hasShape'](_0x49558d){const _0x42f697=_0x23824f;return this[_0x42f697(0xce)][_0x42f697(0xda)](_0x49558d);}[_0x23824f(0xca)](_0x59011d){const _0x407083=_0x23824f,_0x590b56=this[_0x407083(0xce)][_0x407083(0xb7)](_0x59011d);_0x590b56&&(l[_0x407083(0x100)](_0x590b56[_0x407083(0xf8)]())&&this['_linesIds'][_0x407083(0xc9)](_0x59011d),this[_0x407083(0xce)][_0x407083(0xc9)](_0x59011d));}['toJSON'](){const _0x28768d=_0x23824f,_0x34535e=[];return this[_0x28768d(0xce)][_0x28768d(0xdd)](_0xb3c2f6=>{_0x34535e['push'](_0xb3c2f6['toJSON']());}),_0x34535e;}[_0x23824f(0xa5)](_0x370606){const _0x2f889c=_0x23824f;for(const _0x8a9383 of _0x370606){const {id:_0x28cfd7,shapeType:_0x573687}=_0x8a9383,_0x6ad9f2=this[_0x2f889c(0xc2)](_0x573687,_0x28cfd7,_0x8a9383[_0x2f889c(0xaa)]);_0x6ad9f2&&_0x6ad9f2[_0x2f889c(0xc1)]()&&this[_0x2f889c(0xb9)][_0x2f889c(0xbc)](_0x28cfd7);}}[_0x23824f(0xde)](){const _0x1cfa02=_0x23824f;this['_disposed']||(this['_shapes']['forEach'](_0x5e8317=>{const _0xe6154b=_0x4c8e;_0x5e8317[_0xe6154b(0xde)]();}),this['_shapes'][_0x1cfa02(0xb1)](),this[_0x1cfa02(0xb9)]['clear'](),this[_0x1cfa02(0xbf)][_0x1cfa02(0xb1)](),super[_0x1cfa02(0xde)]());}}var R=Object[_0x23824f(0xbd)],j=(_0x3d2b21,_0x2e133d,_0x5bf1be,_0xc4910f)=>{const _0x27cb19=_0x23824f;for(var _0x3dc4e6=_0xc4910f>0x1?void 0x0:_0xc4910f?R(_0x2e133d,_0x5bf1be):_0x2e133d,_0x1d2198=_0x3d2b21[_0x27cb19(0x104)]-0x1,_0x579b1b;_0x1d2198>=0x0;_0x1d2198--)(_0x579b1b=_0x3d2b21[_0x1d2198])&&(_0x3dc4e6=_0x579b1b(_0x3dc4e6)||_0x3dc4e6);return _0x3dc4e6;},J=(_0x669207,_0x5deec0)=>(_0x3ce567,_0xd6abd5)=>_0x5deec0(_0x3ce567,_0xd6abd5,_0x669207);const w=_0x23824f(0xe6);exports[_0x23824f(0xe0)]=class extends p[_0x23824f(0xd5)]{constructor(_0x57f791){const _0x2529bd=_0x23824f;super(),S(this,'_shapeModelManagerMap',new Map()),(this[_0x2529bd(0xa3)]=_0x57f791,this[_0x2529bd(0xe3)]());}[_0x23824f(0xed)](_0x100a5e,_0x4cdfc3){const _0x58a9fb=_0x23824f;let _0x3d78a3=this['_shapeModelManagerMap']['get'](_0x100a5e);_0x3d78a3||(_0x3d78a3=new Map(),this[_0x58a9fb(0xa2)][_0x58a9fb(0xaf)](_0x100a5e,_0x3d78a3));let _0x401b9f=_0x3d78a3[_0x58a9fb(0xb7)](_0x4cdfc3);return _0x401b9f||(_0x401b9f=new f(),_0x3d78a3[_0x58a9fb(0xaf)](_0x4cdfc3,_0x401b9f)),_0x401b9f;}[_0x23824f(0xdf)](_0x2a85d7,_0x1e8526,_0xd7f3b5,_0x1d23cd,_0x1a94c8){const _0x1bd0ab=_0x23824f;this[_0x1bd0ab(0xed)](_0x2a85d7,_0x1e8526)['addShape'](_0xd7f3b5,_0x1d23cd,_0x1a94c8);}['removeShape'](_0x52d6ea,_0x3119f9,_0x26032b){const _0x28db3d=_0x23824f;this[_0x28db3d(0xed)](_0x52d6ea,_0x3119f9)[_0x28db3d(0xca)](_0x26032b);}[_0x23824f(0xfc)](_0x1103ad,_0x153d28,_0xd57b2d){const _0x2dc214=_0x23824f;return this[_0x2dc214(0xed)](_0x1103ad,_0x153d28)[_0x2dc214(0xf8)](_0xd57b2d);}[_0x23824f(0xf8)](_0x387c5,_0x1c49df,_0x45257e){const _0x3f8100=_0x23824f;return this['_ensureShapeModelManager'](_0x387c5,_0x1c49df)[_0x3f8100(0xf8)](_0x45257e);}[_0x23824f(0xf4)](_0x97434e,_0x43c651,_0xba40a){const _0x33a4b7=_0x23824f;return this[_0x33a4b7(0xed)](_0x97434e,_0x43c651)['hasShape'](_0xba40a);}[_0x23824f(0xb4)](_0x2329d3,_0x1e629e,_0x14d3bf){const _0x50dff6=_0x23824f;return this[_0x50dff6(0xed)](_0x2329d3,_0x1e629e)[_0x50dff6(0xf8)](_0x14d3bf);}[_0x23824f(0xb2)](_0x2c4081,_0x4b155e,_0x5111b0){const _0x3e261f=_0x23824f,_0x107522=this[_0x3e261f(0xed)](_0x2c4081,_0x4b155e);if(!_0x107522[_0x3e261f(0xf8)](_0x5111b0))return;const _0x4fd1e0=_0x107522[_0x3e261f(0xce)]['get'](_0x5111b0);if(_0x4fd1e0)return _0x4fd1e0[_0x3e261f(0xa4)]();}['getShapeModel'](_0x4836d5,_0x193a3c,_0x185557){const _0x445319=_0x23824f;return this[_0x445319(0xed)](_0x4836d5,_0x193a3c)[_0x445319(0xce)]['get'](_0x185557);}[_0x23824f(0xa7)](_0x1df8ad,_0x620357,_0x5b683e){const _0x522940=_0x23824f;return this[_0x522940(0xed)](_0x1df8ad,_0x620357)[_0x522940(0xa7)](_0x5b683e);}[_0x23824f(0xec)](_0x2a7afb,_0x54a32f,_0x3af423){const _0x222e2c=_0x23824f,_0x3bf4b1=this[_0x222e2c(0xed)](_0x2a7afb,_0x54a32f)['_shapes'][_0x222e2c(0xb7)](_0x3af423);if(_0x3bf4b1)return _0x3bf4b1['getShapeRelation']();}[_0x23824f(0xbe)](){}[_0x23824f(0xad)](_0x476efb){const _0x37bb37=_0x23824f,_0x4c4d3d={},_0xad3ad1=this[_0x37bb37(0xa2)]['get'](_0x476efb);return _0xad3ad1&&_0xad3ad1['forEach']((_0x4fb1ec,_0x2c9cc6)=>{const _0x5a8cde=_0x37bb37,_0x16fdff=_0x4fb1ec[_0x5a8cde(0xfd)]();_0x16fdff[_0x5a8cde(0x104)]>0x0&&(_0x4c4d3d[_0x2c9cc6]=_0x16fdff);}),JSON['stringify'](_0x4c4d3d);}[_0x23824f(0xe2)](_0x297f7c,_0x3ea413){const _0x2d318e=_0x23824f;Object[_0x2d318e(0xcf)](_0x3ea413)[_0x2d318e(0xdd)](_0xf771b0=>{const _0x2bb9b5=_0x2d318e;this[_0x2bb9b5(0xed)](_0x297f7c,_0xf771b0)[_0x2bb9b5(0xa5)](_0x3ea413[_0xf771b0]);});}[_0x23824f(0xfd)](){const _0x19508d=_0x23824f,_0x5e61b5={};return this[_0x19508d(0xa2)][_0x19508d(0xdd)]((_0x5068ac,_0x1f99dd)=>{const _0x1db0e2=_0x19508d;_0x5e61b5[_0x1f99dd]={},_0x5068ac[_0x1db0e2(0xdd)]((_0x3f0642,_0x21d637)=>{const _0x280e7a=_0x1db0e2;_0x5e61b5[_0x1f99dd][_0x21d637]=_0x3f0642[_0x280e7a(0xfd)]();});}),_0x5e61b5;}[_0x23824f(0xa5)](_0x122a8a){const _0xb5acb6=_0x23824f;Object[_0xb5acb6(0xcf)](_0x122a8a)[_0xb5acb6(0xdd)](_0x475321=>{const _0x10706e=_0xb5acb6,_0x219c65=_0x122a8a[_0x475321];Object[_0x10706e(0xcf)](_0x219c65)[_0x10706e(0xdd)](_0x3d7fc5=>{const _0x29be84=_0x10706e;this['_ensureShapeModelManager'](_0x475321,_0x3d7fc5)[_0x29be84(0xa5)](_0x219c65[_0x3d7fc5]);});});}[_0x23824f(0xe3)](){const _0x58312c=_0x23824f;this[_0x58312c(0xa3)][_0x58312c(0xab)]({'pluginName':w,'businesses':[p[_0x58312c(0xf5)][_0x58312c(0xb0)]],'toJson':_0x48bc2c=>this[_0x58312c(0xad)](_0x48bc2c),'parseJson':_0x3eaa0f=>JSON[_0x58312c(0xd8)](_0x3eaa0f),'onLoad':(_0x1a6a83,_0x89ad07)=>{const _0x7a70bc=_0x58312c;this[_0x7a70bc(0xe2)](_0x1a6a83,_0x89ad07);},'onUnLoad':_0x4806f9=>{const _0x2712b1=_0x58312c,_0x14b38c=this[_0x2712b1(0xa2)]['get'](_0x4806f9);_0x14b38c&&(_0x14b38c[_0x2712b1(0xdd)](_0x3205bf=>{_0x3205bf['dispose']();}),this[_0x2712b1(0xa2)][_0x2712b1(0xc9)](_0x4806f9));}});}[_0x23824f(0xde)](){const _0x150966=_0x23824f;this[_0x150966(0xa2)][_0x150966(0xdd)](_0x174cdc=>{_0x174cdc['forEach'](_0x538734=>{const _0x191af7=_0x4c8e;_0x538734[_0x191af7(0xde)]();});});}},exports[_0x23824f(0xe0)]=j([J(0x0,p[_0x23824f(0xf6)])],exports['SheetsShapeService']);const d={'id':_0x23824f(0xc0),'type':p[_0x23824f(0xc6)][_0x23824f(0xfa)],'handler':(_0x36325f,_0x1e579b)=>{const _0x144d37=_0x23824f,{unitId:_0x14489e,subUnitId:_0x2e3723,shapeType:_0x2ba74e,shapeId:_0x1147b6,shapeData:_0x435a9c}=_0x1e579b,_0x149f84=_0x36325f[_0x144d37(0xb7)](exports[_0x144d37(0xe0)])[_0x144d37(0xf2)](_0x14489e,_0x2e3723,_0x1147b6);return _0x149f84&&(_0x149f84[_0x144d37(0xbe)](_0x2ba74e),_0x435a9c&&(_0x149f84==null||_0x149f84[_0x144d37(0xcb)](_0x435a9c))),!0x0;}},H={'id':_0x23824f(0xd1),'type':p[_0x23824f(0xc6)][_0x23824f(0x102)],'handler':(_0x4d8132,_0x420457)=>{const _0x1e77b4=_0x23824f;if(!_0x420457)return!0x1;const _0x48030f=_0x4d8132['get'](p[_0x1e77b4(0xd2)]),_0x390611=_0x4d8132[_0x1e77b4(0xb7)](exports[_0x1e77b4(0xe0)]),_0x470729=_0x4d8132[_0x1e77b4(0xb7)](p[_0x1e77b4(0xb3)]),_0x5126f3=[],_0x144a8f=[],{unitId:_0x2ad21c,subUnitId:_0x5c4132,shapeId:_0x5d4f9b,shapeType:_0x56fa3c,shapeData:_0x2697fd}=_0x420457,_0x2b0165=_0x390611[_0x1e77b4(0xf2)](_0x2ad21c,_0x5c4132,_0x5d4f9b);if(_0x2b0165){const _0x1dc798=_0x2b0165['getShapeType'](),_0x58ab83=Object[_0x1e77b4(0x101)]({},_0x2b0165[_0x1e77b4(0xa4)]()),_0x46f1d6={'unitId':_0x2ad21c,'subUnitId':_0x5c4132,'shapeId':_0x5d4f9b,'shapeType':_0x56fa3c,'shapeData':_0x2697fd},_0x5a62a6={'unitId':_0x2ad21c,'subUnitId':_0x5c4132,'shapeId':_0x5d4f9b,'shapeType':_0x1dc798,'shapeData':_0x58ab83};return _0x5126f3['push']({'id':d['id'],'params':_0x46f1d6}),_0x144a8f[_0x1e77b4(0xff)]({'id':d['id'],'params':_0x5a62a6}),_0x5126f3[_0x1e77b4(0xdc)](_0x54d37b=>_0x48030f[_0x1e77b4(0xd7)](_0x54d37b['id'],_0x54d37b['params']))&&_0x470729[_0x1e77b4(0xf1)]({'unitID':_0x2ad21c,'redoMutations':[..._0x5126f3],'undoMutations':[..._0x144a8f]}),!0x0;}return!0x1;}},m={'id':'sheet.mutation.insert-shape','type':p[_0x23824f(0xc6)][_0x23824f(0xfa)],'handler':(_0xb0283e,_0x5d381a)=>{const _0x3a86fb=_0x23824f,{unitId:_0x20a333,subUnitId:_0x3d6173,shapeType:_0x5e1e5e,shapeId:_0x48d51b,shapeData:_0x53c6ba}=_0x5d381a;return _0xb0283e[_0x3a86fb(0xb7)](exports[_0x3a86fb(0xe0)])[_0x3a86fb(0xdf)](_0x20a333,_0x3d6173,_0x5e1e5e,_0x48d51b,_0x53c6ba),!0x0;}},v={'id':_0x23824f(0x103),'type':p[_0x23824f(0xc6)][_0x23824f(0xfa)],'handler':(_0xb1b80,_0x5615f8)=>{const _0x22ef64=_0x23824f,{unitId:_0x2f794e,subUnitId:_0xebae4a,shapeId:_0x4a281c}=_0x5615f8;return _0xb1b80[_0x22ef64(0xb7)](exports['SheetsShapeService'])[_0x22ef64(0xca)](_0x2f794e,_0xebae4a,_0x4a281c),!0x0;}},y={'id':'sheet.mutation.update-shape-data','type':p[_0x23824f(0xc6)]['MUTATION'],'handler':(_0x4f0af8,_0x367dab)=>{const _0x2193f0=_0x23824f,{unitId:_0x1c8837,subUnitId:_0x1f0c60,shapeType:_0x12dc12,shapeId:_0xd4cfc5,shapeData:_0x3e2da7}=_0x367dab,_0xf25110=_0x4f0af8[_0x2193f0(0xb7)](exports[_0x2193f0(0xe0)])[_0x2193f0(0xf2)](_0x1c8837,_0x1f0c60,_0xd4cfc5);return _0xf25110&&(_0x12dc12!==void 0x0&&_0xf25110[_0x2193f0(0xbe)](_0x12dc12),_0x3e2da7&&(_0xf25110==null||_0xf25110[_0x2193f0(0xcb)](_0x3e2da7,!0x0))),!0x0;}},A=_0x23824f(0xc8),_={};var L=Object[_0x23824f(0xe9)],F=Object[_0x23824f(0xbd)],B=(_0x2679bf,_0x3d002e,_0x17f3f9)=>_0x3d002e in _0x2679bf?L(_0x2679bf,_0x3d002e,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x17f3f9}):_0x2679bf[_0x3d002e]=_0x17f3f9,G=(_0x516466,_0x387bfa,_0x47566e,_0x382e18)=>{const _0x3af532=_0x23824f;for(var _0x377dc6=_0x382e18>0x1?void 0x0:_0x382e18?F(_0x387bfa,_0x47566e):_0x387bfa,_0x53aba8=_0x516466[_0x3af532(0x104)]-0x1,_0x2a0075;_0x53aba8>=0x0;_0x53aba8--)(_0x2a0075=_0x516466[_0x53aba8])&&(_0x377dc6=_0x2a0075(_0x377dc6)||_0x377dc6);return _0x377dc6;},g=(_0x258d22,_0x12c75a)=>(_0x4e4b78,_0x168f0c)=>_0x12c75a(_0x4e4b78,_0x168f0c,_0x258d22),T=(_0x524dea,_0x30694c,_0x3ad88e)=>B(_0x524dea,typeof _0x30694c!=_0x23824f(0xc3)?_0x30694c+'':_0x30694c,_0x3ad88e);const x=_0x23824f(0xe6);function _0x4c8e(_0x507e46,_0x120cae){_0x507e46=_0x507e46-0xa2;const _0x14cff3=_0x14cf();let _0x4c8eba=_0x14cff3[_0x507e46];return _0x4c8eba;}function _0x14cf(){const _0x16babd=['fromJSON','UpdateSheetsShapeTypeMutation','getBasicShapeRelation','UniverLicensePlugin','getShapeRelation','shapeData','registerPluginResource','RemoveSheetsShapeMutation','_serializeShapeForUnit','Module','set','UNIVER_SHEET','clear','getShapeDataById','IUndoRedoService','getShapeTypeById','type','disposeWithMe','get','pluginName','_linesIds','_initCommands','9480260MATQrA','add','getOwnPropertyDescriptor','setShapeType','_groupIds','sheet.mutation.update-shape-type','isLineShape','addShape','symbol','merge','UpdateSheetsShapeTypeCommand','CommandType','950112nVzQcx','sheets-shape.config','delete','removeShape','setShapeData','305495teDKkb','77DgPuJB','_shapes','keys','DependentOn','sheet.command.update-shape-type','ICommandService','1FKUPgk','onRendered','Disposable','9AHfOIY','syncExecuteCommand','parse','147618yXjjYp','has','IConfigService','every','forEach','dispose','insertShape','SheetsShapeService','3169110wrrhrk','_deserializeShapeForUnit','_initSnapshot','_config','ShapeModel','SHEET_SHAPE_PLUGIN','toStringTag','touchDependencies','defineProperty','_injector','_commandService','getLineShapeRelation','_ensureShapeModelManager','_configService','InsertSheetsShapeMutation','registerCommand','pushUndoRedo','getShapeModel','2129506oHmxAW','hasShape','UniverInstanceType','IResourceManagerService','UniverSheetsShapePlugin','getShapeType','UpdateSheetsShapeDataMutation','MUTATION','from','getBasicShapeType','toJSON','1576ScfStN','push','isConnectorShape','assign','COMMAND','sheet.mutation.remove-shape','length','_shapeModelManagerMap','_resourcesManagerService','getShapeData'];_0x14cf=function(){return _0x16babd;};return _0x14cf();}exports[_0x23824f(0xf7)]=class extends p['Plugin']{constructor(_0x2e7bba=_,_0x12c867,_0x388da2,_0x5211c0){const _0x30a25e=_0x23824f;super(),this[_0x30a25e(0xe4)]=_0x2e7bba,this[_0x30a25e(0xea)]=_0x12c867,this[_0x30a25e(0xeb)]=_0x388da2,this[_0x30a25e(0xee)]=_0x5211c0;const {..._0x5c639e}=p[_0x30a25e(0xc4)]({},_,this[_0x30a25e(0xe4)]);this[_0x30a25e(0xee)]['setConfig'](A,_0x5c639e),this[_0x30a25e(0xba)]();}[_0x23824f(0xd4)](){const _0xb317be=_0x23824f;p[_0xb317be(0xe8)](this[_0xb317be(0xea)],[]);}['onStarting'](){const _0x40f605=_0x23824f,_0x3178fc=this[_0x40f605(0xea)];[[f],[exports[_0x40f605(0xe0)]]][_0x40f605(0xdd)](_0x52222a=>_0x3178fc[_0x40f605(0xbc)](_0x52222a));}[_0x23824f(0xba)](){const _0x1772b9=_0x23824f;[m,v,d,y][_0x1772b9(0xdd)](_0x4fca22=>this[_0x1772b9(0xb6)](this[_0x1772b9(0xeb)][_0x1772b9(0xf0)](_0x4fca22)));}},T(exports['UniverSheetsShapePlugin'],_0x23824f(0xb5),p[_0x23824f(0xf5)]['UNIVER_SHEET']),T(exports[_0x23824f(0xf7)],_0x23824f(0xb8),x),exports[_0x23824f(0xf7)]=G([p[_0x23824f(0xd0)](b[_0x23824f(0xa8)]),g(0x1,p['Inject'](p['Injector'])),g(0x2,p[_0x23824f(0xd2)]),g(0x3,p[_0x23824f(0xdb)])],exports[_0x23824f(0xf7)]),exports[_0x23824f(0xef)]=m,exports[_0x23824f(0xac)]=v,exports[_0x23824f(0xf9)]=y,exports[_0x23824f(0xc5)]=H,exports[_0x23824f(0xa6)]=d;
|
package/lib/es/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4cc768=_0x1d7e;(function(_0x5e6635,_0x401031){const _0x2e0ec4=_0x1d7e,_0x42e4c1=_0x5e6635();while(!![]){try{const _0x1dc7f3=-parseInt(_0x2e0ec4(0x1b8))/0x1+-parseInt(_0x2e0ec4(0x1a2))/0x2+-parseInt(_0x2e0ec4(0x18c))/0x3+-parseInt(_0x2e0ec4(0x196))/0x4+-parseInt(_0x2e0ec4(0x1b1))/0x5*(-parseInt(_0x2e0ec4(0x192))/0x6)+parseInt(_0x2e0ec4(0x1a0))/0x7*(parseInt(_0x2e0ec4(0x190))/0x8)+parseInt(_0x2e0ec4(0x198))/0x9;if(_0x1dc7f3===_0x401031)break;else _0x42e4c1['push'](_0x42e4c1['shift']());}catch(_0x606fa0){_0x42e4c1['push'](_0x42e4c1['shift']());}}}(_0x221c,0x8c778));var R=Object[_0x4cc768(0x16d)],C=(_0x218ec6,_0x826148,_0x5e8f3a)=>_0x826148 in _0x218ec6?R(_0x218ec6,_0x826148,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e8f3a}):_0x218ec6[_0x826148]=_0x5e8f3a,d=(_0x389ca2,_0x47c50c,_0x1eacfa)=>C(_0x389ca2,typeof _0x47c50c!=_0x4cc768(0x1ba)?_0x47c50c+'':_0x47c50c,_0x1eacfa);function _0x221c(){const _0x47d6dd=['2457444medEoG','_initSnapshot','21054078pScHzF','delete','_injector','stringify','_deserializeShapeForUnit','_linesIds','sheet.mutation.insert-shape','COMMAND','816655BXrGZC','setShapeType','337708MRPHbB','from','getShapeModel','getShapeTypeById','_ensureShapeModelManager','shapeId','isLineShape','get','onRendered','_shapes','length','toJSON','removeShape','_serializeShapeForUnit','MUTATION','555OczyOg','dispose','SHEET_SHAPE_PLUGIN','getShapeType','disposeWithMe','_groupIds','shapeData','1061231SVuuHW','pluginName','symbol','insertShape','sheet.mutation.remove-shape','defineProperty','getOwnPropertyDescriptor','_commandService','clear','_disposed','add','_resourcesManagerService','push','getShapeDataById','setShapeData','type','forEach','registerPluginResource','set','fromJSON','registerCommand','has','_configService','getLineShapeRelation','_shapeModelManagerMap','getBasicShapeRelation','parse','UNIVER_SHEET','addShape','getShapeRelation','syncExecuteCommand','getBasicShapeType','onStarting','sheet.mutation.update-shape-data','sheet.mutation.update-shape-type','getShapeData','2012721MLvdcI','keys','hasShape','_initCommands','8OtoaHF','assign','34308pIDpyZ','pushUndoRedo','sheets-shape.config','_config'];_0x221c=function(){return _0x47d6dd;};return _0x221c();}import{Disposable as _0x204338,UniverInstanceType as _0x228f81,IResourceManagerService as _0x7f9972,CommandType as _0x285e23,ICommandService as _0x217751,IUndoRedoService as _0x45cb91,DependentOn as _0x4f414d,Inject as _0x2ff514,Injector as _0x3bc1fa,Plugin as _0x281049,merge as _0x5f0e29,touchDependencies as _0x4e6c8c,IConfigService as _0x472081}from'@univerjs/core';import{ShapeModel as _0x6af823,isConnectorShape as _0x4518b0}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x2ad86e}from'@univerjs-pro/license';class T extends _0x204338{constructor(){const _0x2e022a=_0x4cc768;super(),d(this,_0x2e022a(0x1ab),new Map()),d(this,_0x2e022a(0x19d),new Set()),d(this,_0x2e022a(0x1b6),new Set());}[_0x4cc768(0x184)](_0x3bf2de,_0x170877,_0x12c087){const _0x1fe2bb=_0x4cc768,_0x307e29=new _0x6af823(_0x3bf2de,_0x170877,_0x12c087);return this[_0x1fe2bb(0x1ab)][_0x1fe2bb(0x17a)](_0x170877,_0x307e29),_0x4518b0(_0x3bf2de)&&this[_0x1fe2bb(0x19d)][_0x1fe2bb(0x172)](_0x170877),_0x307e29;}['getBasicShapeRelation'](_0x510ef9){const _0x59d8c0=_0x4cc768;var _0x19a6ba,_0x2a278d;const _0x5b3536=[];for(const _0x1712b7 of this[_0x59d8c0(0x19d)]){const _0x91a3d8=this[_0x59d8c0(0x1ab)]['get'](_0x1712b7);if(_0x91a3d8){const _0x44c148=_0x91a3d8[_0x59d8c0(0x185)]();_0x44c148&&(((_0x19a6ba=_0x44c148['from'])==null?void 0x0:_0x19a6ba[_0x59d8c0(0x1a7)])===_0x510ef9&&_0x5b3536[_0x59d8c0(0x174)]({..._0x44c148[_0x59d8c0(0x1a3)],'lineShapeId':_0x1712b7,'isFrom':!0x0}),((_0x2a278d=_0x44c148['to'])==null?void 0x0:_0x2a278d[_0x59d8c0(0x1a7)])===_0x510ef9&&_0x5b3536[_0x59d8c0(0x174)]({..._0x44c148['to'],'lineShapeId':_0x1712b7,'isFrom':!0x1}));}}return _0x5b3536;}['getLineShapeRelation'](_0x48f530){const _0x3a768c=_0x4cc768,_0x17e0c1=this[_0x3a768c(0x1ab)][_0x3a768c(0x1a9)](_0x48f530);if(_0x17e0c1)return _0x17e0c1[_0x3a768c(0x185)]();}[_0x4cc768(0x1b4)](_0x3b6e35){const _0x4d5408=_0x4cc768,_0x2c97e1=this[_0x4d5408(0x1ab)][_0x4d5408(0x1a9)](_0x3b6e35);if(_0x2c97e1)return _0x2c97e1[_0x4d5408(0x1b4)]();}[_0x4cc768(0x18e)](_0x3fe782){const _0xf7d68b=_0x4cc768;return this[_0xf7d68b(0x1ab)][_0xf7d68b(0x17d)](_0x3fe782);}[_0x4cc768(0x1ae)](_0xd329c2){const _0x2f8b19=_0x4cc768,_0x4b1bfd=this[_0x2f8b19(0x1ab)]['get'](_0xd329c2);_0x4b1bfd&&(_0x4518b0(_0x4b1bfd[_0x2f8b19(0x1b4)]())&&this[_0x2f8b19(0x19d)]['delete'](_0xd329c2),this[_0x2f8b19(0x1ab)][_0x2f8b19(0x199)](_0xd329c2));}[_0x4cc768(0x1ad)](){const _0x28e39b=_0x4cc768,_0x586e77=[];return this[_0x28e39b(0x1ab)][_0x28e39b(0x178)](_0x4cf5cf=>{const _0x16a237=_0x28e39b;_0x586e77[_0x16a237(0x174)](_0x4cf5cf[_0x16a237(0x1ad)]());}),_0x586e77;}[_0x4cc768(0x17b)](_0x1ebd37){const _0x4fa94b=_0x4cc768;for(const _0x18e710 of _0x1ebd37){const {id:_0x4076e2,shapeType:_0x1b7b81}=_0x18e710,_0x19b013=this['addShape'](_0x1b7b81,_0x4076e2,_0x18e710[_0x4fa94b(0x1b7)]);_0x19b013&&_0x19b013[_0x4fa94b(0x1a8)]()&&this[_0x4fa94b(0x19d)][_0x4fa94b(0x172)](_0x4076e2);}}['dispose'](){const _0x2447ae=_0x4cc768;this[_0x2447ae(0x171)]||(this['_shapes'][_0x2447ae(0x178)](_0x1d1dc7=>{const _0x27905=_0x2447ae;_0x1d1dc7[_0x27905(0x1b2)]();}),this[_0x2447ae(0x1ab)][_0x2447ae(0x170)](),this['_linesIds'][_0x2447ae(0x170)](),this[_0x2447ae(0x1b6)][_0x2447ae(0x170)](),super[_0x2447ae(0x1b2)]());}}var $=Object[_0x4cc768(0x16e)],V=(_0x235098,_0x4a5fdb,_0x4e0eee,_0x188e13)=>{const _0x50fd5b=_0x4cc768;for(var _0x4fa205=_0x188e13>0x1?void 0x0:_0x188e13?$(_0x4a5fdb,_0x4e0eee):_0x4a5fdb,_0x243c2d=_0x235098[_0x50fd5b(0x1ac)]-0x1,_0x4d5390;_0x243c2d>=0x0;_0x243c2d--)(_0x4d5390=_0x235098[_0x243c2d])&&(_0x4fa205=_0x4d5390(_0x4fa205)||_0x4fa205);return _0x4fa205;},K=(_0x17996a,_0x487880)=>(_0x39ecc1,_0x5cd1da)=>_0x487880(_0x39ecc1,_0x5cd1da,_0x17996a);const W='SHEET_SHAPE_PLUGIN';let i=class extends _0x204338{constructor(_0x5937c7){const _0x5f007e=_0x4cc768;super(),d(this,_0x5f007e(0x180),new Map()),(this[_0x5f007e(0x173)]=_0x5937c7,this['_initSnapshot']());}[_0x4cc768(0x1a6)](_0x3644a6,_0x585865){const _0x365134=_0x4cc768;let _0x14cddb=this[_0x365134(0x180)][_0x365134(0x1a9)](_0x3644a6);_0x14cddb||(_0x14cddb=new Map(),this[_0x365134(0x180)][_0x365134(0x17a)](_0x3644a6,_0x14cddb));let _0x4efba5=_0x14cddb[_0x365134(0x1a9)](_0x585865);return _0x4efba5||(_0x4efba5=new T(),_0x14cddb[_0x365134(0x17a)](_0x585865,_0x4efba5)),_0x4efba5;}[_0x4cc768(0x1bb)](_0xdea604,_0x129af1,_0x391c97,_0x163ac6,_0x32a945){const _0x445d37=_0x4cc768;this[_0x445d37(0x1a6)](_0xdea604,_0x129af1)[_0x445d37(0x184)](_0x391c97,_0x163ac6,_0x32a945);}['removeShape'](_0x37fe45,_0x3fb77f,_0xe306b3){const _0x1e9218=_0x4cc768;this['_ensureShapeModelManager'](_0x37fe45,_0x3fb77f)[_0x1e9218(0x1ae)](_0xe306b3);}[_0x4cc768(0x187)](_0x1735a5,_0x5ba15d,_0x4b176a){const _0x54ec7b=_0x4cc768;return this[_0x54ec7b(0x1a6)](_0x1735a5,_0x5ba15d)[_0x54ec7b(0x1b4)](_0x4b176a);}['getShapeType'](_0x1de9b0,_0x23f353,_0x45c610){const _0x4b590a=_0x4cc768;return this[_0x4b590a(0x1a6)](_0x1de9b0,_0x23f353)[_0x4b590a(0x1b4)](_0x45c610);}[_0x4cc768(0x18e)](_0x15fdb2,_0x2354c4,_0x31ec30){const _0x507a0a=_0x4cc768;return this[_0x507a0a(0x1a6)](_0x15fdb2,_0x2354c4)[_0x507a0a(0x18e)](_0x31ec30);}[_0x4cc768(0x1a5)](_0x3e8229,_0xb34123,_0xccb51e){const _0x126196=_0x4cc768;return this[_0x126196(0x1a6)](_0x3e8229,_0xb34123)[_0x126196(0x1b4)](_0xccb51e);}[_0x4cc768(0x175)](_0x4c3b67,_0xc40aee,_0x510136){const _0x45bfd9=_0x4cc768,_0x42fb88=this[_0x45bfd9(0x1a6)](_0x4c3b67,_0xc40aee);if(!_0x42fb88[_0x45bfd9(0x1b4)](_0x510136))return;const _0xcee85c=_0x42fb88[_0x45bfd9(0x1ab)]['get'](_0x510136);if(_0xcee85c)return _0xcee85c[_0x45bfd9(0x18b)]();}['getShapeModel'](_0x113551,_0x1da043,_0x426606){const _0x34d44f=_0x4cc768;return this['_ensureShapeModelManager'](_0x113551,_0x1da043)[_0x34d44f(0x1ab)][_0x34d44f(0x1a9)](_0x426606);}['getBasicShapeRelation'](_0x55ffef,_0x19f2d1,_0x5cfafc){const _0x3efef9=_0x4cc768;return this[_0x3efef9(0x1a6)](_0x55ffef,_0x19f2d1)[_0x3efef9(0x181)](_0x5cfafc);}[_0x4cc768(0x17f)](_0x2327cb,_0x9f134f,_0x1e8370){const _0x543ba4=_0x4cc768,_0xd5b384=this['_ensureShapeModelManager'](_0x2327cb,_0x9f134f)[_0x543ba4(0x1ab)][_0x543ba4(0x1a9)](_0x1e8370);if(_0xd5b384)return _0xd5b384['getShapeRelation']();}[_0x4cc768(0x1a1)](){}[_0x4cc768(0x1af)](_0x469302){const _0x5aa124=_0x4cc768,_0x5b4f32={},_0x500c05=this[_0x5aa124(0x180)][_0x5aa124(0x1a9)](_0x469302);return _0x500c05&&_0x500c05[_0x5aa124(0x178)]((_0x3d8616,_0x33f7a2)=>{_0x5b4f32[_0x33f7a2]=_0x3d8616['toJSON']();}),JSON[_0x5aa124(0x19b)](_0x5b4f32);}[_0x4cc768(0x19c)](_0x3e5eb5,_0x5788cf){const _0x58286d=_0x4cc768;Object[_0x58286d(0x18d)](_0x5788cf)[_0x58286d(0x178)](_0x288c09=>{const _0x1d001e=_0x58286d;this[_0x1d001e(0x1a6)](_0x3e5eb5,_0x288c09)['fromJSON'](_0x5788cf[_0x288c09]);});}[_0x4cc768(0x1ad)](){const _0x3abd05=_0x4cc768,_0x1fbc88={};return this[_0x3abd05(0x180)][_0x3abd05(0x178)]((_0x4745d3,_0x428fcb)=>{_0x1fbc88[_0x428fcb]={},_0x4745d3['forEach']((_0x1532e1,_0x30cdcc)=>{_0x1fbc88[_0x428fcb][_0x30cdcc]=_0x1532e1['toJSON']();});}),_0x1fbc88;}[_0x4cc768(0x17b)](_0x487028){const _0x3ae720=_0x4cc768;Object['keys'](_0x487028)[_0x3ae720(0x178)](_0x3f3aeb=>{const _0x435980=_0x3ae720,_0x425a7c=_0x487028[_0x3f3aeb];Object[_0x435980(0x18d)](_0x425a7c)[_0x435980(0x178)](_0x155d03=>{const _0x38d24b=_0x435980;this[_0x38d24b(0x1a6)](_0x3f3aeb,_0x155d03)[_0x38d24b(0x17b)](_0x425a7c[_0x155d03]);});});}[_0x4cc768(0x197)](){const _0x3b3565=_0x4cc768;this[_0x3b3565(0x173)][_0x3b3565(0x179)]({'pluginName':W,'businesses':[_0x228f81[_0x3b3565(0x183)]],'toJson':_0x27733d=>this[_0x3b3565(0x1af)](_0x27733d),'parseJson':_0x598f64=>JSON[_0x3b3565(0x182)](_0x598f64),'onLoad':(_0x3f376a,_0x5b1bc9)=>{const _0x480f99=_0x3b3565;this[_0x480f99(0x19c)](_0x3f376a,_0x5b1bc9);},'onUnLoad':_0x2aa47c=>{const _0x2996f4=_0x3b3565,_0x35d9c8=this[_0x2996f4(0x180)][_0x2996f4(0x1a9)](_0x2aa47c);_0x35d9c8&&(_0x35d9c8[_0x2996f4(0x178)](_0x2ed4df=>{const _0xe0c22e=_0x2996f4;_0x2ed4df[_0xe0c22e(0x1b2)]();}),this['_shapeModelManagerMap']['delete'](_0x2aa47c));}});}[_0x4cc768(0x1b2)](){const _0x5217d5=_0x4cc768;this[_0x5217d5(0x180)][_0x5217d5(0x178)](_0x33a67d=>{const _0x421ba1=_0x5217d5;_0x33a67d[_0x421ba1(0x178)](_0x3e1f37=>{_0x3e1f37['dispose']();});});}};i=V([K(0x0,_0x7f9972)],i);const u={'id':_0x4cc768(0x18a),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0x30d073,_0x496539)=>{const _0x32af58=_0x4cc768,{unitId:_0x11c280,subUnitId:_0x373ffd,shapeType:_0x5161fe,shapeId:_0x259828,shapeData:_0x111c94}=_0x496539,_0x5321b6=_0x30d073[_0x32af58(0x1a9)](i)[_0x32af58(0x1a4)](_0x11c280,_0x373ffd,_0x259828);return _0x5321b6&&(_0x5321b6[_0x32af58(0x1a1)](_0x5161fe),_0x111c94&&(_0x5321b6==null||_0x5321b6[_0x32af58(0x176)](_0x111c94))),!0x0;}},pe={'id':'sheet.command.update-shape-type','type':_0x285e23[_0x4cc768(0x19f)],'handler':(_0x152acf,_0xb0b4a2)=>{const _0xc59c3a=_0x4cc768;if(!_0xb0b4a2)return!0x1;const _0x5b0ca6=_0x152acf[_0xc59c3a(0x1a9)](_0x217751),_0x18d76b=_0x152acf[_0xc59c3a(0x1a9)](i),_0x14b2ea=_0x152acf['get'](_0x45cb91),_0x32f0b1=[],_0x55f419=[],{unitId:_0x13aedc,subUnitId:_0x136a87,shapeId:_0xab034f,shapeType:_0x16426a,shapeData:_0x4b0ea1}=_0xb0b4a2,_0x3fd5bd=_0x18d76b['getShapeModel'](_0x13aedc,_0x136a87,_0xab034f);if(_0x3fd5bd){const _0x52b69b=_0x3fd5bd[_0xc59c3a(0x1b4)](),_0x37397f=Object[_0xc59c3a(0x191)]({},_0x3fd5bd['getShapeData']()),_0x5450d0={'unitId':_0x13aedc,'subUnitId':_0x136a87,'shapeId':_0xab034f,'shapeType':_0x16426a,'shapeData':_0x4b0ea1},_0x14a899={'unitId':_0x13aedc,'subUnitId':_0x136a87,'shapeId':_0xab034f,'shapeType':_0x52b69b,'shapeData':_0x37397f};return _0x32f0b1['push']({'id':u['id'],'params':_0x5450d0}),_0x55f419[_0xc59c3a(0x174)]({'id':u['id'],'params':_0x14a899}),_0x32f0b1['every'](_0xa9b125=>_0x5b0ca6[_0xc59c3a(0x186)](_0xa9b125['id'],_0xa9b125['params']))&&_0x14b2ea[_0xc59c3a(0x193)]({'unitID':_0x13aedc,'redoMutations':[..._0x32f0b1],'undoMutations':[..._0x55f419]}),!0x0;}return!0x1;}},Y={'id':_0x4cc768(0x19e),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0x566a3d,_0x17e3f4)=>{const _0x44be04=_0x4cc768,{unitId:_0x1bcbae,subUnitId:_0x10a43e,shapeType:_0x4370ca,shapeId:_0x51398b,shapeData:_0x406148}=_0x17e3f4;return _0x566a3d['get'](i)[_0x44be04(0x1bb)](_0x1bcbae,_0x10a43e,_0x4370ca,_0x51398b,_0x406148),!0x0;}},q={'id':_0x4cc768(0x1bc),'type':_0x285e23['MUTATION'],'handler':(_0x1007a4,_0x364b7a)=>{const _0x185351=_0x4cc768,{unitId:_0x33c977,subUnitId:_0x295138,shapeId:_0x34450f}=_0x364b7a;return _0x1007a4[_0x185351(0x1a9)](i)[_0x185351(0x1ae)](_0x33c977,_0x295138,_0x34450f),!0x0;}},Q={'id':_0x4cc768(0x189),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0xee9301,_0x12766d)=>{const _0x193a4c=_0x4cc768,{unitId:_0x29e808,subUnitId:_0x286936,shapeType:_0x54a1e1,shapeId:_0x41dc4d,shapeData:_0x129309}=_0x12766d,_0x47c707=_0xee9301[_0x193a4c(0x1a9)](i)[_0x193a4c(0x1a4)](_0x29e808,_0x286936,_0x41dc4d);return _0x47c707&&(_0x54a1e1!==void 0x0&&_0x47c707['setShapeType'](_0x54a1e1),_0x129309&&(_0x47c707==null||_0x47c707[_0x193a4c(0x176)](_0x129309,!0x0))),!0x0;}},X=_0x4cc768(0x194),m={};function _0x1d7e(_0x2c3938,_0x39cd34){_0x2c3938=_0x2c3938-0x16d;const _0x221c11=_0x221c();let _0x1d7eb2=_0x221c11[_0x2c3938];return _0x1d7eb2;}var Z=Object[_0x4cc768(0x16d)],k=Object['getOwnPropertyDescriptor'],ee=(_0x36b4e5,_0xcc9500,_0x28c414)=>_0xcc9500 in _0x36b4e5?Z(_0x36b4e5,_0xcc9500,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28c414}):_0x36b4e5[_0xcc9500]=_0x28c414,ae=(_0x20995c,_0x24a57c,_0x1f336a,_0x13a385)=>{const _0x5d3770=_0x4cc768;for(var _0x2590a8=_0x13a385>0x1?void 0x0:_0x13a385?k(_0x24a57c,_0x1f336a):_0x24a57c,_0x93e89e=_0x20995c[_0x5d3770(0x1ac)]-0x1,_0x2a3468;_0x93e89e>=0x0;_0x93e89e--)(_0x2a3468=_0x20995c[_0x93e89e])&&(_0x2590a8=_0x2a3468(_0x2590a8)||_0x2590a8);return _0x2590a8;},g=(_0x3d27c5,_0x4e21ca)=>(_0x14da34,_0x39ef7b)=>_0x4e21ca(_0x14da34,_0x39ef7b,_0x3d27c5),E=(_0x2c9ba2,_0x15d45a,_0x541c70)=>ee(_0x2c9ba2,typeof _0x15d45a!=_0x4cc768(0x1ba)?_0x15d45a+'':_0x15d45a,_0x541c70);const se=_0x4cc768(0x1b3);let S=class extends _0x281049{constructor(_0x590bef=m,_0x5d7173,_0x59da61,_0x212fd5){const _0x5f265e=_0x4cc768;super(),this[_0x5f265e(0x195)]=_0x590bef,this[_0x5f265e(0x19a)]=_0x5d7173,this[_0x5f265e(0x16f)]=_0x59da61,this['_configService']=_0x212fd5;const {..._0x2f18e4}=_0x5f0e29({},m,this['_config']);this[_0x5f265e(0x17e)]['setConfig'](X,_0x2f18e4),this[_0x5f265e(0x18f)]();}[_0x4cc768(0x1aa)](){const _0x4cfae8=_0x4cc768;_0x4e6c8c(this[_0x4cfae8(0x19a)],[]);}[_0x4cc768(0x188)](){const _0x31c578=_0x4cc768,_0x89cd4=this[_0x31c578(0x19a)];[[T],[i]][_0x31c578(0x178)](_0xc060b5=>_0x89cd4['add'](_0xc060b5));}[_0x4cc768(0x18f)](){const _0xcb8660=_0x4cc768;[Y,q,u,Q][_0xcb8660(0x178)](_0x20c2cc=>this[_0xcb8660(0x1b5)](this[_0xcb8660(0x16f)][_0xcb8660(0x17c)](_0x20c2cc)));}};E(S,_0x4cc768(0x177),_0x228f81[_0x4cc768(0x183)]),E(S,_0x4cc768(0x1b9),se),S=ae([_0x4f414d(_0x2ad86e),g(0x1,_0x2ff514(_0x3bc1fa)),g(0x2,_0x217751),g(0x3,_0x472081)],S);export{Y as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,i as SheetsShapeServices,S as UniverSheetsShapePlugin,Q as UpdateSheetsShapeDataMutation,pe as UpdateSheetsShapeTypeCommand,u as UpdateSheetsShapeTypeMutation};
|
|
1
|
+
const _0x43a6f2=_0x421c;(function(_0x4ae34e,_0x1c02ae){const _0x41a7b7=_0x421c,_0x558949=_0x4ae34e();while(!![]){try{const _0x1c8c37=-parseInt(_0x41a7b7(0xad))/0x1*(-parseInt(_0x41a7b7(0xe8))/0x2)+parseInt(_0x41a7b7(0xcb))/0x3+-parseInt(_0x41a7b7(0xe2))/0x4*(parseInt(_0x41a7b7(0xb8))/0x5)+-parseInt(_0x41a7b7(0xd5))/0x6*(parseInt(_0x41a7b7(0xd1))/0x7)+-parseInt(_0x41a7b7(0xe7))/0x8+-parseInt(_0x41a7b7(0xb4))/0x9+parseInt(_0x41a7b7(0xae))/0xa*(parseInt(_0x41a7b7(0xce))/0xb);if(_0x1c8c37===_0x1c02ae)break;else _0x558949['push'](_0x558949['shift']());}catch(_0x4b7533){_0x558949['push'](_0x558949['shift']());}}}(_0x14cf,0x6fa18));var R=Object[_0x43a6f2(0xc1)],C=(_0x2a89db,_0x2f5e71,_0x5c03fc)=>_0x2f5e71 in _0x2a89db?R(_0x2a89db,_0x2f5e71,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c03fc}):_0x2a89db[_0x2f5e71]=_0x5c03fc,d=(_0x773689,_0x392702,_0x100533)=>C(_0x773689,typeof _0x392702!=_0x43a6f2(0xbe)?_0x392702+'':_0x392702,_0x100533);import{Disposable as _0x4b7b4d,UniverInstanceType as _0x26dd27,IResourceManagerService as _0x203dfb,CommandType as _0x49e1d5,ICommandService as _0x65add9,IUndoRedoService as _0x5b7d85,DependentOn as _0x26fc7e,Inject as _0x196b66,Injector as _0xf77523,Plugin as _0x4cf84e,merge as _0x41e183,touchDependencies as _0x55073d,IConfigService as _0x3ebb98}from'@univerjs/core';import{ShapeModel as _0x464ca3,isConnectorShape as _0x453e60}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x69e81b}from'@univerjs-pro/license';class T extends _0x4b7b4d{constructor(){const _0x5d5555=_0x43a6f2;super(),d(this,_0x5d5555(0xcd),new Map()),d(this,_0x5d5555(0xc4),new Set()),d(this,_0x5d5555(0xee),new Set());}[_0x43a6f2(0xcf)](_0x1d8001,_0x585ac6,_0x5cd8ef){const _0x59b7f3=_0x43a6f2,_0x59ab0a=new _0x464ca3(_0x1d8001,_0x585ac6,_0x5cd8ef);return this[_0x59b7f3(0xcd)][_0x59b7f3(0xb1)](_0x585ac6,_0x59ab0a),_0x453e60(_0x1d8001)&&this[_0x59b7f3(0xc4)]['add'](_0x585ac6),_0x59ab0a;}[_0x43a6f2(0xeb)](_0x2d8661){const _0x7b6934=_0x43a6f2;var _0x20a8a2,_0x1aad62;const _0x1b559b=[];for(const _0x924f74 of this['_linesIds']){const _0x39eecb=this[_0x7b6934(0xcd)][_0x7b6934(0xda)](_0x924f74);if(_0x39eecb){const _0x35314d=_0x39eecb['getShapeRelation']();_0x35314d&&(((_0x20a8a2=_0x35314d[_0x7b6934(0xa9)])==null?void 0x0:_0x20a8a2[_0x7b6934(0xa7)])===_0x2d8661&&_0x1b559b['push']({..._0x35314d['from'],'lineShapeId':_0x924f74,'isFrom':!0x0}),((_0x1aad62=_0x35314d['to'])==null?void 0x0:_0x1aad62[_0x7b6934(0xa7)])===_0x2d8661&&_0x1b559b[_0x7b6934(0xef)]({..._0x35314d['to'],'lineShapeId':_0x924f74,'isFrom':!0x1}));}}return _0x1b559b;}[_0x43a6f2(0xf0)](_0x11c47f){const _0x5a6db0=_0x43a6f2,_0x13675b=this['_shapes']['get'](_0x11c47f);if(_0x13675b)return _0x13675b[_0x5a6db0(0xa8)]();}[_0x43a6f2(0xb3)](_0x5861e9){const _0x398238=_0x43a6f2,_0x3163ba=this[_0x398238(0xcd)]['get'](_0x5861e9);if(_0x3163ba)return _0x3163ba[_0x398238(0xb3)]();}[_0x43a6f2(0xe1)](_0x2ece54){const _0x51297a=_0x43a6f2;return this[_0x51297a(0xcd)]['has'](_0x2ece54);}[_0x43a6f2(0xd2)](_0x354e4b){const _0x5b7a7f=_0x43a6f2,_0x3ccd33=this['_shapes'][_0x5b7a7f(0xda)](_0x354e4b);_0x3ccd33&&(_0x453e60(_0x3ccd33[_0x5b7a7f(0xb3)]())&&this[_0x5b7a7f(0xc4)]['delete'](_0x354e4b),this[_0x5b7a7f(0xcd)][_0x5b7a7f(0xaf)](_0x354e4b));}[_0x43a6f2(0xb2)](){const _0x45916a=_0x43a6f2,_0x3ac80e=[];return this[_0x45916a(0xcd)][_0x45916a(0xba)](_0x406120=>{const _0x43546e=_0x45916a;_0x3ac80e[_0x43546e(0xef)](_0x406120[_0x43546e(0xb2)]());}),_0x3ac80e;}['fromJSON'](_0x38bb4d){const _0x46147a=_0x43a6f2;for(const _0x2ee55b of _0x38bb4d){const {id:_0x1ce412,shapeType:_0x135f41}=_0x2ee55b,_0x22130f=this[_0x46147a(0xcf)](_0x135f41,_0x1ce412,_0x2ee55b[_0x46147a(0xc3)]);_0x22130f&&_0x22130f[_0x46147a(0xea)]()&&this['_linesIds'][_0x46147a(0xd0)](_0x1ce412);}}[_0x43a6f2(0xc6)](){const _0x559412=_0x43a6f2;this[_0x559412(0xa6)]||(this[_0x559412(0xcd)]['forEach'](_0x55948f=>{const _0xa1cd4f=_0x559412;_0x55948f[_0xa1cd4f(0xc6)]();}),this[_0x559412(0xcd)]['clear'](),this['_linesIds']['clear'](),this[_0x559412(0xee)][_0x559412(0xe6)](),super['dispose']());}}var $=Object[_0x43a6f2(0xd7)],V=(_0x3b2d48,_0x1101da,_0x5b1927,_0x1be1e5)=>{const _0x3d0f82=_0x43a6f2;for(var _0x1f1281=_0x1be1e5>0x1?void 0x0:_0x1be1e5?$(_0x1101da,_0x5b1927):_0x1101da,_0x44a118=_0x3b2d48[_0x3d0f82(0xe5)]-0x1,_0x4f530c;_0x44a118>=0x0;_0x44a118--)(_0x4f530c=_0x3b2d48[_0x44a118])&&(_0x1f1281=_0x4f530c(_0x1f1281)||_0x1f1281);return _0x1f1281;},K=(_0x207a13,_0x6bb06a)=>(_0x4a4fd4,_0x59fcd4)=>_0x6bb06a(_0x4a4fd4,_0x59fcd4,_0x207a13);const W=_0x43a6f2(0xd3);let i=class extends _0x4b7b4d{constructor(_0x4a443f){const _0x40c745=_0x43a6f2;super(),d(this,_0x40c745(0xd8),new Map()),(this['_resourcesManagerService']=_0x4a443f,this[_0x40c745(0xd6)]());}[_0x43a6f2(0xe9)](_0x43f03d,_0x16e722){const _0x1609b0=_0x43a6f2;let _0xb0cb56=this['_shapeModelManagerMap'][_0x1609b0(0xda)](_0x43f03d);_0xb0cb56||(_0xb0cb56=new Map(),this[_0x1609b0(0xd8)][_0x1609b0(0xb1)](_0x43f03d,_0xb0cb56));let _0x4fa5c6=_0xb0cb56[_0x1609b0(0xda)](_0x16e722);return _0x4fa5c6||(_0x4fa5c6=new T(),_0xb0cb56[_0x1609b0(0xb1)](_0x16e722,_0x4fa5c6)),_0x4fa5c6;}[_0x43a6f2(0xc5)](_0x2b128a,_0x4653c0,_0x497e8a,_0x1dfecd,_0x210f56){const _0x398954=_0x43a6f2;this[_0x398954(0xe9)](_0x2b128a,_0x4653c0)[_0x398954(0xcf)](_0x497e8a,_0x1dfecd,_0x210f56);}['removeShape'](_0x54b567,_0x49279d,_0x22a61c){const _0x135d2a=_0x43a6f2;this[_0x135d2a(0xe9)](_0x54b567,_0x49279d)[_0x135d2a(0xd2)](_0x22a61c);}['getBasicShapeType'](_0x893c94,_0x263843,_0xffdcb6){const _0x4917b3=_0x43a6f2;return this[_0x4917b3(0xe9)](_0x893c94,_0x263843)[_0x4917b3(0xb3)](_0xffdcb6);}[_0x43a6f2(0xb3)](_0xd9a4f8,_0x41b910,_0x39d752){const _0x329ee1=_0x43a6f2;return this[_0x329ee1(0xe9)](_0xd9a4f8,_0x41b910)[_0x329ee1(0xb3)](_0x39d752);}['hasShape'](_0x56e5f0,_0x9d8c59,_0x1922d8){const _0x28d24c=_0x43a6f2;return this[_0x28d24c(0xe9)](_0x56e5f0,_0x9d8c59)[_0x28d24c(0xe1)](_0x1922d8);}['getShapeTypeById'](_0x4432c7,_0x5b2696,_0x36ef67){const _0x4cbacb=_0x43a6f2;return this[_0x4cbacb(0xe9)](_0x4432c7,_0x5b2696)['getShapeType'](_0x36ef67);}[_0x43a6f2(0xb0)](_0x32113a,_0x438962,_0x369f02){const _0x132b5e=_0x43a6f2,_0x40847f=this['_ensureShapeModelManager'](_0x32113a,_0x438962);if(!_0x40847f['getShapeType'](_0x369f02))return;const _0x48abf7=_0x40847f[_0x132b5e(0xcd)][_0x132b5e(0xda)](_0x369f02);if(_0x48abf7)return _0x48abf7[_0x132b5e(0xdc)]();}[_0x43a6f2(0xdb)](_0x3647b6,_0x13751a,_0x3afdb2){const _0x27ec61=_0x43a6f2;return this[_0x27ec61(0xe9)](_0x3647b6,_0x13751a)[_0x27ec61(0xcd)][_0x27ec61(0xda)](_0x3afdb2);}['getBasicShapeRelation'](_0x275f85,_0x13ee72,_0x155922){const _0x199e96=_0x43a6f2;return this[_0x199e96(0xe9)](_0x275f85,_0x13ee72)['getBasicShapeRelation'](_0x155922);}['getLineShapeRelation'](_0x1b10a3,_0x42d94d,_0x487c92){const _0x2b11cc=_0x43a6f2,_0x596b76=this['_ensureShapeModelManager'](_0x1b10a3,_0x42d94d)[_0x2b11cc(0xcd)][_0x2b11cc(0xda)](_0x487c92);if(_0x596b76)return _0x596b76[_0x2b11cc(0xa8)]();}[_0x43a6f2(0xdd)](){}[_0x43a6f2(0xbf)](_0x4e4052){const _0x560e86=_0x43a6f2,_0x582638={},_0x5db59c=this['_shapeModelManagerMap'][_0x560e86(0xda)](_0x4e4052);return _0x5db59c&&_0x5db59c['forEach']((_0x37e9aa,_0x4d0e4d)=>{const _0x149ea6=_0x560e86,_0x2bbf6a=_0x37e9aa[_0x149ea6(0xb2)]();_0x2bbf6a['length']>0x0&&(_0x582638[_0x4d0e4d]=_0x2bbf6a);}),JSON[_0x560e86(0xcc)](_0x582638);}['_deserializeShapeForUnit'](_0x14c70f,_0x46bc8f){const _0x57d86a=_0x43a6f2;Object[_0x57d86a(0xed)](_0x46bc8f)['forEach'](_0x29888d=>{this['_ensureShapeModelManager'](_0x14c70f,_0x29888d)['fromJSON'](_0x46bc8f[_0x29888d]);});}[_0x43a6f2(0xb2)](){const _0x5df47c=_0x43a6f2,_0x1090fa={};return this[_0x5df47c(0xd8)][_0x5df47c(0xba)]((_0x40dff7,_0x11b75)=>{const _0x130317=_0x5df47c;_0x1090fa[_0x11b75]={},_0x40dff7[_0x130317(0xba)]((_0x2b7ae2,_0x431f19)=>{_0x1090fa[_0x11b75][_0x431f19]=_0x2b7ae2['toJSON']();});}),_0x1090fa;}[_0x43a6f2(0xec)](_0xe73ca6){const _0x406ac0=_0x43a6f2;Object[_0x406ac0(0xed)](_0xe73ca6)[_0x406ac0(0xba)](_0x5defbc=>{const _0x552c11=_0x406ac0,_0x31ffc2=_0xe73ca6[_0x5defbc];Object[_0x552c11(0xed)](_0x31ffc2)['forEach'](_0x37a41c=>{const _0x412e5f=_0x552c11;this[_0x412e5f(0xe9)](_0x5defbc,_0x37a41c)['fromJSON'](_0x31ffc2[_0x37a41c]);});});}[_0x43a6f2(0xd6)](){const _0x3f1f4c=_0x43a6f2;this['_resourcesManagerService']['registerPluginResource']({'pluginName':W,'businesses':[_0x26dd27[_0x3f1f4c(0xa5)]],'toJson':_0x135b0f=>this[_0x3f1f4c(0xbf)](_0x135b0f),'parseJson':_0x77431a=>JSON[_0x3f1f4c(0xaa)](_0x77431a),'onLoad':(_0x1fb15d,_0x46aa18)=>{const _0x397169=_0x3f1f4c;this[_0x397169(0xb9)](_0x1fb15d,_0x46aa18);},'onUnLoad':_0x2bc5be=>{const _0x24ccb1=_0x3f1f4c,_0x14c061=this['_shapeModelManagerMap'][_0x24ccb1(0xda)](_0x2bc5be);_0x14c061&&(_0x14c061[_0x24ccb1(0xba)](_0x3ff9d5=>{_0x3ff9d5['dispose']();}),this[_0x24ccb1(0xd8)][_0x24ccb1(0xaf)](_0x2bc5be));}});}['dispose'](){const _0x2a4526=_0x43a6f2;this[_0x2a4526(0xd8)][_0x2a4526(0xba)](_0xeff72e=>{_0xeff72e['forEach'](_0x12e8e4=>{const _0x1058a5=_0x421c;_0x12e8e4[_0x1058a5(0xc6)]();});});}};i=V([K(0x0,_0x203dfb)],i);const u={'id':'sheet.mutation.update-shape-type','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x3c19d7,_0x188894)=>{const _0x21d03a=_0x43a6f2,{unitId:_0x1aebf1,subUnitId:_0x314803,shapeType:_0x4faacd,shapeId:_0x27bb28,shapeData:_0x5c4ca8}=_0x188894,_0x28c798=_0x3c19d7[_0x21d03a(0xda)](i)[_0x21d03a(0xdb)](_0x1aebf1,_0x314803,_0x27bb28);return _0x28c798&&(_0x28c798[_0x21d03a(0xdd)](_0x4faacd),_0x5c4ca8&&(_0x28c798==null||_0x28c798[_0x21d03a(0xde)](_0x5c4ca8))),!0x0;}},pe={'id':_0x43a6f2(0xc8),'type':_0x49e1d5[_0x43a6f2(0xbc)],'handler':(_0x4218ee,_0x3c223c)=>{const _0x3a5281=_0x43a6f2;if(!_0x3c223c)return!0x1;const _0x26fc2c=_0x4218ee[_0x3a5281(0xda)](_0x65add9),_0x589419=_0x4218ee['get'](i),_0x314748=_0x4218ee[_0x3a5281(0xda)](_0x5b7d85),_0x9e32be=[],_0x267a0f=[],{unitId:_0x24bfe6,subUnitId:_0xb884d7,shapeId:_0x3dcefa,shapeType:_0x21f3c0,shapeData:_0x47d470}=_0x3c223c,_0x5b8c68=_0x589419[_0x3a5281(0xdb)](_0x24bfe6,_0xb884d7,_0x3dcefa);if(_0x5b8c68){const _0x23fb57=_0x5b8c68[_0x3a5281(0xb3)](),_0x4ca1cc=Object[_0x3a5281(0xc2)]({},_0x5b8c68[_0x3a5281(0xdc)]()),_0x577a72={'unitId':_0x24bfe6,'subUnitId':_0xb884d7,'shapeId':_0x3dcefa,'shapeType':_0x21f3c0,'shapeData':_0x47d470},_0x341c1d={'unitId':_0x24bfe6,'subUnitId':_0xb884d7,'shapeId':_0x3dcefa,'shapeType':_0x23fb57,'shapeData':_0x4ca1cc};return _0x9e32be[_0x3a5281(0xef)]({'id':u['id'],'params':_0x577a72}),_0x267a0f[_0x3a5281(0xef)]({'id':u['id'],'params':_0x341c1d}),_0x9e32be[_0x3a5281(0xb7)](_0x437d3c=>_0x26fc2c[_0x3a5281(0xab)](_0x437d3c['id'],_0x437d3c[_0x3a5281(0xe0)]))&&_0x314748[_0x3a5281(0xac)]({'unitID':_0x24bfe6,'redoMutations':[..._0x9e32be],'undoMutations':[..._0x267a0f]}),!0x0;}return!0x1;}},Y={'id':_0x43a6f2(0xdf),'type':_0x49e1d5['MUTATION'],'handler':(_0x4ab54f,_0x35dfd5)=>{const _0x460ef1=_0x43a6f2,{unitId:_0x139b7e,subUnitId:_0x3e2378,shapeType:_0x5b3de1,shapeId:_0x3167f4,shapeData:_0x2f1bf2}=_0x35dfd5;return _0x4ab54f['get'](i)[_0x460ef1(0xc5)](_0x139b7e,_0x3e2378,_0x5b3de1,_0x3167f4,_0x2f1bf2),!0x0;}},q={'id':'sheet.mutation.remove-shape','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x1fad37,_0x44fc02)=>{const _0x55e4d6=_0x43a6f2,{unitId:_0x1d4c3,subUnitId:_0x3ce7d5,shapeId:_0x159aa5}=_0x44fc02;return _0x1fad37[_0x55e4d6(0xda)](i)['removeShape'](_0x1d4c3,_0x3ce7d5,_0x159aa5),!0x0;}},Q={'id':'sheet.mutation.update-shape-data','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x38d43d,_0x37d0af)=>{const _0x59c3d6=_0x43a6f2,{unitId:_0x3ba78e,subUnitId:_0x44b7ca,shapeType:_0x546535,shapeId:_0x383919,shapeData:_0x2a1b11}=_0x37d0af,_0x307f12=_0x38d43d[_0x59c3d6(0xda)](i)[_0x59c3d6(0xdb)](_0x3ba78e,_0x44b7ca,_0x383919);return _0x307f12&&(_0x546535!==void 0x0&&_0x307f12['setShapeType'](_0x546535),_0x2a1b11&&(_0x307f12==null||_0x307f12[_0x59c3d6(0xde)](_0x2a1b11,!0x0))),!0x0;}},X='sheets-shape.config',m={};function _0x421c(_0x19686e,_0x50be41){_0x19686e=_0x19686e-0xa5;const _0x14cf33=_0x14cf();let _0x421cda=_0x14cf33[_0x19686e];return _0x421cda;}var Z=Object[_0x43a6f2(0xc1)],k=Object[_0x43a6f2(0xd7)],ee=(_0x557a80,_0x3186c4,_0x80e7d7)=>_0x3186c4 in _0x557a80?Z(_0x557a80,_0x3186c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x80e7d7}):_0x557a80[_0x3186c4]=_0x80e7d7,ae=(_0x2e843e,_0xcef521,_0x311b8d,_0x344f1b)=>{const _0xc92546=_0x43a6f2;for(var _0x1333be=_0x344f1b>0x1?void 0x0:_0x344f1b?k(_0xcef521,_0x311b8d):_0xcef521,_0x383bb6=_0x2e843e[_0xc92546(0xe5)]-0x1,_0x2e3302;_0x383bb6>=0x0;_0x383bb6--)(_0x2e3302=_0x2e843e[_0x383bb6])&&(_0x1333be=_0x2e3302(_0x1333be)||_0x1333be);return _0x1333be;},g=(_0x3ff799,_0x69fafd)=>(_0x33eb9d,_0x3d7711)=>_0x69fafd(_0x33eb9d,_0x3d7711,_0x3ff799),E=(_0xa345fc,_0x3bcc12,_0x239c62)=>ee(_0xa345fc,typeof _0x3bcc12!=_0x43a6f2(0xbe)?_0x3bcc12+'':_0x3bcc12,_0x239c62);const se=_0x43a6f2(0xd3);let S=class extends _0x4cf84e{constructor(_0x143000=m,_0x114294,_0x1f05f3,_0xbfa95){const _0x4d0c73=_0x43a6f2;super(),this['_config']=_0x143000,this['_injector']=_0x114294,this[_0x4d0c73(0xe4)]=_0x1f05f3,this['_configService']=_0xbfa95;const {..._0x5ad44a}=_0x41e183({},m,this[_0x4d0c73(0xb5)]);this[_0x4d0c73(0xd9)]['setConfig'](X,_0x5ad44a),this['_initCommands']();}[_0x43a6f2(0xe3)](){const _0x3450ef=_0x43a6f2;_0x55073d(this[_0x3450ef(0xd4)],[]);}[_0x43a6f2(0xbb)](){const _0x3232fa=_0x43a6f2,_0x590c89=this['_injector'];[[T],[i]]['forEach'](_0x339708=>_0x590c89[_0x3232fa(0xd0)](_0x339708));}[_0x43a6f2(0xc7)](){const _0x1f01d8=_0x43a6f2;[Y,q,u,Q][_0x1f01d8(0xba)](_0x516021=>this[_0x1f01d8(0xb6)](this[_0x1f01d8(0xe4)][_0x1f01d8(0xc9)](_0x516021)));}};E(S,_0x43a6f2(0xbd),_0x26dd27['UNIVER_SHEET']),E(S,_0x43a6f2(0xca),se),S=ae([_0x26fc7e(_0x69e81b),g(0x1,_0x196b66(_0xf77523)),g(0x2,_0x65add9),g(0x3,_0x3ebb98)],S);export{Y as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,i as SheetsShapeService,S as UniverSheetsShapePlugin,Q as UpdateSheetsShapeDataMutation,pe as UpdateSheetsShapeTypeCommand,u as UpdateSheetsShapeTypeMutation};function _0x14cf(){const _0x595cf1=['443315WIlOiN','_deserializeShapeForUnit','forEach','onStarting','COMMAND','type','symbol','_serializeShapeForUnit','MUTATION','defineProperty','assign','shapeData','_linesIds','insertShape','dispose','_initCommands','sheet.command.update-shape-type','registerCommand','pluginName','1137750odJFmU','stringify','_shapes','587103MiAzZu','addShape','add','35enerlF','removeShape','SHEET_SHAPE_PLUGIN','_injector','764670GPObEp','_initSnapshot','getOwnPropertyDescriptor','_shapeModelManagerMap','_configService','get','getShapeModel','getShapeData','setShapeType','setShapeData','sheet.mutation.insert-shape','params','hasShape','24jiSMvf','onRendered','_commandService','length','clear','2161632OlRLlr','2gZirpw','_ensureShapeModelManager','isLineShape','getBasicShapeRelation','fromJSON','keys','_groupIds','push','getLineShapeRelation','UNIVER_SHEET','_disposed','shapeId','getShapeRelation','from','parse','syncExecuteCommand','pushUndoRedo','412073ynxJIB','260jWTktA','delete','getShapeDataById','set','toJSON','getShapeType','2541366zkoWRC','_config','disposeWithMe','every'];_0x14cf=function(){return _0x595cf1;};return _0x14cf();}
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const _0x4cc768=_0x1d7e;(function(_0x5e6635,_0x401031){const _0x2e0ec4=_0x1d7e,_0x42e4c1=_0x5e6635();while(!![]){try{const _0x1dc7f3=-parseInt(_0x2e0ec4(0x1b8))/0x1+-parseInt(_0x2e0ec4(0x1a2))/0x2+-parseInt(_0x2e0ec4(0x18c))/0x3+-parseInt(_0x2e0ec4(0x196))/0x4+-parseInt(_0x2e0ec4(0x1b1))/0x5*(-parseInt(_0x2e0ec4(0x192))/0x6)+parseInt(_0x2e0ec4(0x1a0))/0x7*(parseInt(_0x2e0ec4(0x190))/0x8)+parseInt(_0x2e0ec4(0x198))/0x9;if(_0x1dc7f3===_0x401031)break;else _0x42e4c1['push'](_0x42e4c1['shift']());}catch(_0x606fa0){_0x42e4c1['push'](_0x42e4c1['shift']());}}}(_0x221c,0x8c778));var R=Object[_0x4cc768(0x16d)],C=(_0x218ec6,_0x826148,_0x5e8f3a)=>_0x826148 in _0x218ec6?R(_0x218ec6,_0x826148,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5e8f3a}):_0x218ec6[_0x826148]=_0x5e8f3a,d=(_0x389ca2,_0x47c50c,_0x1eacfa)=>C(_0x389ca2,typeof _0x47c50c!=_0x4cc768(0x1ba)?_0x47c50c+'':_0x47c50c,_0x1eacfa);function _0x221c(){const _0x47d6dd=['2457444medEoG','_initSnapshot','21054078pScHzF','delete','_injector','stringify','_deserializeShapeForUnit','_linesIds','sheet.mutation.insert-shape','COMMAND','816655BXrGZC','setShapeType','337708MRPHbB','from','getShapeModel','getShapeTypeById','_ensureShapeModelManager','shapeId','isLineShape','get','onRendered','_shapes','length','toJSON','removeShape','_serializeShapeForUnit','MUTATION','555OczyOg','dispose','SHEET_SHAPE_PLUGIN','getShapeType','disposeWithMe','_groupIds','shapeData','1061231SVuuHW','pluginName','symbol','insertShape','sheet.mutation.remove-shape','defineProperty','getOwnPropertyDescriptor','_commandService','clear','_disposed','add','_resourcesManagerService','push','getShapeDataById','setShapeData','type','forEach','registerPluginResource','set','fromJSON','registerCommand','has','_configService','getLineShapeRelation','_shapeModelManagerMap','getBasicShapeRelation','parse','UNIVER_SHEET','addShape','getShapeRelation','syncExecuteCommand','getBasicShapeType','onStarting','sheet.mutation.update-shape-data','sheet.mutation.update-shape-type','getShapeData','2012721MLvdcI','keys','hasShape','_initCommands','8OtoaHF','assign','34308pIDpyZ','pushUndoRedo','sheets-shape.config','_config'];_0x221c=function(){return _0x47d6dd;};return _0x221c();}import{Disposable as _0x204338,UniverInstanceType as _0x228f81,IResourceManagerService as _0x7f9972,CommandType as _0x285e23,ICommandService as _0x217751,IUndoRedoService as _0x45cb91,DependentOn as _0x4f414d,Inject as _0x2ff514,Injector as _0x3bc1fa,Plugin as _0x281049,merge as _0x5f0e29,touchDependencies as _0x4e6c8c,IConfigService as _0x472081}from'@univerjs/core';import{ShapeModel as _0x6af823,isConnectorShape as _0x4518b0}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x2ad86e}from'@univerjs-pro/license';class T extends _0x204338{constructor(){const _0x2e022a=_0x4cc768;super(),d(this,_0x2e022a(0x1ab),new Map()),d(this,_0x2e022a(0x19d),new Set()),d(this,_0x2e022a(0x1b6),new Set());}[_0x4cc768(0x184)](_0x3bf2de,_0x170877,_0x12c087){const _0x1fe2bb=_0x4cc768,_0x307e29=new _0x6af823(_0x3bf2de,_0x170877,_0x12c087);return this[_0x1fe2bb(0x1ab)][_0x1fe2bb(0x17a)](_0x170877,_0x307e29),_0x4518b0(_0x3bf2de)&&this[_0x1fe2bb(0x19d)][_0x1fe2bb(0x172)](_0x170877),_0x307e29;}['getBasicShapeRelation'](_0x510ef9){const _0x59d8c0=_0x4cc768;var _0x19a6ba,_0x2a278d;const _0x5b3536=[];for(const _0x1712b7 of this[_0x59d8c0(0x19d)]){const _0x91a3d8=this[_0x59d8c0(0x1ab)]['get'](_0x1712b7);if(_0x91a3d8){const _0x44c148=_0x91a3d8[_0x59d8c0(0x185)]();_0x44c148&&(((_0x19a6ba=_0x44c148['from'])==null?void 0x0:_0x19a6ba[_0x59d8c0(0x1a7)])===_0x510ef9&&_0x5b3536[_0x59d8c0(0x174)]({..._0x44c148[_0x59d8c0(0x1a3)],'lineShapeId':_0x1712b7,'isFrom':!0x0}),((_0x2a278d=_0x44c148['to'])==null?void 0x0:_0x2a278d[_0x59d8c0(0x1a7)])===_0x510ef9&&_0x5b3536[_0x59d8c0(0x174)]({..._0x44c148['to'],'lineShapeId':_0x1712b7,'isFrom':!0x1}));}}return _0x5b3536;}['getLineShapeRelation'](_0x48f530){const _0x3a768c=_0x4cc768,_0x17e0c1=this[_0x3a768c(0x1ab)][_0x3a768c(0x1a9)](_0x48f530);if(_0x17e0c1)return _0x17e0c1[_0x3a768c(0x185)]();}[_0x4cc768(0x1b4)](_0x3b6e35){const _0x4d5408=_0x4cc768,_0x2c97e1=this[_0x4d5408(0x1ab)][_0x4d5408(0x1a9)](_0x3b6e35);if(_0x2c97e1)return _0x2c97e1[_0x4d5408(0x1b4)]();}[_0x4cc768(0x18e)](_0x3fe782){const _0xf7d68b=_0x4cc768;return this[_0xf7d68b(0x1ab)][_0xf7d68b(0x17d)](_0x3fe782);}[_0x4cc768(0x1ae)](_0xd329c2){const _0x2f8b19=_0x4cc768,_0x4b1bfd=this[_0x2f8b19(0x1ab)]['get'](_0xd329c2);_0x4b1bfd&&(_0x4518b0(_0x4b1bfd[_0x2f8b19(0x1b4)]())&&this[_0x2f8b19(0x19d)]['delete'](_0xd329c2),this[_0x2f8b19(0x1ab)][_0x2f8b19(0x199)](_0xd329c2));}[_0x4cc768(0x1ad)](){const _0x28e39b=_0x4cc768,_0x586e77=[];return this[_0x28e39b(0x1ab)][_0x28e39b(0x178)](_0x4cf5cf=>{const _0x16a237=_0x28e39b;_0x586e77[_0x16a237(0x174)](_0x4cf5cf[_0x16a237(0x1ad)]());}),_0x586e77;}[_0x4cc768(0x17b)](_0x1ebd37){const _0x4fa94b=_0x4cc768;for(const _0x18e710 of _0x1ebd37){const {id:_0x4076e2,shapeType:_0x1b7b81}=_0x18e710,_0x19b013=this['addShape'](_0x1b7b81,_0x4076e2,_0x18e710[_0x4fa94b(0x1b7)]);_0x19b013&&_0x19b013[_0x4fa94b(0x1a8)]()&&this[_0x4fa94b(0x19d)][_0x4fa94b(0x172)](_0x4076e2);}}['dispose'](){const _0x2447ae=_0x4cc768;this[_0x2447ae(0x171)]||(this['_shapes'][_0x2447ae(0x178)](_0x1d1dc7=>{const _0x27905=_0x2447ae;_0x1d1dc7[_0x27905(0x1b2)]();}),this[_0x2447ae(0x1ab)][_0x2447ae(0x170)](),this['_linesIds'][_0x2447ae(0x170)](),this[_0x2447ae(0x1b6)][_0x2447ae(0x170)](),super[_0x2447ae(0x1b2)]());}}var $=Object[_0x4cc768(0x16e)],V=(_0x235098,_0x4a5fdb,_0x4e0eee,_0x188e13)=>{const _0x50fd5b=_0x4cc768;for(var _0x4fa205=_0x188e13>0x1?void 0x0:_0x188e13?$(_0x4a5fdb,_0x4e0eee):_0x4a5fdb,_0x243c2d=_0x235098[_0x50fd5b(0x1ac)]-0x1,_0x4d5390;_0x243c2d>=0x0;_0x243c2d--)(_0x4d5390=_0x235098[_0x243c2d])&&(_0x4fa205=_0x4d5390(_0x4fa205)||_0x4fa205);return _0x4fa205;},K=(_0x17996a,_0x487880)=>(_0x39ecc1,_0x5cd1da)=>_0x487880(_0x39ecc1,_0x5cd1da,_0x17996a);const W='SHEET_SHAPE_PLUGIN';let i=class extends _0x204338{constructor(_0x5937c7){const _0x5f007e=_0x4cc768;super(),d(this,_0x5f007e(0x180),new Map()),(this[_0x5f007e(0x173)]=_0x5937c7,this['_initSnapshot']());}[_0x4cc768(0x1a6)](_0x3644a6,_0x585865){const _0x365134=_0x4cc768;let _0x14cddb=this[_0x365134(0x180)][_0x365134(0x1a9)](_0x3644a6);_0x14cddb||(_0x14cddb=new Map(),this[_0x365134(0x180)][_0x365134(0x17a)](_0x3644a6,_0x14cddb));let _0x4efba5=_0x14cddb[_0x365134(0x1a9)](_0x585865);return _0x4efba5||(_0x4efba5=new T(),_0x14cddb[_0x365134(0x17a)](_0x585865,_0x4efba5)),_0x4efba5;}[_0x4cc768(0x1bb)](_0xdea604,_0x129af1,_0x391c97,_0x163ac6,_0x32a945){const _0x445d37=_0x4cc768;this[_0x445d37(0x1a6)](_0xdea604,_0x129af1)[_0x445d37(0x184)](_0x391c97,_0x163ac6,_0x32a945);}['removeShape'](_0x37fe45,_0x3fb77f,_0xe306b3){const _0x1e9218=_0x4cc768;this['_ensureShapeModelManager'](_0x37fe45,_0x3fb77f)[_0x1e9218(0x1ae)](_0xe306b3);}[_0x4cc768(0x187)](_0x1735a5,_0x5ba15d,_0x4b176a){const _0x54ec7b=_0x4cc768;return this[_0x54ec7b(0x1a6)](_0x1735a5,_0x5ba15d)[_0x54ec7b(0x1b4)](_0x4b176a);}['getShapeType'](_0x1de9b0,_0x23f353,_0x45c610){const _0x4b590a=_0x4cc768;return this[_0x4b590a(0x1a6)](_0x1de9b0,_0x23f353)[_0x4b590a(0x1b4)](_0x45c610);}[_0x4cc768(0x18e)](_0x15fdb2,_0x2354c4,_0x31ec30){const _0x507a0a=_0x4cc768;return this[_0x507a0a(0x1a6)](_0x15fdb2,_0x2354c4)[_0x507a0a(0x18e)](_0x31ec30);}[_0x4cc768(0x1a5)](_0x3e8229,_0xb34123,_0xccb51e){const _0x126196=_0x4cc768;return this[_0x126196(0x1a6)](_0x3e8229,_0xb34123)[_0x126196(0x1b4)](_0xccb51e);}[_0x4cc768(0x175)](_0x4c3b67,_0xc40aee,_0x510136){const _0x45bfd9=_0x4cc768,_0x42fb88=this[_0x45bfd9(0x1a6)](_0x4c3b67,_0xc40aee);if(!_0x42fb88[_0x45bfd9(0x1b4)](_0x510136))return;const _0xcee85c=_0x42fb88[_0x45bfd9(0x1ab)]['get'](_0x510136);if(_0xcee85c)return _0xcee85c[_0x45bfd9(0x18b)]();}['getShapeModel'](_0x113551,_0x1da043,_0x426606){const _0x34d44f=_0x4cc768;return this['_ensureShapeModelManager'](_0x113551,_0x1da043)[_0x34d44f(0x1ab)][_0x34d44f(0x1a9)](_0x426606);}['getBasicShapeRelation'](_0x55ffef,_0x19f2d1,_0x5cfafc){const _0x3efef9=_0x4cc768;return this[_0x3efef9(0x1a6)](_0x55ffef,_0x19f2d1)[_0x3efef9(0x181)](_0x5cfafc);}[_0x4cc768(0x17f)](_0x2327cb,_0x9f134f,_0x1e8370){const _0x543ba4=_0x4cc768,_0xd5b384=this['_ensureShapeModelManager'](_0x2327cb,_0x9f134f)[_0x543ba4(0x1ab)][_0x543ba4(0x1a9)](_0x1e8370);if(_0xd5b384)return _0xd5b384['getShapeRelation']();}[_0x4cc768(0x1a1)](){}[_0x4cc768(0x1af)](_0x469302){const _0x5aa124=_0x4cc768,_0x5b4f32={},_0x500c05=this[_0x5aa124(0x180)][_0x5aa124(0x1a9)](_0x469302);return _0x500c05&&_0x500c05[_0x5aa124(0x178)]((_0x3d8616,_0x33f7a2)=>{_0x5b4f32[_0x33f7a2]=_0x3d8616['toJSON']();}),JSON[_0x5aa124(0x19b)](_0x5b4f32);}[_0x4cc768(0x19c)](_0x3e5eb5,_0x5788cf){const _0x58286d=_0x4cc768;Object[_0x58286d(0x18d)](_0x5788cf)[_0x58286d(0x178)](_0x288c09=>{const _0x1d001e=_0x58286d;this[_0x1d001e(0x1a6)](_0x3e5eb5,_0x288c09)['fromJSON'](_0x5788cf[_0x288c09]);});}[_0x4cc768(0x1ad)](){const _0x3abd05=_0x4cc768,_0x1fbc88={};return this[_0x3abd05(0x180)][_0x3abd05(0x178)]((_0x4745d3,_0x428fcb)=>{_0x1fbc88[_0x428fcb]={},_0x4745d3['forEach']((_0x1532e1,_0x30cdcc)=>{_0x1fbc88[_0x428fcb][_0x30cdcc]=_0x1532e1['toJSON']();});}),_0x1fbc88;}[_0x4cc768(0x17b)](_0x487028){const _0x3ae720=_0x4cc768;Object['keys'](_0x487028)[_0x3ae720(0x178)](_0x3f3aeb=>{const _0x435980=_0x3ae720,_0x425a7c=_0x487028[_0x3f3aeb];Object[_0x435980(0x18d)](_0x425a7c)[_0x435980(0x178)](_0x155d03=>{const _0x38d24b=_0x435980;this[_0x38d24b(0x1a6)](_0x3f3aeb,_0x155d03)[_0x38d24b(0x17b)](_0x425a7c[_0x155d03]);});});}[_0x4cc768(0x197)](){const _0x3b3565=_0x4cc768;this[_0x3b3565(0x173)][_0x3b3565(0x179)]({'pluginName':W,'businesses':[_0x228f81[_0x3b3565(0x183)]],'toJson':_0x27733d=>this[_0x3b3565(0x1af)](_0x27733d),'parseJson':_0x598f64=>JSON[_0x3b3565(0x182)](_0x598f64),'onLoad':(_0x3f376a,_0x5b1bc9)=>{const _0x480f99=_0x3b3565;this[_0x480f99(0x19c)](_0x3f376a,_0x5b1bc9);},'onUnLoad':_0x2aa47c=>{const _0x2996f4=_0x3b3565,_0x35d9c8=this[_0x2996f4(0x180)][_0x2996f4(0x1a9)](_0x2aa47c);_0x35d9c8&&(_0x35d9c8[_0x2996f4(0x178)](_0x2ed4df=>{const _0xe0c22e=_0x2996f4;_0x2ed4df[_0xe0c22e(0x1b2)]();}),this['_shapeModelManagerMap']['delete'](_0x2aa47c));}});}[_0x4cc768(0x1b2)](){const _0x5217d5=_0x4cc768;this[_0x5217d5(0x180)][_0x5217d5(0x178)](_0x33a67d=>{const _0x421ba1=_0x5217d5;_0x33a67d[_0x421ba1(0x178)](_0x3e1f37=>{_0x3e1f37['dispose']();});});}};i=V([K(0x0,_0x7f9972)],i);const u={'id':_0x4cc768(0x18a),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0x30d073,_0x496539)=>{const _0x32af58=_0x4cc768,{unitId:_0x11c280,subUnitId:_0x373ffd,shapeType:_0x5161fe,shapeId:_0x259828,shapeData:_0x111c94}=_0x496539,_0x5321b6=_0x30d073[_0x32af58(0x1a9)](i)[_0x32af58(0x1a4)](_0x11c280,_0x373ffd,_0x259828);return _0x5321b6&&(_0x5321b6[_0x32af58(0x1a1)](_0x5161fe),_0x111c94&&(_0x5321b6==null||_0x5321b6[_0x32af58(0x176)](_0x111c94))),!0x0;}},pe={'id':'sheet.command.update-shape-type','type':_0x285e23[_0x4cc768(0x19f)],'handler':(_0x152acf,_0xb0b4a2)=>{const _0xc59c3a=_0x4cc768;if(!_0xb0b4a2)return!0x1;const _0x5b0ca6=_0x152acf[_0xc59c3a(0x1a9)](_0x217751),_0x18d76b=_0x152acf[_0xc59c3a(0x1a9)](i),_0x14b2ea=_0x152acf['get'](_0x45cb91),_0x32f0b1=[],_0x55f419=[],{unitId:_0x13aedc,subUnitId:_0x136a87,shapeId:_0xab034f,shapeType:_0x16426a,shapeData:_0x4b0ea1}=_0xb0b4a2,_0x3fd5bd=_0x18d76b['getShapeModel'](_0x13aedc,_0x136a87,_0xab034f);if(_0x3fd5bd){const _0x52b69b=_0x3fd5bd[_0xc59c3a(0x1b4)](),_0x37397f=Object[_0xc59c3a(0x191)]({},_0x3fd5bd['getShapeData']()),_0x5450d0={'unitId':_0x13aedc,'subUnitId':_0x136a87,'shapeId':_0xab034f,'shapeType':_0x16426a,'shapeData':_0x4b0ea1},_0x14a899={'unitId':_0x13aedc,'subUnitId':_0x136a87,'shapeId':_0xab034f,'shapeType':_0x52b69b,'shapeData':_0x37397f};return _0x32f0b1['push']({'id':u['id'],'params':_0x5450d0}),_0x55f419[_0xc59c3a(0x174)]({'id':u['id'],'params':_0x14a899}),_0x32f0b1['every'](_0xa9b125=>_0x5b0ca6[_0xc59c3a(0x186)](_0xa9b125['id'],_0xa9b125['params']))&&_0x14b2ea[_0xc59c3a(0x193)]({'unitID':_0x13aedc,'redoMutations':[..._0x32f0b1],'undoMutations':[..._0x55f419]}),!0x0;}return!0x1;}},Y={'id':_0x4cc768(0x19e),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0x566a3d,_0x17e3f4)=>{const _0x44be04=_0x4cc768,{unitId:_0x1bcbae,subUnitId:_0x10a43e,shapeType:_0x4370ca,shapeId:_0x51398b,shapeData:_0x406148}=_0x17e3f4;return _0x566a3d['get'](i)[_0x44be04(0x1bb)](_0x1bcbae,_0x10a43e,_0x4370ca,_0x51398b,_0x406148),!0x0;}},q={'id':_0x4cc768(0x1bc),'type':_0x285e23['MUTATION'],'handler':(_0x1007a4,_0x364b7a)=>{const _0x185351=_0x4cc768,{unitId:_0x33c977,subUnitId:_0x295138,shapeId:_0x34450f}=_0x364b7a;return _0x1007a4[_0x185351(0x1a9)](i)[_0x185351(0x1ae)](_0x33c977,_0x295138,_0x34450f),!0x0;}},Q={'id':_0x4cc768(0x189),'type':_0x285e23[_0x4cc768(0x1b0)],'handler':(_0xee9301,_0x12766d)=>{const _0x193a4c=_0x4cc768,{unitId:_0x29e808,subUnitId:_0x286936,shapeType:_0x54a1e1,shapeId:_0x41dc4d,shapeData:_0x129309}=_0x12766d,_0x47c707=_0xee9301[_0x193a4c(0x1a9)](i)[_0x193a4c(0x1a4)](_0x29e808,_0x286936,_0x41dc4d);return _0x47c707&&(_0x54a1e1!==void 0x0&&_0x47c707['setShapeType'](_0x54a1e1),_0x129309&&(_0x47c707==null||_0x47c707[_0x193a4c(0x176)](_0x129309,!0x0))),!0x0;}},X=_0x4cc768(0x194),m={};function _0x1d7e(_0x2c3938,_0x39cd34){_0x2c3938=_0x2c3938-0x16d;const _0x221c11=_0x221c();let _0x1d7eb2=_0x221c11[_0x2c3938];return _0x1d7eb2;}var Z=Object[_0x4cc768(0x16d)],k=Object['getOwnPropertyDescriptor'],ee=(_0x36b4e5,_0xcc9500,_0x28c414)=>_0xcc9500 in _0x36b4e5?Z(_0x36b4e5,_0xcc9500,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x28c414}):_0x36b4e5[_0xcc9500]=_0x28c414,ae=(_0x20995c,_0x24a57c,_0x1f336a,_0x13a385)=>{const _0x5d3770=_0x4cc768;for(var _0x2590a8=_0x13a385>0x1?void 0x0:_0x13a385?k(_0x24a57c,_0x1f336a):_0x24a57c,_0x93e89e=_0x20995c[_0x5d3770(0x1ac)]-0x1,_0x2a3468;_0x93e89e>=0x0;_0x93e89e--)(_0x2a3468=_0x20995c[_0x93e89e])&&(_0x2590a8=_0x2a3468(_0x2590a8)||_0x2590a8);return _0x2590a8;},g=(_0x3d27c5,_0x4e21ca)=>(_0x14da34,_0x39ef7b)=>_0x4e21ca(_0x14da34,_0x39ef7b,_0x3d27c5),E=(_0x2c9ba2,_0x15d45a,_0x541c70)=>ee(_0x2c9ba2,typeof _0x15d45a!=_0x4cc768(0x1ba)?_0x15d45a+'':_0x15d45a,_0x541c70);const se=_0x4cc768(0x1b3);let S=class extends _0x281049{constructor(_0x590bef=m,_0x5d7173,_0x59da61,_0x212fd5){const _0x5f265e=_0x4cc768;super(),this[_0x5f265e(0x195)]=_0x590bef,this[_0x5f265e(0x19a)]=_0x5d7173,this[_0x5f265e(0x16f)]=_0x59da61,this['_configService']=_0x212fd5;const {..._0x2f18e4}=_0x5f0e29({},m,this['_config']);this[_0x5f265e(0x17e)]['setConfig'](X,_0x2f18e4),this[_0x5f265e(0x18f)]();}[_0x4cc768(0x1aa)](){const _0x4cfae8=_0x4cc768;_0x4e6c8c(this[_0x4cfae8(0x19a)],[]);}[_0x4cc768(0x188)](){const _0x31c578=_0x4cc768,_0x89cd4=this[_0x31c578(0x19a)];[[T],[i]][_0x31c578(0x178)](_0xc060b5=>_0x89cd4['add'](_0xc060b5));}[_0x4cc768(0x18f)](){const _0xcb8660=_0x4cc768;[Y,q,u,Q][_0xcb8660(0x178)](_0x20c2cc=>this[_0xcb8660(0x1b5)](this[_0xcb8660(0x16f)][_0xcb8660(0x17c)](_0x20c2cc)));}};E(S,_0x4cc768(0x177),_0x228f81[_0x4cc768(0x183)]),E(S,_0x4cc768(0x1b9),se),S=ae([_0x4f414d(_0x2ad86e),g(0x1,_0x2ff514(_0x3bc1fa)),g(0x2,_0x217751),g(0x3,_0x472081)],S);export{Y as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,i as SheetsShapeServices,S as UniverSheetsShapePlugin,Q as UpdateSheetsShapeDataMutation,pe as UpdateSheetsShapeTypeCommand,u as UpdateSheetsShapeTypeMutation};
|
|
1
|
+
const _0x43a6f2=_0x421c;(function(_0x4ae34e,_0x1c02ae){const _0x41a7b7=_0x421c,_0x558949=_0x4ae34e();while(!![]){try{const _0x1c8c37=-parseInt(_0x41a7b7(0xad))/0x1*(-parseInt(_0x41a7b7(0xe8))/0x2)+parseInt(_0x41a7b7(0xcb))/0x3+-parseInt(_0x41a7b7(0xe2))/0x4*(parseInt(_0x41a7b7(0xb8))/0x5)+-parseInt(_0x41a7b7(0xd5))/0x6*(parseInt(_0x41a7b7(0xd1))/0x7)+-parseInt(_0x41a7b7(0xe7))/0x8+-parseInt(_0x41a7b7(0xb4))/0x9+parseInt(_0x41a7b7(0xae))/0xa*(parseInt(_0x41a7b7(0xce))/0xb);if(_0x1c8c37===_0x1c02ae)break;else _0x558949['push'](_0x558949['shift']());}catch(_0x4b7533){_0x558949['push'](_0x558949['shift']());}}}(_0x14cf,0x6fa18));var R=Object[_0x43a6f2(0xc1)],C=(_0x2a89db,_0x2f5e71,_0x5c03fc)=>_0x2f5e71 in _0x2a89db?R(_0x2a89db,_0x2f5e71,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5c03fc}):_0x2a89db[_0x2f5e71]=_0x5c03fc,d=(_0x773689,_0x392702,_0x100533)=>C(_0x773689,typeof _0x392702!=_0x43a6f2(0xbe)?_0x392702+'':_0x392702,_0x100533);import{Disposable as _0x4b7b4d,UniverInstanceType as _0x26dd27,IResourceManagerService as _0x203dfb,CommandType as _0x49e1d5,ICommandService as _0x65add9,IUndoRedoService as _0x5b7d85,DependentOn as _0x26fc7e,Inject as _0x196b66,Injector as _0xf77523,Plugin as _0x4cf84e,merge as _0x41e183,touchDependencies as _0x55073d,IConfigService as _0x3ebb98}from'@univerjs/core';import{ShapeModel as _0x464ca3,isConnectorShape as _0x453e60}from'@univerjs-pro/engine-shape';import{UniverLicensePlugin as _0x69e81b}from'@univerjs-pro/license';class T extends _0x4b7b4d{constructor(){const _0x5d5555=_0x43a6f2;super(),d(this,_0x5d5555(0xcd),new Map()),d(this,_0x5d5555(0xc4),new Set()),d(this,_0x5d5555(0xee),new Set());}[_0x43a6f2(0xcf)](_0x1d8001,_0x585ac6,_0x5cd8ef){const _0x59b7f3=_0x43a6f2,_0x59ab0a=new _0x464ca3(_0x1d8001,_0x585ac6,_0x5cd8ef);return this[_0x59b7f3(0xcd)][_0x59b7f3(0xb1)](_0x585ac6,_0x59ab0a),_0x453e60(_0x1d8001)&&this[_0x59b7f3(0xc4)]['add'](_0x585ac6),_0x59ab0a;}[_0x43a6f2(0xeb)](_0x2d8661){const _0x7b6934=_0x43a6f2;var _0x20a8a2,_0x1aad62;const _0x1b559b=[];for(const _0x924f74 of this['_linesIds']){const _0x39eecb=this[_0x7b6934(0xcd)][_0x7b6934(0xda)](_0x924f74);if(_0x39eecb){const _0x35314d=_0x39eecb['getShapeRelation']();_0x35314d&&(((_0x20a8a2=_0x35314d[_0x7b6934(0xa9)])==null?void 0x0:_0x20a8a2[_0x7b6934(0xa7)])===_0x2d8661&&_0x1b559b['push']({..._0x35314d['from'],'lineShapeId':_0x924f74,'isFrom':!0x0}),((_0x1aad62=_0x35314d['to'])==null?void 0x0:_0x1aad62[_0x7b6934(0xa7)])===_0x2d8661&&_0x1b559b[_0x7b6934(0xef)]({..._0x35314d['to'],'lineShapeId':_0x924f74,'isFrom':!0x1}));}}return _0x1b559b;}[_0x43a6f2(0xf0)](_0x11c47f){const _0x5a6db0=_0x43a6f2,_0x13675b=this['_shapes']['get'](_0x11c47f);if(_0x13675b)return _0x13675b[_0x5a6db0(0xa8)]();}[_0x43a6f2(0xb3)](_0x5861e9){const _0x398238=_0x43a6f2,_0x3163ba=this[_0x398238(0xcd)]['get'](_0x5861e9);if(_0x3163ba)return _0x3163ba[_0x398238(0xb3)]();}[_0x43a6f2(0xe1)](_0x2ece54){const _0x51297a=_0x43a6f2;return this[_0x51297a(0xcd)]['has'](_0x2ece54);}[_0x43a6f2(0xd2)](_0x354e4b){const _0x5b7a7f=_0x43a6f2,_0x3ccd33=this['_shapes'][_0x5b7a7f(0xda)](_0x354e4b);_0x3ccd33&&(_0x453e60(_0x3ccd33[_0x5b7a7f(0xb3)]())&&this[_0x5b7a7f(0xc4)]['delete'](_0x354e4b),this[_0x5b7a7f(0xcd)][_0x5b7a7f(0xaf)](_0x354e4b));}[_0x43a6f2(0xb2)](){const _0x45916a=_0x43a6f2,_0x3ac80e=[];return this[_0x45916a(0xcd)][_0x45916a(0xba)](_0x406120=>{const _0x43546e=_0x45916a;_0x3ac80e[_0x43546e(0xef)](_0x406120[_0x43546e(0xb2)]());}),_0x3ac80e;}['fromJSON'](_0x38bb4d){const _0x46147a=_0x43a6f2;for(const _0x2ee55b of _0x38bb4d){const {id:_0x1ce412,shapeType:_0x135f41}=_0x2ee55b,_0x22130f=this[_0x46147a(0xcf)](_0x135f41,_0x1ce412,_0x2ee55b[_0x46147a(0xc3)]);_0x22130f&&_0x22130f[_0x46147a(0xea)]()&&this['_linesIds'][_0x46147a(0xd0)](_0x1ce412);}}[_0x43a6f2(0xc6)](){const _0x559412=_0x43a6f2;this[_0x559412(0xa6)]||(this[_0x559412(0xcd)]['forEach'](_0x55948f=>{const _0xa1cd4f=_0x559412;_0x55948f[_0xa1cd4f(0xc6)]();}),this[_0x559412(0xcd)]['clear'](),this['_linesIds']['clear'](),this[_0x559412(0xee)][_0x559412(0xe6)](),super['dispose']());}}var $=Object[_0x43a6f2(0xd7)],V=(_0x3b2d48,_0x1101da,_0x5b1927,_0x1be1e5)=>{const _0x3d0f82=_0x43a6f2;for(var _0x1f1281=_0x1be1e5>0x1?void 0x0:_0x1be1e5?$(_0x1101da,_0x5b1927):_0x1101da,_0x44a118=_0x3b2d48[_0x3d0f82(0xe5)]-0x1,_0x4f530c;_0x44a118>=0x0;_0x44a118--)(_0x4f530c=_0x3b2d48[_0x44a118])&&(_0x1f1281=_0x4f530c(_0x1f1281)||_0x1f1281);return _0x1f1281;},K=(_0x207a13,_0x6bb06a)=>(_0x4a4fd4,_0x59fcd4)=>_0x6bb06a(_0x4a4fd4,_0x59fcd4,_0x207a13);const W=_0x43a6f2(0xd3);let i=class extends _0x4b7b4d{constructor(_0x4a443f){const _0x40c745=_0x43a6f2;super(),d(this,_0x40c745(0xd8),new Map()),(this['_resourcesManagerService']=_0x4a443f,this[_0x40c745(0xd6)]());}[_0x43a6f2(0xe9)](_0x43f03d,_0x16e722){const _0x1609b0=_0x43a6f2;let _0xb0cb56=this['_shapeModelManagerMap'][_0x1609b0(0xda)](_0x43f03d);_0xb0cb56||(_0xb0cb56=new Map(),this[_0x1609b0(0xd8)][_0x1609b0(0xb1)](_0x43f03d,_0xb0cb56));let _0x4fa5c6=_0xb0cb56[_0x1609b0(0xda)](_0x16e722);return _0x4fa5c6||(_0x4fa5c6=new T(),_0xb0cb56[_0x1609b0(0xb1)](_0x16e722,_0x4fa5c6)),_0x4fa5c6;}[_0x43a6f2(0xc5)](_0x2b128a,_0x4653c0,_0x497e8a,_0x1dfecd,_0x210f56){const _0x398954=_0x43a6f2;this[_0x398954(0xe9)](_0x2b128a,_0x4653c0)[_0x398954(0xcf)](_0x497e8a,_0x1dfecd,_0x210f56);}['removeShape'](_0x54b567,_0x49279d,_0x22a61c){const _0x135d2a=_0x43a6f2;this[_0x135d2a(0xe9)](_0x54b567,_0x49279d)[_0x135d2a(0xd2)](_0x22a61c);}['getBasicShapeType'](_0x893c94,_0x263843,_0xffdcb6){const _0x4917b3=_0x43a6f2;return this[_0x4917b3(0xe9)](_0x893c94,_0x263843)[_0x4917b3(0xb3)](_0xffdcb6);}[_0x43a6f2(0xb3)](_0xd9a4f8,_0x41b910,_0x39d752){const _0x329ee1=_0x43a6f2;return this[_0x329ee1(0xe9)](_0xd9a4f8,_0x41b910)[_0x329ee1(0xb3)](_0x39d752);}['hasShape'](_0x56e5f0,_0x9d8c59,_0x1922d8){const _0x28d24c=_0x43a6f2;return this[_0x28d24c(0xe9)](_0x56e5f0,_0x9d8c59)[_0x28d24c(0xe1)](_0x1922d8);}['getShapeTypeById'](_0x4432c7,_0x5b2696,_0x36ef67){const _0x4cbacb=_0x43a6f2;return this[_0x4cbacb(0xe9)](_0x4432c7,_0x5b2696)['getShapeType'](_0x36ef67);}[_0x43a6f2(0xb0)](_0x32113a,_0x438962,_0x369f02){const _0x132b5e=_0x43a6f2,_0x40847f=this['_ensureShapeModelManager'](_0x32113a,_0x438962);if(!_0x40847f['getShapeType'](_0x369f02))return;const _0x48abf7=_0x40847f[_0x132b5e(0xcd)][_0x132b5e(0xda)](_0x369f02);if(_0x48abf7)return _0x48abf7[_0x132b5e(0xdc)]();}[_0x43a6f2(0xdb)](_0x3647b6,_0x13751a,_0x3afdb2){const _0x27ec61=_0x43a6f2;return this[_0x27ec61(0xe9)](_0x3647b6,_0x13751a)[_0x27ec61(0xcd)][_0x27ec61(0xda)](_0x3afdb2);}['getBasicShapeRelation'](_0x275f85,_0x13ee72,_0x155922){const _0x199e96=_0x43a6f2;return this[_0x199e96(0xe9)](_0x275f85,_0x13ee72)['getBasicShapeRelation'](_0x155922);}['getLineShapeRelation'](_0x1b10a3,_0x42d94d,_0x487c92){const _0x2b11cc=_0x43a6f2,_0x596b76=this['_ensureShapeModelManager'](_0x1b10a3,_0x42d94d)[_0x2b11cc(0xcd)][_0x2b11cc(0xda)](_0x487c92);if(_0x596b76)return _0x596b76[_0x2b11cc(0xa8)]();}[_0x43a6f2(0xdd)](){}[_0x43a6f2(0xbf)](_0x4e4052){const _0x560e86=_0x43a6f2,_0x582638={},_0x5db59c=this['_shapeModelManagerMap'][_0x560e86(0xda)](_0x4e4052);return _0x5db59c&&_0x5db59c['forEach']((_0x37e9aa,_0x4d0e4d)=>{const _0x149ea6=_0x560e86,_0x2bbf6a=_0x37e9aa[_0x149ea6(0xb2)]();_0x2bbf6a['length']>0x0&&(_0x582638[_0x4d0e4d]=_0x2bbf6a);}),JSON[_0x560e86(0xcc)](_0x582638);}['_deserializeShapeForUnit'](_0x14c70f,_0x46bc8f){const _0x57d86a=_0x43a6f2;Object[_0x57d86a(0xed)](_0x46bc8f)['forEach'](_0x29888d=>{this['_ensureShapeModelManager'](_0x14c70f,_0x29888d)['fromJSON'](_0x46bc8f[_0x29888d]);});}[_0x43a6f2(0xb2)](){const _0x5df47c=_0x43a6f2,_0x1090fa={};return this[_0x5df47c(0xd8)][_0x5df47c(0xba)]((_0x40dff7,_0x11b75)=>{const _0x130317=_0x5df47c;_0x1090fa[_0x11b75]={},_0x40dff7[_0x130317(0xba)]((_0x2b7ae2,_0x431f19)=>{_0x1090fa[_0x11b75][_0x431f19]=_0x2b7ae2['toJSON']();});}),_0x1090fa;}[_0x43a6f2(0xec)](_0xe73ca6){const _0x406ac0=_0x43a6f2;Object[_0x406ac0(0xed)](_0xe73ca6)[_0x406ac0(0xba)](_0x5defbc=>{const _0x552c11=_0x406ac0,_0x31ffc2=_0xe73ca6[_0x5defbc];Object[_0x552c11(0xed)](_0x31ffc2)['forEach'](_0x37a41c=>{const _0x412e5f=_0x552c11;this[_0x412e5f(0xe9)](_0x5defbc,_0x37a41c)['fromJSON'](_0x31ffc2[_0x37a41c]);});});}[_0x43a6f2(0xd6)](){const _0x3f1f4c=_0x43a6f2;this['_resourcesManagerService']['registerPluginResource']({'pluginName':W,'businesses':[_0x26dd27[_0x3f1f4c(0xa5)]],'toJson':_0x135b0f=>this[_0x3f1f4c(0xbf)](_0x135b0f),'parseJson':_0x77431a=>JSON[_0x3f1f4c(0xaa)](_0x77431a),'onLoad':(_0x1fb15d,_0x46aa18)=>{const _0x397169=_0x3f1f4c;this[_0x397169(0xb9)](_0x1fb15d,_0x46aa18);},'onUnLoad':_0x2bc5be=>{const _0x24ccb1=_0x3f1f4c,_0x14c061=this['_shapeModelManagerMap'][_0x24ccb1(0xda)](_0x2bc5be);_0x14c061&&(_0x14c061[_0x24ccb1(0xba)](_0x3ff9d5=>{_0x3ff9d5['dispose']();}),this[_0x24ccb1(0xd8)][_0x24ccb1(0xaf)](_0x2bc5be));}});}['dispose'](){const _0x2a4526=_0x43a6f2;this[_0x2a4526(0xd8)][_0x2a4526(0xba)](_0xeff72e=>{_0xeff72e['forEach'](_0x12e8e4=>{const _0x1058a5=_0x421c;_0x12e8e4[_0x1058a5(0xc6)]();});});}};i=V([K(0x0,_0x203dfb)],i);const u={'id':'sheet.mutation.update-shape-type','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x3c19d7,_0x188894)=>{const _0x21d03a=_0x43a6f2,{unitId:_0x1aebf1,subUnitId:_0x314803,shapeType:_0x4faacd,shapeId:_0x27bb28,shapeData:_0x5c4ca8}=_0x188894,_0x28c798=_0x3c19d7[_0x21d03a(0xda)](i)[_0x21d03a(0xdb)](_0x1aebf1,_0x314803,_0x27bb28);return _0x28c798&&(_0x28c798[_0x21d03a(0xdd)](_0x4faacd),_0x5c4ca8&&(_0x28c798==null||_0x28c798[_0x21d03a(0xde)](_0x5c4ca8))),!0x0;}},pe={'id':_0x43a6f2(0xc8),'type':_0x49e1d5[_0x43a6f2(0xbc)],'handler':(_0x4218ee,_0x3c223c)=>{const _0x3a5281=_0x43a6f2;if(!_0x3c223c)return!0x1;const _0x26fc2c=_0x4218ee[_0x3a5281(0xda)](_0x65add9),_0x589419=_0x4218ee['get'](i),_0x314748=_0x4218ee[_0x3a5281(0xda)](_0x5b7d85),_0x9e32be=[],_0x267a0f=[],{unitId:_0x24bfe6,subUnitId:_0xb884d7,shapeId:_0x3dcefa,shapeType:_0x21f3c0,shapeData:_0x47d470}=_0x3c223c,_0x5b8c68=_0x589419[_0x3a5281(0xdb)](_0x24bfe6,_0xb884d7,_0x3dcefa);if(_0x5b8c68){const _0x23fb57=_0x5b8c68[_0x3a5281(0xb3)](),_0x4ca1cc=Object[_0x3a5281(0xc2)]({},_0x5b8c68[_0x3a5281(0xdc)]()),_0x577a72={'unitId':_0x24bfe6,'subUnitId':_0xb884d7,'shapeId':_0x3dcefa,'shapeType':_0x21f3c0,'shapeData':_0x47d470},_0x341c1d={'unitId':_0x24bfe6,'subUnitId':_0xb884d7,'shapeId':_0x3dcefa,'shapeType':_0x23fb57,'shapeData':_0x4ca1cc};return _0x9e32be[_0x3a5281(0xef)]({'id':u['id'],'params':_0x577a72}),_0x267a0f[_0x3a5281(0xef)]({'id':u['id'],'params':_0x341c1d}),_0x9e32be[_0x3a5281(0xb7)](_0x437d3c=>_0x26fc2c[_0x3a5281(0xab)](_0x437d3c['id'],_0x437d3c[_0x3a5281(0xe0)]))&&_0x314748[_0x3a5281(0xac)]({'unitID':_0x24bfe6,'redoMutations':[..._0x9e32be],'undoMutations':[..._0x267a0f]}),!0x0;}return!0x1;}},Y={'id':_0x43a6f2(0xdf),'type':_0x49e1d5['MUTATION'],'handler':(_0x4ab54f,_0x35dfd5)=>{const _0x460ef1=_0x43a6f2,{unitId:_0x139b7e,subUnitId:_0x3e2378,shapeType:_0x5b3de1,shapeId:_0x3167f4,shapeData:_0x2f1bf2}=_0x35dfd5;return _0x4ab54f['get'](i)[_0x460ef1(0xc5)](_0x139b7e,_0x3e2378,_0x5b3de1,_0x3167f4,_0x2f1bf2),!0x0;}},q={'id':'sheet.mutation.remove-shape','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x1fad37,_0x44fc02)=>{const _0x55e4d6=_0x43a6f2,{unitId:_0x1d4c3,subUnitId:_0x3ce7d5,shapeId:_0x159aa5}=_0x44fc02;return _0x1fad37[_0x55e4d6(0xda)](i)['removeShape'](_0x1d4c3,_0x3ce7d5,_0x159aa5),!0x0;}},Q={'id':'sheet.mutation.update-shape-data','type':_0x49e1d5[_0x43a6f2(0xc0)],'handler':(_0x38d43d,_0x37d0af)=>{const _0x59c3d6=_0x43a6f2,{unitId:_0x3ba78e,subUnitId:_0x44b7ca,shapeType:_0x546535,shapeId:_0x383919,shapeData:_0x2a1b11}=_0x37d0af,_0x307f12=_0x38d43d[_0x59c3d6(0xda)](i)[_0x59c3d6(0xdb)](_0x3ba78e,_0x44b7ca,_0x383919);return _0x307f12&&(_0x546535!==void 0x0&&_0x307f12['setShapeType'](_0x546535),_0x2a1b11&&(_0x307f12==null||_0x307f12[_0x59c3d6(0xde)](_0x2a1b11,!0x0))),!0x0;}},X='sheets-shape.config',m={};function _0x421c(_0x19686e,_0x50be41){_0x19686e=_0x19686e-0xa5;const _0x14cf33=_0x14cf();let _0x421cda=_0x14cf33[_0x19686e];return _0x421cda;}var Z=Object[_0x43a6f2(0xc1)],k=Object[_0x43a6f2(0xd7)],ee=(_0x557a80,_0x3186c4,_0x80e7d7)=>_0x3186c4 in _0x557a80?Z(_0x557a80,_0x3186c4,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x80e7d7}):_0x557a80[_0x3186c4]=_0x80e7d7,ae=(_0x2e843e,_0xcef521,_0x311b8d,_0x344f1b)=>{const _0xc92546=_0x43a6f2;for(var _0x1333be=_0x344f1b>0x1?void 0x0:_0x344f1b?k(_0xcef521,_0x311b8d):_0xcef521,_0x383bb6=_0x2e843e[_0xc92546(0xe5)]-0x1,_0x2e3302;_0x383bb6>=0x0;_0x383bb6--)(_0x2e3302=_0x2e843e[_0x383bb6])&&(_0x1333be=_0x2e3302(_0x1333be)||_0x1333be);return _0x1333be;},g=(_0x3ff799,_0x69fafd)=>(_0x33eb9d,_0x3d7711)=>_0x69fafd(_0x33eb9d,_0x3d7711,_0x3ff799),E=(_0xa345fc,_0x3bcc12,_0x239c62)=>ee(_0xa345fc,typeof _0x3bcc12!=_0x43a6f2(0xbe)?_0x3bcc12+'':_0x3bcc12,_0x239c62);const se=_0x43a6f2(0xd3);let S=class extends _0x4cf84e{constructor(_0x143000=m,_0x114294,_0x1f05f3,_0xbfa95){const _0x4d0c73=_0x43a6f2;super(),this['_config']=_0x143000,this['_injector']=_0x114294,this[_0x4d0c73(0xe4)]=_0x1f05f3,this['_configService']=_0xbfa95;const {..._0x5ad44a}=_0x41e183({},m,this[_0x4d0c73(0xb5)]);this[_0x4d0c73(0xd9)]['setConfig'](X,_0x5ad44a),this['_initCommands']();}[_0x43a6f2(0xe3)](){const _0x3450ef=_0x43a6f2;_0x55073d(this[_0x3450ef(0xd4)],[]);}[_0x43a6f2(0xbb)](){const _0x3232fa=_0x43a6f2,_0x590c89=this['_injector'];[[T],[i]]['forEach'](_0x339708=>_0x590c89[_0x3232fa(0xd0)](_0x339708));}[_0x43a6f2(0xc7)](){const _0x1f01d8=_0x43a6f2;[Y,q,u,Q][_0x1f01d8(0xba)](_0x516021=>this[_0x1f01d8(0xb6)](this[_0x1f01d8(0xe4)][_0x1f01d8(0xc9)](_0x516021)));}};E(S,_0x43a6f2(0xbd),_0x26dd27['UNIVER_SHEET']),E(S,_0x43a6f2(0xca),se),S=ae([_0x26fc7e(_0x69e81b),g(0x1,_0x196b66(_0xf77523)),g(0x2,_0x65add9),g(0x3,_0x3ebb98)],S);export{Y as InsertSheetsShapeMutation,q as RemoveSheetsShapeMutation,i as SheetsShapeService,S as UniverSheetsShapePlugin,Q as UpdateSheetsShapeDataMutation,pe as UpdateSheetsShapeTypeCommand,u as UpdateSheetsShapeTypeMutation};function _0x14cf(){const _0x595cf1=['443315WIlOiN','_deserializeShapeForUnit','forEach','onStarting','COMMAND','type','symbol','_serializeShapeForUnit','MUTATION','defineProperty','assign','shapeData','_linesIds','insertShape','dispose','_initCommands','sheet.command.update-shape-type','registerCommand','pluginName','1137750odJFmU','stringify','_shapes','587103MiAzZu','addShape','add','35enerlF','removeShape','SHEET_SHAPE_PLUGIN','_injector','764670GPObEp','_initSnapshot','getOwnPropertyDescriptor','_shapeModelManagerMap','_configService','get','getShapeModel','getShapeData','setShapeType','setShapeData','sheet.mutation.insert-shape','params','hasShape','24jiSMvf','onRendered','_commandService','length','clear','2161632OlRLlr','2gZirpw','_ensureShapeModelManager','isLineShape','getBasicShapeRelation','fromJSON','keys','_groupIds','push','getLineShapeRelation','UNIVER_SHEET','_disposed','shapeId','getShapeRelation','from','parse','syncExecuteCommand','pushUndoRedo','412073ynxJIB','260jWTktA','delete','getShapeDataById','set','toJSON','getShapeType','2541366zkoWRC','_config','disposeWithMe','every'];_0x14cf=function(){return _0x595cf1;};return _0x14cf();}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -9,4 +9,4 @@ export type { IUpdateSheetsShapeDataMutationParams } from './commands/mutation/u
|
|
|
9
9
|
export { UpdateSheetsShapeTypeMutation } from './commands/mutation/update-shape-type.mutation';
|
|
10
10
|
export type { IUpdateSheetsShapeTypeMutationParams } from './commands/mutation/update-shape-type.mutation';
|
|
11
11
|
export { UniverSheetsShapePlugin } from './plugin';
|
|
12
|
-
export {
|
|
12
|
+
export { SheetsShapeService } from './services/sheet-shape-services';
|
|
@@ -4,7 +4,7 @@ export interface ISheetsShapeResource {
|
|
|
4
4
|
[subUnitId: string]: IShapeJSONData[];
|
|
5
5
|
}
|
|
6
6
|
export declare const SHEET_SHAPE_PLUGIN = "SHEET_SHAPE_PLUGIN";
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class SheetsShapeService extends Disposable {
|
|
8
8
|
private readonly _resourcesManagerService;
|
|
9
9
|
private _shapeModelManagerMap;
|
|
10
10
|
constructor(_resourcesManagerService: IResourceManagerService);
|
package/lib/umd/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function _0x2b90(){const _0x1fae71=['getShapeModel','UniverSheetsShapePlugin','_config','_groupIds','pushUndoRedo','_initCommands','every','registerCommand','Disposable','InsertSheetsShapeMutation','getOwnPropertyDescriptor','@univerjs-pro/engine-shape','getBasicShapeRelation','IResourceManagerService','ShapeModel','MUTATION','params','1070694DygPCo','getShapeType','UniverInstanceType','getLineShapeRelation','525778OUrfdr','amd','shapeId','COMMAND','symbol','keys','1493359eiitwt','get','removeShape','has','pluginName','exports','36863210ZEXiBu','setShapeType','2338377eBAGHW','CommandType','setConfig','UniverProEngineShape','sheets-shape.config','from','sheet.mutation.update-shape-data','UniverCore','_shapes','clear','insertShape','touchDependencies','4swfWdH','SHEET_SHAPE_PLUGIN','forEach','parse','dispose','Injector','UniverLicensePlugin','18EliZmy','1779456opGISe','onStarting','UniverProSheetsShape','push','defineProperty','set','Module','toJSON','shapeData','_initSnapshot','getShapeDataById','isLineShape','UpdateSheetsShapeTypeCommand','SheetsShapeServices','toStringTag','UpdateSheetsShapeDataMutation','getShapeRelation','fromJSON','DependentOn','function','@univerjs/core','onRendered','_configService','1978700BAuonJ','hasShape','sheet.mutation.remove-shape','object','_shapeModelManagerMap','Inject','_deserializeShapeForUnit','7MFORQO','_disposed','_linesIds','isConnectorShape','length','ICommandService','_serializeShapeForUnit','getBasicShapeType','add','sheet.mutation.insert-shape','_ensureShapeModelManager','syncExecuteCommand','delete','_commandService','sheet.command.update-shape-type','_injector','merge','addShape'];_0x2b90=function(){return _0x1fae71;};return _0x2b90();}function _0xc1bf(_0x375b80,_0xf2a48c){_0x375b80=_0x375b80-0x1ed;const _0x2b9071=_0x2b90();let _0xc1bf3c=_0x2b9071[_0x375b80];return _0xc1bf3c;}(function(_0xc25661,_0x1fd32e){const _0x52e2a0=_0xc1bf,_0xe04bf7=_0xc25661();while(!![]){try{const _0x40727f=parseInt(_0x52e2a0(0x1ee))/0x1*(-parseInt(_0x52e2a0(0x215))/0x2)+parseInt(_0x52e2a0(0x223))/0x3*(-parseInt(_0x52e2a0(0x22f))/0x4)+parseInt(_0x52e2a0(0x24e))/0x5+-parseInt(_0x52e2a0(0x236))/0x6*(parseInt(_0x52e2a0(0x21b))/0x7)+parseInt(_0x52e2a0(0x237))/0x8+-parseInt(_0x52e2a0(0x211))/0x9+parseInt(_0x52e2a0(0x221))/0xa;if(_0x40727f===_0x1fd32e)break;else _0xe04bf7['push'](_0xe04bf7['shift']());}catch(_0x451053){_0xe04bf7['push'](_0xe04bf7['shift']());}}}(_0x2b90,0xe208a),function(_0x2ef0bc,_0x3cdbff){const _0x5e3030=_0xc1bf;typeof exports==_0x5e3030(0x251)&&typeof module<'u'?_0x3cdbff(exports,require('@univerjs/core'),require('@univerjs-pro/engine-shape'),require('@univerjs-pro/license')):typeof define==_0x5e3030(0x24a)&&define[_0x5e3030(0x216)]?define([_0x5e3030(0x220),_0x5e3030(0x24b),_0x5e3030(0x20b),'@univerjs-pro/license'],_0x3cdbff):(_0x2ef0bc=typeof globalThis<'u'?globalThis:_0x2ef0bc||self,_0x3cdbff(_0x2ef0bc[_0x5e3030(0x239)]={},_0x2ef0bc[_0x5e3030(0x22a)],_0x2ef0bc[_0x5e3030(0x226)],_0x2ef0bc['UniverProLicense']));}(this,function(_0x4e48d6,_0x14ac5a,_0x1920cc,_0x10fbca){'use strict';const _0x3c759a=_0xc1bf;var _0x378cfd=Object[_0x3c759a(0x23b)],_0x4d6daf=(_0x1c2040,_0x20ab99,_0x5f9e70)=>_0x20ab99 in _0x1c2040?_0x378cfd(_0x1c2040,_0x20ab99,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x5f9e70}):_0x1c2040[_0x20ab99]=_0x5f9e70,_0x3efbfa=(_0x5d34c1,_0x369780,_0x19b735)=>_0x4d6daf(_0x5d34c1,typeof _0x369780!='symbol'?_0x369780+'':_0x369780,_0x19b735);class _0x57d9e8 extends _0x14ac5a[_0x3c759a(0x208)]{constructor(){const _0x2e91d3=_0x3c759a;super(),_0x3efbfa(this,'_shapes',new Map()),_0x3efbfa(this,_0x2e91d3(0x1f0),new Set()),_0x3efbfa(this,_0x2e91d3(0x203),new Set());}[_0x3c759a(0x1ff)](_0x40cdf6,_0x2c1ef8,_0x207ce9){const _0x3a6335=_0x3c759a,_0x55f037=new _0x1920cc[(_0x3a6335(0x20e))](_0x40cdf6,_0x2c1ef8,_0x207ce9);return this[_0x3a6335(0x22b)][_0x3a6335(0x23c)](_0x2c1ef8,_0x55f037),_0x1920cc[_0x3a6335(0x1f1)](_0x40cdf6)&&this['_linesIds'][_0x3a6335(0x1f6)](_0x2c1ef8),_0x55f037;}[_0x3c759a(0x20c)](_0x12157a){const _0x5938a9=_0x3c759a;var _0x2854f8,_0xf5104b;const _0xba4f5d=[];for(const _0x2a9a21 of this[_0x5938a9(0x1f0)]){const _0x5c634f=this[_0x5938a9(0x22b)]['get'](_0x2a9a21);if(_0x5c634f){const _0x33f6b6=_0x5c634f[_0x5938a9(0x247)]();_0x33f6b6&&(((_0x2854f8=_0x33f6b6['from'])==null?void 0x0:_0x2854f8[_0x5938a9(0x217)])===_0x12157a&&_0xba4f5d[_0x5938a9(0x23a)]({..._0x33f6b6[_0x5938a9(0x228)],'lineShapeId':_0x2a9a21,'isFrom':!0x0}),((_0xf5104b=_0x33f6b6['to'])==null?void 0x0:_0xf5104b[_0x5938a9(0x217)])===_0x12157a&&_0xba4f5d[_0x5938a9(0x23a)]({..._0x33f6b6['to'],'lineShapeId':_0x2a9a21,'isFrom':!0x1}));}}return _0xba4f5d;}[_0x3c759a(0x214)](_0x5c01fa){const _0x10d71d=_0x3c759a,_0x48cf42=this[_0x10d71d(0x22b)]['get'](_0x5c01fa);if(_0x48cf42)return _0x48cf42[_0x10d71d(0x247)]();}[_0x3c759a(0x212)](_0x10af29){const _0x27fb11=_0x3c759a,_0x1605f9=this[_0x27fb11(0x22b)][_0x27fb11(0x21c)](_0x10af29);if(_0x1605f9)return _0x1605f9['getShapeType']();}[_0x3c759a(0x24f)](_0x1e0f58){const _0x2d97e3=_0x3c759a;return this['_shapes'][_0x2d97e3(0x21e)](_0x1e0f58);}[_0x3c759a(0x21d)](_0x22951f){const _0x4ef712=_0x3c759a,_0x34c79c=this[_0x4ef712(0x22b)][_0x4ef712(0x21c)](_0x22951f);_0x34c79c&&(_0x1920cc[_0x4ef712(0x1f1)](_0x34c79c[_0x4ef712(0x212)]())&&this[_0x4ef712(0x1f0)]['delete'](_0x22951f),this[_0x4ef712(0x22b)][_0x4ef712(0x1fa)](_0x22951f));}['toJSON'](){const _0x15701c=_0x3c759a,_0x5991c6=[];return this[_0x15701c(0x22b)]['forEach'](_0x6eef66=>{const _0x1272af=_0x15701c;_0x5991c6[_0x1272af(0x23a)](_0x6eef66[_0x1272af(0x23e)]());}),_0x5991c6;}[_0x3c759a(0x248)](_0x705542){const _0x4d9b1e=_0x3c759a;for(const _0x396f80 of _0x705542){const {id:_0x1c5c37,shapeType:_0x1c0288}=_0x396f80,_0xf8d08b=this[_0x4d9b1e(0x1ff)](_0x1c0288,_0x1c5c37,_0x396f80[_0x4d9b1e(0x23f)]);_0xf8d08b&&_0xf8d08b[_0x4d9b1e(0x242)]()&&this[_0x4d9b1e(0x1f0)][_0x4d9b1e(0x1f6)](_0x1c5c37);}}[_0x3c759a(0x233)](){const _0x5a7a43=_0x3c759a;this[_0x5a7a43(0x1ef)]||(this[_0x5a7a43(0x22b)][_0x5a7a43(0x231)](_0x58936d=>{const _0x461d99=_0x5a7a43;_0x58936d[_0x461d99(0x233)]();}),this[_0x5a7a43(0x22b)][_0x5a7a43(0x22c)](),this['_linesIds'][_0x5a7a43(0x22c)](),this['_groupIds'][_0x5a7a43(0x22c)](),super['dispose']());}}var _0x59149c=Object[_0x3c759a(0x20a)],_0x2970af=(_0x27f064,_0x3641e9,_0x52056c,_0x2d9f61)=>{const _0x2bf481=_0x3c759a;for(var _0x1133b7=_0x2d9f61>0x1?void 0x0:_0x2d9f61?_0x59149c(_0x3641e9,_0x52056c):_0x3641e9,_0x2dd750=_0x27f064[_0x2bf481(0x1f2)]-0x1,_0x583f92;_0x2dd750>=0x0;_0x2dd750--)(_0x583f92=_0x27f064[_0x2dd750])&&(_0x1133b7=_0x583f92(_0x1133b7)||_0x1133b7);return _0x1133b7;},_0x54000f=(_0x38400b,_0x29b314)=>(_0x4177bf,_0x150615)=>_0x29b314(_0x4177bf,_0x150615,_0x38400b);const _0x2e5b25='SHEET_SHAPE_PLUGIN';_0x4e48d6['SheetsShapeServices']=class extends _0x14ac5a[_0x3c759a(0x208)]{constructor(_0x300108){const _0x32a7ef=_0x3c759a;super(),_0x3efbfa(this,_0x32a7ef(0x252),new Map()),(this['_resourcesManagerService']=_0x300108,this['_initSnapshot']());}[_0x3c759a(0x1f8)](_0xfa771f,_0x3bf64c){const _0x4d59de=_0x3c759a;let _0x5a4a92=this[_0x4d59de(0x252)]['get'](_0xfa771f);_0x5a4a92||(_0x5a4a92=new Map(),this[_0x4d59de(0x252)][_0x4d59de(0x23c)](_0xfa771f,_0x5a4a92));let _0xb92d7c=_0x5a4a92[_0x4d59de(0x21c)](_0x3bf64c);return _0xb92d7c||(_0xb92d7c=new _0x57d9e8(),_0x5a4a92[_0x4d59de(0x23c)](_0x3bf64c,_0xb92d7c)),_0xb92d7c;}[_0x3c759a(0x22d)](_0x10714a,_0x47f02d,_0x3d1e6e,_0x12e586,_0x4d5b8d){const _0x22b86d=_0x3c759a;this[_0x22b86d(0x1f8)](_0x10714a,_0x47f02d)[_0x22b86d(0x1ff)](_0x3d1e6e,_0x12e586,_0x4d5b8d);}[_0x3c759a(0x21d)](_0xd1c37e,_0x21b8d3,_0x481a64){const _0x3427ca=_0x3c759a;this[_0x3427ca(0x1f8)](_0xd1c37e,_0x21b8d3)['removeShape'](_0x481a64);}[_0x3c759a(0x1f5)](_0x2dcaf5,_0x56b554,_0x58b1b8){const _0x3dcdcc=_0x3c759a;return this[_0x3dcdcc(0x1f8)](_0x2dcaf5,_0x56b554)[_0x3dcdcc(0x212)](_0x58b1b8);}[_0x3c759a(0x212)](_0x2e5014,_0x86f4a1,_0x5205f7){const _0x34ed86=_0x3c759a;return this[_0x34ed86(0x1f8)](_0x2e5014,_0x86f4a1)['getShapeType'](_0x5205f7);}['hasShape'](_0x512849,_0x26a09e,_0x4758a7){const _0x385e78=_0x3c759a;return this[_0x385e78(0x1f8)](_0x512849,_0x26a09e)['hasShape'](_0x4758a7);}['getShapeTypeById'](_0x479849,_0x2399e6,_0x2f7e9d){const _0x70e1af=_0x3c759a;return this[_0x70e1af(0x1f8)](_0x479849,_0x2399e6)[_0x70e1af(0x212)](_0x2f7e9d);}[_0x3c759a(0x241)](_0x4592ee,_0x5a4bfb,_0x4ac967){const _0x25cb9f=_0x3c759a,_0x5ceb98=this['_ensureShapeModelManager'](_0x4592ee,_0x5a4bfb);if(!_0x5ceb98[_0x25cb9f(0x212)](_0x4ac967))return;const _0x20e9e6=_0x5ceb98[_0x25cb9f(0x22b)]['get'](_0x4ac967);if(_0x20e9e6)return _0x20e9e6['getShapeData']();}[_0x3c759a(0x200)](_0x1b1617,_0x2965ae,_0x1db795){const _0x35d687=_0x3c759a;return this[_0x35d687(0x1f8)](_0x1b1617,_0x2965ae)[_0x35d687(0x22b)]['get'](_0x1db795);}[_0x3c759a(0x20c)](_0x55f2f3,_0x4184fd,_0xcd03d1){const _0x3ae561=_0x3c759a;return this[_0x3ae561(0x1f8)](_0x55f2f3,_0x4184fd)[_0x3ae561(0x20c)](_0xcd03d1);}[_0x3c759a(0x214)](_0xef0cca,_0x27f0ec,_0x23364e){const _0x5ab3d4=_0x3c759a,_0xc6420b=this[_0x5ab3d4(0x1f8)](_0xef0cca,_0x27f0ec)[_0x5ab3d4(0x22b)][_0x5ab3d4(0x21c)](_0x23364e);if(_0xc6420b)return _0xc6420b['getShapeRelation']();}['setShapeType'](){}[_0x3c759a(0x1f4)](_0x6df57f){const _0x5e11e2=_0x3c759a,_0x45b45f={},_0x2a4731=this[_0x5e11e2(0x252)][_0x5e11e2(0x21c)](_0x6df57f);return _0x2a4731&&_0x2a4731[_0x5e11e2(0x231)]((_0x493fff,_0x5231b6)=>{const _0x29f489=_0x5e11e2;_0x45b45f[_0x5231b6]=_0x493fff[_0x29f489(0x23e)]();}),JSON['stringify'](_0x45b45f);}[_0x3c759a(0x1ed)](_0x2e49d3,_0x3826f7){const _0x262362=_0x3c759a;Object[_0x262362(0x21a)](_0x3826f7)[_0x262362(0x231)](_0x4d36f4=>{const _0x1afb94=_0x262362;this[_0x1afb94(0x1f8)](_0x2e49d3,_0x4d36f4)['fromJSON'](_0x3826f7[_0x4d36f4]);});}['toJSON'](){const _0x106468={};return this['_shapeModelManagerMap']['forEach']((_0x33e02d,_0x74b0d0)=>{const _0x4bd510=_0xc1bf;_0x106468[_0x74b0d0]={},_0x33e02d[_0x4bd510(0x231)]((_0x4791af,_0x412955)=>{const _0x1479ee=_0x4bd510;_0x106468[_0x74b0d0][_0x412955]=_0x4791af[_0x1479ee(0x23e)]();});}),_0x106468;}[_0x3c759a(0x248)](_0x5b3f50){const _0x184114=_0x3c759a;Object[_0x184114(0x21a)](_0x5b3f50)[_0x184114(0x231)](_0x45a475=>{const _0x2e54e6=_0x184114,_0x20d7ee=_0x5b3f50[_0x45a475];Object[_0x2e54e6(0x21a)](_0x20d7ee)[_0x2e54e6(0x231)](_0x18a4ed=>{const _0xe54df8=_0x2e54e6;this[_0xe54df8(0x1f8)](_0x45a475,_0x18a4ed)[_0xe54df8(0x248)](_0x20d7ee[_0x18a4ed]);});});}[_0x3c759a(0x240)](){const _0x5873f7=_0x3c759a;this['_resourcesManagerService']['registerPluginResource']({'pluginName':_0x2e5b25,'businesses':[_0x14ac5a['UniverInstanceType']['UNIVER_SHEET']],'toJson':_0x579ccd=>this[_0x5873f7(0x1f4)](_0x579ccd),'parseJson':_0x792e1d=>JSON[_0x5873f7(0x232)](_0x792e1d),'onLoad':(_0x2fc9d6,_0x9083c8)=>{const _0x29fa3=_0x5873f7;this[_0x29fa3(0x1ed)](_0x2fc9d6,_0x9083c8);},'onUnLoad':_0xb3ace7=>{const _0x234021=_0x5873f7,_0x223d6c=this[_0x234021(0x252)][_0x234021(0x21c)](_0xb3ace7);_0x223d6c&&(_0x223d6c[_0x234021(0x231)](_0x29d194=>{const _0x34967a=_0x234021;_0x29d194[_0x34967a(0x233)]();}),this[_0x234021(0x252)][_0x234021(0x1fa)](_0xb3ace7));}});}[_0x3c759a(0x233)](){const _0x4a643d=_0x3c759a;this[_0x4a643d(0x252)]['forEach'](_0x3177f3=>{_0x3177f3['forEach'](_0x161209=>{const _0x3e1f41=_0xc1bf;_0x161209[_0x3e1f41(0x233)]();});});}},_0x4e48d6[_0x3c759a(0x244)]=_0x2970af([_0x54000f(0x0,_0x14ac5a[_0x3c759a(0x20d)])],_0x4e48d6['SheetsShapeServices']);const _0x20c071={'id':'sheet.mutation.update-shape-type','type':_0x14ac5a[_0x3c759a(0x224)][_0x3c759a(0x20f)],'handler':(_0x1ddb02,_0x12b983)=>{const _0x27198f=_0x3c759a,{unitId:_0xb83d26,subUnitId:_0x80ff20,shapeType:_0x334b3d,shapeId:_0x5b7e32,shapeData:_0x166d9b}=_0x12b983,_0x15efda=_0x1ddb02[_0x27198f(0x21c)](_0x4e48d6[_0x27198f(0x244)])[_0x27198f(0x200)](_0xb83d26,_0x80ff20,_0x5b7e32);return _0x15efda&&(_0x15efda[_0x27198f(0x222)](_0x334b3d),_0x166d9b&&(_0x15efda==null||_0x15efda['setShapeData'](_0x166d9b))),!0x0;}},_0x5881d6={'id':_0x3c759a(0x1fc),'type':_0x14ac5a[_0x3c759a(0x224)][_0x3c759a(0x218)],'handler':(_0x10ba56,_0x5dcb7d)=>{const _0xffc48f=_0x3c759a;if(!_0x5dcb7d)return!0x1;const _0x56d529=_0x10ba56[_0xffc48f(0x21c)](_0x14ac5a[_0xffc48f(0x1f3)]),_0x37eaf4=_0x10ba56[_0xffc48f(0x21c)](_0x4e48d6['SheetsShapeServices']),_0x45181e=_0x10ba56[_0xffc48f(0x21c)](_0x14ac5a['IUndoRedoService']),_0x41a866=[],_0x5dc30f=[],{unitId:_0x865cf,subUnitId:_0x13a8ab,shapeId:_0x175b4a,shapeType:_0x5653e2,shapeData:_0x47d36b}=_0x5dcb7d,_0x1a23c0=_0x37eaf4[_0xffc48f(0x200)](_0x865cf,_0x13a8ab,_0x175b4a);if(_0x1a23c0){const _0x547e7b=_0x1a23c0[_0xffc48f(0x212)](),_0x57ea04=Object['assign']({},_0x1a23c0['getShapeData']()),_0x18a2b7={'unitId':_0x865cf,'subUnitId':_0x13a8ab,'shapeId':_0x175b4a,'shapeType':_0x5653e2,'shapeData':_0x47d36b},_0x58a98c={'unitId':_0x865cf,'subUnitId':_0x13a8ab,'shapeId':_0x175b4a,'shapeType':_0x547e7b,'shapeData':_0x57ea04};return _0x41a866[_0xffc48f(0x23a)]({'id':_0x20c071['id'],'params':_0x18a2b7}),_0x5dc30f['push']({'id':_0x20c071['id'],'params':_0x58a98c}),_0x41a866[_0xffc48f(0x206)](_0x109321=>_0x56d529[_0xffc48f(0x1f9)](_0x109321['id'],_0x109321[_0xffc48f(0x210)]))&&_0x45181e[_0xffc48f(0x204)]({'unitID':_0x865cf,'redoMutations':[..._0x41a866],'undoMutations':[..._0x5dc30f]}),!0x0;}return!0x1;}},_0x4edd41={'id':_0x3c759a(0x1f7),'type':_0x14ac5a[_0x3c759a(0x224)][_0x3c759a(0x20f)],'handler':(_0x593996,_0x4e41b5)=>{const _0x3d11e5=_0x3c759a,{unitId:_0x31b8ed,subUnitId:_0x34965b,shapeType:_0x43a59c,shapeId:_0x4f2a1e,shapeData:_0xd1d576}=_0x4e41b5;return _0x593996[_0x3d11e5(0x21c)](_0x4e48d6['SheetsShapeServices'])[_0x3d11e5(0x22d)](_0x31b8ed,_0x34965b,_0x43a59c,_0x4f2a1e,_0xd1d576),!0x0;}},_0x3e5228={'id':_0x3c759a(0x250),'type':_0x14ac5a[_0x3c759a(0x224)][_0x3c759a(0x20f)],'handler':(_0x2255e9,_0x2e7522)=>{const {unitId:_0x4279ea,subUnitId:_0x14965e,shapeId:_0x4fb62a}=_0x2e7522;return _0x2255e9['get'](_0x4e48d6['SheetsShapeServices'])['removeShape'](_0x4279ea,_0x14965e,_0x4fb62a),!0x0;}},_0x10a071={'id':_0x3c759a(0x229),'type':_0x14ac5a[_0x3c759a(0x224)][_0x3c759a(0x20f)],'handler':(_0x4117cb,_0x3e121a)=>{const _0x4cafd3=_0x3c759a,{unitId:_0x4e5127,subUnitId:_0xa19eee,shapeType:_0x44b8b6,shapeId:_0x420bef,shapeData:_0x1c515e}=_0x3e121a,_0x73f92e=_0x4117cb[_0x4cafd3(0x21c)](_0x4e48d6['SheetsShapeServices'])[_0x4cafd3(0x200)](_0x4e5127,_0xa19eee,_0x420bef);return _0x73f92e&&(_0x44b8b6!==void 0x0&&_0x73f92e[_0x4cafd3(0x222)](_0x44b8b6),_0x1c515e&&(_0x73f92e==null||_0x73f92e['setShapeData'](_0x1c515e,!0x0))),!0x0;}},_0x1063cb=_0x3c759a(0x227),_0x39b05a={};var _0x233e3f=Object['defineProperty'],_0x54fdd1=Object[_0x3c759a(0x20a)],_0x52c981=(_0x3617a9,_0x24abbb,_0x182ade)=>_0x24abbb in _0x3617a9?_0x233e3f(_0x3617a9,_0x24abbb,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x182ade}):_0x3617a9[_0x24abbb]=_0x182ade,_0x26d5d1=(_0x17ee35,_0x2265ed,_0x485c44,_0x3634ae)=>{const _0x2fe2ae=_0x3c759a;for(var _0x1dbef7=_0x3634ae>0x1?void 0x0:_0x3634ae?_0x54fdd1(_0x2265ed,_0x485c44):_0x2265ed,_0x4303b5=_0x17ee35[_0x2fe2ae(0x1f2)]-0x1,_0x194606;_0x4303b5>=0x0;_0x4303b5--)(_0x194606=_0x17ee35[_0x4303b5])&&(_0x1dbef7=_0x194606(_0x1dbef7)||_0x1dbef7);return _0x1dbef7;},_0x9d1371=(_0x4f4b1e,_0x23554b)=>(_0x558124,_0x5db4f9)=>_0x23554b(_0x558124,_0x5db4f9,_0x4f4b1e),_0x32efa4=(_0x17fb32,_0x139aab,_0x4cd074)=>_0x52c981(_0x17fb32,typeof _0x139aab!=_0x3c759a(0x219)?_0x139aab+'':_0x139aab,_0x4cd074);const _0x4ada2c=_0x3c759a(0x230);_0x4e48d6[_0x3c759a(0x201)]=class extends _0x14ac5a['Plugin']{constructor(_0x3fac91=_0x39b05a,_0x3b589e,_0x5aba0b,_0x5211ab){const _0x26addb=_0x3c759a;super(),this[_0x26addb(0x202)]=_0x3fac91,this['_injector']=_0x3b589e,this['_commandService']=_0x5aba0b,this[_0x26addb(0x24d)]=_0x5211ab;const {..._0x2017ef}=_0x14ac5a[_0x26addb(0x1fe)]({},_0x39b05a,this[_0x26addb(0x202)]);this[_0x26addb(0x24d)][_0x26addb(0x225)](_0x1063cb,_0x2017ef),this[_0x26addb(0x205)]();}[_0x3c759a(0x24c)](){const _0x526362=_0x3c759a;_0x14ac5a[_0x526362(0x22e)](this['_injector'],[]);}[_0x3c759a(0x238)](){const _0x37c3f2=_0x3c759a,_0x5c5c6a=this[_0x37c3f2(0x1fd)];[[_0x57d9e8],[_0x4e48d6[_0x37c3f2(0x244)]]]['forEach'](_0x287bc2=>_0x5c5c6a[_0x37c3f2(0x1f6)](_0x287bc2));}[_0x3c759a(0x205)](){const _0x202a8c=_0x3c759a;[_0x4edd41,_0x3e5228,_0x20c071,_0x10a071][_0x202a8c(0x231)](_0x4d25f7=>this['disposeWithMe'](this[_0x202a8c(0x1fb)][_0x202a8c(0x207)](_0x4d25f7)));}},_0x32efa4(_0x4e48d6[_0x3c759a(0x201)],'type',_0x14ac5a[_0x3c759a(0x213)]['UNIVER_SHEET']),_0x32efa4(_0x4e48d6[_0x3c759a(0x201)],_0x3c759a(0x21f),_0x4ada2c),_0x4e48d6[_0x3c759a(0x201)]=_0x26d5d1([_0x14ac5a[_0x3c759a(0x249)](_0x10fbca[_0x3c759a(0x235)]),_0x9d1371(0x1,_0x14ac5a[_0x3c759a(0x253)](_0x14ac5a[_0x3c759a(0x234)])),_0x9d1371(0x2,_0x14ac5a[_0x3c759a(0x1f3)]),_0x9d1371(0x3,_0x14ac5a['IConfigService'])],_0x4e48d6[_0x3c759a(0x201)]),_0x4e48d6[_0x3c759a(0x209)]=_0x4edd41,_0x4e48d6['RemoveSheetsShapeMutation']=_0x3e5228,_0x4e48d6[_0x3c759a(0x246)]=_0x10a071,_0x4e48d6[_0x3c759a(0x243)]=_0x5881d6,_0x4e48d6['UpdateSheetsShapeTypeMutation']=_0x20c071,Object[_0x3c759a(0x23b)](_0x4e48d6,Symbol[_0x3c759a(0x245)],{'value':_0x3c759a(0x23d)});}));
|
|
1
|
+
(function(_0x47b0e9,_0x24d308){const _0x5a1b3=_0xcdc3,_0x58beb1=_0x47b0e9();while(!![]){try{const _0x12b61f=parseInt(_0x5a1b3(0xcc))/0x1*(parseInt(_0x5a1b3(0xc7))/0x2)+parseInt(_0x5a1b3(0xca))/0x3+parseInt(_0x5a1b3(0xdf))/0x4*(parseInt(_0x5a1b3(0xbb))/0x5)+parseInt(_0x5a1b3(0xf6))/0x6*(parseInt(_0x5a1b3(0x118))/0x7)+parseInt(_0x5a1b3(0xce))/0x8+-parseInt(_0x5a1b3(0xc1))/0x9*(parseInt(_0x5a1b3(0x106))/0xa)+-parseInt(_0x5a1b3(0x105))/0xb;if(_0x12b61f===_0x24d308)break;else _0x58beb1['push'](_0x58beb1['shift']());}catch(_0x575b81){_0x58beb1['push'](_0x58beb1['shift']());}}}(_0x2e5d,0x3a03f),function(_0x4cab9e,_0x5efb44){const _0x2e36bd=_0xcdc3;typeof exports==_0x2e36bd(0xe9)&&typeof module<'u'?_0x5efb44(exports,require('@univerjs/core'),require('@univerjs-pro/engine-shape'),require('@univerjs-pro/license')):typeof define==_0x2e36bd(0xcf)&&define[_0x2e36bd(0xd6)]?define([_0x2e36bd(0xf1),_0x2e36bd(0xd3),'@univerjs-pro/engine-shape',_0x2e36bd(0x10b)],_0x5efb44):(_0x4cab9e=typeof globalThis<'u'?globalThis:_0x4cab9e||self,_0x5efb44(_0x4cab9e[_0x2e36bd(0x10e)]={},_0x4cab9e[_0x2e36bd(0xf0)],_0x4cab9e[_0x2e36bd(0xeb)],_0x4cab9e[_0x2e36bd(0xd7)]));}(this,function(_0xf1826b,_0x24aa40,_0xa66e61,_0x3dc2a3){'use strict';const _0x4e9450=_0xcdc3;var _0x5b4f17=Object[_0x4e9450(0xfb)],_0x39fae7=(_0x1faea6,_0x4f5e08,_0x265a8b)=>_0x4f5e08 in _0x1faea6?_0x5b4f17(_0x1faea6,_0x4f5e08,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x265a8b}):_0x1faea6[_0x4f5e08]=_0x265a8b,_0x5b059d=(_0x31f3a2,_0x58483d,_0x3c44e2)=>_0x39fae7(_0x31f3a2,typeof _0x58483d!=_0x4e9450(0xfe)?_0x58483d+'':_0x58483d,_0x3c44e2);class _0x5dd780 extends _0x24aa40['Disposable']{constructor(){const _0x3b92a8=_0x4e9450;super(),_0x5b059d(this,_0x3b92a8(0xd0),new Map()),_0x5b059d(this,_0x3b92a8(0xc9),new Set()),_0x5b059d(this,_0x3b92a8(0x107),new Set());}['addShape'](_0x41210e,_0x1e59cd,_0x24ac79){const _0xbedccd=_0x4e9450,_0x4c5eed=new _0xa66e61['ShapeModel'](_0x41210e,_0x1e59cd,_0x24ac79);return this[_0xbedccd(0xd0)]['set'](_0x1e59cd,_0x4c5eed),_0xa66e61[_0xbedccd(0xbf)](_0x41210e)&&this[_0xbedccd(0xc9)][_0xbedccd(0xff)](_0x1e59cd),_0x4c5eed;}[_0x4e9450(0xf2)](_0x4e0a5f){const _0x1f9f16=_0x4e9450;var _0x213b00,_0x5927f8;const _0x22376b=[];for(const _0x1c2247 of this[_0x1f9f16(0xc9)]){const _0x4dd240=this['_shapes'][_0x1f9f16(0xbc)](_0x1c2247);if(_0x4dd240){const _0x44c6e6=_0x4dd240['getShapeRelation']();_0x44c6e6&&(((_0x213b00=_0x44c6e6[_0x1f9f16(0x101)])==null?void 0x0:_0x213b00[_0x1f9f16(0xd9)])===_0x4e0a5f&&_0x22376b[_0x1f9f16(0xcd)]({..._0x44c6e6[_0x1f9f16(0x101)],'lineShapeId':_0x1c2247,'isFrom':!0x0}),((_0x5927f8=_0x44c6e6['to'])==null?void 0x0:_0x5927f8[_0x1f9f16(0xd9)])===_0x4e0a5f&&_0x22376b[_0x1f9f16(0xcd)]({..._0x44c6e6['to'],'lineShapeId':_0x1c2247,'isFrom':!0x1}));}}return _0x22376b;}['getLineShapeRelation'](_0x3b75c4){const _0x2b516f=_0x4e9450,_0x4488ec=this['_shapes']['get'](_0x3b75c4);if(_0x4488ec)return _0x4488ec[_0x2b516f(0xed)]();}['getShapeType'](_0x164d20){const _0x13eaff=_0x4e9450,_0x5e729d=this[_0x13eaff(0xd0)]['get'](_0x164d20);if(_0x5e729d)return _0x5e729d[_0x13eaff(0xc4)]();}[_0x4e9450(0xc3)](_0x4c120e){const _0x36c3fb=_0x4e9450;return this[_0x36c3fb(0xd0)]['has'](_0x4c120e);}[_0x4e9450(0xec)](_0x1616e5){const _0x323baa=_0x4e9450,_0x17ba67=this[_0x323baa(0xd0)][_0x323baa(0xbc)](_0x1616e5);_0x17ba67&&(_0xa66e61['isConnectorShape'](_0x17ba67[_0x323baa(0xc4)]())&&this['_linesIds'][_0x323baa(0xc5)](_0x1616e5),this['_shapes']['delete'](_0x1616e5));}[_0x4e9450(0xd5)](){const _0xe2d13c=_0x4e9450,_0x2ace9e=[];return this['_shapes'][_0xe2d13c(0xe7)](_0x2d2d1f=>{const _0x36b45c=_0xe2d13c;_0x2ace9e['push'](_0x2d2d1f[_0x36b45c(0xd5)]());}),_0x2ace9e;}[_0x4e9450(0xdc)](_0x98817e){const _0x59280b=_0x4e9450;for(const _0x5f01c8 of _0x98817e){const {id:_0x91c90a,shapeType:_0x41d499}=_0x5f01c8,_0x31ea13=this[_0x59280b(0x113)](_0x41d499,_0x91c90a,_0x5f01c8[_0x59280b(0x102)]);_0x31ea13&&_0x31ea13[_0x59280b(0x114)]()&&this[_0x59280b(0xc9)][_0x59280b(0xff)](_0x91c90a);}}['dispose'](){const _0x71d61a=_0x4e9450;this[_0x71d61a(0x111)]||(this[_0x71d61a(0xd0)][_0x71d61a(0xe7)](_0x133021=>{_0x133021['dispose']();}),this['_shapes'][_0x71d61a(0x115)](),this[_0x71d61a(0xc9)]['clear'](),this[_0x71d61a(0x107)]['clear'](),super[_0x71d61a(0x109)]());}}var _0x1ad1a6=Object[_0x4e9450(0xdd)],_0x4b48a9=(_0xe0f487,_0x3179ca,_0x4e092a,_0x21a7d9)=>{const _0x374c38=_0x4e9450;for(var _0x45bf8a=_0x21a7d9>0x1?void 0x0:_0x21a7d9?_0x1ad1a6(_0x3179ca,_0x4e092a):_0x3179ca,_0x2133c7=_0xe0f487[_0x374c38(0xd8)]-0x1,_0x513696;_0x2133c7>=0x0;_0x2133c7--)(_0x513696=_0xe0f487[_0x2133c7])&&(_0x45bf8a=_0x513696(_0x45bf8a)||_0x45bf8a);return _0x45bf8a;},_0x10fcd8=(_0x560428,_0x52aaf9)=>(_0x56cc12,_0x3093e8)=>_0x52aaf9(_0x56cc12,_0x3093e8,_0x560428);const _0x14ff6f=_0x4e9450(0xe0);_0xf1826b[_0x4e9450(0x11c)]=class extends _0x24aa40[_0x4e9450(0xf7)]{constructor(_0x12c01e){const _0x2d34ce=_0x4e9450;super(),_0x5b059d(this,_0x2d34ce(0xc6),new Map()),(this[_0x2d34ce(0x100)]=_0x12c01e,this['_initSnapshot']());}[_0x4e9450(0xe2)](_0x14951a,_0x93b02f){const _0x185d9c=_0x4e9450;let _0x3d9bde=this[_0x185d9c(0xc6)][_0x185d9c(0xbc)](_0x14951a);_0x3d9bde||(_0x3d9bde=new Map(),this['_shapeModelManagerMap'][_0x185d9c(0xbe)](_0x14951a,_0x3d9bde));let _0xc8a5ed=_0x3d9bde[_0x185d9c(0xbc)](_0x93b02f);return _0xc8a5ed||(_0xc8a5ed=new _0x5dd780(),_0x3d9bde[_0x185d9c(0xbe)](_0x93b02f,_0xc8a5ed)),_0xc8a5ed;}[_0x4e9450(0xe8)](_0x451111,_0x534a31,_0x262016,_0x81a567,_0x4064bd){const _0x3488ed=_0x4e9450;this[_0x3488ed(0xe2)](_0x451111,_0x534a31)['addShape'](_0x262016,_0x81a567,_0x4064bd);}[_0x4e9450(0xec)](_0x71d0c5,_0x197ec6,_0x44d999){const _0xd06eb6=_0x4e9450;this[_0xd06eb6(0xe2)](_0x71d0c5,_0x197ec6)[_0xd06eb6(0xec)](_0x44d999);}[_0x4e9450(0x10d)](_0x1d6eab,_0x22085b,_0x1dc1c3){const _0x5dcdba=_0x4e9450;return this[_0x5dcdba(0xe2)](_0x1d6eab,_0x22085b)[_0x5dcdba(0xc4)](_0x1dc1c3);}[_0x4e9450(0xc4)](_0x226e84,_0x542c9a,_0x9e001e){const _0x4f8fea=_0x4e9450;return this[_0x4f8fea(0xe2)](_0x226e84,_0x542c9a)[_0x4f8fea(0xc4)](_0x9e001e);}['hasShape'](_0x50922c,_0x2d64d2,_0x3555b4){const _0x28e980=_0x4e9450;return this[_0x28e980(0xe2)](_0x50922c,_0x2d64d2)[_0x28e980(0xc3)](_0x3555b4);}['getShapeTypeById'](_0x1fd0cc,_0x33e835,_0x5985c7){const _0x15d07f=_0x4e9450;return this[_0x15d07f(0xe2)](_0x1fd0cc,_0x33e835)['getShapeType'](_0x5985c7);}[_0x4e9450(0xf4)](_0x194c47,_0x4adce3,_0x5bd8b4){const _0x3abce6=_0x4e9450,_0x22c1ae=this[_0x3abce6(0xe2)](_0x194c47,_0x4adce3);if(!_0x22c1ae[_0x3abce6(0xc4)](_0x5bd8b4))return;const _0x346cb3=_0x22c1ae[_0x3abce6(0xd0)][_0x3abce6(0xbc)](_0x5bd8b4);if(_0x346cb3)return _0x346cb3['getShapeData']();}[_0x4e9450(0xd4)](_0x380ba5,_0x43d2d8,_0x250bbf){const _0x5c6da5=_0x4e9450;return this[_0x5c6da5(0xe2)](_0x380ba5,_0x43d2d8)[_0x5c6da5(0xd0)][_0x5c6da5(0xbc)](_0x250bbf);}[_0x4e9450(0xf2)](_0x5be41f,_0x256ba9,_0x139b5c){const _0x9e686b=_0x4e9450;return this[_0x9e686b(0xe2)](_0x5be41f,_0x256ba9)[_0x9e686b(0xf2)](_0x139b5c);}[_0x4e9450(0xe1)](_0x5584e1,_0x3f3491,_0x2eecab){const _0x2651cf=_0x4e9450,_0xada7b6=this['_ensureShapeModelManager'](_0x5584e1,_0x3f3491)['_shapes']['get'](_0x2eecab);if(_0xada7b6)return _0xada7b6[_0x2651cf(0xed)]();}[_0x4e9450(0x117)](){}['_serializeShapeForUnit'](_0x360552){const _0x23d1a7=_0x4e9450,_0x5bb796={},_0x3a4036=this[_0x23d1a7(0xc6)][_0x23d1a7(0xbc)](_0x360552);return _0x3a4036&&_0x3a4036[_0x23d1a7(0xe7)]((_0x3105d4,_0x415199)=>{const _0x507331=_0x23d1a7,_0x3707ca=_0x3105d4[_0x507331(0xd5)]();_0x3707ca[_0x507331(0xd8)]>0x0&&(_0x5bb796[_0x415199]=_0x3707ca);}),JSON['stringify'](_0x5bb796);}['_deserializeShapeForUnit'](_0x4cd4c4,_0x2873b2){const _0x45af9a=_0x4e9450;Object[_0x45af9a(0xda)](_0x2873b2)['forEach'](_0x2df950=>{const _0x3ba869=_0x45af9a;this[_0x3ba869(0xe2)](_0x4cd4c4,_0x2df950)[_0x3ba869(0xdc)](_0x2873b2[_0x2df950]);});}['toJSON'](){const _0x370057={};return this['_shapeModelManagerMap']['forEach']((_0x255b46,_0x394038)=>{_0x370057[_0x394038]={},_0x255b46['forEach']((_0x1463b7,_0xce49a3)=>{const _0x158ffd=_0xcdc3;_0x370057[_0x394038][_0xce49a3]=_0x1463b7[_0x158ffd(0xd5)]();});}),_0x370057;}[_0x4e9450(0xdc)](_0x5b3e4e){const _0x4f7a49=_0x4e9450;Object[_0x4f7a49(0xda)](_0x5b3e4e)[_0x4f7a49(0xe7)](_0x4d366e=>{const _0x3cd270=_0x4f7a49,_0x4c03e8=_0x5b3e4e[_0x4d366e];Object[_0x3cd270(0xda)](_0x4c03e8)[_0x3cd270(0xe7)](_0x36e3b7=>{const _0x2ccad7=_0x3cd270;this[_0x2ccad7(0xe2)](_0x4d366e,_0x36e3b7)[_0x2ccad7(0xdc)](_0x4c03e8[_0x36e3b7]);});});}['_initSnapshot'](){const _0x465671=_0x4e9450;this[_0x465671(0x100)][_0x465671(0xf8)]({'pluginName':_0x14ff6f,'businesses':[_0x24aa40['UniverInstanceType'][_0x465671(0x116)]],'toJson':_0x2df201=>this[_0x465671(0xf9)](_0x2df201),'parseJson':_0x13dcc9=>JSON['parse'](_0x13dcc9),'onLoad':(_0x578663,_0xb96c4b)=>{this['_deserializeShapeForUnit'](_0x578663,_0xb96c4b);},'onUnLoad':_0x20aa50=>{const _0x2dea66=_0x465671,_0x326850=this['_shapeModelManagerMap'][_0x2dea66(0xbc)](_0x20aa50);_0x326850&&(_0x326850[_0x2dea66(0xe7)](_0x1d4804=>{const _0x483d07=_0x2dea66;_0x1d4804[_0x483d07(0x109)]();}),this['_shapeModelManagerMap'][_0x2dea66(0xc5)](_0x20aa50));}});}[_0x4e9450(0x109)](){const _0x384aff=_0x4e9450;this[_0x384aff(0xc6)][_0x384aff(0xe7)](_0x105ba9=>{_0x105ba9['forEach'](_0x231cad=>{const _0x2e66f2=_0xcdc3;_0x231cad[_0x2e66f2(0x109)]();});});}},_0xf1826b['SheetsShapeService']=_0x4b48a9([_0x10fcd8(0x0,_0x24aa40['IResourceManagerService'])],_0xf1826b['SheetsShapeService']);const _0xaddb7d={'id':_0x4e9450(0xc2),'type':_0x24aa40[_0x4e9450(0x11a)][_0x4e9450(0xd1)],'handler':(_0x22ea88,_0x242cf9)=>{const _0xc40811=_0x4e9450,{unitId:_0x18578d,subUnitId:_0x117246,shapeType:_0xe978f4,shapeId:_0x134913,shapeData:_0x3fc36c}=_0x242cf9,_0x211fef=_0x22ea88[_0xc40811(0xbc)](_0xf1826b[_0xc40811(0x11c)])[_0xc40811(0xd4)](_0x18578d,_0x117246,_0x134913);return _0x211fef&&(_0x211fef[_0xc40811(0x117)](_0xe978f4),_0x3fc36c&&(_0x211fef==null||_0x211fef[_0xc40811(0xdb)](_0x3fc36c))),!0x0;}},_0xc31978={'id':_0x4e9450(0xe3),'type':_0x24aa40[_0x4e9450(0x11a)][_0x4e9450(0x11b)],'handler':(_0xcfdde4,_0x4bbe6e)=>{const _0xd4f14d=_0x4e9450;if(!_0x4bbe6e)return!0x1;const _0x4cde58=_0xcfdde4[_0xd4f14d(0xbc)](_0x24aa40['ICommandService']),_0x513936=_0xcfdde4[_0xd4f14d(0xbc)](_0xf1826b[_0xd4f14d(0x11c)]),_0x460435=_0xcfdde4['get'](_0x24aa40[_0xd4f14d(0xc8)]),_0x165394=[],_0x302b2e=[],{unitId:_0x329586,subUnitId:_0x45a801,shapeId:_0x1c0115,shapeType:_0x548860,shapeData:_0x27c10f}=_0x4bbe6e,_0x1e4028=_0x513936['getShapeModel'](_0x329586,_0x45a801,_0x1c0115);if(_0x1e4028){const _0x4b54da=_0x1e4028[_0xd4f14d(0xc4)](),_0x2bf42f=Object[_0xd4f14d(0xe5)]({},_0x1e4028[_0xd4f14d(0x10f)]()),_0x18d012={'unitId':_0x329586,'subUnitId':_0x45a801,'shapeId':_0x1c0115,'shapeType':_0x548860,'shapeData':_0x27c10f},_0xb6e789={'unitId':_0x329586,'subUnitId':_0x45a801,'shapeId':_0x1c0115,'shapeType':_0x4b54da,'shapeData':_0x2bf42f};return _0x165394['push']({'id':_0xaddb7d['id'],'params':_0x18d012}),_0x302b2e[_0xd4f14d(0xcd)]({'id':_0xaddb7d['id'],'params':_0xb6e789}),_0x165394[_0xd4f14d(0xe6)](_0x1b8afa=>_0x4cde58['syncExecuteCommand'](_0x1b8afa['id'],_0x1b8afa['params']))&&_0x460435[_0xd4f14d(0x112)]({'unitID':_0x329586,'redoMutations':[..._0x165394],'undoMutations':[..._0x302b2e]}),!0x0;}return!0x1;}},_0x446377={'id':'sheet.mutation.insert-shape','type':_0x24aa40[_0x4e9450(0x11a)]['MUTATION'],'handler':(_0x5591bb,_0xc2ae62)=>{const _0x3801a4=_0x4e9450,{unitId:_0x20ec48,subUnitId:_0x4a411b,shapeType:_0x4c927f,shapeId:_0x59e421,shapeData:_0xcb105f}=_0xc2ae62;return _0x5591bb[_0x3801a4(0xbc)](_0xf1826b['SheetsShapeService'])[_0x3801a4(0xe8)](_0x20ec48,_0x4a411b,_0x4c927f,_0x59e421,_0xcb105f),!0x0;}},_0x42b5e3={'id':'sheet.mutation.remove-shape','type':_0x24aa40[_0x4e9450(0x11a)][_0x4e9450(0xd1)],'handler':(_0x3d6017,_0x30a677)=>{const _0x455a2d=_0x4e9450,{unitId:_0x56eacf,subUnitId:_0x237207,shapeId:_0x3641ab}=_0x30a677;return _0x3d6017[_0x455a2d(0xbc)](_0xf1826b['SheetsShapeService'])[_0x455a2d(0xec)](_0x56eacf,_0x237207,_0x3641ab),!0x0;}},_0x85a31a={'id':_0x4e9450(0xef),'type':_0x24aa40[_0x4e9450(0x11a)]['MUTATION'],'handler':(_0x7dea4f,_0x282d46)=>{const _0x14eef6=_0x4e9450,{unitId:_0x3c6dbc,subUnitId:_0x5cfb31,shapeType:_0x2c26a2,shapeId:_0xab76a3,shapeData:_0xc37e9e}=_0x282d46,_0x463b7c=_0x7dea4f[_0x14eef6(0xbc)](_0xf1826b[_0x14eef6(0x11c)])[_0x14eef6(0xd4)](_0x3c6dbc,_0x5cfb31,_0xab76a3);return _0x463b7c&&(_0x2c26a2!==void 0x0&&_0x463b7c[_0x14eef6(0x117)](_0x2c26a2),_0xc37e9e&&(_0x463b7c==null||_0x463b7c[_0x14eef6(0xdb)](_0xc37e9e,!0x0))),!0x0;}},_0x3f87e1='sheets-shape.config',_0x2ae075={};var _0x7f9b34=Object[_0x4e9450(0xfb)],_0x1c2c88=Object[_0x4e9450(0xdd)],_0x2c3818=(_0x38617b,_0x33c28d,_0x500bd4)=>_0x33c28d in _0x38617b?_0x7f9b34(_0x38617b,_0x33c28d,{'enumerable':!0x0,'configurable':!0x0,'writable':!0x0,'value':_0x500bd4}):_0x38617b[_0x33c28d]=_0x500bd4,_0x3e28c8=(_0x5c97bb,_0x41e9e5,_0x237b37,_0x3ff651)=>{const _0x52fc31=_0x4e9450;for(var _0x57afa2=_0x3ff651>0x1?void 0x0:_0x3ff651?_0x1c2c88(_0x41e9e5,_0x237b37):_0x41e9e5,_0x45542f=_0x5c97bb[_0x52fc31(0xd8)]-0x1,_0x5027a0;_0x45542f>=0x0;_0x45542f--)(_0x5027a0=_0x5c97bb[_0x45542f])&&(_0x57afa2=_0x5027a0(_0x57afa2)||_0x57afa2);return _0x57afa2;},_0x5d6855=(_0x4d655b,_0x358d50)=>(_0x10f098,_0x4cad10)=>_0x358d50(_0x10f098,_0x4cad10,_0x4d655b),_0x302986=(_0x2f1ff3,_0x48f32f,_0x253d33)=>_0x2c3818(_0x2f1ff3,typeof _0x48f32f!=_0x4e9450(0xfe)?_0x48f32f+'':_0x48f32f,_0x253d33);const _0xc9b457=_0x4e9450(0xe0);_0xf1826b[_0x4e9450(0xde)]=class extends _0x24aa40[_0x4e9450(0x10c)]{constructor(_0xcee4c5=_0x2ae075,_0xb8e4b6,_0x28e725,_0x40e8a3){const _0x4fe6dc=_0x4e9450;super(),this[_0x4fe6dc(0x108)]=_0xcee4c5,this[_0x4fe6dc(0x10a)]=_0xb8e4b6,this[_0x4fe6dc(0xea)]=_0x28e725,this[_0x4fe6dc(0xc0)]=_0x40e8a3;const {..._0x30d473}=_0x24aa40['merge']({},_0x2ae075,this[_0x4fe6dc(0x108)]);this[_0x4fe6dc(0xc0)][_0x4fe6dc(0x110)](_0x3f87e1,_0x30d473),this[_0x4fe6dc(0xd2)]();}['onRendered'](){_0x24aa40['touchDependencies'](this['_injector'],[]);}[_0x4e9450(0xfd)](){const _0xfb17e1=_0x4e9450,_0x2133ea=this[_0xfb17e1(0x10a)];[[_0x5dd780],[_0xf1826b[_0xfb17e1(0x11c)]]][_0xfb17e1(0xe7)](_0x4d614c=>_0x2133ea[_0xfb17e1(0xff)](_0x4d614c));}['_initCommands'](){const _0x5cb229=_0x4e9450;[_0x446377,_0x42b5e3,_0xaddb7d,_0x85a31a][_0x5cb229(0xe7)](_0x8f7290=>this['disposeWithMe'](this[_0x5cb229(0xea)][_0x5cb229(0xfa)](_0x8f7290)));}},_0x302986(_0xf1826b[_0x4e9450(0xde)],'type',_0x24aa40['UniverInstanceType'][_0x4e9450(0x116)]),_0x302986(_0xf1826b['UniverSheetsShapePlugin'],_0x4e9450(0x119),_0xc9b457),_0xf1826b['UniverSheetsShapePlugin']=_0x3e28c8([_0x24aa40[_0x4e9450(0xf3)](_0x3dc2a3[_0x4e9450(0xf5)]),_0x5d6855(0x1,_0x24aa40['Inject'](_0x24aa40[_0x4e9450(0xfc)])),_0x5d6855(0x2,_0x24aa40[_0x4e9450(0x104)]),_0x5d6855(0x3,_0x24aa40[_0x4e9450(0xcb)])],_0xf1826b[_0x4e9450(0xde)]),_0xf1826b[_0x4e9450(0xe4)]=_0x446377,_0xf1826b['RemoveSheetsShapeMutation']=_0x42b5e3,_0xf1826b[_0x4e9450(0x103)]=_0x85a31a,_0xf1826b['UpdateSheetsShapeTypeCommand']=_0xc31978,_0xf1826b[_0x4e9450(0xbd)]=_0xaddb7d,Object[_0x4e9450(0xfb)](_0xf1826b,Symbol['toStringTag'],{'value':_0x4e9450(0xee)});}));function _0xcdc3(_0x299850,_0x3ef417){_0x299850=_0x299850-0xbb;const _0x2e5db3=_0x2e5d();let _0xcdc31e=_0x2e5db3[_0x299850];return _0xcdc31e;}function _0x2e5d(){const _0x257fea=['_initCommands','@univerjs/core','getShapeModel','toJSON','amd','UniverProLicense','length','shapeId','keys','setShapeData','fromJSON','getOwnPropertyDescriptor','UniverSheetsShapePlugin','8qrHryj','SHEET_SHAPE_PLUGIN','getLineShapeRelation','_ensureShapeModelManager','sheet.command.update-shape-type','InsertSheetsShapeMutation','assign','every','forEach','insertShape','object','_commandService','UniverProEngineShape','removeShape','getShapeRelation','Module','sheet.mutation.update-shape-data','UniverCore','exports','getBasicShapeRelation','DependentOn','getShapeDataById','UniverLicensePlugin','2298LkqduI','Disposable','registerPluginResource','_serializeShapeForUnit','registerCommand','defineProperty','Injector','onStarting','symbol','add','_resourcesManagerService','from','shapeData','UpdateSheetsShapeDataMutation','ICommandService','11899272vrOxmD','543990KsJLXX','_groupIds','_config','dispose','_injector','@univerjs-pro/license','Plugin','getBasicShapeType','UniverProSheetsShape','getShapeData','setConfig','_disposed','pushUndoRedo','addShape','isLineShape','clear','UNIVER_SHEET','setShapeType','8603WKdgyK','pluginName','CommandType','COMMAND','SheetsShapeService','699370RLHqjG','get','UpdateSheetsShapeTypeMutation','set','isConnectorShape','_configService','18fxUDJB','sheet.mutation.update-shape-type','hasShape','getShapeType','delete','_shapeModelManagerMap','6AFJppT','IUndoRedoService','_linesIds','1054812xUKLnP','IConfigService','59394blgEHr','push','1183520jtCfaU','function','_shapes','MUTATION'];_0x2e5d=function(){return _0x257fea;};return _0x2e5d();}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@univerjs-pro/sheets-shape",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "shape for Univer.",
|
|
6
6
|
"author": "DreamNum <developer@univer.ai>",
|
|
@@ -57,17 +57,17 @@
|
|
|
57
57
|
"rxjs": ">=7.0.0"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@univerjs-pro/
|
|
61
|
-
"@univerjs/
|
|
62
|
-
"@univerjs
|
|
60
|
+
"@univerjs-pro/engine-shape": "0.16.0",
|
|
61
|
+
"@univerjs-pro/license": "0.16.0",
|
|
62
|
+
"@univerjs/core": "0.16.0"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"rxjs": "7.8.2",
|
|
66
66
|
"typescript": "^5.9.3",
|
|
67
67
|
"vite": "^7.3.1",
|
|
68
68
|
"vitest": "^4.0.18",
|
|
69
|
-
"@univerjs-infra/shared": "0.
|
|
70
|
-
"@univerjs/sheets": "0.
|
|
69
|
+
"@univerjs-infra/shared": "0.16.0",
|
|
70
|
+
"@univerjs/sheets": "0.16.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|
|
73
73
|
"test": "vitest run",
|