@redocly/replay 0.3.1 → 0.3.2
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 +58 -50
- package/dist/replay.js +122 -114
- package/package.json +1 -1
package/dist/replay.cjs
CHANGED
|
@@ -113,7 +113,7 @@ Example:
|
|
|
113
113
|
Perhaps you're looking to import 'styled-components/native'?
|
|
114
114
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
115
115
|
|
|
116
|
-
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const M=vp,{createElement:Ao,createContext:JT,createRef:CU,forwardRef:VS,useCallback:Bn,useContext:WS,useEffect:Ps,useImperativeHandle:zS,useLayoutEffect:KT,useMemo:eI,useRef:tr,useState:fu}=H,IO=H["useId".toString()],vf=JT(null);vf.displayName="PanelGroupContext";const Za=KT,tI=typeof IO=="function"?IO:()=>null;let nI=0;function Q0(n=null){const e=tI(),t=tr(n||e||null);return t.current===null&&(t.current=""+nI++),n??t.current}function XS({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:s,id:o,maxSize:a,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:d,style:h,tagName:p="div",...m}){const g=WS(vf);if(g===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:O,getPanelSize:x,getPanelStyle:S,groupId:y,isPanelCollapsed:w,reevaluatePanelConstraints:C,registerPanel:k,resizePanel:P,unregisterPanel:A}=g,E=Q0(o),I=tr({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:l},id:E,idIsFromProps:o!==void 0,order:d});tr({didLogMissingDefaultSizeWarning:!1}),Za(()=>{const{callbacks:j,constraints:$}=I.current,F={...$};I.current.id=E,I.current.idIsFromProps=o!==void 0,I.current.order=d,j.onCollapse=c,j.onExpand=u,j.onResize=f,$.collapsedSize=t,$.collapsible=r,$.defaultSize=i,$.maxSize=a,$.minSize=l,(F.collapsedSize!==$.collapsedSize||F.collapsible!==$.collapsible||F.maxSize!==$.maxSize||F.minSize!==$.minSize)&&C(I.current,F)}),Za(()=>{const j=I.current;return k(j),()=>{A(j)}},[d,E,k,A]),zS(s,()=>({collapse:()=>{v(I.current)},expand:()=>{O(I.current)},getId(){return E},getSize(){return x(I.current)},isCollapsed(){return w(I.current)},isExpanded(){return!w(I.current)},resize:j=>{P(I.current,j)}}),[v,O,x,w,E,P]);const R=S(I.current,i);return Ao(p,{...m,children:n,className:e,style:{...R,...h},"data-panel":"","data-panel-id":E,"data-panel-group-id":y,"data-panel-collapsible":void 0,"data-panel-size":void 0})}const xp=VS((n,e)=>Ao(XS,{...n,forwardedRef:e}));XS.displayName="Panel";xp.displayName="forwardRef(Panel)";function Be(n,e="Assertion failed!"){if(!n)throw console.error(e),Error(e)}const LS=10;function Va(n,e,t=LS){n=parseFloat(n.toFixed(t)),e=parseFloat(e.toFixed(t));const r=n-e;return r===0?0:r>0?1:-1}function Kn(n,e,t){return Va(n,e,t)===0}function so({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];Be(r!=null);let{collapsedSize:i=0,collapsible:s,maxSize:o=100,minSize:a=0}=r;if(Va(t,a)<0)if(s){const l=(i+a)/2;Va(t,l)<0?t=i:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(LS)),t}function xa({delta:n,layout:e,panelConstraints:t,pivotIndices:r,trigger:i}){if(Kn(n,0))return e;const s=[...e],[o,a]=r;Be(o!=null),Be(a!=null);let l=0;if(i==="keyboard"){{const u=n<0?a:o,f=t[u];if(Be(f),f.collapsible){const d=e[u];Be(d!=null);const h=t[u];Be(h);const{collapsedSize:p=0,minSize:m=0}=h;if(Kn(d,p)){const g=m-d;Va(g,Math.abs(n))>0&&(n=n<0?0-g:g)}}}{const u=n<0?o:a,f=t[u];Be(f);const{collapsible:d}=f;if(d){const h=e[u];Be(h!=null);const p=t[u];Be(p);const{collapsedSize:m=0,minSize:g=0}=p;if(Kn(h,g)){const v=h-m;Va(v,Math.abs(n))>0&&(n=n<0?0-v:v)}}}}{const u=n<0?1:-1;let f=n<0?a:o,d=0;for(;;){const p=e[f];Be(p!=null);const g=so({panelConstraints:t,panelIndex:f,size:100})-p;if(d+=g,f+=u,f<0||f>=t.length)break}const h=Math.min(Math.abs(n),Math.abs(d));n=n<0?0-h:h}{let f=n<0?o:a;for(;f>=0&&f<t.length;){const d=Math.abs(n)-Math.abs(l),h=e[f];Be(h!=null);const p=h-d,m=so({panelConstraints:t,panelIndex:f,size:p});if(!Kn(h,m)&&(l+=h-m,s[f]=m,l.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?f--:f++}}if(Kn(l,0))return e;{const u=n<0?a:o,f=e[u];Be(f!=null);const d=f+l,h=so({panelConstraints:t,panelIndex:u,size:d});if(s[u]=h,!Kn(h,d)){let p=d-h,g=n<0?a:o;for(;g>=0&&g<t.length;){const v=s[g];Be(v!=null);const O=v+p,x=so({panelConstraints:t,panelIndex:g,size:O});if(Kn(v,x)||(p-=x-v,s[g]=x),Kn(p,0))break;n>0?g--:g++}}}const c=s.reduce((u,f)=>f+u,0);return Kn(c,100)?s:e}function rI({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,s=0,o=0;const a=t[0];Be(a!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:m=0}=h;d===a?(r=m,i=p):(s+=m,o+=p)});const l=Math.min(i,100-s),c=Math.max(r,100-o),u=n[a];return{valueMax:l,valueMin:c,valueNow:u}}function Wa(n,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${n}"]`))}function GS(n,e,t=document){const i=Wa(n,t).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e);return i??null}function YS(n,e,t){const r=GS(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function US(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function xf(n,e=document){const t=e.querySelector(`[data-panel-resize-handle-id="${n}"]`);return t||null}function iI(n,e,t,r=document){var i,s,o,a;const l=xf(e,r),c=Wa(n,r),u=l?c.indexOf(l):-1,f=(i=(s=t[u])===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:null,d=(o=(a=t[u+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[f,d]}function sI({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:o}){tr({didWarnAboutMissingResizeHandle:!1}),Za(()=>{if(!s)return;const a=Wa(t,s);for(let l=0;l<i.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=rI({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),d=a[l];if(d!=null){const h=i[l];Be(h),d.setAttribute("aria-controls",h.id),d.setAttribute("aria-valuemax",""+Math.round(c)),d.setAttribute("aria-valuemin",""+Math.round(u)),d.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{a.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[t,r,i,s]),Ps(()=>{if(!s)return;const a=e.current;Be(a);const{panelDataArray:l}=a,c=US(t,s);Be(c!=null,`No group found for id "${t}"`);const u=Wa(t,s);Be(u);const f=u.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Be(h);const[p,m]=iI(t,h,l,s);if(p==null||m==null)return()=>{};const g=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const O=l.findIndex(x=>x.id===p);if(O>=0){const x=l[O];Be(x);const S=r[O],{collapsedSize:y=0,collapsible:w,minSize:C=0}=x.constraints;if(S!=null&&w){const k=xa({delta:Kn(S,y)?C-y:y-S,layout:r,panelConstraints:l.map(P=>P.constraints),pivotIndices:YS(t,h,s),trigger:"keyboard"});r!==k&&o(k)}}break}}};return d.addEventListener("keydown",g),()=>{d.removeEventListener("keydown",g)}});return()=>{f.forEach(d=>d())}},[s,n,e,t,r,i,o])}function $O(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function qS(n){return n.type==="keydown"}function HS(n){return n.type.startsWith("mouse")}function JS(n){return n.type.startsWith("touch")}function KS(n,e){const t=n==="horizontal";if(HS(e))return t?e.clientX:e.clientY;if(JS(e)){const r=e.touches[0];return Be(r),t?r.screenX:r.screenY}else throw Error(`Unsupported event type "${e.type}"`)}function oI(n,e,t,r,i){const s=t==="horizontal",o=xf(e,i);Be(o);const a=o.getAttribute("data-panel-group-id");Be(a);let{initialCursorPosition:l}=r;const c=KS(t,n),u=US(a,i);Be(u);const f=u.getBoundingClientRect(),d=s?f.width:f.height;return(c-l)/d*100}function aI(n,e,t,r,i,s){if(qS(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let l=0;switch(n.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:oI(n,e,t,r,s)}function lI({panelDataArray:n}){const e=Array(n.length),t=n.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<n.length;s++){const o=t[s];Be(o);const{defaultSize:a}=o;a!=null&&(r++,e[s]=a,i-=a)}for(let s=0;s<n.length;s++){const o=t[s];Be(o);const{defaultSize:a}=o;if(a!=null)continue;const l=n.length-r,c=i/l;r++,e[s]=c,i-=c}return e}function Ls(n,e,t){e.forEach((r,i)=>{const s=n[i];Be(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,f=t[l];if(f==null||r!==f){t[l]=r;const{onCollapse:d,onExpand:h,onResize:p}=o;p&&p(r,f),u&&(d||h)&&(h&&(f==null||f===c)&&r!==c&&h(),d&&(f==null||f!==c)&&r===c&&d())}})}function Hl(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function cI({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:s=3}){const o=t[i];let a;return o==null?a=n??"1":r.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}let bp=null,Ss=null;function ew(n){switch(n){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function uI(){Ss!==null&&(document.head.removeChild(Ss),bp=null,Ss=null)}function bd(n){if(bp===n)return;bp=n;const e=ew(n);Ss===null&&(Ss=document.createElement("style"),document.head.appendChild(Ss)),Ss.innerHTML=`*{cursor: ${e}!important;}`}function fI(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function RO(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function tw(n){return`react-resizable-panels:${n}`}function nw(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:s}=e;return i?r:s?`${s}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function rw(n,e){try{const t=tw(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function dI(n,e,t){var r,i;const s=(r=rw(n,t))!==null&&r!==void 0?r:{},o=nw(e);return(i=s[o])!==null&&i!==void 0?i:null}function hI(n,e,t,r,i){var s;const o=tw(n),a=nw(e),l=(s=rw(n,i))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(o,JSON.stringify(l))}catch(c){console.error(c)}}function DO({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((s,o)=>s+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(s=>`${s}%`).join(", ")}`);if(!Kn(r,100))for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=100/r*o;t[s]=a}let i=0;for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=so({panelConstraints:e,panelIndex:s,size:o});o!=a&&(i+=o-a,t[s]=a)}if(!Kn(i,0))for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=o+i,l=so({panelConstraints:e,panelIndex:s,size:a});if(o!==l&&(i-=l-o,t[s]=l,Kn(i,0)))break}return t}const pI=100,ba={getItem:n=>(RO(ba),ba.getItem(n)),setItem:(n,e)=>{RO(ba),ba.setItem(n,e)}},QO={};function iw({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:s=null,onLayout:o=null,keyboardResizeBy:a=null,storage:l=ba,style:c,tagName:u="div",...f}){const d=Q0(s),h=tr(null),[p,m]=fu(null),[g,v]=fu([]),O=tr({}),x=tr(new Map),S=tr(0),y=tr({autoSaveId:n,direction:r,dragState:p,id:d,keyboardResizeBy:a,onLayout:o,storage:l}),w=tr({layout:g,panelDataArray:[],panelDataArrayChanged:!1});tr({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),zS(i,()=>({getId:()=>y.current.id,getLayout:()=>{const{layout:D}=w.current;return D},setLayout:D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current,N=DO({layout:D,panelConstraints:q.map(ee=>ee.constraints)});$O(B,N)||(v(N),w.current.layout=N,_&&_(N),Ls(q,N,O.current))}}),[]),Za(()=>{y.current.autoSaveId=n,y.current.direction=r,y.current.dragState=p,y.current.id=d,y.current.onLayout=o,y.current.storage=l}),sI({committedValuesRef:y,eagerValuesRef:w,groupId:d,layout:g,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:h.current}),Ps(()=>{const{panelDataArray:D}=w.current;if(n){if(g.length===0||g.length!==D.length)return;let _=QO[n];_==null&&(_=fI(hI,pI),QO[n]=_);const B=[...D],q=new Map(x.current);_(n,B,q,g,l)}},[n,g,l]),Ps(()=>{});const C=Bn(D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current;if(D.constraints.collapsible){const N=q.map(oe=>oe.constraints),{collapsedSize:ee=0,panelSize:z,pivotIndices:le}=ps(q,D,B);if(Be(z!=null),z!==ee){x.current.set(D.id,z);const ae=no(q,D)===q.length-1?z-ee:ee-z,K=xa({delta:ae,layout:B,panelConstraints:N,pivotIndices:le,trigger:"imperative-api"});Hl(B,K)||(v(K),w.current.layout=K,_&&_(K),Ls(q,K,O.current))}}},[]),k=Bn(D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current;if(D.constraints.collapsible){const N=q.map(ae=>ae.constraints),{collapsedSize:ee=0,panelSize:z,minSize:le=0,pivotIndices:oe}=ps(q,D,B);if(z===ee){const ae=x.current.get(D.id),K=ae!=null&&ae>=le?ae:le,Y=no(q,D)===q.length-1?z-K:K-z,te=xa({delta:Y,layout:B,panelConstraints:N,pivotIndices:oe,trigger:"imperative-api"});Hl(B,te)||(v(te),w.current.layout=te,_&&_(te),Ls(q,te,O.current))}}},[]),P=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{panelSize:q}=ps(B,D,_);return Be(q!=null),q},[]),A=Bn((D,_)=>{const{panelDataArray:B}=w.current,q=no(B,D);return cI({defaultSize:_,dragState:p,layout:g,panelData:B,panelIndex:q})},[p,g]),E=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{collapsedSize:q=0,collapsible:N,panelSize:ee}=ps(B,D,_);return N===!0&&ee===q},[]),I=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{collapsedSize:q=0,collapsible:N,panelSize:ee}=ps(B,D,_);return Be(ee!=null),!N||ee>q},[]),R=Bn(D=>{const{panelDataArray:_}=w.current;_.push(D),_.sort((B,q)=>{const N=B.order,ee=q.order;return N==null&&ee==null?0:N==null?-1:ee==null?1:N-ee}),w.current.panelDataArrayChanged=!0},[]);Za(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:_,storage:B}=y.current,{layout:q,panelDataArray:N}=w.current;let ee=null;if(D){const le=dI(D,N,B);le&&(x.current=new Map(Object.entries(le.expandToSizes)),ee=le.layout)}ee==null&&(ee=lI({panelDataArray:N}));const z=DO({layout:ee,panelConstraints:N.map(le=>le.constraints)});$O(q,z)||(v(z),w.current.layout=z,_&&_(z),Ls(N,z,O.current))}});const j=Bn(D=>function(B){B.preventDefault();const q=h.current;if(!q)return()=>null;const{direction:N,dragState:ee,id:z,keyboardResizeBy:le,onLayout:oe}=y.current,{layout:ae,panelDataArray:K}=w.current,{initialLayout:he}=ee??{},Y=YS(z,D,q);let te=aI(B,D,N,ee,le,q);if(te===0)return;const me=N==="horizontal";document.dir==="rtl"&&me&&(te=-te);const xe=K.map(Pe=>Pe.constraints),$e=xa({delta:te,layout:he??ae,panelConstraints:xe,pivotIndices:Y,trigger:qS(B)?"keyboard":"mouse-or-touch"}),be=!Hl(ae,$e);(HS(B)||JS(B))&&S.current!=te&&(S.current=te,bd(be?me?"horizontal":"vertical":me?te<0?"horizontal-min":"horizontal-max":te<0?"vertical-min":"vertical-max")),be&&(v($e),w.current.layout=$e,oe&&oe($e),Ls(K,$e,O.current))},[]),$=Bn((D,_)=>{const{onLayout:B}=y.current,{layout:q,panelDataArray:N}=w.current,ee=N.map(he=>he.constraints),{panelSize:z,pivotIndices:le}=ps(N,D,q);Be(z!=null);const ae=no(N,D)===N.length-1?z-_:_-z,K=xa({delta:ae,layout:q,panelConstraints:ee,pivotIndices:le,trigger:"imperative-api"});Hl(q,K)||(v(K),w.current.layout=K,B&&B(K),Ls(N,K,O.current))},[]),F=Bn((D,_)=>{const{layout:B,panelDataArray:q}=w.current,{collapsedSize:N=0,collapsible:ee,defaultSize:z,maxSize:le=100,minSize:oe=0}=_,{collapsedSize:ae=0,collapsible:K,defaultSize:he,maxSize:Y=100,minSize:te=0}=D.constraints,{panelSize:me}=ps(q,D,B);Be(me!=null),ee&&K&&N!==ae&&me===N?$(D,ae):me<te?$(D,te):me>Y&&$(D,Y)},[$]),X=Bn((D,_)=>{const{direction:B}=y.current,{layout:q}=w.current;if(!h.current)return;const N=xf(D,h.current);Be(N);const ee=KS(B,_);m({dragHandleId:D,dragHandleRect:N.getBoundingClientRect(),initialCursorPosition:ee,initialLayout:q})},[]),V=Bn(()=>{uI(),m(null)},[]),U=Bn(D=>{const{panelDataArray:_}=w.current,B=no(_,D);B>=0&&(_.splice(B,1),delete O.current[D.id],w.current.panelDataArrayChanged=!0)},[]),L=eI(()=>({collapsePanel:C,direction:r,dragState:p,expandPanel:k,getPanelSize:P,getPanelStyle:A,groupId:d,isPanelCollapsed:E,isPanelExpanded:I,reevaluatePanelConstraints:F,registerPanel:R,registerResizeHandle:j,resizePanel:$,startDragging:X,stopDragging:V,unregisterPanel:U,panelGroupElement:h.current}),[C,p,r,k,P,A,d,E,I,F,R,j,$,X,V,U]),W={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Ao(vf.Provider,{value:L},Ao(u,{...f,children:e,className:t,style:{...W,...c},ref:h,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const sw=VS((n,e)=>Ao(iw,{...n,forwardedRef:e}));iw.displayName="PanelGroup";sw.displayName="forwardRef(PanelGroup)";function no(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function ps(n,e,t){const r=no(n,e),s=r===n.length-1?[r-1,r]:[r,r+1],o=t[r];return{...e.constraints,panelSize:o,pivotIndices:s}}function gI({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){Ps(()=>{if(n||t==null||r==null)return;const i=xf(e,r);if(i==null)return;const s=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=i.getAttribute("data-panel-group-id");Be(a);const l=Wa(a,r),c=GS(a,e,r);Be(c!==null);const u=o.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,n,e,t])}function ow({children:n=null,className:e="",disabled:t=!1,id:r,onDragging:i,style:s={},tabIndex:o=0,tagName:a="div",...l}){const c=tr(null),u=tr({onDragging:i});Ps(()=>{u.current.onDragging=i});const f=WS(vf);if(f===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:d,dragState:h,groupId:p,registerResizeHandle:m,startDragging:g,stopDragging:v,panelGroupElement:O}=f,x=Q0(r),S=(h==null?void 0:h.dragHandleId)===x,[y,w]=fu(!1),[C,k]=fu(null),P=Bn(()=>{const E=c.current;Be(E),E.blur(),v();const{onDragging:I}=u.current;I&&I(!1)},[v]);Ps(()=>{if(t)k(null);else{const E=m(x);k(()=>E)}},[t,x,m]),Ps(()=>{if(t||C==null||!S)return;const E=$=>{C($)},I=$=>{C($)},R=c.current;Be(R);const j=R.ownerDocument;return j.body.addEventListener("contextmenu",P),j.body.addEventListener("mousemove",E),j.body.addEventListener("touchmove",E),j.body.addEventListener("mouseleave",I),window.addEventListener("mouseup",P),window.addEventListener("touchend",P),()=>{j.body.removeEventListener("contextmenu",P),j.body.removeEventListener("mousemove",E),j.body.removeEventListener("touchmove",E),j.body.removeEventListener("mouseleave",I),window.removeEventListener("mouseup",P),window.removeEventListener("touchend",P)}},[d,t,S,C,P]),gI({disabled:t,handleId:x,resizeHandler:C,panelGroupElement:O});const A={cursor:ew(d),touchAction:"none",userSelect:"none"};return Ao(a,{...l,children:n,className:e,onBlur:()=>w(!1),onFocus:()=>w(!0),onMouseDown:E=>{g(x,E.nativeEvent);const I=u.current;Be(I);const{onDragging:R}=I;R&&R(!0)},onMouseUp:P,onTouchCancel:P,onTouchEnd:P,onTouchStart:E=>{g(x,E.nativeEvent);const I=u.current;Be(I);const{onDragging:R}=I;R&&R(!0)},ref:c,role:"separator",style:{...A,...s},tabIndex:o,"data-panel-group-direction":d,"data-panel-group-id":p,"data-resize-handle":"","data-resize-handle-active":S?"pointer":y?"keyboard":void 0,"data-panel-resize-handle-enabled":!t,"data-panel-resize-handle-id":x})}ow.displayName="PanelResizeHandle";const Ze=M.div`
|
|
116
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const M=vp,{createElement:Ao,createContext:JT,createRef:kU,forwardRef:VS,useCallback:Bn,useContext:WS,useEffect:Ps,useImperativeHandle:zS,useLayoutEffect:KT,useMemo:eI,useRef:tr,useState:fu}=H,IO=H["useId".toString()],vf=JT(null);vf.displayName="PanelGroupContext";const Za=KT,tI=typeof IO=="function"?IO:()=>null;let nI=0;function Q0(n=null){const e=tI(),t=tr(n||e||null);return t.current===null&&(t.current=""+nI++),n??t.current}function XS({children:n,className:e="",collapsedSize:t,collapsible:r,defaultSize:i,forwardedRef:s,id:o,maxSize:a,minSize:l,onCollapse:c,onExpand:u,onResize:f,order:d,style:h,tagName:p="div",...m}){const g=WS(vf);if(g===null)throw Error("Panel components must be rendered within a PanelGroup container");const{collapsePanel:v,expandPanel:O,getPanelSize:x,getPanelStyle:S,groupId:y,isPanelCollapsed:w,reevaluatePanelConstraints:C,registerPanel:k,resizePanel:P,unregisterPanel:A}=g,E=Q0(o),I=tr({callbacks:{onCollapse:c,onExpand:u,onResize:f},constraints:{collapsedSize:t,collapsible:r,defaultSize:i,maxSize:a,minSize:l},id:E,idIsFromProps:o!==void 0,order:d});tr({didLogMissingDefaultSizeWarning:!1}),Za(()=>{const{callbacks:j,constraints:$}=I.current,F={...$};I.current.id=E,I.current.idIsFromProps=o!==void 0,I.current.order=d,j.onCollapse=c,j.onExpand=u,j.onResize=f,$.collapsedSize=t,$.collapsible=r,$.defaultSize=i,$.maxSize=a,$.minSize=l,(F.collapsedSize!==$.collapsedSize||F.collapsible!==$.collapsible||F.maxSize!==$.maxSize||F.minSize!==$.minSize)&&C(I.current,F)}),Za(()=>{const j=I.current;return k(j),()=>{A(j)}},[d,E,k,A]),zS(s,()=>({collapse:()=>{v(I.current)},expand:()=>{O(I.current)},getId(){return E},getSize(){return x(I.current)},isCollapsed(){return w(I.current)},isExpanded(){return!w(I.current)},resize:j=>{P(I.current,j)}}),[v,O,x,w,E,P]);const R=S(I.current,i);return Ao(p,{...m,children:n,className:e,style:{...R,...h},"data-panel":"","data-panel-id":E,"data-panel-group-id":y,"data-panel-collapsible":void 0,"data-panel-size":void 0})}const xp=VS((n,e)=>Ao(XS,{...n,forwardedRef:e}));XS.displayName="Panel";xp.displayName="forwardRef(Panel)";function Be(n,e="Assertion failed!"){if(!n)throw console.error(e),Error(e)}const LS=10;function Va(n,e,t=LS){n=parseFloat(n.toFixed(t)),e=parseFloat(e.toFixed(t));const r=n-e;return r===0?0:r>0?1:-1}function Kn(n,e,t){return Va(n,e,t)===0}function so({panelConstraints:n,panelIndex:e,size:t}){const r=n[e];Be(r!=null);let{collapsedSize:i=0,collapsible:s,maxSize:o=100,minSize:a=0}=r;if(Va(t,a)<0)if(s){const l=(i+a)/2;Va(t,l)<0?t=i:t=a}else t=a;return t=Math.min(o,t),t=parseFloat(t.toFixed(LS)),t}function xa({delta:n,layout:e,panelConstraints:t,pivotIndices:r,trigger:i}){if(Kn(n,0))return e;const s=[...e],[o,a]=r;Be(o!=null),Be(a!=null);let l=0;if(i==="keyboard"){{const u=n<0?a:o,f=t[u];if(Be(f),f.collapsible){const d=e[u];Be(d!=null);const h=t[u];Be(h);const{collapsedSize:p=0,minSize:m=0}=h;if(Kn(d,p)){const g=m-d;Va(g,Math.abs(n))>0&&(n=n<0?0-g:g)}}}{const u=n<0?o:a,f=t[u];Be(f);const{collapsible:d}=f;if(d){const h=e[u];Be(h!=null);const p=t[u];Be(p);const{collapsedSize:m=0,minSize:g=0}=p;if(Kn(h,g)){const v=h-m;Va(v,Math.abs(n))>0&&(n=n<0?0-v:v)}}}}{const u=n<0?1:-1;let f=n<0?a:o,d=0;for(;;){const p=e[f];Be(p!=null);const g=so({panelConstraints:t,panelIndex:f,size:100})-p;if(d+=g,f+=u,f<0||f>=t.length)break}const h=Math.min(Math.abs(n),Math.abs(d));n=n<0?0-h:h}{let f=n<0?o:a;for(;f>=0&&f<t.length;){const d=Math.abs(n)-Math.abs(l),h=e[f];Be(h!=null);const p=h-d,m=so({panelConstraints:t,panelIndex:f,size:p});if(!Kn(h,m)&&(l+=h-m,s[f]=m,l.toPrecision(3).localeCompare(Math.abs(n).toPrecision(3),void 0,{numeric:!0})>=0))break;n<0?f--:f++}}if(Kn(l,0))return e;{const u=n<0?a:o,f=e[u];Be(f!=null);const d=f+l,h=so({panelConstraints:t,panelIndex:u,size:d});if(s[u]=h,!Kn(h,d)){let p=d-h,g=n<0?a:o;for(;g>=0&&g<t.length;){const v=s[g];Be(v!=null);const O=v+p,x=so({panelConstraints:t,panelIndex:g,size:O});if(Kn(v,x)||(p-=x-v,s[g]=x),Kn(p,0))break;n>0?g--:g++}}}const c=s.reduce((u,f)=>f+u,0);return Kn(c,100)?s:e}function rI({layout:n,panelsArray:e,pivotIndices:t}){let r=0,i=100,s=0,o=0;const a=t[0];Be(a!=null),e.forEach((f,d)=>{const{constraints:h}=f,{maxSize:p=100,minSize:m=0}=h;d===a?(r=m,i=p):(s+=m,o+=p)});const l=Math.min(i,100-s),c=Math.max(r,100-o),u=n[a];return{valueMax:l,valueMin:c,valueNow:u}}function Wa(n,e=document){return Array.from(e.querySelectorAll(`[data-panel-resize-handle-id][data-panel-group-id="${n}"]`))}function GS(n,e,t=document){const i=Wa(n,t).findIndex(s=>s.getAttribute("data-panel-resize-handle-id")===e);return i??null}function YS(n,e,t){const r=GS(n,e,t);return r!=null?[r,r+1]:[-1,-1]}function US(n,e=document){var t;if(e instanceof HTMLElement&&(e==null||(t=e.dataset)===null||t===void 0?void 0:t.panelGroupId)==n)return e;const r=e.querySelector(`[data-panel-group][data-panel-group-id="${n}"]`);return r||null}function xf(n,e=document){const t=e.querySelector(`[data-panel-resize-handle-id="${n}"]`);return t||null}function iI(n,e,t,r=document){var i,s,o,a;const l=xf(e,r),c=Wa(n,r),u=l?c.indexOf(l):-1,f=(i=(s=t[u])===null||s===void 0?void 0:s.id)!==null&&i!==void 0?i:null,d=(o=(a=t[u+1])===null||a===void 0?void 0:a.id)!==null&&o!==void 0?o:null;return[f,d]}function sI({committedValuesRef:n,eagerValuesRef:e,groupId:t,layout:r,panelDataArray:i,panelGroupElement:s,setLayout:o}){tr({didWarnAboutMissingResizeHandle:!1}),Za(()=>{if(!s)return;const a=Wa(t,s);for(let l=0;l<i.length-1;l++){const{valueMax:c,valueMin:u,valueNow:f}=rI({layout:r,panelsArray:i,pivotIndices:[l,l+1]}),d=a[l];if(d!=null){const h=i[l];Be(h),d.setAttribute("aria-controls",h.id),d.setAttribute("aria-valuemax",""+Math.round(c)),d.setAttribute("aria-valuemin",""+Math.round(u)),d.setAttribute("aria-valuenow",f!=null?""+Math.round(f):"")}}return()=>{a.forEach((l,c)=>{l.removeAttribute("aria-controls"),l.removeAttribute("aria-valuemax"),l.removeAttribute("aria-valuemin"),l.removeAttribute("aria-valuenow")})}},[t,r,i,s]),Ps(()=>{if(!s)return;const a=e.current;Be(a);const{panelDataArray:l}=a,c=US(t,s);Be(c!=null,`No group found for id "${t}"`);const u=Wa(t,s);Be(u);const f=u.map(d=>{const h=d.getAttribute("data-panel-resize-handle-id");Be(h);const[p,m]=iI(t,h,l,s);if(p==null||m==null)return()=>{};const g=v=>{if(!v.defaultPrevented)switch(v.key){case"Enter":{v.preventDefault();const O=l.findIndex(x=>x.id===p);if(O>=0){const x=l[O];Be(x);const S=r[O],{collapsedSize:y=0,collapsible:w,minSize:C=0}=x.constraints;if(S!=null&&w){const k=xa({delta:Kn(S,y)?C-y:y-S,layout:r,panelConstraints:l.map(P=>P.constraints),pivotIndices:YS(t,h,s),trigger:"keyboard"});r!==k&&o(k)}}break}}};return d.addEventListener("keydown",g),()=>{d.removeEventListener("keydown",g)}});return()=>{f.forEach(d=>d())}},[s,n,e,t,r,i,o])}function $O(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!==e[t])return!1;return!0}function qS(n){return n.type==="keydown"}function HS(n){return n.type.startsWith("mouse")}function JS(n){return n.type.startsWith("touch")}function KS(n,e){const t=n==="horizontal";if(HS(e))return t?e.clientX:e.clientY;if(JS(e)){const r=e.touches[0];return Be(r),t?r.screenX:r.screenY}else throw Error(`Unsupported event type "${e.type}"`)}function oI(n,e,t,r,i){const s=t==="horizontal",o=xf(e,i);Be(o);const a=o.getAttribute("data-panel-group-id");Be(a);let{initialCursorPosition:l}=r;const c=KS(t,n),u=US(a,i);Be(u);const f=u.getBoundingClientRect(),d=s?f.width:f.height;return(c-l)/d*100}function aI(n,e,t,r,i,s){if(qS(n)){const o=t==="horizontal";let a=0;n.shiftKey?a=100:i!=null?a=i:a=10;let l=0;switch(n.key){case"ArrowDown":l=o?0:a;break;case"ArrowLeft":l=o?-a:0;break;case"ArrowRight":l=o?a:0;break;case"ArrowUp":l=o?0:-a;break;case"End":l=100;break;case"Home":l=-100;break}return l}else return r==null?0:oI(n,e,t,r,s)}function lI({panelDataArray:n}){const e=Array(n.length),t=n.map(s=>s.constraints);let r=0,i=100;for(let s=0;s<n.length;s++){const o=t[s];Be(o);const{defaultSize:a}=o;a!=null&&(r++,e[s]=a,i-=a)}for(let s=0;s<n.length;s++){const o=t[s];Be(o);const{defaultSize:a}=o;if(a!=null)continue;const l=n.length-r,c=i/l;r++,e[s]=c,i-=c}return e}function Ls(n,e,t){e.forEach((r,i)=>{const s=n[i];Be(s);const{callbacks:o,constraints:a,id:l}=s,{collapsedSize:c=0,collapsible:u}=a,f=t[l];if(f==null||r!==f){t[l]=r;const{onCollapse:d,onExpand:h,onResize:p}=o;p&&p(r,f),u&&(d||h)&&(h&&(f==null||f===c)&&r!==c&&h(),d&&(f==null||f!==c)&&r===c&&d())}})}function Hl(n,e){if(n.length!==e.length)return!1;for(let t=0;t<n.length;t++)if(n[t]!=e[t])return!1;return!0}function cI({defaultSize:n,dragState:e,layout:t,panelData:r,panelIndex:i,precision:s=3}){const o=t[i];let a;return o==null?a=n??"1":r.length===1?a="1":a=o.toPrecision(s),{flexBasis:0,flexGrow:a,flexShrink:1,overflow:"hidden",pointerEvents:e!==null?"none":void 0}}let bp=null,Ss=null;function ew(n){switch(n){case"horizontal":return"ew-resize";case"horizontal-max":return"w-resize";case"horizontal-min":return"e-resize";case"vertical":return"ns-resize";case"vertical-max":return"n-resize";case"vertical-min":return"s-resize"}}function uI(){Ss!==null&&(document.head.removeChild(Ss),bp=null,Ss=null)}function bd(n){if(bp===n)return;bp=n;const e=ew(n);Ss===null&&(Ss=document.createElement("style"),document.head.appendChild(Ss)),Ss.innerHTML=`*{cursor: ${e}!important;}`}function fI(n,e=10){let t=null;return(...i)=>{t!==null&&clearTimeout(t),t=setTimeout(()=>{n(...i)},e)}}function RO(n){try{if(typeof localStorage<"u")n.getItem=e=>localStorage.getItem(e),n.setItem=(e,t)=>{localStorage.setItem(e,t)};else throw new Error("localStorage not supported in this environment")}catch(e){console.error(e),n.getItem=()=>null,n.setItem=()=>{}}}function tw(n){return`react-resizable-panels:${n}`}function nw(n){return n.map(e=>{const{constraints:t,id:r,idIsFromProps:i,order:s}=e;return i?r:s?`${s}:${JSON.stringify(t)}`:JSON.stringify(t)}).sort((e,t)=>e.localeCompare(t)).join(",")}function rw(n,e){try{const t=tw(n),r=e.getItem(t);if(r){const i=JSON.parse(r);if(typeof i=="object"&&i!=null)return i}}catch{}return null}function dI(n,e,t){var r,i;const s=(r=rw(n,t))!==null&&r!==void 0?r:{},o=nw(e);return(i=s[o])!==null&&i!==void 0?i:null}function hI(n,e,t,r,i){var s;const o=tw(n),a=nw(e),l=(s=rw(n,i))!==null&&s!==void 0?s:{};l[a]={expandToSizes:Object.fromEntries(t.entries()),layout:r};try{i.setItem(o,JSON.stringify(l))}catch(c){console.error(c)}}function DO({layout:n,panelConstraints:e}){const t=[...n],r=t.reduce((s,o)=>s+o,0);if(t.length!==e.length)throw Error(`Invalid ${e.length} panel layout: ${t.map(s=>`${s}%`).join(", ")}`);if(!Kn(r,100))for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=100/r*o;t[s]=a}let i=0;for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=so({panelConstraints:e,panelIndex:s,size:o});o!=a&&(i+=o-a,t[s]=a)}if(!Kn(i,0))for(let s=0;s<e.length;s++){const o=t[s];Be(o!=null);const a=o+i,l=so({panelConstraints:e,panelIndex:s,size:a});if(o!==l&&(i-=l-o,t[s]=l,Kn(i,0)))break}return t}const pI=100,ba={getItem:n=>(RO(ba),ba.getItem(n)),setItem:(n,e)=>{RO(ba),ba.setItem(n,e)}},QO={};function iw({autoSaveId:n=null,children:e,className:t="",direction:r,forwardedRef:i,id:s=null,onLayout:o=null,keyboardResizeBy:a=null,storage:l=ba,style:c,tagName:u="div",...f}){const d=Q0(s),h=tr(null),[p,m]=fu(null),[g,v]=fu([]),O=tr({}),x=tr(new Map),S=tr(0),y=tr({autoSaveId:n,direction:r,dragState:p,id:d,keyboardResizeBy:a,onLayout:o,storage:l}),w=tr({layout:g,panelDataArray:[],panelDataArrayChanged:!1});tr({didLogIdAndOrderWarning:!1,didLogPanelConstraintsWarning:!1,prevPanelIds:[]}),zS(i,()=>({getId:()=>y.current.id,getLayout:()=>{const{layout:D}=w.current;return D},setLayout:D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current,N=DO({layout:D,panelConstraints:q.map(ee=>ee.constraints)});$O(B,N)||(v(N),w.current.layout=N,_&&_(N),Ls(q,N,O.current))}}),[]),Za(()=>{y.current.autoSaveId=n,y.current.direction=r,y.current.dragState=p,y.current.id=d,y.current.onLayout=o,y.current.storage=l}),sI({committedValuesRef:y,eagerValuesRef:w,groupId:d,layout:g,panelDataArray:w.current.panelDataArray,setLayout:v,panelGroupElement:h.current}),Ps(()=>{const{panelDataArray:D}=w.current;if(n){if(g.length===0||g.length!==D.length)return;let _=QO[n];_==null&&(_=fI(hI,pI),QO[n]=_);const B=[...D],q=new Map(x.current);_(n,B,q,g,l)}},[n,g,l]),Ps(()=>{});const C=Bn(D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current;if(D.constraints.collapsible){const N=q.map(oe=>oe.constraints),{collapsedSize:ee=0,panelSize:z,pivotIndices:le}=ps(q,D,B);if(Be(z!=null),z!==ee){x.current.set(D.id,z);const ae=no(q,D)===q.length-1?z-ee:ee-z,K=xa({delta:ae,layout:B,panelConstraints:N,pivotIndices:le,trigger:"imperative-api"});Hl(B,K)||(v(K),w.current.layout=K,_&&_(K),Ls(q,K,O.current))}}},[]),k=Bn(D=>{const{onLayout:_}=y.current,{layout:B,panelDataArray:q}=w.current;if(D.constraints.collapsible){const N=q.map(ae=>ae.constraints),{collapsedSize:ee=0,panelSize:z,minSize:le=0,pivotIndices:oe}=ps(q,D,B);if(z===ee){const ae=x.current.get(D.id),K=ae!=null&&ae>=le?ae:le,Y=no(q,D)===q.length-1?z-K:K-z,te=xa({delta:Y,layout:B,panelConstraints:N,pivotIndices:oe,trigger:"imperative-api"});Hl(B,te)||(v(te),w.current.layout=te,_&&_(te),Ls(q,te,O.current))}}},[]),P=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{panelSize:q}=ps(B,D,_);return Be(q!=null),q},[]),A=Bn((D,_)=>{const{panelDataArray:B}=w.current,q=no(B,D);return cI({defaultSize:_,dragState:p,layout:g,panelData:B,panelIndex:q})},[p,g]),E=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{collapsedSize:q=0,collapsible:N,panelSize:ee}=ps(B,D,_);return N===!0&&ee===q},[]),I=Bn(D=>{const{layout:_,panelDataArray:B}=w.current,{collapsedSize:q=0,collapsible:N,panelSize:ee}=ps(B,D,_);return Be(ee!=null),!N||ee>q},[]),R=Bn(D=>{const{panelDataArray:_}=w.current;_.push(D),_.sort((B,q)=>{const N=B.order,ee=q.order;return N==null&&ee==null?0:N==null?-1:ee==null?1:N-ee}),w.current.panelDataArrayChanged=!0},[]);Za(()=>{if(w.current.panelDataArrayChanged){w.current.panelDataArrayChanged=!1;const{autoSaveId:D,onLayout:_,storage:B}=y.current,{layout:q,panelDataArray:N}=w.current;let ee=null;if(D){const le=dI(D,N,B);le&&(x.current=new Map(Object.entries(le.expandToSizes)),ee=le.layout)}ee==null&&(ee=lI({panelDataArray:N}));const z=DO({layout:ee,panelConstraints:N.map(le=>le.constraints)});$O(q,z)||(v(z),w.current.layout=z,_&&_(z),Ls(N,z,O.current))}});const j=Bn(D=>function(B){B.preventDefault();const q=h.current;if(!q)return()=>null;const{direction:N,dragState:ee,id:z,keyboardResizeBy:le,onLayout:oe}=y.current,{layout:ae,panelDataArray:K}=w.current,{initialLayout:he}=ee??{},Y=YS(z,D,q);let te=aI(B,D,N,ee,le,q);if(te===0)return;const me=N==="horizontal";document.dir==="rtl"&&me&&(te=-te);const xe=K.map(Pe=>Pe.constraints),$e=xa({delta:te,layout:he??ae,panelConstraints:xe,pivotIndices:Y,trigger:qS(B)?"keyboard":"mouse-or-touch"}),be=!Hl(ae,$e);(HS(B)||JS(B))&&S.current!=te&&(S.current=te,bd(be?me?"horizontal":"vertical":me?te<0?"horizontal-min":"horizontal-max":te<0?"vertical-min":"vertical-max")),be&&(v($e),w.current.layout=$e,oe&&oe($e),Ls(K,$e,O.current))},[]),$=Bn((D,_)=>{const{onLayout:B}=y.current,{layout:q,panelDataArray:N}=w.current,ee=N.map(he=>he.constraints),{panelSize:z,pivotIndices:le}=ps(N,D,q);Be(z!=null);const ae=no(N,D)===N.length-1?z-_:_-z,K=xa({delta:ae,layout:q,panelConstraints:ee,pivotIndices:le,trigger:"imperative-api"});Hl(q,K)||(v(K),w.current.layout=K,B&&B(K),Ls(N,K,O.current))},[]),F=Bn((D,_)=>{const{layout:B,panelDataArray:q}=w.current,{collapsedSize:N=0,collapsible:ee,defaultSize:z,maxSize:le=100,minSize:oe=0}=_,{collapsedSize:ae=0,collapsible:K,defaultSize:he,maxSize:Y=100,minSize:te=0}=D.constraints,{panelSize:me}=ps(q,D,B);Be(me!=null),ee&&K&&N!==ae&&me===N?$(D,ae):me<te?$(D,te):me>Y&&$(D,Y)},[$]),X=Bn((D,_)=>{const{direction:B}=y.current,{layout:q}=w.current;if(!h.current)return;const N=xf(D,h.current);Be(N);const ee=KS(B,_);m({dragHandleId:D,dragHandleRect:N.getBoundingClientRect(),initialCursorPosition:ee,initialLayout:q})},[]),V=Bn(()=>{uI(),m(null)},[]),U=Bn(D=>{const{panelDataArray:_}=w.current,B=no(_,D);B>=0&&(_.splice(B,1),delete O.current[D.id],w.current.panelDataArrayChanged=!0)},[]),L=eI(()=>({collapsePanel:C,direction:r,dragState:p,expandPanel:k,getPanelSize:P,getPanelStyle:A,groupId:d,isPanelCollapsed:E,isPanelExpanded:I,reevaluatePanelConstraints:F,registerPanel:R,registerResizeHandle:j,resizePanel:$,startDragging:X,stopDragging:V,unregisterPanel:U,panelGroupElement:h.current}),[C,p,r,k,P,A,d,E,I,F,R,j,$,X,V,U]),W={display:"flex",flexDirection:r==="horizontal"?"row":"column",height:"100%",overflow:"hidden",width:"100%"};return Ao(vf.Provider,{value:L},Ao(u,{...f,children:e,className:t,style:{...W,...c},ref:h,"data-panel-group":"","data-panel-group-direction":r,"data-panel-group-id":d}))}const sw=VS((n,e)=>Ao(iw,{...n,forwardedRef:e}));iw.displayName="PanelGroup";sw.displayName="forwardRef(PanelGroup)";function no(n,e){return n.findIndex(t=>t===e||t.id===e.id)}function ps(n,e,t){const r=no(n,e),s=r===n.length-1?[r-1,r]:[r,r+1],o=t[r];return{...e.constraints,panelSize:o,pivotIndices:s}}function gI({disabled:n,handleId:e,resizeHandler:t,panelGroupElement:r}){Ps(()=>{if(n||t==null||r==null)return;const i=xf(e,r);if(i==null)return;const s=o=>{if(!o.defaultPrevented)switch(o.key){case"ArrowDown":case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"End":case"Home":{o.preventDefault(),t(o);break}case"F6":{o.preventDefault();const a=i.getAttribute("data-panel-group-id");Be(a);const l=Wa(a,r),c=GS(a,e,r);Be(c!==null);const u=o.shiftKey?c>0?c-1:l.length-1:c+1<l.length?c+1:0;l[u].focus();break}}};return i.addEventListener("keydown",s),()=>{i.removeEventListener("keydown",s)}},[r,n,e,t])}function ow({children:n=null,className:e="",disabled:t=!1,id:r,onDragging:i,style:s={},tabIndex:o=0,tagName:a="div",...l}){const c=tr(null),u=tr({onDragging:i});Ps(()=>{u.current.onDragging=i});const f=WS(vf);if(f===null)throw Error("PanelResizeHandle components must be rendered within a PanelGroup container");const{direction:d,dragState:h,groupId:p,registerResizeHandle:m,startDragging:g,stopDragging:v,panelGroupElement:O}=f,x=Q0(r),S=(h==null?void 0:h.dragHandleId)===x,[y,w]=fu(!1),[C,k]=fu(null),P=Bn(()=>{const E=c.current;Be(E),E.blur(),v();const{onDragging:I}=u.current;I&&I(!1)},[v]);Ps(()=>{if(t)k(null);else{const E=m(x);k(()=>E)}},[t,x,m]),Ps(()=>{if(t||C==null||!S)return;const E=$=>{C($)},I=$=>{C($)},R=c.current;Be(R);const j=R.ownerDocument;return j.body.addEventListener("contextmenu",P),j.body.addEventListener("mousemove",E),j.body.addEventListener("touchmove",E),j.body.addEventListener("mouseleave",I),window.addEventListener("mouseup",P),window.addEventListener("touchend",P),()=>{j.body.removeEventListener("contextmenu",P),j.body.removeEventListener("mousemove",E),j.body.removeEventListener("touchmove",E),j.body.removeEventListener("mouseleave",I),window.removeEventListener("mouseup",P),window.removeEventListener("touchend",P)}},[d,t,S,C,P]),gI({disabled:t,handleId:x,resizeHandler:C,panelGroupElement:O});const A={cursor:ew(d),touchAction:"none",userSelect:"none"};return Ao(a,{...l,children:n,className:e,onBlur:()=>w(!1),onFocus:()=>w(!0),onMouseDown:E=>{g(x,E.nativeEvent);const I=u.current;Be(I);const{onDragging:R}=I;R&&R(!0)},onMouseUp:P,onTouchCancel:P,onTouchEnd:P,onTouchStart:E=>{g(x,E.nativeEvent);const I=u.current;Be(I);const{onDragging:R}=I;R&&R(!0)},ref:c,role:"separator",style:{...A,...s},tabIndex:o,"data-panel-group-direction":d,"data-panel-group-id":p,"data-resize-handle":"","data-resize-handle-active":S?"pointer":y?"keyboard":void 0,"data-panel-resize-handle-enabled":!t,"data-panel-resize-handle-id":x})}ow.displayName="PanelResizeHandle";const Ze=M.div`
|
|
117
117
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
118
118
|
width: 100%;
|
|
119
119
|
`;function mI({onDoubleClick:n,...e}){return b.jsx(ow,{...e,children:b.jsx(OI,{onDoubleClick:n,children:b.jsx(Ze,{})})})}const OI=M.div`
|
|
@@ -276,7 +276,7 @@ html body {
|
|
|
276
276
|
span {
|
|
277
277
|
color: var(--text-color-secondary);
|
|
278
278
|
}
|
|
279
|
-
`,pj=[{label:"Default",value:!1},{label:"Secret",value:!0}];function Sl({variable:n,onSave:e,onCancel:t,className:r,readonlyName:i,readonlyValue:s,isNew:o}){const[a,l]=Q.useState(n.name),[c,u]=Q.useState(n.value),[f,d]=Q.useState(n.isSecret),h=()=>{e({...n,name:a,value:c,isSecret:f})},p=Q.useCallback(({value:m})=>d(m),[]);return b.jsxs(gj,{className:r,children:[b.jsxs(mj,{children:[o?"New":"Edit"," variable"]}),b.jsx(Wv,{children:"Name"}),b.jsx(Ya,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:m=>l(m.target.value)}),b.jsx(Wv,{children:"Value"}),b.jsx(Ya,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:s,onChange:m=>u(m.target.value)}),b.jsxs(vj,{children:[b.jsx(Oj,{children:"Type"}),b.jsx(G.Segmented,{size:"small",options:pj,value:!!f,onChange:p})]}),b.jsxs(xj,{children:[b.jsx(G.Button,{size:"small",variant:"text",onClick:t,children:"Cancel"}),b.jsx(G.Button,{size:"small",variant:"primary",onClick:h,disabled:!c||!a,"data-testid":"variable-save-button",children:"Save"})]})]})}const gj=M.div`
|
|
279
|
+
`,pj=[{label:"Default",value:!1},{label:"Secret",value:!0}];function Sl({variable:n,onSave:e,onCancel:t,className:r,readonlyName:i,readonlyValue:s,isNew:o}){const[a,l]=Q.useState(n.name),[c,u]=Q.useState(n.value),[f,d]=Q.useState(n.isSecret),h=()=>{e({...n,name:a,value:c,isSecret:f})},p=Q.useCallback(({value:m})=>d(m),[]);return b.jsxs(gj,{className:r,children:[b.jsxs(mj,{children:[o?"New":"Edit"," variable"]}),b.jsx(Wv,{children:"Name"}),b.jsx(Ya,{"data-testid":"variable-name-input",type:"text",placeholder:"Enter name",value:a,readOnly:i,onChange:m=>l(m.target.value)}),b.jsx(Wv,{children:"Value"}),b.jsx(Ya,{"data-testid":"variable-value-input",type:"text",placeholder:"Enter value",value:c,readOnly:s,onChange:m=>u(m.target.value)}),b.jsxs(vj,{children:[b.jsx(Oj,{children:"Type"}),b.jsx(G.Segmented,{size:"small",options:pj,value:!!f,onChange:p})]}),b.jsxs(xj,{children:[b.jsx(G.Button,{size:"small",variant:"text",onClick:t,children:"Cancel"}),b.jsx(G.Button,{size:"small",variant:"primary",onClick:h,disabled:!c.trim()||!a.trim(),"data-testid":"variable-save-button",children:"Save"})]})]})}const gj=M.div`
|
|
280
280
|
display: flex;
|
|
281
281
|
flex-direction: column;
|
|
282
282
|
align-items: flex-start;
|
|
@@ -1747,7 +1747,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1747
1747
|
background-color: var(--color-info-bg);
|
|
1748
1748
|
width: 20px;
|
|
1749
1749
|
height: 20px;
|
|
1750
|
-
`;function hY({variable:n,environment:e}){const[t,r]=Q.useState(!1),[i,s]=Q.useState(!1),{sendEvent:o}=$t(),{name:a,value:l,readonlyName:c,isSecret:u,canBeRemoved:f,canBeEdited:d}=n.get(),{name:h}=e.get(),p=x=>{o("environment_variable_edited",{name:h,variable:a,changed:x.value!==l}),n.set(x),r(!1)},m=()=>{r(!1),o("environment_variable_editing_cancelled",{name:h,variable:a})},g=()=>{o("environment_variable_secret_toggled",{name:h,variable:a,visible:!i}),s(!i)},v=()=>{r(!0),o("environment_variable_editing_started",{name:h,variable:a})},O=()=>{n.set(Pt),o("environment_variable_removed",{name:h,variable:a})};return t?b.jsx(
|
|
1750
|
+
`;function hY({variable:n,environment:e}){const[t,r]=Q.useState(!1),[i,s]=Q.useState(!1),{sendEvent:o}=$t(),{name:a,value:l,readonlyName:c,isSecret:u,canBeRemoved:f,canBeEdited:d}=n.get(),{name:h}=e.get(),p=x=>{o("environment_variable_edited",{name:h,variable:a,changed:x.value!==l}),n.set(x),r(!1)},m=()=>{r(!1),o("environment_variable_editing_cancelled",{name:h,variable:a})},g=()=>{o("environment_variable_secret_toggled",{name:h,variable:a,visible:!i}),s(!i)},v=()=>{r(!0),o("environment_variable_editing_started",{name:h,variable:a})},O=()=>{n.set(Pt),o("environment_variable_removed",{name:h,variable:a})};return t?b.jsx(xY,{variable:n.get(),onSave:p,onCancel:m,readonlyName:c}):b.jsx(NE,{dataTestId:`environment-variable-${n.get().name}`,controls:b.jsxs(pY,{children:[u&&b.jsx(Ma,{onClick:g,variant:"text",size:"small",icon:i?b.jsx(G.ViewOffIcon,{}):b.jsx(G.ViewIcon,{})}),d&&b.jsx(Ma,{"data-testid":`edit-variable-btn-${n.get().name}`,size:"small",variant:"text",icon:b.jsx(G.EditIcon,{}),onClick:v}),f&&b.jsx(Of,{description:"Are you sure you to delete this environment variable?",onConfirm:O,children:b.jsx(Ei,{"data-testid":`remove-variable-btn-${n.get().name}`,icon:b.jsx(G.TrashCanIcon,{})})}),(!d||!f)&&b.jsx(ls,{content:d?cY:lY,children:b.jsx(Ma,{size:"small",variant:"text",icon:b.jsx(G.InformationIcon,{})})})]}),children:b.jsxs(gY,{children:[b.jsxs(mY,{children:[b.jsx(OY,{children:a}),u&&b.jsx(fY,{})]}),b.jsx(vY,{$isEmpty:!l,children:u&&!i?"•••••":Ia(l,e.variables)||"No value"})]})})}const pY=M.div`
|
|
1751
1751
|
display: flex;
|
|
1752
1752
|
flex-direction: row;
|
|
1753
1753
|
gap: var(--spacing-xxs);
|
|
@@ -1757,66 +1757,74 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1757
1757
|
flex-direction: column;
|
|
1758
1758
|
justify-content: center;
|
|
1759
1759
|
align-items: flex-start;
|
|
1760
|
+
padding-bottom: var(--spacing-xs);
|
|
1760
1761
|
gap: 2px;
|
|
1761
1762
|
flex: 1 0 0;
|
|
1762
1763
|
width: 100%;
|
|
1763
1764
|
`,mY=M.div`
|
|
1764
1765
|
display: flex;
|
|
1765
1766
|
align-items: center;
|
|
1767
|
+
width: 100%;
|
|
1766
1768
|
gap: var(--spacing-xxs);
|
|
1767
|
-
overflow: hidden;
|
|
1768
1769
|
color: var(--text-color-primary);
|
|
1769
|
-
text-overflow: ellipsis;
|
|
1770
|
-
white-space: nowrap;
|
|
1771
1770
|
font-size: var(--font-size-base);
|
|
1772
1771
|
font-weight: var(--font-weight-regular);
|
|
1773
1772
|
line-height: var(--line-height-base);
|
|
1774
1773
|
padding-left: var(--spacing-base);
|
|
1775
1774
|
padding-top: var(--spacing-xs);
|
|
1776
|
-
`,OY=M.
|
|
1775
|
+
`,OY=M.div`
|
|
1776
|
+
overflow: hidden;
|
|
1777
|
+
min-width: 0;
|
|
1778
|
+
text-overflow: ellipsis;
|
|
1779
|
+
white-space: nowrap;
|
|
1780
|
+
`,vY=M.span`
|
|
1777
1781
|
color: ${({$isEmpty:n})=>n?"var(--color-warm-grey-5)":"var(--text-color-secondary)"};
|
|
1778
1782
|
font-size: var(--font-size-sm);
|
|
1779
1783
|
font-weight: var(--font-weight-regular);
|
|
1780
1784
|
line-height: var(--line-height-sm);
|
|
1781
1785
|
padding-left: var(--spacing-base);
|
|
1782
|
-
padding-bottom: var(--spacing-xs);
|
|
1783
1786
|
word-wrap: break-word;
|
|
1784
1787
|
max-width: 100%;
|
|
1785
|
-
|
|
1788
|
+
overflow: hidden;
|
|
1789
|
+
text-overflow: ellipsis;
|
|
1790
|
+
display: -webkit-box;
|
|
1791
|
+
-webkit-line-clamp: 2;
|
|
1792
|
+
-webkit-box-orient: vertical;
|
|
1793
|
+
`,xY=M(Sl)`
|
|
1786
1794
|
padding-left: 39px;
|
|
1787
1795
|
margin-left: -23px;
|
|
1788
|
-
`;function
|
|
1796
|
+
`;function bY({defaultName:n,onChange:e,onApplyNewName:t,onCancelEditing:r,icon:i,placeholder:s="New Folder"}){const[o,a]=Q.useState(n),l=u=>{a(u.target.value),e==null||e(u)},c=o.trim();return b.jsx(wl,{onClickOutside:r,children:b.jsxs(qG,{children:[i,b.jsx(Ya,{"data-testid":"edit-item-header-input",type:"text",placeholder:s,value:o,onChange:l}),b.jsx(G.Button,{"data-testid":"edit-item-header-save-button",variant:"primary",onClick:()=>t(c),disabled:!c,children:b.jsx(G.CheckmarkIcon,{})}),b.jsx(G.Button,{variant:"text",onClick:r,icon:b.jsx(G.CloseIcon,{})})]})})}function yY({environment:n,defaultExpanded:e}){const[t,r]=Q.useState(!1),{sendEvent:i}=$t(),{state:s,canBeEdited:o,canBeRemoved:a,name:l}=n.get(),c=()=>{n.set(Pt),i("environment_creation_cancelled",{})},u=()=>{n.state.set(fr.Normal),i("environment_editing_cancelled",{name:l})},f=()=>{n.state.set(fr.Edit),i("environment_editing_started",{name:l})},d=()=>{n.set(Pt),i("environment_removed",{name:l})},h=v=>{s===fr.Draft?i("environment_creation_finished",{name:v}):i("environment_edited",{name:l,newName:v}),n.state.set(fr.Normal),v.length&&n.name.set(v)},p=()=>{r(!0),i("environment_variable_creation_started",{name:l})},m=v=>{n.variables.set(O=>[v,...O]),r(!1),i("environment_variable_creation_finished",{name:l,variable:v.name,isSecret:v.isSecret})},g=()=>{r(!1),i("environment_variable_creation_cancelled",{name:l})};return s===fr.Edit||s===fr.Draft?b.jsx(bY,{placeholder:"New Environment",defaultName:l,onApplyNewName:h,onCancelEditing:s===fr.Draft?c:u,icon:s===fr.Edit?b.jsx(G.ChevronRightIcon,{size:"14px",color:"--text-color-secondary"}):b.jsx(G.AddIcon,{})}):b.jsx(b.Fragment,{children:b.jsxs(jf,{dataTestId:`environment-${l}`,title:l,defaultExpanded:e,controls:b.jsxs(SY,{children:[o&&b.jsx(Ma,{size:"small",variant:"text",icon:b.jsx(G.EditIcon,{}),onClick:f,"data-testid":`edit-environment-${l}`}),a&&b.jsx(Of,{description:uY.replace("{name}",l),onConfirm:d,children:b.jsx(Ei,{variant:"text",icon:b.jsx(G.TrashCanIcon,{}),"data-testid":`remove-environment-${l}`})}),(!o||!a)&&b.jsx(ls,{content:aY,children:b.jsx(Ma,{size:"small",variant:"text",icon:b.jsx(G.InformationIcon,{})})})]}),children:[t?b.jsx(kY,{variable:$u(),onSave:m,onCancel:g,isNew:!0}):b.jsx(CY,{icon:b.jsx(G.AddIcon,{}),variant:"secondary",onClick:p,iconPosition:"left",size:"small",children:"New variable"}),n.variables.map(v=>b.jsx(Q.Fragment,{children:b.jsx(hY,{variable:v,environment:n})},v.get().id))]})})}const SY=M.div`
|
|
1789
1797
|
display: flex;
|
|
1790
1798
|
flex-direction: row;
|
|
1791
1799
|
gap: var(--spacing-xxs);
|
|
1792
1800
|
align-items: center;
|
|
1793
|
-
`,
|
|
1801
|
+
`,wY=M(G.Button)`
|
|
1794
1802
|
align-self: flex-start;
|
|
1795
1803
|
margin: 0;
|
|
1796
|
-
`,
|
|
1804
|
+
`,CY=M(wY)`
|
|
1797
1805
|
margin: 8px 0 8px -7px;
|
|
1798
1806
|
font-size: var(--font-size-base);
|
|
1799
1807
|
font-weight: var(--font-weight-regular);
|
|
1800
1808
|
line-height: var(--line-height-base);
|
|
1801
|
-
`,
|
|
1809
|
+
`,kY=M(Sl)`
|
|
1802
1810
|
padding-left: 39px;
|
|
1803
1811
|
margin-left: -23px;
|
|
1804
|
-
`;function
|
|
1812
|
+
`;function AY(){const[n,e]=Q.useState(""),{environments:t,selectedEnvironmentId:r}=Xe(),{sendEvent:i}=$t(),s=Q.useMemo(()=>t.filter(l=>l.name.get().toLowerCase().includes(n.toLowerCase())),[n,t]),o=()=>{e(""),t.set(l=>[{id:crypto.randomUUID(),name:"",variables:[],state:fr.Draft,canBeRemoved:!0,canBeEdited:!0},...l]),i("environment_creation_started",{})},a=l=>{e(l)};return b.jsxs(PY,{children:[b.jsxs(cO,{children:[b.jsx(lO,{value:n,onSearch:a}),b.jsx(Me,{}),b.jsx(VE,{children:b.jsx(G.Button,{"data-testid":"add-environment-btn",variant:"text",disabled:!!t.find(({state:l})=>l.get()===fr.Draft),onClick:o,size:"small",icon:b.jsx(G.AddIcon,{})})})]}),b.jsx(uO,{children:s.map(l=>b.jsx(yY,{environment:l,defaultExpanded:l.get().id===r.get()},l.id.get()))})]})}const PY=M.div`
|
|
1805
1813
|
display: flex;
|
|
1806
1814
|
flex-direction: column;
|
|
1807
1815
|
width: 100%;
|
|
1808
|
-
`;function ES({name:n,value:e}){const[t,r]=Q.useState(!1),{sendEvent:i}=$t(),s=()=>{i("app_credential_visibility_toggled",{name:n,visible:!t}),r(!t)},o=()=>{i("app_credential_copied",{name:n})};return b.jsxs(
|
|
1816
|
+
`;function ES({name:n,value:e}){const[t,r]=Q.useState(!1),{sendEvent:i}=$t(),s=()=>{i("app_credential_visibility_toggled",{name:n,visible:!t}),r(!t)},o=()=>{i("app_credential_copied",{name:n})};return b.jsxs(EY,{children:[b.jsxs(TY,{children:[b.jsx(IY,{children:n}),b.jsx($Y,{children:t?e:"••••••••••••••••••••••••••••••••••••"})]}),b.jsxs(RY,{children:[b.jsx(G.Button,{variant:"text",size:"small",icon:t?b.jsx(G.ViewIcon,{}):b.jsx(G.ViewOffIcon,{}),onClick:s}),b.jsx(G.CopyButton,{toasterPlacement:"left",data:e,onCopyClick:o})]})]})}const EY=M.div`
|
|
1809
1817
|
display: flex;
|
|
1810
1818
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
1811
1819
|
align-items: flex-start;
|
|
1812
1820
|
gap: var(--spacing-xs);
|
|
1813
1821
|
align-self: stretch;
|
|
1814
|
-
`,
|
|
1822
|
+
`,TY=M.div`
|
|
1815
1823
|
display: flex;
|
|
1816
1824
|
align-items: flex-start;
|
|
1817
1825
|
gap: 10px;
|
|
1818
1826
|
flex: 1 0 0;
|
|
1819
|
-
`,
|
|
1827
|
+
`,IY=M.div`
|
|
1820
1828
|
display: -webkit-box;
|
|
1821
1829
|
width: var(--64-px-4-rem-spacing-11, 64px);
|
|
1822
1830
|
-webkit-box-orient: vertical;
|
|
@@ -1829,19 +1837,19 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1829
1837
|
font-style: normal;
|
|
1830
1838
|
font-weight: var(--font-weight-semibold);
|
|
1831
1839
|
line-height: var(--line-height-sm);
|
|
1832
|
-
|
|
1840
|
+
`,$Y=M.div`
|
|
1833
1841
|
flex: 1 0 0;
|
|
1834
1842
|
color: var(--text-color-primary);
|
|
1835
1843
|
font-size: var(--font-size-sm);
|
|
1836
1844
|
font-style: normal;
|
|
1837
1845
|
font-weight: var(--font-weight-regular);
|
|
1838
1846
|
line-height: var(--line-height-sm);
|
|
1839
|
-
|
|
1847
|
+
`,RY=M.div`
|
|
1840
1848
|
display: flex;
|
|
1841
1849
|
justify-content: flex-end;
|
|
1842
1850
|
align-items: center;
|
|
1843
1851
|
gap: var(--spacing-xxs);
|
|
1844
|
-
`;function
|
|
1852
|
+
`;function DY({credential:n,number:e}){const{requestActiveTabIdx:t,request:{securityType:r,security:i}}=Xe(),s=Kt(),{clientId:o,clientSecret:a,valueToUseInHeader:l}=n,{sendEvent:c}=$t(),u=()=>{t.set(SL);const f=(d,h)=>{if(d.get()===ce.AuthorizationCode){const{clientId:p,clientSecret:m}=h[ce.AuthorizationCode];(o||a)&&cn(o||a||"",p,s),a&&cn(a,m,s)}if(d.get()===ce.Implicit){const{clientId:p}=h[ce.Implicit];(o||a)&&cn(o||a||"",p,s)}if(d.get()===ce.ClientCredentials){const{clientId:p,clientSecret:m}=h[ce.ClientCredentials];(o||a)&&cn(o||a||"",p,s),a&&cn(a,m,s)}if(d.get()===ce.Password){const{clientId:p,clientSecret:m}=h[ce.Password];(o||a)&&cn(o||a||"",p,s),a&&cn(a,m,s)}};if(r.get()===ne.BasicAuth){const{username:d,password:h}=i[ne.BasicAuth];(o||a)&&cn(o||a||"",d,s),a&&cn(a,h,s)}if(r.get()===ne.DigestAuth){const{username:d,password:h}=i[ne.DigestAuth];(o||a)&&cn(o||a||"",d,s),a&&cn(a,h,s)}if(r.get()===ne.JWT){const{token:d}=i[ne.JWT];(o||a)&&cn(o||a||"",d,s)}if(r.get()===ne.APIKey){const{key:d}=i[ne.APIKey];cn(n[l||"clientSecret"]||o||"",d,s)}if(r.get()===ne.OAuth2){const d=i[ne.OAuth2],h=d.grantType;f(h,d)}if(r.get()===ne.OpenIDConnect){const d=i[ne.OpenIDConnect],{grantType:h}=d;f(h,d)}c("apps_use_key_clicked",{number:e})};return b.jsxs(QY,{children:[b.jsxs(jY,{children:[b.jsx(_Y,{children:e.toString().padStart(2,"0")}),b.jsxs(BY,{children:[n.stage&&b.jsx(G.Tag,{color:"gray",children:n.stage}),b.jsx(G.Tag,{color:"green",children:n.status})]})]}),o&&b.jsx(ES,{name:"API key",value:o}),a&&b.jsx(ES,{name:o?"Secret":"API key",value:a}),b.jsx(MY,{children:b.jsx(G.Button,{size:"small",variant:"secondary",onClick:u,children:"Use key"})})]})}const QY=M.div`
|
|
1845
1853
|
display: flex;
|
|
1846
1854
|
flex-direction: column;
|
|
1847
1855
|
align-self: stretch;
|
|
@@ -1855,7 +1863,7 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1855
1863
|
& > :not(:last-child) {
|
|
1856
1864
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
1857
1865
|
}
|
|
1858
|
-
`,
|
|
1866
|
+
`,jY=M.div`
|
|
1859
1867
|
display: flex;
|
|
1860
1868
|
justify-content: space-between;
|
|
1861
1869
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
@@ -1863,16 +1871,16 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1863
1871
|
align-items: center;
|
|
1864
1872
|
align-self: stretch;
|
|
1865
1873
|
background: var(--layer-color);
|
|
1866
|
-
`,
|
|
1874
|
+
`,BY=M.div`
|
|
1867
1875
|
display: flex;
|
|
1868
1876
|
gap: var(--spacing-xxs);
|
|
1869
|
-
`,
|
|
1877
|
+
`,_Y=M.div`
|
|
1870
1878
|
color: var(--text-color-secondary, #3b3c45);
|
|
1871
1879
|
font-size: var(--font-size-sm);
|
|
1872
1880
|
font-style: normal;
|
|
1873
1881
|
font-weight: var(--font-weight-regular);
|
|
1874
1882
|
line-height: var(--line-height-sm);
|
|
1875
|
-
`,
|
|
1883
|
+
`,MY=M.div`
|
|
1876
1884
|
display: flex;
|
|
1877
1885
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
1878
1886
|
border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
|
|
@@ -1880,16 +1888,16 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1880
1888
|
align-items: center;
|
|
1881
1889
|
align-self: stretch;
|
|
1882
1890
|
background: var(--layer-color);
|
|
1883
|
-
`;function
|
|
1891
|
+
`;function NY({app:n}){const[e,t]=Q.useState(!1),{title:r,credentials:i,id:s}=n,o=i.get()||[],a=l=>{l&&!i.get()&&(t(!0),fetch(`/api/api-keys/apps/${s.get()}`).then(c=>c.json().then(u=>{c.ok&&i.set(u.credentials)}).catch(()=>console.log("Something went wrong")).finally(()=>t(!1))))};return b.jsx(jf,{dataTestId:`app-${name}`,title:r.get(),onToggle:a,children:b.jsx(FY,{children:e?b.jsx(ZY,{children:b.jsx(G.SpinnerIcon,{size:"16px",color:"--icon-color-additional"})}):o.length?o.map((l,c)=>b.jsx(DY,{credential:l,number:c+1},l.id)):b.jsx(VY,{children:"There are no credentials yet."})})})}const FY=M.div`
|
|
1884
1892
|
padding-bottom: var(--spacing-xxs);
|
|
1885
1893
|
margin-left: -7px;
|
|
1886
1894
|
padding-right: var(--spacing-base);
|
|
1887
|
-
`,
|
|
1895
|
+
`,ZY=M.div`
|
|
1888
1896
|
display: flex;
|
|
1889
1897
|
height: 224px;
|
|
1890
1898
|
justify-content: center;
|
|
1891
1899
|
align-items: center;
|
|
1892
|
-
`,
|
|
1900
|
+
`,VY=M.div`
|
|
1893
1901
|
display: flex;
|
|
1894
1902
|
justify-content: center;
|
|
1895
1903
|
align-items: center;
|
|
@@ -1897,17 +1905,17 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1897
1905
|
font-size: var(--font-size-base);
|
|
1898
1906
|
line-height: var(--line-height-base);
|
|
1899
1907
|
color: var(--text-color-secondary);
|
|
1900
|
-
`;function
|
|
1908
|
+
`;function WY(){const[n,e]=Q.useState(""),{apps:t,apiId:r,appsLoadingState:i}=Xe(),{sendEvent:s}=$t(),o=()=>{window.open("/apps","_blank"),s("apps_request_access_clicked",{})};Q.useEffect(()=>((i.get()===Wr.Idle||i.get()===Wr.Error)&&(i.set(Wr.Loading),fetch(`/api/api-keys/api-products/${r.get()}/access?expand=0`).then(c=>c.json().then(u=>{c.ok?(t.set(u.apps||[]),i.set(Wr.Success)):i.set(Wr.Error)}).catch(()=>i.set(Wr.Error)))),()=>{t.set([]),i.set(Wr.Idle)}),[r]);const a=Q.useMemo(()=>t.filter(c=>c.title.get().toLowerCase().includes(n.toLowerCase())),[n,t]),l=c=>{e(c)};return i.get()===Wr.Loading?b.jsx(XY,{children:b.jsx(G.SpinnerIcon,{size:"24px",color:"--icon-color-additional"})}):t.length?b.jsxs(zY,{children:[b.jsx(cO,{children:b.jsx(lO,{value:n,onSearch:l})}),b.jsx(uO,{children:a.map(c=>b.jsx(NY,{app:c},c.get().id))})]}):b.jsxs(WE,{children:["You don't have any apps with access to this API",b.jsx(G.Button,{onClick:o,children:"Request access"})]})}const zY=M.div`
|
|
1901
1909
|
display: flex;
|
|
1902
1910
|
flex-direction: column;
|
|
1903
1911
|
width: 100%;
|
|
1904
|
-
`,
|
|
1912
|
+
`,XY=M.div`
|
|
1905
1913
|
display: flex;
|
|
1906
1914
|
justify-content: center;
|
|
1907
1915
|
align-items: center;
|
|
1908
1916
|
width: 100%;
|
|
1909
1917
|
height: calc(100vh - 50px);
|
|
1910
|
-
}`,{Tab:
|
|
1918
|
+
}`,{Tab:LY,TabContent:GY,TabList:YY,Tabs:UY}=G.markdoc.components;function qY(){const{apiId:n}=Xe(),{sendEvent:e}=$t(),[t,r]=Q.useState(!0),i=Q.useCallback(a=>{e("side_panel_tab_changed",{name:a})},[e]),s=()=>{r(!t),e("side_panel_toggled",{expanded:!t})},o=Q.useMemo(()=>{const a=[b.jsx(cp,{label:"History",onClick:()=>i("History"),children:b.jsx(HG,{})},"History"),b.jsx(cp,{label:"Environments",onClick:()=>i("Environments"),children:b.jsx(AY,{})},"Environments")];return n.get()&&a.push(b.jsx(cp,{label:"Apps",onClick:()=>i("Apps"),children:b.jsx(WY,{})})),a},[n,i]);return b.jsxs(HY,{$expanded:t,children:[t&&b.jsxs(JY,{children:[...o]}),b.jsx(KY,{variant:"text",onClick:s,children:t?b.jsx(G.SidePanelOpenIcon,{}):b.jsx(G.SidePanelCloseIcon,{})})]})}const HY=M.div`
|
|
1911
1919
|
display: flex;
|
|
1912
1920
|
flex-direction: row;
|
|
1913
1921
|
border-left: 1px solid var(--border-color-secondary);
|
|
@@ -1919,13 +1927,13 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1919
1927
|
svg {
|
|
1920
1928
|
fill: var(--text-color-primary);
|
|
1921
1929
|
}
|
|
1922
|
-
`,
|
|
1930
|
+
`,JY=M(UY)`
|
|
1923
1931
|
flex-grow: 1;
|
|
1924
1932
|
margin-right: -48px;
|
|
1925
1933
|
margin-top: 0;
|
|
1926
1934
|
--md-tabs-content-padding: 0;
|
|
1927
1935
|
|
|
1928
|
-
${
|
|
1936
|
+
${YY} {
|
|
1929
1937
|
margin: 0;
|
|
1930
1938
|
height: 49px;
|
|
1931
1939
|
font-size: var(--font-size-lg);
|
|
@@ -1940,11 +1948,11 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1940
1948
|
--md-tabs-hover-tab-border-width: 0;
|
|
1941
1949
|
}
|
|
1942
1950
|
|
|
1943
|
-
${
|
|
1951
|
+
${GY} {
|
|
1944
1952
|
overflow: auto;
|
|
1945
1953
|
}
|
|
1946
1954
|
|
|
1947
|
-
${
|
|
1955
|
+
${LY} {
|
|
1948
1956
|
font-size: var(--font-size-lg);
|
|
1949
1957
|
font-weight: var(--font-weight-regular);
|
|
1950
1958
|
line-height: var(--line-height-lg);
|
|
@@ -1966,56 +1974,56 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
1966
1974
|
ol[class^='Tabs__TabList'] {
|
|
1967
1975
|
padding: 0 0 0 var(--spacing-base);
|
|
1968
1976
|
}
|
|
1969
|
-
`,
|
|
1977
|
+
`,KY=M(G.Button)`
|
|
1970
1978
|
align-self: flex-start;
|
|
1971
1979
|
margin: 12px;
|
|
1972
1980
|
padding: 4px;
|
|
1973
|
-
`,cp=M.li``,
|
|
1981
|
+
`,cp=M.li``,eU=({error:n})=>b.jsxs(tU,{children:[b.jsx(nU,{children:"An Error Has Occurred"}),b.jsx(rU,{children:n==null?void 0:n.message}),b.jsx(iU,{children:n==null?void 0:n.stack})]}),tU=M.div`
|
|
1974
1982
|
padding: var(--spacing-xs) var(--spacing-xl);
|
|
1975
|
-
`,
|
|
1983
|
+
`,nU=M.h2`
|
|
1976
1984
|
color: var(--color-error-base);
|
|
1977
|
-
`,
|
|
1985
|
+
`,rU=M.h4`
|
|
1978
1986
|
color: var(--text-color-secondary);
|
|
1979
|
-
`,
|
|
1987
|
+
`,iU=M.pre`
|
|
1980
1988
|
white-space: break-spaces;
|
|
1981
|
-
`;function
|
|
1989
|
+
`;function sU({className:n}){return b.jsx(oU,{className:n,children:b.jsxs(aU,{children:[b.jsx(G.CloseFilledIcon,{size:"24px",color:"--color-error-base"}),b.jsxs(lU,{children:[b.jsx(cU,{children:"Oops! Something went wrong."}),b.jsx(uU,{children:"We're sorry. There's been an unexpected error. Our team has been notified and will investigate the issue."})]})]})})}const oU=M.div`
|
|
1982
1990
|
display: flex;
|
|
1983
1991
|
justify-content: center;
|
|
1984
1992
|
align-items: center;
|
|
1985
1993
|
width: 80vw;
|
|
1986
1994
|
height: 100vh;
|
|
1987
1995
|
background-color: var(--bg-color);
|
|
1988
|
-
`,
|
|
1996
|
+
`,aU=M.div`
|
|
1989
1997
|
display: flex;
|
|
1990
1998
|
flex-direction: column;
|
|
1991
1999
|
align-items: center;
|
|
1992
2000
|
gap: var(--spacing-base);
|
|
1993
|
-
`,
|
|
2001
|
+
`,lU=M.div`
|
|
1994
2002
|
display: flex;
|
|
1995
2003
|
flex-direction: column;
|
|
1996
2004
|
align-items: center;
|
|
1997
2005
|
gap: var(--spacing-xxs);
|
|
1998
2006
|
width: 488px;
|
|
1999
|
-
`,
|
|
2007
|
+
`,cU=M.div`
|
|
2000
2008
|
color: var(--text-color-primary);
|
|
2001
2009
|
font-size: var(--font-size-xl);
|
|
2002
2010
|
font-style: normal;
|
|
2003
2011
|
font-weight: var(--font-weight-semibold);
|
|
2004
2012
|
line-height: var(--line-height-xl);
|
|
2005
|
-
`,
|
|
2013
|
+
`,uU=M.div`
|
|
2006
2014
|
color: var(--text-color-primary);
|
|
2007
2015
|
font-size: var(--font-size-lg);
|
|
2008
2016
|
font-style: normal;
|
|
2009
2017
|
font-weight: var(--font-weight-regular);
|
|
2010
2018
|
line-height: var(--line-height-lg);
|
|
2011
2019
|
text-align: center;
|
|
2012
|
-
`;class zE extends H.Component{constructor(e){super(e),this.state={error:void 0},this.onUnhandledError=this.onUnhandledError.bind(this),this.onUnhandledPromiseRejection=this.onUnhandledPromiseRejection.bind(this)}onUnhandledError({error:e}){var t,r;(r=(t=this.props).onError)==null||r.call(t,e)}onUnhandledPromiseRejection(e){var t,r;(r=(t=this.props).onError)==null||r.call(t,e.reason)}componentDidMount(){window.addEventListener("error",this.onUnhandledError),window.addEventListener("unhandledrejection",this.onUnhandledPromiseRejection)}componentWillUnmount(){window.removeEventListener("error",this.onUnhandledError),window.removeEventListener("unhandledrejection",this.onUnhandledPromiseRejection)}componentDidCatch(e,t){var i,s;const r={error:{message:e.message,stack:t.componentStack??void 0}};this.setState(r),(s=(i=this.props).onError)==null||s.call(i,r.error)}render(){return this.state.error?process.env.NODE_ENV==="production"?b.jsx(
|
|
2020
|
+
`;class zE extends H.Component{constructor(e){super(e),this.state={error:void 0},this.onUnhandledError=this.onUnhandledError.bind(this),this.onUnhandledPromiseRejection=this.onUnhandledPromiseRejection.bind(this)}onUnhandledError({error:e}){var t,r;(r=(t=this.props).onError)==null||r.call(t,e)}onUnhandledPromiseRejection(e){var t,r;(r=(t=this.props).onError)==null||r.call(t,e.reason)}componentDidMount(){window.addEventListener("error",this.onUnhandledError),window.addEventListener("unhandledrejection",this.onUnhandledPromiseRejection)}componentWillUnmount(){window.removeEventListener("error",this.onUnhandledError),window.removeEventListener("unhandledrejection",this.onUnhandledPromiseRejection)}componentDidCatch(e,t){var i,s;const r={error:{message:e.message,stack:t.componentStack??void 0}};this.setState(r),(s=(i=this.props).onError)==null||s.call(i,r.error)}render(){return this.state.error?process.env.NODE_ENV==="production"?b.jsx(sU,{}):b.jsx(eU,{error:this.state.error}):this.props.children}}function fU({className:n}){const{operationUrl:e}=Xe().get(),{sendEvent:t}=$t();return b.jsxs(b.Fragment,{children:[b.jsx(G.GlobalStyle,{}),b.jsx(dU,{className:n,children:b.jsxs(zE,{onError:r=>t("unhandled_error",{...r,operationUrl:e}),children:[b.jsx(_E,{}),b.jsx(qY,{})]})})]})}const dU=M.div`
|
|
2013
2021
|
display: flex;
|
|
2014
2022
|
height: 100vh;
|
|
2015
2023
|
background-color: var(--bg-color);
|
|
2016
|
-
`;function
|
|
2024
|
+
`;function hU(n,e){const t=nE(n),r=tE(n),i=nz(n),s=K7(n),o=n.request.get().body.activeExampleName,a=n.request.get().body.type,l=Jm(n);return{requestValues:{cookie:i,header:t,query:s,body:r},activeExampleName:o,activeMimeName:a,environment:(l==null?void 0:l.name)||(l==null?void 0:l.url),environments:Object.fromEntries(Object.entries(n.environments.get()).map(([,c])=>[c.name,{...Object.fromEntries(c.variables.map(({name:u,value:f})=>[u,f])),server:c.url||""}]))}}function pU(n,e){const{servers:t,parameters:r}=n,i=r.filter(o=>o.in==="path"),s=gU(n);return t.map(o=>{const a=o.url,l=o.description||a,c=o.variables||{},u=Object.entries(c).map(([m,g])=>{const v=Ea.getEnvironmentVariableByName(l,m,dr.Server);return{id:crypto.randomUUID(),name:m,value:(v==null?void 0:v.value)||g.default,type:dr.Server,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),f=i.map(({name:m})=>{const g=Ea.getEnvironmentVariableByName(l,m,dr.Path);return{id:crypto.randomUUID(),name:m,value:(g==null?void 0:g.value)||"",type:dr.Path,canBeRemoved:!1,canBeEdited:!0,readonlyName:!0}}),d=s.map(m=>{const g=Ea.getEnvironmentVariableByName(l,m.name,dr.Security);return{...m,value:(g==null?void 0:g.value)||m.value}}),h=Ea.getEnvironmentByName(l),p=(h==null?void 0:h.variables.filter(m=>m.type===dr.UserCreated))||[];return{id:crypto.randomUUID(),name:l,url:a,state:fr.Normal,canBeRemoved:!1,canBeEdited:!1,variables:mU([...p,{id:crypto.randomUUID(),name:"server",value:Hf(a),type:dr.ServerUrl,canBeRemoved:!1,canBeEdited:!1},...u,...f,...d],e==null?void 0:e[l])}})}function gU(n){const e=[],t=n.security||[],r=new Set;return t.forEach(i=>{const s=Hi(i);if(r.has(s))return;const o=i.id;r.add(s),(s===ne.BasicAuth||s===ne.DigestAuth)&&(e.push(Zr(o+G.SecurityVariablesEnvSuffix.Username,!1)),e.push(Zr(o+G.SecurityVariablesEnvSuffix.Password))),s===ne.JWT&&e.push(Zr(o+G.SecurityVariablesEnvSuffix.JWTToken)),s===ne.APIKey&&e.push(Zr(o+G.SecurityVariablesEnvSuffix.APIKey)),s===ne.OAuth2&&(e.push(Zr(o+G.SecurityVariablesEnvSuffix.Token)),tO(i).forEach(l=>{e.push(Zr(o+G.SecurityVariablesEnvSuffix.ClientId)),l!==ce.Implicit&&e.push(Zr(o+G.SecurityVariablesEnvSuffix.ClientSecret))})),s===ne.OpenIDConnect&&(e.push(Zr(o+G.SecurityVariablesEnvSuffix.Token)),e.push(Zr(o+G.SecurityVariablesEnvSuffix.ClientId)),e.push(Zr(o+G.SecurityVariablesEnvSuffix.ClientSecret)))}),e}function Zr(n,e){return{id:crypto.randomUUID(),name:n,value:"",type:dr.Security,canBeRemoved:!1,canBeEdited:!0,isSecret:e===void 0?!0:e}}function mU(n,e){return e?n.map(t=>{const r=e[t.name];return r!==void 0?{...t,canBeRemoved:!1,value:t.type===dr.ServerUrl?Hf(r):r}:t}):n}function XE({value:n,disableDraft:e,...t}){const r=Xe(),{operation:i,request:s,response:o,corsProxyUrl:a,environments:l,operationUrl:c,mockServer:u,selectedEnvironmentId:f,apiId:d,oAuth2RedirectURI:h}=r;return Q.useEffect(()=>{const p=t.operationUrl&&!e?EE.getByKey(t.operationUrl):null,m=Vn(n),g=pU(m,t.predefinedEnvValues),v=g.find(({name:O,url:x})=>x===(t==null?void 0:t.environment)||O===(t==null?void 0:t.environment));i.set(m),l.set(g),a.set(t.corsProxyUrl??NL),o.set(null),c.set(t.operationUrl),u.set(t.mockServer),d.set(t.apiId),h.set(t.oAuth2RedirectURI),v&&f.set(v.id),p?s.set(p):s.set(Km(m)),H2(r)},[n]),r}function OU({onClose:n,onLoad:e,onRequestChange:t,...r}){const i=Q.useRef(null),{sendEvent:s}=$t(),o=Xe(),a=XE(r),l=Q.useCallback(()=>{if(t){const u=a.isLinked.get(),f=hU(a,r.value);t(u?f:{requestValues:{}})}s("replay_closed",{operationName:r.value.name}),n(),o.set(Vs())},[n,t,a,r.value,s,o]);Q.useEffect(()=>{e==null||e(),s("replay_opened",{operationName:r.value.name})},[]),Q.useEffect(()=>{i.current&&i.current.focus()},[]);const c=u=>{u.key==="Enter"&&(u.preventDefault(),l())};return b.jsx(Q.StrictMode,{children:b.jsxs(HC,{onClick:l,children:[b.jsx(xU,{onClick:l,role:"button",onKeyDown:c,tabIndex:0,ref:i,autoFocus:!0,children:b.jsx(bU,{})}),b.jsx(vU,{})]})})}const vU=M(fU)`
|
|
2017
2025
|
width: 80vw;
|
|
2018
|
-
`,
|
|
2026
|
+
`,xU=M.div`
|
|
2019
2027
|
display: flex;
|
|
2020
2028
|
justify-content: center;
|
|
2021
2029
|
align-items: center;
|
|
@@ -2028,12 +2036,12 @@ Please report this to https://github.com/markedjs/marked.`,e.silent)return"<p>An
|
|
|
2028
2036
|
width: 24px;
|
|
2029
2037
|
height: 24px;
|
|
2030
2038
|
cursor: pointer;
|
|
2031
|
-
`,
|
|
2039
|
+
`,bU=M(G.CloseIcon)`
|
|
2032
2040
|
width: 14px;
|
|
2033
2041
|
height: 14px;
|
|
2034
|
-
`;function
|
|
2042
|
+
`;function yU(n){const{sendEvent:e}=$t(),t=Q.useMemo(()=>aw(Vs()),[]);return b.jsx(kL,{value:t,children:b.jsx(zE,{onError:r=>e("unhandled_error",{...r,isEmbedded:!0}),children:b.jsx(SU,{...n})})})}function SU(n){return XE({...n,disableDraft:!0}),b.jsx(Q.StrictMode,{children:b.jsx(wU,{children:b.jsx(_E,{})})})}const wU=M.div`
|
|
2035
2043
|
display: flex;
|
|
2036
2044
|
max-height: 80vh;
|
|
2037
2045
|
height: 800px;
|
|
2038
2046
|
width: 100%;
|
|
2039
|
-
`;exports.EmbeddedReplay=
|
|
2047
|
+
`;exports.EmbeddedReplay=yU;exports.ReplayOverlay=OU;
|
package/dist/replay.js
CHANGED
|
@@ -2157,7 +2157,7 @@ See https://s-c.sh/2BAXzed for more info.`), window["__styled-components-init__"
|
|
|
2157
2157
|
const _ = Np, {
|
|
2158
2158
|
createElement: Mo,
|
|
2159
2159
|
createContext: p$,
|
|
2160
|
-
createRef:
|
|
2160
|
+
createRef: Wq,
|
|
2161
2161
|
forwardRef: Iw,
|
|
2162
2162
|
useCallback: Wn,
|
|
2163
2163
|
useContext: $w,
|
|
@@ -16206,7 +16206,7 @@ function Bl({
|
|
|
16206
16206
|
size: "small",
|
|
16207
16207
|
variant: "primary",
|
|
16208
16208
|
onClick: h,
|
|
16209
|
-
disabled: !c || !a,
|
|
16209
|
+
disabled: !c.trim() || !a.trim(),
|
|
16210
16210
|
"data-testid": "variable-save-button",
|
|
16211
16211
|
children: "Save"
|
|
16212
16212
|
}
|
|
@@ -54543,7 +54543,7 @@ function TU({ variable: n, environment: e }) {
|
|
|
54543
54543
|
});
|
|
54544
54544
|
};
|
|
54545
54545
|
return t ? /* @__PURE__ */ b.jsx(
|
|
54546
|
-
|
|
54546
|
+
jU,
|
|
54547
54547
|
{
|
|
54548
54548
|
variable: n.get(),
|
|
54549
54549
|
onSave: p,
|
|
@@ -54592,10 +54592,10 @@ function TU({ variable: n, environment: e }) {
|
|
|
54592
54592
|
] }),
|
|
54593
54593
|
children: /* @__PURE__ */ b.jsxs($U, { children: [
|
|
54594
54594
|
/* @__PURE__ */ b.jsxs(RU, { children: [
|
|
54595
|
-
a,
|
|
54595
|
+
/* @__PURE__ */ b.jsx(DU, { children: a }),
|
|
54596
54596
|
u && /* @__PURE__ */ b.jsx(PU, {})
|
|
54597
54597
|
] }),
|
|
54598
|
-
/* @__PURE__ */ b.jsx(
|
|
54598
|
+
/* @__PURE__ */ b.jsx(QU, { $isEmpty: !l, children: u && !i ? "•••••" : Va(l, e.variables) || "No value" })
|
|
54599
54599
|
] })
|
|
54600
54600
|
}
|
|
54601
54601
|
);
|
|
@@ -54610,36 +54610,44 @@ const IU = _.div`
|
|
|
54610
54610
|
flex-direction: column;
|
|
54611
54611
|
justify-content: center;
|
|
54612
54612
|
align-items: flex-start;
|
|
54613
|
+
padding-bottom: var(--spacing-xs);
|
|
54613
54614
|
gap: 2px;
|
|
54614
54615
|
flex: 1 0 0;
|
|
54615
54616
|
width: 100%;
|
|
54616
54617
|
`, RU = _.div`
|
|
54617
54618
|
display: flex;
|
|
54618
54619
|
align-items: center;
|
|
54620
|
+
width: 100%;
|
|
54619
54621
|
gap: var(--spacing-xxs);
|
|
54620
|
-
overflow: hidden;
|
|
54621
54622
|
color: var(--text-color-primary);
|
|
54622
|
-
text-overflow: ellipsis;
|
|
54623
|
-
white-space: nowrap;
|
|
54624
54623
|
font-size: var(--font-size-base);
|
|
54625
54624
|
font-weight: var(--font-weight-regular);
|
|
54626
54625
|
line-height: var(--line-height-base);
|
|
54627
54626
|
padding-left: var(--spacing-base);
|
|
54628
54627
|
padding-top: var(--spacing-xs);
|
|
54629
|
-
`, DU = _.
|
|
54628
|
+
`, DU = _.div`
|
|
54629
|
+
overflow: hidden;
|
|
54630
|
+
min-width: 0;
|
|
54631
|
+
text-overflow: ellipsis;
|
|
54632
|
+
white-space: nowrap;
|
|
54633
|
+
`, QU = _.span`
|
|
54630
54634
|
color: ${({ $isEmpty: n }) => n ? "var(--color-warm-grey-5)" : "var(--text-color-secondary)"};
|
|
54631
54635
|
font-size: var(--font-size-sm);
|
|
54632
54636
|
font-weight: var(--font-weight-regular);
|
|
54633
54637
|
line-height: var(--line-height-sm);
|
|
54634
54638
|
padding-left: var(--spacing-base);
|
|
54635
|
-
padding-bottom: var(--spacing-xs);
|
|
54636
54639
|
word-wrap: break-word;
|
|
54637
54640
|
max-width: 100%;
|
|
54638
|
-
|
|
54641
|
+
overflow: hidden;
|
|
54642
|
+
text-overflow: ellipsis;
|
|
54643
|
+
display: -webkit-box;
|
|
54644
|
+
-webkit-line-clamp: 2;
|
|
54645
|
+
-webkit-box-orient: vertical;
|
|
54646
|
+
`, jU = _(Bl)`
|
|
54639
54647
|
padding-left: 39px;
|
|
54640
54648
|
margin-left: -23px;
|
|
54641
54649
|
`;
|
|
54642
|
-
function
|
|
54650
|
+
function BU({
|
|
54643
54651
|
defaultName: n,
|
|
54644
54652
|
onChange: e,
|
|
54645
54653
|
onApplyNewName: t,
|
|
@@ -54675,7 +54683,7 @@ function jU({
|
|
|
54675
54683
|
/* @__PURE__ */ b.jsx(Ve, { variant: "text", onClick: r, icon: /* @__PURE__ */ b.jsx(Bo, {}) })
|
|
54676
54684
|
] }) });
|
|
54677
54685
|
}
|
|
54678
|
-
function
|
|
54686
|
+
function _U({ environment: n, defaultExpanded: e }) {
|
|
54679
54687
|
const [t, r] = Ce(!1), { sendEvent: i } = _t(), { state: s, canBeEdited: o, canBeRemoved: a, name: l } = n.get(), c = () => {
|
|
54680
54688
|
n.set(Dt), i("environment_creation_cancelled", {});
|
|
54681
54689
|
}, u = () => {
|
|
@@ -54698,7 +54706,7 @@ function BU({ environment: n, defaultExpanded: e }) {
|
|
|
54698
54706
|
r(!1), i("environment_variable_creation_cancelled", { name: l });
|
|
54699
54707
|
};
|
|
54700
54708
|
return s === Or.Edit || s === Or.Draft ? /* @__PURE__ */ b.jsx(
|
|
54701
|
-
|
|
54709
|
+
BU,
|
|
54702
54710
|
{
|
|
54703
54711
|
placeholder: "New Environment",
|
|
54704
54712
|
defaultName: l,
|
|
@@ -54712,7 +54720,7 @@ function BU({ environment: n, defaultExpanded: e }) {
|
|
|
54712
54720
|
dataTestId: `environment-${l}`,
|
|
54713
54721
|
title: l,
|
|
54714
54722
|
defaultExpanded: e,
|
|
54715
|
-
controls: /* @__PURE__ */ b.jsxs(
|
|
54723
|
+
controls: /* @__PURE__ */ b.jsxs(NU, { children: [
|
|
54716
54724
|
o && /* @__PURE__ */ b.jsx(
|
|
54717
54725
|
Ha,
|
|
54718
54726
|
{
|
|
@@ -54742,7 +54750,7 @@ function BU({ environment: n, defaultExpanded: e }) {
|
|
|
54742
54750
|
] }),
|
|
54743
54751
|
children: [
|
|
54744
54752
|
t ? /* @__PURE__ */ b.jsx(
|
|
54745
|
-
|
|
54753
|
+
ZU,
|
|
54746
54754
|
{
|
|
54747
54755
|
variable: Lu(),
|
|
54748
54756
|
onSave: m,
|
|
@@ -54750,7 +54758,7 @@ function BU({ environment: n, defaultExpanded: e }) {
|
|
|
54750
54758
|
isNew: !0
|
|
54751
54759
|
}
|
|
54752
54760
|
) : /* @__PURE__ */ b.jsx(
|
|
54753
|
-
|
|
54761
|
+
FU,
|
|
54754
54762
|
{
|
|
54755
54763
|
icon: /* @__PURE__ */ b.jsx(wu, {}),
|
|
54756
54764
|
variant: "secondary",
|
|
@@ -54765,24 +54773,24 @@ function BU({ environment: n, defaultExpanded: e }) {
|
|
|
54765
54773
|
}
|
|
54766
54774
|
) });
|
|
54767
54775
|
}
|
|
54768
|
-
const
|
|
54776
|
+
const NU = _.div`
|
|
54769
54777
|
display: flex;
|
|
54770
54778
|
flex-direction: row;
|
|
54771
54779
|
gap: var(--spacing-xxs);
|
|
54772
54780
|
align-items: center;
|
|
54773
|
-
`,
|
|
54781
|
+
`, MU = _(Ve)`
|
|
54774
54782
|
align-self: flex-start;
|
|
54775
54783
|
margin: 0;
|
|
54776
|
-
`,
|
|
54784
|
+
`, FU = _(MU)`
|
|
54777
54785
|
margin: 8px 0 8px -7px;
|
|
54778
54786
|
font-size: var(--font-size-base);
|
|
54779
54787
|
font-weight: var(--font-weight-regular);
|
|
54780
54788
|
line-height: var(--line-height-base);
|
|
54781
|
-
`,
|
|
54789
|
+
`, ZU = _(Bl)`
|
|
54782
54790
|
padding-left: 39px;
|
|
54783
54791
|
margin-left: -23px;
|
|
54784
54792
|
`;
|
|
54785
|
-
function
|
|
54793
|
+
function WU() {
|
|
54786
54794
|
const [n, e] = Ce(""), { environments: t, selectedEnvironmentId: r } = Le(), { sendEvent: i } = _t(), s = tt(
|
|
54787
54795
|
() => t.filter((l) => l.name.get().toLowerCase().includes(n.toLowerCase())),
|
|
54788
54796
|
[n, t]
|
|
@@ -54801,7 +54809,7 @@ function ZU() {
|
|
|
54801
54809
|
}, a = (l) => {
|
|
54802
54810
|
e(l);
|
|
54803
54811
|
};
|
|
54804
|
-
return /* @__PURE__ */ b.jsxs(
|
|
54812
|
+
return /* @__PURE__ */ b.jsxs(VU, { children: [
|
|
54805
54813
|
/* @__PURE__ */ b.jsxs(jO, { children: [
|
|
54806
54814
|
/* @__PURE__ */ b.jsx(QO, { value: n, onSearch: a }),
|
|
54807
54815
|
/* @__PURE__ */ b.jsx(_e, {}),
|
|
@@ -54818,7 +54826,7 @@ function ZU() {
|
|
|
54818
54826
|
) })
|
|
54819
54827
|
] }),
|
|
54820
54828
|
/* @__PURE__ */ b.jsx(BO, { children: s.map((l) => /* @__PURE__ */ b.jsx(
|
|
54821
|
-
|
|
54829
|
+
_U,
|
|
54822
54830
|
{
|
|
54823
54831
|
environment: l,
|
|
54824
54832
|
defaultExpanded: l.get().id === r.get()
|
|
@@ -54827,7 +54835,7 @@ function ZU() {
|
|
|
54827
54835
|
)) })
|
|
54828
54836
|
] });
|
|
54829
54837
|
}
|
|
54830
|
-
const
|
|
54838
|
+
const VU = _.div`
|
|
54831
54839
|
display: flex;
|
|
54832
54840
|
flex-direction: column;
|
|
54833
54841
|
width: 100%;
|
|
@@ -54838,12 +54846,12 @@ function tw({ name: n, value: e }) {
|
|
|
54838
54846
|
}, o = () => {
|
|
54839
54847
|
i("app_credential_copied", { name: n });
|
|
54840
54848
|
};
|
|
54841
|
-
return /* @__PURE__ */ b.jsxs(
|
|
54842
|
-
/* @__PURE__ */ b.jsxs(
|
|
54843
|
-
/* @__PURE__ */ b.jsx(
|
|
54844
|
-
/* @__PURE__ */ b.jsx(
|
|
54849
|
+
return /* @__PURE__ */ b.jsxs(zU, { children: [
|
|
54850
|
+
/* @__PURE__ */ b.jsxs(XU, { children: [
|
|
54851
|
+
/* @__PURE__ */ b.jsx(LU, { children: n }),
|
|
54852
|
+
/* @__PURE__ */ b.jsx(GU, { children: t ? e : "••••••••••••••••••••••••••••••••••••" })
|
|
54845
54853
|
] }),
|
|
54846
|
-
/* @__PURE__ */ b.jsxs(
|
|
54854
|
+
/* @__PURE__ */ b.jsxs(YU, { children: [
|
|
54847
54855
|
/* @__PURE__ */ b.jsx(
|
|
54848
54856
|
Ve,
|
|
54849
54857
|
{
|
|
@@ -54857,18 +54865,18 @@ function tw({ name: n, value: e }) {
|
|
|
54857
54865
|
] })
|
|
54858
54866
|
] });
|
|
54859
54867
|
}
|
|
54860
|
-
const
|
|
54868
|
+
const zU = _.div`
|
|
54861
54869
|
display: flex;
|
|
54862
54870
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
54863
54871
|
align-items: flex-start;
|
|
54864
54872
|
gap: var(--spacing-xs);
|
|
54865
54873
|
align-self: stretch;
|
|
54866
|
-
`,
|
|
54874
|
+
`, XU = _.div`
|
|
54867
54875
|
display: flex;
|
|
54868
54876
|
align-items: flex-start;
|
|
54869
54877
|
gap: 10px;
|
|
54870
54878
|
flex: 1 0 0;
|
|
54871
|
-
`,
|
|
54879
|
+
`, LU = _.div`
|
|
54872
54880
|
display: -webkit-box;
|
|
54873
54881
|
width: var(--64-px-4-rem-spacing-11, 64px);
|
|
54874
54882
|
-webkit-box-orient: vertical;
|
|
@@ -54881,20 +54889,20 @@ const VU = _.div`
|
|
|
54881
54889
|
font-style: normal;
|
|
54882
54890
|
font-weight: var(--font-weight-semibold);
|
|
54883
54891
|
line-height: var(--line-height-sm);
|
|
54884
|
-
`,
|
|
54892
|
+
`, GU = _.div`
|
|
54885
54893
|
flex: 1 0 0;
|
|
54886
54894
|
color: var(--text-color-primary);
|
|
54887
54895
|
font-size: var(--font-size-sm);
|
|
54888
54896
|
font-style: normal;
|
|
54889
54897
|
font-weight: var(--font-weight-regular);
|
|
54890
54898
|
line-height: var(--line-height-sm);
|
|
54891
|
-
`,
|
|
54899
|
+
`, YU = _.div`
|
|
54892
54900
|
display: flex;
|
|
54893
54901
|
justify-content: flex-end;
|
|
54894
54902
|
align-items: center;
|
|
54895
54903
|
gap: var(--spacing-xxs);
|
|
54896
54904
|
`;
|
|
54897
|
-
function
|
|
54905
|
+
function UU({ credential: n, number: e }) {
|
|
54898
54906
|
const {
|
|
54899
54907
|
requestActiveTabIdx: t,
|
|
54900
54908
|
request: { securityType: r, security: i }
|
|
@@ -54948,20 +54956,20 @@ function YU({ credential: n, number: e }) {
|
|
|
54948
54956
|
}
|
|
54949
54957
|
c("apps_use_key_clicked", { number: e });
|
|
54950
54958
|
};
|
|
54951
|
-
return /* @__PURE__ */ b.jsxs(
|
|
54952
|
-
/* @__PURE__ */ b.jsxs(
|
|
54953
|
-
/* @__PURE__ */ b.jsx(
|
|
54954
|
-
/* @__PURE__ */ b.jsxs(
|
|
54959
|
+
return /* @__PURE__ */ b.jsxs(qU, { children: [
|
|
54960
|
+
/* @__PURE__ */ b.jsxs(HU, { children: [
|
|
54961
|
+
/* @__PURE__ */ b.jsx(KU, { children: e.toString().padStart(2, "0") }),
|
|
54962
|
+
/* @__PURE__ */ b.jsxs(JU, { children: [
|
|
54955
54963
|
n.stage && /* @__PURE__ */ b.jsx(MO, { color: "gray", children: n.stage }),
|
|
54956
54964
|
/* @__PURE__ */ b.jsx(MO, { color: "green", children: n.status })
|
|
54957
54965
|
] })
|
|
54958
54966
|
] }),
|
|
54959
54967
|
o && /* @__PURE__ */ b.jsx(tw, { name: "API key", value: o }),
|
|
54960
54968
|
a && /* @__PURE__ */ b.jsx(tw, { name: o ? "Secret" : "API key", value: a }),
|
|
54961
|
-
/* @__PURE__ */ b.jsx(
|
|
54969
|
+
/* @__PURE__ */ b.jsx(eq, { children: /* @__PURE__ */ b.jsx(Ve, { size: "small", variant: "secondary", onClick: u, children: "Use key" }) })
|
|
54962
54970
|
] });
|
|
54963
54971
|
}
|
|
54964
|
-
const
|
|
54972
|
+
const qU = _.div`
|
|
54965
54973
|
display: flex;
|
|
54966
54974
|
flex-direction: column;
|
|
54967
54975
|
align-self: stretch;
|
|
@@ -54975,7 +54983,7 @@ const UU = _.div`
|
|
|
54975
54983
|
& > :not(:last-child) {
|
|
54976
54984
|
border-bottom: 1px solid var(--border-color-secondary);
|
|
54977
54985
|
}
|
|
54978
|
-
`,
|
|
54986
|
+
`, HU = _.div`
|
|
54979
54987
|
display: flex;
|
|
54980
54988
|
justify-content: space-between;
|
|
54981
54989
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
@@ -54983,16 +54991,16 @@ const UU = _.div`
|
|
|
54983
54991
|
align-items: center;
|
|
54984
54992
|
align-self: stretch;
|
|
54985
54993
|
background: var(--layer-color);
|
|
54986
|
-
`,
|
|
54994
|
+
`, JU = _.div`
|
|
54987
54995
|
display: flex;
|
|
54988
54996
|
gap: var(--spacing-xxs);
|
|
54989
|
-
`,
|
|
54997
|
+
`, KU = _.div`
|
|
54990
54998
|
color: var(--text-color-secondary, #3b3c45);
|
|
54991
54999
|
font-size: var(--font-size-sm);
|
|
54992
55000
|
font-style: normal;
|
|
54993
55001
|
font-weight: var(--font-weight-regular);
|
|
54994
55002
|
line-height: var(--line-height-sm);
|
|
54995
|
-
`,
|
|
55003
|
+
`, eq = _.div`
|
|
54996
55004
|
display: flex;
|
|
54997
55005
|
padding: var(--spacing-xs) var(--spacing-xs);
|
|
54998
55006
|
border-radius: 0 0 var(--border-radius-md) var(--border-radius-md);
|
|
@@ -55001,24 +55009,24 @@ const UU = _.div`
|
|
|
55001
55009
|
align-self: stretch;
|
|
55002
55010
|
background: var(--layer-color);
|
|
55003
55011
|
`;
|
|
55004
|
-
function
|
|
55012
|
+
function tq({ app: n }) {
|
|
55005
55013
|
const [e, t] = Ce(!1), { title: r, credentials: i, id: s } = n, o = i.get() || [], a = (l) => {
|
|
55006
55014
|
l && !i.get() && (t(!0), fetch(`/api/api-keys/apps/${s.get()}`).then((c) => c.json().then((u) => {
|
|
55007
55015
|
c.ok && i.set(u.credentials);
|
|
55008
55016
|
}).catch(() => console.log("Something went wrong")).finally(() => t(!1))));
|
|
55009
55017
|
};
|
|
55010
|
-
return /* @__PURE__ */ b.jsx(td, { dataTestId: `app-${name}`, title: r.get(), onToggle: a, children: /* @__PURE__ */ b.jsx(
|
|
55018
|
+
return /* @__PURE__ */ b.jsx(td, { dataTestId: `app-${name}`, title: r.get(), onToggle: a, children: /* @__PURE__ */ b.jsx(nq, { children: e ? /* @__PURE__ */ b.jsx(rq, { children: /* @__PURE__ */ b.jsx(_f, { size: "16px", color: "--icon-color-additional" }) }) : o.length ? o.map((l, c) => /* @__PURE__ */ b.jsx(UU, { credential: l, number: c + 1 }, l.id)) : /* @__PURE__ */ b.jsx(iq, { children: "There are no credentials yet." }) }) });
|
|
55011
55019
|
}
|
|
55012
|
-
const
|
|
55020
|
+
const nq = _.div`
|
|
55013
55021
|
padding-bottom: var(--spacing-xxs);
|
|
55014
55022
|
margin-left: -7px;
|
|
55015
55023
|
padding-right: var(--spacing-base);
|
|
55016
|
-
`,
|
|
55024
|
+
`, rq = _.div`
|
|
55017
55025
|
display: flex;
|
|
55018
55026
|
height: 224px;
|
|
55019
55027
|
justify-content: center;
|
|
55020
55028
|
align-items: center;
|
|
55021
|
-
`,
|
|
55029
|
+
`, iq = _.div`
|
|
55022
55030
|
display: flex;
|
|
55023
55031
|
justify-content: center;
|
|
55024
55032
|
align-items: center;
|
|
@@ -55027,7 +55035,7 @@ const tq = _.div`
|
|
|
55027
55035
|
line-height: var(--line-height-base);
|
|
55028
55036
|
color: var(--text-color-secondary);
|
|
55029
55037
|
`;
|
|
55030
|
-
function
|
|
55038
|
+
function sq() {
|
|
55031
55039
|
const [n, e] = Ce(""), { apps: t, apiId: r, appsLoadingState: i } = Le(), { sendEvent: s } = _t(), o = () => {
|
|
55032
55040
|
window.open("/apps", "_blank"), s("apps_request_access_clicked", {});
|
|
55033
55041
|
};
|
|
@@ -55042,26 +55050,26 @@ function iq() {
|
|
|
55042
55050
|
), l = (c) => {
|
|
55043
55051
|
e(c);
|
|
55044
55052
|
};
|
|
55045
|
-
return i.get() === Ur.Loading ? /* @__PURE__ */ b.jsx(
|
|
55053
|
+
return i.get() === Ur.Loading ? /* @__PURE__ */ b.jsx(aq, { children: /* @__PURE__ */ b.jsx(_f, { size: "24px", color: "--icon-color-additional" }) }) : t.length ? /* @__PURE__ */ b.jsxs(oq, { children: [
|
|
55046
55054
|
/* @__PURE__ */ b.jsx(jO, { children: /* @__PURE__ */ b.jsx(QO, { value: n, onSearch: l }) }),
|
|
55047
|
-
/* @__PURE__ */ b.jsx(BO, { children: a.map((c) => /* @__PURE__ */ b.jsx(
|
|
55055
|
+
/* @__PURE__ */ b.jsx(BO, { children: a.map((c) => /* @__PURE__ */ b.jsx(tq, { app: c }, c.get().id)) })
|
|
55048
55056
|
] }) : /* @__PURE__ */ b.jsxs($T, { children: [
|
|
55049
55057
|
"You don't have any apps with access to this API",
|
|
55050
55058
|
/* @__PURE__ */ b.jsx(Ve, { onClick: o, children: "Request access" })
|
|
55051
55059
|
] });
|
|
55052
55060
|
}
|
|
55053
|
-
const
|
|
55061
|
+
const oq = _.div`
|
|
55054
55062
|
display: flex;
|
|
55055
55063
|
flex-direction: column;
|
|
55056
55064
|
width: 100%;
|
|
55057
|
-
`,
|
|
55065
|
+
`, aq = _.div`
|
|
55058
55066
|
display: flex;
|
|
55059
55067
|
justify-content: center;
|
|
55060
55068
|
align-items: center;
|
|
55061
55069
|
width: 100%;
|
|
55062
55070
|
height: calc(100vh - 50px);
|
|
55063
|
-
}`, { Tab:
|
|
55064
|
-
function
|
|
55071
|
+
}`, { Tab: lq, TabContent: cq, TabList: uq, Tabs: fq } = aI.components;
|
|
55072
|
+
function dq() {
|
|
55065
55073
|
const { apiId: n } = Le(), { sendEvent: e } = _t(), [t, r] = Ce(!0), i = Je(
|
|
55066
55074
|
(a) => {
|
|
55067
55075
|
e("side_panel_tab_changed", { name: a });
|
|
@@ -55072,20 +55080,20 @@ function fq() {
|
|
|
55072
55080
|
}, o = tt(() => {
|
|
55073
55081
|
const a = [
|
|
55074
55082
|
/* @__PURE__ */ b.jsx(Tp, { label: "History", onClick: () => i("History"), children: /* @__PURE__ */ b.jsx(hU, {}) }, "History"),
|
|
55075
|
-
/* @__PURE__ */ b.jsx(Tp, { label: "Environments", onClick: () => i("Environments"), children: /* @__PURE__ */ b.jsx(
|
|
55083
|
+
/* @__PURE__ */ b.jsx(Tp, { label: "Environments", onClick: () => i("Environments"), children: /* @__PURE__ */ b.jsx(WU, {}) }, "Environments")
|
|
55076
55084
|
];
|
|
55077
55085
|
return n.get() && a.push(
|
|
55078
|
-
/* @__PURE__ */ b.jsx(Tp, { label: "Apps", onClick: () => i("Apps"), children: /* @__PURE__ */ b.jsx(
|
|
55086
|
+
/* @__PURE__ */ b.jsx(Tp, { label: "Apps", onClick: () => i("Apps"), children: /* @__PURE__ */ b.jsx(sq, {}) })
|
|
55079
55087
|
), a;
|
|
55080
55088
|
}, [n, i]);
|
|
55081
|
-
return /* @__PURE__ */ b.jsxs(
|
|
55082
|
-
t && /* @__PURE__ */ b.jsxs(
|
|
55089
|
+
return /* @__PURE__ */ b.jsxs(hq, { $expanded: t, children: [
|
|
55090
|
+
t && /* @__PURE__ */ b.jsxs(pq, { children: [
|
|
55083
55091
|
...o
|
|
55084
55092
|
] }),
|
|
55085
|
-
/* @__PURE__ */ b.jsx(
|
|
55093
|
+
/* @__PURE__ */ b.jsx(gq, { variant: "text", onClick: s, children: t ? /* @__PURE__ */ b.jsx(lI, {}) : /* @__PURE__ */ b.jsx(cI, {}) })
|
|
55086
55094
|
] });
|
|
55087
55095
|
}
|
|
55088
|
-
const
|
|
55096
|
+
const hq = _.div`
|
|
55089
55097
|
display: flex;
|
|
55090
55098
|
flex-direction: row;
|
|
55091
55099
|
border-left: 1px solid var(--border-color-secondary);
|
|
@@ -55097,13 +55105,13 @@ const dq = _.div`
|
|
|
55097
55105
|
svg {
|
|
55098
55106
|
fill: var(--text-color-primary);
|
|
55099
55107
|
}
|
|
55100
|
-
`,
|
|
55108
|
+
`, pq = _(fq)`
|
|
55101
55109
|
flex-grow: 1;
|
|
55102
55110
|
margin-right: -48px;
|
|
55103
55111
|
margin-top: 0;
|
|
55104
55112
|
--md-tabs-content-padding: 0;
|
|
55105
55113
|
|
|
55106
|
-
${
|
|
55114
|
+
${uq} {
|
|
55107
55115
|
margin: 0;
|
|
55108
55116
|
height: 49px;
|
|
55109
55117
|
font-size: var(--font-size-lg);
|
|
@@ -55118,11 +55126,11 @@ const dq = _.div`
|
|
|
55118
55126
|
--md-tabs-hover-tab-border-width: 0;
|
|
55119
55127
|
}
|
|
55120
55128
|
|
|
55121
|
-
${
|
|
55129
|
+
${cq} {
|
|
55122
55130
|
overflow: auto;
|
|
55123
55131
|
}
|
|
55124
55132
|
|
|
55125
|
-
${
|
|
55133
|
+
${lq} {
|
|
55126
55134
|
font-size: var(--font-size-lg);
|
|
55127
55135
|
font-weight: var(--font-weight-regular);
|
|
55128
55136
|
line-height: var(--line-height-lg);
|
|
@@ -55144,57 +55152,57 @@ const dq = _.div`
|
|
|
55144
55152
|
ol[class^='Tabs__TabList'] {
|
|
55145
55153
|
padding: 0 0 0 var(--spacing-base);
|
|
55146
55154
|
}
|
|
55147
|
-
`,
|
|
55155
|
+
`, gq = _(Ve)`
|
|
55148
55156
|
align-self: flex-start;
|
|
55149
55157
|
margin: 12px;
|
|
55150
55158
|
padding: 4px;
|
|
55151
|
-
`, Tp = _.li``,
|
|
55152
|
-
/* @__PURE__ */ b.jsx(
|
|
55153
|
-
/* @__PURE__ */ b.jsx(
|
|
55154
|
-
/* @__PURE__ */ b.jsx(
|
|
55155
|
-
] }),
|
|
55159
|
+
`, Tp = _.li``, mq = ({ error: n }) => /* @__PURE__ */ b.jsxs(Oq, { children: [
|
|
55160
|
+
/* @__PURE__ */ b.jsx(vq, { children: "An Error Has Occurred" }),
|
|
55161
|
+
/* @__PURE__ */ b.jsx(xq, { children: n == null ? void 0 : n.message }),
|
|
55162
|
+
/* @__PURE__ */ b.jsx(bq, { children: n == null ? void 0 : n.stack })
|
|
55163
|
+
] }), Oq = _.div`
|
|
55156
55164
|
padding: var(--spacing-xs) var(--spacing-xl);
|
|
55157
|
-
`,
|
|
55165
|
+
`, vq = _.h2`
|
|
55158
55166
|
color: var(--color-error-base);
|
|
55159
|
-
`,
|
|
55167
|
+
`, xq = _.h4`
|
|
55160
55168
|
color: var(--text-color-secondary);
|
|
55161
|
-
`,
|
|
55169
|
+
`, bq = _.pre`
|
|
55162
55170
|
white-space: break-spaces;
|
|
55163
55171
|
`;
|
|
55164
|
-
function
|
|
55165
|
-
return /* @__PURE__ */ b.jsx(
|
|
55172
|
+
function yq({ className: n }) {
|
|
55173
|
+
return /* @__PURE__ */ b.jsx(Sq, { className: n, children: /* @__PURE__ */ b.jsxs(wq, { children: [
|
|
55166
55174
|
/* @__PURE__ */ b.jsx(uw, { size: "24px", color: "--color-error-base" }),
|
|
55167
|
-
/* @__PURE__ */ b.jsxs(
|
|
55168
|
-
/* @__PURE__ */ b.jsx(
|
|
55169
|
-
/* @__PURE__ */ b.jsx(
|
|
55175
|
+
/* @__PURE__ */ b.jsxs(Cq, { children: [
|
|
55176
|
+
/* @__PURE__ */ b.jsx(kq, { children: "Oops! Something went wrong." }),
|
|
55177
|
+
/* @__PURE__ */ b.jsx(Aq, { children: "We're sorry. There's been an unexpected error. Our team has been notified and will investigate the issue." })
|
|
55170
55178
|
] })
|
|
55171
55179
|
] }) });
|
|
55172
55180
|
}
|
|
55173
|
-
const
|
|
55181
|
+
const Sq = _.div`
|
|
55174
55182
|
display: flex;
|
|
55175
55183
|
justify-content: center;
|
|
55176
55184
|
align-items: center;
|
|
55177
55185
|
width: 80vw;
|
|
55178
55186
|
height: 100vh;
|
|
55179
55187
|
background-color: var(--bg-color);
|
|
55180
|
-
`,
|
|
55188
|
+
`, wq = _.div`
|
|
55181
55189
|
display: flex;
|
|
55182
55190
|
flex-direction: column;
|
|
55183
55191
|
align-items: center;
|
|
55184
55192
|
gap: var(--spacing-base);
|
|
55185
|
-
`,
|
|
55193
|
+
`, Cq = _.div`
|
|
55186
55194
|
display: flex;
|
|
55187
55195
|
flex-direction: column;
|
|
55188
55196
|
align-items: center;
|
|
55189
55197
|
gap: var(--spacing-xxs);
|
|
55190
55198
|
width: 488px;
|
|
55191
|
-
`,
|
|
55199
|
+
`, kq = _.div`
|
|
55192
55200
|
color: var(--text-color-primary);
|
|
55193
55201
|
font-size: var(--font-size-xl);
|
|
55194
55202
|
font-style: normal;
|
|
55195
55203
|
font-weight: var(--font-weight-semibold);
|
|
55196
55204
|
line-height: var(--line-height-xl);
|
|
55197
|
-
`,
|
|
55205
|
+
`, Aq = _.div`
|
|
55198
55206
|
color: var(--text-color-primary);
|
|
55199
55207
|
font-size: var(--font-size-lg);
|
|
55200
55208
|
font-style: normal;
|
|
@@ -55231,31 +55239,31 @@ class RT extends U.Component {
|
|
|
55231
55239
|
this.setState(r), (s = (i = this.props).onError) == null || s.call(i, r.error);
|
|
55232
55240
|
}
|
|
55233
55241
|
render() {
|
|
55234
|
-
return this.state.error ? process.env.NODE_ENV === "production" ? /* @__PURE__ */ b.jsx(
|
|
55242
|
+
return this.state.error ? process.env.NODE_ENV === "production" ? /* @__PURE__ */ b.jsx(yq, {}) : /* @__PURE__ */ b.jsx(mq, { error: this.state.error }) : this.props.children;
|
|
55235
55243
|
}
|
|
55236
55244
|
}
|
|
55237
|
-
function
|
|
55245
|
+
function Pq({ className: n }) {
|
|
55238
55246
|
const { operationUrl: e } = Le().get(), { sendEvent: t } = _t();
|
|
55239
55247
|
return /* @__PURE__ */ b.jsxs(b.Fragment, { children: [
|
|
55240
55248
|
/* @__PURE__ */ b.jsx(uI, {}),
|
|
55241
|
-
/* @__PURE__ */ b.jsx(
|
|
55249
|
+
/* @__PURE__ */ b.jsx(Eq, { className: n, children: /* @__PURE__ */ b.jsxs(
|
|
55242
55250
|
RT,
|
|
55243
55251
|
{
|
|
55244
55252
|
onError: (r) => t("unhandled_error", { ...r, operationUrl: e }),
|
|
55245
55253
|
children: [
|
|
55246
55254
|
/* @__PURE__ */ b.jsx(kT, {}),
|
|
55247
|
-
/* @__PURE__ */ b.jsx(
|
|
55255
|
+
/* @__PURE__ */ b.jsx(dq, {})
|
|
55248
55256
|
]
|
|
55249
55257
|
}
|
|
55250
55258
|
) })
|
|
55251
55259
|
] });
|
|
55252
55260
|
}
|
|
55253
|
-
const
|
|
55261
|
+
const Eq = _.div`
|
|
55254
55262
|
display: flex;
|
|
55255
55263
|
height: 100vh;
|
|
55256
55264
|
background-color: var(--bg-color);
|
|
55257
55265
|
`;
|
|
55258
|
-
function
|
|
55266
|
+
function Tq(n, e) {
|
|
55259
55267
|
const t = zE(n), r = VE(n), i = vX(n), s = gX(n), o = n.request.get().body.activeExampleName, a = n.request.get().body.type, l = CO(n);
|
|
55260
55268
|
return {
|
|
55261
55269
|
requestValues: {
|
|
@@ -55278,8 +55286,8 @@ function Eq(n, e) {
|
|
|
55278
55286
|
)
|
|
55279
55287
|
};
|
|
55280
55288
|
}
|
|
55281
|
-
function
|
|
55282
|
-
const { servers: t, parameters: r } = n, i = r.filter((o) => o.in === "path"), s =
|
|
55289
|
+
function Iq(n, e) {
|
|
55290
|
+
const { servers: t, parameters: r } = n, i = r.filter((o) => o.in === "path"), s = $q(n);
|
|
55283
55291
|
return t.map((o) => {
|
|
55284
55292
|
const a = o.url, l = o.description || a, c = o.variables || {}, u = Object.entries(c).map(([m, g]) => {
|
|
55285
55293
|
const v = Za.getEnvironmentVariableByName(
|
|
@@ -55331,7 +55339,7 @@ function Tq(n, e) {
|
|
|
55331
55339
|
state: Or.Normal,
|
|
55332
55340
|
canBeRemoved: !1,
|
|
55333
55341
|
canBeEdited: !1,
|
|
55334
|
-
variables:
|
|
55342
|
+
variables: Rq(
|
|
55335
55343
|
[
|
|
55336
55344
|
...p,
|
|
55337
55345
|
{
|
|
@@ -55351,7 +55359,7 @@ function Tq(n, e) {
|
|
|
55351
55359
|
};
|
|
55352
55360
|
});
|
|
55353
55361
|
}
|
|
55354
|
-
function
|
|
55362
|
+
function $q(n) {
|
|
55355
55363
|
const e = [], t = n.security || [], r = /* @__PURE__ */ new Set();
|
|
55356
55364
|
return t.forEach((i) => {
|
|
55357
55365
|
const s = as(i);
|
|
@@ -55374,7 +55382,7 @@ function Gr(n, e) {
|
|
|
55374
55382
|
isSecret: e === void 0 ? !0 : e
|
|
55375
55383
|
};
|
|
55376
55384
|
}
|
|
55377
|
-
function
|
|
55385
|
+
function Rq(n, e) {
|
|
55378
55386
|
return e ? n.map((t) => {
|
|
55379
55387
|
const r = e[t.name];
|
|
55380
55388
|
return r !== void 0 ? {
|
|
@@ -55398,16 +55406,16 @@ function DT({ value: n, disableDraft: e, ...t }) {
|
|
|
55398
55406
|
oAuth2RedirectURI: h
|
|
55399
55407
|
} = r;
|
|
55400
55408
|
return Xe(() => {
|
|
55401
|
-
const p = t.operationUrl && !e ? mT.getByKey(t.operationUrl) : null, m = Yn(n), g =
|
|
55409
|
+
const p = t.operationUrl && !e ? mT.getByKey(t.operationUrl) : null, m = Yn(n), g = Iq(m, t.predefinedEnvValues), v = g.find(
|
|
55402
55410
|
({ name: O, url: x }) => x === (t == null ? void 0 : t.environment) || O === (t == null ? void 0 : t.environment)
|
|
55403
55411
|
);
|
|
55404
55412
|
i.set(m), l.set(g), a.set(t.corsProxyUrl ?? tY), o.set(null), c.set(t.operationUrl), u.set(t.mockServer), d.set(t.apiId), h.set(t.oAuth2RedirectURI), v && f.set(v.id), p ? s.set(p) : s.set(kO(m)), ME(r);
|
|
55405
55413
|
}, [n]), r;
|
|
55406
55414
|
}
|
|
55407
|
-
function
|
|
55415
|
+
function Hq({ onClose: n, onLoad: e, onRequestChange: t, ...r }) {
|
|
55408
55416
|
const i = ct(null), { sendEvent: s } = _t(), o = Le(), a = DT(r), l = Je(() => {
|
|
55409
55417
|
if (t) {
|
|
55410
|
-
const u = a.isLinked.get(), f =
|
|
55418
|
+
const u = a.isLinked.get(), f = Tq(a, r.value);
|
|
55411
55419
|
t(u ? f : { requestValues: {} });
|
|
55412
55420
|
}
|
|
55413
55421
|
s("replay_closed", { operationName: r.value.name }), n(), o.set(eo());
|
|
@@ -55422,7 +55430,7 @@ function qq({ onClose: n, onLoad: e, onRequestChange: t, ...r }) {
|
|
|
55422
55430
|
};
|
|
55423
55431
|
return /* @__PURE__ */ b.jsx(iw, { children: /* @__PURE__ */ b.jsxs(Mk, { onClick: l, children: [
|
|
55424
55432
|
/* @__PURE__ */ b.jsx(
|
|
55425
|
-
|
|
55433
|
+
Qq,
|
|
55426
55434
|
{
|
|
55427
55435
|
onClick: l,
|
|
55428
55436
|
role: "button",
|
|
@@ -55430,15 +55438,15 @@ function qq({ onClose: n, onLoad: e, onRequestChange: t, ...r }) {
|
|
|
55430
55438
|
tabIndex: 0,
|
|
55431
55439
|
ref: i,
|
|
55432
55440
|
autoFocus: !0,
|
|
55433
|
-
children: /* @__PURE__ */ b.jsx(
|
|
55441
|
+
children: /* @__PURE__ */ b.jsx(jq, {})
|
|
55434
55442
|
}
|
|
55435
55443
|
),
|
|
55436
|
-
/* @__PURE__ */ b.jsx(
|
|
55444
|
+
/* @__PURE__ */ b.jsx(Dq, {})
|
|
55437
55445
|
] }) });
|
|
55438
55446
|
}
|
|
55439
|
-
const
|
|
55447
|
+
const Dq = _(Pq)`
|
|
55440
55448
|
width: 80vw;
|
|
55441
|
-
`,
|
|
55449
|
+
`, Qq = _.div`
|
|
55442
55450
|
display: flex;
|
|
55443
55451
|
justify-content: center;
|
|
55444
55452
|
align-items: center;
|
|
@@ -55451,30 +55459,30 @@ const Rq = _(Aq)`
|
|
|
55451
55459
|
width: 24px;
|
|
55452
55460
|
height: 24px;
|
|
55453
55461
|
cursor: pointer;
|
|
55454
|
-
`,
|
|
55462
|
+
`, jq = _(Bo)`
|
|
55455
55463
|
width: 14px;
|
|
55456
55464
|
height: 14px;
|
|
55457
55465
|
`;
|
|
55458
|
-
function
|
|
55466
|
+
function Jq(n) {
|
|
55459
55467
|
const { sendEvent: e } = _t(), t = tt(() => Uw(eo()), []);
|
|
55460
55468
|
return /* @__PURE__ */ b.jsx(ZG, { value: t, children: /* @__PURE__ */ b.jsx(
|
|
55461
55469
|
RT,
|
|
55462
55470
|
{
|
|
55463
55471
|
onError: (r) => e("unhandled_error", { ...r, isEmbedded: !0 }),
|
|
55464
|
-
children: /* @__PURE__ */ b.jsx(
|
|
55472
|
+
children: /* @__PURE__ */ b.jsx(Bq, { ...n })
|
|
55465
55473
|
}
|
|
55466
55474
|
) });
|
|
55467
55475
|
}
|
|
55468
|
-
function
|
|
55469
|
-
return DT({ ...n, disableDraft: !0 }), /* @__PURE__ */ b.jsx(iw, { children: /* @__PURE__ */ b.jsx(
|
|
55476
|
+
function Bq(n) {
|
|
55477
|
+
return DT({ ...n, disableDraft: !0 }), /* @__PURE__ */ b.jsx(iw, { children: /* @__PURE__ */ b.jsx(_q, { children: /* @__PURE__ */ b.jsx(kT, {}) }) });
|
|
55470
55478
|
}
|
|
55471
|
-
const
|
|
55479
|
+
const _q = _.div`
|
|
55472
55480
|
display: flex;
|
|
55473
55481
|
max-height: 80vh;
|
|
55474
55482
|
height: 800px;
|
|
55475
55483
|
width: 100%;
|
|
55476
55484
|
`;
|
|
55477
55485
|
export {
|
|
55478
|
-
|
|
55479
|
-
|
|
55486
|
+
Jq as EmbeddedReplay,
|
|
55487
|
+
Hq as ReplayOverlay
|
|
55480
55488
|
};
|