@deijose/nix-ionic 0.3.0 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/favicon.ico +0 -0
- package/dist/index.cjs +2612 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +2602 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/index.d.ts +2 -3
- package/dist/nix-js-logo.png +0 -0
- package/dist/p-9VcRUwdB-BZDASSRz.js +323 -0
- package/dist/p-9VcRUwdB-BZDASSRz.js.map +1 -0
- package/dist/p-9VcRUwdB-Bw8gCHlL.cjs +340 -0
- package/dist/p-9VcRUwdB-Bw8gCHlL.cjs.map +1 -0
- package/dist/p-BJoMtgfR-DP5flT_f.js +1206 -0
- package/dist/p-BJoMtgfR-DP5flT_f.js.map +1 -0
- package/dist/p-BJoMtgfR-DyzhC2Uw.cjs +1319 -0
- package/dist/p-BJoMtgfR-DyzhC2Uw.cjs.map +1 -0
- package/dist/p-BgwEQWW6-BM87vVU5.cjs +72 -0
- package/dist/p-BgwEQWW6-BM87vVU5.cjs.map +1 -0
- package/dist/p-BgwEQWW6-DIo2-ASC.js +72 -0
- package/dist/p-BgwEQWW6-DIo2-ASC.js.map +1 -0
- package/dist/p-BmVRXR1y-BsLZqRc0.cjs +41 -0
- package/dist/p-BmVRXR1y-BsLZqRc0.cjs.map +1 -0
- package/dist/p-BmVRXR1y-t-R4bYc1.js +41 -0
- package/dist/p-BmVRXR1y-t-R4bYc1.js.map +1 -0
- package/dist/p-C59ryAuS-CFciP5mq.cjs +42 -0
- package/dist/p-C59ryAuS-CFciP5mq.cjs.map +1 -0
- package/dist/p-C59ryAuS-DazlzUfi.js +19 -0
- package/dist/p-C59ryAuS-DazlzUfi.js.map +1 -0
- package/dist/p-CBzELu-H-DlS7IGlS.cjs +292 -0
- package/dist/p-CBzELu-H-DlS7IGlS.cjs.map +1 -0
- package/dist/p-CBzELu-H-bk38lWXh.js +287 -0
- package/dist/p-CBzELu-H-bk38lWXh.js.map +1 -0
- package/dist/p-CU1SSH8_-1VQUU8Zi.js +27 -0
- package/dist/p-CU1SSH8_-1VQUU8Zi.js.map +1 -0
- package/dist/p-CU1SSH8_-D56vgRhd.cjs +32 -0
- package/dist/p-CU1SSH8_-D56vgRhd.cjs.map +1 -0
- package/dist/p-Cl0B-RWe-CaQPWG_o.js +258 -0
- package/dist/p-Cl0B-RWe-CaQPWG_o.js.map +1 -0
- package/dist/p-Cl0B-RWe-CsujC7rr.cjs +269 -0
- package/dist/p-Cl0B-RWe-CsujC7rr.cjs.map +1 -0
- package/dist/p-CneGxKsZ-C5qTtPZx.cjs +26 -0
- package/dist/p-CneGxKsZ-C5qTtPZx.cjs.map +1 -0
- package/dist/p-CneGxKsZ-DghQx9uV.js +26 -0
- package/dist/p-CneGxKsZ-DghQx9uV.js.map +1 -0
- package/dist/p-Cwv-vmkN-CEJtqyzO.js +141 -0
- package/dist/p-Cwv-vmkN-CEJtqyzO.js.map +1 -0
- package/dist/p-Cwv-vmkN-_Ll5IGJb.cjs +141 -0
- package/dist/p-Cwv-vmkN-_Ll5IGJb.cjs.map +1 -0
- package/dist/p-Cz5nLPGT-CCHjKH-2.cjs +45 -0
- package/dist/p-Cz5nLPGT-CCHjKH-2.cjs.map +1 -0
- package/dist/p-Cz5nLPGT-mbB7NqG3.js +45 -0
- package/dist/p-Cz5nLPGT-mbB7NqG3.js.map +1 -0
- package/dist/p-D13Eaw-8-CkhHu_JZ.js +35 -0
- package/dist/p-D13Eaw-8-CkhHu_JZ.js.map +1 -0
- package/dist/p-D13Eaw-8-DwZ_qr-I.cjs +46 -0
- package/dist/p-D13Eaw-8-DwZ_qr-I.cjs.map +1 -0
- package/dist/p-D6Ynv7Xh-CQpbvraJ.cjs +41 -0
- package/dist/p-D6Ynv7Xh-CQpbvraJ.cjs.map +1 -0
- package/dist/p-D6Ynv7Xh-bzjdXLwD.js +41 -0
- package/dist/p-D6Ynv7Xh-bzjdXLwD.js.map +1 -0
- package/dist/p-DgbT0exM-BY3-DNWX.cjs +178 -0
- package/dist/p-DgbT0exM-BY3-DNWX.cjs.map +1 -0
- package/dist/p-DgbT0exM-Bjp0vDlM.js +107 -0
- package/dist/p-DgbT0exM-Bjp0vDlM.js.map +1 -0
- package/dist/p-ZjP4CjeZ-BpWsQNNL.cjs +20 -0
- package/dist/p-ZjP4CjeZ-BpWsQNNL.cjs.map +1 -0
- package/dist/p-ZjP4CjeZ-iNpKbiw2.js +9 -0
- package/dist/p-ZjP4CjeZ-iNpKbiw2.js.map +1 -0
- package/dist/p-vEbVo2hO-Bo4CY69w.cjs +80 -0
- package/dist/p-vEbVo2hO-Bo4CY69w.cjs.map +1 -0
- package/dist/p-vEbVo2hO-CpCOqZ3z.js +69 -0
- package/dist/p-vEbVo2hO-CpCOqZ3z.js.map +1 -0
- package/dist/rolldown-runtime-CYJQ3TkU.cjs +18 -0
- package/dist/rolldown-runtime-CiIaOW0V.js +13 -0
- package/package.json +1 -1
- package/dist/lib/IonRouterOutlet.d.ts +0 -23
- package/dist/lib/bundles/all.cjs +0 -2
- package/dist/lib/bundles/all.cjs.map +0 -1
- package/dist/lib/bundles/all.d.ts +0 -13
- package/dist/lib/bundles/all.js +0 -21
- package/dist/lib/bundles/all.js.map +0 -1
- package/dist/lib/bundles/buttons.cjs +0 -2
- package/dist/lib/bundles/buttons.cjs.map +0 -1
- package/dist/lib/bundles/buttons.d.ts +0 -7
- package/dist/lib/bundles/buttons.js +0 -17
- package/dist/lib/bundles/buttons.js.map +0 -1
- package/dist/lib/bundles/feedback.cjs +0 -2
- package/dist/lib/bundles/feedback.cjs.map +0 -1
- package/dist/lib/bundles/feedback.d.ts +0 -8
- package/dist/lib/bundles/feedback.js +0 -19
- package/dist/lib/bundles/feedback.js.map +0 -1
- package/dist/lib/bundles/forms.cjs +0 -2
- package/dist/lib/bundles/forms.cjs.map +0 -1
- package/dist/lib/bundles/forms.d.ts +0 -8
- package/dist/lib/bundles/forms.js +0 -27
- package/dist/lib/bundles/forms.js.map +0 -1
- package/dist/lib/bundles/layout.cjs +0 -2
- package/dist/lib/bundles/layout.cjs.map +0 -1
- package/dist/lib/bundles/layout.d.ts +0 -7
- package/dist/lib/bundles/layout.js +0 -19
- package/dist/lib/bundles/layout.js.map +0 -1
- package/dist/lib/bundles/lists.cjs +0 -2
- package/dist/lib/bundles/lists.cjs.map +0 -1
- package/dist/lib/bundles/lists.d.ts +0 -10
- package/dist/lib/bundles/lists.js +0 -35
- package/dist/lib/bundles/lists.js.map +0 -1
- package/dist/lib/bundles/navigation.cjs +0 -2
- package/dist/lib/bundles/navigation.cjs.map +0 -1
- package/dist/lib/bundles/navigation.d.ts +0 -7
- package/dist/lib/bundles/navigation.js +0 -8
- package/dist/lib/bundles/navigation.js.map +0 -1
- package/dist/lib/bundles/overlays.cjs +0 -2
- package/dist/lib/bundles/overlays.cjs.map +0 -1
- package/dist/lib/bundles/overlays.d.ts +0 -7
- package/dist/lib/bundles/overlays.js +0 -15
- package/dist/lib/bundles/overlays.js.map +0 -1
- package/dist/lib/components.cjs +0 -1
- package/dist/lib/components.d.ts +0 -55
- package/dist/lib/components.js +0 -48
- package/dist/lib/lifecycle.d.ts +0 -36
- package/dist/lib/nix-ionic.cjs +0 -1
- package/dist/lib/nix-ionic.cjs.map +0 -1
- package/dist/lib/nix-ionic.js +0 -1
- package/dist/lib/nix-ionic.js.map +0 -1
- package/dist/lib/setup.d.ts +0 -25
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,2612 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_p_BJoMtgfR = require("./p-BJoMtgfR-DyzhC2Uw.cjs");
|
|
3
|
+
const require_p_ZjP4CjeZ = require("./p-ZjP4CjeZ-BpWsQNNL.cjs");
|
|
4
|
+
const require_p_9VcRUwdB = require("./p-9VcRUwdB-Bw8gCHlL.cjs");
|
|
5
|
+
const require_p_DgbT0exM = require("./p-DgbT0exM-BY3-DNWX.cjs");
|
|
6
|
+
require("./p-CBzELu-H-DlS7IGlS.cjs");
|
|
7
|
+
require("./p-CU1SSH8_-D56vgRhd.cjs");
|
|
8
|
+
require("./p-Cl0B-RWe-CsujC7rr.cjs");
|
|
9
|
+
const require_p_vEbVo2hO = require("./p-vEbVo2hO-Bo4CY69w.cjs");
|
|
10
|
+
let _deijose_nix_js = require("@deijose/nix-js");
|
|
11
|
+
//#region src/lifecycle.ts
|
|
12
|
+
/**
|
|
13
|
+
* ionic-nix/lifecycle.ts
|
|
14
|
+
*
|
|
15
|
+
* Sistema de ciclo de vida de navegación, análogo a los hooks de Ionic:
|
|
16
|
+
* ionViewWillEnter / ionViewDidEnter / ionViewWillLeave / ionViewDidLeave
|
|
17
|
+
*
|
|
18
|
+
* Cómo funciona (sin provide/inject):
|
|
19
|
+
* 1. IonRouterOutlet crea un `PageLifecycle` por cada ruta.
|
|
20
|
+
* 2. Lo pasa directamente al factory de la ruta como argumento.
|
|
21
|
+
* 3. El factory llama a `new MiPagina(lc)` o `MiPagina(lc)`.
|
|
22
|
+
* 4. IonPage/composables registran watchers sobre las señales del lc.
|
|
23
|
+
* 5. Cuando el router navega, incrementa las señales → watchers se disparan.
|
|
24
|
+
*/
|
|
25
|
+
/** Crea un nuevo PageLifecycle con señales en 0. */
|
|
26
|
+
function createPageLifecycle() {
|
|
27
|
+
return {
|
|
28
|
+
willEnter: (0, _deijose_nix_js.signal)(0),
|
|
29
|
+
didEnter: (0, _deijose_nix_js.signal)(0),
|
|
30
|
+
willLeave: (0, _deijose_nix_js.signal)(0),
|
|
31
|
+
didLeave: (0, _deijose_nix_js.signal)(0)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
var IonPage = class extends _deijose_nix_js.NixComponent {
|
|
35
|
+
__lc;
|
|
36
|
+
constructor(lc) {
|
|
37
|
+
super();
|
|
38
|
+
this.__lc = lc;
|
|
39
|
+
}
|
|
40
|
+
onInit() {
|
|
41
|
+
const lc = this.__lc;
|
|
42
|
+
if (this.ionViewWillEnter) (0, _deijose_nix_js.watch)(lc.willEnter, this.ionViewWillEnter.bind(this));
|
|
43
|
+
if (this.ionViewDidEnter) (0, _deijose_nix_js.watch)(lc.didEnter, this.ionViewDidEnter.bind(this));
|
|
44
|
+
if (this.ionViewWillLeave) (0, _deijose_nix_js.watch)(lc.willLeave, this.ionViewWillLeave.bind(this));
|
|
45
|
+
if (this.ionViewDidLeave) (0, _deijose_nix_js.watch)(lc.didLeave, this.ionViewDidLeave.bind(this));
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
function useIonViewWillEnter(lc, fn) {
|
|
49
|
+
(0, _deijose_nix_js.watch)(lc.willEnter, fn);
|
|
50
|
+
}
|
|
51
|
+
function useIonViewDidEnter(lc, fn) {
|
|
52
|
+
(0, _deijose_nix_js.watch)(lc.didEnter, fn);
|
|
53
|
+
}
|
|
54
|
+
function useIonViewWillLeave(lc, fn) {
|
|
55
|
+
(0, _deijose_nix_js.watch)(lc.willLeave, fn);
|
|
56
|
+
}
|
|
57
|
+
function useIonViewDidLeave(lc, fn) {
|
|
58
|
+
(0, _deijose_nix_js.watch)(lc.didLeave, fn);
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region node_modules/@ionic/core/components/p-hHmYLOfE.js
|
|
62
|
+
/*!
|
|
63
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
64
|
+
*/
|
|
65
|
+
var t$4 = (t, M, r, n, e) => h$6(t[1], M[1], r[1], n[1], e).map(((h) => a$3(t[0], M[0], r[0], n[0], h))), a$3 = (t, a, h, M, r) => r * (3 * a * Math.pow(r - 1, 2) + r * (-3 * h * r + 3 * h + M * r)) - t * Math.pow(r - 1, 3), h$6 = (t, a, h, r, n) => M$2((r -= n) - 3 * (h -= n) + 3 * (a -= n) - (t -= n), 3 * h - 6 * a + 3 * t, 3 * a - 3 * t, t).filter(((t) => t >= 0 && t <= 1)), M$2 = (t, a, h, M) => {
|
|
66
|
+
if (0 === t) return ((t, a, h) => {
|
|
67
|
+
const M = a * a - 4 * t * h;
|
|
68
|
+
return M < 0 ? [] : [(-a + Math.sqrt(M)) / (2 * t), (-a - Math.sqrt(M)) / (2 * t)];
|
|
69
|
+
})(a, h, M);
|
|
70
|
+
const r = (3 * (h /= t) - (a /= t) * a) / 3, n = (2 * a * a * a - 9 * a * h + 27 * (M /= t)) / 27;
|
|
71
|
+
if (0 === r) return [Math.pow(-n, 1 / 3)];
|
|
72
|
+
if (0 === n) return [Math.sqrt(-r), -Math.sqrt(-r)];
|
|
73
|
+
const e = Math.pow(n / 2, 2) + Math.pow(r / 3, 3);
|
|
74
|
+
if (0 === e) return [Math.pow(n / 2, .5) - a / 3];
|
|
75
|
+
if (e > 0) return [Math.pow(-n / 2 + Math.sqrt(e), 1 / 3) - Math.pow(n / 2 + Math.sqrt(e), 1 / 3) - a / 3];
|
|
76
|
+
const u = Math.sqrt(Math.pow(-r / 3, 3)), o = Math.acos(-n / (2 * Math.sqrt(Math.pow(-r / 3, 3)))), s = 2 * Math.pow(u, 1 / 3);
|
|
77
|
+
return [
|
|
78
|
+
s * Math.cos(o / 3) - a / 3,
|
|
79
|
+
s * Math.cos((o + 2 * Math.PI) / 3) - a / 3,
|
|
80
|
+
s * Math.cos((o + 4 * Math.PI) / 3) - a / 3
|
|
81
|
+
];
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region node_modules/@ionic/core/components/p-CDfQnFrd.js
|
|
85
|
+
/*!
|
|
86
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
87
|
+
*/
|
|
88
|
+
var a$2 = (o) => l$6(o), s$2 = (o, i) => ("string" == typeof o && (i = o, o = void 0), a$2(o).includes(i)), l$6 = (o = window) => {
|
|
89
|
+
if (void 0 === o) return [];
|
|
90
|
+
o.Ionic = o.Ionic || {};
|
|
91
|
+
let i = o.Ionic.platforms;
|
|
92
|
+
return i ?? (i = o.Ionic.platforms = c$5(o), i.forEach(((i) => o.document.documentElement.classList.add(`plt-${i}`)))), i;
|
|
93
|
+
}, c$5 = (i) => {
|
|
94
|
+
const t = require_p_BJoMtgfR.n.get("platform");
|
|
95
|
+
return Object.keys(j$3).filter(((o) => {
|
|
96
|
+
const n = null == t ? void 0 : t[o];
|
|
97
|
+
return "function" == typeof n ? n(i) : j$3[o](i);
|
|
98
|
+
}));
|
|
99
|
+
}, u$6 = (o) => !!h$5(o, /iPad/i) || !(!h$5(o, /Macintosh/i) || !m$6(o)), p$6 = (o) => h$5(o, /android|sink/i), m$6 = (o) => w$4(o, "(any-pointer:coarse)"), f$6 = (o) => v$5(o) || b$4(o), v$5 = (o) => !!(o.cordova || o.phonegap || o.PhoneGap), b$4 = (o) => {
|
|
100
|
+
const i = o.Capacitor;
|
|
101
|
+
return !!((null == i ? void 0 : i.isNative) || (null == i ? void 0 : i.isNativePlatform) && i.isNativePlatform());
|
|
102
|
+
}, h$5 = (o, i) => i.test(o.navigator.userAgent), w$4 = (o, i) => {
|
|
103
|
+
var t;
|
|
104
|
+
return null === (t = o.matchMedia) || void 0 === t ? void 0 : t.call(o, i).matches;
|
|
105
|
+
}, j$3 = {
|
|
106
|
+
ipad: u$6,
|
|
107
|
+
iphone: (o) => h$5(o, /iPhone/i),
|
|
108
|
+
ios: (o) => h$5(o, /iPhone|iPod/i) || u$6(o),
|
|
109
|
+
android: p$6,
|
|
110
|
+
phablet: (o) => {
|
|
111
|
+
const i = o.innerWidth, t = o.innerHeight, n = Math.min(i, t), e = Math.max(i, t);
|
|
112
|
+
return n > 390 && n < 520 && e > 620 && e < 800;
|
|
113
|
+
},
|
|
114
|
+
tablet: (o) => {
|
|
115
|
+
const i = o.innerWidth, t = o.innerHeight, n = Math.min(i, t), e = Math.max(i, t);
|
|
116
|
+
return u$6(o) || ((o) => p$6(o) && !h$5(o, /mobile/i))(o) || n > 460 && n < 820 && e > 780 && e < 1400;
|
|
117
|
+
},
|
|
118
|
+
cordova: v$5,
|
|
119
|
+
capacitor: b$4,
|
|
120
|
+
electron: (o) => h$5(o, /electron/i),
|
|
121
|
+
pwa: (o) => {
|
|
122
|
+
var i;
|
|
123
|
+
return !(!(null === (i = o.matchMedia) || void 0 === i ? void 0 : i.call(o, "(display-mode: standalone)").matches) && !o.navigator.standalone);
|
|
124
|
+
},
|
|
125
|
+
mobile: m$6,
|
|
126
|
+
mobileweb: (o) => m$6(o) && !f$6(o),
|
|
127
|
+
desktop: (o) => !m$6(o),
|
|
128
|
+
hybrid: f$6
|
|
129
|
+
};
|
|
130
|
+
var O$2;
|
|
131
|
+
var g$5 = (o) => o && require_p_BJoMtgfR.qt(o) || O$2, y$3 = (e = {}) => {
|
|
132
|
+
if ("undefined" == typeof window) return;
|
|
133
|
+
const a = window.document, c = window, u = c.Ionic = c.Ionic || {}, p = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, require_p_BJoMtgfR.e(c)), { persistConfig: !1 }), u.config), require_p_BJoMtgfR.s(c)), e);
|
|
134
|
+
require_p_BJoMtgfR.n.reset(p), require_p_BJoMtgfR.n.getBoolean("persistConfig") && require_p_BJoMtgfR.o(c, p), l$6(c), u.config = require_p_BJoMtgfR.n, u.mode = O$2 = require_p_BJoMtgfR.n.get("mode", a.documentElement.getAttribute("mode") || (s$2(c, "ios") ? "ios" : "md")), require_p_BJoMtgfR.n.set("mode", O$2), a.documentElement.setAttribute("mode", O$2), a.documentElement.classList.add(O$2), require_p_BJoMtgfR.n.getBoolean("_testing") && require_p_BJoMtgfR.n.set("animated", !1);
|
|
135
|
+
const m = (o) => {
|
|
136
|
+
var i;
|
|
137
|
+
return null === (i = o.tagName) || void 0 === i ? void 0 : i.startsWith("ION-");
|
|
138
|
+
}, f = (o) => ["ios", "md"].includes(o);
|
|
139
|
+
require_p_BJoMtgfR.Pt(((o) => {
|
|
140
|
+
for (; o;) {
|
|
141
|
+
const i = o.mode || o.getAttribute("mode");
|
|
142
|
+
if (i) {
|
|
143
|
+
if (f(i)) return i;
|
|
144
|
+
m(o) && require_p_BJoMtgfR.u("Invalid ionic mode: \"" + i + "\", expected: \"ios\" or \"md\"");
|
|
145
|
+
}
|
|
146
|
+
o = o.parentElement;
|
|
147
|
+
}
|
|
148
|
+
return O$2;
|
|
149
|
+
}));
|
|
150
|
+
}, n$1 = (n, o) => null !== o.closest(n), o$3 = (n, o) => "string" == typeof n && n.length > 0 ? Object.assign({
|
|
151
|
+
"ion-color": !0,
|
|
152
|
+
[`ion-color-${n}`]: !0
|
|
153
|
+
}, o) : o, t$3 = /^[a-z][a-z0-9+\-.]*:/, l$5 = async (n, o, r, l) => {
|
|
154
|
+
if (null != n && "#" !== n[0] && !t$3.test(n)) {
|
|
155
|
+
const t = document.querySelector("ion-router");
|
|
156
|
+
if (t) return o?.preventDefault(), t.push(n, r, l);
|
|
157
|
+
}
|
|
158
|
+
return !1;
|
|
159
|
+
}, o$2 = (t) => require_p_9VcRUwdB.r().duration(t ? 400 : 300), i$2 = (t) => {
|
|
160
|
+
let e, n;
|
|
161
|
+
const r = t.width + 8, i = require_p_9VcRUwdB.r(), u = require_p_9VcRUwdB.r();
|
|
162
|
+
t.isEndSide ? (e = r + "px", n = "0px") : (e = -r + "px", n = "0px"), i.addElement(t.menuInnerEl).fromTo("transform", `translateX(${e})`, `translateX(${n})`);
|
|
163
|
+
const c = "ios" === g$5(t), p = c ? .2 : .25;
|
|
164
|
+
return u.addElement(t.backdropEl).fromTo("opacity", .01, p), o$2(c).addAnimation([i, u]);
|
|
165
|
+
}, u$5 = (t) => {
|
|
166
|
+
let e, n;
|
|
167
|
+
const r = g$5(t), i = t.width;
|
|
168
|
+
t.isEndSide ? (e = -i + "px", n = i + "px") : (e = i + "px", n = -i + "px");
|
|
169
|
+
const u = require_p_9VcRUwdB.r().addElement(t.menuInnerEl).fromTo("transform", `translateX(${n})`, "translateX(0px)"), c = require_p_9VcRUwdB.r().addElement(t.contentEl).fromTo("transform", "translateX(0px)", `translateX(${e})`), p = require_p_9VcRUwdB.r().addElement(t.backdropEl).fromTo("opacity", .01, .32);
|
|
170
|
+
return o$2("ios" === r).addAnimation([
|
|
171
|
+
u,
|
|
172
|
+
c,
|
|
173
|
+
p
|
|
174
|
+
]);
|
|
175
|
+
}, c$4 = (t) => {
|
|
176
|
+
const e = g$5(t), n = t.width * (t.isEndSide ? -1 : 1) + "px", r = require_p_9VcRUwdB.r().addElement(t.contentEl).fromTo("transform", "translateX(0px)", `translateX(${n})`);
|
|
177
|
+
return o$2("ios" === e).addAnimation(r);
|
|
178
|
+
};
|
|
179
|
+
(() => {
|
|
180
|
+
const s = /* @__PURE__ */ new Map(), a = [], o = async (t, e = !1) => {
|
|
181
|
+
if (await d(), "start" === t || "end" === t) {
|
|
182
|
+
const r = a.filter(((e) => e.side === t && !e.disabled));
|
|
183
|
+
if (r.length >= 1) return r.length > 1 && e && require_p_BJoMtgfR.u(`menuController queried for a menu on the "${t}" side, but ${r.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, r.map(((t) => t.el))), r[0].el;
|
|
184
|
+
const s = a.filter(((e) => e.side === t));
|
|
185
|
+
if (s.length >= 1) return s.length > 1 && e && require_p_BJoMtgfR.u(`menuController queried for a menu on the "${t}" side, but ${s.length} menus were found. The first menu reference will be used. If this is not the behavior you want then pass the ID of the menu instead of its side.`, s.map(((t) => t.el))), s[0].el;
|
|
186
|
+
} else if (null != t) return w(((e) => e.menuId === t));
|
|
187
|
+
return w(((t) => !t.disabled)) || (a.length > 0 ? a[0].el : void 0);
|
|
188
|
+
}, p = async () => (await d(), m()), f = (t, e) => {
|
|
189
|
+
s.set(t, e);
|
|
190
|
+
}, m = () => w(((t) => t._isOpen)), l = () => a.some(((t) => t.isAnimating)), w = (t) => {
|
|
191
|
+
const e = a.find(t);
|
|
192
|
+
if (void 0 !== e) return e.el;
|
|
193
|
+
}, d = () => Promise.all(Array.from(document.querySelectorAll("ion-menu")).map(((t) => new Promise(((e) => require_p_DgbT0exM.e(t, e))))));
|
|
194
|
+
return f("reveal", c$4), f("push", u$5), f("overlay", i$2), require_p_ZjP4CjeZ.o?.addEventListener("ionBackButton", ((t) => {
|
|
195
|
+
const n = m();
|
|
196
|
+
n && t.detail.register(99, (() => n.close()));
|
|
197
|
+
})), {
|
|
198
|
+
registerAnimation: f,
|
|
199
|
+
get: o,
|
|
200
|
+
getMenus: async () => (await d(), a.map(((t) => t.el))),
|
|
201
|
+
getOpen: p,
|
|
202
|
+
isEnabled: async (t) => {
|
|
203
|
+
const e = await o(t);
|
|
204
|
+
return !!e && !e.disabled;
|
|
205
|
+
},
|
|
206
|
+
swipeGesture: async (t, e) => {
|
|
207
|
+
const n = await o(e);
|
|
208
|
+
return n && (n.swipeGesture = t), n;
|
|
209
|
+
},
|
|
210
|
+
isAnimating: async () => (await d(), l()),
|
|
211
|
+
isOpen: async (t) => {
|
|
212
|
+
if (null != t) {
|
|
213
|
+
const e = await o(t);
|
|
214
|
+
return void 0 !== e && e.isOpen();
|
|
215
|
+
}
|
|
216
|
+
return void 0 !== await p();
|
|
217
|
+
},
|
|
218
|
+
enable: async (t, e) => {
|
|
219
|
+
const n = await o(e);
|
|
220
|
+
return n && (n.disabled = !t), n;
|
|
221
|
+
},
|
|
222
|
+
toggle: async (t) => {
|
|
223
|
+
const e = await o(t, !0);
|
|
224
|
+
return !!e && e.toggle();
|
|
225
|
+
},
|
|
226
|
+
close: async (t) => {
|
|
227
|
+
const e = await (void 0 !== t ? o(t, !0) : p());
|
|
228
|
+
return void 0 !== e && e.close();
|
|
229
|
+
},
|
|
230
|
+
open: async (t) => {
|
|
231
|
+
const e = await o(t, !0);
|
|
232
|
+
return !!e && e.open();
|
|
233
|
+
},
|
|
234
|
+
_getOpenSync: m,
|
|
235
|
+
_createAnimation: (t, e) => {
|
|
236
|
+
const n = s.get(t);
|
|
237
|
+
if (!n) throw new Error("animation not registered");
|
|
238
|
+
return n(e);
|
|
239
|
+
},
|
|
240
|
+
_register: (t) => {
|
|
241
|
+
a.indexOf(t) < 0 && a.push(t);
|
|
242
|
+
},
|
|
243
|
+
_unregister: (t) => {
|
|
244
|
+
const e = a.indexOf(t);
|
|
245
|
+
e > -1 && a.splice(e, 1);
|
|
246
|
+
},
|
|
247
|
+
_setOpen: async (t, e, n, r) => {
|
|
248
|
+
if (l()) return !1;
|
|
249
|
+
if (e) {
|
|
250
|
+
const e = await p();
|
|
251
|
+
e && t.el !== e && await e.setOpen(!1, !1);
|
|
252
|
+
}
|
|
253
|
+
return t._setOpen(e, n, r);
|
|
254
|
+
}
|
|
255
|
+
};
|
|
256
|
+
})();
|
|
257
|
+
//#endregion
|
|
258
|
+
//#region node_modules/@ionic/core/components/p-BR3tZJmu.js
|
|
259
|
+
/*!
|
|
260
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
261
|
+
*/
|
|
262
|
+
var o$1 = async (o, t, i, n, r, s) => {
|
|
263
|
+
var a;
|
|
264
|
+
if (o) return o.attachViewToDom(t, i, r, n);
|
|
265
|
+
if (!(s || "string" == typeof i || i instanceof HTMLElement)) throw new Error("framework delegate is missing");
|
|
266
|
+
const c = "string" == typeof i ? null === (a = t.ownerDocument) || void 0 === a ? void 0 : a.createElement(i) : i;
|
|
267
|
+
return n && n.forEach(((e) => c.classList.add(e))), r && Object.assign(c, r), t.appendChild(c), await new Promise(((o) => require_p_DgbT0exM.e(c, o))), c;
|
|
268
|
+
}, t$2 = (e, o) => {
|
|
269
|
+
if (o) {
|
|
270
|
+
if (e) return e.removeViewFromDom(o.parentElement, o);
|
|
271
|
+
o.remove();
|
|
272
|
+
}
|
|
273
|
+
return Promise.resolve();
|
|
274
|
+
}, T$1 = (n) => ({
|
|
275
|
+
create: (o) => S$1(n, o),
|
|
276
|
+
dismiss: (o, e, t) => E$1(document, o, e, n, t),
|
|
277
|
+
getTop: async () => V(document, n)
|
|
278
|
+
});
|
|
279
|
+
T$1("ion-alert");
|
|
280
|
+
T$1("ion-action-sheet");
|
|
281
|
+
T$1("ion-loading");
|
|
282
|
+
T$1("ion-modal");
|
|
283
|
+
T$1("ion-picker-legacy");
|
|
284
|
+
T$1("ion-popover");
|
|
285
|
+
T$1("ion-toast");
|
|
286
|
+
var S$1 = (n, o) => "undefined" != typeof window && void 0 !== window.customElements ? window.customElements.whenDefined(n).then((() => {
|
|
287
|
+
const t = document.createElement(n);
|
|
288
|
+
return t.classList.add("overlay-hidden"), Object.assign(t, Object.assign(Object.assign({}, o), { hasController: !0 })), L$1(document).appendChild(t), new Promise(((n) => require_p_DgbT0exM.e(t, n)));
|
|
289
|
+
})) : Promise.resolve(), E$1 = (n, o, e, t, i) => {
|
|
290
|
+
const a = V(n, t, i);
|
|
291
|
+
return a ? a.dismiss(o, e) : Promise.reject("overlay does not exist");
|
|
292
|
+
}, F = (n, o) => ((n, o) => (void 0 === o && (o = "ion-alert,ion-action-sheet,ion-loading,ion-modal,ion-picker-legacy,ion-popover,ion-toast"), Array.from(n.querySelectorAll(o)).filter(((n) => n.overlayIndex > 0))))(n, o).filter(((n) => !n.classList.contains("overlay-hidden"))), V = (n, o, e) => {
|
|
293
|
+
const t = F(n, o);
|
|
294
|
+
return (void 0 === e ? t : t.filter(((n) => n.id === e))).slice(-1)[0];
|
|
295
|
+
}, L$1 = (n) => n.querySelector("ion-app") || n.body, d$3 = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
296
|
+
constructor(t) {
|
|
297
|
+
super(), !1 !== t && this.__registerHost();
|
|
298
|
+
}
|
|
299
|
+
componentDidLoad() {
|
|
300
|
+
this.rIC((async () => {
|
|
301
|
+
const t = s$2(window, "hybrid");
|
|
302
|
+
if (require_p_BJoMtgfR.n.getBoolean("_testing") || Promise.resolve().then(() => require("./p-BgwEQWW6-BM87vVU5.cjs")).then(((t) => t.startTapClick(require_p_BJoMtgfR.n))), require_p_BJoMtgfR.n.getBoolean("statusTap", t) && Promise.resolve().then(() => require("./p-CneGxKsZ-C5qTtPZx.cjs")).then(((t) => t.startStatusTap())), require_p_BJoMtgfR.n.getBoolean("inputShims", m$5())) {
|
|
303
|
+
const t = s$2(window, "ios") ? "ios" : "android";
|
|
304
|
+
Promise.resolve().then(() => require("./p-Cwv-vmkN-_Ll5IGJb.cjs")).then(((e) => e.startInputShims(require_p_BJoMtgfR.n, t)));
|
|
305
|
+
}
|
|
306
|
+
const e = await Promise.resolve().then(() => require("./p-vEbVo2hO-Bo4CY69w.cjs")).then((n) => n.p_vEbVo2hO_exports), i = t || require_p_vEbVo2hO.o();
|
|
307
|
+
require_p_BJoMtgfR.n.getBoolean("hardwareBackButton", i) ? e.startHardwareBackButton() : (require_p_vEbVo2hO.o() && require_p_BJoMtgfR.u("[ion-app] - experimentalCloseWatcher was set to `true`, but hardwareBackButton was set to `false`. Both config options must be `true` for the Close Watcher API to be used."), e.blockHardwareBackButton()), "undefined" != typeof window && Promise.resolve().then(() => require("./p-D6Ynv7Xh-CQpbvraJ.cjs")).then(((t) => t.startKeyboardAssist(window))), Promise.resolve().then(() => require("./p-BmVRXR1y-BsLZqRc0.cjs")).then(((t) => this.focusVisible = t.startFocusVisible()));
|
|
308
|
+
}));
|
|
309
|
+
}
|
|
310
|
+
disconnectedCallback() {
|
|
311
|
+
this.loadTimeout && clearTimeout(this.loadTimeout);
|
|
312
|
+
}
|
|
313
|
+
async setFocus(t) {
|
|
314
|
+
this.focusVisible && this.focusVisible.setFocus(t);
|
|
315
|
+
}
|
|
316
|
+
rIC(t) {
|
|
317
|
+
"requestIdleCallback" in window ? window.requestIdleCallback(t) : this.loadTimeout = setTimeout(t, 32);
|
|
318
|
+
}
|
|
319
|
+
render() {
|
|
320
|
+
return require_p_BJoMtgfR.Ct(require_p_BJoMtgfR.It, {
|
|
321
|
+
key: "77a7459d3e42b3715a5a7e1cf468e2ebc99e54bb",
|
|
322
|
+
class: {
|
|
323
|
+
[g$5(this)]: !0,
|
|
324
|
+
"ion-page": !0,
|
|
325
|
+
"force-statusbar-padding": require_p_BJoMtgfR.n.getBoolean("_forceStatusbarPadding")
|
|
326
|
+
}
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
get el() {
|
|
330
|
+
return this;
|
|
331
|
+
}
|
|
332
|
+
static get style() {
|
|
333
|
+
return "html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";
|
|
334
|
+
}
|
|
335
|
+
}, [
|
|
336
|
+
0,
|
|
337
|
+
"ion-app",
|
|
338
|
+
{ setFocus: [64] }
|
|
339
|
+
]), m$5 = () => !(!s$2(window, "ios") || !s$2(window, "mobile")) || !(!s$2(window, "android") || !s$2(window, "mobileweb")), l$4 = function() {
|
|
340
|
+
"undefined" != typeof customElements && ["ion-app"].forEach(((t) => {
|
|
341
|
+
"ion-app" === t && (customElements.get(require_p_BJoMtgfR.Zn(t)) || customElements.define(require_p_BJoMtgfR.Zn(t), d$3));
|
|
342
|
+
}));
|
|
343
|
+
};
|
|
344
|
+
//#endregion
|
|
345
|
+
//#region node_modules/@ionic/core/components/ion-router.js
|
|
346
|
+
/*!
|
|
347
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
348
|
+
*/
|
|
349
|
+
var c$3 = "root", u$3 = "forward", h$3 = (t) => "/" + t.filter(((t) => t.length > 0)).join("/"), l$3 = (t) => {
|
|
350
|
+
let n, o = [""];
|
|
351
|
+
if (null != t) {
|
|
352
|
+
const e = t.indexOf("?");
|
|
353
|
+
e > -1 && (n = t.substring(e + 1), t = t.substring(0, e)), o = t.split("/").map(((t) => t.trim())).filter(((t) => t.length > 0)), 0 === o.length && (o = [""]);
|
|
354
|
+
}
|
|
355
|
+
return {
|
|
356
|
+
segments: o,
|
|
357
|
+
queryString: n
|
|
358
|
+
};
|
|
359
|
+
}, f$4 = async (n, o, e, r, s = !1, a) => {
|
|
360
|
+
try {
|
|
361
|
+
const t = w$2(n);
|
|
362
|
+
if (r >= o.length || !t) return s;
|
|
363
|
+
await new Promise(((n) => require_p_DgbT0exM.e(t, n)));
|
|
364
|
+
const u = o[r], h = await t.setRouteId(u.id, u.params, e, a);
|
|
365
|
+
return h.changed && (e = c$3, s = !0), s = await f$4(h.element, o, e, r + 1, s, a), h.markVisible && await h.markVisible(), s;
|
|
366
|
+
} catch (n) {
|
|
367
|
+
return require_p_BJoMtgfR.f("[ion-router] - Exception in writeNavState:", n), !1;
|
|
368
|
+
}
|
|
369
|
+
}, d$2 = ":not([no-router]) ion-nav, :not([no-router]) ion-tabs, :not([no-router]) ion-router-outlet", w$2 = (t) => {
|
|
370
|
+
if (!t) return;
|
|
371
|
+
if (t.matches(d$2)) return t;
|
|
372
|
+
const n = t.querySelector(d$2);
|
|
373
|
+
return null != n ? n : void 0;
|
|
374
|
+
}, m$4 = (t, n) => n.find(((n) => ((t, n) => {
|
|
375
|
+
const { from: o, to: e } = n;
|
|
376
|
+
if (void 0 === e) return !1;
|
|
377
|
+
if (o.length > t.length) return !1;
|
|
378
|
+
for (let n = 0; n < o.length; n++) {
|
|
379
|
+
const e = o[n];
|
|
380
|
+
if ("*" === e) return !0;
|
|
381
|
+
if (e !== t[n]) return !1;
|
|
382
|
+
}
|
|
383
|
+
return o.length === t.length;
|
|
384
|
+
})(t, n))), p$4 = (t, n) => {
|
|
385
|
+
const o = Math.min(t.length, n.length);
|
|
386
|
+
let e = 0;
|
|
387
|
+
for (let r = 0; r < o; r++) {
|
|
388
|
+
const o = t[r], s = n[r];
|
|
389
|
+
if (o.id.toLowerCase() !== s.id) break;
|
|
390
|
+
if (o.params) {
|
|
391
|
+
const t = Object.keys(o.params);
|
|
392
|
+
if (t.length === s.segments.length) {
|
|
393
|
+
const n = t.map(((t) => ":" + t));
|
|
394
|
+
for (let t = 0; t < n.length && n[t].toLowerCase() === s.segments[t]; t++) e++;
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
e++;
|
|
398
|
+
}
|
|
399
|
+
return e;
|
|
400
|
+
}, g$3 = (t, n) => {
|
|
401
|
+
const o = new R(t);
|
|
402
|
+
let e, r = !1;
|
|
403
|
+
for (let t = 0; t < n.length; t++) {
|
|
404
|
+
const s = n[t].segments;
|
|
405
|
+
if ("" === s[0]) r = !0;
|
|
406
|
+
else {
|
|
407
|
+
for (const n of s) {
|
|
408
|
+
const r = o.next();
|
|
409
|
+
if (":" === n[0]) {
|
|
410
|
+
if ("" === r) return null;
|
|
411
|
+
e = e || [], (e[t] || (e[t] = {}))[n.slice(1)] = r;
|
|
412
|
+
} else if (r !== n) return null;
|
|
413
|
+
}
|
|
414
|
+
r = !1;
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
return r && r !== ("" === o.next()) ? null : e ? n.map(((t, n) => ({
|
|
418
|
+
id: t.id,
|
|
419
|
+
segments: t.segments,
|
|
420
|
+
params: v$3(t.params, e[n]),
|
|
421
|
+
beforeEnter: t.beforeEnter,
|
|
422
|
+
beforeLeave: t.beforeLeave
|
|
423
|
+
}))) : n;
|
|
424
|
+
}, v$3 = (t, n) => t || n ? Object.assign(Object.assign({}, t), n) : void 0, b$2 = (t, n) => {
|
|
425
|
+
let o = null, e = 0;
|
|
426
|
+
for (const r of n) {
|
|
427
|
+
const n = g$3(t, r);
|
|
428
|
+
if (null !== n) {
|
|
429
|
+
const t = y$1(n);
|
|
430
|
+
t > e && (e = t, o = n);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
return o;
|
|
434
|
+
}, y$1 = (t) => {
|
|
435
|
+
let n = 1, o = 1;
|
|
436
|
+
for (const e of t) for (const t of e.segments) ":" === t[0] ? n += Math.pow(1, o) : "" !== t && (n += Math.pow(2, o)), o++;
|
|
437
|
+
return n;
|
|
438
|
+
};
|
|
439
|
+
var R = class {
|
|
440
|
+
constructor(t) {
|
|
441
|
+
this.segments = t.slice();
|
|
442
|
+
}
|
|
443
|
+
next() {
|
|
444
|
+
return this.segments.length > 0 ? this.segments.shift() : "";
|
|
445
|
+
}
|
|
446
|
+
}, E = (t, n) => n in t ? t[n] : t.hasAttribute(n) ? t.getAttribute(n) : null, S = (t) => Array.from(t.children).filter(((t) => "ION-ROUTE-REDIRECT" === t.tagName)).map(((t) => {
|
|
447
|
+
const n = E(t, "to");
|
|
448
|
+
return {
|
|
449
|
+
from: l$3(E(t, "from")).segments,
|
|
450
|
+
to: null == n ? void 0 : l$3(n)
|
|
451
|
+
};
|
|
452
|
+
})), C = (t) => O(j$1(t)), j$1 = (t) => Array.from(t.children).filter(((t) => "ION-ROUTE" === t.tagName && t.component)).map(((t) => {
|
|
453
|
+
const n = E(t, "component");
|
|
454
|
+
return {
|
|
455
|
+
segments: l$3(E(t, "url")).segments,
|
|
456
|
+
id: n.toLowerCase(),
|
|
457
|
+
params: t.componentProps,
|
|
458
|
+
beforeLeave: t.beforeLeave,
|
|
459
|
+
beforeEnter: t.beforeEnter,
|
|
460
|
+
children: j$1(t)
|
|
461
|
+
};
|
|
462
|
+
})), O = (t) => {
|
|
463
|
+
const n = [];
|
|
464
|
+
for (const o of t) T([], n, o);
|
|
465
|
+
return n;
|
|
466
|
+
}, T = (t, n, o) => {
|
|
467
|
+
if (t = [...t, {
|
|
468
|
+
id: o.id,
|
|
469
|
+
segments: o.segments,
|
|
470
|
+
params: o.params,
|
|
471
|
+
beforeLeave: o.beforeLeave,
|
|
472
|
+
beforeEnter: o.beforeEnter
|
|
473
|
+
}], 0 !== o.children.length) for (const e of o.children) T(t, n, e);
|
|
474
|
+
else n.push(t);
|
|
475
|
+
}, k$1 = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
476
|
+
constructor(t) {
|
|
477
|
+
super(), !1 !== t && this.__registerHost(), this.ionRouteWillChange = require_p_BJoMtgfR.Jt(this, "ionRouteWillChange", 7), this.ionRouteDidChange = require_p_BJoMtgfR.Jt(this, "ionRouteDidChange", 7), this.previousPath = null, this.busy = !1, this.state = 0, this.lastState = 0, this.root = "/", this.useHash = !0;
|
|
478
|
+
}
|
|
479
|
+
async componentWillLoad() {
|
|
480
|
+
await (w$2(document.body) ? Promise.resolve() : new Promise(((t) => {
|
|
481
|
+
window.addEventListener("ionNavWillLoad", (() => t()), { once: !0 });
|
|
482
|
+
})));
|
|
483
|
+
const t = await this.runGuards(this.getSegments());
|
|
484
|
+
if (!0 !== t) {
|
|
485
|
+
if ("object" == typeof t) {
|
|
486
|
+
const { redirect: n } = t, o = l$3(n);
|
|
487
|
+
this.setSegments(o.segments, c$3, o.queryString), await this.writeNavStateRoot(o.segments, c$3);
|
|
488
|
+
}
|
|
489
|
+
} else await this.onRoutesChanged();
|
|
490
|
+
}
|
|
491
|
+
componentDidLoad() {
|
|
492
|
+
window.addEventListener("ionRouteRedirectChanged", require_p_DgbT0exM.h(this.onRedirectChanged.bind(this), 10)), window.addEventListener("ionRouteDataChanged", require_p_DgbT0exM.h(this.onRoutesChanged.bind(this), 100));
|
|
493
|
+
}
|
|
494
|
+
async onPopState() {
|
|
495
|
+
const t = this.historyDirection();
|
|
496
|
+
let n = this.getSegments();
|
|
497
|
+
const o = await this.runGuards(n);
|
|
498
|
+
if (!0 !== o) {
|
|
499
|
+
if ("object" != typeof o) return !1;
|
|
500
|
+
n = l$3(o.redirect).segments;
|
|
501
|
+
}
|
|
502
|
+
return this.writeNavStateRoot(n, t);
|
|
503
|
+
}
|
|
504
|
+
onBackButton(t) {
|
|
505
|
+
t.detail.register(0, ((t) => {
|
|
506
|
+
this.back(), t();
|
|
507
|
+
}));
|
|
508
|
+
}
|
|
509
|
+
async canTransition() {
|
|
510
|
+
const t = await this.runGuards();
|
|
511
|
+
return !0 === t || "object" == typeof t && t.redirect;
|
|
512
|
+
}
|
|
513
|
+
async push(t, n = "forward", o) {
|
|
514
|
+
var e;
|
|
515
|
+
if (t.startsWith(".")) {
|
|
516
|
+
const n = null !== (e = this.previousPath) && void 0 !== e ? e : "/", o = new URL(t, "https://host/" + n);
|
|
517
|
+
t = o.pathname + o.search;
|
|
518
|
+
}
|
|
519
|
+
let r = l$3(t);
|
|
520
|
+
const s = await this.runGuards(r.segments);
|
|
521
|
+
if (!0 !== s) {
|
|
522
|
+
if ("object" != typeof s) return !1;
|
|
523
|
+
r = l$3(s.redirect);
|
|
524
|
+
}
|
|
525
|
+
return this.setSegments(r.segments, n, r.queryString), this.writeNavStateRoot(r.segments, n, o);
|
|
526
|
+
}
|
|
527
|
+
back() {
|
|
528
|
+
return window.history.back(), Promise.resolve(this.waitPromise);
|
|
529
|
+
}
|
|
530
|
+
async printDebug() {
|
|
531
|
+
((t) => {
|
|
532
|
+
console.group(`[ion-core] ROUTES[${t.length}]`);
|
|
533
|
+
for (const n of t) {
|
|
534
|
+
const t = [];
|
|
535
|
+
n.forEach(((n) => t.push(...n.segments)));
|
|
536
|
+
const o = n.map(((t) => t.id));
|
|
537
|
+
console.debug("%c " + h$3(t), "font-weight: bold; padding-left: 20px", "=> ", `(${o.join(", ")})`);
|
|
538
|
+
}
|
|
539
|
+
console.groupEnd();
|
|
540
|
+
})(C(this.el)), ((t) => {
|
|
541
|
+
console.group(`[ion-core] REDIRECTS[${t.length}]`);
|
|
542
|
+
for (const n of t) n.to && console.debug("FROM: ", "$c " + h$3(n.from), "font-weight: bold", " TO: ", "$c " + h$3(n.to.segments), "font-weight: bold");
|
|
543
|
+
console.groupEnd();
|
|
544
|
+
})(S(this.el));
|
|
545
|
+
}
|
|
546
|
+
async navChanged(t) {
|
|
547
|
+
if (this.busy) return require_p_BJoMtgfR.u("[ion-router] - Router is busy, navChanged was cancelled."), !1;
|
|
548
|
+
const { ids: n, outlet: o } = await (async () => {
|
|
549
|
+
const t = [];
|
|
550
|
+
let n, o = window.document.body;
|
|
551
|
+
for (; n = w$2(o);) {
|
|
552
|
+
const e = await n.getRouteId();
|
|
553
|
+
if (!e) break;
|
|
554
|
+
o = e.element, e.element = void 0, t.push(e);
|
|
555
|
+
}
|
|
556
|
+
return {
|
|
557
|
+
ids: t,
|
|
558
|
+
outlet: n
|
|
559
|
+
};
|
|
560
|
+
})(), e = ((t, n) => {
|
|
561
|
+
let o = null, e = 0;
|
|
562
|
+
for (const r of n) {
|
|
563
|
+
const n = p$4(t, r);
|
|
564
|
+
n > e && (o = r, e = n);
|
|
565
|
+
}
|
|
566
|
+
return o ? o.map(((n, o) => {
|
|
567
|
+
var e;
|
|
568
|
+
return {
|
|
569
|
+
id: n.id,
|
|
570
|
+
segments: n.segments,
|
|
571
|
+
params: v$3(n.params, null === (e = t[o]) || void 0 === e ? void 0 : e.params)
|
|
572
|
+
};
|
|
573
|
+
})) : null;
|
|
574
|
+
})(n, C(this.el));
|
|
575
|
+
if (!e) return require_p_BJoMtgfR.u("[ion-router] - No matching URL for", n.map(((t) => t.id))), !1;
|
|
576
|
+
const s = ((t) => {
|
|
577
|
+
const n = [];
|
|
578
|
+
for (const o of t) for (const t of o.segments) if (":" === t[0]) {
|
|
579
|
+
const e = o.params && o.params[t.slice(1)];
|
|
580
|
+
if (!e) return null;
|
|
581
|
+
n.push(e);
|
|
582
|
+
} else "" !== t && n.push(t);
|
|
583
|
+
return n;
|
|
584
|
+
})(e);
|
|
585
|
+
return s ? (this.setSegments(s, t), await this.safeWriteNavState(o, e, c$3, s, null, n.length), !0) : (require_p_BJoMtgfR.u("[ion-router] - Router could not match path because some required param is missing."), !1);
|
|
586
|
+
}
|
|
587
|
+
onRedirectChanged() {
|
|
588
|
+
const t = this.getSegments();
|
|
589
|
+
t && m$4(t, S(this.el)) && this.writeNavStateRoot(t, c$3);
|
|
590
|
+
}
|
|
591
|
+
onRoutesChanged() {
|
|
592
|
+
return this.writeNavStateRoot(this.getSegments(), c$3);
|
|
593
|
+
}
|
|
594
|
+
historyDirection() {
|
|
595
|
+
var t;
|
|
596
|
+
const n = window;
|
|
597
|
+
null === n.history.state && (this.state++, n.history.replaceState(this.state, n.document.title, null === (t = n.document.location) || void 0 === t ? void 0 : t.href));
|
|
598
|
+
const o = n.history.state, e = this.lastState;
|
|
599
|
+
return this.lastState = o, o > e || o >= e && e > 0 ? u$3 : o < e ? "back" : c$3;
|
|
600
|
+
}
|
|
601
|
+
async writeNavStateRoot(n, o, e) {
|
|
602
|
+
if (!n) return require_p_BJoMtgfR.f("[ion-router] - URL is not part of the routing set."), !1;
|
|
603
|
+
const r = S(this.el), s = m$4(n, r);
|
|
604
|
+
let i = null;
|
|
605
|
+
if (s) {
|
|
606
|
+
const { segments: t, queryString: e } = s.to;
|
|
607
|
+
this.setSegments(t, o, e), i = s.from, n = t;
|
|
608
|
+
}
|
|
609
|
+
const a = C(this.el), c = b$2(n, a);
|
|
610
|
+
return c ? this.safeWriteNavState(document.body, c, o, n, i, 0, e) : (require_p_BJoMtgfR.f("[ion-router] - The path does not match any route."), !1);
|
|
611
|
+
}
|
|
612
|
+
async safeWriteNavState(n, o, e, r, s, i = 0, a) {
|
|
613
|
+
const c = await this.lock();
|
|
614
|
+
let u = !1;
|
|
615
|
+
try {
|
|
616
|
+
u = await this.writeNavState(n, o, e, r, s, i, a);
|
|
617
|
+
} catch (n) {
|
|
618
|
+
require_p_BJoMtgfR.f("[ion-router] - Exception in safeWriteNavState:", n);
|
|
619
|
+
}
|
|
620
|
+
return c(), u;
|
|
621
|
+
}
|
|
622
|
+
async lock() {
|
|
623
|
+
const t = this.waitPromise;
|
|
624
|
+
let n;
|
|
625
|
+
return this.waitPromise = new Promise(((t) => n = t)), void 0 !== t && await t, n;
|
|
626
|
+
}
|
|
627
|
+
async runGuards(t = this.getSegments(), n) {
|
|
628
|
+
if (void 0 === n && (n = l$3(this.previousPath).segments), !t || !n) return !0;
|
|
629
|
+
const o = C(this.el), e = b$2(n, o), r = e && e[e.length - 1].beforeLeave, s = !r || await r();
|
|
630
|
+
if (!1 === s || "object" == typeof s) return s;
|
|
631
|
+
const i = b$2(t, o), a = i && i[i.length - 1].beforeEnter;
|
|
632
|
+
return !a || a();
|
|
633
|
+
}
|
|
634
|
+
async writeNavState(t, n, o, e, s, i = 0, a) {
|
|
635
|
+
if (this.busy) return require_p_BJoMtgfR.u("[ion-router] - Router is busy, transition was cancelled."), !1;
|
|
636
|
+
this.busy = !0;
|
|
637
|
+
const c = this.routeChangeEvent(e, s);
|
|
638
|
+
c && this.ionRouteWillChange.emit(c);
|
|
639
|
+
const u = await f$4(t, n, o, i, !1, a);
|
|
640
|
+
return this.busy = !1, c && this.ionRouteDidChange.emit(c), u;
|
|
641
|
+
}
|
|
642
|
+
setSegments(t, n, o) {
|
|
643
|
+
this.state++, ((t, n, o, e, r, s, i) => {
|
|
644
|
+
const a = ((t, n, o) => {
|
|
645
|
+
let e = h$3(t);
|
|
646
|
+
return n && (e = "#" + e), void 0 !== o && (e += "?" + o), e;
|
|
647
|
+
})([...l$3(n).segments, ...e], o, i);
|
|
648
|
+
r === u$3 ? t.pushState(s, "", a) : t.replaceState(s, "", a);
|
|
649
|
+
})(window.history, this.root, this.useHash, t, n, this.state, o);
|
|
650
|
+
}
|
|
651
|
+
getSegments() {
|
|
652
|
+
return ((t, n, o) => {
|
|
653
|
+
return ((t, n) => {
|
|
654
|
+
if (t.length > n.length) return null;
|
|
655
|
+
if (t.length <= 1 && "" === t[0]) return n;
|
|
656
|
+
for (let o = 0; o < t.length; o++) if (t[o] !== n[o]) return null;
|
|
657
|
+
return n.length === t.length ? [""] : n.slice(t.length);
|
|
658
|
+
})(l$3(this.root).segments, l$3(o ? t.hash.slice(1) : t.pathname).segments);
|
|
659
|
+
})(window.location, 0, this.useHash);
|
|
660
|
+
}
|
|
661
|
+
routeChangeEvent(t, n) {
|
|
662
|
+
const o = this.previousPath, e = h$3(t);
|
|
663
|
+
return this.previousPath = e, e === o ? null : {
|
|
664
|
+
from: o,
|
|
665
|
+
redirectedFrom: n ? h$3(n) : null,
|
|
666
|
+
to: e
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
get el() {
|
|
670
|
+
return this;
|
|
671
|
+
}
|
|
672
|
+
}, [
|
|
673
|
+
0,
|
|
674
|
+
"ion-router",
|
|
675
|
+
{
|
|
676
|
+
root: [1],
|
|
677
|
+
useHash: [4, "use-hash"],
|
|
678
|
+
canTransition: [64],
|
|
679
|
+
push: [64],
|
|
680
|
+
back: [64],
|
|
681
|
+
printDebug: [64],
|
|
682
|
+
navChanged: [64]
|
|
683
|
+
},
|
|
684
|
+
[[
|
|
685
|
+
8,
|
|
686
|
+
"popstate",
|
|
687
|
+
"onPopState"
|
|
688
|
+
], [
|
|
689
|
+
4,
|
|
690
|
+
"ionBackButton",
|
|
691
|
+
"onBackButton"
|
|
692
|
+
]]
|
|
693
|
+
]), L = function() {
|
|
694
|
+
"undefined" != typeof customElements && ["ion-router"].forEach(((t) => {
|
|
695
|
+
"ion-router" === t && (customElements.get(require_p_BJoMtgfR.Zn(t)) || customElements.define(require_p_BJoMtgfR.Zn(t), k$1));
|
|
696
|
+
}));
|
|
697
|
+
}, s$1 = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
698
|
+
constructor(o) {
|
|
699
|
+
super(), !1 !== o && this.__registerHost(), this.ionRouteDataChanged = require_p_BJoMtgfR.Jt(this, "ionRouteDataChanged", 7), this.url = "";
|
|
700
|
+
}
|
|
701
|
+
onUpdate(o) {
|
|
702
|
+
this.ionRouteDataChanged.emit(o);
|
|
703
|
+
}
|
|
704
|
+
onComponentProps(o, t) {
|
|
705
|
+
if (o === t) return;
|
|
706
|
+
const e = o ? Object.keys(o) : [];
|
|
707
|
+
if (e.length === (t ? Object.keys(t) : []).length) {
|
|
708
|
+
for (const n of e) if (o[n] !== t[n]) return void this.onUpdate(o);
|
|
709
|
+
} else this.onUpdate(o);
|
|
710
|
+
}
|
|
711
|
+
connectedCallback() {
|
|
712
|
+
this.ionRouteDataChanged.emit();
|
|
713
|
+
}
|
|
714
|
+
static get watchers() {
|
|
715
|
+
return {
|
|
716
|
+
url: [{ onUpdate: 0 }],
|
|
717
|
+
component: [{ onUpdate: 0 }],
|
|
718
|
+
componentProps: [{ onComponentProps: 0 }]
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
}, [
|
|
722
|
+
0,
|
|
723
|
+
"ion-route",
|
|
724
|
+
{
|
|
725
|
+
url: [1],
|
|
726
|
+
component: [1],
|
|
727
|
+
componentProps: [16],
|
|
728
|
+
beforeLeave: [16],
|
|
729
|
+
beforeEnter: [16]
|
|
730
|
+
},
|
|
731
|
+
void 0,
|
|
732
|
+
{
|
|
733
|
+
url: [{ onUpdate: 0 }],
|
|
734
|
+
component: [{ onUpdate: 0 }],
|
|
735
|
+
componentProps: [{ onComponentProps: 0 }]
|
|
736
|
+
}
|
|
737
|
+
]), p$3 = function() {
|
|
738
|
+
"undefined" != typeof customElements && ["ion-route"].forEach(((o) => {
|
|
739
|
+
"ion-route" === o && (customElements.get(require_p_BJoMtgfR.Zn(o)) || customElements.define(require_p_BJoMtgfR.Zn(o), s$1));
|
|
740
|
+
}));
|
|
741
|
+
};
|
|
742
|
+
//#endregion
|
|
743
|
+
//#region node_modules/@ionic/core/components/p-B-hirT0v.js
|
|
744
|
+
/*!
|
|
745
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
746
|
+
*/
|
|
747
|
+
var t$1 = () => {
|
|
748
|
+
let t;
|
|
749
|
+
return { lock: async () => {
|
|
750
|
+
const e = t;
|
|
751
|
+
let n;
|
|
752
|
+
return t = new Promise(((t) => n = t)), void 0 !== e && await e, n;
|
|
753
|
+
} };
|
|
754
|
+
}, b$1 = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
755
|
+
constructor(t) {
|
|
756
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.ionNavWillLoad = require_p_BJoMtgfR.Jt(this, "ionNavWillLoad", 7), this.ionNavWillChange = require_p_BJoMtgfR.Jt(this, "ionNavWillChange", 3), this.ionNavDidChange = require_p_BJoMtgfR.Jt(this, "ionNavDidChange", 3), this.lockController = t$1(), this.gestureOrAnimationInProgress = !1, this.mode = g$5(this), this.animated = !0;
|
|
757
|
+
}
|
|
758
|
+
swipeHandlerChanged() {
|
|
759
|
+
this.gesture && this.gesture.enable(void 0 !== this.swipeHandler);
|
|
760
|
+
}
|
|
761
|
+
async connectedCallback() {
|
|
762
|
+
const t = () => {
|
|
763
|
+
this.gestureOrAnimationInProgress = !0, this.swipeHandler && this.swipeHandler.onStart();
|
|
764
|
+
};
|
|
765
|
+
this.gesture = (await Promise.resolve().then(() => require("./p-Cz5nLPGT-CCHjKH-2.cjs"))).createSwipeBackGesture(this.el, (() => !this.gestureOrAnimationInProgress && !!this.swipeHandler && this.swipeHandler.canStart()), (() => t()), ((t) => {
|
|
766
|
+
var i;
|
|
767
|
+
return null === (i = this.ani) || void 0 === i ? void 0 : i.progressStep(t);
|
|
768
|
+
}), ((t, i, s) => {
|
|
769
|
+
if (this.ani) {
|
|
770
|
+
this.ani.onFinish((() => {
|
|
771
|
+
this.gestureOrAnimationInProgress = !1, this.swipeHandler && this.swipeHandler.onEnd(t);
|
|
772
|
+
}), { oneTimeCallback: !0 });
|
|
773
|
+
let e = t ? -.001 : .001;
|
|
774
|
+
t ? e += t$4([0, 0], [.32, .72], [0, 1], [1, 1], i)[0] : (this.ani.easing("cubic-bezier(1, 0, 0.68, 0.28)"), e += t$4([0, 0], [1, 0], [.68, .28], [1, 1], i)[0]), this.ani.progressEnd(t ? 1 : 0, e, s);
|
|
775
|
+
} else this.gestureOrAnimationInProgress = !1;
|
|
776
|
+
})), this.swipeHandlerChanged();
|
|
777
|
+
}
|
|
778
|
+
componentWillLoad() {
|
|
779
|
+
this.ionNavWillLoad.emit();
|
|
780
|
+
}
|
|
781
|
+
disconnectedCallback() {
|
|
782
|
+
this.gesture && (this.gesture.destroy(), this.gesture = void 0);
|
|
783
|
+
}
|
|
784
|
+
async commit(t, i, s) {
|
|
785
|
+
const a = await this.lockController.lock();
|
|
786
|
+
let o = !1;
|
|
787
|
+
try {
|
|
788
|
+
o = await this.transition(t, i, s);
|
|
789
|
+
} catch (t) {
|
|
790
|
+
require_p_BJoMtgfR.f("[ion-router-outlet] - Exception in commit:", t);
|
|
791
|
+
}
|
|
792
|
+
return a(), o;
|
|
793
|
+
}
|
|
794
|
+
async setRouteId(t, i, s, e) {
|
|
795
|
+
return {
|
|
796
|
+
changed: await this.setRoot(t, i, {
|
|
797
|
+
duration: "root" === s ? 0 : void 0,
|
|
798
|
+
direction: "back" === s ? "back" : "forward",
|
|
799
|
+
animationBuilder: e
|
|
800
|
+
}),
|
|
801
|
+
element: this.activeEl
|
|
802
|
+
};
|
|
803
|
+
}
|
|
804
|
+
async getRouteId() {
|
|
805
|
+
const t = this.activeEl;
|
|
806
|
+
return t ? {
|
|
807
|
+
id: t.tagName,
|
|
808
|
+
element: t,
|
|
809
|
+
params: this.activeParams
|
|
810
|
+
} : void 0;
|
|
811
|
+
}
|
|
812
|
+
async setRoot(t, i, s) {
|
|
813
|
+
if (this.activeComponent === t && require_p_DgbT0exM._(i, this.activeParams)) return !1;
|
|
814
|
+
const e = this.activeEl, a = await o$1(this.delegate, this.el, t, ["ion-page", "ion-page-invisible"], i);
|
|
815
|
+
return this.activeComponent = t, this.activeEl = a, this.activeParams = i, await this.commit(a, e, s), await t$2(this.delegate, e), !0;
|
|
816
|
+
}
|
|
817
|
+
async transition(t, i, s = {}) {
|
|
818
|
+
if (i === t) return !1;
|
|
819
|
+
this.ionNavWillChange.emit();
|
|
820
|
+
const { el: e, mode: o } = this, n = this.animated && require_p_BJoMtgfR.n.getBoolean("animated", !0), h = s.animationBuilder || this.animation || require_p_BJoMtgfR.n.get("navAnimation");
|
|
821
|
+
return await require_p_9VcRUwdB.v(Object.assign(Object.assign({
|
|
822
|
+
mode: o,
|
|
823
|
+
animated: n,
|
|
824
|
+
enteringEl: t,
|
|
825
|
+
leavingEl: i,
|
|
826
|
+
baseEl: e,
|
|
827
|
+
deepWait: require_p_DgbT0exM.t(e),
|
|
828
|
+
progressCallback: s.progressAnimation ? (t) => {
|
|
829
|
+
void 0 === t || this.gestureOrAnimationInProgress ? this.ani = t : (this.gestureOrAnimationInProgress = !0, t.onFinish((() => {
|
|
830
|
+
this.gestureOrAnimationInProgress = !1, this.swipeHandler && this.swipeHandler.onEnd(!1);
|
|
831
|
+
}), { oneTimeCallback: !0 }), t.progressEnd(0, 0, 0));
|
|
832
|
+
} : void 0
|
|
833
|
+
}, s), { animationBuilder: h })), this.ionNavDidChange.emit(), !0;
|
|
834
|
+
}
|
|
835
|
+
render() {
|
|
836
|
+
return require_p_BJoMtgfR.Ct("slot", { key: "386c41745b61daba161cf75063da97fe29ba36cb" });
|
|
837
|
+
}
|
|
838
|
+
get el() {
|
|
839
|
+
return this;
|
|
840
|
+
}
|
|
841
|
+
static get watchers() {
|
|
842
|
+
return { swipeHandler: [{ swipeHandlerChanged: 0 }] };
|
|
843
|
+
}
|
|
844
|
+
static get style() {
|
|
845
|
+
return ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;z-index:0}";
|
|
846
|
+
}
|
|
847
|
+
}, [
|
|
848
|
+
257,
|
|
849
|
+
"ion-router-outlet",
|
|
850
|
+
{
|
|
851
|
+
mode: [1025],
|
|
852
|
+
delegate: [16],
|
|
853
|
+
animated: [4],
|
|
854
|
+
animation: [16],
|
|
855
|
+
swipeHandler: [16],
|
|
856
|
+
commit: [64],
|
|
857
|
+
setRouteId: [64],
|
|
858
|
+
getRouteId: [64]
|
|
859
|
+
},
|
|
860
|
+
void 0,
|
|
861
|
+
{ swipeHandler: [{ swipeHandlerChanged: 0 }] }
|
|
862
|
+
]), f$3 = function() {
|
|
863
|
+
"undefined" != typeof customElements && ["ion-router-outlet"].forEach(((t) => {
|
|
864
|
+
"ion-router-outlet" === t && (customElements.get(require_p_BJoMtgfR.Zn(t)) || customElements.define(require_p_BJoMtgfR.Zn(t), b$1));
|
|
865
|
+
}));
|
|
866
|
+
}, s = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>", l$2 = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
|
|
867
|
+
//#endregion
|
|
868
|
+
//#region node_modules/@ionic/core/components/p-YLXPWgVj.js
|
|
869
|
+
/*!
|
|
870
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
871
|
+
*/
|
|
872
|
+
var e;
|
|
873
|
+
var c$1 = (o, t, n, i, r) => (n = "ios" === (n && h$1(n)) ? "ios" : "md", i && "ios" === n ? o = h$1(i) : r && "md" === n ? o = h$1(r) : (o || !t || a(t) || (o = t), d(o) && (o = h$1(o))), d(o) && "" !== o.trim() ? "" !== o.replace(/[a-z]|-|\d/gi, "") ? null : o : null), l$1 = (o) => d(o) && (o = o.trim(), a(o)) ? o : null, a = (o) => o.length > 0 && /(\/|\.)/.test(o), d = (o) => "string" == typeof o, h$1 = (o) => o.toLowerCase(), f$1 = (o) => {
|
|
874
|
+
if (1 === o.nodeType) {
|
|
875
|
+
if ("script" === o.nodeName.toLowerCase()) return !1;
|
|
876
|
+
for (let t = 0; t < o.attributes.length; t++) {
|
|
877
|
+
const n = o.attributes[t].name;
|
|
878
|
+
if (d(n) && 0 === n.toLowerCase().indexOf("on")) return !1;
|
|
879
|
+
}
|
|
880
|
+
for (let t = 0; t < o.childNodes.length; t++) if (!f$1(o.childNodes[t])) return !1;
|
|
881
|
+
}
|
|
882
|
+
return !0;
|
|
883
|
+
}, u$1 = /* @__PURE__ */ new Map(), m$2 = /* @__PURE__ */ new Map();
|
|
884
|
+
var p$1;
|
|
885
|
+
function g(o) {
|
|
886
|
+
return u$1.set(o, ""), "";
|
|
887
|
+
}
|
|
888
|
+
var w = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
889
|
+
constructor(o) {
|
|
890
|
+
super(), !1 !== o && this.__registerHost(), this.__attachShadow(), this.iconName = null, this.inheritedAttributes = {}, this.didLoadIcon = !1, this.isVisible = !1, this.mode = b(), this.lazy = !1, this.sanitize = !0;
|
|
891
|
+
}
|
|
892
|
+
componentWillLoad() {
|
|
893
|
+
this.inheritedAttributes = ((o, t = []) => {
|
|
894
|
+
const n = {};
|
|
895
|
+
return t.forEach(((t) => {
|
|
896
|
+
o.hasAttribute(t) && (null !== o.getAttribute(t) && (n[t] = o.getAttribute(t)), o.removeAttribute(t));
|
|
897
|
+
})), n;
|
|
898
|
+
})(this.el, ["aria-label"]);
|
|
899
|
+
}
|
|
900
|
+
connectedCallback() {
|
|
901
|
+
this.waitUntilVisible(this.el, "50px", (() => {
|
|
902
|
+
this.isVisible = !0, this.loadIcon();
|
|
903
|
+
}));
|
|
904
|
+
}
|
|
905
|
+
componentDidLoad() {
|
|
906
|
+
this.didLoadIcon || this.loadIcon();
|
|
907
|
+
}
|
|
908
|
+
disconnectedCallback() {
|
|
909
|
+
this.io && (this.io.disconnect(), this.io = void 0);
|
|
910
|
+
}
|
|
911
|
+
waitUntilVisible(o, t, n) {
|
|
912
|
+
if (!Boolean(this.lazy && "undefined" != typeof window && window.IntersectionObserver)) return n();
|
|
913
|
+
const i = this.io = new window.IntersectionObserver(((o) => {
|
|
914
|
+
o[0].isIntersecting && (i.disconnect(), this.io = void 0, n());
|
|
915
|
+
}), { rootMargin: t });
|
|
916
|
+
i.observe(o);
|
|
917
|
+
}
|
|
918
|
+
loadIcon() {
|
|
919
|
+
if (this.isVisible) {
|
|
920
|
+
const t = ((t) => {
|
|
921
|
+
let n = l$1(t.src);
|
|
922
|
+
if (n) return n;
|
|
923
|
+
if (n = c$1(t.name, t.icon, t.mode, t.ios, t.md), n) return ((t, n) => {
|
|
924
|
+
const i = (() => {
|
|
925
|
+
if ("undefined" == typeof window) return /* @__PURE__ */ new Map();
|
|
926
|
+
if (!e) {
|
|
927
|
+
const o = window;
|
|
928
|
+
o.Ionicons = o.Ionicons || {}, e = o.Ionicons.map = o.Ionicons.map || /* @__PURE__ */ new Map();
|
|
929
|
+
}
|
|
930
|
+
return e;
|
|
931
|
+
})().get(t);
|
|
932
|
+
if (i) return i;
|
|
933
|
+
try {
|
|
934
|
+
return require_p_BJoMtgfR.q(`svg/${t}.svg`);
|
|
935
|
+
} catch (o) {
|
|
936
|
+
console.log("e", o), console.warn(`[Ionicons Warning]: Could not load icon with name "${t}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, n);
|
|
937
|
+
}
|
|
938
|
+
})(n, t);
|
|
939
|
+
if (t.icon) {
|
|
940
|
+
if (n = l$1(t.icon), n) return n;
|
|
941
|
+
if (n = l$1(t.icon[t.mode]), n) return n;
|
|
942
|
+
}
|
|
943
|
+
return null;
|
|
944
|
+
})(this);
|
|
945
|
+
t && (u$1.has(t) ? this.svgContent = u$1.get(t) : ((o, t) => m$2.get(o) || ("undefined" != typeof fetch && "undefined" != typeof document ? ((o) => o.startsWith("data:image/svg+xml"))(o) && ((o) => -1 !== o.indexOf(";utf8,"))(o) ? Promise.resolve(function(o) {
|
|
946
|
+
p$1 || (p$1 = new DOMParser());
|
|
947
|
+
const t = p$1.parseFromString(o, "text/html").querySelector("svg");
|
|
948
|
+
if (t) return u$1.set(o, t.outerHTML), t.outerHTML;
|
|
949
|
+
throw new Error(`Could not parse svg from ${o}`);
|
|
950
|
+
}(o)) : function(o, t) {
|
|
951
|
+
const n = fetch(o).then(((n) => n.text().then(((n) => {
|
|
952
|
+
n && !1 !== t && (n = ((o) => {
|
|
953
|
+
const t = document.createElement("div");
|
|
954
|
+
t.innerHTML = o;
|
|
955
|
+
for (let o = t.childNodes.length - 1; o >= 0; o--) "svg" !== t.childNodes[o].nodeName.toLowerCase() && t.removeChild(t.childNodes[o]);
|
|
956
|
+
const n = t.firstElementChild;
|
|
957
|
+
if (n && "svg" === n.nodeName.toLowerCase()) {
|
|
958
|
+
const o = n.getAttribute("class") || "";
|
|
959
|
+
if (n.setAttribute("class", (o + " s-ion-icon").trim()), f$1(n)) return t.innerHTML;
|
|
960
|
+
}
|
|
961
|
+
return "";
|
|
962
|
+
})(n));
|
|
963
|
+
const i = n || "";
|
|
964
|
+
return u$1.set(o, i), i;
|
|
965
|
+
})).catch((() => g(o))))).catch((() => g(o)));
|
|
966
|
+
return m$2.set(o, n), n;
|
|
967
|
+
}(o, t) : Promise.resolve(g(o))))(t, this.sanitize).then((() => this.svgContent = u$1.get(t))), this.didLoadIcon = !0);
|
|
968
|
+
}
|
|
969
|
+
this.iconName = c$1(this.name, this.icon, this.mode, this.ios, this.md);
|
|
970
|
+
}
|
|
971
|
+
render() {
|
|
972
|
+
const { flipRtl: o, iconName: t, inheritedAttributes: n, el: s } = this, e = this.mode || "md", c = !!t && (t.includes("arrow") || t.includes("chevron")) && !1 !== o, l = o || c;
|
|
973
|
+
return require_p_BJoMtgfR.Ct(require_p_BJoMtgfR.It, Object.assign({
|
|
974
|
+
key: "0578c899781ca145dd8205acd9670af39b57cf2e",
|
|
975
|
+
role: "img",
|
|
976
|
+
class: Object.assign(Object.assign({ [e]: !0 }, v$1(this.color)), {
|
|
977
|
+
[`icon-${this.size}`]: !!this.size,
|
|
978
|
+
"flip-rtl": l,
|
|
979
|
+
"icon-rtl": l && (a = s, a && "" !== a.dir ? "rtl" === a.dir.toLowerCase() : "rtl" === (null === document || void 0 === document ? void 0 : document.dir.toLowerCase()))
|
|
980
|
+
})
|
|
981
|
+
}, n), require_p_BJoMtgfR.Ct("div", this.svgContent ? {
|
|
982
|
+
class: "icon-inner",
|
|
983
|
+
innerHTML: this.svgContent
|
|
984
|
+
} : { class: "icon-inner" }));
|
|
985
|
+
var a;
|
|
986
|
+
}
|
|
987
|
+
static get assetsDirs() {
|
|
988
|
+
return ["svg"];
|
|
989
|
+
}
|
|
990
|
+
get el() {
|
|
991
|
+
return this;
|
|
992
|
+
}
|
|
993
|
+
static get watchers() {
|
|
994
|
+
return {
|
|
995
|
+
name: [{ loadIcon: 0 }],
|
|
996
|
+
src: [{ loadIcon: 0 }],
|
|
997
|
+
icon: [{ loadIcon: 0 }],
|
|
998
|
+
ios: [{ loadIcon: 0 }],
|
|
999
|
+
md: [{ loadIcon: 0 }]
|
|
1000
|
+
};
|
|
1001
|
+
}
|
|
1002
|
+
static get style() {
|
|
1003
|
+
return ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;-webkit-box-sizing:content-box !important;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{-webkit-transform:scaleX(-1);transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{-webkit-transform:scaleX(1);transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
|
|
1004
|
+
}
|
|
1005
|
+
}, [
|
|
1006
|
+
1,
|
|
1007
|
+
"ion-icon",
|
|
1008
|
+
{
|
|
1009
|
+
mode: [1025],
|
|
1010
|
+
color: [1],
|
|
1011
|
+
ios: [1],
|
|
1012
|
+
md: [1],
|
|
1013
|
+
flipRtl: [4, "flip-rtl"],
|
|
1014
|
+
name: [513],
|
|
1015
|
+
src: [1],
|
|
1016
|
+
icon: [8],
|
|
1017
|
+
size: [1],
|
|
1018
|
+
lazy: [4],
|
|
1019
|
+
sanitize: [4],
|
|
1020
|
+
svgContent: [32],
|
|
1021
|
+
isVisible: [32]
|
|
1022
|
+
},
|
|
1023
|
+
void 0,
|
|
1024
|
+
{
|
|
1025
|
+
name: [{ loadIcon: 0 }],
|
|
1026
|
+
src: [{ loadIcon: 0 }],
|
|
1027
|
+
icon: [{ loadIcon: 0 }],
|
|
1028
|
+
ios: [{ loadIcon: 0 }],
|
|
1029
|
+
md: [{ loadIcon: 0 }]
|
|
1030
|
+
}
|
|
1031
|
+
]), b = () => "undefined" != typeof document && document.documentElement.getAttribute("mode") || "md", v$1 = (o) => o ? {
|
|
1032
|
+
"ion-color": !0,
|
|
1033
|
+
[`ion-color-${o}`]: !0
|
|
1034
|
+
} : null;
|
|
1035
|
+
function y() {
|
|
1036
|
+
"undefined" != typeof customElements && ["ion-icon"].forEach(((o) => {
|
|
1037
|
+
"ion-icon" === o && (customElements.get(require_p_BJoMtgfR.Zn(o)) || customElements.define(require_p_BJoMtgfR.Zn(o), w));
|
|
1038
|
+
}));
|
|
1039
|
+
}
|
|
1040
|
+
//#endregion
|
|
1041
|
+
//#region node_modules/@ionic/core/components/p-fpbh6w3f.js
|
|
1042
|
+
/*!
|
|
1043
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
1044
|
+
*/
|
|
1045
|
+
var m$1 = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
1046
|
+
constructor(t) {
|
|
1047
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.type = "bounded";
|
|
1048
|
+
}
|
|
1049
|
+
async addRipple(t, n) {
|
|
1050
|
+
return new Promise(((e) => {
|
|
1051
|
+
require_p_BJoMtgfR.W((() => {
|
|
1052
|
+
const i = this.el.getBoundingClientRect(), o = i.width, r = i.height, s = Math.sqrt(o * o + r * r), m = Math.max(r, o), p = this.unbounded ? m : s + f, u = Math.floor(m * l), d = p / u;
|
|
1053
|
+
let b = t - i.left, k = n - i.top;
|
|
1054
|
+
this.unbounded && (b = .5 * o, k = .5 * r);
|
|
1055
|
+
const w = b - .5 * u, y = k - .5 * u, h = .5 * o - b, g = .5 * r - k;
|
|
1056
|
+
require_p_BJoMtgfR.P((() => {
|
|
1057
|
+
const t = document.createElement("div");
|
|
1058
|
+
t.classList.add("ripple-effect");
|
|
1059
|
+
const n = t.style;
|
|
1060
|
+
n.top = y + "px", n.left = w + "px", n.width = n.height = u + "px", n.setProperty("--final-scale", `${d}`), n.setProperty("--translate-end", `${h}px, ${g}px`), (this.el.shadowRoot || this.el).appendChild(t), setTimeout((() => {
|
|
1061
|
+
e((() => {
|
|
1062
|
+
c(t);
|
|
1063
|
+
}));
|
|
1064
|
+
}), 325);
|
|
1065
|
+
}));
|
|
1066
|
+
}));
|
|
1067
|
+
}));
|
|
1068
|
+
}
|
|
1069
|
+
get unbounded() {
|
|
1070
|
+
return "unbounded" === this.type;
|
|
1071
|
+
}
|
|
1072
|
+
render() {
|
|
1073
|
+
return require_p_BJoMtgfR.Ct(require_p_BJoMtgfR.It, {
|
|
1074
|
+
key: "3b59cbb44741569a7350f9638b4392add673b6f1",
|
|
1075
|
+
role: "presentation",
|
|
1076
|
+
class: {
|
|
1077
|
+
[g$5(this)]: !0,
|
|
1078
|
+
unbounded: this.unbounded
|
|
1079
|
+
}
|
|
1080
|
+
});
|
|
1081
|
+
}
|
|
1082
|
+
get el() {
|
|
1083
|
+
return this;
|
|
1084
|
+
}
|
|
1085
|
+
static get style() {
|
|
1086
|
+
return ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:strict;pointer-events:none}:host(.unbounded){contain:layout size style}.ripple-effect{border-radius:50%;position:absolute;background-color:currentColor;color:inherit;contain:strict;opacity:0;-webkit-animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;animation:225ms rippleAnimation forwards, 75ms fadeInAnimation forwards;will-change:transform, opacity;pointer-events:none}.fade-out{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1));-webkit-animation:150ms fadeOutAnimation forwards;animation:150ms fadeOutAnimation forwards}@-webkit-keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@keyframes rippleAnimation{from{-webkit-animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);animation-timing-function:cubic-bezier(0.4, 0, 0.2, 1);-webkit-transform:scale(1);transform:scale(1)}to{-webkit-transform:translate(var(--translate-end)) scale(var(--final-scale, 1));transform:translate(var(--translate-end)) scale(var(--final-scale, 1))}}@-webkit-keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@keyframes fadeInAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:0.16}}@-webkit-keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}@keyframes fadeOutAnimation{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0.16}to{opacity:0}}";
|
|
1087
|
+
}
|
|
1088
|
+
}, [
|
|
1089
|
+
1,
|
|
1090
|
+
"ion-ripple-effect",
|
|
1091
|
+
{
|
|
1092
|
+
type: [1],
|
|
1093
|
+
addRipple: [64]
|
|
1094
|
+
}
|
|
1095
|
+
]), c = (t) => {
|
|
1096
|
+
t.classList.add("fade-out"), setTimeout((() => {
|
|
1097
|
+
t.remove();
|
|
1098
|
+
}), 200);
|
|
1099
|
+
}, f = 10, l = .5;
|
|
1100
|
+
function p() {
|
|
1101
|
+
"undefined" != typeof customElements && ["ion-ripple-effect"].forEach(((t) => {
|
|
1102
|
+
"ion-ripple-effect" === t && (customElements.get(require_p_BJoMtgfR.Zn(t)) || customElements.define(require_p_BJoMtgfR.Zn(t), m$1));
|
|
1103
|
+
}));
|
|
1104
|
+
}
|
|
1105
|
+
//#endregion
|
|
1106
|
+
//#region node_modules/@ionic/core/components/ion-back-button.js
|
|
1107
|
+
/*!
|
|
1108
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
1109
|
+
*/
|
|
1110
|
+
var m = require_p_BJoMtgfR.Dn(class extends require_p_BJoMtgfR.I {
|
|
1111
|
+
constructor(t) {
|
|
1112
|
+
super(), !1 !== t && this.__registerHost(), this.__attachShadow(), this.inheritedAttributes = {}, this.disabled = !1, this.type = "button", this.onClick = async (t) => {
|
|
1113
|
+
const n = this.el.closest("ion-nav");
|
|
1114
|
+
return t.preventDefault(), n && await n.canGoBack() ? n.pop({
|
|
1115
|
+
animationBuilder: this.routerAnimation,
|
|
1116
|
+
skipIfBusy: !0
|
|
1117
|
+
}) : l$5(this.defaultHref, t, "back", this.routerAnimation);
|
|
1118
|
+
};
|
|
1119
|
+
}
|
|
1120
|
+
componentWillLoad() {
|
|
1121
|
+
this.inheritedAttributes = require_p_DgbT0exM.s(this.el), void 0 === this.defaultHref && (this.defaultHref = require_p_BJoMtgfR.n.get("backButtonDefaultHref"));
|
|
1122
|
+
}
|
|
1123
|
+
get backButtonIcon() {
|
|
1124
|
+
const t = this.icon;
|
|
1125
|
+
return null != t ? t : "ios" === g$5(this) ? require_p_BJoMtgfR.n.get("backButtonIcon", l$2) : require_p_BJoMtgfR.n.get("backButtonIcon", s);
|
|
1126
|
+
}
|
|
1127
|
+
get backButtonText() {
|
|
1128
|
+
const t = "ios" === g$5(this) ? "Back" : null;
|
|
1129
|
+
return null != this.text ? this.text : require_p_BJoMtgfR.n.get("backButtonText", t);
|
|
1130
|
+
}
|
|
1131
|
+
get hasIconOnly() {
|
|
1132
|
+
return this.backButtonIcon && !this.backButtonText;
|
|
1133
|
+
}
|
|
1134
|
+
get rippleType() {
|
|
1135
|
+
return this.hasIconOnly ? "unbounded" : "bounded";
|
|
1136
|
+
}
|
|
1137
|
+
render() {
|
|
1138
|
+
const { color: t, defaultHref: n, disabled: o, type: a, hasIconOnly: r, backButtonIcon: d, backButtonText: l, icon: p, inheritedAttributes: b } = this, h = void 0 !== n, m = g$5(this), u = b["aria-label"] || l || "back";
|
|
1139
|
+
return require_p_BJoMtgfR.Ct(require_p_BJoMtgfR.It, {
|
|
1140
|
+
key: "5466624a10f1ab56f5469e6dc07080303880f2fe",
|
|
1141
|
+
onClick: this.onClick,
|
|
1142
|
+
class: o$3(t, {
|
|
1143
|
+
[m]: !0,
|
|
1144
|
+
button: !0,
|
|
1145
|
+
"back-button-disabled": o,
|
|
1146
|
+
"back-button-has-icon-only": r,
|
|
1147
|
+
"in-toolbar": n$1("ion-toolbar", this.el),
|
|
1148
|
+
"in-toolbar-color": n$1("ion-toolbar[color]", this.el),
|
|
1149
|
+
"ion-activatable": !0,
|
|
1150
|
+
"ion-focusable": !0,
|
|
1151
|
+
"show-back-button": h
|
|
1152
|
+
})
|
|
1153
|
+
}, require_p_BJoMtgfR.Ct("button", {
|
|
1154
|
+
key: "63bc75ef0ad7cc9fb79e58217a3314b20acd73e3",
|
|
1155
|
+
type: a,
|
|
1156
|
+
disabled: o,
|
|
1157
|
+
class: "button-native",
|
|
1158
|
+
part: "native",
|
|
1159
|
+
"aria-label": u
|
|
1160
|
+
}, require_p_BJoMtgfR.Ct("span", {
|
|
1161
|
+
key: "5d3eacbd11af2245c6e1151cab446a0d96559ad8",
|
|
1162
|
+
class: "button-inner"
|
|
1163
|
+
}, d && require_p_BJoMtgfR.Ct("ion-icon", {
|
|
1164
|
+
key: "6439af0ae463764174e7d3207f02267811df666d",
|
|
1165
|
+
part: "icon",
|
|
1166
|
+
icon: d,
|
|
1167
|
+
"aria-hidden": "true",
|
|
1168
|
+
lazy: !1,
|
|
1169
|
+
"flip-rtl": void 0 === p
|
|
1170
|
+
}), l && require_p_BJoMtgfR.Ct("span", {
|
|
1171
|
+
key: "8ee89fb18dfdb5b75948a8b197ff4cdbc008742f",
|
|
1172
|
+
part: "text",
|
|
1173
|
+
"aria-hidden": "true",
|
|
1174
|
+
class: "button-text"
|
|
1175
|
+
}, l)), "md" === m && require_p_BJoMtgfR.Ct("ion-ripple-effect", {
|
|
1176
|
+
key: "63803a884998bc73bea5afe0b2a0a14e3fa4d6bf",
|
|
1177
|
+
type: this.rippleType
|
|
1178
|
+
})));
|
|
1179
|
+
}
|
|
1180
|
+
get el() {
|
|
1181
|
+
return this;
|
|
1182
|
+
}
|
|
1183
|
+
static get style() {
|
|
1184
|
+
return {
|
|
1185
|
+
ios: ":host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}ion-icon{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--background-hover:transparent;--background-hover-opacity:1;--background-focused:currentColor;--background-focused-opacity:.1;--border-radius:4px;--color:var(--ion-color-primary, #0054e9);--icon-margin-end:1px;--icon-margin-start:-4px;--icon-font-size:1.6em;--min-height:32px;font-size:clamp(17px, 1.0625rem, 21.998px)}.button-native{-webkit-transform:translateZ(0);transform:translateZ(0);overflow:visible;z-index:99}:host(.ion-activated) .button-native{opacity:0.4}@media (any-hover: hover){:host(:hover){opacity:0.6}}",
|
|
1186
|
+
md: ":host{--background:transparent;--color-focused:currentColor;--color-hover:currentColor;--icon-margin-top:0;--icon-margin-bottom:0;--icon-padding-top:0;--icon-padding-end:0;--icon-padding-bottom:0;--icon-padding-start:0;--margin-top:0;--margin-end:0;--margin-bottom:0;--margin-start:0;--min-width:auto;--min-height:auto;--padding-top:0;--padding-end:0;--padding-bottom:0;--padding-start:0;--opacity:1;--ripple-color:currentColor;--transition:background-color, opacity 100ms linear;display:none;min-width:var(--min-width);min-height:var(--min-height);color:var(--color);font-family:var(--ion-font-family, inherit);text-align:center;text-decoration:none;text-overflow:ellipsis;text-transform:none;white-space:nowrap;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-font-kerning:none;font-kerning:none}ion-ripple-effect{color:var(--ripple-color)}:host(.ion-color) .button-native{color:var(--ion-color-base)}:host(.show-back-button){display:block}:host(.back-button-disabled){cursor:default;opacity:0.5;pointer-events:none}.button-native{border-radius:var(--border-radius);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;-webkit-margin-start:var(--margin-start);margin-inline-start:var(--margin-start);-webkit-margin-end:var(--margin-end);margin-inline-end:var(--margin-end);margin-top:var(--margin-top);margin-bottom:var(--margin-bottom);-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;display:block;position:relative;width:100%;height:100%;min-height:inherit;-webkit-transition:var(--transition);transition:var(--transition);border:0;outline:none;background:var(--background);line-height:1;cursor:pointer;opacity:var(--opacity);overflow:hidden;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:0;-webkit-appearance:none;-moz-appearance:none;appearance:none}.button-inner{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}ion-icon{-webkit-padding-start:var(--icon-padding-start);padding-inline-start:var(--icon-padding-start);-webkit-padding-end:var(--icon-padding-end);padding-inline-end:var(--icon-padding-end);padding-top:var(--icon-padding-top);padding-bottom:var(--icon-padding-bottom);-webkit-margin-start:var(--icon-margin-start);margin-inline-start:var(--icon-margin-start);-webkit-margin-end:var(--icon-margin-end);margin-inline-end:var(--icon-margin-end);margin-top:var(--icon-margin-top);margin-bottom:var(--icon-margin-bottom);display:inherit;font-size:var(--icon-font-size);font-weight:var(--icon-font-weight);pointer-events:none}:host(.ion-focused) .button-native{color:var(--color-focused)}:host(.ion-focused) .button-native::after{background:var(--background-focused);opacity:var(--background-focused-opacity)}.button-native::after{left:0;right:0;top:0;bottom:0;position:absolute;content:\"\";opacity:0}@media (any-hover: hover){:host(:hover) .button-native{color:var(--color-hover)}:host(:hover) .button-native::after{background:var(--background-hover);opacity:var(--background-hover-opacity)}}:host(.ion-color.ion-focused) .button-native{color:var(--ion-color-base)}@media (any-hover: hover){:host(.ion-color:hover) .button-native{color:var(--ion-color-base)}}:host(.in-toolbar:not(.in-toolbar-color)){color:var(--ion-toolbar-color, var(--color))}:host{--border-radius:4px;--background-focused:currentColor;--background-focused-opacity:.12;--background-hover:currentColor;--background-hover-opacity:0.04;--color:currentColor;--icon-margin-end:0;--icon-margin-start:0;--icon-font-size:1.5rem;--icon-font-weight:normal;--min-height:32px;--min-width:44px;--padding-start:12px;--padding-end:12px;font-size:0.875rem;font-weight:500;text-transform:uppercase}:host(.back-button-has-icon-only){--border-radius:50%;min-width:48px;min-height:48px;aspect-ratio:1/1}.button-native{-webkit-box-shadow:none;box-shadow:none}.button-text{-webkit-padding-start:4px;padding-inline-start:4px;-webkit-padding-end:4px;padding-inline-end:4px;padding-top:0;padding-bottom:0}ion-icon{line-height:0.67;text-align:start}@media (any-hover: hover){:host(.ion-color:hover) .button-native::after{background:var(--ion-color-base)}}:host(.ion-color.ion-focused) .button-native::after{background:var(--ion-color-base)}"
|
|
1187
|
+
};
|
|
1188
|
+
}
|
|
1189
|
+
}, [
|
|
1190
|
+
33,
|
|
1191
|
+
"ion-back-button",
|
|
1192
|
+
{
|
|
1193
|
+
color: [513],
|
|
1194
|
+
defaultHref: [1025, "default-href"],
|
|
1195
|
+
disabled: [516],
|
|
1196
|
+
icon: [1],
|
|
1197
|
+
text: [1],
|
|
1198
|
+
type: [1],
|
|
1199
|
+
routerAnimation: [16]
|
|
1200
|
+
}
|
|
1201
|
+
]), v = function() {
|
|
1202
|
+
"undefined" != typeof customElements && [
|
|
1203
|
+
"ion-back-button",
|
|
1204
|
+
"ion-icon",
|
|
1205
|
+
"ion-ripple-effect"
|
|
1206
|
+
].forEach(((t) => {
|
|
1207
|
+
switch (t) {
|
|
1208
|
+
case "ion-back-button":
|
|
1209
|
+
customElements.get(require_p_BJoMtgfR.Zn(t)) || customElements.define(require_p_BJoMtgfR.Zn(t), m);
|
|
1210
|
+
break;
|
|
1211
|
+
case "ion-icon":
|
|
1212
|
+
customElements.get(require_p_BJoMtgfR.Zn(t)) || y();
|
|
1213
|
+
break;
|
|
1214
|
+
case "ion-ripple-effect": customElements.get(require_p_BJoMtgfR.Zn(t)) || p();
|
|
1215
|
+
}
|
|
1216
|
+
}));
|
|
1217
|
+
};
|
|
1218
|
+
//#endregion
|
|
1219
|
+
//#region node_modules/ionicons/components/index.js
|
|
1220
|
+
var NAMESPACE = "ionicons";
|
|
1221
|
+
var BUILD = {
|
|
1222
|
+
hydratedSelectorName: "hydrated",
|
|
1223
|
+
lazyLoad: false,
|
|
1224
|
+
updatable: true
|
|
1225
|
+
};
|
|
1226
|
+
var __defProp = Object.defineProperty;
|
|
1227
|
+
var __export = (target, all) => {
|
|
1228
|
+
for (var name in all) __defProp(target, name, {
|
|
1229
|
+
get: all[name],
|
|
1230
|
+
enumerable: true
|
|
1231
|
+
});
|
|
1232
|
+
};
|
|
1233
|
+
var getHostRef = (ref) => {
|
|
1234
|
+
if (ref.__stencil__getHostRef) return ref.__stencil__getHostRef();
|
|
1235
|
+
};
|
|
1236
|
+
var registerHost = (hostElement, cmpMeta) => {
|
|
1237
|
+
const hostRef = {
|
|
1238
|
+
$flags$: 0,
|
|
1239
|
+
$hostElement$: hostElement,
|
|
1240
|
+
$cmpMeta$: cmpMeta,
|
|
1241
|
+
$instanceValues$: /* @__PURE__ */ new Map()
|
|
1242
|
+
};
|
|
1243
|
+
hostRef.$onReadyPromise$ = new Promise((r) => hostRef.$onReadyResolve$ = r);
|
|
1244
|
+
hostElement["s-p"] = [];
|
|
1245
|
+
hostElement["s-rc"] = [];
|
|
1246
|
+
const ref = hostRef;
|
|
1247
|
+
hostElement.__stencil__getHostRef = () => ref;
|
|
1248
|
+
return ref;
|
|
1249
|
+
};
|
|
1250
|
+
var isMemberInElement = (elm, memberName) => memberName in elm;
|
|
1251
|
+
var consoleError = (e, el) => (0, console.error)(e, el);
|
|
1252
|
+
var styles = /* @__PURE__ */ new Map();
|
|
1253
|
+
var SLOT_FB_CSS = "slot-fb{display:contents}slot-fb[hidden]{display:none}";
|
|
1254
|
+
var XLINK_NS = "http://www.w3.org/1999/xlink";
|
|
1255
|
+
var win = typeof window !== "undefined" ? window : {};
|
|
1256
|
+
var H = win.HTMLElement || class {};
|
|
1257
|
+
var plt = {
|
|
1258
|
+
$flags$: 0,
|
|
1259
|
+
$resourcesUrl$: "",
|
|
1260
|
+
jmp: (h2) => h2(),
|
|
1261
|
+
raf: (h2) => requestAnimationFrame(h2),
|
|
1262
|
+
ael: (el, eventName, listener, opts) => el.addEventListener(eventName, listener, opts),
|
|
1263
|
+
rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
|
|
1264
|
+
ce: (eventName, opts) => new CustomEvent(eventName, opts)
|
|
1265
|
+
};
|
|
1266
|
+
var promiseResolve = (v) => Promise.resolve(v);
|
|
1267
|
+
var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
|
|
1268
|
+
try {
|
|
1269
|
+
new CSSStyleSheet();
|
|
1270
|
+
return typeof new CSSStyleSheet().replaceSync === "function";
|
|
1271
|
+
} catch (e) {}
|
|
1272
|
+
return false;
|
|
1273
|
+
})();
|
|
1274
|
+
var queuePending = false;
|
|
1275
|
+
var queueDomReads = [];
|
|
1276
|
+
var queueDomWrites = [];
|
|
1277
|
+
var queueTask = (queue, write) => (cb) => {
|
|
1278
|
+
queue.push(cb);
|
|
1279
|
+
if (!queuePending) {
|
|
1280
|
+
queuePending = true;
|
|
1281
|
+
if (write && plt.$flags$ & 4) nextTick(flush);
|
|
1282
|
+
else plt.raf(flush);
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
var consume = (queue) => {
|
|
1286
|
+
for (let i2 = 0; i2 < queue.length; i2++) try {
|
|
1287
|
+
queue[i2](performance.now());
|
|
1288
|
+
} catch (e) {
|
|
1289
|
+
consoleError(e);
|
|
1290
|
+
}
|
|
1291
|
+
queue.length = 0;
|
|
1292
|
+
};
|
|
1293
|
+
var flush = () => {
|
|
1294
|
+
consume(queueDomReads);
|
|
1295
|
+
consume(queueDomWrites);
|
|
1296
|
+
if (queuePending = queueDomReads.length > 0) plt.raf(flush);
|
|
1297
|
+
};
|
|
1298
|
+
var nextTick = (cb) => promiseResolve().then(cb);
|
|
1299
|
+
var writeTask = /* @__PURE__ */ queueTask(queueDomWrites, true);
|
|
1300
|
+
var getAssetPath = (path) => {
|
|
1301
|
+
const assetUrl = new URL(path, plt.$resourcesUrl$);
|
|
1302
|
+
return assetUrl.origin !== win.location.origin ? assetUrl.href : assetUrl.pathname;
|
|
1303
|
+
};
|
|
1304
|
+
var isComplexType = (o) => {
|
|
1305
|
+
o = typeof o;
|
|
1306
|
+
return o === "object" || o === "function";
|
|
1307
|
+
};
|
|
1308
|
+
function queryNonceMetaTagContent(doc) {
|
|
1309
|
+
var _a, _b, _c;
|
|
1310
|
+
return (_c = (_b = (_a = doc.head) == null ? void 0 : _a.querySelector("meta[name=\"csp-nonce\"]")) == null ? void 0 : _b.getAttribute("content")) != null ? _c : void 0;
|
|
1311
|
+
}
|
|
1312
|
+
var escapeRegExpSpecialCharacters = (text) => {
|
|
1313
|
+
return text.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
1314
|
+
};
|
|
1315
|
+
__export({}, {
|
|
1316
|
+
err: () => err,
|
|
1317
|
+
map: () => map,
|
|
1318
|
+
ok: () => ok,
|
|
1319
|
+
unwrap: () => unwrap,
|
|
1320
|
+
unwrapErr: () => unwrapErr
|
|
1321
|
+
});
|
|
1322
|
+
var ok = (value) => ({
|
|
1323
|
+
isOk: true,
|
|
1324
|
+
isErr: false,
|
|
1325
|
+
value
|
|
1326
|
+
});
|
|
1327
|
+
var err = (value) => ({
|
|
1328
|
+
isOk: false,
|
|
1329
|
+
isErr: true,
|
|
1330
|
+
value
|
|
1331
|
+
});
|
|
1332
|
+
function map(result, fn) {
|
|
1333
|
+
if (result.isOk) {
|
|
1334
|
+
const val = fn(result.value);
|
|
1335
|
+
if (val instanceof Promise) return val.then((newVal) => ok(newVal));
|
|
1336
|
+
else return ok(val);
|
|
1337
|
+
}
|
|
1338
|
+
if (result.isErr) {
|
|
1339
|
+
const value = result.value;
|
|
1340
|
+
return err(value);
|
|
1341
|
+
}
|
|
1342
|
+
throw "should never get here";
|
|
1343
|
+
}
|
|
1344
|
+
var unwrap = (result) => {
|
|
1345
|
+
if (result.isOk) return result.value;
|
|
1346
|
+
else throw result.value;
|
|
1347
|
+
};
|
|
1348
|
+
var unwrapErr = (result) => {
|
|
1349
|
+
if (result.isErr) return result.value;
|
|
1350
|
+
else throw result.value;
|
|
1351
|
+
};
|
|
1352
|
+
function createStyleSheetIfNeededAndSupported(styles2) {}
|
|
1353
|
+
var globalStyleSheet;
|
|
1354
|
+
function createShadowRoot(cmpMeta) {
|
|
1355
|
+
var _a;
|
|
1356
|
+
const shadowRoot = this.attachShadow({ mode: "open" });
|
|
1357
|
+
if (globalStyleSheet === void 0) globalStyleSheet = (_a = createStyleSheetIfNeededAndSupported()) != null ? _a : null;
|
|
1358
|
+
if (globalStyleSheet) shadowRoot.adoptedStyleSheets.push(globalStyleSheet);
|
|
1359
|
+
}
|
|
1360
|
+
var createTime = (fnName, tagName = "") => {
|
|
1361
|
+
return () => {};
|
|
1362
|
+
};
|
|
1363
|
+
var rootAppliedStyles = /* @__PURE__ */ new WeakMap();
|
|
1364
|
+
var registerStyle = (scopeId2, cssText, allowCS) => {
|
|
1365
|
+
let style = styles.get(scopeId2);
|
|
1366
|
+
if (supportsConstructableStylesheets && allowCS) {
|
|
1367
|
+
style = style || new CSSStyleSheet();
|
|
1368
|
+
if (typeof style === "string") style = cssText;
|
|
1369
|
+
else style.replaceSync(cssText);
|
|
1370
|
+
} else style = cssText;
|
|
1371
|
+
styles.set(scopeId2, style);
|
|
1372
|
+
};
|
|
1373
|
+
var addStyle = (styleContainerNode, cmpMeta, mode) => {
|
|
1374
|
+
var _a;
|
|
1375
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1376
|
+
const style = styles.get(scopeId2);
|
|
1377
|
+
if (!win.document) return scopeId2;
|
|
1378
|
+
styleContainerNode = styleContainerNode.nodeType === 11 ? styleContainerNode : win.document;
|
|
1379
|
+
if (style) {
|
|
1380
|
+
if (typeof style === "string") {
|
|
1381
|
+
styleContainerNode = styleContainerNode.head || styleContainerNode;
|
|
1382
|
+
let appliedStyles = rootAppliedStyles.get(styleContainerNode);
|
|
1383
|
+
let styleElm;
|
|
1384
|
+
if (!appliedStyles) rootAppliedStyles.set(styleContainerNode, appliedStyles = /* @__PURE__ */ new Set());
|
|
1385
|
+
if (!appliedStyles.has(scopeId2)) {
|
|
1386
|
+
{
|
|
1387
|
+
styleElm = win.document.createElement("style");
|
|
1388
|
+
styleElm.innerHTML = style;
|
|
1389
|
+
const nonce = (_a = plt.$nonce$) != null ? _a : queryNonceMetaTagContent(win.document);
|
|
1390
|
+
if (nonce != null) styleElm.setAttribute("nonce", nonce);
|
|
1391
|
+
if (!(cmpMeta.$flags$ & 1)) if (styleContainerNode.nodeName === "HEAD") {
|
|
1392
|
+
const preconnectLinks = styleContainerNode.querySelectorAll("link[rel=preconnect]");
|
|
1393
|
+
const referenceNode2 = preconnectLinks.length > 0 ? preconnectLinks[preconnectLinks.length - 1].nextSibling : styleContainerNode.querySelector("style");
|
|
1394
|
+
styleContainerNode.insertBefore(styleElm, (referenceNode2 == null ? void 0 : referenceNode2.parentNode) === styleContainerNode ? referenceNode2 : null);
|
|
1395
|
+
} else if ("host" in styleContainerNode) if (supportsConstructableStylesheets) {
|
|
1396
|
+
const stylesheet = new CSSStyleSheet();
|
|
1397
|
+
stylesheet.replaceSync(style);
|
|
1398
|
+
styleContainerNode.adoptedStyleSheets.unshift(stylesheet);
|
|
1399
|
+
} else {
|
|
1400
|
+
const existingStyleContainer = styleContainerNode.querySelector("style");
|
|
1401
|
+
if (existingStyleContainer) existingStyleContainer.innerHTML = style + existingStyleContainer.innerHTML;
|
|
1402
|
+
else styleContainerNode.prepend(styleElm);
|
|
1403
|
+
}
|
|
1404
|
+
else styleContainerNode.append(styleElm);
|
|
1405
|
+
if (cmpMeta.$flags$ & 1) styleContainerNode.insertBefore(styleElm, null);
|
|
1406
|
+
}
|
|
1407
|
+
if (cmpMeta.$flags$ & 4) styleElm.innerHTML += SLOT_FB_CSS;
|
|
1408
|
+
if (appliedStyles) appliedStyles.add(scopeId2);
|
|
1409
|
+
}
|
|
1410
|
+
} else if (!styleContainerNode.adoptedStyleSheets.includes(style)) styleContainerNode.adoptedStyleSheets.push(style);
|
|
1411
|
+
}
|
|
1412
|
+
return scopeId2;
|
|
1413
|
+
};
|
|
1414
|
+
var attachStyles = (hostRef) => {
|
|
1415
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1416
|
+
const elm = hostRef.$hostElement$;
|
|
1417
|
+
const flags = cmpMeta.$flags$;
|
|
1418
|
+
const endAttachStyles = createTime("attachStyles", cmpMeta.$tagName$);
|
|
1419
|
+
const scopeId2 = addStyle(elm.shadowRoot ? elm.shadowRoot : elm.getRootNode(), cmpMeta);
|
|
1420
|
+
if (flags & 10) {
|
|
1421
|
+
elm["s-sc"] = scopeId2;
|
|
1422
|
+
elm.classList.add(scopeId2 + "-h");
|
|
1423
|
+
}
|
|
1424
|
+
endAttachStyles();
|
|
1425
|
+
};
|
|
1426
|
+
var getScopeId = (cmp, mode) => "sc-" + cmp.$tagName$;
|
|
1427
|
+
var h = (nodeName, vnodeData, ...children) => {
|
|
1428
|
+
let child = null;
|
|
1429
|
+
let key = null;
|
|
1430
|
+
let simple = false;
|
|
1431
|
+
let lastSimple = false;
|
|
1432
|
+
const vNodeChildren = [];
|
|
1433
|
+
const walk = (c) => {
|
|
1434
|
+
for (let i2 = 0; i2 < c.length; i2++) {
|
|
1435
|
+
child = c[i2];
|
|
1436
|
+
if (Array.isArray(child)) walk(child);
|
|
1437
|
+
else if (child != null && typeof child !== "boolean") {
|
|
1438
|
+
if (simple = typeof nodeName !== "function" && !isComplexType(child)) child = String(child);
|
|
1439
|
+
if (simple && lastSimple) vNodeChildren[vNodeChildren.length - 1].$text$ += child;
|
|
1440
|
+
else vNodeChildren.push(simple ? newVNode(null, child) : child);
|
|
1441
|
+
lastSimple = simple;
|
|
1442
|
+
}
|
|
1443
|
+
}
|
|
1444
|
+
};
|
|
1445
|
+
walk(children);
|
|
1446
|
+
if (vnodeData) {
|
|
1447
|
+
if (vnodeData.key) key = vnodeData.key;
|
|
1448
|
+
{
|
|
1449
|
+
const classData = vnodeData.className || vnodeData.class;
|
|
1450
|
+
if (classData) vnodeData.class = typeof classData !== "object" ? classData : Object.keys(classData).filter((k) => classData[k]).join(" ");
|
|
1451
|
+
}
|
|
1452
|
+
}
|
|
1453
|
+
const vnode = newVNode(nodeName, null);
|
|
1454
|
+
vnode.$attrs$ = vnodeData;
|
|
1455
|
+
if (vNodeChildren.length > 0) vnode.$children$ = vNodeChildren;
|
|
1456
|
+
vnode.$key$ = key;
|
|
1457
|
+
return vnode;
|
|
1458
|
+
};
|
|
1459
|
+
var newVNode = (tag, text) => {
|
|
1460
|
+
const vnode = {
|
|
1461
|
+
$flags$: 0,
|
|
1462
|
+
$tag$: tag,
|
|
1463
|
+
$text$: text,
|
|
1464
|
+
$elm$: null,
|
|
1465
|
+
$children$: null
|
|
1466
|
+
};
|
|
1467
|
+
vnode.$attrs$ = null;
|
|
1468
|
+
vnode.$key$ = null;
|
|
1469
|
+
return vnode;
|
|
1470
|
+
};
|
|
1471
|
+
var Host = {};
|
|
1472
|
+
var isHost = (node) => node && node.$tag$ === Host;
|
|
1473
|
+
var createSupportsRuleRe = (selector) => {
|
|
1474
|
+
const safeSelector2 = escapeRegExpSpecialCharacters(selector);
|
|
1475
|
+
return new RegExp(`(^|[^@]|@(?!supports\\s+selector\\s*\\([^{]*?${safeSelector2}))(${safeSelector2}\\b)`, "g");
|
|
1476
|
+
};
|
|
1477
|
+
createSupportsRuleRe("::slotted");
|
|
1478
|
+
createSupportsRuleRe(":host");
|
|
1479
|
+
createSupportsRuleRe(":host-context");
|
|
1480
|
+
var parsePropertyValue = (propValue, propType, isFormAssociated) => {
|
|
1481
|
+
if (propValue != null && !isComplexType(propValue)) {
|
|
1482
|
+
if (propType & 4) return propValue === "false" ? false : propValue === "" || !!propValue;
|
|
1483
|
+
if (propType & 1) return String(propValue);
|
|
1484
|
+
return propValue;
|
|
1485
|
+
}
|
|
1486
|
+
return propValue;
|
|
1487
|
+
};
|
|
1488
|
+
var emitEvent = (elm, name, opts) => {
|
|
1489
|
+
const ev = plt.ce(name, opts);
|
|
1490
|
+
elm.dispatchEvent(ev);
|
|
1491
|
+
return ev;
|
|
1492
|
+
};
|
|
1493
|
+
var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRender) => {
|
|
1494
|
+
if (oldValue === newValue) return;
|
|
1495
|
+
let isProp = isMemberInElement(elm, memberName);
|
|
1496
|
+
let ln = memberName.toLowerCase();
|
|
1497
|
+
if (memberName === "class") {
|
|
1498
|
+
const classList = elm.classList;
|
|
1499
|
+
const oldClasses = parseClassList(oldValue);
|
|
1500
|
+
let newClasses = parseClassList(newValue);
|
|
1501
|
+
classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
|
|
1502
|
+
classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
|
|
1503
|
+
} else if (memberName === "style") {
|
|
1504
|
+
for (const prop in oldValue) if (!newValue || newValue[prop] == null) if (prop.includes("-")) elm.style.removeProperty(prop);
|
|
1505
|
+
else elm.style[prop] = "";
|
|
1506
|
+
for (const prop in newValue) if (!oldValue || newValue[prop] !== oldValue[prop]) if (prop.includes("-")) elm.style.setProperty(prop, newValue[prop]);
|
|
1507
|
+
else elm.style[prop] = newValue[prop];
|
|
1508
|
+
} else if (memberName === "key");
|
|
1509
|
+
else if (memberName === "ref") {
|
|
1510
|
+
if (newValue) newValue(elm);
|
|
1511
|
+
} else if (!elm.__lookupSetter__(memberName) && memberName[0] === "o" && memberName[1] === "n") {
|
|
1512
|
+
if (memberName[2] === "-") memberName = memberName.slice(3);
|
|
1513
|
+
else if (isMemberInElement(win, ln)) memberName = ln.slice(2);
|
|
1514
|
+
else memberName = ln[2] + memberName.slice(3);
|
|
1515
|
+
if (oldValue || newValue) {
|
|
1516
|
+
const capture = memberName.endsWith(CAPTURE_EVENT_SUFFIX);
|
|
1517
|
+
memberName = memberName.replace(CAPTURE_EVENT_REGEX, "");
|
|
1518
|
+
if (oldValue) plt.rel(elm, memberName, oldValue, capture);
|
|
1519
|
+
if (newValue) plt.ael(elm, memberName, newValue, capture);
|
|
1520
|
+
}
|
|
1521
|
+
} else {
|
|
1522
|
+
const isComplex = isComplexType(newValue);
|
|
1523
|
+
if ((isProp || isComplex && newValue !== null) && true) try {
|
|
1524
|
+
if (!elm.tagName.includes("-")) {
|
|
1525
|
+
const n = newValue == null ? "" : newValue;
|
|
1526
|
+
if (memberName === "list") isProp = false;
|
|
1527
|
+
else if (oldValue == null || elm[memberName] != n) if (typeof elm.__lookupSetter__(memberName) === "function") elm[memberName] = n;
|
|
1528
|
+
else elm.setAttribute(memberName, n);
|
|
1529
|
+
} else if (elm[memberName] !== newValue) elm[memberName] = newValue;
|
|
1530
|
+
} catch (e) {}
|
|
1531
|
+
let xlink = false;
|
|
1532
|
+
if (ln !== (ln = ln.replace(/^xlink\:?/, ""))) {
|
|
1533
|
+
memberName = ln;
|
|
1534
|
+
xlink = true;
|
|
1535
|
+
}
|
|
1536
|
+
if (newValue == null || newValue === false) {
|
|
1537
|
+
if (newValue !== false || elm.getAttribute(memberName) === "") if (xlink) elm.removeAttributeNS(XLINK_NS, memberName);
|
|
1538
|
+
else elm.removeAttribute(memberName);
|
|
1539
|
+
} else if ((!isProp || flags & 4 || isSvg) && !isComplex && elm.nodeType === 1) {
|
|
1540
|
+
newValue = newValue === true ? "" : newValue;
|
|
1541
|
+
if (xlink) elm.setAttributeNS(XLINK_NS, memberName, newValue);
|
|
1542
|
+
else elm.setAttribute(memberName, newValue);
|
|
1543
|
+
}
|
|
1544
|
+
}
|
|
1545
|
+
};
|
|
1546
|
+
var parseClassListRegex = /\s/;
|
|
1547
|
+
var parseClassList = (value) => {
|
|
1548
|
+
if (typeof value === "object" && value && "baseVal" in value) value = value.baseVal;
|
|
1549
|
+
if (!value || typeof value !== "string") return [];
|
|
1550
|
+
return value.split(parseClassListRegex);
|
|
1551
|
+
};
|
|
1552
|
+
var CAPTURE_EVENT_SUFFIX = "Capture";
|
|
1553
|
+
var CAPTURE_EVENT_REGEX = new RegExp(CAPTURE_EVENT_SUFFIX + "$");
|
|
1554
|
+
var updateElement = (oldVnode, newVnode, isSvgMode2, isInitialRender) => {
|
|
1555
|
+
const elm = newVnode.$elm$.nodeType === 11 && newVnode.$elm$.host ? newVnode.$elm$.host : newVnode.$elm$;
|
|
1556
|
+
const oldVnodeAttrs = oldVnode && oldVnode.$attrs$ || {};
|
|
1557
|
+
const newVnodeAttrs = newVnode.$attrs$ || {};
|
|
1558
|
+
for (const memberName of sortedAttrNames(Object.keys(oldVnodeAttrs))) if (!(memberName in newVnodeAttrs)) setAccessor(elm, memberName, oldVnodeAttrs[memberName], void 0, isSvgMode2, newVnode.$flags$);
|
|
1559
|
+
for (const memberName of sortedAttrNames(Object.keys(newVnodeAttrs))) setAccessor(elm, memberName, oldVnodeAttrs[memberName], newVnodeAttrs[memberName], isSvgMode2, newVnode.$flags$);
|
|
1560
|
+
};
|
|
1561
|
+
function sortedAttrNames(attrNames) {
|
|
1562
|
+
return attrNames.includes("ref") ? [...attrNames.filter((attr) => attr !== "ref"), "ref"] : attrNames;
|
|
1563
|
+
}
|
|
1564
|
+
var hostTagName;
|
|
1565
|
+
var isSvgMode = false;
|
|
1566
|
+
var createElm = (oldParentVNode, newParentVNode, childIndex) => {
|
|
1567
|
+
const newVNode2 = newParentVNode.$children$[childIndex];
|
|
1568
|
+
let i2 = 0;
|
|
1569
|
+
let elm;
|
|
1570
|
+
let childNode;
|
|
1571
|
+
if (newVNode2.$text$ !== null) elm = newVNode2.$elm$ = win.document.createTextNode(newVNode2.$text$);
|
|
1572
|
+
else {
|
|
1573
|
+
if (!win.document) throw new Error("You are trying to render a Stencil component in an environment that doesn't support the DOM. Make sure to populate the [`window`](https://developer.mozilla.org/en-US/docs/Web/API/Window/window) object before rendering a component.");
|
|
1574
|
+
elm = newVNode2.$elm$ = win.document.createElement(newVNode2.$tag$);
|
|
1575
|
+
updateElement(null, newVNode2, isSvgMode);
|
|
1576
|
+
if (newVNode2.$children$) for (i2 = 0; i2 < newVNode2.$children$.length; ++i2) {
|
|
1577
|
+
childNode = createElm(oldParentVNode, newVNode2, i2);
|
|
1578
|
+
if (childNode) elm.appendChild(childNode);
|
|
1579
|
+
}
|
|
1580
|
+
}
|
|
1581
|
+
elm["s-hn"] = hostTagName;
|
|
1582
|
+
return elm;
|
|
1583
|
+
};
|
|
1584
|
+
var addVnodes = (parentElm, before, parentVNode, vnodes, startIdx, endIdx) => {
|
|
1585
|
+
let containerElm = parentElm;
|
|
1586
|
+
let childNode;
|
|
1587
|
+
if (containerElm.shadowRoot && containerElm.tagName === hostTagName) containerElm = containerElm.shadowRoot;
|
|
1588
|
+
for (; startIdx <= endIdx; ++startIdx) if (vnodes[startIdx]) {
|
|
1589
|
+
childNode = createElm(null, parentVNode, startIdx);
|
|
1590
|
+
if (childNode) {
|
|
1591
|
+
vnodes[startIdx].$elm$ = childNode;
|
|
1592
|
+
insertBefore(containerElm, childNode, before);
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
};
|
|
1596
|
+
var removeVnodes = (vnodes, startIdx, endIdx) => {
|
|
1597
|
+
for (let index = startIdx; index <= endIdx; ++index) {
|
|
1598
|
+
const vnode = vnodes[index];
|
|
1599
|
+
if (vnode) {
|
|
1600
|
+
const elm = vnode.$elm$;
|
|
1601
|
+
nullifyVNodeRefs(vnode);
|
|
1602
|
+
if (elm) elm.remove();
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
};
|
|
1606
|
+
var updateChildren = (parentElm, oldCh, newVNode2, newCh, isInitialRender = false) => {
|
|
1607
|
+
let oldStartIdx = 0;
|
|
1608
|
+
let newStartIdx = 0;
|
|
1609
|
+
let idxInOld = 0;
|
|
1610
|
+
let i2 = 0;
|
|
1611
|
+
let oldEndIdx = oldCh.length - 1;
|
|
1612
|
+
let oldStartVnode = oldCh[0];
|
|
1613
|
+
let oldEndVnode = oldCh[oldEndIdx];
|
|
1614
|
+
let newEndIdx = newCh.length - 1;
|
|
1615
|
+
let newStartVnode = newCh[0];
|
|
1616
|
+
let newEndVnode = newCh[newEndIdx];
|
|
1617
|
+
let node;
|
|
1618
|
+
let elmToMove;
|
|
1619
|
+
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) if (oldStartVnode == null) oldStartVnode = oldCh[++oldStartIdx];
|
|
1620
|
+
else if (oldEndVnode == null) oldEndVnode = oldCh[--oldEndIdx];
|
|
1621
|
+
else if (newStartVnode == null) newStartVnode = newCh[++newStartIdx];
|
|
1622
|
+
else if (newEndVnode == null) newEndVnode = newCh[--newEndIdx];
|
|
1623
|
+
else if (isSameVnode(oldStartVnode, newStartVnode, isInitialRender)) {
|
|
1624
|
+
patch(oldStartVnode, newStartVnode, isInitialRender);
|
|
1625
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1626
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1627
|
+
} else if (isSameVnode(oldEndVnode, newEndVnode, isInitialRender)) {
|
|
1628
|
+
patch(oldEndVnode, newEndVnode, isInitialRender);
|
|
1629
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1630
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1631
|
+
} else if (isSameVnode(oldStartVnode, newEndVnode, isInitialRender)) {
|
|
1632
|
+
patch(oldStartVnode, newEndVnode, isInitialRender);
|
|
1633
|
+
insertBefore(parentElm, oldStartVnode.$elm$, oldEndVnode.$elm$.nextSibling);
|
|
1634
|
+
oldStartVnode = oldCh[++oldStartIdx];
|
|
1635
|
+
newEndVnode = newCh[--newEndIdx];
|
|
1636
|
+
} else if (isSameVnode(oldEndVnode, newStartVnode, isInitialRender)) {
|
|
1637
|
+
patch(oldEndVnode, newStartVnode, isInitialRender);
|
|
1638
|
+
insertBefore(parentElm, oldEndVnode.$elm$, oldStartVnode.$elm$);
|
|
1639
|
+
oldEndVnode = oldCh[--oldEndIdx];
|
|
1640
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1641
|
+
} else {
|
|
1642
|
+
idxInOld = -1;
|
|
1643
|
+
for (i2 = oldStartIdx; i2 <= oldEndIdx; ++i2) if (oldCh[i2] && oldCh[i2].$key$ !== null && oldCh[i2].$key$ === newStartVnode.$key$) {
|
|
1644
|
+
idxInOld = i2;
|
|
1645
|
+
break;
|
|
1646
|
+
}
|
|
1647
|
+
if (idxInOld >= 0) {
|
|
1648
|
+
elmToMove = oldCh[idxInOld];
|
|
1649
|
+
if (elmToMove.$tag$ !== newStartVnode.$tag$) node = createElm(oldCh && oldCh[newStartIdx], newVNode2, idxInOld);
|
|
1650
|
+
else {
|
|
1651
|
+
patch(elmToMove, newStartVnode, isInitialRender);
|
|
1652
|
+
oldCh[idxInOld] = void 0;
|
|
1653
|
+
node = elmToMove.$elm$;
|
|
1654
|
+
}
|
|
1655
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1656
|
+
} else {
|
|
1657
|
+
node = createElm(oldCh && oldCh[newStartIdx], newVNode2, newStartIdx);
|
|
1658
|
+
newStartVnode = newCh[++newStartIdx];
|
|
1659
|
+
}
|
|
1660
|
+
if (node) insertBefore(oldStartVnode.$elm$.parentNode, node, oldStartVnode.$elm$);
|
|
1661
|
+
}
|
|
1662
|
+
if (oldStartIdx > oldEndIdx) addVnodes(parentElm, newCh[newEndIdx + 1] == null ? null : newCh[newEndIdx + 1].$elm$, newVNode2, newCh, newStartIdx, newEndIdx);
|
|
1663
|
+
else if (newStartIdx > newEndIdx) removeVnodes(oldCh, oldStartIdx, oldEndIdx);
|
|
1664
|
+
};
|
|
1665
|
+
var isSameVnode = (leftVNode, rightVNode, isInitialRender = false) => {
|
|
1666
|
+
if (leftVNode.$tag$ === rightVNode.$tag$) {
|
|
1667
|
+
if (!isInitialRender) return leftVNode.$key$ === rightVNode.$key$;
|
|
1668
|
+
if (isInitialRender && !leftVNode.$key$ && rightVNode.$key$) leftVNode.$key$ = rightVNode.$key$;
|
|
1669
|
+
return true;
|
|
1670
|
+
}
|
|
1671
|
+
return false;
|
|
1672
|
+
};
|
|
1673
|
+
var patch = (oldVNode, newVNode2, isInitialRender = false) => {
|
|
1674
|
+
const elm = newVNode2.$elm$ = oldVNode.$elm$;
|
|
1675
|
+
const oldChildren = oldVNode.$children$;
|
|
1676
|
+
const newChildren = newVNode2.$children$;
|
|
1677
|
+
const text = newVNode2.$text$;
|
|
1678
|
+
if (text === null) {
|
|
1679
|
+
updateElement(oldVNode, newVNode2, isSvgMode);
|
|
1680
|
+
if (oldChildren !== null && newChildren !== null) updateChildren(elm, oldChildren, newVNode2, newChildren, isInitialRender);
|
|
1681
|
+
else if (newChildren !== null) {
|
|
1682
|
+
if (oldVNode.$text$ !== null) elm.textContent = "";
|
|
1683
|
+
addVnodes(elm, null, newVNode2, newChildren, 0, newChildren.length - 1);
|
|
1684
|
+
} else if (!isInitialRender && BUILD.updatable && oldChildren !== null) removeVnodes(oldChildren, 0, oldChildren.length - 1);
|
|
1685
|
+
} else if (oldVNode.$text$ !== text) elm.data = text;
|
|
1686
|
+
};
|
|
1687
|
+
var nullifyVNodeRefs = (vNode) => {
|
|
1688
|
+
vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
|
|
1689
|
+
vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
|
|
1690
|
+
};
|
|
1691
|
+
var insertBefore = (parent, newNode, reference) => {
|
|
1692
|
+
return parent == null ? void 0 : parent.insertBefore(newNode, reference);
|
|
1693
|
+
};
|
|
1694
|
+
var renderVdom = (hostRef, renderFnResults, isInitialLoad = false) => {
|
|
1695
|
+
const hostElm = hostRef.$hostElement$;
|
|
1696
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1697
|
+
const oldVNode = hostRef.$vnode$ || newVNode(null, null);
|
|
1698
|
+
const rootVnode = isHost(renderFnResults) ? renderFnResults : h(null, null, renderFnResults);
|
|
1699
|
+
hostTagName = hostElm.tagName;
|
|
1700
|
+
if (cmpMeta.$attrsToReflect$) {
|
|
1701
|
+
rootVnode.$attrs$ = rootVnode.$attrs$ || {};
|
|
1702
|
+
cmpMeta.$attrsToReflect$.map(([propName, attribute]) => rootVnode.$attrs$[attribute] = hostElm[propName]);
|
|
1703
|
+
}
|
|
1704
|
+
if (isInitialLoad && rootVnode.$attrs$) {
|
|
1705
|
+
for (const key of Object.keys(rootVnode.$attrs$)) if (hostElm.hasAttribute(key) && ![
|
|
1706
|
+
"key",
|
|
1707
|
+
"ref",
|
|
1708
|
+
"style",
|
|
1709
|
+
"class"
|
|
1710
|
+
].includes(key)) rootVnode.$attrs$[key] = hostElm[key];
|
|
1711
|
+
}
|
|
1712
|
+
rootVnode.$tag$ = null;
|
|
1713
|
+
rootVnode.$flags$ |= 4;
|
|
1714
|
+
hostRef.$vnode$ = rootVnode;
|
|
1715
|
+
rootVnode.$elm$ = oldVNode.$elm$ = hostElm.shadowRoot || hostElm;
|
|
1716
|
+
patch(oldVNode, rootVnode, isInitialLoad);
|
|
1717
|
+
};
|
|
1718
|
+
var attachToAncestor = (hostRef, ancestorComponent) => {
|
|
1719
|
+
if (ancestorComponent && !hostRef.$onRenderResolve$ && ancestorComponent["s-p"]) {
|
|
1720
|
+
const index = ancestorComponent["s-p"].push(new Promise((r) => hostRef.$onRenderResolve$ = () => {
|
|
1721
|
+
ancestorComponent["s-p"].splice(index - 1, 1);
|
|
1722
|
+
r();
|
|
1723
|
+
}));
|
|
1724
|
+
}
|
|
1725
|
+
};
|
|
1726
|
+
var scheduleUpdate = (hostRef, isInitialLoad) => {
|
|
1727
|
+
hostRef.$flags$ |= 16;
|
|
1728
|
+
if (hostRef.$flags$ & 4) {
|
|
1729
|
+
hostRef.$flags$ |= 512;
|
|
1730
|
+
return;
|
|
1731
|
+
}
|
|
1732
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$);
|
|
1733
|
+
const dispatch = () => dispatchHooks(hostRef, isInitialLoad);
|
|
1734
|
+
return writeTask(dispatch);
|
|
1735
|
+
};
|
|
1736
|
+
var dispatchHooks = (hostRef, isInitialLoad) => {
|
|
1737
|
+
const elm = hostRef.$hostElement$;
|
|
1738
|
+
const endSchedule = createTime("scheduleUpdate", hostRef.$cmpMeta$.$tagName$);
|
|
1739
|
+
const instance = elm;
|
|
1740
|
+
if (!instance) throw new Error(`Can't render component <${elm.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);
|
|
1741
|
+
let maybePromise;
|
|
1742
|
+
if (isInitialLoad) maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
|
|
1743
|
+
else maybePromise = safeCall(instance, "componentWillUpdate", void 0, elm);
|
|
1744
|
+
maybePromise = enqueue(maybePromise, () => safeCall(instance, "componentWillRender", void 0, elm));
|
|
1745
|
+
endSchedule();
|
|
1746
|
+
return enqueue(maybePromise, () => updateComponent(hostRef, instance, isInitialLoad));
|
|
1747
|
+
};
|
|
1748
|
+
var enqueue = (maybePromise, fn) => isPromisey(maybePromise) ? maybePromise.then(fn).catch((err2) => {
|
|
1749
|
+
console.error(err2);
|
|
1750
|
+
fn();
|
|
1751
|
+
}) : fn();
|
|
1752
|
+
var isPromisey = (maybePromise) => maybePromise instanceof Promise || maybePromise && maybePromise.then && typeof maybePromise.then === "function";
|
|
1753
|
+
var updateComponent = async (hostRef, instance, isInitialLoad) => {
|
|
1754
|
+
var _a;
|
|
1755
|
+
const elm = hostRef.$hostElement$;
|
|
1756
|
+
const endUpdate = createTime("update", hostRef.$cmpMeta$.$tagName$);
|
|
1757
|
+
const rc = elm["s-rc"];
|
|
1758
|
+
if (isInitialLoad) attachStyles(hostRef);
|
|
1759
|
+
const endRender = createTime("render", hostRef.$cmpMeta$.$tagName$);
|
|
1760
|
+
callRender(hostRef, instance, elm, isInitialLoad);
|
|
1761
|
+
if (rc) {
|
|
1762
|
+
rc.map((cb) => cb());
|
|
1763
|
+
elm["s-rc"] = void 0;
|
|
1764
|
+
}
|
|
1765
|
+
endRender();
|
|
1766
|
+
endUpdate();
|
|
1767
|
+
{
|
|
1768
|
+
const childrenPromises = (_a = elm["s-p"]) != null ? _a : [];
|
|
1769
|
+
const postUpdate = () => postUpdateComponent(hostRef);
|
|
1770
|
+
if (childrenPromises.length === 0) postUpdate();
|
|
1771
|
+
else {
|
|
1772
|
+
Promise.all(childrenPromises).then(postUpdate);
|
|
1773
|
+
hostRef.$flags$ |= 4;
|
|
1774
|
+
childrenPromises.length = 0;
|
|
1775
|
+
}
|
|
1776
|
+
}
|
|
1777
|
+
};
|
|
1778
|
+
var callRender = (hostRef, instance, elm, isInitialLoad) => {
|
|
1779
|
+
try {
|
|
1780
|
+
instance = instance.render();
|
|
1781
|
+
hostRef.$flags$ &= -17;
|
|
1782
|
+
hostRef.$flags$ |= 2;
|
|
1783
|
+
renderVdom(hostRef, instance, isInitialLoad);
|
|
1784
|
+
} catch (e) {
|
|
1785
|
+
consoleError(e, hostRef.$hostElement$);
|
|
1786
|
+
}
|
|
1787
|
+
return null;
|
|
1788
|
+
};
|
|
1789
|
+
var postUpdateComponent = (hostRef) => {
|
|
1790
|
+
const tagName = hostRef.$cmpMeta$.$tagName$;
|
|
1791
|
+
const elm = hostRef.$hostElement$;
|
|
1792
|
+
const endPostUpdate = createTime("postUpdate", tagName);
|
|
1793
|
+
const instance = elm;
|
|
1794
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1795
|
+
safeCall(instance, "componentDidRender", void 0, elm);
|
|
1796
|
+
if (!(hostRef.$flags$ & 64)) {
|
|
1797
|
+
hostRef.$flags$ |= 64;
|
|
1798
|
+
addHydratedFlag(elm);
|
|
1799
|
+
safeCall(instance, "componentDidLoad", void 0, elm);
|
|
1800
|
+
endPostUpdate();
|
|
1801
|
+
hostRef.$onReadyResolve$(elm);
|
|
1802
|
+
if (!ancestorComponent) appDidLoad();
|
|
1803
|
+
} else {
|
|
1804
|
+
safeCall(instance, "componentDidUpdate", void 0, elm);
|
|
1805
|
+
endPostUpdate();
|
|
1806
|
+
}
|
|
1807
|
+
if (hostRef.$onRenderResolve$) {
|
|
1808
|
+
hostRef.$onRenderResolve$();
|
|
1809
|
+
hostRef.$onRenderResolve$ = void 0;
|
|
1810
|
+
}
|
|
1811
|
+
if (hostRef.$flags$ & 512) nextTick(() => scheduleUpdate(hostRef, false));
|
|
1812
|
+
hostRef.$flags$ &= -517;
|
|
1813
|
+
};
|
|
1814
|
+
var appDidLoad = (who) => {
|
|
1815
|
+
nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
|
|
1816
|
+
};
|
|
1817
|
+
var safeCall = (instance, method, arg, elm) => {
|
|
1818
|
+
if (instance && instance[method]) try {
|
|
1819
|
+
return instance[method](arg);
|
|
1820
|
+
} catch (e) {
|
|
1821
|
+
consoleError(e, elm);
|
|
1822
|
+
}
|
|
1823
|
+
};
|
|
1824
|
+
var addHydratedFlag = (elm) => {
|
|
1825
|
+
var _a;
|
|
1826
|
+
return elm.classList.add((_a = BUILD.hydratedSelectorName) != null ? _a : "hydrated");
|
|
1827
|
+
};
|
|
1828
|
+
var getValue = (ref, propName) => getHostRef(ref).$instanceValues$.get(propName);
|
|
1829
|
+
var setValue = (ref, propName, newVal, cmpMeta) => {
|
|
1830
|
+
const hostRef = getHostRef(ref);
|
|
1831
|
+
const elm = ref;
|
|
1832
|
+
const oldVal = hostRef.$instanceValues$.get(propName);
|
|
1833
|
+
const flags = hostRef.$flags$;
|
|
1834
|
+
const instance = elm;
|
|
1835
|
+
newVal = parsePropertyValue(newVal, cmpMeta.$members$[propName][0]);
|
|
1836
|
+
if (newVal !== oldVal && !(Number.isNaN(oldVal) && Number.isNaN(newVal))) {
|
|
1837
|
+
hostRef.$instanceValues$.set(propName, newVal);
|
|
1838
|
+
if (cmpMeta.$watchers$ && flags & 128) {
|
|
1839
|
+
const watchMethods = cmpMeta.$watchers$[propName];
|
|
1840
|
+
if (watchMethods) watchMethods.map((watchMethodName) => {
|
|
1841
|
+
try {
|
|
1842
|
+
instance[watchMethodName](newVal, oldVal, propName);
|
|
1843
|
+
} catch (e) {
|
|
1844
|
+
consoleError(e, elm);
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
if ((flags & 18) === 2) {
|
|
1849
|
+
if (instance.componentShouldUpdate) {
|
|
1850
|
+
if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) return;
|
|
1851
|
+
}
|
|
1852
|
+
scheduleUpdate(hostRef, false);
|
|
1853
|
+
}
|
|
1854
|
+
}
|
|
1855
|
+
};
|
|
1856
|
+
var proxyComponent = (Cstr, cmpMeta, flags) => {
|
|
1857
|
+
var _a, _b;
|
|
1858
|
+
const prototype = Cstr.prototype;
|
|
1859
|
+
if (cmpMeta.$members$ || cmpMeta.$watchers$ || Cstr.watchers) {
|
|
1860
|
+
if (Cstr.watchers && !cmpMeta.$watchers$) cmpMeta.$watchers$ = Cstr.watchers;
|
|
1861
|
+
const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
|
|
1862
|
+
members.map(([memberName, [memberFlags]]) => {
|
|
1863
|
+
if (memberFlags & 31 || memberFlags & 32) {
|
|
1864
|
+
const { get: origGetter, set: origSetter } = Object.getOwnPropertyDescriptor(prototype, memberName) || {};
|
|
1865
|
+
if (origGetter) cmpMeta.$members$[memberName][0] |= 2048;
|
|
1866
|
+
if (origSetter) cmpMeta.$members$[memberName][0] |= 4096;
|
|
1867
|
+
Object.defineProperty(prototype, memberName, {
|
|
1868
|
+
get() {
|
|
1869
|
+
return origGetter ? origGetter.apply(this) : getValue(this, memberName);
|
|
1870
|
+
},
|
|
1871
|
+
configurable: true,
|
|
1872
|
+
enumerable: true
|
|
1873
|
+
});
|
|
1874
|
+
Object.defineProperty(prototype, memberName, { set(newValue) {
|
|
1875
|
+
const ref = getHostRef(this);
|
|
1876
|
+
if (origSetter) {
|
|
1877
|
+
const currentValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
|
|
1878
|
+
if (typeof currentValue === "undefined" && ref.$instanceValues$.get(memberName)) newValue = ref.$instanceValues$.get(memberName);
|
|
1879
|
+
else if (!ref.$instanceValues$.get(memberName) && currentValue) ref.$instanceValues$.set(memberName, currentValue);
|
|
1880
|
+
origSetter.apply(this, [parsePropertyValue(newValue, memberFlags)]);
|
|
1881
|
+
newValue = memberFlags & 32 ? this[memberName] : ref.$hostElement$[memberName];
|
|
1882
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1883
|
+
return;
|
|
1884
|
+
}
|
|
1885
|
+
setValue(this, memberName, newValue, cmpMeta);
|
|
1886
|
+
} });
|
|
1887
|
+
}
|
|
1888
|
+
});
|
|
1889
|
+
{
|
|
1890
|
+
const attrNameToPropName = /* @__PURE__ */ new Map();
|
|
1891
|
+
prototype.attributeChangedCallback = function(attrName, oldValue, newValue) {
|
|
1892
|
+
plt.jmp(() => {
|
|
1893
|
+
var _a2;
|
|
1894
|
+
const propName = attrNameToPropName.get(attrName);
|
|
1895
|
+
if (this.hasOwnProperty(propName) && BUILD.lazyLoad);
|
|
1896
|
+
else if (prototype.hasOwnProperty(propName) && typeof this[propName] === "number" && this[propName] == newValue) return;
|
|
1897
|
+
else if (propName == null) {
|
|
1898
|
+
const hostRef = getHostRef(this);
|
|
1899
|
+
const flags2 = hostRef == null ? void 0 : hostRef.$flags$;
|
|
1900
|
+
if (flags2 && !(flags2 & 8) && flags2 & 128 && newValue !== oldValue) {
|
|
1901
|
+
const instance = this;
|
|
1902
|
+
((_a2 = cmpMeta.$watchers$) == null ? void 0 : _a2[attrName])?.forEach((callbackName) => {
|
|
1903
|
+
if (instance[callbackName] != null) instance[callbackName].call(instance, newValue, oldValue, attrName);
|
|
1904
|
+
});
|
|
1905
|
+
}
|
|
1906
|
+
return;
|
|
1907
|
+
}
|
|
1908
|
+
const propDesc = Object.getOwnPropertyDescriptor(prototype, propName);
|
|
1909
|
+
newValue = newValue === null && typeof this[propName] === "boolean" ? false : newValue;
|
|
1910
|
+
if (newValue !== this[propName] && (!propDesc.get || !!propDesc.set)) this[propName] = newValue;
|
|
1911
|
+
});
|
|
1912
|
+
};
|
|
1913
|
+
Cstr.observedAttributes = Array.from(/* @__PURE__ */ new Set([...Object.keys((_b = cmpMeta.$watchers$) != null ? _b : {}), ...members.filter(([_, m]) => m[0] & 15).map(([propName, m]) => {
|
|
1914
|
+
var _a2;
|
|
1915
|
+
const attrName = m[1] || propName;
|
|
1916
|
+
attrNameToPropName.set(attrName, propName);
|
|
1917
|
+
if (m[0] & 512) (_a2 = cmpMeta.$attrsToReflect$) == null || _a2.push([propName, attrName]);
|
|
1918
|
+
return attrName;
|
|
1919
|
+
})]));
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
return Cstr;
|
|
1923
|
+
};
|
|
1924
|
+
var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
|
|
1925
|
+
let Cstr;
|
|
1926
|
+
if ((hostRef.$flags$ & 32) === 0) {
|
|
1927
|
+
hostRef.$flags$ |= 32;
|
|
1928
|
+
{
|
|
1929
|
+
Cstr = elm.constructor;
|
|
1930
|
+
const cmpTag = elm.localName;
|
|
1931
|
+
customElements.whenDefined(cmpTag).then(() => hostRef.$flags$ |= 128);
|
|
1932
|
+
}
|
|
1933
|
+
if (Cstr && Cstr.style) {
|
|
1934
|
+
let style;
|
|
1935
|
+
if (typeof Cstr.style === "string") style = Cstr.style;
|
|
1936
|
+
const scopeId2 = getScopeId(cmpMeta);
|
|
1937
|
+
if (!styles.has(scopeId2)) {
|
|
1938
|
+
const endRegisterStyles = createTime("registerStyles", cmpMeta.$tagName$);
|
|
1939
|
+
registerStyle(scopeId2, style, !!(cmpMeta.$flags$ & 1));
|
|
1940
|
+
endRegisterStyles();
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
const ancestorComponent = hostRef.$ancestorComponent$;
|
|
1945
|
+
const schedule = () => scheduleUpdate(hostRef, true);
|
|
1946
|
+
if (ancestorComponent && ancestorComponent["s-rc"]) ancestorComponent["s-rc"].push(schedule);
|
|
1947
|
+
else schedule();
|
|
1948
|
+
};
|
|
1949
|
+
var fireConnectedCallback = (instance, elm) => {};
|
|
1950
|
+
var connectedCallback = (elm) => {
|
|
1951
|
+
if ((plt.$flags$ & 1) === 0) {
|
|
1952
|
+
const hostRef = getHostRef(elm);
|
|
1953
|
+
const cmpMeta = hostRef.$cmpMeta$;
|
|
1954
|
+
const endConnected = createTime("connectedCallback", cmpMeta.$tagName$);
|
|
1955
|
+
if (!(hostRef.$flags$ & 1)) {
|
|
1956
|
+
hostRef.$flags$ |= 1;
|
|
1957
|
+
{
|
|
1958
|
+
let ancestorComponent = elm;
|
|
1959
|
+
while (ancestorComponent = ancestorComponent.parentNode || ancestorComponent.host) if (ancestorComponent["s-p"]) {
|
|
1960
|
+
attachToAncestor(hostRef, hostRef.$ancestorComponent$ = ancestorComponent);
|
|
1961
|
+
break;
|
|
1962
|
+
}
|
|
1963
|
+
}
|
|
1964
|
+
if (cmpMeta.$members$) Object.entries(cmpMeta.$members$).map(([memberName, [memberFlags]]) => {
|
|
1965
|
+
if (memberFlags & 31 && elm.hasOwnProperty(memberName)) {
|
|
1966
|
+
const value = elm[memberName];
|
|
1967
|
+
delete elm[memberName];
|
|
1968
|
+
elm[memberName] = value;
|
|
1969
|
+
}
|
|
1970
|
+
});
|
|
1971
|
+
if (BUILD.initializeNextTick) nextTick(() => initializeComponent(elm, hostRef, cmpMeta));
|
|
1972
|
+
else initializeComponent(elm, hostRef, cmpMeta);
|
|
1973
|
+
} else if (hostRef == null ? void 0 : hostRef.$lazyInstance$);
|
|
1974
|
+
else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
|
|
1975
|
+
endConnected();
|
|
1976
|
+
}
|
|
1977
|
+
};
|
|
1978
|
+
var disconnectedCallback = async (elm) => {
|
|
1979
|
+
if ((plt.$flags$ & 1) === 0) getHostRef(elm);
|
|
1980
|
+
if (rootAppliedStyles.has(elm)) rootAppliedStyles.delete(elm);
|
|
1981
|
+
if (elm.shadowRoot && rootAppliedStyles.has(elm.shadowRoot)) rootAppliedStyles.delete(elm.shadowRoot);
|
|
1982
|
+
};
|
|
1983
|
+
var proxyCustomElement = (Cstr, compactMeta) => {
|
|
1984
|
+
const cmpMeta = {
|
|
1985
|
+
$flags$: compactMeta[0],
|
|
1986
|
+
$tagName$: compactMeta[1]
|
|
1987
|
+
};
|
|
1988
|
+
cmpMeta.$members$ = compactMeta[2];
|
|
1989
|
+
cmpMeta.$watchers$ = Cstr.$watchers$;
|
|
1990
|
+
cmpMeta.$attrsToReflect$ = [];
|
|
1991
|
+
const originalConnectedCallback = Cstr.prototype.connectedCallback;
|
|
1992
|
+
const originalDisconnectedCallback = Cstr.prototype.disconnectedCallback;
|
|
1993
|
+
Object.assign(Cstr.prototype, {
|
|
1994
|
+
__hasHostListenerAttached: false,
|
|
1995
|
+
__registerHost() {
|
|
1996
|
+
registerHost(this, cmpMeta);
|
|
1997
|
+
},
|
|
1998
|
+
connectedCallback() {
|
|
1999
|
+
if (!this.__hasHostListenerAttached) {
|
|
2000
|
+
getHostRef(this);
|
|
2001
|
+
this.__hasHostListenerAttached = true;
|
|
2002
|
+
}
|
|
2003
|
+
connectedCallback(this);
|
|
2004
|
+
if (originalConnectedCallback) originalConnectedCallback.call(this);
|
|
2005
|
+
},
|
|
2006
|
+
disconnectedCallback() {
|
|
2007
|
+
disconnectedCallback(this);
|
|
2008
|
+
if (originalDisconnectedCallback) originalDisconnectedCallback.call(this);
|
|
2009
|
+
},
|
|
2010
|
+
__attachShadow() {
|
|
2011
|
+
if (!this.shadowRoot) createShadowRoot.call(this, cmpMeta);
|
|
2012
|
+
else if (this.shadowRoot.mode !== "open") throw new Error(`Unable to re-use existing shadow root for ${cmpMeta.$tagName$}! Mode is set to ${this.shadowRoot.mode} but Stencil only supports open shadow roots.`);
|
|
2013
|
+
}
|
|
2014
|
+
});
|
|
2015
|
+
Cstr.is = cmpMeta.$tagName$;
|
|
2016
|
+
return proxyComponent(Cstr, cmpMeta);
|
|
2017
|
+
};
|
|
2018
|
+
var CACHED_MAP$1;
|
|
2019
|
+
var getIconMap$1 = () => {
|
|
2020
|
+
if (typeof window === "undefined") return /* @__PURE__ */ new Map();
|
|
2021
|
+
else {
|
|
2022
|
+
if (!CACHED_MAP$1) {
|
|
2023
|
+
const win = window;
|
|
2024
|
+
win.Ionicons = win.Ionicons || {};
|
|
2025
|
+
CACHED_MAP$1 = win.Ionicons.map = win.Ionicons.map || /* @__PURE__ */ new Map();
|
|
2026
|
+
}
|
|
2027
|
+
return CACHED_MAP$1;
|
|
2028
|
+
}
|
|
2029
|
+
};
|
|
2030
|
+
var getUrl = (i) => {
|
|
2031
|
+
let url = getSrc(i.src);
|
|
2032
|
+
if (url) return url;
|
|
2033
|
+
url = getName(i.name, i.icon, i.mode, i.ios, i.md);
|
|
2034
|
+
if (url) return getNamedUrl(url, i);
|
|
2035
|
+
if (i.icon) {
|
|
2036
|
+
url = getSrc(i.icon);
|
|
2037
|
+
if (url) return url;
|
|
2038
|
+
url = getSrc(i.icon[i.mode]);
|
|
2039
|
+
if (url) return url;
|
|
2040
|
+
}
|
|
2041
|
+
return null;
|
|
2042
|
+
};
|
|
2043
|
+
var getNamedUrl = (iconName, iconEl) => {
|
|
2044
|
+
const url = getIconMap$1().get(iconName);
|
|
2045
|
+
if (url) return url;
|
|
2046
|
+
try {
|
|
2047
|
+
return getAssetPath(`svg/${iconName}.svg`);
|
|
2048
|
+
} catch (e) {
|
|
2049
|
+
console.log("e", e);
|
|
2050
|
+
/**
|
|
2051
|
+
* In the custom elements build version of ionicons, referencing an icon
|
|
2052
|
+
* by name will throw an invalid URL error because the asset path is not defined.
|
|
2053
|
+
* This catches that error and logs something that is more developer-friendly.
|
|
2054
|
+
* We also include a reference to the ion-icon element so developers can
|
|
2055
|
+
* figure out which instance of ion-icon needs to be updated.
|
|
2056
|
+
*/
|
|
2057
|
+
console.warn(`[Ionicons Warning]: Could not load icon with name "${iconName}". Ensure that the icon is registered using addIcons or that the icon SVG data is passed directly to the icon component.`, iconEl);
|
|
2058
|
+
}
|
|
2059
|
+
};
|
|
2060
|
+
var getName = (iconName, icon, mode, ios, md) => {
|
|
2061
|
+
mode = (mode && toLower(mode)) === "ios" ? "ios" : "md";
|
|
2062
|
+
if (ios && mode === "ios") iconName = toLower(ios);
|
|
2063
|
+
else if (md && mode === "md") iconName = toLower(md);
|
|
2064
|
+
else {
|
|
2065
|
+
if (!iconName && icon && !isSrc(icon)) iconName = icon;
|
|
2066
|
+
if (isStr(iconName)) iconName = toLower(iconName);
|
|
2067
|
+
}
|
|
2068
|
+
if (!isStr(iconName) || iconName.trim() === "") return null;
|
|
2069
|
+
if (iconName.replace(/[a-z]|-|\d/gi, "") !== "") return null;
|
|
2070
|
+
return iconName;
|
|
2071
|
+
};
|
|
2072
|
+
var getSrc = (src) => {
|
|
2073
|
+
if (isStr(src)) {
|
|
2074
|
+
src = src.trim();
|
|
2075
|
+
if (isSrc(src)) return src;
|
|
2076
|
+
}
|
|
2077
|
+
return null;
|
|
2078
|
+
};
|
|
2079
|
+
var isSrc = (str) => str.length > 0 && /(\/|\.)/.test(str);
|
|
2080
|
+
var isStr = (val) => typeof val === "string";
|
|
2081
|
+
var toLower = (val) => val.toLowerCase();
|
|
2082
|
+
/**
|
|
2083
|
+
* Elements inside of web components sometimes need to inherit global attributes
|
|
2084
|
+
* set on the host. For example, the inner input in `ion-input` should inherit
|
|
2085
|
+
* the `title` attribute that developers set directly on `ion-input`. This
|
|
2086
|
+
* helper function should be called in componentWillLoad and assigned to a variable
|
|
2087
|
+
* that is later used in the render function.
|
|
2088
|
+
*
|
|
2089
|
+
* This does not need to be reactive as changing attributes on the host element
|
|
2090
|
+
* does not trigger a re-render.
|
|
2091
|
+
*/
|
|
2092
|
+
var inheritAttributes = (el, attributes = []) => {
|
|
2093
|
+
const attributeObject = {};
|
|
2094
|
+
attributes.forEach((attr) => {
|
|
2095
|
+
if (el.hasAttribute(attr)) {
|
|
2096
|
+
if (el.getAttribute(attr) !== null) attributeObject[attr] = el.getAttribute(attr);
|
|
2097
|
+
el.removeAttribute(attr);
|
|
2098
|
+
}
|
|
2099
|
+
});
|
|
2100
|
+
return attributeObject;
|
|
2101
|
+
};
|
|
2102
|
+
/**
|
|
2103
|
+
* Returns `true` if the document or host element
|
|
2104
|
+
* has a `dir` set to `rtl`. The host value will always
|
|
2105
|
+
* take priority over the root document value.
|
|
2106
|
+
*/
|
|
2107
|
+
var isRTL = (hostEl) => {
|
|
2108
|
+
if (hostEl) {
|
|
2109
|
+
if (hostEl.dir !== "") return hostEl.dir.toLowerCase() === "rtl";
|
|
2110
|
+
}
|
|
2111
|
+
return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === "rtl";
|
|
2112
|
+
};
|
|
2113
|
+
//#endregion
|
|
2114
|
+
//#region node_modules/ionicons/components/ion-icon.js
|
|
2115
|
+
var validateContent = (svgContent) => {
|
|
2116
|
+
const div = document.createElement("div");
|
|
2117
|
+
div.innerHTML = svgContent;
|
|
2118
|
+
for (let i = div.childNodes.length - 1; i >= 0; i--) if (div.childNodes[i].nodeName.toLowerCase() !== "svg") div.removeChild(div.childNodes[i]);
|
|
2119
|
+
const svgElm = div.firstElementChild;
|
|
2120
|
+
if (svgElm && svgElm.nodeName.toLowerCase() === "svg") {
|
|
2121
|
+
const svgClass = svgElm.getAttribute("class") || "";
|
|
2122
|
+
svgElm.setAttribute("class", (svgClass + " s-ion-icon").trim());
|
|
2123
|
+
if (isValid(svgElm)) return div.innerHTML;
|
|
2124
|
+
}
|
|
2125
|
+
return "";
|
|
2126
|
+
};
|
|
2127
|
+
var isValid = (elm) => {
|
|
2128
|
+
if (elm.nodeType === 1) {
|
|
2129
|
+
if (elm.nodeName.toLowerCase() === "script") return false;
|
|
2130
|
+
for (let i = 0; i < elm.attributes.length; i++) {
|
|
2131
|
+
const name = elm.attributes[i].name;
|
|
2132
|
+
if (isStr(name) && name.toLowerCase().indexOf("on") === 0) return false;
|
|
2133
|
+
}
|
|
2134
|
+
for (let i = 0; i < elm.childNodes.length; i++) if (!isValid(elm.childNodes[i])) return false;
|
|
2135
|
+
}
|
|
2136
|
+
return true;
|
|
2137
|
+
};
|
|
2138
|
+
var isSvgDataUrl = (url) => url.startsWith("data:image/svg+xml");
|
|
2139
|
+
var isEncodedDataUrl = (url) => url.indexOf(";utf8,") !== -1;
|
|
2140
|
+
var ioniconContent = /* @__PURE__ */ new Map();
|
|
2141
|
+
var requests = /* @__PURE__ */ new Map();
|
|
2142
|
+
var parser;
|
|
2143
|
+
/**
|
|
2144
|
+
* Safely fallback to an empty svg
|
|
2145
|
+
*/
|
|
2146
|
+
function safeFallback(url) {
|
|
2147
|
+
const svg = "";
|
|
2148
|
+
ioniconContent.set(url, svg);
|
|
2149
|
+
return svg;
|
|
2150
|
+
}
|
|
2151
|
+
var getSvgContent = (url, sanitize) => {
|
|
2152
|
+
/**
|
|
2153
|
+
* See if we already have a request for this url
|
|
2154
|
+
*/
|
|
2155
|
+
const req = requests.get(url);
|
|
2156
|
+
if (req) return req;
|
|
2157
|
+
if (typeof fetch !== "undefined" && typeof document !== "undefined") {
|
|
2158
|
+
/**
|
|
2159
|
+
* If the url is a data url of an svg, then try to parse it
|
|
2160
|
+
* with the DOMParser. This works with content security policies enabled.
|
|
2161
|
+
*/
|
|
2162
|
+
if (isSvgDataUrl(url) && isEncodedDataUrl(url)) return Promise.resolve(getSvgByUrl(url));
|
|
2163
|
+
return fetchSvg(url, sanitize);
|
|
2164
|
+
}
|
|
2165
|
+
return Promise.resolve(safeFallback(url));
|
|
2166
|
+
};
|
|
2167
|
+
function getSvgByUrl(url) {
|
|
2168
|
+
if (!parser)
|
|
2169
|
+
/**
|
|
2170
|
+
* Create an instance of the DOM parser. This creates a single
|
|
2171
|
+
* parser instance for the entire app, which is more efficient.
|
|
2172
|
+
*/
|
|
2173
|
+
parser = new DOMParser();
|
|
2174
|
+
const svg = parser.parseFromString(url, "text/html").querySelector("svg");
|
|
2175
|
+
if (svg) {
|
|
2176
|
+
ioniconContent.set(url, svg.outerHTML);
|
|
2177
|
+
return svg.outerHTML;
|
|
2178
|
+
}
|
|
2179
|
+
throw new Error(`Could not parse svg from ${url}`);
|
|
2180
|
+
}
|
|
2181
|
+
function fetchSvg(url, sanitize) {
|
|
2182
|
+
/**
|
|
2183
|
+
* We don't already have a request
|
|
2184
|
+
*/
|
|
2185
|
+
const req = fetch(url).then((rsp) => {
|
|
2186
|
+
/**
|
|
2187
|
+
* When fetching from a file:// URL, some browsers return
|
|
2188
|
+
* a 0 status code even when the request succeeds so don't
|
|
2189
|
+
* rely on rsp.ok as the only signal of success.
|
|
2190
|
+
*/
|
|
2191
|
+
return rsp.text().then((svgContent) => {
|
|
2192
|
+
if (svgContent && sanitize !== false) svgContent = validateContent(svgContent);
|
|
2193
|
+
const svg = svgContent || "";
|
|
2194
|
+
ioniconContent.set(url, svg);
|
|
2195
|
+
return svg;
|
|
2196
|
+
}).catch(() => safeFallback(url));
|
|
2197
|
+
}).catch(() => safeFallback(url));
|
|
2198
|
+
/**
|
|
2199
|
+
* Cache for the same requests
|
|
2200
|
+
*/
|
|
2201
|
+
requests.set(url, req);
|
|
2202
|
+
return req;
|
|
2203
|
+
}
|
|
2204
|
+
var iconCss = ":host{display:inline-block;width:1em;height:1em;contain:strict;fill:currentColor;box-sizing:content-box !important}:host .ionicon{stroke:currentColor}.ionicon-fill-none{fill:none}.ionicon-stroke-width{stroke-width:var(--ionicon-stroke-width, 32px)}.icon-inner,.ionicon,svg{display:block;height:100%;width:100%}@supports (background: -webkit-named-image(i)){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}@supports not selector(:dir(rtl)) and selector(:host-context([dir='rtl'])){:host(.icon-rtl) .icon-inner{transform:scaleX(-1)}}:host(.flip-rtl):host-context([dir='rtl']) .icon-inner{transform:scaleX(-1)}@supports selector(:dir(rtl)){:host(.flip-rtl:dir(rtl)) .icon-inner{transform:scaleX(-1)}:host(.flip-rtl:dir(ltr)) .icon-inner{transform:scaleX(1)}}:host(.icon-small){font-size:1.125rem !important}:host(.icon-large){font-size:2rem !important}:host(.ion-color){color:var(--ion-color-base) !important}:host(.ion-color-primary){--ion-color-base:var(--ion-color-primary, #3880ff)}:host(.ion-color-secondary){--ion-color-base:var(--ion-color-secondary, #0cd1e8)}:host(.ion-color-tertiary){--ion-color-base:var(--ion-color-tertiary, #f4a942)}:host(.ion-color-success){--ion-color-base:var(--ion-color-success, #10dc60)}:host(.ion-color-warning){--ion-color-base:var(--ion-color-warning, #ffce00)}:host(.ion-color-danger){--ion-color-base:var(--ion-color-danger, #f14141)}:host(.ion-color-light){--ion-color-base:var(--ion-color-light, #f4f5f8)}:host(.ion-color-medium){--ion-color-base:var(--ion-color-medium, #989aa2)}:host(.ion-color-dark){--ion-color-base:var(--ion-color-dark, #222428)}";
|
|
2205
|
+
var Icon = /* @__PURE__ */ proxyCustomElement(class Icon extends H {
|
|
2206
|
+
constructor() {
|
|
2207
|
+
super();
|
|
2208
|
+
this.__registerHost();
|
|
2209
|
+
this.__attachShadow();
|
|
2210
|
+
this.iconName = null;
|
|
2211
|
+
this.inheritedAttributes = {};
|
|
2212
|
+
this.didLoadIcon = false;
|
|
2213
|
+
this.isVisible = false;
|
|
2214
|
+
/**
|
|
2215
|
+
* The mode determines which platform styles to use.
|
|
2216
|
+
*/
|
|
2217
|
+
this.mode = getIonMode();
|
|
2218
|
+
/**
|
|
2219
|
+
* If enabled, ion-icon will be loaded lazily when it's visible in the viewport.
|
|
2220
|
+
* Default, `false`.
|
|
2221
|
+
*/
|
|
2222
|
+
this.lazy = false;
|
|
2223
|
+
/**
|
|
2224
|
+
* When set to `false`, SVG content that is HTTP fetched will not be checked
|
|
2225
|
+
* if the response SVG content has any `<script>` elements, or any attributes
|
|
2226
|
+
* that start with `on`, such as `onclick`.
|
|
2227
|
+
* @default true
|
|
2228
|
+
*/
|
|
2229
|
+
this.sanitize = true;
|
|
2230
|
+
}
|
|
2231
|
+
componentWillLoad() {
|
|
2232
|
+
this.inheritedAttributes = inheritAttributes(this.el, ["aria-label"]);
|
|
2233
|
+
}
|
|
2234
|
+
connectedCallback() {
|
|
2235
|
+
/**
|
|
2236
|
+
* purposely do not return the promise here because loading
|
|
2237
|
+
* the svg file should not hold up loading the app
|
|
2238
|
+
* only load the svg if it's visible
|
|
2239
|
+
*/
|
|
2240
|
+
this.waitUntilVisible(this.el, "50px", () => {
|
|
2241
|
+
this.isVisible = true;
|
|
2242
|
+
this.loadIcon();
|
|
2243
|
+
});
|
|
2244
|
+
}
|
|
2245
|
+
/**
|
|
2246
|
+
* Loads the icon after the component has finished rendering.
|
|
2247
|
+
*/
|
|
2248
|
+
componentDidLoad() {
|
|
2249
|
+
/**
|
|
2250
|
+
* Addresses an Angular issue where property values are assigned after the 'connectedCallback' but prior to the registration of watchers.
|
|
2251
|
+
* This enhancement ensures the loading of an icon when the component has finished rendering and the icon has yet to apply the SVG data.
|
|
2252
|
+
* This modification pertains to the usage of Angular's binding syntax:
|
|
2253
|
+
* `<ion-icon [name]="myIconName"></ion-icon>`
|
|
2254
|
+
*/
|
|
2255
|
+
if (!this.didLoadIcon) this.loadIcon();
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* Disconnect the IntersectionObserver.
|
|
2259
|
+
*/
|
|
2260
|
+
disconnectedCallback() {
|
|
2261
|
+
if (this.io) {
|
|
2262
|
+
this.io.disconnect();
|
|
2263
|
+
this.io = void 0;
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
/**
|
|
2267
|
+
* Wait until the icon is visible in the viewport.
|
|
2268
|
+
* @param el - The element to observe.
|
|
2269
|
+
* @param rootMargin - The root margin of the observer.
|
|
2270
|
+
* @param cb - The callback to call when the element is visible.
|
|
2271
|
+
*/
|
|
2272
|
+
waitUntilVisible(el, rootMargin, cb) {
|
|
2273
|
+
/**
|
|
2274
|
+
* browser doesn't support IntersectionObserver
|
|
2275
|
+
* so just fallback to always show it
|
|
2276
|
+
*/
|
|
2277
|
+
if (!Boolean(this.lazy && typeof window !== "undefined" && window.IntersectionObserver)) return cb();
|
|
2278
|
+
const io = this.io = new window.IntersectionObserver((data) => {
|
|
2279
|
+
if (data[0].isIntersecting) {
|
|
2280
|
+
io.disconnect();
|
|
2281
|
+
this.io = void 0;
|
|
2282
|
+
cb();
|
|
2283
|
+
}
|
|
2284
|
+
}, { rootMargin });
|
|
2285
|
+
io.observe(el);
|
|
2286
|
+
}
|
|
2287
|
+
/**
|
|
2288
|
+
* Watch for changes to the icon name, src, icon, ios, or md properties.
|
|
2289
|
+
* When a change is detected, the icon will be loaded.
|
|
2290
|
+
*/
|
|
2291
|
+
loadIcon() {
|
|
2292
|
+
if (this.isVisible) {
|
|
2293
|
+
const url = getUrl(this);
|
|
2294
|
+
if (url) {
|
|
2295
|
+
if (ioniconContent.has(url)) this.svgContent = ioniconContent.get(url);
|
|
2296
|
+
else getSvgContent(url, this.sanitize).then(() => this.svgContent = ioniconContent.get(url));
|
|
2297
|
+
this.didLoadIcon = true;
|
|
2298
|
+
}
|
|
2299
|
+
}
|
|
2300
|
+
this.iconName = getName(this.name, this.icon, this.mode, this.ios, this.md);
|
|
2301
|
+
}
|
|
2302
|
+
render() {
|
|
2303
|
+
const { flipRtl, iconName, inheritedAttributes, el } = this;
|
|
2304
|
+
const mode = this.mode || "md";
|
|
2305
|
+
/**
|
|
2306
|
+
* we have designated that arrows & chevrons should automatically flip (unless flip-rtl
|
|
2307
|
+
* is set to false) because "back" is left in ltr and right in rtl, and "forward" is the opposite
|
|
2308
|
+
*/
|
|
2309
|
+
const shouldAutoFlip = iconName ? (iconName.includes("arrow") || iconName.includes("chevron")) && flipRtl !== false : false;
|
|
2310
|
+
/**
|
|
2311
|
+
* if shouldBeFlippable is true, the icon should change direction when `dir` changes
|
|
2312
|
+
*/
|
|
2313
|
+
const shouldBeFlippable = flipRtl || shouldAutoFlip;
|
|
2314
|
+
return h(Host, Object.assign({
|
|
2315
|
+
key: "0578c899781ca145dd8205acd9670af39b57cf2e",
|
|
2316
|
+
role: "img",
|
|
2317
|
+
class: Object.assign(Object.assign({ [mode]: true }, createColorClasses(this.color)), {
|
|
2318
|
+
[`icon-${this.size}`]: !!this.size,
|
|
2319
|
+
"flip-rtl": shouldBeFlippable,
|
|
2320
|
+
"icon-rtl": shouldBeFlippable && isRTL(el)
|
|
2321
|
+
})
|
|
2322
|
+
}, inheritedAttributes), this.svgContent ? h("div", {
|
|
2323
|
+
class: "icon-inner",
|
|
2324
|
+
innerHTML: this.svgContent
|
|
2325
|
+
}) : h("div", { class: "icon-inner" }));
|
|
2326
|
+
}
|
|
2327
|
+
static get assetsDirs() {
|
|
2328
|
+
return ["svg"];
|
|
2329
|
+
}
|
|
2330
|
+
get el() {
|
|
2331
|
+
return this;
|
|
2332
|
+
}
|
|
2333
|
+
static get watchers() {
|
|
2334
|
+
return {
|
|
2335
|
+
"name": ["loadIcon"],
|
|
2336
|
+
"src": ["loadIcon"],
|
|
2337
|
+
"icon": ["loadIcon"],
|
|
2338
|
+
"ios": ["loadIcon"],
|
|
2339
|
+
"md": ["loadIcon"]
|
|
2340
|
+
};
|
|
2341
|
+
}
|
|
2342
|
+
static get style() {
|
|
2343
|
+
return iconCss;
|
|
2344
|
+
}
|
|
2345
|
+
}, [
|
|
2346
|
+
1,
|
|
2347
|
+
"ion-icon",
|
|
2348
|
+
{
|
|
2349
|
+
"mode": [1025],
|
|
2350
|
+
"color": [1],
|
|
2351
|
+
"ios": [1],
|
|
2352
|
+
"md": [1],
|
|
2353
|
+
"flipRtl": [4, "flip-rtl"],
|
|
2354
|
+
"name": [513],
|
|
2355
|
+
"src": [1],
|
|
2356
|
+
"icon": [8],
|
|
2357
|
+
"size": [1],
|
|
2358
|
+
"lazy": [4],
|
|
2359
|
+
"sanitize": [4],
|
|
2360
|
+
"svgContent": [32],
|
|
2361
|
+
"isVisible": [32]
|
|
2362
|
+
},
|
|
2363
|
+
void 0,
|
|
2364
|
+
{
|
|
2365
|
+
"name": ["loadIcon"],
|
|
2366
|
+
"src": ["loadIcon"],
|
|
2367
|
+
"icon": ["loadIcon"],
|
|
2368
|
+
"ios": ["loadIcon"],
|
|
2369
|
+
"md": ["loadIcon"]
|
|
2370
|
+
}
|
|
2371
|
+
]);
|
|
2372
|
+
/**
|
|
2373
|
+
* Get the mode of the document.
|
|
2374
|
+
* @returns The mode of the document.
|
|
2375
|
+
*/
|
|
2376
|
+
var getIonMode = () => typeof document !== "undefined" && document.documentElement.getAttribute("mode") || "md";
|
|
2377
|
+
/**
|
|
2378
|
+
* Create color classes for the icon.
|
|
2379
|
+
* @param color - The color of the icon.
|
|
2380
|
+
* @returns The color classes for the icon.
|
|
2381
|
+
*/
|
|
2382
|
+
var createColorClasses = (color) => {
|
|
2383
|
+
return color ? {
|
|
2384
|
+
"ion-color": true,
|
|
2385
|
+
[`ion-color-${color}`]: true
|
|
2386
|
+
} : null;
|
|
2387
|
+
};
|
|
2388
|
+
function defineCustomElement$1() {
|
|
2389
|
+
if (typeof customElements === "undefined") return;
|
|
2390
|
+
["ion-icon"].forEach((tagName) => {
|
|
2391
|
+
switch (tagName) {
|
|
2392
|
+
case "ion-icon":
|
|
2393
|
+
if (!customElements.get(tagName)) customElements.define(tagName, Icon);
|
|
2394
|
+
break;
|
|
2395
|
+
}
|
|
2396
|
+
});
|
|
2397
|
+
}
|
|
2398
|
+
var defineCustomElement = defineCustomElement$1;
|
|
2399
|
+
//#endregion
|
|
2400
|
+
//#region node_modules/ionicons/dist/esm/index-RzboMlQJ.js
|
|
2401
|
+
var CACHED_MAP;
|
|
2402
|
+
var getIconMap = () => {
|
|
2403
|
+
if (typeof window === "undefined") return /* @__PURE__ */ new Map();
|
|
2404
|
+
else {
|
|
2405
|
+
if (!CACHED_MAP) {
|
|
2406
|
+
const win = window;
|
|
2407
|
+
win.Ionicons = win.Ionicons || {};
|
|
2408
|
+
CACHED_MAP = win.Ionicons.map = win.Ionicons.map || /* @__PURE__ */ new Map();
|
|
2409
|
+
}
|
|
2410
|
+
return CACHED_MAP;
|
|
2411
|
+
}
|
|
2412
|
+
};
|
|
2413
|
+
var addIcons = (icons) => {
|
|
2414
|
+
Object.keys(icons).forEach((name) => {
|
|
2415
|
+
addToIconMap(name, icons[name]);
|
|
2416
|
+
/**
|
|
2417
|
+
* Developers can also pass in the SVG object directly
|
|
2418
|
+
* and Ionicons can map the object to a kebab case name.
|
|
2419
|
+
* Example: addIcons({ addCircleOutline });
|
|
2420
|
+
* This will create an "addCircleOutline" entry and
|
|
2421
|
+
* an "add-circle-outline" entry.
|
|
2422
|
+
* Usage: <ion-icon name="add-circle-outline"></ion-icon>
|
|
2423
|
+
* Using name="addCircleOutline" is valid too, but the
|
|
2424
|
+
* kebab case naming is preferred.
|
|
2425
|
+
*/
|
|
2426
|
+
const toKebabCase = name.replace(/([a-z0-9]|(?=[A-Z]))([A-Z0-9])/g, "$1-$2").toLowerCase();
|
|
2427
|
+
if (name !== toKebabCase) addToIconMap(toKebabCase, icons[name]);
|
|
2428
|
+
});
|
|
2429
|
+
};
|
|
2430
|
+
var addToIconMap = (name, data) => {
|
|
2431
|
+
const map = getIconMap();
|
|
2432
|
+
const existingIcon = map.get(name);
|
|
2433
|
+
if (existingIcon === void 0) map.set(name, data);
|
|
2434
|
+
else if (existingIcon !== data) console.warn(`[Ionicons Warning]: Multiple icons were mapped to name "${name}". Ensure that multiple icons are not mapped to the same icon name.`);
|
|
2435
|
+
};
|
|
2436
|
+
//#endregion
|
|
2437
|
+
//#region node_modules/ionicons/icons/index.mjs
|
|
2438
|
+
var arrowBack = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
|
|
2439
|
+
var arrowBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M244 400 100 256l144-144M120 256h292' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>";
|
|
2440
|
+
var chevronBack = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='round' stroke-linejoin='round' stroke-width='48px' class='ionicon-fill-none'/></svg>";
|
|
2441
|
+
var chevronBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512' class='ionicon'><path d='M328 112 184 256l144 144' stroke-linecap='square' stroke-miterlimit='10' stroke-width='48px' class='ionicon-fill-none'/></svg>";
|
|
2442
|
+
//#endregion
|
|
2443
|
+
//#region src/setup.ts
|
|
2444
|
+
var isInitialized = false;
|
|
2445
|
+
/**
|
|
2446
|
+
* Initialize Ionic Core for Nix.js.
|
|
2447
|
+
*
|
|
2448
|
+
* By default only the **minimal** components needed for routing are registered
|
|
2449
|
+
* (ion-app, ion-router, ion-route, ion-router-outlet, ion-back-button, ion-icon).
|
|
2450
|
+
*
|
|
2451
|
+
* Pass additional components via `options.components` to register only what you use:
|
|
2452
|
+
*
|
|
2453
|
+
* ```ts
|
|
2454
|
+
* import { setupNixIonic } from "@deijose/nix-ionic";
|
|
2455
|
+
* import { layoutComponents } from "@deijose/nix-ionic/bundles/layout";
|
|
2456
|
+
* import { defineIonButton } from "@deijose/nix-ionic/components";
|
|
2457
|
+
*
|
|
2458
|
+
* setupNixIonic({
|
|
2459
|
+
* components: [...layoutComponents, defineIonButton],
|
|
2460
|
+
* });
|
|
2461
|
+
* ```
|
|
2462
|
+
*/
|
|
2463
|
+
function setupNixIonic(options = {}) {
|
|
2464
|
+
if (isInitialized) return;
|
|
2465
|
+
const assetPath = options.iconAssetPath || "https://unpkg.com/ionicons@latest/dist/ionicons/svg/";
|
|
2466
|
+
window.ionicons = { assets: assetPath };
|
|
2467
|
+
y$3();
|
|
2468
|
+
const coreComponents = [
|
|
2469
|
+
l$4,
|
|
2470
|
+
L,
|
|
2471
|
+
p$3,
|
|
2472
|
+
f$3,
|
|
2473
|
+
v,
|
|
2474
|
+
defineCustomElement
|
|
2475
|
+
];
|
|
2476
|
+
for (let i = 0; i < coreComponents.length; i++) {
|
|
2477
|
+
const def = coreComponents[i];
|
|
2478
|
+
def();
|
|
2479
|
+
}
|
|
2480
|
+
if (options.components) for (let i = 0; i < options.components.length; i++) {
|
|
2481
|
+
const def = options.components[i];
|
|
2482
|
+
def();
|
|
2483
|
+
}
|
|
2484
|
+
addIcons({
|
|
2485
|
+
"arrow-back": arrowBack,
|
|
2486
|
+
"arrow-back-sharp": arrowBackSharp,
|
|
2487
|
+
"chevron-back": chevronBack,
|
|
2488
|
+
"chevron-back-sharp": chevronBackSharp
|
|
2489
|
+
});
|
|
2490
|
+
isInitialized = true;
|
|
2491
|
+
}
|
|
2492
|
+
//#endregion
|
|
2493
|
+
//#region src/IonRouterOutlet.ts
|
|
2494
|
+
function useRouter() {
|
|
2495
|
+
return {
|
|
2496
|
+
navigate: (path, direction = "forward") => {
|
|
2497
|
+
const router = document.querySelector("ion-router");
|
|
2498
|
+
if (router && typeof router.push === "function") router.push(path, direction);
|
|
2499
|
+
},
|
|
2500
|
+
replace: (path) => {
|
|
2501
|
+
const router = document.querySelector("ion-router");
|
|
2502
|
+
if (router && typeof router.push === "function") router.push(path, "root");
|
|
2503
|
+
},
|
|
2504
|
+
back: () => {
|
|
2505
|
+
const router = document.querySelector("ion-router");
|
|
2506
|
+
if (router && typeof router.back === "function") router.back();
|
|
2507
|
+
}
|
|
2508
|
+
};
|
|
2509
|
+
}
|
|
2510
|
+
function IonBackButton(defaultHref = "/") {
|
|
2511
|
+
return {
|
|
2512
|
+
__isNixTemplate: true,
|
|
2513
|
+
mount(container) {
|
|
2514
|
+
const el = typeof container === "string" ? document.querySelector(container) : container;
|
|
2515
|
+
return { unmount: this._render(el, null) };
|
|
2516
|
+
},
|
|
2517
|
+
_render(parent, before) {
|
|
2518
|
+
const btn = document.createElement("ion-back-button");
|
|
2519
|
+
if (defaultHref) btn.setAttribute("default-href", defaultHref);
|
|
2520
|
+
parent.insertBefore(btn, before);
|
|
2521
|
+
return () => btn.remove();
|
|
2522
|
+
}
|
|
2523
|
+
};
|
|
2524
|
+
}
|
|
2525
|
+
var IonRouterOutlet = class extends _deijose_nix_js.NixComponent {
|
|
2526
|
+
routes;
|
|
2527
|
+
constructor(routes) {
|
|
2528
|
+
super();
|
|
2529
|
+
this.routes = routes;
|
|
2530
|
+
}
|
|
2531
|
+
_pathToRouteId(path) {
|
|
2532
|
+
if (!path || path === "/") return "nix-route-home";
|
|
2533
|
+
return `nix-route-${path.replace(/\/:?[^/]+/g, (m) => "-" + m.replace(/\//g, "").replace(/:/g, "")).replace(/^\//, "").replace(/\//g, "-")}`;
|
|
2534
|
+
}
|
|
2535
|
+
render() {
|
|
2536
|
+
const self = this;
|
|
2537
|
+
return {
|
|
2538
|
+
__isNixTemplate: true,
|
|
2539
|
+
mount(container) {
|
|
2540
|
+
const el = typeof container === "string" ? document.querySelector(container) : container;
|
|
2541
|
+
return { unmount: this._render(el, null) };
|
|
2542
|
+
},
|
|
2543
|
+
_render(parent, before) {
|
|
2544
|
+
const routerEl = document.createElement("ion-router");
|
|
2545
|
+
routerEl.setAttribute("use-hash", "false");
|
|
2546
|
+
self.routes.filter((r) => r.path !== "*").forEach((r) => {
|
|
2547
|
+
const routeEl = document.createElement("ion-route");
|
|
2548
|
+
routeEl.setAttribute("url", r.path);
|
|
2549
|
+
routeEl.setAttribute("component", self._pathToRouteId(r.path));
|
|
2550
|
+
routerEl.appendChild(routeEl);
|
|
2551
|
+
});
|
|
2552
|
+
const outletEl = document.createElement("ion-router-outlet");
|
|
2553
|
+
outletEl.delegate = {
|
|
2554
|
+
attachViewToDom: async (container, componentTag, props, classes) => {
|
|
2555
|
+
const routeDef = self.routes.find((r) => self._pathToRouteId(r.path) === componentTag);
|
|
2556
|
+
const pageEl = document.createElement("ion-page");
|
|
2557
|
+
pageEl.classList.add("ion-page");
|
|
2558
|
+
if (classes && classes.length) pageEl.classList.add(...classes);
|
|
2559
|
+
const lc = createPageLifecycle();
|
|
2560
|
+
pageEl.addEventListener("ionViewWillEnter", () => lc.willEnter.update((n) => n + 1));
|
|
2561
|
+
pageEl.addEventListener("ionViewDidEnter", () => lc.didEnter.update((n) => n + 1));
|
|
2562
|
+
pageEl.addEventListener("ionViewWillLeave", () => lc.willLeave.update((n) => n + 1));
|
|
2563
|
+
pageEl.addEventListener("ionViewDidLeave", () => lc.didLeave.update((n) => n + 1));
|
|
2564
|
+
if (routeDef) {
|
|
2565
|
+
const params = props || {};
|
|
2566
|
+
const pageNode = routeDef.component({
|
|
2567
|
+
lc,
|
|
2568
|
+
params
|
|
2569
|
+
});
|
|
2570
|
+
if ("render" in pageNode && typeof pageNode.render === "function") {
|
|
2571
|
+
const comp = pageNode;
|
|
2572
|
+
comp.onInit?.();
|
|
2573
|
+
const renderCleanup = comp.render()._render(pageEl, null);
|
|
2574
|
+
const mountRet = comp.onMount?.();
|
|
2575
|
+
pageEl._nixCleanup = () => {
|
|
2576
|
+
comp.onUnmount?.();
|
|
2577
|
+
if (typeof mountRet === "function") mountRet();
|
|
2578
|
+
renderCleanup();
|
|
2579
|
+
};
|
|
2580
|
+
} else pageEl._nixCleanup = pageNode._render(pageEl, null);
|
|
2581
|
+
}
|
|
2582
|
+
container.appendChild(pageEl);
|
|
2583
|
+
return pageEl;
|
|
2584
|
+
},
|
|
2585
|
+
removeViewFromDom: async (_container, component) => {
|
|
2586
|
+
if (component._nixCleanup) component._nixCleanup();
|
|
2587
|
+
component.remove();
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
parent.insertBefore(routerEl, before);
|
|
2591
|
+
parent.insertBefore(outletEl, before);
|
|
2592
|
+
return () => {
|
|
2593
|
+
routerEl.remove();
|
|
2594
|
+
outletEl.remove();
|
|
2595
|
+
};
|
|
2596
|
+
}
|
|
2597
|
+
};
|
|
2598
|
+
}
|
|
2599
|
+
};
|
|
2600
|
+
//#endregion
|
|
2601
|
+
exports.IonBackButton = IonBackButton;
|
|
2602
|
+
exports.IonPage = IonPage;
|
|
2603
|
+
exports.IonRouterOutlet = IonRouterOutlet;
|
|
2604
|
+
exports.createPageLifecycle = createPageLifecycle;
|
|
2605
|
+
exports.setupNixIonic = setupNixIonic;
|
|
2606
|
+
exports.useIonViewDidEnter = useIonViewDidEnter;
|
|
2607
|
+
exports.useIonViewDidLeave = useIonViewDidLeave;
|
|
2608
|
+
exports.useIonViewWillEnter = useIonViewWillEnter;
|
|
2609
|
+
exports.useIonViewWillLeave = useIonViewWillLeave;
|
|
2610
|
+
exports.useRouter = useRouter;
|
|
2611
|
+
|
|
2612
|
+
//# sourceMappingURL=index.cjs.map
|