@expofp/loader 1.0.30 → 1.0.33
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/{downloadZip-DwDnK9eb.js → downloadZip-CKCMYGtc.js} +2 -2
- package/dist/{downloadZip-DwDnK9eb.js.map → downloadZip-CKCMYGtc.js.map} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +291 -220
- package/dist/index.js.map +1 -1
- package/dist/makeOffline-CttQujH7.js +154 -0
- package/dist/makeOffline-CttQujH7.js.map +1 -0
- package/dist/{makeOfflineBundle-CDWAdTIW.js → makeOfflineBundle-BXfViegK.js} +2 -2
- package/dist/{makeOfflineBundle-CDWAdTIW.js.map → makeOfflineBundle-BXfViegK.js.map} +1 -1
- package/dist/mutateManifest.d.ts +2 -0
- package/dist/offline/makeOffline.d.ts +1 -2
- package/dist/resolve.d.ts +24 -2
- package/dist/resolvers/httpResolver.d.ts +1 -1
- package/dist/resolvers/legacyDataResolver.d.ts +2 -1
- package/dist/shared.d.ts +1 -0
- package/dist/types.d.ts +2 -1
- package/package.json +1 -1
- package/dist/makeOffline-bamiAsgC.js +0 -155
- package/dist/makeOffline-bamiAsgC.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,27 +1,30 @@
|
|
|
1
|
-
function
|
|
2
|
-
return
|
|
1
|
+
function k(e) {
|
|
2
|
+
return l("assetResolver resolveRef:", e), m(e);
|
|
3
3
|
}
|
|
4
|
-
const
|
|
4
|
+
const _ = {
|
|
5
5
|
schema: "asset",
|
|
6
|
-
resolveRef: async (e) =>
|
|
6
|
+
resolveRef: async (e) => k(e),
|
|
7
7
|
offlineMethod: "localizeRef"
|
|
8
|
-
},
|
|
8
|
+
}, j = {
|
|
9
9
|
schema: "bundle-assets",
|
|
10
10
|
// canResolve(ref: string) {
|
|
11
11
|
// return canResolveRefSchema(ref, SCHEMA_PREFIX_BASE);
|
|
12
12
|
// },
|
|
13
|
-
async resolveRef(e) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
async resolveRef(e, t) {
|
|
14
|
+
var o, a;
|
|
15
|
+
if (l("bundleAssetsResolver resolveRef:", e), (o = t.refCache) != null && o.has(e))
|
|
16
|
+
return t.refCache.get(e);
|
|
17
|
+
const r = m(e), n = fetch(r).then(async (s) => {
|
|
18
|
+
var f;
|
|
19
|
+
if (!s.ok)
|
|
18
20
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
19
|
-
|
|
20
|
-
|
|
21
|
+
(f = t.fetchCallback) == null || f.call(t, r);
|
|
22
|
+
const i = await s.json(), w = r.substring(0, r.lastIndexOf("/") + 1), c = i.map((u) => ({
|
|
23
|
+
$ref: `asset+${w}${u}`
|
|
21
24
|
}));
|
|
22
|
-
return
|
|
25
|
+
return d(c), c;
|
|
23
26
|
});
|
|
24
|
-
return
|
|
27
|
+
return (a = t.refCache) == null || a.set(e, n), n;
|
|
25
28
|
},
|
|
26
29
|
// async *makeOfflineRef(ref: string) {
|
|
27
30
|
// log('bundleAssetsResolver makeOfflineRef:', ref);
|
|
@@ -52,38 +55,39 @@ const k = {
|
|
|
52
55
|
// yield { data, targetFilePath };
|
|
53
56
|
// return { $ref: targetFilePath, [STOP_RESOLVING]: true };
|
|
54
57
|
// },
|
|
55
|
-
},
|
|
58
|
+
}, F = "https://efp-runtime.expofp.com/", M = {
|
|
56
59
|
schema: "expo-runtime-branch",
|
|
57
60
|
// canResolve(ref: string) {
|
|
58
61
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
59
62
|
// },
|
|
60
|
-
async resolveRef(e) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
63
|
+
async resolveRef(e, t) {
|
|
64
|
+
var o, a;
|
|
65
|
+
if (l("expoRuntimeBranchResolver resolveRef:", e), (o = t.refCache) != null && o.has(e))
|
|
66
|
+
return t.refCache.get(e);
|
|
67
|
+
const r = m(e), n = new Promise(async (s, i) => {
|
|
68
|
+
var w;
|
|
64
69
|
try {
|
|
65
|
-
const
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
a = await f.json();
|
|
70
|
+
const c = [`${F}branches/${r}.json`];
|
|
71
|
+
let f;
|
|
72
|
+
for (const p of c) {
|
|
73
|
+
l("Fetching HTTP:", p);
|
|
74
|
+
const h = await fetch(p);
|
|
75
|
+
if (h.ok) {
|
|
76
|
+
(w = t.fetchCallback) == null || w.call(t, p), f = await h.json();
|
|
73
77
|
break;
|
|
74
78
|
}
|
|
75
79
|
}
|
|
76
|
-
if (!
|
|
80
|
+
if (!f)
|
|
77
81
|
throw new Error(`Failed to fetch release from ${e}`);
|
|
78
|
-
const
|
|
79
|
-
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${
|
|
82
|
+
const u = {
|
|
83
|
+
$ref: `expo-runtime+https://efp-runtime.expofp.com/releases/${f}/`
|
|
80
84
|
};
|
|
81
|
-
|
|
82
|
-
} catch (
|
|
83
|
-
|
|
85
|
+
d(u), s(u);
|
|
86
|
+
} catch (c) {
|
|
87
|
+
i(c);
|
|
84
88
|
}
|
|
85
89
|
});
|
|
86
|
-
return
|
|
90
|
+
return (a = t.refCache) == null || a.set(e, n), n;
|
|
87
91
|
},
|
|
88
92
|
// async *makeOfflineRef(ref: string) {
|
|
89
93
|
// log('expoRuntimeBranchResolver makeOfflineRef:', ref);
|
|
@@ -103,26 +107,29 @@ const k = {
|
|
|
103
107
|
// return targetFilePath;
|
|
104
108
|
// },
|
|
105
109
|
offlineMethod: "resolveRef"
|
|
106
|
-
},
|
|
110
|
+
}, A = {
|
|
107
111
|
schema: "expo-runtime-get-branch",
|
|
108
112
|
// canResolve(ref: string) {
|
|
109
113
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
110
114
|
// },
|
|
111
|
-
async resolveRef(e) {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
115
|
+
async resolveRef(e, t) {
|
|
116
|
+
var a, s;
|
|
117
|
+
if (l("expoRuntimeGetBranchResolver resolveRef:", e), (a = t.refCache) != null && a.has(e))
|
|
118
|
+
return t.refCache.get(e);
|
|
119
|
+
const r = m(e), n = `https://${r}.expofp.com/get-branch`;
|
|
120
|
+
l("Fetching HTTP:", n);
|
|
121
|
+
const o = fetch(n).then(async (i) => {
|
|
122
|
+
var u;
|
|
123
|
+
if (!i.ok)
|
|
118
124
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
125
|
+
(u = t.fetchCallback) == null || u.call(t, n);
|
|
126
|
+
const c = (await i.json()).branch;
|
|
127
|
+
if (!c)
|
|
128
|
+
throw new Error(`Invalid response when fetching branch for expo ${r}`);
|
|
129
|
+
const f = { $ref: `expo-runtime-branch:${c}` };
|
|
130
|
+
return d(f), f;
|
|
124
131
|
});
|
|
125
|
-
return
|
|
132
|
+
return (s = t.refCache) == null || s.set(e, o), o;
|
|
126
133
|
},
|
|
127
134
|
// async *makeOfflineRef(ref: string) {
|
|
128
135
|
// log('expoRuntimeBranchResolver makeOfflineRef:', ref);
|
|
@@ -142,18 +149,18 @@ const k = {
|
|
|
142
149
|
// return targetFilePath;
|
|
143
150
|
// },
|
|
144
151
|
offlineMethod: "resolveRef"
|
|
145
|
-
},
|
|
152
|
+
}, T = {
|
|
146
153
|
schema: "expo-runtime",
|
|
147
154
|
// canResolve(ref: string) {
|
|
148
155
|
// return canResolveRefSchema(ref, SCHEMA);
|
|
149
156
|
// },
|
|
150
157
|
async resolveRef(e) {
|
|
151
|
-
|
|
152
|
-
const t =
|
|
158
|
+
l("expoRuntimeResolver resolveRef:", e);
|
|
159
|
+
const t = m(e), r = {
|
|
153
160
|
entry: { $ref: `asset+${t}expofp.js` },
|
|
154
161
|
assets: { $ref: `bundle-assets+${t}bundle.json` }
|
|
155
162
|
};
|
|
156
|
-
return
|
|
163
|
+
return d(r), r;
|
|
157
164
|
},
|
|
158
165
|
// async *makeOfflineRef(ref: string) {
|
|
159
166
|
// log('expoRuntimeResolver makeOfflineRef:', ref);
|
|
@@ -173,22 +180,25 @@ const k = {
|
|
|
173
180
|
// return targetFilePath;
|
|
174
181
|
// },
|
|
175
182
|
offlineMethod: "resolveRef"
|
|
176
|
-
},
|
|
183
|
+
}, B = {
|
|
177
184
|
canResolve(e) {
|
|
178
185
|
return e.startsWith("http://") || e.startsWith("https://") || e.startsWith("./");
|
|
179
186
|
},
|
|
180
|
-
async resolveRef(e) {
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
+
async resolveRef(e, t) {
|
|
188
|
+
var n, o;
|
|
189
|
+
if (l("httpResolver resolveRef:", e), !this.canResolve(e)) throw new Error(`Unexpected ref in httpResolver: ${e}`);
|
|
190
|
+
if ((n = t.refCache) != null && n.has(e))
|
|
191
|
+
return t.refCache.get(e);
|
|
192
|
+
l("Fetching HTTP ref:", e);
|
|
193
|
+
const r = fetch(e).then(async (a) => {
|
|
194
|
+
var i;
|
|
195
|
+
if (!a.ok)
|
|
187
196
|
throw new Error(`Failed to fetch ref from ${e}`);
|
|
188
|
-
|
|
189
|
-
|
|
197
|
+
(i = t.fetchCallback) == null || i.call(t, e);
|
|
198
|
+
const s = await a.json();
|
|
199
|
+
return d(s), s;
|
|
190
200
|
});
|
|
191
|
-
return
|
|
201
|
+
return (o = t.refCache) == null || o.set(e, r), r;
|
|
192
202
|
},
|
|
193
203
|
// async *makeOfflineRef(ref) {
|
|
194
204
|
// log('httpResolver makeOfflineRef:', ref);
|
|
@@ -209,33 +219,33 @@ const k = {
|
|
|
209
219
|
// },
|
|
210
220
|
offlineMethod: "resolveRef"
|
|
211
221
|
};
|
|
212
|
-
async function
|
|
213
|
-
const { globalVar:
|
|
214
|
-
|
|
215
|
-
() => globalThis[
|
|
222
|
+
async function g(e, t = {}) {
|
|
223
|
+
const { globalVar: r, timeoutMs: n = 1e4, pollIntervalMs: o = 10 } = t;
|
|
224
|
+
N() ? (await P(e), r && await R(() => window[r], r, n, o)) : (await S(e), r && await R(
|
|
225
|
+
() => globalThis[r],
|
|
226
|
+
r,
|
|
216
227
|
n,
|
|
217
|
-
o
|
|
218
|
-
r
|
|
228
|
+
o
|
|
219
229
|
));
|
|
220
230
|
}
|
|
221
|
-
function
|
|
231
|
+
function N() {
|
|
222
232
|
return typeof window < "u" && typeof document < "u";
|
|
223
233
|
}
|
|
224
|
-
function
|
|
225
|
-
return new Promise((t,
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
const
|
|
229
|
-
|
|
234
|
+
function P(e) {
|
|
235
|
+
return new Promise((t, r) => {
|
|
236
|
+
const n = document.createElement("script");
|
|
237
|
+
n.src = e, n.async = !0;
|
|
238
|
+
const o = () => {
|
|
239
|
+
n.onload = null, n.onerror = null;
|
|
230
240
|
};
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
},
|
|
234
|
-
|
|
235
|
-
}, document.head.appendChild(
|
|
241
|
+
n.onload = () => {
|
|
242
|
+
o(), t();
|
|
243
|
+
}, n.onerror = () => {
|
|
244
|
+
o(), r(new Error(`Failed to load script: ${e}`));
|
|
245
|
+
}, document.head.appendChild(n);
|
|
236
246
|
});
|
|
237
247
|
}
|
|
238
|
-
async function
|
|
248
|
+
async function S(e) {
|
|
239
249
|
if (typeof fetch != "function")
|
|
240
250
|
throw new Error(
|
|
241
251
|
"loadAndWaitGlobal: fetch is not available. Use Node 18+ or provide a global fetch."
|
|
@@ -243,251 +253,312 @@ async function W(e) {
|
|
|
243
253
|
const t = await fetch(e);
|
|
244
254
|
if (!t.ok)
|
|
245
255
|
throw new Error(`Failed to load script in Node (HTTP ${t.status}): ${e}`);
|
|
246
|
-
const
|
|
247
|
-
(0, eval)(
|
|
256
|
+
const r = await t.text();
|
|
257
|
+
(0, eval)(r);
|
|
248
258
|
}
|
|
249
|
-
function
|
|
250
|
-
return new Promise((
|
|
251
|
-
const
|
|
259
|
+
function R(e, t, r, n) {
|
|
260
|
+
return new Promise((o, a) => {
|
|
261
|
+
const s = performance.now(), i = () => {
|
|
252
262
|
try {
|
|
253
263
|
if (e() !== void 0)
|
|
254
|
-
return
|
|
264
|
+
return o();
|
|
255
265
|
} catch {
|
|
256
266
|
}
|
|
257
|
-
if (performance.now() -
|
|
258
|
-
return
|
|
259
|
-
setTimeout(
|
|
267
|
+
if (performance.now() - s >= r)
|
|
268
|
+
return a(new Error(`Timed out after ${r} ms waiting for global "${t}"`));
|
|
269
|
+
setTimeout(i, n);
|
|
260
270
|
};
|
|
261
|
-
|
|
271
|
+
i();
|
|
262
272
|
});
|
|
263
273
|
}
|
|
264
|
-
const
|
|
274
|
+
const W = {
|
|
265
275
|
schema: "legacy-data",
|
|
266
276
|
// canResolve: (ref: string) => canResolveRefSchema(ref, 'legacy-data-js'),
|
|
267
|
-
async resolveRef(e) {
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
277
|
+
async resolveRef(e, t) {
|
|
278
|
+
var n, o;
|
|
279
|
+
if (l("legacyDataResolver resolveRef:", e), (n = t.refCache) != null && n.has(e))
|
|
280
|
+
return t.refCache.get(e);
|
|
281
|
+
const r = (async () => {
|
|
282
|
+
const a = m(e);
|
|
272
283
|
try {
|
|
273
|
-
await
|
|
284
|
+
await g(`${a}version.js`);
|
|
274
285
|
} catch {
|
|
275
286
|
console.warn("Could not load version.js, proceeding without it");
|
|
276
287
|
}
|
|
277
|
-
const
|
|
278
|
-
let
|
|
288
|
+
const s = globalThis.__fpDataVersion || (+/* @__PURE__ */ new Date()).toString();
|
|
289
|
+
let i = [];
|
|
279
290
|
await Promise.all([
|
|
280
291
|
(async function() {
|
|
281
|
-
const
|
|
282
|
-
if (
|
|
292
|
+
const h = await fetch(`${a}files.json?v=${s}`);
|
|
293
|
+
if (h.ok) i = await h.json();
|
|
283
294
|
else
|
|
284
|
-
throw new Error(`Could not load files.json from ${
|
|
295
|
+
throw new Error(`Could not load files.json from ${a}files.json?v=${s}`);
|
|
285
296
|
})(),
|
|
286
|
-
|
|
297
|
+
g(`${a}data.js?v=${s}`, { globalVar: "__data" })
|
|
287
298
|
// injectAndWaitForGlobal(`${dataUrlBase}data.js?v=${version}`, '__data'),
|
|
288
299
|
// injectAndWaitForGlobal(`${dataUrlBase}fp.svg.js?v=${version}`, '__fp'),
|
|
289
300
|
]);
|
|
290
|
-
const
|
|
291
|
-
_to_remove_for_offline_to_work_dataUrlBase:
|
|
301
|
+
const w = globalThis.__data || {}, f = [...i, "data.js"].reduce((p, h) => (p[h] = { $ref: `asset+${a}${h}?v=${s}` }, p), {}), u = {
|
|
302
|
+
_to_remove_for_offline_to_work_dataUrlBase: a,
|
|
292
303
|
// dataFiles: dataFiles.reduce((map, file) => {
|
|
293
304
|
// map[file] = { $ref: `asset+${dataUrlBase}${file}?v=${version}` };
|
|
294
305
|
// return map;
|
|
295
306
|
// }, {} as Record<string, { $ref: string }>),
|
|
296
|
-
|
|
307
|
+
legacyAssetUrls: { ...f, ...D(a, w) }
|
|
297
308
|
};
|
|
298
|
-
return
|
|
309
|
+
return d(u), u;
|
|
299
310
|
})();
|
|
300
|
-
return
|
|
311
|
+
return (o = t.refCache) == null || o.set(e, r), r;
|
|
301
312
|
},
|
|
302
313
|
offlineMethod: "resolveRef"
|
|
303
314
|
};
|
|
304
|
-
function
|
|
305
|
-
const
|
|
306
|
-
function o
|
|
307
|
-
typeof
|
|
315
|
+
function D(e, t) {
|
|
316
|
+
const r = /* @__PURE__ */ new Set();
|
|
317
|
+
function n(o) {
|
|
318
|
+
typeof o == "string" && o.length > 0 && r.add(o);
|
|
308
319
|
}
|
|
309
|
-
return
|
|
310
|
-
var
|
|
311
|
-
o
|
|
312
|
-
}), t.events.forEach((
|
|
313
|
-
var
|
|
314
|
-
o
|
|
315
|
-
|
|
320
|
+
return n(t.logo), t.exhibitors.forEach((o) => {
|
|
321
|
+
var a;
|
|
322
|
+
n(o.logo), (a = o.gallery) == null || a.forEach((s) => n(s));
|
|
323
|
+
}), t.events.forEach((o) => {
|
|
324
|
+
var a;
|
|
325
|
+
n(o.logoFile), (a = o.speakers) == null || a.forEach((s) => {
|
|
326
|
+
n(s.photoFile);
|
|
316
327
|
});
|
|
317
|
-
}), Array.from(
|
|
328
|
+
}), Array.from(r).reduce((o, a) => (o[a] = { $ref: `asset+${e}${a}` }, o), {});
|
|
318
329
|
}
|
|
319
|
-
const
|
|
320
|
-
|
|
330
|
+
const I = [
|
|
331
|
+
B,
|
|
321
332
|
j,
|
|
322
|
-
|
|
323
|
-
A,
|
|
324
|
-
M,
|
|
333
|
+
_,
|
|
325
334
|
T,
|
|
335
|
+
M,
|
|
336
|
+
A,
|
|
326
337
|
// expoResolver,
|
|
327
|
-
|
|
328
|
-
];
|
|
329
|
-
async function
|
|
330
|
-
|
|
338
|
+
W
|
|
339
|
+
], U = /* @__PURE__ */ new Map();
|
|
340
|
+
async function b(e, t, r) {
|
|
341
|
+
l("Resolving:", t), typeof window < "u" && (window.__lastResolveObject = e);
|
|
342
|
+
let n;
|
|
343
|
+
!r || r.refCache === "global" ? n = U : (r == null ? void 0 : r.refCache) === "temp" ? n = /* @__PURE__ */ new Map() : (r == null ? void 0 : r.refCache) === "disable" ? n = void 0 : n = r == null ? void 0 : r.refCache;
|
|
344
|
+
const o = {
|
|
345
|
+
refCache: n,
|
|
346
|
+
fetchCallback: r == null ? void 0 : r.fetchCallback
|
|
347
|
+
};
|
|
348
|
+
if (typeof t != "string")
|
|
331
349
|
throw new Error(`Invalid JSON Pointer (not a string): ${t}`);
|
|
332
350
|
if (!t.startsWith("/"))
|
|
333
351
|
throw new Error(`Invalid JSON Pointer: ${t}`);
|
|
334
352
|
if (t.length > 1 && t.endsWith("/"))
|
|
335
353
|
throw new Error(`Invalid JSON Pointer: ${t}`);
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
const n = t.substring(1).split("/");
|
|
339
|
-
if (n.some((r) => r.length === 0))
|
|
354
|
+
let a;
|
|
355
|
+
if (t === "/" ? a = [] : a = t.substring(1).split("/"), a.some((s) => s.length === 0))
|
|
340
356
|
throw new Error(`Invalid JSON Pointer (empty part): ${t}`);
|
|
341
|
-
|
|
342
|
-
|
|
357
|
+
if (r != null && r.mutate) {
|
|
358
|
+
a.unshift("root");
|
|
359
|
+
const s = { root: e };
|
|
360
|
+
await E(
|
|
361
|
+
s,
|
|
362
|
+
// 'root',
|
|
363
|
+
a,
|
|
364
|
+
0,
|
|
365
|
+
o
|
|
366
|
+
), V(e, s.root);
|
|
367
|
+
} else
|
|
368
|
+
return await C(e, a, 0, o);
|
|
343
369
|
}
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
const r = t[n];
|
|
349
|
-
if (typeof o != "object" || o === null)
|
|
370
|
+
async function E(e, t, r, n) {
|
|
371
|
+
const o = t[r];
|
|
372
|
+
if (await z(e, o, n), r != t.length - 1) {
|
|
373
|
+
if (e[o] === null || typeof e[o] != "object")
|
|
350
374
|
throw new Error(
|
|
351
375
|
`Cannot resolve path, encountered non-object at part '${t.join(
|
|
352
376
|
"/"
|
|
353
|
-
)}, index ${
|
|
377
|
+
)}', index ${r}'`
|
|
354
378
|
);
|
|
355
|
-
|
|
356
|
-
o = await R(s), n++;
|
|
379
|
+
return await E(e[o], t, r + 1, n);
|
|
357
380
|
}
|
|
358
|
-
return o;
|
|
359
381
|
}
|
|
360
|
-
async function
|
|
361
|
-
|
|
362
|
-
let
|
|
382
|
+
async function z(e, t, r) {
|
|
383
|
+
l("resolveObjectMutate:", e, t);
|
|
384
|
+
let n = e[t];
|
|
385
|
+
const o = await y(n, r);
|
|
386
|
+
o !== void 0 && (e[t] = o);
|
|
387
|
+
}
|
|
388
|
+
async function C(e, t, r, n) {
|
|
389
|
+
if (r === t.length)
|
|
390
|
+
return await y(e, n);
|
|
391
|
+
if (e === null || typeof e != "object")
|
|
392
|
+
throw new Error(
|
|
393
|
+
`Cannot resolve path, encountered non-object at part '${t.join("/")}', index ${r}'`
|
|
394
|
+
);
|
|
395
|
+
const o = t[r];
|
|
396
|
+
let a = e[o];
|
|
397
|
+
return a === void 0 && (a = (await y(e, n))[o]), await C(a, t, r + 1, n);
|
|
398
|
+
}
|
|
399
|
+
async function y(e, t) {
|
|
400
|
+
l("resolveObject:", e);
|
|
401
|
+
let r = e;
|
|
363
402
|
do {
|
|
364
|
-
if (typeof
|
|
365
|
-
return
|
|
366
|
-
const n =
|
|
403
|
+
if (typeof r != "object" || r === null || !("$ref" in r))
|
|
404
|
+
return r;
|
|
405
|
+
const n = I.filter((a) => O(a, r.$ref));
|
|
367
406
|
if (n.length === 0) {
|
|
368
|
-
if (
|
|
369
|
-
throw new Error(`No resolver found for ref: ${
|
|
370
|
-
return
|
|
407
|
+
if (r.$ref)
|
|
408
|
+
throw new Error(`No resolver found for ref: ${r.$ref}`);
|
|
409
|
+
return d(r), r;
|
|
371
410
|
}
|
|
372
411
|
if (n.length > 1)
|
|
373
|
-
throw new Error(`Multiple resolvers can resolve ref: ${
|
|
374
|
-
const o = await
|
|
375
|
-
|
|
412
|
+
throw new Error(`Multiple resolvers can resolve ref: ${r.$ref}`);
|
|
413
|
+
const o = await J(n[0], r.$ref, t);
|
|
414
|
+
r = L(o, r);
|
|
376
415
|
} while (!0);
|
|
377
416
|
}
|
|
378
|
-
async function
|
|
379
|
-
if (!
|
|
417
|
+
async function J(e, t, r) {
|
|
418
|
+
if (!O(e, t))
|
|
380
419
|
throw new Error(`Unexpected ref: ${t}`);
|
|
381
|
-
return e.resolveRef(t);
|
|
420
|
+
return e.resolveRef(t, r);
|
|
382
421
|
}
|
|
383
|
-
function
|
|
422
|
+
function O(e, t) {
|
|
384
423
|
if (e.canResolve)
|
|
385
424
|
return e.canResolve(t);
|
|
386
425
|
if (e.schema)
|
|
387
|
-
return
|
|
426
|
+
return H(t, e.schema);
|
|
388
427
|
throw new Error("Resolver is missing canResolve method and schema property");
|
|
389
428
|
}
|
|
390
|
-
function
|
|
391
|
-
const
|
|
392
|
-
for (const
|
|
393
|
-
if (e.startsWith(
|
|
429
|
+
function H(e, t) {
|
|
430
|
+
const r = [`${t}+`, `${t}:`];
|
|
431
|
+
for (const n of r)
|
|
432
|
+
if (e.startsWith(n))
|
|
394
433
|
return !0;
|
|
395
434
|
return !1;
|
|
396
435
|
}
|
|
397
|
-
function
|
|
436
|
+
function m(e) {
|
|
398
437
|
if (e.startsWith("http://") || e.startsWith("https://"))
|
|
399
438
|
return e;
|
|
400
|
-
const t = e.indexOf("+http://"),
|
|
439
|
+
const t = e.indexOf("+http://"), r = e.indexOf("+https://");
|
|
401
440
|
if (t !== -1)
|
|
402
441
|
return e.substring(t + 1);
|
|
442
|
+
if (r !== -1)
|
|
443
|
+
return e.substring(r + 1);
|
|
444
|
+
const n = e.indexOf(":");
|
|
403
445
|
if (n !== -1)
|
|
404
446
|
return e.substring(n + 1);
|
|
405
|
-
const o = e.indexOf(":");
|
|
406
|
-
if (o !== -1)
|
|
407
|
-
return e.substring(o + 1);
|
|
408
447
|
throw new Error(`Error getting URL from: ${e}, no valid prefix found`);
|
|
409
448
|
}
|
|
410
|
-
function
|
|
411
|
-
|
|
449
|
+
typeof window < "u" && (window.__debugResolve = async function(t, r, n) {
|
|
450
|
+
let o, a, s;
|
|
451
|
+
return typeof t == "string" ? (o = window.__lastResolveObject, a = t, s = r) : (o = t, a = r, s = n), await b(o, a, s);
|
|
452
|
+
});
|
|
453
|
+
function v(e) {
|
|
454
|
+
return async (t, ...r) => {
|
|
412
455
|
try {
|
|
413
|
-
const
|
|
414
|
-
return
|
|
415
|
-
} catch (
|
|
416
|
-
throw console.error("efp-loader", `Error when trying to import and call "${e}":`,
|
|
456
|
+
const a = (await import(await b(t, "/runtime/entry")))[e];
|
|
457
|
+
return a(t, ...r);
|
|
458
|
+
} catch (n) {
|
|
459
|
+
throw console.error("efp-loader", `Error when trying to import and call "${e}":`, n), n;
|
|
417
460
|
}
|
|
418
461
|
};
|
|
419
462
|
}
|
|
420
|
-
function
|
|
463
|
+
function l(...e) {
|
|
421
464
|
console.debug("efp-loader", ...e);
|
|
422
465
|
}
|
|
423
|
-
function
|
|
466
|
+
function d(e) {
|
|
424
467
|
if (e === null || typeof e != "object") return e;
|
|
425
468
|
Object.freeze(e);
|
|
426
469
|
for (const t of Object.keys(e)) {
|
|
427
|
-
const
|
|
428
|
-
typeof
|
|
470
|
+
const r = e[t];
|
|
471
|
+
typeof r == "object" && r !== null && !Object.isFrozen(r) && d(r);
|
|
429
472
|
}
|
|
430
473
|
return e;
|
|
431
474
|
}
|
|
432
|
-
function
|
|
475
|
+
function $(e) {
|
|
433
476
|
return "structuredClone" in globalThis ? globalThis.structuredClone(e) : JSON.parse(JSON.stringify(e));
|
|
434
477
|
}
|
|
435
|
-
function
|
|
478
|
+
function G(e) {
|
|
436
479
|
if (typeof document > "u") return;
|
|
437
480
|
const t = document.createElement("link");
|
|
438
481
|
t.rel = "preconnect", t.href = e, t.crossOrigin = "anonymous", document.head.appendChild(t);
|
|
439
482
|
}
|
|
440
|
-
function
|
|
483
|
+
function L(e, t) {
|
|
441
484
|
if (e === t) return;
|
|
442
485
|
if (t === null || typeof t != "object")
|
|
443
486
|
throw new Error("Cannot merge non-object source");
|
|
444
487
|
if (Array.isArray(t))
|
|
445
488
|
throw new Error("Cannot merge arrays");
|
|
446
|
-
const
|
|
447
|
-
if (
|
|
489
|
+
const r = Object.keys(t).filter((o) => o !== "$ref");
|
|
490
|
+
if (r.length === 0) return $(e);
|
|
448
491
|
if (Array.isArray(e))
|
|
449
492
|
throw new Error("Cannot merge into arrays");
|
|
450
493
|
if (e === null || typeof e != "object")
|
|
451
494
|
throw new Error("Cannot merge into non-object target");
|
|
452
|
-
const
|
|
453
|
-
for (const
|
|
454
|
-
o
|
|
455
|
-
return
|
|
495
|
+
const n = $({ ...e });
|
|
496
|
+
for (const o of r)
|
|
497
|
+
n[o] = t[o];
|
|
498
|
+
return n;
|
|
499
|
+
}
|
|
500
|
+
function V(e, t) {
|
|
501
|
+
if (e !== t) {
|
|
502
|
+
if (t === null || typeof t != "object")
|
|
503
|
+
throw new Error("Cannot replace with non-object source");
|
|
504
|
+
if (e === null || typeof e != "object")
|
|
505
|
+
throw new Error("Cannot replace non-object target");
|
|
506
|
+
if (Array.isArray(e)) {
|
|
507
|
+
if (!Array.isArray(t))
|
|
508
|
+
throw new Error("replaceObjectFields does not support mixing arrays and objects");
|
|
509
|
+
e.length = 0;
|
|
510
|
+
for (const r of t)
|
|
511
|
+
e.push(r);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
for (const r of Object.keys(e))
|
|
515
|
+
r in t || delete e[r];
|
|
516
|
+
for (const r of Object.keys(t))
|
|
517
|
+
e[r] = t[r];
|
|
518
|
+
}
|
|
519
|
+
}
|
|
520
|
+
async function Z(e, t, r) {
|
|
521
|
+
if (r || (r = { refCache: /* @__PURE__ */ new Map(), mutate: !0 }), !r.mutate)
|
|
522
|
+
throw new Error("resolveContext.mutate must be true for mutateManifest");
|
|
523
|
+
for (const n of t)
|
|
524
|
+
await b(e, n, r);
|
|
456
525
|
}
|
|
457
|
-
|
|
458
|
-
|
|
526
|
+
typeof window < "u" && (window.__debugMutateManifest = Z);
|
|
527
|
+
async function K(e) {
|
|
528
|
+
const { makeOfflineBundle: t } = await import("./makeOfflineBundle-BXfViegK.js");
|
|
459
529
|
return await t(e);
|
|
460
530
|
}
|
|
461
|
-
async function
|
|
462
|
-
const { downloadZip: t } = await import("./downloadZip-
|
|
531
|
+
async function q(e) {
|
|
532
|
+
const { downloadZip: t } = await import("./downloadZip-CKCMYGtc.js");
|
|
463
533
|
return await t(e);
|
|
464
534
|
}
|
|
465
|
-
async function
|
|
466
|
-
const { makeOffline: t } = await import("./makeOffline-
|
|
467
|
-
for await (const
|
|
468
|
-
"data" in
|
|
469
|
-
console.info("Offline data: ",
|
|
535
|
+
async function Q(e) {
|
|
536
|
+
const { makeOffline: t } = await import("./makeOffline-CttQujH7.js"), r = await t(e);
|
|
537
|
+
for await (const n of (await r).files)
|
|
538
|
+
"data" in n ? console.info(`🗳️ Put ${n.targetFilePath} <=`, n.data) : "url" in n && console.info(`🗳️ Download ${n.targetFilePath} <= ${n.url}`);
|
|
539
|
+
console.info("Offline data: ", r.manifest);
|
|
470
540
|
}
|
|
471
|
-
typeof window < "u" && (window.__debugDownloadZip =
|
|
472
|
-
const
|
|
473
|
-
async function
|
|
474
|
-
return await
|
|
541
|
+
typeof window < "u" && (window.__debugDownloadZip = q, window.__debugMakeOfflineBundle = K, window.__debugLogOfflineManifestFiles = Q);
|
|
542
|
+
const X = v("mount"), Y = v("load"), x = v("initialize");
|
|
543
|
+
async function ee(e, t, ...r) {
|
|
544
|
+
return await v(e)(t, ...r);
|
|
475
545
|
}
|
|
476
|
-
|
|
546
|
+
G("https://efp-runtime.expofp.com/");
|
|
477
547
|
export {
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
548
|
+
L as a,
|
|
549
|
+
J as b,
|
|
550
|
+
O as c,
|
|
551
|
+
ee as callFunction_Experimental,
|
|
552
|
+
$ as d,
|
|
553
|
+
q as downloadZip,
|
|
554
|
+
x as initialize,
|
|
555
|
+
l,
|
|
556
|
+
Y as load,
|
|
557
|
+
K as makeOfflineBundle,
|
|
558
|
+
X as mount,
|
|
559
|
+
Z as mutateManifest,
|
|
560
|
+
m as p,
|
|
561
|
+
I as r,
|
|
562
|
+
b as resolve
|
|
492
563
|
};
|
|
493
564
|
//# sourceMappingURL=index.js.map
|