@arcware-cloud/pixelstreaming-websdk 1.3.12 → 1.3.13

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/index.umd.js CHANGED
@@ -23367,6 +23367,7 @@ const zod_1 = __webpack_require__(8754);
23367
23367
  const lib_pixelstreamingfrontend_ue5_5_1 = __webpack_require__(693);
23368
23368
  const Session_1 = __webpack_require__(2469);
23369
23369
  const ArcwareSettingsSchema_1 = __webpack_require__(5602);
23370
+ const whiteLabelling_1 = __webpack_require__(3545);
23370
23371
  /** Default arcware signalling endpoint. */
23371
23372
  exports.DefaultUrl = `wss://signalling-client.ragnarok.arcware.cloud`;
23372
23373
  // The below Logger overrides can likely be removed as PSInfra 5.5 logger supports setting log verbosity
@@ -23409,7 +23410,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23409
23410
  };
23410
23411
  }
23411
23412
  constructor(config) {
23412
- var _a, _b;
23413
+ var _a, _b, _c;
23413
23414
  const dfToken = new URL(window.location.href).search
23414
23415
  .slice(1)
23415
23416
  .split("&")
@@ -23430,7 +23431,7 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23430
23431
  if (!config.initialSettings.ss)
23431
23432
  config.initialSettings.ss = exports.DefaultUrl;
23432
23433
  super(config);
23433
- this.VERSION = "1.3.12";
23434
+ this.VERSION = "1.3.13";
23434
23435
  this.settings = settings;
23435
23436
  this.session = new Session_1.Session();
23436
23437
  this._initialSettings = config.initialSettings;
@@ -23439,6 +23440,16 @@ class ArcwareConfig extends lib_pixelstreamingfrontend_ue5_5_1.Config {
23439
23440
  // IMPORTANT NOTE: The feature BrowserSendOffer is no longer supported in PSInfra 5.5.
23440
23441
  // The offer is now expected to come from UE. Ensure that your signalling server supports this behaviour.
23441
23442
  //this.setFlagEnabled(Flags.BrowserSendOffer, true);
23443
+ if (this.useUrlParams) {
23444
+ // Get the query string from URL
23445
+ const qs = new URLSearchParams(window.location.search);
23446
+ // Retrieve image loading from there
23447
+ const wlParsed = this.useUrlParams ? (0, whiteLabelling_1.readWhiteLabelFromQuery)(qs) : undefined; // respect useUrlParams
23448
+ if (wlParsed) {
23449
+ this.settings.whiteLabelling = Object.assign(Object.assign({}, ((_c = this.settings.whiteLabelling) !== null && _c !== void 0 ? _c : {})), wlParsed);
23450
+ }
23451
+ this.settings.infoButton = qs.has("i") || qs.has("info");
23452
+ }
23442
23453
  }
23443
23454
  /** Setup connection string. */
23444
23455
  get urlFlags() {
@@ -23546,7 +23557,14 @@ function ArcwareInit({ shareId, projectId }, configuration, forceRefresh = false
23546
23557
  useUrlParams: (configuration === null || configuration === void 0 ? void 0 : configuration.useUrlParams) === true,
23547
23558
  initialSettings: Object.assign({ ss: ArcwareConfig_1.DefaultUrl, AutoConnect: false, StartVideoMuted: true, AutoPlayVideo: true, KeyboardInput: true, MouseInput: true, GamepadInput: true, TouchInput: true, XRControllerInput: true, UseMic: true, SuppressBrowserKeys: true, FakeMouseWithTouches: false, ForceMonoAudio: false, HoveringMouse: true }, configuration === null || configuration === void 0 ? void 0 : configuration.initialSettings),
23548
23559
  settings: Object.assign({ shareId,
23549
- projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23560
+ projectId, fullscreenButton: true, audioButton: true, stopButton: false, infoButton: false, micButton: false, settingsButton: false, connectionStrengthIcon: false, connectionIdentifierLoggingDisabled: undefined, errorHandler: undefined, loveLetterHandler: undefined, loveLetterLogging: undefined, queueHandler: undefined, sessionIdHandler: undefined, startHeight: undefined, startWidth: undefined, orientationZoom: undefined, whiteLabelling: {
23561
+ splashScreenUrl: undefined,
23562
+ loadingIconFadeMs: undefined,
23563
+ loadingIconUrl: undefined,
23564
+ splashScreenMode: undefined,
23565
+ splashScreenPosition: undefined,
23566
+ splashScreenBgColor: undefined
23567
+ } }, configuration === null || configuration === void 0 ? void 0 : configuration.settings)
23550
23568
  });
23551
23569
  const PixelStreaming = new ArcwarePixelStreaming_1.ArcwarePixelStreaming(Config);
23552
23570
  const Application = new ArcwareApplication_1.ArcwareApplication({ stream: PixelStreaming });
@@ -23895,6 +23913,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
23895
23913
  });
23896
23914
  }
23897
23915
  }
23916
+ this.applyBrandingFromSettings();
23898
23917
  this.handleMouseLock();
23899
23918
  this.injectCustomUI();
23900
23919
  }
@@ -24142,12 +24161,12 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24142
24161
  // Zoom level for orientation change if provided
24143
24162
  if (orientationZoom) {
24144
24163
  if (browserWidth < browserHeight) {
24145
- if (orientationZoom.hasOwnProperty('portrait'))
24164
+ if (orientationZoom.hasOwnProperty("portrait"))
24146
24165
  (_a = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _a === void 0 ? void 0 : _a.emitUIInteraction({
24147
24166
  zoom: orientationZoom.portrait
24148
24167
  });
24149
24168
  }
24150
- else if (orientationZoom.hasOwnProperty('landscape')) {
24169
+ else if (orientationZoom.hasOwnProperty("landscape")) {
24151
24170
  (_b = this === null || this === void 0 ? void 0 : this.webRtcController) === null || _b === void 0 ? void 0 : _b.emitUIInteraction({
24152
24171
  zoom: orientationZoom.landscape
24153
24172
  });
@@ -24217,26 +24236,27 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24217
24236
  initLoveLettersContainer() {
24218
24237
  var _a;
24219
24238
  const logoLoader = new ArcwareLogoLoader_1.ArcwareLogoLoader();
24239
+ this.logoLoader = logoLoader;
24220
24240
  if (!this.loveLettersContainer) {
24221
- const loveLettersContainer = document === null || document === void 0 ? void 0 : document.createElement("div");
24222
- const { videoPlayer } = this === null || this === void 0 ? void 0 : this.webRtcController;
24241
+ const loveLettersContainer = document.createElement("div");
24242
+ this.loveLettersContainer = loveLettersContainer; // keep the ref
24243
+ const { videoPlayer } = this.webRtcController;
24223
24244
  const videoElementParent = videoPlayer.getVideoParentElement();
24224
- (_a = loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.classList) === null || _a === void 0 ? void 0 : _a.add("love-letters-box-root");
24225
- videoElementParent === null || videoElementParent === void 0 ? void 0 : videoElementParent.appendChild(loveLettersContainer);
24226
- const lettersBlock = document === null || document === void 0 ? void 0 : document.createElement("div");
24245
+ loveLettersContainer.classList.add("love-letters-box-root");
24246
+ videoElementParent.appendChild(loveLettersContainer);
24247
+ const lettersBlock = document.createElement("div");
24227
24248
  lettersBlock.id = "letters-block";
24228
- const lettersWrapper = document === null || document === void 0 ? void 0 : document.createElement("div");
24249
+ const lettersWrapper = document.createElement("div");
24229
24250
  lettersWrapper.id = "letters-wrapper";
24230
- if (loveLettersContainer) {
24231
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24232
- loveLettersContainer === null || loveLettersContainer === void 0 ? void 0 : loveLettersContainer.appendChild(lettersBlock);
24233
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24234
- }
24235
- lettersBlock.innerHTML = "";
24236
- if (lettersBlock) {
24237
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(logoLoader === null || logoLoader === void 0 ? void 0 : logoLoader.arcwareLogoLoader);
24238
- lettersBlock === null || lettersBlock === void 0 ? void 0 : lettersBlock.appendChild(lettersWrapper);
24239
- }
24251
+ // append your existing loader root (with SVG) into the lettersBlock
24252
+ const loaderRoot = logoLoader.arcwareLogoLoader; // your existing getter
24253
+ lettersBlock.appendChild(loaderRoot);
24254
+ // ensure the loader knows its host
24255
+ (_a = logoLoader.setHostElement) === null || _a === void 0 ? void 0 : _a.call(logoLoader, loaderRoot);
24256
+ loveLettersContainer.appendChild(lettersBlock);
24257
+ lettersBlock.appendChild(lettersWrapper);
24258
+ // apply current (local) settings immediately
24259
+ this.applyBrandingFromSettings();
24240
24260
  }
24241
24261
  }
24242
24262
  pushLetter(letter) {
@@ -24342,8 +24362,7 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24342
24362
  }
24343
24363
  }
24344
24364
  injectCustomUI() {
24345
- (0, common_1.waitForElement)('#stream-ui')
24346
- .then(el => {
24365
+ (0, common_1.waitForElement)("#stream-ui").then((el) => {
24347
24366
  var _a;
24348
24367
  const videoElementParent = (_a = this === null || this === void 0 ? void 0 : this.videoElementParent) === null || _a === void 0 ? void 0 : _a.parentElement;
24349
24368
  if (videoElementParent) {
@@ -24351,6 +24370,61 @@ class ArcwarePixelStreaming extends lib_pixelstreamingfrontend_ue5_5_1.PixelStre
24351
24370
  }
24352
24371
  });
24353
24372
  }
24373
+ applyBrandingFromSettings() {
24374
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
24375
+ const cfg = ((_b = (_a = this === null || this === void 0 ? void 0 : this.config) === null || _a === void 0 ? void 0 : _a.settings.whiteLabelling) !== null && _b !== void 0 ? _b : {});
24376
+ // Loader image + fade
24377
+ try {
24378
+ if (this.logoLoader) {
24379
+ (_d = (_c = this.logoLoader).setImage) === null || _d === void 0 ? void 0 : _d.call(_c, cfg.loadingIconUrl);
24380
+ (_f = (_e = this.logoLoader).setFade) === null || _f === void 0 ? void 0 : _f.call(_e, cfg.loadingIconFadeMs);
24381
+ }
24382
+ }
24383
+ catch (_p) { }
24384
+ // Splash on loveLettersContainer (preferred), fallback to player parent
24385
+ try {
24386
+ const el = (_m = (_g = this.loveLettersContainer) !== null && _g !== void 0 ? _g : (_l = (_k = (_j = (_h = this.webRtcController) === null || _h === void 0 ? void 0 : _h.videoPlayer) === null || _j === void 0 ? void 0 : _j.getVideoParentElement) === null || _k === void 0 ? void 0 : _k.call(_j)) === null || _l === void 0 ? void 0 : _l.parentElement) !== null && _m !== void 0 ? _m : null;
24387
+ if (!el)
24388
+ return;
24389
+ // Clear previous inline choices
24390
+ const s = el.style;
24391
+ s.removeProperty("background-image");
24392
+ s.removeProperty("background-size");
24393
+ s.removeProperty("background-repeat");
24394
+ s.removeProperty("background-position");
24395
+ s.removeProperty("background-color");
24396
+ el.classList.remove("aw-splash");
24397
+ if (cfg.splashScreenUrl) {
24398
+ el.classList.add("aw-splash"); // keeps your global defaults
24399
+ // Compute mode (default to 'contain' if not provided)
24400
+ const mode = ((_o = cfg.splashScreenMode) !== null && _o !== void 0 ? _o : "contain");
24401
+ // Apply sizing/repeat per mode
24402
+ switch (mode) {
24403
+ case "contain":
24404
+ s.backgroundSize = "contain";
24405
+ s.backgroundRepeat = "no-repeat";
24406
+ break;
24407
+ case "cover":
24408
+ s.backgroundSize = "cover";
24409
+ s.backgroundRepeat = "no-repeat";
24410
+ break;
24411
+ case "stretch":
24412
+ s.backgroundSize = "100% 100%";
24413
+ s.backgroundRepeat = "no-repeat";
24414
+ break;
24415
+ case "repeat":
24416
+ s.backgroundSize = "auto"; // keep intrinsic px
24417
+ s.backgroundRepeat = "repeat";
24418
+ break;
24419
+ }
24420
+ // Position & color (optional)
24421
+ s.backgroundPosition = cfg.splashScreenPosition || "center center";
24422
+ s.backgroundColor = cfg.splashScreenBgColor || "var(--color0)";
24423
+ s.backgroundImage = `url("${cfg.splashScreenUrl}")`;
24424
+ }
24425
+ }
24426
+ catch (_q) { }
24427
+ }
24354
24428
  }
24355
24429
  exports.ArcwarePixelStreaming = ArcwarePixelStreaming;
24356
24430
 
@@ -24415,10 +24489,15 @@ exports.ArcwareSettingsSchema = zod_1.z.object({
24415
24489
  /** Height with which instance should be started */
24416
24490
  startHeight: zod_1.z.number().optional(),
24417
24491
  /** Zoom functionality */
24418
- orientationZoom: zod_1.z.object({
24492
+ orientationZoom: zod_1.z
24493
+ .object({
24419
24494
  landscape: zod_1.z.number(),
24420
- portrait: zod_1.z.number(),
24421
- }).strict().optional()
24495
+ portrait: zod_1.z.number()
24496
+ })
24497
+ .strict()
24498
+ .optional(),
24499
+ /** Loader customization */
24500
+ whiteLabelling: shared_pixelstreaming_websdk_1.ZWhiteLabel.optional()
24422
24501
  });
24423
24502
 
24424
24503
 
@@ -25337,6 +25416,47 @@ function waitForElement(selector, { root = document, timeout = 3000 } = {}) {
25337
25416
  exports.waitForElement = waitForElement;
25338
25417
 
25339
25418
 
25419
+ /***/ }),
25420
+
25421
+ /***/ 3545:
25422
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
25423
+
25424
+
25425
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
25426
+ exports.readWhiteLabelFromQuery = void 0;
25427
+ const shared_pixelstreaming_websdk_1 = __webpack_require__(7910);
25428
+ function decodeBase64OrBase64Url(raw) {
25429
+ const normalized = raw.replace(/-/g, "+").replace(/_/g, "/");
25430
+ const padded = normalized + "===".slice((normalized.length + 3) % 4);
25431
+ if (typeof atob === "function")
25432
+ return atob(padded);
25433
+ // @ts-ignore (Node fallback if this runs server-side)
25434
+ return Buffer.from(padded, "base64").toString("utf-8");
25435
+ }
25436
+ /** Parse ?wl=... (or ?whitelabel=...) → validated partial settings */
25437
+ function readWhiteLabelFromQuery(qs) {
25438
+ var _a;
25439
+ try {
25440
+ const raw = (_a = qs.get("wl")) !== null && _a !== void 0 ? _a : qs.get("whitelabel");
25441
+ if (!raw)
25442
+ return undefined;
25443
+ const jsonStr = decodeBase64OrBase64Url(raw);
25444
+ const obj = JSON.parse(jsonStr);
25445
+ const parsed = shared_pixelstreaming_websdk_1.ZWhiteLabel.safeParse(obj);
25446
+ if (!parsed.success) {
25447
+ //console.warn("[ArcwareConfig] Invalid wl payload:", parsed.error?.flatten?.());
25448
+ return undefined;
25449
+ }
25450
+ return parsed.data;
25451
+ }
25452
+ catch (e) {
25453
+ //console.warn("[ArcwareConfig] Failed to parse wl payload:", e);
25454
+ return undefined;
25455
+ }
25456
+ }
25457
+ exports.readWhiteLabelFromQuery = readWhiteLabelFromQuery;
25458
+
25459
+
25340
25460
  /***/ }),
25341
25461
 
25342
25462
  /***/ 9399:
@@ -25377,16 +25497,27 @@ exports.ArcwareStyles = {
25377
25497
  "--color11": "rgba(65,0,139,1) !important",
25378
25498
  "--color12": "#222224 !important",
25379
25499
  "--color13": "#f0f0f2 !important",
25380
- "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important",
25500
+ "--colorBoxShadow": "rgba(0, 0, 0, 0.20) !important"
25381
25501
  },
25502
+ ".aw-splash": {
25503
+ backgroundRepeat: "no-repeat",
25504
+ backgroundPosition: "center center",
25505
+ backgroundSize: "contain",
25506
+ backgroundColor: "var(--color0)"
25507
+ },
25508
+ "@keyframes aw-loader-fade": {
25509
+ from: { opacity: 0.25 },
25510
+ to: { opacity: 1 }
25511
+ },
25512
+ /* ---------- /NEW ---------- */
25382
25513
  "#playerUI *": {
25383
- fontFamily: "system-ui",
25514
+ fontFamily: "system-ui"
25384
25515
  },
25385
25516
  "#shared-stream-container": {
25386
- boxSizing: "border-box",
25517
+ boxSizing: "border-box"
25387
25518
  },
25388
25519
  "#shared-stream-container::-webkit-scrollbar": {
25389
- width: "10px",
25520
+ width: "10px"
25390
25521
  },
25391
25522
  "#shared-stream-container::-webkit-scrollbar-track": {
25392
25523
  background: "var(--color13)",
@@ -25395,10 +25526,10 @@ exports.ArcwareStyles = {
25395
25526
  borderTop: "20px solid var(--color0)",
25396
25527
  borderRight: "5px solid var(--color0)",
25397
25528
  borderBottom: "20px solid var(--color0)",
25398
- borderLeft: "5px solid var(--color0)",
25529
+ borderLeft: "5px solid var(--color0)"
25399
25530
  },
25400
25531
  "#shared-stream-container::-webkit-scrollbar-track-piece": {
25401
- background: "transparent",
25532
+ background: "transparent"
25402
25533
  },
25403
25534
  "#shared-stream-container::-webkit-scrollbar-thumb": {
25404
25535
  background: "var(--color13)",
@@ -25406,11 +25537,11 @@ exports.ArcwareStyles = {
25406
25537
  borderRight: "2px solid var(--color0)",
25407
25538
  borderLeft: "2px solid var(--color0)",
25408
25539
  transition: "all ease-in-out 0.3s",
25409
- borderRadius: "7px",
25540
+ borderRadius: "7px"
25410
25541
  },
25411
25542
  "#shared-stream-container::-webkit-scrollbar-thumb:hover": {
25412
25543
  transition: "all ease-in-out 0.3s",
25413
- background: "var(--color3)",
25544
+ background: "var(--color3)"
25414
25545
  },
25415
25546
  "#playerUI, #videoElementParent": {
25416
25547
  position: "absolute",
@@ -25424,13 +25555,13 @@ exports.ArcwareStyles = {
25424
25555
  left: 0,
25425
25556
  margin: "auto",
25426
25557
  boxSizing: "border-box",
25427
- pointerEvents: "all",
25558
+ pointerEvents: "all"
25428
25559
  },
25429
25560
  "#streamingVideo": {
25430
25561
  maxWidth: "100%",
25431
25562
  maxHeight: "100%",
25432
25563
  boxSizing: "border-box",
25433
- background: "#18181A",
25564
+ background: "#18181A"
25434
25565
  },
25435
25566
  "#uiFeatures #controls": {
25436
25567
  top: "auto",
@@ -25438,13 +25569,13 @@ exports.ArcwareStyles = {
25438
25569
  bottom: "10px",
25439
25570
  right: "20px",
25440
25571
  display: "flex",
25441
- flexDirection: "column-reverse",
25572
+ flexDirection: "column-reverse"
25442
25573
  },
25443
25574
  "#uiFeatures #connection": {
25444
25575
  bottom: "5px",
25445
25576
  left: "10px",
25446
25577
  width: "2.5rem",
25447
- heihgt: "2.5rem",
25578
+ heihgt: "2.5rem"
25448
25579
  },
25449
25580
  "#uiFeatures button": {
25450
25581
  backgroundColor: "var(--color12)",
@@ -25461,23 +25592,23 @@ exports.ArcwareStyles = {
25461
25592
  alignItems: "center",
25462
25593
  boxShadow: "0px 0px 24px 0px var(--colorBoxShadow)",
25463
25594
  borderRadius: "3px",
25464
- outline: "none",
25595
+ outline: "none"
25465
25596
  },
25466
25597
  "#uiFeatures button:hover, #uiFeatures button:active": {
25467
25598
  padding: "0 !important",
25468
- border: "none",
25599
+ border: "none"
25469
25600
  },
25470
25601
  "#uiFeatures button #audioIconMuted, #uiFeatures button #audioIconUnmuted, #uiFeatures button #micIconMuted, #uiFeatures button #micIconUnmuted": {
25471
25602
  width: "31px",
25472
- height: "28px",
25603
+ height: "28px"
25473
25604
  },
25474
25605
  "#uiFeatures button #maximizeIcon, #uiFeatures button #minimizeIcon": {
25475
25606
  width: "25px",
25476
- height: "25px",
25607
+ height: "25px"
25477
25608
  },
25478
25609
  "#stopIcon, #playIcon": {
25479
25610
  width: "30px",
25480
- height: "30px",
25611
+ height: "30px"
25481
25612
  },
25482
25613
  "#uiFeatures button .tooltiptext": {
25483
25614
  right: "125%",
@@ -25486,35 +25617,35 @@ exports.ArcwareStyles = {
25486
25617
  borderRadius: "3px",
25487
25618
  backgroundColor: "var(--color12)",
25488
25619
  width: "95px",
25489
- visibility: "hidden!important",
25620
+ visibility: "hidden!important"
25490
25621
  },
25491
25622
  "@media (hover: hover) and (pointer: fine)": {
25492
25623
  "#uiFeatures button:hover .tooltiptext": {
25493
- visibility: "visible!important",
25494
- },
25624
+ visibility: "visible!important"
25625
+ }
25495
25626
  },
25496
25627
  "#controls>*": {
25497
25628
  marginBottom: "0.5rem",
25498
25629
  display: "block",
25499
25630
  lineHeight: "1.75rem",
25500
25631
  padding: "0.5rem",
25501
- backgroundColor: "var(--color12)",
25632
+ backgroundColor: "var(--color12)"
25502
25633
  },
25503
25634
  "#uiFeatures #settingsIcon, #uiFeatures #statsIcon": {
25504
25635
  width: "27px",
25505
- height: "27px",
25636
+ height: "27px"
25506
25637
  },
25507
25638
  ".svgIcon": {
25508
- fill: "var(--color13)",
25639
+ fill: "var(--color13)"
25509
25640
  },
25510
25641
  "#uiFeatures button:hover .svgIcon, #uiFeatures button:active .svgIcon": {
25511
- fill: "var(--color12)",
25642
+ fill: "var(--color12)"
25512
25643
  },
25513
25644
  ".tgl-switch .tgl-slider, .tgl-flat:checked+.tgl-slider": {
25514
- border: "3px solid transparent",
25645
+ border: "3px solid transparent"
25515
25646
  },
25516
25647
  ".tgl-switch .tgl-slider": {
25517
- background: "none",
25648
+ background: "none"
25518
25649
  },
25519
25650
  ".tgl-switch .tgl-slider::before": {
25520
25651
  content: "''",
@@ -25528,18 +25659,18 @@ exports.ArcwareStyles = {
25528
25659
  top: "0",
25529
25660
  bottom: "0",
25530
25661
  left: "0",
25531
- right: "0",
25662
+ right: "0"
25532
25663
  },
25533
25664
  ".tgl-switch .tgl-slider::after": {
25534
25665
  height: "13px",
25535
25666
  width: "13px",
25536
25667
  borderRadius: "50%",
25537
25668
  top: "-2px",
25538
- left: "-1%",
25669
+ left: "-1%"
25539
25670
  },
25540
25671
  ".tgl-flat:checked+.tgl-slider:after": {
25541
25672
  left: "62%",
25542
- background: "var(--color3)",
25673
+ background: "var(--color3)"
25543
25674
  },
25544
25675
  ".form-control": {
25545
25676
  backgroundColor: "transparent",
@@ -25548,7 +25679,7 @@ exports.ArcwareStyles = {
25548
25679
  color: "var(--color13)",
25549
25680
  textAlign: "left",
25550
25681
  fontFamily: "inherit",
25551
- padding: "5px 15px ",
25682
+ padding: "5px 15px "
25552
25683
  },
25553
25684
  ".btn-flat": {
25554
25685
  background: "var(--color3)",
@@ -25558,31 +25689,62 @@ exports.ArcwareStyles = {
25558
25689
  cursor: "pointer",
25559
25690
  borderRadius: "4px",
25560
25691
  textTransform: "uppercase",
25561
- minWidth: "175px",
25692
+ minWidth: "175px"
25562
25693
  },
25563
25694
  ".btn-flat:disabled": {
25564
25695
  background: "var(--color7)",
25565
25696
  borderColor: "var(--color3)",
25566
25697
  color: "var(--color3)",
25567
- cursor: "default",
25698
+ cursor: "default"
25568
25699
  },
25569
25700
  ".btn-flat:focus": {
25570
- outline: "none",
25701
+ outline: "none"
25571
25702
  },
25572
25703
  ".arcware-logo-loader": {
25573
25704
  position: "relative",
25574
- display: "block",
25705
+ display: "flex",
25706
+ alignItems: "center",
25707
+ justifyContent: "center",
25575
25708
  width: "12.5%",
25576
25709
  height: "12.5%",
25710
+ margin: "0 auto",
25711
+ boxSizing: "border-box"
25712
+ },
25713
+ // image rendering + centering inside the box
25714
+ ".arcware-logo-loader img": {
25715
+ maxWidth: "40%",
25716
+ maxHeight: "40%",
25717
+ objectFit: "contain",
25718
+ objectPosition: "center center",
25719
+ display: "block",
25720
+ margin: 0,
25721
+ verticalAlign: "middle"
25722
+ },
25723
+ // fade stays the same
25724
+ ".arcware-logo-loader.pulse img": {
25725
+ animation: "aw-loader-fade var(--aw-fade,1200ms) ease-in-out infinite alternate"
25726
+ },
25727
+ ".arcware-logo-loader.aw-custom-loader": {
25728
+ width: "auto !important",
25729
+ height: "auto !important"
25730
+ },
25731
+ ".arcware-logo-loader.aw-custom-loader img": {
25732
+ display: "block",
25733
+ width: "auto",
25734
+ height: "auto",
25735
+ maxWidth: "80%",
25736
+ maxHeight: "80%",
25737
+ objectFit: "contain",
25738
+ margin: "0 auto" // ensure horizontal centering inside the loader
25577
25739
  },
25578
25740
  "#playOverlay img#playButton": {
25579
- width: "5%",
25741
+ width: "5%"
25580
25742
  },
25581
25743
  "#disconnectOverlay, #errorOverlay": {
25582
25744
  textTransform: "initial",
25583
25745
  textAlign: "center",
25584
25746
  fontSize: "20px",
25585
- lineHeight: 2.5,
25747
+ lineHeight: 2.5
25586
25748
  },
25587
25749
  "#disconnectOverlay .clickableState": {
25588
25750
  textTransform: "initial",
@@ -25592,13 +25754,13 @@ exports.ArcwareStyles = {
25592
25754
  fontSize: "18px",
25593
25755
  border: "1px solid #DAF693",
25594
25756
  margin: "25px auto 0",
25595
- width: "180px",
25757
+ width: "180px"
25596
25758
  },
25597
25759
  "#afkOverlay": {
25598
25760
  background: "none",
25599
25761
  transition: "all ease-in-out 0.5s",
25600
25762
  opacity: 1,
25601
- pointerEvents: "initial",
25763
+ pointerEvents: "initial"
25602
25764
  },
25603
25765
  "#afkOverlayInner": {
25604
25766
  textTransform: "initial",
@@ -25607,18 +25769,18 @@ exports.ArcwareStyles = {
25607
25769
  fontSize: "18px",
25608
25770
  width: "360px",
25609
25771
  textAlign: "center",
25610
- lineHeight: 2.5,
25772
+ lineHeight: 2.5
25611
25773
  },
25612
25774
  "#afkOverlayInner center::first-line": {
25613
25775
  textTransform: "uppercase",
25614
25776
  color: "#FF8461",
25615
25777
  fontWeight: "bold",
25616
- fontSize: "24px",
25778
+ fontSize: "24px"
25617
25779
  },
25618
25780
  "#afkOverlayInner #afkCountDownNumber": {
25619
25781
  color: "#DAF693",
25620
25782
  fontSize: "26px",
25621
- lineHeight: "22px",
25783
+ lineHeight: "22px"
25622
25784
  },
25623
25785
  "#afkOverlayInner center .retry-button": {
25624
25786
  textTransform: "initial",
@@ -25628,7 +25790,7 @@ exports.ArcwareStyles = {
25628
25790
  fontSize: "18px",
25629
25791
  border: "1px solid #DAF693",
25630
25792
  margin: "25px auto 0",
25631
- width: "180px",
25793
+ width: "180px"
25632
25794
  },
25633
25795
  "#connectOverlay #connectButton": {
25634
25796
  textTransform: "initial",
@@ -25638,33 +25800,33 @@ exports.ArcwareStyles = {
25638
25800
  fontSize: "18px",
25639
25801
  border: "1px solid #DAF693",
25640
25802
  margin: "25px auto 0",
25641
- width: "180px",
25803
+ width: "180px"
25642
25804
  },
25643
25805
  "#connectOverlay .connection-text": {
25644
25806
  textTransform: "initial",
25645
25807
  textAlign: "center",
25646
- margin: "25px auto 0",
25808
+ margin: "25px auto 0"
25647
25809
  },
25648
25810
  "#connectOverlay .connection-text .title": {
25649
25811
  color: "#ffffff",
25650
25812
  fontSize: "18px",
25651
- margin: "5px 0",
25813
+ margin: "5px 0"
25652
25814
  },
25653
25815
  "#connectOverlay .connection-text .subtitle": {
25654
25816
  color: "#ffffff",
25655
25817
  opacity: 0.5,
25656
25818
  fontSize: "12px",
25657
- margin: "10px 0",
25819
+ margin: "10px 0"
25658
25820
  },
25659
25821
  "#infoOverlay.hiddenState": {
25660
- display: "none",
25822
+ display: "none"
25661
25823
  },
25662
25824
  "#disconnectOverlay, #playOverlay, #errorOverlay, #microphoneOverlay, #connectOverlay": {
25663
25825
  background: "#18181A",
25664
25826
  display: "flex",
25665
25827
  transition: "all ease-in-out 0.5s",
25666
25828
  opacity: 1,
25667
- pointerEvents: "initial",
25829
+ pointerEvents: "initial"
25668
25830
  },
25669
25831
  "#microphoneOverlay": {
25670
25832
  textTransform: "initial",
@@ -25683,51 +25845,51 @@ exports.ArcwareStyles = {
25683
25845
  justifyContent: "center",
25684
25846
  alignItems: "center",
25685
25847
  flexDirection: "column",
25686
- zIndex: 99999,
25848
+ zIndex: 99999
25687
25849
  },
25688
25850
  "#microphoneOverlay .title": {
25689
25851
  fontSize: "24px",
25690
25852
  position: "relative",
25691
25853
  marginBottom: "20px",
25692
- color: "#F0F0F2",
25854
+ color: "#F0F0F2"
25693
25855
  },
25694
25856
  "#microphoneOverlay .title:after": {
25695
25857
  content: "''",
25696
25858
  display: "inline-block",
25697
25859
  animation: "dotty steps(1,end) 1s infinite",
25698
- position: "absolute",
25860
+ position: "absolute"
25699
25861
  },
25700
25862
  "#microphoneOverlay p": {
25701
25863
  margin: 0,
25702
- color: "#858588",
25864
+ color: "#858588"
25703
25865
  },
25704
25866
  "#microphoneOverlay svg": {
25705
25867
  height: "65px",
25706
25868
  marginBottom: "15px",
25707
- marginTop: "-5px",
25869
+ marginTop: "-5px"
25708
25870
  },
25709
25871
  "#microphoneOverlay .svgIcon": {
25710
- fill: "#DAF693",
25872
+ fill: "#DAF693"
25711
25873
  },
25712
25874
  "#disconnectOverlay.hiddenState, #playOverlay.hiddenState, #errorOverlay.hiddenState, #afkOverlay.hiddenState, #microphoneOverlay.hiddenState": {
25713
25875
  opacity: 0,
25714
- pointerEvents: "none",
25876
+ pointerEvents: "none"
25715
25877
  },
25716
25878
  "#disconnectOverlay.mic-overlay-is-visible, #errorOverlay.mic-overlay-is-visible, #infoOverlay.mic-overlay-is-visible": {
25717
25879
  opacity: 0,
25718
- pointerEvents: "none",
25880
+ pointerEvents: "none"
25719
25881
  },
25720
25882
  "#infoOverlay.hiddenState, #connectOverlay.hiddenState": {
25721
- display: "none",
25883
+ display: "none"
25722
25884
  },
25723
25885
  "#connectOverlay": {
25724
25886
  display: "flex",
25725
25887
  flexDirection: "column-reverse",
25726
25888
  alignItems: "center",
25727
- justifyContent: "center",
25889
+ justifyContent: "center"
25728
25890
  },
25729
25891
  "#infoOverlay": {
25730
- display: "none",
25892
+ display: "none"
25731
25893
  },
25732
25894
  ".love-letters-box-root": {
25733
25895
  display: "flex",
@@ -25739,11 +25901,11 @@ exports.ArcwareStyles = {
25739
25901
  alignItems: "center",
25740
25902
  flexDirection: "column",
25741
25903
  background: "#18181A",
25742
- zIndex: 1,
25904
+ zIndex: 1
25743
25905
  },
25744
25906
  ".love-letters-box-root.fade-out": {
25745
25907
  opacity: 0,
25746
- transition: "opacity 0.5s",
25908
+ transition: "opacity 0.5s"
25747
25909
  },
25748
25910
  "#letters-block": {
25749
25911
  position: "absolute",
@@ -25760,7 +25922,7 @@ exports.ArcwareStyles = {
25760
25922
  alignItems: "center",
25761
25923
  fontSize: "16px",
25762
25924
  textTransform: "initial",
25763
- textAlign: "center",
25925
+ textAlign: "center"
25764
25926
  },
25765
25927
  "#letters-wrapper": {
25766
25928
  height: "77px",
@@ -25771,62 +25933,88 @@ exports.ArcwareStyles = {
25771
25933
  alignItems: "center",
25772
25934
  justifyContent: "flex-end",
25773
25935
  marginTop: "10px",
25774
- paddingBottom: "2px",
25936
+ paddingBottom: "2px"
25775
25937
  },
25776
25938
  "#letters-wrapper p": {
25777
25939
  textAlign: "center",
25778
25940
  lineHeight: 1.25,
25779
- fontSize: "16px",
25941
+ fontSize: "16px"
25780
25942
  },
25781
25943
  ".letter-animation:nth-last-of-type(1)::after": {
25782
25944
  display: "inline-block",
25783
25945
  animation: "dotty steps(1,end) 1s infinite",
25784
25946
  content: "''",
25785
- position: "absolute",
25947
+ position: "absolute"
25786
25948
  },
25787
25949
  ".letter-animation": {
25788
25950
  transition: "all 0.5s ease-in-out",
25789
25951
  transformOrigin: "bottom",
25790
- margin: "0 auto",
25952
+ margin: "0 auto"
25791
25953
  },
25792
25954
  ".letter-animation-enter": {
25793
- animation: "fadeInUp 0.75s ease-out",
25955
+ animation: "fadeInUp 0.75s ease-out"
25794
25956
  },
25795
25957
  ".letter-animation-exit": {
25796
25958
  opacity: 0,
25797
25959
  scale: 0.9,
25798
25960
  transition: "all ease-in-out 1s",
25799
- margin: 0,
25961
+ margin: 0
25800
25962
  },
25801
25963
  "@keyframes dotty": {
25802
25964
  "0%": { content: "''" },
25803
25965
  "25%": { content: "'.'" },
25804
25966
  "50%": { content: "'..'" },
25805
25967
  "75%": { content: "'...'" },
25806
- "100%": { content: "''" },
25968
+ "100%": { content: "''" }
25807
25969
  },
25808
25970
  "@keyframes fadeInUp": {
25809
25971
  from: {
25810
25972
  opacity: 0,
25811
25973
  transform: " translateY(5px)",
25812
- scale: 0.9,
25974
+ scale: 0.9
25813
25975
  },
25814
25976
  to: {
25815
25977
  opacity: 1,
25816
25978
  transform: "translateY(0)",
25817
- scale: 1,
25818
- },
25979
+ scale: 1
25980
+ }
25819
25981
  },
25820
25982
  ".hidden": {
25821
25983
  display: "none",
25822
- opacity: 0,
25984
+ opacity: 0
25823
25985
  },
25824
25986
  ".visible": {
25825
25987
  display: "block",
25826
25988
  opacity: 1,
25827
- transition: "opacity 1s ease-out",
25989
+ transition: "opacity 1s ease-out"
25828
25990
  },
25829
- },
25991
+ // Make the host a flex centering box
25992
+ ".love-letters-box-root .arcware-logo-loader": {
25993
+ display: "flex",
25994
+ alignItems: "center",
25995
+ justifyContent: "center"
25996
+ },
25997
+ // When a custom image is active, ignore the legacy 12.5% box
25998
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader": {
25999
+ width: "auto !important",
26000
+ height: "auto !important"
26001
+ },
26002
+ // Size & center the <img> itself (independent of host size)
26003
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img": {
26004
+ display: "block",
26005
+ margin: "0 auto",
26006
+ width: "min(40vmin, 40vw)",
26007
+ height: "auto",
26008
+ objectFit: "contain",
26009
+ objectPosition: "center center"
26010
+ },
26011
+ // (optional) If you prefer the old “percentage of container” behavior:
26012
+ ".love-letters-box-root .arcware-logo-loader.aw-custom-loader img.alt-40pct": {
26013
+ width: "40%",
26014
+ maxWidth: "100%",
26015
+ height: "auto"
26016
+ }
26017
+ }
25830
26018
  };
25831
26019
 
25832
26020
 
@@ -25848,6 +26036,56 @@ class ArcwareLogoLoader {
25848
26036
  arcwareLogoLoader.innerHTML = this.getSvg();
25849
26037
  return arcwareLogoLoader;
25850
26038
  }
26039
+ /** Call this once after you create the wrapper/root that contains the SVG */
26040
+ setHostElement(el) {
26041
+ this._hostEl = el;
26042
+ }
26043
+ /** Swap the loader image at runtime; pass undefined to go back to SVG */
26044
+ setImage(url) {
26045
+ var _a, _b;
26046
+ if (!this._hostEl)
26047
+ return;
26048
+ // lazily create <img> once
26049
+ if (!this._imgEl) {
26050
+ const img = document.createElement("img");
26051
+ img.alt = "Loading";
26052
+ img.style.display = "none"; // hidden until we set a URL
26053
+ this._hostEl.appendChild(img);
26054
+ this._imgEl = img;
26055
+ }
26056
+ if (url && url.trim()) {
26057
+ (_a = this._hostEl) === null || _a === void 0 ? void 0 : _a.classList.add("aw-custom-loader");
26058
+ if (this._imgEl.src !== url)
26059
+ this._imgEl.src = url;
26060
+ // show <img>, hide SVG
26061
+ this._imgEl.style.display = "";
26062
+ const svg = this._hostEl.querySelector("svg");
26063
+ if (svg)
26064
+ svg.style.display = "none";
26065
+ }
26066
+ else {
26067
+ // no url → fall back to SVG
26068
+ (_b = this._hostEl) === null || _b === void 0 ? void 0 : _b.classList.remove("aw-custom-loader");
26069
+ this._imgEl.style.display = "none";
26070
+ const svg = this._hostEl.querySelector("svg");
26071
+ if (svg)
26072
+ svg.style.display = "";
26073
+ }
26074
+ }
26075
+ /** Enable/disable pulsing fade in ms; 0 disables */
26076
+ setFade(ms) {
26077
+ if (!this._hostEl)
26078
+ return;
26079
+ const n = Number(ms) || 0;
26080
+ if (n > 0) {
26081
+ this._hostEl.style.setProperty("--aw-fade", `${n}ms`);
26082
+ this._hostEl.classList.add("pulse"); // uses #aw-loader.pulse styles you added
26083
+ }
26084
+ else {
26085
+ this._hostEl.classList.remove("pulse");
26086
+ this._hostEl.style.removeProperty("--aw-fade");
26087
+ }
26088
+ }
25851
26089
  getSvg() {
25852
26090
  return `
25853
26091
  <svg width="42" height="80" viewBox="0 0 42 80" xmlns="http://www.w3.org/2000/svg">
@@ -26918,6 +27156,40 @@ exports.Send = {
26918
27156
  };
26919
27157
 
26920
27158
 
27159
+ /***/ }),
27160
+
27161
+ /***/ 6750:
27162
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
27163
+
27164
+
27165
+ Object.defineProperty(exports, "__esModule", ({ value: true }));
27166
+ exports.ZWhiteLabel = void 0;
27167
+ const zod_1 = __webpack_require__(8754);
27168
+ /** Absolute HTTPS URL (no http) */
27169
+ const AbsoluteHttpsUrl = zod_1.z
27170
+ .string()
27171
+ .url()
27172
+ .refine((u) => u.startsWith("https://"), { message: "URL must use https://" });
27173
+ /** Relative path (no scheme like http:, data:, javascript:, etc.) */
27174
+ const RelativePath = zod_1.z
27175
+ .string()
27176
+ .min(1)
27177
+ .refine((s) => !/^[a-zA-Z][a-zA-Z0-9+.-]*:/.test(s), { message: "Expected a relative path without a URL scheme" });
27178
+ /** Image URL can be absolute (https) or relative (e.g. /assets/logo.png, ./img.png) */
27179
+ const ImageUrl = zod_1.z.union([AbsoluteHttpsUrl, RelativePath]);
27180
+ /** Strict allowlist for white-label brand fields coming from the URL */
27181
+ exports.ZWhiteLabel = zod_1.z
27182
+ .object({
27183
+ loadingIconUrl: ImageUrl.optional(),
27184
+ loadingIconFadeMs: zod_1.z.number().int().positive().optional(),
27185
+ splashScreenUrl: ImageUrl.optional(),
27186
+ splashScreenMode: zod_1.z.enum(["contain", "cover", "stretch", "repeat"]).optional(),
27187
+ splashScreenPosition: zod_1.z.string().optional(),
27188
+ splashScreenBgColor: zod_1.z.string().optional()
27189
+ })
27190
+ .strict();
27191
+
27192
+
26921
27193
  /***/ }),
26922
27194
 
26923
27195
  /***/ 318:
@@ -26925,8 +27197,10 @@ exports.Send = {
26925
27197
 
26926
27198
 
26927
27199
  Object.defineProperty(exports, "__esModule", ({ value: true }));
26928
- exports.Messages = void 0;
27200
+ exports.ZWhiteLabel = exports.Messages = void 0;
26929
27201
  exports.Messages = __webpack_require__(5387);
27202
+ var ZWhiteLabel_1 = __webpack_require__(6750);
27203
+ Object.defineProperty(exports, "ZWhiteLabel", ({ enumerable: true, get: function () { return ZWhiteLabel_1.ZWhiteLabel; } }));
26930
27204
 
26931
27205
 
26932
27206
  /***/ }),