@simai-studio/mail 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +188 -0
- package/README.md +79 -2
- package/dist/package-receipt.json +1176 -0
- package/dist/set.json +97 -0
- package/dist/smart/mail-canvas/component.json +562 -0
- package/dist/smart/mail-canvas/component.json.gz +0 -0
- package/dist/smart/mail-canvas/css/mail-canvas.css +85 -0
- package/dist/smart/mail-canvas/css/mail-canvas.css.gz +0 -0
- package/dist/smart/mail-canvas/css/mail-canvas.min.css +2 -0
- package/dist/smart/mail-canvas/css/mail-canvas.min.css.gz +0 -0
- package/dist/smart/mail-canvas/examples.json +731 -0
- package/dist/smart/mail-canvas/examples.json.gz +0 -0
- package/dist/smart/mail-canvas/js/mail-canvas.js +1039 -0
- package/dist/smart/mail-canvas/js/mail-canvas.js.gz +0 -0
- package/dist/smart/mail-canvas/js/mail-canvas.min.js +22 -0
- package/dist/smart/mail-canvas/js/mail-canvas.min.js.gz +0 -0
- package/dist/smart/mail-canvas/lang/en.json +25 -0
- package/dist/smart/mail-canvas/lang/en.json.gz +0 -0
- package/dist/smart/mail-canvas/lang/ru.json +25 -0
- package/dist/smart/mail-canvas/lang/ru.json.gz +0 -0
- package/dist/smart/mail-canvas/probe.json +465 -0
- package/dist/smart/mail-canvas/probe.json.gz +0 -0
- package/dist/smart/mail-canvas/smart.manifest.json +550 -0
- package/dist/smart/mail-canvas/smart.manifest.json.gz +0 -0
- package/dist/smart/mail-canvas/static/default/notes.html +43 -0
- package/dist/smart/mail-canvas/static/default/notes.html.gz +0 -0
- package/dist/smart/mail-canvas/static/default/phone.html +43 -0
- package/dist/smart/mail-canvas/static/default/phone.html.gz +0 -0
- package/dist/smart/mail-canvas/static/default/reference.html +48 -0
- package/dist/smart/mail-canvas/static/default/reference.html.gz +0 -0
- package/dist/smart/mail-canvas/static/sheets.json +132 -0
- package/dist/smart/mail-canvas/static/sheets.json.gz +0 -0
- package/dist/smart/mail-canvas/studio.fixture.json +63 -0
- package/dist/smart/mail-canvas/studio.fixture.json.gz +0 -0
- package/dist/smart/mail-canvas/studio.scenario.json +39 -0
- package/dist/smart/mail-canvas/studio.scenario.json.gz +0 -0
- package/dist/smart/mail-canvas/template/default.css +73 -0
- package/dist/smart/mail-canvas/template/default.css.gz +0 -0
- package/dist/smart/mail-canvas/template/default.js +38 -0
- package/dist/smart/mail-canvas/template/default.js.gz +0 -0
- package/dist/smart/mail-inspector/component.json +768 -0
- package/dist/smart/mail-inspector/component.json.gz +0 -0
- package/dist/smart/mail-inspector/css/mail-inspector.css +194 -0
- package/dist/smart/mail-inspector/css/mail-inspector.css.gz +0 -0
- package/dist/smart/mail-inspector/css/mail-inspector.min.css +2 -0
- package/dist/smart/mail-inspector/css/mail-inspector.min.css.gz +0 -0
- package/dist/smart/mail-inspector/examples.json +1301 -0
- package/dist/smart/mail-inspector/examples.json.gz +0 -0
- package/dist/smart/mail-inspector/js/mail-inspector.js +1619 -0
- package/dist/smart/mail-inspector/js/mail-inspector.js.gz +0 -0
- package/dist/smart/mail-inspector/js/mail-inspector.min.js +103 -0
- package/dist/smart/mail-inspector/js/mail-inspector.min.js.gz +0 -0
- package/dist/smart/mail-inspector/lang/en.json +29 -0
- package/dist/smart/mail-inspector/lang/en.json.gz +0 -0
- package/dist/smart/mail-inspector/lang/ru.json +29 -0
- package/dist/smart/mail-inspector/lang/ru.json.gz +0 -0
- package/dist/smart/mail-inspector/probe.json +648 -0
- package/dist/smart/mail-inspector/probe.json.gz +0 -0
- package/dist/smart/mail-inspector/smart.manifest.json +920 -0
- package/dist/smart/mail-inspector/smart.manifest.json.gz +0 -0
- package/dist/smart/mail-inspector/static/default/item.html +189 -0
- package/dist/smart/mail-inspector/static/default/item.html.gz +0 -0
- package/dist/smart/mail-inspector/static/default/letter.html +247 -0
- package/dist/smart/mail-inspector/static/default/letter.html.gz +0 -0
- package/dist/smart/mail-inspector/static/default/reference.html +545 -0
- package/dist/smart/mail-inspector/static/default/reference.html.gz +0 -0
- package/dist/smart/mail-inspector/static/sheets.json +226 -0
- package/dist/smart/mail-inspector/static/sheets.json.gz +0 -0
- package/dist/smart/mail-inspector/studio.fixture.json +232 -0
- package/dist/smart/mail-inspector/studio.fixture.json.gz +0 -0
- package/dist/smart/mail-inspector/studio.scenario.json +43 -0
- package/dist/smart/mail-inspector/studio.scenario.json.gz +0 -0
- package/dist/smart/mail-inspector/template/default.css +190 -0
- package/dist/smart/mail-inspector/template/default.css.gz +0 -0
- package/dist/smart/mail-inspector/template/default.js +249 -0
- package/dist/smart/mail-inspector/template/default.js.gz +0 -0
- package/dist/smart/mail-letters/component.json +455 -0
- package/dist/smart/mail-letters/component.json.gz +0 -0
- package/dist/smart/mail-letters/css/mail-letters.css +72 -0
- package/dist/smart/mail-letters/css/mail-letters.css.gz +0 -0
- package/dist/smart/mail-letters/css/mail-letters.min.css +2 -0
- package/dist/smart/mail-letters/css/mail-letters.min.css.gz +0 -0
- package/dist/smart/mail-letters/examples.json +477 -0
- package/dist/smart/mail-letters/examples.json.gz +0 -0
- package/dist/smart/mail-letters/js/mail-letters.js +1772 -0
- package/dist/smart/mail-letters/js/mail-letters.js.gz +0 -0
- package/dist/smart/mail-letters/js/mail-letters.min.js +35 -0
- package/dist/smart/mail-letters/js/mail-letters.min.js.gz +0 -0
- package/dist/smart/mail-letters/lang/en.json +29 -0
- package/dist/smart/mail-letters/lang/en.json.gz +0 -0
- package/dist/smart/mail-letters/lang/ru.json +31 -0
- package/dist/smart/mail-letters/lang/ru.json.gz +0 -0
- package/dist/smart/mail-letters/probe.json +290 -0
- package/dist/smart/mail-letters/probe.json.gz +0 -0
- package/dist/smart/mail-letters/smart.manifest.json +476 -0
- package/dist/smart/mail-letters/smart.manifest.json.gz +0 -0
- package/dist/smart/mail-letters/static/default/by-title.html +177 -0
- package/dist/smart/mail-letters/static/default/by-title.html.gz +0 -0
- package/dist/smart/mail-letters/static/default/empty.html +88 -0
- package/dist/smart/mail-letters/static/default/empty.html.gz +0 -0
- package/dist/smart/mail-letters/static/default/nothing-found.html +88 -0
- package/dist/smart/mail-letters/static/default/nothing-found.html.gz +0 -0
- package/dist/smart/mail-letters/static/default/reference.html +168 -0
- package/dist/smart/mail-letters/static/default/reference.html.gz +0 -0
- package/dist/smart/mail-letters/static/sheets.json +245 -0
- package/dist/smart/mail-letters/static/sheets.json.gz +0 -0
- package/dist/smart/mail-letters/studio.fixture.json +41 -0
- package/dist/smart/mail-letters/studio.fixture.json.gz +0 -0
- package/dist/smart/mail-letters/studio.scenario.json +41 -0
- package/dist/smart/mail-letters/studio.scenario.json.gz +0 -0
- package/dist/smart/mail-letters/template/default.css +79 -0
- package/dist/smart/mail-letters/template/default.css.gz +0 -0
- package/dist/smart/mail-letters/template/default.js +61 -0
- package/dist/smart/mail-letters/template/default.js.gz +0 -0
- package/dist/smart/mail-library/component.json +512 -0
- package/dist/smart/mail-library/component.json.gz +0 -0
- package/dist/smart/mail-library/css/mail-library.css +149 -0
- package/dist/smart/mail-library/css/mail-library.css.gz +0 -0
- package/dist/smart/mail-library/css/mail-library.min.css +2 -0
- package/dist/smart/mail-library/css/mail-library.min.css.gz +0 -0
- package/dist/smart/mail-library/examples.json +616 -0
- package/dist/smart/mail-library/examples.json.gz +0 -0
- package/dist/smart/mail-library/js/mail-library.js +559 -0
- package/dist/smart/mail-library/js/mail-library.js.gz +0 -0
- package/dist/smart/mail-library/js/mail-library.min.js +52 -0
- package/dist/smart/mail-library/js/mail-library.min.js.gz +0 -0
- package/dist/smart/mail-library/lang/en.json +21 -0
- package/dist/smart/mail-library/lang/en.json.gz +0 -0
- package/dist/smart/mail-library/lang/ru.json +21 -0
- package/dist/smart/mail-library/lang/ru.json.gz +0 -0
- package/dist/smart/mail-library/probe.json +275 -0
- package/dist/smart/mail-library/probe.json.gz +0 -0
- package/dist/smart/mail-library/smart.manifest.json +512 -0
- package/dist/smart/mail-library/smart.manifest.json.gz +0 -0
- package/dist/smart/mail-library/static/default/category.html +85 -0
- package/dist/smart/mail-library/static/default/category.html.gz +0 -0
- package/dist/smart/mail-library/static/default/nothing-found.html +81 -0
- package/dist/smart/mail-library/static/default/nothing-found.html.gz +0 -0
- package/dist/smart/mail-library/static/default/one-group.html +67 -0
- package/dist/smart/mail-library/static/default/one-group.html.gz +0 -0
- package/dist/smart/mail-library/static/default/reference.html +135 -0
- package/dist/smart/mail-library/static/default/reference.html.gz +0 -0
- package/dist/smart/mail-library/static/sheets.json +180 -0
- package/dist/smart/mail-library/static/sheets.json.gz +0 -0
- package/dist/smart/mail-library/studio.fixture.json +75 -0
- package/dist/smart/mail-library/studio.fixture.json.gz +0 -0
- package/dist/smart/mail-library/studio.scenario.json +41 -0
- package/dist/smart/mail-library/studio.scenario.json.gz +0 -0
- package/dist/smart/mail-library/template/default.css +133 -0
- package/dist/smart/mail-library/template/default.css.gz +0 -0
- package/dist/smart/mail-library/template/default.js +83 -0
- package/dist/smart/mail-library/template/default.js.gz +0 -0
- package/dist/smart/mail-structure/component.json +497 -0
- package/dist/smart/mail-structure/component.json.gz +0 -0
- package/dist/smart/mail-structure/css/mail-structure.css +106 -0
- package/dist/smart/mail-structure/css/mail-structure.css.gz +0 -0
- package/dist/smart/mail-structure/css/mail-structure.min.css +2 -0
- package/dist/smart/mail-structure/css/mail-structure.min.css.gz +0 -0
- package/dist/smart/mail-structure/examples.json +286 -0
- package/dist/smart/mail-structure/examples.json.gz +0 -0
- package/dist/smart/mail-structure/js/mail-structure.js +767 -0
- package/dist/smart/mail-structure/js/mail-structure.js.gz +0 -0
- package/dist/smart/mail-structure/js/mail-structure.min.js +48 -0
- package/dist/smart/mail-structure/js/mail-structure.min.js.gz +0 -0
- package/dist/smart/mail-structure/lang/en.json +22 -0
- package/dist/smart/mail-structure/lang/en.json.gz +0 -0
- package/dist/smart/mail-structure/lang/ru.json +22 -0
- package/dist/smart/mail-structure/lang/ru.json.gz +0 -0
- package/dist/smart/mail-structure/probe.json +112 -0
- package/dist/smart/mail-structure/probe.json.gz +0 -0
- package/dist/smart/mail-structure/smart.manifest.json +495 -0
- package/dist/smart/mail-structure/smart.manifest.json.gz +0 -0
- package/dist/smart/mail-structure/static/default/empty.html +76 -0
- package/dist/smart/mail-structure/static/default/empty.html.gz +0 -0
- package/dist/smart/mail-structure/static/default/reference.html +98 -0
- package/dist/smart/mail-structure/static/default/reference.html.gz +0 -0
- package/dist/smart/mail-structure/static/default/settings.html +98 -0
- package/dist/smart/mail-structure/static/default/settings.html.gz +0 -0
- package/dist/smart/mail-structure/static/sheets.json +142 -0
- package/dist/smart/mail-structure/static/sheets.json.gz +0 -0
- package/dist/smart/mail-structure/studio.fixture.json +45 -0
- package/dist/smart/mail-structure/studio.fixture.json.gz +0 -0
- package/dist/smart/mail-structure/studio.scenario.json +42 -0
- package/dist/smart/mail-structure/studio.scenario.json.gz +0 -0
- package/dist/smart/mail-structure/template/default.css +100 -0
- package/dist/smart/mail-structure/template/default.css.gz +0 -0
- package/dist/smart/mail-structure/template/default.js +80 -0
- package/dist/smart/mail-structure/template/default.js.gz +0 -0
- package/dist/smart/rule.js +161 -0
- package/dist/smart/rule.js.gz +0 -0
- package/package.json +29 -4
|
@@ -0,0 +1,1039 @@
|
|
|
1
|
+
/******/ (() => { // webpackBootstrap
|
|
2
|
+
/******/ "use strict";
|
|
3
|
+
/******/ var __webpack_modules__ = ({
|
|
4
|
+
|
|
5
|
+
/***/ "7169640ec00d"
|
|
6
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
7
|
+
|
|
8
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
9
|
+
__webpack_require__.r(__webpack_exports__);
|
|
10
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("deb1a4d61565");
|
|
11
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("5b7d7695b41b");
|
|
12
|
+
/* harmony import */ var _js_templates_default_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("589addf598d5");
|
|
13
|
+
/* harmony import */ var _component_json__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("47d5f171f605");
|
|
14
|
+
/* harmony import */ var _lang_en_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("72f304e6f2fd");
|
|
15
|
+
/* harmony import */ var _lang_ru_json__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("87aa449fd9de");
|
|
16
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_2__]);
|
|
17
|
+
([_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__, _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__, _js_templates_default_js__WEBPACK_IMPORTED_MODULE_2__] = __webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
18
|
+
/* harmony import */ var _core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__);
|
|
19
|
+
/* harmony import */ var _core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__);
|
|
20
|
+
// sf-mail-canvas: the middle pane of SIMAI Email Editor -- a rendered letter in
|
|
21
|
+
// a frame that runs nothing, the width switch over it, the two notes about it
|
|
22
|
+
// (out of date, heavy) and sf-editor-overlay on top: the frames, the
|
|
23
|
+
// toolbar and the keyboard tree.
|
|
24
|
+
//
|
|
25
|
+
// It knows no letter, no block manifest and no renderer. The host passes the
|
|
26
|
+
// HTML it rendered and the data about it, and hears what the person did: chose
|
|
27
|
+
// a block, hovered one, switched the width, asked for an action or an insertion.
|
|
28
|
+
// The HTML is untrusted content: the frame's sandbox is allow-same-origin and
|
|
29
|
+
// nothing else, so a script in it never runs and never reaches the page; the
|
|
30
|
+
// page reads the frame, the frame cannot read the page.
|
|
31
|
+
//
|
|
32
|
+
// Written for ui-mail's editor by the owner's decision D31 (2026-10-29): a
|
|
33
|
+
// product keeps no component set of its own. From its component.json (standard
|
|
34
|
+
// simai.smart-component 1.4 §3, §4, §8, §11): the settings are attributes and
|
|
35
|
+
// properties made by core/js/element-manifest.js, its words are
|
|
36
|
+
// lang/<locale>.json, and the actions answer outcomes.
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
const applied = () => ({
|
|
45
|
+
outcome: "applied"
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
const refused = reason => ({
|
|
49
|
+
outcome: "refused",
|
|
50
|
+
reason
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const MARK = /^data-[a-z0-9-]+$/u;
|
|
54
|
+
const OVERLAY = "sf-editor-overlay";
|
|
55
|
+
const MailCanvasElement = (0,_core_js_element_manifest__WEBPACK_IMPORTED_MODULE_1__.elementFromManifest)(_component_json__WEBPACK_IMPORTED_MODULE_3__, {
|
|
56
|
+
base: (_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0___default()),
|
|
57
|
+
lang: {
|
|
58
|
+
en: _lang_en_json__WEBPACK_IMPORTED_MODULE_4__,
|
|
59
|
+
ru: _lang_ru_json__WEBPACK_IMPORTED_MODULE_5__
|
|
60
|
+
},
|
|
61
|
+
source: "ru",
|
|
62
|
+
actions: {
|
|
63
|
+
select({
|
|
64
|
+
id
|
|
65
|
+
} = {}) {
|
|
66
|
+
const wanted = String(id ?? "");
|
|
67
|
+
if (wanted && !this.itemOf(wanted)) return refused("unknown");
|
|
68
|
+
this.sayChosen(wanted);
|
|
69
|
+
return applied();
|
|
70
|
+
},
|
|
71
|
+
|
|
72
|
+
"set-width"({
|
|
73
|
+
value
|
|
74
|
+
} = {}) {
|
|
75
|
+
const wanted = String(value ?? "");
|
|
76
|
+
if (!this.widthList().some(item => String(item.value) === wanted)) return refused("unknown");
|
|
77
|
+
if (String(this.currentWidth()?.value ?? "") === wanted) return refused("unchanged");
|
|
78
|
+
this.takeWidth(wanted);
|
|
79
|
+
return applied();
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
reveal({
|
|
83
|
+
id
|
|
84
|
+
} = {}) {
|
|
85
|
+
const wanted = String(id ?? this.selected ?? "");
|
|
86
|
+
const target = wanted && this.itemOf(wanted) ? this.markedElement(wanted) : null;
|
|
87
|
+
if (!target) return refused("unknown");
|
|
88
|
+
const scroller = this.scroller;
|
|
89
|
+
const box = target.getBoundingClientRect();
|
|
90
|
+
const top = this.frame.getBoundingClientRect().top + box.top;
|
|
91
|
+
const view = scroller.getBoundingClientRect(); // The room above the block is the toolbar's.
|
|
92
|
+
|
|
93
|
+
const room = parseFloat(getComputedStyle(scroller).scrollPaddingBlockStart) || 0;
|
|
94
|
+
if (top - room >= view.top && top + Math.min(box.height, view.height) <= view.bottom) return refused("unchanged");
|
|
95
|
+
const calm = globalThis.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
96
|
+
scroller.scrollBy({
|
|
97
|
+
top: top - view.top - room,
|
|
98
|
+
behavior: calm ? "auto" : "smooth"
|
|
99
|
+
});
|
|
100
|
+
return applied();
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
refresh() {
|
|
104
|
+
this.drawSheet();
|
|
105
|
+
this.nodesFor = null;
|
|
106
|
+
this.syncOverlay();
|
|
107
|
+
this.fitFrame();
|
|
108
|
+
this.boundOverlay?.refresh?.();
|
|
109
|
+
return applied();
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
|
|
115
|
+
class SfMailCanvas extends MailCanvasElement {
|
|
116
|
+
static get props() {
|
|
117
|
+
return { ...super.props,
|
|
118
|
+
templateName: {
|
|
119
|
+
attribute: "template",
|
|
120
|
+
default: "default"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
constructor() {
|
|
126
|
+
super(); // A value set as a property before the element was defined is an own
|
|
127
|
+
// property that would hide the accessor; it is taken through it.
|
|
128
|
+
|
|
129
|
+
for (const name of ["html", "widths", "items", "actions", "weight"]) {
|
|
130
|
+
if (Object.prototype.hasOwnProperty.call(this, name)) {
|
|
131
|
+
const early = this[name];
|
|
132
|
+
delete this[name];
|
|
133
|
+
this[name] = early;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
this.written = "";
|
|
138
|
+
this.writtenHead = null;
|
|
139
|
+
this.waitingForLoad = false;
|
|
140
|
+
this.sheet = null;
|
|
141
|
+
this.hovered = "";
|
|
142
|
+
this.saidThisTurn = undefined;
|
|
143
|
+
this.nodesFor = null;
|
|
144
|
+
this.boundOverlay = null;
|
|
145
|
+
this.overlayWatch = null;
|
|
146
|
+
this.quiet = false;
|
|
147
|
+
this.warnedTarget = "";
|
|
148
|
+
} // The letter can be far longer than an attribute should hold, so `html` is
|
|
149
|
+
// kept as a property; an attribute (a printed page, an example) is read
|
|
150
|
+
// until one is written.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
get html() {
|
|
154
|
+
return this.letterHtml ?? this.getAttribute("html") ?? "";
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
set html(value) {
|
|
158
|
+
this.letterHtml = value === null || value === undefined ? "" : String(value);
|
|
159
|
+
this.requestComponentUpdate("html");
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
get scroller() {
|
|
163
|
+
return this.querySelector(".sf-mail-canvas-scroll");
|
|
164
|
+
}
|
|
165
|
+
/** The iframe that shows the letter. */
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
get frame() {
|
|
169
|
+
return this.querySelector(".sf-mail-canvas-frame");
|
|
170
|
+
}
|
|
171
|
+
/** The document in the frame, for a host that adjusts the picture on `draw`. */
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
get frameDocument() {
|
|
175
|
+
return this.frame?.contentDocument ?? null;
|
|
176
|
+
}
|
|
177
|
+
/** The sf-editor-overlay in use: the one at overlay-target, else the element's own. */
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
get overlay() {
|
|
181
|
+
const target = String(this.overlayTarget ?? "");
|
|
182
|
+
|
|
183
|
+
if (target) {
|
|
184
|
+
const found = this.ownerDocument.getElementById(target); // The host places it, so it may still write the former tag,
|
|
185
|
+
// sf-composition-overlay, a dated alias until 2027-01-01.
|
|
186
|
+
|
|
187
|
+
return found && (0,_core_js_smart_base__WEBPACK_IMPORTED_MODULE_0__.isTag)(found, OVERLAY) ? found : null;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return this.querySelector(`.sf-mail-canvas-layer ${OVERLAY}`);
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
widthList() {
|
|
194
|
+
return Array.isArray(this.widths) ? this.widths.filter(item => item && item.value !== undefined && item.value !== null && item.value !== "") : [];
|
|
195
|
+
}
|
|
196
|
+
/** The width shown: the one named by `width`, else the first. */
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
currentWidth() {
|
|
200
|
+
const list = this.widthList();
|
|
201
|
+
return list.find(item => String(item.value) === String(this.width ?? "")) ?? list[0] ?? null;
|
|
202
|
+
}
|
|
203
|
+
/** How wide the frame is: the item's own `frame`, else its value when that is a number. */
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
frameWidth(item = this.currentWidth()) {
|
|
207
|
+
const wide = Number(item?.frame ?? item?.value);
|
|
208
|
+
return Number.isFinite(wide) && wide > 0 ? wide : 0;
|
|
209
|
+
}
|
|
210
|
+
/**
|
|
211
|
+
* A frame wider than the letter's own width shows the letter's paper inside
|
|
212
|
+
* it, and that paper casts the shadow; otherwise the frame is the paper.
|
|
213
|
+
*/
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
frameIsPaper(item = this.currentWidth()) {
|
|
217
|
+
return Boolean(item) && this.frameWidth(item) === Number(item.value);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
itemList() {
|
|
221
|
+
return Array.isArray(this.items) ? this.items.filter(item => item && typeof item.id === "string" && item.id) : [];
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
itemOf(id) {
|
|
225
|
+
return this.itemList().find(item => item.id === String(id ?? ""));
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
markAttributeName() {
|
|
229
|
+
const name = String(this.markAttribute ?? "");
|
|
230
|
+
return MARK.test(name) ? name : "data-block";
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
boxAttributeName() {
|
|
234
|
+
const name = String(this.boxAttribute ?? "");
|
|
235
|
+
return MARK.test(name) ? name : "";
|
|
236
|
+
}
|
|
237
|
+
/** The marked element of a block, its box when the letter marks one. */
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
markedElement(id, boxed = false) {
|
|
241
|
+
const letter = this.frameDocument;
|
|
242
|
+
if (!letter) return null;
|
|
243
|
+
const mark = `[${this.markAttributeName()}="${CSS.escape(id)}"]`;
|
|
244
|
+
const box = this.boxAttributeName();
|
|
245
|
+
return (boxed && box ? letter.querySelector(`${mark} [${box}]`) : null) ?? letter.querySelector(mark);
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* The block under a node of the frame. The letter's markup is untrusted, so
|
|
249
|
+
* a mark counts only when its id is one the host gave: an unknown mark is
|
|
250
|
+
* not a block, whatever it says, and the search goes on outward.
|
|
251
|
+
*/
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
blockAt(node) {
|
|
255
|
+
const mark = this.markAttributeName();
|
|
256
|
+
let element = node?.nodeType === 1 ? node : node?.parentElement;
|
|
257
|
+
|
|
258
|
+
while (element) {
|
|
259
|
+
const id = element.getAttribute(mark);
|
|
260
|
+
if (id && this.itemOf(id)) return id;
|
|
261
|
+
element = element.parentElement;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
return "";
|
|
265
|
+
} // One press is one choice: the overlay and the frame's own click can both
|
|
266
|
+
// report it in one dispatch, with the page's microtasks run between them.
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
sayChosen(id) {
|
|
270
|
+
if (this.saidThisTurn === id) return;
|
|
271
|
+
this.saidThisTurn = id;
|
|
272
|
+
setTimeout(() => {
|
|
273
|
+
this.saidThisTurn = undefined;
|
|
274
|
+
});
|
|
275
|
+
this.sfEmit("select", {
|
|
276
|
+
ids: id ? [id] : [],
|
|
277
|
+
id
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
takeWidth(value) {
|
|
282
|
+
const previous = String(this.currentWidth()?.value ?? "");
|
|
283
|
+
this.width = value;
|
|
284
|
+
this.sfEmit("change", {
|
|
285
|
+
value,
|
|
286
|
+
previous
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
onWidthChange(event) {
|
|
291
|
+
// The group's own change stops here: the element's says the same, once.
|
|
292
|
+
event.stopPropagation();
|
|
293
|
+
const value = String(event.detail?.value ?? "");
|
|
294
|
+
if (!value || value === String(this.currentWidth()?.value ?? "")) return;
|
|
295
|
+
if (this.widthList().some(item => String(item.value) === value)) this.takeWidth(value);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
afterUpdate(...args) {
|
|
299
|
+
super.afterUpdate?.(...args);
|
|
300
|
+
this.bindOverlay();
|
|
301
|
+
this.drawFrame();
|
|
302
|
+
this.drawSheet();
|
|
303
|
+
this.syncOverlay();
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
disconnectedCallback() {
|
|
307
|
+
super.disconnectedCallback?.();
|
|
308
|
+
this.overlayWatch?.abort();
|
|
309
|
+
this.overlayWatch = null;
|
|
310
|
+
this.boundOverlay = null;
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* Writes the letter. Block by block when only the body changed, so the frame
|
|
314
|
+
* never reloads. A full write, when the head changed, keeps the last good
|
|
315
|
+
* picture until the new one has loaded: an empty `html` changes nothing, and
|
|
316
|
+
* the frame is not cleared or shrunk while the next document is on its way.
|
|
317
|
+
*/
|
|
318
|
+
|
|
319
|
+
|
|
320
|
+
drawFrame() {
|
|
321
|
+
const frame = this.frame;
|
|
322
|
+
if (!frame) return;
|
|
323
|
+
const wide = this.frameWidth();
|
|
324
|
+
const letter = this.html;
|
|
325
|
+
|
|
326
|
+
if (letter && letter !== this.written) {
|
|
327
|
+
const parsed = new DOMParser().parseFromString(letter, "text/html");
|
|
328
|
+
const head = this.headOf(parsed);
|
|
329
|
+
const patches = !this.waitingForLoad && this.writtenHead === head && Boolean(this.frameDocument?.body);
|
|
330
|
+
this.written = letter;
|
|
331
|
+
this.writtenHead = head;
|
|
332
|
+
|
|
333
|
+
if (patches) {
|
|
334
|
+
this.patchLetter(parsed);
|
|
335
|
+
} else {
|
|
336
|
+
this.waitingForLoad = true;
|
|
337
|
+
this.toggleAttribute("data-sf-drawing", true);
|
|
338
|
+
frame.srcdoc = letter;
|
|
339
|
+
}
|
|
340
|
+
} // A new width lays the letter out anew, and it gets another height.
|
|
341
|
+
|
|
342
|
+
|
|
343
|
+
if (wide !== this.drawnWidth) {
|
|
344
|
+
this.drawnWidth = wide;
|
|
345
|
+
this.fitFrame();
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
/** What only a new document can change: the doctype, the root's attributes and the head. */
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
headOf(parsed) {
|
|
352
|
+
const root = parsed.documentElement;
|
|
353
|
+
const attributes = [...root.attributes].map(({
|
|
354
|
+
name,
|
|
355
|
+
value
|
|
356
|
+
}) => `${name}=${value}`).join(" ");
|
|
357
|
+
return `${parsed.doctype?.name ?? ""}|${attributes}|${parsed.head?.innerHTML ?? ""}`;
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Brings the frame's body to a new letter in place. Blocks are matched by
|
|
361
|
+
* their mark and moved, an unchanged block is not touched, and nothing is
|
|
362
|
+
* reloaded: no flicker, and the overlay's elements stay the same elements. The
|
|
363
|
+
* parsed letter ran nothing, and what is taken from it runs nothing in the
|
|
364
|
+
* sandboxed frame either.
|
|
365
|
+
*/
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
patchLetter(parsed) {
|
|
369
|
+
const letter = this.frameDocument; // A block still gliding would count in the height measured below.
|
|
370
|
+
|
|
371
|
+
this.boundOverlay?.settleGlide?.();
|
|
372
|
+
|
|
373
|
+
for (const link of parsed.querySelectorAll("a")) link.tabIndex = -1;
|
|
374
|
+
|
|
375
|
+
this.patchNode(letter.body, parsed.body);
|
|
376
|
+
this.hovered = "";
|
|
377
|
+
this.nodesFor = null;
|
|
378
|
+
this.sfEmit("draw", {});
|
|
379
|
+
this.measureFrame();
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
patchNode(live, next) {
|
|
383
|
+
// The text being edited is the person's until the edit ends.
|
|
384
|
+
const editing = this.boundOverlay?.editing?.element;
|
|
385
|
+
if (live === editing) return;
|
|
386
|
+
if (live.isEqualNode(next)) return;
|
|
387
|
+
|
|
388
|
+
if (live.nodeType !== 1) {
|
|
389
|
+
live.nodeValue = next.nodeValue;
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
for (const {
|
|
394
|
+
name
|
|
395
|
+
} of [...live.attributes]) if (!next.hasAttribute(name)) live.removeAttribute(name);
|
|
396
|
+
|
|
397
|
+
for (const {
|
|
398
|
+
name,
|
|
399
|
+
value
|
|
400
|
+
} of next.attributes) if (live.getAttribute(name) !== value) live.setAttribute(name, value);
|
|
401
|
+
|
|
402
|
+
this.patchChildren(live, next);
|
|
403
|
+
}
|
|
404
|
+
/** The children of a node: marked ones by their mark wherever they stood, the rest in order by kind. */
|
|
405
|
+
|
|
406
|
+
|
|
407
|
+
patchChildren(live, next) {
|
|
408
|
+
const mark = this.markAttributeName();
|
|
409
|
+
|
|
410
|
+
const markOf = node => node.nodeType === 1 ? node.getAttribute(mark) || "" : "";
|
|
411
|
+
|
|
412
|
+
const marked = new Map();
|
|
413
|
+
|
|
414
|
+
for (const child of live.children) if (markOf(child)) marked.set(markOf(child), child);
|
|
415
|
+
|
|
416
|
+
let cursor = live.firstChild;
|
|
417
|
+
|
|
418
|
+
for (const wanted of [...next.childNodes]) {
|
|
419
|
+
const id = markOf(wanted);
|
|
420
|
+
let have = id ? marked.get(id) : null;
|
|
421
|
+
if (have) marked.delete(id);
|
|
422
|
+
|
|
423
|
+
if (!id) {
|
|
424
|
+
let plain = cursor;
|
|
425
|
+
|
|
426
|
+
while (plain && markOf(plain)) plain = plain.nextSibling;
|
|
427
|
+
|
|
428
|
+
if (plain && plain.nodeType === wanted.nodeType && plain.nodeName === wanted.nodeName) have = plain;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
if (!have) {
|
|
432
|
+
live.insertBefore(live.ownerDocument.importNode(wanted, true), cursor);
|
|
433
|
+
continue;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
if (have === cursor) cursor = cursor.nextSibling;else live.insertBefore(have, cursor);
|
|
437
|
+
this.patchNode(have, wanted);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
while (cursor) {
|
|
441
|
+
const gone = cursor;
|
|
442
|
+
cursor = cursor.nextSibling;
|
|
443
|
+
gone.remove();
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
onFrameLoad() {
|
|
448
|
+
// The blank document a frame has before its first letter is no picture.
|
|
449
|
+
if (!this.written) return;
|
|
450
|
+
this.waitingForLoad = false;
|
|
451
|
+
this.toggleAttribute("data-sf-drawing", false);
|
|
452
|
+
const letter = this.frameDocument;
|
|
453
|
+
if (!letter) return;
|
|
454
|
+
this.sheet = null;
|
|
455
|
+
this.hovered = "";
|
|
456
|
+
this.nodesFor = null; // Links in a letter take no tab stop.
|
|
457
|
+
|
|
458
|
+
for (const link of letter.querySelectorAll("a")) link.tabIndex = -1; // A click on a block the overlay does not claim, or beside every block.
|
|
459
|
+
// It never follows a link: the frame shows a picture of a letter.
|
|
460
|
+
|
|
461
|
+
|
|
462
|
+
letter.addEventListener("click", event => {
|
|
463
|
+
event.preventDefault();
|
|
464
|
+
this.sayChosen(this.blockAt(event.target));
|
|
465
|
+
});
|
|
466
|
+
letter.addEventListener("mouseover", event => this.sayHovered(this.blockAt(event.target)));
|
|
467
|
+
letter.addEventListener("mouseout", event => {
|
|
468
|
+
if (!event.relatedTarget) this.sayHovered("");
|
|
469
|
+
}); // Before the measure, so what a host adjusts counts in the frame's height.
|
|
470
|
+
|
|
471
|
+
this.sfEmit("draw", {}); // Measured before the overlay hears of the letter, so its toolbar is
|
|
472
|
+
// placed once, in the frame's real height.
|
|
473
|
+
|
|
474
|
+
this.measureFrame();
|
|
475
|
+
this.drawSheet();
|
|
476
|
+
this.syncOverlay();
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
sayHovered(id) {
|
|
480
|
+
if (id === this.hovered) return;
|
|
481
|
+
this.hovered = id;
|
|
482
|
+
this.sfEmit("hover", {
|
|
483
|
+
id
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/** Measures on the next frame, after a change the page has not laid out yet. */
|
|
487
|
+
|
|
488
|
+
|
|
489
|
+
fitFrame() {
|
|
490
|
+
requestAnimationFrame(() => this.measureFrame());
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* The frame is as tall as the letter. The height is measured from nothing,
|
|
494
|
+
* because scrollHeight never drops below the frame; the scroll position the
|
|
495
|
+
* person had is put back at once, in the same task and not animated, so no
|
|
496
|
+
* paint sees the difference.
|
|
497
|
+
*/
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
measureFrame() {
|
|
501
|
+
const frame = this.frame;
|
|
502
|
+
const scroller = this.scroller;
|
|
503
|
+
const letter = this.frameDocument?.documentElement;
|
|
504
|
+
if (!frame || !scroller || !letter || !this.written) return;
|
|
505
|
+
const top = scroller.scrollTop;
|
|
506
|
+
frame.style.height = "0";
|
|
507
|
+
let height = letter.scrollHeight; // A letter whose height follows its frame settles in a step or two.
|
|
508
|
+
|
|
509
|
+
for (let step = 0; step < 4; step += 1) {
|
|
510
|
+
frame.style.height = `${height}px`;
|
|
511
|
+
if (letter.scrollHeight <= letter.clientHeight) break;
|
|
512
|
+
height = letter.scrollHeight + (letter.scrollHeight - letter.clientHeight);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
scroller.scrollTo({
|
|
516
|
+
top,
|
|
517
|
+
behavior: "instant"
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/** A Framework value as the frame needs it: the frame has no Framework tokens. */
|
|
521
|
+
|
|
522
|
+
|
|
523
|
+
resolved(property, value) {
|
|
524
|
+
const host = this.scroller ?? this;
|
|
525
|
+
const probe = this.ownerDocument.createElement("span");
|
|
526
|
+
probe.hidden = true;
|
|
527
|
+
probe.style.colorScheme = "light";
|
|
528
|
+
probe.style[property] = value;
|
|
529
|
+
host.append(probe);
|
|
530
|
+
const computed = getComputedStyle(probe)[property];
|
|
531
|
+
probe.remove();
|
|
532
|
+
return computed;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* What the canvas adds to the letter: the pointer over a block and the paper's
|
|
536
|
+
* shadow. No tint on hover or on the chosen block: the overlay's frames mark
|
|
537
|
+
* them, and a tint changes how the letter looks. A sheet in the frame's document.
|
|
538
|
+
*/
|
|
539
|
+
|
|
540
|
+
|
|
541
|
+
drawSheet() {
|
|
542
|
+
const letter = this.frameDocument;
|
|
543
|
+
if (!letter?.documentElement || !this.written || this.waitingForLoad) return;
|
|
544
|
+
const rules = [`[${this.markAttributeName()}]{cursor:pointer}`];
|
|
545
|
+
const paper = String(this.paper ?? "");
|
|
546
|
+
|
|
547
|
+
if (paper && !this.frameIsPaper() && CSS.supports(`selector(${paper})`)) {
|
|
548
|
+
rules.push(`${paper}{box-shadow:${this.resolved("boxShadow", "var(--sf-shadow-raised)")}}`);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
if (!this.sheet || this.sheet.ownerDocument !== letter) {
|
|
552
|
+
this.sheet = letter.createElement("style");
|
|
553
|
+
(letter.head ?? letter.documentElement).append(this.sheet);
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
const text = rules.join("");
|
|
557
|
+
if (this.sheet.textContent !== text) this.sheet.textContent = text;
|
|
558
|
+
}
|
|
559
|
+
/** Finds the overlay in use and listens to it; a later one is taken on the next draw. */
|
|
560
|
+
|
|
561
|
+
|
|
562
|
+
bindOverlay() {
|
|
563
|
+
const overlay = this.overlay;
|
|
564
|
+
if (overlay === this.boundOverlay) return;
|
|
565
|
+
this.overlayWatch?.abort();
|
|
566
|
+
this.overlayWatch = null;
|
|
567
|
+
this.boundOverlay = overlay;
|
|
568
|
+
this.nodesFor = null;
|
|
569
|
+
const target = String(this.overlayTarget ?? "");
|
|
570
|
+
|
|
571
|
+
if (!overlay) {
|
|
572
|
+
if (target && this.warnedTarget !== target) {
|
|
573
|
+
this.warnedTarget = target;
|
|
574
|
+
globalThis.console?.warn?.(`[SIMAI Framework] sf-mail-canvas: overlay-target "${target}" names no ${OVERLAY} on this page`);
|
|
575
|
+
}
|
|
576
|
+
|
|
577
|
+
return;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
const watch = new AbortController();
|
|
581
|
+
this.overlayWatch = watch;
|
|
582
|
+
|
|
583
|
+
const on = (verb, listener) => overlay.addEventListener(`${OVERLAY}-${verb}`, listener, {
|
|
584
|
+
signal: watch.signal
|
|
585
|
+
});
|
|
586
|
+
|
|
587
|
+
on("select", event => this.onOverlaySelect(event.detail ?? {}));
|
|
588
|
+
on("apply", ({
|
|
589
|
+
detail = {}
|
|
590
|
+
}) => this.sfEmit("apply", {
|
|
591
|
+
action: detail.action,
|
|
592
|
+
scope: detail.scope,
|
|
593
|
+
ids: detail.ids
|
|
594
|
+
}));
|
|
595
|
+
on("insert", ({
|
|
596
|
+
detail = {}
|
|
597
|
+
}) => this.sfEmit("insert", {
|
|
598
|
+
parent: detail.parent ?? "",
|
|
599
|
+
slot: detail.slot,
|
|
600
|
+
index: detail.index,
|
|
601
|
+
...(detail.item === undefined ? {} : {
|
|
602
|
+
item: detail.item,
|
|
603
|
+
from: detail.from,
|
|
604
|
+
mode: detail.mode
|
|
605
|
+
})
|
|
606
|
+
}));
|
|
607
|
+
on("move", ({
|
|
608
|
+
detail = {}
|
|
609
|
+
}) => this.sfEmit("move", {
|
|
610
|
+
ids: detail.ids,
|
|
611
|
+
id: detail.id,
|
|
612
|
+
parent: detail.parent ?? "",
|
|
613
|
+
position: detail.position,
|
|
614
|
+
slot: detail.slot
|
|
615
|
+
}));
|
|
616
|
+
on("change", event => {
|
|
617
|
+
const {
|
|
618
|
+
id,
|
|
619
|
+
value,
|
|
620
|
+
previous
|
|
621
|
+
} = event.detail ?? {};
|
|
622
|
+
if (!this.sfEmit("edit", {
|
|
623
|
+
id,
|
|
624
|
+
value,
|
|
625
|
+
previous
|
|
626
|
+
}, {
|
|
627
|
+
cancelable: true
|
|
628
|
+
})) event.preventDefault();
|
|
629
|
+
}); // The frame colour stays the paper's own in both themes, as the tints do.
|
|
630
|
+
|
|
631
|
+
overlay.style.setProperty("--sf-composition-overlay-frame-color", "var(--sf-paper-primary)");
|
|
632
|
+
customElements.whenDefined(OVERLAY).then(() => {
|
|
633
|
+
if (this.boundOverlay !== overlay || !this.frame) return;
|
|
634
|
+
overlay.attachFrame(this.frame);
|
|
635
|
+
this.nodesFor = null;
|
|
636
|
+
this.syncOverlay();
|
|
637
|
+
});
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
onOverlaySelect({
|
|
641
|
+
id
|
|
642
|
+
}) {
|
|
643
|
+
if (this.quiet) return;
|
|
644
|
+
const wanted = String(id ?? ""); // What the host has already chosen comes back from the overlay as news.
|
|
645
|
+
|
|
646
|
+
if (wanted === String(this.selected ?? "")) return;
|
|
647
|
+
this.sayChosen(wanted);
|
|
648
|
+
}
|
|
649
|
+
/**
|
|
650
|
+
* Tells the overlay what the letter holds: one node per item, the element
|
|
651
|
+
* being the block's own box in the frame, so the line it draws is that box.
|
|
652
|
+
* The next letter's items wait for the next letter.
|
|
653
|
+
*/
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
syncOverlay() {
|
|
657
|
+
const overlay = this.boundOverlay;
|
|
658
|
+
if (!overlay?.setNodes || !this.written || this.waitingForLoad || !this.frameDocument) return;
|
|
659
|
+
this.quiet = true;
|
|
660
|
+
|
|
661
|
+
try {
|
|
662
|
+
const items = this.items;
|
|
663
|
+
|
|
664
|
+
if (this.nodesFor?.items !== items || this.nodesFor?.letter !== this.frameDocument) {
|
|
665
|
+
overlay.setNodes(this.nodes());
|
|
666
|
+
this.nodesFor = {
|
|
667
|
+
items,
|
|
668
|
+
letter: this.frameDocument
|
|
669
|
+
};
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
overlay.setActions(Array.isArray(this.actions) ? this.actions : []);
|
|
673
|
+
overlay.select(String(this.selected ?? "") || null, {
|
|
674
|
+
emit: false
|
|
675
|
+
});
|
|
676
|
+
} finally {
|
|
677
|
+
this.quiet = false;
|
|
678
|
+
} // The element's own overlay takes it from the template.
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
const accepts = String(this.accepts ?? "");
|
|
682
|
+
if (accepts && this.overlayTarget) overlay.setAttribute("accepts", accepts);
|
|
683
|
+
}
|
|
684
|
+
/** The items the letter really holds; a child of an item it does not hold goes with it. */
|
|
685
|
+
|
|
686
|
+
|
|
687
|
+
nodes() {
|
|
688
|
+
const kept = new Set();
|
|
689
|
+
const nodes = [];
|
|
690
|
+
|
|
691
|
+
for (const item of this.itemList()) {
|
|
692
|
+
const element = this.markedElement(item.id, true);
|
|
693
|
+
const hasRect = item.rect && typeof item.rect === "object";
|
|
694
|
+
if (!element && !hasRect) continue;
|
|
695
|
+
if (item.parent && !kept.has(item.parent)) continue;
|
|
696
|
+
kept.add(item.id);
|
|
697
|
+
nodes.push({
|
|
698
|
+
id: item.id,
|
|
699
|
+
kind: item.kind || "block",
|
|
700
|
+
...(element ? {
|
|
701
|
+
element
|
|
702
|
+
} : {
|
|
703
|
+
rect: item.rect
|
|
704
|
+
}),
|
|
705
|
+
...(item.label ? {
|
|
706
|
+
label: String(item.label)
|
|
707
|
+
} : {}),
|
|
708
|
+
...(item.parent ? {
|
|
709
|
+
parent: item.parent
|
|
710
|
+
} : {}),
|
|
711
|
+
...(item.editable && element ? {
|
|
712
|
+
editable: true
|
|
713
|
+
} : {})
|
|
714
|
+
});
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
return nodes;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
templateContext() {
|
|
721
|
+
const current = this.currentWidth();
|
|
722
|
+
const weight = this.weight && typeof this.weight === "object" && Number.isFinite(Number(this.weight.bytes)) && this.weight.bytes !== null ? this.weight : null;
|
|
723
|
+
const wide = this.frameWidth(current);
|
|
724
|
+
return {
|
|
725
|
+
component: this,
|
|
726
|
+
choices: this.widthList().map(item => ({ ...item,
|
|
727
|
+
value: String(item.value)
|
|
728
|
+
})),
|
|
729
|
+
chosenWidth: String(current?.value ?? ""),
|
|
730
|
+
frameSize: wide || "",
|
|
731
|
+
frameCastsShadow: this.frameIsPaper(current),
|
|
732
|
+
ownOverlay: !String(this.overlayTarget ?? ""),
|
|
733
|
+
overlayAccepts: String(this.accepts ?? ""),
|
|
734
|
+
isStale: Boolean(this.stale),
|
|
735
|
+
staleText: this.sfWord("stale-text"),
|
|
736
|
+
weightText: weight ? this.sfWord("weight-text", {
|
|
737
|
+
vars: {
|
|
738
|
+
bytes: String(weight.bytes),
|
|
739
|
+
max: String(weight.max ?? "")
|
|
740
|
+
}
|
|
741
|
+
}) : "",
|
|
742
|
+
previewLabel: this.sfWord("preview-label"),
|
|
743
|
+
layerLabel: this.sfWord("layer-label"),
|
|
744
|
+
frameLabel: this.sfWord("frame-label"),
|
|
745
|
+
widthsLabel: this.sfWord("widths-label"),
|
|
746
|
+
rootClass: this.getRootClass?.() ?? ""
|
|
747
|
+
};
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
template() {
|
|
751
|
+
return (0,_js_templates_default_js__WEBPACK_IMPORTED_MODULE_2__.renderMailCanvasTemplate)(this.templateContext());
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
SfMailCanvas.define("sf-mail-canvas");
|
|
757
|
+
__webpack_async_result__();
|
|
758
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
759
|
+
|
|
760
|
+
/***/ },
|
|
761
|
+
|
|
762
|
+
/***/ "589addf598d5"
|
|
763
|
+
(module, __webpack_exports__, __webpack_require__) {
|
|
764
|
+
|
|
765
|
+
__webpack_require__.a(module, async (__webpack_handle_async_dependencies__, __webpack_async_result__) => { try {
|
|
766
|
+
__webpack_require__.r(__webpack_exports__);
|
|
767
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
768
|
+
/* harmony export */ renderMailCanvasTemplate: () => (/* binding */ renderMailCanvasTemplate)
|
|
769
|
+
/* harmony export */ });
|
|
770
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("2a080a730149");
|
|
771
|
+
/* harmony import */ var _default_css__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("09a6d44b7087");
|
|
772
|
+
var __webpack_async_dependencies__ = __webpack_handle_async_dependencies__([lit__WEBPACK_IMPORTED_MODULE_0__]);
|
|
773
|
+
var __webpack_async_dependencies_result__ = (__webpack_async_dependencies__.then ? (await __webpack_async_dependencies__)() : __webpack_async_dependencies__);
|
|
774
|
+
lit__WEBPACK_IMPORTED_MODULE_0__ = __webpack_async_dependencies_result__[0];
|
|
775
|
+
/* harmony import */ var lit__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(lit__WEBPACK_IMPORTED_MODULE_0__);
|
|
776
|
+
|
|
777
|
+
// The width switch, the two notes, the overlay and the frame. The overlay comes
|
|
778
|
+
// before the frame, so the keyboard tree is reached first and the frame, which
|
|
779
|
+
// takes no tab stop, is only ever pressed. The frame's sandbox is written here
|
|
780
|
+
// and nowhere else: allow-same-origin and nothing more, so the letter runs no
|
|
781
|
+
// script and the page can still read it. The overlay lies in the scroller: its
|
|
782
|
+
// frames and toolbar travel with the letter and nothing runs on scroll.
|
|
783
|
+
|
|
784
|
+
function renderMailCanvasTemplate(context) {
|
|
785
|
+
const {
|
|
786
|
+
component
|
|
787
|
+
} = context;
|
|
788
|
+
return (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`
|
|
789
|
+
<section class=${["sf-mail-canvas", context.rootClass].filter(Boolean).join(" ")} aria-label=${context.previewLabel}>
|
|
790
|
+
<h2 class="sr-only">${context.previewLabel}</h2>
|
|
791
|
+
${context.choices.length ? (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`<div class="sf-mail-canvas-bar">
|
|
792
|
+
<sf-segmented class="sf-mail-canvas-widths" plate="raised" size="1/2"
|
|
793
|
+
aria-label=${context.widthsLabel} value=${context.chosenWidth}
|
|
794
|
+
items=${JSON.stringify(context.choices)}
|
|
795
|
+
@change=${event => component.onWidthChange(event)}></sf-segmented>
|
|
796
|
+
</div>` : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
797
|
+
<p class="sf-mail-canvas-note sf-mail-canvas-stale" ?hidden=${!context.isStale}>${context.staleText}</p>
|
|
798
|
+
<p class="sf-mail-canvas-note sf-mail-canvas-weight" role="status" ?hidden=${!context.weightText}>${context.weightText}</p>
|
|
799
|
+
<div class="sf-mail-canvas-scroll">
|
|
800
|
+
${context.ownOverlay ? (0,lit__WEBPACK_IMPORTED_MODULE_0__.html)`<section class="sf-mail-canvas-layer" aria-label=${context.layerLabel}>
|
|
801
|
+
<sf-editor-overlay label=${context.previewLabel} accepts=${context.overlayAccepts || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}></sf-editor-overlay>
|
|
802
|
+
</section>` : lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
803
|
+
<iframe class=${["sf-mail-canvas-frame", context.frameCastsShadow ? "shadow-raised" : ""].filter(Boolean).join(" ")}
|
|
804
|
+
sandbox="allow-same-origin" tabindex="-1" title=${context.frameLabel}
|
|
805
|
+
width=${context.frameSize || lit__WEBPACK_IMPORTED_MODULE_0__.nothing}
|
|
806
|
+
@load=${() => component.onFrameLoad()}></iframe>
|
|
807
|
+
</div>
|
|
808
|
+
</section>
|
|
809
|
+
`;
|
|
810
|
+
}
|
|
811
|
+
__webpack_async_result__();
|
|
812
|
+
} catch(e) { __webpack_async_result__(e); } });
|
|
813
|
+
|
|
814
|
+
/***/ },
|
|
815
|
+
|
|
816
|
+
/***/ "09a6d44b7087"
|
|
817
|
+
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
818
|
+
|
|
819
|
+
__webpack_require__.r(__webpack_exports__);
|
|
820
|
+
// extracted by mini-css-extract-plugin
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
/***/ },
|
|
824
|
+
|
|
825
|
+
/***/ "5b7d7695b41b"
|
|
826
|
+
(module) {
|
|
827
|
+
|
|
828
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("element-manifest", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("element-manifest", 1).then(resolve, reject), { once: true })));
|
|
829
|
+
|
|
830
|
+
/***/ },
|
|
831
|
+
|
|
832
|
+
/***/ "2a080a730149"
|
|
833
|
+
(module) {
|
|
834
|
+
|
|
835
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("lit", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("lit", 1).then(resolve, reject), { once: true })));
|
|
836
|
+
|
|
837
|
+
/***/ },
|
|
838
|
+
|
|
839
|
+
/***/ "deb1a4d61565"
|
|
840
|
+
(module) {
|
|
841
|
+
|
|
842
|
+
module.exports = (globalThis.SF && globalThis.SF.runtimeModule ? globalThis.SF.runtimeModule("smart-base", 1) : new Promise((resolve, reject) => globalThis.addEventListener("sf-runtime-ready", () => globalThis.SF.runtimeModule("smart-base", 1).then(resolve, reject), { once: true })));
|
|
843
|
+
|
|
844
|
+
/***/ },
|
|
845
|
+
|
|
846
|
+
/***/ "47d5f171f605"
|
|
847
|
+
(module) {
|
|
848
|
+
|
|
849
|
+
module.exports = /*#__PURE__*/JSON.parse('{"id":"smart.mail-canvas","tag":"sf-mail-canvas","version":"1.1.9","kind":"leaf","settings":{"html":{"type":"string","default":""},"selected":{"type":"id","default":""},"widths":{"type":"list","default":[],"of":{"value":"string","label":"string","icon":{"type":"icon","optional":true},"frame":{"type":"number","optional":true},"icon-only":{"type":"boolean","optional":true},"aria-label":{"type":"string","optional":true}},"entries":{"key":"value","changes":"content"}},"width":{"type":"string","default":""},"stale":{"type":"boolean","default":false},"weight":{"type":"object","default":{},"of":{"bytes":"number","max":"number"}},"items":{"type":"list","default":[],"of":{"id":"id","label":{"type":"string","optional":true},"kind":{"type":"string","optional":true},"parent":{"type":"id","optional":true},"editable":{"type":"boolean","optional":true},"rect":{"type":"object","optional":true}},"entries":{"key":"id","changes":"content"}},"actions":{"type":"list","default":[],"of":{"id":"string","label":"string","icon":{"type":"string","optional":true},"shortcut":{"type":"string","optional":true},"disabled":{"type":"boolean","optional":true},"tone":{"type":"enum","values":["danger"],"optional":true}},"entries":{"key":"id","changes":"content"}},"accepts":{"type":"string","default":""},"mark-attribute":{"type":"string","default":"data-block"},"box-attribute":{"type":"string","default":""},"paper":{"type":"string","default":""},"overlay-target":{"type":"string","default":""}},"values":{},"events":{"select":{"carries":{"ids":"list","id":"id"}},"hover":{"carries":{"id":"id"},"own-verb":true},"change":{"carries":{"value":"string","previous":"string"}},"apply":{"carries":{"action":"string","scope":{"type":"enum","values":["entry"]},"ids":"list"}},"insert":{"carries":{"parent":"id","slot":"string","index":{"type":"number","integer":true},"item":{"type":"string","optional":true},"from":{"type":"string","optional":true},"mode":{"type":"enum","values":["move","copy"],"optional":true}},"own-verb":true},"move":{"carries":{"ids":"list","id":"id","parent":"id","position":"number","slot":"string"}},"edit":{"carries":{"id":"id","value":"string","previous":"string"},"own-verb":true,"cancelable":true},"draw":{"carries":{},"own-verb":true}},"actions":{"select":{"with":{"id":{"type":"id","optional":true}}},"set-width":{"with":{"value":"string"}},"reveal":{"with":{"id":{"type":"id","optional":true}}},"refresh":{"with":{}}},"host-states":{},"css-variables":{}}');
|
|
850
|
+
|
|
851
|
+
/***/ },
|
|
852
|
+
|
|
853
|
+
/***/ "72f304e6f2fd"
|
|
854
|
+
(module) {
|
|
855
|
+
|
|
856
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Letter canvas","runtime":{"frame-label":"The email in preview","layer-label":"The editor’s layer over the letter","preview-label":"Preview","stale-text":"The preview is out of date: fix the error in the fields.","weight-text":"The letter HTML is {bytes} KB (the warning starts at {max} KB). Gmail clips a letter at about 102 KB, and the footer is lost first.","widths-label":"Email width"},"events":{"hover":{"label":"A block is under the pointer"},"insert":{"label":"A block was asked for at this place"},"edit":{"label":"The text on the letter was changed"},"draw":{"label":"The letter was drawn"}}}');
|
|
857
|
+
|
|
858
|
+
/***/ },
|
|
859
|
+
|
|
860
|
+
/***/ "87aa449fd9de"
|
|
861
|
+
(module) {
|
|
862
|
+
|
|
863
|
+
module.exports = /*#__PURE__*/JSON.parse('{"title":"Холст письма","runtime":{"frame-label":"Письмо в предпросмотре","layer-label":"Слой редактора над письмом","preview-label":"Предпросмотр","stale-text":"Предпросмотр устарел: исправьте ошибку в полях.","weight-text":"HTML письма {bytes} КБ (предупреждение с {max} КБ). Gmail обрезает письмо около 102 КБ, и подвал теряется первым.","widths-label":"Ширина письма"},"events":{"hover":{"label":"Навели на блок"},"insert":{"label":"Попросили блок на это место"},"edit":{"label":"Изменили текст на письме"},"draw":{"label":"Письмо отрисовано"}}}');
|
|
864
|
+
|
|
865
|
+
/***/ }
|
|
866
|
+
|
|
867
|
+
/******/ });
|
|
868
|
+
/************************************************************************/
|
|
869
|
+
/******/ // The module cache
|
|
870
|
+
/******/ const __webpack_module_cache__ = {};
|
|
871
|
+
/******/
|
|
872
|
+
/******/ // The require function
|
|
873
|
+
/******/ function __webpack_require__(moduleId) {
|
|
874
|
+
/******/ // Check if module is in cache
|
|
875
|
+
/******/ const cachedModule = __webpack_module_cache__[moduleId];
|
|
876
|
+
/******/ if (cachedModule !== undefined) {
|
|
877
|
+
/******/ return cachedModule.exports;
|
|
878
|
+
/******/ }
|
|
879
|
+
/******/ // Create a new module (and put it into the cache)
|
|
880
|
+
/******/ const module = __webpack_module_cache__[moduleId] = {
|
|
881
|
+
/******/ // no module.id needed
|
|
882
|
+
/******/ // no module.loaded needed
|
|
883
|
+
/******/ exports: {}
|
|
884
|
+
/******/ };
|
|
885
|
+
/******/
|
|
886
|
+
/******/ // Execute the module function
|
|
887
|
+
/******/ if (!(moduleId in __webpack_modules__)) {
|
|
888
|
+
/******/ delete __webpack_module_cache__[moduleId];
|
|
889
|
+
/******/ const e = new Error("Cannot find module '" + moduleId + "'");
|
|
890
|
+
/******/ e.code = 'MODULE_NOT_FOUND';
|
|
891
|
+
/******/ throw e;
|
|
892
|
+
/******/ }
|
|
893
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
894
|
+
/******/
|
|
895
|
+
/******/ // Return the exports of the module
|
|
896
|
+
/******/ return module.exports;
|
|
897
|
+
/******/ }
|
|
898
|
+
/******/
|
|
899
|
+
/************************************************************************/
|
|
900
|
+
/******/ /* webpack/runtime/async module */
|
|
901
|
+
/******/ (() => {
|
|
902
|
+
/******/ const hasSymbol = typeof Symbol === "function";
|
|
903
|
+
/******/ const webpackQueues = hasSymbol ? Symbol("webpack queues") : "__webpack_queues__";
|
|
904
|
+
/******/ const webpackExports = hasSymbol ? Symbol("webpack exports") : "__webpack_exports__";
|
|
905
|
+
/******/ const webpackError = hasSymbol ? Symbol("webpack error") : "__webpack_error__";
|
|
906
|
+
/******/
|
|
907
|
+
/******/ const resolveQueue = (queue) => {
|
|
908
|
+
/******/ if(queue?.d < 1) {
|
|
909
|
+
/******/ queue.d = 1;
|
|
910
|
+
/******/ queue.forEach((fn) => (fn.r--));
|
|
911
|
+
/******/ queue.forEach((fn) => (fn.r-- ? fn.r++ : fn()));
|
|
912
|
+
/******/ }
|
|
913
|
+
/******/ }
|
|
914
|
+
/******/ const wrapDeps = (deps) => (deps.map((dep) => {
|
|
915
|
+
/******/ if(dep !== null && typeof dep === "object") {
|
|
916
|
+
/******/
|
|
917
|
+
/******/ if(dep[webpackQueues]) return dep;
|
|
918
|
+
/******/ if(dep.then) {
|
|
919
|
+
/******/ const queue = [];
|
|
920
|
+
/******/ queue.d = 0;
|
|
921
|
+
/******/ dep.then((r) => {
|
|
922
|
+
/******/ obj[webpackExports] = r;
|
|
923
|
+
/******/ resolveQueue(queue);
|
|
924
|
+
/******/ }, (e) => {
|
|
925
|
+
/******/ obj[webpackError] = e;
|
|
926
|
+
/******/ resolveQueue(queue);
|
|
927
|
+
/******/ });
|
|
928
|
+
/******/ const obj = {};
|
|
929
|
+
/******/
|
|
930
|
+
/******/ obj[webpackQueues] = (fn) => (fn(queue));
|
|
931
|
+
/******/ return obj;
|
|
932
|
+
/******/ }
|
|
933
|
+
/******/ }
|
|
934
|
+
/******/ const ret = {};
|
|
935
|
+
/******/ ret[webpackQueues] = x => {};
|
|
936
|
+
/******/ ret[webpackExports] = dep;
|
|
937
|
+
/******/ return ret;
|
|
938
|
+
/******/ }));
|
|
939
|
+
/******/ __webpack_require__.a = (module, body, hasAwait) => {
|
|
940
|
+
/******/ let queue;
|
|
941
|
+
/******/ hasAwait && ((queue = []).d = -1);
|
|
942
|
+
/******/ const depQueues = new Set();
|
|
943
|
+
/******/ const exports = module.exports;
|
|
944
|
+
/******/ let currentDeps;
|
|
945
|
+
/******/ let outerResolve;
|
|
946
|
+
/******/ let reject;
|
|
947
|
+
/******/ const promise = new Promise((resolve, rej) => {
|
|
948
|
+
/******/ reject = rej;
|
|
949
|
+
/******/ outerResolve = resolve;
|
|
950
|
+
/******/ });
|
|
951
|
+
/******/ promise[webpackExports] = exports;
|
|
952
|
+
/******/ promise[webpackQueues] = (fn) => (queue && fn(queue), depQueues.forEach(fn), promise["catch"](x => {}));
|
|
953
|
+
/******/ module.exports = promise;
|
|
954
|
+
/******/ const handle = (deps) => {
|
|
955
|
+
/******/ currentDeps = wrapDeps(deps);
|
|
956
|
+
/******/ let fn;
|
|
957
|
+
/******/ const getResult = () => (currentDeps.map((d) => {
|
|
958
|
+
/******/
|
|
959
|
+
/******/ if(d[webpackError]) throw d[webpackError];
|
|
960
|
+
/******/ return d[webpackExports];
|
|
961
|
+
/******/ }))
|
|
962
|
+
/******/ const promise = new Promise((resolve) => {
|
|
963
|
+
/******/ fn = () => (resolve(getResult));
|
|
964
|
+
/******/ fn.r = 0;
|
|
965
|
+
/******/ const fnQueue = (q) => (q !== queue && !depQueues.has(q) && (depQueues.add(q), q && !q.d && (fn.r++, q.push(fn))));
|
|
966
|
+
/******/ currentDeps.map((dep) => (dep[webpackQueues](fnQueue)));
|
|
967
|
+
/******/ });
|
|
968
|
+
/******/ return fn.r ? promise : getResult();
|
|
969
|
+
/******/ }
|
|
970
|
+
/******/ const done = (err) => ((err ? reject(promise[webpackError] = err) : outerResolve(exports)), resolveQueue(queue))
|
|
971
|
+
/******/ body(handle, done);
|
|
972
|
+
/******/ queue?.d < 0 && (queue.d = 0);
|
|
973
|
+
/******/ };
|
|
974
|
+
/******/ })();
|
|
975
|
+
/******/
|
|
976
|
+
/******/ /* webpack/runtime/compat get default export */
|
|
977
|
+
/******/ (() => {
|
|
978
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
979
|
+
/******/ __webpack_require__.n = (module) => {
|
|
980
|
+
/******/ const getter = module && module.__esModule ?
|
|
981
|
+
/******/ () => (module['default']) :
|
|
982
|
+
/******/ () => (module);
|
|
983
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
|
984
|
+
/******/ return getter;
|
|
985
|
+
/******/ };
|
|
986
|
+
/******/ })();
|
|
987
|
+
/******/
|
|
988
|
+
/******/ /* webpack/runtime/define property getters */
|
|
989
|
+
/******/ (() => {
|
|
990
|
+
/******/ // define getter/value functions for harmony exports
|
|
991
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
|
992
|
+
/******/ if(Array.isArray(definition)) {
|
|
993
|
+
/******/ var i = 0;
|
|
994
|
+
/******/ while(i < definition.length) {
|
|
995
|
+
/******/ var key = definition[i++];
|
|
996
|
+
/******/ var binding = definition[i++];
|
|
997
|
+
/******/ if(!__webpack_require__.o(exports, key)) {
|
|
998
|
+
/******/ if(binding === 0) {
|
|
999
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
|
|
1000
|
+
/******/ } else {
|
|
1001
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
|
|
1002
|
+
/******/ }
|
|
1003
|
+
/******/ } else if(binding === 0) { i++; }
|
|
1004
|
+
/******/ }
|
|
1005
|
+
/******/ } else {
|
|
1006
|
+
/******/ for(var key in definition) {
|
|
1007
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
1008
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
1009
|
+
/******/ }
|
|
1010
|
+
/******/ }
|
|
1011
|
+
/******/ }
|
|
1012
|
+
/******/ };
|
|
1013
|
+
/******/ })();
|
|
1014
|
+
/******/
|
|
1015
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
1016
|
+
/******/ (() => {
|
|
1017
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
1018
|
+
/******/ })();
|
|
1019
|
+
/******/
|
|
1020
|
+
/******/ /* webpack/runtime/make namespace object */
|
|
1021
|
+
/******/ (() => {
|
|
1022
|
+
/******/ // define __esModule on exports
|
|
1023
|
+
/******/ __webpack_require__.r = (exports) => {
|
|
1024
|
+
/******/ if(Symbol.toStringTag) {
|
|
1025
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
1026
|
+
/******/ }
|
|
1027
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
|
1028
|
+
/******/ };
|
|
1029
|
+
/******/ })();
|
|
1030
|
+
/******/
|
|
1031
|
+
/************************************************************************/
|
|
1032
|
+
/******/
|
|
1033
|
+
/******/ // startup
|
|
1034
|
+
/******/ // Load entry module and return exports
|
|
1035
|
+
/******/ // This entry module used 'module' so it can't be inlined
|
|
1036
|
+
/******/ let __webpack_exports__ = __webpack_require__("7169640ec00d");
|
|
1037
|
+
/******/
|
|
1038
|
+
/******/ })()
|
|
1039
|
+
;
|