UNPKG

n8n-editor-ui

Version:

Workflow Editor UI for n8n

2 lines 2.16 kB
!function(){try{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"n8n@2.16.1"}}catch(e){}}(),System.register(["./vue.runtime.esm-bundler-legacy-BW6xDdqj.js","./core-legacy-VD8c7QJ-.js"],(function(e,n){var t,u,l,a,i;return e("t",(function(e,{container:n,defaultSize:o,snap:s=!0,minSize:d=0,maxSize:r=(e=>e),position:v="left",allowCollapse:f,allowFullSize:c}){const b=t(0),g=i(e,-1,{writeDefaults:!1}),y=t(!1),m=t(),h=u((()=>R(d,b.value))),w=u((()=>R(r,b.value))),p=u((()=>{const e=g.value>=0&&g.value<=1?b.value*g.value:-1;if(y.value&&f&&e<30)return 0;if(y.value&&c&&e>b.value-30)return b.value;const n=R(o,b.value);return Number.isNaN(e)||!Number.isFinite(e)||e<0?n:Math.max(h.value,Math.min(s&&Math.abs(n-e)<30?n:e,w.value))}));function z(e){return"bottom"===v?e.offsetHeight:e.offsetWidth}function S(e){return"bottom"===v?e.y:e.x}function R(e,n){return"number"==typeof e?e:e(n)}return a((()=>l(n)),((e,n,t)=>{if(!e)return;const u=new ResizeObserver((()=>{b.value=z(e)}));u.observe(e),b.value=z(e),t((()=>u.disconnect()))}),{immediate:!0}),{isResizing:u((()=>y.value)),isCollapsed:u((()=>y.value&&p.value<=0)),isFullSize:u((()=>y.value&&p.value>=b.value)),size:p,onResize:function(e){const t=l(n)?.getBoundingClientRect(),u=Math.max(0,"bottom"===v?(t?(a=t,"bottom"===v?a.height:a.width):0)-S(e):S(e)-(t?S(t):0));var a;y.value=!0,g.value=u/b.value,void 0===m.value&&(m.value=g.value)},onResizeEnd:function(){(h.value>0&&p.value<=0||w.value<b.value&&p.value>=b.value)&&(g.value=m.value),m.value=void 0,y.value=!1}}})),{setters:[function(e){t=e.Ft,u=e.S,l=e.Wt,a=e.gt},function(e){i=e.v}],execute:function(){try{e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},(n=(new e.Error).stack)&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6089a2e-39dc-4d93-8200-801fd2c0a2c3",e._sentryDebugIdIdentifier="sentry-dbid-d6089a2e-39dc-4d93-8200-801fd2c0a2c3")}catch(e){}var e,n}}})); //# sourceMappingURL=useResizablePanel-legacy-BdkDGWxP.js.map