@ckeditor/ckeditor5-merge-fields 0.0.1 → 43.0.0-alpha.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/CHANGELOG.md +4 -0
- package/LICENSE.md +5 -5
- package/README.md +35 -3
- package/build/merge-fields.js +5 -0
- package/ckeditor5-metadata.json +23 -0
- package/dist/index-content.css +5 -0
- package/dist/index-editor.css +140 -0
- package/dist/index.css +172 -0
- package/dist/index.js +23 -0
- package/dist/translations/en.d.ts +8 -0
- package/dist/translations/en.js +23 -0
- package/dist/translations/en.umd.js +23 -0
- package/lang/contexts.json +14 -0
- package/lang/translations/en.po +66 -0
- package/package.json +29 -4
- package/src/augmentation.d.ts +25 -0
- package/src/augmentation.js +23 -0
- package/src/index.d.ts +12 -0
- package/src/index.js +23 -0
- package/src/insertmergefieldcommand.d.ts +31 -0
- package/src/insertmergefieldcommand.js +23 -0
- package/src/mergefields.d.ts +56 -0
- package/src/mergefields.js +23 -0
- package/src/mergefieldsconfig.d.ts +155 -0
- package/src/mergefieldsconfig.js +23 -0
- package/src/mergefieldsediting.d.ts +76 -0
- package/src/mergefieldsediting.js +23 -0
- package/src/mergefieldsui.d.ts +36 -0
- package/src/mergefieldsui.js +23 -0
- package/src/previewmergefieldscommand.d.ts +43 -0
- package/src/previewmergefieldscommand.js +23 -0
- package/src/ui/mergefieldslistview.d.ts +22 -0
- package/src/ui/mergefieldslistview.js +23 -0
- package/src/ui/mergefieldspanelview.d.ts +16 -0
- package/src/ui/mergefieldspanelview.js +23 -0
- package/src/utils/common-translations.d.ts +9 -0
- package/src/utils/common-translations.js +23 -0
- package/theme/icons/insert-merge-field.svg +7 -0
- package/theme/icons/preview-merge-fields.svg +8 -0
- package/theme/icons/warning.svg +3 -0
- package/theme/insert-dropdown.css +48 -0
- package/theme/mergefields.css +121 -0
package/package.json
CHANGED
|
@@ -1,14 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ckeditor/ckeditor5-merge-fields",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "43.0.0-alpha.0",
|
|
4
|
+
"description": "Merge fields feature for CKEditor 5.",
|
|
4
5
|
"keywords": [
|
|
5
6
|
"ckeditor",
|
|
6
7
|
"ckeditor5",
|
|
7
8
|
"ckeditor 5",
|
|
8
|
-
"ckeditor5-
|
|
9
|
+
"ckeditor5-feature",
|
|
10
|
+
"ckeditor5-plugin"
|
|
9
11
|
],
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "src/index.js",
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"ckeditor5": "43.0.0-alpha.0",
|
|
16
|
+
"@ckeditor/ckeditor5-core": "43.0.0-alpha.0",
|
|
17
|
+
"@ckeditor/ckeditor5-engine": "43.0.0-alpha.0",
|
|
18
|
+
"@ckeditor/ckeditor5-ui": "43.0.0-alpha.0",
|
|
19
|
+
"@ckeditor/ckeditor5-utils": "43.0.0-alpha.0",
|
|
20
|
+
"@ckeditor/ckeditor5-widget": "43.0.0-alpha.0",
|
|
21
|
+
"lodash-es": "4.17.21"
|
|
22
|
+
},
|
|
23
|
+
"license": "SEE LICENSE IN LICENSE.md",
|
|
10
24
|
"author": "CKSource (http://cksource.com/)",
|
|
11
|
-
"license": "GPL-2.0-or-later",
|
|
12
25
|
"homepage": "https://ckeditor.com/ckeditor-5",
|
|
13
|
-
"bugs": "https://
|
|
26
|
+
"bugs": "https://support.ckeditor.com/hc/en-us/requests/new",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"lang",
|
|
30
|
+
"src/**/*.js",
|
|
31
|
+
"src/**/*.d.ts",
|
|
32
|
+
"theme",
|
|
33
|
+
"build",
|
|
34
|
+
"ckeditor5-metadata.json",
|
|
35
|
+
"CHANGELOG.md"
|
|
36
|
+
],
|
|
37
|
+
"types": "src/index.d.ts",
|
|
38
|
+
"obfuscated": true
|
|
14
39
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { MergeFields, MergeFieldsEditing, MergeFieldsUI } from './index.js';
|
|
6
|
+
import type InsertMergeFieldCommand from './insertmergefieldcommand.js';
|
|
7
|
+
import type PreviewMergeFieldsCommand from './previewmergefieldscommand.js';
|
|
8
|
+
import type { MergeFieldsConfig } from './mergefieldsconfig.js';
|
|
9
|
+
declare module '@ckeditor/ckeditor5-core' {
|
|
10
|
+
interface EditorConfig {
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for the merge fields feature.
|
|
13
|
+
*/
|
|
14
|
+
mergeFields?: MergeFieldsConfig;
|
|
15
|
+
}
|
|
16
|
+
interface PluginsMap {
|
|
17
|
+
[MergeFields.pluginName]: MergeFields;
|
|
18
|
+
[MergeFieldsEditing.pluginName]: MergeFieldsEditing;
|
|
19
|
+
[MergeFieldsUI.pluginName]: MergeFieldsUI;
|
|
20
|
+
}
|
|
21
|
+
interface CommandsMap {
|
|
22
|
+
insertMergeField: InsertMergeFieldCommand;
|
|
23
|
+
previewMergeFields: PreviewMergeFieldsCommand;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields
|
|
7
|
+
*/
|
|
8
|
+
export { default as MergeFields } from './mergefields.js';
|
|
9
|
+
export { default as MergeFieldsEditing } from './mergefieldsediting.js';
|
|
10
|
+
export { default as MergeFieldsUI } from './mergefieldsui.js';
|
|
11
|
+
export type { MergeFieldsConfig } from './mergefieldsconfig.js';
|
|
12
|
+
import './augmentation.js';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
(function(_0x26d4f3,_0x28e84f){var _0xef74cc=_0x19a5,_0x535541=_0x26d4f3();while(!![]){try{var _0x455b5d=parseInt(_0xef74cc(0xd5))/0x1+parseInt(_0xef74cc(0xce))/0x2*(-parseInt(_0xef74cc(0xd8))/0x3)+parseInt(_0xef74cc(0xcf))/0x4*(parseInt(_0xef74cc(0xd2))/0x5)+parseInt(_0xef74cc(0xd0))/0x6*(parseInt(_0xef74cc(0xd4))/0x7)+parseInt(_0xef74cc(0xd9))/0x8*(-parseInt(_0xef74cc(0xd7))/0x9)+parseInt(_0xef74cc(0xd6))/0xa+parseInt(_0xef74cc(0xd1))/0xb*(-parseInt(_0xef74cc(0xd3))/0xc);if(_0x455b5d===_0x28e84f)break;else _0x535541['push'](_0x535541['shift']());}catch(_0x3550ae){_0x535541['push'](_0x535541['shift']());}}}(_0x1708,0x48d42));export{default as MergeFields}from'./mergefields.js';function _0x19a5(_0x316776,_0x3db525){var _0x1708a5=_0x1708();return _0x19a5=function(_0x19a506,_0x52604c){_0x19a506=_0x19a506-0xce;var _0x520b34=_0x1708a5[_0x19a506];return _0x520b34;},_0x19a5(_0x316776,_0x3db525);}function _0x1708(){var _0x17de9c=['990rBtZqw','115341FIEOKn','23488qXsAwe','30yTJigW','183772GhEzFS','35868fUeTBn','11tbfOuw','55KeiekJ','5264796QfHQsq','427XfKhNK','179351sUorTE','5873220NSskEh'];_0x1708=function(){return _0x17de9c;};return _0x1708();}export{default as MergeFieldsEditing}from'./mergefieldsediting.js';export{default as MergeFieldsUI}from'./mergefieldsui.js';import'./augmentation.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/insertmergefieldcommand
|
|
7
|
+
*/
|
|
8
|
+
import { Command } from 'ckeditor5/src/core.js';
|
|
9
|
+
/**
|
|
10
|
+
* The insert merge field element command.
|
|
11
|
+
*
|
|
12
|
+
* The command is registered by {@link module:merge-fields/mergefieldsediting~MergeFieldsEditing} as `'insertMergeField'`.
|
|
13
|
+
*
|
|
14
|
+
* To insert a merge field element at the current selection, execute the command passing the merge field id as a parameter:
|
|
15
|
+
*
|
|
16
|
+
* ```ts
|
|
17
|
+
* editor.execute( 'insertMergeField', 'clientName' );
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export default class InsertMergeFieldCommand extends Command {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
refresh(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Inserts a new merge field element with the given `id` attribute at the current selection.
|
|
27
|
+
*
|
|
28
|
+
* @fires execute
|
|
29
|
+
*/
|
|
30
|
+
execute(mergeFieldId: string): void;
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x31b972=_0x5cb6;function _0x49eb(){const _0x1e80f4=['12320dxAdOa','change','execute','selection','5989145iFlEBa','getAttributes','283526QwRBfA','editor','isEnabled','refresh','model','createElement','checkAttribute','781592zoTyfM','document','deleteContent','mergeField','focus','schema','setAttribute','1251507KypSPi','8gcgEmo','string','insertContent','checkChild','226374tPkFSw','after','2934CeuqIs','189jnospq','564892KkwuXw'];_0x49eb=function(){return _0x1e80f4;};return _0x49eb();}(function(_0x427052,_0x200dd1){const _0x2077f9=_0x5cb6,_0x5615b4=_0x427052();while(!![]){try{const _0x986cb9=-parseInt(_0x2077f9(0xb4))/0x1+parseInt(_0x2077f9(0x9d))/0x2+-parseInt(_0x2077f9(0xab))/0x3*(parseInt(_0x2077f9(0xac))/0x4)+parseInt(_0x2077f9(0x9b))/0x5+-parseInt(_0x2077f9(0xb0))/0x6*(-parseInt(_0x2077f9(0xb3))/0x7)+parseInt(_0x2077f9(0xa4))/0x8+parseInt(_0x2077f9(0xb2))/0x9*(-parseInt(_0x2077f9(0xb5))/0xa);if(_0x986cb9===_0x200dd1)break;else _0x5615b4['push'](_0x5615b4['shift']());}catch(_0x4eebab){_0x5615b4['push'](_0x5615b4['shift']());}}}(_0x49eb,0x9ff08));function _0x5cb6(_0x5d5eda,_0x1232ed){const _0x49eb39=_0x49eb();return _0x5cb6=function(_0x5cb6c8,_0x2ec899){_0x5cb6c8=_0x5cb6c8-0x9b;let _0x1027f6=_0x49eb39[_0x5cb6c8];return _0x1027f6;},_0x5cb6(_0x5d5eda,_0x1232ed);}import{Command as _0x4c7b49}from'ckeditor5/src/core.js';export default class r extends _0x4c7b49{[_0x31b972(0xa0)](){const _0x20a57d=_0x31b972,_0x56f0ac=this[_0x20a57d(0x9e)][_0x20a57d(0xa1)],_0x5263a1=_0x56f0ac[_0x20a57d(0xa9)][_0x20a57d(0xaf)](_0x56f0ac[_0x20a57d(0xa5)][_0x20a57d(0xb8)][_0x20a57d(0xa8)],_0x20a57d(0xa7));this[_0x20a57d(0x9f)]=_0x5263a1;}[_0x31b972(0xb7)](_0x257997){const _0x9d5a19=_0x31b972;if(!_0x257997||_0x9d5a19(0xad)!=typeof _0x257997)return;const _0x27cb0e=this[_0x9d5a19(0x9e)][_0x9d5a19(0xa1)];_0x27cb0e[_0x9d5a19(0xb6)](_0x3199ff=>{const _0x5e9304=_0x9d5a19;_0x27cb0e[_0x5e9304(0xa6)](_0x27cb0e[_0x5e9304(0xa5)][_0x5e9304(0xb8)]);const _0x3773a=_0x3199ff[_0x5e9304(0xa2)](_0x5e9304(0xa7),{'id':_0x257997});for(const [_0x263074,_0x3644eb]of _0x27cb0e[_0x5e9304(0xa5)][_0x5e9304(0xb8)][_0x5e9304(0x9c)]())_0x27cb0e[_0x5e9304(0xa9)][_0x5e9304(0xa3)](_0x3773a,_0x263074)&&_0x3199ff[_0x5e9304(0xaa)](_0x263074,_0x3644eb,_0x3773a);_0x27cb0e[_0x5e9304(0xae)](_0x3773a,_0x27cb0e[_0x5e9304(0xa5)][_0x5e9304(0xb8)],0x0,{'setSelection':_0x5e9304(0xb1)});});}}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/mergefields
|
|
7
|
+
* @publicApi
|
|
8
|
+
*/
|
|
9
|
+
import { Plugin } from 'ckeditor5/src/core.js';
|
|
10
|
+
import { Widget } from 'ckeditor5/src/widget.js';
|
|
11
|
+
import MergeFieldsEditing from './mergefieldsediting.js';
|
|
12
|
+
import MergeFieldsUI from './mergefieldsui.js';
|
|
13
|
+
/**
|
|
14
|
+
* The merge fields feature.
|
|
15
|
+
*
|
|
16
|
+
* For a detailed overview, check the {@glink features/merge-fields Merge fields} feature documentation.
|
|
17
|
+
*
|
|
18
|
+
* @extends module:core/plugin~Plugin
|
|
19
|
+
*/
|
|
20
|
+
export default class MergeFields extends Plugin {
|
|
21
|
+
/**
|
|
22
|
+
* @inheritDoc
|
|
23
|
+
*/
|
|
24
|
+
static get requires(): readonly ["Mention", typeof MergeFieldsEditing, typeof MergeFieldsUI, typeof Widget];
|
|
25
|
+
/**
|
|
26
|
+
* @inheritDoc
|
|
27
|
+
*/
|
|
28
|
+
static get pluginName(): "MergeFields";
|
|
29
|
+
/**
|
|
30
|
+
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
31
|
+
*/
|
|
32
|
+
getMergeFieldsIds(): Array<string>;
|
|
33
|
+
/**
|
|
34
|
+
* Returns an object with default merge fields values.
|
|
35
|
+
*
|
|
36
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
37
|
+
*
|
|
38
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
39
|
+
*/
|
|
40
|
+
getDefaultValues(): MergeFieldsValues;
|
|
41
|
+
/**
|
|
42
|
+
* Returns an object with merge fields values defined for given data set.
|
|
43
|
+
*
|
|
44
|
+
* Custom merge fields (created by user, not defined in the config) will be returned as well, and their value will be set to `null`.
|
|
45
|
+
*
|
|
46
|
+
* Values defined as functions are evaluated and their result is returned.
|
|
47
|
+
*
|
|
48
|
+
* If the data set is not found, it throws an error.
|
|
49
|
+
*
|
|
50
|
+
* @param dataSetId
|
|
51
|
+
* @param useDefaultValues If set to `true`, merge field default value will be used for these merge fields, for which the data
|
|
52
|
+
* was not defined. If default value is not configured for given merge field, `null` will be still returned.
|
|
53
|
+
*/
|
|
54
|
+
getDataSetValues(dataSetId: string, useDefaultValues?: boolean): MergeFieldsValues;
|
|
55
|
+
}
|
|
56
|
+
export type MergeFieldsValues = Record<string, string | null>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x50e92d=_0x371c;(function(_0x3c3c0c,_0x411dc7){const _0x20f1d9=_0x371c,_0x4ad684=_0x3c3c0c();while(!![]){try{const _0x18d012=-parseInt(_0x20f1d9(0x1a3))/0x1*(-parseInt(_0x20f1d9(0x1a1))/0x2)+parseInt(_0x20f1d9(0x1a6))/0x3*(-parseInt(_0x20f1d9(0x1aa))/0x4)+-parseInt(_0x20f1d9(0x199))/0x5*(-parseInt(_0x20f1d9(0x1a5))/0x6)+parseInt(_0x20f1d9(0x19f))/0x7*(parseInt(_0x20f1d9(0x1a0))/0x8)+-parseInt(_0x20f1d9(0x194))/0x9+parseInt(_0x20f1d9(0x19c))/0xa*(parseInt(_0x20f1d9(0x19b))/0xb)+-parseInt(_0x20f1d9(0x19a))/0xc;if(_0x18d012===_0x411dc7)break;else _0x4ad684['push'](_0x4ad684['shift']());}catch(_0x2cdb9e){_0x4ad684['push'](_0x4ad684['shift']());}}}(_0x5f31,0x76c45));import{Plugin as _0x44f645}from'ckeditor5/src/core.js';import{Widget as _0x3726a0}from'ckeditor5/src/widget.js';function _0x5f31(){const _0x27fac5=['328LlaKgo','Mention','5521KWGKWE','getDataSetValues','12aoOxda','3rxmvBt','getMergeFieldValue','get','editor','2332720AWtcHL','plugins','2148795JknQSb','MergeFields','requires','getMergeFieldDefaultValue','pluginName','1647005XUxOKN','12725004ivoMIw','11JHEqLf','162490dLIiPp','getDefaultValues','getMergeFieldsIds','98QyCQVk','450472OfLkCi'];_0x5f31=function(){return _0x27fac5;};return _0x5f31();}import _0x40ceb from'./mergefieldsediting.js';import _0x2a2381 from'./mergefieldsui.js';function _0x371c(_0x4b38c1,_0x3c7181){const _0x5f31c7=_0x5f31();return _0x371c=function(_0x371cad,_0x2903c6){_0x371cad=_0x371cad-0x194;let _0x48bbde=_0x5f31c7[_0x371cad];return _0x48bbde;},_0x371c(_0x4b38c1,_0x3c7181);}export default class l extends _0x44f645{static get[_0x50e92d(0x196)](){const _0xc606c8=_0x50e92d;return[_0xc606c8(0x1a2),_0x40ceb,_0x2a2381,_0x3726a0];}static get[_0x50e92d(0x198)](){const _0x529315=_0x50e92d;return _0x529315(0x195);}[_0x50e92d(0x19e)](){const _0x13e078=_0x50e92d;return this[_0x13e078(0x1a9)][_0x13e078(0x1ab)][_0x13e078(0x1a8)](_0x40ceb)[_0x13e078(0x19e)]();}[_0x50e92d(0x19d)](){const _0x29e0c2=_0x50e92d,_0x56c781=this[_0x29e0c2(0x1a9)][_0x29e0c2(0x1ab)][_0x29e0c2(0x1a8)](_0x40ceb),_0x343791={},_0x14861f=this[_0x29e0c2(0x19e)]();for(const _0x16af5e of _0x14861f)_0x343791[_0x16af5e]=_0x56c781[_0x29e0c2(0x197)](_0x16af5e);return _0x343791;}[_0x50e92d(0x1a4)](_0x54d594,_0xb9138=!0x1){const _0x1058e9=_0x50e92d,_0x5e3b11=this[_0x1058e9(0x1a9)][_0x1058e9(0x1ab)][_0x1058e9(0x1a8)](_0x40ceb),_0x15733c={},_0x98fda=this[_0x1058e9(0x19e)]();for(const _0x2e52d0 of _0x98fda){let _0x179fa3=_0x5e3b11[_0x1058e9(0x1a7)](_0x2e52d0,_0x54d594);null===_0x179fa3&&_0xb9138&&(_0x179fa3=_0x5e3b11[_0x1058e9(0x197)](_0x2e52d0)),_0x15733c[_0x2e52d0]=_0x179fa3;}return _0x15733c;}}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import type { Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
/**
|
|
7
|
+
* @module merge-fields/mergefieldsconfig
|
|
8
|
+
* @publicApi
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The configuration of the merge fields feature.
|
|
12
|
+
*
|
|
13
|
+
* The properties defined in this config are set in the `config.mergeFields` namespace.
|
|
14
|
+
*
|
|
15
|
+
* ```ts
|
|
16
|
+
* ClassicEditor
|
|
17
|
+
* .create( editorElement, {
|
|
18
|
+
* mergeFields: {
|
|
19
|
+
* // Merge fields configuration.
|
|
20
|
+
* }
|
|
21
|
+
* } )
|
|
22
|
+
* .then( ... )
|
|
23
|
+
* .catch( ... );
|
|
24
|
+
* ```
|
|
25
|
+
*
|
|
26
|
+
* See {@link module:core/editor/editorconfig~EditorConfig all editor options}.
|
|
27
|
+
*/
|
|
28
|
+
export interface MergeFieldsConfig {
|
|
29
|
+
/**
|
|
30
|
+
* The definitions of the merge fields that can be used in the editor.
|
|
31
|
+
* It's allowed to define them in any combination of groups and individual merge fields.
|
|
32
|
+
* The order of the definitions is respected when displaying the merge fields in the UI dropdown
|
|
33
|
+
* except that merge fields that are not assigned to any group are displayed at the
|
|
34
|
+
* very bottom of the list.
|
|
35
|
+
*/
|
|
36
|
+
definitions?: Array<GroupDefinition | MergeFieldDefinition>;
|
|
37
|
+
/**
|
|
38
|
+
* A prefix used to identify merge fields in the editor data.
|
|
39
|
+
*
|
|
40
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
41
|
+
*
|
|
42
|
+
* @default '\{\{'
|
|
43
|
+
*/
|
|
44
|
+
prefix?: string;
|
|
45
|
+
/**
|
|
46
|
+
* A suffix used to identify merge fields in the editor data.
|
|
47
|
+
*
|
|
48
|
+
* The list of allowed characters includes: ``'"`!#%:;=@{}~$()*+/?[\]^|``.
|
|
49
|
+
*
|
|
50
|
+
* @default '\}\}'
|
|
51
|
+
*/
|
|
52
|
+
suffix?: string;
|
|
53
|
+
/**
|
|
54
|
+
* The data sets that can be displayed in place of the merge fields in the editor.
|
|
55
|
+
*
|
|
56
|
+
* @default []
|
|
57
|
+
*/
|
|
58
|
+
dataSets?: Array<DataSetDefinition>;
|
|
59
|
+
/**
|
|
60
|
+
* Determines the available preview modes in the dropdown and menu bar. Possible values are:
|
|
61
|
+
*
|
|
62
|
+
* * `'$labels'` - adds the option to display the labels of the merge fields.
|
|
63
|
+
* * `'$defaultValues'` - adds the option to display the default values.
|
|
64
|
+
* * `'$dataSets'` - adds the options to display each of the configured data sets.
|
|
65
|
+
*
|
|
66
|
+
* At least one mode must be enabled. If more than one preview mode is configured,
|
|
67
|
+
* you can add `previewMergeFields` button to the toolbar to switch between them,
|
|
68
|
+
* and the menu bar button will be added automatically to the `View` category.
|
|
69
|
+
*
|
|
70
|
+
* @default [ '$labels', '$defaultValues', '$dataSets' ]
|
|
71
|
+
*/
|
|
72
|
+
previewModes?: Array<string>;
|
|
73
|
+
/**
|
|
74
|
+
* A name of the preview mode that should be active when the editor is initialized. Possible values are:
|
|
75
|
+
*
|
|
76
|
+
* * `'$labels'` - displays the labels of the merge fields,
|
|
77
|
+
* * `'$defaultValues'` - displays the default values,
|
|
78
|
+
* * one of the configured {@link module:merge-fields/mergefieldsconfig~MergeFieldsConfig#dataSets data sets} identifiers.
|
|
79
|
+
*
|
|
80
|
+
* If not set, it will default to the one of the {@link ~MergeFieldsConfig#previewModes available preview modes}, with the priority as
|
|
81
|
+
* in the list above.
|
|
82
|
+
*/
|
|
83
|
+
initialPreviewMode?: string;
|
|
84
|
+
}
|
|
85
|
+
export type GroupDefinition = {
|
|
86
|
+
/**
|
|
87
|
+
* The unique identifier of the group.
|
|
88
|
+
*
|
|
89
|
+
* If {@link GroupDefinition#groupLabel} is not specified, the ID will be used as a label in the UI.
|
|
90
|
+
*/
|
|
91
|
+
groupId: string;
|
|
92
|
+
/**
|
|
93
|
+
* The human-readable label of the group.
|
|
94
|
+
*
|
|
95
|
+
* It is displayed by the feature's UI.
|
|
96
|
+
*/
|
|
97
|
+
groupLabel?: string;
|
|
98
|
+
/**
|
|
99
|
+
* The array of merge fields definitions that belong to the group.
|
|
100
|
+
*/
|
|
101
|
+
definitions: Array<MergeFieldDefinition>;
|
|
102
|
+
};
|
|
103
|
+
export type MergeFieldDefinition = {
|
|
104
|
+
/**
|
|
105
|
+
* The unique identifier of the merge field.
|
|
106
|
+
*
|
|
107
|
+
* If {@link MergeFieldDefinition#label} is not specified, the ID will be used as a label.
|
|
108
|
+
*
|
|
109
|
+
* The list of allowed characters includes: `a-z`, `A-Z`, `0-9`, `_`, `.`, and `-`.
|
|
110
|
+
*/
|
|
111
|
+
id: string;
|
|
112
|
+
/**
|
|
113
|
+
* The human-readable label of the merge field.
|
|
114
|
+
*
|
|
115
|
+
* It is displayed by the feature's UI and inside the editing area.
|
|
116
|
+
*/
|
|
117
|
+
label?: string;
|
|
118
|
+
/**
|
|
119
|
+
* Default value of the merge field.
|
|
120
|
+
*
|
|
121
|
+
* It is used if a value for given merge field has not been provided in a data set.
|
|
122
|
+
*/
|
|
123
|
+
defaultValue?: MergeFieldDataSetValue;
|
|
124
|
+
};
|
|
125
|
+
export type DataSetDefinition = {
|
|
126
|
+
/**
|
|
127
|
+
* A unique identifier of the data set. It cannot start with `$`, as it is reserved for internal use.
|
|
128
|
+
*/
|
|
129
|
+
id: string;
|
|
130
|
+
/**
|
|
131
|
+
* A human-readable label of the data set.
|
|
132
|
+
*/
|
|
133
|
+
label: string;
|
|
134
|
+
/**
|
|
135
|
+
* The data to be displayed in the editor in place of merge fields when the data set is previewed.
|
|
136
|
+
*
|
|
137
|
+
* The keys of this object are merge field IDs, while values are the merge field values, which can be strings or functions.
|
|
138
|
+
* If the value is specified as a function, it should return a string. The function will be evaluated each time the data set values
|
|
139
|
+
* are retrieved.
|
|
140
|
+
*
|
|
141
|
+
* ```ts
|
|
142
|
+
* const mergeFieldsConfig = {
|
|
143
|
+
* dataSets: [
|
|
144
|
+
* id: 'customDataSet',
|
|
145
|
+
* values: {
|
|
146
|
+
* companyName: 'CKSource',
|
|
147
|
+
* productName: 'CKEditor 5'
|
|
148
|
+
* }
|
|
149
|
+
* ]
|
|
150
|
+
* };
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
values: Record<string, MergeFieldDataSetValue>;
|
|
154
|
+
};
|
|
155
|
+
export type MergeFieldDataSetValue = string | ((editor: Editor) => string);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
export{};
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
6
|
+
import type { MergeFieldDefinition } from './mergefieldsconfig.js';
|
|
7
|
+
/**
|
|
8
|
+
* The merge fields editing feature.
|
|
9
|
+
*/
|
|
10
|
+
export default class MergeFieldsEditing extends Plugin {
|
|
11
|
+
licenseKey: string;
|
|
12
|
+
/**
|
|
13
|
+
* The current preview mode for merge fields. Determines the merge field values displayed in the editor.
|
|
14
|
+
*
|
|
15
|
+
* @observable
|
|
16
|
+
*/
|
|
17
|
+
previewMode: string;
|
|
18
|
+
/**
|
|
19
|
+
* All configured preview modes, available to be set as a value for {@link #previewMode}.
|
|
20
|
+
*/
|
|
21
|
+
readonly availablePreviewModes: Array<string>;
|
|
22
|
+
/**
|
|
23
|
+
* A flat list of all merge field definitions.
|
|
24
|
+
*/
|
|
25
|
+
flattenedMergeFieldDefinitions: Array<MergeFieldDefinition>;
|
|
26
|
+
/**
|
|
27
|
+
* @inheritDoc
|
|
28
|
+
*/
|
|
29
|
+
static get pluginName(): "MergeFieldsEditing";
|
|
30
|
+
/**
|
|
31
|
+
* @inheritDoc
|
|
32
|
+
*/
|
|
33
|
+
constructor(editor: Editor);
|
|
34
|
+
/**
|
|
35
|
+
* @inheritDoc
|
|
36
|
+
*/
|
|
37
|
+
init(): void;
|
|
38
|
+
/**
|
|
39
|
+
* Retrieves the label for the merge field with the given id.
|
|
40
|
+
*
|
|
41
|
+
* If the merge field definition for given id was not found, or a label was not specified, the merge field id is returned instead.
|
|
42
|
+
*/
|
|
43
|
+
getLabel(id: string): string;
|
|
44
|
+
/**
|
|
45
|
+
* Returns the default value for the merge field with the given id.
|
|
46
|
+
*
|
|
47
|
+
* If the merge field default value was specified as a callback, it will be executed and the result will be returned.
|
|
48
|
+
*
|
|
49
|
+
* If the merge field definition for given id was not found, or a default value was not specified, `null` is returned.
|
|
50
|
+
*/
|
|
51
|
+
getMergeFieldDefaultValue(id: string): string | null;
|
|
52
|
+
/**
|
|
53
|
+
* Returns the value specified for merge field with the given in given data set.
|
|
54
|
+
*
|
|
55
|
+
* If the merge field value was specified as a callback, it will be executed and the result will be returned.
|
|
56
|
+
*
|
|
57
|
+
* If the merge field definition for given id was not found, or the data set has no value for this merge field, `null` is returned.
|
|
58
|
+
*/
|
|
59
|
+
getMergeFieldValue(id: string, dataSetId: string): string | null;
|
|
60
|
+
/**
|
|
61
|
+
* Returns ids of all merge fields that are present in the document.
|
|
62
|
+
*/
|
|
63
|
+
getDocumentMergeFieldsIds(): Array<string>;
|
|
64
|
+
/**
|
|
65
|
+
* Returns ids of all merge fields defined in the configuration and custom merge fields added by the user that exist in the document.
|
|
66
|
+
*/
|
|
67
|
+
getMergeFieldsIds(): Array<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Returns the merge field definition for the given id.
|
|
70
|
+
*/
|
|
71
|
+
getDefinition(id: string): MergeFieldDefinition;
|
|
72
|
+
/**
|
|
73
|
+
* @inheritDoc
|
|
74
|
+
*/
|
|
75
|
+
destroy(): void;
|
|
76
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
*
|
|
7
|
+
* +---------------------------------------------------------------------------------+
|
|
8
|
+
* | |
|
|
9
|
+
* | Hello stranger! |
|
|
10
|
+
* | |
|
|
11
|
+
* | |
|
|
12
|
+
* | What you're currently looking at is the source code of a legally protected, |
|
|
13
|
+
* | proprietary software. Any attempts to deobfuscate / disassemble this code |
|
|
14
|
+
* | are forbidden and will result in legal consequences. |
|
|
15
|
+
* | |
|
|
16
|
+
* | |
|
|
17
|
+
* +---------------------------------------------------------------------------------+
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
*
|
|
21
|
+
*
|
|
22
|
+
*/
|
|
23
|
+
const _0x31fa99=_0x4e99;function _0x3ac7(){const _0x469bd2=['defaultValue','availablePreviewModes','ck-merge-field__icon','mergeFieldsLicenseKeyTrialLimit:operations','innerHTML','merge-fields-invalid-license-key','upcast','764SSzkhr','createUIElement','dataDowncast','value','_registerConversionPostFixer','from','_getDefaultDefinition','element','length','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_no-default','mergeFields.definitions','editing','startOffset','change:data','render','definitions','merge-fields-duplicate-data-set-id','getDocumentMergeFieldsIds','mergeFieldStatus','_validateConfig','has','mergeFields.prefix','start','appendChild','type','6laTHbe','reconvertItem','WARNING_MISSING_DEFINITION','every','2319219DHzEZS','WARNING_MISSING_DATA_USED_DEFAULT_VALUE','_createTextualMergeField','checkChild','insert','\x20]+','reverse','$labels','mergeFields.initialPreviewMode','set','ck-merge-field\x20ck-merge-field_with-value','position','index','function','merge-fields-invalid-id','_defineConverters','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-definition','2422432NIOMWz','merge-fields-invalid-preview-modes-configuration','_trackAddedMergeFields','domConverter','createPositionAt','previewMode','getChanges','getShiftedBy','mergeFields.previewModes','_mergeFieldPrefix','document','push','offsetSize','schema','mapper','mergeFields.dataSets','_getAvailablePreviewModes','_mergeFieldElements','groupId','getAttribute','createContainerElement','merge-fields-duplicate-group-id','_refreshMergeFields','getChildren','createElement','_mergeFieldSuffix','flattenedMergeFieldDefinitions','data','createRange','merge-fields-data-set-not-found','test','parent','toDomElement','for','getMergeFieldValue','createText','modelCursor','mergeFieldsData','ck-merge-field__content','forEach','insertMergeField','$dataSets','getMergeFieldsIds','4LQrocr','remove','_licenseKeyCheckInterval','3683743DwWXmg','merge-fields-prefix-and-suffix-must-differ','includes','listenTo','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_missing-data','define','335029WacFxR','nextSibling','values','ck-merge-field\x20ck-merge-field_with-warning\x20ck-merge-field_with-warning_default-value-used','merge-fields-invalid-prefix-or-suffix','_getFlattenedMergeFieldDefinitions','view','mergeFieldsLicenseKeyInvalid','label','_mergeFieldRegExp','WARNING_MISSING_DATA','change:previewMode','merge-fields-duplicate-merge-field-id','text','get','next','map','You\x20are\x20using\x20the\x20trial\x20version\x20of\x20CKEditor\x205\x20format\x20painter\x20plugin\x20with\x20limited\x20usage.\x20Make\x20sure\x20you\x20will\x20not\x20use\x20it\x20in\x20the\x20production\x20environment.','bind','getMergeFieldDefaultValue','mergeFieldsLicenseKeyValid','mergeFields.suffix','span','conversion','213UwGmdY','65395nvHrqb','merge-fields-trial-license-key-reached-limit-changes','getAttributes','WARNING_MISSING_DEFAULT_VALUE','mergeFieldsLicenseKeyTrial','_validatePreviewMode','commands','match','_prepareViewElementData','isLocal','init','matchAll','concat','delete','mergeField','insertObject','viewToModelPosition','add','_createMergeFieldWidget','$text','differ','getDefinition','destroy','setCustomProperty','hasClass','$defaultValues','createRangeIn','pluginName','consume','licenseKey','split','registerPostFixer','elementToElement','model','$inlineObject','dataPipeline:transparentRendering','find','10683970uzNJKc','previewMergeFields','rootName','slice','ck-merge-field','reduce','register','join','name','22giDnJA','registerInlineObjectMatcher','batch','getLabel','config','_defineSchema','info','editor','filter','root','editingDowncast','MergeFieldsEditing','modelRange','ck-merge-field__affix','getItems','$graveyard','nodeAfter','merge-fields-invalid-preview-mode-set'];_0x3ac7=function(){return _0x469bd2;};return _0x3ac7();}(function(_0x2c16f1,_0x3675ee){const _0x457897=_0x4e99,_0x298df0=_0x2c16f1();while(!![]){try{const _0x1ff019=parseInt(_0x457897(0x1f8))/0x1*(-parseInt(_0x457897(0x1ef))/0x2)+-parseInt(_0x457897(0x210))/0x3*(-parseInt(_0x457897(0x258))/0x4)+-parseInt(_0x457897(0x211))/0x5+parseInt(_0x457897(0x271))/0x6*(-parseInt(_0x457897(0x1f2))/0x7)+-parseInt(_0x457897(0x286))/0x8+-parseInt(_0x457897(0x275))/0x9+-parseInt(_0x457897(0x236))/0xa*(-parseInt(_0x457897(0x23f))/0xb);if(_0x1ff019===_0x3675ee)break;else _0x298df0['push'](_0x298df0['shift']());}catch(_0x33290b){_0x298df0['push'](_0x298df0['shift']());}}}(_0x3ac7,0x5ce3a));import{toWidget as _0x3ba111,viewToModelPositionOutsideModelElement as _0x3efa52}from'ckeditor5/src/widget.js';import{Plugin as _0x3e546a}from'ckeditor5/src/core.js';import{IconView as _0x5e0b57}from'ckeditor5/src/ui.js';import{isParagraphable as _0x2cb83e,wrapInParagraph as _0x4231a5}from'ckeditor5/src/engine.js';import{CKEditorError as _0x23cd23}from'ckeditor5/src/utils.js';import _0x3d7cdb from'./insertmergefieldcommand.js';function _0x4e99(_0x2744b7,_0xbe9e00){const _0x3ac76d=_0x3ac7();return _0x4e99=function(_0x4e991f,_0x19bd99){_0x4e991f=_0x4e991f-0x1d1;let _0x5c0da8=_0x3ac76d[_0x4e991f];return _0x5c0da8;},_0x4e99(_0x2744b7,_0xbe9e00);}import _0x4722a1 from'./previewmergefieldscommand.js';import _0x2a1d10 from'../theme/icons/warning.svg';export default class o extends _0x3e546a{static get[_0x31fa99(0x22c)](){const _0x14c735=_0x31fa99;return _0x14c735(0x24a);}constructor(_0x256de7){const _0x241c6e=_0x31fa99;super(_0x256de7),this[_0x241c6e(0x1de)]=[],_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x1f7)](_0x241c6e(0x28e),[_0x241c6e(0x27c),_0x241c6e(0x22a),_0x241c6e(0x1ed)]),_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x1f7)](_0x241c6e(0x1d3),[]),_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x1f7)](_0x241c6e(0x262),[]),_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x1f7)](_0x241c6e(0x26d),'{{'),_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x1f7)](_0x241c6e(0x20d),'}}'),this[_0x241c6e(0x28f)]=_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x206)](_0x241c6e(0x26d)),this[_0x241c6e(0x1dd)]=_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x206)](_0x241c6e(0x20d)),this[_0x241c6e(0x1de)]=this[_0x241c6e(0x1fd)](),this[_0x241c6e(0x26b)]();const _0x277ad1='\x5c'+this[_0x241c6e(0x28f)][_0x241c6e(0x22f)]('')[_0x241c6e(0x23d)]('\x5c'),_0x542851='\x5c'+this[_0x241c6e(0x1dd)][_0x241c6e(0x22f)]('')[_0x241c6e(0x23d)]('\x5c');this[_0x241c6e(0x201)]=new RegExp('('+_0x277ad1+'[^'+(_0x277ad1+_0x542851)+_0x241c6e(0x27a)+_0x542851+')','g'),this[_0x241c6e(0x252)]=this[_0x241c6e(0x1d4)]();const _0x4a0a22=_0x256de7[_0x241c6e(0x243)][_0x241c6e(0x206)](_0x241c6e(0x27d))||this[_0x241c6e(0x252)][0x0];this[_0x241c6e(0x216)](_0x4a0a22),this[_0x241c6e(0x27e)](_0x241c6e(0x28b),_0x4a0a22),this[_0x241c6e(0x1d5)]=new Set(),this[_0x241c6e(0x1f1)]=null;}[_0x31fa99(0x21b)](){const _0x2617ca=_0x31fa99,_0x23ab7c=this[_0x2617ca(0x246)];_0x23ab7c[_0x2617ca(0x217)][_0x2617ca(0x222)](_0x2617ca(0x1ec),new _0x3d7cdb(_0x23ab7c)),_0x23ab7c[_0x2617ca(0x217)][_0x2617ca(0x222)](_0x2617ca(0x237),new _0x4722a1(_0x23ab7c)),this[_0x2617ca(0x244)](),this[_0x2617ca(0x284)](),this['on'](_0x2617ca(0x203),(_0xd97721,_0x58f199,_0x4ef6aa)=>{const _0x5696ea=_0x2617ca;this[_0x5696ea(0x216)](_0x4ef6aa),this[_0x5696ea(0x1da)]();}),this[_0x2617ca(0x1f5)](_0x23ab7c[_0x2617ca(0x232)][_0x2617ca(0x290)],_0x2617ca(0x265),()=>{const _0x450181=_0x2617ca;this[_0x450181(0x288)]();}),_0x23ab7c[_0x2617ca(0x263)][_0x2617ca(0x1d2)]['on'](_0x2617ca(0x221),_0x3efa52(_0x23ab7c[_0x2617ca(0x232)],_0x508b8b=>_0x508b8b[_0x2617ca(0x229)](_0x2617ca(0x23a)))),this[_0x2617ca(0x25c)](),_0x23ab7c[_0x2617ca(0x263)][_0x2617ca(0x1fe)][_0x2617ca(0x289)][_0x2617ca(0x240)]({'name':_0x2617ca(0x20e),'classes':[_0x2617ca(0x23a)]}),this[_0x2617ca(0x22e)]=_0x23ab7c[_0x2617ca(0x243)][_0x2617ca(0x206)](_0x2617ca(0x22e));const _0x4dce60=this[_0x2617ca(0x246)];this[_0x2617ca(0x1f1)]=setInterval(()=>{const _0x2d6492=_0x2617ca;let _0x28669c;for(const _0x28561e in _0x4dce60){const _0x184cfe=_0x28561e,_0x52efa2=_0x4dce60[_0x184cfe];if(_0x2d6492(0x215)===_0x52efa2||_0x2d6492(0x1ff)===_0x52efa2||_0x2d6492(0x20c)===_0x52efa2||_0x2d6492(0x254)===_0x52efa2){delete _0x4dce60[_0x184cfe],_0x28669c=_0x52efa2;break;}}if(_0x2d6492(0x1ff)===_0x28669c)throw clearInterval(this[_0x2d6492(0x1f1)]),new _0x23cd23(_0x2d6492(0x256),null);if(_0x2d6492(0x215)===_0x28669c&&console[_0x2d6492(0x245)](_0x2d6492(0x209)),_0x2d6492(0x254)===_0x28669c)throw clearInterval(this[_0x2d6492(0x1f1)]),new _0x23cd23(_0x2d6492(0x212),null);_0x2d6492(0x20c)===_0x28669c&&clearInterval(this[_0x2d6492(0x1f1)]);},0x3e8);}[_0x31fa99(0x242)](_0x32a3d7){const _0x3d2fc6=_0x31fa99,_0x9113c=this[_0x3d2fc6(0x226)](_0x32a3d7);return _0x9113c[_0x3d2fc6(0x200)]||_0x9113c['id'];}[_0x31fa99(0x20b)](_0x875854){const _0x547c1d=_0x31fa99,_0x91186d=this[_0x547c1d(0x226)](_0x875854);return void 0x0===_0x91186d[_0x547c1d(0x251)]?null:_0x547c1d(0x282)==typeof _0x91186d[_0x547c1d(0x251)]?_0x91186d[_0x547c1d(0x251)](this[_0x547c1d(0x246)]):_0x91186d[_0x547c1d(0x251)];}[_0x31fa99(0x1e6)](_0x298438,_0x44b0f2){const _0x1d7836=_0x31fa99,_0x37755e=this[_0x1d7836(0x246)][_0x1d7836(0x243)][_0x1d7836(0x206)](_0x1d7836(0x1d3))[_0x1d7836(0x235)](_0x1700e3=>_0x1700e3['id']===_0x44b0f2);if(!_0x37755e)throw new _0x23cd23(_0x1d7836(0x1e1),null);const _0xdf95c4=this[_0x1d7836(0x226)](_0x298438),_0x99d9fc=_0x37755e[_0x1d7836(0x1fa)][_0xdf95c4['id']];return void 0x0===_0x99d9fc?null:_0x1d7836(0x282)==typeof _0x99d9fc?_0x99d9fc(this[_0x1d7836(0x246)]):_0x99d9fc;}[_0x31fa99(0x269)](){const _0xea50bc=_0x31fa99,_0x19479f=new Set();for(const _0x4310ef of this[_0xea50bc(0x1d5)])_0xea50bc(0x24e)!==_0x4310ef[_0xea50bc(0x248)][_0xea50bc(0x238)]&&_0x19479f[_0xea50bc(0x222)](_0x4310ef[_0xea50bc(0x1d7)]('id'));return Array[_0xea50bc(0x25d)](_0x19479f);}[_0x31fa99(0x1ee)](){const _0x5edc1c=_0x31fa99,_0x36ed52=this[_0x5edc1c(0x1de)][_0x5edc1c(0x208)](_0x314f93=>_0x314f93['id']),_0x37a8dd=this[_0x5edc1c(0x269)]();return Array[_0x5edc1c(0x25d)](new Set([..._0x36ed52,..._0x37a8dd]));}[_0x31fa99(0x226)](_0x144409){const _0x120723=_0x31fa99;return this[_0x120723(0x1de)][_0x120723(0x235)](_0x18ad14=>_0x18ad14['id']===_0x144409)||this[_0x120723(0x25e)](_0x144409);}[_0x31fa99(0x227)](){const _0x33568f=_0x31fa99;this[_0x33568f(0x1f1)]&&clearInterval(this[_0x33568f(0x1f1)]);}[_0x31fa99(0x1fd)](){const _0x3d786a=_0x31fa99,_0x3b26c3=new Set(),_0x457b14=this[_0x3d786a(0x246)];return _0x457b14[_0x3d786a(0x243)][_0x3d786a(0x206)](_0x3d786a(0x262))[_0x3d786a(0x23b)]((_0x514e70,_0x5ad495)=>{const _0x34456e=_0x3d786a;if(_0x34456e(0x1d6)in _0x5ad495){if(_0x3b26c3[_0x34456e(0x26c)](_0x5ad495[_0x34456e(0x1d6)]))throw new _0x23cd23(_0x34456e(0x1d9),_0x457b14,{'duplicateId':_0x5ad495[_0x34456e(0x1d6)]});_0x3b26c3[_0x34456e(0x222)](_0x5ad495[_0x34456e(0x1d6)]);}return _0x34456e(0x1d6)in _0x5ad495?function(_0x15566f,_0x2760e0){const _0x57fd41=_0x34456e;for(const _0x5bfaa6 of _0x2760e0[_0x57fd41(0x267)])_0x15566f=_0x15566f[_0x57fd41(0x21d)](_0x5bfaa6);return _0x15566f;}[_0x34456e(0x20a)](_0x457b14)(_0x514e70,_0x5ad495):_0x514e70[_0x34456e(0x21d)](_0x5ad495);},new Array());}[_0x31fa99(0x26b)](){const _0x577b5c=_0x31fa99,_0x470557=/^['"`!#%:;=@{}~$()*+/?[\\\]^|]+$/;if(!_0x470557[_0x577b5c(0x1e2)](this[_0x577b5c(0x28f)])||!_0x470557[_0x577b5c(0x1e2)](this[_0x577b5c(0x1dd)]))throw new _0x23cd23(_0x577b5c(0x1fc),this,{'prefix':this[_0x577b5c(0x28f)],'suffix':this[_0x577b5c(0x1dd)]});const _0x13dbf2=/^[a-zA-Z0-9_.-]+$/,_0x475426=new Set();if(this[_0x577b5c(0x1de)][_0x577b5c(0x208)](_0x3d3073=>{const _0x174f1f=_0x577b5c;if(!_0x13dbf2[_0x174f1f(0x1e2)](_0x3d3073['id']))throw new _0x23cd23(_0x174f1f(0x283),this,{'incorrectId':_0x3d3073['id']});if(_0x475426[_0x174f1f(0x26c)](_0x3d3073['id']))throw new _0x23cd23(_0x174f1f(0x204),this,{'duplicateId':_0x3d3073['id']});_0x475426[_0x174f1f(0x222)](_0x3d3073['id']);}),this[_0x577b5c(0x28f)]===this[_0x577b5c(0x1dd)])throw new _0x23cd23(_0x577b5c(0x1f3),this);const _0x4a958c=this[_0x577b5c(0x246)][_0x577b5c(0x243)][_0x577b5c(0x206)](_0x577b5c(0x28e)),_0x5a683f=[_0x577b5c(0x27c),_0x577b5c(0x22a),_0x577b5c(0x1ed)];if(!_0x4a958c[_0x577b5c(0x260)]||!_0x4a958c[_0x577b5c(0x274)](_0xa4c626=>_0x5a683f[_0x577b5c(0x1f4)](_0xa4c626)))throw new _0x23cd23(_0x577b5c(0x287),this,{'invalidConfig':_0x4a958c});const _0x46d6a0=new Set(),_0x213e19=this[_0x577b5c(0x246)][_0x577b5c(0x243)][_0x577b5c(0x206)](_0x577b5c(0x1d3));for(const _0x1ab3c1 of _0x213e19){if(_0x46d6a0[_0x577b5c(0x26c)](_0x1ab3c1['id']))throw new _0x23cd23(_0x577b5c(0x268),this,{'duplicateId':_0x1ab3c1['id']});_0x46d6a0[_0x577b5c(0x222)](_0x1ab3c1['id']);}}[_0x31fa99(0x1d4)](){const _0x2f092e=_0x31fa99,_0x4b240d=this[_0x2f092e(0x246)][_0x2f092e(0x243)][_0x2f092e(0x206)](_0x2f092e(0x28e)),_0x4389fc=[];if(_0x4b240d[_0x2f092e(0x1f4)](_0x2f092e(0x27c))&&_0x4389fc[_0x2f092e(0x291)](_0x2f092e(0x27c)),_0x4b240d[_0x2f092e(0x1f4)](_0x2f092e(0x22a))&&_0x4389fc[_0x2f092e(0x291)](_0x2f092e(0x22a)),_0x4b240d[_0x2f092e(0x1f4)](_0x2f092e(0x1ed))){const _0x5f304f=this[_0x2f092e(0x246)][_0x2f092e(0x243)][_0x2f092e(0x206)](_0x2f092e(0x1d3));_0x4389fc[_0x2f092e(0x291)](..._0x5f304f[_0x2f092e(0x208)](_0x1b297d=>_0x1b297d['id']));}return _0x4389fc;}[_0x31fa99(0x244)](){const _0x58e369=_0x31fa99;this[_0x58e369(0x246)][_0x58e369(0x232)][_0x58e369(0x1d1)][_0x58e369(0x23c)](_0x58e369(0x21f),{'inheritAllFrom':_0x58e369(0x233),'allowAttributes':['id'],'allowWhere':_0x58e369(0x224)});}[_0x31fa99(0x284)](){const _0x3c175f=_0x31fa99,_0x187efa=this[_0x3c175f(0x246)][_0x3c175f(0x20f)];_0x187efa[_0x3c175f(0x1e5)](_0x3c175f(0x257))[_0x3c175f(0x222)](_0x4f7541=>{const _0x196bd=_0x3c175f;_0x4f7541['on'](_0x196bd(0x205),(_0x8f0c3,_0x3c1e67,_0xb2130f)=>{const _0x1951e2=_0x196bd,{consumable:_0x4ef90e,writer:_0x1b5538,schema:_0x32cb18}=_0xb2130f,{viewItem:_0x3ad424}=_0x3c1e67;if(!_0x4ef90e[_0x1951e2(0x1e2)](_0x3ad424))return;const _0x86e6f9=_0x3ad424[_0x1951e2(0x1df)][_0x1951e2(0x22f)](this[_0x1951e2(0x201)])[_0x1951e2(0x247)](_0x3ab6ba=>_0x3ab6ba);if(0x1!==_0x86e6f9[_0x1951e2(0x260)]||_0x86e6f9[0x0][_0x1951e2(0x218)](this[_0x1951e2(0x201)])){if(!_0x32cb18[_0x1951e2(0x278)](_0x3c1e67[_0x1951e2(0x1e8)],_0x1951e2(0x224))){if(!_0x2cb83e(_0x3c1e67[_0x1951e2(0x1e8)],_0x1951e2(0x224),_0x32cb18))return;_0x3c1e67[_0x1951e2(0x1e8)]=_0x4231a5(_0x3c1e67[_0x1951e2(0x1e8)],_0x1b5538);}_0x4ef90e[_0x1951e2(0x22d)](_0x3ad424);for(const _0x37f116 of _0x86e6f9){const _0x46da6f=_0x3c1e67[_0x1951e2(0x1e8)];let _0x212735;if(_0x37f116[_0x1951e2(0x218)](this[_0x1951e2(0x201)])){const _0xc03dc4=_0x37f116[_0x1951e2(0x239)](this[_0x1951e2(0x28f)][_0x1951e2(0x260)],_0x37f116[_0x1951e2(0x260)]-this[_0x1951e2(0x1dd)][_0x1951e2(0x260)]);_0x212735=_0x1b5538[_0x1951e2(0x1dc)](_0x1951e2(0x21f),{'id':_0xc03dc4});}else _0x212735=_0x1b5538[_0x1951e2(0x1e7)](_0x37f116);_0x1b5538[_0x1951e2(0x279)](_0x212735,_0x46da6f),_0x3c1e67[_0x1951e2(0x1e8)]=_0x46da6f[_0x1951e2(0x28d)](_0x212735[_0x1951e2(0x292)]),_0x3c1e67[_0x1951e2(0x24b)]=_0x1b5538[_0x1951e2(0x1e0)](_0x3c1e67[_0x1951e2(0x24b)]?_0x3c1e67[_0x1951e2(0x24b)][_0x1951e2(0x26e)]:_0x46da6f,_0x3c1e67[_0x1951e2(0x1e8)]);}}});}),_0x187efa[_0x3c175f(0x1e5)](_0x3c175f(0x249))[_0x3c175f(0x231)]({'model':_0x3c175f(0x21f),'view':(_0x282562,{writer:_0x557518})=>this[_0x3c175f(0x223)](_0x282562,_0x557518)}),_0x187efa[_0x3c175f(0x1e5)](_0x3c175f(0x25a))[_0x3c175f(0x231)]({'model':_0x3c175f(0x21f),'view':(_0x30b5c3,{writer:_0x44972b,options:_0x4c6fa7})=>this[_0x3c175f(0x277)](_0x30b5c3,_0x44972b,_0x4c6fa7[_0x3c175f(0x1e9)])});}[_0x31fa99(0x223)](_0x405300,_0x222071){const _0x1bc939=_0x31fa99,{label:_0x284558,classes:_0x353136,status:_0x589fbc}=this[_0x1bc939(0x219)](_0x405300),_0x292889=this[_0x1bc939(0x28f)],_0x4adc59=this[_0x1bc939(0x1dd)];let _0x5ce83a;return _0x1bc939(0x27c)===this[_0x1bc939(0x28b)]?_0x5ce83a=_0x222071[_0x1bc939(0x1d8)](_0x1bc939(0x20e),{'class':_0x353136},[_0x222071[_0x1bc939(0x259)](_0x1bc939(0x20e),{'class':_0x1bc939(0x24c)},function(_0x2bc13b){const _0x208431=_0x1bc939,_0x4e0945=this[_0x208431(0x1e4)](_0x2bc13b);return _0x4e0945[_0x208431(0x255)]=_0x292889,_0x4e0945;}),_0x222071[_0x1bc939(0x1d8)](_0x1bc939(0x20e),{'class':_0x1bc939(0x1ea)},_0x222071[_0x1bc939(0x1e7)](String(_0x284558))),_0x222071[_0x1bc939(0x259)](_0x1bc939(0x20e),{'class':_0x1bc939(0x24c)},function(_0x20950b){const _0x359dee=_0x1bc939,_0x21d61c=this[_0x359dee(0x1e4)](_0x20950b);return _0x21d61c[_0x359dee(0x255)]=_0x4adc59,_0x21d61c;})]):_0x589fbc?(_0x5ce83a=_0x222071[_0x1bc939(0x1d8)](_0x1bc939(0x20e),{'class':_0x353136},[_0x222071[_0x1bc939(0x1e7)](String(_0x284558)),_0x222071[_0x1bc939(0x259)](_0x1bc939(0x20e),{'class':_0x1bc939(0x253)},function(_0x1d4f73){const _0x5e6c40=_0x1bc939,_0x2c01b8=this[_0x5e6c40(0x1e4)](_0x1d4f73),_0x5c9697=new _0x5e0b57();return _0x5c9697[_0x5e6c40(0x27e)]({'content':_0x2a1d10}),_0x5c9697[_0x5e6c40(0x266)](),_0x2c01b8[_0x5e6c40(0x26f)](_0x5c9697[_0x5e6c40(0x25f)]),_0x2c01b8;})]),_0x222071[_0x1bc939(0x228)](_0x1bc939(0x26a),_0x589fbc,_0x5ce83a)):_0x5ce83a=_0x222071[_0x1bc939(0x1d8)](_0x1bc939(0x20e),{'class':_0x353136},[_0x222071[_0x1bc939(0x1e7)](String(_0x284558))]),_0x222071[_0x1bc939(0x228)](_0x1bc939(0x21f),!0x0,_0x5ce83a),_0x3ba111(_0x5ce83a,_0x222071);}[_0x31fa99(0x219)](_0x555a5a){const _0x55c66c=_0x31fa99,_0x18f2f4=this[_0x55c66c(0x1de)][_0x55c66c(0x235)](_0x13261a=>_0x13261a['id']===_0x555a5a[_0x55c66c(0x1d7)]('id'));if(!_0x18f2f4)return _0x55c66c(0x27c)===this[_0x55c66c(0x28b)]?{'label':_0x555a5a[_0x55c66c(0x1d7)]('id'),'classes':_0x55c66c(0x23a)}:{'label':_0x555a5a[_0x55c66c(0x1d7)]('id'),'classes':_0x55c66c(0x285),'status':_0x55c66c(0x273)};const _0x31d800=this[_0x55c66c(0x242)](_0x18f2f4['id']),_0x30fe63=this[_0x55c66c(0x20b)](_0x555a5a[_0x55c66c(0x1d7)]('id'));if(_0x55c66c(0x27c)===this[_0x55c66c(0x28b)])return{'label':_0x31d800,'classes':_0x55c66c(0x23a)};if(_0x55c66c(0x22a)===this[_0x55c66c(0x28b)])return _0x30fe63?{'label':_0x30fe63,'classes':_0x55c66c(0x27f)}:{'label':_0x31d800,'classes':_0x55c66c(0x261),'status':_0x55c66c(0x214)};const _0x185108=this[_0x55c66c(0x246)][_0x55c66c(0x243)][_0x55c66c(0x206)](_0x55c66c(0x1d3))[_0x55c66c(0x235)](_0xaf3a15=>_0xaf3a15['id']===this[_0x55c66c(0x28b)])[_0x55c66c(0x1fa)][_0x18f2f4['id']];return _0x185108?{'label':_0x55c66c(0x282)==typeof _0x185108?_0x185108(this[_0x55c66c(0x246)]):_0x185108,'classes':_0x55c66c(0x27f)}:_0x30fe63?{'label':_0x30fe63,'classes':_0x55c66c(0x1fb),'status':_0x55c66c(0x276)}:{'label':_0x31d800,'classes':_0x55c66c(0x1f6),'status':_0x55c66c(0x202)};}[_0x31fa99(0x277)](_0x480894,_0x27fd33,_0x21ac76){const _0x4bf676=_0x31fa99,_0x5b715e=_0x480894[_0x4bf676(0x1d7)]('id'),_0x2144e8=_0x21ac76&&_0x21ac76[_0x5b715e]?_0x21ac76[_0x5b715e]:this[_0x4bf676(0x28f)]+_0x5b715e+this[_0x4bf676(0x1dd)],_0x123f1d=_0x27fd33[_0x4bf676(0x1e7)](_0x2144e8),_0x517ec2=_0x27fd33[_0x4bf676(0x1d8)](_0x4bf676(0x20e));return _0x27fd33[_0x4bf676(0x228)](_0x4bf676(0x234),!0x0,_0x517ec2),_0x27fd33[_0x4bf676(0x279)](_0x27fd33[_0x4bf676(0x28a)](_0x517ec2,0x0),_0x123f1d),_0x517ec2;}[_0x31fa99(0x1da)](){const _0xcf6235=_0x31fa99;this[_0xcf6235(0x1d5)][_0xcf6235(0x1eb)](_0x3662d8=>{const _0x54072b=_0xcf6235;_0x54072b(0x24e)!==_0x3662d8[_0x54072b(0x248)][_0x54072b(0x238)]&&this[_0x54072b(0x246)][_0x54072b(0x263)][_0x54072b(0x272)](_0x3662d8);});}[_0x31fa99(0x216)](_0x1557fc){const _0x2e4718=_0x31fa99;if(!this[_0x2e4718(0x252)][_0x2e4718(0x1f4)](_0x1557fc))throw new _0x23cd23(_0x2e4718(0x250),this,{'availablePreviewModes':this[_0x2e4718(0x252)],'previewMode':_0x1557fc});}[_0x31fa99(0x288)](){const _0x136273=_0x31fa99;for(const _0xcba7ab of this[_0x136273(0x246)][_0x136273(0x232)][_0x136273(0x290)][_0x136273(0x225)][_0x136273(0x28c)]({'includeChangesInGraveyard':!0x0})){if(_0x136273(0x279)!==_0xcba7ab[_0x136273(0x270)]||_0x136273(0x224)===_0xcba7ab[_0x136273(0x23e)])continue;if(_0x136273(0x21f)===_0xcba7ab[_0x136273(0x23e)]){this[_0x136273(0x1d5)][_0x136273(0x222)](_0xcba7ab[_0x136273(0x280)][_0x136273(0x24f)]);continue;}const _0x4cb216=this[_0x136273(0x246)][_0x136273(0x232)][_0x136273(0x22b)](_0xcba7ab[_0x136273(0x280)][_0x136273(0x24f)]);for(const _0x3cae6a of _0x4cb216[_0x136273(0x24d)]())_0x3cae6a['is'](_0x136273(0x25f),_0x136273(0x21f))&&this[_0x136273(0x1d5)][_0x136273(0x222)](_0x3cae6a);}}[_0x31fa99(0x25c)](){const _0x29fb7e=_0x31fa99,_0x5473f5=this[_0x29fb7e(0x246)];_0x5473f5[_0x29fb7e(0x232)][_0x29fb7e(0x290)][_0x29fb7e(0x230)](_0x2f33ba=>{const _0x3d3d0d=_0x29fb7e;if(!_0x2f33ba[_0x3d3d0d(0x241)][_0x3d3d0d(0x21a)])return!0x1;const _0x29bd8a=[],_0x2ac2b0=new Set(),_0x35b96c=this[_0x3d3d0d(0x201)];let _0x4b8896=!0x1;for(const _0x23f452 of _0x5473f5[_0x3d3d0d(0x232)][_0x3d3d0d(0x290)][_0x3d3d0d(0x225)][_0x3d3d0d(0x28c)]())if(_0x3d3d0d(0x279)===_0x23f452[_0x3d3d0d(0x270)]||_0x3d3d0d(0x1f0)===_0x23f452[_0x3d3d0d(0x270)]){let _0xc80803=_0x3d3d0d(0x224)==_0x23f452[_0x3d3d0d(0x23e)]?_0x23f452[_0x3d3d0d(0x280)][_0x3d3d0d(0x1e3)]:_0x23f452[_0x3d3d0d(0x280)][_0x3d3d0d(0x24f)];if(!_0xc80803)continue;_0xc80803['is'](_0x3d3d0d(0x224))&&(_0xc80803=_0xc80803[_0x3d3d0d(0x1e3)]),_0x3438e2(_0xc80803);}for(const _0x5f2dc4 of _0x29bd8a[_0x3d3d0d(0x27b)]()){const {match:_0x459c7f,item:_0x5ebb88}=_0x5f2dc4,_0x1763e0=_0x2f33ba[_0x3d3d0d(0x28a)](_0x5ebb88,_0x459c7f[_0x3d3d0d(0x281)]),_0x35726c=_0x1763e0[_0x3d3d0d(0x28d)](_0x459c7f[0x0][_0x3d3d0d(0x260)]),_0x58d096=_0x2f33ba[_0x3d3d0d(0x1e0)](_0x1763e0,_0x35726c),_0x3fe9fe=_0x459c7f[0x0],_0x4b7120=_0x3fe9fe[_0x3d3d0d(0x239)](this[_0x3d3d0d(0x28f)][_0x3d3d0d(0x260)],_0x3fe9fe[_0x3d3d0d(0x260)]-this[_0x3d3d0d(0x1dd)][_0x3d3d0d(0x260)]),_0x272dbb=_0x3bcb75(_0x58d096);_0x272dbb[_0x3d3d0d(0x27e)]('id',_0x4b7120);const _0x11ff84=_0x2f33ba[_0x3d3d0d(0x1dc)](_0x3d3d0d(0x21f),_0x272dbb);_0x5473f5[_0x3d3d0d(0x232)][_0x3d3d0d(0x1d1)][_0x3d3d0d(0x278)](_0x58d096[_0x3d3d0d(0x26e)],_0x3d3d0d(0x21f))?_0x5473f5[_0x3d3d0d(0x232)][_0x3d3d0d(0x220)](_0x11ff84,_0x58d096):_0x2f33ba[_0x3d3d0d(0x1f0)](_0x58d096),_0x4b8896=!0x0;}return _0x4b8896;function _0x3438e2(_0x4c8fc0){const _0x4c272a=_0x3d3d0d;let _0x2186e1='',_0x20088e=0x0;if(!_0x2ac2b0[_0x4c272a(0x26c)](_0x4c8fc0))for(const _0x241df7 of _0x4c8fc0[_0x4c272a(0x1db)]()){const _0x184388=_0x241df7[_0x4c272a(0x1f9)];if(_0x241df7['is'](_0x4c272a(0x224))&&(''===_0x2186e1&&_0x241df7[_0x4c272a(0x264)]&&(_0x20088e=_0x241df7[_0x4c272a(0x264)]),_0x2186e1+=_0x241df7[_0x4c272a(0x1df)]),!_0x184388||_0x184388['is'](_0x4c272a(0x25f))){for(const _0x4b2756 of _0x2186e1[_0x4c272a(0x21c)](_0x35b96c))_0x4b2756[_0x4c272a(0x281)]=_0x4b2756[_0x4c272a(0x281)]+_0x20088e,_0x29bd8a[_0x4c272a(0x291)]({'match':_0x4b2756,'item':_0x4c8fc0});_0x2ac2b0[_0x4c272a(0x222)](_0x4c8fc0),_0x2186e1='';}_0x241df7['is'](_0x4c272a(0x25f))&&_0x3438e2(_0x241df7);}}function _0x3bcb75(_0x53560e){const _0x3724e3=_0x3d3d0d,_0x2d5af6=_0x53560e[_0x3724e3(0x24d)](),_0x34daea=_0x2d5af6[_0x3724e3(0x207)]()[_0x3724e3(0x25b)],_0x14758b=new Map(_0x34daea[_0x3724e3(0x213)]());for(const _0x4c7ddc of _0x2d5af6)for(const [_0x4e58e2,_0x283651]of _0x14758b)_0x4c7ddc[_0x3724e3(0x1d7)](_0x4e58e2)!==_0x283651&&_0x14758b[_0x3724e3(0x21e)](_0x4e58e2);return _0x14758b;}});}[_0x31fa99(0x25e)](_0x4c3390){return{'id':_0x4c3390};}}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license Copyright (c) 2003-2024, CKSource Holding sp. z o.o. All rights reserved.
|
|
3
|
+
* For licensing, see LICENSE.md or https://ckeditor.com/legal/ckeditor-oss-license
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* @module merge-fields/mergefieldsui
|
|
7
|
+
*/
|
|
8
|
+
import { Plugin, type Editor } from 'ckeditor5/src/core.js';
|
|
9
|
+
import { ContextualBalloon } from 'ckeditor5/src/ui.js';
|
|
10
|
+
import '../theme/mergefields.css';
|
|
11
|
+
import '../theme/insert-dropdown.css';
|
|
12
|
+
/**
|
|
13
|
+
* The merge fields UI feature.
|
|
14
|
+
*/
|
|
15
|
+
export default class MergeFieldsUI extends Plugin {
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
19
|
+
static get requires(): readonly [typeof ContextualBalloon];
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
23
|
+
static get pluginName(): "MergeFieldsUI";
|
|
24
|
+
/**
|
|
25
|
+
* @inheritDoc
|
|
26
|
+
*/
|
|
27
|
+
constructor(editor: Editor);
|
|
28
|
+
/**
|
|
29
|
+
* @inheritDoc
|
|
30
|
+
*/
|
|
31
|
+
init(): void;
|
|
32
|
+
/**
|
|
33
|
+
* @inheritDoc
|
|
34
|
+
*/
|
|
35
|
+
afterInit(): void;
|
|
36
|
+
}
|