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