iobroker.admin 7.4.4 → 7.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -8
- package/adminWww/asset-manifest.json +37 -37
- package/adminWww/index.html +1 -1
- package/adminWww/static/js/1737.08641cc2.chunk.js +3 -0
- package/adminWww/static/js/1737.08641cc2.chunk.js.map +1 -0
- package/adminWww/static/js/1892.3c30ecff.chunk.js.map +1 -1
- package/adminWww/static/js/{288.20da45b9.chunk.js → 288.23e8413f.chunk.js} +2 -2
- package/adminWww/static/js/288.23e8413f.chunk.js.map +1 -0
- package/adminWww/static/js/2930.8e88fcf2.chunk.js.LICENSE.txt +1 -1
- package/adminWww/static/js/2930.8e88fcf2.chunk.js.map +1 -1
- package/adminWww/static/js/3363.a4c36649.chunk.js.map +1 -1
- package/adminWww/static/js/3834.d81ffc60.chunk.js +2 -0
- package/adminWww/static/js/3834.d81ffc60.chunk.js.map +1 -0
- package/adminWww/static/js/4289.cbde8e52.chunk.js +2 -0
- package/adminWww/static/js/4289.cbde8e52.chunk.js.map +1 -0
- package/adminWww/static/js/471.8a82d825.chunk.js.map +1 -1
- package/adminWww/static/js/4720.6112531a.chunk.js +2 -0
- package/adminWww/static/js/4720.6112531a.chunk.js.map +1 -0
- package/adminWww/static/js/5503.a4ce73d8.chunk.js +3 -0
- package/adminWww/static/js/5503.a4ce73d8.chunk.js.map +1 -0
- package/adminWww/static/js/5687.d7fa0a4e.chunk.js +2 -0
- package/adminWww/static/js/5687.d7fa0a4e.chunk.js.map +1 -0
- package/adminWww/static/js/{6361.48a28196.chunk.js → 6361.ec86271d.chunk.js} +2 -2
- package/adminWww/static/js/6361.ec86271d.chunk.js.map +1 -0
- package/adminWww/static/js/6603.ee9b0df5.chunk.js +3 -0
- package/adminWww/static/js/6603.ee9b0df5.chunk.js.map +1 -0
- package/adminWww/static/js/6853.ff130602.chunk.js +2 -0
- package/adminWww/static/js/6853.ff130602.chunk.js.map +1 -0
- package/adminWww/static/js/7137.7b5ca6b5.chunk.js.map +1 -1
- package/adminWww/static/js/7424.223daaa3.chunk.js +2 -0
- package/adminWww/static/js/7424.223daaa3.chunk.js.map +1 -0
- package/adminWww/static/js/{8144.ae502bba.chunk.js → 8144.5989b02c.chunk.js} +3 -3
- package/adminWww/static/js/8144.5989b02c.chunk.js.map +1 -0
- package/adminWww/static/js/8387.2cb15163.chunk.js.map +1 -1
- package/adminWww/static/js/9072.4505ce12.chunk.js +2 -0
- package/adminWww/static/js/9072.4505ce12.chunk.js.map +1 -0
- package/adminWww/static/js/9086.a4fdc813.chunk.js +2 -0
- package/adminWww/static/js/9086.a4fdc813.chunk.js.map +1 -0
- package/adminWww/static/js/9228.cf388444.chunk.js +3 -0
- package/adminWww/static/js/9228.cf388444.chunk.js.map +1 -0
- package/adminWww/static/js/9701.2178b9bd.chunk.js +2 -0
- package/adminWww/static/js/9701.2178b9bd.chunk.js.map +1 -0
- package/adminWww/static/js/9731.b09a7023.chunk.js +3 -0
- package/adminWww/static/js/{9731.f67b583c.chunk.js.LICENSE.txt → 9731.b09a7023.chunk.js.LICENSE.txt} +1 -1
- package/adminWww/static/js/9731.b09a7023.chunk.js.map +1 -0
- package/adminWww/static/js/main.a833ed54.js +2 -0
- package/adminWww/static/js/main.a833ed54.js.map +1 -0
- package/build-backend/main.js +1 -1
- package/build-backend/main.js.map +1 -1
- package/io-package.json +27 -27
- package/package.json +5 -5
- package/adminWww/static/js/288.20da45b9.chunk.js.map +0 -1
- package/adminWww/static/js/38.e125c16b.chunk.js +0 -3
- package/adminWww/static/js/38.e125c16b.chunk.js.map +0 -1
- package/adminWww/static/js/3834.2e04eb51.chunk.js +0 -2
- package/adminWww/static/js/3834.2e04eb51.chunk.js.map +0 -1
- package/adminWww/static/js/4289.e9a5790f.chunk.js +0 -2
- package/adminWww/static/js/4289.e9a5790f.chunk.js.map +0 -1
- package/adminWww/static/js/4720.4bbc23ec.chunk.js +0 -2
- package/adminWww/static/js/4720.4bbc23ec.chunk.js.map +0 -1
- package/adminWww/static/js/5503.751d48e4.chunk.js +0 -3
- package/adminWww/static/js/5503.751d48e4.chunk.js.map +0 -1
- package/adminWww/static/js/5687.c249e41f.chunk.js +0 -2
- package/adminWww/static/js/5687.c249e41f.chunk.js.map +0 -1
- package/adminWww/static/js/6361.48a28196.chunk.js.map +0 -1
- package/adminWww/static/js/6603.614b4df4.chunk.js +0 -3
- package/adminWww/static/js/6603.614b4df4.chunk.js.map +0 -1
- package/adminWww/static/js/6853.f9170a75.chunk.js +0 -2
- package/adminWww/static/js/6853.f9170a75.chunk.js.map +0 -1
- package/adminWww/static/js/7424.98e61818.chunk.js +0 -2
- package/adminWww/static/js/7424.98e61818.chunk.js.map +0 -1
- package/adminWww/static/js/7863.92e61020.chunk.js +0 -2
- package/adminWww/static/js/7863.92e61020.chunk.js.map +0 -1
- package/adminWww/static/js/8144.ae502bba.chunk.js.map +0 -1
- package/adminWww/static/js/9072.4eaaedc2.chunk.js +0 -2
- package/adminWww/static/js/9072.4eaaedc2.chunk.js.map +0 -1
- package/adminWww/static/js/9228.3ce3911c.chunk.js +0 -3
- package/adminWww/static/js/9228.3ce3911c.chunk.js.map +0 -1
- package/adminWww/static/js/9701.b2813984.chunk.js +0 -2
- package/adminWww/static/js/9701.b2813984.chunk.js.map +0 -1
- package/adminWww/static/js/9731.f67b583c.chunk.js +0 -3
- package/adminWww/static/js/9731.f67b583c.chunk.js.map +0 -1
- package/adminWww/static/js/main.11639e29.js +0 -2
- package/adminWww/static/js/main.11639e29.js.map +0 -1
- /package/adminWww/static/js/{38.e125c16b.chunk.js.LICENSE.txt → 1737.08641cc2.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{5503.751d48e4.chunk.js.LICENSE.txt → 5503.a4ce73d8.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{6603.614b4df4.chunk.js.LICENSE.txt → 6603.ee9b0df5.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{8144.ae502bba.chunk.js.LICENSE.txt → 8144.5989b02c.chunk.js.LICENSE.txt} +0 -0
- /package/adminWww/static/js/{9228.3ce3911c.chunk.js.LICENSE.txt → 9228.cf388444.chunk.js.LICENSE.txt} +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/*! For license information please see 8144.
|
|
2
|
-
"use strict";(self.webpackChunksrc_rx=self.webpackChunksrc_rx||[]).push([[8144],{84470:(e,t,n)=>{n.d(t,{Ay:()=>w,m8:()=>_});var r=n(70579),i=n(28437),a=n.n(i),o=n(2086);function s(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===_.Horizontal?t.clientWidth:t.clientHeight;return 0!==r?(e===_.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}function g(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{condition:!0};const{condition:a}=r,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(r,["condition"]);(0,i.useEffect)((()=>(a&&window.addEventListener(e,t,o),()=>{a&&window.removeEventListener(e,t)})),[e,t,a,...n])}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("/* === Main Container === */\n.__dbk__container {\n height: 100%;\n width: 100%;\n\n display: flex;\n overflow: hidden;\n}\n\n.__dbk__container.Horizontal {\n flex-direction: row;\n}\n\n.__dbk__container.Vertical {\n flex-direction: column;\n}\n/* ====== */\n\n/* === Wrapper for each child element === */\n.__dbk__child-wrapper {\n height: 100%;\n width: 100%;\n}\n/* ====== */\n\n/* === Gutter === */\n.__dbk__gutter {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n/* .__dbk__gutter > div {\n background: red;\n} */\n.__dbk__gutter.Horizontal {\n height: 100%;\n padding: 0 2px;\n flex-direction: column;\n}\n.__dbk__gutter.Horizontal:hover {\n cursor: col-resize;\n}\n\n.__dbk__gutter.Vertical {\n width: 100%;\n padding: 2px 0;\n flex-direction: row;\n}\n.__dbk__gutter.Vertical:hover {\n cursor: row-resize;\n}\n\n.__dbk__gutter.Light {\n background: #EDF0EF;\n}\n.__dbk__gutter.Light:hover > .__dbk__dragger {\n background: #76747B;\n}\n\n.__dbk__gutter.Dark {\n background: #020203;\n}\n.__dbk__gutter.Dark:hover > .__dbk__dragger {\n background: #9995A3;\n}\n/* ====== */\n\n/* === Gutter's Dragger === */\n.__dbk__dragger {\n border-radius: 2px;\n}\n\n.__dbk__dragger.Horizontal {\n width: 4px;\n height: 24px; \n}\n\n.__dbk__dragger.Vertical {\n width: 24px;\n height: 4px; \n}\n\n.__dbk__dragger.Light {\n background: #A6ACB5;\n}\n\n.__dbk__dragger.Dark {\n background: #434252;\n}\n/* ====== */");const c=a().forwardRef(((e,t)=>{let{className:n,theme:i,draggerClassName:a,direction:o=_.Vertical,onDragging:s}=e;const g="__dbk__gutter ".concat(o," ").concat(n||i),c="__dbk__dragger ".concat(o," ").concat(a||i);return(0,r.jsx)("div",Object.assign({className:g,ref:t,dir:o,onMouseDown:s,onTouchStart:y?s:void 0},{children:(0,r.jsx)("div",{className:c},void 0)}),void 0)}));var d,l;function u(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function h(e,t){switch(t.type){case d.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case d.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,a=r[0].parentNode;if(!a)throw new Error("Cannot create pairs - parent is undefined.");const o=s(n,a);if(void 0===o)throw new Error("Cannot create pairs - parent has undefined or zero size: ".concat(o,"."));const g=[];return r.forEach(((e,t)=>{if(t>0){const e=r[t-1],o=r[t],s=i[t-1],c=n===_.Horizontal?e.getBoundingClientRect().left:e.getBoundingClientRect().top,d=n===_.Horizontal?o.getBoundingClientRect().right:o.getBoundingClientRect().bottom,l=n===_.Horizontal?e.getBoundingClientRect().width+s.getBoundingClientRect().width+o.getBoundingClientRect().width:e.getBoundingClientRect().height+s.getBoundingClientRect().height+o.getBoundingClientRect().height,u=n===_.Horizontal?s.getBoundingClientRect().width:s.getBoundingClientRect().height,h={idx:t-1,a:e,b:o,gutter:s,parent:a,start:c,end:d,size:l,gutterSize:u,aSizePct:100/r.length,bSizePct:100/r.length};g.push(h)}})),Object.assign(Object.assign({},e),{pairs:g})}case d.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case d.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case d.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],a=s(n,i.parent);if(!a)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const o=i.gutter[n===_.Horizontal?"clientWidth":"clientHeight"],g=0===r,c=r===e.pairs.length-1,{aGutterSize:d,bGutterSize:l}=u(o,g,c);let h,p,f,b,y;return n===_.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,b=(i.a.getBoundingClientRect().width+d)/a*100,y=(i.b.getBoundingClientRect().width+l)/a*100,f=i.a.getBoundingClientRect().width+d+l+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,b=(i.a.getBoundingClientRect().height+d)/a*100,y=(i.b.getBoundingClientRect().height+l)/a*100,f=i.a.getBoundingClientRect().height+d+l+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:f,aSizePct:b,bSizePct:y,gutterSize:o}),Object.assign({},e)}default:return e}}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return i.Children.toArray(e).reduce(((e,r,a)=>((0,o.isFragment)(r)?e.push.apply(e,p(r.props.children,t+1,n.concat(r.key||a))):(0,i.isValidElement)(r)?e.push((0,i.cloneElement)(r,{key:n.concat(String(r.key)).join(".")})):"string"!=typeof r&&"number"!=typeof r||e.push(r),e)),[])}(l=d||(d={}))[l.SetIsReadyToCompute=0]="SetIsReadyToCompute",l[l.CreatePairs=1]="CreatePairs",l[l.CalculateSizes=2]="CalculateSizes",l[l.StartDragging=3]="StartDragging",l[l.StopDragging=4]="StopDragging";const f=e=>"changedTouches"in e;var _,b;!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(_||(_={})),function(e){e.Light="Light",e.Dark="Dark"}(b||(b={}));const y="undefined"!=typeof window&&"ontouchstart"in window;function z(e){return e===_.Horizontal?"col-resize":"row-resize"}const C={isReady:!1,isDragging:!1,pairs:[]};function w(e){let{direction:t=_.Horizontal,minWidths:n=[],minHeights:o=[],initialSizes:l,gutterTheme:w=b.Dark,gutterClassName:m,draggerClassName:x,children:v,onResizeStarted:S,onResizeFinished:k,classes:R=[]}=e;const I=p(v),[B,D]=(0,i.useReducer)(h,C),E=(0,i.useRef)(null),j=(0,i.useRef)([]),O=(0,i.useRef)([]);j.current=[],O.current=[];const H=a().useCallback((e=>{D({type:d.SetIsReadyToCompute,payload:{isReady:e}})}),[]),T=a().useCallback(((e,t)=>{D({type:d.StartDragging,payload:{gutterIdx:t}});const n=B.pairs[t];null==S||S(n.idx),n.a.style.userSelect="none",n.b.style.userSelect="none",n.gutter.style.cursor=z(e),n.parent.style.cursor=z(e),document.body.style.cursor=z(e)}),[B.pairs]),F=a().useCallback((()=>{D({type:d.StopDragging});const e=[];for(let r=0;r<B.pairs.length;r++){const n=B.pairs[r],i=s(t,n.parent);if(void 0===i)throw new Error("Cannot call the 'onResizeFinished' callback - parentSize is undefined");if(void 0===n.gutterSize)throw new Error("Cannot call 'onResizeFinished' callback - gutterSize is undefined");const a=0===r,o=r===B.pairs.length-1,g=n.a.getBoundingClientRect()[t===_.Horizontal?"width":"height"],{aGutterSize:c,bGutterSize:d}=u(n.gutterSize,a,o),l=(g+c)/i*100;if(e.push(l),o){const r=(n.b.getBoundingClientRect()[t===_.Horizontal?"width":"height"]+d)/i*100;e.push(r)}}if(void 0===B.draggingIdx)throw new Error("Could not reset cursor and user-select because 'state.draggingIdx' is undefined");const n=B.pairs[B.draggingIdx];null==k||k(n.idx,e),n.a.style.userSelect="",n.b.style.userSelect="",n.gutter.style.cursor="",n.parent.style.cursor="",document.body.style.cursor=""}),[B.draggingIdx,B.pairs,t]),N=a().useCallback(((e,t)=>{D({type:d.CalculateSizes,payload:{direction:e,gutterIdx:t}})}),[]),P=a().useCallback(((e,t,n)=>{D({type:d.CreatePairs,payload:{direction:e,children:t,gutters:n}})}),[]),G=a().useCallback(((e,t,n,r)=>{const i=t[0].parentNode;if(!i)throw new Error("Cannot set initial sizes - parent is undefined");if(void 0===s(e,i))throw new Error("Cannot set initial sizes - parent has undefined size");t.forEach(((i,a)=>{const o=0===a,s=a===t.length-1;let g,c=0;t.length>1&&(c=n[s?a-1:a].getBoundingClientRect()[e===_.Horizontal?"width":"height"],c=o||s?c/2:c),g=r&&a<r.length?"calc(".concat(r[a],"% - ").concat(c,"px)"):"calc(".concat(100/t.length,"% - ").concat(c,"px)"),e===_.Horizontal?(i.style.width=g,i.style.height="100%"):(i.style.height=g,i.style.width="100%")}))}),[]),V=a().useCallback(((e,t)=>{if(void 0===B.draggingIdx)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const n=B.pairs[B.draggingIdx];if(void 0===n.size)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(void 0===n.gutterSize)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const r=n.aSizePct+n.bSizePct,i=t/n.size*r,a=r-t/n.size*r,o=0===B.draggingIdx,s=B.draggingIdx===B.pairs.length-1,{aGutterSize:g,bGutterSize:c}=u(n.gutterSize,o,s),d="calc(".concat(i,"% - ").concat(g,"px)"),l="calc(".concat(a,"% - ").concat(c,"px)");e===_.Horizontal?(n.a.style.width=d,n.b.style.width=l):(n.a.style.height=d,n.b.style.height=l)}),[B.draggingIdx,B.pairs,t]),L=a().useCallback(((e,t,n)=>{if(!B.isDragging)return;if(void 0===B.draggingIdx)throw new Error("Cannot drag - 'draggingIdx' is undefined");const r=B.pairs[B.draggingIdx];if(void 0===r.start)throw new Error("Cannot drag - 'pair.start' is undefined");if(void 0===r.size)throw new Error("Cannot drag - 'pair.size' is undefined");if(void 0===r.gutterSize)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let i=function(e,t){const n=f(t)?t.changedTouches[0]:t;return e===_.Horizontal?n.clientX:n.clientY}(t,e)-r.start,a=16,o=16;n.length>B.draggingIdx&&(a=n[B.draggingIdx]),n.length>=B.draggingIdx+1&&(o=n[B.draggingIdx+1]),i<r.gutterSize+a&&(i=r.gutterSize+a),i>=r.size-(r.gutterSize+o)&&(i=r.size-(r.gutterSize+o)),V(t,i)}),[B.isDragging,B.draggingIdx,B.pairs,V]),A=()=>{if(B.isDragging){if(void 0===B.draggingIdx)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");N(t,B.draggingIdx),F()}},W=e=>{B.isDragging&&(f(e)&&e.preventDefault(),L(e,t,t===_.Horizontal?n:o))};function $(e,t){if(!e.current)throw new Error("Can't add element to ref object - ref isn't initialized");t&&!e.current.includes(t)&&e.current.push(t)}return g("mouseup",A,[B.isDragging,F]),g("mousemove",W,[t,B.isDragging,L,n,o]),g("touchend",A,[B.isDragging,F],{condition:y}),g("touchmove",W,[t,B.isDragging,L,n,o],{condition:y,passive:!y}),(0,i.useEffect)((function(){if(!E.current)return;const e=E.current.parentElement;if(!e)return;const n=new ResizeObserver((()=>{const n=getComputedStyle(e),r=t===_.Horizontal?e.clientWidth:e.clientHeight;H(!!n&&!!r)}));return n.observe(e),()=>{n.disconnect()}}),[E.current,t]),(0,i.useEffect)((function(){if(B.isReady&&(!j.current||j.current[0].offsetParent)){if(!j.current||!O.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");I.length<=1?G(t,j.current,O.current,l):(G(t,j.current,O.current,l),P(t,j.current,O.current))}}),[v,B.isReady,t,G,P,l]),(0,r.jsx)("div",Object.assign({className:"__dbk__container ".concat(t),ref:E},{children:B.isReady&&I.map(((e,n)=>(0,r.jsxs)(a().Fragment,{children:[(0,r.jsx)("div",Object.assign({ref:e=>$(j,e),className:"__dbk__child-wrapper "+(n<R.length?R[n]:"")},{children:e}),void 0),n<I.length-1&&(0,r.jsx)(c,{ref:e=>$(O,e),className:m,theme:w,draggerClassName:x,direction:t,onDragging:()=>{return N(t,e=n),void T(t,e);var e}},void 0)]},n)))}),void 0)}},95082:(e,t)=>{var n=60103,r=60106,i=60107,a=60108,o=60114,s=60109,g=60110,c=60112,d=60113,l=60120,u=60115,h=60116,p=60121,f=60122,_=60117,b=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;n=z("react.element"),r=z("react.portal"),i=z("react.fragment"),a=z("react.strict_mode"),o=z("react.profiler"),s=z("react.provider"),g=z("react.context"),c=z("react.forward_ref"),d=z("react.suspense"),l=z("react.suspense_list"),u=z("react.memo"),h=z("react.lazy"),p=z("react.block"),f=z("react.server.block"),_=z("react.fundamental"),b=z("react.debug_trace_mode"),y=z("react.legacy_hidden")}function C(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case o:case a:case d:case l:return e;default:switch(e=e&&e.$$typeof){case g:case c:case h:case u:case s:return e;default:return t}}case r:return t}}}t.isFragment=function(e){return C(e)===i}},2086:(e,t,n)=>{e.exports=n(95082)},94343:(e,t,n)=>{n.d(t,{gx:()=>g});var r=n(28437),i=n(35661);var a=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),o=(e,t)=>{let n=e.getClientOffset();if(null===n)return null;if(!t.current||!t.current.getBoundingClientRect)return a(n,(e=>{let t=e.getInitialClientOffset(),n=e.getInitialSourceClientOffset();return null===t||null===n?{x:0,y:0}:a(t,n)})(e));let r=t.current.getBoundingClientRect(),i={x:r.width/2,y:r.height/2};return a(n,i)},s=e=>{let t="translate(".concat(e.x.toFixed(1),"px, ").concat(e.y.toFixed(1),"px)");return{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t}},g=()=>{let e=(0,r.useRef)(null),t=(0,i.V)((t=>({currentOffset:o(t,e),isDragging:t.isDragging(),itemType:t.getItemType(),item:t.getItem(),monitor:t})));return t.isDragging&&null!==t.currentOffset?{display:!0,itemType:t.itemType,item:t.item,style:s(t.currentOffset),monitor:t.monitor,ref:e}:{display:!1}};(0,r.createContext)(void 0)}}]);
|
|
3
|
-
//# sourceMappingURL=8144.
|
|
1
|
+
/*! For license information please see 8144.5989b02c.chunk.js.LICENSE.txt */
|
|
2
|
+
"use strict";(self.webpackChunksrc_rx=self.webpackChunksrc_rx||[]).push([[8144],{84470:(e,t,n)=>{n.d(t,{Ay:()=>C,m8:()=>b});var r=n(70579),i=n(28437),a=n.n(i),o=n(2086);function s(e,t){const n=getComputedStyle(t);if(!n)return;let r=e===b.Horizontal?t.clientWidth:t.clientHeight;return 0!==r?(e===b.Horizontal?r-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight):r-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom),r):void 0}function c(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{condition:!0};const{condition:a}=r,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(r,["condition"]);(0,i.useEffect)((()=>(a&&window.addEventListener(e,t,o),()=>{a&&window.removeEventListener(e,t)})),[e,t,a,...n])}!function(e,t){void 0===t&&(t={});var n=t.insertAt;if(e&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],i=document.createElement("style");i.type="text/css","top"===n&&r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i),i.styleSheet?i.styleSheet.cssText=e:i.appendChild(document.createTextNode(e))}}("/* === Main Container === */\n.__dbk__container {\n height: 100%;\n width: 100%;\n\n display: flex;\n overflow: hidden;\n}\n\n.__dbk__container.Horizontal {\n flex-direction: row;\n}\n\n.__dbk__container.Vertical {\n flex-direction: column;\n}\n/* ====== */\n\n/* === Wrapper for each child element === */\n.__dbk__child-wrapper {\n height: 100%;\n width: 100%;\n}\n/* ====== */\n\n/* === Gutter === */\n.__dbk__gutter {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n/* .__dbk__gutter > div {\n background: red;\n} */\n.__dbk__gutter.Horizontal {\n height: 100%;\n padding: 0 2px;\n flex-direction: column;\n}\n.__dbk__gutter.Horizontal:hover {\n cursor: col-resize;\n}\n\n.__dbk__gutter.Vertical {\n width: 100%;\n padding: 2px 0;\n flex-direction: row;\n}\n.__dbk__gutter.Vertical:hover {\n cursor: row-resize;\n}\n\n.__dbk__gutter.Light {\n background: #EDF0EF;\n}\n.__dbk__gutter.Light:hover > .__dbk__dragger {\n background: #76747B;\n}\n\n.__dbk__gutter.Dark {\n background: #020203;\n}\n.__dbk__gutter.Dark:hover > .__dbk__dragger {\n background: #9995A3;\n}\n/* ====== */\n\n/* === Gutter's Dragger === */\n.__dbk__dragger {\n border-radius: 2px;\n}\n\n.__dbk__dragger.Horizontal {\n width: 4px;\n height: 24px; \n}\n\n.__dbk__dragger.Vertical {\n width: 24px;\n height: 4px; \n}\n\n.__dbk__dragger.Light {\n background: #A6ACB5;\n}\n\n.__dbk__dragger.Dark {\n background: #434252;\n}\n/* ====== */");const d=a().forwardRef(((e,t)=>{let{className:n,theme:i,draggerClassName:a,direction:o=b.Vertical,onDragging:s}=e;const c="__dbk__gutter ".concat(o," ").concat(n||i),d="__dbk__dragger ".concat(o," ").concat(a||i);return(0,r.jsx)("div",Object.assign({className:c,ref:t,dir:o,onMouseDown:s,onTouchStart:y?s:void 0},{children:(0,r.jsx)("div",{className:d},void 0)}),void 0)}));var g,l;function u(e,t,n){let r,i;return t?(r=e/2,i=e):n?(r=e,i=e/2):(r=e,i=e),{aGutterSize:r,bGutterSize:i}}function h(e,t){switch(t.type){case g.SetIsReadyToCompute:return Object.assign(Object.assign({},e),{isReady:t.payload.isReady});case g.CreatePairs:{const{direction:n,children:r,gutters:i}=t.payload,a=r[0].parentNode;if(!a)throw new Error("Cannot create pairs - parent is undefined.");const o=s(n,a);if(void 0===o)throw new Error("Cannot create pairs - parent has undefined or zero size: ".concat(o,"."));const c=[];return r.forEach(((e,t)=>{if(t>0){const e=r[t-1],o=r[t],s=i[t-1],d=n===b.Horizontal?e.getBoundingClientRect().left:e.getBoundingClientRect().top,g=n===b.Horizontal?o.getBoundingClientRect().right:o.getBoundingClientRect().bottom,l=n===b.Horizontal?e.getBoundingClientRect().width+s.getBoundingClientRect().width+o.getBoundingClientRect().width:e.getBoundingClientRect().height+s.getBoundingClientRect().height+o.getBoundingClientRect().height,u=n===b.Horizontal?s.getBoundingClientRect().width:s.getBoundingClientRect().height,h={idx:t-1,a:e,b:o,gutter:s,parent:a,start:d,end:g,size:l,gutterSize:u,aSizePct:100/r.length,bSizePct:100/r.length};c.push(h)}})),Object.assign(Object.assign({},e),{pairs:c})}case g.StartDragging:{const{gutterIdx:n}=t.payload;return Object.assign(Object.assign({},e),{isDragging:!0,draggingIdx:n})}case g.StopDragging:return Object.assign(Object.assign({},e),{isDragging:!1});case g.CalculateSizes:{const{direction:n,gutterIdx:r}=t.payload,i=e.pairs[r],a=s(n,i.parent);if(!a)throw new Error("Cannot calculate sizes - 'pair.parent' has undefined or zero size.");const o=i.gutter[n===b.Horizontal?"clientWidth":"clientHeight"],c=0===r,d=r===e.pairs.length-1,{aGutterSize:g,bGutterSize:l}=u(o,c,d);let h,p,f,_,y;return n===b.Horizontal?(h=i.a.getBoundingClientRect().left,p=i.b.getBoundingClientRect().right,_=(i.a.getBoundingClientRect().width+g)/a*100,y=(i.b.getBoundingClientRect().width+l)/a*100,f=i.a.getBoundingClientRect().width+g+l+i.b.getBoundingClientRect().width):(h=i.a.getBoundingClientRect().top,p=i.b.getBoundingClientRect().bottom,_=(i.a.getBoundingClientRect().height+g)/a*100,y=(i.b.getBoundingClientRect().height+l)/a*100,f=i.a.getBoundingClientRect().height+g+l+i.b.getBoundingClientRect().height),e.pairs[r]=Object.assign(Object.assign({},i),{start:h,end:p,size:f,aSizePct:_,bSizePct:y,gutterSize:o}),Object.assign({},e)}default:return e}}function p(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];return i.Children.toArray(e).reduce(((e,r,a)=>((0,o.isFragment)(r)?e.push.apply(e,p(r.props.children,t+1,n.concat(r.key||a))):(0,i.isValidElement)(r)?e.push((0,i.cloneElement)(r,{key:n.concat(String(r.key)).join(".")})):"string"!=typeof r&&"number"!=typeof r||e.push(r),e)),[])}(l=g||(g={}))[l.SetIsReadyToCompute=0]="SetIsReadyToCompute",l[l.CreatePairs=1]="CreatePairs",l[l.CalculateSizes=2]="CalculateSizes",l[l.StartDragging=3]="StartDragging",l[l.StopDragging=4]="StopDragging";const f=e=>"changedTouches"in e;var b,_;!function(e){e.Horizontal="Horizontal",e.Vertical="Vertical"}(b||(b={})),function(e){e.Light="Light",e.Dark="Dark"}(_||(_={}));const y="undefined"!=typeof window&&"ontouchstart"in window;function z(e){return e===b.Horizontal?"col-resize":"row-resize"}const w={isReady:!1,isDragging:!1,pairs:[]};function C(e){let{direction:t=b.Horizontal,minWidths:n=[],minHeights:o=[],initialSizes:l,gutterTheme:C=_.Dark,gutterClassName:m,draggerClassName:x,children:v,onResizeStarted:S,onResizeFinished:k,classes:R=[]}=e;const I=p(v),[B,D]=(0,i.useReducer)(h,w),E=(0,i.useRef)(null),j=(0,i.useRef)([]),O=(0,i.useRef)([]);j.current=[],O.current=[];const H=a().useCallback((e=>{D({type:g.SetIsReadyToCompute,payload:{isReady:e}})}),[]),T=a().useCallback(((e,t)=>{D({type:g.StartDragging,payload:{gutterIdx:t}});const n=B.pairs[t];null==S||S(n.idx),n.a.style.userSelect="none",n.b.style.userSelect="none",n.gutter.style.cursor=z(e),n.parent.style.cursor=z(e),document.body.style.cursor=z(e)}),[B.pairs]),F=a().useCallback((()=>{D({type:g.StopDragging});const e=[];for(let r=0;r<B.pairs.length;r++){const n=B.pairs[r],i=s(t,n.parent);if(void 0===i)throw new Error("Cannot call the 'onResizeFinished' callback - parentSize is undefined");if(void 0===n.gutterSize)throw new Error("Cannot call 'onResizeFinished' callback - gutterSize is undefined");const a=0===r,o=r===B.pairs.length-1,c=n.a.getBoundingClientRect()[t===b.Horizontal?"width":"height"],{aGutterSize:d,bGutterSize:g}=u(n.gutterSize,a,o),l=(c+d)/i*100;if(e.push(l),o){const r=(n.b.getBoundingClientRect()[t===b.Horizontal?"width":"height"]+g)/i*100;e.push(r)}}if(void 0===B.draggingIdx)throw new Error("Could not reset cursor and user-select because 'state.draggingIdx' is undefined");const n=B.pairs[B.draggingIdx];null==k||k(n.idx,e),n.a.style.userSelect="",n.b.style.userSelect="",n.gutter.style.cursor="",n.parent.style.cursor="",document.body.style.cursor=""}),[B.draggingIdx,B.pairs,t]),N=a().useCallback(((e,t)=>{D({type:g.CalculateSizes,payload:{direction:e,gutterIdx:t}})}),[]),P=a().useCallback(((e,t,n)=>{D({type:g.CreatePairs,payload:{direction:e,children:t,gutters:n}})}),[]),G=a().useCallback(((e,t,n,r)=>{const i=t[0].parentNode;if(!i)throw new Error("Cannot set initial sizes - parent is undefined");if(void 0===s(e,i))throw new Error("Cannot set initial sizes - parent has undefined size");t.forEach(((i,a)=>{const o=0===a,s=a===t.length-1;let c,d=0;t.length>1&&(d=n[s?a-1:a].getBoundingClientRect()[e===b.Horizontal?"width":"height"],d=o||s?d/2:d),c=r&&a<r.length?"calc(".concat(r[a],"% - ").concat(d,"px)"):"calc(".concat(100/t.length,"% - ").concat(d,"px)"),e===b.Horizontal?(i.style.width=c,i.style.height="100%"):(i.style.height=c,i.style.width="100%")}))}),[]),V=a().useCallback(((e,t)=>{if(void 0===B.draggingIdx)throw new Error("Cannot adjust size - 'draggingIdx' is undefined");const n=B.pairs[B.draggingIdx];if(void 0===n.size)throw new Error("Cannot adjust size - 'pair.size' is undefined");if(void 0===n.gutterSize)throw new Error("Cannot adjust size - 'pair.gutterSize' is undefined");const r=n.aSizePct+n.bSizePct,i=t/n.size*r,a=r-t/n.size*r,o=0===B.draggingIdx,s=B.draggingIdx===B.pairs.length-1,{aGutterSize:c,bGutterSize:d}=u(n.gutterSize,o,s),g="calc(".concat(i,"% - ").concat(c,"px)"),l="calc(".concat(a,"% - ").concat(d,"px)");e===b.Horizontal?(n.a.style.width=g,n.b.style.width=l):(n.a.style.height=g,n.b.style.height=l)}),[B.draggingIdx,B.pairs,t]),L=a().useCallback(((e,t,n)=>{if(!B.isDragging)return;if(void 0===B.draggingIdx)throw new Error("Cannot drag - 'draggingIdx' is undefined");const r=B.pairs[B.draggingIdx];if(void 0===r.start)throw new Error("Cannot drag - 'pair.start' is undefined");if(void 0===r.size)throw new Error("Cannot drag - 'pair.size' is undefined");if(void 0===r.gutterSize)throw new Error("Cannot drag - 'pair.gutterSize' is undefined");let i=function(e,t){const n=f(t)?t.changedTouches[0]:t;return e===b.Horizontal?n.clientX:n.clientY}(t,e)-r.start,a=16,o=16;n.length>B.draggingIdx&&(a=n[B.draggingIdx]),n.length>=B.draggingIdx+1&&(o=n[B.draggingIdx+1]),i<r.gutterSize+a&&(i=r.gutterSize+a),i>=r.size-(r.gutterSize+o)&&(i=r.size-(r.gutterSize+o)),V(t,i)}),[B.isDragging,B.draggingIdx,B.pairs,V]),A=()=>{if(B.isDragging){if(void 0===B.draggingIdx)throw new Error("Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined");N(t,B.draggingIdx),F()}},W=e=>{B.isDragging&&(f(e)&&e.preventDefault(),L(e,t,t===b.Horizontal?n:o))};function $(e,t){if(!e.current)throw new Error("Can't add element to ref object - ref isn't initialized");t&&!e.current.includes(t)&&e.current.push(t)}return c("mouseup",A,[B.isDragging,F]),c("mousemove",W,[t,B.isDragging,L,n,o]),c("touchend",A,[B.isDragging,F],{condition:y}),c("touchmove",W,[t,B.isDragging,L,n,o],{condition:y,passive:!y}),(0,i.useEffect)((function(){if(!E.current)return;const e=E.current.parentElement;if(!e)return;const n=new ResizeObserver((()=>{const n=getComputedStyle(e),r=t===b.Horizontal?e.clientWidth:e.clientHeight;H(!!n&&!!r)}));return n.observe(e),()=>{n.disconnect()}}),[E.current,t]),(0,i.useEffect)((function(){if(B.isReady&&(!j.current||j.current[0].offsetParent)){if(!j.current||!O.current)throw new Error("Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined");I.length<=1?G(t,j.current,O.current,l):(G(t,j.current,O.current,l),P(t,j.current,O.current))}}),[v,B.isReady,t,G,P,l]),(0,r.jsx)("div",Object.assign({className:"__dbk__container ".concat(t),ref:E},{children:B.isReady&&I.map(((e,n)=>(0,r.jsxs)(a().Fragment,{children:[(0,r.jsx)("div",Object.assign({ref:e=>$(j,e),className:"__dbk__child-wrapper "+(n<R.length?R[n]:"")},{children:e}),void 0),n<I.length-1&&(0,r.jsx)(d,{ref:e=>$(O,e),className:m,theme:C,draggerClassName:x,direction:t,onDragging:()=>{return N(t,e=n),void T(t,e);var e}},void 0)]},n)))}),void 0)}},95082:(e,t)=>{var n=60103,r=60106,i=60107,a=60108,o=60114,s=60109,c=60110,d=60112,g=60113,l=60120,u=60115,h=60116,p=60121,f=60122,b=60117,_=60129,y=60131;if("function"===typeof Symbol&&Symbol.for){var z=Symbol.for;n=z("react.element"),r=z("react.portal"),i=z("react.fragment"),a=z("react.strict_mode"),o=z("react.profiler"),s=z("react.provider"),c=z("react.context"),d=z("react.forward_ref"),g=z("react.suspense"),l=z("react.suspense_list"),u=z("react.memo"),h=z("react.lazy"),p=z("react.block"),f=z("react.server.block"),b=z("react.fundamental"),_=z("react.debug_trace_mode"),y=z("react.legacy_hidden")}function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case i:case o:case a:case g:case l:return e;default:switch(e=e&&e.$$typeof){case c:case d:case h:case u:case s:return e;default:return t}}case r:return t}}}t.isFragment=function(e){return w(e)===i}},2086:(e,t,n)=>{e.exports=n(95082)},94343:(e,t,n)=>{n.d(t,{gx:()=>g});var r=n(28437),i=n(35661);n(70579);(0,r.createContext)(void 0);var a=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),o=(e,t)=>{switch(e){case"left":case"top-start":case"bottom-start":return 0;case"right":case"top-end":case"bottom-end":return t.width;default:return t.width/2}},s=(e,t)=>{switch(e){case"top":case"top-start":case"top-end":return 0;case"bottom":case"bottom-start":case"bottom-end":return t.height;default:return t.height/2}},c=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"center",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{x:0,y:0},i=e.getClientOffset();if(null===i)return null;if(!t.current||!t.current.getBoundingClientRect)return a(i,(e=>{let t=e.getInitialClientOffset(),n=e.getInitialSourceClientOffset();return null===t||null===n?{x:0,y:0}:a(t,n)})(e));let c=t.current.getBoundingClientRect(),d={x:o(n,c),y:s(n,c)};return((e,t)=>({x:e.x+t.x,y:e.y+t.y}))(a(i,d),r)},d=e=>{let t="translate(".concat(e.x.toFixed(1),"px, ").concat(e.y.toFixed(1),"px)");return{pointerEvents:"none",position:"fixed",top:0,left:0,transform:t,WebkitTransform:t}},g=e=>{let t=(0,r.useRef)(null),n=(0,i.V)((n=>({currentOffset:c(n,t,null===e||void 0===e?void 0:e.placement,null===e||void 0===e?void 0:e.padding),isDragging:n.isDragging(),itemType:n.getItemType(),item:n.getItem(),monitor:n})));return n.isDragging&&null!==n.currentOffset?{display:!0,itemType:n.itemType,item:n.item,style:d(n.currentOffset),monitor:n.monitor,ref:t}:{display:!1}}}}]);
|
|
3
|
+
//# sourceMappingURL=8144.5989b02c.chunk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"static/js/8144.5989b02c.chunk.js","mappings":";kLAEwBA,EAAaC,EAA2BC,GAI9D,MAAMC,EAAgBC,iBAAiBF,GACvC,IAAKC,EAAe,OAEpB,IAAIE,EAAOJ,IAAcK,EAAeC,WAAaL,EAAQM,YAAcN,EAAQO,aAEnF,OAAa,IAATJ,GAEAJ,IAAcK,EAAeC,WAC/BF,GAAQK,WAAWP,EAAcQ,aAAeD,WAAWP,EAAcS,cAEzEP,GAAQK,WAAWP,EAAcU,YAAcH,WAAWP,EAAcW,eAGnET,QAAA,CACT,CCdA,SAASU,EAAiBd,EAAeC,GAAuH,IAAxFC,EAAAa,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAc,GAAIG,EAAAH,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAyD,CAAEI,WAAA,GACnJ,MAAMA,UAAEC,GAA0CF,EAA5BG,EAAA,SAAArB,EAAAC,GAAA,IAAAC,EAAA,WAAAE,KAAAJ,EAAAsB,OAAAC,UAAAC,eAAAC,KAAAzB,EAAAI,IAAAH,EAAAyB,QAAAtB,GAAA,IAAAF,EAAAE,GAAAJ,EAAAI,IAAA,SAAAJ,GAAA,mBAAAsB,OAAAK,sBAAA,KAAAT,EAAA,MAAAd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D,QAAQ,GAAE,OAAM,MAAM,CAACC,cAAc,OAAOC,SAAS,QAAQnG,IAAI,EAAED,KAAK,EAAEqG,UAAUjL,EAAEkL,gBAAgBlL,EAAE,EAAEmB,EAAEpB,IAAI,IAAIC,GAAE+G,EAAAA,EAAAA,QAAE,MAAM9G,GAAE2G,EAAAA,EAAAA,IAAE3F,IAAC,CAAIkK,cAAcrL,EAAEmB,EAAEjB,EAAG,OAADD,QAAC,IAADA,OAAC,EAADA,EAAGqL,UAAW,OAADrL,QAAC,IAADA,OAAC,EAADA,EAAGsL,SAASrF,WAAW/E,EAAE+E,aAAasF,SAASrK,EAAEsK,cAAcC,KAAKvK,EAAEwK,UAAUC,QAAQzK,MAAK,OAAOhB,EAAE+F,YAA8B,OAAlB/F,EAAEkL,cAAkC,CAACQ,SAAQ,EAAGL,SAASrL,EAAEqL,SAASE,KAAKvL,EAAEuL,KAAK9C,MAAMlB,EAAEvH,EAAEkL,eAAeO,QAAQzL,EAAEyL,QAAQnI,IAAIvD,GAAxG,CAAC2L,SAAQ,EAAiG","sources":["../node_modules/@devbookhq/splitter/src/utils/getInnerSize.ts","../node_modules/@devbookhq/splitter/src/useEventListener.ts","../node_modules/@devbookhq/splitter/node_modules/style-inject/dist/style-inject.es.js","../node_modules/@devbookhq/splitter/src/Gutter.tsx","../node_modules/@devbookhq/splitter/src/state/reducer.actions.ts","../node_modules/@devbookhq/splitter/src/utils/getGutterSize.ts","../node_modules/@devbookhq/splitter/src/state/reducer.ts","../node_modules/@devbookhq/splitter/src/utils/flattenChildren.ts","../node_modules/@devbookhq/splitter/src/utils/isTouchEvent.ts","../node_modules/@devbookhq/splitter/src/index.tsx","../node_modules/react-is/cjs/react-is.production.min.js","../node_modules/react-is/index.js","../node_modules/react-dnd-preview/dist/index.js"],"sourcesContent":["import { SplitDirection } from '../index';\n\nexport default function getInnerSize(direction: SplitDirection, element: HTMLElement) {\n // Returns undefined if parent element has no layout yet.\n // Or if the parent has no size.\n\n const computedStyle = getComputedStyle(element);\n if (!computedStyle) return;\n\n let size = direction === SplitDirection.Horizontal ? element.clientWidth : element.clientHeight;\n\n if (size === 0) return;\n\n if (direction === SplitDirection.Horizontal) {\n size -= parseFloat(computedStyle.paddingLeft) + parseFloat(computedStyle.paddingRight);\n } else {\n size -= parseFloat(computedStyle.paddingTop) + parseFloat(computedStyle.paddingBottom);\n }\n\n return size;\n}\n","import { useEffect } from 'react';\n\ninterface UseAddEventListenerOptions extends AddEventListenerOptions {\n condition: boolean;\n}\n\nfunction useEventListener(event: string, handler: (event: any) => void, deps: any[] = [], useAddEventListenerOptions: UseAddEventListenerOptions = { condition: true }) {\n const { condition, ...addEventListenerOptions } = useAddEventListenerOptions\n useEffect(() => {\n if (condition) {\n window.addEventListener(event, handler, addEventListenerOptions);\n }\n return () => {\n if (condition) {\n window.removeEventListener(event, handler)\n }\n };\n\n// eslint-disable-next-line react-hooks/exhaustive-deps\n }, [event, handler, condition, ...deps]);\n}\n\nexport default useEventListener;\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import React from 'react';\nimport type { MouseEvent, TouchEvent } from 'react';\nimport { SplitDirection, GutterTheme, isTouchDevice } from './index';\n\ninterface GutterProps {\n className?: string;\n theme: GutterTheme;\n draggerClassName?: string;\n direction?: SplitDirection;\n onDragging?: (e: MouseEvent | TouchEvent) => void;\n}\n\nconst Gutter = React.forwardRef<HTMLDivElement, GutterProps>((\n {\n className,\n theme,\n draggerClassName,\n direction = SplitDirection.Vertical,\n onDragging,\n },\n ref,\n) => {\n const containerClass = `__dbk__gutter ${direction} ${className || theme}`;\n const draggerClass = `__dbk__dragger ${direction} ${draggerClassName || theme}`;\n\n return (\n <div\n className={containerClass}\n ref={ref}\n dir={direction}\n onMouseDown={onDragging}\n onTouchStart={isTouchDevice ? onDragging : undefined}\n >\n <div className={draggerClass}/>\n </div>\n );\n});\n\nexport default Gutter;\n\n","import type { SplitDirection } from 'index';\n\nexport enum ActionType {\n SetIsReadyToCompute,\n CreatePairs,\n CalculateSizes,\n StartDragging,\n StopDragging,\n}\n\nexport interface SetIsReadyToCompute {\n type: ActionType.SetIsReadyToCompute;\n payload: {\n isReady: boolean,\n };\n}\n\nexport interface CreatePairs {\n type: ActionType.CreatePairs;\n payload: {\n direction: SplitDirection,\n children: HTMLElement[],\n gutters: HTMLElement[],\n };\n}\n\nexport interface CalculateSizes {\n type: ActionType.CalculateSizes;\n payload: {\n direction: SplitDirection,\n gutterIdx: number;\n };\n}\n\nexport interface StartDragging {\n type: ActionType.StartDragging;\n payload: {\n gutterIdx: number;\n };\n}\n\ninterface StopDragging {\n type: ActionType.StopDragging;\n}\n\nexport type Action = SetIsReadyToCompute\n | CreatePairs\n | CalculateSizes\n | StartDragging\n | StopDragging;\n\n\n","export default function getGutterSizes(gutterSize: number, isFirst: boolean, isLast: boolean) {\n let aGutterSize: number;\n let bGutterSize: number;\n\n if (isFirst) {\n aGutterSize = gutterSize / 2;\n bGutterSize = gutterSize;\n } else if (isLast) {\n aGutterSize = gutterSize;\n bGutterSize = gutterSize / 2;\n } else {\n aGutterSize = gutterSize;\n bGutterSize = gutterSize;\n }\n\n return { aGutterSize, bGutterSize };\n};\n","import { SplitDirection } from '../index';\nimport { Action, ActionType } from './reducer.actions';\nimport Pair from '../pair';\n\nimport getInnerSize from '../utils/getInnerSize';\nimport getGutterSizes from '../utils/getGutterSize';\n\nexport interface State {\n isReady: boolean;\n\n isDragging: boolean;\n draggingIdx?: number; // Index of a gutter that is being dragged.\n\n pairs: Pair[];\n}\n\nexport default function reducer(state: State, action: Action) {\n switch (action.type) {\n case ActionType.SetIsReadyToCompute: {\n return {\n ...state,\n isReady: action.payload.isReady,\n }\n }\n // -----------------------------------------------------------------------\n // | i=0 | i=1 | i=2 | i=3 |\n // | | | | |\n // | pair 0 pair 1 pair 2 |\n // | | | | |\n // -----------------------------------------------------------------------\n case ActionType.CreatePairs: {\n const { direction, children, gutters } = action.payload;\n\n // All children must have common parent.\n const parent = children[0].parentNode;\n if (!parent) throw new Error(`Cannot create pairs - parent is undefined.`);\n const parentSize = getInnerSize(direction, parent as HTMLElement);\n if (parentSize === undefined) throw new Error(`Cannot create pairs - parent has undefined or zero size: ${parentSize}.`);\n\n const pairs: Pair[] = [];\n children.forEach((_, idx) => {\n if (idx > 0) {\n const a = children[idx-1];\n const b = children[idx];\n const gutter = gutters[idx-1];\n\n const start = direction === SplitDirection.Horizontal\n ? a.getBoundingClientRect().left\n : a.getBoundingClientRect().top;\n\n const end = direction === SplitDirection.Horizontal\n ? b.getBoundingClientRect().right\n : b.getBoundingClientRect().bottom;\n\n const size = direction === SplitDirection.Horizontal\n ? a.getBoundingClientRect().width + gutter.getBoundingClientRect().width + b.getBoundingClientRect().width\n : a.getBoundingClientRect().height + gutter.getBoundingClientRect().height + b.getBoundingClientRect().height\n\n const gutterSize = direction === SplitDirection.Horizontal\n ? gutter.getBoundingClientRect().width\n : gutter.getBoundingClientRect().height;\n\n const pair: Pair = {\n idx: idx-1,\n // TODO: Do we need to have a reference to the whole elements? Aren't indexes enough?\n a,\n b,\n gutter,\n parent: parent as HTMLElement,\n start,\n end,\n size,\n gutterSize,\n // At the start, all elements has the same width.\n aSizePct: 100 / children.length,\n bSizePct: 100 / children.length,\n };\n\n pairs.push(pair);\n }\n });\n\n return {\n ...state,\n pairs,\n };\n }\n case ActionType.StartDragging: {\n const { gutterIdx } = action.payload;\n return {\n ...state,\n isDragging: true,\n draggingIdx: gutterIdx,\n };\n }\n case ActionType.StopDragging: {\n return {\n ...state,\n isDragging: false,\n };\n }\n // Recalculates the stored sizes based on the actual elements' sizes.\n case ActionType.CalculateSizes: {\n // We need to calculate sizes only for the pair\n // that has the moved gutter.\n const { direction, gutterIdx } = action.payload;\n const pair = state.pairs[gutterIdx];\n\n const parentSize = getInnerSize(direction, pair.parent);\n if (!parentSize) throw new Error(`Cannot calculate sizes - 'pair.parent' has undefined or zero size.`);\n\n const gutterSize = pair.gutter[direction === SplitDirection.Horizontal ? 'clientWidth' : 'clientHeight'];\n\n const isFirst = gutterIdx === 0;\n const isLast = gutterIdx === state.pairs.length - 1;\n const { aGutterSize, bGutterSize } = getGutterSizes(gutterSize, isFirst, isLast);\n\n let start: number;\n let end: number;\n let size: number;\n let aSizePct: number;\n let bSizePct: number;\n\n if (direction === SplitDirection.Horizontal) {\n start = pair.a.getBoundingClientRect().left;\n\n end = pair.b.getBoundingClientRect().right;\n\n aSizePct = ((pair.a.getBoundingClientRect().width + aGutterSize) / parentSize) * 100;\n bSizePct = ((pair.b.getBoundingClientRect().width + bGutterSize) / parentSize) * 100;\n\n size =\n pair.a.getBoundingClientRect().width +\n aGutterSize +\n bGutterSize +\n pair.b.getBoundingClientRect().width;\n } else {\n start = pair.a.getBoundingClientRect().top;\n\n end = pair.b.getBoundingClientRect().bottom;\n\n aSizePct = ((pair.a.getBoundingClientRect().height + aGutterSize) / parentSize) * 100;\n bSizePct = ((pair.b.getBoundingClientRect().height + bGutterSize) / parentSize) * 100;\n\n size =\n pair.a.getBoundingClientRect().height +\n aGutterSize +\n bGutterSize +\n pair.b.getBoundingClientRect().height;\n }\n\n state.pairs[gutterIdx] = {\n ...pair,\n start,\n end,\n size,\n aSizePct,\n bSizePct,\n gutterSize,\n };\n\n return {\n ...state\n };\n }\n default:\n return state;\n }\n}\n\n","// Taken from https://github.com/grrowl/react-keyed-flatten-children\n\n/* Returns React children into an array, flattening fragments. */\nimport {\n ReactNode,\n ReactChild,\n Children,\n isValidElement,\n cloneElement\n} from 'react';\nimport { isFragment } from 'react-is';\n\nexport default function flattenChildren(\n children: ReactNode,\n depth: number = 0,\n keys: (string | number)[] = []\n): ReactChild[] {\n return Children.toArray(children).reduce(\n (acc: ReactChild[], node, nodeIndex) => {\n if (isFragment(node)) {\n acc.push.apply(\n acc,\n flattenChildren(\n node.props.children,\n depth + 1,\n keys.concat(node.key || nodeIndex)\n )\n );\n } else {\n if (isValidElement(node)) {\n acc.push(\n cloneElement(node, {\n key: keys.concat(String(node.key)).join('.')\n })\n );\n } else if (typeof node === 'string' || typeof node === 'number') {\n acc.push(node);\n }\n }\n return acc;\n },\n []\n );\n}\n","import type { MouseEvent, TouchEvent } from 'react';\n\nexport const isTouchEvent = (e: MouseEvent | TouchEvent): e is TouchEvent => {\n return 'changedTouches' in e\n}\n","import React, {\n useEffect,\n useReducer,\n useRef,\n} from 'react';\nimport type { MouseEvent, TouchEvent } from 'react';\n\nimport './index.css';\nimport getInnerSize from './utils/getInnerSize';\nimport useEventListener from './useEventListener';\nimport Gutter from './Gutter';\nimport { ActionType } from './state/reducer.actions';\nimport reducer, { State } from './state/reducer';\nimport getGutterSizes from './utils/getGutterSize';\nimport flattenChildren from './utils/flattenChildren';\nimport { isTouchEvent } from 'utils/isTouchEvent';\n\nexport enum SplitDirection {\n Horizontal = 'Horizontal',\n Vertical = 'Vertical',\n}\n\nexport enum GutterTheme {\n Light = 'Light',\n Dark = 'Dark',\n}\n\nconst DefaultMinSize = 16;\n\nexport const isTouchDevice = typeof window !== 'undefined' && 'ontouchstart' in window;\n\n// users touch or mouse position\nfunction getPosition(dir: SplitDirection, e: MouseEvent | TouchEvent) {\n const targetsValueRef = isTouchEvent(e) ? e.changedTouches[0] : e;\n if (dir === SplitDirection.Horizontal) return targetsValueRef.clientX;\n return targetsValueRef.clientY;\n}\n\nfunction getCursorIcon(dir: SplitDirection) {\n if (dir === SplitDirection.Horizontal) return 'col-resize';\n return 'row-resize';\n}\n\n/*\nconst stateInit: State = (direction: SplitDirection = SplitDirection.Horizontal) => ({\n direction,\n isDragging: false,\n pairs: [],\n});\n*/\n\nconst initialState: State = {\n isReady: false,\n isDragging: false,\n pairs: [],\n}\n\ninterface SplitProps {\n direction?: SplitDirection;\n minWidths?: number[]; // In pixels.\n minHeights?: number[]; // In pixels.\n initialSizes?: number[]; // In percentage.\n gutterTheme?: GutterTheme;\n gutterClassName?: string;\n draggerClassName?: string;\n children?: React.ReactNode;\n onResizeStarted?: (pairIdx: number) => void;\n onResizeFinished?: (pairIdx: number, newSizes: number[]) => void;\n classes?: string[];\n}\n\nfunction Split({\n direction = SplitDirection.Horizontal,\n minWidths = [],\n minHeights = [],\n initialSizes,\n gutterTheme = GutterTheme.Dark,\n gutterClassName,\n draggerClassName,\n children: reactChildren,\n onResizeStarted,\n onResizeFinished,\n classes = [],\n}: SplitProps) {\n const children = flattenChildren(reactChildren)\n\n const [state, dispatch] = useReducer(reducer, initialState);\n\n const containerRef = useRef<HTMLDivElement>(null)\n const childRefs = useRef<HTMLElement[]>([]);\n const gutterRefs = useRef<HTMLElement[]>([]);\n // We want to reset refs on each re-render so they don't contain old references.\n childRefs.current = [];\n gutterRefs.current = [];\n\n // Helper dispatch functions.\n const setIsReadyToCompute = React.useCallback((isReady: boolean) => {\n dispatch({\n type: ActionType.SetIsReadyToCompute,\n payload: { isReady },\n })\n }, [])\n\n const startDragging = React.useCallback((direction: SplitDirection, gutterIdx: number) => {\n dispatch({\n type: ActionType.StartDragging,\n payload: { gutterIdx },\n });\n\n const pair = state.pairs[gutterIdx];\n onResizeStarted?.(pair.idx)\n\n // Disable selection.\n pair.a.style.userSelect = 'none';\n pair.b.style.userSelect = 'none';\n\n // Set the mouse cursor.\n // Must be done at multiple levels, nut just for a gutter.\n // The mouse cursor might move outside of the gutter element.\n pair.gutter.style.cursor = getCursorIcon(direction);\n pair.parent.style.cursor = getCursorIcon(direction);\n document.body.style.cursor = getCursorIcon(direction);\n }, [state.pairs]);\n\n const stopDragging = React.useCallback(() => {\n dispatch({\n type: ActionType.StopDragging,\n });\n\n // The callback receives an index of the resized pair and new sizes of all child elements.\n const allSizes: number[] = [];\n for (let idx = 0; idx < state.pairs.length; idx++) {\n const pair = state.pairs[idx];\n const parentSize = getInnerSize(direction, pair.parent);\n if (parentSize === undefined) throw new Error(`Cannot call the 'onResizeFinished' callback - parentSize is undefined`);\n if (pair.gutterSize === undefined) throw new Error(`Cannot call 'onResizeFinished' callback - gutterSize is undefined`);\n\n const isFirst = idx === 0;\n const isLast = idx === state.pairs.length - 1;\n\n const aSize = pair.a.getBoundingClientRect()[direction === SplitDirection.Horizontal ? 'width' : 'height'];\n const { aGutterSize, bGutterSize } = getGutterSizes(pair.gutterSize, isFirst, isLast);\n const aSizePct = ((aSize + aGutterSize) / parentSize) * 100;\n allSizes.push(aSizePct);\n\n if (isLast) {\n const bSize = pair.b.getBoundingClientRect()[direction === SplitDirection.Horizontal ? 'width' : 'height'];\n const bSizePct = ((bSize + bGutterSize) / parentSize) * 100;\n allSizes.push(bSizePct);\n }\n }\n\n if (state.draggingIdx === undefined) throw new Error(`Could not reset cursor and user-select because 'state.draggingIdx' is undefined`);\n const pair = state.pairs[state.draggingIdx];\n onResizeFinished?.(pair.idx, allSizes);\n\n // Disable selection.\n pair.a.style.userSelect = '';\n pair.b.style.userSelect = '';\n\n // Set the mouse cursor.\n // Must be done at multiple levels, not just for a gutter.\n // The mouse cursor might move outside of the gutter element.\n pair.gutter.style.cursor = '';\n pair.parent.style.cursor = '';\n document.body.style.cursor = '';\n }, [state.draggingIdx, state.pairs, direction]);\n\n const calculateSizes = React.useCallback((direction: SplitDirection, gutterIdx: number) => {\n dispatch({\n type: ActionType.CalculateSizes,\n payload: { direction, gutterIdx },\n });\n }, []);\n\n const createPairs = React.useCallback((direction: SplitDirection, children: HTMLElement[], gutters: HTMLElement[]) => {\n dispatch({\n type: ActionType.CreatePairs,\n payload: { direction, children, gutters },\n });\n }, []);\n /////////\n\n // This method is called on the initial render.\n // It iterates through the all children sets their initial sizes.\n const setInitialSizes = React.useCallback((\n direction: SplitDirection,\n children: HTMLElement[],\n gutters: HTMLElement[],\n initialSizes?: number[],\n ) => {\n // All children must have common parent.\n const parent = children[0].parentNode;\n if (!parent) throw new Error(`Cannot set initial sizes - parent is undefined`);\n const parentSize = getInnerSize(direction, parent as HTMLElement);\n if (parentSize === undefined) throw new Error(`Cannot set initial sizes - parent has undefined size`);\n\n children.forEach((c, idx) => {\n const isFirst = idx === 0;\n const isLast = idx === children.length - 1;\n\n let gutterSize = 0\n if (children.length > 1) {\n const gutter = gutters[isLast ? idx-1 : idx];\n gutterSize = gutter.getBoundingClientRect()[direction === SplitDirection.Horizontal ? 'width' : 'height'];\n gutterSize = isFirst || isLast ? gutterSize / 2 : gutterSize;\n }\n\n let calc: string;\n if (initialSizes && idx < initialSizes.length) {\n calc = `calc(${initialSizes[idx]}% - ${gutterSize}px)`;\n } else {\n // '100 / children.length' makes all the children same wide.\n calc = `calc(${100 / children.length}% - ${gutterSize}px)`;\n }\n\n if (direction === SplitDirection.Horizontal) {\n c.style.width = calc;\n // Reset the child wrapper's height because the direction could have changed.\n c.style.height = '100%';\n } else {\n c.style.height = calc;\n // Reset the child wrapper's width because the direction could have changed.\n c.style.width = '100%';\n }\n });\n }, []);\n\n // Here we actually change the width of children.\n // We convert the element's sizes into percentage\n // and let the CSS 'calc' function do the heavy lifting.\n // Size of 'pair.a' is same as 'offset'.\n //\n // For just 2 children total, the percentage adds up always to 100.\n // For >2 children total, the percentage adds to less than 100.\n // That's because a single gutter changes sizes of only the given pair of children.\n // Each gutter changes size only of the two adjacent elements.\n // -----------------------------------------------------------------------\n // | ||| ||| |\n // | 33.3% ||| 33.3% ||| 33.3% |\n // | ||| ||| |\n // | ||| ||| |\n // -----------------------------------------------------------------------\n const adjustSize = React.useCallback((direction: SplitDirection, offset: number) => {\n if (state.draggingIdx === undefined) throw new Error(`Cannot adjust size - 'draggingIdx' is undefined`);\n\n const pair = state.pairs[state.draggingIdx];\n if (pair.size === undefined) throw new Error(`Cannot adjust size - 'pair.size' is undefined`);\n if (pair.gutterSize === undefined) throw new Error(`Cannot adjust size - 'pair.gutterSize' is undefined`);\n const percentage = pair.aSizePct + pair.bSizePct;\n\n const aSizePct = (offset / pair.size) * percentage;\n const bSizePct = percentage - (offset / pair.size) * percentage;\n\n const isFirst = state.draggingIdx === 0;\n const isLast = state.draggingIdx === state.pairs.length - 1;\n const { aGutterSize, bGutterSize } = getGutterSizes(pair.gutterSize, isFirst, isLast);\n\n const aCalc = `calc(${aSizePct}% - ${aGutterSize}px)`;\n const bCalc = `calc(${bSizePct}% - ${bGutterSize}px)`;\n if (direction === SplitDirection.Horizontal) {\n pair.a.style.width = aCalc;\n pair.b.style.width = bCalc;\n } else {\n pair.a.style.height = aCalc;\n pair.b.style.height = bCalc;\n }\n }, [state.draggingIdx, state.pairs, direction]);\n\n const drag = React.useCallback((e: MouseEvent | TouchEvent, direction: SplitDirection, minSizes: number[]) => {\n if (!state.isDragging) return\n if (state.draggingIdx === undefined) throw new Error(`Cannot drag - 'draggingIdx' is undefined`);\n\n const pair = state.pairs[state.draggingIdx];\n if (pair.start === undefined) throw new Error(`Cannot drag - 'pair.start' is undefined`);\n if (pair.size === undefined) throw new Error(`Cannot drag - 'pair.size' is undefined`);\n if (pair.gutterSize === undefined) throw new Error(`Cannot drag - 'pair.gutterSize' is undefined`);\n\n // 'offset' is the width of the 'a' element in a pair.\n let offset = getPosition(direction, e) - pair.start;\n\n // Limit the maximum size and the minimum size of resized children.\n\n let aMinSize = DefaultMinSize;\n let bMinSize = DefaultMinSize;\n if (minSizes.length > state.draggingIdx) {\n aMinSize = minSizes[state.draggingIdx];\n }\n if (minSizes.length >= state.draggingIdx + 1) {\n bMinSize = minSizes[state.draggingIdx + 1];\n }\n\n // TODO: We should check whether the parent is big enough\n // to support these min sizes.\n if (offset < pair.gutterSize + aMinSize) {\n offset = pair.gutterSize + aMinSize;\n }\n\n if (offset >= pair.size - (pair.gutterSize + bMinSize)) {\n offset = pair.size - (pair.gutterSize + bMinSize);\n }\n\n adjustSize(direction, offset);\n }, [state.isDragging, state.draggingIdx, state.pairs, adjustSize]);\n\n function handleStartDragging(gutterIdx: number) {\n calculateSizes(direction, gutterIdx);\n startDragging(direction, gutterIdx);\n }\n\n const onStopDragging = () => {\n if (!state.isDragging) return;\n if (state.draggingIdx === undefined)\n throw new Error(`Cannot calculate sizes after dragging = 'state.draggingIdx' is undefined`);\n calculateSizes(direction, state.draggingIdx);\n stopDragging();\n };\n\n const onMove = (e: MouseEvent | TouchEvent) => {\n if (!state.isDragging) return;\n if (isTouchEvent(e)) {\n // touch event also scrolls the page, so we need to prevent that\n e.preventDefault();\n }\n drag(e, direction, direction === SplitDirection.Horizontal ? minWidths : minHeights);\n };\n\n useEventListener(\"mouseup\", onStopDragging, [state.isDragging, stopDragging]);\n useEventListener(\"mousemove\", onMove, [direction, state.isDragging, drag, minWidths, minHeights]);\n\n useEventListener(\"touchend\", onStopDragging, [state.isDragging, stopDragging], { condition: isTouchDevice });\n useEventListener(\"touchmove\", onMove, [direction, state.isDragging, drag, minWidths, minHeights], { condition: isTouchDevice, passive: !isTouchDevice });\n\n // This makes sure that Splitter properly re-renders if parent's size changes dynamically.\n useEffect(function watchParentSize() {\n if (!containerRef.current) return\n const el = containerRef.current.parentElement\n\n // Splitter must have a parent element. In the most trivial example it's either <body> or <html>.\n if (!el) return\n\n // TODO: Potential performance issue!\n // When nesting Splitters the `observer` is registered for each nesting \"level\".\n // Splitter's parent element is another Splitter in the nesting use case.\n const observer = new ResizeObserver(() => {\n const style = getComputedStyle(el)\n const size = direction === SplitDirection.Horizontal ? el.clientWidth : el.clientHeight\n const isReady = !!style && !!size\n setIsReadyToCompute(isReady)\n })\n observer.observe(el)\n\n return () => {\n observer.disconnect()\n }\n }, [\n containerRef.current,\n direction,\n ])\n\n // Initial setup, runs every time the child views change.\n useEffect(function initialSetup() {\n if (!state.isReady) return;\n if (childRefs.current && !(childRefs.current[0] as any).offsetParent) return;\n // By the time first useEffect runs refs should be already set, unless something really bad happened.\n if (!childRefs.current || !gutterRefs.current) {\n throw new Error(`Cannot create pairs - either variable 'childRefs' or 'gutterRefs' is undefined`);\n }\n\n // Don't create pairs if there's only one child.\n if (children.length <= 1) {\n setInitialSizes(direction, childRefs.current, gutterRefs.current, initialSizes);\n } else {\n setInitialSizes(direction, childRefs.current, gutterRefs.current, initialSizes);\n createPairs(direction, childRefs.current, gutterRefs.current);\n }\n\n }, [\n reactChildren,\n state.isReady,\n direction,\n setInitialSizes,\n createPairs,\n initialSizes,\n ]);\n\n function addRef(refs: typeof childRefs | typeof gutterRefs, el: any) {\n if (!refs.current) throw new Error(`Can't add element to ref object - ref isn't initialized`);\n if (el && !refs.current.includes(el)) {\n refs.current.push(el);\n }\n }\n\n return (\n <div\n className={'__dbk__container ' + `${direction}`}\n ref={containerRef}\n >\n {state.isReady && children.map((c, idx) => (\n <React.Fragment key={idx}>\n <div\n ref={el => addRef(childRefs, el)}\n className={'__dbk__child-wrapper ' + (idx < classes.length ? classes[idx] : '')}\n >{c}\n </div>\n\n {/* Gutter is between each two child views. */}\n {idx < (children as React.ReactNodeArray).length - 1 &&\n <Gutter\n ref={el => addRef(gutterRefs, el)}\n className={gutterClassName}\n theme={gutterTheme}\n draggerClassName={draggerClassName}\n direction={direction}\n onDragging={() => handleStartDragging(idx)}\n />\n }\n </React.Fragment>\n ))}\n </div>\n );\n}\n\nexport type {\n SplitProps\n}\nexport default Split;\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import{createContext as u}from\"react\";var i=u(void 0);import{useRef as y}from\"react\";import{useDragLayer as w}from\"react-dnd\";var l=(e,t)=>({x:e.x-t.x,y:e.y-t.y}),m=(e,t)=>({x:e.x+t.x,y:e.y+t.y}),P=e=>{let t=e.getInitialClientOffset(),n=e.getInitialSourceClientOffset();return t===null||n===null?{x:0,y:0}:l(t,n)},f=(e,t)=>{switch(e){case\"left\":case\"top-start\":case\"bottom-start\":return 0;case\"right\":case\"top-end\":case\"bottom-end\":return t.width;default:return t.width/2}},d=(e,t)=>{switch(e){case\"top\":case\"top-start\":case\"top-end\":return 0;case\"bottom\":case\"bottom-start\":case\"bottom-end\":return t.height;default:return t.height/2}},c=(e,t,n=\"center\",r={x:0,y:0})=>{let o=e.getClientOffset();if(o===null)return null;if(!t.current||!t.current.getBoundingClientRect)return l(o,P(e));let s=t.current.getBoundingClientRect(),p={x:f(n,s),y:d(n,s)};return m(l(o,p),r)};var x=e=>{let t=`translate(${e.x.toFixed(1)}px, ${e.y.toFixed(1)}px)`;return{pointerEvents:\"none\",position:\"fixed\",top:0,left:0,transform:t,WebkitTransform:t}},a=e=>{let t=y(null),n=w(r=>({currentOffset:c(r,t,e?.placement,e?.padding),isDragging:r.isDragging(),itemType:r.getItemType(),item:r.getItem(),monitor:r}));return!n.isDragging||n.currentOffset===null?{display:!1}:{display:!0,itemType:n.itemType,item:n.item,style:x(n.currentOffset),monitor:n.monitor,ref:t}};import{jsx as E}from\"react/jsx-runtime\";var v=e=>{let t=a({placement:e.placement,padding:e.padding});if(!t.display)return null;let{display:n,...r}=t,o;return\"children\"in e?typeof e.children==\"function\"?o=e.children(r):o=e.children:o=e.generator(r),E(i.Provider,{value:r,children:o})};export{i as Context,v as Preview,a as usePreview};\n"],"names":["c","e","t","n","getComputedStyle","i","z","Horizontal","clientWidth","clientHeight","parseFloat","paddingLeft","paddingRight","paddingTop","paddingBottom","l","arguments","length","undefined","r","condition","a","o","Object","prototype","hasOwnProperty","call","indexOf","getOwnPropertySymbols","propertyIsEnumerable","window","addEventListener","removeEventListener","insertAt","document","head","getElementsByTagName","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","u","_ref","className","theme","draggerClassName","direction","Vertical","onDragging","g","concat","d","assign","ref","dir","onMouseDown","onTouchStart","C","children","h","p","aGutterSize","bGutterSize","f","SetIsReadyToCompute","isReady","payload","CreatePairs","gutters","parentNode","Error","forEach","s","getBoundingClientRect","left","top","right","bottom","width","height","idx","b","gutter","parent","start","end","size","gutterSize","aSizePct","bSizePct","push","pairs","StartDragging","gutterIdx","isDragging","draggingIdx","StopDragging","CalculateSizes","_","toArray","reduce","apply","props","key","String","join","w","Light","Dark","y","S","m","_ref2","minWidths","minHeights","initialSizes","gutterTheme","gutterClassName","x","k","v","onResizeStarted","R","onResizeFinished","B","classes","D","I","E","H","j","O","N","current","P","$","style","userSelect","cursor","body","T","F","G","L","V","A","changedTouches","clientX","clientY","W","onStopDragging","M","preventDefault","X","includes","passive","parentElement","ResizeObserver","observe","disconnect","offsetParent","map","q","Symbol","for","$$typeof","exports","isFragment","module","getClientOffset","getInitialClientOffset","getInitialSourceClientOffset","toFixed","pointerEvents","position","transform","WebkitTransform","currentOffset","placement","padding","itemType","getItemType","item","getItem","monitor","display"],"sourceRoot":""}
|