Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

resizable-panes-js

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resizable-panes-js - npm Package Compare versions

Comparing version 6.0.21 to 6.0.22

lib/cjs/index.cjs.js.map

1

lib/cjs/index.cjs.js
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="visibility",f="size",l="defaultMinSize",v="defaultMaxSize",d="resize",z="onNormalSize",S="mouseup",h="mousemove",p="mousedown",m="touchmove",g="touchend",x="touchstart",y=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},b=function(e,n){var t=ni(i({},e)),r=n.onMinSize,o=void 0===r?J:r,a=n.onMaxSize,u=void 0===a?J:a,s=n.onNormalSize,c=void 0===s?J:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},M=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},w=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=M(i,t);return Math.abs(r-t)},E=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},R=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},C=function(i){i.initialSetSize=i.size},O=function(i){i.size=i.initialSetSize},V=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},I=function(i){i.size=i.defaultSize,L(i),E(i,i.defaultVisibility)},L=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},k=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},T=function(i){return i.minSize=i.defaultMinSize,i.minSize},j=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},P=function(i){return i.size-i.defaultMinSize},D=function(i){return i.defaultMaxSize-i.size},H=function(i){i.size=i.minSize},N=function(i){i.size=i.maxSize},U=function(i){i.axisSize=i.size},X=function(i){i.api.setSize(F(i))},Y=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":z,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},_=function(e){var n,t=$(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},F=function(i){return i.visibility?i.size:0},B=function(i){return i.visibility?i.sizeRatio:0},K=function(i,e){i.size=e,i.storedSize=e},q=function(i,e,n,t,r,o,a){K(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},J=function(i){return i},W=function(i,e){return i.find((function(i){return i.id===e}))},G=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===f?F(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Q=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Z=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},$=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ii=function(i){return i===r},ei=function(i){return"".concat("resizer","-").concat(i)},ni=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ti=function(i){return e([],i,!0).reverse()},ri=function(i){return i.filter((function(i){return i}))},oi=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ai=function(i,e,n,t){var r;this.sizeState=z,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=b(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,S=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==u&&y(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var x=g.size,M=g.defaultMaxSize,w=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;q(this,x,w,M,E,C,R)}else q(this,c,s,f,c,c,m);this.id=a,this.vertical=S,V(this),this.isHandle=t,t&&(this.id=ei(a),this.resizerSize=l,this.detectionRadius=v)},ui=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),si=function(i){i.forEach(X)},ci=function(i){return i.filter((function(i){return i.visibility}))};function fi(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var li=function(i,e,n){return fi(i,j,e,n)},vi=function(i,e,n){return fi(i,A,e,n)},di=function(i,e,n){return fi(i,F,e,n)},zi=function(i,e,n,t){for(var r=i.virtualOrderList,o=i.index,a=0;a<r.length;a++)a<=o?e(r[a],t):n(r[a],t)},Si=function(i,e,n){var t=i.size+(n===o?e:-e);K(i,t)},hi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(Si(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void Si(i[t],e,n);++r}},pi=function(i,e){var n,t=e.axisCoordinate,r=e.decreasingItems,u=e.increasingItems,s=e.direction,c=r,f=u;if(ii(s)?(n=t-i,c=ti(r)):(n=i-t,f=ti(u)),n<0);else if(0===n)return;var l=n;c.forEach((function(i){n=w(i,n,a)})),l-=n,f.forEach((function(i){l=w(i,l,o)}))},mi=function(i){var n,t=i.items,r=i.direction,o=i.handleId,a=ci(t),u=Q(a,o),s=[],c=[],f=function(i,e){var n=a[i];n.size?(c[i]=n,c[i+e]=a[i+e]):(c[i]=a[i+e],c[i+e]=n)};if(ii(r)){for(var l=u-1;l>-1;l-=2)s.push(a[l],a[l-1]);for(s.reverse(),c=[a[u]],l=u+1;l<a.length;l+=2)f(l,1);n=e(e([],s,!0),c,!0)}else{for(c=[a[0]],l=u-1;l>0;l-=2)f(l,-1);for(c.push(a[u]),l=u+1;l<a.length;l+=2)s.push(a[l],a[l+1]);n=e(e([],c,!0),s,!0)}i.virtualOrderList=ri(n),i.increasingItems=ri(c),i.decreasingItems=ri(s),i.index=Q(i.virtualOrderList,o)},gi=function(i){var e=bi(i).containerSize,n=i.virtualOrderList,t=i.index,r=t+1,o=P(n[t]),a=D(n[r]);xi(n,o-a,t,r,0,e);var u=P(n[r]),s=D(n[t]);yi(n,s-u,t,r,0,e)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=T(f)},d=function(){r+=k(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=P(i[s=n-1])-D(i[c]);break;case e>0:d(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=li(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void li(i,t+1,u);case e>0:d(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=P(i[s=n-1])+e;break;case 0===e:return v(),d(),void vi(i,0,n-1);case e>0:return d(),r+=vi(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}xi(i,a,s,c,r,o)},yi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=k(f)},d=function(){r+=T(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=D(i[s=n-1])-P(i[c]);break;case e>0:d(),a=e-P(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=vi(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void vi(i,t+1,u);case e>0:d(),a=e-P(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=D(i[s=n-1])+e;break;case 0===e:return v(),d(),void li(i,0,n-1);case e>0:return d(),r+=li(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}yi(i,a,s,c,r,o)},bi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-di(t)}},Mi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=bi(i).maxPaneSize,s=function(i){return fi(i,B)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=Z(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Z(e,n,v),o=Z(e,n,d)),t||(i.minMaxUnit!==u?y(z,r,o,i.id):y(c,s,f,i.id)),q(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=di(n),f=r-c,l=f<0?a:o;hi(n,Math.abs(f),l),si(t)}},wi=function(i){var e=i.items;return bi(i).containerSize-di(e)},Ei=function(i,e){var n=i.panesList;e!==u&&n.forEach(V),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ri=function(i){return"".concat(i,"px")},Ci=function(i){return i?"width":"height"},Oi=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Vi=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Ii=function(i){return i<0?r:n},Li=function(i,e){return function(n){i.style[Ci(e)]=Ri(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},Ti=function(i,e,n){i.addEventListener(n,e,{passive:!1})},ji=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},Ai=function(i,e,n){var t={panes:n.panesList.map(_)};e&&e.setItem(i,JSON.stringify(t))},Pi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=W(n,i))&&void 0!==e?e:null},i}(),Di=function(i,e,n){var t=e-di(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)hi(n,u,r);else{var s=di(n),c=[];n.forEach((function(i){var e=F(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return L(i),M(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Di(i,e,c)}}},Hi=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){U(e),L(e),i=w(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Ni=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=ci(a),f=ci(s),l=Q(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(O):(a.forEach(C),i.setSizeKey=v);var d=di(c),z=c[l];L(z);var S=z.size,h=M(z,t),p=h-S;if(p){var m=Q(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var x=d-z.size;Di(g,x,g)}if(Hi(p,r,f,m),!o){var y=wi(i);Ni(i,n,h+y,r,!0)}}}};var Ui=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Xi=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=ci(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=F(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},Yi=function(e){var o=e.vertical,a=e.children,d=e.unit,z=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),x=new Pi(z,S,g),y=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ai(i.props,e,n,!1),new ai(i.props,e,n,!0))})),t.pop(),t}(g,e,x),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(y),M=b[0],w=b[1],C=new ui;C.register({vertical:o,items:y,panesList:M,resizersList:w});var O=function(){return function(i){return i.forEach(U)}(y)},V=function(){var i=k();h(i),Ai(z,S,C),Xi(C)},L=function(){var i=T();p(i)},k=function(){return G(M,f)},T=function(){return G(M,c)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(C.handleId,i)}))};C.onMouseDown=function(i,e){var n=i[0];C.register({handleId:e,direction:t,axisCoordinate:n}),j(!0),O()};var A=function(i){void 0===i&&(i=""),Ei(C,i),function(i){i.forEach(Y)}(M)};C.onMoveResize=function(i){var e,n=i[0],t=i[1];!C.isViewSizeChanged&&t&&(P(n,t),X(n)&&pi(n,C),si(y),A(),e=k(),m(e))};var P=function(i,e){var n=C.direction,t=Ii(e);t!==n&&(C.direction=t,D(i))},D=function(i){C.axisCoordinate=i,mi(C),O(),gi(C),function(i){var e=i.items,n=i.index,t=bi(i).maxTopAxis,r=ci(e);i.bottomAxis=t+fi(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return fi(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(C)},X=function(i){var e=C.topAxis,t=C.bottomAxis;return i<=e?(zi(C,H,N,r),O(),C.axisCoordinate=e,!1):!(i>=t&&(zi(C,N,H,n),O(),C.axisCoordinate=t,1))},_=function(e){var n=C.newVisibilityModel,t=G(M,c),r=i(i({},t),e);n||(C.newVisibilityModel=!0,M.forEach(R)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;E(u,e[s]),E(r[a+1],!1),u.visibility&&(-1!==o&&E(r[a-1],!0),o=a)}var c=ci(t);0===di(c)&&c.forEach((function(i){i.size=1}));var f=bi(i).maxPaneSize;Di(c,f,c)}(C,r);var o=wi(C);C.isViewSizeChanged=!!o,si(y),V(),L(),A(c)};C.onMouseUp=function(){V(),j(!1)};var B=function(){si(y),V(),A(s)},K={restore:function(){!function(i){i.forEach(I),si(i)}(C.items),A(),V(),L(),C.isViewSizeChanged=!1},setVisibilities:_,getSizes:k,getVisibilities:function(){return T()},getState:function(){return G(M,f,c,l,v)},setSize:function(i,e,n){Ni(C,i,e,n),B()},setSizeRatio:function(i,e,n){var t=bi(C).containerSize;Ni(C,i,t*e,n),B()}};return C.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),q(i,n,n,n,n,n,i.visibility)}}(W(y,e),i)},registerContainer:function(i){C.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(x.empty&&d===u&&!C.isSetRatioMode)Mi(C),C.isSetRatioMode=!0;else{var t=x.getStorage(z,S).panes;n=G(t,c)}_(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=F(W(M,i));return function(i,e){var n;return(n={})[Ci(i)]=Ri(e),n}(o,e)}}),C},_i=function(){return _i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},_i.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Fi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ki=function(i){return document.getElementById(i)},qi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Q(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ei(i),c=Ki(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ri(n)}}(c,r);Fi(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Fi(i,n),Bi(i,t)):(Fi(i,t),Bi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};exports.BUTTOM_FIRST="1",exports.RATIO=u,exports.TOP_FIRST="2",exports.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return _i({onResize:J,onResizeStop:J,onReady:J,onChangeVisibility:J,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=Yi(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Ki(i);Fi(r,"overflow-hidden flex-shrink-0"),e({setSize:Li(r,t)},i)}(r,a,e),t!==n.length-1&&qi(r,a,o)}));var f=function(){r===u&&(Mi(o,!0),Xi(o),Ei(o))};ki(window,f,d);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Ki(i),a=Oi(t,"",r);return Fi(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Vi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),ji(document,t,h,m)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Vi(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=oi(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Vi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,h),Ti(document,t,m)}));return[function(t){var a=Ui(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);Ti(t,a,h),Ti(t,a,m),ki(t,o,p),Ti(t,o,x),ki(document,r,S,g)},function(){ji(document,r,S,g)}]}(o),z=v[0],y=v[1],b=function(){y(l),z(l)};return b(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,b,function(){y(l),ji(window,f,d)}]};
//# sourceMappingURL=index.cjs.js.map
var i=function(){return i=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},i.apply(this,arguments)};function e(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var n=-1,t=0,r=1,o=1,a=2,u="ratio",s="setSize",c="1",f="2",l="visibility",v="size",d="defaultMinSize",z="defaultMaxSize",S="resize",h="onNormalSize",p="mouseup",m="mousemove",g="mousedown",x="touchmove",y="touchend",b="touchstart",M=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},w=function(e,n){var t=ri(i({},e)),r=n.onMinSize,o=void 0===r?G:r,a=n.onMaxSize,u=void 0===a?G:a,s=n.onNormalSize,c=void 0===s?G:s,f=n.resizerClass,l=n.activeResizerClass,v=n.resizerSize,d=n.detectionRadius;return i({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:v,resizerClass:f,detectionRadius:d,activeResizerClass:l,minSize:0,maxSize:1/0},t)},E=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},R=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=E(i,t);return Math.abs(r-t)},C=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},O=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},V=function(i){i.initialSetSize=i.size},I=function(i){i.size=i.initialSetSize},L=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},k=function(i){i.size=i.defaultSize,T(i),C(i,i.defaultVisibility)},T=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},A=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},D=function(i){return i.minSize=i.size,i.size},H=function(i){return i.size-i.defaultMinSize},N=function(i){return i.defaultMaxSize-i.size},U=function(i){i.size=i.minSize},X=function(i){i.size=i.maxSize},Y=function(i){i.axisSize=i.size},F=function(i){i.api.setSize(K(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":h,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},B=function(e){var n,t=ei(e,"id",v,"defaultSize",d,l,"storedSize");return i(i({},t),((n={})[z]=e[z].toString(),n))},K=function(i){return i.visibility?i.size:0},q=function(i){return i.visibility?i.sizeRatio:0},J=function(i,e){i.size=e,i.storedSize=e},W=function(i,e,n,t,r,o,a){J(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},G=function(i){return i},Q=function(i,e){return i.find((function(i){return i.id===e}))},Z=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===v?K(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},$=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},ii=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ei=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ni=function(i){return i===r},ti=function(i){return"".concat("resizer","-").concat(i)},ri=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},oi=function(i){return e([],i,!0).reverse()},ai=function(i){return i.filter((function(i){return i}))},ui=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},si=function(i,e,n,t){var r;this.sizeState=h,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=w(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,d=e.visibility,z=e.vertical,S=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=S?S:p,p!==u&&M(c,s,f,a);var m=null===(r=d[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var x=g.size,y=g.defaultMaxSize,b=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;W(this,x,b,y,E,C,R)}else W(this,c,s,f,c,c,m);this.id=a,this.vertical=z,L(this),this.isHandle=t,t&&(this.id=ti(a),this.resizerSize=l,this.detectionRadius=v)},ci=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),fi=function(i){i.forEach(F)},li=function(i){return i.filter((function(i){return i.visibility}))};function vi(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var di=function(i,e,n){return vi(i,P,e,n)},zi=function(i,e,n){return vi(i,D,e,n)},Si=function(i,e,n){return vi(i,K,e,n)},hi=function(i,e,n,t){for(var r=i.virtualOrderList,o=i.index,a=0;a<r.length;a++)a<=o?e(r[a],t):n(r[a],t)},pi=function(i,e,n){var t=i.size+(n===o?e:-e);J(i,t)},mi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(pi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void pi(i[t],e,n);++r}},gi=function(i,e){var n,t=e.axisCoordinate,r=e.decreasingItems,u=e.increasingItems,s=e.direction,c=r,f=u;if(ni(s)?(n=t-i,c=oi(r)):(n=i-t,f=oi(u)),n<0);else if(0===n)return;var l=n;c.forEach((function(i){n=R(i,n,a)})),l-=n,f.forEach((function(i){l=R(i,l,o)}))},xi=function(i){var n,t=i.items,r=i.direction,o=i.handleId,a=li(t),u=$(a,o),s=[],c=[],f=function(i,e){var n=a[i];n.size?(c[i]=n,c[i+e]=a[i+e]):(c[i]=a[i+e],c[i+e]=n)};if(ni(r)){for(var l=u-1;l>-1;l-=2)s.push(a[l],a[l-1]);for(s.reverse(),c=[a[u]],l=u+1;l<a.length;l+=2)f(l,1);n=e(e([],s,!0),c,!0)}else{for(c=[a[0]],l=u-1;l>0;l-=2)f(l,-1);for(c.push(a[u]),l=u+1;l<a.length;l+=2)s.push(a[l],a[l+1]);n=e(e([],c,!0),s,!0)}i.virtualOrderList=ai(n),i.increasingItems=ai(c),i.decreasingItems=ai(s),i.index=$(i.virtualOrderList,o)},yi=function(i){var e=wi(i).containerSize,n=i.virtualOrderList,t=i.index,r=t+1,o=H(n[t]),a=N(n[r]);bi(n,o-a,t,r,0,e);var u=H(n[r]),s=N(n[t]);Mi(n,s-u,t,r,0,e)},bi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=j(f)},d=function(){r+=A(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=H(i[s=n-1])-N(i[c]);break;case e>0:d(),a=e-N(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=di(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void di(i,t+1,u);case e>0:d(),a=e-N(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=H(i[s=n-1])+e;break;case 0===e:return v(),d(),void zi(i,0,n-1);case e>0:return d(),r+=zi(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.maxSize=o-r);case 0===e:return v(),void d();case e>0:return d(),void(f.minSize=o-r)}}bi(i,a,s,c,r,o)},Mi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],v=function(){r+=A(f)},d=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:v(),d(),c=t+1,a=N(i[s=n-1])-H(i[c]);break;case e>0:d(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return v(),r+=zi(i,t+1,u),void(l.minSize=o-r);case 0===e:return v(),d(),void zi(i,t+1,u);case e>0:d(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:v(),a=N(i[s=n-1])+e;break;case 0===e:return v(),d(),void di(i,0,n-1);case e>0:return d(),r+=di(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return v(),void(l.minSize=o-r);case 0===e:return d(),void v();case e>0:return d(),void(f.maxSize=o-r)}}Mi(i,a,s,c,r,o)},wi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-Si(t)}},Ei=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=wi(i).maxPaneSize,s=function(i){return vi(i,q)}(n);if(!(s<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,s=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[s,c,f],v=l[0],d=l[2],z=ii(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=ii(e,n,v),o=ii(e,n,d)),t||(i.minMaxUnit!==u?M(z,r,o,i.id):M(c,s,f,i.id)),W(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=Si(n),f=r-c,l=f<0?a:o;mi(n,Math.abs(f),l),fi(t)}},Ri=function(i){var e=i.items;return wi(i).containerSize-Si(e)},Ci=function(i,e){var n=i.panesList;e!==u&&n.forEach(L),e!==l&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Oi=function(i){return"".concat(i,"px")},Vi=function(i){return i?"width":"height"},Ii=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===u})[e]=e,t))},Li=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},ki=function(i){return i<0?r:n},Ti=function(i,e){return function(n){i.style[Vi(e)]=Oi(n)}},Ai=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},ji=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Pi=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},Di=function(i,e,n){var t={panes:n.panesList.map(B)};e&&e.setItem(i,JSON.stringify(t))},Hi=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=Q(n,i))&&void 0!==e?e:null},i}(),Ni=function(i,e,n){var t=e-Si(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)mi(n,u,r);else{var s=Si(n),c=[];n.forEach((function(i){var e=K(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return T(i),E(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Ni(i,e,c)}}},Ui=function(i,n,t,r){var u,s,c=function(){var n,t=e(e([],u,!0),s,!0),r=a;i<0&&(i=Math.abs(i),r=o),t.forEach((n=r,function(e){Y(e),T(e),i=R(e,i,n)}))};"1"===n?(u=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===n&&(u=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Xi=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=li(a),f=li(s),l=$(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(I):(a.forEach(V),i.setSizeKey=v);var d=Si(c),z=c[l];T(z);var S=z.size,h=E(z,t),p=h-S;if(p){var m=$(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var x=d-z.size;Ni(g,x,g)}if(Ui(p,r,f,m),!o){var y=Ri(i);Xi(i,n,h+y,r,!0)}}}};var Yi=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Fi=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=li(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],v=l.defaultSize,d=l.id,z=l.detectionRadius,S=K(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s},_i=function(e){var o=e.vertical,a=e.children,c=e.unit,f=e.uniqueId,S=e.storageApi,h=e.onResizeStop,p=e.onChangeVisibility,m=e.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),x=new Hi(f,S,g),y=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new si(i.props,e,n,!1),new si(i.props,e,n,!0))})),t.pop(),t}(g,e,x),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(y),M=b[0],w=b[1],E=new ci;E.register({vertical:o,items:y,panesList:M,resizersList:w});var R=function(){return function(i){return i.forEach(Y)}(y)},V=function(){var i=L();h(i),Di(f,S,E),Fi(E)},I=function(){var i=T();p(i)},L=function(){return Z(M,v)},T=function(){return Z(M,l)},A=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0];E.register({handleId:e,direction:t,axisCoordinate:n}),A(!0),R()};var j=function(i){void 0===i&&(i=""),Ci(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(P(n,t),H(n)&&gi(n,E),fi(y),j(),e=L(),m(e))};var P=function(i,e){var n=E.direction,t=ki(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,xi(E),R(),yi(E),function(i){var e=i.items,n=i.index,t=wi(i).maxTopAxis,r=li(e);i.bottomAxis=t+vi(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return vi(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,t=E.bottomAxis;return i<=e?(hi(E,U,X,r),R(),E.axisCoordinate=e,!1):!(i>=t&&(hi(E,X,U,n),R(),E.axisCoordinate=t,1))},N=function(e){var n=E.newVisibilityModel,t=Z(M,l),r=i(i({},t),e);n||(E.newVisibilityModel=!0,M.forEach(O)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;C(u,e[s]),C(r[a+1],!1),u.visibility&&(-1!==o&&C(r[a-1],!0),o=a)}var c=li(t);0===Si(c)&&c.forEach((function(i){i.size=1}));var f=wi(i).maxPaneSize;Ni(c,f,c)}(E,r);var o=Ri(E);E.isViewSizeChanged=!!o,fi(y),V(),I(),j(l)};E.onMouseUp=function(){V(),A(!1)};var F=function(){fi(y),V(),j(s)},B={restore:function(){!function(i){i.forEach(k),fi(i)}(E.items),j(),V(),I(),E.isViewSizeChanged=!1},setVisibilities:N,getSizes:L,getVisibilities:function(){return T()},getState:function(){return Z(M,v,l,d,z)},setSize:function(i,e,n){Xi(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=wi(E).containerSize;Xi(E,i,t*e,n),F()}};return E.register({api:B,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),W(i,n,n,n,n,n,i.visibility)}}(Q(y,e),i)},registerContainer:function(i){E.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(x.empty&&c===u&&!E.isSetRatioMode)Ei(E),E.isSetRatioMode=!0;else{var t=x.getStorage(f,S).panes;n=Z(t,l)}N(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=K(Q(M,i));return function(i,e){var n;return(n={})[Vi(i)]=Oi(e),n}(o,e)}}),E},Bi=function(){return Bi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Bi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Ki=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},qi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ji=function(i){return document.getElementById(i)},Wi=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[$(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ti(i),c=Ji(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Oi(n)}}(c,r);Ki(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Ki(i,n),qi(i,t)):(Ki(i,t),qi(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)},Gi=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Bi({onResize:G,onResizeStop:G,onReady:G,onChangeVisibility:G,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=_i(e),a=o.registerItem,s=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=Ji(i);Ki(r,"overflow-hidden flex-shrink-0"),e({setSize:Ti(r,t)},i)}(r,a,e),t!==n.length-1&&Wi(r,a,o)}));var f=function(){r===u&&(Ei(o,!0),Fi(o),Ci(o))};Ai(window,f,S);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=Ji(i),a=Ii(t,"",r);return Ki(o,a),e(o),o}(t,s,e),v=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Li(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Pi(document,t,m,x)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Li(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ui(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var v=Li(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){Ai(document,t,m),ji(document,t,x)}));return[function(t){var a=Yi(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);ji(t,a,m),ji(t,a,x),Ai(t,o,g),ji(t,o,b),Ai(document,r,p,y)},function(){Pi(document,r,p,y)}]}(o),d=v[0],z=v[1],h=function(){z(l),d(l)};return h(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,h,function(){z(l),Pi(window,f,S)}]};export{c as BUTTOM_FIRST,u as RATIO,f as TOP_FIRST,Gi as default};
//# sourceMappingURL=index.esm.js.map
!function(i,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((i="undefined"!=typeof globalThis?globalThis:i||self).resizablePanes={})}(this,(function(i){"use strict";var e=function(){return e=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},e.apply(this,arguments)};function n(i,e,n){if(n||2===arguments.length)for(var t,r=0,o=e.length;r<o;r++)!t&&r in e||(t||(t=Array.prototype.slice.call(e,0,r)),t[r]=e[r]);return i.concat(t||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var t=-1,r=0,o=1,a=1,u=2,s="ratio",c="setSize",f="visibility",l="size",d="defaultMinSize",v="defaultMaxSize",z="resize",S="onNormalSize",h="mouseup",p="mousemove",m="mousedown",g="touchmove",y="touchend",b="touchstart",x=function(i,e,n,t){if(i<e)throw new Error("Size(".concat(i,") can not be smaller than minSize(").concat(e,") for pane id ").concat(t));if(i>n)throw new Error("Size(".concat(i,") can not be greatter than maxSize(").concat(n,") for pane id ").concat(t))},M=function(i,n){var t=ti(e({},i)),r=n.onMinSize,o=void 0===r?W:r,a=n.onMaxSize,u=void 0===a?W:a,s=n.onNormalSize,c=void 0===s?W:s,f=n.resizerClass,l=n.activeResizerClass,d=n.resizerSize,v=n.detectionRadius;return e({onMinSize:o,onMaxSize:u,onNormalSize:c,resizerSize:d,resizerClass:f,detectionRadius:v,activeResizerClass:l,minSize:0,maxSize:1/0},t)},w=function(i,e){var n=i.minSize,t=i.maxSize,r=i.minSize;return e>=n&&e<=t?r=e:e>t&&(r=t),i.size=r,r},E=function(i,e,n){var t=i.axisSize+(n===a?e:-e),r=w(i,t);return Math.abs(r-t)},R=function(i,e,n){void 0===n&&(n=!1),i&&(i.visibility=e,e?(i.maxSize=i.defaultMaxSize,i.minSize=i.defaultMinSize,function(i,e){i.isHandle&&(i.size=e?0:i.resizerSize)}(i,n)):(i.maxSize=0,i.minSize=0),i.api&&i.api.destroy&&i.api.destroy(e))},C=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},O=function(i){i.initialSetSize=i.size},V=function(i){i.size=i.initialSetSize},I=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},L=function(i){i.size=i.defaultSize,T(i),R(i,i.defaultVisibility)},T=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},k=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},j=function(i){return i.minSize=i.defaultMinSize,i.minSize},P=function(i){return i.maxSize=i.size,i.size},A=function(i){return i.minSize=i.size,i.size},D=function(i){return i.size-i.defaultMinSize},H=function(i){return i.defaultMaxSize-i.size},N=function(i){i.size=i.minSize},U=function(i){i.size=i.maxSize},X=function(i){i.axisSize=i.size},Y=function(i){i.api.setSize(B(i))},_=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":S,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},F=function(i){var n,t=ii(i,"id",l,"defaultSize",d,f,"storedSize");return e(e({},t),((n={})[v]=i[v].toString(),n))},B=function(i){return i.visibility?i.size:0},K=function(i){return i.visibility?i.sizeRatio:0},q=function(i,e){i.size=e,i.storedSize=e},J=function(i,e,n,t,r,o,a){q(i,e),i.defaultSize=r,i.minSize=n,i.maxSize=t,i.defaultMinSize=n,i.defaultMaxSize=t,i.storedSize=o,i.visibility=a},W=function(i){return i},G=function(i,e){return i.find((function(i){return i.id===e}))},Q=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return i.forEach((function(i){var n=function(e){return e===l?B(i):i[e]},r=i.id;1===e.length?t[r]=n(e[0]):t[r]=e.reduce((function(i,e){return i[e]=n(e),i}),{})})),t},Z=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},$=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},ii=function(i){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var t={};return e.forEach((function(e){t[e]=i[e]})),t},ei=function(i){return i===o},ni=function(i){return"".concat("resizer","-").concat(i)},ti=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ri=function(i){return n([],i,!0).reverse()},oi=function(i){return i.filter((function(i){return i}))},ai=function(i){return n([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},ui=function(i,e,n,t){var r;this.sizeState=S,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=M(i,e);var o=this.props,a=o.id,u=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,d=o.detectionRadius,v=e.visibility,z=e.vertical,h=e.minMaxUnit,p=e.unit;this.minMaxUnit=null!=h?h:p,p!==s&&x(c,u,f,a);var m=null===(r=v[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var y=g.size,b=g.defaultMaxSize,w=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;J(this,y,w,b,E,C,R)}else J(this,c,u,f,c,c,m);this.id=a,this.vertical=z,I(this),this.isHandle=t,t&&(this.id=ni(a),this.resizerSize=l,this.detectionRadius=d)},si=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ci=function(i){i.forEach(Y)},fi=function(i){return i.filter((function(i){return i.visibility}))};function li(i,e,n,t){void 0===n&&(n=0),void 0===t&&(t=i.length-1);for(var r=0,o=n;o<=t;o++)r+=e(i[o]);return r}var di=function(i,e,n){return li(i,P,e,n)},vi=function(i,e,n){return li(i,A,e,n)},zi=function(i,e,n){return li(i,B,e,n)},Si=function(i,e,n,t){for(var r=i.virtualOrderList,o=i.index,a=0;a<r.length;a++)a<=o?e(r[a],t):n(r[a],t)},hi=function(i,e,n){var t=i.size+(n===a?e:-e);q(i,t)},pi=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(hi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void hi(i[t],e,n);++r}},mi=function(i,e){var n,t=e.axisCoordinate,r=e.decreasingItems,o=e.increasingItems,s=e.direction,c=r,f=o;if(ei(s)?(n=t-i,c=ri(r)):(n=i-t,f=ri(o)),n<0);else if(0===n)return;var l=n;c.forEach((function(i){n=E(i,n,u)})),l-=n,f.forEach((function(i){l=E(i,l,a)}))},gi=function(i){var e,t=i.items,r=i.direction,o=i.handleId,a=fi(t),u=Z(a,o),s=[],c=[],f=function(i,e){var n=a[i];n.size?(c[i]=n,c[i+e]=a[i+e]):(c[i]=a[i+e],c[i+e]=n)};if(ei(r)){for(var l=u-1;l>-1;l-=2)s.push(a[l],a[l-1]);for(s.reverse(),c=[a[u]],l=u+1;l<a.length;l+=2)f(l,1);e=n(n([],s,!0),c,!0)}else{for(c=[a[0]],l=u-1;l>0;l-=2)f(l,-1);for(c.push(a[u]),l=u+1;l<a.length;l+=2)s.push(a[l],a[l+1]);e=n(n([],c,!0),s,!0)}i.virtualOrderList=oi(e),i.increasingItems=oi(c),i.decreasingItems=oi(s),i.index=Z(i.virtualOrderList,o)},yi=function(i){var e=Mi(i).containerSize,n=i.virtualOrderList,t=i.index,r=t+1,o=D(n[t]),a=H(n[r]);bi(n,o-a,t,r,0,e);var u=D(n[r]),s=H(n[t]);xi(n,s-u,t,r,0,e)},bi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],d=function(){r+=j(f)},v=function(){r+=k(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:d(),a=D(i[s=n-1])+e;break;case 0===e:d(),v(),c=t+1,a=D(i[s=n-1])-H(i[c]);break;case e>0:v(),a=e-H(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return d(),r+=di(i,t+1,u),void(l.maxSize=o-r);case 0===e:return d(),v(),void di(i,t+1,u);case e>0:v(),a=e-H(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:d(),a=D(i[s=n-1])+e;break;case 0===e:return d(),v(),void vi(i,0,n-1);case e>0:return v(),r+=vi(i,0,n-1),void(f.minSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return d(),void(l.maxSize=o-r);case 0===e:return d(),void v();case e>0:return v(),void(f.minSize=o-r)}}bi(i,a,s,c,r,o)},xi=function(i,e,n,t,r,o){var a,u=i.length-1,s=n,c=t,f=i[n],l=i[t],d=function(){r+=k(f)},v=function(){r+=j(l)};switch(!0){case n>0&&t<u:switch(!0){case e<0:d(),a=H(i[s=n-1])+e;break;case 0===e:d(),v(),c=t+1,a=H(i[s=n-1])-D(i[c]);break;case e>0:v(),a=e-D(i[c=t+1])}break;case 0===n&&t<u:switch(!0){case e<0:return d(),r+=vi(i,t+1,u),void(l.minSize=o-r);case 0===e:return d(),v(),void vi(i,t+1,u);case e>0:v(),a=e-D(i[c=t+1])}break;case n>0&&t===u:switch(!0){case e<0:d(),a=H(i[s=n-1])+e;break;case 0===e:return d(),v(),void di(i,0,n-1);case e>0:return v(),r+=di(i,0,n-1),void(f.maxSize=o-r)}break;case 0===n&&t===u:switch(!0){case e<0:return d(),void(l.minSize=o-r);case 0===e:return v(),void d();case e>0:return v(),void(f.maxSize=o-r)}}xi(i,a,s,c,r,o)},Mi=function(i){var e=i.getContainerRect,n=i.vertical,t=i.resizersList,r=e(),o=r.top,a=r.height,u=r.left,s=r.width,c=n?u:o,f=Math.round(n?s:a);return{containerSize:f,maxTopAxis:c,maxPaneSize:f-zi(t)}},wi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=Mi(i).maxPaneSize,o=function(i){return li(i,K)}(n);if(!(o<0)){n.forEach((function(i){!function(i){i.size=i.sizeRatio,i.defaultMinSize=i.minSizeRatio,i.defaultMaxSize=i.maxSizeRatio}(i),function(i,e,n,t){var r,o,a=i.props,u=a.minSize,c=a.size,f=a.maxSize,l=t?[i.minSizeRatio,i.size,i.maxSizeRatio]:[u,c,f],d=l[0],v=l[2],z=$(e,n,l[1]);i.minMaxUnit!==s?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=$(e,n,d),o=$(e,n,v)),t||(i.minMaxUnit!==s?x(z,r,o,i.id):x(c,u,f,i.id)),J(i,z,r,o,z,z,i.visibility)}(i,r,o,e)}));var c=zi(n),f=r-c,l=f<0?u:a;pi(n,Math.abs(f),l),ci(t)}},Ei=function(i){var e=i.items;return Mi(i).containerSize-zi(e)},Ri=function(i,e){var n=i.panesList;e!==s&&n.forEach(I),e!==f&&(i.newVisibilityModel=!1),e!==c&&(i.setSizeKey=null)},Ci=function(i){return"".concat(i,"px")},Oi=function(i){return i?"width":"height"},Vi=function(i,e,n){var t;return function(i){return Object.keys(i).map((function(e){return i[e]?e:""})).join(" ")}(((t={flex:!0,"f-row w-fit-content h-100p":i,"f-column":!i,"w-100p h-100p":n===s})[e]=e,t))},Ii=function(i,e,n){return i.preventDefault(),function(i){return i.type.startsWith("touch")}(i)?function(i,e,n){var t,r=i.targetTouches[0],o=null!==(t=n.current)&&void 0!==t?t:{},a=o.pageX,u=void 0===a?0:a,s=o.pageY,c=void 0===s?0:s;return n.current=r,e?[r.clientX,r.pageX-u]:[r.clientY,r.pageY-c]}(i,e,n):function(i,e){var n=i.clientX,t=i.clientY,r=i.movementX,o=i.movementY;return e?[n,r]:[t,o]}(i,e)},Li=function(i){return i<0?o:t},Ti=function(i,e){return function(n){i.style[Oi(e)]=Ci(n)}},ki=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.addEventListener(n,e)}))},ji=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Pi=function(i,e){for(var n=[],t=2;t<arguments.length;t++)n[t-2]=arguments[t];n.forEach((function(n){return i.removeEventListener(n,e)}))},Ai=function(i,e,n){var t={panes:n.panesList.map(F)};e&&e.setItem(i,JSON.stringify(t))},Di=function(){function i(i,e,n){this.store=null,this.empty=!1,this.panesComponents=n,this.getStorage(i,e)}return i.prototype.getStorage=function(i,e){var n,t=this,r=this.store;if(r)return r;if(e){n=e.getItem(i);var o=JSON.parse(n,(function(i,e){return"defaultMaxSize"===i?Number(e):e}));if("[object Object]"===toString.call(o)){var a=o.panes;if(a){if(a.every((function(i,e){var n;return(null===(n=t.panesComponents[e])||void 0===n?void 0:n.props.id)===i.id}))&&a.length===this.panesComponents.length)return this.store=o,o;e.removeItem(i)}else e.removeItem(i)}}this.empty=!0,this.store={panes:[]}},i.prototype.getStoredPane=function(i){var e,n=this.store.panes;return null!==(e=G(n,i))&&void 0!==e?e:null},i}(),Hi=function(i,e,n){var t=e-zi(i);if(0!==t&&0!==n.length){var r=t>0?a:u,o=Math.abs(t);if(o<=n.length)pi(n,o,r);else{var s=zi(n),c=[];n.forEach((function(i){var e=B(i),n=function(i,e,n){var t=i.size+(n===a?e:-e);return T(i),w(i,t)===t}(i,Math.round(o*(e/s)),r);n&&c.push(i)})),Hi(i,e,c)}}},Ni=function(i,e,t,r){var o,s,c=function(){var e,t=n(n([],o,!0),s,!0),r=u;i<0&&(i=Math.abs(i),r=a),t.forEach((e=r,function(n){X(n),T(n),i=E(n,i,e)}))};"1"===e?(o=t.slice(r+2),s=t.slice(0,r-1).reverse(),c()):"2"===e&&(o=t.slice(0,r-1).reverse(),s=t.slice(r+2),c())},Ui=function(i,e,t,r,o){void 0===r&&(r=s),void 0===o&&(o=!1);var a=i.panesList,u=i.items,c=fi(a),f=fi(u),l=Z(c,e);if(!(-1===l||t<0)){var d="".concat(e,"-").concat(r);i.setSizeKey===d?a.forEach(V):(a.forEach(O),i.setSizeKey=d);var v=zi(c),z=c[l];T(z);var S=z.size,h=w(z,t),p=h-S;if(p){var m=Z(f,e);if(r===s){var g=n([],c,!0);g.splice(l,1);var y=v-z.size;Hi(g,y,g)}if(Ni(p,r,f,m),!o){var b=Ei(i);Ui(i,e,h+b,r,!0)}}}};var Xi=function(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}((function(i,e){let n,t=0;return function(...r){clearTimeout(n);const o=Date.now(),a=e-(o-t);a<=0?(t=o,i.apply(this,r)):n=setTimeout((()=>{t=Date.now(),i.apply(this,r)}),a)}})),Yi=function(i){for(var e=i.vertical,n=i.items,t=(0,i.getContainerRect)(),r=t.left,o=t.top,a=e?r:o,u=fi(n),s=[],c=0;c<u.length-1;c+=2){var f=u[c];if(!f.isHandle){var l=u[c+1],d=l.defaultSize,v=l.id,z=l.detectionRadius,S=B(f),h=a+S-z,p=a+S+d+z;a+=S+d,s.push([h,p,v])}}i.detectionDetails=s},_i=function(i){var n=i.vertical,a=i.children,u=i.unit,z=i.uniqueId,S=i.storageApi,h=i.onResizeStop,p=i.onChangeVisibility,m=i.onResize,g=function(i){return Array.isArray(i)?i:[i]}(a),y=new Di(z,S,g),b=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new ui(i.props,e,n,!1),new ui(i.props,e,n,!0))})),t.pop(),t}(g,i,y),x=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(b),M=x[0],w=x[1],E=new si;E.register({vertical:n,items:b,panesList:M,resizersList:w});var O=function(){return function(i){return i.forEach(X)}(b)},V=function(){var i=T();h(i),Ai(z,S,E),Yi(E)},I=function(){var i=k();p(i)},T=function(){return Q(M,l)},k=function(){return Q(M,f)},j=function(i){w.forEach((function(e){e.api.setMouseDownFlag(E.handleId,i)}))};E.onMouseDown=function(i,e){var n=i[0];E.register({handleId:e,direction:r,axisCoordinate:n}),j(!0),O()};var P=function(i){void 0===i&&(i=""),Ri(E,i),function(i){i.forEach(_)}(M)};E.onMoveResize=function(i){var e,n=i[0],t=i[1];!E.isViewSizeChanged&&t&&(A(n,t),H(n)&&mi(n,E),ci(b),P(),e=T(),m(e))};var A=function(i,e){var n=E.direction,t=Li(e);t!==n&&(E.direction=t,D(i))},D=function(i){E.axisCoordinate=i,gi(E),O(),yi(E),function(i){var e=i.items,n=i.index,t=Mi(i).maxTopAxis,r=fi(e);i.bottomAxis=t+li(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return li(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(E)},H=function(i){var e=E.topAxis,n=E.bottomAxis;return i<=e?(Si(E,N,U,o),O(),E.axisCoordinate=e,!1):!(i>=n&&(Si(E,U,N,t),O(),E.axisCoordinate=n,1))},Y=function(i){var n=E.newVisibilityModel,t=Q(M,f),r=e(e({},t),i);n||(E.newVisibilityModel=!0,M.forEach(C)),function(i,e){for(var n,t=i.panesList,r=i.items,o=-1,a=0;a<r.length;a+=2){var u=r[a];(n=u).size=n.oldVisibleSize,n.visibility=n.oldVisibility;var s=u.id;R(u,e[s]),R(r[a+1],!1),u.visibility&&(-1!==o&&R(r[a-1],!0),o=a)}var c=fi(t);0===zi(c)&&c.forEach((function(i){i.size=1}));var f=Mi(i).maxPaneSize;Hi(c,f,c)}(E,r);var o=Ei(E);E.isViewSizeChanged=!!o,ci(b),V(),I(),P(f)};E.onMouseUp=function(){V(),j(!1)};var F=function(){ci(b),V(),P(c)},K={restore:function(){!function(i){i.forEach(L),ci(i)}(E.items),P(),V(),I(),E.isViewSizeChanged=!1},setVisibilities:Y,getSizes:T,getVisibilities:function(){return k()},getState:function(){return Q(M,l,f,d,v)},setSize:function(i,e,n){Ui(E,i,e,n),F()},setSizeRatio:function(i,e,n){var t=Mi(E).containerSize;Ui(E,i,t*e,n),F()}};return E.register({api:K,registerItem:function(i,e){!function(i,e){if(i.api=e,i.isHandle){var n=i.resizerSize;e.setSize(n),J(i,n,n,n,n,n,i.visibility)}}(G(b,e),i)},registerContainer:function(e){E.getContainerRect=function(){return e.getBoundingClientRect()};var n=i.visibility;if(y.empty&&u===s&&!E.isSetRatioMode)wi(E),E.isSetRatioMode=!0;else{var t=y.getStorage(z,S).panes;n=Q(t,f)}Y(n)},vertical:n,props:i,getPaneSizeStyle:function(i){var e=B(G(M,i));return function(i,e){var n;return(n={})[Oi(i)]=Ci(e),n}(n,e)}}),E},Fi=function(){return Fi=Object.assign||function(i){for(var e,n=1,t=arguments.length;n<t;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(i[r]=e[r]);return i},Fi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Ki=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},qi=function(i){return document.getElementById(i)},Ji=function(i,e,n){var t=n.panesList,r=n.vertical,o=t[Z(t,i)].props,a=o.resizerClass,u=o.activeResizerClass,s=ni(i),c=qi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ci(n)}}(c,r);Bi(c,"overflow-hidden");var l=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Bi(i,n),Ki(i,t)):(Bi(i,t),Ki(i,n)))}}(c,s,u,a);l(s,!1),e({setSize:f,setMouseDownFlag:l},s)};i.BUTTOM_FIRST="1",i.RATIO=s,i.TOP_FIRST="2",i.default=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Fi({onResize:W,onResizeStop:W,onReady:W,onChangeVisibility:W,vertical:!1,unit:s,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=e.panes,t=e.uniqueId,r=e.unit,o=_i(e),a=o.registerItem,u=o.registerContainer,c=o.api;n.forEach((function(i,t){var r=i.id;!function(i,e,n){var t=n.vertical,r=qi(i);Bi(r,"overflow-hidden flex-shrink-0"),e({setSize:Ti(r,t)},i)}(r,a,e),t!==n.length-1&&Ji(r,a,o)}));var f=function(){r===s&&(wi(o,!0),Yi(o),Ri(o))};ki(window,f,z);var l=function(i,e,n){var t=n.vertical,r=n.unit,o=qi(i),a=Vi(t,"",r);return Bi(o,a),e(o),o}(t,u,e),d=function(i){var e=i.vertical,n=e?"col-resize":"row-resize",t=function(i,e){return function(n){var t=Ii(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Pi(document,t,p,g)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Ii(t,e,{})[0],a=r.map((function(i){var e=i[0],n=i[1];return Math.abs((e+n)/2-o)})),u=ai(a).pop(),s=r[a.indexOf(u)],c=s[0],f=s[1],l=s[2];if(u<=(f-c)/2){i.previousTouchEvent=t;var d=Ii(t,e,{});i.onMouseDown(d,l),n()}}}(i,e,(function(){ki(document,t,p),ji(document,t,g)}));return[function(t){var a=Xi(function(i,e,n,t){return function(r){var o=e.detectionDetails,a=n?r.clientX:r.clientY;i.style.cursor="auto",o.forEach((function(e){var n=e[0],r=e[1];a>=n&&a<=r&&(i.style.cursor=t)}))}}(t,i,e,n),100);ji(t,a,p),ji(t,a,g),ki(t,o,m),ji(t,o,b),ki(document,r,h,y)},function(){Pi(document,r,h,y)}]}(o),v=d[0],S=d[1],x=function(){S(l),v(l)};return x(),console.log("Vimal"),setTimeout((function(){return c.setVisibilities({P1:!0})}),2e3),[c,x,function(){S(l),Pi(window,f,z)}]},Object.defineProperty(i,"__esModule",{value:!0})}));
//# sourceMappingURL=index.umd.js.map

2

package.json
{
"name": "resizable-panes-js",
"version": "6.0.21",
"version": "6.0.22",
"description": "A straightforward library that enables dynamic resizing of layouts and saves the layout configurations.",

@@ -5,0 +5,0 @@ "module": "./lib/esm/index.esm.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc