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.13 to 6.0.14

2

lib/cjs/index.cjs.js

@@ -1,2 +0,2 @@

"use strict";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="onNormalSize",z="mouseup",S="mousemove",h="mousedown",p="touchmove",m="touchend",g="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))},x=function(e,n){var t=ei(i({},e)),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,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)},b=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},M=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=b(i,t);return Math.abs(r-t)},w=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))},E=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},R=function(i){i.initialSetSize=i.size},C=function(i){i.size=i.initialSetSize},V=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},O=function(i){i.size=i.defaultSize,I(i),w(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},L=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},k=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},D=function(i){return i.size-i.defaultMinSize},P=function(i){return i.defaultMaxSize-i.size},H=function(i){i.size=i.minSize},N=function(i){i.size=i.maxSize},T=function(i){i.axisSize=i.size},U=function(i){i.api.setSize(B(i))},X=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":d,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},Y=function(e){var n,t=Z(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},B=function(i){return i.visibility?i.size:0},F=function(i){return i.visibility?i.sizeRatio:0},K=function(i,e){i.size=e,i.storedSize=e},J=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},W=function(i){return i},_=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===f?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},G=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Q=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},Z=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},$=function(i){return i===r},ii=function(i){return"".concat("resizer","-").concat(i)},ei=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ni=function(i){return e([],i,!0).reverse()},ti=function(i){return i.filter((function(i){return i}))},ri=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},oi=function(i,e,n,t){var r;this.sizeState=d,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=x(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,z=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=z[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var b=g.size,M=g.defaultMaxSize,w=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;J(this,b,w,M,E,C,R)}else J(this,c,s,f,c,c,m);this.id=a,this.vertical=S,V(this),this.isHandle=t,t&&(this.id=ii(a),this.resizerSize=l,this.detectionRadius=v)},ai=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ui=function(i){i.forEach(U)},si=function(i){return i.filter((function(i){return i.visibility}))};function ci(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 fi=function(i,e,n){return ci(i,j,e,n)},li=function(i,e,n){return ci(i,A,e,n)},vi=function(i,e,n){return ci(i,B,e,n)},di=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)},zi=function(i,e,n){var t=i.size+(n===o?e:-e);K(i,t)},Si=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(zi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void zi(i[t],e,n);++r}},hi=function(i,e){var n,t=e.axisCoordinate,r=e.decreasingItems,u=e.increasingItems,s=e.direction,c=r,f=u;if($(s)?(n=t-i,c=ni(r)):(n=i-t,f=ni(u)),n<0);else if(0===n)return;var l=n;c.forEach((function(i){n=M(i,n,a)})),l-=n,f.forEach((function(i){l=M(i,l,o)}))},pi=function(i){var n,t=i.items,r=i.direction,o=i.handleId,a=si(t),u=G(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($(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=ti(n),i.increasingItems=ti(c),i.decreasingItems=ti(s),i.index=G(i.virtualOrderList,o)},mi=function(i){var e=xi(i).containerSize,n=i.virtualOrderList,t=i.index,r=t+1,o=D(n[t]),a=P(n[r]);gi(n,o-a,t,r,0,e);var u=D(n[r]),s=P(n[t]);yi(n,s-u,t,r,0,e)},gi=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+=L(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+=fi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void fi(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.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)}}gi(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+=L(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.minSize=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 fi(i,0,n-1);case e>0:return d(),r+=fi(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)},xi=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-vi(t)}},bi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=xi(i).maxPaneSize,s=function(i){return ci(i,F)}(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=Q(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Q(e,n,v),o=Q(e,n,d)),t||(i.minMaxUnit!==u?y(z,r,o,i.id):y(c,s,f,i.id)),J(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=vi(n),f=r-c,l=f<0?a:o;Si(n,Math.abs(f),l),ui(t)}},Mi=function(i){var e=i.items;return xi(i).containerSize-vi(e)},wi=function(i,e){var n=i.panesList;e!==u&&n.forEach(V),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ei=function(i){return"".concat(i,"px")},Ri=function(i){return i?"width":"height"},Ci=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)},Oi=function(i){return i<0?r:n},Ii=function(i,e){return function(n){i.style[Ri(e)]=Ei(n)}},Li=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ei(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})},Ai=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(Y)};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=_(n,i))&&void 0!==e?e:null},i}(),Hi=function(i,e,n){var t=e-vi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)Si(n,u,r);else{var s=vi(n),c=[];n.forEach((function(i){var e=B(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),b(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Hi(i,e,c)}}},Ni=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){T(e),I(e),i=M(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())},Ti=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=si(a),f=si(s),l=G(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(C):(a.forEach(R),i.setSizeKey=v);var d=vi(c),z=c[l];I(z);var S=z.size,h=b(z,t),p=h-S;if(p){var m=G(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var y=d-z.size;Hi(g,y,g)}if(Ni(p,r,f,m),!o){var x=Mi(i);Ti(i,n,h+x,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(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),y=new Pi(z,S,g),x=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new oi(i.props,e,n,!1),new oi(i.props,e,n,!0))})),t.pop(),t}(g,e,y),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(x),M=b[0],R=b[1],C=new ai;C.register({vertical:o,items:x,panesList:M,resizersList:R});var V=function(){return function(i){return i.forEach(T)}(x)},I=function(){var i=k();h(i),Di(z,S,C),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=si(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=B(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s}(C)},L=function(){var i=j();p(i)},k=function(){return q(M,f)},j=function(){return q(M,c)},A=function(i){R.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}),A(!0),V()};var D=function(i){void 0===i&&(i=""),wi(C,i),function(i){i.forEach(X)}(M)};C.onMoveResize=function(i){var e,n=i[0],t=i[1];!C.isViewSizeChanged&&t&&(P(n,t),Y(n)&&hi(n,C),ui(x),D(),e=k(),m(e))};var P=function(i,e){var n=C.direction,t=Oi(e);t!==n&&(C.direction=t,U(i))},U=function(i){C.axisCoordinate=i,pi(C),V(),mi(C),function(i){var e=i.items,n=i.index,t=xi(i).maxTopAxis,r=si(e);i.bottomAxis=t+ci(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return ci(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(C)},Y=function(i){var e=C.topAxis,t=C.bottomAxis;return i<=e?(di(C,H,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(di(C,N,H,n),V(),C.axisCoordinate=t,1))},F=function(e){var n=C.newVisibilityModel,t=q(M,c),r=i(i({},t),e);n||(C.newVisibilityModel=!0,M.forEach(E)),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;w(u,e[s]),w(r[a+1],!1),u.visibility&&(-1!==o&&w(r[a-1],!0),o=a)}var c=si(t);0===vi(c)&&c.forEach((function(i){i.size=1}));var f=xi(i).maxPaneSize;Hi(c,f,c)}(C,r);var o=Mi(C);C.isViewSizeChanged=!!o,ui(x),I(),L(),D(c)};C.onMouseUp=function(){I(),A(!1)};var K=function(){ui(x),I(),D(s)},W={restore:function(){!function(i){i.forEach(O),ui(i)}(C.items),D(),I(),L(),C.isViewSizeChanged=!1},setVisibilities:F,getSizes:k,getVisibilities:function(){return j()},getState:function(){return q(M,f,c,l,v)},setSize:function(i,e,n){Ti(C,i,e,n),K()},setSizeRatio:function(i,e,n){var t=xi(C).containerSize;Ti(C,i,t*e,n),K()}};return C.register({api:W,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)}}(_(x,e),i)},registerContainer:function(i){C.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(y.empty&&d===u&&!C.isSetRatioMode)bi(C),C.isSetRatioMode=!0;else{var t=y.getStorage(z,S).panes;n=q(t,c)}F(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=B(_(M,i));return function(i,e){var n;return(n={})[Ri(i)]=Ei(e),n}(o,e)}}),C},Yi=function(){return Yi=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},Yi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Fi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ki=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Bi(i,n),Fi(i,t)):(Bi(i,t),Fi(i,n)))}};module.exports=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Yi({onResize:W,onResizeStop:W,onReady:W,onChangeVisibility:W,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=Xi(e),t=n.registerItem,r=n.registerContainer,o=n.api;e.panes.forEach((function(i,n){var r=i.id,o=document.getElementById(r);t({setSize:Ii(o,!0)},r),Bi(o,"overflow-hidden flex-shrink-0");var a=ii(r),u=document.getElementById(a);n!==e.panes.length-1&&t({setSize:Li(u,!0),setMouseDownFlag:Ki(u,a,"",e.activeResizerClass)},a)}));var a=Ci(e.vertical,"",e.unit),s=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(),Ai(document,t,S,p)},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=ri(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,S),ji(document,t,p)}));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);ji(t,a,S),ji(t,a,p),ki(t,o,h),ji(t,o,g),ki(document,r,z,m)},function(){Ai(document,r,z,m)}]}(n),c=s[0],f=s[1],l=document.getElementById(e.id);return Bi(l,a),r(l),c(l),[o,c,f]};
"use strict";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?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,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},V=function(i){i.size=i.initialSetSize},O=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},L=function(i){i.size=i.defaultSize,I(i),E(i,i.defaultVisibility)},I=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},A=function(i){return i.maxSize=i.size,i.size},D=function(i){return i.minSize=i.size,i.size},P=function(i){return i.size-i.defaultMinSize},H=function(i){return i.defaultMaxSize-i.size},T=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(K(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)}},F=function(e){var n,t=$(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},K=function(i){return i.visibility?i.size:0},q=function(i){return i.visibility?i.sizeRatio:0},B=function(i,e){i.size=e,i.storedSize=e},J=function(i,e,n,t,r,o,a){B(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},_=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?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},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;J(this,x,w,M,E,C,R)}else J(this,c,s,f,c,c,m);this.id=a,this.vertical=S,O(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,A,e,n)},vi=function(i,e,n){return fi(i,D,e,n)},di=function(i,e,n){return fi(i,K,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);B(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=H(n[r]);xi(n,o-a,t,r,0,e);var u=P(n[r]),s=H(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+=j(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])-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+=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-H(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+=j(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])-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=H(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,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=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)),J(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(O),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ri=function(i){return"".concat(i,"px")},Ci=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===u})[e]=e,t))},Oi=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?r:n},Ii=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)}))},ji=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Ai=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(F)};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=_(n,i))&&void 0!==e?e:null},i}(),Hi=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=K(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),M(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Hi(i,e,c)}}},Ti=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),I(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(V):(a.forEach(C),i.setSizeKey=v);var d=di(c),z=c[l];I(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;Hi(g,x,g)}if(Ti(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=K(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 V=function(){return function(i){return i.forEach(U)}(y)},O=function(){var i=k();h(i),Di(z,S,C),Xi(C)},I=function(){var i=j();p(i)},k=function(){return G(M,f)},j=function(){return G(M,c)},A=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}),A(!0),V()};var D=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),D(),e=k(),m(e))};var P=function(i,e){var n=C.direction,t=Li(e);t!==n&&(C.direction=t,H(i))},H=function(i){C.axisCoordinate=i,mi(C),V(),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,T,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(zi(C,N,T,n),V(),C.axisCoordinate=t,1))},F=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;Hi(c,f,c)}(C,r);var o=wi(C);C.isViewSizeChanged=!!o,si(y),O(),I(),D(c)};C.onMouseUp=function(){O(),A(!1)};var q=function(){si(y),O(),D(s)},B={restore:function(){!function(i){i.forEach(L),si(i)}(C.items),D(),O(),I(),C.isViewSizeChanged=!1},setVisibilities:F,getSizes:k,getVisibilities:function(){return j()},getState:function(){return G(M,f,c,l,v)},setSize:function(i,e,n){Ni(C,i,e,n),q()},setSizeRatio:function(i,e,n){var t=bi(C).containerSize;Ni(C,i,t*e,n),q()}};return C.register({api:B,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)}}(_(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)}F(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=K(_(M,i));return function(i,e){var n;return(n={})[Ci(i)]=Ri(e),n}(o,e)}}),C},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 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)}))},Bi=function(i){return document.getElementById(i)},Ji=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=Bi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ri(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)};module.exports=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: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=Bi(i);Ki(r,"overflow-hidden flex-shrink-0"),e({setSize:Ii(r,t)},i)}(r,a,e),t!==n.length-1&&Ji(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=Bi(i),a=Vi(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=Oi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Ai(document,t,h,m)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Oi(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=Oi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,h),ji(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);ji(t,a,h),ji(t,a,m),ki(t,o,p),ji(t,o,x),ki(document,r,S,g)},function(){Ai(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),Ai(window,f,d)}]};
//# sourceMappingURL=index.cjs.js.map

@@ -1,2 +0,2 @@

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="onNormalSize",z="mouseup",S="mousemove",h="mousedown",p="touchmove",m="touchend",g="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))},x=function(e,n){var t=ei(i({},e)),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,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)},b=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},M=function(i,e,n){var t=i.axisSize+(n===o?e:-e),r=b(i,t);return Math.abs(r-t)},w=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))},E=function(i){i.oldVisibleSize=i.size,i.oldVisibility=i.visibility},R=function(i){i.initialSetSize=i.size},C=function(i){i.size=i.initialSetSize},V=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},O=function(i){i.size=i.defaultSize,I(i),w(i,i.defaultVisibility)},I=function(i){i.minSize=i.defaultMinSize,i.maxSize=i.defaultMaxSize},L=function(i){return i.maxSize=i.defaultMaxSize,i.maxSize},k=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},D=function(i){return i.size-i.defaultMinSize},P=function(i){return i.defaultMaxSize-i.size},H=function(i){i.size=i.minSize},N=function(i){i.size=i.maxSize},T=function(i){i.axisSize=i.size},U=function(i){i.api.setSize(B(i))},X=function(i){if(i.visibility&&!i.isHandle){var e,n=i.size,t=i.id;e=n===i.defaultMaxSize?"onMaxSize":n===i.defaultMinSize?"onMinSize":d,i.sizeState!==e&&(i.props[e](t,n),i.sizeState=e)}},Y=function(e){var n,t=Z(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},B=function(i){return i.visibility?i.size:0},F=function(i){return i.visibility?i.sizeRatio:0},K=function(i,e){i.size=e,i.storedSize=e},J=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},W=function(i){return i},_=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===f?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},G=function(i,e,n){return void 0===n&&(n="id"),i.findIndex((function(i){return i[n]===e}))},Q=function(i,e,n){return Math.round(function(i,e,n){return Number((i*(n/e)).toFixed(0))}(i,e,n))},Z=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},$=function(i){return i===r},ii=function(i){return"".concat("resizer","-").concat(i)},ei=function(i){return Object.keys(i).forEach((function(e){void 0===i[e]&&delete i[e]})),i},ni=function(i){return e([],i,!0).reverse()},ti=function(i){return i.filter((function(i){return i}))},ri=function(i){return e([],i,!0).sort((function(i,e){return i>e?-1:e>i?1:0}))},oi=function(i,e,n,t){var r;this.sizeState=d,this.storedSize=0,this.axisSize=0,this.oldVisibleSize=0,this.oldVisibility=!0,this.props=x(i,e);var o=this.props,a=o.id,s=o.minSize,c=o.size,f=o.maxSize,l=o.resizerSize,v=o.detectionRadius,z=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=z[a])||void 0===r||r;this.defaultVisibility=m;var g=n.getStoredPane(a);if(g){var b=g.size,M=g.defaultMaxSize,w=g.defaultMinSize,E=g.defaultSize,R=g.visibility,C=g.storedSize;J(this,b,w,M,E,C,R)}else J(this,c,s,f,c,c,m);this.id=a,this.vertical=S,V(this),this.isHandle=t,t&&(this.id=ii(a),this.resizerSize=l,this.detectionRadius=v)},ai=function(){function i(){this.isSetRatioMode=!1,this.newVisibilityModel=!1,this.isViewSizeChanged=!1}return i.prototype.register=function(i){Object.assign(this,i)},i}(),ui=function(i){i.forEach(U)},si=function(i){return i.filter((function(i){return i.visibility}))};function ci(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 fi=function(i,e,n){return ci(i,j,e,n)},li=function(i,e,n){return ci(i,A,e,n)},vi=function(i,e,n){return ci(i,B,e,n)},di=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)},zi=function(i,e,n){var t=i.size+(n===o?e:-e);K(i,t)},Si=function(i,e,n){for(var t,r=0,o=i.length;e>1;)i[t=r%o].visibility&&(zi(i[t],1,n),--e),++r;for(;;){if(i[t=r%o].visibility)return void zi(i[t],e,n);++r}},hi=function(i,e){var n,t=e.axisCoordinate,r=e.decreasingItems,u=e.increasingItems,s=e.direction,c=r,f=u;if($(s)?(n=t-i,c=ni(r)):(n=i-t,f=ni(u)),n<0);else if(0===n)return;var l=n;c.forEach((function(i){n=M(i,n,a)})),l-=n,f.forEach((function(i){l=M(i,l,o)}))},pi=function(i){var n,t=i.items,r=i.direction,o=i.handleId,a=si(t),u=G(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($(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=ti(n),i.increasingItems=ti(c),i.decreasingItems=ti(s),i.index=G(i.virtualOrderList,o)},mi=function(i){var e=xi(i).containerSize,n=i.virtualOrderList,t=i.index,r=t+1,o=D(n[t]),a=P(n[r]);gi(n,o-a,t,r,0,e);var u=D(n[r]),s=P(n[t]);yi(n,s-u,t,r,0,e)},gi=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+=L(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+=fi(i,t+1,u),void(l.maxSize=o-r);case 0===e:return v(),d(),void fi(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.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)}}gi(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+=L(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.minSize=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 fi(i,0,n-1);case e>0:return d(),r+=fi(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)},xi=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-vi(t)}},bi=function(i,e){void 0===e&&(e=!1);var n=i.panesList,t=i.items,r=xi(i).maxPaneSize,s=function(i){return ci(i,F)}(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=Q(e,n,l[1]);i.minMaxUnit!==u?(r=i.defaultMinSize,o=i.defaultMaxSize):(r=Q(e,n,v),o=Q(e,n,d)),t||(i.minMaxUnit!==u?y(z,r,o,i.id):y(c,s,f,i.id)),J(i,z,r,o,z,z,i.visibility)}(i,r,s,e)}));var c=vi(n),f=r-c,l=f<0?a:o;Si(n,Math.abs(f),l),ui(t)}},Mi=function(i){var e=i.items;return xi(i).containerSize-vi(e)},wi=function(i,e){var n=i.panesList;e!==u&&n.forEach(V),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ei=function(i){return"".concat(i,"px")},Ri=function(i){return i?"width":"height"},Ci=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)},Oi=function(i){return i<0?r:n},Ii=function(i,e){return function(n){i.style[Ri(e)]=Ei(n)}},Li=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ei(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})},Ai=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(Y)};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=_(n,i))&&void 0!==e?e:null},i}(),Hi=function(i,e,n){var t=e-vi(i);if(0!==t&&0!==n.length){var r=t>0?o:a,u=Math.abs(t);if(u<=n.length)Si(n,u,r);else{var s=vi(n),c=[];n.forEach((function(i){var e=B(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),b(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Hi(i,e,c)}}},Ni=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){T(e),I(e),i=M(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())},Ti=function(i,n,t,r,o){void 0===r&&(r=u),void 0===o&&(o=!1);var a=i.panesList,s=i.items,c=si(a),f=si(s),l=G(c,n);if(!(-1===l||t<0)){var v="".concat(n,"-").concat(r);i.setSizeKey===v?a.forEach(C):(a.forEach(R),i.setSizeKey=v);var d=vi(c),z=c[l];I(z);var S=z.size,h=b(z,t),p=h-S;if(p){var m=G(f,n);if(r===u){var g=e([],c,!0);g.splice(l,1);var y=d-z.size;Hi(g,y,g)}if(Ni(p,r,f,m),!o){var x=Mi(i);Ti(i,n,h+x,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(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),y=new Pi(z,S,g),x=function(i,e,n){var t=[];return i.forEach((function(i){return t.push(new oi(i.props,e,n,!1),new oi(i.props,e,n,!0))})),t.pop(),t}(g,e,y),b=function(i){return[i.filter((function(i){return!i.isHandle})),i.filter((function(i){return i.isHandle}))]}(x),M=b[0],R=b[1],C=new ai;C.register({vertical:o,items:x,panesList:M,resizersList:R});var V=function(){return function(i){return i.forEach(T)}(x)},I=function(){var i=k();h(i),Di(z,S,C),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=si(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=B(f),h=a+S-z,p=a+S+v+z;a+=S+v,s.push([h,p,d])}}i.detectionDetails=s}(C)},L=function(){var i=j();p(i)},k=function(){return q(M,f)},j=function(){return q(M,c)},A=function(i){R.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}),A(!0),V()};var D=function(i){void 0===i&&(i=""),wi(C,i),function(i){i.forEach(X)}(M)};C.onMoveResize=function(i){var e,n=i[0],t=i[1];!C.isViewSizeChanged&&t&&(P(n,t),Y(n)&&hi(n,C),ui(x),D(),e=k(),m(e))};var P=function(i,e){var n=C.direction,t=Oi(e);t!==n&&(C.direction=t,U(i))},U=function(i){C.axisCoordinate=i,pi(C),V(),mi(C),function(i){var e=i.items,n=i.index,t=xi(i).maxTopAxis,r=si(e);i.bottomAxis=t+ci(r,(function(i){return i.maxSize}),0,n-1),i.topAxis=t+function(i,e,n){return ci(i,(function(i){return i.minSize}),0,n)}(r,0,n-1)}(C)},Y=function(i){var e=C.topAxis,t=C.bottomAxis;return i<=e?(di(C,H,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(di(C,N,H,n),V(),C.axisCoordinate=t,1))},F=function(e){var n=C.newVisibilityModel,t=q(M,c),r=i(i({},t),e);n||(C.newVisibilityModel=!0,M.forEach(E)),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;w(u,e[s]),w(r[a+1],!1),u.visibility&&(-1!==o&&w(r[a-1],!0),o=a)}var c=si(t);0===vi(c)&&c.forEach((function(i){i.size=1}));var f=xi(i).maxPaneSize;Hi(c,f,c)}(C,r);var o=Mi(C);C.isViewSizeChanged=!!o,ui(x),I(),L(),D(c)};C.onMouseUp=function(){I(),A(!1)};var K=function(){ui(x),I(),D(s)},W={restore:function(){!function(i){i.forEach(O),ui(i)}(C.items),D(),I(),L(),C.isViewSizeChanged=!1},setVisibilities:F,getSizes:k,getVisibilities:function(){return j()},getState:function(){return q(M,f,c,l,v)},setSize:function(i,e,n){Ti(C,i,e,n),K()},setSizeRatio:function(i,e,n){var t=xi(C).containerSize;Ti(C,i,t*e,n),K()}};return C.register({api:W,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)}}(_(x,e),i)},registerContainer:function(i){C.getContainerRect=function(){return i.getBoundingClientRect()};var n=e.visibility;if(y.empty&&d===u&&!C.isSetRatioMode)bi(C),C.isSetRatioMode=!0;else{var t=y.getStorage(z,S).panes;n=q(t,c)}F(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=B(_(M,i));return function(i,e){var n;return(n={})[Ri(i)]=Ei(e),n}(o,e)}}),C},Yi=function(){return Yi=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},Yi.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var Bi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.add(e)}))},Fi=function(i,e){e.split(" ").forEach((function(e){return e&&i.classList.remove(e)}))},Ki=function(i,e,n,t){return void 0===n&&(n=""),void 0===t&&(t=""),function(r,o){r===e&&(o?(Bi(i,n),Fi(i,t)):(Bi(i,t),Fi(i,n)))}},Ji=function(i){var e=function(i){var e=i.panes.map((function(i){return{props:i}}));return Yi({onResize:W,onResizeStop:W,onReady:W,onChangeVisibility:W,vertical:!1,unit:u,resizerSize:2,detectionRadius:6,visibility:{},children:e},i)}(i),n=Xi(e),t=n.registerItem,r=n.registerContainer,o=n.api;e.panes.forEach((function(i,n){var r=i.id,o=document.getElementById(r);t({setSize:Ii(o,!0)},r),Bi(o,"overflow-hidden flex-shrink-0");var a=ii(r),u=document.getElementById(a);n!==e.panes.length-1&&t({setSize:Li(u,!0),setMouseDownFlag:Ki(u,a,"",e.activeResizerClass)},a)}));var a=Ci(e.vertical,"",e.unit),s=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(),Ai(document,t,S,p)},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=ri(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,S),ji(document,t,p)}));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);ji(t,a,S),ji(t,a,p),ki(t,o,h),ji(t,o,g),ki(document,r,z,m)},function(){Ai(document,r,z,m)}]}(n),c=s[0],f=s[1],l=document.getElementById(e.id);return Bi(l,a),r(l),c(l),[o,c,f]};export{Ji as default};
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?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,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},V=function(i){i.size=i.initialSetSize},O=function(i){i.sizeRatio=i.size,i.minSizeRatio=i.defaultMinSize,i.maxSizeRatio=i.defaultMaxSize},L=function(i){i.size=i.defaultSize,I(i),E(i,i.defaultVisibility)},I=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},A=function(i){return i.maxSize=i.size,i.size},D=function(i){return i.minSize=i.size,i.size},P=function(i){return i.size-i.defaultMinSize},H=function(i){return i.defaultMaxSize-i.size},T=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(K(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)}},F=function(e){var n,t=$(e,"id",f,"defaultSize",l,c,"storedSize");return i(i({},t),((n={})[v]=e[v].toString(),n))},K=function(i){return i.visibility?i.size:0},q=function(i){return i.visibility?i.sizeRatio:0},B=function(i,e){i.size=e,i.storedSize=e},J=function(i,e,n,t,r,o,a){B(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},_=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?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},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;J(this,x,w,M,E,C,R)}else J(this,c,s,f,c,c,m);this.id=a,this.vertical=S,O(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,A,e,n)},vi=function(i,e,n){return fi(i,D,e,n)},di=function(i,e,n){return fi(i,K,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);B(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=H(n[r]);xi(n,o-a,t,r,0,e);var u=P(n[r]),s=H(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+=j(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])-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+=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-H(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+=j(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])-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=H(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,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=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)),J(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(O),e!==c&&(i.newVisibilityModel=!1),e!==s&&(i.setSizeKey=null)},Ri=function(i){return"".concat(i,"px")},Ci=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===u})[e]=e,t))},Oi=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?r:n},Ii=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)}))},ji=function(i,e,n){i.addEventListener(n,e,{passive:!1})},Ai=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(F)};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=_(n,i))&&void 0!==e?e:null},i}(),Hi=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=K(i),n=function(i,e,n){var t=i.size+(n===o?e:-e);return I(i),M(i,t)===t}(i,Math.round(u*(e/s)),r);n&&c.push(i)})),Hi(i,e,c)}}},Ti=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),I(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(V):(a.forEach(C),i.setSizeKey=v);var d=di(c),z=c[l];I(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;Hi(g,x,g)}if(Ti(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=K(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 V=function(){return function(i){return i.forEach(U)}(y)},O=function(){var i=k();h(i),Di(z,S,C),Xi(C)},I=function(){var i=j();p(i)},k=function(){return G(M,f)},j=function(){return G(M,c)},A=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}),A(!0),V()};var D=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),D(),e=k(),m(e))};var P=function(i,e){var n=C.direction,t=Li(e);t!==n&&(C.direction=t,H(i))},H=function(i){C.axisCoordinate=i,mi(C),V(),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,T,N,r),V(),C.axisCoordinate=e,!1):!(i>=t&&(zi(C,N,T,n),V(),C.axisCoordinate=t,1))},F=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;Hi(c,f,c)}(C,r);var o=wi(C);C.isViewSizeChanged=!!o,si(y),O(),I(),D(c)};C.onMouseUp=function(){O(),A(!1)};var q=function(){si(y),O(),D(s)},B={restore:function(){!function(i){i.forEach(L),si(i)}(C.items),D(),O(),I(),C.isViewSizeChanged=!1},setVisibilities:F,getSizes:k,getVisibilities:function(){return j()},getState:function(){return G(M,f,c,l,v)},setSize:function(i,e,n){Ni(C,i,e,n),q()},setSizeRatio:function(i,e,n){var t=bi(C).containerSize;Ni(C,i,t*e,n),q()}};return C.register({api:B,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)}}(_(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)}F(n)},vertical:o,props:e,getPaneSizeStyle:function(i){var e=K(_(M,i));return function(i,e){var n;return(n={})[Ci(i)]=Ri(e),n}(o,e)}}),C},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 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)}))},Bi=function(i){return document.getElementById(i)},Ji=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=Bi(s),f=function(i,e){return function(n){i.style[function(i){return i?"minWidth":"minHeight"}(e)]=Ri(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)},Wi=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: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=Bi(i);Ki(r,"overflow-hidden flex-shrink-0"),e({setSize:Ii(r,t)},i)}(r,a,e),t!==n.length-1&&Ji(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=Bi(i),a=Vi(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=Oi(n,e,i.previousTouchEvent);i.onMoveResize(t)}}(i,e),r=function(){i.onMouseUp(),Ai(document,t,h,m)},o=function(i,e,n){return function(t){var r=i.detectionDetails,o=Oi(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=Oi(t,e,{});i.onMouseDown(v,l),n()}}}(i,e,(function(){ki(document,t,h),ji(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);ji(t,a,h),ji(t,a,m),ki(t,o,p),ji(t,o,x),ki(document,r,S,g)},function(){Ai(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),Ai(window,f,d)}]};export{Wi as default};
//# sourceMappingURL=index.esm.js.map

@@ -5,10 +5,10 @@ interface IKeyToBoolMap$1 {

type IVisibilityState = 'zipped' | 'visible' | 'hidden';
type ISetSizeBehaviour$1 = 'ratio' | '1' | '2';
interface INumberMap$1 {
type ISetSizeBehaviour = 'ratio' | '1' | '2';
interface INumberMap {
[key: string]: number;
}
interface IVisibilityMap$1 {
interface IVisibilityMap {
[key: string]: IVisibilityState;
}
interface IGetStateItem$1 {
interface IGetStateItem {
size: number;

@@ -19,13 +19,13 @@ visibility: boolean;

}
interface IGetState$1 {
[key: string]: IGetStateItem$1;
interface IGetState {
[key: string]: IGetStateItem;
}
interface IResizableApi$1 {
interface IResizableApi {
restore: () => void;
setVisibilities: (map: IKeyToBoolMap$1) => void;
getVisibilities: () => IVisibilityMap$1;
getSizes: () => INumberMap$1;
getState: () => IGetState$1;
setSize: (id: string, size: number, behavior?: ISetSizeBehaviour$1) => void;
setSizeRatio: (id: string, ratio: number, behavior?: ISetSizeBehaviour$1) => void;
getVisibilities: () => IVisibilityMap;
getSizes: () => INumberMap;
getState: () => IGetState;
setSize: (id: string, size: number, behavior?: ISetSizeBehaviour) => void;
setSizeRatio: (id: string, ratio: number, behavior?: ISetSizeBehaviour) => void;
}

@@ -41,30 +41,4 @@

type UnitTypes = 'ratio' | 'pixel' | undefined;
type ISetSizeBehaviour = 'ratio' | '1' | '2';
type onResizeType = (param: IMapIdToSize) => void;
interface INumberMap {
[key: string]: number;
}
interface IVisibilityMap {
[key: string]: boolean;
}
interface IGetStateItem {
size: number;
visibility: boolean;
defaultMinSize: number;
defaultMaxSize: number;
}
interface IGetState {
[key: string]: IGetStateItem;
}
interface IResizableApi {
restore: () => void;
setVisibilities: (map: IKeyToBoolMap) => void;
getVisibilities: () => IVisibilityMap;
getSizes: () => INumberMap;
getState: () => IGetState;
setSize: (id: string, size: number, behavior?: ISetSizeBehaviour) => void;
setSizeRatio: (id: string, ratio: number, behavior?: ISetSizeBehaviour) => void;
}
type onReadyType = (api: IResizableApi) => void;
interface IPane {

@@ -84,3 +58,3 @@ id: string;

interface IResizableOptions {
id: string;
uniqueId: string;
resizerClass?: string;

@@ -97,3 +71,2 @@ activeResizerClass?: string;

onResizeStop?: onResizeType;
onReady?: onReadyType;
onChangeVisibility?: (map: IKeyToBoolMap) => void;

@@ -106,4 +79,5 @@ onMinSize?: (id: string, minSize: number) => void;

declare const getResizablePanes: (options: IResizableOptions) => (IResizableApi$1 | ((containerNode: HTMLElement) => void))[];
type IGetResizablePanes = [resizableApi: IResizableApi, refreshResizable: () => void, clearResizable: () => void];
declare const getResizablePanes: (options: IResizableOptions) => IGetResizablePanes;
export { getResizablePanes as default };
{
"name": "resizable-panes-js",
"version": "6.0.13",
"version": "6.0.14",
"description": "A simple library for resizing elements in the browser",

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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