feffery_utils_components 0.2.0-rc11 → 0.2.0-rc13
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/DESCRIPTION +1 -1
- package/NAMESPACE +2 -0
- package/Project.toml +1 -1
- package/README.md +1 -1
- package/assets/demo.jpg +0 -0
- package/feffery_utils_components/FefferySetFavicon.py +45 -0
- package/feffery_utils_components/FefferySetTitle.py +7 -4
- package/feffery_utils_components/FefferySliderCaptcha.py +109 -0
- package/feffery_utils_components/__init__.py +2 -1
- package/feffery_utils_components/_imports_.py +4 -0
- package/feffery_utils_components/async-feffery_animated_3d_background_p5.js +1 -1
- package/feffery_utils_components/async-feffery_animated_3d_background_three.js +2 -2
- package/feffery_utils_components/async-feffery_animated_image.js +1 -1
- package/feffery_utils_components/async-feffery_aplayer.js +1 -1
- package/feffery_utils_components/async-feffery_auto_animate.js +1 -1
- package/feffery_utils_components/async-feffery_auto_fit.js +1 -1
- package/feffery_utils_components/async-feffery_captcha.js +1 -1
- package/feffery_utils_components/async-feffery_color_pickers.js +1 -1
- package/feffery_utils_components/async-feffery_dom2image.js +1 -1
- package/feffery_utils_components/async-feffery_dplayer.js +1 -1
- package/feffery_utils_components/async-feffery_emoji_picker.js +1 -1
- package/feffery_utils_components/async-feffery_excel_preview.js +1 -1
- package/feffery_utils_components/async-feffery_extra_spinner.js +1 -1
- package/feffery_utils_components/async-feffery_fancy_button.js +1 -1
- package/feffery_utils_components/async-feffery_grid.js +1 -1
- package/feffery_utils_components/async-feffery_image_cropper.js +1 -1
- package/feffery_utils_components/async-feffery_json_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_local_large_storage.js +1 -1
- package/feffery_utils_components/async-feffery_markdown_editor.js +2 -2
- package/feffery_utils_components/async-feffery_motion.js +1 -1
- package/feffery_utils_components/async-feffery_music_player.js +1 -1
- package/feffery_utils_components/async-feffery_photo_sphere_viewer.js +1 -1
- package/feffery_utils_components/async-feffery_resizable.js +1 -1
- package/feffery_utils_components/async-feffery_rich_text_editor.js +2 -2
- package/feffery_utils_components/async-feffery_rnd.js +1 -1
- package/feffery_utils_components/async-feffery_seamless_scroll.js +1 -1
- package/feffery_utils_components/async-feffery_shortcut_panel.js +1 -1
- package/feffery_utils_components/async-feffery_slider_captcha.js +1 -0
- package/feffery_utils_components/async-feffery_slider_captcha.js.LICENSE.txt +1 -0
- package/feffery_utils_components/async-feffery_sortable.js +1 -1
- package/feffery_utils_components/async-feffery_word_preview.js +1 -1
- package/feffery_utils_components/async-fuc-shared.js +2 -2
- package/feffery_utils_components/feffery_utils_components.min.js +2 -2
- package/feffery_utils_components/metadata.json +298 -1
- package/feffery_utils_components/package-info.json +3 -1
- package/package.json +3 -1
- package/src/lib/components/FefferySetFavicon.react.js +58 -0
- package/src/lib/components/FefferySetTitle.react.js +21 -6
- package/src/lib/components/FefferySliderCaptcha.react.js +160 -0
- package/src/lib/fragments/FefferySliderCaptcha.react.js +102 -0
- package/src/lib/index.js +5 -1
- package/usage.py +20 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[23],{540:function(L,t,e){"use strict";e.r(t);function d(t,e,i){return Math.max(Math.min(t,i),e)}function z(t,e){return Math.round(t/e)*e}function u(t,e){return new RegExp(t,"i").test(e)}function S(t){return Boolean(t.touches&&t.touches.length)}function x(o,s,t){void 0===t&&(t=0);var e=s.reduce(function(t,e,i){return Math.abs(e-o)<Math.abs(s[t]-o)?i:t},0),i=Math.abs(s[e]-o);return 0===t||i<t?s[e]:o}function o(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"}function R(t,e,i,o){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return o*(Number(t.replace("vh",""))/100)}return t}var i,s,r,n,h,W=e(1),O=e(29),a=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(){return(a=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)}),p={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},l={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},c={width:"20px",height:"20px",position:"absolute"},f={top:a(a({},p),{top:"-5px"}),right:a(a({},l),{left:void 0,right:"-5px"}),bottom:a(a({},p),{top:void 0,bottom:"-5px"}),left:a(a({},l),{left:"-5px"}),topRight:a(a({},c),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:a(a({},c),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:a(a({},c),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:a(a({},c),{left:"-10px",top:"-10px",cursor:"nw-resize"})},g=(n=W.PureComponent,i(h=v,p=n),h.prototype=null===p?Object.create(p):(N.prototype=p.prototype,new N),v.prototype.render=function(){return W.createElement("div",{className:this.props.className||"",style:a(a({position:"absolute",userSelect:"none"},f[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},v),l=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),b=function(){return(b=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},w={width:"auto",height:"auto"},m=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],E=(s=W.PureComponent,l(y,s),Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||w},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"size",{get:function(){var t,e,i,o=0,s=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(i=this.resizable.style.position)&&(this.resizable.style.position="relative"),o="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,s="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=i),{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===i.state[t]||"auto"===i.state[t]?"auto":i.propsSize&&i.propsSize[t]&&i.propsSize[t].toString().endsWith("%")?i.state[t].toString().endsWith("%")?i.state[t].toString():(e=i.getParentSize(),Number(i.state[t].toString().replace("px",""))/e[t]*100+"%"):o(i.state[t])}var i=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?o(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?o(e.height):t("height")}},enumerable:!1,configurable:!0}),y.prototype.getParentSize=function(){var t,e,i,o;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(i=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",o={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},y.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},y.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},y.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},y.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},y.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},y.prototype.calculateNewMaxFromBoundary=function(t,e){var i,o,s=this.props.boundsByDirection,r=this.state.direction,n=s&&u("left",r),s=s&&u("top",r);return"parent"===this.props.bounds?(r=this.parentNode)&&(i=n?this.resizableRight-this.parentLeft:r.offsetWidth+(this.parentLeft-this.resizableLeft),o=s?this.resizableBottom-this.parentTop:r.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(i=n?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=n?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=i&&Number.isFinite(i)?t&&t<i?t:i:t,maxHeight:e=o&&Number.isFinite(o)?e&&e<o?e:o:e}},y.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,o=this.props.resizeRatio||1,s=this.state,r=s.direction,s=s.original,n=this.props,h=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=s.width,l=s.height,a=a||0,n=n||0;return u("right",r)&&(p=s.width+(t-s.x)*o/i,h)&&(l=(p-n)/this.ratio+a),u("left",r)&&(p=s.width-(t-s.x)*o/i,h)&&(l=(p-n)/this.ratio+a),u("bottom",r)&&(l=s.height+(e-s.y)*o/i,h)&&(p=(l-a)*this.ratio+n),{newWidth:p=u("top",r)&&(l=s.height-(e-s.y)*o/i,h)?(l-a)*this.ratio+n:p,newHeight:l}},y.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,o){var s,r,n=this.props,h=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=void 0===o.width?10:o.width,l=void 0===i.width||i.width<0?t:i.width,o=void 0===o.height?10:o.height,i=void 0===i.height||i.height<0?e:i.height,a=a||0,n=n||0;return e=h?(h=(o-a)*this.ratio+n,s=(i-a)*this.ratio+n,r=(p-n)/this.ratio+a,n=(l-n)/this.ratio+a,a=Math.max(p,h),h=Math.min(l,s),s=Math.max(o,r),r=Math.min(i,n),t=d(t,a,h),d(e,s,r)):(t=d(t,p,l),d(e,o,i)),{newWidth:t,newHeight:e}},y.prototype.setBoundingClientRect=function(){var t,e,i,o;"parent"===this.props.bounds&&(o=this.parentNode)&&(o=o.getBoundingClientRect(),this.parentLeft=o.left,this.parentTop=o.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(o=this.props.bounds.getBoundingClientRect(),this.targetLeft=o.left,this.targetTop=o.top),this.resizable&&(t=(o=this.resizable.getBoundingClientRect()).left,e=o.top,i=o.right,o=o.bottom,this.resizableLeft=t,this.resizableRight=i,this.resizableTop=e,this.resizableBottom=o)},y.prototype.onResizeStart=function(t,e){var i,o,s,r,n;this.resizable&&this.window&&(s=o=0,t.nativeEvent&&(n=t.nativeEvent,Boolean((n.clientX||0===n.clientX)&&(n.clientY||0===n.clientY)))?(o=t.nativeEvent.clientX,s=t.nativeEvent.clientY):t.nativeEvent&&S(t.nativeEvent)&&(o=t.nativeEvent.touches[0].clientX,s=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(n=this.window.getComputedStyle(this.resizable)).flexBasis&&(r=this.parentNode)&&(r=this.window.getComputedStyle(r).flexDirection,this.flexDir=r.startsWith("row")?"row":"column",i=n.flexBasis),this.setBoundingClientRect(),this.bindEvents(),r={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i},this.setState(r)))},y.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&S(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i,o=this.props,s=o.maxWidth,r=o.maxHeight,n=o.minWidth,o=o.minHeight,h=(S(t)?t.touches[0]:t).clientX,a=(S(t)?t.touches[0]:t).clientY,p=this.state,l=p.direction,d=p.original,u=p.width,p=p.height,c=this.getParentSize(),f=(f=c,g=this.window.innerWidth,b=this.window.innerHeight,m=r,y=n,i=o,w=R(s,f.width,g,b),m=R(m,f.height,g,b),y=R(y,f.width,g,b),i=R(i,f.height,g,b),{maxWidth:void 0===w?void 0:Number(w),maxHeight:void 0===m?void 0:Number(m),minWidth:void 0===y?void 0:Number(y),minHeight:void 0===i?void 0:Number(i)}),s=f.maxWidth,r=f.maxHeight,n=f.minWidth,o=f.minHeight,g=this.calculateNewSizeFromDirection(h,a),b=g.newHeight,w=g.newWidth,m=this.calculateNewMaxFromBoundary(s,r),y=(this.props.snap&&this.props.snap.x&&(w=x(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=x(b,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(w,b,{width:m.maxWidth,height:m.maxHeight},{width:n,height:o})),a=(w=y.newWidth,b=y.newHeight,this.props.grid&&(i=z(w,this.props.grid[0]),f=z(b,this.props.grid[1]),w=0===(h=this.props.snapGap||0)||Math.abs(i-w)<=h?i:w,b=0===h||Math.abs(f-b)<=h?f:b),{width:w-d.width,height:b-d.height}),v=(u&&"string"==typeof u&&(u.endsWith("%")?w=w/c.width*100+"%":u.endsWith("vw")?w=w/this.window.innerWidth*100+"vw":u.endsWith("vh")&&(w=w/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(p.endsWith("%")?b=b/c.height*100+"%":p.endsWith("vw")?b=b/this.window.innerWidth*100+"vw":p.endsWith("vh")&&(b=b/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(b,"height")});"row"===this.flexDir?v.flexBasis=v.width:"column"===this.flexDir&&(v.flexBasis=v.height),Object(O.flushSync)(function(){e.setState(v)}),this.props.onResize&&this.props.onResize(t,l,this.resizable,a)}},y.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,o=e.direction,e=e.original;i&&this.resizable&&(i={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,o,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:"auto"})}))},y.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},y.prototype.renderResizer=function(){var e=this,t=this.props,i=t.enable,o=t.handleStyles,s=t.handleClasses,r=t.handleWrapperStyle,n=t.handleWrapperClass,h=t.handleComponent;return i?(t=Object.keys(i).map(function(t){return!1!==i[t]?W.createElement(g,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:s&&s[t]},h&&h[t]?h[t]:null):null}),W.createElement("div",{className:n,style:r},t)):null},y.prototype.render=function(){var i=this,t=Object.keys(this.props).reduce(function(t,e){return-1===m.indexOf(e)&&(t[e]=i.props[e]),t},{}),e=b(b(b({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),o=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return W.createElement(o,b({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&W.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},y.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},y),c=e(200),M=e(22);function y(t){var i=s.call(this,t)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){var t,e;return i.resizable&&i.window&&(t=i.parentNode)?((e=i.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}function v(){var e=null!==n&&n.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}function N(){this.constructor=h}function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(e,t){var i,o=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)),o}function P(s){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){var e,i,o;e=s,i=r[t=t],o=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return String(t);e=e.call(t,"string");if("object"!=j(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==j(o)?o:String(o))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(r,t))})}return s}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function _(t){var e=t.id,i=t.key,o=t.children,s=t.className,r=t.style,n=t.size,h=t.defaultSize,a=t.minWidth,p=t.minHeight,l=t.maxWidth,d=t.maxHeight,u=t.direction,c=t.grid,f=t.bounds,g=t.boundsSelector,b=t.handleStyles,w=t.handleClassNames,m=t.setProps,y=t.loading_state;Object(W.useEffect)(function(){!n&&h&&m({size:h})},[]);var v,z=Object(M.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),S=function(t,e){var i,o,s,r,n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return s=!(o=!0),{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}};if(Array.isArray(t)||(n=function(t){var e;if(t)return"string"==typeof t?B(t,void 0):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?B(t,void 0):void 0}(t))||e&&t&&"number"==typeof t.length)return n&&(t=n),r=0,{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(u);try{for(S.s();!(v=S.n()).done;)z[v.value]=!0}catch(t){S.e(t)}finally{S.f()}return React.createElement(E,{id:e,key:i,children:o,className:s,style:r,size:n,defaultSize:h,minWidth:a,minHeight:p,maxWidth:l,maxHeight:d,grid:c,bounds:g?document.querySelector(g):f,enable:z,handleStyles:P(P({},b),{},{top:P({cursor:"ns-resize"},null==b?void 0:b.top),right:P({cursor:"ew-resize"},null==b?void 0:b.right),bottom:P({cursor:"ns-resize"},null==b?void 0:b.bottom),left:P({cursor:"ew-resize"},null==b?void 0:b.left)}),handleClasses:w,onResizeStop:function(t,e,i,o){n&&m({size:{width:n.width+o.width,height:n.height+o.height}})},"data-dash-is-loading":y&&y.is_loading||void 0},o)}(t.default=_).defaultProps=c.b,_.propTypes=c.c}}]);
|
|
1
|
+
(window.webpackJsonpfeffery_utils_components=window.webpackJsonpfeffery_utils_components||[]).push([[23],{542:function(L,t,e){"use strict";e.r(t);function d(t,e,i){return Math.max(Math.min(t,i),e)}function z(t,e){return Math.round(t/e)*e}function u(t,e){return new RegExp(t,"i").test(e)}function S(t){return Boolean(t.touches&&t.touches.length)}function x(o,s,t){void 0===t&&(t=0);var e=s.reduce(function(t,e,i){return Math.abs(e-o)<Math.abs(s[t]-o)?i:t},0),i=Math.abs(s[e]-o);return 0===t||i<t?s[e]:o}function o(t){return"auto"===(t=t.toString())||t.endsWith("px")||t.endsWith("%")||t.endsWith("vh")||t.endsWith("vw")||t.endsWith("vmax")||t.endsWith("vmin")?t:t+"px"}function R(t,e,i,o){if(t&&"string"==typeof t){if(t.endsWith("px"))return Number(t.replace("px",""));if(t.endsWith("%"))return e*(Number(t.replace("%",""))/100);if(t.endsWith("vw"))return i*(Number(t.replace("vw",""))/100);if(t.endsWith("vh"))return o*(Number(t.replace("vh",""))/100)}return t}var i,s,r,n,h,W=e(1),O=e(29),a=(i=function(t,e){return(i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(){return(a=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)}),p={width:"100%",height:"10px",top:"0px",left:"0px",cursor:"row-resize"},l={width:"10px",height:"100%",top:"0px",left:"0px",cursor:"col-resize"},c={width:"20px",height:"20px",position:"absolute"},f={top:a(a({},p),{top:"-5px"}),right:a(a({},l),{left:void 0,right:"-5px"}),bottom:a(a({},p),{top:void 0,bottom:"-5px"}),left:a(a({},l),{left:"-5px"}),topRight:a(a({},c),{right:"-10px",top:"-10px",cursor:"ne-resize"}),bottomRight:a(a({},c),{right:"-10px",bottom:"-10px",cursor:"se-resize"}),bottomLeft:a(a({},c),{left:"-10px",bottom:"-10px",cursor:"sw-resize"}),topLeft:a(a({},c),{left:"-10px",top:"-10px",cursor:"nw-resize"})},g=(n=W.PureComponent,i(h=v,p=n),h.prototype=null===p?Object.create(p):(N.prototype=p.prototype,new N),v.prototype.render=function(){return W.createElement("div",{className:this.props.className||"",style:a(a({position:"absolute",userSelect:"none"},f[this.props.direction]),this.props.replaceStyles||{}),onMouseDown:this.onMouseDown,onTouchStart:this.onTouchStart},this.props.children)},v),l=(r=function(t,e){return(r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){t.__proto__=e}:function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])}))(t,e)},function(t,e){function i(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}),b=function(){return(b=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var s in e=arguments[i])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t}).apply(this,arguments)},w={width:"auto",height:"auto"},m=["as","style","className","grid","snap","bounds","boundsByDirection","size","defaultSize","minWidth","minHeight","maxWidth","maxHeight","lockAspectRatio","lockAspectRatioExtraWidth","lockAspectRatioExtraHeight","enable","handleStyles","handleClasses","handleWrapperStyle","handleWrapperClass","children","onResizeStart","onResize","onResizeStop","handleComponent","scale","resizeRatio","snapGap"],E=(s=W.PureComponent,l(y,s),Object.defineProperty(y.prototype,"parentNode",{get:function(){return this.resizable?this.resizable.parentNode:null},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"window",{get:function(){return this.resizable&&this.resizable.ownerDocument?this.resizable.ownerDocument.defaultView:null},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"propsSize",{get:function(){return this.props.size||this.props.defaultSize||w},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"size",{get:function(){var t,e,i,o=0,s=0;return this.resizable&&this.window&&(t=this.resizable.offsetWidth,e=this.resizable.offsetHeight,"relative"!==(i=this.resizable.style.position)&&(this.resizable.style.position="relative"),o="auto"!==this.resizable.style.width?this.resizable.offsetWidth:t,s="auto"!==this.resizable.style.height?this.resizable.offsetHeight:e,this.resizable.style.position=i),{width:o,height:s}},enumerable:!1,configurable:!0}),Object.defineProperty(y.prototype,"sizeStyle",{get:function(){function t(t){var e;return void 0===i.state[t]||"auto"===i.state[t]?"auto":i.propsSize&&i.propsSize[t]&&i.propsSize[t].toString().endsWith("%")?i.state[t].toString().endsWith("%")?i.state[t].toString():(e=i.getParentSize(),Number(i.state[t].toString().replace("px",""))/e[t]*100+"%"):o(i.state[t])}var i=this,e=this.props.size;return{width:e&&void 0!==e.width&&!this.state.isResizing?o(e.width):t("width"),height:e&&void 0!==e.height&&!this.state.isResizing?o(e.height):t("height")}},enumerable:!1,configurable:!0}),y.prototype.getParentSize=function(){var t,e,i,o;return this.parentNode?(t=this.appendBase())?(e=!1,"wrap"!==(i=this.parentNode.style.flexWrap)&&(e=!0,this.parentNode.style.flexWrap="wrap"),t.style.position="relative",t.style.minWidth="100%",t.style.minHeight="100%",o={width:t.offsetWidth,height:t.offsetHeight},e&&(this.parentNode.style.flexWrap=i),this.removeBase(t),o):{width:0,height:0}:this.window?{width:this.window.innerWidth,height:this.window.innerHeight}:{width:0,height:0}},y.prototype.bindEvents=function(){this.window&&(this.window.addEventListener("mouseup",this.onMouseUp),this.window.addEventListener("mousemove",this.onMouseMove),this.window.addEventListener("mouseleave",this.onMouseUp),this.window.addEventListener("touchmove",this.onMouseMove,{capture:!0,passive:!1}),this.window.addEventListener("touchend",this.onMouseUp))},y.prototype.unbindEvents=function(){this.window&&(this.window.removeEventListener("mouseup",this.onMouseUp),this.window.removeEventListener("mousemove",this.onMouseMove),this.window.removeEventListener("mouseleave",this.onMouseUp),this.window.removeEventListener("touchmove",this.onMouseMove,!0),this.window.removeEventListener("touchend",this.onMouseUp))},y.prototype.componentDidMount=function(){var t;this.resizable&&this.window&&(t=this.window.getComputedStyle(this.resizable),this.setState({width:this.state.width||this.size.width,height:this.state.height||this.size.height,flexBasis:"auto"!==t.flexBasis?t.flexBasis:void 0}))},y.prototype.componentWillUnmount=function(){this.window&&this.unbindEvents()},y.prototype.createSizeForCssProperty=function(t,e){var i=this.propsSize&&this.propsSize[e];return"auto"!==this.state[e]||this.state.original[e]!==t||void 0!==i&&"auto"!==i?t:"auto"},y.prototype.calculateNewMaxFromBoundary=function(t,e){var i,o,s=this.props.boundsByDirection,r=this.state.direction,n=s&&u("left",r),s=s&&u("top",r);return"parent"===this.props.bounds?(r=this.parentNode)&&(i=n?this.resizableRight-this.parentLeft:r.offsetWidth+(this.parentLeft-this.resizableLeft),o=s?this.resizableBottom-this.parentTop:r.offsetHeight+(this.parentTop-this.resizableTop)):"window"===this.props.bounds?this.window&&(i=n?this.resizableRight:this.window.innerWidth-this.resizableLeft,o=s?this.resizableBottom:this.window.innerHeight-this.resizableTop):this.props.bounds&&(i=n?this.resizableRight-this.targetLeft:this.props.bounds.offsetWidth+(this.targetLeft-this.resizableLeft),o=s?this.resizableBottom-this.targetTop:this.props.bounds.offsetHeight+(this.targetTop-this.resizableTop)),{maxWidth:t=i&&Number.isFinite(i)?t&&t<i?t:i:t,maxHeight:e=o&&Number.isFinite(o)?e&&e<o?e:o:e}},y.prototype.calculateNewSizeFromDirection=function(t,e){var i=this.props.scale||1,o=this.props.resizeRatio||1,s=this.state,r=s.direction,s=s.original,n=this.props,h=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=s.width,l=s.height,a=a||0,n=n||0;return u("right",r)&&(p=s.width+(t-s.x)*o/i,h)&&(l=(p-n)/this.ratio+a),u("left",r)&&(p=s.width-(t-s.x)*o/i,h)&&(l=(p-n)/this.ratio+a),u("bottom",r)&&(l=s.height+(e-s.y)*o/i,h)&&(p=(l-a)*this.ratio+n),{newWidth:p=u("top",r)&&(l=s.height-(e-s.y)*o/i,h)?(l-a)*this.ratio+n:p,newHeight:l}},y.prototype.calculateNewSizeFromAspectRatio=function(t,e,i,o){var s,r,n=this.props,h=n.lockAspectRatio,a=n.lockAspectRatioExtraHeight,n=n.lockAspectRatioExtraWidth,p=void 0===o.width?10:o.width,l=void 0===i.width||i.width<0?t:i.width,o=void 0===o.height?10:o.height,i=void 0===i.height||i.height<0?e:i.height,a=a||0,n=n||0;return e=h?(h=(o-a)*this.ratio+n,s=(i-a)*this.ratio+n,r=(p-n)/this.ratio+a,n=(l-n)/this.ratio+a,a=Math.max(p,h),h=Math.min(l,s),s=Math.max(o,r),r=Math.min(i,n),t=d(t,a,h),d(e,s,r)):(t=d(t,p,l),d(e,o,i)),{newWidth:t,newHeight:e}},y.prototype.setBoundingClientRect=function(){var t,e,i,o;"parent"===this.props.bounds&&(o=this.parentNode)&&(o=o.getBoundingClientRect(),this.parentLeft=o.left,this.parentTop=o.top),this.props.bounds&&"string"!=typeof this.props.bounds&&(o=this.props.bounds.getBoundingClientRect(),this.targetLeft=o.left,this.targetTop=o.top),this.resizable&&(t=(o=this.resizable.getBoundingClientRect()).left,e=o.top,i=o.right,o=o.bottom,this.resizableLeft=t,this.resizableRight=i,this.resizableTop=e,this.resizableBottom=o)},y.prototype.onResizeStart=function(t,e){var i,o,s,r,n;this.resizable&&this.window&&(s=o=0,t.nativeEvent&&(n=t.nativeEvent,Boolean((n.clientX||0===n.clientX)&&(n.clientY||0===n.clientY)))?(o=t.nativeEvent.clientX,s=t.nativeEvent.clientY):t.nativeEvent&&S(t.nativeEvent)&&(o=t.nativeEvent.touches[0].clientX,s=t.nativeEvent.touches[0].clientY),this.props.onResizeStart&&this.resizable&&!1===this.props.onResizeStart(t,e,this.resizable)||(this.props.size&&(void 0!==this.props.size.height&&this.props.size.height!==this.state.height&&this.setState({height:this.props.size.height}),void 0!==this.props.size.width)&&this.props.size.width!==this.state.width&&this.setState({width:this.props.size.width}),this.ratio="number"==typeof this.props.lockAspectRatio?this.props.lockAspectRatio:this.size.width/this.size.height,"auto"!==(n=this.window.getComputedStyle(this.resizable)).flexBasis&&(r=this.parentNode)&&(r=this.window.getComputedStyle(r).flexDirection,this.flexDir=r.startsWith("row")?"row":"column",i=n.flexBasis),this.setBoundingClientRect(),this.bindEvents(),r={original:{x:o,y:s,width:this.size.width,height:this.size.height},isResizing:!0,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:this.window.getComputedStyle(t.target).cursor||"auto"}),direction:e,flexBasis:i},this.setState(r)))},y.prototype.onMouseMove=function(t){var e=this;if(this.state.isResizing&&this.resizable&&this.window){if(this.window.TouchEvent&&S(t))try{t.preventDefault(),t.stopPropagation()}catch(t){}var i,o=this.props,s=o.maxWidth,r=o.maxHeight,n=o.minWidth,o=o.minHeight,h=(S(t)?t.touches[0]:t).clientX,a=(S(t)?t.touches[0]:t).clientY,p=this.state,l=p.direction,d=p.original,u=p.width,p=p.height,c=this.getParentSize(),f=(f=c,g=this.window.innerWidth,b=this.window.innerHeight,m=r,y=n,i=o,w=R(s,f.width,g,b),m=R(m,f.height,g,b),y=R(y,f.width,g,b),i=R(i,f.height,g,b),{maxWidth:void 0===w?void 0:Number(w),maxHeight:void 0===m?void 0:Number(m),minWidth:void 0===y?void 0:Number(y),minHeight:void 0===i?void 0:Number(i)}),s=f.maxWidth,r=f.maxHeight,n=f.minWidth,o=f.minHeight,g=this.calculateNewSizeFromDirection(h,a),b=g.newHeight,w=g.newWidth,m=this.calculateNewMaxFromBoundary(s,r),y=(this.props.snap&&this.props.snap.x&&(w=x(w,this.props.snap.x,this.props.snapGap)),this.props.snap&&this.props.snap.y&&(b=x(b,this.props.snap.y,this.props.snapGap)),this.calculateNewSizeFromAspectRatio(w,b,{width:m.maxWidth,height:m.maxHeight},{width:n,height:o})),a=(w=y.newWidth,b=y.newHeight,this.props.grid&&(i=z(w,this.props.grid[0]),f=z(b,this.props.grid[1]),w=0===(h=this.props.snapGap||0)||Math.abs(i-w)<=h?i:w,b=0===h||Math.abs(f-b)<=h?f:b),{width:w-d.width,height:b-d.height}),v=(u&&"string"==typeof u&&(u.endsWith("%")?w=w/c.width*100+"%":u.endsWith("vw")?w=w/this.window.innerWidth*100+"vw":u.endsWith("vh")&&(w=w/this.window.innerHeight*100+"vh")),p&&"string"==typeof p&&(p.endsWith("%")?b=b/c.height*100+"%":p.endsWith("vw")?b=b/this.window.innerWidth*100+"vw":p.endsWith("vh")&&(b=b/this.window.innerHeight*100+"vh")),{width:this.createSizeForCssProperty(w,"width"),height:this.createSizeForCssProperty(b,"height")});"row"===this.flexDir?v.flexBasis=v.width:"column"===this.flexDir&&(v.flexBasis=v.height),Object(O.flushSync)(function(){e.setState(v)}),this.props.onResize&&this.props.onResize(t,l,this.resizable,a)}},y.prototype.onMouseUp=function(t){var e=this.state,i=e.isResizing,o=e.direction,e=e.original;i&&this.resizable&&(i={width:this.size.width-e.width,height:this.size.height-e.height},this.props.onResizeStop&&this.props.onResizeStop(t,o,this.resizable,i),this.props.size&&this.setState(this.props.size),this.unbindEvents(),this.setState({isResizing:!1,backgroundStyle:b(b({},this.state.backgroundStyle),{cursor:"auto"})}))},y.prototype.updateSize=function(t){this.setState({width:t.width,height:t.height})},y.prototype.renderResizer=function(){var e=this,t=this.props,i=t.enable,o=t.handleStyles,s=t.handleClasses,r=t.handleWrapperStyle,n=t.handleWrapperClass,h=t.handleComponent;return i?(t=Object.keys(i).map(function(t){return!1!==i[t]?W.createElement(g,{key:t,direction:t,onResizeStart:e.onResizeStart,replaceStyles:o&&o[t],className:s&&s[t]},h&&h[t]?h[t]:null):null}),W.createElement("div",{className:n,style:r},t)):null},y.prototype.render=function(){var i=this,t=Object.keys(this.props).reduce(function(t,e){return-1===m.indexOf(e)&&(t[e]=i.props[e]),t},{}),e=b(b(b({position:"relative",userSelect:this.state.isResizing?"none":"auto"},this.props.style),this.sizeStyle),{maxWidth:this.props.maxWidth,maxHeight:this.props.maxHeight,minWidth:this.props.minWidth,minHeight:this.props.minHeight,boxSizing:"border-box",flexShrink:0}),o=(this.state.flexBasis&&(e.flexBasis=this.state.flexBasis),this.props.as||"div");return W.createElement(o,b({ref:this.ref,style:e,className:this.props.className},t),this.state.isResizing&&W.createElement("div",{style:this.state.backgroundStyle}),this.props.children,this.renderResizer())},y.defaultProps={as:"div",onResizeStart:function(){},onResize:function(){},onResizeStop:function(){},enable:{top:!0,right:!0,bottom:!0,left:!0,topRight:!0,bottomRight:!0,bottomLeft:!0,topLeft:!0},style:{},grid:[1,1],lockAspectRatio:!1,lockAspectRatioExtraWidth:0,lockAspectRatioExtraHeight:0,scale:1,resizeRatio:1,snapGap:0},y),c=e(200),M=e(22);function y(t){var i=s.call(this,t)||this;return i.ratio=1,i.resizable=null,i.parentLeft=0,i.parentTop=0,i.resizableLeft=0,i.resizableRight=0,i.resizableTop=0,i.resizableBottom=0,i.targetLeft=0,i.targetTop=0,i.appendBase=function(){var t,e;return i.resizable&&i.window&&(t=i.parentNode)?((e=i.window.document.createElement("div")).style.width="100%",e.style.height="100%",e.style.position="absolute",e.style.transform="scale(0, 0)",e.style.left="0",e.style.flex="0 0 100%",e.classList?e.classList.add("__resizable_base__"):e.className+="__resizable_base__",t.appendChild(e),e):null},i.removeBase=function(t){var e=i.parentNode;e&&e.removeChild(t)},i.ref=function(t){t&&(i.resizable=t)},i.state={isResizing:!1,width:void 0===(i.propsSize&&i.propsSize.width)?"auto":i.propsSize&&i.propsSize.width,height:void 0===(i.propsSize&&i.propsSize.height)?"auto":i.propsSize&&i.propsSize.height,direction:"right",original:{x:0,y:0,width:0,height:0},backgroundStyle:{height:"100%",width:"100%",backgroundColor:"rgba(0,0,0,0)",cursor:"auto",opacity:0,position:"fixed",zIndex:9999,top:"0",left:"0",bottom:"0",right:"0"},flexBasis:void 0},i.onResizeStart=i.onResizeStart.bind(i),i.onMouseMove=i.onMouseMove.bind(i),i.onMouseUp=i.onMouseUp.bind(i),i}function v(){var e=null!==n&&n.apply(this,arguments)||this;return e.onMouseDown=function(t){e.props.onResizeStart(t,e.props.direction)},e.onTouchStart=function(t){e.props.onResizeStart(t,e.props.direction)},e}function N(){this.constructor=h}function j(t){return(j="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function H(e,t){var i,o=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,i)),o}function P(s){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?H(Object(r),!0).forEach(function(t){var e,i,o;e=s,i=r[t=t],o=function(t){if("object"!=j(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0===e)return String(t);e=e.call(t,"string");if("object"!=j(e))return e;throw new TypeError("@@toPrimitive must return a primitive value.")}(t),(t="symbol"==j(o)?o:String(o))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(r)):H(Object(r)).forEach(function(t){Object.defineProperty(s,t,Object.getOwnPropertyDescriptor(r,t))})}return s}function B(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function _(t){var e=t.id,i=t.key,o=t.children,s=t.className,r=t.style,n=t.size,h=t.defaultSize,a=t.minWidth,p=t.minHeight,l=t.maxWidth,d=t.maxHeight,u=t.direction,c=t.grid,f=t.bounds,g=t.boundsSelector,b=t.handleStyles,w=t.handleClassNames,m=t.setProps,y=t.loading_state;Object(W.useEffect)(function(){!n&&h&&m({size:h})},[]);var v,z=Object(M.clone)({top:!1,right:!1,bottom:!1,left:!1,topRight:!1,bottomRight:!1,bottomLeft:!1,topLeft:!1}),S=function(t,e){var i,o,s,r,n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(n)return s=!(o=!0),{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){s=!0,i=t},f:function(){try{o||null==n.return||n.return()}finally{if(s)throw i}}};if(Array.isArray(t)||(n=function(t){var e;if(t)return"string"==typeof t?B(t,void 0):"Map"===(e="Object"===(e=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:e)||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?B(t,void 0):void 0}(t))||e&&t&&"number"==typeof t.length)return n&&(t=n),r=0,{s:e=function(){},n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},e:function(t){throw t},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(u);try{for(S.s();!(v=S.n()).done;)z[v.value]=!0}catch(t){S.e(t)}finally{S.f()}return React.createElement(E,{id:e,key:i,children:o,className:s,style:r,size:n,defaultSize:h,minWidth:a,minHeight:p,maxWidth:l,maxHeight:d,grid:c,bounds:g?document.querySelector(g):f,enable:z,handleStyles:P(P({},b),{},{top:P({cursor:"ns-resize"},null==b?void 0:b.top),right:P({cursor:"ew-resize"},null==b?void 0:b.right),bottom:P({cursor:"ns-resize"},null==b?void 0:b.bottom),left:P({cursor:"ew-resize"},null==b?void 0:b.left)}),handleClasses:w,onResizeStop:function(t,e,i,o){n&&m({size:{width:n.width+o.width,height:n.height+o.height}})},"data-dash-is-loading":y&&y.is_loading||void 0},o)}(t.default=_).defaultProps=c.b,_.propTypes=c.c}}]);
|