@react-motion-router/stack 2.0.0-beta.sha-e8b3d37 → 2.0.0-beta.sha-0b3918a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Anchor.d.ts +3 -3
- package/build/Navigation.d.ts +2 -2
- package/build/Router.d.ts +2 -3
- package/build/Screen.d.ts +17 -18
- package/build/animation-configs/animation-presets.d.ts +1 -1
- package/build/common/events.d.ts +2 -2
- package/build/common/hooks.d.ts +5 -5
- package/build/common/types.d.ts +4 -4
- package/build/index.d.ts +0 -1
- package/build/index.js +1631 -2436
- package/build/index.js.map +1 -1
- package/package.json +8 -5
package/build/index.js
CHANGED
|
@@ -1,2489 +1,1684 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (true) {
|
|
31
|
-
module.exports = __webpack_require__(837);
|
|
32
|
-
} else {}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
/***/ }),
|
|
36
|
-
|
|
37
|
-
/***/ 319:
|
|
38
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
42
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
43
|
-
};
|
|
44
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
45
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
46
|
-
class DoubleTapEvent extends GestureEvent_1.default {
|
|
47
|
-
constructor(touchEvent) {
|
|
48
|
-
super('doubletap', touchEvent);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports["default"] = DoubleTapEvent;
|
|
52
|
-
//# sourceMappingURL=DoubleTapEvent.js.map
|
|
53
|
-
|
|
54
|
-
/***/ }),
|
|
55
|
-
|
|
56
|
-
/***/ 292:
|
|
57
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
61
|
-
var GestureEventTypeEnum;
|
|
62
|
-
(function (GestureEventTypeEnum) {
|
|
63
|
-
GestureEventTypeEnum[GestureEventTypeEnum["tap"] = 0] = "tap";
|
|
64
|
-
GestureEventTypeEnum[GestureEventTypeEnum["longpress"] = 1] = "longpress";
|
|
65
|
-
GestureEventTypeEnum[GestureEventTypeEnum["pinchstart"] = 2] = "pinchstart";
|
|
66
|
-
GestureEventTypeEnum[GestureEventTypeEnum["pinch"] = 3] = "pinch";
|
|
67
|
-
GestureEventTypeEnum[GestureEventTypeEnum["pinchend"] = 4] = "pinchend";
|
|
68
|
-
GestureEventTypeEnum[GestureEventTypeEnum["rotatestart"] = 5] = "rotatestart";
|
|
69
|
-
GestureEventTypeEnum[GestureEventTypeEnum["rotate"] = 6] = "rotate";
|
|
70
|
-
GestureEventTypeEnum[GestureEventTypeEnum["rotateend"] = 7] = "rotateend";
|
|
71
|
-
GestureEventTypeEnum[GestureEventTypeEnum["swipestart"] = 8] = "swipestart";
|
|
72
|
-
GestureEventTypeEnum[GestureEventTypeEnum["swipe"] = 9] = "swipe";
|
|
73
|
-
GestureEventTypeEnum[GestureEventTypeEnum["swipeend"] = 10] = "swipeend";
|
|
74
|
-
GestureEventTypeEnum[GestureEventTypeEnum["panstart"] = 11] = "panstart";
|
|
75
|
-
GestureEventTypeEnum[GestureEventTypeEnum["pan"] = 12] = "pan";
|
|
76
|
-
GestureEventTypeEnum[GestureEventTypeEnum["panend"] = 13] = "panend";
|
|
77
|
-
GestureEventTypeEnum[GestureEventTypeEnum["doubletap"] = 14] = "doubletap";
|
|
78
|
-
})(GestureEventTypeEnum || (GestureEventTypeEnum = {}));
|
|
79
|
-
class GestureEvent extends TouchEvent {
|
|
80
|
-
constructor(type, touchEvent) {
|
|
81
|
-
super(type, {
|
|
82
|
-
touches: Array.from(touchEvent.touches),
|
|
83
|
-
targetTouches: Array.from(touchEvent.targetTouches),
|
|
84
|
-
changedTouches: Array.from(touchEvent.changedTouches),
|
|
85
|
-
ctrlKey: touchEvent.ctrlKey,
|
|
86
|
-
shiftKey: touchEvent.shiftKey,
|
|
87
|
-
altKey: touchEvent.altKey,
|
|
88
|
-
metaKey: touchEvent.metaKey,
|
|
89
|
-
bubbles: true,
|
|
90
|
-
cancelable: true
|
|
91
|
-
});
|
|
92
|
-
if (type.includes("end") || touchEvent.type.includes("end")) {
|
|
93
|
-
this.gestureTarget = touchEvent.changedTouches[0].target;
|
|
94
|
-
this.x = touchEvent.changedTouches[0].clientX;
|
|
95
|
-
this.y = touchEvent.changedTouches[0].clientY;
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
this.gestureTarget = touchEvent.touches[0].target;
|
|
99
|
-
this.x = touchEvent.touches[0].clientX;
|
|
100
|
-
this.y = touchEvent.touches[0].clientY;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
exports["default"] = GestureEvent;
|
|
104
|
-
//# sourceMappingURL=GestureEvent.js.map
|
|
105
|
-
|
|
106
|
-
/***/ }),
|
|
107
|
-
|
|
108
|
-
/***/ 747:
|
|
109
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
113
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
114
|
-
};
|
|
115
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
116
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
117
|
-
class LongPressEvent extends GestureEvent_1.default {
|
|
118
|
-
constructor(touchEvent, duration) {
|
|
119
|
-
super('longpress', touchEvent);
|
|
120
|
-
this.duration = 0;
|
|
121
|
-
this.duration = duration;
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
exports["default"] = LongPressEvent;
|
|
125
|
-
//# sourceMappingURL=LongPressEvent.js.map
|
|
126
|
-
|
|
127
|
-
/***/ }),
|
|
128
|
-
|
|
129
|
-
/***/ 985:
|
|
130
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
134
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
135
|
-
};
|
|
136
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
137
|
-
exports.PanEndEvent = exports.PanStartEvent = void 0;
|
|
138
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
139
|
-
var PanLifecycleStateEnum;
|
|
140
|
-
(function (PanLifecycleStateEnum) {
|
|
141
|
-
PanLifecycleStateEnum[PanLifecycleStateEnum["start"] = 0] = "start";
|
|
142
|
-
PanLifecycleStateEnum[PanLifecycleStateEnum["end"] = 1] = "end";
|
|
143
|
-
})(PanLifecycleStateEnum || (PanLifecycleStateEnum = {}));
|
|
144
|
-
class PanEventBase extends GestureEvent_1.default {
|
|
145
|
-
constructor(touchEvent, panData, state) {
|
|
146
|
-
let eventType;
|
|
147
|
-
switch (state) {
|
|
148
|
-
case "start":
|
|
149
|
-
eventType = "panstart";
|
|
150
|
-
break;
|
|
151
|
-
case "end":
|
|
152
|
-
eventType = "panend";
|
|
153
|
-
break;
|
|
154
|
-
default:
|
|
155
|
-
eventType = "pan";
|
|
156
|
-
}
|
|
157
|
-
super(eventType, touchEvent);
|
|
158
|
-
this.velocity = panData.velocity;
|
|
159
|
-
this.translation = {
|
|
160
|
-
x: panData.translation.x,
|
|
161
|
-
y: panData.translation.y,
|
|
162
|
-
magnitude: panData.translation.magnitude,
|
|
163
|
-
clientX: panData.translation.clientX,
|
|
164
|
-
clientY: panData.translation.clientY,
|
|
165
|
-
clientMagnitude: panData.translation.clientMagnitude
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
class PanEvent extends PanEventBase {
|
|
170
|
-
constructor(touchEvent, panData) {
|
|
171
|
-
super(touchEvent, panData);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
exports["default"] = PanEvent;
|
|
175
|
-
class PanStartEvent extends PanEventBase {
|
|
176
|
-
constructor(touchEvent, panData) {
|
|
177
|
-
super(touchEvent, panData, "start");
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
exports.PanStartEvent = PanStartEvent;
|
|
181
|
-
class PanEndEvent extends PanEventBase {
|
|
182
|
-
constructor(touchEvent, panData) {
|
|
183
|
-
super(touchEvent, panData, "end");
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
exports.PanEndEvent = PanEndEvent;
|
|
187
|
-
//# sourceMappingURL=PanEvent.js.map
|
|
188
|
-
|
|
189
|
-
/***/ }),
|
|
190
|
-
|
|
191
|
-
/***/ 731:
|
|
192
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
196
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
197
|
-
};
|
|
198
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
199
|
-
exports.PinchEndEvent = exports.PinchStartEvent = void 0;
|
|
200
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
201
|
-
var PinchLifecycleStateEnum;
|
|
202
|
-
(function (PinchLifecycleStateEnum) {
|
|
203
|
-
PinchLifecycleStateEnum[PinchLifecycleStateEnum["start"] = 0] = "start";
|
|
204
|
-
PinchLifecycleStateEnum[PinchLifecycleStateEnum["end"] = 1] = "end";
|
|
205
|
-
})(PinchLifecycleStateEnum || (PinchLifecycleStateEnum = {}));
|
|
206
|
-
class PinchEventBase extends GestureEvent_1.default {
|
|
207
|
-
constructor(touchEvent, pinchData, state) {
|
|
208
|
-
let eventType;
|
|
209
|
-
switch (state) {
|
|
210
|
-
case "start":
|
|
211
|
-
eventType = "pinchstart";
|
|
212
|
-
break;
|
|
213
|
-
case "end":
|
|
214
|
-
eventType = "pinchend";
|
|
215
|
-
break;
|
|
216
|
-
default:
|
|
217
|
-
eventType = "pinch";
|
|
218
|
-
}
|
|
219
|
-
super(eventType, touchEvent);
|
|
220
|
-
Object.defineProperty(this, 'scale', {
|
|
221
|
-
value: pinchData.scale,
|
|
222
|
-
writable: false
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
class PinchEvent extends PinchEventBase {
|
|
227
|
-
constructor(touchEvent, pinchData) {
|
|
228
|
-
super(touchEvent, pinchData);
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
exports["default"] = PinchEvent;
|
|
232
|
-
class PinchStartEvent extends PinchEventBase {
|
|
233
|
-
constructor(touchEvent, pinchData) {
|
|
234
|
-
super(touchEvent, pinchData, "start");
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
exports.PinchStartEvent = PinchStartEvent;
|
|
238
|
-
class PinchEndEvent extends PinchEventBase {
|
|
239
|
-
constructor(touchEvent, pinchData) {
|
|
240
|
-
super(touchEvent, pinchData, "end");
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
exports.PinchEndEvent = PinchEndEvent;
|
|
244
|
-
//# sourceMappingURL=PinchEvent.js.map
|
|
245
|
-
|
|
246
|
-
/***/ }),
|
|
247
|
-
|
|
248
|
-
/***/ 473:
|
|
249
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
253
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
254
|
-
};
|
|
255
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
256
|
-
exports.RotateEndEvent = exports.RotateStartEvent = void 0;
|
|
257
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
258
|
-
var RotateLifecycleStateEnum;
|
|
259
|
-
(function (RotateLifecycleStateEnum) {
|
|
260
|
-
RotateLifecycleStateEnum[RotateLifecycleStateEnum["start"] = 0] = "start";
|
|
261
|
-
RotateLifecycleStateEnum[RotateLifecycleStateEnum["end"] = 1] = "end";
|
|
262
|
-
})(RotateLifecycleStateEnum || (RotateLifecycleStateEnum = {}));
|
|
263
|
-
class RotateEventBase extends GestureEvent_1.default {
|
|
264
|
-
constructor(touchEvent, rotationData, state) {
|
|
265
|
-
let eventType;
|
|
266
|
-
switch (state) {
|
|
267
|
-
case "start":
|
|
268
|
-
eventType = "rotatestart";
|
|
269
|
-
break;
|
|
270
|
-
case "end":
|
|
271
|
-
eventType = "rotateend";
|
|
272
|
-
break;
|
|
273
|
-
default:
|
|
274
|
-
eventType = "rotate";
|
|
275
|
-
}
|
|
276
|
-
super(eventType, touchEvent);
|
|
277
|
-
this.anchor = {
|
|
278
|
-
x: rotationData.anchor.x,
|
|
279
|
-
y: rotationData.anchor.y,
|
|
280
|
-
clientX: rotationData.anchor.clientX,
|
|
281
|
-
clientY: rotationData.anchor.clientY
|
|
282
|
-
};
|
|
283
|
-
Object.defineProperty(this, 'rotation', {
|
|
284
|
-
value: rotationData.rotation,
|
|
285
|
-
writable: false
|
|
286
|
-
});
|
|
287
|
-
this.rotationDeg = rotationData.rotationDeg;
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
class RotateEvent extends RotateEventBase {
|
|
291
|
-
constructor(touchEvent, rotationData) {
|
|
292
|
-
super(touchEvent, rotationData);
|
|
293
|
-
}
|
|
294
|
-
}
|
|
295
|
-
exports["default"] = RotateEvent;
|
|
296
|
-
class RotateStartEvent extends RotateEventBase {
|
|
297
|
-
constructor(touchEvent, rotationData) {
|
|
298
|
-
super(touchEvent, rotationData, "start");
|
|
299
|
-
}
|
|
300
|
-
}
|
|
301
|
-
exports.RotateStartEvent = RotateStartEvent;
|
|
302
|
-
class RotateEndEvent extends RotateEventBase {
|
|
303
|
-
constructor(touchEvent, rotationData) {
|
|
304
|
-
super(touchEvent, rotationData, "end");
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
exports.RotateEndEvent = RotateEndEvent;
|
|
308
|
-
//# sourceMappingURL=RotateEvent.js.map
|
|
309
|
-
|
|
310
|
-
/***/ }),
|
|
311
|
-
|
|
312
|
-
/***/ 376:
|
|
313
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
317
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
318
|
-
};
|
|
319
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
320
|
-
exports.SwipeEndEvent = exports.SwipeStartEvent = void 0;
|
|
321
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
322
|
-
var SwipeLifecycleStateEnum;
|
|
323
|
-
(function (SwipeLifecycleStateEnum) {
|
|
324
|
-
SwipeLifecycleStateEnum[SwipeLifecycleStateEnum["start"] = 0] = "start";
|
|
325
|
-
SwipeLifecycleStateEnum[SwipeLifecycleStateEnum["end"] = 1] = "end";
|
|
326
|
-
})(SwipeLifecycleStateEnum || (SwipeLifecycleStateEnum = {}));
|
|
327
|
-
class SwipeEventBase extends GestureEvent_1.default {
|
|
328
|
-
constructor(touchEvent, swipeData, state) {
|
|
329
|
-
let eventType;
|
|
330
|
-
switch (state) {
|
|
331
|
-
case "start":
|
|
332
|
-
eventType = "swipestart";
|
|
333
|
-
break;
|
|
334
|
-
case "end":
|
|
335
|
-
eventType = "swipeend";
|
|
336
|
-
break;
|
|
337
|
-
default:
|
|
338
|
-
eventType = "swipe";
|
|
339
|
-
}
|
|
340
|
-
super(eventType, touchEvent);
|
|
341
|
-
this.velocity = swipeData.velocity;
|
|
342
|
-
this.direction = swipeData.direction;
|
|
343
|
-
}
|
|
344
|
-
}
|
|
345
|
-
class SwipeEvent extends SwipeEventBase {
|
|
346
|
-
constructor(touchEvent, swipeData) {
|
|
347
|
-
super(touchEvent, swipeData);
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
exports["default"] = SwipeEvent;
|
|
351
|
-
class SwipeStartEvent extends SwipeEventBase {
|
|
352
|
-
constructor(touchEvent, swipeData) {
|
|
353
|
-
super(touchEvent, swipeData, "start");
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
exports.SwipeStartEvent = SwipeStartEvent;
|
|
357
|
-
class SwipeEndEvent extends SwipeEventBase {
|
|
358
|
-
constructor(touchEvent, swipeData) {
|
|
359
|
-
super(touchEvent, swipeData, "end");
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
exports.SwipeEndEvent = SwipeEndEvent;
|
|
363
|
-
//# sourceMappingURL=SwipeEvent.js.map
|
|
364
|
-
|
|
365
|
-
/***/ }),
|
|
366
|
-
|
|
367
|
-
/***/ 59:
|
|
368
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
372
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
373
|
-
};
|
|
374
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
375
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
376
|
-
class TapEvent extends GestureEvent_1.default {
|
|
377
|
-
constructor(touchEvent) {
|
|
378
|
-
super('tap', touchEvent);
|
|
379
|
-
this.duration = 0;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
exports["default"] = TapEvent;
|
|
383
|
-
//# sourceMappingURL=TapEvent.js.map
|
|
384
|
-
|
|
385
|
-
/***/ }),
|
|
386
|
-
|
|
387
|
-
/***/ 190:
|
|
388
|
-
/***/ (function(__unused_webpack_module, exports, __webpack_require__) {
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
392
|
-
if (k2 === undefined) k2 = k;
|
|
393
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
394
|
-
}) : (function(o, m, k, k2) {
|
|
395
|
-
if (k2 === undefined) k2 = k;
|
|
396
|
-
o[k2] = m[k];
|
|
397
|
-
}));
|
|
398
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
399
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
400
|
-
}) : function(o, v) {
|
|
401
|
-
o["default"] = v;
|
|
402
|
-
});
|
|
403
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
404
|
-
if (mod && mod.__esModule) return mod;
|
|
405
|
-
var result = {};
|
|
406
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
407
|
-
__setModuleDefault(result, mod);
|
|
408
|
-
return result;
|
|
409
|
-
};
|
|
410
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
411
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
412
|
-
};
|
|
413
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
414
|
-
exports.RotateEndEvent = exports.RotateEvent = exports.RotateStartEvent = exports.PinchEndEvent = exports.PinchEvent = exports.PinchStartEvent = exports.PanEndEvent = exports.PanEvent = exports.PanStartEvent = exports.SwipeEndEvent = exports.SwipeEvent = exports.SwipeStartEvent = exports.DoubleTapEvent = exports.LongPressEvent = exports.GestureEvent = exports.TapEvent = void 0;
|
|
415
|
-
const GestureEvent_1 = __importDefault(__webpack_require__(292));
|
|
416
|
-
exports.GestureEvent = GestureEvent_1.default;
|
|
417
|
-
const LongPressEvent_1 = __importDefault(__webpack_require__(747));
|
|
418
|
-
exports.LongPressEvent = LongPressEvent_1.default;
|
|
419
|
-
const TapEvent_1 = __importDefault(__webpack_require__(59));
|
|
420
|
-
exports.TapEvent = TapEvent_1.default;
|
|
421
|
-
const DoubleTapEvent_1 = __importDefault(__webpack_require__(319));
|
|
422
|
-
exports.DoubleTapEvent = DoubleTapEvent_1.default;
|
|
423
|
-
const SwipeEvent_1 = __importStar(__webpack_require__(376));
|
|
424
|
-
exports.SwipeEvent = SwipeEvent_1.default;
|
|
425
|
-
Object.defineProperty(exports, "SwipeEndEvent", ({ enumerable: true, get: function () { return SwipeEvent_1.SwipeEndEvent; } }));
|
|
426
|
-
Object.defineProperty(exports, "SwipeStartEvent", ({ enumerable: true, get: function () { return SwipeEvent_1.SwipeStartEvent; } }));
|
|
427
|
-
const PanEvent_1 = __importStar(__webpack_require__(985));
|
|
428
|
-
exports.PanEvent = PanEvent_1.default;
|
|
429
|
-
Object.defineProperty(exports, "PanEndEvent", ({ enumerable: true, get: function () { return PanEvent_1.PanEndEvent; } }));
|
|
430
|
-
Object.defineProperty(exports, "PanStartEvent", ({ enumerable: true, get: function () { return PanEvent_1.PanStartEvent; } }));
|
|
431
|
-
const PinchEvent_1 = __importStar(__webpack_require__(731));
|
|
432
|
-
exports.PinchEvent = PinchEvent_1.default;
|
|
433
|
-
Object.defineProperty(exports, "PinchEndEvent", ({ enumerable: true, get: function () { return PinchEvent_1.PinchEndEvent; } }));
|
|
434
|
-
Object.defineProperty(exports, "PinchStartEvent", ({ enumerable: true, get: function () { return PinchEvent_1.PinchStartEvent; } }));
|
|
435
|
-
const RotateEvent_1 = __importStar(__webpack_require__(473));
|
|
436
|
-
exports.RotateEvent = RotateEvent_1.default;
|
|
437
|
-
Object.defineProperty(exports, "RotateEndEvent", ({ enumerable: true, get: function () { return RotateEvent_1.RotateEndEvent; } }));
|
|
438
|
-
Object.defineProperty(exports, "RotateStartEvent", ({ enumerable: true, get: function () { return RotateEvent_1.RotateStartEvent; } }));
|
|
439
|
-
const utils_1 = __webpack_require__(46);
|
|
440
|
-
var CartesianDirectionEnum;
|
|
441
|
-
(function (CartesianDirectionEnum) {
|
|
442
|
-
CartesianDirectionEnum[CartesianDirectionEnum["right"] = 0] = "right";
|
|
443
|
-
CartesianDirectionEnum[CartesianDirectionEnum["up"] = 1] = "up";
|
|
444
|
-
CartesianDirectionEnum[CartesianDirectionEnum["left"] = 2] = "left";
|
|
445
|
-
CartesianDirectionEnum[CartesianDirectionEnum["down"] = 3] = "down";
|
|
446
|
-
})(CartesianDirectionEnum || (CartesianDirectionEnum = {}));
|
|
447
|
-
class GestureProvider {
|
|
448
|
-
constructor() {
|
|
449
|
-
this.touchStart = new TouchEvent('touchstart') || {};
|
|
450
|
-
this.touchMove = new TouchEvent('touchmove') || {};
|
|
451
|
-
this.touchEnd = new TouchEvent('touchend') || {};
|
|
452
|
-
this.touchCancel = new TouchEvent('touchcancel') || {};
|
|
453
|
-
this.velocity = 0;
|
|
454
|
-
this.dxDy = new utils_1.Vec2(0, 0);
|
|
455
|
-
this.scale = 1;
|
|
456
|
-
this.rotation = 0;
|
|
457
|
-
this.rotationDeg = 0;
|
|
458
|
-
this.anchor = new utils_1.Vec2(0, 0);
|
|
459
|
-
this.octant = 0;
|
|
460
|
-
this.isPanning = false;
|
|
461
|
-
this.isPinching = false;
|
|
462
|
-
this.isSwiping = false;
|
|
463
|
-
this.isRotating = false;
|
|
464
|
-
this.touchStartTime = 0;
|
|
465
|
-
this.touchEndTime = 0;
|
|
466
|
-
this.lastTouchTime = 0;
|
|
467
|
-
this.taps = 0;
|
|
468
|
-
this.scaleBase = 0;
|
|
469
|
-
this.touchMoved = false;
|
|
470
|
-
this.touchDown = false;
|
|
471
|
-
this.shouldFire = false;
|
|
472
|
-
this.pointers = 0;
|
|
473
|
-
this.isLongPress = false;
|
|
474
|
-
this.longPressTimeout = 0;
|
|
475
|
-
this.touchStartListener = this.onTouchStart.bind(this);
|
|
476
|
-
this.touchMoveListener = this.onTouchMove.bind(this);
|
|
477
|
-
this.touchEndListener = this.onTouchEnd.bind(this);
|
|
478
|
-
this.touchCancelListener = this.onTouchCancel.bind(this);
|
|
479
|
-
this.currentTarget = window;
|
|
480
|
-
this.config = {
|
|
481
|
-
longPressDuration: 500,
|
|
482
|
-
tapDelay: 500,
|
|
483
|
-
minPointers: 1,
|
|
484
|
-
numberOfTaps: 0
|
|
485
|
-
};
|
|
486
|
-
if (!GestureProvider.listening) {
|
|
487
|
-
if (TouchEvent)
|
|
488
|
-
window.addEventListener('touchstart', this.touchStartListener, true);
|
|
489
|
-
GestureProvider.listening = true;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
bind(target) {
|
|
493
|
-
this.unbind(this.currentTarget);
|
|
494
|
-
target.addEventListener('touchmove', this.touchMoveListener, true);
|
|
495
|
-
target.addEventListener('touchend', this.touchEndListener, true);
|
|
496
|
-
target.addEventListener('touchcancel', this.touchCancelListener, true);
|
|
497
|
-
this.currentTarget = target;
|
|
498
|
-
}
|
|
499
|
-
unbind(target) {
|
|
500
|
-
target.removeEventListener('touchmove', this.touchMoveListener);
|
|
501
|
-
target.removeEventListener('touchend', this.touchEndListener);
|
|
502
|
-
target.removeEventListener('touchcancel', this.touchCancelListener);
|
|
503
|
-
}
|
|
504
|
-
clean() {
|
|
505
|
-
this.touchMoved = false;
|
|
506
|
-
this.touchStartTime = 0;
|
|
507
|
-
this.touchDown = false;
|
|
508
|
-
this.scaleBase = 0;
|
|
509
|
-
if (this.longPressTimeout && !this.isLongPress) {
|
|
510
|
-
clearTimeout(this.longPressTimeout);
|
|
511
|
-
this.longPressTimeout = 0;
|
|
512
|
-
}
|
|
513
|
-
this.isLongPress = false;
|
|
514
|
-
}
|
|
515
|
-
onPointerLeave(touchEnd) {
|
|
516
|
-
if (!touchEnd.touches.length) {
|
|
517
|
-
if (this.isSwiping) {
|
|
518
|
-
const swipeEndEvent = new SwipeEvent_1.SwipeEndEvent(touchEnd, {
|
|
519
|
-
velocity: this.velocity,
|
|
520
|
-
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])]
|
|
521
|
-
});
|
|
522
|
-
this.dispatchEvent(swipeEndEvent);
|
|
523
|
-
this.isSwiping = false;
|
|
524
|
-
}
|
|
525
|
-
if (this.isPanning) {
|
|
526
|
-
const panEndEvent = new PanEvent_1.PanEndEvent(touchEnd, {
|
|
527
|
-
translation: this.dxDy,
|
|
528
|
-
velocity: this.velocity
|
|
529
|
-
});
|
|
530
|
-
this.dispatchEvent(panEndEvent);
|
|
531
|
-
this.isPanning = false;
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
if (touchEnd.touches.length === 1) {
|
|
535
|
-
this.scaleBase = 0;
|
|
536
|
-
if (this.isPinching) {
|
|
537
|
-
const pinchEndEvent = new PinchEvent_1.PinchEndEvent(touchEnd, {
|
|
538
|
-
scale: this.scale
|
|
539
|
-
});
|
|
540
|
-
this.dispatchEvent(pinchEndEvent);
|
|
541
|
-
this.isPinching = false;
|
|
542
|
-
}
|
|
543
|
-
if (this.isRotating) {
|
|
544
|
-
const rotateEndEvent = new RotateEvent_1.RotateEndEvent(touchEnd, {
|
|
545
|
-
rotation: this.rotation,
|
|
546
|
-
rotationDeg: this.rotationDeg,
|
|
547
|
-
anchor: this.anchor
|
|
548
|
-
});
|
|
549
|
-
this.dispatchEvent(rotateEndEvent);
|
|
550
|
-
this.isRotating = false;
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
dispatchEvent(gestureEvent) {
|
|
555
|
-
queueMicrotask(() => {
|
|
556
|
-
this.currentTarget.dispatchEvent(gestureEvent);
|
|
557
|
-
});
|
|
558
|
-
}
|
|
559
|
-
onTouchStart(touchStart) {
|
|
560
|
-
if (this.currentTarget !== touchStart.touches[0].target) {
|
|
561
|
-
this.clean();
|
|
562
|
-
this.unbind(this.currentTarget);
|
|
563
|
-
this.pointers = this.touchEnd.touches.length;
|
|
564
|
-
this.taps = 0;
|
|
565
|
-
}
|
|
566
|
-
this.touchStart = touchStart;
|
|
567
|
-
const minPointers = parseInt(touchStart.touches[0].target.dataset.minpointers || '0') || this.config.minPointers;
|
|
568
|
-
if (this.touchStart.touches.length < minPointers) {
|
|
569
|
-
this.shouldFire = false;
|
|
570
|
-
return;
|
|
571
|
-
}
|
|
572
|
-
this.shouldFire = true;
|
|
573
|
-
this.touchStartTime = touchStart.timeStamp;
|
|
574
|
-
this.touchDown = true;
|
|
575
|
-
if (!this.pointers)
|
|
576
|
-
this.bind(touchStart.touches[0].target);
|
|
577
|
-
this.pointers = this.touchStart.touches.length;
|
|
578
|
-
const longPressDuration = parseFloat(this.currentTarget.dataset.longpressduration || '0') || this.config.longPressDuration;
|
|
579
|
-
if (!this.longPressTimeout) {
|
|
580
|
-
this.longPressTimeout = setTimeout(() => {
|
|
581
|
-
if (!this.touchMoved && this.touchDown) {
|
|
582
|
-
const touchDuration = Date.now() - this.touchStartTime;
|
|
583
|
-
const longPressEvent = new LongPressEvent_1.default(this.touchStart, touchDuration);
|
|
584
|
-
this.dispatchEvent(longPressEvent);
|
|
585
|
-
this.isLongPress = true;
|
|
586
|
-
this.longPressTimeout = 0;
|
|
587
|
-
}
|
|
588
|
-
}, longPressDuration);
|
|
589
|
-
}
|
|
590
|
-
if (this.touchStart.touches.length > 1) {
|
|
591
|
-
const originPointerPrimary = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
592
|
-
const originPointerSecondary = new utils_1.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
|
|
593
|
-
this.scaleBase = originPointerPrimary.substract(originPointerSecondary).magnitude;
|
|
594
|
-
}
|
|
595
|
-
else
|
|
596
|
-
this.scaleBase = 0;
|
|
597
|
-
}
|
|
598
|
-
onTouchMove(touchMove) {
|
|
599
|
-
if (!this.shouldFire)
|
|
600
|
-
return;
|
|
601
|
-
this.touchMoved = true;
|
|
602
|
-
this.touchMove = touchMove;
|
|
603
|
-
if (touchMove.touches.length > 1 && this.touchStart.touches.length > 1) {
|
|
604
|
-
if (touchMove.touches[1].clientX !== this.touchStart.touches[1].clientX
|
|
605
|
-
|| touchMove.touches[1].clientY !== this.touchStart.touches[1].clientY) {
|
|
606
|
-
const currentPointerPrimary = new utils_1.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY);
|
|
607
|
-
const currentPointerSecondary = new utils_1.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY);
|
|
608
|
-
const originPointerPrimary = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
609
|
-
const distance = currentPointerPrimary.substract(currentPointerSecondary);
|
|
610
|
-
if (this.scaleBase && Math.abs(this.scaleBase - distance.magnitude) > 10) {
|
|
611
|
-
const scaleFactor = distance.magnitude / this.scaleBase;
|
|
612
|
-
this.scale = scaleFactor;
|
|
613
|
-
if (this.isPinching) {
|
|
614
|
-
const pinchEvent = new PinchEvent_1.default(touchMove, {
|
|
615
|
-
scale: scaleFactor
|
|
616
|
-
});
|
|
617
|
-
this.dispatchEvent(pinchEvent);
|
|
618
|
-
}
|
|
619
|
-
else {
|
|
620
|
-
const pinchStartEvent = new PinchEvent_1.PinchStartEvent(touchMove, {
|
|
621
|
-
scale: scaleFactor
|
|
622
|
-
});
|
|
623
|
-
this.dispatchEvent(pinchStartEvent);
|
|
624
|
-
this.isPinching = true;
|
|
625
|
-
}
|
|
626
|
-
}
|
|
627
|
-
this.anchor = currentPointerPrimary;
|
|
628
|
-
let rotationAngle = Math.atan2((originPointerPrimary.clientY - currentPointerSecondary.clientY), (originPointerPrimary.clientX - currentPointerSecondary.clientX));
|
|
629
|
-
rotationAngle < 0 ? rotationAngle += 1.5708 : rotationAngle -= 1.5708;
|
|
630
|
-
this.rotation = rotationAngle;
|
|
631
|
-
this.rotationDeg = rotationAngle * 180 / Math.PI;
|
|
632
|
-
this.anchor = this.anchor;
|
|
633
|
-
if (this.isRotating) {
|
|
634
|
-
const rotateEvent = new RotateEvent_1.default(touchMove, {
|
|
635
|
-
anchor: this.anchor,
|
|
636
|
-
rotation: this.rotation,
|
|
637
|
-
rotationDeg: this.rotationDeg
|
|
638
|
-
});
|
|
639
|
-
this.dispatchEvent(rotateEvent);
|
|
640
|
-
}
|
|
641
|
-
else {
|
|
642
|
-
const rotateStartEvent = new RotateEvent_1.RotateStartEvent(touchMove, {
|
|
643
|
-
anchor: this.anchor,
|
|
644
|
-
rotation: this.rotation,
|
|
645
|
-
rotationDeg: this.rotationDeg
|
|
646
|
-
});
|
|
647
|
-
this.dispatchEvent(rotateStartEvent);
|
|
648
|
-
this.isRotating = true;
|
|
649
|
-
}
|
|
650
|
-
}
|
|
651
|
-
}
|
|
652
|
-
const origin = new utils_1.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY);
|
|
653
|
-
const currentPosition = new utils_1.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY);
|
|
654
|
-
const dxDy = currentPosition.substract(origin);
|
|
655
|
-
const length = dxDy.magnitude;
|
|
656
|
-
const normalised = {
|
|
657
|
-
x: dxDy.x / length,
|
|
658
|
-
y: dxDy.y / length
|
|
659
|
-
};
|
|
660
|
-
const angle = Math.atan2(normalised.y, normalised.x);
|
|
661
|
-
this.octant = Math.round(4 * angle / (2 * Math.PI) + 4) % 4;
|
|
662
|
-
const dt = (touchMove.timeStamp - this.touchStart.timeStamp) / 1000;
|
|
663
|
-
const velocity = dxDy.magnitude / dt;
|
|
664
|
-
if (this.isSwiping) {
|
|
665
|
-
const swipeEvent = new SwipeEvent_1.default(touchMove, {
|
|
666
|
-
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])],
|
|
667
|
-
velocity: velocity
|
|
668
|
-
});
|
|
669
|
-
this.dispatchEvent(swipeEvent);
|
|
670
|
-
}
|
|
671
|
-
else {
|
|
672
|
-
const swipeStartEvent = new SwipeEvent_1.SwipeStartEvent(touchMove, {
|
|
673
|
-
direction: CartesianDirectionEnum[(0, utils_1.closest)(this.octant, [0, 1, 2, 3])],
|
|
674
|
-
velocity: velocity
|
|
675
|
-
});
|
|
676
|
-
this.dispatchEvent(swipeStartEvent);
|
|
677
|
-
this.isSwiping = true;
|
|
678
|
-
}
|
|
679
|
-
this.dxDy = dxDy;
|
|
680
|
-
this.velocity = velocity;
|
|
681
|
-
if (this.isPanning) {
|
|
682
|
-
const panEvent = new PanEvent_1.default(touchMove, {
|
|
683
|
-
translation: dxDy,
|
|
684
|
-
velocity: velocity
|
|
685
|
-
});
|
|
686
|
-
this.dispatchEvent(panEvent);
|
|
687
|
-
}
|
|
688
|
-
else {
|
|
689
|
-
const panStartEvent = new PanEvent_1.PanStartEvent(touchMove, {
|
|
690
|
-
translation: dxDy,
|
|
691
|
-
velocity: velocity
|
|
692
|
-
});
|
|
693
|
-
this.dispatchEvent(panStartEvent);
|
|
694
|
-
this.isPanning = true;
|
|
695
|
-
}
|
|
696
|
-
}
|
|
697
|
-
onTouchEnd(touchEnd) {
|
|
698
|
-
const numberOfTaps = parseInt(this.currentTarget.dataset.numberoftaps || '0') || this.config.numberOfTaps;
|
|
699
|
-
this.taps++;
|
|
700
|
-
this.shouldFire = Boolean(this.taps > numberOfTaps);
|
|
701
|
-
if (this.shouldFire) {
|
|
702
|
-
this.touchEnd = touchEnd;
|
|
703
|
-
this.touchEndTime = touchEnd.timeStamp;
|
|
704
|
-
const maxTapDelay = parseFloat(this.currentTarget.dataset.tapdelay || '0') || this.config.tapDelay;
|
|
705
|
-
if (!this.touchMoved && !this.isLongPress) {
|
|
706
|
-
if (this.taps === 1 || (this.touchEndTime - this.lastTouchTime) < maxTapDelay) {
|
|
707
|
-
if (this.taps % 2 === numberOfTaps) {
|
|
708
|
-
const doubleTapEvent = new DoubleTapEvent_1.default(touchEnd);
|
|
709
|
-
this.dispatchEvent(doubleTapEvent);
|
|
710
|
-
this.taps = 0;
|
|
711
|
-
}
|
|
712
|
-
const tapEvent = new TapEvent_1.default(touchEnd);
|
|
713
|
-
this.dispatchEvent(tapEvent);
|
|
714
|
-
}
|
|
715
|
-
else {
|
|
716
|
-
this.taps = 0;
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
}
|
|
720
|
-
this.pointers = this.touchEnd.touches.length;
|
|
721
|
-
this.lastTouchTime = this.touchEndTime;
|
|
722
|
-
this.onPointerLeave(touchEnd);
|
|
723
|
-
this.unbind(this.currentTarget);
|
|
724
|
-
this.clean();
|
|
725
|
-
}
|
|
726
|
-
onTouchCancel(touchCancel) {
|
|
727
|
-
if (!this.shouldFire)
|
|
728
|
-
return;
|
|
729
|
-
this.touchCancel = touchCancel;
|
|
730
|
-
this.unbind(this.currentTarget);
|
|
731
|
-
this.clean();
|
|
732
|
-
}
|
|
733
|
-
}
|
|
734
|
-
exports["default"] = GestureProvider;
|
|
735
|
-
GestureProvider.listening = false;
|
|
736
|
-
if (TouchEvent)
|
|
737
|
-
window.gestureProvider = new GestureProvider();
|
|
738
|
-
//# sourceMappingURL=index.js.map
|
|
739
|
-
|
|
740
|
-
/***/ }),
|
|
741
|
-
|
|
742
|
-
/***/ 46:
|
|
743
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
747
|
-
exports.closest = exports.Vec2 = exports.assert = void 0;
|
|
748
|
-
function assert(condition, message) {
|
|
749
|
-
if (!condition) {
|
|
750
|
-
throw new Error(message);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
exports.assert = assert;
|
|
754
|
-
class Vec2 {
|
|
755
|
-
constructor(_x, _y) {
|
|
756
|
-
this._x = 0;
|
|
757
|
-
this._y = 0;
|
|
758
|
-
this._clientX = 0;
|
|
759
|
-
this._clientY = 0;
|
|
760
|
-
this._clientX = _x;
|
|
761
|
-
this._clientY = _y;
|
|
762
|
-
this._x = this.translateX(_x);
|
|
763
|
-
this._y = this.translateY(_y);
|
|
764
|
-
}
|
|
765
|
-
translateY(_y) {
|
|
766
|
-
return -(_y - window.innerHeight / 2);
|
|
767
|
-
}
|
|
768
|
-
translateX(_x) {
|
|
769
|
-
return _x - window.innerWidth / 2;
|
|
770
|
-
}
|
|
771
|
-
get x() {
|
|
772
|
-
return this._x;
|
|
773
|
-
}
|
|
774
|
-
get y() {
|
|
775
|
-
return this._y;
|
|
776
|
-
}
|
|
777
|
-
get clientX() {
|
|
778
|
-
return this._clientX;
|
|
779
|
-
}
|
|
780
|
-
get clientY() {
|
|
781
|
-
return this._clientY;
|
|
782
|
-
}
|
|
783
|
-
set x(_x) {
|
|
784
|
-
this._clientX = _x;
|
|
785
|
-
this._x = this.translateX(_x);
|
|
786
|
-
}
|
|
787
|
-
set y(_y) {
|
|
788
|
-
this._clientY = _y;
|
|
789
|
-
this._y = this.translateY(_y);
|
|
790
|
-
}
|
|
791
|
-
add(vector) {
|
|
792
|
-
this._x += vector.x;
|
|
793
|
-
this._y += vector.y;
|
|
794
|
-
this._clientX += vector.clientX;
|
|
795
|
-
this._clientY += vector.clientY;
|
|
796
|
-
return this;
|
|
797
|
-
}
|
|
798
|
-
substract(vector) {
|
|
799
|
-
this._x -= vector.x;
|
|
800
|
-
this._y -= vector.y;
|
|
801
|
-
this._clientX -= vector.clientX;
|
|
802
|
-
this._clientY -= vector.clientY;
|
|
803
|
-
return this;
|
|
804
|
-
}
|
|
805
|
-
dot(vector) {
|
|
806
|
-
const scalar = (this._x * vector.x) + (this._y * vector.y);
|
|
807
|
-
return scalar;
|
|
808
|
-
}
|
|
809
|
-
get magnitude() {
|
|
810
|
-
return Math.sqrt(Math.pow(this._x, 2) + Math.pow(this._y, 2));
|
|
811
|
-
}
|
|
812
|
-
get clientMagnitude() {
|
|
813
|
-
return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
|
|
814
|
-
}
|
|
815
|
-
}
|
|
816
|
-
exports.Vec2 = Vec2;
|
|
817
|
-
function closest(needle, haystack) {
|
|
818
|
-
return haystack.reduce((a, b) => {
|
|
819
|
-
let a_diff = Math.abs(a - needle);
|
|
820
|
-
let b_diff = Math.abs(b - needle);
|
|
821
|
-
if (a_diff === b_diff) {
|
|
822
|
-
return a > b ? a : b;
|
|
823
|
-
}
|
|
824
|
-
else {
|
|
825
|
-
return b_diff < a_diff ? b : a;
|
|
826
|
-
}
|
|
827
|
-
});
|
|
828
|
-
}
|
|
829
|
-
exports.closest = closest;
|
|
830
|
-
//# sourceMappingURL=utils.js.map
|
|
831
|
-
|
|
832
|
-
/***/ }),
|
|
833
|
-
|
|
834
|
-
/***/ 810:
|
|
835
|
-
/***/ ((module) => {
|
|
836
|
-
|
|
837
|
-
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
838
|
-
var y = x => () => x
|
|
839
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE_react__;
|
|
840
|
-
|
|
841
|
-
/***/ })
|
|
842
|
-
|
|
843
|
-
/******/ });
|
|
844
|
-
/************************************************************************/
|
|
845
|
-
/******/ // The module cache
|
|
846
|
-
/******/ var __webpack_module_cache__ = {};
|
|
847
|
-
/******/
|
|
848
|
-
/******/ // The require function
|
|
849
|
-
/******/ function __webpack_require__(moduleId) {
|
|
850
|
-
/******/ // Check if module is in cache
|
|
851
|
-
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
|
852
|
-
/******/ if (cachedModule !== undefined) {
|
|
853
|
-
/******/ return cachedModule.exports;
|
|
854
|
-
/******/ }
|
|
855
|
-
/******/ // Create a new module (and put it into the cache)
|
|
856
|
-
/******/ var module = __webpack_module_cache__[moduleId] = {
|
|
857
|
-
/******/ // no module.id needed
|
|
858
|
-
/******/ // no module.loaded needed
|
|
859
|
-
/******/ exports: {}
|
|
860
|
-
/******/ };
|
|
861
|
-
/******/
|
|
862
|
-
/******/ // Execute the module function
|
|
863
|
-
/******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
|
864
|
-
/******/
|
|
865
|
-
/******/ // Return the exports of the module
|
|
866
|
-
/******/ return module.exports;
|
|
867
|
-
/******/ }
|
|
868
|
-
/******/
|
|
869
|
-
/************************************************************************/
|
|
870
|
-
/******/ /* webpack/runtime/define property getters */
|
|
871
|
-
/******/ (() => {
|
|
872
|
-
/******/ // define getter functions for harmony exports
|
|
873
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
874
|
-
/******/ for(var key in definition) {
|
|
875
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
876
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
877
|
-
/******/ }
|
|
878
|
-
/******/ }
|
|
879
|
-
/******/ };
|
|
880
|
-
/******/ })();
|
|
881
|
-
/******/
|
|
882
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
883
|
-
/******/ (() => {
|
|
884
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
885
|
-
/******/ })();
|
|
886
|
-
/******/
|
|
887
|
-
/************************************************************************/
|
|
888
|
-
var __webpack_exports__ = {};
|
|
889
|
-
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
|
890
|
-
(() => {
|
|
891
|
-
|
|
892
|
-
// EXPORTS
|
|
893
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
894
|
-
"ee": () => (/* reexport */ Anchor),
|
|
895
|
-
"zF": () => (/* reexport */ FadeInKeyframes),
|
|
896
|
-
"JA": () => (/* reexport */ FadeOutKeyframes),
|
|
897
|
-
"rN": () => (/* reexport */ GestureRegion),
|
|
898
|
-
"c4": () => (/* reexport */ HistoryEntry),
|
|
899
|
-
"W_": () => (/* reexport */ Navigation),
|
|
900
|
-
"F0": () => (/* reexport */ Router),
|
|
901
|
-
"lL": () => (/* reexport */ Screen),
|
|
902
|
-
"Tq": () => (/* reexport */ SlideInFromBottomKeyframes),
|
|
903
|
-
"um": () => (/* reexport */ SlideInFromLeftKeyframes),
|
|
904
|
-
"ID": () => (/* reexport */ SlideInFromRightKeyframes),
|
|
905
|
-
"u5": () => (/* reexport */ SlideInFromTopKeyframes),
|
|
906
|
-
"eH": () => (/* reexport */ SlideOutToBottomKeyframes),
|
|
907
|
-
"ak": () => (/* reexport */ SlideOutToLeftKeyframes),
|
|
908
|
-
"pQ": () => (/* reexport */ SlideOutToRightKeyframes),
|
|
909
|
-
"Bu": () => (/* reexport */ SlideOutToTopKeyframes),
|
|
910
|
-
"xH": () => (/* reexport */ ZoomInKeyframes),
|
|
911
|
-
"s$": () => (/* reexport */ ZoomOutKeyframes),
|
|
912
|
-
"eV": () => (/* reexport */ androidBottomSheetSlideInOptions),
|
|
913
|
-
"aR": () => (/* reexport */ androidBottomSheetSlideOutOptions),
|
|
914
|
-
"BI": () => (/* reexport */ androidConcealToBottomKeyframes),
|
|
915
|
-
"gd": () => (/* reexport */ androidFadeInFromBottom),
|
|
916
|
-
"d3": () => (/* reexport */ androidFadeInFromBottomKeyframes),
|
|
917
|
-
"yo": () => (/* reexport */ androidFadeInFromBottomOptions),
|
|
918
|
-
"_s": () => (/* reexport */ androidFadeInFromBottomSheet),
|
|
919
|
-
"ih": () => (/* reexport */ androidFadeInFromBottomSheetKeyframes),
|
|
920
|
-
"r_": () => (/* reexport */ androidFadeInFromRight),
|
|
921
|
-
"kb": () => (/* reexport */ androidFadeInFromRightKeyframes),
|
|
922
|
-
"GY": () => (/* reexport */ androidFadeOutToBottomOptions),
|
|
923
|
-
"ef": () => (/* reexport */ androidFadeOutToLeftKeyframes),
|
|
924
|
-
"n_": () => (/* reexport */ androidRevealFromBottom),
|
|
925
|
-
"RA": () => (/* reexport */ androidRevealFromBottomKeyframes),
|
|
926
|
-
"TA": () => (/* reexport */ androidRevealFromBottomOptions),
|
|
927
|
-
"zf": () => (/* reexport */ androidScaleFromCentre),
|
|
928
|
-
"mz": () => (/* reexport */ androidScaleFromCentreKeyframes),
|
|
929
|
-
"pb": () => (/* reexport */ androidScaleFromCentreOptions),
|
|
930
|
-
"G6": () => (/* reexport */ androidScaleToCentreKeyframes),
|
|
931
|
-
"ZM": () => (/* reexport */ iOSKeyframeOptions),
|
|
932
|
-
"kB": () => (/* reexport */ iOSSlideInFromBottom),
|
|
933
|
-
"Hh": () => (/* reexport */ iOSSlideInFromBottomKeyframes),
|
|
934
|
-
"kz": () => (/* reexport */ iOSSlideInFromLeft),
|
|
935
|
-
"nI": () => (/* reexport */ iOSSlideInFromLeftKeyframes),
|
|
936
|
-
"E7": () => (/* reexport */ iOSSlideInFromRight),
|
|
937
|
-
"Cq": () => (/* reexport */ iOSSlideInFromRightKeyframes),
|
|
938
|
-
"cj": () => (/* reexport */ iOSSlideOutToLeftKeyframes),
|
|
939
|
-
"Cj": () => (/* reexport */ iOSSlideOutToRightKeyframes),
|
|
940
|
-
"HJ": () => (/* reexport */ useNavigation),
|
|
941
|
-
"UO": () => (/* reexport */ useParams),
|
|
942
|
-
"yj": () => (/* reexport */ useRoute),
|
|
943
|
-
"tv": () => (/* reexport */ useRouter)
|
|
944
|
-
});
|
|
945
|
-
|
|
946
|
-
// EXTERNAL MODULE: ../../node_modules/web-gesture-events/index.js
|
|
947
|
-
var web_gesture_events = __webpack_require__(190);
|
|
948
|
-
;// CONCATENATED MODULE: external "@react-motion-router/core"
|
|
949
|
-
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
|
950
|
-
var y = x => () => x
|
|
951
|
-
const core_namespaceObject = x({ ["NavigationBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.NavigationBase, ["RouterBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.RouterBase, ["ScreenBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.ScreenBase, ["cloneAndInject"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.cloneAndInject, ["includesRoute"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.includesRoute, ["isValidScreenChild"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.isValidScreenChild, ["matchRoute"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.matchRoute, ["resolveBaseURLFromPattern"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.resolveBaseURLFromPattern, ["useNavigationBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useNavigationBase, ["useParamsBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useParamsBase, ["useRouteBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useRouteBase, ["useRouterBase"]: () => __WEBPACK_EXTERNAL_MODULE__react_motion_router_core_d1cff82c__.useRouterBase });
|
|
952
|
-
;// CONCATENATED MODULE: ./src/common/events.ts
|
|
953
|
-
class NavigateEvent extends Event {
|
|
954
|
-
routerId;
|
|
955
|
-
route;
|
|
956
|
-
props;
|
|
957
|
-
navigationType;
|
|
958
|
-
signal;
|
|
959
|
-
committed;
|
|
960
|
-
transition;
|
|
961
|
-
constructor(routerId, route, props, type, signal, committed, transition) {
|
|
962
|
-
super('navigate');
|
|
963
|
-
this.routerId = routerId;
|
|
964
|
-
this.route = route;
|
|
965
|
-
this.props = props;
|
|
966
|
-
this.navigationType = type ?? "push";
|
|
967
|
-
this.signal = signal;
|
|
968
|
-
this.committed = committed;
|
|
969
|
-
this.transition = transition;
|
|
970
|
-
}
|
|
1
|
+
import { NavigationBase as dt, resolveBaseURLFromPattern as ft, includesRoute as ot, ScreenBase as vt, matchRoute as K, RouterBase as gt, isValidScreenChild as X, cloneAndInject as pt, useNavigationBase as mt, useRouterBase as yt, useRouteBase as wt, useParamsBase as Et } from "@react-motion-router/core";
|
|
2
|
+
import { Children as et, createRef as Pt, startTransition as j, useDebugValue as M, useState as St, useEffect as U, useRef as bt } from "react";
|
|
3
|
+
import { GestureTimeline as _t, springToLinear as Lt, easingToLinear as H } from "web-animations-extension";
|
|
4
|
+
import { jsx as ct } from "react/jsx-runtime";
|
|
5
|
+
var g = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, kt = {}, b = {};
|
|
6
|
+
Object.defineProperty(b, "__esModule", { value: !0 });
|
|
7
|
+
var nt;
|
|
8
|
+
(function(e) {
|
|
9
|
+
e[e.tap = 0] = "tap", e[e.longpress = 1] = "longpress", e[e.pinchstart = 2] = "pinchstart", e[e.pinch = 3] = "pinch", e[e.pinchend = 4] = "pinchend", e[e.rotatestart = 5] = "rotatestart", e[e.rotate = 6] = "rotate", e[e.rotateend = 7] = "rotateend", e[e.swipestart = 8] = "swipestart", e[e.swipe = 9] = "swipe", e[e.swipeend = 10] = "swipeend", e[e.panstart = 11] = "panstart", e[e.pan = 12] = "pan", e[e.panend = 13] = "panend", e[e.doubletap = 14] = "doubletap";
|
|
10
|
+
})(nt || (nt = {}));
|
|
11
|
+
class Tt extends TouchEvent {
|
|
12
|
+
constructor(t, n) {
|
|
13
|
+
if (super(t, {
|
|
14
|
+
touches: Array.from(n.touches),
|
|
15
|
+
targetTouches: Array.from(n.targetTouches),
|
|
16
|
+
changedTouches: Array.from(n.changedTouches),
|
|
17
|
+
ctrlKey: n.ctrlKey,
|
|
18
|
+
shiftKey: n.shiftKey,
|
|
19
|
+
altKey: n.altKey,
|
|
20
|
+
metaKey: n.metaKey,
|
|
21
|
+
bubbles: !0,
|
|
22
|
+
cancelable: !0
|
|
23
|
+
}), t.includes("end") || n.type.includes("end")) {
|
|
24
|
+
this.gestureTarget = n.changedTouches[0].target, this.x = n.changedTouches[0].clientX, this.y = n.changedTouches[0].clientY;
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
this.gestureTarget = n.touches[0].target, this.x = n.touches[0].clientX, this.y = n.touches[0].clientY;
|
|
28
|
+
}
|
|
971
29
|
}
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
this.transition = transition;
|
|
983
|
-
}
|
|
30
|
+
b.default = Tt;
|
|
31
|
+
var V = {}, Rt = g && g.__importDefault || function(e) {
|
|
32
|
+
return e && e.__esModule ? e : { default: e };
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(V, "__esModule", { value: !0 });
|
|
35
|
+
const It = Rt(b);
|
|
36
|
+
class xt extends It.default {
|
|
37
|
+
constructor(t, n) {
|
|
38
|
+
super("longpress", t), this.duration = 0, this.duration = n;
|
|
39
|
+
}
|
|
984
40
|
}
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
this.transition = transition;
|
|
996
|
-
}
|
|
41
|
+
V.default = xt;
|
|
42
|
+
var $ = {}, Ft = g && g.__importDefault || function(e) {
|
|
43
|
+
return e && e.__esModule ? e : { default: e };
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty($, "__esModule", { value: !0 });
|
|
46
|
+
const Dt = Ft(b);
|
|
47
|
+
class Ot extends Dt.default {
|
|
48
|
+
constructor(t) {
|
|
49
|
+
super("tap", t), this.duration = 0;
|
|
50
|
+
}
|
|
997
51
|
}
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
52
|
+
$.default = Ot;
|
|
53
|
+
var A = {}, Bt = g && g.__importDefault || function(e) {
|
|
54
|
+
return e && e.__esModule ? e : { default: e };
|
|
55
|
+
};
|
|
56
|
+
Object.defineProperty(A, "__esModule", { value: !0 });
|
|
57
|
+
const Kt = Bt(b);
|
|
58
|
+
class Mt extends Kt.default {
|
|
59
|
+
constructor(t) {
|
|
60
|
+
super("doubletap", t);
|
|
61
|
+
}
|
|
1004
62
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
63
|
+
A.default = Mt;
|
|
64
|
+
var R = {}, Yt = g && g.__importDefault || function(e) {
|
|
65
|
+
return e && e.__esModule ? e : { default: e };
|
|
66
|
+
};
|
|
67
|
+
Object.defineProperty(R, "__esModule", { value: !0 });
|
|
68
|
+
R.SwipeEndEvent = R.SwipeStartEvent = void 0;
|
|
69
|
+
const Ct = Yt(b);
|
|
70
|
+
var rt;
|
|
71
|
+
(function(e) {
|
|
72
|
+
e[e.start = 0] = "start", e[e.end = 1] = "end";
|
|
73
|
+
})(rt || (rt = {}));
|
|
74
|
+
class W extends Ct.default {
|
|
75
|
+
constructor(t, n, r) {
|
|
76
|
+
let s;
|
|
77
|
+
switch (r) {
|
|
78
|
+
case "start":
|
|
79
|
+
s = "swipestart";
|
|
80
|
+
break;
|
|
81
|
+
case "end":
|
|
82
|
+
s = "swipeend";
|
|
83
|
+
break;
|
|
84
|
+
default:
|
|
85
|
+
s = "swipe";
|
|
86
|
+
}
|
|
87
|
+
super(s, t), this.velocity = n.velocity, this.direction = n.direction;
|
|
88
|
+
}
|
|
1011
89
|
}
|
|
1012
|
-
class
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
90
|
+
class Xt extends W {
|
|
91
|
+
constructor(t, n) {
|
|
92
|
+
super(t, n);
|
|
93
|
+
}
|
|
1016
94
|
}
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
index;
|
|
1023
|
-
constructor(nativeEntry, routerId, index) {
|
|
1024
|
-
this.#nativeEntry = nativeEntry;
|
|
1025
|
-
this.routerId = routerId;
|
|
1026
|
-
this.index = index;
|
|
1027
|
-
}
|
|
1028
|
-
set ondispose(handler) {
|
|
1029
|
-
this.#nativeEntry.ondispose = handler;
|
|
1030
|
-
}
|
|
1031
|
-
get ondispose() {
|
|
1032
|
-
return this.#nativeEntry.ondispose;
|
|
1033
|
-
}
|
|
1034
|
-
get id() {
|
|
1035
|
-
return this.#nativeEntry.id;
|
|
1036
|
-
}
|
|
1037
|
-
get globalIndex() {
|
|
1038
|
-
return this.#nativeEntry.index;
|
|
1039
|
-
}
|
|
1040
|
-
get url() {
|
|
1041
|
-
if (!this.#nativeEntry.url)
|
|
1042
|
-
return null;
|
|
1043
|
-
return new URL(this.#nativeEntry.url);
|
|
1044
|
-
}
|
|
1045
|
-
get key() {
|
|
1046
|
-
return this.#nativeEntry.key;
|
|
1047
|
-
}
|
|
1048
|
-
get sameDocument() {
|
|
1049
|
-
return this.#nativeEntry.sameDocument;
|
|
1050
|
-
}
|
|
1051
|
-
addEventListener(type, listener, options) {
|
|
1052
|
-
this.#nativeEntry.addEventListener(type, listener, options);
|
|
1053
|
-
return () => this.#nativeEntry.removeEventListener(type, listener, options);
|
|
1054
|
-
}
|
|
1055
|
-
removeEventListener(type, listener, options) {
|
|
1056
|
-
this.#nativeEntry.addEventListener(type, listener, options);
|
|
1057
|
-
}
|
|
1058
|
-
dispatchEvent(event) {
|
|
1059
|
-
return this.#nativeEntry.dispatchEvent(event);
|
|
1060
|
-
}
|
|
1061
|
-
getState() {
|
|
1062
|
-
return this.#nativeEntry.getState();
|
|
1063
|
-
}
|
|
95
|
+
R.default = Xt;
|
|
96
|
+
class jt extends W {
|
|
97
|
+
constructor(t, n) {
|
|
98
|
+
super(t, n, "start");
|
|
99
|
+
}
|
|
1064
100
|
}
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
class Navigation extends core_namespaceObject.NavigationBase {
|
|
1071
|
-
router;
|
|
1072
|
-
constructor(router) {
|
|
1073
|
-
super();
|
|
1074
|
-
this.router = router;
|
|
1075
|
-
}
|
|
1076
|
-
replace(route, props = {}, options = {}) {
|
|
1077
|
-
return this.navigate(route, props, { ...options, type: "replace" });
|
|
1078
|
-
}
|
|
1079
|
-
push(route, props = {}, options = {}) {
|
|
1080
|
-
return this.navigate(route, props, { ...options, type: "push" });
|
|
1081
|
-
}
|
|
1082
|
-
reload(props = {}) {
|
|
1083
|
-
return window.navigation.reload({ state: props });
|
|
1084
|
-
}
|
|
1085
|
-
traverseTo(key, options = {}) {
|
|
1086
|
-
const result = window.navigation.traverseTo(key);
|
|
1087
|
-
const transition = window.navigation.transition;
|
|
1088
|
-
const fromIndex = transition.from.index;
|
|
1089
|
-
const destinationIndex = window.navigation.entries().findIndex(entry => entry.key === key);
|
|
1090
|
-
const controller = new AbortController();
|
|
1091
|
-
controller.signal.addEventListener('abort', () => this.traverseTo(transition.from.key), { once: true });
|
|
1092
|
-
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1093
|
-
let event;
|
|
1094
|
-
if (fromIndex > destinationIndex) {
|
|
1095
|
-
event = this.createBackEvent(controller.signal, result.committed, transition);
|
|
1096
|
-
}
|
|
1097
|
-
else {
|
|
1098
|
-
event = this.createForwardEvent(controller.signal, result.committed, transition);
|
|
1099
|
-
}
|
|
1100
|
-
this.dispatchEvent?.(event);
|
|
1101
|
-
return result;
|
|
1102
|
-
}
|
|
1103
|
-
navigate(route, props = {}, options = {}) {
|
|
1104
|
-
const { type: history = "push" } = options;
|
|
1105
|
-
const url = new URL(route, this.baseURL);
|
|
1106
|
-
const result = window.navigation.navigate(url.href, { history, state: props });
|
|
1107
|
-
const transition = window.navigation.transition;
|
|
1108
|
-
const controller = new AbortController();
|
|
1109
|
-
controller.signal.addEventListener('abort', () => this.goBack(), { once: true });
|
|
1110
|
-
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1111
|
-
const event = this.createNavigateEvent(route, props, history, controller.signal, result.committed, transition);
|
|
1112
|
-
this.dispatchEvent?.(event);
|
|
1113
|
-
return result;
|
|
1114
|
-
}
|
|
1115
|
-
goBack(options = {}) {
|
|
1116
|
-
if (!this.canGoBack())
|
|
1117
|
-
return;
|
|
1118
|
-
const result = window.navigation.traverseTo(this.previous.key);
|
|
1119
|
-
const transition = window.navigation.transition;
|
|
1120
|
-
const controller = new AbortController();
|
|
1121
|
-
controller.signal.addEventListener('abort', () => this.goForward(), { once: true });
|
|
1122
|
-
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1123
|
-
const event = this.createBackEvent(controller.signal, result.committed, transition);
|
|
1124
|
-
this.dispatchEvent?.(event);
|
|
1125
|
-
return result;
|
|
1126
|
-
}
|
|
1127
|
-
goForward(options = {}) {
|
|
1128
|
-
if (!this.canGoForward())
|
|
1129
|
-
return;
|
|
1130
|
-
const result = window.navigation.traverseTo(this.next.key);
|
|
1131
|
-
const transition = window.navigation.transition;
|
|
1132
|
-
const controller = new AbortController();
|
|
1133
|
-
controller.signal.addEventListener('abort', () => this.goBack(), { once: true });
|
|
1134
|
-
options.signal?.addEventListener('abort', controller.abort, { once: true });
|
|
1135
|
-
const event = this.createForwardEvent(controller.signal, result.committed, transition);
|
|
1136
|
-
this.dispatchEvent?.(event);
|
|
1137
|
-
return result;
|
|
1138
|
-
}
|
|
1139
|
-
createBackEvent(signal, committed, transition) {
|
|
1140
|
-
if (!this.routerId)
|
|
1141
|
-
throw new Error("Router ID is not set");
|
|
1142
|
-
return new BackEvent(this.routerId, signal, committed, transition);
|
|
1143
|
-
}
|
|
1144
|
-
createForwardEvent(signal, committed, transition) {
|
|
1145
|
-
if (!this.routerId)
|
|
1146
|
-
throw new Error("Router ID is not set");
|
|
1147
|
-
return new ForwardEvent(this.routerId, signal, committed, transition);
|
|
1148
|
-
}
|
|
1149
|
-
createNavigateEvent(route, props, type, signal, committed, transition) {
|
|
1150
|
-
if (!this.routerId)
|
|
1151
|
-
throw new Error("Router ID is not set");
|
|
1152
|
-
return new NavigateEvent(this.routerId, route, props, type, signal, committed, transition);
|
|
1153
|
-
}
|
|
1154
|
-
get committed() {
|
|
1155
|
-
return this.router.committed;
|
|
1156
|
-
}
|
|
1157
|
-
get transition() {
|
|
1158
|
-
return this.router.state.transition;
|
|
1159
|
-
}
|
|
1160
|
-
get globalEntries() {
|
|
1161
|
-
return window.navigation.entries();
|
|
1162
|
-
}
|
|
1163
|
-
get entries() {
|
|
1164
|
-
const nestedPathPatterns = this.router.pathPatterns.filter(({ pattern }) => pattern.endsWith("**"));
|
|
1165
|
-
let inNestedScope = false;
|
|
1166
|
-
return this.globalEntries
|
|
1167
|
-
.filter(entry => {
|
|
1168
|
-
if (!entry.url)
|
|
1169
|
-
return false;
|
|
1170
|
-
const url = new URL(entry.url);
|
|
1171
|
-
if (!(0,core_namespaceObject.resolveBaseURLFromPattern)(this.baseURLPattern.pathname, url.pathname))
|
|
1172
|
-
return false;
|
|
1173
|
-
if ((0,core_namespaceObject.includesRoute)(nestedPathPatterns, url.pathname, this.baseURLPattern.pathname)) {
|
|
1174
|
-
if (inNestedScope)
|
|
1175
|
-
return false;
|
|
1176
|
-
return inNestedScope = true; // technically in nested scope but include the first entry (the entry intercepted by the parent router)
|
|
1177
|
-
}
|
|
1178
|
-
else {
|
|
1179
|
-
inNestedScope = false;
|
|
1180
|
-
return true; // not in nested scope, so include
|
|
1181
|
-
}
|
|
1182
|
-
})
|
|
1183
|
-
.map((entry, index) => {
|
|
1184
|
-
return new HistoryEntry(entry, this.routerId, index);
|
|
1185
|
-
});
|
|
1186
|
-
}
|
|
1187
|
-
get index() {
|
|
1188
|
-
const globalCurrentIndex = window.navigation.currentEntry?.index ?? -1;
|
|
1189
|
-
const firstEntryGlobalIndex = this.entries.at(0)?.globalIndex ?? -1;
|
|
1190
|
-
const lastEntryGlobalIndex = this.entries.at(-1)?.globalIndex ?? -1;
|
|
1191
|
-
if (globalCurrentIndex <= firstEntryGlobalIndex)
|
|
1192
|
-
return 0;
|
|
1193
|
-
else if (globalCurrentIndex >= lastEntryGlobalIndex)
|
|
1194
|
-
return this.entries.length - 1;
|
|
1195
|
-
else {
|
|
1196
|
-
const scopedEntries = this.globalEntries.slice(firstEntryGlobalIndex, globalCurrentIndex + 1);
|
|
1197
|
-
return this.entries.findLastIndex(entry => {
|
|
1198
|
-
return scopedEntries.findLastIndex(globalEntry => entry.key === globalEntry.key) > -1;
|
|
1199
|
-
});
|
|
1200
|
-
}
|
|
1201
|
-
}
|
|
1202
|
-
get previous() {
|
|
1203
|
-
return this.entries[this.index - 1] ?? null;
|
|
1204
|
-
}
|
|
1205
|
-
get next() {
|
|
1206
|
-
return this.entries[this.index + 1] ?? null;
|
|
1207
|
-
}
|
|
1208
|
-
get current() {
|
|
1209
|
-
return this.entries[this.index];
|
|
1210
|
-
}
|
|
1211
|
-
canGoBack() {
|
|
1212
|
-
return Boolean(this.previous?.sameDocument);
|
|
1213
|
-
}
|
|
1214
|
-
canGoForward() {
|
|
1215
|
-
return Boolean(this.next?.sameDocument);
|
|
1216
|
-
}
|
|
101
|
+
R.SwipeStartEvent = jt;
|
|
102
|
+
class Ut extends W {
|
|
103
|
+
constructor(t, n) {
|
|
104
|
+
super(t, n, "end");
|
|
105
|
+
}
|
|
1217
106
|
}
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
107
|
+
R.SwipeEndEvent = Ut;
|
|
108
|
+
var I = {}, Nt = g && g.__importDefault || function(e) {
|
|
109
|
+
return e && e.__esModule ? e : { default: e };
|
|
110
|
+
};
|
|
111
|
+
Object.defineProperty(I, "__esModule", { value: !0 });
|
|
112
|
+
I.PanEndEvent = I.PanStartEvent = void 0;
|
|
113
|
+
const Ht = Nt(b);
|
|
114
|
+
var st;
|
|
115
|
+
(function(e) {
|
|
116
|
+
e[e.start = 0] = "start", e[e.end = 1] = "end";
|
|
117
|
+
})(st || (st = {}));
|
|
118
|
+
class q extends Ht.default {
|
|
119
|
+
constructor(t, n, r) {
|
|
120
|
+
let s;
|
|
121
|
+
switch (r) {
|
|
122
|
+
case "start":
|
|
123
|
+
s = "panstart";
|
|
124
|
+
break;
|
|
125
|
+
case "end":
|
|
126
|
+
s = "panend";
|
|
127
|
+
break;
|
|
128
|
+
default:
|
|
129
|
+
s = "pan";
|
|
130
|
+
}
|
|
131
|
+
super(s, t), this.velocity = n.velocity, this.translation = {
|
|
132
|
+
x: n.translation.x,
|
|
133
|
+
y: n.translation.y,
|
|
134
|
+
magnitude: n.translation.magnitude,
|
|
135
|
+
clientX: n.translation.clientX,
|
|
136
|
+
clientY: n.translation.clientY,
|
|
137
|
+
clientMagnitude: n.translation.clientMagnitude
|
|
138
|
+
};
|
|
139
|
+
}
|
|
1222
140
|
}
|
|
1223
|
-
|
|
1224
|
-
|
|
141
|
+
class Vt extends q {
|
|
142
|
+
constructor(t, n) {
|
|
143
|
+
super(t, n);
|
|
144
|
+
}
|
|
1225
145
|
}
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
146
|
+
I.default = Vt;
|
|
147
|
+
class $t extends q {
|
|
148
|
+
constructor(t, n) {
|
|
149
|
+
super(t, n, "start");
|
|
150
|
+
}
|
|
1230
151
|
}
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
152
|
+
I.PanStartEvent = $t;
|
|
153
|
+
class At extends q {
|
|
154
|
+
constructor(t, n) {
|
|
155
|
+
super(t, n, "end");
|
|
156
|
+
}
|
|
1235
157
|
}
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
158
|
+
I.PanEndEvent = At;
|
|
159
|
+
var x = {}, Wt = g && g.__importDefault || function(e) {
|
|
160
|
+
return e && e.__esModule ? e : { default: e };
|
|
161
|
+
};
|
|
162
|
+
Object.defineProperty(x, "__esModule", { value: !0 });
|
|
163
|
+
x.PinchEndEvent = x.PinchStartEvent = void 0;
|
|
164
|
+
const qt = Wt(b);
|
|
165
|
+
var it;
|
|
166
|
+
(function(e) {
|
|
167
|
+
e[e.start = 0] = "start", e[e.end = 1] = "end";
|
|
168
|
+
})(it || (it = {}));
|
|
169
|
+
class z extends qt.default {
|
|
170
|
+
constructor(t, n, r) {
|
|
171
|
+
let s;
|
|
172
|
+
switch (r) {
|
|
173
|
+
case "start":
|
|
174
|
+
s = "pinchstart";
|
|
175
|
+
break;
|
|
176
|
+
case "end":
|
|
177
|
+
s = "pinchend";
|
|
178
|
+
break;
|
|
179
|
+
default:
|
|
180
|
+
s = "pinch";
|
|
181
|
+
}
|
|
182
|
+
super(s, t), Object.defineProperty(this, "scale", {
|
|
183
|
+
value: n.scale,
|
|
184
|
+
writable: !1
|
|
185
|
+
});
|
|
186
|
+
}
|
|
1254
187
|
}
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
const historyEntry = router.navigation.entries.find(entry => entry.key === id);
|
|
1266
|
-
if (!historyEntry)
|
|
1267
|
-
throw new Error(`No history entry found for: ${id}`);
|
|
1268
|
-
this.#historyEntry = historyEntry;
|
|
1269
|
-
}
|
|
1270
|
-
static getDerivedStateFromProps(props) {
|
|
1271
|
-
if (props.config?.presentation === "dialog"
|
|
1272
|
-
|| props.config?.presentation === "modal")
|
|
1273
|
-
return { elementType: "dialog" };
|
|
1274
|
-
else
|
|
1275
|
-
return { elementType: "div" };
|
|
1276
|
-
}
|
|
1277
|
-
setParams(newParams) {
|
|
1278
|
-
super.setParams(newParams);
|
|
1279
|
-
this.setHistoryState(({ params }) => ({ params: { ...params, ...newParams } }));
|
|
1280
|
-
}
|
|
1281
|
-
setConfig(newConfig) {
|
|
1282
|
-
super.setConfig(newConfig);
|
|
1283
|
-
// navigation history state can only accept structured cloneable objects.
|
|
1284
|
-
// a lot of the config options are function which cannot be structured cloned.
|
|
1285
|
-
// for this reason remove this for now unless a good argument is made for persisting config to history state.
|
|
1286
|
-
// this.setHistoryState(({ config }) => ({ config: { ...config, ...newConfig } }));
|
|
1287
|
-
}
|
|
1288
|
-
get router() {
|
|
1289
|
-
return this.context;
|
|
1290
|
-
}
|
|
1291
|
-
get internalProps() {
|
|
1292
|
-
return this.props;
|
|
1293
|
-
}
|
|
1294
|
-
get resolvedPathname() {
|
|
1295
|
-
return this.internalProps.resolvedPathname;
|
|
1296
|
-
}
|
|
1297
|
-
get historyEntryState() {
|
|
1298
|
-
const entry = this.#historyEntry;
|
|
1299
|
-
if (entry?.url) {
|
|
1300
|
-
const state = entry.getState() ?? {};
|
|
1301
|
-
const queryParams = searchParamsToObject(entry.url.searchParams);
|
|
1302
|
-
const pathParams = (0,core_namespaceObject.matchRoute)(this.props.path, entry.url.pathname, this.context.baseURLPattern.pathname, this.props.caseSensitive)?.params;
|
|
1303
|
-
state.params = {
|
|
1304
|
-
...state.params,
|
|
1305
|
-
...queryParams,
|
|
1306
|
-
...pathParams
|
|
1307
|
-
};
|
|
1308
|
-
return state;
|
|
1309
|
-
}
|
|
1310
|
-
return {};
|
|
1311
|
-
}
|
|
1312
|
-
get id() {
|
|
1313
|
-
return this.internalProps.id.toString();
|
|
1314
|
-
}
|
|
1315
|
-
get params() {
|
|
1316
|
-
return {
|
|
1317
|
-
...this.props.defaultParams,
|
|
1318
|
-
...this.historyEntryState.params,
|
|
1319
|
-
...this.state.params
|
|
1320
|
-
};
|
|
1321
|
-
}
|
|
1322
|
-
get config() {
|
|
1323
|
-
return {
|
|
1324
|
-
...this.props.config,
|
|
1325
|
-
...this.historyEntryState.config,
|
|
1326
|
-
...this.state.config
|
|
1327
|
-
};
|
|
1328
|
-
}
|
|
1329
|
-
get routeProp() {
|
|
1330
|
-
const setParams = this.setParams.bind(this);
|
|
1331
|
-
const setConfig = this.setConfig.bind(this);
|
|
1332
|
-
const { path } = this.props;
|
|
1333
|
-
const { focused } = this.state;
|
|
1334
|
-
const { params, config, resolvedPathname } = this;
|
|
1335
|
-
return {
|
|
1336
|
-
setParams,
|
|
1337
|
-
setConfig,
|
|
1338
|
-
path,
|
|
1339
|
-
resolvedPathname,
|
|
1340
|
-
focused,
|
|
1341
|
-
params,
|
|
1342
|
-
config
|
|
1343
|
-
};
|
|
1344
|
-
}
|
|
1345
|
-
setHistoryState(newState) {
|
|
1346
|
-
if (!this.state.focused)
|
|
1347
|
-
return;
|
|
1348
|
-
const prevState = this.#historyEntry.getState() ?? {};
|
|
1349
|
-
if (newState instanceof Function) {
|
|
1350
|
-
newState = newState(prevState);
|
|
1351
|
-
}
|
|
1352
|
-
const state = {
|
|
1353
|
-
...prevState ?? {},
|
|
1354
|
-
...newState
|
|
1355
|
-
};
|
|
1356
|
-
window.navigation.updateCurrentEntry({ state });
|
|
1357
|
-
}
|
|
1358
|
-
onClickOutside(e) {
|
|
1359
|
-
if (!this.transitionProvider.current?.ref.current)
|
|
1360
|
-
return;
|
|
1361
|
-
const navigation = this.context?.navigation;
|
|
1362
|
-
const rect = this.transitionProvider.current.ref.current.getBoundingClientRect();
|
|
1363
|
-
const isInDialog = (rect.top <= e.clientY
|
|
1364
|
-
&& e.clientY <= rect.top + rect.height
|
|
1365
|
-
&& rect.left <= e.clientX
|
|
1366
|
-
&& e.clientX <= rect.left + rect.width);
|
|
1367
|
-
if (!isInDialog)
|
|
1368
|
-
navigation?.goBack();
|
|
1369
|
-
}
|
|
1370
|
-
onEnter(signal) {
|
|
1371
|
-
if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement
|
|
1372
|
-
&& this.transitionProvider.current.ref.current.open === false) {
|
|
1373
|
-
const navigation = this.context?.navigation;
|
|
1374
|
-
if (this.props.config?.presentation === "modal") {
|
|
1375
|
-
this.transitionProvider.current.ref.current.showModal();
|
|
1376
|
-
}
|
|
1377
|
-
else {
|
|
1378
|
-
this.transitionProvider.current.ref.current.show();
|
|
1379
|
-
}
|
|
1380
|
-
this.transitionProvider.current.ref.current.style.maxHeight = 'unset';
|
|
1381
|
-
this.transitionProvider.current.ref.current.style.maxWidth = 'unset';
|
|
1382
|
-
this.transitionProvider.current.ref.current.style.width = 'max-content';
|
|
1383
|
-
this.transitionProvider.current.ref.current.style.height = 'max-content';
|
|
1384
|
-
if (this.ref.current) {
|
|
1385
|
-
this.ref.current.style.width = 'max-content';
|
|
1386
|
-
this.ref.current.style.height = 'max-content';
|
|
1387
|
-
}
|
|
1388
|
-
const onClickOutside = this.onClickOutside.bind(this);
|
|
1389
|
-
// closed by form submit or ESC key
|
|
1390
|
-
this.transitionProvider.current?.ref.current.addEventListener('close', function () {
|
|
1391
|
-
if (this.returnValue !== "screen-exit") {
|
|
1392
|
-
this.style.display = "block";
|
|
1393
|
-
navigation?.goBack();
|
|
1394
|
-
}
|
|
1395
|
-
navigation?.removeEventListener('click', onClickOutside);
|
|
1396
|
-
}, { once: true });
|
|
1397
|
-
navigation?.addEventListener('click', onClickOutside);
|
|
1398
|
-
}
|
|
1399
|
-
return super.onEnter(signal);
|
|
1400
|
-
}
|
|
1401
|
-
;
|
|
1402
|
-
onExited(signal) {
|
|
1403
|
-
if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement) {
|
|
1404
|
-
this.transitionProvider.current.ref.current.close("screen-exit");
|
|
1405
|
-
}
|
|
1406
|
-
return super.onExited(signal);
|
|
1407
|
-
}
|
|
188
|
+
class zt extends z {
|
|
189
|
+
constructor(t, n) {
|
|
190
|
+
super(t, n);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
x.default = zt;
|
|
194
|
+
class Gt extends z {
|
|
195
|
+
constructor(t, n) {
|
|
196
|
+
super(t, n, "start");
|
|
197
|
+
}
|
|
1408
198
|
}
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
&& value.hasOwnProperty('current'))
|
|
1415
|
-
return true;
|
|
1416
|
-
return false;
|
|
199
|
+
x.PinchStartEvent = Gt;
|
|
200
|
+
class Zt extends z {
|
|
201
|
+
constructor(t, n) {
|
|
202
|
+
super(t, n, "end");
|
|
203
|
+
}
|
|
1417
204
|
}
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
"up": ["up"],
|
|
1422
|
-
"down": ["down"],
|
|
1423
|
-
"left": ["left"],
|
|
1424
|
-
"right": ["right"]
|
|
205
|
+
x.PinchEndEvent = Zt;
|
|
206
|
+
var F = {}, Jt = g && g.__importDefault || function(e) {
|
|
207
|
+
return e && e.__esModule ? e : { default: e };
|
|
1425
208
|
};
|
|
1426
|
-
|
|
1427
|
-
|
|
209
|
+
Object.defineProperty(F, "__esModule", { value: !0 });
|
|
210
|
+
F.RotateEndEvent = F.RotateStartEvent = void 0;
|
|
211
|
+
const Qt = Jt(b);
|
|
212
|
+
var at;
|
|
213
|
+
(function(e) {
|
|
214
|
+
e[e.start = 0] = "start", e[e.end = 1] = "end";
|
|
215
|
+
})(at || (at = {}));
|
|
216
|
+
class G extends Qt.default {
|
|
217
|
+
constructor(t, n, r) {
|
|
218
|
+
let s;
|
|
219
|
+
switch (r) {
|
|
220
|
+
case "start":
|
|
221
|
+
s = "rotatestart";
|
|
222
|
+
break;
|
|
223
|
+
case "end":
|
|
224
|
+
s = "rotateend";
|
|
225
|
+
break;
|
|
226
|
+
default:
|
|
227
|
+
s = "rotate";
|
|
228
|
+
}
|
|
229
|
+
super(s, t), this.anchor = {
|
|
230
|
+
x: n.anchor.x,
|
|
231
|
+
y: n.anchor.y,
|
|
232
|
+
clientX: n.anchor.clientX,
|
|
233
|
+
clientY: n.anchor.clientY
|
|
234
|
+
}, Object.defineProperty(this, "rotation", {
|
|
235
|
+
value: n.rotation,
|
|
236
|
+
writable: !1
|
|
237
|
+
}), this.rotationDeg = n.rotationDeg;
|
|
238
|
+
}
|
|
1428
239
|
}
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
return false;
|
|
1434
|
-
if (direction === "down" && Math.abs(y - clientRect.top) >= gestureAreaWidth)
|
|
1435
|
-
return false;
|
|
1436
|
-
if (direction === "up" && Math.abs(y - clientRect.bottom) >= gestureAreaWidth)
|
|
1437
|
-
return false;
|
|
240
|
+
class te extends G {
|
|
241
|
+
constructor(t, n) {
|
|
242
|
+
super(t, n);
|
|
243
|
+
}
|
|
1438
244
|
}
|
|
1439
|
-
|
|
1440
|
-
|
|
245
|
+
F.default = te;
|
|
246
|
+
class ee extends G {
|
|
247
|
+
constructor(t, n) {
|
|
248
|
+
super(t, n, "start");
|
|
249
|
+
}
|
|
1441
250
|
}
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
var external_web_animations_extension_y = x => () => x
|
|
1448
|
-
const external_web_animations_extension_namespaceObject = external_web_animations_extension_x({ ["GestureTimeline"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.GestureTimeline, ["easingToLinear"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.easingToLinear, ["springToLinear"]: () => __WEBPACK_EXTERNAL_MODULE_web_animations_extension_74b2916c__.springToLinear });
|
|
1449
|
-
;// CONCATENATED MODULE: ./src/common/constants.ts
|
|
1450
|
-
const DEFAULT_GESTURE_CONFIG = {
|
|
1451
|
-
gestureHysteresis: 0.5,
|
|
1452
|
-
gestureMinFlingVelocity: 400,
|
|
1453
|
-
gestureAreaWidth: 100,
|
|
1454
|
-
gestureDirection: 'right',
|
|
1455
|
-
gestureDisabled: false
|
|
1456
|
-
};
|
|
1457
|
-
|
|
1458
|
-
;// CONCATENATED MODULE: ./src/common/promise-wrapper.ts
|
|
1459
|
-
class PromiseWrapper {
|
|
1460
|
-
promise;
|
|
1461
|
-
state;
|
|
1462
|
-
nativeResolve;
|
|
1463
|
-
nativeReject;
|
|
1464
|
-
constructor() {
|
|
1465
|
-
this.state = 'pending';
|
|
1466
|
-
this.nativeResolve = this.nativeReject = null;
|
|
1467
|
-
this.promise = new Promise((resolve, reject) => {
|
|
1468
|
-
this.nativeResolve = resolve;
|
|
1469
|
-
this.nativeReject = reject;
|
|
1470
|
-
});
|
|
1471
|
-
}
|
|
1472
|
-
resolve(value) {
|
|
1473
|
-
this.state = 'resolved';
|
|
1474
|
-
this.nativeResolve?.(value);
|
|
1475
|
-
}
|
|
1476
|
-
reject(reason) {
|
|
1477
|
-
this.state = 'rejected';
|
|
1478
|
-
// Do not report unhandled promise rejections.
|
|
1479
|
-
this.promise.catch(() => { });
|
|
1480
|
-
this.nativeReject?.(reason);
|
|
1481
|
-
}
|
|
251
|
+
F.RotateStartEvent = ee;
|
|
252
|
+
class ne extends G {
|
|
253
|
+
constructor(t, n) {
|
|
254
|
+
super(t, n, "end");
|
|
255
|
+
}
|
|
1482
256
|
}
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
-
|
|
1514
|
-
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
257
|
+
F.RotateEndEvent = ne;
|
|
258
|
+
var L = {};
|
|
259
|
+
Object.defineProperty(L, "__esModule", { value: !0 });
|
|
260
|
+
L.closest = L.Vec2 = L.assert = void 0;
|
|
261
|
+
function re(e, t) {
|
|
262
|
+
if (!e)
|
|
263
|
+
throw new Error(t);
|
|
264
|
+
}
|
|
265
|
+
L.assert = re;
|
|
266
|
+
class se {
|
|
267
|
+
constructor(t, n) {
|
|
268
|
+
this._x = 0, this._y = 0, this._clientX = 0, this._clientY = 0, this._clientX = t, this._clientY = n, this._x = this.translateX(t), this._y = this.translateY(n);
|
|
269
|
+
}
|
|
270
|
+
translateY(t) {
|
|
271
|
+
return -(t - window.innerHeight / 2);
|
|
272
|
+
}
|
|
273
|
+
translateX(t) {
|
|
274
|
+
return t - window.innerWidth / 2;
|
|
275
|
+
}
|
|
276
|
+
get x() {
|
|
277
|
+
return this._x;
|
|
278
|
+
}
|
|
279
|
+
get y() {
|
|
280
|
+
return this._y;
|
|
281
|
+
}
|
|
282
|
+
get clientX() {
|
|
283
|
+
return this._clientX;
|
|
284
|
+
}
|
|
285
|
+
get clientY() {
|
|
286
|
+
return this._clientY;
|
|
287
|
+
}
|
|
288
|
+
set x(t) {
|
|
289
|
+
this._clientX = t, this._x = this.translateX(t);
|
|
290
|
+
}
|
|
291
|
+
set y(t) {
|
|
292
|
+
this._clientY = t, this._y = this.translateY(t);
|
|
293
|
+
}
|
|
294
|
+
add(t) {
|
|
295
|
+
return this._x += t.x, this._y += t.y, this._clientX += t.clientX, this._clientY += t.clientY, this;
|
|
296
|
+
}
|
|
297
|
+
substract(t) {
|
|
298
|
+
return this._x -= t.x, this._y -= t.y, this._clientX -= t.clientX, this._clientY -= t.clientY, this;
|
|
299
|
+
}
|
|
300
|
+
dot(t) {
|
|
301
|
+
return this._x * t.x + this._y * t.y;
|
|
302
|
+
}
|
|
303
|
+
get magnitude() {
|
|
304
|
+
return Math.sqrt(Math.pow(this._x, 2) + Math.pow(this._y, 2));
|
|
305
|
+
}
|
|
306
|
+
get clientMagnitude() {
|
|
307
|
+
return Math.sqrt(Math.pow(this._clientX, 2) + Math.pow(this._clientY, 2));
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
L.Vec2 = se;
|
|
311
|
+
function ie(e, t) {
|
|
312
|
+
return t.reduce((n, r) => {
|
|
313
|
+
let s = Math.abs(n - e), i = Math.abs(r - e);
|
|
314
|
+
return s === i ? n > r ? n : r : i < s ? r : n;
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
L.closest = ie;
|
|
318
|
+
(function(e) {
|
|
319
|
+
var t = g && g.__createBinding || (Object.create ? function(c, a, h, y) {
|
|
320
|
+
y === void 0 && (y = h), Object.defineProperty(c, y, { enumerable: !0, get: function() {
|
|
321
|
+
return a[h];
|
|
322
|
+
} });
|
|
323
|
+
} : function(c, a, h, y) {
|
|
324
|
+
y === void 0 && (y = h), c[y] = a[h];
|
|
325
|
+
}), n = g && g.__setModuleDefault || (Object.create ? function(c, a) {
|
|
326
|
+
Object.defineProperty(c, "default", { enumerable: !0, value: a });
|
|
327
|
+
} : function(c, a) {
|
|
328
|
+
c.default = a;
|
|
329
|
+
}), r = g && g.__importStar || function(c) {
|
|
330
|
+
if (c && c.__esModule)
|
|
331
|
+
return c;
|
|
332
|
+
var a = {};
|
|
333
|
+
if (c != null)
|
|
334
|
+
for (var h in c)
|
|
335
|
+
h !== "default" && Object.prototype.hasOwnProperty.call(c, h) && t(a, c, h);
|
|
336
|
+
return n(a, c), a;
|
|
337
|
+
}, s = g && g.__importDefault || function(c) {
|
|
338
|
+
return c && c.__esModule ? c : { default: c };
|
|
339
|
+
};
|
|
340
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), e.RotateEndEvent = e.RotateEvent = e.RotateStartEvent = e.PinchEndEvent = e.PinchEvent = e.PinchStartEvent = e.PanEndEvent = e.PanEvent = e.PanStartEvent = e.SwipeEndEvent = e.SwipeEvent = e.SwipeStartEvent = e.DoubleTapEvent = e.LongPressEvent = e.GestureEvent = e.TapEvent = void 0;
|
|
341
|
+
const i = s(b);
|
|
342
|
+
e.GestureEvent = i.default;
|
|
343
|
+
const o = s(V);
|
|
344
|
+
e.LongPressEvent = o.default;
|
|
345
|
+
const d = s($);
|
|
346
|
+
e.TapEvent = d.default;
|
|
347
|
+
const u = s(A);
|
|
348
|
+
e.DoubleTapEvent = u.default;
|
|
349
|
+
const l = r(R);
|
|
350
|
+
e.SwipeEvent = l.default, Object.defineProperty(e, "SwipeEndEvent", { enumerable: !0, get: function() {
|
|
351
|
+
return l.SwipeEndEvent;
|
|
352
|
+
} }), Object.defineProperty(e, "SwipeStartEvent", { enumerable: !0, get: function() {
|
|
353
|
+
return l.SwipeStartEvent;
|
|
354
|
+
} });
|
|
355
|
+
const m = r(I);
|
|
356
|
+
e.PanEvent = m.default, Object.defineProperty(e, "PanEndEvent", { enumerable: !0, get: function() {
|
|
357
|
+
return m.PanEndEvent;
|
|
358
|
+
} }), Object.defineProperty(e, "PanStartEvent", { enumerable: !0, get: function() {
|
|
359
|
+
return m.PanStartEvent;
|
|
360
|
+
} });
|
|
361
|
+
const P = r(x);
|
|
362
|
+
e.PinchEvent = P.default, Object.defineProperty(e, "PinchEndEvent", { enumerable: !0, get: function() {
|
|
363
|
+
return P.PinchEndEvent;
|
|
364
|
+
} }), Object.defineProperty(e, "PinchStartEvent", { enumerable: !0, get: function() {
|
|
365
|
+
return P.PinchStartEvent;
|
|
366
|
+
} });
|
|
367
|
+
const w = r(F);
|
|
368
|
+
e.RotateEvent = w.default, Object.defineProperty(e, "RotateEndEvent", { enumerable: !0, get: function() {
|
|
369
|
+
return w.RotateEndEvent;
|
|
370
|
+
} }), Object.defineProperty(e, "RotateStartEvent", { enumerable: !0, get: function() {
|
|
371
|
+
return w.RotateStartEvent;
|
|
372
|
+
} });
|
|
373
|
+
const v = L;
|
|
374
|
+
var p;
|
|
375
|
+
(function(c) {
|
|
376
|
+
c[c.right = 0] = "right", c[c.up = 1] = "up", c[c.left = 2] = "left", c[c.down = 3] = "down";
|
|
377
|
+
})(p || (p = {}));
|
|
378
|
+
class f {
|
|
379
|
+
constructor() {
|
|
380
|
+
this.touchStart = new TouchEvent("touchstart") || {}, this.touchMove = new TouchEvent("touchmove") || {}, this.touchEnd = new TouchEvent("touchend") || {}, this.touchCancel = new TouchEvent("touchcancel") || {}, this.velocity = 0, this.dxDy = new v.Vec2(0, 0), this.scale = 1, this.rotation = 0, this.rotationDeg = 0, this.anchor = new v.Vec2(0, 0), this.octant = 0, this.isPanning = !1, this.isPinching = !1, this.isSwiping = !1, this.isRotating = !1, this.touchStartTime = 0, this.touchEndTime = 0, this.lastTouchTime = 0, this.taps = 0, this.scaleBase = 0, this.touchMoved = !1, this.touchDown = !1, this.shouldFire = !1, this.pointers = 0, this.isLongPress = !1, this.longPressTimeout = 0, this.touchStartListener = this.onTouchStart.bind(this), this.touchMoveListener = this.onTouchMove.bind(this), this.touchEndListener = this.onTouchEnd.bind(this), this.touchCancelListener = this.onTouchCancel.bind(this), this.currentTarget = window, this.config = {
|
|
381
|
+
longPressDuration: 500,
|
|
382
|
+
tapDelay: 500,
|
|
383
|
+
minPointers: 1,
|
|
384
|
+
numberOfTaps: 0
|
|
385
|
+
}, f.listening || (TouchEvent && window.addEventListener("touchstart", this.touchStartListener, !0), f.listening = !0);
|
|
386
|
+
}
|
|
387
|
+
bind(a) {
|
|
388
|
+
this.unbind(this.currentTarget), a.addEventListener("touchmove", this.touchMoveListener, !0), a.addEventListener("touchend", this.touchEndListener, !0), a.addEventListener("touchcancel", this.touchCancelListener, !0), this.currentTarget = a;
|
|
389
|
+
}
|
|
390
|
+
unbind(a) {
|
|
391
|
+
a.removeEventListener("touchmove", this.touchMoveListener), a.removeEventListener("touchend", this.touchEndListener), a.removeEventListener("touchcancel", this.touchCancelListener);
|
|
392
|
+
}
|
|
393
|
+
clean() {
|
|
394
|
+
this.touchMoved = !1, this.touchStartTime = 0, this.touchDown = !1, this.scaleBase = 0, this.longPressTimeout && !this.isLongPress && (clearTimeout(this.longPressTimeout), this.longPressTimeout = 0), this.isLongPress = !1;
|
|
395
|
+
}
|
|
396
|
+
onPointerLeave(a) {
|
|
397
|
+
if (!a.touches.length) {
|
|
398
|
+
if (this.isSwiping) {
|
|
399
|
+
const h = new l.SwipeEndEvent(a, {
|
|
400
|
+
velocity: this.velocity,
|
|
401
|
+
direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])]
|
|
402
|
+
});
|
|
403
|
+
this.dispatchEvent(h), this.isSwiping = !1;
|
|
1518
404
|
}
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
gestureAreaWidth: config?.gestureAreaWidth ?? DEFAULT_GESTURE_CONFIG.gestureAreaWidth,
|
|
1526
|
-
gestureMinFlingVelocity: config?.gestureMinFlingVelocity ?? DEFAULT_GESTURE_CONFIG.gestureMinFlingVelocity,
|
|
1527
|
-
gestureHysteresis: config?.gestureHysteresis ?? DEFAULT_GESTURE_CONFIG.gestureHysteresis,
|
|
1528
|
-
gestureDisabled: config?.gestureDisabled ?? DEFAULT_GESTURE_CONFIG.gestureDisabled,
|
|
1529
|
-
documentTitle: config?.title
|
|
1530
|
-
};
|
|
1531
|
-
}
|
|
1532
|
-
componentDidMount() {
|
|
1533
|
-
super.componentDidMount();
|
|
1534
|
-
this.ref.current?.addEventListener('swipestart', this.onSwipeStart);
|
|
1535
|
-
this.ref.current?.addEventListener('swipeend', this.onSwipeEnd);
|
|
1536
|
-
window.navigation.addEventListener("currententrychange", this.onCurrentEntryChange);
|
|
1537
|
-
window.navigation.addEventListener("navigate", this.onNavigate);
|
|
1538
|
-
window.navigation.addEventListener("navigatesuccess", this.onNavigateSuccess);
|
|
1539
|
-
window.navigation.addEventListener("navigateerror", this.onNavigateError);
|
|
1540
|
-
}
|
|
1541
|
-
shouldComponentUpdate(nextProps, nextState) {
|
|
1542
|
-
return (!deepEquals(this.props.config, nextProps.config)
|
|
1543
|
-
|| !deepEquals(this.state, nextState)
|
|
1544
|
-
|| this.props.id !== nextProps.id);
|
|
1545
|
-
}
|
|
1546
|
-
componentWillUnmount() {
|
|
1547
|
-
this.ref.current?.removeEventListener('swipestart', this.onSwipeStart);
|
|
1548
|
-
this.ref.current?.removeEventListener('swipeend', this.onSwipeEnd);
|
|
1549
|
-
window.navigation.removeEventListener("currententrychange", this.onCurrentEntryChange);
|
|
1550
|
-
window.navigation.removeEventListener("navigate", this.onNavigate);
|
|
1551
|
-
window.navigation.removeEventListener("navigatesuccess", this.onNavigateSuccess);
|
|
1552
|
-
window.navigation.removeEventListener("navigateerror", this.onNavigateError);
|
|
1553
|
-
}
|
|
1554
|
-
onNavigate = () => {
|
|
1555
|
-
this.#committed = new PromiseWrapper();
|
|
1556
|
-
};
|
|
1557
|
-
onCurrentEntryChange = () => {
|
|
1558
|
-
this.#committed?.nativeResolve?.(window.navigation.currentEntry);
|
|
1559
|
-
};
|
|
1560
|
-
onNavigateSuccess = () => {
|
|
1561
|
-
this.#committed = null;
|
|
1562
|
-
};
|
|
1563
|
-
onNavigateError = ({ error }) => {
|
|
1564
|
-
if (this.#committed?.state === "pending")
|
|
1565
|
-
this.#committed.nativeReject?.(error); // TODO: find out what the spec does for cancelled navigations
|
|
1566
|
-
this.#committed = null;
|
|
1567
|
-
};
|
|
1568
|
-
onGestureCancel = () => {
|
|
1569
|
-
if (!this.state.transition)
|
|
1570
|
-
throw new Error("Rollback failed, transition is null");
|
|
1571
|
-
window.navigation.traverseTo(this.state.transition.from.key, { info: { rollback: true } });
|
|
1572
|
-
};
|
|
1573
|
-
canGestureNavigate(e) {
|
|
1574
|
-
if (!this.ref.current)
|
|
1575
|
-
return false;
|
|
1576
|
-
if (this.state.gestureDisabled)
|
|
1577
|
-
return false;
|
|
1578
|
-
const clientRect = this.ref.current.getBoundingClientRect();
|
|
1579
|
-
const { direction } = e;
|
|
1580
|
-
if ((direction === "down" || direction === "right") && !this.navigation.canGoBack())
|
|
1581
|
-
return false;
|
|
1582
|
-
if ((direction === "up" || direction === "left") && !this.navigation.canGoForward())
|
|
1583
|
-
return false;
|
|
1584
|
-
if (isOutOfBounds(direction, e, clientRect, this.state.gestureAreaWidth))
|
|
1585
|
-
return false;
|
|
1586
|
-
return isSupportedDirection(direction, this.state.gestureDirection);
|
|
1587
|
-
}
|
|
1588
|
-
onSwipeStart = (e) => {
|
|
1589
|
-
if (!this.canGestureNavigate(e))
|
|
1590
|
-
return;
|
|
1591
|
-
if (!this.ref.current || !this.screenTransitionLayer.current)
|
|
1592
|
-
return;
|
|
1593
|
-
const { direction } = e;
|
|
1594
|
-
let axis = isHorizontalDirection(direction) ? "x" : "y";
|
|
1595
|
-
let rangeStart;
|
|
1596
|
-
let rangeEnd;
|
|
1597
|
-
switch (direction) {
|
|
1598
|
-
case "right":
|
|
1599
|
-
rangeStart = 0;
|
|
1600
|
-
rangeEnd = this.ref.current.clientWidth;
|
|
1601
|
-
break;
|
|
1602
|
-
case "left":
|
|
1603
|
-
rangeStart = this.ref.current.clientWidth;
|
|
1604
|
-
rangeEnd = 0;
|
|
1605
|
-
break;
|
|
1606
|
-
case "down":
|
|
1607
|
-
rangeStart = 0;
|
|
1608
|
-
rangeEnd = this.ref.current.clientHeight;
|
|
1609
|
-
break;
|
|
1610
|
-
case "up":
|
|
1611
|
-
rangeStart = this.ref.current.clientHeight;
|
|
1612
|
-
rangeEnd = 0;
|
|
1613
|
-
break;
|
|
405
|
+
if (this.isPanning) {
|
|
406
|
+
const h = new m.PanEndEvent(a, {
|
|
407
|
+
translation: this.dxDy,
|
|
408
|
+
velocity: this.velocity
|
|
409
|
+
});
|
|
410
|
+
this.dispatchEvent(h), this.isPanning = !1;
|
|
1614
411
|
}
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
const gesture = true;
|
|
1623
|
-
if (direction === "down" || direction === "right")
|
|
1624
|
-
window.navigation.traverseTo(this.navigation.previous.key, { info: { gesture } });
|
|
1625
|
-
else
|
|
1626
|
-
window.navigation.traverseTo(this.navigation.next.key, { info: { gesture } });
|
|
1627
|
-
this.dispatchEvent(new GestureStartEvent(e));
|
|
1628
|
-
};
|
|
1629
|
-
onSwipeEnd = (e) => {
|
|
1630
|
-
if (!this.screenTransitionLayer.current)
|
|
1631
|
-
return;
|
|
1632
|
-
const progress = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0;
|
|
1633
|
-
const playbackRate = this.screenTransitionLayer.current.animation.playbackRate;
|
|
1634
|
-
this.screenTransitionLayer.current.animation.timeline = document.timeline;
|
|
1635
|
-
const hysteresisReached = playbackRate > 0 ? progress > this.state.gestureHysteresis : progress < this.state.gestureHysteresis;
|
|
1636
|
-
let gestureCancelled = false;
|
|
1637
|
-
if (e.velocity < this.state.gestureMinFlingVelocity && !hysteresisReached) {
|
|
1638
|
-
gestureCancelled = true;
|
|
1639
|
-
this.screenTransitionLayer.current.animation.reverse();
|
|
1640
|
-
this.dispatchEvent(new GestureCancelEvent());
|
|
412
|
+
}
|
|
413
|
+
if (a.touches.length === 1) {
|
|
414
|
+
if (this.scaleBase = 0, this.isPinching) {
|
|
415
|
+
const h = new P.PinchEndEvent(a, {
|
|
416
|
+
scale: this.scale
|
|
417
|
+
});
|
|
418
|
+
this.dispatchEvent(h), this.isPinching = !1;
|
|
1641
419
|
}
|
|
1642
|
-
|
|
1643
|
-
|
|
420
|
+
if (this.isRotating) {
|
|
421
|
+
const h = new w.RotateEndEvent(a, {
|
|
422
|
+
rotation: this.rotation,
|
|
423
|
+
rotationDeg: this.rotationDeg,
|
|
424
|
+
anchor: this.anchor
|
|
425
|
+
});
|
|
426
|
+
this.dispatchEvent(h), this.isRotating = !1;
|
|
1644
427
|
}
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
dispatchEvent(a) {
|
|
431
|
+
queueMicrotask(() => {
|
|
432
|
+
this.currentTarget.dispatchEvent(a);
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
onTouchStart(a) {
|
|
436
|
+
this.currentTarget !== a.touches[0].target && (this.clean(), this.unbind(this.currentTarget), this.pointers = this.touchEnd.touches.length, this.taps = 0), this.touchStart = a;
|
|
437
|
+
const h = parseInt(a.touches[0].target.dataset.minpointers || "0") || this.config.minPointers;
|
|
438
|
+
if (this.touchStart.touches.length < h) {
|
|
439
|
+
this.shouldFire = !1;
|
|
440
|
+
return;
|
|
441
|
+
}
|
|
442
|
+
this.shouldFire = !0, this.touchStartTime = a.timeStamp, this.touchDown = !0, this.pointers || this.bind(a.touches[0].target), this.pointers = this.touchStart.touches.length;
|
|
443
|
+
const y = parseFloat(this.currentTarget.dataset.longpressduration || "0") || this.config.longPressDuration;
|
|
444
|
+
if (this.longPressTimeout || (this.longPressTimeout = setTimeout(() => {
|
|
445
|
+
if (!this.touchMoved && this.touchDown) {
|
|
446
|
+
const E = Date.now() - this.touchStartTime, _ = new o.default(this.touchStart, E);
|
|
447
|
+
this.dispatchEvent(_), this.isLongPress = !0, this.longPressTimeout = 0;
|
|
448
|
+
}
|
|
449
|
+
}, y)), this.touchStart.touches.length > 1) {
|
|
450
|
+
const E = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), _ = new v.Vec2(this.touchStart.touches[1].clientX, this.touchStart.touches[1].clientY);
|
|
451
|
+
this.scaleBase = E.substract(_).magnitude;
|
|
452
|
+
} else
|
|
453
|
+
this.scaleBase = 0;
|
|
454
|
+
}
|
|
455
|
+
onTouchMove(a) {
|
|
456
|
+
if (!this.shouldFire)
|
|
457
|
+
return;
|
|
458
|
+
if (this.touchMoved = !0, this.touchMove = a, a.touches.length > 1 && this.touchStart.touches.length > 1 && (a.touches[1].clientX !== this.touchStart.touches[1].clientX || a.touches[1].clientY !== this.touchStart.touches[1].clientY)) {
|
|
459
|
+
const S = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY), Y = new v.Vec2(this.touchMove.touches[1].clientX, this.touchMove.touches[1].clientY), Q = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), tt = S.substract(Y);
|
|
460
|
+
if (this.scaleBase && Math.abs(this.scaleBase - tt.magnitude) > 10) {
|
|
461
|
+
const k = tt.magnitude / this.scaleBase;
|
|
462
|
+
if (this.scale = k, this.isPinching) {
|
|
463
|
+
const C = new P.default(a, {
|
|
464
|
+
scale: k
|
|
465
|
+
});
|
|
466
|
+
this.dispatchEvent(C);
|
|
467
|
+
} else {
|
|
468
|
+
const C = new P.PinchStartEvent(a, {
|
|
469
|
+
scale: k
|
|
1648
470
|
});
|
|
471
|
+
this.dispatchEvent(C), this.isPinching = !0;
|
|
472
|
+
}
|
|
1649
473
|
}
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
.
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
474
|
+
this.anchor = S;
|
|
475
|
+
let B = Math.atan2(Q.clientY - Y.clientY, Q.clientX - Y.clientX);
|
|
476
|
+
if (B < 0 ? B += 1.5708 : B -= 1.5708, this.rotation = B, this.rotationDeg = B * 180 / Math.PI, this.anchor = this.anchor, this.isRotating) {
|
|
477
|
+
const k = new w.default(a, {
|
|
478
|
+
anchor: this.anchor,
|
|
479
|
+
rotation: this.rotation,
|
|
480
|
+
rotationDeg: this.rotationDeg
|
|
481
|
+
});
|
|
482
|
+
this.dispatchEvent(k);
|
|
483
|
+
} else {
|
|
484
|
+
const k = new w.RotateStartEvent(a, {
|
|
485
|
+
anchor: this.anchor,
|
|
486
|
+
rotation: this.rotation,
|
|
487
|
+
rotationDeg: this.rotationDeg
|
|
488
|
+
});
|
|
489
|
+
this.dispatchEvent(k), this.isRotating = !0;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
const h = new v.Vec2(this.touchStart.touches[0].clientX, this.touchStart.touches[0].clientY), E = new v.Vec2(this.touchMove.touches[0].clientX, this.touchMove.touches[0].clientY).substract(h), _ = E.magnitude, J = {
|
|
493
|
+
x: E.x / _,
|
|
494
|
+
y: E.y / _
|
|
495
|
+
}, ht = Math.atan2(J.y, J.x);
|
|
496
|
+
this.octant = Math.round(4 * ht / (2 * Math.PI) + 4) % 4;
|
|
497
|
+
const lt = (a.timeStamp - this.touchStart.timeStamp) / 1e3, O = E.magnitude / lt;
|
|
498
|
+
if (this.isSwiping) {
|
|
499
|
+
const S = new l.default(a, {
|
|
500
|
+
direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
|
|
501
|
+
velocity: O
|
|
1671
502
|
});
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
const
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
return false;
|
|
1678
|
-
return (0,core_namespaceObject.matchRoute)(child.props.path, pathname, this.baseURLPattern.pathname, child.props.caseSensitive) !== null;
|
|
503
|
+
this.dispatchEvent(S);
|
|
504
|
+
} else {
|
|
505
|
+
const S = new l.SwipeStartEvent(a, {
|
|
506
|
+
direction: p[(0, v.closest)(this.octant, [0, 1, 2, 3])],
|
|
507
|
+
velocity: O
|
|
1679
508
|
});
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
...this.props.config?.screenConfig,
|
|
1687
|
-
...screenChild.props.config
|
|
1688
|
-
},
|
|
1689
|
-
id: key,
|
|
1690
|
-
resolvedPathname: pathname,
|
|
1691
|
-
key,
|
|
1692
|
-
ref: (0,external_react_.createRef)()
|
|
509
|
+
this.dispatchEvent(S), this.isSwiping = !0;
|
|
510
|
+
}
|
|
511
|
+
if (this.dxDy = E, this.velocity = O, this.isPanning) {
|
|
512
|
+
const S = new m.default(a, {
|
|
513
|
+
translation: E,
|
|
514
|
+
velocity: O
|
|
1693
515
|
});
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
return;
|
|
1700
|
-
return (0,core_namespaceObject.matchRoute)(child.props.path, pathname, this.baseURLPattern.pathname, child.props.caseSensitive);
|
|
516
|
+
this.dispatchEvent(S);
|
|
517
|
+
} else {
|
|
518
|
+
const S = new m.PanStartEvent(a, {
|
|
519
|
+
translation: E,
|
|
520
|
+
velocity: O
|
|
1701
521
|
});
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
}
|
|
1716
|
-
shouldIntercept(e) {
|
|
1717
|
-
const shouldIntercept = e.canIntercept
|
|
1718
|
-
&& !e.formData
|
|
1719
|
-
&& !e.hashChange
|
|
1720
|
-
&& !e.downloadRequest;
|
|
1721
|
-
return shouldIntercept || Boolean(this.props.config?.shouldIntercept?.(e));
|
|
1722
|
-
}
|
|
1723
|
-
intercept(e) {
|
|
1724
|
-
if (e.navigationType !== "load")
|
|
1725
|
-
this.props.config?.onIntercept?.(e);
|
|
1726
|
-
if (e.defaultPrevented)
|
|
1727
|
-
return;
|
|
1728
|
-
switch (e.navigationType) {
|
|
1729
|
-
case "load":
|
|
1730
|
-
this.handleLoad(e);
|
|
1731
|
-
break;
|
|
1732
|
-
case "reload":
|
|
1733
|
-
case "replace":
|
|
1734
|
-
this.handleReplace(e);
|
|
1735
|
-
break;
|
|
1736
|
-
default:
|
|
1737
|
-
this.handleDefault(e);
|
|
1738
|
-
break;
|
|
1739
|
-
}
|
|
1740
|
-
}
|
|
1741
|
-
handleLoad(e) {
|
|
1742
|
-
const handler = () => {
|
|
1743
|
-
const fromKey = e.transition?.from?.key ?? null;
|
|
1744
|
-
const destinationKey = e.destination.key;
|
|
1745
|
-
const transition = e.transition;
|
|
1746
|
-
const screenStack = new Array();
|
|
1747
|
-
const entries = this.navigation.entries;
|
|
1748
|
-
entries.forEach((entry) => {
|
|
1749
|
-
if (!entry.url)
|
|
1750
|
-
return null;
|
|
1751
|
-
const screen = this.screenChildFromPathname(entry.url.pathname, entry.key);
|
|
1752
|
-
if (!screen)
|
|
1753
|
-
return null;
|
|
1754
|
-
screenStack.push(screen);
|
|
1755
|
-
});
|
|
1756
|
-
return new Promise((resolve, reject) => (0,external_react_.startTransition)(() => {
|
|
1757
|
-
this.setState({ screenStack, fromKey, transition, destinationKey }, async () => {
|
|
1758
|
-
const { initialPathname } = this.props.config ?? {};
|
|
1759
|
-
const [firstEntry] = entries;
|
|
1760
|
-
if (initialPathname
|
|
1761
|
-
&& entries.length === 1
|
|
1762
|
-
&& firstEntry.url
|
|
1763
|
-
&& !(0,core_namespaceObject.matchRoute)(initialPathname, firstEntry.url.pathname, this.baseURLPattern.pathname)) {
|
|
1764
|
-
const transitionFinished = window.navigation.transition?.finished ?? Promise.resolve();
|
|
1765
|
-
transitionFinished.then(() => {
|
|
1766
|
-
this.navigation.replace(initialPathname).finished.then(() => {
|
|
1767
|
-
const state = e.destination.getState() ?? {};
|
|
1768
|
-
this.navigation.push(e.destination.url, state);
|
|
1769
|
-
});
|
|
1770
|
-
});
|
|
1771
|
-
return resolve();
|
|
1772
|
-
}
|
|
1773
|
-
const signal = e.signal;
|
|
1774
|
-
if (this.navigation.current?.key === undefined)
|
|
1775
|
-
reject(new Error("Current key is undefined"));
|
|
1776
|
-
const currentScreen = this.getScreenRefByKey(this.navigation.current.key);
|
|
1777
|
-
await this.dispatchLifecycleHandlers(currentScreen, null, signal).catch(reject);
|
|
1778
|
-
this.setState({ destinationKey: null, fromKey: null, transition: null }, resolve);
|
|
1779
|
-
});
|
|
1780
|
-
}));
|
|
1781
|
-
};
|
|
1782
|
-
e.intercept({ handler });
|
|
1783
|
-
}
|
|
1784
|
-
handleReplace(e) {
|
|
1785
|
-
const screenStack = this.state.screenStack;
|
|
1786
|
-
const destination = e.destination;
|
|
1787
|
-
const destinationPathname = new URL(destination.url).pathname;
|
|
1788
|
-
const destinationKey = window.navigation.currentEntry?.key ?? destination.key;
|
|
1789
|
-
const destinationScreen = this.screenChildFromPathname(destinationPathname, destinationKey);
|
|
1790
|
-
if (!destinationScreen)
|
|
1791
|
-
return e.preventDefault();
|
|
1792
|
-
const handler = () => {
|
|
1793
|
-
const isHotReplace = this.state.transition !== null;
|
|
1794
|
-
const transition = this.state.transition ?? window.navigation.transition;
|
|
1795
|
-
const fromKey = transition?.from?.key ?? null;
|
|
1796
|
-
const currentIndex = screenStack.findIndex(screen => screen.key === this.navigation.current?.key);
|
|
1797
|
-
screenStack.splice(currentIndex, 1, destinationScreen);
|
|
1798
|
-
return new Promise((resolve, reject) => (0,external_react_.startTransition)(() => {
|
|
1799
|
-
this.setState({ destinationKey, fromKey, transition, screenStack }, async () => {
|
|
1800
|
-
const signal = e.signal;
|
|
1801
|
-
const outgoingScreen = this.getScreenRefByKey(String(fromKey));
|
|
1802
|
-
const incomingScreen = this.getScreenRefByKey(String(destinationKey));
|
|
1803
|
-
const pendingLifecycleHandlers = this.dispatchLifecycleHandlers(incomingScreen, null, signal).catch(reject);
|
|
1804
|
-
if (isHotReplace) {
|
|
1805
|
-
const currentTime = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
|
|
1806
|
-
this.screenTransitionLayer.current?.animation.cancel();
|
|
1807
|
-
await new Promise(requestAnimationFrame);
|
|
1808
|
-
const animation = this.screenTransition(incomingScreen, outgoingScreen);
|
|
1809
|
-
if (animation) {
|
|
1810
|
-
animation.currentTime = currentTime;
|
|
1811
|
-
}
|
|
1812
|
-
animation?.updatePlaybackRate(1);
|
|
1813
|
-
await animation?.finished.catch(reject);
|
|
1814
|
-
}
|
|
1815
|
-
await pendingLifecycleHandlers;
|
|
1816
|
-
this.setState({ destinationKey: null, fromKey: null, transition: null }, resolve);
|
|
1817
|
-
});
|
|
1818
|
-
}));
|
|
1819
|
-
};
|
|
1820
|
-
e.intercept({ handler });
|
|
1821
|
-
}
|
|
1822
|
-
handleDefault(e) {
|
|
1823
|
-
const screenStack = this.state.screenStack;
|
|
1824
|
-
const destination = e.destination;
|
|
1825
|
-
const destinationPathname = new URL(destination.url).pathname;
|
|
1826
|
-
if (!(0,core_namespaceObject.isValidScreenChild)(this.getScreenChildByPathname(destinationPathname)))
|
|
1827
|
-
return e.preventDefault();
|
|
1828
|
-
const handler = () => {
|
|
1829
|
-
if (isRollback(e.info))
|
|
1830
|
-
return Promise.resolve();
|
|
1831
|
-
const transition = window.navigation.transition;
|
|
1832
|
-
let fromIndex = screenStack.findIndex(screen => screen.key === transition?.from.key);
|
|
1833
|
-
// if navigating from a nested screen the first lookup won't work since entries are scoped
|
|
1834
|
-
if (fromIndex === -1 && e.navigationType === "traverse") {
|
|
1835
|
-
fromIndex = screenStack.findIndex(screen => {
|
|
1836
|
-
if (!transition?.from.url)
|
|
1837
|
-
return false;
|
|
1838
|
-
return (0,core_namespaceObject.matchRoute)(screen.props.path, new URL(transition.from.url).pathname, this.baseURLPattern.pathname, screen.props.caseSensitive);
|
|
1839
|
-
});
|
|
522
|
+
this.dispatchEvent(S), this.isPanning = !0;
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
onTouchEnd(a) {
|
|
526
|
+
const h = parseInt(this.currentTarget.dataset.numberoftaps || "0") || this.config.numberOfTaps;
|
|
527
|
+
if (this.taps++, this.shouldFire = this.taps > h, this.shouldFire) {
|
|
528
|
+
this.touchEnd = a, this.touchEndTime = a.timeStamp;
|
|
529
|
+
const y = parseFloat(this.currentTarget.dataset.tapdelay || "0") || this.config.tapDelay;
|
|
530
|
+
if (!this.touchMoved && !this.isLongPress)
|
|
531
|
+
if (this.taps === 1 || this.touchEndTime - this.lastTouchTime < y) {
|
|
532
|
+
if (this.taps % 2 === h) {
|
|
533
|
+
const _ = new u.default(a);
|
|
534
|
+
this.dispatchEvent(_), this.taps = 0;
|
|
1840
535
|
}
|
|
1841
|
-
const
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
});
|
|
1866
|
-
}));
|
|
1867
|
-
};
|
|
1868
|
-
let commit;
|
|
1869
|
-
if (isGesture(e.info)) {
|
|
1870
|
-
commit = "after-transition";
|
|
1871
|
-
this.addEventListener("gesture-end", () => e.commit?.(), { once: true });
|
|
1872
|
-
this.addEventListener("gesture-cancel", this.onGestureCancel, { once: true });
|
|
1873
|
-
}
|
|
1874
|
-
else {
|
|
1875
|
-
commit = "immediate";
|
|
1876
|
-
}
|
|
1877
|
-
const options = { handler, commit };
|
|
1878
|
-
e.intercept(options);
|
|
1879
|
-
}
|
|
1880
|
-
async dispatchLifecycleHandlers(incomingScreen, outgoingScreen, signal) {
|
|
1881
|
-
let animationStarted = false;
|
|
1882
|
-
this.addEventListener('transition-start', () => animationStarted = true, { once: true });
|
|
1883
|
-
await Promise.all([
|
|
1884
|
-
outgoingScreen?.current?.onExit(signal),
|
|
1885
|
-
incomingScreen?.current?.onEnter(signal),
|
|
1886
|
-
incomingScreen?.current?.load(signal)
|
|
1887
|
-
]);
|
|
1888
|
-
if (animationStarted)
|
|
1889
|
-
await new Promise((resolve) => this.addEventListener('transition-end', resolve, { once: true }));
|
|
1890
|
-
// if gesture navigation cancelled then exit here
|
|
1891
|
-
if (this.state.controller?.signal.aborted)
|
|
1892
|
-
return;
|
|
1893
|
-
await Promise.all([
|
|
1894
|
-
outgoingScreen?.current?.onExited(signal).then(() => outgoingScreen.current?.blur()),
|
|
1895
|
-
incomingScreen?.current?.onEntered(signal).then(() => incomingScreen.current?.focus())
|
|
1896
|
-
]);
|
|
1897
|
-
}
|
|
1898
|
-
screenTransition(incomingScreen, outgoingScreen) {
|
|
1899
|
-
const { backNavigating } = this;
|
|
1900
|
-
if (this.screenTransitionLayer.current && incomingScreen && outgoingScreen) {
|
|
1901
|
-
this.screenTransitionLayer.current.direction = backNavigating ? 'reverse' : 'normal';
|
|
1902
|
-
if (incomingScreen.current?.transitionProvider.current) {
|
|
1903
|
-
incomingScreen.current.transitionProvider.current.exiting = false;
|
|
1904
|
-
}
|
|
1905
|
-
if (outgoingScreen.current?.transitionProvider.current) {
|
|
1906
|
-
outgoingScreen.current.transitionProvider.current.exiting = true;
|
|
1907
|
-
}
|
|
1908
|
-
if (this.screenTransitionLayer.current.sharedElementTransitionLayer.current) {
|
|
1909
|
-
this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = outgoingScreen;
|
|
1910
|
-
this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = incomingScreen;
|
|
1911
|
-
}
|
|
1912
|
-
const topScreenIndex = this.screens.findIndex(screen => screen.ref === (backNavigating ? outgoingScreen : incomingScreen));
|
|
1913
|
-
this.screenTransitionLayer.current.screens = this.screens
|
|
1914
|
-
.map((screen, index) => {
|
|
1915
|
-
// normalise indices making incoming screen index 1 and preceding screens index 0...-n
|
|
1916
|
-
index = (index - topScreenIndex) + 1;
|
|
1917
|
-
if (isRefObject(screen.ref) && screen.ref.current?.transitionProvider.current) {
|
|
1918
|
-
screen.ref.current.transitionProvider.current.index = index;
|
|
1919
|
-
return screen.ref;
|
|
1920
|
-
}
|
|
1921
|
-
return null;
|
|
1922
|
-
})
|
|
1923
|
-
.filter(isRefObject);
|
|
1924
|
-
return this.screenTransitionLayer.current.transition();
|
|
1925
|
-
}
|
|
1926
|
-
}
|
|
536
|
+
const E = new d.default(a);
|
|
537
|
+
this.dispatchEvent(E);
|
|
538
|
+
} else
|
|
539
|
+
this.taps = 0;
|
|
540
|
+
}
|
|
541
|
+
this.pointers = this.touchEnd.touches.length, this.lastTouchTime = this.touchEndTime, this.onPointerLeave(a), this.unbind(this.currentTarget), this.clean();
|
|
542
|
+
}
|
|
543
|
+
onTouchCancel(a) {
|
|
544
|
+
this.shouldFire && (this.touchCancel = a, this.unbind(this.currentTarget), this.clean());
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
e.default = f, f.listening = !1, TouchEvent && (window.gestureProvider = new f());
|
|
548
|
+
})(kt);
|
|
549
|
+
class ae extends Event {
|
|
550
|
+
routerId;
|
|
551
|
+
route;
|
|
552
|
+
props;
|
|
553
|
+
navigationType;
|
|
554
|
+
signal;
|
|
555
|
+
committed;
|
|
556
|
+
transition;
|
|
557
|
+
constructor(t, n, r, s, i, o, d) {
|
|
558
|
+
super("navigate"), this.routerId = t, this.route = n, this.props = r, this.navigationType = s ?? "push", this.signal = i, this.committed = o, this.transition = d;
|
|
559
|
+
}
|
|
1927
560
|
}
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
return (0,core_namespaceObject.useNavigationBase)();
|
|
561
|
+
class oe extends Event {
|
|
562
|
+
routerId;
|
|
563
|
+
signal;
|
|
564
|
+
committed;
|
|
565
|
+
transition;
|
|
566
|
+
constructor(t, n, r, s) {
|
|
567
|
+
super("back"), this.routerId = t, this.signal = n, this.committed = r, this.transition = s;
|
|
568
|
+
}
|
|
1937
569
|
}
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
570
|
+
class ce extends Event {
|
|
571
|
+
routerId;
|
|
572
|
+
signal;
|
|
573
|
+
committed;
|
|
574
|
+
transition;
|
|
575
|
+
constructor(t, n, r, s) {
|
|
576
|
+
super("forward"), this.routerId = t, this.signal = n, this.committed = r, this.transition = s;
|
|
577
|
+
}
|
|
1941
578
|
}
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
579
|
+
class ue extends Event {
|
|
580
|
+
source;
|
|
581
|
+
constructor(t) {
|
|
582
|
+
super("gesture-start"), this.source = t;
|
|
583
|
+
}
|
|
1945
584
|
}
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
585
|
+
class he extends Event {
|
|
586
|
+
source;
|
|
587
|
+
constructor(t) {
|
|
588
|
+
super("gesture-end"), this.source = t;
|
|
589
|
+
}
|
|
1949
590
|
}
|
|
1950
|
-
|
|
1951
|
-
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
|
|
1955
|
-
|
|
1956
|
-
function useNavigationOrDefault(navigation) {
|
|
1957
|
-
const defaultNavigation = useNavigation();
|
|
1958
|
-
return navigation ?? defaultNavigation;
|
|
591
|
+
class le extends Event {
|
|
592
|
+
constructor() {
|
|
593
|
+
super("gesture-cancel");
|
|
594
|
+
}
|
|
1959
595
|
}
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1984
|
-
|
|
1985
|
-
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
1990
|
-
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
|
|
596
|
+
class de {
|
|
597
|
+
routerId;
|
|
598
|
+
#t;
|
|
599
|
+
index;
|
|
600
|
+
constructor(t, n, r) {
|
|
601
|
+
this.#t = t, this.routerId = n, this.index = r;
|
|
602
|
+
}
|
|
603
|
+
set ondispose(t) {
|
|
604
|
+
this.#t.ondispose = t;
|
|
605
|
+
}
|
|
606
|
+
get ondispose() {
|
|
607
|
+
return this.#t.ondispose;
|
|
608
|
+
}
|
|
609
|
+
get id() {
|
|
610
|
+
return this.#t.id;
|
|
611
|
+
}
|
|
612
|
+
get globalIndex() {
|
|
613
|
+
return this.#t.index;
|
|
614
|
+
}
|
|
615
|
+
get url() {
|
|
616
|
+
return this.#t.url ? new URL(this.#t.url) : null;
|
|
617
|
+
}
|
|
618
|
+
get key() {
|
|
619
|
+
return this.#t.key;
|
|
620
|
+
}
|
|
621
|
+
get sameDocument() {
|
|
622
|
+
return this.#t.sameDocument;
|
|
623
|
+
}
|
|
624
|
+
addEventListener(t, n, r) {
|
|
625
|
+
return this.#t.addEventListener(t, n, r), () => this.#t.removeEventListener(t, n, r);
|
|
626
|
+
}
|
|
627
|
+
removeEventListener(t, n, r) {
|
|
628
|
+
this.#t.addEventListener(t, n, r);
|
|
629
|
+
}
|
|
630
|
+
dispatchEvent(t) {
|
|
631
|
+
return this.#t.dispatchEvent(t);
|
|
632
|
+
}
|
|
633
|
+
getState() {
|
|
634
|
+
return this.#t.getState();
|
|
635
|
+
}
|
|
1995
636
|
}
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
{
|
|
2003
|
-
|
|
2004
|
-
|
|
2005
|
-
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
}
|
|
2013
|
-
|
|
2014
|
-
|
|
2015
|
-
|
|
2016
|
-
|
|
2017
|
-
},
|
|
2018
|
-
{
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
{
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
{
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
{
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
const SlideInFromTopKeyframes = [
|
|
2087
|
-
{
|
|
2088
|
-
transform: 'translateY(-100vh)'
|
|
2089
|
-
},
|
|
2090
|
-
{
|
|
2091
|
-
transform: 'translateY(0vh)'
|
|
2092
|
-
}
|
|
2093
|
-
];
|
|
2094
|
-
const SlideOutToBottomKeyframes = [
|
|
2095
|
-
{
|
|
2096
|
-
transform: 'translateY(0vh)'
|
|
2097
|
-
},
|
|
2098
|
-
{
|
|
2099
|
-
transform: 'translateY(50vh)'
|
|
2100
|
-
}
|
|
2101
|
-
];
|
|
2102
|
-
const ZoomInKeyframes = [
|
|
2103
|
-
{
|
|
2104
|
-
transform: 'scale(0.85)',
|
|
2105
|
-
opacity: 0
|
|
2106
|
-
},
|
|
2107
|
-
{
|
|
2108
|
-
transform: 'scale(1)',
|
|
2109
|
-
opacity: 1
|
|
2110
|
-
}
|
|
2111
|
-
];
|
|
2112
|
-
const ZoomOutKeyframes = [
|
|
2113
|
-
{
|
|
2114
|
-
transform: 'scale(1)',
|
|
2115
|
-
opacity: 1
|
|
2116
|
-
},
|
|
2117
|
-
{
|
|
2118
|
-
transform: 'scale(1.15)',
|
|
2119
|
-
opacity: 0
|
|
2120
|
-
}
|
|
2121
|
-
];
|
|
2122
|
-
const FadeInKeyframes = [
|
|
2123
|
-
{
|
|
2124
|
-
opacity: 0
|
|
2125
|
-
},
|
|
2126
|
-
{
|
|
2127
|
-
opacity: 1
|
|
2128
|
-
}
|
|
2129
|
-
];
|
|
2130
|
-
const FadeOutKeyframes = [
|
|
2131
|
-
{
|
|
2132
|
-
opacity: 1
|
|
2133
|
-
},
|
|
2134
|
-
{
|
|
2135
|
-
opacity: 0
|
|
2136
|
-
}
|
|
2137
|
-
];
|
|
2138
|
-
const androidFadeInFromBottomKeyframes = [
|
|
2139
|
-
{
|
|
2140
|
-
opacity: 0,
|
|
2141
|
-
transform: 'translateY(calc(100vh * 0.08))'
|
|
2142
|
-
},
|
|
2143
|
-
{
|
|
2144
|
-
opacity: 0.25,
|
|
2145
|
-
offset: 0.5
|
|
2146
|
-
},
|
|
2147
|
-
{
|
|
2148
|
-
opacity: 0.7,
|
|
2149
|
-
offset: 0.9
|
|
2150
|
-
},
|
|
2151
|
-
{
|
|
2152
|
-
opacity: 1,
|
|
2153
|
-
transform: 'translateY(0vh)'
|
|
2154
|
-
}
|
|
2155
|
-
];
|
|
2156
|
-
const androidFadeInFromRightKeyframes = [
|
|
2157
|
-
{
|
|
2158
|
-
opacity: 0,
|
|
2159
|
-
transform: 'translateY(96vw)'
|
|
2160
|
-
},
|
|
2161
|
-
{
|
|
2162
|
-
opacity: 1,
|
|
2163
|
-
transform: 'translateY(0vw)'
|
|
2164
|
-
}
|
|
2165
|
-
];
|
|
2166
|
-
const androidFadeOutToLeftKeyframes = [
|
|
2167
|
-
{
|
|
2168
|
-
opacity: 0,
|
|
2169
|
-
transform: 'translateY(0vw)'
|
|
2170
|
-
},
|
|
2171
|
-
{
|
|
2172
|
-
opacity: 1,
|
|
2173
|
-
transform: 'translateY(-96vw)'
|
|
2174
|
-
}
|
|
2175
|
-
];
|
|
2176
|
-
const androidRevealFromBottomKeyframes = [
|
|
2177
|
-
{
|
|
2178
|
-
transform: 'translateY(100vh)'
|
|
2179
|
-
},
|
|
2180
|
-
{
|
|
2181
|
-
transform: 'translateY(0vh)'
|
|
2182
|
-
}
|
|
2183
|
-
];
|
|
2184
|
-
const androidConcealToBottomKeyframes = [
|
|
2185
|
-
{
|
|
2186
|
-
transform: 'translateY(0vh)'
|
|
2187
|
-
},
|
|
2188
|
-
{
|
|
2189
|
-
transform: 'translateY(-2vh)'
|
|
2190
|
-
}
|
|
2191
|
-
];
|
|
2192
|
-
const androidScaleFromCentreKeyframes = [
|
|
2193
|
-
{
|
|
2194
|
-
transform: 'scale(0.85)',
|
|
2195
|
-
opacity: 0
|
|
2196
|
-
},
|
|
637
|
+
class fe extends dt {
|
|
638
|
+
router;
|
|
639
|
+
constructor(t) {
|
|
640
|
+
super(), this.router = t;
|
|
641
|
+
}
|
|
642
|
+
replace(t, n = {}, r = {}) {
|
|
643
|
+
return this.navigate(t, n, { ...r, type: "replace" });
|
|
644
|
+
}
|
|
645
|
+
push(t, n = {}, r = {}) {
|
|
646
|
+
return this.navigate(t, n, { ...r, type: "push" });
|
|
647
|
+
}
|
|
648
|
+
reload(t = {}) {
|
|
649
|
+
return window.navigation.reload({ state: t });
|
|
650
|
+
}
|
|
651
|
+
traverseTo(t, n = {}) {
|
|
652
|
+
const r = window.navigation.traverseTo(t), s = window.navigation.transition, i = s.from.index, o = window.navigation.entries().findIndex((l) => l.key === t), d = new AbortController();
|
|
653
|
+
d.signal.addEventListener("abort", () => this.traverseTo(s.from.key), { once: !0 }), n.signal?.addEventListener("abort", d.abort, { once: !0 });
|
|
654
|
+
let u;
|
|
655
|
+
return i > o ? u = this.createBackEvent(d.signal, r.committed, s) : u = this.createForwardEvent(d.signal, r.committed, s), this.dispatchEvent?.(u), r;
|
|
656
|
+
}
|
|
657
|
+
navigate(t, n = {}, r = {}) {
|
|
658
|
+
const { type: s = "push" } = r, i = new URL(t, this.baseURL), o = window.navigation.navigate(i.href, { history: s, state: n }), d = window.navigation.transition, u = new AbortController();
|
|
659
|
+
u.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), r.signal?.addEventListener("abort", u.abort, { once: !0 });
|
|
660
|
+
const l = this.createNavigateEvent(t, n, s, u.signal, o.committed, d);
|
|
661
|
+
return this.dispatchEvent?.(l), o;
|
|
662
|
+
}
|
|
663
|
+
goBack(t = {}) {
|
|
664
|
+
if (!this.canGoBack())
|
|
665
|
+
return;
|
|
666
|
+
const n = window.navigation.traverseTo(this.previous.key), r = window.navigation.transition, s = new AbortController();
|
|
667
|
+
s.signal.addEventListener("abort", () => this.goForward(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
|
|
668
|
+
const i = this.createBackEvent(s.signal, n.committed, r);
|
|
669
|
+
return this.dispatchEvent?.(i), n;
|
|
670
|
+
}
|
|
671
|
+
goForward(t = {}) {
|
|
672
|
+
if (!this.canGoForward())
|
|
673
|
+
return;
|
|
674
|
+
const n = window.navigation.traverseTo(this.next.key), r = window.navigation.transition, s = new AbortController();
|
|
675
|
+
s.signal.addEventListener("abort", () => this.goBack(), { once: !0 }), t.signal?.addEventListener("abort", s.abort, { once: !0 });
|
|
676
|
+
const i = this.createForwardEvent(s.signal, n.committed, r);
|
|
677
|
+
return this.dispatchEvent?.(i), n;
|
|
678
|
+
}
|
|
679
|
+
createBackEvent(t, n, r) {
|
|
680
|
+
if (!this.routerId)
|
|
681
|
+
throw new Error("Router ID is not set");
|
|
682
|
+
return new oe(this.routerId, t, n, r);
|
|
683
|
+
}
|
|
684
|
+
createForwardEvent(t, n, r) {
|
|
685
|
+
if (!this.routerId)
|
|
686
|
+
throw new Error("Router ID is not set");
|
|
687
|
+
return new ce(this.routerId, t, n, r);
|
|
688
|
+
}
|
|
689
|
+
createNavigateEvent(t, n, r, s, i, o) {
|
|
690
|
+
if (!this.routerId)
|
|
691
|
+
throw new Error("Router ID is not set");
|
|
692
|
+
return new ae(
|
|
693
|
+
this.routerId,
|
|
694
|
+
t,
|
|
695
|
+
n,
|
|
696
|
+
r,
|
|
697
|
+
s,
|
|
698
|
+
i,
|
|
699
|
+
o
|
|
700
|
+
);
|
|
701
|
+
}
|
|
702
|
+
get committed() {
|
|
703
|
+
return this.router.committed;
|
|
704
|
+
}
|
|
705
|
+
get transition() {
|
|
706
|
+
return this.router.state.transition;
|
|
707
|
+
}
|
|
708
|
+
get globalEntries() {
|
|
709
|
+
return window.navigation.entries();
|
|
710
|
+
}
|
|
711
|
+
get entries() {
|
|
712
|
+
const t = this.router.pathPatterns.filter(({ pattern: r }) => r.endsWith("**"));
|
|
713
|
+
let n = !1;
|
|
714
|
+
return this.globalEntries.filter((r) => {
|
|
715
|
+
if (!r.url)
|
|
716
|
+
return !1;
|
|
717
|
+
const s = new URL(r.url);
|
|
718
|
+
return ft(this.baseURLPattern.pathname, s.pathname) ? ot(t, s.pathname, this.baseURLPattern.pathname) ? n ? !1 : n = !0 : (n = !1, !0) : !1;
|
|
719
|
+
}).map((r, s) => new de(r, this.routerId, s));
|
|
720
|
+
}
|
|
721
|
+
get index() {
|
|
722
|
+
const t = window.navigation.currentEntry?.index ?? -1, n = this.entries.at(0)?.globalIndex ?? -1, r = this.entries.at(-1)?.globalIndex ?? -1;
|
|
723
|
+
if (t <= n)
|
|
724
|
+
return 0;
|
|
725
|
+
if (t >= r)
|
|
726
|
+
return this.entries.length - 1;
|
|
2197
727
|
{
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
}
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
];
|
|
2210
|
-
|
|
2211
|
-
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
offset: 0.0825
|
|
2218
|
-
},
|
|
2219
|
-
{
|
|
2220
|
-
opacity: 1,
|
|
2221
|
-
offset: 0.2075
|
|
2222
|
-
},
|
|
2223
|
-
{
|
|
2224
|
-
transform: 'scale(1.075)',
|
|
2225
|
-
opacity: 0
|
|
2226
|
-
}
|
|
2227
|
-
];
|
|
2228
|
-
const androidFadeInFromBottomSheetKeyframes = [
|
|
2229
|
-
{
|
|
2230
|
-
transform: 'translateY(calc(100vh * 0.8))',
|
|
2231
|
-
opacity: 0
|
|
2232
|
-
},
|
|
2233
|
-
{
|
|
2234
|
-
transform: 'translateY(0vh)',
|
|
2235
|
-
opacity: 1
|
|
2236
|
-
}
|
|
2237
|
-
];
|
|
2238
|
-
|
|
2239
|
-
;// CONCATENATED MODULE: ./src/animation-configs/keyframe-options-presets.ts
|
|
2240
|
-
|
|
2241
|
-
function easingOut(easing) {
|
|
2242
|
-
return t => 1 - easing(1 - t);
|
|
728
|
+
const s = this.globalEntries.slice(n, t + 1);
|
|
729
|
+
return this.entries.findLastIndex((i) => s.findLastIndex((o) => i.key === o.key) > -1);
|
|
730
|
+
}
|
|
731
|
+
}
|
|
732
|
+
get previous() {
|
|
733
|
+
return this.entries[this.index - 1] ?? null;
|
|
734
|
+
}
|
|
735
|
+
get next() {
|
|
736
|
+
return this.entries[this.index + 1] ?? null;
|
|
737
|
+
}
|
|
738
|
+
get current() {
|
|
739
|
+
return this.entries[this.index];
|
|
740
|
+
}
|
|
741
|
+
canGoBack() {
|
|
742
|
+
return !!this.previous?.sameDocument;
|
|
743
|
+
}
|
|
744
|
+
canGoForward() {
|
|
745
|
+
return !!this.next?.sameDocument;
|
|
746
|
+
}
|
|
2243
747
|
}
|
|
2244
|
-
function
|
|
2245
|
-
|
|
748
|
+
function ve(e) {
|
|
749
|
+
return Object.fromEntries(e.entries());
|
|
2246
750
|
}
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
}
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
751
|
+
function ge(e) {
|
|
752
|
+
return new URLSearchParams(e).toString();
|
|
753
|
+
}
|
|
754
|
+
function pe(e) {
|
|
755
|
+
return e && typeof e == "object" && "gesture" in e ? !!e.gesture : !1;
|
|
756
|
+
}
|
|
757
|
+
function me(e) {
|
|
758
|
+
return e && typeof e == "object" && "rollback" in e ? !!e.rollback : !1;
|
|
759
|
+
}
|
|
760
|
+
function N(e, t) {
|
|
761
|
+
if (e === t)
|
|
762
|
+
return !0;
|
|
763
|
+
if (e === null || t === null || typeof e != "object" || typeof t != "object")
|
|
764
|
+
return !1;
|
|
765
|
+
const n = Object.keys(e), r = Object.keys(t);
|
|
766
|
+
if (n.length !== r.length)
|
|
767
|
+
return !1;
|
|
768
|
+
for (let s of n)
|
|
769
|
+
if (!r.includes(s) || !N(e[s], t[s]))
|
|
770
|
+
return !1;
|
|
771
|
+
return !0;
|
|
772
|
+
}
|
|
773
|
+
class ze extends vt {
|
|
774
|
+
#t;
|
|
775
|
+
constructor(t, n) {
|
|
776
|
+
super(t, n);
|
|
777
|
+
const r = n, s = this.internalProps.id, i = r.navigation.entries.find((o) => o.key === s);
|
|
778
|
+
if (!i)
|
|
779
|
+
throw new Error(`No history entry found for: ${s}`);
|
|
780
|
+
this.#t = i;
|
|
781
|
+
}
|
|
782
|
+
static getDerivedStateFromProps(t) {
|
|
783
|
+
return t.config?.presentation === "dialog" || t.config?.presentation === "modal" ? { elementType: "dialog" } : { elementType: "div" };
|
|
784
|
+
}
|
|
785
|
+
setParams(t) {
|
|
786
|
+
super.setParams(t), this.setHistoryState(({ params: n }) => ({ params: { ...n, ...t } }));
|
|
787
|
+
}
|
|
788
|
+
setConfig(t) {
|
|
789
|
+
super.setConfig(t);
|
|
790
|
+
}
|
|
791
|
+
get router() {
|
|
792
|
+
return this.context;
|
|
793
|
+
}
|
|
794
|
+
get internalProps() {
|
|
795
|
+
return this.props;
|
|
796
|
+
}
|
|
797
|
+
get resolvedPathname() {
|
|
798
|
+
return this.internalProps.resolvedPathname;
|
|
799
|
+
}
|
|
800
|
+
get historyEntryState() {
|
|
801
|
+
const t = this.#t;
|
|
802
|
+
if (t?.url) {
|
|
803
|
+
const n = t.getState() ?? {}, r = ve(t.url.searchParams), s = K(
|
|
804
|
+
this.props.path,
|
|
805
|
+
t.url.pathname,
|
|
806
|
+
this.context.baseURLPattern.pathname,
|
|
807
|
+
this.props.caseSensitive
|
|
808
|
+
)?.params;
|
|
809
|
+
return n.params = {
|
|
810
|
+
...n.params,
|
|
811
|
+
...r,
|
|
812
|
+
...s
|
|
813
|
+
}, n;
|
|
814
|
+
}
|
|
815
|
+
return {};
|
|
816
|
+
}
|
|
817
|
+
get id() {
|
|
818
|
+
return this.internalProps.id.toString();
|
|
819
|
+
}
|
|
820
|
+
get params() {
|
|
821
|
+
return {
|
|
822
|
+
...this.props.defaultParams,
|
|
823
|
+
...this.historyEntryState.params,
|
|
824
|
+
...this.state.params
|
|
825
|
+
};
|
|
826
|
+
}
|
|
827
|
+
get config() {
|
|
828
|
+
return {
|
|
829
|
+
...this.props.config,
|
|
830
|
+
...this.historyEntryState.config,
|
|
831
|
+
...this.state.config
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
get routeProp() {
|
|
835
|
+
const t = this.setParams.bind(this), n = this.setConfig.bind(this), { path: r } = this.props, { focused: s } = this.state, { params: i, config: o, resolvedPathname: d } = this;
|
|
836
|
+
return {
|
|
837
|
+
setParams: t,
|
|
838
|
+
setConfig: n,
|
|
839
|
+
path: r,
|
|
840
|
+
resolvedPathname: d,
|
|
841
|
+
focused: s,
|
|
842
|
+
params: i,
|
|
843
|
+
config: o
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
setHistoryState(t) {
|
|
847
|
+
if (!this.state.focused)
|
|
848
|
+
return;
|
|
849
|
+
const n = this.#t.getState() ?? {};
|
|
850
|
+
t instanceof Function && (t = t(n));
|
|
851
|
+
const r = {
|
|
852
|
+
...n ?? {},
|
|
853
|
+
...t
|
|
854
|
+
};
|
|
855
|
+
window.navigation.updateCurrentEntry({ state: r });
|
|
856
|
+
}
|
|
857
|
+
onClickOutside(t) {
|
|
858
|
+
if (!this.transitionProvider.current?.ref.current)
|
|
859
|
+
return;
|
|
860
|
+
const n = this.context?.navigation, r = this.transitionProvider.current.ref.current.getBoundingClientRect();
|
|
861
|
+
r.top <= t.clientY && t.clientY <= r.top + r.height && r.left <= t.clientX && t.clientX <= r.left + r.width || n?.goBack();
|
|
862
|
+
}
|
|
863
|
+
onEnter(t) {
|
|
864
|
+
if (this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.open === !1) {
|
|
865
|
+
const n = this.context?.navigation;
|
|
866
|
+
this.props.config?.presentation === "modal" ? this.transitionProvider.current.ref.current.showModal() : this.transitionProvider.current.ref.current.show(), this.transitionProvider.current.ref.current.style.maxHeight = "unset", this.transitionProvider.current.ref.current.style.maxWidth = "unset", this.transitionProvider.current.ref.current.style.width = "max-content", this.transitionProvider.current.ref.current.style.height = "max-content", this.ref.current && (this.ref.current.style.width = "max-content", this.ref.current.style.height = "max-content");
|
|
867
|
+
const r = this.onClickOutside.bind(this);
|
|
868
|
+
this.transitionProvider.current?.ref.current.addEventListener("close", function() {
|
|
869
|
+
this.returnValue !== "screen-exit" && (this.style.display = "block", n?.goBack()), n?.removeEventListener("click", r);
|
|
870
|
+
}, { once: !0 }), n?.addEventListener("click", r);
|
|
871
|
+
}
|
|
872
|
+
return super.onEnter(t);
|
|
873
|
+
}
|
|
874
|
+
onExited(t) {
|
|
875
|
+
return this.transitionProvider.current?.ref.current instanceof HTMLDialogElement && this.transitionProvider.current.ref.current.close("screen-exit"), super.onExited(t);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
function T(e) {
|
|
879
|
+
return !!(e !== null && typeof e == "object" && e.hasOwnProperty("current"));
|
|
880
|
+
}
|
|
881
|
+
const ye = {
|
|
882
|
+
horizontal: ["left", "right"],
|
|
883
|
+
vertical: ["up", "down"],
|
|
884
|
+
up: ["up"],
|
|
885
|
+
down: ["down"],
|
|
886
|
+
left: ["left"],
|
|
887
|
+
right: ["right"]
|
|
2275
888
|
};
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
889
|
+
function we(e, t) {
|
|
890
|
+
return ye[t].includes(e);
|
|
891
|
+
}
|
|
892
|
+
function Ee(e, { x: t, y: n }, r, s) {
|
|
893
|
+
if (e === "right" && Math.abs(t - r.left) >= s || e === "left" && Math.abs(t - r.right) >= s || e === "down" && Math.abs(n - r.top) >= s || e === "up" && Math.abs(n - r.bottom) >= s)
|
|
894
|
+
return !1;
|
|
895
|
+
}
|
|
896
|
+
function Pe(e) {
|
|
897
|
+
return e === "left" || e === "right" || e === "horizontal";
|
|
898
|
+
}
|
|
899
|
+
const D = {
|
|
900
|
+
gestureHysteresis: 0.5,
|
|
901
|
+
gestureMinFlingVelocity: 400,
|
|
902
|
+
gestureAreaWidth: 100,
|
|
903
|
+
gestureDirection: "right",
|
|
904
|
+
gestureDisabled: !1
|
|
2279
905
|
};
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
return new KeyframeEffect(ref, keyframes, options);
|
|
906
|
+
class Se {
|
|
907
|
+
promise;
|
|
908
|
+
state;
|
|
909
|
+
nativeResolve;
|
|
910
|
+
nativeReject;
|
|
911
|
+
constructor() {
|
|
912
|
+
this.state = "pending", this.nativeResolve = this.nativeReject = null, this.promise = new Promise((t, n) => {
|
|
913
|
+
this.nativeResolve = t, this.nativeReject = n;
|
|
914
|
+
});
|
|
915
|
+
}
|
|
916
|
+
resolve(t) {
|
|
917
|
+
this.state = "resolved", this.nativeResolve?.(t);
|
|
918
|
+
}
|
|
919
|
+
reject(t) {
|
|
920
|
+
this.state = "rejected", this.promise.catch(() => {
|
|
921
|
+
}), this.nativeReject?.(t);
|
|
922
|
+
}
|
|
2298
923
|
}
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
924
|
+
class Ge extends gt {
|
|
925
|
+
navigation = new fe(this);
|
|
926
|
+
#t = null;
|
|
927
|
+
constructor(t, n) {
|
|
928
|
+
super(t, n), this.state = {
|
|
929
|
+
screenStack: [],
|
|
930
|
+
gestureDirection: "horizontal",
|
|
931
|
+
gestureAreaWidth: 50,
|
|
932
|
+
gestureHysteresis: 0.5,
|
|
933
|
+
gestureDisabled: !0,
|
|
934
|
+
gestureMinFlingVelocity: 500,
|
|
935
|
+
transition: null,
|
|
936
|
+
documentTitle: document.title,
|
|
937
|
+
fromKey: null,
|
|
938
|
+
destinationKey: null,
|
|
939
|
+
controller: null
|
|
2309
940
|
};
|
|
2310
|
-
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
941
|
+
}
|
|
942
|
+
static defaultProps = {
|
|
943
|
+
config: {
|
|
944
|
+
screenConfig: {
|
|
945
|
+
...D
|
|
946
|
+
}
|
|
947
|
+
}
|
|
948
|
+
};
|
|
949
|
+
static getDerivedStateFromProps(t, n) {
|
|
950
|
+
const r = n.screenStack.find((s) => T(s.ref) && s.ref.current?.focused)?.props.config;
|
|
951
|
+
return document.title = r?.title ?? document.title, {
|
|
952
|
+
gestureDirection: r?.gestureDirection ?? D.gestureDirection,
|
|
953
|
+
gestureAreaWidth: r?.gestureAreaWidth ?? D.gestureAreaWidth,
|
|
954
|
+
gestureMinFlingVelocity: r?.gestureMinFlingVelocity ?? D.gestureMinFlingVelocity,
|
|
955
|
+
gestureHysteresis: r?.gestureHysteresis ?? D.gestureHysteresis,
|
|
956
|
+
gestureDisabled: r?.gestureDisabled ?? D.gestureDisabled,
|
|
957
|
+
documentTitle: r?.title
|
|
2320
958
|
};
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
}
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
959
|
+
}
|
|
960
|
+
componentDidMount() {
|
|
961
|
+
super.componentDidMount(), this.ref.current?.addEventListener("swipestart", this.onSwipeStart), this.ref.current?.addEventListener("swipeend", this.onSwipeEnd), window.navigation.addEventListener("currententrychange", this.onCurrentEntryChange), window.navigation.addEventListener("navigate", this.onNavigate), window.navigation.addEventListener("navigatesuccess", this.onNavigateSuccess), window.navigation.addEventListener("navigateerror", this.onNavigateError);
|
|
962
|
+
}
|
|
963
|
+
shouldComponentUpdate(t, n) {
|
|
964
|
+
return !N(this.props.config, t.config) || !N(this.state, n) || this.props.id !== t.id;
|
|
965
|
+
}
|
|
966
|
+
componentWillUnmount() {
|
|
967
|
+
this.ref.current?.removeEventListener("swipestart", this.onSwipeStart), this.ref.current?.removeEventListener("swipeend", this.onSwipeEnd), window.navigation.removeEventListener("currententrychange", this.onCurrentEntryChange), window.navigation.removeEventListener("navigate", this.onNavigate), window.navigation.removeEventListener("navigatesuccess", this.onNavigateSuccess), window.navigation.removeEventListener("navigateerror", this.onNavigateError);
|
|
968
|
+
}
|
|
969
|
+
onNavigate = () => {
|
|
970
|
+
this.#t = new Se();
|
|
971
|
+
};
|
|
972
|
+
onCurrentEntryChange = () => {
|
|
973
|
+
this.#t?.nativeResolve?.(window.navigation.currentEntry);
|
|
974
|
+
};
|
|
975
|
+
onNavigateSuccess = () => {
|
|
976
|
+
this.#t = null;
|
|
977
|
+
};
|
|
978
|
+
onNavigateError = ({ error: t }) => {
|
|
979
|
+
this.#t?.state === "pending" && this.#t.nativeReject?.(t), this.#t = null;
|
|
980
|
+
};
|
|
981
|
+
onGestureCancel = () => {
|
|
982
|
+
if (!this.state.transition)
|
|
983
|
+
throw new Error("Rollback failed, transition is null");
|
|
984
|
+
window.navigation.traverseTo(this.state.transition.from.key, { info: { rollback: !0 } });
|
|
985
|
+
};
|
|
986
|
+
canGestureNavigate(t) {
|
|
987
|
+
if (!this.ref.current || this.state.gestureDisabled)
|
|
988
|
+
return !1;
|
|
989
|
+
const n = this.ref.current.getBoundingClientRect(), { direction: r } = t;
|
|
990
|
+
return (r === "down" || r === "right") && !this.navigation.canGoBack() || (r === "up" || r === "left") && !this.navigation.canGoForward() || Ee(r, t, n, this.state.gestureAreaWidth) ? !1 : we(r, this.state.gestureDirection);
|
|
991
|
+
}
|
|
992
|
+
onSwipeStart = (t) => {
|
|
993
|
+
if (!this.canGestureNavigate(t) || !this.ref.current || !this.screenTransitionLayer.current)
|
|
994
|
+
return;
|
|
995
|
+
const { direction: n } = t;
|
|
996
|
+
let r = Pe(n) ? "x" : "y", s, i;
|
|
997
|
+
switch (n) {
|
|
998
|
+
case "right":
|
|
999
|
+
s = 0, i = this.ref.current.clientWidth;
|
|
1000
|
+
break;
|
|
1001
|
+
case "left":
|
|
1002
|
+
s = this.ref.current.clientWidth, i = 0;
|
|
1003
|
+
break;
|
|
1004
|
+
case "down":
|
|
1005
|
+
s = 0, i = this.ref.current.clientHeight;
|
|
1006
|
+
break;
|
|
1007
|
+
case "up":
|
|
1008
|
+
s = this.ref.current.clientHeight, i = 0;
|
|
1009
|
+
break;
|
|
1010
|
+
}
|
|
1011
|
+
this.screenTransitionLayer.current.animation.timeline = new _t({
|
|
1012
|
+
source: this.ref.current,
|
|
1013
|
+
type: "swipe",
|
|
1014
|
+
axis: r,
|
|
1015
|
+
rangeStart: s,
|
|
1016
|
+
rangeEnd: i
|
|
1017
|
+
});
|
|
1018
|
+
const o = !0;
|
|
1019
|
+
n === "down" || n === "right" ? window.navigation.traverseTo(this.navigation.previous.key, { info: { gesture: o } }) : window.navigation.traverseTo(this.navigation.next.key, { info: { gesture: o } }), this.dispatchEvent(new ue(t));
|
|
1020
|
+
};
|
|
1021
|
+
onSwipeEnd = (t) => {
|
|
1022
|
+
if (!this.screenTransitionLayer.current)
|
|
1023
|
+
return;
|
|
1024
|
+
const n = this.screenTransitionLayer.current.animation.effect?.getComputedTiming().progress ?? 0, r = this.screenTransitionLayer.current.animation.playbackRate;
|
|
1025
|
+
this.screenTransitionLayer.current.animation.timeline = document.timeline;
|
|
1026
|
+
const s = r > 0 ? n > this.state.gestureHysteresis : n < this.state.gestureHysteresis;
|
|
1027
|
+
let i = !1;
|
|
1028
|
+
t.velocity < this.state.gestureMinFlingVelocity && !s ? (i = !0, this.screenTransitionLayer.current.animation.reverse(), this.dispatchEvent(new le())) : this.dispatchEvent(new he(t)), i && this.screenTransitionLayer.current.animation.finished.then(() => {
|
|
1029
|
+
this.state.controller?.abort("gesture-cancel");
|
|
1030
|
+
});
|
|
1031
|
+
};
|
|
1032
|
+
get committed() {
|
|
1033
|
+
return this.#t?.promise ?? null;
|
|
1034
|
+
}
|
|
1035
|
+
get backNavigating() {
|
|
1036
|
+
const t = this.state.screenStack.findIndex((r) => r.key === this.state.fromKey), n = this.state.screenStack.findIndex((r) => r.key === this.state.destinationKey);
|
|
1037
|
+
return n >= 0 && n < t;
|
|
1038
|
+
}
|
|
1039
|
+
get screens() {
|
|
1040
|
+
const t = this.state.screenStack;
|
|
1041
|
+
return t.filter((n, r) => {
|
|
1042
|
+
const s = n.ref ?? null, i = t.at(r + 1)?.ref;
|
|
1043
|
+
return T(s) && s.current?.config.keepAlive || T(i) && i.current?.config.presentation === "modal" || T(i) && i.current?.config.presentation === "dialog" || n.key === this.navigation.current?.key || n.key === this.state.fromKey || n.key === this.state.destinationKey;
|
|
1044
|
+
});
|
|
1045
|
+
}
|
|
1046
|
+
screenChildFromPathname(t, n) {
|
|
1047
|
+
const r = et.toArray(this.props.children).find((s) => X(s) ? K(
|
|
1048
|
+
s.props.path,
|
|
1049
|
+
t,
|
|
1050
|
+
this.baseURLPattern.pathname,
|
|
1051
|
+
s.props.caseSensitive
|
|
1052
|
+
) !== null : !1);
|
|
1053
|
+
return r ? (n ??= crypto.randomUUID(), pt(r, {
|
|
1054
|
+
config: {
|
|
1055
|
+
title: document.title,
|
|
1056
|
+
...this.props.config?.screenConfig,
|
|
1057
|
+
...r.props.config
|
|
1058
|
+
},
|
|
1059
|
+
id: n,
|
|
1060
|
+
resolvedPathname: t,
|
|
1061
|
+
key: n,
|
|
1062
|
+
ref: Pt()
|
|
1063
|
+
})) : null;
|
|
1064
|
+
}
|
|
1065
|
+
getScreenChildByPathname(t) {
|
|
1066
|
+
return et.toArray(this.props.children).find((n) => {
|
|
1067
|
+
if (X(n))
|
|
1068
|
+
return K(
|
|
1069
|
+
n.props.path,
|
|
1070
|
+
t,
|
|
1071
|
+
this.baseURLPattern.pathname,
|
|
1072
|
+
n.props.caseSensitive
|
|
1073
|
+
);
|
|
1074
|
+
});
|
|
1075
|
+
}
|
|
1076
|
+
getScreenRefByKey(t) {
|
|
1077
|
+
const n = this.state.screenStack.find((r) => r.key === t)?.ref;
|
|
1078
|
+
return T(n) ? n : null;
|
|
1079
|
+
}
|
|
1080
|
+
canIntercept(t) {
|
|
1081
|
+
const n = new URL(t.destination.url).pathname, r = this.baseURLPattern.pathname;
|
|
1082
|
+
return this.mounted && this.shouldIntercept(t) && ot(this.pathPatterns, n, r);
|
|
1083
|
+
}
|
|
1084
|
+
shouldIntercept(t) {
|
|
1085
|
+
return t.canIntercept && !t.formData && !t.hashChange && !t.downloadRequest || !!this.props.config?.shouldIntercept?.(t);
|
|
1086
|
+
}
|
|
1087
|
+
intercept(t) {
|
|
1088
|
+
if (t.navigationType !== "load" && this.props.config?.onIntercept?.(t), !t.defaultPrevented)
|
|
1089
|
+
switch (t.navigationType) {
|
|
1090
|
+
case "load":
|
|
1091
|
+
this.handleLoad(t);
|
|
1092
|
+
break;
|
|
1093
|
+
case "reload":
|
|
1094
|
+
case "replace":
|
|
1095
|
+
this.handleReplace(t);
|
|
1096
|
+
break;
|
|
1097
|
+
default:
|
|
1098
|
+
this.handleDefault(t);
|
|
1099
|
+
break;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
handleLoad(t) {
|
|
1103
|
+
const n = () => {
|
|
1104
|
+
const r = t.transition?.from?.key ?? null, s = t.destination.key, i = t.transition, o = new Array(), d = this.navigation.entries;
|
|
1105
|
+
return d.forEach((u) => {
|
|
1106
|
+
if (!u.url)
|
|
1107
|
+
return null;
|
|
1108
|
+
const l = this.screenChildFromPathname(u.url.pathname, u.key);
|
|
1109
|
+
if (!l)
|
|
1110
|
+
return null;
|
|
1111
|
+
o.push(l);
|
|
1112
|
+
}), new Promise((u, l) => j(() => {
|
|
1113
|
+
this.setState({ screenStack: o, fromKey: r, transition: i, destinationKey: s }, async () => {
|
|
1114
|
+
const { initialPathname: m } = this.props.config ?? {}, [P] = d;
|
|
1115
|
+
if (m && d.length === 1 && P.url && !K(
|
|
1116
|
+
m,
|
|
1117
|
+
P.url.pathname,
|
|
1118
|
+
this.baseURLPattern.pathname
|
|
1119
|
+
))
|
|
1120
|
+
return (window.navigation.transition?.finished ?? Promise.resolve()).then(() => {
|
|
1121
|
+
this.navigation.replace(m).finished.then(() => {
|
|
1122
|
+
const f = t.destination.getState() ?? {};
|
|
1123
|
+
this.navigation.push(t.destination.url, f);
|
|
1124
|
+
});
|
|
1125
|
+
}), u();
|
|
1126
|
+
const w = t.signal;
|
|
1127
|
+
this.navigation.current?.key === void 0 && l(new Error("Current key is undefined"));
|
|
1128
|
+
const v = this.getScreenRefByKey(this.navigation.current.key);
|
|
1129
|
+
await this.dispatchLifecycleHandlers(v, null, w).catch(l), this.setState({ destinationKey: null, fromKey: null, transition: null }, u);
|
|
1130
|
+
});
|
|
1131
|
+
}));
|
|
2331
1132
|
};
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
1133
|
+
t.intercept({ handler: n });
|
|
1134
|
+
}
|
|
1135
|
+
handleReplace(t) {
|
|
1136
|
+
const n = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname, i = window.navigation.currentEntry?.key ?? r.key, o = this.screenChildFromPathname(s, i);
|
|
1137
|
+
if (!o)
|
|
1138
|
+
return t.preventDefault();
|
|
1139
|
+
const d = () => {
|
|
1140
|
+
const u = this.state.transition !== null, l = this.state.transition ?? window.navigation.transition, m = l?.from?.key ?? null, P = n.findIndex((w) => w.key === this.navigation.current?.key);
|
|
1141
|
+
return n.splice(
|
|
1142
|
+
P,
|
|
1143
|
+
1,
|
|
1144
|
+
o
|
|
1145
|
+
), new Promise((w, v) => j(() => {
|
|
1146
|
+
this.setState({ destinationKey: i, fromKey: m, transition: l, screenStack: n }, async () => {
|
|
1147
|
+
const p = t.signal, f = this.getScreenRefByKey(String(m)), c = this.getScreenRefByKey(String(i)), a = this.dispatchLifecycleHandlers(c, null, p).catch(v);
|
|
1148
|
+
if (u) {
|
|
1149
|
+
const h = this.screenTransitionLayer.current?.animation.currentTime ?? 0;
|
|
1150
|
+
this.screenTransitionLayer.current?.animation.cancel(), await new Promise(requestAnimationFrame);
|
|
1151
|
+
const y = this.screenTransition(c, f);
|
|
1152
|
+
y && (y.currentTime = h), y?.updatePlaybackRate(1), await y?.finished.catch(v);
|
|
1153
|
+
}
|
|
1154
|
+
await a, this.setState({ destinationKey: null, fromKey: null, transition: null }, w);
|
|
1155
|
+
});
|
|
1156
|
+
}));
|
|
2347
1157
|
};
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
1158
|
+
t.intercept({ handler: d });
|
|
1159
|
+
}
|
|
1160
|
+
handleDefault(t) {
|
|
1161
|
+
const n = this.state.screenStack, r = t.destination, s = new URL(r.url).pathname;
|
|
1162
|
+
if (!X(this.getScreenChildByPathname(s)))
|
|
1163
|
+
return t.preventDefault();
|
|
1164
|
+
const i = () => {
|
|
1165
|
+
if (me(t.info))
|
|
1166
|
+
return Promise.resolve();
|
|
1167
|
+
const u = window.navigation.transition;
|
|
1168
|
+
let l = n.findIndex((p) => p.key === u?.from.key);
|
|
1169
|
+
l === -1 && t.navigationType === "traverse" && (l = n.findIndex((p) => u?.from.url ? K(
|
|
1170
|
+
p.props.path,
|
|
1171
|
+
new URL(u.from.url).pathname,
|
|
1172
|
+
this.baseURLPattern.pathname,
|
|
1173
|
+
p.props.caseSensitive
|
|
1174
|
+
) : !1));
|
|
1175
|
+
const m = (n[l]?.key || u?.from.key) ?? null, P = n.findIndex((p) => p.key === t.destination.key), w = (n[P]?.key || window.navigation.currentEntry?.key) ?? null;
|
|
1176
|
+
if (t.navigationType === "push") {
|
|
1177
|
+
const p = new URL(r.url).pathname, f = this.screenChildFromPathname(p, w);
|
|
1178
|
+
if (!f)
|
|
1179
|
+
return Promise.resolve();
|
|
1180
|
+
n.splice(
|
|
1181
|
+
l + 1,
|
|
1182
|
+
1 / 0,
|
|
1183
|
+
// Remove all screens after current
|
|
1184
|
+
f
|
|
1185
|
+
);
|
|
1186
|
+
}
|
|
1187
|
+
const v = new AbortController();
|
|
1188
|
+
return new Promise((p, f) => j(() => {
|
|
1189
|
+
this.setState({ controller: v, destinationKey: w, fromKey: m, transition: u, screenStack: n }, async () => {
|
|
1190
|
+
v.signal.onabort = f;
|
|
1191
|
+
const c = t.signal, a = this.getScreenRefByKey(String(m)), h = this.getScreenRefByKey(String(w)), y = this.dispatchLifecycleHandlers(h, a, c).catch(f), E = this.screenTransition(h, a);
|
|
1192
|
+
E?.updatePlaybackRate(1), E?.finished.catch(f), await y, this.setState({ destinationKey: null, fromKey: null, transition: null, controller: null }, p);
|
|
1193
|
+
});
|
|
1194
|
+
}));
|
|
2363
1195
|
};
|
|
2364
|
-
|
|
1196
|
+
let o;
|
|
1197
|
+
pe(t.info) ? (o = "after-transition", this.addEventListener("gesture-end", () => t.commit?.(), { once: !0 }), this.addEventListener("gesture-cancel", this.onGestureCancel, { once: !0 })) : o = "immediate";
|
|
1198
|
+
const d = { handler: i, commit: o };
|
|
1199
|
+
t.intercept(d);
|
|
1200
|
+
}
|
|
1201
|
+
async dispatchLifecycleHandlers(t, n, r) {
|
|
1202
|
+
let s = !1;
|
|
1203
|
+
this.addEventListener("transition-start", () => s = !0, { once: !0 }), await Promise.all([
|
|
1204
|
+
n?.current?.onExit(r),
|
|
1205
|
+
t?.current?.onEnter(r),
|
|
1206
|
+
t?.current?.load(r)
|
|
1207
|
+
]), s && await new Promise((i) => this.addEventListener("transition-end", i, { once: !0 })), !this.state.controller?.signal.aborted && await Promise.all([
|
|
1208
|
+
n?.current?.onExited(r).then(() => n.current?.blur()),
|
|
1209
|
+
t?.current?.onEntered(r).then(() => t.current?.focus())
|
|
1210
|
+
]);
|
|
1211
|
+
}
|
|
1212
|
+
screenTransition(t, n) {
|
|
1213
|
+
const { backNavigating: r } = this;
|
|
1214
|
+
if (this.screenTransitionLayer.current && t && n) {
|
|
1215
|
+
this.screenTransitionLayer.current.direction = r ? "reverse" : "normal", t.current?.transitionProvider.current && (t.current.transitionProvider.current.exiting = !1), n.current?.transitionProvider.current && (n.current.transitionProvider.current.exiting = !0), this.screenTransitionLayer.current.sharedElementTransitionLayer.current && (this.screenTransitionLayer.current.sharedElementTransitionLayer.current.outgoingScreen = n, this.screenTransitionLayer.current.sharedElementTransitionLayer.current.incomingScreen = t);
|
|
1216
|
+
const s = this.screens.findIndex((i) => i.ref === (r ? n : t));
|
|
1217
|
+
return this.screenTransitionLayer.current.screens = this.screens.map((i, o) => (o = o - s + 1, T(i.ref) && i.ref.current?.transitionProvider.current ? (i.ref.current.transitionProvider.current.index = o, i.ref) : null)).filter(T), this.screenTransitionLayer.current.transition();
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
2365
1220
|
}
|
|
2366
|
-
function
|
|
2367
|
-
|
|
2368
|
-
androidFadeOutToLeftKeyframes,
|
|
2369
|
-
androidFadeInFromRightKeyframes
|
|
2370
|
-
];
|
|
2371
|
-
let timing;
|
|
2372
|
-
if (index === 0)
|
|
2373
|
-
timing = androidFadeOutToBottomOptions;
|
|
2374
|
-
else
|
|
2375
|
-
timing = androidFadeInFromBottomOptions;
|
|
2376
|
-
let keyframes = keyframesPresets[index];
|
|
2377
|
-
const options = {
|
|
2378
|
-
playbackRate,
|
|
2379
|
-
fill: "forwards",
|
|
2380
|
-
...timing
|
|
2381
|
-
};
|
|
2382
|
-
if (direction === "reverse")
|
|
2383
|
-
keyframes = keyframes.toReversed();
|
|
2384
|
-
return new KeyframeEffect(ref, keyframes, options);
|
|
1221
|
+
function be() {
|
|
1222
|
+
return M("Stack.Navigation"), mt();
|
|
2385
1223
|
}
|
|
2386
|
-
function
|
|
2387
|
-
|
|
2388
|
-
androidScaleToCentreKeyframes,
|
|
2389
|
-
androidScaleFromCentreKeyframes
|
|
2390
|
-
];
|
|
2391
|
-
const keyframes = keyframesPresets[index];
|
|
2392
|
-
const options = {
|
|
2393
|
-
direction,
|
|
2394
|
-
playbackRate,
|
|
2395
|
-
fill: "forwards",
|
|
2396
|
-
...androidScaleFromCentreOptions
|
|
2397
|
-
};
|
|
2398
|
-
return new KeyframeEffect(ref, keyframes, options);
|
|
1224
|
+
function Ze() {
|
|
1225
|
+
return M("Stack.Router"), yt();
|
|
2399
1226
|
}
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
1227
|
+
function Je() {
|
|
1228
|
+
return M("Stack.Route"), wt();
|
|
1229
|
+
}
|
|
1230
|
+
function Qe(e, t) {
|
|
1231
|
+
return M("Stack.Params"), Et(e, t);
|
|
1232
|
+
}
|
|
1233
|
+
function _e(e) {
|
|
1234
|
+
const t = be();
|
|
1235
|
+
return e ?? t;
|
|
1236
|
+
}
|
|
1237
|
+
function tn(e) {
|
|
1238
|
+
const {
|
|
1239
|
+
preload: t,
|
|
1240
|
+
goBack: n,
|
|
1241
|
+
params: r = {},
|
|
1242
|
+
type: s = "push",
|
|
1243
|
+
href: i,
|
|
1244
|
+
onClick: o,
|
|
1245
|
+
...d
|
|
1246
|
+
} = e, u = _e(e.navigation), [l, m] = St(void 0), P = u?.routerId, v = !l?.includes(window.location.origin) ? "noopener noreferrer" : n ? "prev" : "next";
|
|
1247
|
+
return U(() => {
|
|
1248
|
+
!t || !l || u.preloadRoute(i);
|
|
1249
|
+
}, [t, i]), U(() => {
|
|
1250
|
+
if (n)
|
|
1251
|
+
m(u.previous?.url?.href);
|
|
1252
|
+
else if (i) {
|
|
1253
|
+
const f = ge(r), c = new URL(i, u.baseURL);
|
|
1254
|
+
c.search = f, m(c.href);
|
|
1255
|
+
}
|
|
1256
|
+
}, [i, r]), /* @__PURE__ */ ct(
|
|
1257
|
+
"a",
|
|
1258
|
+
{
|
|
1259
|
+
href: l,
|
|
1260
|
+
"data-router-id": P,
|
|
1261
|
+
onClick: (f) => {
|
|
1262
|
+
n ? (f.preventDefault(), u.goBack()) : s === "replace" && i && (f.preventDefault(), u.replace(i)), o?.(f);
|
|
1263
|
+
},
|
|
1264
|
+
rel: v,
|
|
1265
|
+
...d,
|
|
1266
|
+
children: e.children
|
|
1267
|
+
}
|
|
1268
|
+
);
|
|
2419
1269
|
}
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2447
|
-
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
|
|
2470
|
-
|
|
2471
|
-
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
1270
|
+
const en = [
|
|
1271
|
+
{
|
|
1272
|
+
transform: "translateX(100vw)"
|
|
1273
|
+
},
|
|
1274
|
+
{
|
|
1275
|
+
transform: "translateX(0vw)"
|
|
1276
|
+
}
|
|
1277
|
+
], Le = [
|
|
1278
|
+
{
|
|
1279
|
+
transform: "translateX(100vw)"
|
|
1280
|
+
},
|
|
1281
|
+
{
|
|
1282
|
+
transform: "translateX(0vw)"
|
|
1283
|
+
}
|
|
1284
|
+
], nn = [
|
|
1285
|
+
{
|
|
1286
|
+
transform: "translateX(0vw)"
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
transform: "translateX(-50vw)"
|
|
1290
|
+
}
|
|
1291
|
+
], ke = [
|
|
1292
|
+
{
|
|
1293
|
+
transform: "translateX(0vw)"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
transform: "translateX(calc(100vw * -0.3))"
|
|
1297
|
+
}
|
|
1298
|
+
], rn = [
|
|
1299
|
+
{
|
|
1300
|
+
transform: "translateX(-100vw)"
|
|
1301
|
+
},
|
|
1302
|
+
{
|
|
1303
|
+
transform: "translateX(0vw)"
|
|
1304
|
+
}
|
|
1305
|
+
], Te = [
|
|
1306
|
+
{
|
|
1307
|
+
transform: "translateX(-100vw)"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
transform: "translateX(0vw)"
|
|
1311
|
+
}
|
|
1312
|
+
], sn = [
|
|
1313
|
+
{
|
|
1314
|
+
transform: "translateX(0vw)"
|
|
1315
|
+
},
|
|
1316
|
+
{
|
|
1317
|
+
transform: "translateX(50vw)"
|
|
1318
|
+
}
|
|
1319
|
+
], Re = [
|
|
1320
|
+
{
|
|
1321
|
+
transform: "translateX(0vw)"
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
transform: "translateX(calc(100vw * 0.3))"
|
|
1325
|
+
}
|
|
1326
|
+
], an = [
|
|
1327
|
+
{
|
|
1328
|
+
transform: "translateY(100vh)"
|
|
1329
|
+
},
|
|
1330
|
+
{
|
|
1331
|
+
transform: "translateY(0vh)"
|
|
1332
|
+
}
|
|
1333
|
+
], Ie = [
|
|
1334
|
+
{
|
|
1335
|
+
transform: "translateY(100vh)"
|
|
1336
|
+
},
|
|
1337
|
+
{
|
|
1338
|
+
transform: "translateY(0vh)"
|
|
1339
|
+
}
|
|
1340
|
+
], on = [
|
|
1341
|
+
{
|
|
1342
|
+
transform: "translateY(0vh)"
|
|
1343
|
+
},
|
|
1344
|
+
{
|
|
1345
|
+
transform: "translateY(-50vh)"
|
|
1346
|
+
}
|
|
1347
|
+
], cn = [
|
|
1348
|
+
{
|
|
1349
|
+
transform: "translateY(-100vh)"
|
|
1350
|
+
},
|
|
1351
|
+
{
|
|
1352
|
+
transform: "translateY(0vh)"
|
|
1353
|
+
}
|
|
1354
|
+
], un = [
|
|
1355
|
+
{
|
|
1356
|
+
transform: "translateY(0vh)"
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
transform: "translateY(50vh)"
|
|
1360
|
+
}
|
|
1361
|
+
], hn = [
|
|
1362
|
+
{
|
|
1363
|
+
transform: "scale(0.85)",
|
|
1364
|
+
opacity: 0
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
transform: "scale(1)",
|
|
1368
|
+
opacity: 1
|
|
1369
|
+
}
|
|
1370
|
+
], ln = [
|
|
1371
|
+
{
|
|
1372
|
+
transform: "scale(1)",
|
|
1373
|
+
opacity: 1
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
transform: "scale(1.15)",
|
|
1377
|
+
opacity: 0
|
|
1378
|
+
}
|
|
1379
|
+
], dn = [
|
|
1380
|
+
{
|
|
1381
|
+
opacity: 0
|
|
1382
|
+
},
|
|
1383
|
+
{
|
|
1384
|
+
opacity: 1
|
|
1385
|
+
}
|
|
1386
|
+
], fn = [
|
|
1387
|
+
{
|
|
1388
|
+
opacity: 1
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
opacity: 0
|
|
1392
|
+
}
|
|
1393
|
+
], xe = [
|
|
1394
|
+
{
|
|
1395
|
+
opacity: 0,
|
|
1396
|
+
transform: "translateY(calc(100vh * 0.08))"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
opacity: 0.25,
|
|
1400
|
+
offset: 0.5
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
opacity: 0.7,
|
|
1404
|
+
offset: 0.9
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
opacity: 1,
|
|
1408
|
+
transform: "translateY(0vh)"
|
|
1409
|
+
}
|
|
1410
|
+
], Fe = [
|
|
1411
|
+
{
|
|
1412
|
+
opacity: 0,
|
|
1413
|
+
transform: "translateY(96vw)"
|
|
1414
|
+
},
|
|
1415
|
+
{
|
|
1416
|
+
opacity: 1,
|
|
1417
|
+
transform: "translateY(0vw)"
|
|
1418
|
+
}
|
|
1419
|
+
], De = [
|
|
1420
|
+
{
|
|
1421
|
+
opacity: 0,
|
|
1422
|
+
transform: "translateY(0vw)"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
opacity: 1,
|
|
1426
|
+
transform: "translateY(-96vw)"
|
|
1427
|
+
}
|
|
1428
|
+
], Oe = [
|
|
1429
|
+
{
|
|
1430
|
+
transform: "translateY(100vh)"
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
transform: "translateY(0vh)"
|
|
1434
|
+
}
|
|
1435
|
+
], Be = [
|
|
1436
|
+
{
|
|
1437
|
+
transform: "translateY(0vh)"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
transform: "translateY(-2vh)"
|
|
1441
|
+
}
|
|
1442
|
+
], Ke = [
|
|
1443
|
+
{
|
|
1444
|
+
transform: "scale(0.85)",
|
|
1445
|
+
opacity: 0
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
opacity: 0,
|
|
1449
|
+
offset: 0.75
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
opacity: 1,
|
|
1453
|
+
offset: 0.875
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
transform: "scale(1)",
|
|
1457
|
+
opacity: 1
|
|
1458
|
+
}
|
|
1459
|
+
], Me = [
|
|
1460
|
+
{
|
|
1461
|
+
transform: "scale(1)",
|
|
1462
|
+
opacity: 1
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
opacity: 1,
|
|
1466
|
+
offset: 0.0825
|
|
1467
|
+
},
|
|
1468
|
+
{
|
|
1469
|
+
opacity: 1,
|
|
1470
|
+
offset: 0.2075
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
transform: "scale(1.075)",
|
|
1474
|
+
opacity: 0
|
|
1475
|
+
}
|
|
1476
|
+
], Ye = [
|
|
1477
|
+
{
|
|
1478
|
+
transform: "translateY(calc(100vh * 0.8))",
|
|
1479
|
+
opacity: 0
|
|
1480
|
+
},
|
|
1481
|
+
{
|
|
1482
|
+
transform: "translateY(0vh)",
|
|
1483
|
+
opacity: 1
|
|
1484
|
+
}
|
|
1485
|
+
];
|
|
1486
|
+
function Ce(e) {
|
|
1487
|
+
return (t) => 1 - e(1 - t);
|
|
1488
|
+
}
|
|
1489
|
+
function Xe(e) {
|
|
1490
|
+
return (t) => Math.pow(t, e);
|
|
1491
|
+
}
|
|
1492
|
+
const Z = {
|
|
1493
|
+
...Lt({
|
|
1494
|
+
mass: 3,
|
|
1495
|
+
stiffness: 1e3,
|
|
1496
|
+
damping: 500,
|
|
1497
|
+
velocity: 0,
|
|
1498
|
+
steps: 200
|
|
1499
|
+
})
|
|
1500
|
+
}, ut = {
|
|
1501
|
+
duration: 350,
|
|
1502
|
+
easing: H(Ce(Xe(5)))
|
|
1503
|
+
}, je = {
|
|
1504
|
+
duration: 150,
|
|
1505
|
+
easing: "linear"
|
|
1506
|
+
}, Ue = {
|
|
1507
|
+
duration: 425,
|
|
1508
|
+
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1509
|
+
}, Ne = {
|
|
1510
|
+
duration: 400,
|
|
1511
|
+
easing: "cubic-bezier(0.35, 0.45, 0, 1)"
|
|
1512
|
+
}, He = {
|
|
1513
|
+
duration: 250,
|
|
1514
|
+
easing: H((e) => Math.cos((e + 1) * Math.PI) / 2 + 0.5)
|
|
1515
|
+
}, Ve = {
|
|
1516
|
+
duration: 200,
|
|
1517
|
+
easing: H((e) => e === 1 ? 1 : Math.pow(e, 2))
|
|
1518
|
+
};
|
|
1519
|
+
function vn({ ref: e, direction: t, playbackRate: n, index: r }) {
|
|
1520
|
+
let i = [
|
|
1521
|
+
ke,
|
|
1522
|
+
Le
|
|
1523
|
+
][r];
|
|
1524
|
+
const o = {
|
|
1525
|
+
playbackRate: n,
|
|
1526
|
+
fill: "forwards",
|
|
1527
|
+
...Z
|
|
1528
|
+
};
|
|
1529
|
+
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(e, i, o);
|
|
1530
|
+
}
|
|
1531
|
+
function gn({ ref: e, direction: t, playbackRate: n, index: r }) {
|
|
1532
|
+
let i = [
|
|
1533
|
+
Re,
|
|
1534
|
+
Te
|
|
1535
|
+
][r];
|
|
1536
|
+
const o = {
|
|
1537
|
+
playbackRate: n,
|
|
1538
|
+
fill: "forwards",
|
|
1539
|
+
...Z
|
|
1540
|
+
};
|
|
1541
|
+
return t === "reverse" && (i = i.toReversed()), new KeyframeEffect(e, i, o);
|
|
1542
|
+
}
|
|
1543
|
+
function pn({ ref: e, direction: t, playbackRate: n }) {
|
|
1544
|
+
let r = Ie;
|
|
1545
|
+
const s = {
|
|
1546
|
+
playbackRate: n,
|
|
1547
|
+
fill: "forwards",
|
|
1548
|
+
...Z
|
|
1549
|
+
};
|
|
1550
|
+
return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(e, r, s);
|
|
1551
|
+
}
|
|
1552
|
+
function mn({ ref: e, direction: t, playbackRate: n }) {
|
|
1553
|
+
let r = xe;
|
|
1554
|
+
const s = {
|
|
1555
|
+
playbackRate: n,
|
|
1556
|
+
fill: "forwards",
|
|
1557
|
+
...ut
|
|
1558
|
+
};
|
|
1559
|
+
return t === "reverse" && (r = r.toReversed()), new KeyframeEffect(e, r, s);
|
|
1560
|
+
}
|
|
1561
|
+
function yn({ ref: e, direction: t, index: n, playbackRate: r }) {
|
|
1562
|
+
let s = Ye, i;
|
|
1563
|
+
n === 0 ? i = Ve : i = He;
|
|
1564
|
+
const o = {
|
|
1565
|
+
playbackRate: r,
|
|
1566
|
+
fill: "forwards",
|
|
1567
|
+
...i
|
|
1568
|
+
};
|
|
1569
|
+
return t === "reverse" && (s = s.toReversed()), new KeyframeEffect(e, s, o);
|
|
1570
|
+
}
|
|
1571
|
+
function wn({ ref: e, direction: t, index: n, playbackRate: r }) {
|
|
1572
|
+
const i = [
|
|
1573
|
+
Be,
|
|
1574
|
+
Oe
|
|
1575
|
+
][n], o = {
|
|
1576
|
+
direction: t,
|
|
1577
|
+
playbackRate: r,
|
|
1578
|
+
fill: "forwards",
|
|
1579
|
+
...Ue
|
|
1580
|
+
};
|
|
1581
|
+
return new KeyframeEffect(e, i, o);
|
|
1582
|
+
}
|
|
1583
|
+
function En({ ref: e, direction: t, index: n, playbackRate: r }) {
|
|
1584
|
+
let s = [
|
|
1585
|
+
De,
|
|
1586
|
+
Fe
|
|
1587
|
+
], i;
|
|
1588
|
+
n === 0 ? i = je : i = ut;
|
|
1589
|
+
let o = s[n];
|
|
1590
|
+
const d = {
|
|
1591
|
+
playbackRate: r,
|
|
1592
|
+
fill: "forwards",
|
|
1593
|
+
...i
|
|
1594
|
+
};
|
|
1595
|
+
return t === "reverse" && (o = o.toReversed()), new KeyframeEffect(e, o, d);
|
|
1596
|
+
}
|
|
1597
|
+
function Pn({ ref: e, direction: t, index: n, playbackRate: r }) {
|
|
1598
|
+
const i = [
|
|
1599
|
+
Me,
|
|
1600
|
+
Ke
|
|
1601
|
+
][n], o = {
|
|
1602
|
+
direction: t,
|
|
1603
|
+
playbackRate: r,
|
|
1604
|
+
fill: "forwards",
|
|
1605
|
+
...Ne
|
|
1606
|
+
};
|
|
1607
|
+
return new KeyframeEffect(e, i, o);
|
|
1608
|
+
}
|
|
1609
|
+
function Sn({ disabled: e, children: t, ...n }) {
|
|
1610
|
+
const r = bt(null);
|
|
1611
|
+
return U(() => {
|
|
1612
|
+
if (e)
|
|
1613
|
+
return;
|
|
1614
|
+
const s = (i) => {
|
|
1615
|
+
i.stopPropagation(), i.preventDefault();
|
|
1616
|
+
};
|
|
1617
|
+
return r.current?.addEventListener("swipestart", s), () => {
|
|
1618
|
+
r.current?.removeEventListener("swipestart", s);
|
|
1619
|
+
};
|
|
1620
|
+
}, [r, e]), /* @__PURE__ */ ct(
|
|
1621
|
+
"div",
|
|
1622
|
+
{
|
|
1623
|
+
ref: r,
|
|
1624
|
+
className: "gesture-region",
|
|
1625
|
+
"data-disabled": e,
|
|
1626
|
+
style: { display: "contents" },
|
|
1627
|
+
...n,
|
|
1628
|
+
children: t
|
|
1629
|
+
}
|
|
1630
|
+
);
|
|
1631
|
+
}
|
|
1632
|
+
export {
|
|
1633
|
+
tn as Anchor,
|
|
1634
|
+
dn as FadeInKeyframes,
|
|
1635
|
+
fn as FadeOutKeyframes,
|
|
1636
|
+
Sn as GestureRegion,
|
|
1637
|
+
de as HistoryEntry,
|
|
1638
|
+
fe as Navigation,
|
|
1639
|
+
Ge as Router,
|
|
1640
|
+
ze as Screen,
|
|
1641
|
+
an as SlideInFromBottomKeyframes,
|
|
1642
|
+
rn as SlideInFromLeftKeyframes,
|
|
1643
|
+
en as SlideInFromRightKeyframes,
|
|
1644
|
+
cn as SlideInFromTopKeyframes,
|
|
1645
|
+
un as SlideOutToBottomKeyframes,
|
|
1646
|
+
nn as SlideOutToLeftKeyframes,
|
|
1647
|
+
sn as SlideOutToRightKeyframes,
|
|
1648
|
+
on as SlideOutToTopKeyframes,
|
|
1649
|
+
hn as ZoomInKeyframes,
|
|
1650
|
+
ln as ZoomOutKeyframes,
|
|
1651
|
+
He as androidBottomSheetSlideInOptions,
|
|
1652
|
+
Ve as androidBottomSheetSlideOutOptions,
|
|
1653
|
+
Be as androidConcealToBottomKeyframes,
|
|
1654
|
+
mn as androidFadeInFromBottom,
|
|
1655
|
+
xe as androidFadeInFromBottomKeyframes,
|
|
1656
|
+
ut as androidFadeInFromBottomOptions,
|
|
1657
|
+
yn as androidFadeInFromBottomSheet,
|
|
1658
|
+
Ye as androidFadeInFromBottomSheetKeyframes,
|
|
1659
|
+
En as androidFadeInFromRight,
|
|
1660
|
+
Fe as androidFadeInFromRightKeyframes,
|
|
1661
|
+
je as androidFadeOutToBottomOptions,
|
|
1662
|
+
De as androidFadeOutToLeftKeyframes,
|
|
1663
|
+
wn as androidRevealFromBottom,
|
|
1664
|
+
Oe as androidRevealFromBottomKeyframes,
|
|
1665
|
+
Ue as androidRevealFromBottomOptions,
|
|
1666
|
+
Pn as androidScaleFromCentre,
|
|
1667
|
+
Ke as androidScaleFromCentreKeyframes,
|
|
1668
|
+
Ne as androidScaleFromCentreOptions,
|
|
1669
|
+
Me as androidScaleToCentreKeyframes,
|
|
1670
|
+
Z as iOSKeyframeOptions,
|
|
1671
|
+
pn as iOSSlideInFromBottom,
|
|
1672
|
+
Ie as iOSSlideInFromBottomKeyframes,
|
|
1673
|
+
gn as iOSSlideInFromLeft,
|
|
1674
|
+
Te as iOSSlideInFromLeftKeyframes,
|
|
1675
|
+
vn as iOSSlideInFromRight,
|
|
1676
|
+
Le as iOSSlideInFromRightKeyframes,
|
|
1677
|
+
ke as iOSSlideOutToLeftKeyframes,
|
|
1678
|
+
Re as iOSSlideOutToRightKeyframes,
|
|
1679
|
+
be as useNavigation,
|
|
1680
|
+
Qe as useParams,
|
|
1681
|
+
Je as useRoute,
|
|
1682
|
+
Ze as useRouter
|
|
1683
|
+
};
|
|
1684
|
+
//# sourceMappingURL=index.js.map
|