@ezeep/ezeep-js 1.0.294 → 1.0.302

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.
Files changed (69) hide show
  1. package/dist/cjs/ezeep.cjs.js +1 -1
  2. package/dist/cjs/{ezp-auth_15.cjs.entry.js → ezp-auth_16.cjs.entry.js} +510 -109
  3. package/dist/cjs/loader.cjs.js +1 -1
  4. package/dist/collection/collection-manifest.json +1 -0
  5. package/dist/collection/components/ezp-file-name/ezp-file-name.css +98 -0
  6. package/dist/collection/components/ezp-file-name/ezp-file-name.js +280 -0
  7. package/dist/collection/components/ezp-icon/ezp-icon.js +1 -1
  8. package/dist/collection/components/ezp-icon-button/ezp-icon-button.js +1 -1
  9. package/dist/collection/components/ezp-input/ezp-input.js +1 -1
  10. package/dist/collection/components/ezp-label/ezp-label.js +39 -1
  11. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.css +4 -2
  12. package/dist/collection/components/ezp-printer-selection/ezp-printer-selection.js +216 -88
  13. package/dist/collection/components/ezp-printing/ezp-printing.js +1 -1
  14. package/dist/collection/components/ezp-select/ezp-select.js +1 -1
  15. package/dist/collection/components/ezp-status/ezp-status.js +2 -2
  16. package/dist/collection/components/ezp-stepper/ezp-stepper.js +1 -1
  17. package/dist/collection/components/ezp-text-button/ezp-text-button.js +1 -1
  18. package/dist/collection/components/ezp-upload/ezp-upload.css +5 -1
  19. package/dist/collection/components/ezp-upload/ezp-upload.js +1 -1
  20. package/dist/collection/components/ezp-user-menu/ezp-user-menu.js +1 -1
  21. package/dist/collection/shared/storage.js +39 -9
  22. package/dist/collection/types/shared/types.d.ts +1 -0
  23. package/dist/collection/utils/printer.js +75 -1
  24. package/dist/components/auth.js +1 -1
  25. package/dist/components/ezp-file-name.d.ts +11 -0
  26. package/dist/components/ezp-file-name.js +1 -0
  27. package/dist/components/ezp-file-name2.js +1 -0
  28. package/dist/components/ezp-icon-button2.js +1 -1
  29. package/dist/components/ezp-icon2.js +1 -1
  30. package/dist/components/ezp-input2.js +1 -1
  31. package/dist/components/ezp-label2.js +1 -1
  32. package/dist/components/ezp-printer-selection2.js +1 -1
  33. package/dist/components/ezp-printing.js +1 -1
  34. package/dist/components/ezp-select2.js +1 -1
  35. package/dist/components/ezp-status2.js +1 -1
  36. package/dist/components/ezp-stepper2.js +1 -1
  37. package/dist/components/ezp-text-button2.js +1 -1
  38. package/dist/components/ezp-upload2.js +1 -1
  39. package/dist/components/ezp-user-menu2.js +1 -1
  40. package/dist/components/utils.js +1 -1
  41. package/dist/directives/proxies.ts +26 -1
  42. package/dist/esm/ezeep.js +1 -1
  43. package/dist/esm/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +510 -110
  44. package/dist/esm/loader.js +1 -1
  45. package/dist/esm-es5/ezeep.js +1 -1
  46. package/dist/esm-es5/{ezp-auth_15.entry.js → ezp-auth_16.entry.js} +2 -2
  47. package/dist/esm-es5/loader.js +1 -1
  48. package/dist/ezeep/ezeep.esm.js +1 -1
  49. package/dist/ezeep/{p-fe700ca4.system.entry.js → p-636e190f.system.entry.js} +2 -2
  50. package/dist/ezeep/p-DCznw2Ee.system.js +1 -1
  51. package/dist/ezeep/p-ff075048.entry.js +1 -0
  52. package/dist/ezeep/types/shared/types.d.ts +1 -0
  53. package/dist/types/components/ezp-file-name/ezp-file-name.d.ts +83 -0
  54. package/dist/types/components/ezp-label/ezp-label.d.ts +10 -0
  55. package/dist/types/components/ezp-printer-selection/ezp-printer-selection.d.ts +40 -2
  56. package/dist/types/components.d.ts +65 -2
  57. package/dist/types/shared/storage.d.ts +18 -4
  58. package/dist/types/shared/types.d.ts +1 -0
  59. package/dist/types/utils/printer.d.ts +18 -0
  60. package/package.json +1 -1
  61. package/www/build/ezeep.esm.js +1 -1
  62. package/www/build/{p-fe700ca4.system.entry.js → p-636e190f.system.entry.js} +2 -2
  63. package/www/build/p-DCznw2Ee.system.js +1 -1
  64. package/www/build/p-a2a4f55b.js +1 -0
  65. package/www/build/p-ff075048.entry.js +1 -0
  66. package/www/index.html +1 -1
  67. package/dist/ezeep/p-3ab5a223.entry.js +0 -1
  68. package/www/build/p-3ab5a223.entry.js +0 -1
  69. package/www/build/p-65242d5e.js +0 -1
@@ -2882,8 +2882,10 @@ const KEY = {
2882
2882
  accessToken: 'access_token',
2883
2883
  refreshToken: 'refreshToken',
2884
2884
  isAuthorized: 'isAuthorized',
2885
+ /** Legacy single-printer settings blob, read once to seed `printerSettings`. */
2885
2886
  properties: 'properties',
2886
2887
  printer: 'printer',
2888
+ printerSettings: 'printerSettings',
2887
2889
  };
2888
2890
  function getJSON(key) {
2889
2891
  const raw = localStorage.getItem(key);
@@ -2914,32 +2916,60 @@ const storage = {
2914
2916
  hasIsAuthorized() {
2915
2917
  return localStorage.getItem(KEY.isAuthorized) !== null;
2916
2918
  },
2917
- getProperties() {
2918
- return getJSON(KEY.properties);
2919
+ /**
2920
+ * Settings the user last printed with on `printerId`, or null if that printer
2921
+ * has none yet. Kept per printer so switching printers never carries another
2922
+ * printer's paper size or tray over to one that may not have it.
2923
+ */
2924
+ getPrinterSettings(printerId) {
2925
+ var _a;
2926
+ return (_a = readPrinterSettings()[printerId]) !== null && _a !== void 0 ? _a : null;
2919
2927
  },
2920
- setProperties(properties) {
2921
- localStorage.setItem(KEY.properties, JSON.stringify(properties));
2928
+ setPrinterSettings(printerId, properties) {
2929
+ const all = readPrinterSettings();
2930
+ all[printerId] = properties;
2931
+ localStorage.setItem(KEY.printerSettings, JSON.stringify(all));
2922
2932
  },
2933
+ /** The printer used for the last print, preselected when the dialog reopens. */
2923
2934
  getPrinter() {
2924
2935
  return getJSON(KEY.printer);
2925
2936
  },
2926
2937
  setPrinter(printer) {
2927
2938
  localStorage.setItem(KEY.printer, JSON.stringify(printer));
2928
2939
  },
2929
- /** Remove everything tied to the current session (used on logout). */
2940
+ /**
2941
+ * Remove everything tied to the current session (used on logout).
2942
+ *
2943
+ * Print settings and the last printer deliberately survive: they belong to
2944
+ * this browser profile rather than to the session, and are validated against
2945
+ * the signed-in user's printers on the next load (an unknown printer resets
2946
+ * the selection), so the next user never inherits a selection they can't use.
2947
+ */
2930
2948
  clearSession() {
2931
- localStorage.removeItem(KEY.properties);
2932
2949
  localStorage.removeItem(KEY.refreshToken);
2933
2950
  localStorage.removeItem(KEY.accessToken);
2934
- localStorage.removeItem(KEY.printer);
2935
2951
  localStorage.removeItem(KEY.isAuthorized);
2936
2952
  },
2937
- /** Remove just the saved printer + its properties (used when the saved printer is gone). */
2953
+ /** Forget which printer was last used (when it is gone from the user's list).
2954
+ * Its settings stay put, ready in case that printer comes back. */
2938
2955
  clearSavedPrinter() {
2939
2956
  localStorage.removeItem(KEY.printer);
2940
- localStorage.removeItem(KEY.properties);
2941
2957
  },
2942
2958
  };
2959
+ /**
2960
+ * Read the per-printer settings map, seeding it once from the pre-upgrade
2961
+ * single-printer blob so a user who already printed keeps those settings.
2962
+ */
2963
+ function readPrinterSettings() {
2964
+ const stored = getJSON(KEY.printerSettings);
2965
+ if (stored)
2966
+ return stored;
2967
+ const legacy = getJSON(KEY.properties);
2968
+ const legacyPrinter = getJSON(KEY.printer);
2969
+ if (legacy && (legacyPrinter === null || legacyPrinter === void 0 ? void 0 : legacyPrinter.id))
2970
+ return { [legacyPrinter.id]: legacy };
2971
+ return {};
2972
+ }
2943
2973
 
2944
2974
  class EzpAuthorizationService {
2945
2975
  constructor(redirectURI, clientID) {
@@ -3355,6 +3385,158 @@ const EzpDialog = class {
3355
3385
  };
3356
3386
  EzpDialog.style = ezpDialogCss();
3357
3387
 
3388
+ const ezpFileNameCss = () => `@charset "UTF-8";:host{display:block;min-width:0}#trigger{-ms-flex-align:baseline;align-items:baseline;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:4px;color:inherit;cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;margin:0;max-width:100%;min-width:0;outline-color:var(--ezp-theme-solid);outline-offset:2px;padding:0;text-align:left}.head{-ms-flex:0 1 auto;flex:0 1 auto;min-width:0}.tail{-ms-flex:0 0 auto;flex:0 0 auto}:host(:not(.expanded)) .head,:host(:not(.expanded)) .tail{--ezp-label-whiteSpace:pre}:host(.expanded) .head{--ezp-label-whiteSpace:pre-wrap}:host(.expanded) #trigger{word-break:break-all}#tooltip{background:var(--ezp-core-surface-tertiary);border-radius:8px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 16px 40px -16px var(--ezp-core-backdrop);color:var(--ezp-core-foreground-primary);font-size:12px;font-weight:500;left:0;line-height:18px;padding:var(--ezp-spacing-2) var(--ezp-spacing-3);pointer-events:auto;position:absolute;right:0;word-break:break-all;z-index:10}:host(.place-top) #tooltip{bottom:calc(100% + var(--ezp-spacing-2))}:host(.place-bottom) #tooltip{top:calc(100% + var(--ezp-spacing-2))}`;
3389
+
3390
+ /**
3391
+ * Characters kept at the end of a truncated name. Uploads often differ only in
3392
+ * a suffix like `_DE.pdf`, which a plain end-ellipsis would be the first thing
3393
+ * to hide, so that tail is held back and the middle gives way instead.
3394
+ */
3395
+ const TAIL_LENGTH = 8;
3396
+ /** Hovering across a list shouldn't flash a tooltip over every row in passing. */
3397
+ const OPEN_DELAY_MS = 300;
3398
+ /** Grace period for crossing the gap between the name and the bubble, so the
3399
+ * tooltip can be hovered rather than vanishing on the way (WCAG 1.4.13). */
3400
+ const CLOSE_DELAY_MS = 200;
3401
+ const EzpFileName = class {
3402
+ constructor(hostRef) {
3403
+ index.registerInstance(this, hostRef);
3404
+ /** Invalidates an in-flight open when the pointer leaves. */
3405
+ this.openGeneration = 0;
3406
+ /**
3407
+ *
3408
+ * Properties
3409
+ *
3410
+ */
3411
+ /** The full file name. Always present in the DOM, so screen readers and
3412
+ * copy-paste get it in full however it is truncated on screen. */
3413
+ this.name = '';
3414
+ /** Type scale of the rendered name, passed through to `ezp-label`. */
3415
+ this.level = 'secondary';
3416
+ /** Font weight of the rendered name, passed through to `ezp-label`. */
3417
+ this.weight = 'soft';
3418
+ /** Side the tooltip opens on. Consumers point it away from the edge their
3419
+ * row sits against — `bottom` for the first row of a list, `top` below it. */
3420
+ this.placement = 'top';
3421
+ /**
3422
+ *
3423
+ * States
3424
+ *
3425
+ */
3426
+ /** Set by tapping the name: shows it in full, wrapped over several lines.
3427
+ * This is the touch counterpart of the tooltip, which needs a pointer. */
3428
+ this.expanded = false;
3429
+ this.tooltipOpen = false;
3430
+ this.openTooltip = () => {
3431
+ if (!this.hasHover || this.expanded)
3432
+ return;
3433
+ clearTimeout(this.openTimeout);
3434
+ const generation = ++this.openGeneration;
3435
+ this.openTimeout = setTimeout(async () => {
3436
+ const clipped = await this.isClipped();
3437
+ // Measuring yields, and the pointer may have moved on in the meantime —
3438
+ // opening now would leave a tooltip behind with nothing to dismiss it.
3439
+ if (clipped && generation === this.openGeneration)
3440
+ this.tooltipOpen = true;
3441
+ }, OPEN_DELAY_MS);
3442
+ };
3443
+ this.closeTooltip = () => {
3444
+ this.openGeneration++;
3445
+ clearTimeout(this.openTimeout);
3446
+ clearTimeout(this.closeTimeout);
3447
+ this.tooltipOpen = false;
3448
+ };
3449
+ /** Leaves the tooltip up briefly so the pointer can reach it. */
3450
+ this.scheduleClose = () => {
3451
+ clearTimeout(this.openTimeout);
3452
+ clearTimeout(this.closeTimeout);
3453
+ this.closeTimeout = setTimeout(this.closeTooltip, CLOSE_DELAY_MS);
3454
+ };
3455
+ this.cancelScheduledClose = () => {
3456
+ clearTimeout(this.closeTimeout);
3457
+ };
3458
+ this.toggleExpanded = () => {
3459
+ this.expanded = !this.expanded;
3460
+ // The full name is on screen now; a tooltip repeating it is just in the way.
3461
+ if (this.expanded)
3462
+ this.closeTooltip();
3463
+ };
3464
+ }
3465
+ /**
3466
+ *
3467
+ * Lifecycle methods
3468
+ *
3469
+ */
3470
+ disconnectedCallback() {
3471
+ clearTimeout(this.openTimeout);
3472
+ clearTimeout(this.closeTimeout);
3473
+ }
3474
+ /**
3475
+ *
3476
+ * Listeners
3477
+ *
3478
+ */
3479
+ /**
3480
+ * Escape dismisses the tooltip, and only the tooltip.
3481
+ *
3482
+ * Listening globally catches the key however the tooltip was opened,
3483
+ * including by hover, when nothing here has focus. It has to run in the
3484
+ * capture phase: stopping propagation on the way back up happens after every
3485
+ * ancestor has already seen the key, so a host app that closes its dialog on
3486
+ * Escape would close it as the tooltip was dismissed.
3487
+ *
3488
+ * `window` rather than `document`, because dialog libraries capture on the
3489
+ * document themselves — Radix's `DismissableLayer` does — and register before
3490
+ * a component mounted inside them, so they would still see the key first.
3491
+ * Capture runs window before document, so this transient layer consumes the
3492
+ * key first, and only while it is actually open.
3493
+ */
3494
+ handleKeyDown(event) {
3495
+ if (event.key === 'Escape' && this.tooltipOpen) {
3496
+ event.stopPropagation();
3497
+ this.closeTooltip();
3498
+ }
3499
+ }
3500
+ /**
3501
+ *
3502
+ * Private methods
3503
+ *
3504
+ */
3505
+ /** Tooltips need a pointer; touch devices get the tap-to-expand path instead.
3506
+ * Tapping fires a synthetic `mouseenter` in most mobile browsers, so without
3507
+ * this check a tooltip would open on every tap. */
3508
+ get hasHover() {
3509
+ var _a, _b;
3510
+ return (_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(hover: hover)').matches) !== null && _b !== void 0 ? _b : false;
3511
+ }
3512
+ /** Whether anything is actually hidden. A name that fits needs no tooltip —
3513
+ * repeating text the reader can already see is just noise in the way. */
3514
+ async isClipped() {
3515
+ var _a, _b;
3516
+ const head = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('.head');
3517
+ if (!head)
3518
+ return false;
3519
+ await ((_b = head.componentOnReady) === null || _b === void 0 ? void 0 : _b.call(head));
3520
+ return head.isTruncated();
3521
+ }
3522
+ /**
3523
+ *
3524
+ * Render method
3525
+ *
3526
+ */
3527
+ render() {
3528
+ // Splitting is a rendering device only: `head` holds everything but the last
3529
+ // few characters and is the part CSS is allowed to clip, so the two labels
3530
+ // together still spell out the whole name.
3531
+ const split = !this.expanded && this.name.length > TAIL_LENGTH;
3532
+ const head = split ? this.name.slice(0, -TAIL_LENGTH) : this.name;
3533
+ const tail = split ? this.name.slice(-TAIL_LENGTH) : '';
3534
+ return (index.h(index.Host, { key: '4e84aca15abf4d1e59f2418fff0fdc13efd2a7b2', class: { expanded: this.expanded, [`place-${this.placement}`]: true } }, index.h("button", { key: '61de272bffc87cd440cd307ba49bee1f9795f8ae', type: "button", id: "trigger", "aria-label": this.name, "aria-expanded": this.expanded ? 'true' : 'false', onClick: this.toggleExpanded, onMouseEnter: this.openTooltip, onMouseLeave: this.scheduleClose, onFocus: this.openTooltip, onBlur: this.closeTooltip }, index.h("ezp-label", { key: 'd8120b13f24c5921d688431f90f7967b60fe4878', class: "head", ellipsis: split, level: this.level, weight: this.weight, text: head }), split && index.h("ezp-label", { key: '9129bedf96a55bd650efca46a3f2e7e599af2776', class: "tail", level: this.level, weight: this.weight, text: tail })), this.tooltipOpen && (index.h("div", { key: 'fb710729e9262fca148c342bf99c001fd5a760c3', id: "tooltip", "aria-hidden": "true", onMouseEnter: this.cancelScheduledClose, onMouseLeave: this.closeTooltip }, this.name))));
3535
+ }
3536
+ get host() { return index.getElement(this); }
3537
+ };
3538
+ EzpFileName.style = ezpFileNameCss();
3539
+
3358
3540
  const ezpIconCss = () => `:host{-ms-flex-line-pack:center;align-content:center;background:var(--ezp-icon-background, transparent);border-radius:var(--ezp-icon-borderRadius, 0);display:grid;grid-template:var(--ezp-icon-gridTemplate)/var(--ezp-icon-gridTemplate);height:var(--ezp-icon-height, var(--ezp-icon-size));-ms-flex-pack:center;justify-content:center;padding:var(--ezp-icon-padding, 0);width:var(--ezp-icon-width, var(--ezp-icon-size))}:host(.framed){--ezp-icon-background:var(--ezp-core-shade-primary);--ezp-icon-borderRadius:50%;--ezp-icon-padding:var(--ezp-icon-frame)}:host(.normal){--ezp-icon-size:18px;--ezp-icon-gridTemplate:24px;--ezp-icon-frame:var(--ezp-spacing-3)}:host(.large){--ezp-icon-size:36px;--ezp-icon-gridTemplate:48px;--ezp-icon-frame:var(--ezp-spacing-4)}:host(.huge){--ezp-icon-size:54px;--ezp-icon-gridTemplate:72px;--ezp-icon-frame:var(--ezp-spacing-5)}svg{display:block;fill:var(--ezp-icon-fill, currentColor);height:100%;width:100%}`;
3359
3541
 
3360
3542
  const EzpIcon = class {
@@ -3389,7 +3571,7 @@ const EzpIcon = class {
3389
3571
  return (
3390
3572
  // Decorative: icons here always sit next to a label or live-region text,
3391
3573
  // so hide them from the accessibility tree to avoid double announcements.
3392
- index.h(index.Host, { key: 'e1b22ece00f1260a34561c8d1efd44c2d5f37c73', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, index.h("div", { key: '0734d4b5fdc363303d69b7e5dc138f8caeaa316c', id: "glyph", innerHTML: this.glyph })));
3574
+ index.h(index.Host, { key: 'f1a45d38b75ccf4e0c5e6200d9d04c7e5766bfbc', class: `${this.size} ${this.framed ? 'framed' : ''}`, "aria-hidden": "true" }, index.h("div", { key: '70f6963181d31089fefb662079e1e075540d2fe7', id: "glyph", innerHTML: this.glyph })));
3393
3575
  }
3394
3576
  static get assetsDirs() { return ["assets"]; }
3395
3577
  };
@@ -3431,7 +3613,7 @@ const EzpIconButton = class {
3431
3613
  // Icon-only control: derive an accessible name from the icon so screen
3432
3614
  // readers announce something meaningful (e.g. "menu", "printer").
3433
3615
  const label = this.icon.replace(/[-_]/g, ' ');
3434
- return (index.h(index.Host, { key: '7d3d43ec31503ff7ecc87e9f498ee5b2d09d5d96', class: `${this.level}` }, index.h(TagType, Object.assign({ key: 'b7d5c646bb66ebff92d661574c647f8a2773a908', id: "button", "aria-label": label }, attributes), index.h("ezp-icon", { key: 'bc4c322b7c9389a8aaa27feac7084ae9e1befaa4', name: this.icon }))));
3616
+ return (index.h(index.Host, { key: 'd67a43c2b91eaa4fa79dd8559824f3ffc23757b2', class: `${this.level}` }, index.h(TagType, Object.assign({ key: '3b11b4e0c40c8f900496ae03a4eee11f0980cd80', id: "button", "aria-label": label }, attributes), index.h("ezp-icon", { key: '14a35e8f779628197f7dd89219792d7809990631', name: this.icon }))));
3435
3617
  }
3436
3618
  };
3437
3619
  EzpIconButton.style = ezpIconButtonCss();
@@ -3486,7 +3668,7 @@ const EzpInput = class {
3486
3668
  }
3487
3669
  render() {
3488
3670
  const hasIcon = !!this.icon;
3489
- return (index.h(index.Host, { key: '47a8f8b4f1dd6a8cb2b67ffc21e8770e555a52e3', class: { focused: this.focused, 'has-icon': hasIcon }, onClick: this.setFocus }, hasIcon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '7d9401d2ab927cb52cd2fcfbdcf8790c5a6d0228', id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { key: 'f0422183a1677ba90e8fe74d6ccf3abdaeb3d645', id: "input", type: this.type, value: this.value, placeholder: this.placeholder, "aria-label": this.label, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
3671
+ return (index.h(index.Host, { key: 'f36f5811ba4e86b0aa3f53be916220136a1d2443', class: { focused: this.focused, 'has-icon': hasIcon }, onClick: this.setFocus }, hasIcon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '88f93411e1463b23ca4ae88d278a69df5038509d', id: "label", noWrap: true, level: "secondary", text: this.label }), index.h("input", { key: 'b23ba3c8fea465a559e9c6d7b3da50152b412a1c', id: "input", type: this.type, value: this.value, placeholder: this.placeholder, "aria-label": this.label, onInput: (event) => this.handleChange(event), ref: (input) => (this.input = input), onFocus: this.handleFocus, onBlur: this.handleBlur }), this.suffix ? index.h("ezp-label", { id: "suffix", level: "secondary", text: this.suffix }) : null));
3490
3672
  }
3491
3673
  };
3492
3674
  EzpInput.style = ezpInputCss();
@@ -3512,14 +3694,31 @@ const EzpLabel = class {
3512
3694
  /** Description... */
3513
3695
  this.weight = 'soft';
3514
3696
  }
3697
+ /**
3698
+ *
3699
+ * Public methods
3700
+ *
3701
+ */
3702
+ /** Whether the text is currently clipped — `ellipsis` only bites when the
3703
+ * text outgrows the space it was given, which callers cannot tell from the
3704
+ * props alone. Lets a caller offer the full text only when it is needed. */
3705
+ async isTruncated() {
3706
+ var _a;
3707
+ const text = (_a = this.host.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector('#text');
3708
+ if (!text)
3709
+ return false;
3710
+ // A pixel of slack: sub-pixel layout rounds scrollWidth up on its own.
3711
+ return text.scrollWidth > text.clientWidth + 1;
3712
+ }
3515
3713
  /**
3516
3714
  *
3517
3715
  * Render method
3518
3716
  *
3519
3717
  */
3520
3718
  render() {
3521
- return (index.h(index.Host, { key: '941746aaf861bd3ffe8dc65c1c5dbc52866be923', class: `${this.level} ${this.weight} ${this.ellipsis ? 'ellipsis' : ''} ${this.noWrap ? 'no-wrap' : ''}` }, index.h("div", { key: '36ee30f53e0209f569129ce1c1ca8e1ccf5d0803', id: "text" }, this.text)));
3719
+ return (index.h(index.Host, { key: '42139679511e711132912a1f762d345951fd1774', class: `${this.level} ${this.weight} ${this.ellipsis ? 'ellipsis' : ''} ${this.noWrap ? 'no-wrap' : ''}` }, index.h("div", { key: '5e54e8142d274cacb375cce8d5ef52ccdeaeec84', id: "text" }, this.text)));
3522
3720
  }
3721
+ get host() { return index.getElement(this); }
3523
3722
  };
3524
3723
  EzpLabel.style = ezpLabelCss();
3525
3724
 
@@ -38097,6 +38296,8 @@ const userStore = createStore({
38097
38296
  appearance: '',
38098
38297
  });
38099
38298
 
38299
+ /** Duplex modes the dialog offers: none, long edge, short edge. */
38300
+ const DUPLEX_MODES = [1, 2, 3];
38100
38301
  /**
38101
38302
  * Derive the default print properties for a printer from its configuration.
38102
38303
  *
@@ -38139,6 +38340,78 @@ function applyPrinterDefaults(config, properties) {
38139
38340
  delete properties.PageRanges;
38140
38341
  return properties;
38141
38342
  }
38343
+ /**
38344
+ * Carry the settings the user last printed with on this printer over the
38345
+ * printer's own defaults, dropping anything the printer can no longer do.
38346
+ *
38347
+ * Capabilities change between sessions — a printer loses a tray, an admin
38348
+ * swaps the paper formats — and a stale value would otherwise be sent to the
38349
+ * API or shown as a selection that isn't in the list. Each field is therefore
38350
+ * only restored if the current config still offers it; everything else stays
38351
+ * on the default `applyPrinterDefaults` just put in place. Copies and page
38352
+ * ranges are never part of `saved`, so they are never restored.
38353
+ */
38354
+ function applySavedProperties(config, saved, properties) {
38355
+ var _a, _b, _c, _d, _e;
38356
+ applyPrinterDefaults(config, properties);
38357
+ if (!saved)
38358
+ return properties;
38359
+ if (config.ColorSupported && typeof saved.color === 'boolean') {
38360
+ properties.color = saved.color;
38361
+ }
38362
+ if (config.DuplexSupported && DUPLEX_MODES.includes(Number(saved.duplexmode))) {
38363
+ properties.duplex = true;
38364
+ properties.duplexmode = Number(saved.duplexmode);
38365
+ }
38366
+ const paper = (_a = config.PaperFormats) === null || _a === void 0 ? void 0 : _a.find((format) => format.Id === Number(saved.paperid));
38367
+ if (paper) {
38368
+ properties.paper = paper.Name;
38369
+ properties.paperid = paper.Id;
38370
+ // Only meaningful for the custom format, which carries its own dimensions.
38371
+ if (paper.Id === PAPER_ID) {
38372
+ properties.paperwidth = saved.paperwidth;
38373
+ properties.paperlength = saved.paperlength;
38374
+ }
38375
+ }
38376
+ // Orientations are offered as 1-based positions in `OrientationsSupported`.
38377
+ const orientation = Number(saved.orientation);
38378
+ if (orientation >= 1 && orientation <= ((_c = (_b = config.OrientationsSupported) === null || _b === void 0 ? void 0 : _b.length) !== null && _c !== void 0 ? _c : 0)) {
38379
+ properties.orientation = orientation;
38380
+ }
38381
+ if (typeof saved.resolution === 'string' && ((_d = config.Resolutions) === null || _d === void 0 ? void 0 : _d.includes(saved.resolution))) {
38382
+ properties.resolution = saved.resolution;
38383
+ }
38384
+ if (hasTrays(config)) {
38385
+ const tray = (_e = config.Trays) === null || _e === void 0 ? void 0 : _e.find((option) => (option === null || option === void 0 ? void 0 : option.Index) === Number(saved.defaultSource));
38386
+ if (tray) {
38387
+ properties.trayname = tray.Name;
38388
+ properties.defaultSource = tray.Index;
38389
+ }
38390
+ }
38391
+ return properties;
38392
+ }
38393
+ /**
38394
+ * The slice of the current selection worth remembering for next time: what the
38395
+ * print dialog offers per printer, minus copies and page ranges, which belong
38396
+ * to the one document being printed rather than to the printer.
38397
+ */
38398
+ function pickRememberedProperties(properties) {
38399
+ const { color, duplex, duplexmode, paper, paperid, paperwidth, paperlength } = properties;
38400
+ const { orientation, resolution, trayname, defaultSource } = properties;
38401
+ return {
38402
+ color,
38403
+ duplex,
38404
+ duplexmode,
38405
+ paper,
38406
+ paperid,
38407
+ paperwidth,
38408
+ paperlength,
38409
+ orientation,
38410
+ resolution,
38411
+ trayname,
38412
+ defaultSource,
38413
+ };
38414
+ }
38142
38415
  /** Does this printer config report an explicit "no usable trays" state? */
38143
38416
  function hasNoTrays(config) {
38144
38417
  return !!config.Trays && config.Trays.length >= 0 && config.Trays[0] == null;
@@ -38236,7 +38509,7 @@ async function uploadAndPrintFile(ctx, file, hooks = {}) {
38236
38509
  }
38237
38510
  }
38238
38511
 
38239
- const ezpPrinterSelectionCss = () => `:host{--ezp-status-border-radius:16px;background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;inset:var(--ezp-printerSelection-inset, 0);overflow-y:auto;padding:var(--ezp-printerSelection-padding, var(--ezp-spacing-5));position:var(--ezp-printerSelection-position, fixed);z-index:1}:host(.seamless){--ezp-printerSelection-background:transparent;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-box-margin:0;--ezp-printerSelection-box-padding:0;--ezp-printerSelection-inset:auto;--ezp-printerSelection-padding:0;--ezp-printerSelection-position:static;--ezp-printerSelection-width:100%}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:16px;-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));color:var(--ezp-core-foreground-primary);margin:var(--ezp-printerSelection-box-margin, auto);padding:var(--ezp-printerSelection-box-padding, 0);position:relative;width:var(--ezp-printerSelection-width, 384px)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;padding:var(--ezp-spacing-4);position:relative;z-index:3}#title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}#title ezp-label{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#files-badge{background:var(--ezp-theme-translucent);border-radius:999px;color:var(--ezp-theme-solid);font-size:12px;font-weight:600;line-height:1;padding:5px 10px;white-space:nowrap}#header-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-4)}#files-card{background:var(--ezp-core-surface-secondary);border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}.file-row ezp-label{--ezp-label-minWidth:0}.file-row-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px;color:var(--ezp-theme-solid);-ms-flex-negative:0;flex-shrink:0}#printer-caption{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;padding:0 var(--ezp-spacing-1);text-transform:uppercase}#printer-card{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--ezp-core-outline);box-shadow:inset 0 0 0 1px var(--ezp-core-outline);position:relative}#printer{--ezp-select-label-display:none;--ezp-select-toggle-gridTemplateAreas:'icon value accessory';--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-textAlign:left}#print{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-theme-solid);border:0;border-radius:8px;color:var(--ezp-white-100);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:var(--ezp-spacing-3);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:13px var(--ezp-spacing-4);-webkit-transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#print ezp-icon{--ezp-icon-size:20px;--ezp-icon-gridTemplate:20px}@media (hover: hover){#print:not(:disabled):hover{opacity:0.9}#print:not(:disabled):active{opacity:0.8}}#print:disabled{background:var(--ezp-core-shade-primary);color:var(--ezp-core-foreground-tertiary);cursor:default}#options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#options>*{-webkit-box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline)}#options>*:last-child{-webkit-box-shadow:none;box-shadow:none}#footer{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));border-radius:0 0 16px 16px;border-top:1px solid var(--ezp-core-outline);bottom:0;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4);position:-webkit-sticky;position:sticky;z-index:3}#cancel{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-borderRadius:8px;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary);--ezp-textButton-padding:13px var(--ezp-spacing-3)}`;
38512
+ const ezpPrinterSelectionCss = () => `:host{--ezp-status-border-radius:16px;background:var(--ezp-printerSelection-background, var(--ezp-core-backdrop));-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;inset:var(--ezp-printerSelection-inset, 0);overflow-y:auto;padding:var(--ezp-printerSelection-padding, var(--ezp-spacing-5));position:var(--ezp-printerSelection-position, fixed);z-index:1}:host(.seamless){--ezp-printerSelection-background:transparent;--ezp-printerSelection-box-background:transparent;--ezp-printerSelection-box-boxShadow:none;--ezp-printerSelection-box-margin:0;--ezp-printerSelection-box-padding:0;--ezp-printerSelection-inset:auto;--ezp-printerSelection-padding:0;--ezp-printerSelection-position:static;--ezp-printerSelection-width:100%}#box{background:var(--ezp-printerSelection-box-background, var(--ezp-core-surface-tertiary));border-radius:16px;-webkit-box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));box-shadow:var(--ezp-printerSelection-box-boxShadow, 0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop));color:var(--ezp-core-foreground-primary);margin:var(--ezp-printerSelection-box-margin, auto);padding:var(--ezp-printerSelection-box-padding, 0);position:relative;width:var(--ezp-printerSelection-width, 384px)}#header{-ms-flex-align:center;align-items:center;border-bottom:1px solid var(--ezp-core-outline);color:var(--ezp-core-foreground-primary);display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);-ms-flex-pack:justify;justify-content:space-between;padding:var(--ezp-spacing-4);position:relative;z-index:3}#title{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0}#title ezp-label{--ezp-label-fontSize:20px;--ezp-label-lineHeight:26px}#files-badge{background:var(--ezp-theme-translucent);border-radius:999px;color:var(--ezp-theme-solid);font-size:12px;font-weight:600;line-height:1;padding:5px 10px;white-space:nowrap}#header-actions{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-2)}#body{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3);padding:var(--ezp-spacing-4)}#files-card{background:var(--ezp-core-surface-secondary);border-radius:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file-row{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;gap:var(--ezp-spacing-3);min-width:0;position:relative}.file-row ezp-file-name{-ms-flex:0 1 auto;flex:0 1 auto}.file-row-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px;color:var(--ezp-theme-solid);-ms-flex-negative:0;flex-shrink:0}#printer-caption{color:var(--ezp-core-foreground-secondary);letter-spacing:0.08em;padding:0 var(--ezp-spacing-1);text-transform:uppercase}#printer-card{border-radius:12px;-webkit-box-shadow:inset 0 0 0 1px var(--ezp-core-outline);box-shadow:inset 0 0 0 1px var(--ezp-core-outline);position:relative}#printer{--ezp-select-label-display:none;--ezp-select-toggle-gridTemplateAreas:'icon value accessory';--ezp-select-toggle-gridTemplateRows:auto;--ezp-select-value-textAlign:left}#print{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-theme-solid);border:0;border-radius:8px;color:var(--ezp-white-100);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:var(--ezp-spacing-3);-ms-flex-pack:center;justify-content:center;margin:0;outline:none;padding:13px var(--ezp-spacing-4);-webkit-transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:opacity var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#print ezp-icon{--ezp-icon-size:20px;--ezp-icon-gridTemplate:20px}@media (hover: hover){#print:not(:disabled):hover{opacity:0.9}#print:not(:disabled):active{opacity:0.8}}#print:disabled{background:var(--ezp-core-shade-primary);color:var(--ezp-core-foreground-tertiary);cursor:default}#options{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}#options>*{-webkit-box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline);box-shadow:inset 0 -1px 0 0 var(--ezp-core-outline)}#options>*:last-child{-webkit-box-shadow:none;box-shadow:none}#footer{background:var(--ezp-printerSelection-body-background, var(--ezp-core-surface-tertiary));border-radius:0 0 16px 16px;border-top:1px solid var(--ezp-core-outline);bottom:0;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4);position:-webkit-sticky;position:sticky;z-index:3}#cancel{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-borderRadius:8px;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary);--ezp-textButton-padding:13px var(--ezp-spacing-3)}`;
38240
38513
 
38241
38514
  const EzpPrinterSelection = class {
38242
38515
  constructor(hostRef) {
@@ -38289,6 +38562,10 @@ const EzpPrinterSelection = class {
38289
38562
  this.hubDriverError = false;
38290
38563
  this.userMenuOpen = false;
38291
38564
  this.printStopped = false;
38565
+ /** Starts empty so the dialog can still render if the list never arrives. */
38566
+ this.printers = [];
38567
+ /** Starts empty so the dialog renders even if the list never loads. */
38568
+ this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
38292
38569
  this.selectedPrinterConfig = {
38293
38570
  Default: {
38294
38571
  Color: '',
@@ -38321,6 +38598,8 @@ const EzpPrinterSelection = class {
38321
38598
  trayname: '',
38322
38599
  PageRanges: '',
38323
38600
  };
38601
+ /** True while a printer's capabilities are being fetched. */
38602
+ this.loadingPrinterConfig = false;
38324
38603
  this.currentFileIndex = 0;
38325
38604
  this.totalFiles = 0;
38326
38605
  this.failedFiles = [];
@@ -38511,8 +38790,7 @@ const EzpPrinterSelection = class {
38511
38790
  if (hubTimeout)
38512
38791
  clearTimeout(hubTimeout);
38513
38792
  }
38514
- storage.setProperties(this.selectedProperties);
38515
- storage.setPrinter(this.selectedPrinter);
38793
+ this.rememberSelection();
38516
38794
  this.printStopped = false;
38517
38795
  };
38518
38796
  this.handleUserMenu = () => {
@@ -38605,24 +38883,45 @@ const EzpPrinterSelection = class {
38605
38883
  break;
38606
38884
  }
38607
38885
  }
38608
- /** Print needs a printer, no job in flight and a valid page range. */
38886
+ /** Print needs a printer with its capabilities in hand, no job in flight and
38887
+ * a valid page range. The config matters: between picking a printer and its
38888
+ * properties arriving, the selection is set but the properties still hold
38889
+ * blank defaults, and printing then saves those as that printer's settings. */
38609
38890
  get printDisabled() {
38610
- return this.selectedPrinter.id === '' || this.printProcessing || this.pageRangeInvalid;
38891
+ return (this.selectedPrinter.id === '' ||
38892
+ this.loadingPrinterConfig ||
38893
+ this.printProcessing ||
38894
+ this.pageRangeInvalid);
38895
+ }
38896
+ /** Keep this printer and its settings for the next print. Stored per printer,
38897
+ * so each one keeps its own and no setting follows the user to a printer
38898
+ * that cannot do it. */
38899
+ rememberSelection() {
38900
+ if (!this.selectedPrinter.id)
38901
+ return;
38902
+ storage.setPrinterSettings(this.selectedPrinter.id, pickRememberedProperties(this.selectedProperties));
38903
+ storage.setPrinter(this.selectedPrinter);
38611
38904
  }
38612
- getPropertiesFromLocalStorage() {
38613
- const savedProperties = storage.getProperties();
38614
- if (savedProperties) {
38615
- this.selectedProperties = savedProperties;
38616
- }
38905
+ /**
38906
+ * Decide which printer the dialog opens on: the one last printed to, or the
38907
+ * user's only printer when there is nothing to choose between. Its settings
38908
+ * follow once its config is in, since they can only be validated against the
38909
+ * printer's capabilities.
38910
+ */
38911
+ selectInitialPrinter() {
38912
+ var _a, _b;
38617
38913
  const savedPrinter = storage.getPrinter();
38618
- if (savedPrinter) {
38619
- if (this.printers.some((printer) => printer.id === savedPrinter.id)) {
38620
- this.selectedPrinter = savedPrinter;
38621
- }
38622
- else {
38623
- this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
38624
- storage.clearSavedPrinter();
38625
- }
38914
+ const savedIsAvailable = (_a = this.printers) === null || _a === void 0 ? void 0 : _a.some((printer) => printer.id === (savedPrinter === null || savedPrinter === void 0 ? void 0 : savedPrinter.id));
38915
+ // A printer the user no longer has must not stay preselected.
38916
+ if (savedPrinter && !savedIsAvailable)
38917
+ storage.clearSavedPrinter();
38918
+ if (savedPrinter && savedIsAvailable) {
38919
+ this.selectedPrinter = savedPrinter;
38920
+ }
38921
+ else if (((_b = this.printers) === null || _b === void 0 ? void 0 : _b.length) === 1) {
38922
+ // Nothing to pick between: opening a dropdown with one entry in it is
38923
+ // busywork, so start on it.
38924
+ this.selectedPrinter = this.printers[0];
38626
38925
  }
38627
38926
  else {
38628
38927
  this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
@@ -38641,17 +38940,22 @@ const EzpPrinterSelection = class {
38641
38940
  }
38642
38941
  async setSelectedProperties(eventDetails) {
38643
38942
  switch (eventDetails.type) {
38644
- case 'printer':
38645
- this.selectedPrinter.id = eventDetails.id;
38646
- this.selectedPrinter.name = eventDetails.title;
38647
- this.selectedPrinter.is_queue = eventDetails.is_queue;
38648
- await this.printService
38649
- .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
38650
- .then((data) => {
38651
- this.selectedPrinterConfig = Object.assign(Object.assign({}, this.selectedPrinterConfig), data[0]);
38652
- applyPrinterDefaults(this.selectedPrinterConfig, this.selectedProperties);
38653
- });
38943
+ case 'printer': {
38944
+ const picked = this.printers.find((printer) => printer.id === eventDetails.id);
38945
+ this.selectedPrinter = picked !== null && picked !== void 0 ? picked : {
38946
+ id: eventDetails.id,
38947
+ name: eventDetails.title,
38948
+ location: '',
38949
+ is_queue: eventDetails.is_queue,
38950
+ };
38951
+ // Same guard as the initial load. Without it a failed fetch left the
38952
+ // printer selected while the config still described the *previous*
38953
+ // one: Print stayed enabled, the job went out with settings nothing
38954
+ // had checked against this printer, and those settings were then
38955
+ // saved under its id and restored on later opens.
38956
+ await this.loadSelectedPrinterConfig();
38654
38957
  break;
38958
+ }
38655
38959
  case 'color':
38656
38960
  this.selectedProperties.color =
38657
38961
  eventDetails.title == instance.t('printer_selection.color_color') ? true : false;
@@ -38716,6 +39020,55 @@ const EzpPrinterSelection = class {
38716
39020
  onJobId: (jobId) => (printStore.state.jobID = jobId),
38717
39021
  });
38718
39022
  }
39023
+ /**
39024
+ * What a dropdown should show: the current selection — restored from the last
39025
+ * print, or just made by the user — and otherwise the printer's own default.
39026
+ *
39027
+ * The fallbacks matter because a config may describe its default only by name
39028
+ * (`Default.Duplex`, `Default.Paper`, `Default.Tray`) without flagging the
39029
+ * matching entry, which is all these dropdowns had to go on before settings
39030
+ * were remembered.
39031
+ */
39032
+ duplexPreSelection() {
39033
+ var _a;
39034
+ if (!this.selectedPrinter.id)
39035
+ return null;
39036
+ const mode = Number(this.selectedProperties.duplexmode);
39037
+ if (mode)
39038
+ return mode;
39039
+ switch ((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Duplex) {
39040
+ case 'duplex_simplex':
39041
+ return instance.t('printer_selection.duplex_none');
39042
+ case 'duplex_vertical':
39043
+ return instance.t('printer_selection.duplex_long');
39044
+ case 'duplex_horizontal':
39045
+ return instance.t('printer_selection.duplex_short');
39046
+ default:
39047
+ return null;
39048
+ }
39049
+ }
39050
+ paperPreSelection() {
39051
+ var _a, _b;
39052
+ if (!this.selectedPrinter.id)
39053
+ return null;
39054
+ if (this.selectedProperties.paper)
39055
+ return this.selectedProperties.paper;
39056
+ const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper;
39057
+ return name && ((_b = this.selectedPrinterConfig.PaperFormats) === null || _b === void 0 ? void 0 : _b.some((el) => el.Name.includes(name)))
39058
+ ? name
39059
+ : null;
39060
+ }
39061
+ trayPreSelection() {
39062
+ var _a, _b;
39063
+ if (!this.selectedPrinter.id)
39064
+ return null;
39065
+ if (this.selectedProperties.trayname)
39066
+ return this.selectedProperties.trayname;
39067
+ const name = (_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray;
39068
+ return name && ((_b = this.selectedPrinterConfig.Trays) === null || _b === void 0 ? void 0 : _b.some((el) => el === null || el === void 0 ? void 0 : el.Name.includes(name)))
39069
+ ? name
39070
+ : null;
39071
+ }
38719
39072
  setDefaultPaperFormat() {
38720
39073
  var _a, _b, _c, _d, _e;
38721
39074
  let format;
@@ -38784,46 +39137,105 @@ const EzpPrinterSelection = class {
38784
39137
  this.unsubscribeLanguage = subscribeToLanguageChange(this);
38785
39138
  this.printService = new EzpPrintService(this.redirectURI, this.clientID);
38786
39139
  this.printService.registerFetchInterceptor();
38787
- await this.getUserInfo();
38788
- await this.printService
38789
- .getPrinterList(authStore.state.accessToken)
38790
- .then((printers) => {
38791
- this.printers = printers;
38792
- if (!(this.printers.length > 0)) {
39140
+ try {
39141
+ // A missing display name must not stop the user from printing.
39142
+ await this.getUserInfo().catch(() => undefined);
39143
+ let printersLoaded = false;
39144
+ try {
39145
+ const printers = await this.printService.getPrinterList(authStore.state.accessToken);
39146
+ // A failed request still resolves: the API answers with a `{code,
39147
+ // message}` body, which would survive `?? []` and break on `.some`.
39148
+ if (!Array.isArray(printers))
39149
+ throw new Error('Unexpected printer list payload');
39150
+ this.printers = printers;
39151
+ printersLoaded = true;
39152
+ }
39153
+ catch (_a) {
39154
+ this.printers = [];
39155
+ }
39156
+ if (!printersLoaded) {
39157
+ // Nothing is known about this user's printers, so the saved printer is
39158
+ // left untouched: treating it as gone would clear it from storage and
39159
+ // lose the settings that are only reachable through it.
38793
39160
  this.noPrinters = true;
38794
39161
  }
38795
- });
38796
- this.getPropertiesFromLocalStorage();
38797
- // if printer is stored from previous print, get the config to enable property selection
38798
- if (this.selectedPrinter.id != '') {
38799
- await this.printService
38800
- .getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id)
38801
- .then((data) => {
38802
- this.selectedPrinterConfig = data[0];
38803
- applyPrinterDefaults(this.selectedPrinterConfig, this.selectedProperties);
38804
- });
39162
+ else {
39163
+ if (this.printers.length === 0) {
39164
+ this.noPrinters = true;
39165
+ }
39166
+ this.selectInitialPrinter();
39167
+ // A printer carried over from a previous print, or the only one the
39168
+ // user has, needs its config before its properties can be offered.
39169
+ if (this.selectedPrinter.id != '') {
39170
+ await this.loadSelectedPrinterConfig();
39171
+ }
39172
+ }
39173
+ let supportedExtensionsLoaded = false;
39174
+ try {
39175
+ const response = await (await this.printService.getConfig(authStore.state.accessToken)).json();
39176
+ printStore.state.supportedFileExtensions = response.System.FILEEXT;
39177
+ supportedExtensionsLoaded = true;
39178
+ }
39179
+ catch (_b) {
39180
+ // Handled below: without the list, nothing can be validated against it.
39181
+ }
39182
+ try {
39183
+ await this.printService
39184
+ .getAllPrinterProperties(authStore.state.accessToken)
39185
+ .then((printerConfig) => {
39186
+ this.printerConfig = printerConfig;
39187
+ });
39188
+ }
39189
+ catch (_c) {
39190
+ // Only used to describe other printers; the dialog works without it.
39191
+ }
39192
+ // Skipped when the list never arrived: every file would compare as
39193
+ // unsupported and the user would be told their document cannot be
39194
+ // printed when nothing is actually wrong with it.
39195
+ if (supportedExtensionsLoaded && this.files && this.files.length > 0) {
39196
+ // Validate all files
39197
+ const validationPromises = this.files.map((file) => this.validateFileType(file.name));
39198
+ const validationResults = await Promise.all(validationPromises);
39199
+ const allValid = validationResults.every((valid) => valid);
39200
+ this.notSupported = !allValid;
39201
+ }
39202
+ }
39203
+ finally {
39204
+ // Whatever failed above, the dialog has to become usable: the loading
39205
+ // status carries no close button, so throwing out of here would strand
39206
+ // the user on "Loading My Printers…" with no way back.
39207
+ this.loading = false;
39208
+ }
39209
+ }
39210
+ /**
39211
+ * Fetch the selected printer's capabilities and restore its saved settings.
39212
+ *
39213
+ * A failure drops the selection rather than keeping a printer the dialog
39214
+ * cannot describe: the options would stay disabled while Print stayed
39215
+ * enabled, so the job would go out with properties nothing has verified.
39216
+ * With no selection the user picks from the list, which fetches again.
39217
+ */
39218
+ async loadSelectedPrinterConfig() {
39219
+ this.loadingPrinterConfig = true;
39220
+ try {
39221
+ const data = await this.printService.getPrinterProperties(authStore.state.accessToken, this.selectedPrinter.id);
39222
+ // An empty list or an error body leaves nothing to configure from.
39223
+ const config = data === null || data === void 0 ? void 0 : data[0];
39224
+ if (!config)
39225
+ throw new Error('No properties returned for the selected printer');
39226
+ this.selectedPrinterConfig = config;
39227
+ applySavedProperties(config, storage.getPrinterSettings(this.selectedPrinter.id), this.selectedProperties);
39228
+ this.setPaperid();
38805
39229
  if (this.selectedProperties.paper === '') {
38806
39230
  this.setDefaultPaperFormat();
38807
39231
  }
38808
39232
  }
38809
- await (await this.printService.getConfig(authStore.state.accessToken))
38810
- .json()
38811
- .then((response) => {
38812
- printStore.state.supportedFileExtensions = response.System.FILEEXT;
38813
- });
38814
- await this.printService
38815
- .getAllPrinterProperties(authStore.state.accessToken)
38816
- .then((printerConfig) => {
38817
- this.printerConfig = printerConfig;
38818
- });
38819
- if (this.files && this.files.length > 0) {
38820
- // Validate all files
38821
- const validationPromises = this.files.map((file) => this.validateFileType(file.name));
38822
- const validationResults = await Promise.all(validationPromises);
38823
- const allValid = validationResults.every((valid) => valid);
38824
- this.notSupported = !allValid;
39233
+ catch (_a) {
39234
+ this.selectedPrinter = { id: '', location: '', name: '', is_queue: false };
39235
+ }
39236
+ finally {
39237
+ this.loadingPrinterConfig = false;
38825
39238
  }
38826
- this.loading = false;
38827
39239
  }
38828
39240
  disconnectedCallback() {
38829
39241
  var _a;
@@ -38909,14 +39321,14 @@ const EzpPrinterSelection = class {
38909
39321
  return null;
38910
39322
  }
38911
39323
  render() {
38912
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w;
39324
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
38913
39325
  const fileNames = this.files && this.files.length > 0
38914
39326
  ? this.files.map((file) => file.name)
38915
39327
  : this.filename
38916
39328
  ? [this.filename]
38917
39329
  : [];
38918
39330
  const fileCount = fileNames.length;
38919
- return this.loading ? (index.h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (index.h("div", { id: "header" }, index.h("div", { id: "title" }, index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (index.h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), index.h("div", { id: "header-actions" }, !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), index.h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), index.h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (index.h("div", { id: "files-card" }, fileNames.map((name, index$1) => (index.h("div", { class: "file-row", key: index$1 }, index.h("ezp-icon", { name: "file", class: "file-row-icon" }), index.h("ezp-label", { ellipsis: true, text: name })))))), index.h("ezp-label", { id: "printer-caption", level: "tertiary", weight: "heavy", text: instance.t('printer_selection.printer') }), index.h("div", { id: "printer-card" }, index.h("ezp-select", { id: "printer", label: instance.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
39331
+ return this.loading ? (index.h("ezp-status", { processing: true, description: instance.t('printer_selection.loading'), instance: "loading" })) : (index.h(index.Host, { class: { seamless: this.seamless } }, index.h("div", { id: "box", "data-backdrop-surface": true }, !this.printStopped && this.renderStatus(), !this.hideheader && (index.h("div", { id: "header" }, index.h("div", { id: "title" }, index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }), !this.notSupported && fileCount > 0 && (index.h("span", { id: "files-badge" }, instance.t('printer_selection.file_count', { count: fileCount })))), index.h("div", { id: "header-actions" }, !this.hidemenu && (index.h("ezp-icon-button", { level: "tertiary", icon: "menu", id: "toggle-menu", type: "button", onClick: this.handleUserMenu })), index.h("ezp-icon-button", { level: "tertiary", icon: "close", id: "close", type: "button", onClick: this.handleCancel })))), index.h("div", { id: "body" }, !this.notSupported && fileNames.length > 0 && (index.h("div", { id: "files-card" }, fileNames.map((name, index$1) => (index.h("div", { class: "file-row", key: index$1 }, index.h("ezp-icon", { name: "file", class: "file-row-icon" }), index.h("ezp-file-name", { name: name, placement: index$1 === 0 ? 'bottom' : 'top' })))))), index.h("ezp-label", { id: "printer-caption", level: "tertiary", weight: "heavy", text: instance.t('printer_selection.printer') }), index.h("div", { id: "printer-card" }, index.h("ezp-select", { id: "printer", label: instance.t('printer_selection.printer'), icon: "printer", placeholder: this.printers.length > 0
38920
39332
  ? instance.t('printer_selection.select_printer')
38921
39333
  : instance.t('printer_selection.no_printers'), toggleFlow: "vertical", optionFlow: "vertical", options: this.printers.map((printer) => ({
38922
39334
  id: printer.id,
@@ -38929,43 +39341,34 @@ const EzpPrinterSelection = class {
38929
39341
  title: option.title,
38930
39342
  meta: '',
38931
39343
  type: 'color',
38932
- })), preSelected: this.selectedPrinter.id && ((_b = this.selectedPrinterConfig.Default) === null || _b === void 0 ? void 0 : _b.Color) == 'color'
38933
- ? instance.t('printer_selection.color_color')
38934
- : instance.t('printer_selection.color_grayscale'), disabled: !this.selectedPrinterConfig.ColorSupported }), index.h("ezp-select", { label: instance.t('printer_selection.duplex'), placeholder: instance.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_c = this.duplexOptions) === null || _c === void 0 ? void 0 : _c.map((option) => ({
39344
+ })), preSelected: this.selectedPrinter.id
39345
+ ? this.selectedProperties.color
39346
+ ? instance.t('printer_selection.color_color')
39347
+ : instance.t('printer_selection.color_grayscale')
39348
+ : null, disabled: !this.selectedPrinterConfig.ColorSupported }), index.h("ezp-select", { label: instance.t('printer_selection.duplex'), placeholder: instance.t('printer_selection.select_duplex'), toggleFlow: "horizontal", options: (_b = this.duplexOptions) === null || _b === void 0 ? void 0 : _b.map((option) => ({
38935
39349
  id: option.id,
38936
39350
  title: option.title,
38937
39351
  meta: '',
38938
39352
  type: 'duplex',
38939
- })), preSelected: this.selectedPrinter.id &&
38940
- ((_d = this.selectedPrinterConfig.Default) === null || _d === void 0 ? void 0 : _d.Duplex) == 'duplex_simplex'
38941
- ? instance.t('printer_selection.duplex_none')
38942
- : ((_e = this.selectedPrinterConfig.Default) === null || _e === void 0 ? void 0 : _e.Duplex) == 'duplex_vertical'
38943
- ? instance.t('printer_selection.duplex_long')
38944
- : ((_f = this.selectedPrinterConfig.Default) === null || _f === void 0 ? void 0 : _f.Duplex) == 'duplex_horizontal'
38945
- ? instance.t('printer_selection.duplex_short')
38946
- : null, disabled: !this.selectedPrinterConfig.DuplexSupported }), index.h("ezp-select", { label: instance.t('printer_selection.size'), placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
39353
+ })), preSelected: this.duplexPreSelection(), disabled: !this.selectedPrinterConfig.DuplexSupported }), index.h("ezp-select", { label: instance.t('printer_selection.size'), placeholder: instance.t('printer_selection.select_size'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.PaperFormats &&
38947
39354
  this.selectedPrinterConfig.PaperFormats.map((format) => ({
38948
39355
  id: format.Id,
38949
39356
  title: format.Name,
38950
39357
  meta: `${format.XRes} x ${format.YRes}`,
38951
39358
  type: 'format',
38952
- })), preSelected: this.selectedPrinter.id &&
38953
- ((_g = this.selectedPrinterConfig.PaperFormats) === null || _g === void 0 ? void 0 : _g.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Paper); }))
38954
- ? (_h = this.selectedPrinterConfig.Default) === null || _h === void 0 ? void 0 : _h.Paper
38955
- : null, disabled: !(((_k = (_j = this.selectedPrinterConfig.PaperFormats) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.paperid == PAPER_ID ? (index.h(index.Fragment, null, index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, index.h("ezp-select", { label: instance.t('printer_selection.orientation'), placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_l = this.selectedPrinterConfig.OrientationsSupported) === null || _l === void 0 ? void 0 : _l.map((orientation, index) => ({
39359
+ })), preSelected: this.paperPreSelection(), disabled: !(((_d = (_c = this.selectedPrinterConfig.PaperFormats) === null || _c === void 0 ? void 0 : _c.length) !== null && _d !== void 0 ? _d : 0) > 0) }), this.paperid == PAPER_ID ? (index.h(index.Fragment, null, index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperwidth, eventType: "width", type: "number", label: instance.t('printer_selection.width') }), index.h("ezp-input", { suffix: "mm", value: this.selectedProperties.paperlength, eventType: "length", type: "number", label: instance.t('printer_selection.length') }))) : null, index.h("ezp-select", { label: instance.t('printer_selection.orientation'), placeholder: instance.t('printer_selection.select_orientation'), toggleFlow: "horizontal", options: (_e = this.selectedPrinterConfig.OrientationsSupported) === null || _e === void 0 ? void 0 : _e.map((orientation, index) => ({
38956
39360
  id: index + 1,
38957
39361
  title: instance.t(`printer_selection.orientation_${orientation}`),
38958
39362
  meta: '',
38959
39363
  type: 'orientation',
38960
- })), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((_o = (_m = this.selectedPrinterConfig.OrientationsSupported) === null || _m === void 0 ? void 0 : _m.length) !== null && _o !== void 0 ? _o : 0) > 0) }), index.h("ezp-select", { label: instance.t('printer_selection.quality'), placeholder: instance.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: (_p = this.selectedPrinterConfig.Resolutions) === null || _p === void 0 ? void 0 : _p.map((option, index) => ({
39364
+ })), preSelected: this.selectedPrinter.id ? this.selectedProperties.orientation : null, disabled: !(((_g = (_f = this.selectedPrinterConfig.OrientationsSupported) === null || _f === void 0 ? void 0 : _f.length) !== null && _g !== void 0 ? _g : 0) > 0) }), index.h("ezp-select", { label: instance.t('printer_selection.quality'), placeholder: instance.t('printer_selection.select_quality'), toggleFlow: "horizontal", options: (_h = this.selectedPrinterConfig.Resolutions) === null || _h === void 0 ? void 0 : _h.map((option, index) => ({
38961
39365
  id: index,
38962
39366
  title: option,
38963
39367
  meta: '',
38964
39368
  type: 'quality',
38965
- })), preSelected: this.selectedPrinter.id &&
38966
- ((_q = this.selectedPrinterConfig.Resolutions) === null || _q === void 0 ? void 0 : _q.includes((_r = this.selectedPrinterConfig.Default) === null || _r === void 0 ? void 0 : _r.Resolution))
38967
- ? (_s = this.selectedPrinterConfig.Default) === null || _s === void 0 ? void 0 : _s.Resolution
38968
- : null, disabled: !(((_u = (_t = this.selectedPrinterConfig.Resolutions) === null || _t === void 0 ? void 0 : _t.length) !== null && _u !== void 0 ? _u : 0) > 0) }), this.selectedPrinterConfig.Trays &&
39369
+ })), preSelected: this.selectedPrinter.id
39370
+ ? this.selectedProperties.resolution || null
39371
+ : null, disabled: !(((_k = (_j = this.selectedPrinterConfig.Resolutions) === null || _j === void 0 ? void 0 : _j.length) !== null && _k !== void 0 ? _k : 0) > 0) }), this.selectedPrinterConfig.Trays &&
38969
39372
  this.selectedPrinterConfig.Trays.length >= 1 &&
38970
39373
  this.selectedPrinterConfig.Trays[0] != null ? (index.h("ezp-select", { label: instance.t('printer_selection.trays'), placeholder: instance.t('printer_selection.select_trays'), toggleFlow: "horizontal", optionFlow: "horizontal", options: this.selectedPrinterConfig.Trays && this.selectedPrinterConfig.Trays.length >= 1
38971
39374
  ? this.selectedPrinterConfig.Trays.map((trays) => ({
@@ -38974,10 +39377,7 @@ const EzpPrinterSelection = class {
38974
39377
  meta: '',
38975
39378
  type: 'tray',
38976
39379
  }))
38977
- : undefined, preSelected: this.selectedPrinter.id &&
38978
- ((_v = this.selectedPrinterConfig.Trays) === null || _v === void 0 ? void 0 : _v.find((el) => { var _a; return el.Name.includes((_a = this.selectedPrinterConfig.Default) === null || _a === void 0 ? void 0 : _a.Tray); }))
38979
- ? (_w = this.selectedPrinterConfig.Default) === null || _w === void 0 ? void 0 : _w.Tray
38980
- : null })) : null, index.h("ezp-input", { suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" }), index.h("button", { id: "print", type: "button", disabled: this.printDisabled, onClick: this.handlePrint, ref: (button) => (this.printButton = button) }, index.h("ezp-icon", { name: "printer" }), index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }))), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
39380
+ : undefined, preSelected: this.trayPreSelection() })) : null, index.h("ezp-input", { suffix: "", placeholder: "1-2,4-5,8", value: this.selectedProperties.PageRanges, eventType: "paper_ranges", type: "text", label: instance.t('printer_selection.page_ranges') }))), index.h("div", { id: "footer" }, index.h("ezp-text-button", { type: "button", level: "secondary", onClick: this.handleCancel, label: instance.t('button_actions.cancel'), class: "action", id: "cancel" }), index.h("button", { id: "print", type: "button", disabled: this.printDisabled, onClick: this.handlePrint, ref: (button) => (this.printButton = button) }, index.h("ezp-icon", { name: "printer" }), index.h("ezp-label", { weight: "heavy", text: instance.t('printer_selection.print') }))), !this.hidemenu && index.h("ezp-user-menu", { open: this.userMenuOpen, name: this.userName }))));
38981
39381
  }
38982
39382
  };
38983
39383
  EzpPrinterSelection.style = ezpPrinterSelectionCss();
@@ -39327,7 +39727,7 @@ const EzpPrinting = class {
39327
39727
  *
39328
39728
  */
39329
39729
  render() {
39330
- return (index.h(index.Host, { key: '5aa98ade8a71777d5032a3ccfb70d52f9d71f259', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
39730
+ return (index.h(index.Host, { key: '988a7acf819e139fe6d103b122bf9181e848be82', class: `${userStore.state.theme} ${userStore.state.appearance === 'system'
39331
39731
  ? this.systemAppearance
39332
39732
  : userStore.state.appearance} ${this.seamless ? 'seamless' : ''}` }, this.trigger === 'custom' ? (index.h("slot", null)) : this.trigger === 'file' ? (index.h("ezp-upload", null)) : (this.trigger === 'button' && (index.h("ezp-icon-button", { id: "print-trigger", icon: "printer", slot: "trigger", type: "button", onClick: () => this.open() }))), this.authOpen ? (index.h("ezp-auth", { clientID: this.clientid, redirectURI: this.redirecturi, hidelogin: this.hidelogin, trigger: this.trigger, code: this.code })) : this.printOpen ? (index.h("ezp-printer-selection", { clientID: this.clientid, redirectURI: this.redirecturi, filename: this.filename, fileurl: this.fileurl, filetype: this.filetype, fileid: this.fileid, files: this.files, hidemenu: this.hidemenu, hideheader: this.hideheader, seamless: this.seamless })) : this.noDocumentOpen ? (index.h("ezp-dialog", { heading: instance.t('no_document_dialog.heading'), description: instance.t('no_document_dialog.description'), action: instance.t('no_document_dialog.action'), iconName: "question-mark", instance: "no-document-selected" })) : null));
39333
39733
  }
@@ -39563,7 +39963,7 @@ const EzpSelect = class {
39563
39963
  this.disabled ? 'disabled' : '',
39564
39964
  ];
39565
39965
  const labelLevel = this.toggleFlow === 'horizontal' ? 'secondary' : 'tertiary';
39566
- return (index.h(index.Host, { key: '89aa6ffebb4083fd8ea1ca90c4ab3b197498fd68', class: hostClasses.join(' ') }, index.h("div", { key: '895a0c53f37d7255034643b33b9b4efcc95072e8', id: "wrap" }, index.h("div", { key: '8339822b01a064a9bc03e8ea9a65e8de55339640', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '3ba6751cd4c366193ef304ed967cd644e8a04aa2', id: "label", noWrap: true, level: labelLevel, text: this.label }), index.h("ezp-label", { key: 'd0dd648a1ebe6bfb0dd21e0d24da486c21d34d61', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), index.h("ezp-icon", { key: '11f05e149e4f3c443bf6b261617ea36c794a657c', id: "accessory", name: "expand" })), index.h("div", { key: '794d83d79e75f5c85d156fc05bf7c0815ed12780', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
39966
+ return (index.h(index.Host, { key: '7dd328df209e8906917c97b8002bdcd9e2fafa0b', class: hostClasses.join(' ') }, index.h("div", { key: '522bbbfea1ef111af7bd7317cc6054138eca020d', id: "wrap" }, index.h("div", { key: 'd1c2c06a33f629d589e2247342467ebbd7283d1b', id: "toggle", role: "combobox", "aria-haspopup": "listbox", "aria-controls": "list", "aria-expanded": this.expanded ? 'true' : 'false', "aria-label": this.label, "aria-disabled": this.disabled ? 'true' : 'false', tabindex: this.disabled ? -1 : 0, ref: (el) => (this.toggleEl = el), onClick: () => !this.disabled && this.toggle(), onKeyDown: this.handleToggleKeydown }, this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: 'c60d6dd802424b2502d1b9c9066732ef02909779', id: "label", noWrap: true, level: labelLevel, text: this.label }), index.h("ezp-label", { key: 'c92c91c848aec5b6ff386f32beb41bdaf4407613', id: "value", ellipsis: true, text: ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.title) !== '' ? (_b = this.selected) === null || _b === void 0 ? void 0 : _b.title : this.placeholder }), index.h("ezp-icon", { key: '7c653c97c7da8471e7db51c1ba04718842a9991b', id: "accessory", name: "expand" })), index.h("div", { key: '5c1aeeb45f4cbf1c4e26653312d6cc0a7e7084ce', id: "list", role: "listbox", "aria-label": this.label, ref: (element) => (this.list = element) }, (_c = this.options) === null || _c === void 0 ? void 0 : _c.map((option) => {
39567
39967
  var _a, _b;
39568
39968
  if (option.title !== '') {
39569
39969
  return (index.h("div", { class: `option ${option.id === ((_a = this.selected) === null || _a === void 0 ? void 0 : _a.id) ? 'is-selected' : ''} ${option.meta !== '' ? 'has-meta' : ''} `, role: "option", "aria-selected": option.id === ((_b = this.selected) === null || _b === void 0 ? void 0 : _b.id) ? 'true' : 'false', tabindex: this.expanded ? 0 : -1, onClick: () => this.select(option.id), onKeyDown: (event) => this.handleOptionKeydown(event, option.id) }, index.h("ezp-icon", { name: "checkmark", class: "indicator" }), index.h("div", { class: "details" }, index.h("ezp-label", { class: "title", ellipsis: true, text: option.title }), option.meta !== '' ? (index.h("ezp-label", { level: "tertiary", class: "meta", text: option.meta, ellipsis: true })) : null)));
@@ -39633,9 +40033,9 @@ const EzpStatus = class {
39633
40033
  return (
39634
40034
  // Live region so screen readers announce status changes (loading,
39635
40035
  // processing, success, error) as they render.
39636
- index.h(index.Host, { key: '57292e782da34ffd4ccde20684cd7e5d4b07d857', role: "status", "aria-live": "polite" }, index.h("div", { key: 'f4cac1f4e6624efaac038b26dd592ef8c96769a1', id: "box" }, this.processing ? (index.h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), index.h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (index.h("div", { id: "icon" }, index.h("div", { id: "icon-inner" }, index.h("ezp-icon", { name: this.icon })))) : null, index.h("ezp-label", { key: '6d6747ac139503337ee1ef5c5d9da0c2b8447846', id: "description", weight: "heavy", text: this.description }), this.subtext && (index.h("ezp-label", { key: '75557ddfdb8a08cd4536550444937adb462c2ec5', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (index.h("div", { key: '5615011e1e597a18643d6b7b11007b56d4eee4ad', id: "footer" }, this.cancel && (index.h("ezp-text-button", { key: 'a451aa22649c64745667ae1434690a86ed680a30', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
40036
+ index.h(index.Host, { key: 'db32e5667bf9438a6d3d80807519ad2c158549ff', role: "status", "aria-live": "polite" }, index.h("div", { key: '815ecfbd3b272f206764ca852b8d865d7bc3cb8d', id: "box" }, this.processing ? (index.h("svg", { id: "indicator", viewBox: "0 0 42 42", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true" }, index.h("circle", { id: "track", cx: "21", cy: "21", r: "18" }), index.h("circle", { id: "value", cx: "21", cy: "21", r: "18" }))) : this.icon ? (index.h("div", { id: "icon" }, index.h("div", { id: "icon-inner" }, index.h("ezp-icon", { name: this.icon })))) : null, index.h("ezp-label", { key: '385d4fbbd7ed1b7a4aa2334d6d2145c2f5207508', id: "description", weight: "heavy", text: this.description }), this.subtext && (index.h("ezp-label", { key: 'c6a243dd4ddc428f3e34021430d6b935f0a9e1a6', id: "subtext", level: "secondary", text: this.subtext })), (this.cancel || this.close || this.retry) && (index.h("div", { key: '0dfc5f86b6366b3631ac74c15e9d467a884feb52', id: "footer" }, this.cancel && (index.h("ezp-text-button", { key: 'a89289163ac7d630d35e887deead462c6dc29af4', class: "action secondary", level: "secondary", onClick: this.handleCancel, label: typeof this.cancel === 'string'
39637
40037
  ? this.cancel
39638
- : instance.t('button_actions.cancel') })), this.close && (index.h("ezp-text-button", { key: 'a3ea31d096ab7514102fb2c8000a5059c833a96b', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : instance.t('button_actions.close') })), this.retry && (index.h("ezp-text-button", { key: '154c3547c46066e80207f3c479788b068cf6a84d', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : instance.t('button_actions.retry') })))))));
40038
+ : instance.t('button_actions.cancel') })), this.close && (index.h("ezp-text-button", { key: 'd2e3814f2a81ce03f4e0f4bbcf7cc734ade37aa9', class: `action ${this.retry ? 'secondary' : 'primary'}`, level: this.retry ? 'secondary' : 'primary', onClick: this.handleClose, label: typeof this.close === 'string' ? this.close : instance.t('button_actions.close') })), this.retry && (index.h("ezp-text-button", { key: '6e53e77afc6c3954435b08c6daaa65dd829ce9ad', class: "action primary", level: "primary", onClick: this.handleRetry, label: typeof this.retry === 'string' ? this.retry : instance.t('button_actions.retry') })))))));
39639
40039
  }
39640
40040
  };
39641
40041
  EzpStatus.style = ezpStatusCss();
@@ -39772,7 +40172,7 @@ const EzpStepper = class {
39772
40172
  *
39773
40173
  */
39774
40174
  render() {
39775
- return (index.h(index.Host, { key: 'cdb3aa8969719def6546f35fac5aa35b47c1f94b', class: `${this.focused ? 'focused' : ''} ${this.icon ? 'has-icon' : ''}` }, index.h("div", { key: '4b0edee6d156edc6e8f79eb0639be4203b12fc5b', id: "toggle", onClick: this.setFocus }), this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '4fb1d96f12933ee37c05afafee8f313d77a06e9e', id: "label", noWrap: true, text: this.label }), index.h("div", { key: '3be9bb50e25876cecf351632e002bc37474a12df', class: "buttons" }, index.h("button", { key: '77fdb0f15d4b54a820a7c4329b2f49ac2bef832e', class: "button", type: "button", "aria-label": `Decrease ${this.label}`, disabled: !this.canDecrease, onClick: this.handleDecrease }, index.h("ezp-icon", { key: '76cc4d8fefdb61a9ad66aa63fe36414093207ef5', name: "minus" })), index.h("input", { key: 'fab279a99fb1803fc8095c881f6d43233a12de6b', id: "input", type: "number", ref: (input) => (this.input = input), min: this.min.toString(), max: this.max !== undefined ? this.max.toString() : undefined, value: this.value.toString(), "aria-label": this.label, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), index.h("button", { key: 'fa0ad31ae7a0481d4ca173211ae2796a6ef5e805', class: "button", type: "button", "aria-label": `Increase ${this.label}`, disabled: !this.canIncrease, onClick: this.handleIncrease }, index.h("ezp-icon", { key: '98bb7417e464e4d5704d8f5d4f969a11d0c70fcf', name: "plus" })))));
40175
+ return (index.h(index.Host, { key: 'cbf3ded61537359ed280a204bb71240d0a34473a', class: `${this.focused ? 'focused' : ''} ${this.icon ? 'has-icon' : ''}` }, index.h("div", { key: '1c7a265f60d06dbea4a80e19ecdaa4a10aed694c', id: "toggle", onClick: this.setFocus }), this.icon ? index.h("ezp-icon", { id: "icon", name: this.icon }) : null, index.h("ezp-label", { key: '9fd0e1128480dd9b288cb266542fd4e6b83ceebd', id: "label", noWrap: true, text: this.label }), index.h("div", { key: '975fc0539e76750d7457c71d40f228cb5ebcaad8', class: "buttons" }, index.h("button", { key: 'db01d05fdcbc4eda2810751ace0194d9a1ec9eb7', class: "button", type: "button", "aria-label": `Decrease ${this.label}`, disabled: !this.canDecrease, onClick: this.handleDecrease }, index.h("ezp-icon", { key: '7d938efa8426caf292403e94e3565d20dc40d121', name: "minus" })), index.h("input", { key: 'dbff518a5d1f28b3b23d597947c250bef71fd68a', id: "input", type: "number", ref: (input) => (this.input = input), min: this.min.toString(), max: this.max !== undefined ? this.max.toString() : undefined, value: this.value.toString(), "aria-label": this.label, onInput: this.handleInput, onKeyDown: this.handleKeyDown, onFocus: this.handleFocus, onBlur: this.handleBlur }), index.h("button", { key: 'b3001bb27f94f65fce51d3a69d7713e5da9ccdcc', class: "button", type: "button", "aria-label": `Increase ${this.label}`, disabled: !this.canIncrease, onClick: this.handleIncrease }, index.h("ezp-icon", { key: '534bb499fa2ced2591ccbc137186e59d22aa2f5f', name: "plus" })))));
39776
40176
  }
39777
40177
  static get watchers() { return {
39778
40178
  "value": [{
@@ -39829,12 +40229,12 @@ const EzpTextButton = class {
39829
40229
  href: this.href,
39830
40230
  target: this.blank ? '_blank' : '_self',
39831
40231
  };
39832
- return (index.h(index.Host, { key: '24c7d7fe23395513fccfc8fc94fbc552a1763148', class: `${this.level}` }, index.h(TagType, Object.assign({ key: 'eded3e128d17f4b5bf5a29b01e51f4a2ba1d6d74', id: "button", "aria-label": this.label }, attributes), index.h("ezp-label", { key: '4974381f385143ac4828f74c580ef280357e85ac', id: "label", weight: "heavy", text: this.label, level: this.small ? 'tertiary' : 'secondary' }))));
40232
+ return (index.h(index.Host, { key: '31c3726d82b340fad817eec01f597b58702ff292', class: `${this.level}` }, index.h(TagType, Object.assign({ key: '5e26c8e81ab49575b1a29c309f7792a2286ee455', id: "button", "aria-label": this.label }, attributes), index.h("ezp-label", { key: 'b21b121c9da908b6cba286a528f8e6772c179a36', id: "label", weight: "heavy", text: this.label, level: this.small ? 'tertiary' : 'secondary' }))));
39833
40233
  }
39834
40234
  };
39835
40235
  EzpTextButton.style = ezpTextButtonCss();
39836
40236
 
39837
- const ezpUploadCss = () => `@charset "UTF-8";:host{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;height:var(--ezp-upload-height, auto);width:var(--ezp-upload-width, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden}:host(.dragging) #modal *{pointer-events:none}#body-frame{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;position:relative}#body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;overflow-y:auto;padding:var(--ezp-spacing-4);scrollbar-width:thin}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-theme-translucent);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:var(--ezp-upload-dropzone-boxShadow, none);box-shadow:var(--ezp-upload-dropzone-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:160px;padding:var(--ezp-spacing-6) var(--ezp-spacing-4);text-align:center;-webkit-transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-dropzone-boxShadow:0 0 0 4px var(--ezp-theme-translucent)}:host(:not(.dragging)) #dropzone-title,:host(.dragging) #dropzone-prompt{display:none}#drop-overlay{-ms-flex-align:center;align-items:center;background:-webkit-gradient(linear, left top, left bottom, from(var(--ezp-theme-translucent)), to(var(--ezp-theme-translucent))), var(--ezp-core-surface-tertiary);background:linear-gradient(var(--ezp-theme-translucent), var(--ezp-theme-translucent)), var(--ezp-core-surface-tertiary);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:0 0 0 4px var(--ezp-theme-translucent);box-shadow:0 0 0 4px var(--ezp-theme-translucent);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);inset:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;pointer-events:none;position:absolute;text-align:center;z-index:1}#dropzone-icon{--ezp-icon-size:32px;--ezp-icon-gridTemplate:32px;color:var(--ezp-theme-solid)}#dropzone-prompt{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3)}#choose{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-5)}#drag-hint{color:var(--ezp-core-foreground-primary)}#formats{color:var(--ezp-core-foreground-secondary)}#files{border:1px solid var(--ezp-core-outline);border-radius:12px;overflow:hidden}.file{-ms-flex-align:center;align-items:center;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:auto minmax(0, 1fr) auto;padding:var(--ezp-spacing-3) var(--ezp-spacing-4)}.file+.file{border-top:1px solid var(--ezp-core-outline)}.file-type{background:var(--ezp-theme-translucent);border-radius:6px;color:var(--ezp-theme-solid);font-size:11px;font-weight:600;letter-spacing:0.02em;line-height:1;overflow:hidden;padding:8px 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:56px}.file-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);min-width:0}.file-size{color:var(--ezp-core-foreground-secondary)}.file-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:6px;color:var(--ezp-core-foreground-tertiary);cursor:pointer;display:-ms-flexbox;display:flex;height:28px;-ms-flex-pack:center;justify-content:center;padding:0;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:28px}.file-remove ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.file-remove:hover{color:var(--ezp-core-foreground-primary)}}#add-more{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-upload-addMore-background, transparent);border:0;border-top:1px solid var(--ezp-core-outline);color:var(--ezp-theme-solid);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:4px;-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#add-more ezp-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px}@media (hover: hover){#add-more:hover{--ezp-upload-addMore-background:var(--ezp-core-shade-primary)}}#footer{border-top:1px solid var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4)}.action{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-3);--ezp-textButton-whiteSpace:normal;text-align:center}#clear{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary)}`;
40237
+ const ezpUploadCss = () => `@charset "UTF-8";:host{-webkit-box-sizing:border-box;box-sizing:border-box;color:var(--ezp-core-foreground-primary);display:block;height:var(--ezp-upload-height, auto);width:var(--ezp-upload-width, auto)}*,*::before,*::after{-webkit-box-sizing:border-box;box-sizing:border-box}#form{display:block;height:100%}#input{-webkit-appearance:none;-moz-appearance:none;appearance:none;height:0;opacity:0;pointer-events:none;position:absolute;width:0}#modal{background:var(--ezp-core-surface-tertiary);border-radius:16px;-webkit-box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);box-shadow:0 0 0 1px var(--ezp-core-outline), 0 24px 60px -20px var(--ezp-core-backdrop);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;height:100%;overflow:hidden}:host(.dragging) #modal *{pointer-events:none}#body-frame{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;position:relative}#body{display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;min-height:0;overflow-y:auto;padding:var(--ezp-spacing-4);scrollbar-width:thin}#dropzone{-ms-flex-align:center;align-items:center;background:var(--ezp-theme-translucent);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:var(--ezp-upload-dropzone-boxShadow, none);box-shadow:var(--ezp-upload-dropzone-boxShadow, none);display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;min-height:160px;padding:var(--ezp-spacing-6) var(--ezp-spacing-4);text-align:center;-webkit-transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:-webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart);transition:box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart), -webkit-box-shadow var(--ezp-duration-3) var(--ezp-easing-out-quart)}:host(.dragging){--ezp-upload-dropzone-boxShadow:0 0 0 4px var(--ezp-theme-translucent)}:host(:not(.dragging)) #dropzone-title,:host(.dragging) #dropzone-prompt{display:none}#drop-overlay{-ms-flex-align:center;align-items:center;background:-webkit-gradient(linear, left top, left bottom, from(var(--ezp-theme-translucent)), to(var(--ezp-theme-translucent))), var(--ezp-core-surface-tertiary);background:linear-gradient(var(--ezp-theme-translucent), var(--ezp-theme-translucent)), var(--ezp-core-surface-tertiary);border:1.5px dashed var(--ezp-theme-solid);border-radius:12px;-webkit-box-shadow:0 0 0 4px var(--ezp-theme-translucent);box-shadow:0 0 0 4px var(--ezp-theme-translucent);display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-4);inset:var(--ezp-spacing-4);-ms-flex-pack:center;justify-content:center;pointer-events:none;position:absolute;text-align:center;z-index:1}#dropzone-icon{--ezp-icon-size:32px;--ezp-icon-gridTemplate:32px;color:var(--ezp-theme-solid)}#dropzone-prompt{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-3)}#choose{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-5)}#drag-hint{color:var(--ezp-core-foreground-primary)}#formats{color:var(--ezp-core-foreground-secondary)}#files{border:1px solid var(--ezp-core-outline);border-radius:12px}.file{-ms-flex-align:center;align-items:center;display:grid;gap:var(--ezp-spacing-3);grid-template-columns:auto minmax(0, 1fr) auto;padding:var(--ezp-spacing-3) var(--ezp-spacing-4);position:relative}.file+.file{border-top:1px solid var(--ezp-core-outline)}.file-type{background:var(--ezp-theme-translucent);border-radius:6px;color:var(--ezp-theme-solid);font-size:11px;font-weight:600;letter-spacing:0.02em;line-height:1;overflow:hidden;padding:8px 6px;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:56px}.file-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;gap:var(--ezp-spacing-2);min-width:0}.file-size{color:var(--ezp-core-foreground-secondary)}.file-remove{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;border:0;border-radius:6px;color:var(--ezp-core-foreground-tertiary);cursor:pointer;display:-ms-flexbox;display:flex;height:28px;-ms-flex-pack:center;justify-content:center;padding:0;-webkit-transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:28px}.file-remove ezp-icon{--ezp-icon-size:16px;--ezp-icon-gridTemplate:16px}@media (hover: hover){.file-remove:hover{color:var(--ezp-core-foreground-primary)}}#add-more{-ms-flex-align:center;align-items:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;background:var(--ezp-upload-addMore-background, transparent);border:0;border-radius:0 0 11px 11px;border-top:1px solid var(--ezp-core-outline);color:var(--ezp-theme-solid);cursor:pointer;display:-ms-flexbox;display:flex;font-family:inherit;gap:4px;-ms-flex-pack:center;justify-content:center;padding:var(--ezp-spacing-3);-webkit-transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);transition:background-color var(--ezp-duration-2) var(--ezp-easing-out-quart);width:100%}#add-more ezp-icon{--ezp-icon-size:18px;--ezp-icon-gridTemplate:18px}@media (hover: hover){#add-more:hover{--ezp-upload-addMore-background:var(--ezp-core-shade-primary)}}#footer{border-top:1px solid var(--ezp-core-outline);display:grid;gap:var(--ezp-spacing-3);grid-template-columns:1fr 1.4fr;padding:var(--ezp-spacing-4)}.action{--ezp-textButton-borderRadius:8px;--ezp-textButton-padding:13px var(--ezp-spacing-3);--ezp-textButton-whiteSpace:normal;text-align:center}#clear{--ezp-textButton-background-active:var(--ezp-core-shade-secondary);--ezp-textButton-background-hover:var(--ezp-core-shade-primary);--ezp-textButton-background-init:transparent;--ezp-textButton-boxShadow:inset 0 0 0 1px var(--ezp-core-outline);--ezp-textButton-color-init:var(--ezp-core-foreground-primary)}`;
39838
40238
 
39839
40239
  /** File formats advertised to the user as supported for printing. */
39840
40240
  const SUPPORTED_FORMATS = ['PDF', 'DOCX', 'PNG', 'JPG', 'XLSX'];
@@ -39991,7 +40391,7 @@ const EzpUpload = class {
39991
40391
  */
39992
40392
  render() {
39993
40393
  const hasFiles = this.selectedFiles.length > 0;
39994
- return (index.h(index.Host, { key: '4230fcbee5d8a20d79c05035a1783f16696a66fa', class: { dragging: this.dragging } }, index.h("form", { key: '5dcae80d94508ebe05e3dc8df463b0a1b79563ff', id: "form", ref: (form) => (this.form = form) }, index.h("input", { key: '480307c4fdbe7a39ba3872bce7cf905888f7946b', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.choose_files'), ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("div", { key: '95a58113221f2337323f0b6df3d58e459fdece2c', id: "modal" }, index.h("div", { key: '876b5ebe74d685b2ec7196df3deb8a9fd5437305', id: "body-frame" }, index.h("div", { key: '15465aeb4e939ce26b09d1a1c4f9b9b5d8901762', id: "body" }, !hasFiles && (index.h("div", { key: '912e27683e12d3d8ca999b4c3dbe1f528677aafd', id: "dropzone" }, index.h("ezp-icon", { key: '8cb1edf6b5c14a7815e52f7bc91d674047045e57', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '678ea4205fbe81d3621dc205303533eb8c12ce23', id: "dropzone-title", level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') }), index.h("div", { key: '0fcd25bb9f12c1cd0c056d88cf94a20946b44f2a', id: "dropzone-prompt" }, index.h("ezp-text-button", { key: '5cc5ff7a98f87ae1eb2db4009435b926924be2e9', id: "choose", type: "button", onClick: this.openPicker, label: instance.t('upload.choose_files') }), index.h("ezp-label", { key: 'b64fe2cadd1639c5ef0b10da0084d420abd8232f', id: "drag-hint", level: "secondary", weight: "strong", text: instance.t('upload.drag_hint') }), index.h("ezp-label", { key: '5bf5178e691d35a58e988bacff656bd790f4c6ea', id: "formats", level: "tertiary", text: SUPPORTED_FORMATS.join(', ') })))), hasFiles && (index.h("div", { key: '289ce054d8987ba1d2a5c6481171dce341dd1e5c', id: "files" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: this.fileKey(file), class: "file" }, index.h("span", { class: "file-type", "aria-hidden": "true" }, this.fileType(file.name)), index.h("div", { class: "file-details" }, index.h("ezp-label", { class: "file-name", ellipsis: true, weight: "heavy", text: file.name }), index.h("ezp-label", { class: "file-size", level: "tertiary", text: this.formatSize(file.size) })), index.h("button", { type: "button", class: "file-remove", "aria-label": instance.t('upload.remove_file'), onClick: (event) => this.removeFile(event, index$1) }, index.h("ezp-icon", { name: "close" }))))), index.h("button", { key: 'd0b397071945aadecde0a92b9a9e36a40a612197', type: "button", id: "add-more", onClick: this.openPicker }, index.h("ezp-icon", { key: 'cd89350e28759f3d2b4553367ff6c6f4eaf07dfc', name: "plus" }), index.h("ezp-label", { key: '0f959da4e971ad6520563d892afb086b1a3df5a4', level: "secondary", weight: "heavy", text: instance.t('upload.add_more') }))))), hasFiles && this.dragging && (index.h("div", { key: 'd767d3dc25ce56b85dd0b3dcacf88a6fa4e420e1', id: "drop-overlay", "aria-hidden": "true" }, index.h("ezp-icon", { key: 'fefa5a29b5bd2df98b5d9fedfce2e6800418544f', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '7ef3bba07de86ecefa094617f6262f47875db36a', level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') })))), index.h("div", { key: 'd7b1f67053bd4e0eef8d271eb7c3e547d4d40af3', id: "footer" }, index.h("ezp-text-button", { key: 'c0195d9ba0012a5297254eae8d60dc90337eb7a1', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.remove_files'), class: "action" }), index.h("ezp-text-button", { key: '154a5770c232fadd7befd1af09c26cbe5d143f36', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
40394
+ return (index.h(index.Host, { key: 'f20f756ca7522ab7d27e5c9fff743db9ba26b101', class: { dragging: this.dragging } }, index.h("form", { key: 'abafb9a19d3dff7da26c8250ea94bbc7876cbc3a', id: "form", ref: (form) => (this.form = form) }, index.h("input", { key: '09397ebf4641190fdd1af13af537cde9f87257d2', type: "file", name: "input", id: "input", multiple: true, "aria-label": instance.t('upload.choose_files'), ref: (input) => (this.input = input), onInput: this.handleInput }), index.h("div", { key: '0365f750bc55d98a95008bcf404f77b247480d81', id: "modal" }, index.h("div", { key: '82d8d8ff21977d36a3f18c704002d1a8cdad9016', id: "body-frame" }, index.h("div", { key: 'ef05d508f0341f92d5e987deb469b2759ee28f1b', id: "body" }, !hasFiles && (index.h("div", { key: '7885aad8082bedf42ef824ad06a388ed3a083987', id: "dropzone" }, index.h("ezp-icon", { key: '25707aa1f7018c7942ca5c82a35c4a74f73f5e70', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '2dfb59ce766671396164fcd63d25ef9b04981d01', id: "dropzone-title", level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') }), index.h("div", { key: 'b831d79aab06973e47666e129e89ba23d3e8a3a4', id: "dropzone-prompt" }, index.h("ezp-text-button", { key: '2ade7d526019a71b493e00e6737ca13769cccd29', id: "choose", type: "button", onClick: this.openPicker, label: instance.t('upload.choose_files') }), index.h("ezp-label", { key: '79903c44e2a82b39c97606aa1ccbe9cb28a42c48', id: "drag-hint", level: "secondary", weight: "strong", text: instance.t('upload.drag_hint') }), index.h("ezp-label", { key: '895d43cada83fade39b8d67e70782b9b9fea747c', id: "formats", level: "tertiary", text: SUPPORTED_FORMATS.join(', ') })))), hasFiles && (index.h("div", { key: '6c825ac2791e82271669a7824ed720b127290242', id: "files" }, this.selectedFiles.map((file, index$1) => (index.h("div", { key: this.fileKey(file), class: "file" }, index.h("span", { class: "file-type", "aria-hidden": "true" }, this.fileType(file.name)), index.h("div", { class: "file-details" }, index.h("ezp-file-name", { class: "file-name", weight: "heavy", name: file.name, placement: index$1 === 0 ? 'bottom' : 'top' }), index.h("ezp-label", { class: "file-size", level: "tertiary", text: this.formatSize(file.size) })), index.h("button", { type: "button", class: "file-remove", "aria-label": instance.t('upload.remove_file'), onClick: (event) => this.removeFile(event, index$1) }, index.h("ezp-icon", { name: "close" }))))), index.h("button", { key: 'da8562e56c4006952efa239e8076f333ae27b1be', type: "button", id: "add-more", onClick: this.openPicker }, index.h("ezp-icon", { key: '6b2565bb3a9d4eca02079923ffdee36d5184d10f', name: "plus" }), index.h("ezp-label", { key: '59ecc6b13ca9fa66b8f04944c57ba680e3bab0f8', level: "secondary", weight: "heavy", text: instance.t('upload.add_more') }))))), hasFiles && this.dragging && (index.h("div", { key: '26e2552f69637448b3663f9342c421ec29abcca8', id: "drop-overlay", "aria-hidden": "true" }, index.h("ezp-icon", { key: '0f409daf2c6fc5f3f103f4d4450970aea7edb0c7', id: "dropzone-icon", name: "cloud-upload" }), index.h("ezp-label", { key: '1e19c3e44aac998ad35671435cfe96a27633b170', level: "primary", weight: "heavy", text: instance.t('upload.dropzone_title') })))), index.h("div", { key: '31d0106aea747008bf2c2760e4cd8ab0e637144b', id: "footer" }, index.h("ezp-text-button", { key: '24c6c9f25de785443402ac3aa08975c58779faea', id: "clear", type: "button", level: "secondary", disabled: !hasFiles, onClick: this.handleCancel, label: instance.t('upload.remove_files'), class: "action" }), index.h("ezp-text-button", { key: 'cd0fb877a2a7a756cfbe6aa2fdbacaedbe4c8efb', id: "continue", type: "button", disabled: !hasFiles, onClick: this.handleContinue, label: instance.t('upload.continue'), class: "action" }))))));
39995
40395
  }
39996
40396
  };
39997
40397
  EzpUpload.style = ezpUploadCss();
@@ -40081,7 +40481,7 @@ const EzpUserMenu = class {
40081
40481
  *
40082
40482
  */
40083
40483
  render() {
40084
- return (index.h(index.Host, { key: '3d13f203651146743cf8ac7754764e37d5cead30', class: this.open ? 'is-open' : '' }, index.h("div", { key: '28c08e6068d25a96d385553491edfcec25e516d3', id: "header" }, index.h("ezp-label", { key: '45881a8cff5d1efbbae133cd13206120c2ae17da', ellipsis: true, id: "name", weight: "heavy", text: this.name }), index.h("ezp-icon-button", { key: '92205d9008c0d3a68989ea8bca24c481b1542716', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { key: '4ef631425b38ed208f5e55446525c45943e6dfee', id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { key: '85e8603a60e7150458e31cc20bbaa99a0f024636', class: "link", onClick: this.logOut }, index.h("ezp-icon", { key: 'c96a13aeb65e645e7180c469d9168550d6bfaee2', class: "link__icon", name: "logout" }), index.h("ezp-label", { key: '1aa825d659ffedd8318016540716c88a27f4f75b', text: instance.t('user_menu.logout') }))), index.h("div", { key: 'c7d2c25bebb2601c34215766b2e85359834e16f7', id: "theme" }, index.h("ezp-label", { key: 'e39f708172868841fd5d043dc6d8466a4db71405', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), index.h("div", { key: '26dc2c26d4408c0cb03d0e2fbd4954744eb2ada4', id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" })))))), index.h("div", { key: 'ed62f9a441fd9eb464699c8cfdc277148b471bf8', id: "appearance" }, index.h("ezp-label", { key: '6b21204284c739cc00d79caca622f892d44a6889', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), index.h("div", { key: 'fcd9dcf68b857b6b22b7617dd999c7137ab04c9e', id: "tabs" }, this.appearances.map((appearance) => (index.h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, index.h("ezp-icon", { name: appearance.name }), index.h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
40484
+ return (index.h(index.Host, { key: 'cd2505f64646e8f23d534896c01fcd246d974c2f', class: this.open ? 'is-open' : '' }, index.h("div", { key: '65df837d1eee8b2275f8c0ef72b039c7ae6d08cd', id: "header" }, index.h("ezp-label", { key: '3ca9bc9d616de1e4efc686f77bcdaa39dab3f18d', ellipsis: true, id: "name", weight: "heavy", text: this.name }), index.h("ezp-icon-button", { key: '119abe7450937b7cf2e70ff3ed96d01f3f0aff9d', id: "close", level: "tertiary", icon: "close", onClick: this.handleClose })), index.h("div", { key: '90f40d22672bc65cbf988cf2ab57cbc088218cfd', id: "links" }, this.links.map((link) => (index.h("a", { class: "link", href: link.href, target: "_blank", rel: "noopener noreferrer" }, index.h("ezp-icon", { class: "link__icon", name: link.icon }), index.h("ezp-label", { text: link.title })))), index.h("a", { key: '94df9033da5697739c690a180ed2df318f803511', class: "link", onClick: this.logOut }, index.h("ezp-icon", { key: '609044f6d8255e4378aee226e16c29e9242c8259', class: "link__icon", name: "logout" }), index.h("ezp-label", { key: '20953a49845a8c4e75081c597d8e916c3b159b51', text: instance.t('user_menu.logout') }))), index.h("div", { key: '4b96f92ceb1047c4a88f0b33406a297323eded75', id: "theme" }, index.h("ezp-label", { key: '156893ed3703f63ee826e4887fa711469603b6c8', class: "caption", text: `${instance.t('user_menu.theme')}:`, weight: "heavy" }), index.h("div", { key: '2ee3ec8725a98d5dc7d7f792fed969c2dea357f4', id: "swatches" }, this.themes.map((theme) => (index.h("button", { class: `swatch swatch--${theme} ${theme === userStore.state.theme ? 'selected' : ''}`, onClick: () => this.handleTheme(theme) }, index.h("span", { class: "dot" })))))), index.h("div", { key: 'd78d2b935d9cdb15df66d761dd9290a68db09e9c', id: "appearance" }, index.h("ezp-label", { key: 'f290affaf49bd01a06f576a4d52b3d1936dbdb23', class: "caption", text: `${instance.t('user_menu.appearance')}:`, weight: "heavy" }), index.h("div", { key: '8087488313dbd2898280d3abb6244485b97e4ee4', id: "tabs" }, this.appearances.map((appearance) => (index.h("button", { class: `tab ${appearance.name === userStore.state.appearance ? 'selected' : ''}`, onClick: () => this.handleAppearance(appearance.name) }, index.h("ezp-icon", { name: appearance.name }), index.h("ezp-label", { text: appearance.title, level: "tertiary", weight: "strong" }))))))));
40085
40485
  }
40086
40486
  get component() { return index.getElement(this); }
40087
40487
  static get watchers() { return {
@@ -40095,6 +40495,7 @@ EzpUserMenu.style = ezpUserMenuCss();
40095
40495
  exports.ezp_auth = EzpAuth;
40096
40496
  exports.ezp_backdrop = EzpBackdrop;
40097
40497
  exports.ezp_dialog = EzpDialog;
40498
+ exports.ezp_file_name = EzpFileName;
40098
40499
  exports.ezp_icon = EzpIcon;
40099
40500
  exports.ezp_icon_button = EzpIconButton;
40100
40501
  exports.ezp_input = EzpInput;