@manuscripts/article-editor 1.10.4 → 1.10.5-LEAN-3340

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.
Files changed (86) hide show
  1. package/dist/cjs/components/inspector/SnapshotsDropdown.js +2 -2
  2. package/dist/cjs/components/inspector/SnapshotsDropdown.js.map +1 -1
  3. package/dist/cjs/components/projects/DOIInput.js +1 -1
  4. package/dist/cjs/components/projects/DOIInput.js.map +1 -1
  5. package/dist/cjs/components/projects/EditorElement.js +5 -2
  6. package/dist/cjs/components/projects/EditorElement.js.map +1 -1
  7. package/dist/cjs/components/projects/ManuscriptPageContainer.js +1 -7
  8. package/dist/cjs/components/projects/ManuscriptPageContainer.js.map +1 -1
  9. package/dist/cjs/components/projects/TagsInput.js +1 -20
  10. package/dist/cjs/components/projects/TagsInput.js.map +1 -1
  11. package/dist/cjs/components/track-changes/TrackChangesPanel.js +5 -2
  12. package/dist/cjs/components/track-changes/TrackChangesPanel.js.map +1 -1
  13. package/dist/cjs/components/track-changes/TrackModal.js +225 -0
  14. package/dist/cjs/components/track-changes/TrackModal.js.map +1 -0
  15. package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js +20 -12
  16. package/dist/cjs/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
  17. package/dist/cjs/hooks/use-create-editor.js +1 -3
  18. package/dist/cjs/hooks/use-create-editor.js.map +1 -1
  19. package/dist/cjs/hooks/use-exec-cmd.js +12 -0
  20. package/dist/cjs/hooks/use-exec-cmd.js.map +1 -0
  21. package/dist/cjs/hooks/use-handle-snapshot.js +5 -2
  22. package/dist/cjs/hooks/use-handle-snapshot.js.map +1 -1
  23. package/dist/cjs/lib/attrs-change-filter.js +36 -7
  24. package/dist/cjs/lib/attrs-change-filter.js.map +1 -1
  25. package/dist/cjs/store/DataSourceStrategy.js +0 -2
  26. package/dist/cjs/store/DataSourceStrategy.js.map +1 -1
  27. package/dist/cjs/store/Store.js.map +1 -1
  28. package/dist/es/components/inspector/SnapshotsDropdown.js +1 -1
  29. package/dist/es/components/inspector/SnapshotsDropdown.js.map +1 -1
  30. package/dist/es/components/projects/DOIInput.js +1 -1
  31. package/dist/es/components/projects/DOIInput.js.map +1 -1
  32. package/dist/es/components/projects/EditorElement.js +1 -1
  33. package/dist/es/components/projects/EditorElement.js.map +1 -1
  34. package/dist/es/components/projects/ManuscriptPageContainer.js +2 -8
  35. package/dist/es/components/projects/ManuscriptPageContainer.js.map +1 -1
  36. package/dist/es/components/projects/TagsInput.js +0 -19
  37. package/dist/es/components/projects/TagsInput.js.map +1 -1
  38. package/dist/es/components/track-changes/TrackChangesPanel.js +1 -1
  39. package/dist/es/components/track-changes/TrackChangesPanel.js.map +1 -1
  40. package/dist/es/components/track-changes/TrackModal.js +196 -0
  41. package/dist/es/components/track-changes/TrackModal.js.map +1 -0
  42. package/dist/es/components/track-changes/suggestion-list/Suggestion.js +17 -9
  43. package/dist/es/components/track-changes/suggestion-list/Suggestion.js.map +1 -1
  44. package/dist/es/hooks/use-create-editor.js +1 -3
  45. package/dist/es/hooks/use-create-editor.js.map +1 -1
  46. package/dist/es/hooks/use-exec-cmd.js +10 -0
  47. package/dist/es/hooks/use-exec-cmd.js.map +1 -0
  48. package/dist/es/hooks/use-handle-snapshot.js +1 -1
  49. package/dist/es/hooks/use-handle-snapshot.js.map +1 -1
  50. package/dist/es/lib/attrs-change-filter.js +36 -7
  51. package/dist/es/lib/attrs-change-filter.js.map +1 -1
  52. package/dist/es/store/DataSourceStrategy.js +0 -2
  53. package/dist/es/store/DataSourceStrategy.js.map +1 -1
  54. package/dist/es/store/Store.js.map +1 -1
  55. package/dist/types/components/projects/TagsInput.d.ts +0 -1
  56. package/dist/types/components/track-changes/TrackModal.d.ts +15 -0
  57. package/dist/types/components/track-changes/suggestion-list/Suggestion.d.ts +1 -0
  58. package/dist/types/hooks/use-exec-cmd.d.ts +4 -0
  59. package/dist/types/lib/attrs-change-filter.d.ts +2 -1
  60. package/dist/types/store/Store.d.ts +0 -2
  61. package/package.json +7 -6
  62. package/dist/cjs/components/Popper.js +0 -83
  63. package/dist/cjs/components/Popper.js.map +0 -1
  64. package/dist/cjs/components/metadata/InviteAuthorButton.js +0 -62
  65. package/dist/cjs/components/metadata/InviteAuthorButton.js.map +0 -1
  66. package/dist/cjs/components/metadata/InviteAuthorPopperContainer.js +0 -62
  67. package/dist/cjs/components/metadata/InviteAuthorPopperContainer.js.map +0 -1
  68. package/dist/cjs/components/metadata/InviteAuthorsSidebar.js +0 -27
  69. package/dist/cjs/components/metadata/InviteAuthorsSidebar.js.map +0 -1
  70. package/dist/cjs/hooks/use-track-attrs-popper.js +0 -195
  71. package/dist/cjs/hooks/use-track-attrs-popper.js.map +0 -1
  72. package/dist/es/components/Popper.js +0 -75
  73. package/dist/es/components/Popper.js.map +0 -1
  74. package/dist/es/components/metadata/InviteAuthorButton.js +0 -57
  75. package/dist/es/components/metadata/InviteAuthorButton.js.map +0 -1
  76. package/dist/es/components/metadata/InviteAuthorPopperContainer.js +0 -57
  77. package/dist/es/components/metadata/InviteAuthorPopperContainer.js.map +0 -1
  78. package/dist/es/components/metadata/InviteAuthorsSidebar.js +0 -22
  79. package/dist/es/components/metadata/InviteAuthorsSidebar.js.map +0 -1
  80. package/dist/es/hooks/use-track-attrs-popper.js +0 -164
  81. package/dist/es/hooks/use-track-attrs-popper.js.map +0 -1
  82. package/dist/types/components/Popper.d.ts +0 -24
  83. package/dist/types/components/metadata/InviteAuthorButton.d.ts +0 -33
  84. package/dist/types/components/metadata/InviteAuthorPopperContainer.d.ts +0 -31
  85. package/dist/types/components/metadata/InviteAuthorsSidebar.d.ts +0 -24
  86. package/dist/types/hooks/use-track-attrs-popper.d.ts +0 -25
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manuscripts/article-editor",
3
- "version": "1.10.4",
3
+ "version": "1.10.5-LEAN-3340",
4
4
  "license": "CPAL-1.0",
5
5
  "description": "React components for editing and viewing manuscripts",
6
6
  "repository": "github:Atypon-OpenSource/manuscripts-article-editor",
@@ -36,14 +36,15 @@
36
36
  "@fontsource/pt-sans": "^4.5.11",
37
37
  "@fontsource/pt-serif": "^4.5.11",
38
38
  "@manuscripts/assets": "^0.6.4",
39
- "@manuscripts/body-editor": "^1.7.12",
39
+ "@manuscripts/body-editor": "1.7.13-LEAN-3340-2",
40
40
  "@manuscripts/json-schema": "^2.2.4",
41
41
  "@manuscripts/library": "^1.3.3",
42
- "@manuscripts/style-guide": "1.7.7",
42
+ "@manuscripts/style-guide": "1.7.8",
43
43
  "@manuscripts/title-editor": "^1.1.0",
44
44
  "@manuscripts/track-changes-plugin": "^1.7.5",
45
- "@manuscripts/transform": "^2.1.2",
45
+ "@manuscripts/transform": "^2.1.3",
46
46
  "@microsoft/fetch-event-source": "^2.0.1",
47
+ "@popperjs/core": "^2.11.8",
47
48
  "@reach/tabs": "^0.18.0",
48
49
  "autotrack": "^2.4.1",
49
50
  "axios": "^1.6.7",
@@ -57,7 +58,7 @@
57
58
  "react-dom": "^17.0.2",
58
59
  "react-is": "^17.0.2",
59
60
  "react-modal": "^3.16.1",
60
- "react-popper": "^1.0.2",
61
+ "react-popper": "^2.0.0",
61
62
  "react-router": "^5.3.4",
62
63
  "react-router-dom": "^5.3.4",
63
64
  "react-select": "^5.7.3",
@@ -111,4 +112,4 @@
111
112
  "resolutions": {
112
113
  "@types/react": "^17.0.2"
113
114
  }
114
- }
115
+ }
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.CustomUpPopper = exports.CustomPopper = exports.PopperBody = exports.SeparatorLine = exports.PopperBodyContainer = void 0;
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const Container = styled_components_1.default.div `
21
- z-index: 10;
22
- `;
23
- exports.PopperBodyContainer = styled_components_1.default.div `
24
- width: auto;
25
- min-width: 150px;
26
- white-space: nowrap;
27
- box-shadow: ${(props) => props.theme.shadow.dropShadow};
28
- border: solid 1px ${(props) => props.theme.colors.text.muted};
29
- border-radius: ${(props) => props.theme.grid.radius.small};
30
- color: ${(props) => props.theme.colors.text.secondary};
31
- background: ${(props) => props.theme.colors.background.primary};
32
- z-index: 10;
33
-
34
- &[data-placement='bottom-start'] {
35
- border-top-left-radius: 0;
36
- border-top-right-radius: 0;
37
- }
38
-
39
- &[data-placement='right-start'] {
40
- top: 10px;
41
- }
42
- `;
43
- const ArrowUp = styled_components_1.default.div `
44
- position: relative;
45
- width: 0;
46
- height: 0;
47
- border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
48
- border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
49
- border-bottom: ${(props) => props.theme.grid.unit * 2}px solid
50
- ${(props) => props.theme.colors.background.primary};
51
- top: 1px;
52
- `;
53
- const ArrowDown = styled_components_1.default.div `
54
- position: relative;
55
- width: 0;
56
- height: 0;
57
- border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
58
- border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
59
- border-top: ${(props) => props.theme.grid.unit * 2}px solid
60
- ${(props) => props.theme.colors.background.primary};
61
- bottom: 1px;
62
- `;
63
- exports.SeparatorLine = styled_components_1.default.div `
64
- margin: ${(props) => props.theme.grid.unit * 2}px 0
65
- ${(props) => props.theme.grid.unit * 6}px;
66
- background-color: ${(props) => props.theme.colors.border.secondary};
67
- height: 1px;
68
- `;
69
- exports.PopperBody = styled_components_1.default.div `
70
- box-sizing: border-box;
71
- flex: 2;
72
- padding: ${(props) => props.theme.grid.unit * 5}px;
73
- max-width: ${(props) => props.size || 300}px;
74
- `;
75
- const CustomPopper = ({ children, popperProps: { ref, style, placement, arrowProps }, }) => (react_1.default.createElement(Container, { ref: ref, style: style, "data-placement": placement },
76
- react_1.default.createElement(ArrowUp, { ref: arrowProps.ref, style: arrowProps.style }),
77
- react_1.default.createElement(exports.PopperBodyContainer, null, children)));
78
- exports.CustomPopper = CustomPopper;
79
- const CustomUpPopper = ({ children, popperProps: { ref, style, placement, arrowProps }, }) => (react_1.default.createElement(Container, { ref: ref, style: style, "data-placement": placement },
80
- react_1.default.createElement(exports.PopperBodyContainer, null, children),
81
- react_1.default.createElement(ArrowDown, { ref: arrowProps.ref, style: arrowProps.style })));
82
- exports.CustomUpPopper = CustomUpPopper;
83
- //# sourceMappingURL=Popper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popper.js","sourceRoot":"","sources":["../../../src/components/Popper.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;;AAEH,kDAAyB;AAEzB,0EAAsC;AAEtC,MAAM,SAAS,GAAG,2BAAM,CAAC,GAAG,CAAA;;CAE3B,CAAA;AAEY,QAAA,mBAAmB,GAAG,2BAAM,CAAC,GAAG,CAAA;;;;gBAI7B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU;sBAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM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AAC,GAAG,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,GAAI,CACjD,CACb,CAAA;AARY,QAAA,cAAc,kBAQ1B"}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const react_popper_1 = require("react-popper");
20
- const styled_components_1 = __importDefault(require("styled-components"));
21
- const InviteAuthorPopperContainer_1 = __importDefault(require("./InviteAuthorPopperContainer"));
22
- const Button = (0, styled_components_1.default)(style_guide_1.TextButton) `
23
- margin-left: ${(props) => props.theme.grid.unit * 3}px;
24
- `;
25
- class InviteAuthorButton extends react_1.default.Component {
26
- constructor() {
27
- super(...arguments);
28
- this.state = {
29
- isOpen: false,
30
- };
31
- this.togglePopper = () => {
32
- this.updateListener(!this.state.isOpen);
33
- this.setState({
34
- isOpen: !this.state.isOpen,
35
- });
36
- };
37
- this.handleClickOutside = (event) => {
38
- if (this.node && !this.node.contains(event.target)) {
39
- this.togglePopper();
40
- }
41
- };
42
- this.updateListener = (isOpen) => {
43
- if (isOpen) {
44
- document.addEventListener('mousedown', this.handleClickOutside);
45
- }
46
- else {
47
- document.removeEventListener('mousedown', this.handleClickOutside);
48
- }
49
- };
50
- }
51
- componentDidMount() {
52
- this.updateListener(this.state.isOpen);
53
- }
54
- render() {
55
- const { isOpen } = this.state;
56
- return (react_1.default.createElement(react_popper_1.Manager, null,
57
- react_1.default.createElement(react_popper_1.Reference, null, ({ ref }) => (react_1.default.createElement(Button, { ref: ref, onClick: this.togglePopper }, "Invite as Collaborator"))),
58
- isOpen && (react_1.default.createElement(react_popper_1.Popper, { placement: 'bottom', innerRef: (node) => (this.node = node) }, (popperProps) => (react_1.default.createElement(InviteAuthorPopperContainer_1.default, { popperProps: popperProps, project: this.props.project, author: this.props.author, updateAuthor: this.props.updateAuthor, tokenActions: this.props.tokenActions }))))));
59
- }
60
- }
61
- exports.default = InviteAuthorButton;
62
- //# sourceMappingURL=InviteAuthorButton.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorButton.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorButton.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAqD;AACrD,kDAAyB;AACzB,+CAA8E;AAC9E,0EAAsC;AAGtC,gGAAuE;AAavE,MAAM,MAAM,GAAG,IAAA,2BAAM,EAAC,wBAAU,CAAC,CAAA;iBAChB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACpD,CAAA;AAED,MAAM,kBAAmB,SAAQ,eAAK,CAAC,SAAuB;IAA9D;;QACS,UAAK,GAAU;YACpB,MAAM,EAAE,KAAK;SACd,CAAA;QAwCO,iBAAY,GAAG,GAAG,EAAE;YAC1B,IAAI,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAA;YACvC,IAAI,CAAC,QAAQ,C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C,OAAO,EAC3B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,EACrC,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,YAAY,GACrC,CACH,CACM,CACV,CACO,CACX,CAAA;IACH,CAAC;CAsBF;AAED,kBAAe,kBAAkB,CAAA"}
@@ -1,62 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const style_guide_1 = require("@manuscripts/style-guide");
18
- const react_1 = __importDefault(require("react"));
19
- const styled_components_1 = __importDefault(require("styled-components"));
20
- const api_1 = require("../../lib/api");
21
- const tracking_1 = require("../../lib/tracking");
22
- const Popper_1 = require("../Popper");
23
- const AuthorInvitationForm_1 = require("./AuthorInvitationForm");
24
- const AlertMessageContainer = styled_components_1.default.div `
25
- margin-bottom: ${(props) => props.theme.grid.unit * 2}px;
26
- `;
27
- class InviteAuthorPopperContainer extends react_1.default.Component {
28
- constructor() {
29
- super(...arguments);
30
- this.state = {
31
- invitationError: null,
32
- };
33
- this.handleInvitationSubmit = async (values) => {
34
- const { project } = this.props;
35
- const { email, name, role } = values;
36
- await (0, api_1.projectInvite)(project._id, [{ email, name }], role);
37
- this.props.updateAuthor(this.props.author, email);
38
- (0, tracking_1.trackEvent)({
39
- category: 'Invitations',
40
- action: 'Send',
41
- label: `projectID=${project._id}`,
42
- });
43
- };
44
- }
45
- render() {
46
- const { popperProps, author, tokenActions } = this.props;
47
- const { invitationError } = this.state;
48
- return (react_1.default.createElement(Popper_1.CustomUpPopper, { popperProps: popperProps },
49
- react_1.default.createElement(Popper_1.PopperBody, null,
50
- !!invitationError && (react_1.default.createElement(AlertMessageContainer, null,
51
- react_1.default.createElement(style_guide_1.AlertMessage, { type: style_guide_1.AlertMessageType.error, hideCloseButton: true }, "Sending invitation failed."))),
52
- react_1.default.createElement(AuthorInvitationForm_1.InvitationForm, { invitationValues: {
53
- email: author.email || '',
54
- name: author.bibliographicName.given +
55
- ' ' +
56
- author.bibliographicName.family,
57
- role: 'Writer',
58
- }, handleSubmit: this.handleInvitationSubmit, allowSubmit: true, tokenActions: tokenActions }))));
59
- }
60
- }
61
- exports.default = InviteAuthorPopperContainer;
62
- //# sourceMappingURL=InviteAuthorPopperContainer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorPopperContainer.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorPopperContainer.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAGH,0DAAyE;AACzE,kDAAyB;AAEzB,0EAAsC;AAEtC,uCAA6C;AAC7C,iDAA+C;AAE/C,sCAAsD;AACtD,iEAAyE;AAczE,MAAM,qBAAqB,GAAG,2BAAM,CAAC,GAAG,CAAA;mBACrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;CACtD,CAAA;AAED,MAAM,2BAA4B,SAAQ,eAAK,CAAC,SAAgB;IAAhE;;QACS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;qBACf,EACD,YAAY,EAAE,IAAI,CAAC,sBAAsB,EACzC,WAAW,EAAE,IAAI,EACjB,YAAY,EAAE,YAAY,GAC1B,CACS,CACE,CAClB,CAAA;IACH,CAAC;CAeF;AAED,kBAAe,2BAA2B,CAAA"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- /*!
3
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
4
- *
5
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
6
- *
7
- * The Original Code is manuscripts-frontend.
8
- *
9
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
10
- *
11
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
12
- */
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- const react_1 = __importDefault(require("react"));
18
- const Sidebar_1 = require("../Sidebar");
19
- const AuthorInvitationForm_1 = require("./AuthorInvitationForm");
20
- const InviteAuthorsSidebarContents = ({ invitationValues, handleCancel, handleSubmit, invitationSent, tokenActions, }) => (react_1.default.createElement(react_1.default.Fragment, null,
21
- react_1.default.createElement(Sidebar_1.SidebarHeader, { action: handleCancel, isCancel: !invitationSent, title: 'Invite' }),
22
- react_1.default.createElement(Sidebar_1.SidebarContent, null,
23
- react_1.default.createElement(AuthorInvitationForm_1.InvitationForm, { allowSubmit: true, invitationValues: invitationValues, handleSubmit: handleSubmit, tokenActions: tokenActions }))));
24
- const InviteAuthorsSidebar = ({ invitationValues, handleCancel, handleSubmit, invitationSent, tokenActions, }) => (react_1.default.createElement(Sidebar_1.ModalSidebar, null,
25
- react_1.default.createElement(InviteAuthorsSidebarContents, { handleCancel: handleCancel, handleSubmit: handleSubmit, invitationSent: invitationSent, invitationValues: invitationValues, tokenActions: tokenActions })));
26
- exports.default = InviteAuthorsSidebar;
27
- //# sourceMappingURL=InviteAuthorsSidebar.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InviteAuthorsSidebar.js","sourceRoot":"","sources":["../../../../src/components/metadata/InviteAuthorsSidebar.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;GAUG;;;;;AAEH,kDAAyB;AAGzB,wCAAwE;AACxE,iEAAyE;AAWzE,MAAM,4BAA4B,GAAmC,CAAC,EACpE,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,GACb,EAAE,EAAE,CAAC,CACJ;IACE,8BAAC,uBAAa,IACZ,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,CAAC,cAAc,EACzB,KAAK,EAAE,QAAQ,GACf;IACF,8BAAC,wBAAc;QACb,8BAAC,qCAAc,IACb,WAAW,EAAE,IAAI,EACjB,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,GAC1B,CACa,CAChB,CACJ,CAAA;AAED,MAAM,oBAAoB,GAAmC,CAAC,EAC5D,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,YAAY,GACb,EAAE,EAAE,CAAC,CACJ,8BAAC,sBAAY;IACX,8BAAC,4BAA4B,IAC3B,YAAY,EAAE,YAAY,EAC1B,YAAY,EAAE,YAAY,EAC1B,cAAc,EAAE,cAAc,EAC9B,gBAAgB,EAAE,gBAAgB,EAClC,YAAY,EAAE,YAAY,GAC1B,CACW,CAChB,CAAA;AAED,kBAAe,oBAAoB,CAAA"}
@@ -1,195 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- var __importDefault = (this && this.__importDefault) || function (mod) {
26
- return (mod && mod.__esModule) ? mod : { "default": mod };
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.TrackChangesButton = exports.TrackAttrsPopperContent = exports.useExecCmd = void 0;
30
- /*!
31
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
32
- *
33
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
34
- *
35
- * The Original Code is manuscripts-frontend.
36
- *
37
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
38
- *
39
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2023 Atypon Systems LLC. All Rights Reserved.
40
- */
41
- const style_guide_1 = require("@manuscripts/style-guide");
42
- const track_changes_plugin_1 = require("@manuscripts/track-changes-plugin");
43
- const react_1 = __importStar(require("react"));
44
- const react_dom_1 = __importDefault(require("react-dom"));
45
- const styled_components_1 = __importDefault(require("styled-components"));
46
- const EditIcon_1 = __importDefault(require("../components/projects/icons/EditIcon"));
47
- const attrs_change_filter_1 = require("../lib/attrs-change-filter");
48
- const store_1 = require("../store");
49
- const ThemeProvider_1 = require("../theme/ThemeProvider");
50
- const useExecCmd = () => {
51
- const [storeView] = (0, store_1.useStore)((store) => store.view);
52
- return (cmd, hookView) => {
53
- const view = storeView || hookView;
54
- cmd(view.state, view.dispatch);
55
- };
56
- };
57
- exports.useExecCmd = useExecCmd;
58
- exports.default = () => {
59
- const [{ selectedAttrsChange, popper, trackState }, dispatch] = (0, store_1.useStore)((store) => ({
60
- selectedAttrsChange: store.selectedAttrsChange,
61
- popper: store.popper,
62
- trackState: store.trackState,
63
- }));
64
- const execCmd = (0, exports.useExecCmd)();
65
- const cleanSelectedChange = (0, react_1.useCallback)(() => {
66
- const previousSelection = document.querySelector(`.track-attrs-popper`);
67
- previousSelection && react_dom_1.default.unmountComponentAtNode(previousSelection);
68
- popper.destroy();
69
- document
70
- .querySelector('.attrs-popper-button-active')
71
- ?.classList.replace('attrs-popper-button-active', 'attrs-popper-button');
72
- dispatch({ selectedAttrsChange: undefined });
73
- }, [dispatch, popper]);
74
- const renderAttrsChangePopper = (0, react_1.useCallback)((changeId, attrTrackingButton) => {
75
- if (!trackState) {
76
- return;
77
- }
78
- attrTrackingButton.classList.replace('attrs-popper-button', 'attrs-popper-button-active');
79
- const { newAttrs, oldAttrs } = (0, attrs_change_filter_1.filterAttrsChange)(trackState.changeSet.get(changeId));
80
- const popperContainer = document.createElement('div');
81
- popperContainer.className = 'track-attrs-popper';
82
- react_dom_1.default.render(react_1.default.createElement(ThemeProvider_1.ThemeProvider, null,
83
- react_1.default.createElement(exports.TrackAttrsPopperContent, { newAttrs: newAttrs, oldAttrs: oldAttrs, changeId: changeId, updateState: (cmd) => {
84
- cleanSelectedChange();
85
- execCmd(cmd);
86
- } })), popperContainer);
87
- popper.show(attrTrackingButton, popperContainer);
88
- dispatch({ selectedAttrsChange: changeId });
89
- }, [trackState, popper, dispatch, cleanSelectedChange, execCmd]);
90
- return (0, react_1.useCallback)((e) => {
91
- const attrTrackingButton = e.target.closest('.attrs-popper-button,.attrs-popper-button-active');
92
- cleanSelectedChange();
93
- if (attrTrackingButton) {
94
- const changeId = attrTrackingButton.value;
95
- if (selectedAttrsChange !== changeId) {
96
- renderAttrsChangePopper(changeId, attrTrackingButton);
97
- }
98
- else {
99
- dispatch({ selectedAttrsChange: undefined });
100
- }
101
- }
102
- }, [
103
- cleanSelectedChange,
104
- dispatch,
105
- renderAttrsChangePopper,
106
- selectedAttrsChange,
107
- ]);
108
- };
109
- const TrackAttrsPopperContent = ({ newAttrs, oldAttrs, changeId, updateState }) => {
110
- const approveChange = () => {
111
- updateState(track_changes_plugin_1.trackCommands.setChangeStatuses(track_changes_plugin_1.CHANGE_STATUS.accepted, [changeId]));
112
- };
113
- const rejectChange = () => {
114
- updateState(track_changes_plugin_1.trackCommands.setChangeStatuses(track_changes_plugin_1.CHANGE_STATUS.rejected, [changeId]));
115
- };
116
- return (react_1.default.createElement(react_1.default.Fragment, null,
117
- react_1.default.createElement(Header, null,
118
- react_1.default.createElement(LabelContainer, null,
119
- react_1.default.createElement(EditIcon_1.default, null),
120
- react_1.default.createElement(Label, null, "Changed")),
121
- react_1.default.createElement(style_guide_1.ButtonGroup, null,
122
- react_1.default.createElement(RejectButton, { onClick: rejectChange }, "Reject"),
123
- react_1.default.createElement(exports.TrackChangesButton, { onClick: approveChange }, "Approve"))),
124
- react_1.default.createElement(ChangesList, null, Object.entries(oldAttrs).map(([key], index) => (react_1.default.createElement(Attribute, { key: index },
125
- react_1.default.createElement(AttributeLabel, null,
126
- oldAttrs[key].label,
127
- ":"),
128
- newAttrs[key].value &&
129
- oldAttrs[key].value !== newAttrs[key].value && (react_1.default.createElement(OldAttribute, null, oldAttrs[key].value)),
130
- react_1.default.createElement(AttributeValue, null, newAttrs[key].value || oldAttrs[key].value)))))));
131
- };
132
- exports.TrackAttrsPopperContent = TrackAttrsPopperContent;
133
- exports.TrackChangesButton = (0, styled_components_1.default)(style_guide_1.TextButton) `
134
- font-size: ${(props) => props.theme.font.size.normal};
135
- color: ${(props) => props.theme.colors.text.tertiary};
136
- text-decoration: underline;
137
- margin-right: ${(props) => props.theme.grid.unit * 2}px;
138
-
139
- &:hover,
140
- &:focus {
141
- color: ${(props) => props.theme.colors.text.tertiary} !important;
142
- }
143
- `;
144
- const RejectButton = (0, styled_components_1.default)(exports.TrackChangesButton) `
145
- color: ${(props) => props.theme.colors.text.secondary};
146
- `;
147
- const Header = styled_components_1.default.div `
148
- display: flex;
149
- align-items: center;
150
- justify-content: space-between;
151
- padding: 16px;
152
- `;
153
- const Label = styled_components_1.default.div `
154
- color: ${(props) => props.theme.colors.text.primary};
155
- font-size: ${(props) => props.theme.font.size.medium};
156
- font-weight: ${(props) => props.theme.font.weight.normal};
157
- line-height: ${(props) => props.theme.font.lineHeight.large};
158
- font-style: normal;
159
- padding: 2px;
160
- `;
161
- const LabelContainer = styled_components_1.default.div `
162
- display: flex;
163
- align-items: center;
164
- padding: 4px;
165
- `;
166
- const Attribute = styled_components_1.default.div `
167
- padding: ${(props) => props.theme.grid.unit * 3}px;
168
- cursor: pointer;
169
-
170
- &:hover {
171
- background: ${(props) => props.theme.colors.background.fifth};
172
- }
173
- `;
174
- const AttributeLabel = styled_components_1.default.div `
175
- color: ${(props) => props.theme.colors.text.primary};
176
- font-size: ${(props) => props.theme.font.size.small};
177
- font-weight: ${(props) => props.theme.font.weight.bold};
178
- font-style: normal;
179
- line-height: 16px;
180
- `;
181
- const AttributeValue = (0, styled_components_1.default)(AttributeLabel) `
182
- font-weight: ${(props) => props.theme.font.weight.normal};
183
- `;
184
- const OldAttribute = (0, styled_components_1.default)(AttributeValue) `
185
- text-decoration: line-through;
186
- `;
187
- const ChangesList = styled_components_1.default.div `
188
- padding: ${(props) => props.theme.grid.unit * 2}px
189
- ${(props) => props.theme.grid.unit * 4}px;
190
- max-height: ${(props) => props.theme.grid.unit * 124}px;
191
- background: ${(props) => props.theme.colors.background.secondary};
192
- overflow-y: scroll;
193
- overflow-x: hidden;
194
- `;
195
- //# sourceMappingURL=use-track-attrs-popper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-track-attrs-popper.js","sourceRoot":"","sources":["../../../src/hooks/use-track-attrs-popper.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;GAUG;AACH,0DAAkE;AAClE,4EAI0C;AAG1C,+CAA0C;AAC1C,0DAAgC;AAChC,0EAAsC;AAEtC,qFAA4D;AAC5D,oEAA8D;AAC9D,oCAAmC;AACnC,0DAAsD;AAE/C,MAAM,UAAU,GAAG,GAAG,EAAE;IAC7B,MAAM,CAAC,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;IACnD,OAAO,CAAC,GAAY,EAAE,QAAqB,EAAE,EAAE;QAC7C,MAAM,IAAI,GAAG,SAAS,IAAI,QAAQ,CAAA;QAClC,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,CAAA;IAChC,CAAC,CAAA;AACH,CAAC,CAAA;AANY,QAAA,UAAU,cAMtB;AAED,kBAAe,GAAG,EAAE;IAClB,MAAM,CAAC,EAAE,mBAAmB,EAAE,MAAM,EAAE,UAAU,EAAE,EAAE,QAAQ,CAAC,GAAG,IAAA,gBAAQ,EACtE,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACV,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;QAC9C,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,UAAU,E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E,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;eACtC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK;iBACpC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI;;;CAGvD,CAAA;AAED,MAAM,cAAc,GAAG,IAAA,2BAAM,EAAC,cAAc,CAAC,CAAA;iBAC5B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM;CACzD,CAAA;AAED,MAAM,YAAY,GAAG,IAAA,2BAAM,EAAC,cAAc,CAAC,CAAA;;CAE1C,CAAA;AAED,MAAM,WAAW,GAAG,2BAAM,CAAC,GAAG,CAAA;aACjB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;MAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;gBAC1B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,GAAG;gBACtC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,SAAS;;;CAGjE,CAAA"}
@@ -1,75 +0,0 @@
1
- /*!
2
- * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://mpapp-public.gitlab.io/manuscripts-frontend/LICENSE. The License is based on the Mozilla Public License Version 1.1 but Sections 14 and 15 have been added to cover use of software over a computer network and provide for limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent with Exhibit B.
3
- *
4
- * Software distributed under the License is distributed on an “AS IS” basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License.
5
- *
6
- * The Original Code is manuscripts-frontend.
7
- *
8
- * The Original Developer is the Initial Developer. The Initial Developer of the Original Code is Atypon Systems LLC.
9
- *
10
- * All portions of the code written by Atypon Systems LLC are Copyright (c) 2019 Atypon Systems LLC. All Rights Reserved.
11
- */
12
- import React from 'react';
13
- import styled from 'styled-components';
14
- const Container = styled.div `
15
- z-index: 10;
16
- `;
17
- export const PopperBodyContainer = styled.div `
18
- width: auto;
19
- min-width: 150px;
20
- white-space: nowrap;
21
- box-shadow: ${(props) => props.theme.shadow.dropShadow};
22
- border: solid 1px ${(props) => props.theme.colors.text.muted};
23
- border-radius: ${(props) => props.theme.grid.radius.small};
24
- color: ${(props) => props.theme.colors.text.secondary};
25
- background: ${(props) => props.theme.colors.background.primary};
26
- z-index: 10;
27
-
28
- &[data-placement='bottom-start'] {
29
- border-top-left-radius: 0;
30
- border-top-right-radius: 0;
31
- }
32
-
33
- &[data-placement='right-start'] {
34
- top: 10px;
35
- }
36
- `;
37
- const ArrowUp = styled.div `
38
- position: relative;
39
- width: 0;
40
- height: 0;
41
- border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
42
- border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
43
- border-bottom: ${(props) => props.theme.grid.unit * 2}px solid
44
- ${(props) => props.theme.colors.background.primary};
45
- top: 1px;
46
- `;
47
- const ArrowDown = styled.div `
48
- position: relative;
49
- width: 0;
50
- height: 0;
51
- border-left: ${(props) => props.theme.grid.unit * 2}px solid transparent;
52
- border-right: ${(props) => props.theme.grid.unit * 2}px solid transparent;
53
- border-top: ${(props) => props.theme.grid.unit * 2}px solid
54
- ${(props) => props.theme.colors.background.primary};
55
- bottom: 1px;
56
- `;
57
- export const SeparatorLine = styled.div `
58
- margin: ${(props) => props.theme.grid.unit * 2}px 0
59
- ${(props) => props.theme.grid.unit * 6}px;
60
- background-color: ${(props) => props.theme.colors.border.secondary};
61
- height: 1px;
62
- `;
63
- export const PopperBody = styled.div `
64
- box-sizing: border-box;
65
- flex: 2;
66
- padding: ${(props) => props.theme.grid.unit * 5}px;
67
- max-width: ${(props) => props.size || 300}px;
68
- `;
69
- export const CustomPopper = ({ children, popperProps: { ref, style, placement, arrowProps }, }) => (React.createElement(Container, { ref: ref, style: style, "data-placement": placement },
70
- React.createElement(ArrowUp, { ref: arrowProps.ref, style: arrowProps.style }),
71
- React.createElement(PopperBodyContainer, null, children)));
72
- export const CustomUpPopper = ({ children, popperProps: { ref, style, placement, arrowProps }, }) => (React.createElement(Container, { ref: ref, style: style, "data-placement": placement },
73
- React.createElement(PopperBodyContainer, null, children),
74
- React.createElement(ArrowDown, { ref: arrowProps.ref, style: arrowProps.style })));
75
- //# sourceMappingURL=Popper.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Popper.js","sourceRoot":"","sources":["../../../src/components/Popper.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,MAAM,MAAM,mBAAmB,CAAA;AAEtC,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAA;;CAE3B,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;gBAI7B,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU;sBAClC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK;mBAC3C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK;WAChD,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;gBACvC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,C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