@appius-fr/apx 2.4.0 → 2.5.2

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.
@@ -0,0 +1,3170 @@
1
+ /******/ (() => { // webpackBootstrap
2
+ /******/ var __webpack_modules__ = ({
3
+
4
+ /***/ "./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css":
5
+ /*!*****************************************************************************!*\
6
+ !*** ./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css ***!
7
+ \*****************************************************************************/
8
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
9
+
10
+ "use strict";
11
+ __webpack_require__.r(__webpack_exports__);
12
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
13
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
14
+ /* harmony export */ });
15
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
16
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
17
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
18
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
19
+ // Imports
20
+
21
+
22
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
23
+ // Module
24
+ ___CSS_LOADER_EXPORT___.push([module.id, `/* Dialog styling */
25
+ .APX-dialog {
26
+ display: none;
27
+ position: fixed;
28
+ z-index: 1002;
29
+ left: 0;
30
+ top: 0;
31
+ width: 100%;
32
+ height: 100%;
33
+ overflow: auto;
34
+ background-color: rgba(0, 0, 0, 0.4);
35
+ /* Dimmed background for focus on dialog */
36
+ }
37
+
38
+ .APX-dialog-content {
39
+ background-color: #fefefe;
40
+ padding: 40px;
41
+ border: none;
42
+ width: auto;
43
+ min-width: 300px;
44
+ max-width: 80%;
45
+ margin: auto;
46
+ border-radius: 8px;
47
+ box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);
48
+ font-family: 'Helvetica Neue', Arial, sans-serif;
49
+ }
50
+
51
+ h2.APX-dialog-title{
52
+ margin-top:0;
53
+ }
54
+
55
+ .APX-close-dialog {
56
+ color: #aaa;
57
+ float: right;
58
+ font-size: 24px;
59
+ margin-top: -10px;
60
+ /* Adjust positioning */
61
+ margin-right: -10px;
62
+ }
63
+
64
+ .APX-close-dialog:hover,
65
+ .APX-close-dialog:focus {
66
+ color: #333;
67
+ /* Darker color on hover/focus */
68
+ cursor: pointer;
69
+ }
70
+
71
+ /* Input fields styling */
72
+ .APX-dialog-content input[type="text"],
73
+ .APX-dialog-content input[type="number"],
74
+ .APX-dialog-content input[type="date"],
75
+ .APX-dialog-content input[type="datetime-local"] {
76
+ width: 100%;
77
+ padding: 10px;
78
+ margin-bottom: 20px;
79
+ border: 1px solid #ccc;
80
+ border-radius: 4px;
81
+ font-family: 'Helvetica Neue', Arial, sans-serif;
82
+ font-size: 16px;
83
+ box-sizing: border-box;
84
+ transition: border-color 0.3s;
85
+ }
86
+
87
+ .APX-dialog-content input[type="text"]:focus,
88
+ .APX-dialog-content input[type="number"]:focus,
89
+ .APX-dialog-content input[type="date"]:focus,
90
+ .APX-dialog-content input[type="datetime-local"]:focus {
91
+ border-color: #2C3E50;
92
+ /* Deep Blue Color */
93
+ outline: none;
94
+ }
95
+
96
+ /* Button in the dialog */
97
+ .APX-dialog-button-container button {
98
+ position: relative;
99
+ background-color: #2C3E50;
100
+ color: #ECF0F1;
101
+ border: none;
102
+ padding: 10px 20px;
103
+ border-radius: 5px;
104
+ font-size: 16px;
105
+ cursor: pointer;
106
+ transition: all 0.3s ease;
107
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
108
+ }
109
+
110
+ .APX-dialog-button-container button:hover {
111
+ background-color: #34495E;
112
+ transform: translateY(-1px);
113
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
114
+ }
115
+
116
+ .APX-dialog-button-container {
117
+ display: flex;
118
+ gap: 10px;
119
+ margin-top:1em;
120
+ /* spacing between buttons */
121
+ }
122
+
123
+ /* Loading indicator */
124
+ .APX-dialog-loading-indicator {
125
+ display: flex;
126
+ justify-content: center;
127
+ align-items: center;
128
+ height: 100px;
129
+ width: 100%;
130
+ }
131
+
132
+ .APX-dialog-loading-indicator::before {
133
+ content: '';
134
+ width: 40px;
135
+ height: 40px;
136
+ border: 4px solid #f3f3f3;
137
+ border-top: 4px solid #2C3E50;
138
+ border-radius: 50%;
139
+ animation: APX-dialog-spin 1s linear infinite;
140
+ }
141
+
142
+ @keyframes APX-dialog-spin {
143
+ 0% { transform: rotate(0deg); }
144
+ 100% { transform: rotate(360deg); }
145
+ }
146
+ .APX-dialog-button-disabled {
147
+ opacity: 0.5;
148
+ cursor: not-allowed !important;
149
+ background-color: #95a5a6 !important; /* Grayed out color */
150
+ box-shadow: none !important;
151
+ transition: all 0.2s ease;
152
+ transform: none !important;
153
+ }
154
+
155
+ .APX-dialog-button-disabled:hover {
156
+ background-color: #95a5a6 !important; /* Keep gray on hover */
157
+ transform: none !important;
158
+ }
159
+
160
+ /* Add a subtle strikethrough effect */
161
+ .APX-dialog-button-disabled::after {
162
+ content: '';
163
+ position: absolute;
164
+ top: 50%;
165
+ left: 0;
166
+ width: 100%;
167
+ height: 1px;
168
+ background-color: rgba(0, 0, 0, 0.2);
169
+ transform: rotate(-5deg);
170
+ }`, "",{"version":3,"sources":["webpack://./modules/dialog/css/dialog.css"],"names":[],"mappings":"AAAA,mBAAmB;AACnB;IACI,aAAa;IACb,eAAe;IACf,aAAa;IACb,OAAO;IACP,MAAM;IACN,WAAW;IACX,YAAY;IACZ,cAAc;IACd,oCAAoC;IACpC,0CAA0C;AAC9C;;AAEA;IACI,yBAAyB;IACzB,aAAa;IACb,YAAY;IACZ,WAAW;IACX,gBAAgB;IAChB,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,2CAA2C;IAC3C,gDAAgD;AACpD;;AAEA;IACI,YAAY;AAChB;;AAEA;IACI,WAAW;IACX,YAAY;IACZ,eAAe;IACf,iBAAiB;IACjB,uBAAuB;IACvB,mBAAmB;AACvB;;AAEA;;IAEI,WAAW;IACX,gCAAgC;IAChC,eAAe;AACnB;;AAEA,yBAAyB;AACzB;;;;IAII,WAAW;IACX,aAAa;IACb,mBAAmB;IACnB,sBAAsB;IACtB,kBAAkB;IAClB,gDAAgD;IAChD,eAAe;IACf,sBAAsB;IACtB,6BAA6B;AACjC;;AAEA;;;;IAII,qBAAqB;IACrB,oBAAoB;IACpB,aAAa;AACjB;;AAEA,yBAAyB;AACzB;IACI,kBAAkB;IAClB,yBAAyB;IACzB,cAAc;IACd,YAAY;IACZ,kBAAkB;IAClB,kBAAkB;IAClB,eAAe;IACf,eAAe;IACf,yBAAyB;IACzB,wCAAwC;AAC5C;;AAEA;IACI,yBAAyB;IACzB,2BAA2B;IAC3B,yCAAyC;AAC7C;;AAEA;IACI,aAAa;IACb,SAAS;IACT,cAAc;IACd,4BAA4B;AAChC;;AAEA,sBAAsB;AACtB;IACI,aAAa;IACb,uBAAuB;IACvB,mBAAmB;IACnB,aAAa;IACb,WAAW;AACf;;AAEA;IACI,WAAW;IACX,WAAW;IACX,YAAY;IACZ,yBAAyB;IACzB,6BAA6B;IAC7B,kBAAkB;IAClB,6CAA6C;AACjD;;AAEA;IACI,KAAK,uBAAuB,EAAE;IAC9B,OAAO,yBAAyB,EAAE;AACtC;AACA;IACI,YAAY;IACZ,8BAA8B;IAC9B,oCAAoC,EAAE,qBAAqB;IAC3D,2BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;AAC9B;;AAEA;IACI,oCAAoC,EAAE,uBAAuB;IAC7D,0BAA0B;AAC9B;;AAEA,sCAAsC;AACtC;IACI,WAAW;IACX,kBAAkB;IAClB,QAAQ;IACR,OAAO;IACP,WAAW;IACX,WAAW;IACX,oCAAoC;IACpC,wBAAwB;AAC5B","sourcesContent":["/* Dialog styling */\r\n.APX-dialog {\r\n display: none;\r\n position: fixed;\r\n z-index: 1002;\r\n left: 0;\r\n top: 0;\r\n width: 100%;\r\n height: 100%;\r\n overflow: auto;\r\n background-color: rgba(0, 0, 0, 0.4);\r\n /* Dimmed background for focus on dialog */\r\n}\r\n\r\n.APX-dialog-content {\r\n background-color: #fefefe;\r\n padding: 40px;\r\n border: none;\r\n width: auto;\r\n min-width: 300px;\r\n max-width: 80%;\r\n margin: auto;\r\n border-radius: 8px;\r\n box-shadow: 0px 6px 20px rgba(0, 0, 0, 0.1);\r\n font-family: 'Helvetica Neue', Arial, sans-serif;\r\n}\r\n\r\nh2.APX-dialog-title{\r\n margin-top:0;\r\n}\r\n\r\n.APX-close-dialog {\r\n color: #aaa;\r\n float: right;\r\n font-size: 24px;\r\n margin-top: -10px;\r\n /* Adjust positioning */\r\n margin-right: -10px;\r\n}\r\n\r\n.APX-close-dialog:hover,\r\n.APX-close-dialog:focus {\r\n color: #333;\r\n /* Darker color on hover/focus */\r\n cursor: pointer;\r\n}\r\n\r\n/* Input fields styling */\r\n.APX-dialog-content input[type=\"text\"],\r\n.APX-dialog-content input[type=\"number\"],\r\n.APX-dialog-content input[type=\"date\"],\r\n.APX-dialog-content input[type=\"datetime-local\"] {\r\n width: 100%;\r\n padding: 10px;\r\n margin-bottom: 20px;\r\n border: 1px solid #ccc;\r\n border-radius: 4px;\r\n font-family: 'Helvetica Neue', Arial, sans-serif;\r\n font-size: 16px;\r\n box-sizing: border-box;\r\n transition: border-color 0.3s;\r\n}\r\n\r\n.APX-dialog-content input[type=\"text\"]:focus,\r\n.APX-dialog-content input[type=\"number\"]:focus,\r\n.APX-dialog-content input[type=\"date\"]:focus,\r\n.APX-dialog-content input[type=\"datetime-local\"]:focus {\r\n border-color: #2C3E50;\r\n /* Deep Blue Color */\r\n outline: none;\r\n}\r\n\r\n/* Button in the dialog */\r\n.APX-dialog-button-container button {\r\n position: relative;\r\n background-color: #2C3E50;\r\n color: #ECF0F1;\r\n border: none;\r\n padding: 10px 20px;\r\n border-radius: 5px;\r\n font-size: 16px;\r\n cursor: pointer;\r\n transition: all 0.3s ease;\r\n box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);\r\n}\r\n\r\n.APX-dialog-button-container button:hover {\r\n background-color: #34495E;\r\n transform: translateY(-1px);\r\n box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);\r\n}\r\n\r\n.APX-dialog-button-container {\r\n display: flex;\r\n gap: 10px;\r\n margin-top:1em;\r\n /* spacing between buttons */\r\n}\r\n\r\n/* Loading indicator */\r\n.APX-dialog-loading-indicator {\r\n display: flex;\r\n justify-content: center;\r\n align-items: center;\r\n height: 100px;\r\n width: 100%;\r\n}\r\n\r\n.APX-dialog-loading-indicator::before {\r\n content: '';\r\n width: 40px;\r\n height: 40px;\r\n border: 4px solid #f3f3f3;\r\n border-top: 4px solid #2C3E50;\r\n border-radius: 50%;\r\n animation: APX-dialog-spin 1s linear infinite;\r\n}\r\n\r\n@keyframes APX-dialog-spin {\r\n 0% { transform: rotate(0deg); }\r\n 100% { transform: rotate(360deg); }\r\n}\r\n.APX-dialog-button-disabled {\r\n opacity: 0.5;\r\n cursor: not-allowed !important;\r\n background-color: #95a5a6 !important; /* Grayed out color */\r\n box-shadow: none !important;\r\n transition: all 0.2s ease;\r\n transform: none !important;\r\n}\r\n\r\n.APX-dialog-button-disabled:hover {\r\n background-color: #95a5a6 !important; /* Keep gray on hover */\r\n transform: none !important;\r\n}\r\n\r\n/* Add a subtle strikethrough effect */\r\n.APX-dialog-button-disabled::after {\r\n content: '';\r\n position: absolute;\r\n top: 50%;\r\n left: 0;\r\n width: 100%;\r\n height: 1px;\r\n background-color: rgba(0, 0, 0, 0.2);\r\n transform: rotate(-5deg);\r\n}"],"sourceRoot":""}]);
171
+ // Exports
172
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
173
+
174
+
175
+ /***/ }),
176
+
177
+ /***/ "./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css":
178
+ /*!***************************************************************************!*\
179
+ !*** ./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css ***!
180
+ \***************************************************************************/
181
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
182
+
183
+ "use strict";
184
+ __webpack_require__.r(__webpack_exports__);
185
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
186
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
187
+ /* harmony export */ });
188
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
189
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
190
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
191
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
192
+ // Imports
193
+
194
+
195
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
196
+ // Module
197
+ ___CSS_LOADER_EXPORT___.push([module.id, `.APX-toast-container {
198
+ position: fixed;
199
+ display: flex;
200
+ flex-direction: column;
201
+ gap: var(--apx-toast-gap, 8px);
202
+ z-index: var(--apx-toast-z-index, 11000);
203
+ pointer-events: none;
204
+ }
205
+
206
+ .APX-toast-container--bottom-right { right: 12px; bottom: 12px; align-items: flex-end; }
207
+ .APX-toast-container--bottom-left { left: 12px; bottom: 12px; align-items: flex-start; }
208
+ .APX-toast-container--top-right { right: 12px; top: 12px; align-items: flex-end; }
209
+ .APX-toast-container--top-left { left: 12px; top: 12px; align-items: flex-start; }
210
+
211
+ .APX-toast {
212
+ min-width: var(--apx-toast-min-width, 260px);
213
+ max-width: var(--apx-toast-max-width, 420px);
214
+ font-size: var(--apx-toast-font-size, 14px);
215
+ border-radius: var(--apx-toast-radius, 6px);
216
+ box-shadow: var(--apx-toast-shadow, 0 6px 24px rgba(0,0,0,0.2));
217
+ padding: var(--apx-toast-padding, 10px 42px 10px 14px);
218
+ color: #111;
219
+ background: #eee;
220
+ pointer-events: auto;
221
+ position: relative;
222
+ transition: opacity 180ms ease, transform 180ms ease;
223
+ }
224
+
225
+ .APX-toast--info { background: var(--apx-toast-info-bg, #0dcaf0); color: var(--apx-toast-info-fg, #052c65); }
226
+ .APX-toast--success { background: var(--apx-toast-success-bg, #198754); color: var(--apx-toast-success-fg, #ffffff); }
227
+ .APX-toast--warning { background: var(--apx-toast-warning-bg, #ffc107); color: var(--apx-toast-warning-fg, #664d03); }
228
+ .APX-toast--danger { background: var(--apx-toast-danger-bg, #dc3545); color: var(--apx-toast-danger-fg, #ffffff); }
229
+
230
+ .APX-toast__content { line-height: 1.35; }
231
+
232
+ .APX-toast__close {
233
+ position: absolute;
234
+ top: 50%; right: 10px;
235
+ width: 24px; height: 24px;
236
+ transform: translateY(-50%);
237
+ display: inline-flex; align-items: center; justify-content: center;
238
+ background: transparent; color: currentColor;
239
+ border: 0; border-radius: 4px; padding: 0; margin: 0;
240
+ cursor: pointer; appearance: none; -webkit-appearance: none;
241
+ opacity: .75; transition: opacity 120ms ease;
242
+ }
243
+ .APX-toast__close:hover { opacity: 1; }
244
+ .APX-toast__close:focus { outline: 2px solid rgba(0,0,0,.2); outline-offset: 2px; }
245
+ .APX-toast__close::before {
246
+ content: '×';
247
+ font-size: 16px; line-height: 1; text-align: center;
248
+ }
249
+
250
+ /* Animations */
251
+ .APX-toast--enter { opacity: 0; transform: translateY(8px); }
252
+ .APX-toast--enter.APX-toast--enter-active { opacity: 1; transform: translateY(0); }
253
+ .APX-toast--exit { opacity: 1; transform: translateY(0); }
254
+ .APX-toast--exit.APX-toast--exit-active { opacity: 0; transform: translateY(8px); }
255
+
256
+
257
+ `, "",{"version":3,"sources":["webpack://./modules/toast/css/toast.css"],"names":[],"mappings":"AAAA;IACI,eAAe;IACf,aAAa;IACb,sBAAsB;IACtB,8BAA8B;IAC9B,wCAAwC;IACxC,oBAAoB;AACxB;;AAEA,qCAAqC,WAAW,EAAE,YAAY,EAAE,qBAAqB,EAAE;AACvF,oCAAoC,UAAU,EAAE,YAAY,EAAE,uBAAuB,EAAE;AACvF,kCAAkC,WAAW,EAAE,SAAS,EAAE,qBAAqB,EAAE;AACjF,iCAAiC,UAAU,EAAE,SAAS,EAAE,uBAAuB,EAAE;;AAEjF;IACI,4CAA4C;IAC5C,4CAA4C;IAC5C,2CAA2C;IAC3C,2CAA2C;IAC3C,+DAA+D;IAC/D,sDAAsD;IACtD,WAAW;IACX,gBAAgB;IAChB,oBAAoB;IACpB,kBAAkB;IAClB,oDAAoD;AACxD;;AAEA,mBAAmB,6CAA6C,EAAE,wCAAwC,EAAE;AAC5G,sBAAsB,gDAAgD,EAAE,2CAA2C,EAAE;AACrH,sBAAsB,gDAAgD,EAAE,2CAA2C,EAAE;AACrH,qBAAqB,+CAA+C,EAAE,0CAA0C,EAAE;;AAElH,sBAAsB,iBAAiB,EAAE;;AAEzC;IACI,kBAAkB;IAClB,QAAQ,EAAE,WAAW;IACrB,WAAW,EAAE,YAAY;IACzB,2BAA2B;IAC3B,oBAAoB,EAAE,mBAAmB,EAAE,uBAAuB;IAClE,uBAAuB,EAAE,mBAAmB;IAC5C,SAAS,EAAE,kBAAkB,EAAE,UAAU,EAAE,SAAS;IACpD,eAAe,EAAE,gBAAgB,EAAE,wBAAwB;IAC3D,YAAY,EAAE,8BAA8B;AAChD;AACA,0BAA0B,UAAU,EAAE;AACtC,0BAA0B,iCAAiC,EAAE,mBAAmB,EAAE;AAClF;IACI,YAAY;IACZ,eAAe,EAAE,cAAc,EAAE,kBAAkB;AACvD;;AAEA,eAAe;AACf,oBAAoB,UAAU,EAAE,0BAA0B,EAAE;AAC5D,4CAA4C,UAAU,EAAE,wBAAwB,EAAE;AAClF,mBAAmB,UAAU,EAAE,wBAAwB,EAAE;AACzD,0CAA0C,UAAU,EAAE,0BAA0B,EAAE","sourcesContent":[".APX-toast-container {\r\n position: fixed;\r\n display: flex;\r\n flex-direction: column;\r\n gap: var(--apx-toast-gap, 8px);\r\n z-index: var(--apx-toast-z-index, 11000);\r\n pointer-events: none;\r\n}\r\n\r\n.APX-toast-container--bottom-right { right: 12px; bottom: 12px; align-items: flex-end; }\r\n.APX-toast-container--bottom-left { left: 12px; bottom: 12px; align-items: flex-start; }\r\n.APX-toast-container--top-right { right: 12px; top: 12px; align-items: flex-end; }\r\n.APX-toast-container--top-left { left: 12px; top: 12px; align-items: flex-start; }\r\n\r\n.APX-toast {\r\n min-width: var(--apx-toast-min-width, 260px);\r\n max-width: var(--apx-toast-max-width, 420px);\r\n font-size: var(--apx-toast-font-size, 14px);\r\n border-radius: var(--apx-toast-radius, 6px);\r\n box-shadow: var(--apx-toast-shadow, 0 6px 24px rgba(0,0,0,0.2));\r\n padding: var(--apx-toast-padding, 10px 42px 10px 14px);\r\n color: #111;\r\n background: #eee;\r\n pointer-events: auto;\r\n position: relative;\r\n transition: opacity 180ms ease, transform 180ms ease;\r\n}\r\n\r\n.APX-toast--info { background: var(--apx-toast-info-bg, #0dcaf0); color: var(--apx-toast-info-fg, #052c65); }\r\n.APX-toast--success { background: var(--apx-toast-success-bg, #198754); color: var(--apx-toast-success-fg, #ffffff); }\r\n.APX-toast--warning { background: var(--apx-toast-warning-bg, #ffc107); color: var(--apx-toast-warning-fg, #664d03); }\r\n.APX-toast--danger { background: var(--apx-toast-danger-bg, #dc3545); color: var(--apx-toast-danger-fg, #ffffff); }\r\n\r\n.APX-toast__content { line-height: 1.35; }\r\n\r\n.APX-toast__close {\r\n position: absolute;\r\n top: 50%; right: 10px;\r\n width: 24px; height: 24px;\r\n transform: translateY(-50%);\r\n display: inline-flex; align-items: center; justify-content: center;\r\n background: transparent; color: currentColor;\r\n border: 0; border-radius: 4px; padding: 0; margin: 0;\r\n cursor: pointer; appearance: none; -webkit-appearance: none;\r\n opacity: .75; transition: opacity 120ms ease;\r\n}\r\n.APX-toast__close:hover { opacity: 1; }\r\n.APX-toast__close:focus { outline: 2px solid rgba(0,0,0,.2); outline-offset: 2px; }\r\n.APX-toast__close::before {\r\n content: '×';\r\n font-size: 16px; line-height: 1; text-align: center;\r\n}\r\n\r\n/* Animations */\r\n.APX-toast--enter { opacity: 0; transform: translateY(8px); }\r\n.APX-toast--enter.APX-toast--enter-active { opacity: 1; transform: translateY(0); }\r\n.APX-toast--exit { opacity: 1; transform: translateY(0); }\r\n.APX-toast--exit.APX-toast--exit-active { opacity: 0; transform: translateY(8px); }\r\n\r\n\r\n"],"sourceRoot":""}]);
258
+ // Exports
259
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
260
+
261
+
262
+ /***/ }),
263
+
264
+ /***/ "./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css":
265
+ /*!*********************************************************************************!*\
266
+ !*** ./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css ***!
267
+ \*********************************************************************************/
268
+ /***/ ((module, __webpack_exports__, __webpack_require__) => {
269
+
270
+ "use strict";
271
+ __webpack_require__.r(__webpack_exports__);
272
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
273
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
274
+ /* harmony export */ });
275
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/sourceMaps.js */ "./node_modules/css-loader/dist/runtime/sourceMaps.js");
276
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
277
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/api.js */ "./node_modules/css-loader/dist/runtime/api.js");
278
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
279
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../../node_modules/css-loader/dist/runtime/getUrl.js */ "./node_modules/css-loader/dist/runtime/getUrl.js");
280
+ /* harmony import */ var _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2__);
281
+ // Imports
282
+
283
+
284
+
285
+ var ___CSS_LOADER_URL_IMPORT_0___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E"), __webpack_require__.b);
286
+ var ___CSS_LOADER_URL_IMPORT_1___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E */ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E"), __webpack_require__.b);
287
+ var ___CSS_LOADER_URL_IMPORT_2___ = new URL(/* asset import */ __webpack_require__(/*! data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E */ "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E"), __webpack_require__.b);
288
+ var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_sourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
289
+ var ___CSS_LOADER_URL_REPLACEMENT_0___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_0___);
290
+ var ___CSS_LOADER_URL_REPLACEMENT_1___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_1___);
291
+ var ___CSS_LOADER_URL_REPLACEMENT_2___ = _node_modules_css_loader_dist_runtime_getUrl_js__WEBPACK_IMPORTED_MODULE_2___default()(___CSS_LOADER_URL_IMPORT_2___);
292
+ // Module
293
+ ___CSS_LOADER_EXPORT___.push([module.id, `.apx-tristate {
294
+ display: inline-block;
295
+ vertical-align: middle;
296
+ text-align: center;
297
+ cursor: pointer;
298
+ position: relative;
299
+ min-width:13px;
300
+ min-height:13px;
301
+ background-size: contain;
302
+ background-color: white;
303
+ border-radius:3px;
304
+ }
305
+ .apx-tristate.unchecked {
306
+ background-image: url(${___CSS_LOADER_URL_REPLACEMENT_0___});
307
+ }
308
+ .apx-tristate.checked {
309
+ background-image: url(${___CSS_LOADER_URL_REPLACEMENT_1___});
310
+ background-repeat: no-repeat;
311
+ background-position: center;
312
+ }
313
+ .apx-tristate.crossed {
314
+ background-image: url(${___CSS_LOADER_URL_REPLACEMENT_2___});
315
+ background-repeat: no-repeat;
316
+ background-position: center;
317
+ }`, "",{"version":3,"sources":["webpack://./modules/tristate/css/tristate.css"],"names":[],"mappings":"AAAA;IACI,qBAAqB;IACrB,sBAAsB;IACtB,kBAAkB;IAClB,eAAe;IACf,kBAAkB;IAClB,cAAc;IACd,eAAe;IACf,wBAAwB;IACxB,uBAAuB;IACvB,iBAAiB;AACrB;AACA;IACI,yDAAylB;AAC7lB;AACA;IACI,yDAA6e;IAC7e,4BAA4B;IAC5B,2BAA2B;AAC/B;AACA;IACI,yDAAsnB;IACtnB,4BAA4B;IAC5B,2BAA2B;AAC/B","sourcesContent":[".apx-tristate {\r\n display: inline-block;\r\n vertical-align: middle;\r\n text-align: center;\r\n cursor: pointer;\r\n position: relative;\r\n min-width:13px;\r\n min-height:13px;\r\n background-size: contain;\r\n background-color: white;\r\n border-radius:3px;\r\n}\r\n.apx-tristate.unchecked {\r\n background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E');\r\n}\r\n.apx-tristate.checked {\r\n background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}\r\n.apx-tristate.crossed {\r\n background-image: url('data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E');\r\n background-repeat: no-repeat;\r\n background-position: center;\r\n}"],"sourceRoot":""}]);
318
+ // Exports
319
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (___CSS_LOADER_EXPORT___);
320
+
321
+
322
+ /***/ }),
323
+
324
+ /***/ "./node_modules/css-loader/dist/runtime/api.js":
325
+ /*!*****************************************************!*\
326
+ !*** ./node_modules/css-loader/dist/runtime/api.js ***!
327
+ \*****************************************************/
328
+ /***/ ((module) => {
329
+
330
+ "use strict";
331
+
332
+
333
+ /*
334
+ MIT License http://www.opensource.org/licenses/mit-license.php
335
+ Author Tobias Koppers @sokra
336
+ */
337
+ module.exports = function (cssWithMappingToString) {
338
+ var list = [];
339
+
340
+ // return the list of modules as css string
341
+ list.toString = function toString() {
342
+ return this.map(function (item) {
343
+ var content = "";
344
+ var needLayer = typeof item[5] !== "undefined";
345
+ if (item[4]) {
346
+ content += "@supports (".concat(item[4], ") {");
347
+ }
348
+ if (item[2]) {
349
+ content += "@media ".concat(item[2], " {");
350
+ }
351
+ if (needLayer) {
352
+ content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
353
+ }
354
+ content += cssWithMappingToString(item);
355
+ if (needLayer) {
356
+ content += "}";
357
+ }
358
+ if (item[2]) {
359
+ content += "}";
360
+ }
361
+ if (item[4]) {
362
+ content += "}";
363
+ }
364
+ return content;
365
+ }).join("");
366
+ };
367
+
368
+ // import a list of modules into the list
369
+ list.i = function i(modules, media, dedupe, supports, layer) {
370
+ if (typeof modules === "string") {
371
+ modules = [[null, modules, undefined]];
372
+ }
373
+ var alreadyImportedModules = {};
374
+ if (dedupe) {
375
+ for (var k = 0; k < this.length; k++) {
376
+ var id = this[k][0];
377
+ if (id != null) {
378
+ alreadyImportedModules[id] = true;
379
+ }
380
+ }
381
+ }
382
+ for (var _k = 0; _k < modules.length; _k++) {
383
+ var item = [].concat(modules[_k]);
384
+ if (dedupe && alreadyImportedModules[item[0]]) {
385
+ continue;
386
+ }
387
+ if (typeof layer !== "undefined") {
388
+ if (typeof item[5] === "undefined") {
389
+ item[5] = layer;
390
+ } else {
391
+ item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
392
+ item[5] = layer;
393
+ }
394
+ }
395
+ if (media) {
396
+ if (!item[2]) {
397
+ item[2] = media;
398
+ } else {
399
+ item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
400
+ item[2] = media;
401
+ }
402
+ }
403
+ if (supports) {
404
+ if (!item[4]) {
405
+ item[4] = "".concat(supports);
406
+ } else {
407
+ item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
408
+ item[4] = supports;
409
+ }
410
+ }
411
+ list.push(item);
412
+ }
413
+ };
414
+ return list;
415
+ };
416
+
417
+ /***/ }),
418
+
419
+ /***/ "./node_modules/css-loader/dist/runtime/getUrl.js":
420
+ /*!********************************************************!*\
421
+ !*** ./node_modules/css-loader/dist/runtime/getUrl.js ***!
422
+ \********************************************************/
423
+ /***/ ((module) => {
424
+
425
+ "use strict";
426
+
427
+
428
+ module.exports = function (url, options) {
429
+ if (!options) {
430
+ options = {};
431
+ }
432
+ if (!url) {
433
+ return url;
434
+ }
435
+ url = String(url.__esModule ? url.default : url);
436
+
437
+ // If url is already wrapped in quotes, remove them
438
+ if (/^['"].*['"]$/.test(url)) {
439
+ url = url.slice(1, -1);
440
+ }
441
+ if (options.hash) {
442
+ url += options.hash;
443
+ }
444
+
445
+ // Should url be wrapped?
446
+ // See https://drafts.csswg.org/css-values-3/#urls
447
+ if (/["'() \t\n]|(%20)/.test(url) || options.needQuotes) {
448
+ return "\"".concat(url.replace(/"/g, '\\"').replace(/\n/g, "\\n"), "\"");
449
+ }
450
+ return url;
451
+ };
452
+
453
+ /***/ }),
454
+
455
+ /***/ "./node_modules/css-loader/dist/runtime/sourceMaps.js":
456
+ /*!************************************************************!*\
457
+ !*** ./node_modules/css-loader/dist/runtime/sourceMaps.js ***!
458
+ \************************************************************/
459
+ /***/ ((module) => {
460
+
461
+ "use strict";
462
+
463
+
464
+ module.exports = function (item) {
465
+ var content = item[1];
466
+ var cssMapping = item[3];
467
+ if (!cssMapping) {
468
+ return content;
469
+ }
470
+ if (typeof btoa === "function") {
471
+ var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
472
+ var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
473
+ var sourceMapping = "/*# ".concat(data, " */");
474
+ return [content].concat([sourceMapping]).join("\n");
475
+ }
476
+ return [content].join("\n");
477
+ };
478
+
479
+ /***/ }),
480
+
481
+ /***/ "./modules/dialog/html/dialog.html?raw":
482
+ /*!*********************************************!*\
483
+ !*** ./modules/dialog/html/dialog.html?raw ***!
484
+ \*********************************************/
485
+ /***/ ((module) => {
486
+
487
+ // Module
488
+ var code = "<div class=\"APX-dialog\">\r\n <div class=\"APX-dialog-content\">\r\n <span class=\"APX-close-dialog\">&times;</span>\r\n <h2 class=\"APX-dialog-title\"></h2>\r\n <div class=\"APX-dialog-dynamic-content\"></div>\r\n <div class=\"APX-dialog-button-container\"></div>\r\n </div>\r\n</div>";
489
+ // Exports
490
+ module.exports = code;
491
+
492
+ /***/ }),
493
+
494
+ /***/ "./modules/dialog/css/dialog.css":
495
+ /*!***************************************!*\
496
+ !*** ./modules/dialog/css/dialog.css ***!
497
+ \***************************************/
498
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
499
+
500
+ "use strict";
501
+ __webpack_require__.r(__webpack_exports__);
502
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
503
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
504
+ /* harmony export */ });
505
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
506
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
507
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
508
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
509
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
510
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
511
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
512
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
513
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
514
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
515
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
516
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
517
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./dialog.css */ "./node_modules/css-loader/dist/cjs.js!./modules/dialog/css/dialog.css");
518
+
519
+
520
+
521
+
522
+
523
+
524
+
525
+
526
+
527
+
528
+
529
+ var options = {};
530
+
531
+ options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
532
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
533
+
534
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
535
+
536
+ options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
537
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
538
+
539
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
540
+
541
+
542
+
543
+
544
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_dialog_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
545
+
546
+
547
+ /***/ }),
548
+
549
+ /***/ "./modules/toast/css/toast.css":
550
+ /*!*************************************!*\
551
+ !*** ./modules/toast/css/toast.css ***!
552
+ \*************************************/
553
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
554
+
555
+ "use strict";
556
+ __webpack_require__.r(__webpack_exports__);
557
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
558
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
559
+ /* harmony export */ });
560
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
561
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
562
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
563
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
564
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
565
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
566
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
567
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
568
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
569
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
570
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
571
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
572
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./toast.css */ "./node_modules/css-loader/dist/cjs.js!./modules/toast/css/toast.css");
573
+
574
+
575
+
576
+
577
+
578
+
579
+
580
+
581
+
582
+
583
+
584
+ var options = {};
585
+
586
+ options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
587
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
588
+
589
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
590
+
591
+ options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
592
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
593
+
594
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
595
+
596
+
597
+
598
+
599
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_toast_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
600
+
601
+
602
+ /***/ }),
603
+
604
+ /***/ "./modules/tristate/css/tristate.css":
605
+ /*!*******************************************!*\
606
+ !*** ./modules/tristate/css/tristate.css ***!
607
+ \*******************************************/
608
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
609
+
610
+ "use strict";
611
+ __webpack_require__.r(__webpack_exports__);
612
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
613
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
614
+ /* harmony export */ });
615
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js */ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js");
616
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
617
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleDomAPI.js */ "./node_modules/style-loader/dist/runtime/styleDomAPI.js");
618
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
619
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertBySelector.js */ "./node_modules/style-loader/dist/runtime/insertBySelector.js");
620
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
621
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js */ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js");
622
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
623
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/insertStyleElement.js */ "./node_modules/style-loader/dist/runtime/insertStyleElement.js");
624
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
625
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! !../../../node_modules/style-loader/dist/runtime/styleTagTransform.js */ "./node_modules/style-loader/dist/runtime/styleTagTransform.js");
626
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5__);
627
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! !!../../../node_modules/css-loader/dist/cjs.js!./tristate.css */ "./node_modules/css-loader/dist/cjs.js!./modules/tristate/css/tristate.css");
628
+
629
+
630
+
631
+
632
+
633
+
634
+
635
+
636
+
637
+
638
+
639
+ var options = {};
640
+
641
+ options.styleTagTransform = (_node_modules_style_loader_dist_runtime_styleTagTransform_js__WEBPACK_IMPORTED_MODULE_5___default());
642
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
643
+
644
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
645
+
646
+ options.domAPI = (_node_modules_style_loader_dist_runtime_styleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
647
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
648
+
649
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()(_node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"], options);
650
+
651
+
652
+
653
+
654
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"] && _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals ? _node_modules_css_loader_dist_cjs_js_tristate_css__WEBPACK_IMPORTED_MODULE_6__["default"].locals : undefined);
655
+
656
+
657
+ /***/ }),
658
+
659
+ /***/ "./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":
660
+ /*!****************************************************************************!*\
661
+ !*** ./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***!
662
+ \****************************************************************************/
663
+ /***/ ((module) => {
664
+
665
+ "use strict";
666
+
667
+
668
+ var stylesInDOM = [];
669
+ function getIndexByIdentifier(identifier) {
670
+ var result = -1;
671
+ for (var i = 0; i < stylesInDOM.length; i++) {
672
+ if (stylesInDOM[i].identifier === identifier) {
673
+ result = i;
674
+ break;
675
+ }
676
+ }
677
+ return result;
678
+ }
679
+ function modulesToDom(list, options) {
680
+ var idCountMap = {};
681
+ var identifiers = [];
682
+ for (var i = 0; i < list.length; i++) {
683
+ var item = list[i];
684
+ var id = options.base ? item[0] + options.base : item[0];
685
+ var count = idCountMap[id] || 0;
686
+ var identifier = "".concat(id, " ").concat(count);
687
+ idCountMap[id] = count + 1;
688
+ var indexByIdentifier = getIndexByIdentifier(identifier);
689
+ var obj = {
690
+ css: item[1],
691
+ media: item[2],
692
+ sourceMap: item[3],
693
+ supports: item[4],
694
+ layer: item[5]
695
+ };
696
+ if (indexByIdentifier !== -1) {
697
+ stylesInDOM[indexByIdentifier].references++;
698
+ stylesInDOM[indexByIdentifier].updater(obj);
699
+ } else {
700
+ var updater = addElementStyle(obj, options);
701
+ options.byIndex = i;
702
+ stylesInDOM.splice(i, 0, {
703
+ identifier: identifier,
704
+ updater: updater,
705
+ references: 1
706
+ });
707
+ }
708
+ identifiers.push(identifier);
709
+ }
710
+ return identifiers;
711
+ }
712
+ function addElementStyle(obj, options) {
713
+ var api = options.domAPI(options);
714
+ api.update(obj);
715
+ var updater = function updater(newObj) {
716
+ if (newObj) {
717
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
718
+ return;
719
+ }
720
+ api.update(obj = newObj);
721
+ } else {
722
+ api.remove();
723
+ }
724
+ };
725
+ return updater;
726
+ }
727
+ module.exports = function (list, options) {
728
+ options = options || {};
729
+ list = list || [];
730
+ var lastIdentifiers = modulesToDom(list, options);
731
+ return function update(newList) {
732
+ newList = newList || [];
733
+ for (var i = 0; i < lastIdentifiers.length; i++) {
734
+ var identifier = lastIdentifiers[i];
735
+ var index = getIndexByIdentifier(identifier);
736
+ stylesInDOM[index].references--;
737
+ }
738
+ var newLastIdentifiers = modulesToDom(newList, options);
739
+ for (var _i = 0; _i < lastIdentifiers.length; _i++) {
740
+ var _identifier = lastIdentifiers[_i];
741
+ var _index = getIndexByIdentifier(_identifier);
742
+ if (stylesInDOM[_index].references === 0) {
743
+ stylesInDOM[_index].updater();
744
+ stylesInDOM.splice(_index, 1);
745
+ }
746
+ }
747
+ lastIdentifiers = newLastIdentifiers;
748
+ };
749
+ };
750
+
751
+ /***/ }),
752
+
753
+ /***/ "./node_modules/style-loader/dist/runtime/insertBySelector.js":
754
+ /*!********************************************************************!*\
755
+ !*** ./node_modules/style-loader/dist/runtime/insertBySelector.js ***!
756
+ \********************************************************************/
757
+ /***/ ((module) => {
758
+
759
+ "use strict";
760
+
761
+
762
+ var memo = {};
763
+
764
+ /* istanbul ignore next */
765
+ function getTarget(target) {
766
+ if (typeof memo[target] === "undefined") {
767
+ var styleTarget = document.querySelector(target);
768
+
769
+ // Special case to return head of iframe instead of iframe itself
770
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
771
+ try {
772
+ // This will throw an exception if access to iframe is blocked
773
+ // due to cross-origin restrictions
774
+ styleTarget = styleTarget.contentDocument.head;
775
+ } catch (e) {
776
+ // istanbul ignore next
777
+ styleTarget = null;
778
+ }
779
+ }
780
+ memo[target] = styleTarget;
781
+ }
782
+ return memo[target];
783
+ }
784
+
785
+ /* istanbul ignore next */
786
+ function insertBySelector(insert, style) {
787
+ var target = getTarget(insert);
788
+ if (!target) {
789
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
790
+ }
791
+ target.appendChild(style);
792
+ }
793
+ module.exports = insertBySelector;
794
+
795
+ /***/ }),
796
+
797
+ /***/ "./node_modules/style-loader/dist/runtime/insertStyleElement.js":
798
+ /*!**********************************************************************!*\
799
+ !*** ./node_modules/style-loader/dist/runtime/insertStyleElement.js ***!
800
+ \**********************************************************************/
801
+ /***/ ((module) => {
802
+
803
+ "use strict";
804
+
805
+
806
+ /* istanbul ignore next */
807
+ function insertStyleElement(options) {
808
+ var element = document.createElement("style");
809
+ options.setAttributes(element, options.attributes);
810
+ options.insert(element, options.options);
811
+ return element;
812
+ }
813
+ module.exports = insertStyleElement;
814
+
815
+ /***/ }),
816
+
817
+ /***/ "./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":
818
+ /*!**********************************************************************************!*\
819
+ !*** ./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js ***!
820
+ \**********************************************************************************/
821
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
822
+
823
+ "use strict";
824
+
825
+
826
+ /* istanbul ignore next */
827
+ function setAttributesWithoutAttributes(styleElement) {
828
+ var nonce = true ? __webpack_require__.nc : 0;
829
+ if (nonce) {
830
+ styleElement.setAttribute("nonce", nonce);
831
+ }
832
+ }
833
+ module.exports = setAttributesWithoutAttributes;
834
+
835
+ /***/ }),
836
+
837
+ /***/ "./node_modules/style-loader/dist/runtime/styleDomAPI.js":
838
+ /*!***************************************************************!*\
839
+ !*** ./node_modules/style-loader/dist/runtime/styleDomAPI.js ***!
840
+ \***************************************************************/
841
+ /***/ ((module) => {
842
+
843
+ "use strict";
844
+
845
+
846
+ /* istanbul ignore next */
847
+ function apply(styleElement, options, obj) {
848
+ var css = "";
849
+ if (obj.supports) {
850
+ css += "@supports (".concat(obj.supports, ") {");
851
+ }
852
+ if (obj.media) {
853
+ css += "@media ".concat(obj.media, " {");
854
+ }
855
+ var needLayer = typeof obj.layer !== "undefined";
856
+ if (needLayer) {
857
+ css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
858
+ }
859
+ css += obj.css;
860
+ if (needLayer) {
861
+ css += "}";
862
+ }
863
+ if (obj.media) {
864
+ css += "}";
865
+ }
866
+ if (obj.supports) {
867
+ css += "}";
868
+ }
869
+ var sourceMap = obj.sourceMap;
870
+ if (sourceMap && typeof btoa !== "undefined") {
871
+ css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */");
872
+ }
873
+
874
+ // For old IE
875
+ /* istanbul ignore if */
876
+ options.styleTagTransform(css, styleElement, options.options);
877
+ }
878
+ function removeStyleElement(styleElement) {
879
+ // istanbul ignore if
880
+ if (styleElement.parentNode === null) {
881
+ return false;
882
+ }
883
+ styleElement.parentNode.removeChild(styleElement);
884
+ }
885
+
886
+ /* istanbul ignore next */
887
+ function domAPI(options) {
888
+ if (typeof document === "undefined") {
889
+ return {
890
+ update: function update() {},
891
+ remove: function remove() {}
892
+ };
893
+ }
894
+ var styleElement = options.insertStyleElement(options);
895
+ return {
896
+ update: function update(obj) {
897
+ apply(styleElement, options, obj);
898
+ },
899
+ remove: function remove() {
900
+ removeStyleElement(styleElement);
901
+ }
902
+ };
903
+ }
904
+ module.exports = domAPI;
905
+
906
+ /***/ }),
907
+
908
+ /***/ "./node_modules/style-loader/dist/runtime/styleTagTransform.js":
909
+ /*!*********************************************************************!*\
910
+ !*** ./node_modules/style-loader/dist/runtime/styleTagTransform.js ***!
911
+ \*********************************************************************/
912
+ /***/ ((module) => {
913
+
914
+ "use strict";
915
+
916
+
917
+ /* istanbul ignore next */
918
+ function styleTagTransform(css, styleElement) {
919
+ if (styleElement.styleSheet) {
920
+ styleElement.styleSheet.cssText = css;
921
+ } else {
922
+ while (styleElement.firstChild) {
923
+ styleElement.removeChild(styleElement.firstChild);
924
+ }
925
+ styleElement.appendChild(document.createTextNode(css));
926
+ }
927
+ }
928
+ module.exports = styleTagTransform;
929
+
930
+ /***/ }),
931
+
932
+ /***/ "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E":
933
+ /*!*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
934
+ !*** data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E ***!
935
+ \*************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
936
+ /***/ ((module) => {
937
+
938
+ "use strict";
939
+ module.exports = "data:image/svg+xml,%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Csvg%20viewBox%3D%220%200%2032%2032%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705z%22%20fill%3D%22%23f00%22%2F%3E%3Cpath%20d%3D%22m8%208%2016%2016%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3Cpath%20d%3D%22M24%208L8%2024%22%20stroke%3D%22%23fff%22%20stroke-width%3D%222%22%2F%3E%3C%2Fsvg%3E";
940
+
941
+ /***/ }),
942
+
943
+ /***/ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E":
944
+ /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
945
+ !*** data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E ***!
946
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
947
+ /***/ ((module) => {
948
+
949
+ "use strict";
950
+ module.exports = "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20%20fill%3D%22%23cccccc%22%20d%3D%22M25.107%2032.030h-18.214c-3.456%200-6.268-2.81-6.268-6.264v-19.529c0-3.456%202.812-6.268%206.268-6.268h18.214c3.456%200%206.268%202.812%206.268%206.268v19.529c0%203.452-2.812%206.264-6.268%206.264zM6.893%201.85c-2.419%200-4.386%201.967-4.386%204.386v19.529c0%202.417%201.967%204.382%204.386%204.382h18.214c2.419%200%204.386-1.965%204.386-4.382v-19.529c0-2.419-1.967-4.386-4.386-4.386h-18.214z%22%3E%3C/path%3E%3C/svg%3E";
951
+
952
+ /***/ }),
953
+
954
+ /***/ "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E":
955
+ /*!********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\
956
+ !*** data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E ***!
957
+ \********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/
958
+ /***/ ((module) => {
959
+
960
+ "use strict";
961
+ module.exports = "data:image/svg+xml,%3Csvg%20xmlns%3D%27http%3A//www.w3.org/2000/svg%27%20width%3D%2732%27%20height%3D%2732%27%3E%3Cpath%20fill%3D%22%230654ba%22%20d%3D%22M0.543%205.647c0-3.119%202.531-5.647%205.65-5.647h19.309c3.12%200%205.65%202.511%205.65%205.647v20.705c0%203.119-2.531%205.647-5.65%205.647h-19.309c-3.12%200-5.65-2.511-5.65-5.647v-20.705zM5.313%2017.587l7.039%206.839%2013.831-13.439-2.636-2.561-10.929%2010.62-4.442-4.317-2.862%202.858z%22%3E%3C/path%3E%3C/svg%3E";
962
+
963
+ /***/ }),
964
+
965
+ /***/ "./modules/common.mjs":
966
+ /*!****************************!*\
967
+ !*** ./modules/common.mjs ***!
968
+ \****************************/
969
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
970
+
971
+ "use strict";
972
+ __webpack_require__.r(__webpack_exports__);
973
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
974
+ /* harmony export */ loadCss: () => (/* binding */ loadCss)
975
+ /* harmony export */ });
976
+ // Function to load the CSS from a given URL
977
+ function loadCss(url) {
978
+ return fetch(url).then(function (response) {
979
+ return response.text();
980
+ }).then(function (css) {
981
+ var styleSheet = document.createElement("style");
982
+ styleSheet.type = "text/css";
983
+ styleSheet.textContent = css; // Use textContent instead of innerText
984
+ document.head.appendChild(styleSheet);
985
+ })["catch"](function (error) {
986
+ console.error("Failed to load CSS:", error);
987
+ });
988
+ }
989
+
990
+
991
+ /***/ }),
992
+
993
+ /***/ "./modules/dialog/dialog.mjs":
994
+ /*!***********************************!*\
995
+ !*** ./modules/dialog/dialog.mjs ***!
996
+ \***********************************/
997
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
998
+
999
+ "use strict";
1000
+ __webpack_require__.r(__webpack_exports__);
1001
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1002
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1003
+ /* harmony export */ });
1004
+ /* harmony import */ var _css_dialog_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/dialog.css */ "./modules/dialog/css/dialog.css");
1005
+ /* harmony import */ var _html_dialog_html_raw__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./html/dialog.html?raw */ "./modules/dialog/html/dialog.html?raw");
1006
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1007
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw new Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw new Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
1008
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
1009
+ function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
1010
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1011
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1012
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1013
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1014
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1015
+ // Importing the CSS and HTML templates
1016
+
1017
+
1018
+ var createDialog = function createDialog(options) {
1019
+ var dialogDefaults = {
1020
+ title: '',
1021
+ content: '',
1022
+ contentURI: '',
1023
+ buttons: [],
1024
+ size: 'medium',
1025
+ showLoadingIndicator: false,
1026
+ contentMethod: 'GET',
1027
+ contentData: null,
1028
+ contentHeaders: undefined
1029
+ };
1030
+ var _dialogDefaults$optio = _objectSpread(_objectSpread({}, dialogDefaults), options),
1031
+ title = _dialogDefaults$optio.title,
1032
+ content = _dialogDefaults$optio.content,
1033
+ contentURI = _dialogDefaults$optio.contentURI,
1034
+ buttons = _dialogDefaults$optio.buttons,
1035
+ size = _dialogDefaults$optio.size,
1036
+ showLoadingIndicator = _dialogDefaults$optio.showLoadingIndicator,
1037
+ contentMethod = _dialogDefaults$optio.contentMethod,
1038
+ contentData = _dialogDefaults$optio.contentData,
1039
+ contentHeaders = _dialogDefaults$optio.contentHeaders;
1040
+ var wrapper = document.createElement('div');
1041
+ wrapper.innerHTML = _html_dialog_html_raw__WEBPACK_IMPORTED_MODULE_1__.trim();
1042
+ var dialogElement = wrapper.firstChild;
1043
+
1044
+ // Lifecycle event management
1045
+ var lifecycleResolvers = {};
1046
+ var lifecycleEvents = {};
1047
+
1048
+ // Define lifecycle promises as properties
1049
+ ['opening', 'opened', 'closing', 'closed', 'contentLoading', 'contentLoaded'].forEach(function (event) {
1050
+ lifecycleEvents[event] = new Promise(function (resolve) {
1051
+ lifecycleResolvers[event] = resolve;
1052
+ });
1053
+ });
1054
+ var triggerEvent = function triggerEvent(event) {
1055
+ if (lifecycleResolvers[event]) {
1056
+ lifecycleResolvers[event]();
1057
+ } else {
1058
+ console.warn("No resolver found for lifecycle event: ".concat(event));
1059
+ }
1060
+ };
1061
+ var dialog = {
1062
+ element: dialogElement,
1063
+ buttons: {},
1064
+ isClosed: false,
1065
+ lifecycle: lifecycleEvents,
1066
+ // Lifecycle promises directly exposed here
1067
+ disableButton: function disableButton(key) {
1068
+ var button = dialogElement.querySelector(".APX-dialog-button[data-key=\"".concat(key, "\"]"));
1069
+ if (button) {
1070
+ button.disabled = true;
1071
+ button.classList.add('APX-dialog-button-disabled');
1072
+ }
1073
+ },
1074
+ enableButton: function enableButton(key) {
1075
+ var button = dialogElement.querySelector(".APX-dialog-button[data-key=\"".concat(key, "\"]"));
1076
+ if (button) {
1077
+ button.disabled = false;
1078
+ button.classList.remove('APX-dialog-button-disabled');
1079
+ }
1080
+ },
1081
+ open: function () {
1082
+ var _open = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
1083
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1084
+ while (1) switch (_context.prev = _context.next) {
1085
+ case 0:
1086
+ _context.prev = 0;
1087
+ triggerEvent('opening');
1088
+ _context.next = 4;
1089
+ return dialog.lifecycle.opening;
1090
+ case 4:
1091
+ if (!(showLoadingIndicator && contentURI)) {
1092
+ _context.next = 12;
1093
+ break;
1094
+ }
1095
+ // Append dialog to the DOM and display it first
1096
+ document.body.appendChild(dialogElement);
1097
+ dialogElement.style.display = "flex";
1098
+
1099
+ // Show loading indicator
1100
+ dialogElement.querySelector(".APX-dialog-dynamic-content").innerHTML = '<div class="APX-dialog-loading-indicator"></div>';
1101
+
1102
+ // Load content after dialog is visible
1103
+ _context.next = 10;
1104
+ return fetchAndInsertContent();
1105
+ case 10:
1106
+ _context.next = 16;
1107
+ break;
1108
+ case 12:
1109
+ _context.next = 14;
1110
+ return fetchAndInsertContent();
1111
+ case 14:
1112
+ // Append dialog to the DOM and display it
1113
+ document.body.appendChild(dialogElement);
1114
+ dialogElement.style.display = "flex";
1115
+ case 16:
1116
+ triggerEvent('opened');
1117
+ _context.next = 19;
1118
+ return dialog.lifecycle.opened;
1119
+ case 19:
1120
+ _context.next = 24;
1121
+ break;
1122
+ case 21:
1123
+ _context.prev = 21;
1124
+ _context.t0 = _context["catch"](0);
1125
+ console.error('Error opening dialog:', _context.t0);
1126
+ case 24:
1127
+ return _context.abrupt("return", dialog);
1128
+ case 25:
1129
+ case "end":
1130
+ return _context.stop();
1131
+ }
1132
+ }, _callee, null, [[0, 21]]);
1133
+ }));
1134
+ function open() {
1135
+ return _open.apply(this, arguments);
1136
+ }
1137
+ return open;
1138
+ }(),
1139
+ close: function () {
1140
+ var _close = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
1141
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
1142
+ while (1) switch (_context2.prev = _context2.next) {
1143
+ case 0:
1144
+ _context2.prev = 0;
1145
+ triggerEvent('closing');
1146
+ _context2.next = 4;
1147
+ return dialog.lifecycle.closing;
1148
+ case 4:
1149
+ // Cleanup and remove dialog
1150
+ closeDialogAndCleanup();
1151
+ triggerEvent('closed');
1152
+ _context2.next = 8;
1153
+ return dialog.lifecycle.closed;
1154
+ case 8:
1155
+ _context2.next = 13;
1156
+ break;
1157
+ case 10:
1158
+ _context2.prev = 10;
1159
+ _context2.t0 = _context2["catch"](0);
1160
+ console.error('Error during dialog closing:', _context2.t0);
1161
+ case 13:
1162
+ return _context2.abrupt("return", dialog);
1163
+ case 14:
1164
+ case "end":
1165
+ return _context2.stop();
1166
+ }
1167
+ }, _callee2, null, [[0, 10]]);
1168
+ }));
1169
+ function close() {
1170
+ return _close.apply(this, arguments);
1171
+ }
1172
+ return close;
1173
+ }()
1174
+ };
1175
+ var closeDialogAndCleanup = function closeDialogAndCleanup() {
1176
+ if (dialog.isClosed) return;
1177
+ dialog.isClosed = true;
1178
+ dialogElement.style.display = "none";
1179
+ if (document.body.contains(dialogElement)) {
1180
+ document.body.removeChild(dialogElement);
1181
+ }
1182
+ };
1183
+ var setDialogSize = function setDialogSize() {
1184
+ var dialogContent = dialogElement.querySelector(".APX-dialog-content");
1185
+ var sizes = {
1186
+ small: {
1187
+ width: '300px',
1188
+ height: '200px'
1189
+ },
1190
+ medium: {
1191
+ width: '500px',
1192
+ height: '400px'
1193
+ },
1194
+ large: {
1195
+ width: '800px',
1196
+ height: '600px'
1197
+ }
1198
+ };
1199
+ if (size === 'auto') return;
1200
+ var selectedSize = sizes[size] || _typeof(size) === 'object' && size;
1201
+ if (selectedSize) {
1202
+ dialogContent.style.minWidth = selectedSize.width || '500px';
1203
+ dialogContent.style.minHeight = selectedSize.height || '400px';
1204
+ }
1205
+ };
1206
+ var addButtons = function addButtons() {
1207
+ var buttonContainer = dialogElement.querySelector(".APX-dialog-button-container");
1208
+ buttons.forEach(function (_ref) {
1209
+ var key = _ref.key,
1210
+ label = _ref.label,
1211
+ _ref$order = _ref.order,
1212
+ order = _ref$order === void 0 ? 0 : _ref$order,
1213
+ _ref$align = _ref.align,
1214
+ align = _ref$align === void 0 ? 'flex-end' : _ref$align,
1215
+ _ref$closeOnClick = _ref.closeOnClick,
1216
+ closeOnClick = _ref$closeOnClick === void 0 ? true : _ref$closeOnClick;
1217
+ var button = document.createElement('button');
1218
+ button.classList.add('APX-dialog-button');
1219
+ button.textContent = label;
1220
+ button.style.order = order;
1221
+ button.setAttribute('data-key', key);
1222
+
1223
+ // Create button context with disable/enable methods
1224
+ var buttonContext = {
1225
+ disable: function disable() {
1226
+ button.disabled = true;
1227
+ button.classList.add('APX-dialog-button-disabled');
1228
+ },
1229
+ enable: function enable() {
1230
+ button.disabled = false;
1231
+ button.classList.remove('APX-dialog-button-disabled');
1232
+ },
1233
+ key: key,
1234
+ element: button
1235
+ };
1236
+ if (closeOnClick) {
1237
+ // Handle as a one-time Promise
1238
+ var firstClickResolved = false;
1239
+ var firstClickPromise = new Promise(function (resolve) {
1240
+ button.onclick = function () {
1241
+ if (!firstClickResolved && !button.disabled) {
1242
+ firstClickResolved = true;
1243
+ resolve({
1244
+ dialog: dialog,
1245
+ button: buttonContext
1246
+ }); // Pass both dialog and button context
1247
+ dialog.close(); // Close the dialog
1248
+ }
1249
+ };
1250
+ });
1251
+
1252
+ // Assign the promise for chaining with `.then`
1253
+ dialog.buttons[key] = firstClickPromise;
1254
+ } else {
1255
+ // Handle as a repeated event handler
1256
+ var handlers = []; // Store handlers for `.then()`
1257
+
1258
+ var clickPromise = {
1259
+ then: function then(callback) {
1260
+ if (typeof callback === 'function') {
1261
+ handlers.push(callback); // Add to handlers
1262
+ }
1263
+
1264
+ return clickPromise; // Allow chaining
1265
+ }
1266
+ };
1267
+
1268
+ button.onclick = function () {
1269
+ if (!button.disabled) {
1270
+ handlers.forEach(function (handler) {
1271
+ return handler({
1272
+ dialog: dialog,
1273
+ button: buttonContext
1274
+ });
1275
+ }); // Pass both dialog and button context
1276
+ }
1277
+ };
1278
+
1279
+ dialog.buttons[key] = clickPromise; // Assign the "fake" promise
1280
+ }
1281
+
1282
+ buttonContainer.appendChild(button);
1283
+ buttonContainer.style.justifyContent = align;
1284
+ });
1285
+ };
1286
+ var fetchAndInsertContent = /*#__PURE__*/function () {
1287
+ var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
1288
+ var originalCursor, dynamicContent, contentHtml;
1289
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
1290
+ while (1) switch (_context3.prev = _context3.next) {
1291
+ case 0:
1292
+ originalCursor = document.body.style.cursor;
1293
+ document.body.style.cursor = 'wait';
1294
+ dynamicContent = dialogElement.querySelector(".APX-dialog-dynamic-content");
1295
+ _context3.prev = 3;
1296
+ triggerEvent('contentLoading');
1297
+ _context3.next = 7;
1298
+ return dialog.lifecycle.contentLoading;
1299
+ case 7:
1300
+ if (!contentURI) {
1301
+ _context3.next = 13;
1302
+ break;
1303
+ }
1304
+ _context3.next = 10;
1305
+ return fetchContent(contentURI);
1306
+ case 10:
1307
+ _context3.t0 = _context3.sent;
1308
+ _context3.next = 14;
1309
+ break;
1310
+ case 13:
1311
+ _context3.t0 = content;
1312
+ case 14:
1313
+ contentHtml = _context3.t0;
1314
+ dynamicContent.innerHTML = contentHtml;
1315
+ triggerEvent('contentLoaded');
1316
+ _context3.next = 19;
1317
+ return dialog.lifecycle.contentLoaded;
1318
+ case 19:
1319
+ _context3.next = 24;
1320
+ break;
1321
+ case 21:
1322
+ _context3.prev = 21;
1323
+ _context3.t1 = _context3["catch"](3);
1324
+ console.error('Error loading content:', _context3.t1);
1325
+ case 24:
1326
+ _context3.prev = 24;
1327
+ document.body.style.cursor = originalCursor;
1328
+ return _context3.finish(24);
1329
+ case 27:
1330
+ case "end":
1331
+ return _context3.stop();
1332
+ }
1333
+ }, _callee3, null, [[3, 21, 24, 27]]);
1334
+ }));
1335
+ return function fetchAndInsertContent() {
1336
+ return _ref2.apply(this, arguments);
1337
+ };
1338
+ }();
1339
+ var fetchContent = /*#__PURE__*/function () {
1340
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4(uri) {
1341
+ var method, headers, hasContentType, init, body, isFormData, isURLSearchParams, isBlob, isString, isPlainObject, response;
1342
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
1343
+ while (1) switch (_context4.prev = _context4.next) {
1344
+ case 0:
1345
+ method = (contentMethod || 'GET').toUpperCase(); // Always allow custom headers; we only add Content-Type when we can infer it
1346
+ headers = _objectSpread({}, contentHeaders || {});
1347
+ hasContentType = Object.keys(headers).some(function (k) {
1348
+ return k.toLowerCase() === 'content-type';
1349
+ });
1350
+ /**
1351
+ * Build RequestInit depending on method and contentData type.
1352
+ * We avoid setting Content-Type for FormData and raw string/Blob payloads,
1353
+ * unless the caller explicitly provided it via contentHeaders.
1354
+ */
1355
+ init = {
1356
+ method: method
1357
+ };
1358
+ if (method === 'POST') {
1359
+ body = undefined;
1360
+ isFormData = typeof FormData !== 'undefined' && contentData instanceof FormData;
1361
+ isURLSearchParams = typeof URLSearchParams !== 'undefined' && contentData instanceof URLSearchParams;
1362
+ isBlob = typeof Blob !== 'undefined' && contentData instanceof Blob;
1363
+ isString = typeof contentData === 'string';
1364
+ isPlainObject = contentData && _typeof(contentData) === 'object' && !isFormData && !isURLSearchParams && !isBlob;
1365
+ if (isFormData) {
1366
+ body = contentData;
1367
+ // Do not set Content-Type for FormData; browser will set the boundary
1368
+ } else if (isURLSearchParams) {
1369
+ body = contentData;
1370
+ if (!hasContentType) headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
1371
+ } else if (isPlainObject) {
1372
+ body = JSON.stringify(contentData);
1373
+ if (!hasContentType) headers['Content-Type'] = 'application/json';
1374
+ } else if (isString || isBlob) {
1375
+ body = contentData;
1376
+ // Content-Type left to caller if needed
1377
+ } else if (contentData != null) {
1378
+ // Fallback: try send as-is
1379
+ body = contentData;
1380
+ }
1381
+ if (body !== undefined) {
1382
+ init.body = body;
1383
+ }
1384
+ }
1385
+ if (Object.keys(headers).length > 0) {
1386
+ init.headers = headers;
1387
+ }
1388
+ _context4.next = 8;
1389
+ return fetch(uri, init);
1390
+ case 8:
1391
+ response = _context4.sent;
1392
+ if (response.ok) {
1393
+ _context4.next = 11;
1394
+ break;
1395
+ }
1396
+ throw new Error("Failed to fetch content: ".concat(response.statusText));
1397
+ case 11:
1398
+ return _context4.abrupt("return", response.text());
1399
+ case 12:
1400
+ case "end":
1401
+ return _context4.stop();
1402
+ }
1403
+ }, _callee4);
1404
+ }));
1405
+ return function fetchContent(_x) {
1406
+ return _ref3.apply(this, arguments);
1407
+ };
1408
+ }();
1409
+
1410
+ // Initialize dialog
1411
+ setDialogSize();
1412
+ addButtons();
1413
+
1414
+ // Set title and close button handler
1415
+ dialogElement.querySelector(".APX-dialog-title").textContent = title;
1416
+ dialogElement.querySelector('.APX-close-dialog').onclick = dialog.close;
1417
+ return dialog;
1418
+ };
1419
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (createDialog);
1420
+
1421
+ /***/ }),
1422
+
1423
+ /***/ "./modules/listen/listen.mjs":
1424
+ /*!***********************************!*\
1425
+ !*** ./modules/listen/listen.mjs ***!
1426
+ \***********************************/
1427
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1428
+
1429
+ "use strict";
1430
+ __webpack_require__.r(__webpack_exports__);
1431
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1432
+ /* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
1433
+ /* harmony export */ });
1434
+ var counter = 0;
1435
+ var doCallbacks = {};
1436
+ var timeouts = {};
1437
+
1438
+ /**
1439
+ * This function adds an event listener to the elements and returns an object with a do method to add callback functions.
1440
+ * @param {Object} apx - The apx object to augment with the listen function.
1441
+ * @returns {Object} - The augmented apx object.
1442
+ */
1443
+ /* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
1444
+ var elements = apx.elements;
1445
+
1446
+ /**
1447
+ * Adds an event listener to the elements and returns an object with a do method to add callback functions.
1448
+ * @param {string} eventType - The type of event to listen for (e.g. 'click', 'keydown', etc.).
1449
+ * @param {string} [selector] - The CSS selector to use for event delegation (optional).
1450
+ * @returns {Object} - An object with a do method to add callback functions.
1451
+ * @example
1452
+ * apx.listen('click', '.my-button').do((event) => {
1453
+ * console.log('Button clicked!', event.target);
1454
+ * });
1455
+ */
1456
+ apx.listen = function (eventTypes, secondArgument, thirdArgument) {
1457
+ var selector;
1458
+ var options = {};
1459
+ // Determine if the second argument is a selector or options
1460
+ if (typeof secondArgument === 'string') {
1461
+ selector = secondArgument;
1462
+ options = thirdArgument || {};
1463
+ } else {
1464
+ options = secondArgument || {};
1465
+ }
1466
+ var uniqueId = generateUniqueId();
1467
+ var timeoutDuration = options.timeout || 0;
1468
+ if (!Array.isArray(eventTypes)) {
1469
+ eventTypes = [eventTypes]; // Ensure eventTypes is an array
1470
+ }
1471
+
1472
+ eventTypes.forEach(function (eventType) {
1473
+ elements.forEach(function (element) {
1474
+ element.addEventListener(eventType, function (event) {
1475
+ executeCallbacks(event, uniqueId, timeoutDuration, selector, element);
1476
+ });
1477
+ });
1478
+ });
1479
+ return {
1480
+ /**
1481
+ * Adds a callback function to the doCallbacks object for the current event listener.
1482
+ * @param {Function} doCallback - The callback function to execute when the event is triggered.
1483
+ * @returns {Object} - Returns the current object to allow for chained calls.
1484
+ * @example
1485
+ * apx.listen('click', '.my-button').do((event) => {
1486
+ * console.log('Button clicked!', event.target);
1487
+ * }).do((event) => {
1488
+ * console.log('Another callback function!');
1489
+ * });
1490
+ */
1491
+ "do": function _do(doCallback) {
1492
+ if (!doCallbacks[uniqueId]) {
1493
+ doCallbacks[uniqueId] = [];
1494
+ }
1495
+ doCallbacks[uniqueId].push(doCallback);
1496
+ return this; // Return the object to allow for chained calls
1497
+ }
1498
+ };
1499
+ };
1500
+
1501
+ /**
1502
+ * Manually triggers the registered callbacks for a given event type on all elements or creates a new event if a string is provided.
1503
+ * @param {string|Event} event - The event to trigger. This can be an event type string (like 'click') or an actual Event object.
1504
+ */
1505
+ apx.trigger = function (event) {
1506
+ var eventType;
1507
+ if (typeof event === 'string') {
1508
+ eventType = event;
1509
+ event = new Event(event, {
1510
+ bubbles: true,
1511
+ cancelable: true
1512
+ });
1513
+ } else if (event instanceof Event) {
1514
+ eventType = event.type;
1515
+ } else {
1516
+ console.error('Invalid event type provided to apx.trigger. It must be either a string or Event object.');
1517
+ return;
1518
+ }
1519
+ apx.elements.forEach(function (element) {
1520
+ element.dispatchEvent(event); // This will allow the event to bubble up naturally.
1521
+ });
1522
+
1523
+ // Handle event delegation manually by executing callbacks if the target matches the selector
1524
+ Object.keys(doCallbacks).forEach(function (uniqueId) {
1525
+ var callbackDetails = doCallbacks[uniqueId];
1526
+ if (callbackDetails && callbackDetails.eventType === eventType) {
1527
+ // Check if the event target matches the selector used during listener registration
1528
+ var selector = callbackDetails.selector;
1529
+ if (!selector || event.target.matches(selector)) {
1530
+ executeCallbacks(event, uniqueId, 0, selector, event.target); // Immediate execution, no timeout
1531
+ }
1532
+ }
1533
+ });
1534
+ };
1535
+
1536
+ return apx;
1537
+ }
1538
+ ;
1539
+ function executeCallbacks(event, uniqueId, timeoutDuration) {
1540
+ var selector = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
1541
+ var element = arguments.length > 4 ? arguments[4] : undefined;
1542
+ var matchedElement = selector ? closest(event.target, selector) : element;
1543
+ if (!matchedElement) {
1544
+ return;
1545
+ }
1546
+
1547
+ // Clear any previous timeout for this uniqueId to prevent unintended behavior
1548
+ clearTimeout(timeouts[uniqueId]);
1549
+
1550
+ // Function to handle the execution of callbacks
1551
+ function handleCallbackExecution() {
1552
+ if (doCallbacks[uniqueId]) {
1553
+ doCallbacks[uniqueId].reduce(function (prevPromise, doCallback) {
1554
+ return prevPromise.then(function () {
1555
+ return new Promise(function (resolve, reject) {
1556
+ try {
1557
+ var result = doCallback.bind(matchedElement)(event);
1558
+ if (result instanceof Promise) {
1559
+ result.then(resolve)["catch"](reject);
1560
+ } else {
1561
+ resolve(result);
1562
+ }
1563
+ } catch (error) {
1564
+ reject(error);
1565
+ }
1566
+ });
1567
+ });
1568
+ }, Promise.resolve())["catch"](function (error) {
1569
+ console.error('Error in callback chain:', error);
1570
+ });
1571
+ }
1572
+ }
1573
+
1574
+ // Check if timeoutDuration is zero to decide whether to delay the callback execution or not
1575
+ if (timeoutDuration === 0) {
1576
+ handleCallbackExecution();
1577
+ } else {
1578
+ timeouts[uniqueId] = setTimeout(handleCallbackExecution, timeoutDuration);
1579
+ }
1580
+ }
1581
+ function generateUniqueId() {
1582
+ var randomPart = Math.random().toString(36).substr(2, 9); // More randomness
1583
+ var uniqueId = "".concat(Date.now(), "_").concat(randomPart, "_").concat(counter);
1584
+ counter = (counter + 1) % 1000; // Reset counter to avoid overflow
1585
+
1586
+ return uniqueId;
1587
+ }
1588
+ function closest(element, selector) {
1589
+ while (element && element.nodeType === 1) {
1590
+ if (element.matches(selector)) {
1591
+ return element;
1592
+ }
1593
+ element = element.parentNode;
1594
+ }
1595
+ return null;
1596
+ }
1597
+
1598
+ /***/ }),
1599
+
1600
+ /***/ "./modules/toast/toast.mjs":
1601
+ /*!*********************************!*\
1602
+ !*** ./modules/toast/toast.mjs ***!
1603
+ \*********************************/
1604
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
1605
+
1606
+ "use strict";
1607
+ __webpack_require__.r(__webpack_exports__);
1608
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1609
+ /* harmony export */ ToastManager: () => (/* binding */ ToastManager),
1610
+ /* harmony export */ createToastManager: () => (/* binding */ createToastManager),
1611
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__),
1612
+ /* harmony export */ toast: () => (/* binding */ toast)
1613
+ /* harmony export */ });
1614
+ /* harmony import */ var _css_toast_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/toast.css */ "./modules/toast/css/toast.css");
1615
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
1616
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
1617
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
1618
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
1619
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
1620
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
1621
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
1622
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1623
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
1624
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1625
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
1626
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
1627
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
1628
+ function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
1629
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
1630
+ // Minimal, framework-agnostic ToastManager for APX
1631
+ // ESM-first, no side effects on import. DOM only when used.
1632
+
1633
+
1634
+ /**
1635
+ * @typedef {Object} PositionObject
1636
+ * @property {'sticky'|'relative'|'anchored'} [type]
1637
+ * @property {string} [x]
1638
+ * @property {string} [y]
1639
+ * @property {HTMLElement} [element]
1640
+ * @property {'top'|'right'|'bottom'|'left'|'above'|'below'|'before'|'after'} [placement]
1641
+ * @property {string} [gap]
1642
+ * @property {boolean} [useNativeCSS]
1643
+ */
1644
+
1645
+ /**
1646
+ * @typedef {string|PositionObject} Position
1647
+ */
1648
+
1649
+ /**
1650
+ * @typedef {Object} ToastConfig
1651
+ * @property {Position} [position]
1652
+ * @property {'up'|'down'|'auto'} [flow] Flow direction for stacking toasts. 'auto' determines based on position. Default: 'auto'
1653
+ * @property {number} [maxToasts]
1654
+ * @property {number} [defaultDurationMs]
1655
+ * @property {number} [zIndex]
1656
+ * @property {'polite'|'assertive'|'off'} [ariaLive]
1657
+ * @property {number} [gap]
1658
+ * @property {boolean} [dedupe]
1659
+ * @property {string} [containerClass]
1660
+ * @property {number} [offset]
1661
+ * @property {string} [id]
1662
+ */
1663
+
1664
+ /**
1665
+ * @typedef {Object} ToastOptions
1666
+ * @property {string|Node} message
1667
+ * @property {'info'|'success'|'warning'|'danger'} [type]
1668
+ * @property {number} [durationMs]
1669
+ * @property {boolean} [dismissible]
1670
+ * @property {string} [id]
1671
+ * @property {(ref: ToastRef, ev: MouseEvent) => void} [onClick]
1672
+ * @property {(ref: ToastRef, reason: 'timeout'|'close'|'api'|'overflow') => void} [onClose]
1673
+ * @property {string} [className]
1674
+ * @property {Position} [position]
1675
+ * @property {'up'|'down'|'auto'} [flow] Flow direction for stacking toasts. 'auto' determines based on position. Default: 'auto'
1676
+ */
1677
+
1678
+ /**
1679
+ * @typedef {Object} ToastRef
1680
+ * @property {string} id
1681
+ * @property {HTMLElement} el
1682
+ * @property {(reason?: 'api'|'close') => void} close
1683
+ * @property {(partial: Partial<ToastOptions>) => void} update
1684
+ * @property {() => Promise<void>} whenClosed
1685
+ * @property {(event: 'close'|'click', handler: Function) => () => void} on
1686
+ * @property {(event: 'close'|'click', handler: Function) => void} off
1687
+ */
1688
+
1689
+ var isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
1690
+
1691
+ // Shared container cache: Map<position, HTMLElement>
1692
+ // Containers are shared between managers with the same position
1693
+ var _containerCache = new Map();
1694
+
1695
+ // Garbage collection: cleanup empty unmanaged containers after a delay
1696
+ var GC_DELAY_MS = 20000; // 20 seconds
1697
+ var _gcTimeoutId = null;
1698
+
1699
+ // Wrapper for all toast containers (keeps DOM clean)
1700
+ var _toastWrapper = null;
1701
+
1702
+ /**
1703
+ * Get or create the toast containers wrapper
1704
+ * @returns {HTMLElement|null}
1705
+ */
1706
+ function getToastWrapper() {
1707
+ if (!isBrowser) return null;
1708
+ if (!_toastWrapper) {
1709
+ _toastWrapper = document.querySelector('.APX-toast-wrapper');
1710
+ if (!_toastWrapper) {
1711
+ _toastWrapper = createEl('div', 'APX-toast-wrapper');
1712
+ _toastWrapper.style.position = 'fixed';
1713
+ _toastWrapper.style.top = '0';
1714
+ _toastWrapper.style.left = '0';
1715
+ _toastWrapper.style.width = '0';
1716
+ _toastWrapper.style.height = '0';
1717
+ _toastWrapper.style.pointerEvents = 'none';
1718
+ _toastWrapper.style.zIndex = '10000'; // Below containers but above most content
1719
+ document.body.appendChild(_toastWrapper);
1720
+ }
1721
+ }
1722
+ return _toastWrapper;
1723
+ }
1724
+ var DEFAULT_CONFIG = {
1725
+ position: 'bottom-right',
1726
+ maxToasts: 5,
1727
+ defaultDurationMs: 5000,
1728
+ zIndex: 11000,
1729
+ ariaLive: 'polite',
1730
+ gap: 8,
1731
+ dedupe: false,
1732
+ containerClass: '',
1733
+ offset: 0
1734
+ };
1735
+
1736
+ /**
1737
+ * Create an element with classes
1738
+ */
1739
+ function createEl(tag, classNames) {
1740
+ var el = document.createElement(tag);
1741
+ if (classNames) {
1742
+ classNames.split(' ').filter(Boolean).forEach(function (c) {
1743
+ return el.classList.add(c);
1744
+ });
1745
+ }
1746
+ return el;
1747
+ }
1748
+
1749
+ /**
1750
+ * Normalize placement synonyms to CSS values
1751
+ * @param {string} placement
1752
+ * @returns {'top'|'right'|'bottom'|'left'}
1753
+ */
1754
+ function normalizePlacement(placement) {
1755
+ var synonyms = {
1756
+ 'above': 'top',
1757
+ 'below': 'bottom',
1758
+ 'before': 'left',
1759
+ 'after': 'right'
1760
+ };
1761
+ return synonyms[placement] || placement;
1762
+ }
1763
+
1764
+ /**
1765
+ * Determine flow direction based on position
1766
+ * @param {Position} position
1767
+ * @returns {'up'|'down'}
1768
+ */
1769
+ function determineFlow(position) {
1770
+ if (typeof position === 'string') {
1771
+ // String positions: top = up, bottom = down
1772
+ if (position.includes('top')) return 'up';
1773
+ if (position.includes('bottom')) return 'down';
1774
+ return 'down'; // default
1775
+ }
1776
+
1777
+ if (_typeof(position) === 'object' && position !== null) {
1778
+ var type = position.type || (position.x || position.y ? 'sticky' : null);
1779
+ if (type === 'sticky' || !type && (position.x || position.y)) {
1780
+ // Sticky: determine based on y coordinate
1781
+ if (position.y !== undefined) {
1782
+ // If y starts with '-' or is a small value, likely top (up)
1783
+ // If y is a large value or percentage, likely bottom (down)
1784
+ if (position.y.startsWith('-')) {
1785
+ // Negative = from bottom, so flow down
1786
+ return 'down';
1787
+ }
1788
+ var num = parseFloat(position.y);
1789
+ if (!isNaN(num)) {
1790
+ // If y < 50% of viewport height, likely top (up)
1791
+ // Otherwise likely bottom (down)
1792
+ if (position.y.includes('%')) {
1793
+ return num < 50 ? 'up' : 'down';
1794
+ }
1795
+ // For px values, assume < 400px is top (up)
1796
+ return num < 400 ? 'up' : 'down';
1797
+ }
1798
+ }
1799
+ return 'down'; // default
1800
+ }
1801
+
1802
+ if (type === 'anchored' && position.placement) {
1803
+ // Anchored: placement determines flow
1804
+ var placement = normalizePlacement(position.placement);
1805
+ if (placement === 'top' || placement === 'above') return 'up';
1806
+ if (placement === 'bottom' || placement === 'below') return 'down';
1807
+ // For left/right, default to down
1808
+ return 'down';
1809
+ }
1810
+ if (type === 'relative') {
1811
+ // Relative: determine based on y offset
1812
+ if (position.y !== undefined) {
1813
+ var _num = parseFloat(position.y);
1814
+ if (!isNaN(_num)) {
1815
+ // Negative y = above element = flow up
1816
+ // Positive y = below element = flow down
1817
+ return _num < 0 ? 'up' : 'down';
1818
+ }
1819
+ }
1820
+ return 'down'; // default
1821
+ }
1822
+ }
1823
+
1824
+ return 'down'; // default
1825
+ }
1826
+
1827
+ /**
1828
+ * Garbage collection: remove empty unmanaged containers
1829
+ */
1830
+ function cleanupEmptyContainers() {
1831
+ if (!isBrowser) return;
1832
+ var containers = document.querySelectorAll('.APX-toast-container:not([data-apx-toast-managed="true"])');
1833
+ containers.forEach(function (container) {
1834
+ // Check if container is empty (no toasts)
1835
+ if (container.children.length === 0) {
1836
+ var positionKey = container.getAttribute('data-apx-toast-position');
1837
+ if (positionKey) {
1838
+ _containerCache["delete"](positionKey);
1839
+ }
1840
+ container.remove();
1841
+ }
1842
+ });
1843
+
1844
+ // Clean up wrapper if it's empty (all containers removed)
1845
+ if (_toastWrapper && _toastWrapper.children.length === 0) {
1846
+ _toastWrapper.remove();
1847
+ _toastWrapper = null;
1848
+ }
1849
+ _gcTimeoutId = null;
1850
+ }
1851
+
1852
+ /**
1853
+ * Schedule garbage collection for empty unmanaged containers
1854
+ */
1855
+ function scheduleGarbageCollection() {
1856
+ if (_gcTimeoutId) {
1857
+ clearTimeout(_gcTimeoutId);
1858
+ }
1859
+ _gcTimeoutId = setTimeout(cleanupEmptyContainers, GC_DELAY_MS);
1860
+ }
1861
+
1862
+ /**
1863
+ * Find all scrollable parent elements
1864
+ * @param {HTMLElement} element
1865
+ * @returns {HTMLElement[]}
1866
+ */
1867
+ function findScrollableParents(element) {
1868
+ var scrollables = [];
1869
+ var current = element.parentElement;
1870
+ while (current && current !== document.body && current !== document.documentElement) {
1871
+ var style = window.getComputedStyle(current);
1872
+ var overflow = style.overflow + style.overflowY + style.overflowX;
1873
+ if (overflow.includes('scroll') || overflow.includes('auto')) {
1874
+ scrollables.push(current);
1875
+ }
1876
+ current = current.parentElement;
1877
+ }
1878
+ return scrollables;
1879
+ }
1880
+
1881
+ /**
1882
+ * Hash an element to create a unique identifier
1883
+ * @param {HTMLElement} el
1884
+ * @returns {string}
1885
+ */
1886
+ function hashElement(el) {
1887
+ var rect = el.getBoundingClientRect();
1888
+ var str = "".concat(el.tagName, "_").concat(rect.left, "_").concat(rect.top, "_").concat(rect.width, "_").concat(rect.height);
1889
+ var hash = 0;
1890
+ for (var i = 0; i < str.length; i++) {
1891
+ var _char = str.charCodeAt(i);
1892
+ hash = (hash << 5) - hash + _char;
1893
+ hash = hash & hash; // Convert to 32bit integer
1894
+ }
1895
+
1896
+ return Math.abs(hash).toString(36);
1897
+ }
1898
+
1899
+ /**
1900
+ * Serialize position options into a unique key
1901
+ * @param {Position} position
1902
+ * @returns {string}
1903
+ */
1904
+ function serializePosition(position) {
1905
+ if (typeof position === 'string') {
1906
+ return "s:".concat(position);
1907
+ }
1908
+ if (_typeof(position) === 'object' && position !== null) {
1909
+ var parts = [];
1910
+
1911
+ // Type (default: sticky if x/y provided)
1912
+ var type = position.type || (position.x || position.y ? 'sticky' : null);
1913
+ if (type) parts.push("t:".concat(type));
1914
+
1915
+ // Coordinates
1916
+ if (position.x !== undefined) parts.push("x:".concat(position.x));
1917
+ if (position.y !== undefined) parts.push("y:".concat(position.y));
1918
+
1919
+ // For relative/anchored: use element ID or hash
1920
+ if (position.element) {
1921
+ var _position$element$dat;
1922
+ var elementId = position.element.id || ((_position$element$dat = position.element.dataset) === null || _position$element$dat === void 0 ? void 0 : _position$element$dat.apxToastAnchorId) || "el_".concat(hashElement(position.element));
1923
+ parts.push("el:".concat(elementId));
1924
+ }
1925
+ if (position.placement) {
1926
+ // Normalize placement for serialization (use CSS values)
1927
+ var normalized = normalizePlacement(position.placement);
1928
+ parts.push("p:".concat(normalized));
1929
+ }
1930
+ if (position.gap !== undefined) parts.push("g:".concat(position.gap));
1931
+ if (position.useNativeCSS) parts.push("native:true");
1932
+ return "o:".concat(parts.join('|'));
1933
+ }
1934
+ return 's:bottom-right';
1935
+ }
1936
+
1937
+ /**
1938
+ * ToastManager class
1939
+ */
1940
+ var ToastManager = /*#__PURE__*/function () {
1941
+ /** @param {Partial<ToastConfig>=} config */
1942
+ function ToastManager(config) {
1943
+ _classCallCheck(this, ToastManager);
1944
+ /** @type {ToastConfig} */
1945
+ this.config = _objectSpread(_objectSpread({}, DEFAULT_CONFIG), config || {});
1946
+ /** @type {HTMLElement|null} */
1947
+ this.container = null;
1948
+ /** @type {Map<string, ToastRef>} */
1949
+ this.idToRef = new Map();
1950
+ /** @type {ToastRef[]} */
1951
+ this.open = [];
1952
+ }
1953
+
1954
+ /** @param {Partial<ToastConfig>} config */
1955
+ _createClass(ToastManager, [{
1956
+ key: "configure",
1957
+ value: function configure(config) {
1958
+ this.config = _objectSpread(_objectSpread({}, this.config), config || {});
1959
+ if (this.container) this.applyContainerConfig();
1960
+ }
1961
+
1962
+ /** @param {'polite'|'assertive'|'off'} mode */
1963
+ }, {
1964
+ key: "setAriaLive",
1965
+ value: function setAriaLive(mode) {
1966
+ this.configure({
1967
+ ariaLive: mode
1968
+ });
1969
+ }
1970
+
1971
+ /** @returns {ToastRef[]} */
1972
+ }, {
1973
+ key: "getOpenToasts",
1974
+ value: function getOpenToasts() {
1975
+ return this.open.slice();
1976
+ }
1977
+
1978
+ /** @param {ToastOptions} opts */
1979
+ }, {
1980
+ key: "show",
1981
+ value: function show(opts) {
1982
+ var _this = this;
1983
+ if (!isBrowser) return (/** @type {any} */null
1984
+ );
1985
+ var options = this.normalizeOptions(opts);
1986
+ if (this.config.dedupe && options.id && this.idToRef.has(options.id)) {
1987
+ var _ref = this.idToRef.get(options.id);
1988
+ _ref.update(options);
1989
+ return _ref;
1990
+ }
1991
+
1992
+ // Determine position and flow for this toast (options take precedence over config)
1993
+ var position = options.position || this.config.position || 'bottom-right';
1994
+ var flow = options.flow !== undefined ? options.flow : this.config.flow !== undefined ? this.config.flow : 'auto';
1995
+ var finalFlow = flow === 'auto' ? determineFlow(position) : flow;
1996
+
1997
+ // Ensure default container is set (for backward compatibility)
1998
+ this.ensureContainer();
1999
+ var toastEl = createEl('div', "APX-toast APX-toast--".concat(options.type));
2000
+ toastEl.setAttribute('role', 'status');
2001
+ // Priority: options.id > config.id > auto-generated
2002
+ var toastId = options.id || "t_".concat(Date.now(), "_").concat(Math.random().toString(36).slice(2, 8));
2003
+ toastEl.dataset.toastId = toastId;
2004
+ if (options.className) toastEl.className += " ".concat(options.className);
2005
+ var contentEl = createEl('div', 'APX-toast__content');
2006
+ if (typeof options.message === 'string') {
2007
+ contentEl.textContent = options.message;
2008
+ } else if (options.message) {
2009
+ contentEl.appendChild(options.message);
2010
+ }
2011
+ toastEl.appendChild(contentEl);
2012
+ var closeBtn = null;
2013
+ if (options.dismissible !== false) {
2014
+ closeBtn = createEl('button', 'APX-toast__close');
2015
+ closeBtn.setAttribute('aria-label', 'Close');
2016
+ closeBtn.type = 'button';
2017
+ toastEl.appendChild(closeBtn);
2018
+ }
2019
+
2020
+ // Get or create container for this specific position
2021
+ var container = null;
2022
+ var positionUpdateFn = null;
2023
+ var positionCleanup = null;
2024
+ var originalElementStyle = null;
2025
+ if (position && _typeof(position) === 'object' && position !== null) {
2026
+ var type = position.type || (position.x || position.y ? 'sticky' : null);
2027
+ if (position.useNativeCSS && (type === 'relative' || type === 'anchored') && position.element) {
2028
+ // useNativeCSS: true - create container in target element using native CSS
2029
+ var targetEl = position.element;
2030
+ originalElementStyle = targetEl.style.position;
2031
+ targetEl.style.position = 'relative';
2032
+
2033
+ // Create a container for stacking toasts (reuse if exists)
2034
+ var positionKey = serializePosition(position);
2035
+ var nativeContainer = targetEl.querySelector("[data-apx-toast-position=\"".concat(positionKey, "\"]"));
2036
+ if (!nativeContainer) {
2037
+ nativeContainer = createEl('div', 'APX-toast-container APX-toast-container-native');
2038
+ nativeContainer.setAttribute('data-apx-toast-position', positionKey);
2039
+ nativeContainer.style.position = 'absolute';
2040
+ nativeContainer.style.zIndex = String(this.config.zIndex);
2041
+ nativeContainer.style.gap = "".concat(this.config.gap, "px");
2042
+ nativeContainer.setAttribute('aria-live', String(this.config.ariaLive));
2043
+ nativeContainer.style.flexDirection = finalFlow === 'up' ? 'column-reverse' : 'column';
2044
+
2045
+ // Apply positioning to container
2046
+ if (type === 'relative') {
2047
+ // Relative: use x/y directly
2048
+ if (position.x !== undefined) {
2049
+ if (position.x.startsWith('-')) {
2050
+ nativeContainer.style.right = position.x.substring(1);
2051
+ } else {
2052
+ nativeContainer.style.left = position.x;
2053
+ }
2054
+ }
2055
+ if (position.y !== undefined) {
2056
+ if (position.y.startsWith('-')) {
2057
+ nativeContainer.style.bottom = position.y.substring(1);
2058
+ } else {
2059
+ nativeContainer.style.top = position.y;
2060
+ }
2061
+ }
2062
+ } else if (type === 'anchored') {
2063
+ // Anchored: position outside the element using 100% (element size) + gap
2064
+ var placement = normalizePlacement(position.placement);
2065
+ var gap = position.gap || '1em';
2066
+ switch (placement) {
2067
+ case 'top':
2068
+ nativeContainer.style.bottom = "calc(100% + ".concat(gap, ")");
2069
+ nativeContainer.style.left = '0';
2070
+ break;
2071
+ case 'bottom':
2072
+ nativeContainer.style.top = "calc(100% + ".concat(gap, ")");
2073
+ nativeContainer.style.left = '0';
2074
+ break;
2075
+ case 'left':
2076
+ nativeContainer.style.right = "calc(100% + ".concat(gap, ")");
2077
+ nativeContainer.style.top = '0';
2078
+ break;
2079
+ case 'right':
2080
+ nativeContainer.style.left = "calc(100% + ".concat(gap, ")");
2081
+ nativeContainer.style.top = '0';
2082
+ break;
2083
+ }
2084
+ }
2085
+ targetEl.appendChild(nativeContainer);
2086
+ } else {
2087
+ // Update flow direction if container exists
2088
+ nativeContainer.style.flexDirection = finalFlow === 'up' ? 'column-reverse' : 'column';
2089
+ }
2090
+ container = nativeContainer;
2091
+ positionCleanup = function positionCleanup() {
2092
+ if (targetEl && targetEl.parentElement) {
2093
+ targetEl.style.position = originalElementStyle || '';
2094
+ // Remove native container if empty
2095
+ if (nativeContainer && nativeContainer.children.length === 0) {
2096
+ var _positionKey = nativeContainer.getAttribute('data-apx-toast-position');
2097
+ if (_positionKey) {
2098
+ _containerCache["delete"](_positionKey);
2099
+ }
2100
+ nativeContainer.remove();
2101
+ }
2102
+ }
2103
+ };
2104
+ } else {
2105
+ // Default: get or create container for this position
2106
+ container = this.getContainerForPosition(position, finalFlow);
2107
+ var updateContainerPosition = function updateContainerPosition() {
2108
+ var styles = _this.calculatePosition(position, container);
2109
+ Object.assign(container.style, styles);
2110
+ };
2111
+ updateContainerPosition();
2112
+
2113
+ // For relative/anchored, listen to scroll/resize
2114
+ if ((type === 'relative' || type === 'anchored') && position.element) {
2115
+ var rafId = null;
2116
+ var lastUpdate = 0;
2117
+ var throttleMs = 16; // ~60fps
2118
+
2119
+ var throttledUpdate = function throttledUpdate() {
2120
+ var now = Date.now();
2121
+ if (now - lastUpdate < throttleMs) {
2122
+ if (rafId) cancelAnimationFrame(rafId);
2123
+ rafId = requestAnimationFrame(function () {
2124
+ updateContainerPosition();
2125
+ lastUpdate = Date.now();
2126
+ });
2127
+ } else {
2128
+ updateContainerPosition();
2129
+ lastUpdate = now;
2130
+ }
2131
+ };
2132
+
2133
+ // Find all scrollable parents
2134
+ var scrollableParents = findScrollableParents(position.element);
2135
+
2136
+ // Listen to scroll on window and all scrollable parents
2137
+ window.addEventListener('scroll', throttledUpdate, {
2138
+ passive: true
2139
+ });
2140
+ window.addEventListener('resize', throttledUpdate, {
2141
+ passive: true
2142
+ });
2143
+
2144
+ // Listen to scroll on all scrollable parent elements
2145
+ scrollableParents.forEach(function (parent) {
2146
+ parent.addEventListener('scroll', throttledUpdate, {
2147
+ passive: true
2148
+ });
2149
+ });
2150
+
2151
+ // Watch for element removal
2152
+ var observer = new MutationObserver(function () {
2153
+ if (!position.element.parentElement) {
2154
+ ref.close('api');
2155
+ }
2156
+ });
2157
+ observer.observe(document.body, {
2158
+ childList: true,
2159
+ subtree: true
2160
+ });
2161
+ positionUpdateFn = updateContainerPosition;
2162
+ positionCleanup = function positionCleanup() {
2163
+ window.removeEventListener('scroll', throttledUpdate);
2164
+ window.removeEventListener('resize', throttledUpdate);
2165
+ scrollableParents.forEach(function (parent) {
2166
+ parent.removeEventListener('scroll', throttledUpdate);
2167
+ });
2168
+ observer.disconnect();
2169
+ if (rafId) cancelAnimationFrame(rafId);
2170
+ };
2171
+ }
2172
+ }
2173
+ } else {
2174
+ // String position - get or create container for this position
2175
+ container = this.getContainerForPosition(position, finalFlow);
2176
+ }
2177
+
2178
+ // Append toast to the appropriate container
2179
+ if (container) {
2180
+ container.appendChild(toastEl);
2181
+ } else {
2182
+ // Fallback to default container
2183
+ this.container.appendChild(toastEl);
2184
+ }
2185
+
2186
+ // Enter animation
2187
+ toastEl.classList.add('APX-toast--enter');
2188
+ requestAnimationFrame(function () {
2189
+ toastEl.classList.add('APX-toast--enter-active');
2190
+ });
2191
+
2192
+ // Event handling and timers
2193
+ var remaining = options.durationMs;
2194
+ var timerId = null;
2195
+ var startTs = null;
2196
+ var handlers = {
2197
+ click: new Set(),
2198
+ close: new Set()
2199
+ };
2200
+ var startTimer = function startTimer() {
2201
+ if (!remaining || remaining <= 0) return; // sticky
2202
+ startTs = Date.now();
2203
+ timerId = window.setTimeout(function () {
2204
+ return ref.close('timeout');
2205
+ }, remaining);
2206
+ };
2207
+ var pauseTimer = function pauseTimer() {
2208
+ if (timerId != null) {
2209
+ window.clearTimeout(timerId);
2210
+ timerId = null;
2211
+ if (startTs != null) remaining -= Date.now() - startTs;
2212
+ }
2213
+ };
2214
+
2215
+ /** @type {ToastRef} */
2216
+ var ref = {
2217
+ id: toastId,
2218
+ el: toastEl,
2219
+ close: function close(reason) {
2220
+ cleanup(reason || 'api');
2221
+ },
2222
+ update: function update(partial) {
2223
+ var merged = _this.normalizeOptions(_objectSpread(_objectSpread({}, options), partial));
2224
+ // update content
2225
+ if (typeof merged.message === 'string') {
2226
+ contentEl.textContent = merged.message;
2227
+ } else if (merged.message) {
2228
+ contentEl.innerHTML = '';
2229
+ contentEl.appendChild(merged.message);
2230
+ }
2231
+ // update type class
2232
+ ['info', 'success', 'warning', 'danger'].forEach(function (t) {
2233
+ return toastEl.classList.remove("APX-toast--".concat(t));
2234
+ });
2235
+ toastEl.classList.add("APX-toast--".concat(merged.type));
2236
+ // update classes
2237
+ if (options.className !== merged.className) {
2238
+ var _toastEl$classList, _toastEl$classList2;
2239
+ if (options.className) (_toastEl$classList = toastEl.classList).remove.apply(_toastEl$classList, _toConsumableArray(options.className.split(' ').filter(Boolean)));
2240
+ if (merged.className) (_toastEl$classList2 = toastEl.classList).add.apply(_toastEl$classList2, _toConsumableArray(merged.className.split(' ').filter(Boolean)));
2241
+ }
2242
+ // update duration logic
2243
+ options.durationMs = merged.durationMs;
2244
+ remaining = merged.durationMs;
2245
+ pauseTimer();
2246
+ startTimer();
2247
+ },
2248
+ whenClosed: function whenClosed() {
2249
+ return closedPromise;
2250
+ },
2251
+ on: function on(event, handler) {
2252
+ handlers[event].add(handler);
2253
+ return function () {
2254
+ return ref.off(event, handler);
2255
+ };
2256
+ },
2257
+ off: function off(event, handler) {
2258
+ handlers[event]["delete"](handler);
2259
+ }
2260
+ };
2261
+ var notify = function notify(event, arg) {
2262
+ return handlers[event].forEach(function (fn) {
2263
+ try {
2264
+ fn(arg);
2265
+ } catch (_) {}
2266
+ });
2267
+ };
2268
+ var closedPromise = new Promise(function (resolve) {
2269
+ var finish = function finish(reason) {
2270
+ notify('close', reason);
2271
+ if (typeof options.onClose === 'function') {
2272
+ try {
2273
+ options.onClose(ref, reason);
2274
+ } catch (_) {}
2275
+ }
2276
+ resolve();
2277
+ };
2278
+ var cleanup = function cleanup(reason) {
2279
+ if (!toastEl) return;
2280
+ pauseTimer();
2281
+
2282
+ // Cleanup position listeners and restore styles
2283
+ if (positionCleanup) {
2284
+ positionCleanup();
2285
+ positionCleanup = null;
2286
+ }
2287
+
2288
+ // If overflow, remove immediately to enforce hard cap
2289
+ if (reason === 'overflow') {
2290
+ if (toastEl.parentElement) toastEl.parentElement.removeChild(toastEl);
2291
+ var idx = _this.open.indexOf(ref);
2292
+ if (idx >= 0) _this.open.splice(idx, 1);
2293
+ _this.idToRef["delete"](toastId);
2294
+ finish(reason);
2295
+ return;
2296
+ }
2297
+
2298
+ // Otherwise, animate out
2299
+ toastEl.classList.add('APX-toast--exit');
2300
+ requestAnimationFrame(function () {
2301
+ return toastEl.classList.add('APX-toast--exit-active');
2302
+ });
2303
+ var removeEl = function removeEl() {
2304
+ toastEl.removeEventListener('transitionend', removeEl);
2305
+ if (toastEl.parentElement) toastEl.parentElement.removeChild(toastEl);
2306
+ var idx = _this.open.indexOf(ref);
2307
+ if (idx >= 0) _this.open.splice(idx, 1);
2308
+ _this.idToRef["delete"](toastId);
2309
+
2310
+ // Schedule garbage collection for unmanaged containers
2311
+ scheduleGarbageCollection();
2312
+ finish(reason);
2313
+ };
2314
+ toastEl.addEventListener('transitionend', removeEl);
2315
+ };
2316
+
2317
+ // attach close behavior
2318
+ ref.close = function (reason) {
2319
+ return cleanup(reason || 'api');
2320
+ };
2321
+ });
2322
+
2323
+ // Click handling
2324
+ toastEl.addEventListener('click', function (ev) {
2325
+ notify('click', ev);
2326
+ if (typeof options.onClick === 'function') {
2327
+ try {
2328
+ options.onClick(ref, ev);
2329
+ } catch (_) {}
2330
+ }
2331
+ });
2332
+
2333
+ // Hover pause
2334
+ toastEl.addEventListener('mouseenter', pauseTimer);
2335
+ toastEl.addEventListener('mouseleave', function () {
2336
+ return startTimer();
2337
+ });
2338
+ if (closeBtn) closeBtn.addEventListener('click', function (ev) {
2339
+ ev.stopPropagation();
2340
+ ref.close('close');
2341
+ });
2342
+
2343
+ // Track
2344
+ this.open.push(ref);
2345
+ this.idToRef.set(toastId, ref);
2346
+
2347
+ // Overflow policy
2348
+ if (this.open.length > this.config.maxToasts) {
2349
+ var oldest = this.open[0];
2350
+ oldest.close('overflow');
2351
+ }
2352
+ startTimer();
2353
+ return ref;
2354
+ }
2355
+
2356
+ /**
2357
+ * Convenience helpers
2358
+ */
2359
+ }, {
2360
+ key: "info",
2361
+ value: function info(message, opts) {
2362
+ return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
2363
+ message: message,
2364
+ type: 'info'
2365
+ }));
2366
+ }
2367
+ }, {
2368
+ key: "success",
2369
+ value: function success(message, opts) {
2370
+ return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
2371
+ message: message,
2372
+ type: 'success'
2373
+ }));
2374
+ }
2375
+ }, {
2376
+ key: "warning",
2377
+ value: function warning(message, opts) {
2378
+ return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
2379
+ message: message,
2380
+ type: 'warning'
2381
+ }));
2382
+ }
2383
+ }, {
2384
+ key: "danger",
2385
+ value: function danger(message, opts) {
2386
+ return this.show(_objectSpread(_objectSpread({}, opts || {}), {}, {
2387
+ message: message,
2388
+ type: 'danger'
2389
+ }));
2390
+ }
2391
+
2392
+ /** @param {'api'|'overflow'} [reason] */
2393
+ }, {
2394
+ key: "closeAll",
2395
+ value: function closeAll(reason) {
2396
+ // copy to avoid mutation during iteration
2397
+ var all = this.open.slice();
2398
+ all.forEach(function (r) {
2399
+ return r.close(reason || 'api');
2400
+ });
2401
+ }
2402
+
2403
+ /** @param {ToastOptions} opts */
2404
+ }, {
2405
+ key: "normalizeOptions",
2406
+ value: function normalizeOptions(opts) {
2407
+ var o = _objectSpread({}, opts);
2408
+ if (!o.type) o.type = 'info';
2409
+ if (typeof o.dismissible !== 'boolean') o.dismissible = true;
2410
+ if (typeof o.durationMs !== 'number') o.durationMs = this.config.defaultDurationMs;
2411
+ // Use id from options if provided, otherwise use id from config, otherwise undefined (will be auto-generated)
2412
+ if (!o.id && this.config.id) o.id = this.config.id;
2413
+ return o;
2414
+ }
2415
+
2416
+ /**
2417
+ * Find or create a container for a specific position
2418
+ * @param {Position} position
2419
+ * @param {'up'|'down'} [flow] Flow direction (already determined, not 'auto')
2420
+ * @param {boolean} [managed] Whether this container is managed by a manager (default: false)
2421
+ * @returns {HTMLElement|null}
2422
+ */
2423
+ }, {
2424
+ key: "getContainerForPosition",
2425
+ value: function getContainerForPosition(position, flow) {
2426
+ var managed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
2427
+ if (!isBrowser) return null;
2428
+ var positionKey = serializePosition(position);
2429
+
2430
+ // Flow should already be determined ('up' or 'down'), but fallback to auto if needed
2431
+ var finalFlow = flow && flow !== 'auto' ? flow : determineFlow(position);
2432
+
2433
+ // 1. Check memory cache
2434
+ var c = _containerCache.get(positionKey);
2435
+
2436
+ // 2. If not in cache, search in DOM by data attribute
2437
+ if (!c && isBrowser) {
2438
+ c = document.querySelector("[data-apx-toast-position=\"".concat(positionKey, "\"]"));
2439
+ if (c) {
2440
+ _containerCache.set(positionKey, c);
2441
+ }
2442
+ }
2443
+
2444
+ // 3. If still not found, create new container
2445
+ if (!c) {
2446
+ c = createEl('div', 'APX-toast-container');
2447
+ c.setAttribute('data-apx-toast-position', positionKey);
2448
+
2449
+ // Mark as managed if created by a manager
2450
+ if (managed) {
2451
+ c.setAttribute('data-apx-toast-managed', 'true');
2452
+ }
2453
+
2454
+ // Determine position class (for CSS)
2455
+ var posClass = typeof position === 'string' ? position : position.type || 'bottom-right';
2456
+ c.classList.add("APX-toast-container--".concat(posClass));
2457
+ c.setAttribute('aria-live', String(this.config.ariaLive));
2458
+ c.style.zIndex = String(this.config.zIndex);
2459
+ c.style.gap = "".concat(this.config.gap, "px");
2460
+
2461
+ // Apply flow direction
2462
+ c.style.flexDirection = finalFlow === 'up' ? 'column-reverse' : 'column';
2463
+
2464
+ // Apply position styles if object position
2465
+ if (_typeof(position) === 'object' && position !== null) {
2466
+ c.style.position = 'fixed';
2467
+ var styles = this.calculatePosition(position, c);
2468
+ Object.assign(c.style, styles);
2469
+ }
2470
+
2471
+ // Append to wrapper for clean DOM organization
2472
+ var wrapper = getToastWrapper();
2473
+ if (wrapper) {
2474
+ wrapper.appendChild(c);
2475
+ } else {
2476
+ document.body.appendChild(c);
2477
+ }
2478
+ _containerCache.set(positionKey, c);
2479
+ } else {
2480
+ // Update flow direction if container exists (may be shared)
2481
+ c.style.flexDirection = finalFlow === 'up' ? 'column-reverse' : 'column';
2482
+
2483
+ // If container exists and is now managed, mark it
2484
+ if (managed && !c.hasAttribute('data-apx-toast-managed')) {
2485
+ c.setAttribute('data-apx-toast-managed', 'true');
2486
+ }
2487
+ }
2488
+ return c;
2489
+ }
2490
+ }, {
2491
+ key: "ensureContainer",
2492
+ value: function ensureContainer() {
2493
+ if (this.container || !isBrowser) return;
2494
+ var position = this.config.position || 'bottom-right';
2495
+ var flow = this.config.flow !== undefined ? this.config.flow : 'auto';
2496
+ // Containers created by ensureContainer are managed
2497
+ this.container = this.getContainerForPosition(position, flow, true);
2498
+ this.applyContainerConfig();
2499
+ }
2500
+ }, {
2501
+ key: "applyContainerConfig",
2502
+ value: function applyContainerConfig() {
2503
+ var _this2 = this;
2504
+ if (!this.container) return;
2505
+ var position = this.config.position || 'bottom-right';
2506
+ var pos = typeof position === 'string' ? position : position.type || 'bottom-right';
2507
+
2508
+ // Apply styles (these may be overridden by other managers sharing the container)
2509
+ this.container.style.zIndex = String(this.config.zIndex);
2510
+ this.container.style.gap = "".concat(this.config.gap, "px");
2511
+ this.container.setAttribute('aria-live', String(this.config.ariaLive));
2512
+
2513
+ // Update position class (only for string positions)
2514
+ if (typeof position === 'string') {
2515
+ var _this$container$class;
2516
+ var posClasses = ['bottom-right', 'bottom-left', 'top-right', 'top-left'].map(function (p) {
2517
+ return "APX-toast-container--".concat(p);
2518
+ });
2519
+ (_this$container$class = this.container.classList).remove.apply(_this$container$class, _toConsumableArray(posClasses));
2520
+ this.container.classList.add("APX-toast-container--".concat(pos));
2521
+ }
2522
+
2523
+ // Apply container class if specified
2524
+ if (this.config.containerClass) {
2525
+ this.config.containerClass.split(' ').filter(Boolean).forEach(function (cls) {
2526
+ _this2.container.classList.add(cls);
2527
+ });
2528
+ }
2529
+
2530
+ // Apply offset (only for string positions)
2531
+ if (typeof position === 'string') {
2532
+ if (this.config.offset) {
2533
+ var offset = "".concat(this.config.offset, "px");
2534
+ if (pos.includes('bottom')) this.container.style.bottom = offset;else this.container.style.top = offset;
2535
+ if (pos.includes('right')) this.container.style.right = offset;else this.container.style.left = offset;
2536
+ } else {
2537
+ // Reset offset if not specified
2538
+ if (pos.includes('bottom')) this.container.style.bottom = '';else this.container.style.top = '';
2539
+ if (pos.includes('right')) this.container.style.right = '';else this.container.style.left = '';
2540
+ }
2541
+ } else if (_typeof(position) === 'object' && position !== null) {
2542
+ // For object positions, ensure container has position: fixed
2543
+ this.container.style.position = 'fixed';
2544
+ }
2545
+ }
2546
+
2547
+ /**
2548
+ * Calculate position for a container based on position config
2549
+ * @param {Position} position
2550
+ * @param {HTMLElement} containerEl
2551
+ * @returns {{left?: string, top?: string, right?: string, bottom?: string}}
2552
+ */
2553
+ }, {
2554
+ key: "calculatePosition",
2555
+ value: function calculatePosition(position, containerEl) {
2556
+ if (typeof position === 'string') {
2557
+ // String positions are handled by container CSS
2558
+ return {};
2559
+ }
2560
+ if (_typeof(position) === 'object' && position !== null) {
2561
+ var type = position.type || (position.x || position.y ? 'sticky' : null);
2562
+ if (type === 'sticky' || !type && (position.x || position.y)) {
2563
+ // Sticky: fixed position relative to viewport
2564
+ var styles = {};
2565
+ if (position.x !== undefined) {
2566
+ if (position.x.startsWith('-')) {
2567
+ styles.right = position.x.substring(1);
2568
+ } else {
2569
+ styles.left = position.x;
2570
+ }
2571
+ }
2572
+ if (position.y !== undefined) {
2573
+ if (position.y.startsWith('-')) {
2574
+ styles.bottom = position.y.substring(1);
2575
+ } else {
2576
+ styles.top = position.y;
2577
+ }
2578
+ }
2579
+ return styles;
2580
+ }
2581
+ if (type === 'relative' && position.element) {
2582
+ // Relative: position relative to element with x/y offset
2583
+ // Use fixed positioning, so getBoundingClientRect() is relative to viewport
2584
+ var rect = position.element.getBoundingClientRect();
2585
+
2586
+ // Parse x/y offsets (can be px, em, etc.)
2587
+ var parseOffset = function parseOffset(val) {
2588
+ if (!val) return 0;
2589
+ var num = parseFloat(val);
2590
+ if (val.includes('em')) {
2591
+ // Convert em to px (approximate: 1em = 16px)
2592
+ return num * 16;
2593
+ }
2594
+ return num;
2595
+ };
2596
+ var offsetX = parseOffset(position.x || '0');
2597
+ var offsetY = parseOffset(position.y || '0');
2598
+ var _styles = {
2599
+ left: "".concat(rect.left + offsetX, "px"),
2600
+ top: "".concat(rect.top + offsetY, "px")
2601
+ };
2602
+ return _styles;
2603
+ }
2604
+ if (type === 'anchored' && position.element) {
2605
+ // Anchored: position relative to element with placement
2606
+ var _rect = position.element.getBoundingClientRect();
2607
+ var gap = position.gap || '1em';
2608
+
2609
+ // Parse gap (can be px, em, etc.)
2610
+ var parseGap = function parseGap(val) {
2611
+ var num = parseFloat(val);
2612
+ if (val.includes('em')) {
2613
+ return num * 16; // Approximate: 1em = 16px
2614
+ }
2615
+
2616
+ return num;
2617
+ };
2618
+ var gapPx = parseGap(gap);
2619
+ var _styles2 = {};
2620
+
2621
+ // Normalize placement synonyms (above/below/before/after) to CSS values
2622
+ var placement = normalizePlacement(position.placement);
2623
+ switch (placement) {
2624
+ case 'top':
2625
+ // Toast above element: bottom of toast = top of element - gap
2626
+ // bottom = viewport height - (element top - gap) = viewport height - element top + gap
2627
+ _styles2.bottom = "".concat(window.innerHeight - _rect.top + gapPx, "px");
2628
+ _styles2.left = "".concat(_rect.left, "px");
2629
+ break;
2630
+ case 'bottom':
2631
+ // Toast below element: top of toast = bottom of element + gap
2632
+ _styles2.top = "".concat(_rect.bottom + gapPx, "px");
2633
+ _styles2.left = "".concat(_rect.left, "px");
2634
+ break;
2635
+ case 'left':
2636
+ // Toast to the left: right of toast = left of element - gap
2637
+ _styles2.right = "".concat(window.innerWidth - _rect.left + gapPx, "px");
2638
+ _styles2.top = "".concat(_rect.top, "px");
2639
+ break;
2640
+ case 'right':
2641
+ // Toast to the right: left of toast = right of element + gap
2642
+ _styles2.left = "".concat(_rect.right + gapPx, "px");
2643
+ _styles2.top = "".concat(_rect.top, "px");
2644
+ break;
2645
+ }
2646
+ return _styles2;
2647
+ }
2648
+ }
2649
+ return {};
2650
+ }
2651
+ }]);
2652
+ return ToastManager;
2653
+ }();
2654
+ /**
2655
+ * @param {Partial<ToastConfig>=} config
2656
+ * @returns {ToastManager}
2657
+ */
2658
+ function createToastManager(config) {
2659
+ return new ToastManager(config);
2660
+ }
2661
+
2662
+ // High-level APX.toast API (default & named managers)
2663
+ var _defaultManager = null;
2664
+ var _getDefault = function _getDefault() {
2665
+ if (!_defaultManager) _defaultManager = createToastManager();
2666
+ return _defaultManager;
2667
+ };
2668
+
2669
+ /**
2670
+ * Toast API surface to be attached as APX.toast.
2671
+ * Callable form proxies to defaultManager.show(opts): APX.toast({...})
2672
+ */
2673
+ function toast(opts) {
2674
+ return _getDefault().show(opts);
2675
+ }
2676
+ Object.assign(toast, {
2677
+ /**
2678
+ * Create a manager. If first arg is string, register as named under toast.custom[name]
2679
+ * @param {string|Partial<ToastConfig>} nameOrConfig
2680
+ * @param {Partial<ToastConfig>=} maybeConfig
2681
+ * @returns {ToastManager}
2682
+ */
2683
+ create: function create(nameOrConfig, maybeConfig) {
2684
+ if (typeof nameOrConfig === 'string') {
2685
+ var name = nameOrConfig;
2686
+ var manager = new ToastManager(_objectSpread({}, maybeConfig || {}));
2687
+ if (!toast.custom) toast.custom = {};
2688
+ toast.custom[name] = manager;
2689
+ return manager;
2690
+ }
2691
+ return new ToastManager(_objectSpread({}, nameOrConfig || {}));
2692
+ },
2693
+ /** @type {Record<string, ToastManager>} */
2694
+ custom: {},
2695
+ /** @param {string} name */
2696
+ use: function use(name) {
2697
+ return toast.custom && toast.custom[name] || null;
2698
+ },
2699
+ Manager: ToastManager,
2700
+ show: function show(opts) {
2701
+ return _getDefault().show(opts);
2702
+ },
2703
+ info: function info(message, opts) {
2704
+ return _getDefault().info(message, opts);
2705
+ },
2706
+ success: function success(message, opts) {
2707
+ return _getDefault().success(message, opts);
2708
+ },
2709
+ warning: function warning(message, opts) {
2710
+ return _getDefault().warning(message, opts);
2711
+ },
2712
+ danger: function danger(message, opts) {
2713
+ return _getDefault().danger(message, opts);
2714
+ },
2715
+ configure: function configure(config) {
2716
+ return _getDefault().configure(config);
2717
+ },
2718
+ setAriaLive: function setAriaLive(mode) {
2719
+ return _getDefault().setAriaLive(mode);
2720
+ },
2721
+ closeAll: function closeAll(reason) {
2722
+ return _getDefault().closeAll(reason);
2723
+ },
2724
+ getOpenToasts: function getOpenToasts() {
2725
+ return _getDefault().getOpenToasts();
2726
+ }
2727
+ });
2728
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (toast);
2729
+
2730
+
2731
+ /***/ }),
2732
+
2733
+ /***/ "./modules/tristate/tristate.mjs":
2734
+ /*!***************************************!*\
2735
+ !*** ./modules/tristate/tristate.mjs ***!
2736
+ \***************************************/
2737
+ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
2738
+
2739
+ "use strict";
2740
+ __webpack_require__.r(__webpack_exports__);
2741
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2742
+ /* harmony export */ "default": () => (/* export default binding */ __WEBPACK_DEFAULT_EXPORT__)
2743
+ /* harmony export */ });
2744
+ /* harmony import */ var _css_tristate_css__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./css/tristate.css */ "./modules/tristate/css/tristate.css");
2745
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
2746
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2747
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
2748
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
2749
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2750
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
2751
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
2752
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
2753
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
2754
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
2755
+
2756
+
2757
+ /**
2758
+ * Creates a tri-state checkbox for each checkbox element in the apx.elements array.
2759
+ * @param {Array<HTMLElement>} apx - An array of HTMLElements which is returned by APX()
2760
+ * @example
2761
+ * // Call the tristate function on an array of checkbox elements
2762
+ * apx.tristate();
2763
+ */
2764
+ /* harmony default export */ function __WEBPACK_DEFAULT_EXPORT__(apx) {
2765
+ apx.tristate = function () {
2766
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2767
+ apx.elements.forEach(function (element) {
2768
+ if (element.type === 'checkbox') {
2769
+ var _createTriStateCheckb = createTriStateCheckbox(element, options),
2770
+ _createTriStateCheckb2 = _slicedToArray(_createTriStateCheckb, 3),
2771
+ originalCheckbox = _createTriStateCheckb2[0],
2772
+ tristateDom = _createTriStateCheckb2[1],
2773
+ hiddenInput = _createTriStateCheckb2[2];
2774
+ //If there is a "options.callbacks.after" callback in options call it
2775
+ if (options.callbacks && options.callbacks.after && typeof options.callbacks.after === 'function') {
2776
+ options.callbacks.after(originalCheckbox, tristateDom, hiddenInput);
2777
+ }
2778
+ }
2779
+ });
2780
+ };
2781
+ }
2782
+ function toggleTriStateCheckboxState(customCheckbox, actualCheckbox, hiddenInput) {
2783
+ if (customCheckbox.classList.contains('checked')) {
2784
+ customCheckbox.classList.remove('checked');
2785
+ customCheckbox.classList.add('crossed');
2786
+ actualCheckbox.checked = false;
2787
+ hiddenInput.value = 'false';
2788
+ } else if (customCheckbox.classList.contains('crossed')) {
2789
+ customCheckbox.classList.remove('crossed');
2790
+ customCheckbox.classList.add('unchecked');
2791
+ hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
2792
+ hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
2793
+ } else {
2794
+ customCheckbox.classList.remove('unchecked');
2795
+ customCheckbox.classList.add('checked');
2796
+ actualCheckbox.checked = true;
2797
+ hiddenInput.value = 'true';
2798
+ hiddenInput.setAttribute('name', actualCheckbox.dataset.name); // Restore the name for posting
2799
+ }
2800
+ }
2801
+
2802
+ function createTriStateCheckbox(checkboxElement, options) {
2803
+ var _tristateDom$classLis;
2804
+ //get the checkbox margins including browser default
2805
+ var checkboxStyle = window.getComputedStyle(checkboxElement);
2806
+ // Hide the original checkbox
2807
+ checkboxElement.style.display = 'none';
2808
+
2809
+ // Create the custom checkbox div and set its initial state
2810
+ var tristateDom = document.createElement('div');
2811
+ tristateDom.classList.add('apx-tristate');
2812
+ if (options.size) {
2813
+ if (options.size.width) {
2814
+ tristateDom.style.width = options.size.width + 'px';
2815
+ }
2816
+ if (options.size.height) {
2817
+ tristateDom.style.height = options.size.height + 'px';
2818
+ }
2819
+ }
2820
+ if (options.classes) (_tristateDom$classLis = tristateDom.classList).add.apply(_tristateDom$classLis, _toConsumableArray(computeClasses(options.classes)));
2821
+ tristateDom.style.margin = checkboxStyle.margin;
2822
+ if (checkboxElement.checked) {
2823
+ tristateDom.classList.add('checked');
2824
+ } else {
2825
+ tristateDom.classList.add('unchecked');
2826
+ }
2827
+
2828
+ // Create the hidden input field
2829
+ var hiddenInput = document.createElement('input');
2830
+ hiddenInput.type = 'hidden';
2831
+ hiddenInput.name = checkboxElement.name; // Copy the name from the original checkbox
2832
+ checkboxElement.dataset.name = checkboxElement.name; // Store the name in a data attribute for later use
2833
+ checkboxElement.removeAttribute('name'); // Remove the name from the original checkbox to avoid double posting
2834
+
2835
+ if (options.defaultState) setDefaultState(options, tristateDom, hiddenInput);else {
2836
+ // Set the initial value for the hidden input based on the checkbox's state
2837
+ if (checkboxElement.checked) {
2838
+ hiddenInput.value = 'true';
2839
+ } else {
2840
+ hiddenInput.name = ''; // Ensure the hidden input doesn't post any value
2841
+ hiddenInput.value = '';
2842
+ }
2843
+ }
2844
+
2845
+ //handle accessibility, set the tabindex to the same as the checkbox
2846
+ tristateDom.tabIndex = checkboxElement.tabIndex;
2847
+
2848
+ // Insert the hidden input inside the custom checkbox div
2849
+ tristateDom.appendChild(hiddenInput);
2850
+
2851
+ // Insert it next to the actual checkbox
2852
+ checkboxElement.parentNode.insertBefore(tristateDom, checkboxElement.nextSibling);
2853
+
2854
+ // Add event listener
2855
+ tristateDom.addEventListener('click', function (e) {
2856
+ toggleTriStateCheckboxState(tristateDom, checkboxElement, hiddenInput);
2857
+ bubbleEventsToOriginalCheckbox(options, checkboxElement, tristateDom, hiddenInput, e);
2858
+ });
2859
+ tristateDom.addEventListener('keyup', onkeyup.bind(null, checkboxElement));
2860
+ return [checkboxElement, tristateDom, hiddenInput];
2861
+ }
2862
+ function setDefaultState(options, tristateDom, hiddenInput) {
2863
+ //for all values possible for defaultState, set the initial state of the checkbox
2864
+ if (options.defaultState === 'checked') {
2865
+ tristateDom.classList.remove('unchecked');
2866
+ tristateDom.classList.add('checked');
2867
+ hiddenInput.value = 'true';
2868
+ } else if (options.defaultState === 'unchecked') {
2869
+ tristateDom.classList.remove('checked');
2870
+ tristateDom.classList.add('unchecked');
2871
+ hiddenInput.removeAttribute('name'); // Ensure the hidden input doesn't post any value
2872
+ hiddenInput.removeAttribute('value'); // Ensure the hidden input doesn't post any value
2873
+ } else if (options.defaultState === 'crossed') {
2874
+ tristateDom.classList.remove('checked');
2875
+ tristateDom.classList.add('crossed');
2876
+ hiddenInput.value = 'false';
2877
+ }
2878
+ }
2879
+ function computeClasses(classes) {
2880
+ var computedClasses = [];
2881
+ if (typeof classes === 'string') {
2882
+ //replace multiple white spaces with a single space
2883
+ classes = classes.replace(/\s\s+/g, ' ');
2884
+ if (classes.indexOf(' ') > -1) computedClasses = classes.split(' ');else if (classes.indexOf(',') > -1) computedClasses = classes.split(',');else computedClasses = [classes];
2885
+ } else if (Array.isArray(classes)) {
2886
+ computedClasses = classes;
2887
+ }
2888
+ return computedClasses;
2889
+ }
2890
+ function bubbleEventsToOriginalCheckbox(options, checkboxElement, tristateDom, hiddenInput, event) {
2891
+ //if options.callbacks.change is set, call it
2892
+ if (options.callbacks && options.callbacks.change && typeof options.callbacks.change === 'function') {
2893
+ options.callbacks.change(checkboxElement, tristateDom, hiddenInput);
2894
+ }
2895
+ if (!options.bubbleEvents) return;
2896
+ if (event.type === 'click') {
2897
+ checkboxElement.dispatchEvent(new MouseEvent('click', {
2898
+ bubbles: true,
2899
+ cancelable: true
2900
+ }));
2901
+ } else if (event.type === 'keyup') {
2902
+ checkboxElement.dispatchEvent(new KeyboardEvent('keyup', {
2903
+ key: ' ',
2904
+ bubbles: true,
2905
+ cancelable: true
2906
+ }));
2907
+ } else if (event.type === 'change') {
2908
+ checkboxElement.dispatchEvent(new Event('change', {
2909
+ bubbles: true,
2910
+ cancelable: true
2911
+ }));
2912
+ }
2913
+ }
2914
+ function onkeyup(checkboxElement, event) {
2915
+ if (event.keyCode === 32) {
2916
+ bubbleEventsToOriginalCheckbox(checkboxElement, event);
2917
+ event.preventDefault();
2918
+ event.target.click();
2919
+ }
2920
+ }
2921
+
2922
+ /***/ })
2923
+
2924
+ /******/ });
2925
+ /************************************************************************/
2926
+ /******/ // The module cache
2927
+ /******/ var __webpack_module_cache__ = {};
2928
+ /******/
2929
+ /******/ // The require function
2930
+ /******/ function __webpack_require__(moduleId) {
2931
+ /******/ // Check if module is in cache
2932
+ /******/ var cachedModule = __webpack_module_cache__[moduleId];
2933
+ /******/ if (cachedModule !== undefined) {
2934
+ /******/ return cachedModule.exports;
2935
+ /******/ }
2936
+ /******/ // Create a new module (and put it into the cache)
2937
+ /******/ var module = __webpack_module_cache__[moduleId] = {
2938
+ /******/ id: moduleId,
2939
+ /******/ // no module.loaded needed
2940
+ /******/ exports: {}
2941
+ /******/ };
2942
+ /******/
2943
+ /******/ // Execute the module function
2944
+ /******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
2945
+ /******/
2946
+ /******/ // Return the exports of the module
2947
+ /******/ return module.exports;
2948
+ /******/ }
2949
+ /******/
2950
+ /******/ // expose the modules object (__webpack_modules__)
2951
+ /******/ __webpack_require__.m = __webpack_modules__;
2952
+ /******/
2953
+ /************************************************************************/
2954
+ /******/ /* webpack/runtime/compat get default export */
2955
+ /******/ (() => {
2956
+ /******/ // getDefaultExport function for compatibility with non-harmony modules
2957
+ /******/ __webpack_require__.n = (module) => {
2958
+ /******/ var getter = module && module.__esModule ?
2959
+ /******/ () => (module['default']) :
2960
+ /******/ () => (module);
2961
+ /******/ __webpack_require__.d(getter, { a: getter });
2962
+ /******/ return getter;
2963
+ /******/ };
2964
+ /******/ })();
2965
+ /******/
2966
+ /******/ /* webpack/runtime/define property getters */
2967
+ /******/ (() => {
2968
+ /******/ // define getter functions for harmony exports
2969
+ /******/ __webpack_require__.d = (exports, definition) => {
2970
+ /******/ for(var key in definition) {
2971
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
2972
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
2973
+ /******/ }
2974
+ /******/ }
2975
+ /******/ };
2976
+ /******/ })();
2977
+ /******/
2978
+ /******/ /* webpack/runtime/hasOwnProperty shorthand */
2979
+ /******/ (() => {
2980
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
2981
+ /******/ })();
2982
+ /******/
2983
+ /******/ /* webpack/runtime/make namespace object */
2984
+ /******/ (() => {
2985
+ /******/ // define __esModule on exports
2986
+ /******/ __webpack_require__.r = (exports) => {
2987
+ /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
2988
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2989
+ /******/ }
2990
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
2991
+ /******/ };
2992
+ /******/ })();
2993
+ /******/
2994
+ /******/ /* webpack/runtime/jsonp chunk loading */
2995
+ /******/ (() => {
2996
+ /******/ __webpack_require__.b = document.baseURI || self.location.href;
2997
+ /******/
2998
+ /******/ // object to store loaded and loading chunks
2999
+ /******/ // undefined = chunk not loaded, null = chunk preloaded/prefetched
3000
+ /******/ // [resolve, reject, Promise] = chunk loading, 0 = chunk loaded
3001
+ /******/ var installedChunks = {
3002
+ /******/ "main": 0
3003
+ /******/ };
3004
+ /******/
3005
+ /******/ // no chunk on demand loading
3006
+ /******/
3007
+ /******/ // no prefetching
3008
+ /******/
3009
+ /******/ // no preloaded
3010
+ /******/
3011
+ /******/ // no HMR
3012
+ /******/
3013
+ /******/ // no HMR manifest
3014
+ /******/
3015
+ /******/ // no on chunks loaded
3016
+ /******/
3017
+ /******/ // no jsonp function
3018
+ /******/ })();
3019
+ /******/
3020
+ /******/ /* webpack/runtime/nonce */
3021
+ /******/ (() => {
3022
+ /******/ __webpack_require__.nc = undefined;
3023
+ /******/ })();
3024
+ /******/
3025
+ /************************************************************************/
3026
+ var __webpack_exports__ = {};
3027
+ // This entry need to be wrapped in an IIFE because it need to be in strict mode.
3028
+ (() => {
3029
+ "use strict";
3030
+ /*!*****************!*\
3031
+ !*** ./APX.mjs ***!
3032
+ \*****************/
3033
+ __webpack_require__.r(__webpack_exports__);
3034
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
3035
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
3036
+ /* harmony export */ });
3037
+ /* harmony import */ var _modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./modules/listen/listen.mjs */ "./modules/listen/listen.mjs");
3038
+ /* harmony import */ var _modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./modules/tristate/tristate.mjs */ "./modules/tristate/tristate.mjs");
3039
+ /* harmony import */ var _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./modules/dialog/dialog.mjs */ "./modules/dialog/dialog.mjs");
3040
+ /* harmony import */ var _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./modules/toast/toast.mjs */ "./modules/toast/toast.mjs");
3041
+ /* harmony import */ var _modules_common_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./modules/common.mjs */ "./modules/common.mjs");
3042
+
3043
+
3044
+
3045
+
3046
+
3047
+
3048
+ /**
3049
+ * Creates an APX object that wraps one or more HTML elements.
3050
+ * @param {string|HTMLElement|NodeList|HTMLCollection|Array<HTMLElement>|jQuery|Function} input - The input to create the APX object from.
3051
+ * @returns {Object} The APX object.
3052
+ * @throws {Error} If the input type is invalid.
3053
+ * @example
3054
+ * // XPath
3055
+ * const apx1 = APX('//div[@class="example"]');
3056
+ *
3057
+ * // CSS selector
3058
+ * const apx2 = APX('.example');
3059
+ *
3060
+ * // Single element
3061
+ * const element = document.querySelector('.example');
3062
+ * const apx3 = APX(element);
3063
+ *
3064
+ * // NodeList or HTMLCollection
3065
+ * const nodeList = document.querySelectorAll('.example');
3066
+ * const apx4 = APX(nodeList);
3067
+ *
3068
+ * // Array of elements
3069
+ * const elements = [document.querySelector('.example1'), document.querySelector('.example2')];
3070
+ * const apx5 = APX(elements);
3071
+ *
3072
+ * // jQuery object
3073
+ * const $example = $('.example');
3074
+ * const apx6 = APX($example);
3075
+ *
3076
+ * // Function returning an APX object
3077
+ * const apx7 = APX(() => APX('.example'));
3078
+ */
3079
+ var APX = function APX(input) {
3080
+ var context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : document;
3081
+ var elements;
3082
+
3083
+ // Validate context
3084
+ if (typeof context === 'string') {
3085
+ context = document.querySelector(context);
3086
+ } else if (APX.isAPXObject(context)) {
3087
+ context = context.first();
3088
+ } else if (!(context instanceof HTMLElement || context instanceof Document)) {
3089
+ throw new Error('Invalid context for APX');
3090
+ }
3091
+ if (typeof input === 'string' && input.startsWith('//')) {
3092
+ // XPath with context
3093
+ elements = document.evaluate(input, context, null, XPathResult.ANY_TYPE, null);
3094
+ var nodes = [];
3095
+ var node = elements.iterateNext();
3096
+ while (node) {
3097
+ nodes.push(node);
3098
+ node = elements.iterateNext();
3099
+ }
3100
+ elements = nodes;
3101
+ } else if (typeof input === 'string') {
3102
+ // CSS selector with context
3103
+ elements = context.querySelectorAll(input);
3104
+ } else if (input instanceof HTMLElement) {
3105
+ // Single element within context
3106
+ elements = context.contains(input) ? [input] : [];
3107
+ } else if (input instanceof NodeList || input instanceof HTMLCollection) {
3108
+ // NodeList or HTMLCollection within context
3109
+ elements = Array.from(input).filter(function (el) {
3110
+ return context.contains(el);
3111
+ });
3112
+ } else if (Array.isArray(input) && input.every(function (el) {
3113
+ return el instanceof HTMLElement;
3114
+ })) {
3115
+ // Array of elements within context
3116
+ elements = input.filter(function (el) {
3117
+ return context.contains(el);
3118
+ });
3119
+ } else if (typeof jQuery != 'undefined' && input instanceof jQuery) {
3120
+ // jQuery object within context
3121
+ elements = Array.from(input.get()).filter(function (el) {
3122
+ return context.contains(el);
3123
+ });
3124
+ } else if (typeof input === 'function') {
3125
+ // Function returning an APX object with context
3126
+ elements = APX(input(), context);
3127
+ } else {
3128
+ throw new Error('Invalid input type for APX');
3129
+ }
3130
+ var apx = {
3131
+ elements: elements,
3132
+ _isAPXObject: true
3133
+ };
3134
+ apx.length = elements.length;
3135
+ apx.each = function (callback) {
3136
+ if (this.elements instanceof Array) this.elements.forEach(callback);
3137
+ if (this.elements instanceof NodeList) Array.from(this.elements).forEach(callback);
3138
+ return this;
3139
+ };
3140
+ apx.get = function (index) {
3141
+ return this.elements[index];
3142
+ };
3143
+ apx.all = function () {
3144
+ if (this.elements instanceof Array) return this.elements;
3145
+ if (this.elements instanceof NodeList) return Array.from(this.elements);
3146
+ return this;
3147
+ };
3148
+ apx.first = function () {
3149
+ return this.get(0);
3150
+ };
3151
+ (0,_modules_listen_listen_mjs__WEBPACK_IMPORTED_MODULE_0__["default"])(apx);
3152
+ (0,_modules_tristate_tristate_mjs__WEBPACK_IMPORTED_MODULE_1__["default"])(apx);
3153
+ return apx;
3154
+ };
3155
+ APX.loadCss = _modules_common_mjs__WEBPACK_IMPORTED_MODULE_4__.loadCss;
3156
+ APX.dialog = _modules_dialog_dialog_mjs__WEBPACK_IMPORTED_MODULE_2__["default"];
3157
+ APX.toast = _modules_toast_toast_mjs__WEBPACK_IMPORTED_MODULE_3__["default"];
3158
+ APX.isAPXObject = function (obj) {
3159
+ return obj && obj._isAPXObject === true;
3160
+ };
3161
+ APX.is_numeric = function (n) {
3162
+ return !isNaN(n - parseFloat(n));
3163
+ };
3164
+ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (APX);
3165
+ })();
3166
+
3167
+ window.APX = __webpack_exports__["default"];
3168
+ /******/ })()
3169
+ ;
3170
+ //# sourceMappingURL=APX.standalone.js.map