@redocly/replay 0.5.16 → 0.5.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/replay.cjs CHANGED
@@ -267,7 +267,7 @@ html body {
267
267
  font-size: var(--font-size-base);
268
268
  font-weight: var(--font-weight-regular);
269
269
  line-height: var(--line-height-base);
270
- `;function sc({variable:t,onSave:e,onCancel:n,className:r,readonlyName:i,readonlyValue:o,isNew:s}){const[a,l]=_.useState(t.name),[c,u]=_.useState(t.value),[f,d]=_.useState(!!t.isSecret),h=()=>{e({...t,name:a,value:c,isSecret:f})};return O.jsxs(oM,{className:r,children:[O.jsxs(sM,{children:[s?"New":"Edit"," variable"]}),O.jsx(Ms,{children:"Name"}),O.jsx(Uo,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:p=>l(p.target.value)}),O.jsx(Ms,{children:"Value"}),O.jsx(Uo,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:o,onChange:p=>u(p.target.value)}),O.jsx(nM,{value:f,onChange:p=>d(p),title:"Make it secret"}),O.jsxs(aM,{children:[O.jsx(M.Button,{size:"small",variant:"text",onClick:n,children:"Cancel"}),O.jsx(M.Button,{size:"small",variant:"primary",onClick:h,disabled:!c.trim()||!a.trim(),"data-testid":"variable-save-button",children:"Save"})]})]})}const oM=$.div`
270
+ `;function sc({variable:t,onSave:e,onCancel:n,className:r,readonlyName:i,readonlyValue:o,isNew:s}){const[a,l]=_.useState(t.name),[c,u]=_.useState(t.value),[f,d]=_.useState(!!t.isSecret),h=()=>{e({...t,name:a,value:c,isSecret:f})};return O.jsxs(oM,{className:r,children:[O.jsxs(sM,{children:[s?"New":"Edit"," variable"]}),O.jsx(Ms,{children:"Name"}),O.jsx(Uo,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:p=>l(p.target.value)}),O.jsx(Ms,{children:"Value"}),O.jsx(Uo,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:o,onChange:p=>u(p.target.value)}),O.jsx(nM,{value:f,onChange:p=>d(p),title:"Make it secret"}),O.jsxs(aM,{children:[O.jsx(M.Button,{size:"small",variant:"text",onClick:n,children:"Cancel"}),O.jsx(M.Button,{size:"small",variant:"primary",onClick:h,disabled:!a.trim(),"data-testid":"variable-save-button",children:"Save"})]})]})}const oM=$.div`
271
271
  display: flex;
272
272
  flex-direction: column;
273
273
  align-items: flex-start;
@@ -292,7 +292,7 @@ html body {
292
292
  border: 2px solid var(--border-color-secondary);
293
293
  background-color: var(--layer-color);
294
294
  box-shadow: 0 8px 24px 8px rgba(0, 0, 0, 0.04), 0 4px 12px 0 rgba(0, 0, 0, 0.08);
295
- `,jO="server",Nh="replay-history",Mh="replay-collections",Fh="replay-draft-requests",Zh="replay-environments",Lh="replay-user-id";function cM(){const[t]=_.useState(localStorage.getItem(Lh)||crypto.randomUUID());return _.useEffect(()=>{localStorage.getItem(Lh)||localStorage.setItem(Lh,t)},[]),t}function mt(){const{useTelemetry:t}=M.useThemeHooks(),e=cM(),n=t();return{sendEvent:(i,o)=>{var s;(s=n==null?void 0:n.send)==null||s.call(n,"replay",{...o,eventType:i,replayUserId:e,url:window.location.href})}}}function Dd({children:t,controls:e,icon:n,title:r,defaultExpanded:i=!1,dataTestId:o,size:s="large",...a}){const l=d=>{(d.key===" "||d.key==="Enter")&&(d.preventDefault(),u(!c))},[c,u]=_.useState(i),f=()=>{const d=!c;u(d),a.onToggle&&a.onToggle(d)};return O.jsxs(uM,{...a,"data-testid":o,$size:s,children:[O.jsxs(hM,{$size:s,onKeyDown:l,tabIndex:0,onClick:f,children:[O.jsxs(gM,{children:[O.jsx(pM,{children:n||(c?O.jsx(M.ChevronDownIcon,{size:"14px",color:"--text-color-secondary"}):O.jsx(M.ChevronRightIcon,{size:"14px",color:"--text-color-secondary"}))}),O.jsx(fM,{children:r})]}),e&&O.jsx(DP,{children:e})]}),O.jsx(dM,{$isExpanded:c,children:t})]})}const uM=$.div`
295
+ `,jO="server",Nh="replay-history",Mh="replay-collections",Fh="replay-draft-requests",Zh="replay-environments",Lh="replay-user-id";function cM(){const[t]=_.useState(localStorage.getItem(Lh)||crypto.randomUUID());return _.useEffect(()=>{localStorage.getItem(Lh)||localStorage.setItem(Lh,t)},[]),t}function mt(){const{useTelemetry:t}=M.useThemeHooks(),e=cM(),n=t();return{sendEvent:(i,o)=>{var s;(s=n==null?void 0:n.send)==null||s.call(n,"replay",{...o,eventType:i,replayUserId:e,url:window.location.href})}}}function Dd({children:t,controls:e,icon:n,title:r,defaultExpanded:i=!1,dataTestId:o,size:s="large",...a}){const[l,c]=_.useState(i);_.useEffect(()=>c(i),[i]);const u=d=>{(d.key===" "||d.key==="Enter")&&(d.preventDefault(),c(!l))},f=()=>{const d=!l;c(d),a.onToggle&&a.onToggle(d)};return O.jsxs(uM,{...a,"data-testid":o,$size:s,children:[O.jsxs(hM,{$size:s,onKeyDown:u,tabIndex:0,onClick:f,children:[O.jsxs(gM,{children:[O.jsx(pM,{children:n||(l?O.jsx(M.ChevronDownIcon,{size:"14px",color:"--text-color-secondary"}):O.jsx(M.ChevronRightIcon,{size:"14px",color:"--text-color-secondary"}))}),O.jsx(fM,{children:r})]}),e&&O.jsx(DP,{children:e})]}),O.jsx(dM,{$isExpanded:l,children:t})]})}const uM=$.div`
296
296
  display: flex;
297
297
  width: 100%;
298
298
  flex-direction: column;
package/dist/replay.d.ts CHANGED
@@ -413,7 +413,7 @@ declare type ReplayOnChangeParams = {
413
413
  [key: string]: string;
414
414
  };
415
415
  body?: any;
416
- } | {};
416
+ } | object;
417
417
  activeExampleName?: string;
418
418
  activeMimeName?: string;
419
419
  activeServer?: Server;
package/dist/replay.js CHANGED
@@ -2,7 +2,7 @@ var Bj = Object.defineProperty;
2
2
  var Nj = (t, e, n) => e in t ? Bj(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
3
  var jx = (t, e, n) => (Nj(t, typeof e != "symbol" ? e + "" : e, n), n);
4
4
  import * as Y from "react";
5
- import rt, { useRef as Je, useContext as Hi, createElement as gs, useState as ge, useCallback as He, forwardRef as ja, Fragment as Qr, createContext as Qd, useLayoutEffect as Bk, useMemo as Le, Component as Fj, useEffect as We, version as Mj, isValidElement as Zj, useImperativeHandle as AO, memo as js, useTransition as Lj, StrictMode as PO } from "react";
5
+ import rt, { useRef as Je, useContext as Hi, createElement as gs, useState as ge, useCallback as He, forwardRef as ja, Fragment as Qr, createContext as Qd, useLayoutEffect as Bk, useMemo as We, Component as Fj, useEffect as Ze, version as Mj, isValidElement as Zj, useImperativeHandle as AO, memo as js, useTransition as Lj, StrictMode as PO } from "react";
6
6
  import { CheckmarkIcon as Da, ChevronUpIcon as Wj, ChevronDownIcon as _a, Switch as Vj, Button as ve, useThemeHooks as zj, ChevronRightIcon as bc, WarningFilledIcon as EO, ViewOffIcon as Bd, ViewIcon as Nd, CopyButton as po, EditIcon as ua, ValueVariableIcon as Xj, Portal as TO, H4 as Nk, CloseIcon as Ai, useModalScrollLock as Gj, CheckboxIcon as Fk, TrashCanIcon as qn, Segmented as Mk, CircleDashIcon as IO, isString as Zk, CloseFilledIcon as $O, SecurityVariablesEnvSuffix as kt, InformationIcon as Sc, SpinnerIcon as Fd, Select as RO, Tag as zg, AddIcon as ws, FileIcon as Uj, CharacterIcon as Yj, DocumentBlankIcon as qj, CloudUploadIcon as Hj, ChevronSortIcon as Jj, Markdown as Kj, SecurityIcon as e5, CodeIcon as Lk, DataFormatIcon as t5, TableBuiltIcon as Wk, CookieIcon as Vk, ArrowUpRightIcon as n5, RestartIcon as r5, SearchIcon as i5, CloseOutlineIcon as s5, FolderAddIcon as Wu, FolderIcon as o5, Typography as a5, useOutsideClick as l5, useFocusTrap as c5, SaveIcon as u5, ArrowRightIcon as f5, StatusCode as zk, TimeIcon as d5, FileStorageIcon as h5, Spinner as p5, CleanIcon as g5, BookmarkAddIcon as m5, IBMCloudHyperProtectCryptoServicesIcon as O5, DownloadIcon as Xk, DocumentAddIcon as Xg, ExportIcon as v5, Dropdown as Dx, OverflowMenuVerticalIcon as _x, DropdownMenu as Qx, useMount as x5, markdoc as y5, SidePanelOpenIcon as b5, SidePanelCloseIcon as S5, GlobalStyle as w5 } from "@redocly/theme";
7
7
  import C5, { createPortal as Gk } from "react-dom";
8
8
  var Be = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
@@ -3364,12 +3364,12 @@ function kA({
3364
3364
  });
3365
3365
  }
3366
3366
  kA.displayName = "PanelResizeHandle";
3367
- const Ze = $.div`
3367
+ const Le = $.div`
3368
3368
  border-bottom: 1px solid var(--border-color-secondary);
3369
3369
  width: 100%;
3370
3370
  `;
3371
3371
  function z4({ onDoubleClick: t, ...e }) {
3372
- return /* @__PURE__ */ O.jsx(kA, { ...e, children: /* @__PURE__ */ O.jsx(X4, { onDoubleClick: t, children: /* @__PURE__ */ O.jsx(Ze, {}) }) });
3372
+ return /* @__PURE__ */ O.jsx(kA, { ...e, children: /* @__PURE__ */ O.jsx(X4, { onDoubleClick: t, children: /* @__PURE__ */ O.jsx(Le, {}) }) });
3373
3373
  }
3374
3374
  const X4 = $.div`
3375
3375
  display: flex;
@@ -3377,7 +3377,7 @@ const X4 = $.div`
3377
3377
  padding: var(--spacing-xs) 0;
3378
3378
 
3379
3379
  &:hover {
3380
- ${Ze} {
3380
+ ${Le} {
3381
3381
  border-bottom-color: var(--color-info-base);
3382
3382
  }
3383
3383
  }
@@ -6241,7 +6241,7 @@ var rP = function(e) {
6241
6241
  zIndex: 1
6242
6242
  };
6243
6243
  }, gQ = function(e) {
6244
- var n = e.appendTo, r = e.children, i = e.controlElement, s = e.innerProps, o = e.menuPlacement, a = e.menuPosition, l = Je(null), c = Je(null), u = ge(rP(o)), f = Me(u, 2), d = f[0], h = f[1], p = Le(function() {
6244
+ var n = e.appendTo, r = e.children, i = e.controlElement, s = e.innerProps, o = e.menuPlacement, a = e.menuPosition, l = Je(null), c = Je(null), u = ge(rP(o)), f = Me(u, 2), d = f[0], h = f[1], p = We(function() {
6245
6245
  return {
6246
6246
  setPortalPlacement: h
6247
6247
  };
@@ -6848,9 +6848,9 @@ var vB = process.env.NODE_ENV === "production" ? {
6848
6848
  return "".concat(r).concat(n ? " for search term " + n : "", ".");
6849
6849
  }
6850
6850
  }, bB = function(e) {
6851
- var n = e.ariaSelection, r = e.focusedOption, i = e.focusedValue, s = e.focusableOptions, o = e.isFocused, a = e.selectValue, l = e.selectProps, c = e.id, u = e.isAppleDevice, f = l.ariaLiveMessages, d = l.getOptionLabel, h = l.inputValue, p = l.isMulti, m = l.isOptionDisabled, g = l.isSearchable, x = l.menuIsOpen, v = l.options, y = l.screenReaderStatus, S = l.tabSelectsValue, b = l.isLoading, w = l["aria-label"], C = l["aria-live"], k = Le(function() {
6851
+ var n = e.ariaSelection, r = e.focusedOption, i = e.focusedValue, s = e.focusableOptions, o = e.isFocused, a = e.selectValue, l = e.selectProps, c = e.id, u = e.isAppleDevice, f = l.ariaLiveMessages, d = l.getOptionLabel, h = l.inputValue, p = l.isMulti, m = l.isOptionDisabled, g = l.isSearchable, x = l.menuIsOpen, v = l.options, y = l.screenReaderStatus, S = l.tabSelectsValue, b = l.isLoading, w = l["aria-label"], C = l["aria-live"], k = We(function() {
6852
6852
  return ie(ie({}, yB), f || {});
6853
- }, [f]), P = Le(function() {
6853
+ }, [f]), P = We(function() {
6854
6854
  var D = "";
6855
6855
  if (n && k.onChange) {
6856
6856
  var F = n.option, V = n.options, Z = n.removedValue, G = n.removedValues, z = n.value, L = function(W) {
@@ -6865,7 +6865,7 @@ var vB = process.env.NODE_ENV === "production" ? {
6865
6865
  D = k.onChange(N);
6866
6866
  }
6867
6867
  return D;
6868
- }, [n, k, m, a, d]), A = Le(function() {
6868
+ }, [n, k, m, a, d]), A = We(function() {
6869
6869
  var D = "", F = r || i, V = !!(r && a && a.includes(r));
6870
6870
  if (F && k.onFocus) {
6871
6871
  var Z = {
@@ -6881,7 +6881,7 @@ var vB = process.env.NODE_ENV === "production" ? {
6881
6881
  D = k.onFocus(Z);
6882
6882
  }
6883
6883
  return D;
6884
- }, [r, i, d, m, k, s, a, u]), E = Le(function() {
6884
+ }, [r, i, d, m, k, s, a, u]), E = We(function() {
6885
6885
  var D = "";
6886
6886
  if (x && v.length && !b && k.onFilter) {
6887
6887
  var F = y({
@@ -6893,7 +6893,7 @@ var vB = process.env.NODE_ENV === "production" ? {
6893
6893
  });
6894
6894
  }
6895
6895
  return D;
6896
- }, [s, h, x, k, v, y, b]), I = (n == null ? void 0 : n.action) === "initial-input-focus", R = Le(function() {
6896
+ }, [s, h, x, k, v, y, b]), I = (n == null ? void 0 : n.action) === "initial-input-focus", R = We(function() {
6897
6897
  var D = "";
6898
6898
  if (k.guidance) {
6899
6899
  var F = i ? "value" : x ? "menu" : "input";
@@ -7259,7 +7259,7 @@ function IB(t) {
7259
7259
  }, [h, d, f]), m = He(function(g) {
7260
7260
  g && (g.removeEventListener("wheel", f, !1), g.removeEventListener("touchstart", d, !1), g.removeEventListener("touchmove", h, !1));
7261
7261
  }, [h, d, f]);
7262
- return We(function() {
7262
+ return Ze(function() {
7263
7263
  if (e) {
7264
7264
  var g = c.current;
7265
7265
  return p(g), function() {
@@ -7319,7 +7319,7 @@ function $B(t) {
7319
7319
  }), c && Qy() && (c.removeEventListener("touchmove", jy, Po), l && (l.removeEventListener("touchstart", _y, Po), l.removeEventListener("touchmove", Dy, Po)));
7320
7320
  }
7321
7321
  }, [r]);
7322
- return We(function() {
7322
+ return Ze(function() {
7323
7323
  if (e) {
7324
7324
  var l = s.current;
7325
7325
  return o(l), function() {
@@ -8612,7 +8612,7 @@ const a3 = () => /* @__PURE__ */ O.jsx("svg", { width: "14", height: "14", viewB
8612
8612
  },
8613
8613
  children: C.children
8614
8614
  }
8615
- ), w = Le(() => ({
8615
+ ), w = We(() => ({
8616
8616
  menu: (C) => ({
8617
8617
  ...C,
8618
8618
  maxWidth: "424px",
@@ -8845,8 +8845,8 @@ const SP = $.div`
8845
8845
  --button-margin: 0;
8846
8846
  `;
8847
8847
  function dn() {
8848
- const t = De(), { environments: e, selectedEnvironmentId: n } = t, r = Le(() => n.get(), [n]);
8849
- return Le(() => e.find((s) => s.get().id === r) || e[0], [e, r]);
8848
+ const t = De(), { environments: e, selectedEnvironmentId: n } = t, r = We(() => n.get(), [n]);
8849
+ return We(() => e.find((s) => s.get().id === r) || e[0], [e, r]);
8850
8850
  }
8851
8851
  var u3 = function() {
8852
8852
  var t = document.getSelection();
@@ -15692,7 +15692,7 @@ const tM = function(t) {
15692
15692
  };
15693
15693
  }, []), [s, i];
15694
15694
  };
15695
- var v2 = rh() ? Bk : We, x2 = function(e) {
15695
+ var v2 = rh() ? Bk : Ze, x2 = function(e) {
15696
15696
  return +setTimeout(e, 16);
15697
15697
  }, y2 = function(e) {
15698
15698
  return clearTimeout(e);
@@ -15831,18 +15831,18 @@ function aM(t, e, n, r) {
15831
15831
  !ye && e && a && (Ee = fu), ye && e && s && (Ee = du), (ye && !e && c || !ye && f && !e && c) && (Ee = hu);
15832
15832
  var $e = re(Ee);
15833
15833
  Ee && (t || $e[Vr]) ? (F(Ee), X()) : F(Us);
15834
- }, [e]), We(function() {
15834
+ }, [e]), Ze(function() {
15835
15835
  // Cancel appear
15836
15836
  (D === fu && !a || // Cancel enter
15837
15837
  D === du && !s || // Cancel leave
15838
15838
  D === hu && !c) && F(Us);
15839
- }, [a, s, c]), We(function() {
15839
+ }, [a, s, c]), Ze(function() {
15840
15840
  return function() {
15841
15841
  L.current = !1, clearTimeout(j.current);
15842
15842
  };
15843
15843
  }, []);
15844
15844
  var xe = Y.useRef(!1);
15845
- We(function() {
15845
+ Ze(function() {
15846
15846
  E && (xe.current = !0), E !== void 0 && D === Us && ((xe.current || E) && (k == null || k(E)), xe.current = !0);
15847
15847
  }, [E, D]);
15848
15848
  var Re = G;
@@ -16856,7 +16856,7 @@ function Ac({
16856
16856
  size: "small",
16857
16857
  variant: "primary",
16858
16858
  onClick: h,
16859
- disabled: !c.trim() || !a.trim(),
16859
+ disabled: !a.trim(),
16860
16860
  "data-testid": "variable-save-button",
16861
16861
  children: "Save"
16862
16862
  }
@@ -16909,7 +16909,7 @@ const _M = $.div`
16909
16909
  `, dv = "server", cp = "replay-history", up = "replay-collections", fp = "replay-draft-requests", dp = "replay-environments", hp = "replay-user-id";
16910
16910
  function FM() {
16911
16911
  const [t] = ge(localStorage.getItem(hp) || crypto.randomUUID());
16912
- return We(() => {
16912
+ return Ze(() => {
16913
16913
  localStorage.getItem(hp) || localStorage.setItem(hp, t);
16914
16914
  }, []), t;
16915
16915
  }
@@ -16937,21 +16937,23 @@ function sh({
16937
16937
  size: o = "large",
16938
16938
  ...a
16939
16939
  }) {
16940
- const l = (d) => {
16941
- (d.key === " " || d.key === "Enter") && (d.preventDefault(), u(!c));
16942
- }, [c, u] = ge(i), f = () => {
16943
- const d = !c;
16944
- u(d), a.onToggle && a.onToggle(d);
16940
+ const [l, c] = ge(i);
16941
+ Ze(() => c(i), [i]);
16942
+ const u = (d) => {
16943
+ (d.key === " " || d.key === "Enter") && (d.preventDefault(), c(!l));
16944
+ }, f = () => {
16945
+ const d = !l;
16946
+ c(d), a.onToggle && a.onToggle(d);
16945
16947
  };
16946
16948
  return /* @__PURE__ */ O.jsxs(MM, { ...a, "data-testid": s, $size: o, children: [
16947
- /* @__PURE__ */ O.jsxs(WM, { $size: o, onKeyDown: l, tabIndex: 0, onClick: f, children: [
16949
+ /* @__PURE__ */ O.jsxs(WM, { $size: o, onKeyDown: u, tabIndex: 0, onClick: f, children: [
16948
16950
  /* @__PURE__ */ O.jsxs(zM, { children: [
16949
- /* @__PURE__ */ O.jsx(VM, { children: n || (c ? /* @__PURE__ */ O.jsx(_a, { size: "14px", color: "--text-color-secondary" }) : /* @__PURE__ */ O.jsx(bc, { size: "14px", color: "--text-color-secondary" })) }),
16951
+ /* @__PURE__ */ O.jsx(VM, { children: n || (l ? /* @__PURE__ */ O.jsx(_a, { size: "14px", color: "--text-color-secondary" }) : /* @__PURE__ */ O.jsx(bc, { size: "14px", color: "--text-color-secondary" })) }),
16950
16952
  /* @__PURE__ */ O.jsx(ZM, { children: r })
16951
16953
  ] }),
16952
16954
  e && /* @__PURE__ */ O.jsx(P2, { children: e })
16953
16955
  ] }),
16954
- /* @__PURE__ */ O.jsx(LM, { $isExpanded: c, children: t })
16956
+ /* @__PURE__ */ O.jsx(LM, { $isExpanded: l, children: t })
16955
16957
  ] });
16956
16958
  }
16957
16959
  const MM = $.div`
@@ -17126,7 +17128,7 @@ function GM({
17126
17128
  ] })
17127
17129
  ] }),
17128
17130
  (R == null ? void 0 : R.canBeEdited) && /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
17129
- /* @__PURE__ */ O.jsx(Ze, {}),
17131
+ /* @__PURE__ */ O.jsx(Le, {}),
17130
17132
  /* @__PURE__ */ O.jsx(
17131
17133
  ve,
17132
17134
  {
@@ -17168,7 +17170,7 @@ function GM({
17168
17170
  /* @__PURE__ */ O.jsx("span", { children: "Undefined variable" })
17169
17171
  ] }),
17170
17172
  /* @__PURE__ */ O.jsx(gp, { children: "Make sure the variable is defined and enabled in the active environment." }),
17171
- /* @__PURE__ */ O.jsx(Ze, {}),
17173
+ /* @__PURE__ */ O.jsx(Le, {}),
17172
17174
  /* @__PURE__ */ O.jsx(ve, { onClick: p, children: "Add new variable" })
17173
17175
  ] }), C = /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
17174
17176
  /* @__PURE__ */ O.jsxs(pp, { children: [
@@ -17176,7 +17178,7 @@ function GM({
17176
17178
  /* @__PURE__ */ O.jsx("span", { children: "Undefined variable value" })
17177
17179
  ] }),
17178
17180
  /* @__PURE__ */ O.jsx(gp, { children: "This variable needs a value assigned before you can use it." }),
17179
- /* @__PURE__ */ O.jsx(Ze, {}),
17181
+ /* @__PURE__ */ O.jsx(Le, {}),
17180
17182
  /* @__PURE__ */ O.jsx(ve, { onClick: p, children: "Set value" })
17181
17183
  ] }), k = /* @__PURE__ */ O.jsxs(
17182
17184
  UM,
@@ -17198,7 +17200,7 @@ function GM({
17198
17200
  isNew: !t,
17199
17201
  readonlyName: !0
17200
17202
  }
17201
- ), A = () => o ? P : f ? t ? C : w : /* @__PURE__ */ O.jsx(b, {}), E = Le(() => o ? "variable-editor" : f ? t ? "variable-undefined-value" : "variable-undefined-variable" : "variable-info", [f, o, t]), I = !!Object.values(l).filter(Boolean).length;
17203
+ ), A = () => o ? P : f ? t ? C : w : /* @__PURE__ */ O.jsx(b, {}), E = We(() => o ? "variable-editor" : f ? t ? "variable-undefined-value" : "variable-undefined-variable" : "variable-info", [f, o, t]), I = !!Object.values(l).filter(Boolean).length;
17202
17204
  return r ? /* @__PURE__ */ O.jsx(
17203
17205
  Wa,
17204
17206
  {
@@ -17297,7 +17299,7 @@ const UM = $.span`
17297
17299
  flex-direction: column;
17298
17300
  gap: var(--spacing-xs);
17299
17301
  padding-top: var(--spacing-xs);
17300
- `, n9 = $(Ze)`
17302
+ `, n9 = $(Le)`
17301
17303
  margin-left: -16.5px;
17302
17304
  width: calc(100% + 16.5px);
17303
17305
  `, Rl = (t, e, n = { withPopover: !0 }) => {
@@ -17361,7 +17363,7 @@ function i9(t) {
17361
17363
  }
17362
17364
  const _s = ({ children: t, className: e, onClickOutside: n }) => {
17363
17365
  const r = Je(null);
17364
- We(() => (document.addEventListener("mouseup", i), () => {
17366
+ Ze(() => (document.addEventListener("mouseup", i), () => {
17365
17367
  document.removeEventListener("mouseup", i);
17366
17368
  }));
17367
17369
  const i = (s) => {
@@ -17546,7 +17548,7 @@ function y9({
17546
17548
  inputId: i
17547
17549
  }) {
17548
17550
  const [s, o] = ge(0), a = window.scrollX || document.documentElement.scrollTop, l = t.getBoundingClientRect();
17549
- return We(() => {
17551
+ return Ze(() => {
17550
17552
  const c = (u) => {
17551
17553
  u.key === "ArrowDown" ? o((f) => s < n.length - 1 ? f + 1 : 0) : u.key === "ArrowUp" ? o((f) => s > 0 ? f - 1 : n.length - 1) : u.key === "Enter" && r(n[s]);
17552
17554
  };
@@ -17644,7 +17646,7 @@ function st({
17644
17646
  ), [v, y, S, b] = O9(
17645
17647
  t,
17646
17648
  d
17647
- ), [w, C] = ge(null), [k, P] = ge(null), [A, E] = ge(!1), I = c.current && A && k && u && !w, R = Le(
17649
+ ), [w, C] = ge(null), [k, P] = ge(null), [A, E] = ge(!1), I = c.current && A && k && u && !w, R = We(
17648
17650
  () => h9(v, [...e.get({ noproxy: !0 })]),
17649
17651
  [v, e]
17650
17652
  ), { sendEvent: B } = bt(), D = He(
@@ -17654,15 +17656,15 @@ function st({
17654
17656
  // eslint-disable-next-line react-hooks/exhaustive-deps
17655
17657
  [i, v, e, l]
17656
17658
  );
17657
- We(() => {
17659
+ Ze(() => {
17658
17660
  D(v, d);
17659
- }, [e]), We(() => {
17661
+ }, [e]), Ze(() => {
17660
17662
  y(t, t.length > d ? d : t.length), x(Rl(t, e, { inputId: l })), h(t.length > d ? d : t.length);
17661
- }, [t]), We(() => {
17663
+ }, [t]), Ze(() => {
17662
17664
  u && f9(c, d);
17663
- }, [d, u, g]), We(() => {
17665
+ }, [d, u, g]), Ze(() => {
17664
17666
  o || N(!1, c.current);
17665
- }, [o]), We(() => {
17667
+ }, [o]), Ze(() => {
17666
17668
  u && E(
17667
17669
  d9(v, d, [
17668
17670
  ...e.get({ noproxy: !0 })
@@ -17877,7 +17879,7 @@ function E9({ security: t }) {
17877
17879
  }
17878
17880
  )
17879
17881
  ] }),
17880
- /* @__PURE__ */ O.jsx(Ze, {}),
17882
+ /* @__PURE__ */ O.jsx(Le, {}),
17881
17883
  /* @__PURE__ */ O.jsxs(dt, { children: [
17882
17884
  /* @__PURE__ */ O.jsx(et, { children: "API key" }),
17883
17885
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -17918,7 +17920,7 @@ function T9({ security: t }) {
17918
17920
  }
17919
17921
  )
17920
17922
  ] }),
17921
- /* @__PURE__ */ O.jsx(Ze, {}),
17923
+ /* @__PURE__ */ O.jsx(Le, {}),
17922
17924
  /* @__PURE__ */ O.jsxs(dt, { children: [
17923
17925
  /* @__PURE__ */ O.jsx(et, { children: "Password" }),
17924
17926
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -17934,7 +17936,7 @@ function T9({ security: t }) {
17934
17936
  }
17935
17937
  )
17936
17938
  ] }),
17937
- /* @__PURE__ */ O.jsx(Ze, {})
17939
+ /* @__PURE__ */ O.jsx(Le, {})
17938
17940
  ] });
17939
17941
  }
17940
17942
  function I9({ security: t }) {
@@ -18029,7 +18031,7 @@ const D9 = $.div`
18029
18031
  `;
18030
18032
  function _9({ isOpen: t, title: e, content: n, onClose: r, mountId: i }) {
18031
18033
  const s = Je(null);
18032
- return Gj(t), We(() => {
18034
+ return Gj(t), Ze(() => {
18033
18035
  s.current && s.current.focus();
18034
18036
  }, []), t ? /* @__PURE__ */ O.jsx(TO, { mountId: i, children: /* @__PURE__ */ O.jsx(D2, { children: /* @__PURE__ */ O.jsxs(Q9, { children: [
18035
18037
  /* @__PURE__ */ O.jsxs(B9, { children: [
@@ -18454,7 +18456,7 @@ function ah({
18454
18456
  r[u].set(ft);
18455
18457
  };
18456
18458
  return /* @__PURE__ */ O.jsxs(j2, { title: "Advanced options", expanded: !0, children: [
18457
- /* @__PURE__ */ O.jsx(Ze, {}),
18459
+ /* @__PURE__ */ O.jsx(Le, {}),
18458
18460
  !i && /* @__PURE__ */ O.jsx(Eb, { children: /* @__PURE__ */ O.jsx(
18459
18461
  Oa,
18460
18462
  {
@@ -18572,7 +18574,7 @@ function n8({
18572
18574
  }
18573
18575
  )
18574
18576
  ] }),
18575
- /* @__PURE__ */ O.jsx(Ze, {}),
18577
+ /* @__PURE__ */ O.jsx(Le, {}),
18576
18578
  /* @__PURE__ */ O.jsxs(dt, { children: [
18577
18579
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Client secret" }),
18578
18580
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18587,7 +18589,7 @@ function n8({
18587
18589
  }
18588
18590
  )
18589
18591
  ] }),
18590
- /* @__PURE__ */ O.jsx(Ze, {}),
18592
+ /* @__PURE__ */ O.jsx(Le, {}),
18591
18593
  /* @__PURE__ */ O.jsxs(dt, { children: [
18592
18594
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Access Token URL" }),
18593
18595
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18602,7 +18604,7 @@ function n8({
18602
18604
  }
18603
18605
  )
18604
18606
  ] }),
18605
- /* @__PURE__ */ O.jsx(Ze, {}),
18607
+ /* @__PURE__ */ O.jsx(Le, {}),
18606
18608
  /* @__PURE__ */ O.jsx(
18607
18609
  ah,
18608
18610
  {
@@ -18631,7 +18633,7 @@ const r8 = js(n8), i8 = [
18631
18633
  ];
18632
18634
  function s8({ codeVerifier: t, codeChallenge: e }) {
18633
18635
  const { isRequestEditable: n } = De(), [r, i] = ge(!1), s = dn();
18634
- We(() => {
18636
+ Ze(() => {
18635
18637
  r || (t.set(""), e.set(""));
18636
18638
  }, [e, t, r]);
18637
18639
  const o = He(
@@ -18653,7 +18655,7 @@ function s8({ codeVerifier: t, codeChallenge: e }) {
18653
18655
  )
18654
18656
  ] }),
18655
18657
  r && /* @__PURE__ */ O.jsxs(O.Fragment, { children: [
18656
- /* @__PURE__ */ O.jsx(Ze, {}),
18658
+ /* @__PURE__ */ O.jsx(Le, {}),
18657
18659
  /* @__PURE__ */ O.jsxs(dt, { children: [
18658
18660
  /* @__PURE__ */ O.jsx(et, { children: "Code verifier" }),
18659
18661
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18668,7 +18670,7 @@ function s8({ codeVerifier: t, codeChallenge: e }) {
18668
18670
  }
18669
18671
  )
18670
18672
  ] }),
18671
- /* @__PURE__ */ O.jsx(Ze, {}),
18673
+ /* @__PURE__ */ O.jsx(Le, {}),
18672
18674
  /* @__PURE__ */ O.jsxs(dt, { children: [
18673
18675
  /* @__PURE__ */ O.jsx(et, { children: "Code challenge" }),
18674
18676
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18792,7 +18794,7 @@ function c8({
18792
18794
  }
18793
18795
  )
18794
18796
  ] }),
18795
- /* @__PURE__ */ O.jsx(Ze, {}),
18797
+ /* @__PURE__ */ O.jsx(Le, {}),
18796
18798
  /* @__PURE__ */ O.jsxs(dt, { children: [
18797
18799
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Client secret" }),
18798
18800
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18807,15 +18809,15 @@ function c8({
18807
18809
  }
18808
18810
  )
18809
18811
  ] }),
18810
- /* @__PURE__ */ O.jsx(Ze, {}),
18812
+ /* @__PURE__ */ O.jsx(Le, {}),
18811
18813
  /* @__PURE__ */ O.jsx(o8, { codeVerifier: h, codeChallenge: p }),
18812
- /* @__PURE__ */ O.jsx(Ze, {}),
18814
+ /* @__PURE__ */ O.jsx(Le, {}),
18813
18815
  /* @__PURE__ */ O.jsxs(dt, { children: [
18814
18816
  /* @__PURE__ */ O.jsx(wP, { children: /* @__PURE__ */ O.jsx(et, { children: "Scopes" }) }),
18815
18817
  /* @__PURE__ */ O.jsx(Qe, {}),
18816
18818
  /* @__PURE__ */ O.jsx(_2, { environment: y, scopes: d, editable: x.get() })
18817
18819
  ] }),
18818
- /* @__PURE__ */ O.jsx(Ze, {}),
18820
+ /* @__PURE__ */ O.jsx(Le, {}),
18819
18821
  /* @__PURE__ */ O.jsxs(dt, { children: [
18820
18822
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Access Token URL" }),
18821
18823
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18831,7 +18833,7 @@ function c8({
18831
18833
  }
18832
18834
  )
18833
18835
  ] }),
18834
- /* @__PURE__ */ O.jsx(Ze, {}),
18836
+ /* @__PURE__ */ O.jsx(Le, {}),
18835
18837
  /* @__PURE__ */ O.jsxs(dt, { children: [
18836
18838
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Authorization URL" }),
18837
18839
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18847,7 +18849,7 @@ function c8({
18847
18849
  }
18848
18850
  )
18849
18851
  ] }),
18850
- /* @__PURE__ */ O.jsx(Ze, {}),
18852
+ /* @__PURE__ */ O.jsx(Le, {}),
18851
18853
  /* @__PURE__ */ O.jsxs(dt, { children: [
18852
18854
  /* @__PURE__ */ O.jsx(et, { children: "Callback URL" }),
18853
18855
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18862,7 +18864,7 @@ function c8({
18862
18864
  }
18863
18865
  )
18864
18866
  ] }),
18865
- /* @__PURE__ */ O.jsx(Ze, {}),
18867
+ /* @__PURE__ */ O.jsx(Le, {}),
18866
18868
  /* @__PURE__ */ O.jsx(
18867
18869
  ah,
18868
18870
  {
@@ -18928,13 +18930,13 @@ function f8({
18928
18930
  }
18929
18931
  )
18930
18932
  ] }),
18931
- /* @__PURE__ */ O.jsx(Ze, {}),
18933
+ /* @__PURE__ */ O.jsx(Le, {}),
18932
18934
  /* @__PURE__ */ O.jsxs(dt, { children: [
18933
18935
  /* @__PURE__ */ O.jsx(wP, { children: /* @__PURE__ */ O.jsx(et, { children: "Scopes" }) }),
18934
18936
  /* @__PURE__ */ O.jsx(Qe, {}),
18935
18937
  /* @__PURE__ */ O.jsx(_2, { environment: m, scopes: f, editable: h.get() })
18936
18938
  ] }),
18937
- /* @__PURE__ */ O.jsx(Ze, {}),
18939
+ /* @__PURE__ */ O.jsx(Le, {}),
18938
18940
  /* @__PURE__ */ O.jsxs(dt, { children: [
18939
18941
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Authorization URL" }),
18940
18942
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18950,7 +18952,7 @@ function f8({
18950
18952
  }
18951
18953
  )
18952
18954
  ] }),
18953
- /* @__PURE__ */ O.jsx(Ze, {}),
18955
+ /* @__PURE__ */ O.jsx(Le, {}),
18954
18956
  /* @__PURE__ */ O.jsxs(dt, { children: [
18955
18957
  /* @__PURE__ */ O.jsx(et, { children: "Callback URL" }),
18956
18958
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -18965,7 +18967,7 @@ function f8({
18965
18967
  }
18966
18968
  )
18967
18969
  ] }),
18968
- /* @__PURE__ */ O.jsx(Ze, {}),
18970
+ /* @__PURE__ */ O.jsx(Le, {}),
18969
18971
  /* @__PURE__ */ O.jsx(
18970
18972
  ah,
18971
18973
  {
@@ -19055,7 +19057,7 @@ function h8({
19055
19057
  }
19056
19058
  )
19057
19059
  ] }),
19058
- /* @__PURE__ */ O.jsx(Ze, {}),
19060
+ /* @__PURE__ */ O.jsx(Le, {}),
19059
19061
  /* @__PURE__ */ O.jsxs(dt, { children: [
19060
19062
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Password" }),
19061
19063
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -19070,7 +19072,7 @@ function h8({
19070
19072
  }
19071
19073
  )
19072
19074
  ] }),
19073
- /* @__PURE__ */ O.jsx(Ze, {}),
19075
+ /* @__PURE__ */ O.jsx(Le, {}),
19074
19076
  /* @__PURE__ */ O.jsxs(dt, { children: [
19075
19077
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Access Token URL" }),
19076
19078
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -19085,7 +19087,7 @@ function h8({
19085
19087
  }
19086
19088
  )
19087
19089
  ] }),
19088
- /* @__PURE__ */ O.jsx(Ze, {}),
19090
+ /* @__PURE__ */ O.jsx(Le, {}),
19089
19091
  /* @__PURE__ */ O.jsxs(dt, { children: [
19090
19092
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Client ID" }),
19091
19093
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -19100,7 +19102,7 @@ function h8({
19100
19102
  }
19101
19103
  )
19102
19104
  ] }),
19103
- /* @__PURE__ */ O.jsx(Ze, {}),
19105
+ /* @__PURE__ */ O.jsx(Le, {}),
19104
19106
  /* @__PURE__ */ O.jsxs(dt, { children: [
19105
19107
  /* @__PURE__ */ O.jsx(et, { required: !0, children: "Client secret" }),
19106
19108
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -19115,7 +19117,7 @@ function h8({
19115
19117
  }
19116
19118
  )
19117
19119
  ] }),
19118
- /* @__PURE__ */ O.jsx(Ze, {}),
19120
+ /* @__PURE__ */ O.jsx(Le, {}),
19119
19121
  /* @__PURE__ */ O.jsx(
19120
19122
  ah,
19121
19123
  {
@@ -19228,7 +19230,7 @@ function S8({
19228
19230
  security: n,
19229
19231
  securityType: r
19230
19232
  });
19231
- return We(() => {
19233
+ return Ze(() => {
19232
19234
  const l = (c) => {
19233
19235
  c.key === "Escape" && e();
19234
19236
  };
@@ -39959,7 +39961,7 @@ function bU(t) {
39959
39961
  indentWithTab: y,
39960
39962
  basicSetup: S
39961
39963
  }), F = [B, R, ...D];
39962
- return o && typeof o == "function" && F.push(ue.updateListener.of(o)), F = F.concat(a), We(() => {
39964
+ return o && typeof o == "function" && F.push(ue.updateListener.of(o)), F = F.concat(a), Ze(() => {
39963
39965
  if (C && !E) {
39964
39966
  var V = {
39965
39967
  doc: e,
@@ -39978,15 +39980,15 @@ function bU(t) {
39978
39980
  return () => {
39979
39981
  P && (I(void 0), A(void 0));
39980
39982
  };
39981
- }, [C, E]), We(() => k(t.container), [t.container]), We(() => () => {
39983
+ }, [C, E]), Ze(() => k(t.container), [t.container]), Ze(() => () => {
39982
39984
  P && (P.destroy(), A(void 0));
39983
- }, [P]), We(() => {
39985
+ }, [P]), Ze(() => {
39984
39986
  l && P && P.focus();
39985
- }, [l, P]), We(() => {
39987
+ }, [l, P]), Ze(() => {
39986
39988
  P && P.dispatch({
39987
39989
  effects: Ne.reconfigure.of(F)
39988
39990
  });
39989
- }, [c, a, u, f, d, h, p, m, g, x, v, y, S, r, o]), We(() => {
39991
+ }, [c, a, u, f, d, h, p, m, g, x, v, y, S, r, o]), Ze(() => {
39990
39992
  if (e !== void 0) {
39991
39993
  var V = P ? P.state.doc.toString() : "";
39992
39994
  P && e !== V && P.dispatch({
@@ -50689,9 +50691,9 @@ function iR({ security: t, securityType: e = K.OAuth2 }) {
50689
50691
  }
50690
50692
  )
50691
50693
  ] }),
50692
- /* @__PURE__ */ O.jsx(Ze, {}),
50694
+ /* @__PURE__ */ O.jsx(Le, {}),
50693
50695
  /* @__PURE__ */ O.jsxs(j2, { title: "Configure New Token", expanded: !0, children: [
50694
- /* @__PURE__ */ O.jsx(Ze, {}),
50696
+ /* @__PURE__ */ O.jsx(Le, {}),
50695
50697
  /* @__PURE__ */ O.jsxs(dt, { children: [
50696
50698
  /* @__PURE__ */ O.jsx(et, { children: "Grant type" }),
50697
50699
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -50706,7 +50708,7 @@ function iR({ security: t, securityType: e = K.OAuth2 }) {
50706
50708
  }
50707
50709
  )
50708
50710
  ] }),
50709
- /* @__PURE__ */ O.jsx(Ze, {}),
50711
+ /* @__PURE__ */ O.jsx(Le, {}),
50710
50712
  /* @__PURE__ */ O.jsx(
50711
50713
  C,
50712
50714
  {
@@ -50848,7 +50850,7 @@ function fH({ security: t }) {
50848
50850
  }
50849
50851
  )
50850
50852
  ] }),
50851
- /* @__PURE__ */ O.jsx(Ze, {}),
50853
+ /* @__PURE__ */ O.jsx(Le, {}),
50852
50854
  /* @__PURE__ */ O.jsxs(hH, { children: [
50853
50855
  /* @__PURE__ */ O.jsx(
50854
50856
  ve,
@@ -50866,7 +50868,7 @@ function fH({ security: t }) {
50866
50868
  /* @__PURE__ */ O.jsx("span", { children: "Something is wrong!" })
50867
50869
  ] })
50868
50870
  ] }),
50869
- /* @__PURE__ */ O.jsx(Ze, {}),
50871
+ /* @__PURE__ */ O.jsx(Le, {}),
50870
50872
  /* @__PURE__ */ O.jsxs(dt, { children: [
50871
50873
  /* @__PURE__ */ O.jsx(et, { children: "User Info URL" }),
50872
50874
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -50881,7 +50883,7 @@ function fH({ security: t }) {
50881
50883
  }
50882
50884
  )
50883
50885
  ] }),
50884
- /* @__PURE__ */ O.jsx(Ze, {}),
50886
+ /* @__PURE__ */ O.jsx(Le, {}),
50885
50887
  /* @__PURE__ */ O.jsx(iR, { security: t, securityType: K.OpenIDConnect })
50886
50888
  ] });
50887
50889
  }
@@ -50922,7 +50924,7 @@ function pH({ security: t }) {
50922
50924
  }
50923
50925
  )
50924
50926
  ] }),
50925
- /* @__PURE__ */ O.jsx(Ze, {}),
50927
+ /* @__PURE__ */ O.jsx(Le, {}),
50926
50928
  /* @__PURE__ */ O.jsxs(dt, { children: [
50927
50929
  /* @__PURE__ */ O.jsx(et, { children: "Password" }),
50928
50930
  /* @__PURE__ */ O.jsx(Qe, {}),
@@ -50938,7 +50940,7 @@ function pH({ security: t }) {
50938
50940
  }
50939
50941
  )
50940
50942
  ] }),
50941
- /* @__PURE__ */ O.jsx(Ze, {})
50943
+ /* @__PURE__ */ O.jsx(Le, {})
50942
50944
  ] });
50943
50945
  }
50944
50946
  const gH = {
@@ -50995,7 +50997,7 @@ function mH({ security: t, additionalActions: e }) {
50995
50997
  ] })
50996
50998
  ] })
50997
50999
  ] }),
50998
- /* @__PURE__ */ O.jsx(Ze, {}),
51000
+ /* @__PURE__ */ O.jsx(Le, {}),
50999
51001
  u && /* @__PURE__ */ O.jsx(u, { security: t })
51000
51002
  ] });
51001
51003
  }
@@ -51038,7 +51040,7 @@ function SH({
51038
51040
  securitySchemeVariants: t,
51039
51041
  selectedSecuritySchemeId: e
51040
51042
  }) {
51041
- const { sendEvent: n } = bt(), r = Le(() => t.get().map((s) => ({
51043
+ const { sendEvent: n } = bt(), r = We(() => t.get().map((s) => ({
51042
51044
  element: /* @__PURE__ */ O.jsx(yH, { schemes: s.schemes }),
51043
51045
  value: s.id,
51044
51046
  label: "Pick security schemes"
@@ -51101,7 +51103,7 @@ function PH() {
51101
51103
  request: {
51102
51104
  security: { selectedSecuritySchemeId: n, securities: r, securitySchemeVariants: i }
51103
51105
  }
51104
- } = e, s = i.get().length, o = Le(
51106
+ } = e, s = i.get().length, o = We(
51105
51107
  () => Ka(
51106
51108
  r,
51107
51109
  n.get()
@@ -51171,7 +51173,7 @@ function $H({
51171
51173
  n.current.click();
51172
51174
  }, s = He(() => {
51173
51175
  t(null);
51174
- }, [t]), o = Le(() => {
51176
+ }, [t]), o = We(() => {
51175
51177
  if (!e)
51176
51178
  return null;
51177
51179
  if (e.length === 1)
@@ -51837,11 +51839,11 @@ function aJ(t) {
51837
51839
  }
51838
51840
  }
51839
51841
  function lR({ dataTestId: t, ...e }) {
51840
- const n = De(), r = dn(), { stateExtensions: i } = e, s = Je(null), o = Le(
51842
+ const n = De(), r = dn(), { stateExtensions: i } = e, s = Je(null), o = We(
51841
51843
  () => i ? i.map((a) => Ti.highest(a({ selectedEnvironment: r, state: n }))) : [],
51842
51844
  [i, r, n]
51843
51845
  );
51844
- return We(() => {
51846
+ return Ze(() => {
51845
51847
  var l;
51846
51848
  const a = (l = s.current) == null ? void 0 : l.view;
51847
51849
  a && a.dispatch({
@@ -52006,22 +52008,22 @@ function mJ(t) {
52006
52008
  return t.replace(new RegExp(`"${Td}(.*?)${Td}"`, "g"), "$1");
52007
52009
  }
52008
52010
  function OJ() {
52009
- const { request: t, operation: e, isRequestEditable: n } = De(), r = dn(), { sendEvent: i } = bt(), { content: s, type: o, activeExampleName: a } = t.body, l = Le(
52011
+ const { request: t, operation: e, isRequestEditable: n } = De(), r = dn(), { sendEvent: i } = bt(), { content: s, type: o, activeExampleName: a } = t.body, l = We(
52010
52012
  () => {
52011
52013
  var S, b;
52012
52014
  return e ? Object.keys(((b = (S = e.get()) == null ? void 0 : S.body) == null ? void 0 : b.mediaTypes) || {}) : [];
52013
52015
  },
52014
52016
  [e]
52015
- ), c = hJ(e.get()), u = Le(
52017
+ ), c = hJ(e.get()), u = We(
52016
52018
  () => Ch(l, c),
52017
52019
  [c, l]
52018
- ), f = Le(
52020
+ ), f = We(
52019
52021
  () => {
52020
52022
  var S, b, w;
52021
52023
  return rR((w = (b = (S = e.get()) == null ? void 0 : S.body) == null ? void 0 : b.mediaTypes) == null ? void 0 : w[o.get()]);
52022
52024
  },
52023
52025
  [e, o]
52024
- ), d = Le(
52026
+ ), d = We(
52025
52027
  () => f.map(({ name: S, value: b }) => ({
52026
52028
  element: /* @__PURE__ */ O.jsx("div", { children: S }),
52027
52029
  value: b,
@@ -52050,10 +52052,10 @@ function OJ() {
52050
52052
  });
52051
52053
  },
52052
52054
  [o, l, i]
52053
- ), g = Le(() => {
52055
+ ), g = We(() => {
52054
52056
  var S;
52055
52057
  return [...((S = mc[o.value]) == null ? void 0 : S.extensions) || []];
52056
- }, [o]), x = Le(() => {
52058
+ }, [o]), x = We(() => {
52057
52059
  var S;
52058
52060
  return [...((S = mc[o.value]) == null ? void 0 : S.stateExtensions) || []];
52059
52061
  }, [o]), v = He(() => {
@@ -53953,11 +53955,11 @@ function De() {
53953
53955
  const tK = 8;
53954
53956
  function nK() {
53955
53957
  const { operation: t, requestActiveTabIdx: e } = De(), { sendEvent: n } = bt(), [r, i] = ge(to[e.get()]);
53956
- We(() => {
53958
+ Ze(() => {
53957
53959
  var a;
53958
53960
  const o = (a = t.get()) == null ? void 0 : a.body;
53959
53961
  e.set(o ? qJ : mR);
53960
- }, [t]), We(() => {
53962
+ }, [t]), Ze(() => {
53961
53963
  i(to[e.get()]);
53962
53964
  }, [e]);
53963
53965
  const s = (o) => {
@@ -54225,7 +54227,7 @@ const vx = $.div`
54225
54227
  return ((u = l == null ? void 0 : l.get()) == null ? void 0 : u.filter(
54226
54228
  (f) => f.value.name.trim() === a.trim() && f.value.state === xt.Normal
54227
54229
  )).length <= 0;
54228
- }, o = Le(() => {
54230
+ }, o = We(() => {
54229
54231
  const a = !i(n), l = e ? !s(n, e) : !1;
54230
54232
  return a || l;
54231
54233
  }, [e, n]);
@@ -54243,7 +54245,7 @@ function yx({
54243
54245
  icon: l
54244
54246
  }) {
54245
54247
  const { newName: c, setNewName: u, disabled: f } = xx(e, a), d = Je(null), h = c.trim();
54246
- We(() => {
54248
+ Ze(() => {
54247
54249
  var g;
54248
54250
  (g = d.current) == null || g.focus();
54249
54251
  }, [d]);
@@ -54309,7 +54311,7 @@ const wK = $.div`
54309
54311
  `;
54310
54312
  function Fc({ onSearch: t, value: e, className: n }) {
54311
54313
  const [r, i] = Lj(), s = Je(null), [o, a] = ge(!1);
54312
- We(() => {
54314
+ Ze(() => {
54313
54315
  a(e.length > 0);
54314
54316
  }, [e]);
54315
54317
  const l = () => {
@@ -54383,7 +54385,7 @@ function Ia(t, e) {
54383
54385
  return n;
54384
54386
  }
54385
54387
  function PK({ transaction: t, onClose: e }) {
54386
- const { collections: n } = De(), r = xK(), [i, s] = ge("New Collection"), [o, a] = ge(null), [l, c] = ge(""), u = Le(
54388
+ const { collections: n } = De(), r = xK(), [i, s] = ge("New Collection"), [o, a] = ge(null), [l, c] = ge(""), u = We(
54387
54389
  () => {
54388
54390
  var S;
54389
54391
  return (S = r.find((b) => b.folder.get().id === o)) == null ? void 0 : S.folder.items;
@@ -54393,7 +54395,7 @@ function PK({ transaction: t, onClose: e }) {
54393
54395
  newName: f,
54394
54396
  setNewName: d,
54395
54397
  disabled: h
54396
- } = xx("New Request", u), p = (r.length ? !o : !i.trim()) || h, m = Le(
54398
+ } = xx("New Request", u), p = (r.length ? !o : !i.trim()) || h, m = We(
54397
54399
  () => r.filter((S) => S.path.toLowerCase().includes(l.toLowerCase())),
54398
54400
  [l, r]
54399
54401
  ), g = (S) => {
@@ -54640,7 +54642,7 @@ function kR(t, e) {
54640
54642
  }
54641
54643
  function bx() {
54642
54644
  const { collections: t, transactionSource: e } = De();
54643
- return Le(() => {
54645
+ return We(() => {
54644
54646
  const r = e.get();
54645
54647
  if (r)
54646
54648
  return kR(r.id, t);
@@ -54792,28 +54794,28 @@ function YK() {
54792
54794
  transactionSource: v,
54793
54795
  showUnsavedChangesModal: y,
54794
54796
  disableCollectionsTab: S
54795
- } = t, { method: b, url: w, body: C, headers: k, cookies: P, queryParameters: A, security: E } = c, I = f.get(), R = Le(
54797
+ } = t, { method: b, url: w, body: C, headers: k, cookies: P, queryParameters: A, security: E } = c, I = f.get(), R = We(
54796
54798
  () => [I == null ? void 0 : I.method.toLocaleUpperCase()],
54797
54799
  [I == null ? void 0 : I.method]
54798
- ), B = vK(), D = Le(
54800
+ ), B = vK(), D = We(
54799
54801
  () => Ch(R, B),
54800
54802
  [B, R]
54801
54803
  ), F = [
54802
54804
  { label: "Edit", value: !0 },
54803
54805
  { label: "Preview", value: !1 }
54804
- ], V = Le(
54806
+ ], V = We(
54805
54807
  () => d.map((q) => ({
54806
54808
  label: /* @__PURE__ */ O.jsx("div", { children: q.get().name }),
54807
54809
  value: q.get().id
54808
54810
  })),
54809
54811
  [d]
54810
54812
  ), Z = He(() => d.find((q) => q.get().id === h.get()), [d, h]);
54811
- We(() => {
54813
+ Ze(() => {
54812
54814
  const q = Z();
54813
54815
  d.length && (!h.get() || !q) && h.set(d[0].get().id);
54814
- }, [d]), We(() => {
54816
+ }, [d]), Ze(() => {
54815
54817
  p.set(Oq(t.get()));
54816
- }, [b, w, C, k, P, A, E]), We(() => {
54818
+ }, [b, w, C, k, P, A, E]), Ze(() => {
54817
54819
  const q = m.get();
54818
54820
  q && vR.save(q, c.get());
54819
54821
  }, [c]);
@@ -55237,7 +55239,7 @@ function vee() {
55237
55239
  label: Mu[d].name,
55238
55240
  value: d
55239
55241
  }));
55240
- We(() => {
55242
+ Ze(() => {
55241
55243
  var h;
55242
55244
  const d = hee((h = t.get()) == null ? void 0 : h.headers);
55243
55245
  if (d) {
@@ -55266,7 +55268,7 @@ function vee() {
55266
55268
  ] }),
55267
55269
  /* @__PURE__ */ O.jsx(IR, { children: /* @__PURE__ */ O.jsx(po, { toasterPlacement: "left", data: a, onCopyClick: c }) })
55268
55270
  ] }),
55269
- /* @__PURE__ */ O.jsx(Ze, {}),
55271
+ /* @__PURE__ */ O.jsx(Le, {}),
55270
55272
  Pd[i] ? /* @__PURE__ */ O.jsx(
55271
55273
  lR,
55272
55274
  {
@@ -55308,10 +55310,10 @@ const xee = $.div`
55308
55310
  }
55309
55311
  `;
55310
55312
  function See() {
55311
- const { response: t } = De(), { sendEvent: e } = bt(), n = Le(() => {
55313
+ const { response: t } = De(), { sendEvent: e } = bt(), n = We(() => {
55312
55314
  var o;
55313
55315
  return ((o = t.get()) == null ? void 0 : o.headers) || [];
55314
- }, [t]), r = Le(
55316
+ }, [t]), r = We(
55315
55317
  () => n.map(([o, a]) => `${o}: ${a}`).join(`
55316
55318
  `),
55317
55319
  [n]
@@ -55527,13 +55529,13 @@ class Tl {
55527
55529
  }
55528
55530
  }
55529
55531
  function Mee(t) {
55530
- We(() => {
55532
+ Ze(() => {
55531
55533
  Tl.save(t.get());
55532
55534
  }, [t]);
55533
55535
  }
55534
55536
  function jR() {
55535
55537
  const { response: t, environments: e } = De(), n = t.get(), r = [50, 50], i = Je(null), [s, o] = ge(!0), a = G4();
55536
- Mee(e), We(() => {
55538
+ Mee(e), Ze(() => {
55537
55539
  var c, u;
55538
55540
  n && s && (((c = i.current) == null ? void 0 : c.getLayout()[1]) || 0) === 25 && ((u = i.current) == null || u.setLayout(r));
55539
55541
  }, [n, s]);
@@ -55998,7 +56000,7 @@ function $a({
55998
56000
  ...a
55999
56001
  }) {
56000
56002
  const [l, c] = ge(!1), u = Je(null);
56001
- We(() => {
56003
+ Ze(() => {
56002
56004
  o == null || o(l);
56003
56005
  }, [l, o]);
56004
56006
  const f = (p) => {
@@ -56046,15 +56048,15 @@ const Hee = $(Ds)`
56046
56048
  `;
56047
56049
  function ete() {
56048
56050
  var p, m;
56049
- const [t, e] = ge(""), { history: n, requestError: r, disableCollectionsTab: i } = De(), { sendEvent: s } = bt(), { updateTransaction: o } = Eh(), a = Le(
56051
+ const [t, e] = ge(""), { history: n, requestError: r, disableCollectionsTab: i } = De(), { sendEvent: s } = bt(), { updateTransaction: o } = Eh(), a = We(
56050
56052
  () => [...n.get()].sort((g, x) => x.date - g.date),
56051
56053
  [n]
56052
- ), l = Le(
56054
+ ), l = We(
56053
56055
  () => a.filter(
56054
56056
  (g) => g.request.url.toLowerCase().includes(t.toLowerCase()) || g.request.method.toLowerCase().includes(t.toLowerCase())
56055
56057
  ),
56056
56058
  [a, t]
56057
- ), c = Le(
56059
+ ), c = We(
56058
56060
  () => Yee(l, "date"),
56059
56061
  [l]
56060
56062
  ), u = (g) => {
@@ -56509,7 +56511,7 @@ const wte = $.div`
56509
56511
  margin-left: -23px;
56510
56512
  `;
56511
56513
  function Pte() {
56512
- const [t, e] = ge(""), { environments: n, selectedEnvironmentId: r } = De(), { sendEvent: i } = bt(), s = Le(
56514
+ const [t, e] = ge(""), { environments: n, selectedEnvironmentId: r } = De(), { sendEvent: i } = bt(), s = We(
56513
56515
  () => n.filter((l) => l.name.get().toLowerCase().includes(t.toLowerCase())),
56514
56516
  [t, n]
56515
56517
  ), o = () => {
@@ -56760,12 +56762,12 @@ function Wte() {
56760
56762
  const [t, e] = ge(""), { apps: n, apiId: r, appsLoadingState: i } = De(), { sendEvent: s } = bt(), o = () => {
56761
56763
  window.open("/apps", "_blank"), s("apps_request_access_clicked", {});
56762
56764
  };
56763
- We(() => ((i.get() === ui.Idle || i.get() === ui.Error) && (i.set(ui.Loading), io(`/api/api-keys/api-products/${r.get()}/access?expand=0`).then((c) => c.json().then((u) => {
56765
+ Ze(() => ((i.get() === ui.Idle || i.get() === ui.Error) && (i.set(ui.Loading), io(`/api/api-keys/api-products/${r.get()}/access?expand=0`).then((c) => c.json().then((u) => {
56764
56766
  c.ok ? (n.set(u.apps || []), i.set(ui.Success)) : i.set(ui.Error);
56765
56767
  }).catch(() => i.set(ui.Error)))), () => {
56766
56768
  n.set([]), i.set(ui.Idle);
56767
56769
  }), [r]);
56768
- const a = Le(
56770
+ const a = We(
56769
56771
  () => n.filter((c) => c.title.get().toLowerCase().includes(t.toLowerCase())),
56770
56772
  [t, n]
56771
56773
  ), l = (c) => {
@@ -58633,7 +58635,7 @@ async function ese(t, e) {
58633
58635
  }
58634
58636
  }
58635
58637
  function tse({ folder: t, level: e, siblingItems: n, expanded: r, onRemove: i }) {
58636
- const s = De(), { sendEvent: o } = bt(), a = Je(null), { state: l, name: c } = t.get(), [u, f] = ge(!1), d = Le(
58638
+ const s = De(), { sendEvent: o } = bt(), a = Je(null), { state: l, name: c } = t.get(), [u, f] = ge(!1), d = We(
58637
58639
  () => t.items.get().some((b) => b.value.state === xt.Draft),
58638
58640
  [t.items]
58639
58641
  ), h = () => {
@@ -58894,7 +58896,7 @@ function lse({
58894
58896
  siblingItems: a
58895
58897
  }) {
58896
58898
  const { newName: l, setNewName: c, disabled: u } = xx(t, a), f = Je(null), d = l.trim();
58897
- We(() => {
58899
+ Ze(() => {
58898
58900
  var m;
58899
58901
  (m = f.current) == null || m.focus();
58900
58902
  }, [f]);
@@ -59314,13 +59316,13 @@ const bse = $.div`
59314
59316
  gap: var(--spacing-xs);
59315
59317
  `;
59316
59318
  function kse() {
59317
- const [t, e] = ge(""), { collections: n } = De(), r = M0(), i = M0(), { sendEvent: s } = bt(), [o, a] = ge(null), l = Le(
59319
+ const [t, e] = ge(""), { collections: n } = De(), r = M0(), i = M0(), { sendEvent: s } = bt(), [o, a] = ge(null), l = We(
59318
59320
  () => n.get().some((m) => m.value.state === xt.Draft),
59319
59321
  [n]
59320
- ), c = Le(
59322
+ ), c = We(
59321
59323
  () => n.filter((m) => t ? m.get().value.name.toLowerCase().includes(t.toLowerCase()) : !0),
59322
59324
  [n, t]
59323
- ), u = Le(
59325
+ ), u = We(
59324
59326
  () => c.sort((m) => {
59325
59327
  const { value: g, type: x } = m.get();
59326
59328
  return x === fn.Folder ? g.state === xt.Draft ? -1 : 0 : 1;
@@ -59462,7 +59464,7 @@ function jj(t, e) {
59462
59464
  x5(() => {
59463
59465
  const n = t.get();
59464
59466
  e.set(n);
59465
- }), We(() => {
59467
+ }), Ze(() => {
59466
59468
  t.save(e.get());
59467
59469
  }, [t, e]);
59468
59470
  }
@@ -59483,7 +59485,7 @@ function Dse() {
59483
59485
  [i]
59484
59486
  ), l = () => {
59485
59487
  o(!s), i("side_panel_toggled", { expanded: !s });
59486
- }, c = Le(() => {
59488
+ }, c = We(() => {
59487
59489
  const u = [
59488
59490
  /* @__PURE__ */ O.jsx(Lu, { label: "History", onClick: () => a("History"), children: /* @__PURE__ */ O.jsx(ete, {}) }, "History")
59489
59491
  ];
@@ -59824,7 +59826,7 @@ function $x({ value: t, disableDraft: e, ...n }) {
59824
59826
  definitionUrl: h,
59825
59827
  disableCollectionsTab: p
59826
59828
  } = r;
59827
- return We(() => {
59829
+ return Ze(() => {
59828
59830
  const m = n.operationUrl && !e ? vR.getByKey(n.operationUrl) : null;
59829
59831
  if (t) {
59830
59832
  const g = _n(t), x = Hse(g, n.predefinedEnvValues), v = x.find(
@@ -59849,10 +59851,10 @@ function Soe({ onClose: t, onLoad: e, onRequestChange: n, ...r }) {
59849
59851
  }
59850
59852
  s("replay_closed", { operationName: (u = r.value) == null ? void 0 : u.name }), t(), o.set(Nc());
59851
59853
  }, [t, n, a, r.value, s, o]);
59852
- We(() => {
59854
+ Ze(() => {
59853
59855
  var u;
59854
59856
  e == null || e(), s("replay_opened", { operationName: (u = r.value) == null ? void 0 : u.name });
59855
- }, []), We(() => {
59857
+ }, []), Ze(() => {
59856
59858
  i.current && i.current.focus();
59857
59859
  }, []);
59858
59860
  const c = (u) => {
@@ -59894,7 +59896,7 @@ const toe = $(_j)`
59894
59896
  height: 14px;
59895
59897
  `;
59896
59898
  function woe(t) {
59897
- const { sendEvent: e } = bt(), n = Le(() => NO(Nc()), []);
59899
+ const { sendEvent: e } = bt(), n = We(() => NO(Nc()), []);
59898
59900
  return /* @__PURE__ */ O.jsx(eK, { value: n, children: /* @__PURE__ */ O.jsx(
59899
59901
  Dj,
59900
59902
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/replay",
3
- "version": "0.5.16",
3
+ "version": "0.5.17",
4
4
  "type": "module",
5
5
  "main": "./dist/replay.cjs",
6
6
  "module": "./dist/replay.js",