"use strict";(self.webpackChunkneurosift_jp=self.webpackChunkneurosift_jp||[]).push([[125],{36506:(e,t,i)=>{i.r(t),i.d(t,{HBoxLayout:()=>o,Hyperlink:()=>s,SmallIconButton:()=>a,VBoxLayout:()=>d,VerticalScrollView:()=>N,isArrayOf:()=>g,isBoolean:()=>y,isEqualTo:()=>k,isFunction:()=>h,isJSONObject:()=>x,isJSONSerializable:()=>S,isJSONValue:()=>O,isNull:()=>b,isNumber:()=>p,isObject:()=>v,isObjectOf:()=>m,isOneOf:()=>j,isString:()=>f,optional:()=>w,useWindowDimensions:()=>u,validateObject:()=>A});var n=i(74848),r=i(93345),l=i.n(r);const o=({widths:e,height:t,spacing:i=0,children:o})=>{const s=e.reduce(((e,t)=>e+t),0),a=l().Children.toArray(o).map((e=>e)),c=(0,r.useMemo)((()=>{const t=[];let n=0;for(const r of e)t.push(n),n+=r+i;return t}),[e,i]);return(0,n.jsx)("div",{className:"HBoxLayout",style:{position:"relative",width:s,height:t},children:a.map(((i,r)=>i?(0,n.jsx)("div",{style:{position:"absolute",overflow:"hidden",background:"white",left:c[r],top:0,width:e[r],height:t},children:(0,n.jsx)(i.type,{...i.props,width:e[r],height:t})},r):(0,n.jsx)("span",{})))})},s=({children:e,onClick:t,color:i,disabled:r,href:l,target:o,title:s})=>l?(0,n.jsx)("a",{href:l,title:s,target:o,style:{cursor:"pointer",color:i||"darkblue"},children:e}):r?(0,n.jsx)("span",{title:s,style:{color:"gray"},children:e}):(0,n.jsx)("a",{onClick:t,title:s,style:{cursor:"pointer",color:i||"darkblue"},children:e}),a=({icon:e,onClick:t,title:i,label:r,disabled:l,fontSize:o})=>{const s=["SmallIconButton"];return l?s.push("disabled"):s.push("enabled"),(0,n.jsxs)("span",{className:s.join(" "),title:i,onClick:l?void 0:t,style:{cursor:l?"default":"pointer",fontSize:.8*(o||18),whiteSpace:"nowrap"},children:[e&&(0,n.jsx)(e.type,{className:s.join(" "),...e.props,style:{fontSize:o||18,verticalAlign:"bottom"}}),r&&(0,n.jsx)("span",{style:{marginLeft:4,verticalAlign:"bottom"},children:r})]})};function c(){const{innerWidth:e,innerHeight:t}=window;return{width:e,height:t}}const u=()=>{const[e,t]=(0,r.useState)(c());return(0,r.useEffect)((()=>{function e(){t(c())}return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),e},d=({width:e,heights:t,children:i})=>{const r=t.reduce(((e,t)=>e+t),0),o=l().Children.toArray(i).map((e=>e));return(0,n.jsx)("div",{className:"VBoxLayout",style:{position:"relative",width:e,height:r},children:o.map(((i,r)=>i?(0,n.jsx)("div",{style:{position:"absolute",overflow:"hidden",background:"white",left:0,top:t.slice(0,r).reduce(((e,t)=>e+t),0),width:e,height:t[r]},children:(0,n.jsx)(i.type,{...i.props,width:e,height:t[r]})},r):(0,n.jsx)("span",{})))})},f=e=>null!==e&&"string"==typeof e,h=e=>null!==e&&"function"==typeof e,p=e=>null!==e&&"number"==typeof e,b=e=>null===e,y=e=>null!==e&&"boolean"==typeof e,j=e=>t=>{for(let i of e)if(i(t))return!0;return!1},w=e=>{if(h(e)){const t=e;return e=>void 0===e||t(e)}return t=>void 0===t||A(t,e)},k=e=>t=>t===e,g=e=>t=>{if(null!==t&&Array.isArray(t)){for(let i of t)if(!e(i))return!1;return!0}return!1},v=e=>null!==e&&"object"==typeof e,m=(e,t)=>i=>{if(v(i)){for(let n in i)if(!e(n)||!t(i[n]))return!1;return!0}return!1},x=e=>!!v(e)&&S(e),O=e=>S(e),S=e=>{if("string"==typeof e||"number"==typeof e)return!0;if(!v(e))return!1;const t=e=>null===e||typeof e>"u"||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||Array.isArray(e)||(e=>"[object Object]"===Object.prototype.toString.call(e))(e);if(!t(e))return!1;for(let i in e)if(e.hasOwnProperty(i)&&(!t(e[i])||null!==e[i]&&"object"==typeof e[i]&&!S(e[i])))return!1;return!0},A=(e,t,i)=>{const n=i||{};if(!e)return n.callback&&n.callback("x is undefined/null."),!1;if("object"!=typeof e)return n.callback&&n.callback("x is not an Object."),!1;for(let i in e)if(!(i in t)&&!n.allowAdditionalFields)return n.callback&&n.callback(`Key not in spec: ${i}`),!1;for(let i in t){const r=t[i];if(h(r)){if(!r(e[i]))return n.callback&&n.callback(`Problem validating: ${i} (${e[i]})`),!1}else{if(!(i in e))return n.callback&&n.callback(`Key not in x: ${i}`),!1;if(!A(e[i],r,{callback:n.callback}))return n.callback&&n.callback(`Value of key > ${i} < itself failed validation.`),!1}}return!0},N=({width:e,height:t,children:i,disableScroll:l})=>{const o=(0,r.useMemo)((()=>({width:e,height:t,position:"relative",overflowY:l?"hidden":"auto"})),[e,t,l]);return(0,n.jsx)("div",{style:o,children:i})}}}]);