@liforma/client 0.3.0 → 0.4.0
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/CHANGELOG.md +17 -0
- package/README.md +14 -1
- package/dist/byo/audioCapture.d.ts +24 -0
- package/dist/byo/audioCapture.d.ts.map +1 -0
- package/dist/byo/index.d.ts +8 -0
- package/dist/byo/index.d.ts.map +1 -0
- package/dist/byo/index.js +307 -0
- package/dist/byo/index.js.map +1 -0
- package/dist/byo/mic.d.ts +27 -0
- package/dist/byo/mic.d.ts.map +1 -0
- package/dist/byo/pcm.d.ts +33 -0
- package/dist/byo/pcm.d.ts.map +1 -0
- package/dist/byo/pcmCarry.d.ts +17 -0
- package/dist/byo/pcmCarry.d.ts.map +1 -0
- package/dist/byo/resample.d.ts +18 -0
- package/dist/byo/resample.d.ts.map +1 -0
- package/dist/byo/turn.d.ts +39 -0
- package/dist/byo/turn.d.ts.map +1 -0
- package/dist/byo/types.d.ts +74 -0
- package/dist/byo/types.d.ts.map +1 -0
- package/dist/deepgram/connectDeepgramAgent.d.ts +51 -0
- package/dist/deepgram/connectDeepgramAgent.d.ts.map +1 -0
- package/dist/deepgram/deepgramAgentMessages.d.ts +31 -0
- package/dist/deepgram/deepgramAgentMessages.d.ts.map +1 -0
- package/dist/deepgram/index.d.ts +4 -0
- package/dist/deepgram/index.d.ts.map +1 -0
- package/dist/deepgram/index.js +142 -0
- package/dist/deepgram/index.js.map +1 -0
- package/dist/elevenlabs/connectElevenLabsAgent.d.ts +23 -0
- package/dist/elevenlabs/connectElevenLabsAgent.d.ts.map +1 -0
- package/dist/elevenlabs/index.d.ts +4 -0
- package/dist/elevenlabs/index.d.ts.map +1 -0
- package/dist/elevenlabs/index.js +89 -0
- package/dist/elevenlabs/index.js.map +1 -0
- package/dist/google/connectGeminiLive.d.ts +34 -0
- package/dist/google/connectGeminiLive.d.ts.map +1 -0
- package/dist/google/index.d.ts +4 -0
- package/dist/google/index.d.ts.map +1 -0
- package/dist/google/index.js +98 -0
- package/dist/google/index.js.map +1 -0
- package/dist/livekit/connectLiveKitAgent.d.ts +46 -0
- package/dist/livekit/connectLiveKitAgent.d.ts.map +1 -0
- package/dist/livekit/index.d.ts +3 -0
- package/dist/livekit/index.d.ts.map +1 -0
- package/dist/livekit/index.js +113 -0
- package/dist/livekit/index.js.map +1 -0
- package/dist/next/byo/audioCapture.d.ts +24 -0
- package/dist/next/byo/audioCapture.d.ts.map +1 -0
- package/dist/next/byo/pcm.d.ts +33 -0
- package/dist/next/byo/pcm.d.ts.map +1 -0
- package/dist/next/byo/resample.d.ts +18 -0
- package/dist/next/byo/resample.d.ts.map +1 -0
- package/dist/next/index.js +675 -474
- package/dist/next/index.js.map +1 -1
- package/dist/next/v2/embed/iframeHost.d.ts +16 -1
- package/dist/next/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/next/v2/embed/protocol.d.ts +41 -1
- package/dist/next/v2/embed/protocol.d.ts.map +1 -1
- package/dist/next/v2/experience.d.ts +14 -2
- package/dist/next/v2/experience.d.ts.map +1 -1
- package/dist/next/v2/speech/captureMediaStreamTrack.d.ts +1 -1
- package/dist/next/v2/speech/captureMediaStreamTrack.d.ts.map +1 -1
- package/dist/next/v2/speech/speechController.d.ts.map +1 -1
- package/dist/next/v2/speech/types.d.ts +13 -0
- package/dist/next/v2/speech/types.d.ts.map +1 -1
- package/dist/next/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/next/widget/styles.d.ts +1 -1
- package/dist/next/widget/styles.d.ts.map +1 -1
- package/dist/npm/byo/audioCapture.d.ts +24 -0
- package/dist/npm/byo/audioCapture.d.ts.map +1 -0
- package/dist/npm/byo/pcm.d.ts +33 -0
- package/dist/npm/byo/pcm.d.ts.map +1 -0
- package/dist/npm/byo/resample.d.ts +18 -0
- package/dist/npm/byo/resample.d.ts.map +1 -0
- package/dist/npm/index.js +700 -499
- package/dist/npm/index.js.map +1 -1
- package/dist/npm/v2/embed/iframeHost.d.ts +16 -1
- package/dist/npm/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/npm/v2/embed/protocol.d.ts +41 -1
- package/dist/npm/v2/embed/protocol.d.ts.map +1 -1
- package/dist/npm/v2/experience.d.ts +14 -2
- package/dist/npm/v2/experience.d.ts.map +1 -1
- package/dist/npm/v2/speech/captureMediaStreamTrack.d.ts +1 -1
- package/dist/npm/v2/speech/captureMediaStreamTrack.d.ts.map +1 -1
- package/dist/npm/v2/speech/speechController.d.ts.map +1 -1
- package/dist/npm/v2/speech/types.d.ts +13 -0
- package/dist/npm/v2/speech/types.d.ts.map +1 -1
- package/dist/npm/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/npm/widget/styles.d.ts +1 -1
- package/dist/npm/widget/styles.d.ts.map +1 -1
- package/dist/openai/connectOpenAiRealtime.d.ts +41 -0
- package/dist/openai/connectOpenAiRealtime.d.ts.map +1 -0
- package/dist/openai/connectOpenAiRealtimeWebRtc.d.ts +37 -0
- package/dist/openai/connectOpenAiRealtimeWebRtc.d.ts.map +1 -0
- package/dist/openai/index.d.ts +5 -0
- package/dist/openai/index.d.ts.map +1 -0
- package/dist/openai/index.js +282 -0
- package/dist/openai/index.js.map +1 -0
- package/dist/react/byo/audioCapture.d.ts +24 -0
- package/dist/react/byo/audioCapture.d.ts.map +1 -0
- package/dist/react/byo/pcm.d.ts +33 -0
- package/dist/react/byo/pcm.d.ts.map +1 -0
- package/dist/react/byo/resample.d.ts +18 -0
- package/dist/react/byo/resample.d.ts.map +1 -0
- package/dist/react/index.js +696 -495
- package/dist/react/index.js.map +1 -1
- package/dist/react/v2/embed/iframeHost.d.ts +16 -1
- package/dist/react/v2/embed/iframeHost.d.ts.map +1 -1
- package/dist/react/v2/embed/protocol.d.ts +41 -1
- package/dist/react/v2/embed/protocol.d.ts.map +1 -1
- package/dist/react/v2/experience.d.ts +14 -2
- package/dist/react/v2/experience.d.ts.map +1 -1
- package/dist/react/v2/speech/captureMediaStreamTrack.d.ts +1 -1
- package/dist/react/v2/speech/captureMediaStreamTrack.d.ts.map +1 -1
- package/dist/react/v2/speech/speechController.d.ts.map +1 -1
- package/dist/react/v2/speech/types.d.ts +13 -0
- package/dist/react/v2/speech/types.d.ts.map +1 -1
- package/dist/react/widget/mountExperienceWidget.d.ts.map +1 -1
- package/dist/react/widget/styles.d.ts +1 -1
- package/dist/react/widget/styles.d.ts.map +1 -1
- package/dist/sdk/v2/client.js +37 -10
- package/dist/sdk/v2/client.js.map +1 -1
- package/package.json +55 -7
package/dist/npm/index.js
CHANGED
|
@@ -135,7 +135,7 @@ function ne(e, t) {
|
|
|
135
135
|
let n = e.getBoundingClientRect();
|
|
136
136
|
return n.bottom >= -t && n.top <= window.innerHeight + t;
|
|
137
137
|
}
|
|
138
|
-
function
|
|
138
|
+
function re(e, t) {
|
|
139
139
|
let { onVisibleChange: n } = t, r = t.rootMargin ?? y(), i = b(r), a = !1, o = !1, s = null, c = () => {
|
|
140
140
|
o || (s?.(), s = v(() => {
|
|
141
141
|
s = null, o = !0, n(!0);
|
|
@@ -163,7 +163,7 @@ function x(e, t) {
|
|
|
163
163
|
s?.(), s = null, u.disconnect();
|
|
164
164
|
};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function ie(e, t) {
|
|
167
167
|
let n = () => t();
|
|
168
168
|
return e.complete ? queueMicrotask(n) : (e.addEventListener("load", n, { once: !0 }), e.addEventListener("error", n, { once: !0 })), () => {
|
|
169
169
|
e.removeEventListener("load", n), e.removeEventListener("error", n);
|
|
@@ -171,49 +171,49 @@ function re(e, t) {
|
|
|
171
171
|
}
|
|
172
172
|
//#endregion
|
|
173
173
|
//#region src/thumbnail/scrollParallax.ts
|
|
174
|
-
function
|
|
174
|
+
function x() {
|
|
175
175
|
return typeof window > "u" || window.matchMedia("(prefers-reduced-motion: reduce)").matches ? !1 : window.matchMedia("(hover: none), (pointer: coarse)").matches;
|
|
176
176
|
}
|
|
177
|
-
function
|
|
177
|
+
function S(e, t) {
|
|
178
178
|
return ((e.top + e.height / 2) / Math.max(t, 1) - .5) * 2;
|
|
179
179
|
}
|
|
180
|
-
var
|
|
181
|
-
function
|
|
182
|
-
if (
|
|
180
|
+
var C = /* @__PURE__ */ new Set(), ae = !1, w = 0;
|
|
181
|
+
function oe() {
|
|
182
|
+
if (w = 0, C.size === 0 || typeof window > "u") return;
|
|
183
183
|
let e = window.innerHeight;
|
|
184
|
-
for (let t of
|
|
184
|
+
for (let t of C) {
|
|
185
185
|
if (t.pointerActive?.()) continue;
|
|
186
186
|
let n = t.element.getBoundingClientRect();
|
|
187
|
-
n.bottom < -64 || n.top > e + 64 || t.onParallax(
|
|
187
|
+
n.bottom < -64 || n.top > e + 64 || t.onParallax(S(n, e));
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
function
|
|
191
|
-
|
|
192
|
-
}
|
|
193
|
-
function oe() {
|
|
194
|
-
ie || typeof window > "u" || (ie = !0, window.addEventListener("scroll", E, { passive: !0 }), window.addEventListener("resize", E, { passive: !0 }));
|
|
190
|
+
function T() {
|
|
191
|
+
w === 0 && (w = requestAnimationFrame(oe));
|
|
195
192
|
}
|
|
196
193
|
function se() {
|
|
197
|
-
|
|
194
|
+
ae || typeof window > "u" || (ae = !0, window.addEventListener("scroll", T, { passive: !0 }), window.addEventListener("resize", T, { passive: !0 }));
|
|
195
|
+
}
|
|
196
|
+
function ce() {
|
|
197
|
+
C.size > 0 || !ae || typeof window > "u" || (ae = !1, w !== 0 && (cancelAnimationFrame(w), w = 0), window.removeEventListener("scroll", T), window.removeEventListener("resize", T));
|
|
198
198
|
}
|
|
199
|
-
function
|
|
200
|
-
if (!
|
|
199
|
+
function E(e, t) {
|
|
200
|
+
if (!x()) return () => {};
|
|
201
201
|
let n = {
|
|
202
202
|
element: e,
|
|
203
203
|
onParallax: t.onParallax,
|
|
204
204
|
pointerActive: t.pointerActive
|
|
205
205
|
};
|
|
206
|
-
return
|
|
207
|
-
|
|
206
|
+
return C.add(n), se(), n.pointerActive?.() || t.onParallax(S(e.getBoundingClientRect(), window.innerHeight)), () => {
|
|
207
|
+
C.delete(n), ce();
|
|
208
208
|
};
|
|
209
209
|
}
|
|
210
210
|
//#endregion
|
|
211
211
|
//#region src/thumbnail/attachThumbnailParallax.ts
|
|
212
|
-
function
|
|
212
|
+
function D(e) {
|
|
213
213
|
let t = 0, n = 0, r = !1, i = !1, a = !1, o = () => {
|
|
214
214
|
let a = r || i;
|
|
215
215
|
e.classList.toggle("liforma-et--parallax", a), e.classList.toggle("liforma-et--scroll-parallax", i), e.style.setProperty("--liforma-et-parallax-x", String(t)), e.style.setProperty("--liforma-et-parallax-y", String(n));
|
|
216
|
-
}, s =
|
|
216
|
+
}, s = E(e, {
|
|
217
217
|
onParallax: (e) => {
|
|
218
218
|
i = !0, a || (t = e, n = 0, o());
|
|
219
219
|
},
|
|
@@ -226,7 +226,7 @@ function le(e) {
|
|
|
226
226
|
a = !0, e.pointerType === "mouse" && (r = !0), o();
|
|
227
227
|
}, u = () => {
|
|
228
228
|
let s = a;
|
|
229
|
-
a = !1, r = !1, i && s ? (t =
|
|
229
|
+
a = !1, r = !1, i && s ? (t = S(e.getBoundingClientRect(), window.innerHeight), n = 0) : i || (t = 0, n = 0), o();
|
|
230
230
|
}, d = (e) => {
|
|
231
231
|
e.pointerType === "mouse" && (r = !0, o());
|
|
232
232
|
}, f = () => {
|
|
@@ -238,45 +238,45 @@ function le(e) {
|
|
|
238
238
|
}
|
|
239
239
|
//#endregion
|
|
240
240
|
//#region src/thumbnail/styles.ts
|
|
241
|
-
var
|
|
242
|
-
function
|
|
243
|
-
if (typeof document > "u" ||
|
|
241
|
+
var le = ".liforma-et {\n --liforma-et-parallax-x: 0;\n --liforma-et-parallax-y: 0;\n --liforma-et-bg-scale: 1;\n --liforma-et-fg-scale: 1;\n --liforma-et-avatar-scale: 1;\n --liforma-et-bg-shift: 0px;\n --liforma-et-fg-shift: 0px;\n --liforma-et-avatar-shift: 0px;\n --liforma-et-reveal-duration: 420ms;\n\n box-sizing: border-box;\n position: relative;\n display: block;\n width: 100%;\n height: 100%;\n min-height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 0.65rem;\n overflow: hidden;\n background: #111;\n color: inherit;\n text-decoration: none;\n cursor: inherit;\n -webkit-tap-highlight-color: transparent;\n}\n\na.liforma-et,\nbutton.liforma-et {\n cursor: pointer;\n}\n\nbutton.liforma-et {\n font: inherit;\n appearance: none;\n}\n\n.liforma-et__placeholder {\n position: absolute;\n inset: 0;\n z-index: 0;\n background:\n radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, 0.06), transparent 58%),\n linear-gradient(180deg, #1a1a1a 0%, #101010 100%);\n opacity: 1;\n transition: opacity var(--liforma-et-reveal-duration) ease;\n}\n\n.liforma-et--revealed .liforma-et__placeholder {\n opacity: 0;\n}\n\n.liforma-et__media {\n opacity: 0;\n transition: opacity var(--liforma-et-reveal-duration) ease;\n}\n\n.liforma-et__media--ready {\n opacity: 1;\n}\n\n.liforma-et__background {\n position: absolute;\n inset: 0;\n z-index: 1;\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center center;\n transform: translate(\n calc(var(--liforma-et-parallax-x) * var(--liforma-et-bg-shift)),\n calc(var(--liforma-et-parallax-y) * var(--liforma-et-bg-shift))\n )\n scale(var(--liforma-et-bg-scale));\n transform-origin: center center;\n transition:\n opacity var(--liforma-et-reveal-duration) ease,\n transform 160ms ease;\n}\n\n.liforma-et__avatar {\n position: relative;\n z-index: 2;\n display: block;\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: 50% 30%;\n transform: scale(var(--liforma-et-avatar-scale))\n translate(\n calc(var(--liforma-et-parallax-x) * var(--liforma-et-avatar-shift)),\n calc(var(--liforma-et-parallax-y) * var(--liforma-et-avatar-shift))\n );\n transform-origin: center center;\n transition:\n opacity var(--liforma-et-reveal-duration) ease,\n transform 160ms ease;\n}\n\n.liforma-et--scene .liforma-et__avatar {\n object-fit: contain;\n object-position: center bottom;\n}\n\n.liforma-et__foreground {\n position: absolute;\n inset: 0;\n z-index: 3;\n width: 100%;\n height: 100%;\n object-fit: cover;\n object-position: center center;\n pointer-events: none;\n transform: translate(\n calc(var(--liforma-et-parallax-x) * var(--liforma-et-fg-shift) * -1),\n calc(var(--liforma-et-parallax-y) * var(--liforma-et-fg-shift) * -1)\n )\n scale(var(--liforma-et-fg-scale));\n transform-origin: center center;\n transition:\n opacity var(--liforma-et-reveal-duration) ease,\n transform 160ms ease;\n}\n\n.liforma-et--parallax {\n --liforma-et-bg-scale: 1.08;\n --liforma-et-fg-scale: 1.05;\n --liforma-et-avatar-scale: 1.08;\n --liforma-et-bg-shift: 10px;\n --liforma-et-fg-shift: 4px;\n --liforma-et-avatar-shift: 4px;\n}\n\n/* Promote layers only while parallax is active — avoids N compositor surfaces on galleries. */\n.liforma-et--parallax .liforma-et__background,\n.liforma-et--parallax .liforma-et__foreground,\n.liforma-et--parallax .liforma-et__avatar {\n will-change: transform;\n}\n\n.liforma-et--parallax:not(.liforma-et--scene) {\n --liforma-et-avatar-scale: 1.05;\n --liforma-et-avatar-shift: 0px;\n}\n\n.liforma-et--scroll-parallax .liforma-et__background,\n.liforma-et--scroll-parallax .liforma-et__foreground,\n.liforma-et--scroll-parallax .liforma-et__avatar {\n transition: opacity var(--liforma-et-reveal-duration) ease;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .liforma-et {\n --liforma-et-reveal-duration: 0ms;\n }\n\n .liforma-et--parallax {\n --liforma-et-bg-scale: 1;\n --liforma-et-fg-scale: 1;\n --liforma-et-avatar-scale: 1;\n --liforma-et-bg-shift: 0px;\n --liforma-et-fg-shift: 0px;\n --liforma-et-avatar-shift: 0px;\n }\n\n .liforma-et__background,\n .liforma-et__foreground,\n .liforma-et__avatar {\n transition: none;\n }\n}", ue = !1;
|
|
242
|
+
function O(e) {
|
|
243
|
+
if (typeof document > "u" || ue) return;
|
|
244
244
|
if (document.querySelector("style[data-liforma-et]")) {
|
|
245
|
-
|
|
245
|
+
ue = !0;
|
|
246
246
|
return;
|
|
247
247
|
}
|
|
248
248
|
let t = document.createElement("style");
|
|
249
|
-
t.setAttribute("data-liforma-et", ""), t.textContent = e, document.head.appendChild(t),
|
|
249
|
+
t.setAttribute("data-liforma-et", ""), t.textContent = e, document.head.appendChild(t), ue = !0;
|
|
250
250
|
}
|
|
251
251
|
//#endregion
|
|
252
252
|
//#region src/widget/styles.ts
|
|
253
|
-
var pe = "\n.liforma-ew {\n box-sizing: border-box;\n position: relative;\n display: block;\n width: 100%;\n height: 100%;\n min-height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n/* Optional self-positioned FAB (position=bottom-right|bottom-left).\n * Cap at 50vmin so small phones don't get an oversized thumb (desktop 224px stays). */\n.liforma-ew[data-position='bottom-right'],\n.liforma-ew[data-position='bottom-left'] {\n position: fixed;\n width: min(var(--liforma-ew-fab-size, 224px), 50vmin);\n height: min(var(--liforma-ew-fab-size, 224px), 50vmin);\n bottom: var(--liforma-ew-offset, 16px);\n z-index: 2147482900;\n}\n\n.liforma-ew[data-position='bottom-right'] {\n right: var(--liforma-ew-offset, 16px);\n left: auto;\n}\n\n.liforma-ew[data-position='bottom-left'] {\n left: var(--liforma-ew-offset, 16px);\n right: auto;\n}\n\n/* While open, collapse the FAB box so a corner hole / thumb never remains. */\n.liforma-ew[data-position='bottom-right'][data-state='expanded'],\n.liforma-ew[data-position='bottom-right'][data-state='docked'],\n.liforma-ew[data-position='bottom-left'][data-state='expanded'],\n.liforma-ew[data-position='bottom-left'][data-state='docked'] {\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n overflow: visible;\n pointer-events: none;\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__warm,\n.liforma-ew[data-state='docked'] .liforma-ew__warm,\n.liforma-ew[data-state='expanded'] .liforma-ew__overlay,\n.liforma-ew[data-state='expanded'] .liforma-ew__toolbar,\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar {\n pointer-events: auto;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__overlay {\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__panel {\n pointer-events: auto;\n}\n\n.liforma-ew__hit {\n box-sizing: border-box;\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n font: inherit;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n transform: scale(1);\n transform-origin: center center;\n transition:\n transform 180ms ease,\n filter 180ms ease;\n will-change: transform;\n}\n\n/* Author display must not defeat the HTML hidden attribute. */\n.liforma-ew__hit[hidden] {\n display: none !important;\n}\n\n.liforma-ew__hit:focus-visible {\n outline: 2px solid #5b8def;\n outline-offset: 3px;\n border-radius: 0.75rem;\n}\n\n@media (hover: hover) and (pointer: fine) {\n /* Scale the thumb whenever the collapsed FAB is hovered — including via the warm iframe hit layer. */\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-ew__hit {\n transform: scale(1.06);\n }\n\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover .liforma-et,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-et {\n box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);\n }\n}\n\n.liforma-ew__face {\n width: 100%;\n height: 100%;\n min-height: 0;\n position: relative;\n}\n\n.liforma-ew__face-status {\n position: absolute;\n inset: 0;\n z-index: 1;\n display: grid;\n place-items: center;\n padding: 0.5rem;\n text-align: center;\n font: 600 0.75rem/1.3 system-ui, sans-serif;\n color: #e8ecf4;\n background: rgba(10, 12, 18, 0.72);\n border-radius: 0.75rem;\n pointer-events: none;\n}\n\n.liforma-ew__face-status[hidden] {\n display: none !important;\n}\n\n.liforma-ew__hit:disabled {\n cursor: default;\n opacity: 0.85;\n}\n\n.liforma-ew__face .liforma-et {\n border-radius: 0.75rem;\n box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);\n transition: box-shadow 180ms ease;\n}\n\n.liforma-ew__warm {\n box-sizing: border-box;\n position: absolute;\n inset: 0;\n z-index: 2;\n border-radius: 0.75rem;\n overflow: hidden;\n background: transparent;\n pointer-events: none;\n opacity: 1;\n transition: opacity 1000ms ease;\n}\n\n/*\n * Collapsed: keep the warm iframe as an invisible hit target only.\n * Painting it over the thumb causes a “ghost enlarge” (face scales under a static iframe).\n */\n.liforma-ew[data-state='collapsed'] .liforma-ew__warm {\n opacity: 0;\n transition: none;\n}\n\n.liforma-ew[data-warm='true'] .liforma-ew__warm {\n pointer-events: auto;\n}\n\n.liforma-ew[data-warm='true']:not([data-live='true']) .liforma-ew__hit {\n pointer-events: none;\n}\n\n.liforma-ew[data-live='true'][data-state='collapsed'] .liforma-ew__hit {\n pointer-events: auto;\n}\n\n.liforma-ew[data-live='true'] .liforma-ew__warm,\n.liforma-ew[data-live='true'] .liforma-ew__stage {\n /* Hidden under the thumb / until post-resize fade-in (matches cold avatar reveal). */\n opacity: 0;\n}\n\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='expanded'] .liforma-ew__warm,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='expanded'] .liforma-ew__stage,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='docked'] .liforma-ew__warm,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='docked'] .liforma-ew__stage {\n opacity: 1;\n}\n\n.liforma-ew--session-concealing .liforma-ew__warm,\n.liforma-ew--session-concealing .liforma-ew__stage {\n transition-duration: 280ms;\n}\n\n/* Instant hide while dock/maximize geometry settles (player morph resize ~160ms). */\n.liforma-ew--layout-settling .liforma-ew__warm,\n.liforma-ew--layout-settling .liforma-ew__stage {\n opacity: 0 !important;\n transition: none !important;\n}\n\n.liforma-ew[data-live='true'][data-state='collapsed'] .liforma-ew__warm {\n /* Keep the live iframe under the thumb; FAB click resumes the shell. */\n pointer-events: none;\n opacity: 0;\n /* Instant hide when collapsed so the FAB never shows a resized live mesh. */\n transition: none;\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__warm {\n position: fixed;\n /* Match overlay panel inset so the warm iframe fills the conversation shell. */\n inset: clamp(12px, 3vw, 28px);\n z-index: 2147483001;\n width: auto;\n height: auto;\n border-radius: 16px;\n pointer-events: auto;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__warm {\n position: fixed;\n inset: auto;\n z-index: 2147483001;\n border-radius: 16px;\n pointer-events: auto;\n /* left/top/width/height set inline from dock geometry */\n}\n\n.liforma-ew__toolbar {\n display: none;\n position: fixed;\n z-index: 2147483002;\n pointer-events: auto;\n box-sizing: border-box;\n align-items: center;\n gap: 0.35rem;\n padding: 0.35rem 0.4rem;\n border-radius: 999px;\n background: rgba(12, 14, 20, 0.72);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__toolbar {\n display: flex;\n top: calc(clamp(12px, 3vw, 28px) + 10px);\n right: calc(clamp(12px, 3vw, 28px) + 10px);\n left: auto;\n cursor: default;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar {\n display: flex;\n /* left/top set inline to track the panel; strip is the drag handle */\n cursor: grab;\n touch-action: none;\n user-select: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar.liforma-ew__toolbar--dragging {\n cursor: grabbing;\n}\n\n.liforma-ew__toolbar[hidden] {\n display: none !important;\n}\n\n.liforma-ew__icon-btn {\n appearance: none;\n box-sizing: border-box;\n display: inline-grid;\n place-items: center;\n width: 2rem;\n height: 2rem;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 999px;\n color: #f5f7fb;\n background: transparent;\n cursor: pointer;\n}\n\n.liforma-ew__icon-btn:hover {\n background: rgba(255, 255, 255, 0.12);\n}\n\n.liforma-ew__icon-btn[aria-pressed='true'] {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.liforma-ew__icon-btn:focus-visible {\n outline: 2px solid #5b8def;\n outline-offset: 2px;\n}\n\n.liforma-ew__icon-btn svg {\n width: 1.05rem;\n height: 1.05rem;\n display: block;\n}\n\n.liforma-ew__drag-grip {\n display: none;\n width: 0.85rem;\n height: 1.25rem;\n margin: 0 0.15rem 0 0.25rem;\n background:\n radial-gradient(circle, currentColor 1.1px, transparent 1.2px) 0 0 / 0.35rem 0.35rem,\n radial-gradient(circle, currentColor 1.1px, transparent 1.2px) 0.35rem 0 / 0.35rem 0.35rem;\n background-repeat: repeat-y;\n opacity: 0.55;\n color: #f5f7fb;\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__drag-grip {\n display: block;\n}\n\n.liforma-ew__dock-toggle[hidden] {\n display: none !important;\n}\n\n.liforma-ew__overlay {\n position: fixed;\n inset: 0;\n z-index: 2147483000;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: clamp(12px, 3vw, 28px);\n box-sizing: border-box;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__overlay {\n padding: 0;\n align-items: stretch;\n justify-content: stretch;\n pointer-events: none;\n background: transparent;\n}\n\n.liforma-ew__overlay[hidden] {\n display: none !important;\n}\n\n.liforma-ew__backdrop {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n margin: 0;\n background: rgba(6, 8, 14, 0.62);\n cursor: pointer;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__backdrop {\n display: none !important;\n}\n\n.liforma-ew__panel {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n /* Fill the overlay so player loading / start UI centers in the visible window. */\n width: var(--liforma-ew-max-w, 100%);\n height: var(--liforma-ew-max-h, 100%);\n max-width: 100%;\n max-height: 100%;\n border-radius: 16px;\n overflow: hidden;\n background: #030508;\n box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);\n /* Warm iframe sits above as a sibling; keep panel as chrome shell. */\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__panel {\n position: fixed;\n inset: auto;\n max-width: none;\n max-height: none;\n pointer-events: auto;\n /* left/top/width/height set inline from dock geometry */\n}\n\n.liforma-ew:not([data-warm='true']) .liforma-ew__panel {\n pointer-events: auto;\n}\n\n.liforma-ew__stage {\n position: relative;\n flex: 1;\n min-height: 0;\n width: 100%;\n height: 100%;\n background: #030508;\n opacity: 1;\n transition: opacity 1000ms ease;\n}\n\n.liforma-ew__status {\n position: absolute;\n inset: 0;\n z-index: 1;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n text-align: center;\n color: #d7dde8;\n font: 500 0.9375rem/1.45 system-ui, sans-serif;\n background: rgba(3, 5, 8, 0.92);\n pointer-events: none;\n}\n\n.liforma-ew__status[hidden] {\n display: none !important;\n}\n\n/* Mobile expanded: ~90% viewport, no reduce control. */\n@media (max-width: 767px) {\n .liforma-ew[data-state='expanded'] .liforma-ew__overlay {\n padding: 5vh 5vw;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__panel {\n width: 90vw;\n height: 90vh;\n max-width: 90vw;\n max-height: 90vh;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__warm {\n inset: 5vh 5vw;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__toolbar {\n top: calc(5vh + 10px);\n right: calc(5vw + 10px);\n }\n\n .liforma-ew__dock-toggle {\n display: none !important;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .liforma-ew__hit {\n transition: none;\n will-change: auto;\n }\n\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-ew__hit {\n transform: none;\n }\n\n .liforma-ew__face .liforma-et {\n box-shadow: none;\n transition: none;\n }\n\n .liforma-ew__warm,\n .liforma-ew__stage {\n transition: none;\n }\n}\n", me = "liforma-experience-widget-styles";
|
|
254
|
-
function
|
|
253
|
+
var de = "\n.liforma-ew {\n box-sizing: border-box;\n position: relative;\n display: block;\n width: 100%;\n height: 100%;\n min-height: 0;\n margin: 0;\n padding: 0;\n border: 0;\n}\n\n/* Optional self-positioned FAB (position=bottom-right|bottom-left).\n * Cap at 50vmin so small phones don't get an oversized thumb (desktop 224px stays). */\n.liforma-ew[data-position='bottom-right'],\n.liforma-ew[data-position='bottom-left'] {\n position: fixed;\n width: min(var(--liforma-ew-fab-size, 224px), 50vmin);\n height: min(var(--liforma-ew-fab-size, 224px), 50vmin);\n bottom: var(--liforma-ew-offset, 16px);\n z-index: 2147482900;\n}\n\n.liforma-ew[data-position='bottom-right'] {\n right: var(--liforma-ew-offset, 16px);\n left: auto;\n}\n\n.liforma-ew[data-position='bottom-left'] {\n left: var(--liforma-ew-offset, 16px);\n right: auto;\n}\n\n/* While open, collapse the FAB box so a corner hole / thumb never remains. */\n.liforma-ew[data-position='bottom-right'][data-state='expanded'],\n.liforma-ew[data-position='bottom-right'][data-state='docked'],\n.liforma-ew[data-position='bottom-left'][data-state='expanded'],\n.liforma-ew[data-position='bottom-left'][data-state='docked'] {\n width: 0;\n height: 0;\n min-width: 0;\n min-height: 0;\n overflow: visible;\n pointer-events: none;\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__warm,\n.liforma-ew[data-state='docked'] .liforma-ew__warm,\n.liforma-ew[data-state='expanded'] .liforma-ew__overlay,\n.liforma-ew[data-state='expanded'] .liforma-ew__toolbar,\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar {\n pointer-events: auto;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__overlay {\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__panel {\n pointer-events: auto;\n}\n\n.liforma-ew__hit {\n box-sizing: border-box;\n display: block;\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n border: 0;\n background: transparent;\n cursor: pointer;\n font: inherit;\n appearance: none;\n -webkit-tap-highlight-color: transparent;\n transform: scale(1);\n transform-origin: center center;\n transition:\n transform 180ms ease,\n filter 180ms ease;\n will-change: transform;\n}\n\n/* Author display must not defeat the HTML hidden attribute. */\n.liforma-ew__hit[hidden] {\n display: none !important;\n}\n\n.liforma-ew__hit:focus-visible {\n outline: 2px solid #5b8def;\n outline-offset: 3px;\n border-radius: 0.75rem;\n}\n\n@media (hover: hover) and (pointer: fine) {\n /* Scale the thumb whenever the collapsed FAB is hovered — including via the warm iframe hit layer. */\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-ew__hit {\n transform: scale(1.06);\n }\n\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover .liforma-et,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-et {\n box-shadow: 0 12px 36px rgba(0, 0, 0, 0.34);\n }\n}\n\n.liforma-ew__face {\n width: 100%;\n height: 100%;\n min-height: 0;\n position: relative;\n}\n\n.liforma-ew__face-status {\n position: absolute;\n inset: 0;\n z-index: 1;\n display: grid;\n place-items: center;\n padding: 0.5rem;\n text-align: center;\n font: 600 0.75rem/1.3 system-ui, sans-serif;\n color: #e8ecf4;\n background: rgba(10, 12, 18, 0.72);\n border-radius: 0.75rem;\n pointer-events: none;\n}\n\n.liforma-ew__face-status[hidden] {\n display: none !important;\n}\n\n.liforma-ew__hit:disabled {\n cursor: default;\n opacity: 0.85;\n}\n\n.liforma-ew__face .liforma-et {\n border-radius: 0.75rem;\n box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);\n transition: box-shadow 180ms ease;\n}\n\n.liforma-ew__warm {\n box-sizing: border-box;\n position: absolute;\n inset: 0;\n z-index: 2;\n border-radius: 0.75rem;\n overflow: hidden;\n background: transparent;\n pointer-events: none;\n opacity: 1;\n transition: opacity 1000ms ease;\n}\n\n/*\n * Collapsed: keep the warm iframe as an invisible hit target only.\n * Painting it over the thumb causes a “ghost enlarge” (face scales under a static iframe).\n */\n.liforma-ew[data-state='collapsed'] .liforma-ew__warm {\n opacity: 0;\n transition: none;\n}\n\n.liforma-ew[data-warm='true'] .liforma-ew__warm {\n pointer-events: auto;\n}\n\n.liforma-ew[data-warm='true']:not([data-live='true']) .liforma-ew__hit {\n pointer-events: none;\n}\n\n.liforma-ew[data-live='true'][data-state='collapsed'] .liforma-ew__hit {\n pointer-events: auto;\n}\n\n.liforma-ew[data-live='true'] .liforma-ew__warm,\n.liforma-ew[data-live='true'] .liforma-ew__stage {\n /* Hidden under the thumb / until post-resize fade-in (matches cold avatar reveal). */\n opacity: 0;\n}\n\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='expanded'] .liforma-ew__warm,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='expanded'] .liforma-ew__stage,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='docked'] .liforma-ew__warm,\n.liforma-ew[data-live='true'].liforma-ew--session-revealed[data-state='docked'] .liforma-ew__stage {\n opacity: 1;\n}\n\n.liforma-ew--session-concealing .liforma-ew__warm,\n.liforma-ew--session-concealing .liforma-ew__stage {\n transition-duration: 280ms;\n}\n\n/* Instant hide while dock/maximize geometry settles (player morph resize ~160ms). */\n.liforma-ew--layout-settling .liforma-ew__warm,\n.liforma-ew--layout-settling .liforma-ew__stage {\n opacity: 0 !important;\n transition: none !important;\n}\n\n.liforma-ew[data-live='true'][data-state='collapsed'] .liforma-ew__warm {\n /* Keep the live iframe under the thumb; FAB click resumes the shell. */\n pointer-events: none;\n opacity: 0;\n /* Instant hide when collapsed so the FAB never shows a resized live mesh. */\n transition: none;\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__warm {\n position: fixed;\n /* Match overlay panel inset so the warm iframe fills the conversation shell. */\n inset: clamp(12px, 3vw, 28px);\n z-index: 2147483001;\n width: auto;\n height: auto;\n border-radius: 16px;\n pointer-events: auto;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__warm {\n position: fixed;\n inset: auto;\n z-index: 2147483001;\n border-radius: 16px;\n pointer-events: auto;\n /* left/top/width/height set inline from dock geometry */\n}\n\n.liforma-ew__toolbar {\n display: none;\n position: fixed;\n z-index: 2147483002;\n pointer-events: auto;\n box-sizing: border-box;\n align-items: center;\n gap: 0.35rem;\n padding: 0.35rem 0.4rem;\n border-radius: 999px;\n background: rgba(12, 14, 20, 0.72);\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);\n}\n\n.liforma-ew[data-state='expanded'] .liforma-ew__toolbar {\n display: flex;\n top: calc(clamp(12px, 3vw, 28px) + 10px);\n right: calc(clamp(12px, 3vw, 28px) + 10px);\n left: auto;\n cursor: default;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar {\n display: flex;\n /* left/top set inline to track the panel; strip remains a drag handle */\n cursor: grab;\n touch-action: none;\n user-select: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__panel,\n.liforma-ew[data-state='docked'] .liforma-ew__warm,\n.liforma-ew[data-state='docked'] .liforma-ew__stage {\n /* Player also reports surface drags via postMessage when docked. */\n cursor: grab;\n touch-action: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__toolbar.liforma-ew__toolbar--dragging,\n.liforma-ew--dock-dragging,\n.liforma-ew--dock-dragging .liforma-ew__toolbar,\n.liforma-ew--dock-dragging .liforma-ew__panel,\n.liforma-ew--dock-dragging .liforma-ew__warm,\n.liforma-ew--dock-dragging .liforma-ew__stage {\n cursor: grabbing;\n}\n\n\n.liforma-ew__toolbar[hidden] {\n display: none !important;\n}\n\n.liforma-ew__icon-btn {\n appearance: none;\n box-sizing: border-box;\n display: inline-grid;\n place-items: center;\n width: 2rem;\n height: 2rem;\n margin: 0;\n padding: 0;\n border: 0;\n border-radius: 999px;\n color: #f5f7fb;\n background: transparent;\n cursor: pointer;\n}\n\n.liforma-ew__icon-btn:hover {\n background: rgba(255, 255, 255, 0.12);\n}\n\n.liforma-ew__icon-btn[aria-pressed='true'] {\n background: rgba(255, 255, 255, 0.2);\n}\n\n.liforma-ew__icon-btn:focus-visible {\n outline: 2px solid #5b8def;\n outline-offset: 2px;\n}\n\n.liforma-ew__icon-btn svg {\n width: 1.05rem;\n height: 1.05rem;\n display: block;\n}\n\n.liforma-ew__drag-grip {\n display: none;\n width: 0.85rem;\n height: 1.25rem;\n margin: 0 0.15rem 0 0.25rem;\n background:\n radial-gradient(circle, currentColor 1.1px, transparent 1.2px) 0 0 / 0.35rem 0.35rem,\n radial-gradient(circle, currentColor 1.1px, transparent 1.2px) 0.35rem 0 / 0.35rem 0.35rem;\n background-repeat: repeat-y;\n opacity: 0.55;\n color: #f5f7fb;\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__drag-grip {\n display: block;\n}\n\n.liforma-ew__dock-toggle[hidden] {\n display: none !important;\n}\n\n.liforma-ew__overlay {\n position: fixed;\n inset: 0;\n z-index: 2147483000;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: clamp(12px, 3vw, 28px);\n box-sizing: border-box;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__overlay {\n padding: 0;\n align-items: stretch;\n justify-content: stretch;\n pointer-events: none;\n background: transparent;\n}\n\n.liforma-ew__overlay[hidden] {\n display: none !important;\n}\n\n.liforma-ew__backdrop {\n position: absolute;\n inset: 0;\n border: 0;\n padding: 0;\n margin: 0;\n background: rgba(6, 8, 14, 0.62);\n cursor: pointer;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__backdrop {\n display: none !important;\n}\n\n.liforma-ew__panel {\n position: relative;\n z-index: 1;\n display: flex;\n flex-direction: column;\n /* Fill the overlay so player loading / start UI centers in the visible window. */\n width: var(--liforma-ew-max-w, 100%);\n height: var(--liforma-ew-max-h, 100%);\n max-width: 100%;\n max-height: 100%;\n border-radius: 16px;\n overflow: hidden;\n background: #030508;\n box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);\n /* Warm iframe sits above as a sibling; keep panel as chrome shell. */\n pointer-events: none;\n}\n\n.liforma-ew[data-state='docked'] .liforma-ew__panel {\n position: fixed;\n inset: auto;\n max-width: none;\n max-height: none;\n pointer-events: auto;\n /* left/top/width/height set inline from dock geometry */\n}\n\n.liforma-ew:not([data-warm='true']) .liforma-ew__panel {\n pointer-events: auto;\n}\n\n.liforma-ew__stage {\n position: relative;\n flex: 1;\n min-height: 0;\n width: 100%;\n height: 100%;\n background: #030508;\n opacity: 1;\n transition: opacity 1000ms ease;\n}\n\n.liforma-ew__status {\n position: absolute;\n inset: 0;\n z-index: 1;\n display: grid;\n place-items: center;\n padding: 1.5rem;\n text-align: center;\n color: #d7dde8;\n font: 500 0.9375rem/1.45 system-ui, sans-serif;\n background: rgba(3, 5, 8, 0.92);\n pointer-events: none;\n}\n\n.liforma-ew__status[hidden] {\n display: none !important;\n}\n\n/* Mobile expanded: ~90% viewport, no reduce control. */\n@media (max-width: 767px) {\n .liforma-ew[data-state='expanded'] .liforma-ew__overlay {\n padding: 5vh 5vw;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__panel {\n width: 90vw;\n height: 90vh;\n max-width: 90vw;\n max-height: 90vh;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__warm {\n inset: 5vh 5vw;\n }\n\n .liforma-ew[data-state='expanded'] .liforma-ew__toolbar {\n top: calc(5vh + 10px);\n right: calc(5vw + 10px);\n }\n\n .liforma-ew__dock-toggle {\n display: none !important;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .liforma-ew__hit {\n transition: none;\n will-change: auto;\n }\n\n .liforma-ew[data-state='collapsed'] .liforma-ew__hit:not(:disabled):hover,\n .liforma-ew[data-state='collapsed']:has(.liforma-ew__warm:hover) .liforma-ew__hit {\n transform: none;\n }\n\n .liforma-ew__face .liforma-et {\n box-shadow: none;\n transition: none;\n }\n\n .liforma-ew__warm,\n .liforma-ew__stage {\n transition: none;\n }\n}\n", fe = "liforma-experience-widget-styles";
|
|
254
|
+
function pe(e = de) {
|
|
255
255
|
if (typeof document > "u") return;
|
|
256
|
-
let t = document.getElementById(
|
|
256
|
+
let t = document.getElementById(fe);
|
|
257
257
|
if (t) {
|
|
258
258
|
t.textContent = e;
|
|
259
259
|
return;
|
|
260
260
|
}
|
|
261
261
|
let n = document.createElement("style");
|
|
262
|
-
n.id =
|
|
262
|
+
n.id = fe, n.textContent = e, document.head.append(n);
|
|
263
263
|
}
|
|
264
264
|
//#endregion
|
|
265
265
|
//#region src/shims/apiBaseUrl.ts
|
|
266
|
-
var
|
|
267
|
-
function
|
|
266
|
+
var me = "https://api.liforma.ai", he = "http://localhost:3001";
|
|
267
|
+
function k() {
|
|
268
268
|
let e = globalThis.__LIFORMA_API_BASE_URL;
|
|
269
269
|
if (e?.trim()) return e.trim().replace(/\/$/, "");
|
|
270
270
|
if (typeof document > "u") return null;
|
|
271
271
|
let t = (document.querySelector("script[data-liforma-sdk][src*=\"client.js\"]") ?? document.querySelector("script[src*=\"/sdk/v2/client.js\"]"))?.getAttribute("data-api-base-url")?.trim();
|
|
272
272
|
return t ? t.replace(/\/$/, "") : null;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return
|
|
274
|
+
function ge() {
|
|
275
|
+
return k() || (s() ? he : me);
|
|
276
276
|
}
|
|
277
277
|
//#endregion
|
|
278
278
|
//#region src/v2/api/fetchExperiencePreview.ts
|
|
279
|
-
function
|
|
279
|
+
function _e(e) {
|
|
280
280
|
if (!e || typeof e != "object") return null;
|
|
281
281
|
let t = e, n = typeof t.avatarImage == "string" ? t.avatarImage.trim() : "";
|
|
282
282
|
return n ? {
|
|
@@ -285,10 +285,10 @@ function ye(e) {
|
|
|
285
285
|
...typeof t.foregroundImage == "string" && t.foregroundImage.trim() ? { foregroundImage: t.foregroundImage.trim() } : {}
|
|
286
286
|
} : null;
|
|
287
287
|
}
|
|
288
|
-
async function
|
|
288
|
+
async function ve(e, t) {
|
|
289
289
|
let n = e.trim();
|
|
290
290
|
if (!n) throw Error("Experience preview requires experienceId.");
|
|
291
|
-
let r = (t?.apiBaseUrl ??
|
|
291
|
+
let r = (t?.apiBaseUrl ?? ge()).replace(/\/$/, ""), i = await fetch(`${r}/v1/experiences/${encodeURIComponent(n)}/preview`, {
|
|
292
292
|
method: "GET",
|
|
293
293
|
headers: { Accept: "application/json" },
|
|
294
294
|
signal: t?.signal
|
|
@@ -308,7 +308,7 @@ async function be(e, t) {
|
|
|
308
308
|
throw Error("Experience preview returned invalid JSON.");
|
|
309
309
|
}
|
|
310
310
|
if (!a || typeof a != "object") throw Error("Experience preview returned an invalid payload.");
|
|
311
|
-
let o = a, s = typeof o.experienceId == "string" ? o.experienceId.trim() : n, c = typeof o.title == "string" ? o.title.trim() : "", l =
|
|
311
|
+
let o = a, s = typeof o.experienceId == "string" ? o.experienceId.trim() : n, c = typeof o.title == "string" ? o.title.trim() : "", l = _e(o.galleryThumb);
|
|
312
312
|
if (!l) throw Error("Experience preview is missing gallery thumb images.");
|
|
313
313
|
return {
|
|
314
314
|
experienceId: s || n,
|
|
@@ -318,7 +318,7 @@ async function be(e, t) {
|
|
|
318
318
|
}
|
|
319
319
|
//#endregion
|
|
320
320
|
//#region src/v2/api/sessionEndpointRequest.ts
|
|
321
|
-
function
|
|
321
|
+
function ye(e, t) {
|
|
322
322
|
let n = e.trim();
|
|
323
323
|
if (!n) throw Error("sessionEndpoint must not be empty.");
|
|
324
324
|
if (typeof location > "u") throw Error("sessionEndpoint is only available in a browser.");
|
|
@@ -349,8 +349,8 @@ function O(e, t) {
|
|
|
349
349
|
}
|
|
350
350
|
//#endregion
|
|
351
351
|
//#region node_modules/zod/v4/core/core.js
|
|
352
|
-
var
|
|
353
|
-
function
|
|
352
|
+
var be;
|
|
353
|
+
function A(e, t, n) {
|
|
354
354
|
function r(n, r) {
|
|
355
355
|
if (n._zod || Object.defineProperty(n, "_zod", {
|
|
356
356
|
value: {
|
|
@@ -379,7 +379,7 @@ function k(e, t, n) {
|
|
|
379
379
|
}
|
|
380
380
|
return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
|
|
381
381
|
}
|
|
382
|
-
var
|
|
382
|
+
var xe = class extends Error {
|
|
383
383
|
constructor() {
|
|
384
384
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
385
385
|
}
|
|
@@ -388,21 +388,21 @@ var A = class extends Error {
|
|
|
388
388
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
|
-
(
|
|
392
|
-
var
|
|
393
|
-
function
|
|
394
|
-
return e && Object.assign(
|
|
391
|
+
(be = globalThis).__zod_globalConfig ?? (be.__zod_globalConfig = {});
|
|
392
|
+
var j = globalThis.__zod_globalConfig;
|
|
393
|
+
function M(e) {
|
|
394
|
+
return e && Object.assign(j, e), j;
|
|
395
395
|
}
|
|
396
396
|
//#endregion
|
|
397
397
|
//#region node_modules/zod/v4/core/util.js
|
|
398
|
-
function
|
|
398
|
+
function Ce(e) {
|
|
399
399
|
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
400
400
|
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function we(e, t) {
|
|
403
403
|
return typeof t == "bigint" ? t.toString() : t;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function Te(e) {
|
|
406
406
|
return { get value() {
|
|
407
407
|
{
|
|
408
408
|
let t = e();
|
|
@@ -411,23 +411,23 @@ function Ee(e) {
|
|
|
411
411
|
throw Error("cached value already set");
|
|
412
412
|
} };
|
|
413
413
|
}
|
|
414
|
-
function
|
|
414
|
+
function N(e) {
|
|
415
415
|
return e == null;
|
|
416
416
|
}
|
|
417
|
-
function
|
|
417
|
+
function Ee(e) {
|
|
418
418
|
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
419
419
|
return e.slice(t, n);
|
|
420
420
|
}
|
|
421
|
-
function
|
|
421
|
+
function De(e, t) {
|
|
422
422
|
let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
|
|
423
423
|
return Math.abs(n - r) < i ? 0 : n - r;
|
|
424
424
|
}
|
|
425
|
-
var
|
|
426
|
-
function
|
|
425
|
+
var Oe = /* @__PURE__*/ Symbol("evaluating");
|
|
426
|
+
function P(e, t, n) {
|
|
427
427
|
let r;
|
|
428
428
|
Object.defineProperty(e, t, {
|
|
429
429
|
get() {
|
|
430
|
-
if (r !==
|
|
430
|
+
if (r !== Oe) return r === void 0 && (r = Oe, r = n()), r;
|
|
431
431
|
},
|
|
432
432
|
set(n) {
|
|
433
433
|
Object.defineProperty(e, t, { value: n });
|
|
@@ -435,7 +435,7 @@ function M(e, t, n) {
|
|
|
435
435
|
configurable: !0
|
|
436
436
|
});
|
|
437
437
|
}
|
|
438
|
-
function
|
|
438
|
+
function ke(e, t, n) {
|
|
439
439
|
Object.defineProperty(e, t, {
|
|
440
440
|
value: n,
|
|
441
441
|
writable: !0,
|
|
@@ -443,23 +443,23 @@ function N(e, t, n) {
|
|
|
443
443
|
configurable: !0
|
|
444
444
|
});
|
|
445
445
|
}
|
|
446
|
-
function
|
|
446
|
+
function F(...e) {
|
|
447
447
|
let t = {};
|
|
448
448
|
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
449
449
|
return Object.defineProperties({}, t);
|
|
450
450
|
}
|
|
451
|
-
function
|
|
451
|
+
function Ae(e) {
|
|
452
452
|
return JSON.stringify(e);
|
|
453
453
|
}
|
|
454
|
-
function
|
|
454
|
+
function je(e) {
|
|
455
455
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
456
456
|
}
|
|
457
|
-
var
|
|
458
|
-
function
|
|
457
|
+
var Me = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
458
|
+
function Ne(e) {
|
|
459
459
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
460
460
|
}
|
|
461
|
-
var Pe = /* @__PURE__*/
|
|
462
|
-
if (
|
|
461
|
+
var Pe = /* @__PURE__*/ Te(() => {
|
|
462
|
+
if (j.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
463
463
|
try {
|
|
464
464
|
return Function(""), !0;
|
|
465
465
|
} catch {
|
|
@@ -467,11 +467,11 @@ var Pe = /* @__PURE__*/ Ee(() => {
|
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
469
|
function Fe(e) {
|
|
470
|
-
if (
|
|
470
|
+
if (Ne(e) === !1) return !1;
|
|
471
471
|
let t = e.constructor;
|
|
472
472
|
if (t === void 0 || typeof t != "function") return !0;
|
|
473
473
|
let n = t.prototype;
|
|
474
|
-
return !(
|
|
474
|
+
return !(Ne(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
475
475
|
}
|
|
476
476
|
function Ie(e) {
|
|
477
477
|
return Fe(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
@@ -514,14 +514,14 @@ var Be = {
|
|
|
514
514
|
function Ve(e, t) {
|
|
515
515
|
let n = e._zod.def, r = n.checks;
|
|
516
516
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
517
|
-
return I(e,
|
|
517
|
+
return I(e, F(e._zod.def, {
|
|
518
518
|
get shape() {
|
|
519
519
|
let e = {};
|
|
520
520
|
for (let r in t) {
|
|
521
521
|
if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
|
|
522
522
|
t[r] && (e[r] = n.shape[r]);
|
|
523
523
|
}
|
|
524
|
-
return
|
|
524
|
+
return ke(this, "shape", e), e;
|
|
525
525
|
},
|
|
526
526
|
checks: []
|
|
527
527
|
}));
|
|
@@ -529,14 +529,14 @@ function Ve(e, t) {
|
|
|
529
529
|
function He(e, t) {
|
|
530
530
|
let n = e._zod.def, r = n.checks;
|
|
531
531
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
532
|
-
return I(e,
|
|
532
|
+
return I(e, F(e._zod.def, {
|
|
533
533
|
get shape() {
|
|
534
534
|
let r = { ...e._zod.def.shape };
|
|
535
535
|
for (let e in t) {
|
|
536
536
|
if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
|
|
537
537
|
t[e] && delete r[e];
|
|
538
538
|
}
|
|
539
|
-
return
|
|
539
|
+
return ke(this, "shape", r), r;
|
|
540
540
|
},
|
|
541
541
|
checks: []
|
|
542
542
|
}));
|
|
@@ -548,33 +548,33 @@ function Ue(e, t) {
|
|
|
548
548
|
let n = e._zod.def.shape;
|
|
549
549
|
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
550
550
|
}
|
|
551
|
-
return I(e,
|
|
551
|
+
return I(e, F(e._zod.def, { get shape() {
|
|
552
552
|
let n = {
|
|
553
553
|
...e._zod.def.shape,
|
|
554
554
|
...t
|
|
555
555
|
};
|
|
556
|
-
return
|
|
556
|
+
return ke(this, "shape", n), n;
|
|
557
557
|
} }));
|
|
558
558
|
}
|
|
559
559
|
function We(e, t) {
|
|
560
560
|
if (!Fe(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
561
|
-
return I(e,
|
|
561
|
+
return I(e, F(e._zod.def, { get shape() {
|
|
562
562
|
let n = {
|
|
563
563
|
...e._zod.def.shape,
|
|
564
564
|
...t
|
|
565
565
|
};
|
|
566
|
-
return
|
|
566
|
+
return ke(this, "shape", n), n;
|
|
567
567
|
} }));
|
|
568
568
|
}
|
|
569
569
|
function Ge(e, t) {
|
|
570
570
|
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
571
|
-
return I(e,
|
|
571
|
+
return I(e, F(e._zod.def, {
|
|
572
572
|
get shape() {
|
|
573
573
|
let n = {
|
|
574
574
|
...e._zod.def.shape,
|
|
575
575
|
...t._zod.def.shape
|
|
576
576
|
};
|
|
577
|
-
return
|
|
577
|
+
return ke(this, "shape", n), n;
|
|
578
578
|
},
|
|
579
579
|
get catchall() {
|
|
580
580
|
return t._zod.def.catchall;
|
|
@@ -585,7 +585,7 @@ function Ge(e, t) {
|
|
|
585
585
|
function Ke(e, t, n) {
|
|
586
586
|
let r = t._zod.def.checks;
|
|
587
587
|
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
588
|
-
return I(t,
|
|
588
|
+
return I(t, F(t._zod.def, {
|
|
589
589
|
get shape() {
|
|
590
590
|
let r = t._zod.def.shape, i = { ...r };
|
|
591
591
|
if (n) for (let t in n) {
|
|
@@ -599,13 +599,13 @@ function Ke(e, t, n) {
|
|
|
599
599
|
type: "optional",
|
|
600
600
|
innerType: r[t]
|
|
601
601
|
}) : r[t];
|
|
602
|
-
return
|
|
602
|
+
return ke(this, "shape", i), i;
|
|
603
603
|
},
|
|
604
604
|
checks: []
|
|
605
605
|
}));
|
|
606
606
|
}
|
|
607
607
|
function qe(e, t, n) {
|
|
608
|
-
return I(t,
|
|
608
|
+
return I(t, F(t._zod.def, { get shape() {
|
|
609
609
|
let r = t._zod.def.shape, i = { ...r };
|
|
610
610
|
if (n) for (let t in n) {
|
|
611
611
|
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
@@ -618,7 +618,7 @@ function qe(e, t, n) {
|
|
|
618
618
|
type: "nonoptional",
|
|
619
619
|
innerType: r[t]
|
|
620
620
|
});
|
|
621
|
-
return
|
|
621
|
+
return ke(this, "shape", i), i;
|
|
622
622
|
} }));
|
|
623
623
|
}
|
|
624
624
|
function Je(e, t = 0) {
|
|
@@ -665,11 +665,11 @@ var et = (e, t) => {
|
|
|
665
665
|
}), Object.defineProperty(e, "issues", {
|
|
666
666
|
value: t,
|
|
667
667
|
enumerable: !1
|
|
668
|
-
}), e.message = JSON.stringify(t,
|
|
668
|
+
}), e.message = JSON.stringify(t, we, 2), Object.defineProperty(e, "toString", {
|
|
669
669
|
value: () => e.message,
|
|
670
670
|
enumerable: !1
|
|
671
671
|
});
|
|
672
|
-
}, tt =
|
|
672
|
+
}, tt = A("$ZodError", et), nt = A("$ZodError", et, { Parent: Error });
|
|
673
673
|
function rt(e, t = (e) => e.message) {
|
|
674
674
|
let n = {}, r = [];
|
|
675
675
|
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
@@ -707,10 +707,10 @@ var at = (e) => (t, n, r, i) => {
|
|
|
707
707
|
value: n,
|
|
708
708
|
issues: []
|
|
709
709
|
}, a);
|
|
710
|
-
if (o instanceof Promise) throw new
|
|
710
|
+
if (o instanceof Promise) throw new xe();
|
|
711
711
|
if (o.issues.length) {
|
|
712
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) => R(e, a,
|
|
713
|
-
throw
|
|
712
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => R(e, a, M())));
|
|
713
|
+
throw Me(t, i?.callee), t;
|
|
714
714
|
}
|
|
715
715
|
return o.value;
|
|
716
716
|
}, ot = (e) => async (t, n, r, i) => {
|
|
@@ -722,8 +722,8 @@ var at = (e) => (t, n, r, i) => {
|
|
|
722
722
|
issues: []
|
|
723
723
|
}, a);
|
|
724
724
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
725
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) => R(e, a,
|
|
726
|
-
throw
|
|
725
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => R(e, a, M())));
|
|
726
|
+
throw Me(t, i?.callee), t;
|
|
727
727
|
}
|
|
728
728
|
return o.value;
|
|
729
729
|
}, st = (e) => (t, n, r) => {
|
|
@@ -734,10 +734,10 @@ var at = (e) => (t, n, r, i) => {
|
|
|
734
734
|
value: n,
|
|
735
735
|
issues: []
|
|
736
736
|
}, i);
|
|
737
|
-
if (a instanceof Promise) throw new
|
|
737
|
+
if (a instanceof Promise) throw new xe();
|
|
738
738
|
return a.issues.length ? {
|
|
739
739
|
success: !1,
|
|
740
|
-
error: new (e ?? tt)(a.issues.map((e) => R(e, i,
|
|
740
|
+
error: new (e ?? tt)(a.issues.map((e) => R(e, i, M())))
|
|
741
741
|
} : {
|
|
742
742
|
success: !0,
|
|
743
743
|
data: a.value
|
|
@@ -752,7 +752,7 @@ var at = (e) => (t, n, r, i) => {
|
|
|
752
752
|
}, i);
|
|
753
753
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
754
754
|
success: !1,
|
|
755
|
-
error: new e(a.issues.map((e) => R(e, i,
|
|
755
|
+
error: new e(a.issues.map((e) => R(e, i, M())))
|
|
756
756
|
} : {
|
|
757
757
|
success: !0,
|
|
758
758
|
data: a.value
|
|
@@ -802,14 +802,14 @@ function Ut(e) {
|
|
|
802
802
|
var Wt = (e) => {
|
|
803
803
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
804
804
|
return RegExp(`^${t}$`);
|
|
805
|
-
}, Gt = /^-?\d+$/, Kt = /^-?\d+(?:\.\d+)?$/, qt = /^(?:true|false)$/i, Jt = /^[^A-Z]*$/, Yt = /^[^a-z]*$/, z = /*@__PURE__*/
|
|
805
|
+
}, Gt = /^-?\d+$/, Kt = /^-?\d+(?:\.\d+)?$/, qt = /^(?:true|false)$/i, Jt = /^[^A-Z]*$/, Yt = /^[^a-z]*$/, z = /*@__PURE__*/ A("$ZodCheck", (e, t) => {
|
|
806
806
|
var n;
|
|
807
807
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
808
808
|
}), Xt = {
|
|
809
809
|
number: "number",
|
|
810
810
|
bigint: "bigint",
|
|
811
811
|
object: "date"
|
|
812
|
-
}, Zt = /*@__PURE__*/
|
|
812
|
+
}, Zt = /*@__PURE__*/ A("$ZodCheckLessThan", (e, t) => {
|
|
813
813
|
z.init(e, t);
|
|
814
814
|
let n = Xt[typeof t.value];
|
|
815
815
|
e._zod.onattach.push((e) => {
|
|
@@ -826,7 +826,7 @@ var Wt = (e) => {
|
|
|
826
826
|
continue: !t.abort
|
|
827
827
|
});
|
|
828
828
|
};
|
|
829
|
-
}), Qt = /*@__PURE__*/
|
|
829
|
+
}), Qt = /*@__PURE__*/ A("$ZodCheckGreaterThan", (e, t) => {
|
|
830
830
|
z.init(e, t);
|
|
831
831
|
let n = Xt[typeof t.value];
|
|
832
832
|
e._zod.onattach.push((e) => {
|
|
@@ -843,13 +843,13 @@ var Wt = (e) => {
|
|
|
843
843
|
continue: !t.abort
|
|
844
844
|
});
|
|
845
845
|
};
|
|
846
|
-
}), $t = /*@__PURE__*/
|
|
846
|
+
}), $t = /*@__PURE__*/ A("$ZodCheckMultipleOf", (e, t) => {
|
|
847
847
|
z.init(e, t), e._zod.onattach.push((e) => {
|
|
848
848
|
var n;
|
|
849
849
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
850
850
|
}), e._zod.check = (n) => {
|
|
851
851
|
if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
852
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
852
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : De(n.value, t.value) === 0) || n.issues.push({
|
|
853
853
|
origin: typeof n.value,
|
|
854
854
|
code: "not_multiple_of",
|
|
855
855
|
divisor: t.value,
|
|
@@ -858,7 +858,7 @@ var Wt = (e) => {
|
|
|
858
858
|
continue: !t.abort
|
|
859
859
|
});
|
|
860
860
|
};
|
|
861
|
-
}), en = /*@__PURE__*/
|
|
861
|
+
}), en = /*@__PURE__*/ A("$ZodCheckNumberFormat", (e, t) => {
|
|
862
862
|
z.init(e, t), t.format = t.format || "float64";
|
|
863
863
|
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = Be[t.format];
|
|
864
864
|
e._zod.onattach.push((e) => {
|
|
@@ -919,11 +919,11 @@ var Wt = (e) => {
|
|
|
919
919
|
continue: !t.abort
|
|
920
920
|
});
|
|
921
921
|
};
|
|
922
|
-
}), tn = /*@__PURE__*/
|
|
922
|
+
}), tn = /*@__PURE__*/ A("$ZodCheckMaxLength", (e, t) => {
|
|
923
923
|
var n;
|
|
924
924
|
z.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
925
925
|
let t = e.value;
|
|
926
|
-
return !
|
|
926
|
+
return !N(t) && t.length !== void 0;
|
|
927
927
|
}), e._zod.onattach.push((e) => {
|
|
928
928
|
let n = e._zod.bag.maximum ?? Infinity;
|
|
929
929
|
t.maximum < n && (e._zod.bag.maximum = t.maximum);
|
|
@@ -941,11 +941,11 @@ var Wt = (e) => {
|
|
|
941
941
|
continue: !t.abort
|
|
942
942
|
});
|
|
943
943
|
};
|
|
944
|
-
}), nn = /*@__PURE__*/
|
|
944
|
+
}), nn = /*@__PURE__*/ A("$ZodCheckMinLength", (e, t) => {
|
|
945
945
|
var n;
|
|
946
946
|
z.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
947
947
|
let t = e.value;
|
|
948
|
-
return !
|
|
948
|
+
return !N(t) && t.length !== void 0;
|
|
949
949
|
}), e._zod.onattach.push((e) => {
|
|
950
950
|
let n = e._zod.bag.minimum ?? -Infinity;
|
|
951
951
|
t.minimum > n && (e._zod.bag.minimum = t.minimum);
|
|
@@ -963,11 +963,11 @@ var Wt = (e) => {
|
|
|
963
963
|
continue: !t.abort
|
|
964
964
|
});
|
|
965
965
|
};
|
|
966
|
-
}), rn = /*@__PURE__*/
|
|
966
|
+
}), rn = /*@__PURE__*/ A("$ZodCheckLengthEquals", (e, t) => {
|
|
967
967
|
var n;
|
|
968
968
|
z.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
969
969
|
let t = e.value;
|
|
970
|
-
return !
|
|
970
|
+
return !N(t) && t.length !== void 0;
|
|
971
971
|
}), e._zod.onattach.push((e) => {
|
|
972
972
|
let n = e._zod.bag;
|
|
973
973
|
n.minimum = t.length, n.maximum = t.length, n.length = t.length;
|
|
@@ -991,7 +991,7 @@ var Wt = (e) => {
|
|
|
991
991
|
continue: !t.abort
|
|
992
992
|
});
|
|
993
993
|
};
|
|
994
|
-
}), an = /*@__PURE__*/
|
|
994
|
+
}), an = /*@__PURE__*/ A("$ZodCheckStringFormat", (e, t) => {
|
|
995
995
|
var n, r;
|
|
996
996
|
z.init(e, t), e._zod.onattach.push((e) => {
|
|
997
997
|
let n = e._zod.bag;
|
|
@@ -1007,7 +1007,7 @@ var Wt = (e) => {
|
|
|
1007
1007
|
continue: !t.abort
|
|
1008
1008
|
});
|
|
1009
1009
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
1010
|
-
}), on = /*@__PURE__*/
|
|
1010
|
+
}), on = /*@__PURE__*/ A("$ZodCheckRegex", (e, t) => {
|
|
1011
1011
|
an.init(e, t), e._zod.check = (n) => {
|
|
1012
1012
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1013
1013
|
origin: "string",
|
|
@@ -1019,11 +1019,11 @@ var Wt = (e) => {
|
|
|
1019
1019
|
continue: !t.abort
|
|
1020
1020
|
});
|
|
1021
1021
|
};
|
|
1022
|
-
}), sn = /*@__PURE__*/
|
|
1022
|
+
}), sn = /*@__PURE__*/ A("$ZodCheckLowerCase", (e, t) => {
|
|
1023
1023
|
t.pattern ??= Jt, an.init(e, t);
|
|
1024
|
-
}), cn = /*@__PURE__*/
|
|
1024
|
+
}), cn = /*@__PURE__*/ A("$ZodCheckUpperCase", (e, t) => {
|
|
1025
1025
|
t.pattern ??= Yt, an.init(e, t);
|
|
1026
|
-
}), ln = /*@__PURE__*/
|
|
1026
|
+
}), ln = /*@__PURE__*/ A("$ZodCheckIncludes", (e, t) => {
|
|
1027
1027
|
z.init(e, t);
|
|
1028
1028
|
let n = Re(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
1029
1029
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
@@ -1040,7 +1040,7 @@ var Wt = (e) => {
|
|
|
1040
1040
|
continue: !t.abort
|
|
1041
1041
|
});
|
|
1042
1042
|
};
|
|
1043
|
-
}), un = /*@__PURE__*/
|
|
1043
|
+
}), un = /*@__PURE__*/ A("$ZodCheckStartsWith", (e, t) => {
|
|
1044
1044
|
z.init(e, t);
|
|
1045
1045
|
let n = RegExp(`^${Re(t.prefix)}.*`);
|
|
1046
1046
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
@@ -1057,7 +1057,7 @@ var Wt = (e) => {
|
|
|
1057
1057
|
continue: !t.abort
|
|
1058
1058
|
});
|
|
1059
1059
|
};
|
|
1060
|
-
}), dn = /*@__PURE__*/
|
|
1060
|
+
}), dn = /*@__PURE__*/ A("$ZodCheckEndsWith", (e, t) => {
|
|
1061
1061
|
z.init(e, t);
|
|
1062
1062
|
let n = RegExp(`.*${Re(t.suffix)}$`);
|
|
1063
1063
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
@@ -1074,7 +1074,7 @@ var Wt = (e) => {
|
|
|
1074
1074
|
continue: !t.abort
|
|
1075
1075
|
});
|
|
1076
1076
|
};
|
|
1077
|
-
}), fn = /*@__PURE__*/
|
|
1077
|
+
}), fn = /*@__PURE__*/ A("$ZodCheckOverwrite", (e, t) => {
|
|
1078
1078
|
z.init(e, t), e._zod.check = (e) => {
|
|
1079
1079
|
e.value = t.tx(e.value);
|
|
1080
1080
|
};
|
|
@@ -1101,7 +1101,7 @@ var Wt = (e) => {
|
|
|
1101
1101
|
major: 4,
|
|
1102
1102
|
minor: 4,
|
|
1103
1103
|
patch: 3
|
|
1104
|
-
}, B = /*@__PURE__*/
|
|
1104
|
+
}, B = /*@__PURE__*/ A("$ZodType", (e, t) => {
|
|
1105
1105
|
var n;
|
|
1106
1106
|
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = mn;
|
|
1107
1107
|
let r = [...e._zod.def.checks ?? []];
|
|
@@ -1118,7 +1118,7 @@ var Wt = (e) => {
|
|
|
1118
1118
|
if (Ye(e) || !a._zod.def.when(e)) continue;
|
|
1119
1119
|
} else if (r) continue;
|
|
1120
1120
|
let t = e.issues.length, o = a._zod.check(e);
|
|
1121
|
-
if (o instanceof Promise && n?.async === !1) throw new
|
|
1121
|
+
if (o instanceof Promise && n?.async === !1) throw new xe();
|
|
1122
1122
|
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
1123
1123
|
await o, e.issues.length !== t && (r ||= Je(e, t));
|
|
1124
1124
|
});
|
|
@@ -1132,7 +1132,7 @@ var Wt = (e) => {
|
|
|
1132
1132
|
if (Je(n)) return n.aborted = !0, n;
|
|
1133
1133
|
let o = t(i, r, a);
|
|
1134
1134
|
if (o instanceof Promise) {
|
|
1135
|
-
if (a.async === !1) throw new
|
|
1135
|
+
if (a.async === !1) throw new xe();
|
|
1136
1136
|
return o.then((t) => e._zod.parse(t, a));
|
|
1137
1137
|
}
|
|
1138
1138
|
return e._zod.parse(o, a);
|
|
@@ -1151,13 +1151,13 @@ var Wt = (e) => {
|
|
|
1151
1151
|
}
|
|
1152
1152
|
let o = e._zod.parse(i, a);
|
|
1153
1153
|
if (o instanceof Promise) {
|
|
1154
|
-
if (a.async === !1) throw new
|
|
1154
|
+
if (a.async === !1) throw new xe();
|
|
1155
1155
|
return o.then((e) => t(e, r, a));
|
|
1156
1156
|
}
|
|
1157
1157
|
return t(o, r, a);
|
|
1158
1158
|
};
|
|
1159
1159
|
}
|
|
1160
|
-
|
|
1160
|
+
P(e, "~standard", () => ({
|
|
1161
1161
|
validate: (t) => {
|
|
1162
1162
|
try {
|
|
1163
1163
|
let n = ct(e, t);
|
|
@@ -1169,7 +1169,7 @@ var Wt = (e) => {
|
|
|
1169
1169
|
vendor: "zod",
|
|
1170
1170
|
version: 1
|
|
1171
1171
|
}));
|
|
1172
|
-
}), hn = /*@__PURE__*/
|
|
1172
|
+
}), hn = /*@__PURE__*/ A("$ZodString", (e, t) => {
|
|
1173
1173
|
B.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Wt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
1174
1174
|
if (t.coerce) try {
|
|
1175
1175
|
n.value = String(n.value);
|
|
@@ -1181,11 +1181,11 @@ var Wt = (e) => {
|
|
|
1181
1181
|
inst: e
|
|
1182
1182
|
}), n;
|
|
1183
1183
|
};
|
|
1184
|
-
}), V = /*@__PURE__*/
|
|
1184
|
+
}), V = /*@__PURE__*/ A("$ZodStringFormat", (e, t) => {
|
|
1185
1185
|
an.init(e, t), hn.init(e, t);
|
|
1186
|
-
}), gn = /*@__PURE__*/
|
|
1186
|
+
}), gn = /*@__PURE__*/ A("$ZodGUID", (e, t) => {
|
|
1187
1187
|
t.pattern ??= Et, V.init(e, t);
|
|
1188
|
-
}), _n = /*@__PURE__*/
|
|
1188
|
+
}), _n = /*@__PURE__*/ A("$ZodUUID", (e, t) => {
|
|
1189
1189
|
if (t.version) {
|
|
1190
1190
|
let e = {
|
|
1191
1191
|
v1: 1,
|
|
@@ -1201,9 +1201,9 @@ var Wt = (e) => {
|
|
|
1201
1201
|
t.pattern ??= Dt(e);
|
|
1202
1202
|
} else t.pattern ??= Dt();
|
|
1203
1203
|
V.init(e, t);
|
|
1204
|
-
}), vn = /*@__PURE__*/
|
|
1204
|
+
}), vn = /*@__PURE__*/ A("$ZodEmail", (e, t) => {
|
|
1205
1205
|
t.pattern ??= Ot, V.init(e, t);
|
|
1206
|
-
}), yn = /*@__PURE__*/
|
|
1206
|
+
}), yn = /*@__PURE__*/ A("$ZodURL", (e, t) => {
|
|
1207
1207
|
V.init(e, t), e._zod.check = (n) => {
|
|
1208
1208
|
try {
|
|
1209
1209
|
let r = n.value.trim();
|
|
@@ -1247,31 +1247,31 @@ var Wt = (e) => {
|
|
|
1247
1247
|
});
|
|
1248
1248
|
}
|
|
1249
1249
|
};
|
|
1250
|
-
}), bn = /*@__PURE__*/
|
|
1250
|
+
}), bn = /*@__PURE__*/ A("$ZodEmoji", (e, t) => {
|
|
1251
1251
|
t.pattern ??= At(), V.init(e, t);
|
|
1252
|
-
}), xn = /*@__PURE__*/
|
|
1252
|
+
}), xn = /*@__PURE__*/ A("$ZodNanoID", (e, t) => {
|
|
1253
1253
|
t.pattern ??= wt, V.init(e, t);
|
|
1254
|
-
}), Sn = /*@__PURE__*/
|
|
1254
|
+
}), Sn = /*@__PURE__*/ A("$ZodCUID", (e, t) => {
|
|
1255
1255
|
t.pattern ??= yt, V.init(e, t);
|
|
1256
|
-
}), Cn = /*@__PURE__*/
|
|
1256
|
+
}), Cn = /*@__PURE__*/ A("$ZodCUID2", (e, t) => {
|
|
1257
1257
|
t.pattern ??= bt, V.init(e, t);
|
|
1258
|
-
}), wn = /*@__PURE__*/
|
|
1258
|
+
}), wn = /*@__PURE__*/ A("$ZodULID", (e, t) => {
|
|
1259
1259
|
t.pattern ??= xt, V.init(e, t);
|
|
1260
|
-
}), Tn = /*@__PURE__*/
|
|
1260
|
+
}), Tn = /*@__PURE__*/ A("$ZodXID", (e, t) => {
|
|
1261
1261
|
t.pattern ??= St, V.init(e, t);
|
|
1262
|
-
}), En = /*@__PURE__*/
|
|
1262
|
+
}), En = /*@__PURE__*/ A("$ZodKSUID", (e, t) => {
|
|
1263
1263
|
t.pattern ??= Ct, V.init(e, t);
|
|
1264
|
-
}), Dn = /*@__PURE__*/
|
|
1264
|
+
}), Dn = /*@__PURE__*/ A("$ZodISODateTime", (e, t) => {
|
|
1265
1265
|
t.pattern ??= Ut(t), V.init(e, t);
|
|
1266
|
-
}), On = /*@__PURE__*/
|
|
1266
|
+
}), On = /*@__PURE__*/ A("$ZodISODate", (e, t) => {
|
|
1267
1267
|
t.pattern ??= Bt, V.init(e, t);
|
|
1268
|
-
}), kn = /*@__PURE__*/
|
|
1268
|
+
}), kn = /*@__PURE__*/ A("$ZodISOTime", (e, t) => {
|
|
1269
1269
|
t.pattern ??= Ht(t), V.init(e, t);
|
|
1270
|
-
}), An = /*@__PURE__*/
|
|
1270
|
+
}), An = /*@__PURE__*/ A("$ZodISODuration", (e, t) => {
|
|
1271
1271
|
t.pattern ??= Tt, V.init(e, t);
|
|
1272
|
-
}), jn = /*@__PURE__*/
|
|
1272
|
+
}), jn = /*@__PURE__*/ A("$ZodIPv4", (e, t) => {
|
|
1273
1273
|
t.pattern ??= jt, V.init(e, t), e._zod.bag.format = "ipv4";
|
|
1274
|
-
}), Mn = /*@__PURE__*/
|
|
1274
|
+
}), Mn = /*@__PURE__*/ A("$ZodIPv6", (e, t) => {
|
|
1275
1275
|
t.pattern ??= Mt, V.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1276
1276
|
try {
|
|
1277
1277
|
new URL(`http://[${n.value}]`);
|
|
@@ -1285,9 +1285,9 @@ var Wt = (e) => {
|
|
|
1285
1285
|
});
|
|
1286
1286
|
}
|
|
1287
1287
|
};
|
|
1288
|
-
}), Nn = /*@__PURE__*/
|
|
1288
|
+
}), Nn = /*@__PURE__*/ A("$ZodCIDRv4", (e, t) => {
|
|
1289
1289
|
t.pattern ??= Nt, V.init(e, t);
|
|
1290
|
-
}), Pn = /*@__PURE__*/
|
|
1290
|
+
}), Pn = /*@__PURE__*/ A("$ZodCIDRv6", (e, t) => {
|
|
1291
1291
|
t.pattern ??= Pt, V.init(e, t), e._zod.check = (n) => {
|
|
1292
1292
|
let r = n.value.split("/");
|
|
1293
1293
|
try {
|
|
@@ -1317,7 +1317,7 @@ function Fn(e) {
|
|
|
1317
1317
|
return !1;
|
|
1318
1318
|
}
|
|
1319
1319
|
}
|
|
1320
|
-
var In = /*@__PURE__*/
|
|
1320
|
+
var In = /*@__PURE__*/ A("$ZodBase64", (e, t) => {
|
|
1321
1321
|
t.pattern ??= Ft, V.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1322
1322
|
Fn(n.value) || n.issues.push({
|
|
1323
1323
|
code: "invalid_format",
|
|
@@ -1333,7 +1333,7 @@ function Ln(e) {
|
|
|
1333
1333
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1334
1334
|
return Fn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1335
1335
|
}
|
|
1336
|
-
var Rn = /*@__PURE__*/
|
|
1336
|
+
var Rn = /*@__PURE__*/ A("$ZodBase64URL", (e, t) => {
|
|
1337
1337
|
t.pattern ??= It, V.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1338
1338
|
Ln(n.value) || n.issues.push({
|
|
1339
1339
|
code: "invalid_format",
|
|
@@ -1343,7 +1343,7 @@ var Rn = /*@__PURE__*/ k("$ZodBase64URL", (e, t) => {
|
|
|
1343
1343
|
continue: !t.abort
|
|
1344
1344
|
});
|
|
1345
1345
|
};
|
|
1346
|
-
}), zn = /*@__PURE__*/
|
|
1346
|
+
}), zn = /*@__PURE__*/ A("$ZodE164", (e, t) => {
|
|
1347
1347
|
t.pattern ??= Rt, V.init(e, t);
|
|
1348
1348
|
});
|
|
1349
1349
|
function Bn(e, t = null) {
|
|
@@ -1358,7 +1358,7 @@ function Bn(e, t = null) {
|
|
|
1358
1358
|
return !1;
|
|
1359
1359
|
}
|
|
1360
1360
|
}
|
|
1361
|
-
var Vn = /*@__PURE__*/
|
|
1361
|
+
var Vn = /*@__PURE__*/ A("$ZodJWT", (e, t) => {
|
|
1362
1362
|
V.init(e, t), e._zod.check = (n) => {
|
|
1363
1363
|
Bn(n.value, t.alg) || n.issues.push({
|
|
1364
1364
|
code: "invalid_format",
|
|
@@ -1368,7 +1368,7 @@ var Vn = /*@__PURE__*/ k("$ZodJWT", (e, t) => {
|
|
|
1368
1368
|
continue: !t.abort
|
|
1369
1369
|
});
|
|
1370
1370
|
};
|
|
1371
|
-
}), Hn = /*@__PURE__*/
|
|
1371
|
+
}), Hn = /*@__PURE__*/ A("$ZodNumber", (e, t) => {
|
|
1372
1372
|
B.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Kt, e._zod.parse = (n, r) => {
|
|
1373
1373
|
if (t.coerce) try {
|
|
1374
1374
|
n.value = Number(n.value);
|
|
@@ -1384,9 +1384,9 @@ var Vn = /*@__PURE__*/ k("$ZodJWT", (e, t) => {
|
|
|
1384
1384
|
...a ? { received: a } : {}
|
|
1385
1385
|
}), n;
|
|
1386
1386
|
};
|
|
1387
|
-
}), Un = /*@__PURE__*/
|
|
1387
|
+
}), Un = /*@__PURE__*/ A("$ZodNumberFormat", (e, t) => {
|
|
1388
1388
|
en.init(e, t), Hn.init(e, t);
|
|
1389
|
-
}), Wn = /*@__PURE__*/
|
|
1389
|
+
}), Wn = /*@__PURE__*/ A("$ZodBoolean", (e, t) => {
|
|
1390
1390
|
B.init(e, t), e._zod.pattern = qt, e._zod.parse = (n, r) => {
|
|
1391
1391
|
if (t.coerce) try {
|
|
1392
1392
|
n.value = !!n.value;
|
|
@@ -1399,9 +1399,9 @@ var Vn = /*@__PURE__*/ k("$ZodJWT", (e, t) => {
|
|
|
1399
1399
|
inst: e
|
|
1400
1400
|
}), n;
|
|
1401
1401
|
};
|
|
1402
|
-
}), Gn = /*@__PURE__*/
|
|
1402
|
+
}), Gn = /*@__PURE__*/ A("$ZodUnknown", (e, t) => {
|
|
1403
1403
|
B.init(e, t), e._zod.parse = (e) => e;
|
|
1404
|
-
}), Kn = /*@__PURE__*/
|
|
1404
|
+
}), Kn = /*@__PURE__*/ A("$ZodNever", (e, t) => {
|
|
1405
1405
|
B.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1406
1406
|
expected: "never",
|
|
1407
1407
|
code: "invalid_type",
|
|
@@ -1412,7 +1412,7 @@ var Vn = /*@__PURE__*/ k("$ZodJWT", (e, t) => {
|
|
|
1412
1412
|
function qn(e, t, n) {
|
|
1413
1413
|
e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
|
|
1414
1414
|
}
|
|
1415
|
-
var Jn = /*@__PURE__*/
|
|
1415
|
+
var Jn = /*@__PURE__*/ A("$ZodArray", (e, t) => {
|
|
1416
1416
|
B.init(e, t), e._zod.parse = (n, r) => {
|
|
1417
1417
|
let i = n.value;
|
|
1418
1418
|
if (!Array.isArray(i)) return n.issues.push({
|
|
@@ -1483,7 +1483,7 @@ function Zn(e, t, n, r, i, a) {
|
|
|
1483
1483
|
inst: a
|
|
1484
1484
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1485
1485
|
}
|
|
1486
|
-
var Qn = /*@__PURE__*/
|
|
1486
|
+
var Qn = /*@__PURE__*/ A("$ZodObject", (e, t) => {
|
|
1487
1487
|
if (B.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1488
1488
|
let e = t.shape;
|
|
1489
1489
|
Object.defineProperty(t, "shape", { get: () => {
|
|
@@ -1491,8 +1491,8 @@ var Qn = /*@__PURE__*/ k("$ZodObject", (e, t) => {
|
|
|
1491
1491
|
return Object.defineProperty(t, "shape", { value: n }), n;
|
|
1492
1492
|
} });
|
|
1493
1493
|
}
|
|
1494
|
-
let n =
|
|
1495
|
-
|
|
1494
|
+
let n = Te(() => Xn(t));
|
|
1495
|
+
P(e._zod, "propValues", () => {
|
|
1496
1496
|
let e = t.shape, n = {};
|
|
1497
1497
|
for (let t in e) {
|
|
1498
1498
|
let r = e[t]._zod;
|
|
@@ -1503,7 +1503,7 @@ var Qn = /*@__PURE__*/ k("$ZodObject", (e, t) => {
|
|
|
1503
1503
|
}
|
|
1504
1504
|
return n;
|
|
1505
1505
|
});
|
|
1506
|
-
let r =
|
|
1506
|
+
let r = Ne, i = t.catchall, a;
|
|
1507
1507
|
e._zod.parse = (t, o) => {
|
|
1508
1508
|
a ??= n.value;
|
|
1509
1509
|
let s = t.value;
|
|
@@ -1524,15 +1524,15 @@ var Qn = /*@__PURE__*/ k("$ZodObject", (e, t) => {
|
|
|
1524
1524
|
}
|
|
1525
1525
|
return i ? Zn(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1526
1526
|
};
|
|
1527
|
-
}), $n = /*@__PURE__*/
|
|
1527
|
+
}), $n = /*@__PURE__*/ A("$ZodObjectJIT", (e, t) => {
|
|
1528
1528
|
Qn.init(e, t);
|
|
1529
|
-
let n = e._zod.parse, r =
|
|
1529
|
+
let n = e._zod.parse, r = Te(() => Xn(t)), i = (e) => {
|
|
1530
1530
|
let t = new pn([
|
|
1531
1531
|
"shape",
|
|
1532
1532
|
"payload",
|
|
1533
1533
|
"ctx"
|
|
1534
1534
|
]), n = r.value, i = (e) => {
|
|
1535
|
-
let t =
|
|
1535
|
+
let t = Ae(e);
|
|
1536
1536
|
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1537
1537
|
};
|
|
1538
1538
|
t.write("const input = payload.value;");
|
|
@@ -1540,7 +1540,7 @@ var Qn = /*@__PURE__*/ k("$ZodObject", (e, t) => {
|
|
|
1540
1540
|
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1541
1541
|
t.write("const newResult = {};");
|
|
1542
1542
|
for (let r of n.keys) {
|
|
1543
|
-
let n = a[r], o =
|
|
1543
|
+
let n = a[r], o = Ae(r), s = e[r], c = s?._zod?.optin === "optional", l = s?._zod?.optout === "optional";
|
|
1544
1544
|
t.write(`const ${n} = ${i(r)};`), c && l ? t.write(`
|
|
1545
1545
|
if (${n}.issues.length) {
|
|
1546
1546
|
if (${o} in input) {
|
|
@@ -1605,7 +1605,7 @@ var Qn = /*@__PURE__*/ k("$ZodObject", (e, t) => {
|
|
|
1605
1605
|
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1606
1606
|
let s = t.compile();
|
|
1607
1607
|
return (t, n) => s(e, t, n);
|
|
1608
|
-
}, a, o =
|
|
1608
|
+
}, a, o = Ne, s = !j.jitless, c = s && Pe.value, l = t.catchall, u;
|
|
1609
1609
|
e._zod.parse = (d, f) => {
|
|
1610
1610
|
u ??= r.value;
|
|
1611
1611
|
let p = d.value;
|
|
@@ -1624,16 +1624,16 @@ function er(e, t, n, r) {
|
|
|
1624
1624
|
code: "invalid_union",
|
|
1625
1625
|
input: t.value,
|
|
1626
1626
|
inst: n,
|
|
1627
|
-
errors: e.map((e) => e.issues.map((e) => R(e, r,
|
|
1627
|
+
errors: e.map((e) => e.issues.map((e) => R(e, r, M())))
|
|
1628
1628
|
}), t);
|
|
1629
1629
|
}
|
|
1630
|
-
var tr = /*@__PURE__*/
|
|
1631
|
-
B.init(e, t),
|
|
1630
|
+
var tr = /*@__PURE__*/ A("$ZodUnion", (e, t) => {
|
|
1631
|
+
B.init(e, t), P(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), P(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), P(e._zod, "values", () => {
|
|
1632
1632
|
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1633
|
-
}),
|
|
1633
|
+
}), P(e._zod, "pattern", () => {
|
|
1634
1634
|
if (t.options.every((e) => e._zod.pattern)) {
|
|
1635
1635
|
let e = t.options.map((e) => e._zod.pattern);
|
|
1636
|
-
return RegExp(`^(${e.map((e) =>
|
|
1636
|
+
return RegExp(`^(${e.map((e) => Ee(e.source)).join("|")})$`);
|
|
1637
1637
|
}
|
|
1638
1638
|
});
|
|
1639
1639
|
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
@@ -1653,7 +1653,7 @@ var tr = /*@__PURE__*/ k("$ZodUnion", (e, t) => {
|
|
|
1653
1653
|
}
|
|
1654
1654
|
return a ? Promise.all(o).then((t) => er(t, r, e, i)) : er(o, r, e, i);
|
|
1655
1655
|
};
|
|
1656
|
-
}), nr = /*@__PURE__*/
|
|
1656
|
+
}), nr = /*@__PURE__*/ A("$ZodIntersection", (e, t) => {
|
|
1657
1657
|
B.init(e, t), e._zod.parse = (e, n) => {
|
|
1658
1658
|
let r = e.value, i = t.left._zod.run({
|
|
1659
1659
|
value: r,
|
|
@@ -1729,7 +1729,7 @@ function ir(e, t, n) {
|
|
|
1729
1729
|
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1730
1730
|
return e.value = o.data, e;
|
|
1731
1731
|
}
|
|
1732
|
-
var ar = /*@__PURE__*/
|
|
1732
|
+
var ar = /*@__PURE__*/ A("$ZodRecord", (e, t) => {
|
|
1733
1733
|
B.init(e, t), e._zod.parse = (n, r) => {
|
|
1734
1734
|
let i = n.value;
|
|
1735
1735
|
if (!Fe(i)) return n.issues.push({
|
|
@@ -1753,7 +1753,7 @@ var ar = /*@__PURE__*/ k("$ZodRecord", (e, t) => {
|
|
|
1753
1753
|
n.issues.push({
|
|
1754
1754
|
code: "invalid_key",
|
|
1755
1755
|
origin: "record",
|
|
1756
|
-
issues: o.issues.map((e) => R(e, r,
|
|
1756
|
+
issues: o.issues.map((e) => R(e, r, M())),
|
|
1757
1757
|
input: c,
|
|
1758
1758
|
path: [c],
|
|
1759
1759
|
inst: e
|
|
@@ -1797,7 +1797,7 @@ var ar = /*@__PURE__*/ k("$ZodRecord", (e, t) => {
|
|
|
1797
1797
|
t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
|
|
1798
1798
|
code: "invalid_key",
|
|
1799
1799
|
origin: "record",
|
|
1800
|
-
issues: s.issues.map((e) => R(e, r,
|
|
1800
|
+
issues: s.issues.map((e) => R(e, r, M())),
|
|
1801
1801
|
input: o,
|
|
1802
1802
|
path: [o],
|
|
1803
1803
|
inst: e
|
|
@@ -1815,9 +1815,9 @@ var ar = /*@__PURE__*/ k("$ZodRecord", (e, t) => {
|
|
|
1815
1815
|
}
|
|
1816
1816
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1817
1817
|
};
|
|
1818
|
-
}), or = /*@__PURE__*/
|
|
1818
|
+
}), or = /*@__PURE__*/ A("$ZodEnum", (e, t) => {
|
|
1819
1819
|
B.init(e, t);
|
|
1820
|
-
let n =
|
|
1820
|
+
let n = Ce(t.entries), r = new Set(n);
|
|
1821
1821
|
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => Le.has(typeof e)).map((e) => typeof e == "string" ? Re(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1822
1822
|
let a = t.value;
|
|
1823
1823
|
return r.has(a) || t.issues.push({
|
|
@@ -1827,7 +1827,7 @@ var ar = /*@__PURE__*/ k("$ZodRecord", (e, t) => {
|
|
|
1827
1827
|
inst: e
|
|
1828
1828
|
}), t;
|
|
1829
1829
|
};
|
|
1830
|
-
}), sr = /*@__PURE__*/
|
|
1830
|
+
}), sr = /*@__PURE__*/ A("$ZodLiteral", (e, t) => {
|
|
1831
1831
|
if (B.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
|
|
1832
1832
|
let n = new Set(t.values);
|
|
1833
1833
|
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? Re(e) : e ? Re(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
|
|
@@ -1839,12 +1839,12 @@ var ar = /*@__PURE__*/ k("$ZodRecord", (e, t) => {
|
|
|
1839
1839
|
inst: e
|
|
1840
1840
|
}), r;
|
|
1841
1841
|
};
|
|
1842
|
-
}), cr = /*@__PURE__*/
|
|
1842
|
+
}), cr = /*@__PURE__*/ A("$ZodTransform", (e, t) => {
|
|
1843
1843
|
B.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
|
|
1844
1844
|
if (r.direction === "backward") throw new Se(e.constructor.name);
|
|
1845
1845
|
let i = t.transform(n.value, n);
|
|
1846
1846
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
|
|
1847
|
-
if (i instanceof Promise) throw new
|
|
1847
|
+
if (i instanceof Promise) throw new xe();
|
|
1848
1848
|
return n.value = i, n.fallback = !0, n;
|
|
1849
1849
|
};
|
|
1850
1850
|
});
|
|
@@ -1854,10 +1854,10 @@ function lr(e, t) {
|
|
|
1854
1854
|
value: void 0
|
|
1855
1855
|
} : e;
|
|
1856
1856
|
}
|
|
1857
|
-
var ur = /*@__PURE__*/
|
|
1858
|
-
B.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional",
|
|
1857
|
+
var ur = /*@__PURE__*/ A("$ZodOptional", (e, t) => {
|
|
1858
|
+
B.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", P(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), P(e._zod, "pattern", () => {
|
|
1859
1859
|
let e = t.innerType._zod.pattern;
|
|
1860
|
-
return e ? RegExp(`^(${
|
|
1860
|
+
return e ? RegExp(`^(${Ee(e.source)})?$`) : void 0;
|
|
1861
1861
|
}), e._zod.parse = (e, n) => {
|
|
1862
1862
|
if (t.innerType._zod.optin === "optional") {
|
|
1863
1863
|
let r = e.value, i = t.innerType._zod.run(e, n);
|
|
@@ -1865,15 +1865,15 @@ var ur = /*@__PURE__*/ k("$ZodOptional", (e, t) => {
|
|
|
1865
1865
|
}
|
|
1866
1866
|
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1867
1867
|
};
|
|
1868
|
-
}), dr = /*@__PURE__*/
|
|
1869
|
-
ur.init(e, t),
|
|
1870
|
-
}), fr = /*@__PURE__*/
|
|
1871
|
-
B.init(e, t),
|
|
1868
|
+
}), dr = /*@__PURE__*/ A("$ZodExactOptional", (e, t) => {
|
|
1869
|
+
ur.init(e, t), P(e._zod, "values", () => t.innerType._zod.values), P(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1870
|
+
}), fr = /*@__PURE__*/ A("$ZodNullable", (e, t) => {
|
|
1871
|
+
B.init(e, t), P(e._zod, "optin", () => t.innerType._zod.optin), P(e._zod, "optout", () => t.innerType._zod.optout), P(e._zod, "pattern", () => {
|
|
1872
1872
|
let e = t.innerType._zod.pattern;
|
|
1873
|
-
return e ? RegExp(`^(${
|
|
1874
|
-
}),
|
|
1875
|
-
}), pr = /*@__PURE__*/
|
|
1876
|
-
B.init(e, t), e._zod.optin = "optional",
|
|
1873
|
+
return e ? RegExp(`^(${Ee(e.source)}|null)$`) : void 0;
|
|
1874
|
+
}), P(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1875
|
+
}), pr = /*@__PURE__*/ A("$ZodDefault", (e, t) => {
|
|
1876
|
+
B.init(e, t), e._zod.optin = "optional", P(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1877
1877
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1878
1878
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1879
1879
|
let r = t.innerType._zod.run(e, n);
|
|
@@ -1883,10 +1883,10 @@ var ur = /*@__PURE__*/ k("$ZodOptional", (e, t) => {
|
|
|
1883
1883
|
function mr(e, t) {
|
|
1884
1884
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1885
1885
|
}
|
|
1886
|
-
var hr = /*@__PURE__*/
|
|
1887
|
-
B.init(e, t), e._zod.optin = "optional",
|
|
1888
|
-
}), gr = /*@__PURE__*/
|
|
1889
|
-
B.init(e, t),
|
|
1886
|
+
var hr = /*@__PURE__*/ A("$ZodPrefault", (e, t) => {
|
|
1887
|
+
B.init(e, t), e._zod.optin = "optional", P(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1888
|
+
}), gr = /*@__PURE__*/ A("$ZodNonOptional", (e, t) => {
|
|
1889
|
+
B.init(e, t), P(e._zod, "values", () => {
|
|
1890
1890
|
let e = t.innerType._zod.values;
|
|
1891
1891
|
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
1892
1892
|
}), e._zod.parse = (n, r) => {
|
|
@@ -1902,22 +1902,22 @@ function _r(e, t) {
|
|
|
1902
1902
|
inst: t
|
|
1903
1903
|
}), e;
|
|
1904
1904
|
}
|
|
1905
|
-
var vr = /*@__PURE__*/
|
|
1906
|
-
B.init(e, t), e._zod.optin = "optional",
|
|
1905
|
+
var vr = /*@__PURE__*/ A("$ZodCatch", (e, t) => {
|
|
1906
|
+
B.init(e, t), e._zod.optin = "optional", P(e._zod, "optout", () => t.innerType._zod.optout), P(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1907
1907
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1908
1908
|
let r = t.innerType._zod.run(e, n);
|
|
1909
1909
|
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1910
1910
|
...e,
|
|
1911
|
-
error: { issues: r.issues.map((e) => R(e, n,
|
|
1911
|
+
error: { issues: r.issues.map((e) => R(e, n, M())) },
|
|
1912
1912
|
input: e.value
|
|
1913
1913
|
}), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1914
1914
|
...e,
|
|
1915
|
-
error: { issues: r.issues.map((e) => R(e, n,
|
|
1915
|
+
error: { issues: r.issues.map((e) => R(e, n, M())) },
|
|
1916
1916
|
input: e.value
|
|
1917
1917
|
}), e.issues = [], e.fallback = !0), e);
|
|
1918
1918
|
};
|
|
1919
|
-
}), yr = /*@__PURE__*/
|
|
1920
|
-
B.init(e, t),
|
|
1919
|
+
}), yr = /*@__PURE__*/ A("$ZodPipe", (e, t) => {
|
|
1920
|
+
B.init(e, t), P(e._zod, "values", () => t.in._zod.values), P(e._zod, "optin", () => t.in._zod.optin), P(e._zod, "optout", () => t.out._zod.optout), P(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1921
1921
|
if (n.direction === "backward") {
|
|
1922
1922
|
let r = t.out._zod.run(e, n);
|
|
1923
1923
|
return r instanceof Promise ? r.then((e) => br(e, t.in, n)) : br(r, t.in, n);
|
|
@@ -1933,8 +1933,8 @@ function br(e, t, n) {
|
|
|
1933
1933
|
fallback: e.fallback
|
|
1934
1934
|
}, n);
|
|
1935
1935
|
}
|
|
1936
|
-
var xr = /*@__PURE__*/
|
|
1937
|
-
B.init(e, t),
|
|
1936
|
+
var xr = /*@__PURE__*/ A("$ZodReadonly", (e, t) => {
|
|
1937
|
+
B.init(e, t), P(e._zod, "propValues", () => t.innerType._zod.propValues), P(e._zod, "values", () => t.innerType._zod.values), P(e._zod, "optin", () => t.innerType?._zod?.optin), P(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1938
1938
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1939
1939
|
let r = t.innerType._zod.run(e, n);
|
|
1940
1940
|
return r instanceof Promise ? r.then(Sr) : Sr(r);
|
|
@@ -1943,7 +1943,7 @@ var xr = /*@__PURE__*/ k("$ZodReadonly", (e, t) => {
|
|
|
1943
1943
|
function Sr(e) {
|
|
1944
1944
|
return e.value = Object.freeze(e.value), e;
|
|
1945
1945
|
}
|
|
1946
|
-
var Cr = /*@__PURE__*/
|
|
1946
|
+
var Cr = /*@__PURE__*/ A("$ZodCustom", (e, t) => {
|
|
1947
1947
|
z.init(e, t), B.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1948
1948
|
let r = n.value, i = t.fn(r);
|
|
1949
1949
|
if (i instanceof Promise) return i.then((t) => wr(t, n, r, e));
|
|
@@ -2454,7 +2454,7 @@ function Ti() {
|
|
|
2454
2454
|
}
|
|
2455
2455
|
// @__NO_SIDE_EFFECTS__
|
|
2456
2456
|
function Ei() {
|
|
2457
|
-
return /* @__PURE__ */ xi((e) =>
|
|
2457
|
+
return /* @__PURE__ */ xi((e) => je(e));
|
|
2458
2458
|
}
|
|
2459
2459
|
// @__NO_SIDE_EFFECTS__
|
|
2460
2460
|
function Di(e, t, n) {
|
|
@@ -2740,7 +2740,7 @@ var Pi = (e, t = {}) => (n) => {
|
|
|
2740
2740
|
}, Bi = (e, t, n, r) => {
|
|
2741
2741
|
n.not = {};
|
|
2742
2742
|
}, Vi = (e, t, n, r) => {
|
|
2743
|
-
let i = e._zod.def, a =
|
|
2743
|
+
let i = e._zod.def, a = Ce(i.entries);
|
|
2744
2744
|
a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
|
|
2745
2745
|
}, Hi = (e, t, n, r) => {
|
|
2746
2746
|
let i = e._zod.def, a = [];
|
|
@@ -2883,39 +2883,39 @@ var Pi = (e, t = {}) => (n) => {
|
|
|
2883
2883
|
H(i.innerType, t, r);
|
|
2884
2884
|
let a = t.seen.get(e);
|
|
2885
2885
|
a.ref = i.innerType;
|
|
2886
|
-
}, ia = /*@__PURE__*/
|
|
2886
|
+
}, ia = /*@__PURE__*/ A("ZodISODateTime", (e, t) => {
|
|
2887
2887
|
Dn.init(e, t), q.init(e, t);
|
|
2888
2888
|
});
|
|
2889
2889
|
function aa(e) {
|
|
2890
2890
|
return /* @__PURE__ */ Qr(ia, e);
|
|
2891
2891
|
}
|
|
2892
|
-
var oa = /*@__PURE__*/
|
|
2892
|
+
var oa = /*@__PURE__*/ A("ZodISODate", (e, t) => {
|
|
2893
2893
|
On.init(e, t), q.init(e, t);
|
|
2894
2894
|
});
|
|
2895
2895
|
function sa(e) {
|
|
2896
2896
|
return /* @__PURE__ */ $r(oa, e);
|
|
2897
2897
|
}
|
|
2898
|
-
var ca = /*@__PURE__*/
|
|
2898
|
+
var ca = /*@__PURE__*/ A("ZodISOTime", (e, t) => {
|
|
2899
2899
|
kn.init(e, t), q.init(e, t);
|
|
2900
2900
|
});
|
|
2901
2901
|
function la(e) {
|
|
2902
2902
|
return /* @__PURE__ */ ei(ca, e);
|
|
2903
2903
|
}
|
|
2904
|
-
var ua = /*@__PURE__*/
|
|
2904
|
+
var ua = /*@__PURE__*/ A("ZodISODuration", (e, t) => {
|
|
2905
2905
|
An.init(e, t), q.init(e, t);
|
|
2906
2906
|
});
|
|
2907
2907
|
function da(e) {
|
|
2908
2908
|
return /* @__PURE__ */ ti(ua, e);
|
|
2909
2909
|
}
|
|
2910
|
-
var W = /*@__PURE__*/
|
|
2910
|
+
var W = /*@__PURE__*/ A("ZodError", (e, t) => {
|
|
2911
2911
|
tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2912
2912
|
format: { value: (t) => it(e, t) },
|
|
2913
2913
|
flatten: { value: (t) => rt(e, t) },
|
|
2914
2914
|
addIssue: { value: (t) => {
|
|
2915
|
-
e.issues.push(t), e.message = JSON.stringify(e.issues,
|
|
2915
|
+
e.issues.push(t), e.message = JSON.stringify(e.issues, we, 2);
|
|
2916
2916
|
} },
|
|
2917
2917
|
addIssues: { value: (t) => {
|
|
2918
|
-
e.issues.push(...t), e.message = JSON.stringify(e.issues,
|
|
2918
|
+
e.issues.push(...t), e.message = JSON.stringify(e.issues, we, 2);
|
|
2919
2919
|
} },
|
|
2920
2920
|
isEmpty: { get() {
|
|
2921
2921
|
return e.issues.length === 0;
|
|
@@ -2952,13 +2952,13 @@ function Ta(e, t, n) {
|
|
|
2952
2952
|
}
|
|
2953
2953
|
}
|
|
2954
2954
|
}
|
|
2955
|
-
var G = /*@__PURE__*/
|
|
2955
|
+
var G = /*@__PURE__*/ A("ZodType", (e, t) => (B.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2956
2956
|
input: Fi(e, "input"),
|
|
2957
2957
|
output: Fi(e, "output")
|
|
2958
2958
|
} }), e.toJSONSchema = Pi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => fa(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => ma(e, t, n), e.parseAsync = async (t, n) => pa(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => ha(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ga(e, t, n), e.decode = (t, n) => _a(e, t, n), e.encodeAsync = async (t, n) => va(e, t, n), e.decodeAsync = async (t, n) => ya(e, t, n), e.safeEncode = (t, n) => ba(e, t, n), e.safeDecode = (t, n) => xa(e, t, n), e.safeEncodeAsync = async (t, n) => Sa(e, t, n), e.safeDecodeAsync = async (t, n) => Ca(e, t, n), Ta(e, "ZodType", {
|
|
2959
2959
|
check(...e) {
|
|
2960
2960
|
let t = this.def;
|
|
2961
|
-
return this.clone(
|
|
2961
|
+
return this.clone(F(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
2962
2962
|
check: e,
|
|
2963
2963
|
def: { check: "custom" },
|
|
2964
2964
|
onattach: []
|
|
@@ -3050,7 +3050,7 @@ var G = /*@__PURE__*/ k("ZodType", (e, t) => (B.init(e, t), Object.assign(e["~st
|
|
|
3050
3050
|
return Or.get(e)?.description;
|
|
3051
3051
|
},
|
|
3052
3052
|
configurable: !0
|
|
3053
|
-
}), e)), Ea = /*@__PURE__*/
|
|
3053
|
+
}), e)), Ea = /*@__PURE__*/ A("_ZodString", (e, t) => {
|
|
3054
3054
|
hn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Li(e, t, n, r);
|
|
3055
3055
|
let n = e._zod.bag;
|
|
3056
3056
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, Ta(e, "_ZodString", {
|
|
@@ -3100,53 +3100,53 @@ var G = /*@__PURE__*/ k("ZodType", (e, t) => (B.init(e, t), Object.assign(e["~st
|
|
|
3100
3100
|
return this.check(/* @__PURE__ */ Ei());
|
|
3101
3101
|
}
|
|
3102
3102
|
});
|
|
3103
|
-
}), Da = /*@__PURE__*/
|
|
3103
|
+
}), Da = /*@__PURE__*/ A("ZodString", (e, t) => {
|
|
3104
3104
|
hn.init(e, t), Ea.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ Ar(Oa, t)), e.url = (t) => e.check(/* @__PURE__ */ Ir(ja, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Zr(Ka, t)), e.emoji = (t) => e.check(/* @__PURE__ */ Lr(Ma, t)), e.guid = (t) => e.check(/* @__PURE__ */ jr(ka, t)), e.uuid = (t) => e.check(/* @__PURE__ */ Mr(Aa, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ Nr(Aa, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ Pr(Aa, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ Fr(Aa, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ Rr(Na, t)), e.guid = (t) => e.check(/* @__PURE__ */ jr(ka, t)), e.cuid = (t) => e.check(/* @__PURE__ */ zr(Pa, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Br(Fa, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Vr(Ia, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Jr(Ua, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Yr(Wa, t)), e.xid = (t) => e.check(/* @__PURE__ */ Hr(La, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Ur(Ra, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Wr(za, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ Gr(Ba, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ Kr(Va, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ qr(Ha, t)), e.e164 = (t) => e.check(/* @__PURE__ */ Xr(Ga, t)), e.datetime = (t) => e.check(aa(t)), e.date = (t) => e.check(sa(t)), e.time = (t) => e.check(la(t)), e.duration = (t) => e.check(da(t));
|
|
3105
3105
|
});
|
|
3106
3106
|
function K(e) {
|
|
3107
3107
|
return /* @__PURE__ */ kr(Da, e);
|
|
3108
3108
|
}
|
|
3109
|
-
var q = /*@__PURE__*/
|
|
3109
|
+
var q = /*@__PURE__*/ A("ZodStringFormat", (e, t) => {
|
|
3110
3110
|
V.init(e, t), Ea.init(e, t);
|
|
3111
|
-
}), Oa = /*@__PURE__*/
|
|
3111
|
+
}), Oa = /*@__PURE__*/ A("ZodEmail", (e, t) => {
|
|
3112
3112
|
vn.init(e, t), q.init(e, t);
|
|
3113
|
-
}), ka = /*@__PURE__*/
|
|
3113
|
+
}), ka = /*@__PURE__*/ A("ZodGUID", (e, t) => {
|
|
3114
3114
|
gn.init(e, t), q.init(e, t);
|
|
3115
|
-
}), Aa = /*@__PURE__*/
|
|
3115
|
+
}), Aa = /*@__PURE__*/ A("ZodUUID", (e, t) => {
|
|
3116
3116
|
_n.init(e, t), q.init(e, t);
|
|
3117
|
-
}), ja = /*@__PURE__*/
|
|
3117
|
+
}), ja = /*@__PURE__*/ A("ZodURL", (e, t) => {
|
|
3118
3118
|
yn.init(e, t), q.init(e, t);
|
|
3119
|
-
}), Ma = /*@__PURE__*/
|
|
3119
|
+
}), Ma = /*@__PURE__*/ A("ZodEmoji", (e, t) => {
|
|
3120
3120
|
bn.init(e, t), q.init(e, t);
|
|
3121
|
-
}), Na = /*@__PURE__*/
|
|
3121
|
+
}), Na = /*@__PURE__*/ A("ZodNanoID", (e, t) => {
|
|
3122
3122
|
xn.init(e, t), q.init(e, t);
|
|
3123
|
-
}), Pa = /*@__PURE__*/
|
|
3123
|
+
}), Pa = /*@__PURE__*/ A("ZodCUID", (e, t) => {
|
|
3124
3124
|
Sn.init(e, t), q.init(e, t);
|
|
3125
|
-
}), Fa = /*@__PURE__*/
|
|
3125
|
+
}), Fa = /*@__PURE__*/ A("ZodCUID2", (e, t) => {
|
|
3126
3126
|
Cn.init(e, t), q.init(e, t);
|
|
3127
|
-
}), Ia = /*@__PURE__*/
|
|
3127
|
+
}), Ia = /*@__PURE__*/ A("ZodULID", (e, t) => {
|
|
3128
3128
|
wn.init(e, t), q.init(e, t);
|
|
3129
|
-
}), La = /*@__PURE__*/
|
|
3129
|
+
}), La = /*@__PURE__*/ A("ZodXID", (e, t) => {
|
|
3130
3130
|
Tn.init(e, t), q.init(e, t);
|
|
3131
|
-
}), Ra = /*@__PURE__*/
|
|
3131
|
+
}), Ra = /*@__PURE__*/ A("ZodKSUID", (e, t) => {
|
|
3132
3132
|
En.init(e, t), q.init(e, t);
|
|
3133
|
-
}), za = /*@__PURE__*/
|
|
3133
|
+
}), za = /*@__PURE__*/ A("ZodIPv4", (e, t) => {
|
|
3134
3134
|
jn.init(e, t), q.init(e, t);
|
|
3135
|
-
}), Ba = /*@__PURE__*/
|
|
3135
|
+
}), Ba = /*@__PURE__*/ A("ZodIPv6", (e, t) => {
|
|
3136
3136
|
Mn.init(e, t), q.init(e, t);
|
|
3137
|
-
}), Va = /*@__PURE__*/
|
|
3137
|
+
}), Va = /*@__PURE__*/ A("ZodCIDRv4", (e, t) => {
|
|
3138
3138
|
Nn.init(e, t), q.init(e, t);
|
|
3139
|
-
}), Ha = /*@__PURE__*/
|
|
3139
|
+
}), Ha = /*@__PURE__*/ A("ZodCIDRv6", (e, t) => {
|
|
3140
3140
|
Pn.init(e, t), q.init(e, t);
|
|
3141
|
-
}), Ua = /*@__PURE__*/
|
|
3141
|
+
}), Ua = /*@__PURE__*/ A("ZodBase64", (e, t) => {
|
|
3142
3142
|
In.init(e, t), q.init(e, t);
|
|
3143
|
-
}), Wa = /*@__PURE__*/
|
|
3143
|
+
}), Wa = /*@__PURE__*/ A("ZodBase64URL", (e, t) => {
|
|
3144
3144
|
Rn.init(e, t), q.init(e, t);
|
|
3145
|
-
}), Ga = /*@__PURE__*/
|
|
3145
|
+
}), Ga = /*@__PURE__*/ A("ZodE164", (e, t) => {
|
|
3146
3146
|
zn.init(e, t), q.init(e, t);
|
|
3147
|
-
}), Ka = /*@__PURE__*/
|
|
3147
|
+
}), Ka = /*@__PURE__*/ A("ZodJWT", (e, t) => {
|
|
3148
3148
|
Vn.init(e, t), q.init(e, t);
|
|
3149
|
-
}), qa = /*@__PURE__*/
|
|
3149
|
+
}), qa = /*@__PURE__*/ A("ZodNumber", (e, t) => {
|
|
3150
3150
|
Hn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ri(e, t, n, r), Ta(e, "ZodNumber", {
|
|
3151
3151
|
gt(e, t) {
|
|
3152
3152
|
return this.check(/* @__PURE__ */ li(e, t));
|
|
@@ -3200,31 +3200,31 @@ var q = /*@__PURE__*/ k("ZodStringFormat", (e, t) => {
|
|
|
3200
3200
|
function Ja(e) {
|
|
3201
3201
|
return /* @__PURE__ */ ni(qa, e);
|
|
3202
3202
|
}
|
|
3203
|
-
var Ya = /*@__PURE__*/
|
|
3203
|
+
var Ya = /*@__PURE__*/ A("ZodNumberFormat", (e, t) => {
|
|
3204
3204
|
Un.init(e, t), qa.init(e, t);
|
|
3205
3205
|
});
|
|
3206
3206
|
function Xa(e) {
|
|
3207
3207
|
return /* @__PURE__ */ ri(Ya, e);
|
|
3208
3208
|
}
|
|
3209
|
-
var Za = /*@__PURE__*/
|
|
3209
|
+
var Za = /*@__PURE__*/ A("ZodBoolean", (e, t) => {
|
|
3210
3210
|
Wn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => zi(e, t, n, r);
|
|
3211
3211
|
});
|
|
3212
3212
|
function Qa(e) {
|
|
3213
3213
|
return /* @__PURE__ */ ii(Za, e);
|
|
3214
3214
|
}
|
|
3215
|
-
var $a = /*@__PURE__*/
|
|
3215
|
+
var $a = /*@__PURE__*/ A("ZodUnknown", (e, t) => {
|
|
3216
3216
|
Gn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3217
3217
|
});
|
|
3218
3218
|
function eo() {
|
|
3219
3219
|
return /* @__PURE__ */ ai($a);
|
|
3220
3220
|
}
|
|
3221
|
-
var to = /*@__PURE__*/
|
|
3221
|
+
var to = /*@__PURE__*/ A("ZodNever", (e, t) => {
|
|
3222
3222
|
Kn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bi(e, t, n, r);
|
|
3223
3223
|
});
|
|
3224
3224
|
function no(e) {
|
|
3225
3225
|
return /* @__PURE__ */ oi(to, e);
|
|
3226
3226
|
}
|
|
3227
|
-
var ro = /*@__PURE__*/
|
|
3227
|
+
var ro = /*@__PURE__*/ A("ZodArray", (e, t) => {
|
|
3228
3228
|
Jn.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Gi(e, t, n, r), e.element = t.element, Ta(e, "ZodArray", {
|
|
3229
3229
|
min(e, t) {
|
|
3230
3230
|
return this.check(/* @__PURE__ */ pi(e, t));
|
|
@@ -3246,8 +3246,8 @@ var ro = /*@__PURE__*/ k("ZodArray", (e, t) => {
|
|
|
3246
3246
|
function io(e, t) {
|
|
3247
3247
|
return /* @__PURE__ */ Di(ro, e, t);
|
|
3248
3248
|
}
|
|
3249
|
-
var ao = /*@__PURE__*/
|
|
3250
|
-
$n.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ki(e, t, n, r),
|
|
3249
|
+
var ao = /*@__PURE__*/ A("ZodObject", (e, t) => {
|
|
3250
|
+
$n.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ki(e, t, n, r), P(e, "shape", () => t.shape), Ta(e, "ZodObject", {
|
|
3251
3251
|
keyof() {
|
|
3252
3252
|
return Y(Object.keys(this._zod.def.shape));
|
|
3253
3253
|
},
|
|
@@ -3311,7 +3311,7 @@ function J(e, t) {
|
|
|
3311
3311
|
...L(t)
|
|
3312
3312
|
});
|
|
3313
3313
|
}
|
|
3314
|
-
var oo = /*@__PURE__*/
|
|
3314
|
+
var oo = /*@__PURE__*/ A("ZodUnion", (e, t) => {
|
|
3315
3315
|
tr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r), e.options = t.options;
|
|
3316
3316
|
});
|
|
3317
3317
|
function so(e, t) {
|
|
@@ -3321,7 +3321,7 @@ function so(e, t) {
|
|
|
3321
3321
|
...L(t)
|
|
3322
3322
|
});
|
|
3323
3323
|
}
|
|
3324
|
-
var co = /*@__PURE__*/
|
|
3324
|
+
var co = /*@__PURE__*/ A("ZodIntersection", (e, t) => {
|
|
3325
3325
|
nr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r);
|
|
3326
3326
|
});
|
|
3327
3327
|
function lo(e, t) {
|
|
@@ -3331,7 +3331,7 @@ function lo(e, t) {
|
|
|
3331
3331
|
right: t
|
|
3332
3332
|
});
|
|
3333
3333
|
}
|
|
3334
|
-
var uo = /*@__PURE__*/
|
|
3334
|
+
var uo = /*@__PURE__*/ A("ZodRecord", (e, t) => {
|
|
3335
3335
|
ar.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
3336
3336
|
});
|
|
3337
3337
|
function fo(e, t, n) {
|
|
@@ -3347,7 +3347,7 @@ function fo(e, t, n) {
|
|
|
3347
3347
|
...L(n)
|
|
3348
3348
|
});
|
|
3349
3349
|
}
|
|
3350
|
-
var po = /*@__PURE__*/
|
|
3350
|
+
var po = /*@__PURE__*/ A("ZodEnum", (e, t) => {
|
|
3351
3351
|
or.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
3352
3352
|
let n = new Set(Object.keys(t.entries));
|
|
3353
3353
|
e.extract = (e, r) => {
|
|
@@ -3379,7 +3379,7 @@ function Y(e, t) {
|
|
|
3379
3379
|
...L(t)
|
|
3380
3380
|
});
|
|
3381
3381
|
}
|
|
3382
|
-
var mo = /*@__PURE__*/
|
|
3382
|
+
var mo = /*@__PURE__*/ A("ZodLiteral", (e, t) => {
|
|
3383
3383
|
sr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Hi(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
3384
3384
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
3385
3385
|
return t.values[0];
|
|
@@ -3392,7 +3392,7 @@ function ho(e, t) {
|
|
|
3392
3392
|
...L(t)
|
|
3393
3393
|
});
|
|
3394
3394
|
}
|
|
3395
|
-
var go = /*@__PURE__*/
|
|
3395
|
+
var go = /*@__PURE__*/ A("ZodTransform", (e, t) => {
|
|
3396
3396
|
cr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Wi(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3397
3397
|
if (r.direction === "backward") throw new Se(e.constructor.name);
|
|
3398
3398
|
n.addIssue = (r) => {
|
|
@@ -3412,7 +3412,7 @@ function _o(e) {
|
|
|
3412
3412
|
transform: e
|
|
3413
3413
|
});
|
|
3414
3414
|
}
|
|
3415
|
-
var vo = /*@__PURE__*/
|
|
3415
|
+
var vo = /*@__PURE__*/ A("ZodOptional", (e, t) => {
|
|
3416
3416
|
ur.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3417
3417
|
});
|
|
3418
3418
|
function yo(e) {
|
|
@@ -3421,7 +3421,7 @@ function yo(e) {
|
|
|
3421
3421
|
innerType: e
|
|
3422
3422
|
});
|
|
3423
3423
|
}
|
|
3424
|
-
var bo = /*@__PURE__*/
|
|
3424
|
+
var bo = /*@__PURE__*/ A("ZodExactOptional", (e, t) => {
|
|
3425
3425
|
dr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3426
3426
|
});
|
|
3427
3427
|
function xo(e) {
|
|
@@ -3430,7 +3430,7 @@ function xo(e) {
|
|
|
3430
3430
|
innerType: e
|
|
3431
3431
|
});
|
|
3432
3432
|
}
|
|
3433
|
-
var So = /*@__PURE__*/
|
|
3433
|
+
var So = /*@__PURE__*/ A("ZodNullable", (e, t) => {
|
|
3434
3434
|
fr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3435
3435
|
});
|
|
3436
3436
|
function Co(e) {
|
|
@@ -3439,7 +3439,7 @@ function Co(e) {
|
|
|
3439
3439
|
innerType: e
|
|
3440
3440
|
});
|
|
3441
3441
|
}
|
|
3442
|
-
var wo = /*@__PURE__*/
|
|
3442
|
+
var wo = /*@__PURE__*/ A("ZodDefault", (e, t) => {
|
|
3443
3443
|
pr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3444
3444
|
});
|
|
3445
3445
|
function To(e, t) {
|
|
@@ -3451,7 +3451,7 @@ function To(e, t) {
|
|
|
3451
3451
|
}
|
|
3452
3452
|
});
|
|
3453
3453
|
}
|
|
3454
|
-
var Eo = /*@__PURE__*/
|
|
3454
|
+
var Eo = /*@__PURE__*/ A("ZodPrefault", (e, t) => {
|
|
3455
3455
|
hr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3456
3456
|
});
|
|
3457
3457
|
function Do(e, t) {
|
|
@@ -3463,7 +3463,7 @@ function Do(e, t) {
|
|
|
3463
3463
|
}
|
|
3464
3464
|
});
|
|
3465
3465
|
}
|
|
3466
|
-
var Oo = /*@__PURE__*/
|
|
3466
|
+
var Oo = /*@__PURE__*/ A("ZodNonOptional", (e, t) => {
|
|
3467
3467
|
gr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3468
3468
|
});
|
|
3469
3469
|
function ko(e, t) {
|
|
@@ -3473,7 +3473,7 @@ function ko(e, t) {
|
|
|
3473
3473
|
...L(t)
|
|
3474
3474
|
});
|
|
3475
3475
|
}
|
|
3476
|
-
var Ao = /*@__PURE__*/
|
|
3476
|
+
var Ao = /*@__PURE__*/ A("ZodCatch", (e, t) => {
|
|
3477
3477
|
vr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3478
3478
|
});
|
|
3479
3479
|
function jo(e, t) {
|
|
@@ -3483,7 +3483,7 @@ function jo(e, t) {
|
|
|
3483
3483
|
catchValue: typeof t == "function" ? t : () => t
|
|
3484
3484
|
});
|
|
3485
3485
|
}
|
|
3486
|
-
var Mo = /*@__PURE__*/
|
|
3486
|
+
var Mo = /*@__PURE__*/ A("ZodPipe", (e, t) => {
|
|
3487
3487
|
yr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => ta(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
3488
3488
|
});
|
|
3489
3489
|
function No(e, t) {
|
|
@@ -3493,7 +3493,7 @@ function No(e, t) {
|
|
|
3493
3493
|
out: t
|
|
3494
3494
|
});
|
|
3495
3495
|
}
|
|
3496
|
-
var Po = /*@__PURE__*/
|
|
3496
|
+
var Po = /*@__PURE__*/ A("ZodReadonly", (e, t) => {
|
|
3497
3497
|
xr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => na(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3498
3498
|
});
|
|
3499
3499
|
function Fo(e) {
|
|
@@ -3502,7 +3502,7 @@ function Fo(e) {
|
|
|
3502
3502
|
innerType: e
|
|
3503
3503
|
});
|
|
3504
3504
|
}
|
|
3505
|
-
var Io = /*@__PURE__*/
|
|
3505
|
+
var Io = /*@__PURE__*/ A("ZodCustom", (e, t) => {
|
|
3506
3506
|
Cr.init(e, t), G.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ui(e, t, n, r);
|
|
3507
3507
|
});
|
|
3508
3508
|
function Lo(e, t = {}) {
|
|
@@ -3702,7 +3702,7 @@ function es(e, t, n) {
|
|
|
3702
3702
|
return o === "browser_embeds_disabled" || /^Browser embeds are not enabled/i.test(a ?? "") ? a && a.includes("Allow public client-only embeds") ? a : `Browser embeds are not enabled for experience ${e}. If you own this experience, sign in to the Liforma developer portal (app.liforma.ai), open Workspace → Settings → Origins, and enable “Allow public client-only embeds”.` : o === "experience_unavailable" || /^Experience is not available\.?$/i.test(a ?? "") || /^Unknown experience\.?$/i.test(a ?? "") ? a && a.includes("No playable experience found") ? a : `No playable experience found for “${e}”. Check that the experience id is correct (it should look like exp_…), and that the experience exists and is published in the Liforma developer portal (app.liforma.ai). Deleted, archived, and unpublished experiences cannot be started from a browser embed.` : a || n.trim().slice(0, 500) || `Public session mint failed (${t})`;
|
|
3703
3703
|
}
|
|
3704
3704
|
async function ts(e, t) {
|
|
3705
|
-
let n =
|
|
3705
|
+
let n = ge(), r = { experienceId: e };
|
|
3706
3706
|
t?.language && (r.language = t.language), t?.mode && (r.mode = t.mode), t?.responseMode && (r.responseMode = t.responseMode), t?.speechInputMode && (r.speechInputMode = t.speechInputMode), t?.startButton && (r.startButton = t.startButton), t?.speechOnly !== void 0 && (r.speechOnly = t.speechOnly);
|
|
3707
3707
|
let i = await fetch(`${n}/v1/public-sessions`, {
|
|
3708
3708
|
method: "POST",
|
|
@@ -3722,7 +3722,7 @@ async function ts(e, t) {
|
|
|
3722
3722
|
return Zo(a);
|
|
3723
3723
|
}
|
|
3724
3724
|
async function ns(e, t) {
|
|
3725
|
-
let n =
|
|
3725
|
+
let n = ye(e, t), r = new AbortController(), i = () => r.abort(t.signal?.reason);
|
|
3726
3726
|
t.signal?.aborted ? i() : t.signal?.addEventListener("abort", i, { once: !0 });
|
|
3727
3727
|
let a = globalThis.setTimeout(() => r.abort(new DOMException("Session endpoint timed out.", "TimeoutError")), t.timeoutMs ?? 3e4), o;
|
|
3728
3728
|
try {
|
|
@@ -3825,7 +3825,10 @@ var fs = new Set([
|
|
|
3825
3825
|
"widgetReady",
|
|
3826
3826
|
"widgetExpand",
|
|
3827
3827
|
"widgetCollapse",
|
|
3828
|
-
"widgetAudioSettings"
|
|
3828
|
+
"widgetAudioSettings",
|
|
3829
|
+
"widgetDragStart",
|
|
3830
|
+
"widgetDragMove",
|
|
3831
|
+
"widgetDragEnd"
|
|
3829
3832
|
]);
|
|
3830
3833
|
function ps(e) {
|
|
3831
3834
|
if (!e || typeof e != "object") return null;
|
|
@@ -3836,6 +3839,16 @@ function ps(e) {
|
|
|
3836
3839
|
let e = t.payload;
|
|
3837
3840
|
return !e || typeof e != "object" || typeof e.open != "boolean" ? null : t;
|
|
3838
3841
|
}
|
|
3842
|
+
if (t.type === "widgetDragStart" || t.type === "widgetDragEnd") {
|
|
3843
|
+
let e = t.payload;
|
|
3844
|
+
return !e || typeof e != "object" || typeof e.pointerId != "number" || !Number.isFinite(e.pointerId) ? null : t;
|
|
3845
|
+
}
|
|
3846
|
+
if (t.type === "widgetDragMove") {
|
|
3847
|
+
let e = t.payload;
|
|
3848
|
+
if (!e || typeof e != "object") return null;
|
|
3849
|
+
let { pointerId: n, dx: r, dy: i } = e;
|
|
3850
|
+
return typeof n != "number" || !Number.isFinite(n) || typeof r != "number" || !Number.isFinite(r) || typeof i != "number" || !Number.isFinite(i) ? null : t;
|
|
3851
|
+
}
|
|
3839
3852
|
return !t.payload || typeof t.payload != "object" ? null : t;
|
|
3840
3853
|
}
|
|
3841
3854
|
function ms(e) {
|
|
@@ -3943,6 +3956,15 @@ function ys(e) {
|
|
|
3943
3956
|
case "widgetAudioSettings":
|
|
3944
3957
|
e.onWidgetAudioSettings?.(a.payload.open);
|
|
3945
3958
|
break;
|
|
3959
|
+
case "widgetDragStart":
|
|
3960
|
+
e.onWidgetDragStart?.(a.payload);
|
|
3961
|
+
break;
|
|
3962
|
+
case "widgetDragMove":
|
|
3963
|
+
e.onWidgetDragMove?.(a.payload);
|
|
3964
|
+
break;
|
|
3965
|
+
case "widgetDragEnd":
|
|
3966
|
+
e.onWidgetDragEnd?.(a.payload);
|
|
3967
|
+
break;
|
|
3946
3968
|
}
|
|
3947
3969
|
};
|
|
3948
3970
|
if (window.addEventListener("message", o), t.replaceChildren(n), t.clientHeight < 2 && !t.style.minHeight) {
|
|
@@ -4093,7 +4115,8 @@ function ys(e) {
|
|
|
4093
4115
|
utteranceId: e.utteranceId,
|
|
4094
4116
|
format: e.format,
|
|
4095
4117
|
queue: e.queue,
|
|
4096
|
-
...e.characterId ? { characterId: e.characterId } : {}
|
|
4118
|
+
...e.characterId ? { characterId: e.characterId } : {},
|
|
4119
|
+
...e.transcript === void 0 ? {} : { transcript: e.transcript }
|
|
4097
4120
|
}
|
|
4098
4121
|
});
|
|
4099
4122
|
},
|
|
@@ -4109,6 +4132,17 @@ function ys(e) {
|
|
|
4109
4132
|
}
|
|
4110
4133
|
}, vs, [e.audio]);
|
|
4111
4134
|
},
|
|
4135
|
+
speechUtteranceSetTranscript(e) {
|
|
4136
|
+
return c({
|
|
4137
|
+
type: "speechUtteranceSetTranscript",
|
|
4138
|
+
schemaVersion: 2,
|
|
4139
|
+
payload: {
|
|
4140
|
+
correlationId: X(),
|
|
4141
|
+
utteranceId: e.utteranceId,
|
|
4142
|
+
transcript: e.transcript
|
|
4143
|
+
}
|
|
4144
|
+
});
|
|
4145
|
+
},
|
|
4112
4146
|
speechUtteranceClose(e) {
|
|
4113
4147
|
return c({
|
|
4114
4148
|
type: "speechUtteranceClose",
|
|
@@ -4366,51 +4400,176 @@ function Js(e) {
|
|
|
4366
4400
|
return e === "replace-active" || e === "replace-all" ? "interrupt" : "enqueue";
|
|
4367
4401
|
}
|
|
4368
4402
|
//#endregion
|
|
4369
|
-
//#region src/
|
|
4403
|
+
//#region src/byo/pcm.ts
|
|
4370
4404
|
function Ys(e) {
|
|
4371
|
-
let t =
|
|
4405
|
+
let t = new Uint8Array(e.length * 2), n = new DataView(t.buffer);
|
|
4372
4406
|
for (let t = 0; t < e.length; t++) {
|
|
4373
4407
|
let r = Math.max(-1, Math.min(1, e[t]));
|
|
4374
4408
|
n.setInt16(t * 2, r < 0 ? r * 32768 : r * 32767, !0);
|
|
4375
4409
|
}
|
|
4376
4410
|
return t;
|
|
4377
4411
|
}
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4412
|
+
//#endregion
|
|
4413
|
+
//#region src/byo/resample.ts
|
|
4414
|
+
function Xs(e, t, n, r, i) {
|
|
4415
|
+
let a = -.5 * e + 1.5 * t - 1.5 * n + .5 * r, o = e - 2.5 * t + 2 * n - .5 * r, s = -.5 * e + .5 * n, c = t;
|
|
4416
|
+
return ((a * i + o) * i + s) * i + c;
|
|
4417
|
+
}
|
|
4418
|
+
function Zs(e, t) {
|
|
4419
|
+
if (!(e > 0) || !(t > 0)) throw Error("Resampler rates must be positive");
|
|
4420
|
+
if (e === t) return {
|
|
4421
|
+
fromRate: e,
|
|
4422
|
+
toRate: t,
|
|
4423
|
+
push(e) {
|
|
4424
|
+
return e;
|
|
4425
|
+
},
|
|
4426
|
+
flush() {
|
|
4427
|
+
return new Float32Array();
|
|
4428
|
+
}
|
|
4429
|
+
};
|
|
4430
|
+
let n = e / t, r = new Float32Array(), i = 0;
|
|
4431
|
+
return {
|
|
4432
|
+
fromRate: e,
|
|
4433
|
+
toRate: t,
|
|
4434
|
+
push(e) {
|
|
4435
|
+
if (e.length === 0) return new Float32Array();
|
|
4436
|
+
let t = new Float32Array(r.length + e.length);
|
|
4437
|
+
if (t.set(r), t.set(e, r.length), r = t, r.length < 4) return new Float32Array();
|
|
4438
|
+
let a = [];
|
|
4439
|
+
for (; i + 2 < r.length - 1;) {
|
|
4440
|
+
let e = Math.floor(i), t = i - e, o = Math.max(0, e - 1), s = Math.min(r.length - 1, e + 1), c = Math.min(r.length - 1, e + 2);
|
|
4441
|
+
a.push(Xs(r[o], r[e], r[s], r[c], t)), i += n;
|
|
4442
|
+
}
|
|
4443
|
+
let o = Math.max(0, Math.floor(i) - 1);
|
|
4444
|
+
return o > 0 && (r = r.subarray(o), i -= o), a.length ? Float32Array.from(a) : new Float32Array();
|
|
4445
|
+
},
|
|
4446
|
+
flush() {
|
|
4447
|
+
return r.length === 0 ? new Float32Array() : (r = new Float32Array(), i = 0, new Float32Array());
|
|
4448
|
+
}
|
|
4449
|
+
};
|
|
4450
|
+
}
|
|
4451
|
+
//#endregion
|
|
4452
|
+
//#region src/byo/audioCapture.ts
|
|
4453
|
+
var Qs = "liforma-pcm-capture", $s = `
|
|
4454
|
+
class LiformaPcmCaptureProcessor extends AudioWorkletProcessor {
|
|
4455
|
+
process(inputs) {
|
|
4456
|
+
const ch = inputs[0] && inputs[0][0];
|
|
4457
|
+
if (ch && ch.length) {
|
|
4458
|
+
const copy = new Float32Array(ch.length);
|
|
4459
|
+
copy.set(ch);
|
|
4460
|
+
this.port.postMessage(copy, [copy.buffer]);
|
|
4461
|
+
}
|
|
4462
|
+
return true;
|
|
4463
|
+
}
|
|
4464
|
+
}
|
|
4465
|
+
registerProcessor('${Qs}', LiformaPcmCaptureProcessor);
|
|
4466
|
+
`, ec = null;
|
|
4467
|
+
function tc() {
|
|
4468
|
+
return ec ||= URL.createObjectURL(new Blob([$s], { type: "application/javascript" })), ec;
|
|
4469
|
+
}
|
|
4470
|
+
function nc() {
|
|
4471
|
+
return window.AudioContext || window.webkitAudioContext || null;
|
|
4472
|
+
}
|
|
4473
|
+
async function rc(e) {
|
|
4474
|
+
let { mediaStream: t, targetSampleRate: n, onPcm: r, shouldSend: i, onLog: a } = e, o = nc();
|
|
4475
|
+
if (!o) throw Error("Web Audio is required for audio capture");
|
|
4476
|
+
let s = new o(), c = s.createMediaStreamSource(t), l = s.createGain();
|
|
4386
4477
|
l.gain.value = 0;
|
|
4387
|
-
let u =
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4478
|
+
let u = s.sampleRate, d = Zs(u, n), f = !1, p = !1, m = (e) => {
|
|
4479
|
+
if (f || i && !i()) return;
|
|
4480
|
+
let t = d.push(e);
|
|
4481
|
+
t.length !== 0 && r(Ys(t));
|
|
4482
|
+
}, h = () => void 0;
|
|
4483
|
+
return await (async () => {
|
|
4484
|
+
if (typeof s.audioWorklet?.addModule != "function") return !1;
|
|
4485
|
+
try {
|
|
4486
|
+
await s.audioWorklet.addModule(tc());
|
|
4487
|
+
let e = new AudioWorkletNode(s, Qs, {
|
|
4488
|
+
numberOfInputs: 1,
|
|
4489
|
+
numberOfOutputs: 1,
|
|
4490
|
+
outputChannelCount: [1]
|
|
4491
|
+
});
|
|
4492
|
+
return e.port.onmessage = (e) => {
|
|
4493
|
+
e.data instanceof Float32Array && m(e.data);
|
|
4494
|
+
}, c.connect(e), e.connect(l), l.connect(s.destination), h = () => {
|
|
4495
|
+
e.port.onmessage = null;
|
|
4496
|
+
try {
|
|
4497
|
+
e.disconnect();
|
|
4498
|
+
} catch {}
|
|
4499
|
+
try {
|
|
4500
|
+
c.disconnect();
|
|
4501
|
+
} catch {}
|
|
4502
|
+
try {
|
|
4503
|
+
l.disconnect();
|
|
4504
|
+
} catch {}
|
|
4505
|
+
}, p = !0, !0;
|
|
4506
|
+
} catch {
|
|
4507
|
+
return !1;
|
|
4508
|
+
}
|
|
4509
|
+
})() ? a?.(`Mic/track capture via AudioWorklet at ${u} Hz → ${n} Hz`) : ((() => {
|
|
4510
|
+
let e = s.createScriptProcessor?.bind(s);
|
|
4511
|
+
if (!e) throw Error("Neither AudioWorklet nor ScriptProcessor is available");
|
|
4512
|
+
let t = e(4096, 1, 1);
|
|
4513
|
+
t.onaudioprocess = (e) => {
|
|
4514
|
+
m(e.inputBuffer.getChannelData(0));
|
|
4515
|
+
}, c.connect(t), t.connect(l), l.connect(s.destination), h = () => {
|
|
4516
|
+
t.onaudioprocess = null;
|
|
4517
|
+
try {
|
|
4518
|
+
t.disconnect();
|
|
4519
|
+
} catch {}
|
|
4392
4520
|
try {
|
|
4393
|
-
c.disconnect()
|
|
4521
|
+
c.disconnect();
|
|
4394
4522
|
} catch {}
|
|
4395
|
-
|
|
4523
|
+
try {
|
|
4524
|
+
l.disconnect();
|
|
4525
|
+
} catch {}
|
|
4526
|
+
}, p = !1;
|
|
4527
|
+
})(), a?.(`Mic/track capture via ScriptProcessor at ${u} Hz → ${n} Hz`, "warn")), s.state === "suspended" && await s.resume().catch(() => void 0), {
|
|
4528
|
+
fromSampleRate: u,
|
|
4529
|
+
usingWorklet: p,
|
|
4530
|
+
stop() {
|
|
4531
|
+
f || (f = !0, d.flush(), h(), s.close().catch(() => void 0));
|
|
4396
4532
|
}
|
|
4397
4533
|
};
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4534
|
+
}
|
|
4535
|
+
//#endregion
|
|
4536
|
+
//#region src/v2/speech/captureMediaStreamTrack.ts
|
|
4537
|
+
async function ic(e) {
|
|
4538
|
+
let { track: t, utterance: n, sampleRate: r, signal: i } = e;
|
|
4539
|
+
if (typeof MediaStreamTrack > "u" || !(t instanceof MediaStreamTrack)) throw new Q("MediaStreamTrack is not available in this environment.");
|
|
4540
|
+
if (t.kind !== "audio") throw new Q("speech.play track must be an audio MediaStreamTrack.");
|
|
4541
|
+
if (t.readyState === "ended" || i?.aborted) return;
|
|
4542
|
+
let a = new MediaStream([t]), o = Promise.resolve(), s = !1, c = null, l = () => {
|
|
4543
|
+
s || (s = !0, c?.stop(), c = null);
|
|
4544
|
+
};
|
|
4545
|
+
try {
|
|
4546
|
+
c = await rc({
|
|
4547
|
+
mediaStream: a,
|
|
4548
|
+
targetSampleRate: r,
|
|
4549
|
+
shouldSend: () => !s && !i?.aborted,
|
|
4550
|
+
onPcm: (e) => {
|
|
4551
|
+
if (s || i?.aborted) return;
|
|
4552
|
+
let t = qs(e);
|
|
4553
|
+
o = o.then(async () => {
|
|
4554
|
+
if (s || i?.aborted) return;
|
|
4555
|
+
let e = 0;
|
|
4556
|
+
for (; e < t.byteLength;) {
|
|
4557
|
+
let r = Math.min(e + Rs.MAX_CHUNK_BYTES, t.byteLength);
|
|
4558
|
+
if ((r - e) % 2 == 1 && --r, r <= e) break;
|
|
4559
|
+
let i = t.subarray(e, r);
|
|
4560
|
+
e = r, i.byteLength !== 0 && await n.write(i);
|
|
4561
|
+
}
|
|
4562
|
+
}).catch(() => {
|
|
4563
|
+
l();
|
|
4564
|
+
});
|
|
4407
4565
|
}
|
|
4408
|
-
}).catch(() => {
|
|
4409
|
-
m();
|
|
4410
4566
|
});
|
|
4411
|
-
}
|
|
4567
|
+
} catch (e) {
|
|
4568
|
+
throw l(), new Q(`MediaStreamTrack capture failed: ${e instanceof Error ? e.message : String(e)}`);
|
|
4569
|
+
}
|
|
4570
|
+
await new Promise((e) => {
|
|
4412
4571
|
let r = () => {
|
|
4413
|
-
|
|
4572
|
+
l(), o.finally(e);
|
|
4414
4573
|
};
|
|
4415
4574
|
t.addEventListener("ended", r, { once: !0 }), i?.addEventListener("abort", () => {
|
|
4416
4575
|
n.cancel().catch(() => void 0), r();
|
|
@@ -4419,7 +4578,7 @@ async function Xs(e) {
|
|
|
4419
4578
|
}
|
|
4420
4579
|
//#endregion
|
|
4421
4580
|
//#region src/v2/speech/speechController.ts
|
|
4422
|
-
async function
|
|
4581
|
+
async function ac(e, t) {
|
|
4423
4582
|
if (Fs(e)) throw new Q("MediaStreamTrack play is handled on the host before embed.");
|
|
4424
4583
|
if (Ns(e)) {
|
|
4425
4584
|
let t = qs(e.data);
|
|
@@ -4448,10 +4607,10 @@ async function Zs(e, t) {
|
|
|
4448
4607
|
...e.sampleRate === void 0 ? {} : { sampleRate: e.sampleRate }
|
|
4449
4608
|
};
|
|
4450
4609
|
}
|
|
4451
|
-
function
|
|
4610
|
+
function oc() {
|
|
4452
4611
|
return typeof crypto < "u" && typeof crypto.randomUUID == "function" ? `utt_${crypto.randomUUID().replace(/-/g, "").slice(0, 12)}` : `utt_${Date.now().toString(36)}${Math.random().toString(36).slice(2, 8)}`;
|
|
4453
4612
|
}
|
|
4454
|
-
function
|
|
4613
|
+
function sc(e, t = "completed") {
|
|
4455
4614
|
return {
|
|
4456
4615
|
utteranceId: e.speechId,
|
|
4457
4616
|
characterId: e.characterId,
|
|
@@ -4465,13 +4624,13 @@ function $s(e, t = "completed") {
|
|
|
4465
4624
|
}
|
|
4466
4625
|
};
|
|
4467
4626
|
}
|
|
4468
|
-
function
|
|
4627
|
+
function cc(e) {
|
|
4469
4628
|
return e instanceof Error ? e : new Q(String(e));
|
|
4470
4629
|
}
|
|
4471
|
-
function
|
|
4630
|
+
function lc(e) {
|
|
4472
4631
|
return e instanceof DOMException && e.name === "AbortError" || e instanceof Error && e.name === "AbortError";
|
|
4473
4632
|
}
|
|
4474
|
-
var
|
|
4633
|
+
var uc = class {
|
|
4475
4634
|
id;
|
|
4476
4635
|
characterId;
|
|
4477
4636
|
result;
|
|
@@ -4497,9 +4656,10 @@ var nc = class {
|
|
|
4497
4656
|
utteranceId: this.id,
|
|
4498
4657
|
format: this.format,
|
|
4499
4658
|
characterId: this.characterId,
|
|
4500
|
-
queue: e.queue
|
|
4659
|
+
queue: e.queue,
|
|
4660
|
+
...e.transcript === void 0 ? {} : { transcript: e.transcript }
|
|
4501
4661
|
}).catch((e) => {
|
|
4502
|
-
throw this.fail(
|
|
4662
|
+
throw this.fail(cc(e)), cc(e);
|
|
4503
4663
|
}), this.signal?.addEventListener("abort", () => {
|
|
4504
4664
|
this.cancel();
|
|
4505
4665
|
}, { once: !0 });
|
|
@@ -4532,6 +4692,13 @@ var nc = class {
|
|
|
4532
4692
|
this.releaseWriteSlot();
|
|
4533
4693
|
}
|
|
4534
4694
|
}
|
|
4695
|
+
async setTranscript(e) {
|
|
4696
|
+
if (this.closed || this.settled || (await this.beginPromise.catch(() => void 0), this.closed || this.settled)) throw new Bs();
|
|
4697
|
+
await this.requireHost().speechUtteranceSetTranscript({
|
|
4698
|
+
utteranceId: this.id,
|
|
4699
|
+
transcript: e
|
|
4700
|
+
});
|
|
4701
|
+
}
|
|
4535
4702
|
async close(e) {
|
|
4536
4703
|
if (this.settled) return this.result;
|
|
4537
4704
|
this.closed = !0, await this.beginPromise.catch(() => void 0), await this.writeChain.catch(() => void 0);
|
|
@@ -4543,7 +4710,7 @@ var nc = class {
|
|
|
4543
4710
|
});
|
|
4544
4711
|
return this.resolve(t), t;
|
|
4545
4712
|
} catch (e) {
|
|
4546
|
-
let t =
|
|
4713
|
+
let t = cc(e);
|
|
4547
4714
|
throw this.fail(t), t;
|
|
4548
4715
|
}
|
|
4549
4716
|
}
|
|
@@ -4565,7 +4732,7 @@ var nc = class {
|
|
|
4565
4732
|
};
|
|
4566
4733
|
return this.resolve(t), t;
|
|
4567
4734
|
} catch (e) {
|
|
4568
|
-
let t =
|
|
4735
|
+
let t = cc(e);
|
|
4569
4736
|
throw this.fail(t), t;
|
|
4570
4737
|
}
|
|
4571
4738
|
}
|
|
@@ -4609,7 +4776,7 @@ var nc = class {
|
|
|
4609
4776
|
for (; this.pendingWriteWaiters.length > 0;) this.pendingWriteWaiters.shift()?.reject(e);
|
|
4610
4777
|
}
|
|
4611
4778
|
};
|
|
4612
|
-
function
|
|
4779
|
+
function dc(e) {
|
|
4613
4780
|
let t = null, n = (t, n) => {
|
|
4614
4781
|
if (!e.getCapabilities()[n]) throw new zs(t, n);
|
|
4615
4782
|
}, r = {
|
|
@@ -4635,9 +4802,9 @@ function rc(e) {
|
|
|
4635
4802
|
return;
|
|
4636
4803
|
}
|
|
4637
4804
|
t.addEventListener("abort", s, { once: !0 }), o.then((e) => {
|
|
4638
|
-
t.removeEventListener("abort", s), n(
|
|
4805
|
+
t.removeEventListener("abort", s), n(sc(e, "completed"));
|
|
4639
4806
|
}, (a) => {
|
|
4640
|
-
if (t.removeEventListener("abort", s),
|
|
4807
|
+
if (t.removeEventListener("abort", s), lc(a)) {
|
|
4641
4808
|
n({
|
|
4642
4809
|
utteranceId: "utt_interrupted",
|
|
4643
4810
|
characterId: r.characterId ?? e.getActiveCharacterId(),
|
|
@@ -4648,14 +4815,14 @@ function rc(e) {
|
|
|
4648
4815
|
});
|
|
4649
4816
|
return;
|
|
4650
4817
|
}
|
|
4651
|
-
i(
|
|
4818
|
+
i(cc(a));
|
|
4652
4819
|
});
|
|
4653
4820
|
});
|
|
4654
4821
|
}
|
|
4655
4822
|
try {
|
|
4656
|
-
return
|
|
4823
|
+
return sc(await o, "completed");
|
|
4657
4824
|
} catch (t) {
|
|
4658
|
-
if (
|
|
4825
|
+
if (lc(t)) return {
|
|
4659
4826
|
utteranceId: "utt_interrupted",
|
|
4660
4827
|
characterId: r.characterId ?? e.getActiveCharacterId(),
|
|
4661
4828
|
status: "interrupted",
|
|
@@ -4663,7 +4830,7 @@ function rc(e) {
|
|
|
4663
4830
|
transcript: r.text,
|
|
4664
4831
|
animation: Hs("none")
|
|
4665
4832
|
};
|
|
4666
|
-
throw
|
|
4833
|
+
throw cc(t);
|
|
4667
4834
|
}
|
|
4668
4835
|
},
|
|
4669
4836
|
async play(i) {
|
|
@@ -4685,7 +4852,7 @@ function rc(e) {
|
|
|
4685
4852
|
}
|
|
4686
4853
|
let o = e.getIframeHost();
|
|
4687
4854
|
if (!o) throw new Q("Speech session is not attached.");
|
|
4688
|
-
let s = await
|
|
4855
|
+
let s = await ac(i.audio, i.signal);
|
|
4689
4856
|
return o.speechPlay({
|
|
4690
4857
|
source: s,
|
|
4691
4858
|
characterId: i.characterId,
|
|
@@ -4702,19 +4869,20 @@ function rc(e) {
|
|
|
4702
4869
|
let a = r.queue ?? "replace-active";
|
|
4703
4870
|
if (a !== "replace-active" && a !== "replace-all") throw new Q("createUtterance queue must be replace-active or replace-all.");
|
|
4704
4871
|
e.onProcessorInterrupt?.(), t &&= (t.cancel(), null);
|
|
4705
|
-
let o = new
|
|
4706
|
-
id:
|
|
4872
|
+
let o = new uc({
|
|
4873
|
+
id: oc(),
|
|
4707
4874
|
characterId: r.characterId ?? e.getActiveCharacterId(),
|
|
4708
4875
|
format: i,
|
|
4709
4876
|
queue: a,
|
|
4710
4877
|
host: e,
|
|
4878
|
+
...r.transcript === void 0 ? {} : { transcript: r.transcript },
|
|
4711
4879
|
signal: r.signal
|
|
4712
4880
|
});
|
|
4713
4881
|
return t = o, o.result.finally(() => {
|
|
4714
4882
|
t === o && (t = null);
|
|
4715
4883
|
}), r.track && (async () => {
|
|
4716
4884
|
try {
|
|
4717
|
-
if (await
|
|
4885
|
+
if (await ic({
|
|
4718
4886
|
track: r.track,
|
|
4719
4887
|
utterance: o,
|
|
4720
4888
|
sampleRate: i.sampleRate,
|
|
@@ -4742,7 +4910,7 @@ function rc(e) {
|
|
|
4742
4910
|
}
|
|
4743
4911
|
//#endregion
|
|
4744
4912
|
//#region src/v2/experience.ts
|
|
4745
|
-
function
|
|
4913
|
+
function fc(e, t) {
|
|
4746
4914
|
return t ? Zo({
|
|
4747
4915
|
...e,
|
|
4748
4916
|
experience: {
|
|
@@ -4751,7 +4919,7 @@ function ic(e, t) {
|
|
|
4751
4919
|
}
|
|
4752
4920
|
}) : e;
|
|
4753
4921
|
}
|
|
4754
|
-
var
|
|
4922
|
+
var pc = class e {
|
|
4755
4923
|
launch;
|
|
4756
4924
|
conversationProcessor;
|
|
4757
4925
|
iframeHost = null;
|
|
@@ -4769,10 +4937,10 @@ var ac = class e {
|
|
|
4769
4937
|
conversationCache = [];
|
|
4770
4938
|
speech;
|
|
4771
4939
|
constructor(e) {
|
|
4772
|
-
this.launch = e, this.conversationProcessor = e.conversationProcessor ?? null, this.resolvedManifest = e.kind === "manifest" ? e.manifest : null, this.speech =
|
|
4940
|
+
this.launch = e, this.conversationProcessor = e.conversationProcessor ?? null, this.resolvedManifest = e.kind === "manifest" ? e.manifest : null, this.speech = dc({
|
|
4773
4941
|
getIframeHost: () => this.iframeHost,
|
|
4774
4942
|
assertSessionStarted: () => this.assertSessionStarted(),
|
|
4775
|
-
getCapabilities: () =>
|
|
4943
|
+
getCapabilities: () => mc(this.resolvedManifest),
|
|
4776
4944
|
getActiveCharacterId: () => this.resolvedManifest?.activeCharacterId ?? "character_unknown",
|
|
4777
4945
|
onProcessorInterrupt: () => {
|
|
4778
4946
|
this.processorAbortController?.abort(), this.processorAbortController = null;
|
|
@@ -4903,7 +5071,10 @@ var ac = class e {
|
|
|
4903
5071
|
onWidgetReady: () => e.onWidgetReady?.(),
|
|
4904
5072
|
onWidgetExpand: () => e.onWidgetExpand?.(),
|
|
4905
5073
|
onWidgetCollapse: () => e.onWidgetCollapse?.(),
|
|
4906
|
-
onWidgetAudioSettings: (t) => e.onWidgetAudioSettings?.(t)
|
|
5074
|
+
onWidgetAudioSettings: (t) => e.onWidgetAudioSettings?.(t),
|
|
5075
|
+
onWidgetDragStart: (t) => e.onWidgetDragStart?.(t),
|
|
5076
|
+
onWidgetDragMove: (t) => e.onWidgetDragMove?.(t),
|
|
5077
|
+
onWidgetDragEnd: (t) => e.onWidgetDragEnd?.(t)
|
|
4907
5078
|
});
|
|
4908
5079
|
this.iframeHost = f;
|
|
4909
5080
|
let p = this.resolveMintInteraction(), m = this.launch.kind === "sessionEndpoint" ? (this.endpointAbortController = new AbortController(), ns(this.launch.sessionEndpoint, {
|
|
@@ -4931,7 +5102,7 @@ var ac = class e {
|
|
|
4931
5102
|
this.endpointAbortController = null;
|
|
4932
5103
|
}
|
|
4933
5104
|
if (f.postParentHello(), h) {
|
|
4934
|
-
let e =
|
|
5105
|
+
let e = fc(h, this.launch.startButton);
|
|
4935
5106
|
this.launch.speechOnly && (e = ks(e)), this.assertBrowserCustomManifest(e), this.resolvedManifest = e, f.postManifest(e), u.setValue(e);
|
|
4936
5107
|
}
|
|
4937
5108
|
return await Promise.race([s, new Promise((e, t) => {
|
|
@@ -5041,7 +5212,7 @@ var ac = class e {
|
|
|
5041
5212
|
};
|
|
5042
5213
|
}
|
|
5043
5214
|
};
|
|
5044
|
-
function
|
|
5215
|
+
function mc(e) {
|
|
5045
5216
|
let t = e?.capabilities ?? [], n = t.includes("textSpeech"), r = t.includes("externalSpeechAudio");
|
|
5046
5217
|
return !n && !r ? {
|
|
5047
5218
|
textSpeech: !0,
|
|
@@ -5053,41 +5224,41 @@ function oc(e) {
|
|
|
5053
5224
|
}
|
|
5054
5225
|
//#endregion
|
|
5055
5226
|
//#region src/widget/dockGeometry.ts
|
|
5056
|
-
var
|
|
5057
|
-
function
|
|
5227
|
+
var hc = "(min-width: 768px)", gc = 24, _c = .5, vc = 1200, yc = .85, bc = 9 / 16;
|
|
5228
|
+
function xc() {
|
|
5058
5229
|
if (typeof window > "u") return 800;
|
|
5059
5230
|
let e = window.screen?.availHeight;
|
|
5060
5231
|
return typeof e == "number" && e > 0 ? e : window.innerHeight;
|
|
5061
5232
|
}
|
|
5062
|
-
function
|
|
5063
|
-
let i = Math.max(160, Math.min(t - n * 2, t *
|
|
5064
|
-
return s > a && (s = a, o = s /
|
|
5233
|
+
function Sc(e = typeof window < "u" ? window.innerWidth : 1280, t = typeof window < "u" ? window.innerHeight : 800, n = gc, r = typeof window < "u" ? xc() : 800) {
|
|
5234
|
+
let i = Math.max(160, Math.min(t - n * 2, t * yc)), a = Math.max(120, e - n * 2), o = Math.min(r * _c, vc, i), s = o * bc;
|
|
5235
|
+
return s > a && (s = a, o = s / bc, o > i && (o = i, s = o * bc)), {
|
|
5065
5236
|
width: Math.round(s),
|
|
5066
5237
|
height: Math.round(o)
|
|
5067
5238
|
};
|
|
5068
5239
|
}
|
|
5069
|
-
function
|
|
5240
|
+
function Cc(e, t = typeof window < "u" ? window.innerWidth : 1280, n = typeof window < "u" ? window.innerHeight : 800, r = gc) {
|
|
5070
5241
|
return {
|
|
5071
5242
|
left: Math.max(r, t - e.width - r),
|
|
5072
5243
|
top: Math.max(r, n - e.height - r)
|
|
5073
5244
|
};
|
|
5074
5245
|
}
|
|
5075
|
-
function
|
|
5246
|
+
function wc(e, t, n, r = typeof window < "u" ? window.innerWidth : 1280, i = typeof window < "u" ? window.innerHeight : 800, a = gc) {
|
|
5076
5247
|
let o = Math.max(a, r - n.width - a), s = Math.max(a, i - n.height - a);
|
|
5077
5248
|
return {
|
|
5078
5249
|
left: Math.min(Math.max(a, e), o),
|
|
5079
5250
|
top: Math.min(Math.max(a, t), s)
|
|
5080
5251
|
};
|
|
5081
5252
|
}
|
|
5082
|
-
function
|
|
5083
|
-
return e(
|
|
5253
|
+
function Tc(e = typeof window < "u" ? window.matchMedia.bind(window) : () => ({ matches: !0 })) {
|
|
5254
|
+
return e(hc).matches;
|
|
5084
5255
|
}
|
|
5085
5256
|
//#endregion
|
|
5086
5257
|
//#region src/widget/mountExperienceWidget.ts
|
|
5087
|
-
function
|
|
5258
|
+
function Ec(e) {
|
|
5088
5259
|
return e === "bottom-right" || e === "bottom-left" ? e : "static";
|
|
5089
5260
|
}
|
|
5090
|
-
function
|
|
5261
|
+
function Dc(e) {
|
|
5091
5262
|
if (typeof e == "number" && Number.isFinite(e)) return `${e}px`;
|
|
5092
5263
|
let t = typeof e == "string" ? e.trim() : "";
|
|
5093
5264
|
return t ? /^\d+(\.\d+)?$/.test(t) ? `${t}px` : t : "16px";
|
|
@@ -5095,9 +5266,9 @@ function yc(e) {
|
|
|
5095
5266
|
function $(e) {
|
|
5096
5267
|
return e === "expanded" || e === "docked";
|
|
5097
5268
|
}
|
|
5098
|
-
var
|
|
5099
|
-
function
|
|
5100
|
-
|
|
5269
|
+
var Oc = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 0 0 2.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 0 0 1.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 0 0-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 0 0-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 0 0-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 0 0-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 0 0 1.066-2.573c-.94-1.543.826-3.31 2.37-2.37c1 .608 2.296.07 2.572-1.065\"/><path d=\"M9 12a3 3 0 1 0 6 0a3 3 0 0 0-6 0\"/></svg>", kc = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\"><path fill=\"currentColor\" d=\"M18.3 5.71a1 1 0 0 0-1.41 0L12 10.59 7.11 5.7A1 1 0 0 0 5.7 7.11L10.59 12l-4.9 4.89a1 1 0 1 0 1.42 1.42L12 13.41l4.89 4.9a1 1 0 0 0 1.42-1.42L13.41 12l4.9-4.89a1 1 0 0 0-.01-1.4Z\"/></svg>", Ac = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M18 10h-4V6m6-2l-6 6m-8 4h4v4m0-4l-6 6\"/></svg>", jc = "<svg viewBox=\"0 0 24 24\" aria-hidden=\"true\" focusable=\"false\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M16 4h4v4m-6 2l6-6M8 20H4v-4m0 4l6-6\"/></svg>";
|
|
5270
|
+
function Mc(e, t, n) {
|
|
5271
|
+
O(le);
|
|
5101
5272
|
let r = o({
|
|
5102
5273
|
galleryThumb: t.galleryThumb,
|
|
5103
5274
|
avatarImage: t.avatarImage,
|
|
@@ -5124,9 +5295,9 @@ function wc(e, t, n) {
|
|
|
5124
5295
|
let e = document.createElement("img");
|
|
5125
5296
|
e.className = "liforma-et__foreground liforma-et__media", e.alt = "", e.decoding = "async", e.src = r.foregroundImage, e.addEventListener("load", () => s(e), { once: !0 }), i.append(e);
|
|
5126
5297
|
}
|
|
5127
|
-
return e.replaceChildren(i), n?.parallax === !1 ? () => {} :
|
|
5298
|
+
return e.replaceChildren(i), n?.parallax === !1 ? () => {} : D(i);
|
|
5128
5299
|
}
|
|
5129
|
-
function
|
|
5300
|
+
function Nc(e) {
|
|
5130
5301
|
return e.startButton ? {
|
|
5131
5302
|
...e.startButton,
|
|
5132
5303
|
label: e.startButton.label ?? e.startButtonLabel ?? "Tap to talk",
|
|
@@ -5138,7 +5309,7 @@ function Tc(e) {
|
|
|
5138
5309
|
variant: "primary"
|
|
5139
5310
|
};
|
|
5140
5311
|
}
|
|
5141
|
-
function
|
|
5312
|
+
function Pc(e) {
|
|
5142
5313
|
let t = !1, n = () => {
|
|
5143
5314
|
t || e();
|
|
5144
5315
|
}, r = () => {
|
|
@@ -5158,12 +5329,12 @@ function Ec(e) {
|
|
|
5158
5329
|
t = !0, window.removeEventListener("load", r), i?.();
|
|
5159
5330
|
};
|
|
5160
5331
|
}
|
|
5161
|
-
function
|
|
5162
|
-
|
|
5332
|
+
function Fc(e, t) {
|
|
5333
|
+
pe(de);
|
|
5163
5334
|
let n = t.experienceId?.trim();
|
|
5164
5335
|
if (!n) throw Error("ExperienceWidget requires experienceId.");
|
|
5165
|
-
let r = t.prefetch ?? "onExpand", i =
|
|
5166
|
-
a.className = "liforma-ew", a.dataset.state = "collapsed", a.dataset.prefetch = r, a.dataset.position = i, a.style.setProperty("--liforma-ew-max-w", t.expandedMaxWidth ?? "100%"), a.style.setProperty("--liforma-ew-max-h", t.expandedMaxHeight ?? "100%"), i !== "static" && a.style.setProperty("--liforma-ew-offset",
|
|
5336
|
+
let r = t.prefetch ?? "onExpand", i = Ec(t.position), a = document.createElement("div");
|
|
5337
|
+
a.className = "liforma-ew", a.dataset.state = "collapsed", a.dataset.prefetch = r, a.dataset.position = i, a.style.setProperty("--liforma-ew-max-w", t.expandedMaxWidth ?? "100%"), a.style.setProperty("--liforma-ew-max-h", t.expandedMaxHeight ?? "100%"), i !== "static" && a.style.setProperty("--liforma-ew-offset", Dc(t.offset));
|
|
5167
5338
|
let o = document.createElement("button");
|
|
5168
5339
|
o.type = "button", o.className = "liforma-ew__hit", o.setAttribute("aria-label", t.alt), o.disabled = !0;
|
|
5169
5340
|
let s = document.createElement("div");
|
|
@@ -5183,111 +5354,140 @@ function Dc(e, t) {
|
|
|
5183
5354
|
let m = document.createElement("span");
|
|
5184
5355
|
m.className = "liforma-ew__drag-grip", m.setAttribute("aria-hidden", "true");
|
|
5185
5356
|
let h = document.createElement("button");
|
|
5186
|
-
h.type = "button", h.className = "liforma-ew__icon-btn liforma-ew__dock-toggle", h.innerHTML =
|
|
5357
|
+
h.type = "button", h.className = "liforma-ew__icon-btn liforma-ew__dock-toggle", h.innerHTML = Ac, h.setAttribute("aria-label", "Reduce");
|
|
5187
5358
|
let g = document.createElement("button");
|
|
5188
|
-
g.type = "button", g.className = "liforma-ew__icon-btn liforma-ew__settings", g.innerHTML =
|
|
5359
|
+
g.type = "button", g.className = "liforma-ew__icon-btn liforma-ew__settings", g.innerHTML = Oc, g.setAttribute("aria-label", "Audio settings"), g.setAttribute("aria-pressed", "false");
|
|
5189
5360
|
let ee = document.createElement("button");
|
|
5190
|
-
ee.type = "button", ee.className = "liforma-ew__icon-btn liforma-ew__close", ee.innerHTML =
|
|
5361
|
+
ee.type = "button", ee.className = "liforma-ew__icon-btn liforma-ew__close", ee.innerHTML = kc, ee.setAttribute("aria-label", "Close"), p.append(m, h, g, ee);
|
|
5191
5362
|
let te = document.createElement("div");
|
|
5192
5363
|
te.className = "liforma-ew__stage";
|
|
5193
5364
|
let _ = document.createElement("div");
|
|
5194
5365
|
_.className = "liforma-ew__status", _.hidden = !0, f.append(te, _), u.append(d, f), a.append(o, l, u, p), e.replaceChildren(a);
|
|
5195
|
-
let v = null, y = !1, b = !1, ne = !1,
|
|
5366
|
+
let v = null, y = !1, b = !1, ne = !1, re = !1, ie = !1, x = !1, S = !1, C = 0, ae = "", w = null, oe = null, T = null, se = null, ce = null, E = null, D = null, le = 0, ue = 0, O = null, fe = !1, me = new AbortController(), he = t.parallax !== !1, k = () => {
|
|
5196
5367
|
let e = a.dataset.state;
|
|
5197
5368
|
return e === "expanded" || e === "docked" || e === "collapsed" ? e : "collapsed";
|
|
5198
5369
|
}, ge = () => {
|
|
5199
|
-
|
|
5370
|
+
T !== null && (clearTimeout(T), T = null);
|
|
5200
5371
|
}, _e = () => {
|
|
5201
|
-
|
|
5202
|
-
},
|
|
5372
|
+
se !== null && (clearTimeout(se), se = null), a.classList.remove("liforma-ew--layout-settling");
|
|
5373
|
+
}, ye = () => {
|
|
5203
5374
|
for (let e of [
|
|
5204
5375
|
f,
|
|
5205
5376
|
l,
|
|
5206
5377
|
p
|
|
5207
5378
|
]) e.style.removeProperty("left"), e.style.removeProperty("top"), e.style.removeProperty("width"), e.style.removeProperty("height"), e.style.removeProperty("right"), e.style.removeProperty("bottom");
|
|
5208
|
-
p.classList.remove("liforma-ew__toolbar--dragging");
|
|
5209
|
-
},
|
|
5379
|
+
p.classList.remove("liforma-ew__toolbar--dragging"), a.classList.remove("liforma-ew--dock-dragging");
|
|
5380
|
+
}, be = (e, t, n, r) => {
|
|
5210
5381
|
let i = (i) => {
|
|
5211
5382
|
i.style.left = `${e}px`, i.style.top = `${t}px`, i.style.width = `${n}px`, i.style.height = `${r}px`, i.style.right = "auto", i.style.bottom = "auto";
|
|
5212
5383
|
};
|
|
5213
5384
|
i(f), i(l);
|
|
5214
5385
|
let a = p.offsetWidth || 120;
|
|
5215
5386
|
p.style.left = `${e + n - a - 10}px`, p.style.top = `${t + 10}px`, p.style.right = "auto", p.style.bottom = "auto", p.style.width = "auto", p.style.height = "auto";
|
|
5216
|
-
},
|
|
5217
|
-
|
|
5387
|
+
}, A = (e, t) => {
|
|
5388
|
+
if (k() !== "docked") return;
|
|
5389
|
+
let n = Sc(), r = wc(e - le, t - ue, n);
|
|
5390
|
+
ce = r.left, E = r.top, be(r.left, r.top, n.width, n.height);
|
|
5391
|
+
}, xe = (e, t) => {
|
|
5392
|
+
if (k() !== "docked" || !Number.isFinite(e) || !Number.isFinite(t) || e === 0 && t === 0) return;
|
|
5393
|
+
let n = Sc(), r = ce ?? f.getBoundingClientRect().left, i = E ?? f.getBoundingClientRect().top, a = wc(r + e, i + t, n);
|
|
5394
|
+
ce = a.left, E = a.top, be(a.left, a.top, n.width, n.height);
|
|
5395
|
+
}, Se = (e) => {
|
|
5396
|
+
O === "toolbar" && (D === null || e.pointerId !== D || (e.preventDefault(), A(e.clientX, e.clientY)));
|
|
5397
|
+
}, j = (e) => {
|
|
5398
|
+
if (D === null || e && e.pointerId !== D) return;
|
|
5399
|
+
let t = O;
|
|
5400
|
+
D = null, O = null, p.classList.remove("liforma-ew__toolbar--dragging"), a.classList.remove("liforma-ew--dock-dragging"), t === "toolbar" && fe && (fe = !1, window.removeEventListener("pointermove", Se), window.removeEventListener("pointerup", j), window.removeEventListener("pointercancel", j));
|
|
5401
|
+
}, M = (e, t, n) => {
|
|
5402
|
+
if (b || k() !== "docked" || !Tc() || D !== null) return;
|
|
5403
|
+
D = n, O = "toolbar", p.classList.add("liforma-ew__toolbar--dragging"), a.classList.add("liforma-ew--dock-dragging");
|
|
5404
|
+
let r = f.getBoundingClientRect();
|
|
5405
|
+
le = e - r.left, ue = t - r.top, fe || (fe = !0, window.addEventListener("pointermove", Se), window.addEventListener("pointerup", j), window.addEventListener("pointercancel", j));
|
|
5406
|
+
}, Ce = (e) => {
|
|
5407
|
+
if (b || k() !== "docked" || !Tc() || D !== null) return;
|
|
5408
|
+
D = e.pointerId, O = "player", p.classList.add("liforma-ew__toolbar--dragging"), a.classList.add("liforma-ew--dock-dragging");
|
|
5409
|
+
let t = f.getBoundingClientRect();
|
|
5410
|
+
ce = t.left, E = t.top;
|
|
5411
|
+
}, we = (e) => {
|
|
5412
|
+
O === "player" && (D === null || e.pointerId !== D || xe(e.dx, e.dy));
|
|
5413
|
+
}, Te = (e) => {
|
|
5414
|
+
O === "player" && (D === null || e.pointerId !== D || j());
|
|
5415
|
+
}, N = () => {
|
|
5416
|
+
let e = Tc(), t = k();
|
|
5218
5417
|
if (!e || t !== "expanded" && t !== "docked") {
|
|
5219
5418
|
h.hidden = !0;
|
|
5220
5419
|
return;
|
|
5221
5420
|
}
|
|
5222
|
-
h.hidden = !1, t === "docked" ? (h.innerHTML =
|
|
5223
|
-
},
|
|
5224
|
-
let t =
|
|
5225
|
-
n =
|
|
5226
|
-
},
|
|
5421
|
+
h.hidden = !1, t === "docked" ? (h.innerHTML = jc, h.setAttribute("aria-label", "Maximize")) : (h.innerHTML = Ac, h.setAttribute("aria-label", "Reduce"));
|
|
5422
|
+
}, Ee = (e) => {
|
|
5423
|
+
let t = Sc(), n = e && ce !== null && E !== null ? wc(ce, E, t) : Cc(t);
|
|
5424
|
+
n = wc(n.left, n.top, t), ce = n.left, E = n.top, be(n.left, n.top, t.width, t.height), N();
|
|
5425
|
+
}, De = () => {
|
|
5227
5426
|
a.classList.remove("liforma-ew--session-revealed"), requestAnimationFrame(() => {
|
|
5228
5427
|
requestAnimationFrame(() => {
|
|
5229
5428
|
b || !$(a.dataset.state) || a.classList.add("liforma-ew--session-revealed");
|
|
5230
5429
|
});
|
|
5231
5430
|
});
|
|
5232
|
-
},
|
|
5233
|
-
if (_e(), a.classList.remove("liforma-ew--session-revealed"), a.classList.add("liforma-ew--layout-settling"), e(), !
|
|
5431
|
+
}, Oe = (e) => {
|
|
5432
|
+
if (_e(), a.classList.remove("liforma-ew--session-revealed"), a.classList.add("liforma-ew--layout-settling"), e(), !S) {
|
|
5234
5433
|
a.classList.remove("liforma-ew--layout-settling");
|
|
5235
5434
|
return;
|
|
5236
5435
|
}
|
|
5237
|
-
|
|
5238
|
-
if (
|
|
5436
|
+
se = setTimeout(() => {
|
|
5437
|
+
if (se = null, b || !$(a.dataset.state)) {
|
|
5239
5438
|
a.classList.remove("liforma-ew--layout-settling");
|
|
5240
5439
|
return;
|
|
5241
5440
|
}
|
|
5242
|
-
a.classList.remove("liforma-ew--layout-settling"),
|
|
5441
|
+
a.classList.remove("liforma-ew--layout-settling"), De();
|
|
5243
5442
|
}, 220);
|
|
5244
|
-
},
|
|
5245
|
-
ge(),
|
|
5246
|
-
|
|
5443
|
+
}, P = () => (a.classList.add("liforma-ew--session-concealing"), a.classList.remove("liforma-ew--session-revealed"), new Promise((e) => {
|
|
5444
|
+
ge(), T = setTimeout(() => {
|
|
5445
|
+
T = null, a.classList.remove("liforma-ew--session-concealing"), e();
|
|
5247
5446
|
}, 280);
|
|
5248
|
-
})),
|
|
5447
|
+
})), ke = {
|
|
5249
5448
|
galleryThumb: t.galleryThumb,
|
|
5250
5449
|
avatarImage: t.avatarImage,
|
|
5251
5450
|
backgroundImage: t.backgroundImage,
|
|
5252
5451
|
foregroundImage: t.foregroundImage,
|
|
5253
5452
|
fallbackImage: t.fallbackImage
|
|
5254
|
-
},
|
|
5453
|
+
}, F = (e) => {
|
|
5255
5454
|
if (!e) {
|
|
5256
5455
|
_.hidden = !0, _.textContent = "";
|
|
5257
5456
|
return;
|
|
5258
5457
|
}
|
|
5259
5458
|
_.hidden = !1, _.textContent = e;
|
|
5260
|
-
},
|
|
5459
|
+
}, Ae = (e) => {
|
|
5261
5460
|
if (!e) {
|
|
5262
5461
|
c.hidden = !0, c.textContent = "";
|
|
5263
5462
|
return;
|
|
5264
5463
|
}
|
|
5265
5464
|
c.hidden = !1, c.textContent = e, s.contains(c) || s.append(c);
|
|
5266
|
-
},
|
|
5267
|
-
ne = !0, o.disabled = !1,
|
|
5268
|
-
},
|
|
5269
|
-
|
|
5270
|
-
},
|
|
5271
|
-
|
|
5272
|
-
let t =
|
|
5273
|
-
return t ? (
|
|
5274
|
-
},
|
|
5275
|
-
if (
|
|
5276
|
-
|
|
5465
|
+
}, je = () => {
|
|
5466
|
+
ne = !0, o.disabled = !1, Ae(null), r === "onExpand" && t.onPrefetchReady?.();
|
|
5467
|
+
}, Me = () => {
|
|
5468
|
+
re = !0, a.dataset.warm = "true", l.hidden = !1, S || (o.tabIndex = -1, o.setAttribute("aria-hidden", "true")), t.onPrefetchReady?.();
|
|
5469
|
+
}, Ne = (e) => {
|
|
5470
|
+
w?.(), w = null;
|
|
5471
|
+
let t = Mc(s, e, { parallax: he });
|
|
5472
|
+
return t ? (w = t, !0) : !1;
|
|
5473
|
+
}, Pe = () => {
|
|
5474
|
+
if (Ne(ke)) {
|
|
5475
|
+
je();
|
|
5277
5476
|
return;
|
|
5278
5477
|
}
|
|
5279
|
-
|
|
5478
|
+
Ae("Loading…"), ve(n, { signal: me.signal }).then((e) => {
|
|
5280
5479
|
if (!b) {
|
|
5281
|
-
if (!
|
|
5282
|
-
|
|
5480
|
+
if (!Ne({ galleryThumb: e.galleryThumb })) throw Error("Experience preview is missing gallery thumb images.");
|
|
5481
|
+
je();
|
|
5283
5482
|
}
|
|
5284
5483
|
}).catch((e) => {
|
|
5285
|
-
if (b ||
|
|
5484
|
+
if (b || me.signal.aborted) return;
|
|
5286
5485
|
let n = e instanceof Error ? e : Error(String(e));
|
|
5287
|
-
|
|
5486
|
+
Ae("Preview unavailable"), o.disabled = !0, t.onError?.(n), console.error("[ExperienceWidget]", n);
|
|
5288
5487
|
});
|
|
5289
|
-
},
|
|
5488
|
+
}, Fe = () => ({
|
|
5290
5489
|
experienceId: n,
|
|
5490
|
+
ui: "widget",
|
|
5291
5491
|
...t.sessionEndpoint ? { sessionEndpoint: t.sessionEndpoint } : {},
|
|
5292
5492
|
...t.language ? { language: t.language } : {},
|
|
5293
5493
|
...t.mode ? { mode: t.mode } : {},
|
|
@@ -5295,222 +5495,223 @@ function Dc(e, t) {
|
|
|
5295
5495
|
...t.speechOnly === void 0 ? {} : { speechOnly: t.speechOnly },
|
|
5296
5496
|
...t.fit ? { fit: t.fit } : {},
|
|
5297
5497
|
...t.embedBaseUrl ? { embedBaseUrl: t.embedBaseUrl } : {},
|
|
5298
|
-
startButton:
|
|
5299
|
-
}),
|
|
5300
|
-
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "true"),
|
|
5301
|
-
},
|
|
5302
|
-
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "false"), a.dataset.state = "docked",
|
|
5303
|
-
},
|
|
5498
|
+
startButton: Nc(t)
|
|
5499
|
+
}), Ie = (e = !0) => {
|
|
5500
|
+
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "true"), ye(), a.dataset.state = "expanded", F(null), typeof document < "u" && (ae = document.body.style.overflow, document.body.style.overflow = "hidden"), N(), e && t.onExpanded?.();
|
|
5501
|
+
}, Le = () => {
|
|
5502
|
+
o.hidden = !0, u.hidden = !1, p.hidden = !1, u.setAttribute("aria-modal", "false"), a.dataset.state = "docked", F(null), typeof document < "u" && (document.body.style.overflow = ae), Ee(!0), N(), v?.setWidgetChrome("docked");
|
|
5503
|
+
}, Re = (e) => {
|
|
5304
5504
|
e.on("started", () => {
|
|
5305
|
-
b || (
|
|
5505
|
+
b || (S = !0, a.dataset.live = "true", F(null), t.onStarted?.(), $(a.dataset.state) && De());
|
|
5306
5506
|
});
|
|
5307
|
-
},
|
|
5308
|
-
_e(), u.hidden = !0, p.hidden = !0,
|
|
5309
|
-
},
|
|
5310
|
-
ge(), _e(),
|
|
5507
|
+
}, I = () => {
|
|
5508
|
+
_e(), u.hidden = !0, p.hidden = !0, ye(), a.dataset.state = "collapsed", a.classList.remove("liforma-ew--session-revealed"), a.classList.remove("liforma-ew--session-concealing"), g.setAttribute("aria-pressed", "false"), o.hidden = !1, o.tabIndex = 0, o.removeAttribute("aria-hidden"), ne && (o.disabled = !1), F(null), typeof document < "u" && (document.body.style.overflow = ae), N();
|
|
5509
|
+
}, L = () => {
|
|
5510
|
+
ge(), _e(), C += 1, y = !1, re = !1, ie = !1, x = !1, S = !1;
|
|
5311
5511
|
let e = v;
|
|
5312
5512
|
v = null, e?.destroy(), te.replaceChildren(), l.replaceChildren(), l.hidden = !0, delete a.dataset.warm, delete a.dataset.live, a.classList.remove("liforma-ew--session-revealed");
|
|
5313
|
-
},
|
|
5513
|
+
}, ze = () => {
|
|
5314
5514
|
if (!b && $(a.dataset.state)) {
|
|
5315
|
-
if (y = !1, v &&
|
|
5515
|
+
if (j(), y = !1, v && x) {
|
|
5316
5516
|
let e = v;
|
|
5317
5517
|
(async () => {
|
|
5318
|
-
|
|
5518
|
+
S && (await P(), b || v !== e) || (re && e.setWidgetChrome("collapsed"), I(), S ? (a.dataset.live = "true", o.tabIndex = 0, o.removeAttribute("aria-hidden"), o.disabled = !1) : re && Me(), t.onCollapsed?.(), t.onClose?.());
|
|
5319
5519
|
})();
|
|
5320
5520
|
return;
|
|
5321
5521
|
}
|
|
5322
|
-
|
|
5522
|
+
L(), I(), t.onCollapsed?.(), t.onClose?.();
|
|
5323
5523
|
}
|
|
5324
|
-
},
|
|
5325
|
-
b ||
|
|
5326
|
-
|
|
5327
|
-
});
|
|
5328
|
-
}, F = () => {
|
|
5329
|
-
b || D() === "docked" && A(() => {
|
|
5330
|
-
ve(), Ae(!1), v?.setWidgetChrome("expanded");
|
|
5524
|
+
}, Be = () => {
|
|
5525
|
+
b || Tc() && k() === "expanded" && Oe(() => {
|
|
5526
|
+
Le();
|
|
5331
5527
|
});
|
|
5332
|
-
},
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
},
|
|
5337
|
-
|
|
5338
|
-
},
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5528
|
+
}, Ve = () => {
|
|
5529
|
+
b || k() === "docked" && (j(), Oe(() => {
|
|
5530
|
+
ye(), Ie(!1), v?.setWidgetChrome("expanded");
|
|
5531
|
+
}));
|
|
5532
|
+
}, He = () => {
|
|
5533
|
+
!v || !S || (ge(), a.classList.remove("liforma-ew--session-revealed"), Ie(), v.setWidgetChrome("expanded"), y = !1, De());
|
|
5534
|
+
}, Ue = () => {
|
|
5535
|
+
!v || !x || S || (ge(), a.classList.remove("liforma-ew--session-revealed"), Ie(), y = !1, re && v.setWidgetChrome("expanded"));
|
|
5536
|
+
}, We = (e) => {
|
|
5537
|
+
b || e !== C && !S || (ge(), a.classList.remove("liforma-ew--session-revealed"), Ie(), y = !1, v?.setWidgetChrome("expanded"), S && De());
|
|
5538
|
+
}, Ge = () => {
|
|
5539
|
+
if (b || ie || re || v || $(a.dataset.state)) return;
|
|
5540
|
+
ie = !0;
|
|
5541
|
+
let e = C;
|
|
5342
5542
|
l.hidden = !1, (async () => {
|
|
5343
5543
|
try {
|
|
5344
|
-
let t = await
|
|
5345
|
-
|
|
5346
|
-
ui: "widget"
|
|
5347
|
-
});
|
|
5348
|
-
if (b || e !== w) {
|
|
5544
|
+
let t = await pc.startSession(Fe());
|
|
5545
|
+
if (b || e !== C) {
|
|
5349
5546
|
t.destroy();
|
|
5350
5547
|
return;
|
|
5351
5548
|
}
|
|
5352
|
-
v = t,
|
|
5549
|
+
v = t, Re(t);
|
|
5353
5550
|
let n = await t.attach({
|
|
5354
5551
|
container: l,
|
|
5355
5552
|
onWidgetReady: () => {
|
|
5356
|
-
b || e !==
|
|
5553
|
+
b || e !== C || (ie = !1, x = !0, Me());
|
|
5357
5554
|
},
|
|
5358
5555
|
onWidgetExpand: () => {
|
|
5359
|
-
|
|
5556
|
+
We(e);
|
|
5360
5557
|
},
|
|
5361
5558
|
onWidgetAudioSettings: (e) => {
|
|
5362
|
-
b ||
|
|
5559
|
+
b || Ye(e);
|
|
5560
|
+
},
|
|
5561
|
+
onWidgetDragStart: (e) => {
|
|
5562
|
+
b || Ce(e);
|
|
5563
|
+
},
|
|
5564
|
+
onWidgetDragMove: (e) => {
|
|
5565
|
+
b || we(e);
|
|
5566
|
+
},
|
|
5567
|
+
onWidgetDragEnd: (e) => {
|
|
5568
|
+
b || Te(e);
|
|
5363
5569
|
},
|
|
5364
5570
|
onStateUpdate: (e) => {
|
|
5365
|
-
b || e === "error" && $(a.dataset.state) &&
|
|
5571
|
+
b || e === "error" && $(a.dataset.state) && F("Could not load the experience.");
|
|
5366
5572
|
}
|
|
5367
5573
|
});
|
|
5368
|
-
if (b || e !==
|
|
5574
|
+
if (b || e !== C) {
|
|
5369
5575
|
t.destroy(), v === t && (v = null);
|
|
5370
5576
|
return;
|
|
5371
5577
|
}
|
|
5372
|
-
|
|
5373
|
-
b ||
|
|
5578
|
+
x = !0, n.on("close", () => {
|
|
5579
|
+
b || ze();
|
|
5374
5580
|
});
|
|
5375
5581
|
} catch (n) {
|
|
5376
|
-
if (b || e !==
|
|
5377
|
-
|
|
5582
|
+
if (b || e !== C) return;
|
|
5583
|
+
ie = !1, l.hidden = !0, l.replaceChildren(), v = null;
|
|
5378
5584
|
let r = n instanceof Error ? n : Error(String(n));
|
|
5379
5585
|
t.onError?.(r), console.error("[ExperienceWidget] warm prefetch failed", r);
|
|
5380
5586
|
}
|
|
5381
5587
|
})();
|
|
5382
|
-
},
|
|
5588
|
+
}, Ke = () => {
|
|
5383
5589
|
if (b || y || !ne || $(a.dataset.state)) return;
|
|
5384
|
-
if (v &&
|
|
5385
|
-
|
|
5590
|
+
if (v && S) {
|
|
5591
|
+
He();
|
|
5386
5592
|
return;
|
|
5387
5593
|
}
|
|
5388
|
-
if (v &&
|
|
5389
|
-
|
|
5594
|
+
if (v && x) {
|
|
5595
|
+
Ue();
|
|
5390
5596
|
return;
|
|
5391
5597
|
}
|
|
5392
|
-
let e = ++
|
|
5393
|
-
y = !0,
|
|
5598
|
+
let e = ++C;
|
|
5599
|
+
y = !0, re = !1, ie = !1, x = !1, S = !1, delete a.dataset.warm, delete a.dataset.live, l.hidden = !0, l.replaceChildren(), v &&= (v.destroy(), null), (async () => {
|
|
5394
5600
|
try {
|
|
5395
|
-
|
|
5396
|
-
let t = await
|
|
5397
|
-
if (b || e !==
|
|
5601
|
+
Ie();
|
|
5602
|
+
let t = await pc.startSession(Fe());
|
|
5603
|
+
if (b || e !== C) {
|
|
5398
5604
|
t.destroy();
|
|
5399
5605
|
return;
|
|
5400
5606
|
}
|
|
5401
|
-
v = t,
|
|
5607
|
+
v = t, Re(t);
|
|
5402
5608
|
let n = await t.attach({
|
|
5403
5609
|
container: te,
|
|
5404
5610
|
onWidgetAudioSettings: (e) => {
|
|
5405
|
-
b ||
|
|
5611
|
+
b || Ye(e);
|
|
5612
|
+
},
|
|
5613
|
+
onWidgetDragStart: (e) => {
|
|
5614
|
+
b || Ce(e);
|
|
5615
|
+
},
|
|
5616
|
+
onWidgetDragMove: (e) => {
|
|
5617
|
+
b || we(e);
|
|
5618
|
+
},
|
|
5619
|
+
onWidgetDragEnd: (e) => {
|
|
5620
|
+
b || Te(e);
|
|
5406
5621
|
},
|
|
5407
5622
|
onStateUpdate: (e) => {
|
|
5408
|
-
b || (e === "error" ?
|
|
5623
|
+
b || (e === "error" ? F("Could not load the experience.") : $(a.dataset.state) && F(null));
|
|
5409
5624
|
}
|
|
5410
5625
|
});
|
|
5411
|
-
if (b || e !==
|
|
5626
|
+
if (b || e !== C) {
|
|
5412
5627
|
t.destroy(), v === t && (v = null);
|
|
5413
5628
|
return;
|
|
5414
5629
|
}
|
|
5415
|
-
|
|
5416
|
-
b ||
|
|
5630
|
+
x = !0, n.on("close", () => {
|
|
5631
|
+
b || ze();
|
|
5417
5632
|
});
|
|
5418
5633
|
} catch (n) {
|
|
5419
|
-
if (b || e !==
|
|
5634
|
+
if (b || e !== C) return;
|
|
5420
5635
|
let r = n instanceof Error ? n : Error(String(n));
|
|
5421
|
-
|
|
5636
|
+
F(r.message), t.onError?.(r), console.error("[ExperienceWidget]", r);
|
|
5422
5637
|
} finally {
|
|
5423
|
-
e ===
|
|
5638
|
+
e === C && (y = !1);
|
|
5424
5639
|
}
|
|
5425
5640
|
})();
|
|
5426
|
-
},
|
|
5641
|
+
}, qe = () => {
|
|
5427
5642
|
if (!(b || $(a.dataset.state))) {
|
|
5428
|
-
if (v &&
|
|
5429
|
-
|
|
5643
|
+
if (v && S) {
|
|
5644
|
+
He();
|
|
5430
5645
|
return;
|
|
5431
5646
|
}
|
|
5432
|
-
if (v &&
|
|
5433
|
-
|
|
5647
|
+
if (v && x) {
|
|
5648
|
+
Ue();
|
|
5434
5649
|
return;
|
|
5435
5650
|
}
|
|
5436
|
-
|
|
5651
|
+
Ke();
|
|
5437
5652
|
}
|
|
5438
|
-
},
|
|
5439
|
-
if (e.stopPropagation(),
|
|
5440
|
-
|
|
5653
|
+
}, Je = (e) => {
|
|
5654
|
+
if (e.stopPropagation(), k() === "expanded") {
|
|
5655
|
+
Be();
|
|
5441
5656
|
return;
|
|
5442
5657
|
}
|
|
5443
|
-
|
|
5444
|
-
},
|
|
5658
|
+
k() === "docked" && Ve();
|
|
5659
|
+
}, Ye = (e) => {
|
|
5445
5660
|
g.setAttribute("aria-pressed", e ? "true" : "false");
|
|
5446
|
-
},
|
|
5661
|
+
}, Xe = (e) => {
|
|
5447
5662
|
e.stopPropagation(), $(a.dataset.state) && v?.toggleAudioSettings();
|
|
5448
|
-
},
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
}, He = (e) => {
|
|
5454
|
-
if (le === null || e.pointerId !== le || D() !== "docked") return;
|
|
5455
|
-
let t = mc(), n = gc(e.clientX - ue, e.clientY - de, t);
|
|
5456
|
-
se = n.left, ce = n.top, ye(n.left, n.top, t.width, t.height);
|
|
5457
|
-
}, Ue = (e) => {
|
|
5458
|
-
if (!(le === null || e.pointerId !== le)) {
|
|
5459
|
-
le = null, p.classList.remove("liforma-ew__toolbar--dragging");
|
|
5460
|
-
try {
|
|
5461
|
-
p.releasePointerCapture(e.pointerId);
|
|
5462
|
-
} catch {}
|
|
5463
|
-
}
|
|
5464
|
-
}, We = (e) => {
|
|
5465
|
-
e.key === "Escape" && $(a.dataset.state) && (e.preventDefault(), Me());
|
|
5466
|
-
}, Ge = () => {
|
|
5663
|
+
}, Ze = (e) => {
|
|
5664
|
+
k() === "docked" && Tc() && (e.target?.closest("button") || (e.preventDefault(), M(e.clientX, e.clientY, e.pointerId)));
|
|
5665
|
+
}, R = (e) => {
|
|
5666
|
+
e.key === "Escape" && $(a.dataset.state) && (e.preventDefault(), ze());
|
|
5667
|
+
}, Qe = () => {
|
|
5467
5668
|
if (!b) {
|
|
5468
|
-
if (
|
|
5469
|
-
if (!
|
|
5470
|
-
|
|
5669
|
+
if (k() === "docked") {
|
|
5670
|
+
if (!Tc()) {
|
|
5671
|
+
Ve();
|
|
5471
5672
|
return;
|
|
5472
5673
|
}
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
}) :
|
|
5674
|
+
S ? Oe(() => {
|
|
5675
|
+
Ee(!0);
|
|
5676
|
+
}) : Ee(!0);
|
|
5476
5677
|
return;
|
|
5477
5678
|
}
|
|
5478
|
-
|
|
5679
|
+
N();
|
|
5479
5680
|
}
|
|
5480
|
-
},
|
|
5681
|
+
}, $e = typeof window < "u" ? window.matchMedia(hc) : null, et = () => {
|
|
5481
5682
|
if (!b) {
|
|
5482
|
-
if (
|
|
5483
|
-
|
|
5683
|
+
if (k() === "docked" && !Tc()) {
|
|
5684
|
+
Ve();
|
|
5484
5685
|
return;
|
|
5485
5686
|
}
|
|
5486
|
-
|
|
5687
|
+
N();
|
|
5487
5688
|
}
|
|
5488
5689
|
};
|
|
5489
|
-
return o.addEventListener("click",
|
|
5490
|
-
e.stopPropagation(),
|
|
5491
|
-
}), h.addEventListener("click",
|
|
5492
|
-
b ||
|
|
5493
|
-
}) : r === "idle" && (
|
|
5494
|
-
b ||
|
|
5690
|
+
return o.addEventListener("click", qe), d.addEventListener("click", ze), ee.addEventListener("click", (e) => {
|
|
5691
|
+
e.stopPropagation(), ze();
|
|
5692
|
+
}), h.addEventListener("click", Je), g.addEventListener("click", Xe), p.addEventListener("pointerdown", Ze), window.addEventListener("keydown", R), window.addEventListener("resize", Qe), $e?.addEventListener("change", et), Pe(), N(), r === "eager" ? queueMicrotask(() => {
|
|
5693
|
+
b || Ge();
|
|
5694
|
+
}) : r === "idle" && (oe = Pc(() => {
|
|
5695
|
+
b || Ge();
|
|
5495
5696
|
})), {
|
|
5496
5697
|
root: a,
|
|
5497
|
-
expand:
|
|
5498
|
-
collapse:
|
|
5499
|
-
dock:
|
|
5500
|
-
maximize:
|
|
5698
|
+
expand: qe,
|
|
5699
|
+
collapse: ze,
|
|
5700
|
+
dock: Be,
|
|
5701
|
+
maximize: Ve,
|
|
5501
5702
|
prefetch() {
|
|
5502
5703
|
if (r === "onExpand") {
|
|
5503
|
-
|
|
5704
|
+
Ge();
|
|
5504
5705
|
return;
|
|
5505
5706
|
}
|
|
5506
|
-
|
|
5707
|
+
Ge();
|
|
5507
5708
|
},
|
|
5508
5709
|
destroy() {
|
|
5509
|
-
b || (b = !0,
|
|
5710
|
+
b || (b = !0, j(), oe?.(), oe = null, me.abort(), w?.(), w = null, window.removeEventListener("keydown", R), window.removeEventListener("resize", Qe), $e?.removeEventListener("change", et), L(), I(), e.replaceChildren());
|
|
5510
5711
|
}
|
|
5511
5712
|
};
|
|
5512
5713
|
}
|
|
5513
5714
|
//#endregion
|
|
5514
|
-
export {
|
|
5715
|
+
export { le as EXPERIENCE_THUMBNAIL_CSS, de as EXPERIENCE_WIDGET_CSS, pc as Experience, Rs as SPEECH_LIMITS, Vs as SpeechBufferTimeoutError, Q as SpeechRuntimeError, Bs as SpeechUtteranceClosedError, zs as UnsupportedSpeechOperationError, ie as attachImageReady, re as attachLazyThumb, E as attachScrollLinkedParallax, f as buildHostedLaunchUrl, O as ensureExperienceThumbnailStyles, pe as ensureExperienceWidgetStyles, ve as fetchExperiencePreview, y as getDefaultLazyRootMargin, S as horizontalParallaxFromViewportY, Fc as mountExperienceWidget, n as navigateOnExperienceClose, p as resolveThumbnailHref, u as resolveThumbnailInteraction, o as resolveThumbnailLayers, a as toGalleryThumbUrl };
|
|
5515
5716
|
|
|
5516
5717
|
//# sourceMappingURL=index.js.map
|