@chatsystem/client 1.1.29 → 1.1.30
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/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +17 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4076,16 +4076,23 @@ un.__WIDGET_ASSET_CACHE__ || (un.__WIDGET_ASSET_CACHE__ = {
|
|
|
4076
4076
|
un.__WIDGET_PRELOAD_KEYS__ || (un.__WIDGET_PRELOAD_KEYS__ = /* @__PURE__ */ new Set());
|
|
4077
4077
|
const Yr = un.__WIDGET_PRELOAD_KEYS__, Ot = un.__WIDGET_ASSET_CACHE__, yf = "widget-assets-v1";
|
|
4078
4078
|
async function Cr(e, t) {
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4086
|
-
|
|
4087
|
-
|
|
4088
|
-
|
|
4079
|
+
try {
|
|
4080
|
+
const n = await caches.open(yf), r = await n.match(e, { ignoreSearch: !1 });
|
|
4081
|
+
if (r) return r.clone();
|
|
4082
|
+
const a = await fetch(e, {
|
|
4083
|
+
cache: "force-cache",
|
|
4084
|
+
mode: "cors",
|
|
4085
|
+
keepalive: !0,
|
|
4086
|
+
...t
|
|
4087
|
+
});
|
|
4088
|
+
if (!a.ok) throw new Error(`HTTP ${a.status} for ${e}`);
|
|
4089
|
+
return n.put(e, a.clone()), a;
|
|
4090
|
+
} catch (n) {
|
|
4091
|
+
return console.log("error while fetching", n), new Response(null, {
|
|
4092
|
+
status: 520,
|
|
4093
|
+
statusText: "Error in client - Fetch failed"
|
|
4094
|
+
});
|
|
4095
|
+
}
|
|
4089
4096
|
}
|
|
4090
4097
|
async function $s(e) {
|
|
4091
4098
|
const t = Ot.svg.get(e);
|