UNPKG

@alicd/crui-tree-select-field

Version:

树形下拉框

6 lines 231 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("React"),require("ReactDOM")):"function"==typeof define&&define.amd?define(["React","ReactDOM"],t):"object"==typeof exports?exports["@alicd/crui-tree-select-field"]=t(require("React"),require("ReactDOM")):e["@alicd/crui-tree-select-field"]=t(e.React,e.ReactDOM)}(this,function(e,t){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=174)}([function(t,n){t.exports=e},function(e,t,n){e.exports=n(169)()},function(e,t,n){var o,r;/*! Copyright (c) 2017 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t<arguments.length;t++){var o=arguments[t];if(o){var r=typeof o;if("string"===r||"number"===r)e.push(o);else if(Array.isArray(o)&&o.length){var a=n.apply(null,o);a&&e.push(a)}else if("object"===r)for(var s in o)i.call(o,s)&&o[s]&&e.push(s)}}return e.join(" ")}var i={}.hasOwnProperty;void 0!==e&&e.exports?(n.default=n,e.exports=n):(o=[],void 0!==(r=function(){return n}.apply(t,o))&&(e.exports=r))}()},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}var r=n(112),i=o(r),a=n(113),s=o(a),l=n(114),u=o(l),c=n(117),f=o(c),p=n(119),d=o(p),h=n(120),y=o(h),b=n(115),v=o(b),m=n(118),g=o(m),O=n(116),x=o(O),C=n(111),w=o(C);e.exports={focus:i.default,func:s.default,keyCode:u.default,pickAttrs:f.default,scrollbar:d.default,support:y.default,log:v.default,pickOthers:g.default,obj:x.default,children:w.default}},function(e,n){e.exports=t},function(e,t,n){"use strict";e.exports={classList:n(78),events:n(79),position:n(80),style:n(44)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=n(88),r=function(e){return e&&e.__esModule?e:{default:e}}(o);t.default=r.default,e.exports=t.default},function(e,t){var n=e.exports={version:"2.6.9"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(14)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t,n){var o=n(9),r=n(7),i=n(63),a=n(15),s=n(11),l=function(e,t,n){var u,c,f,p=e&l.F,d=e&l.G,h=e&l.S,y=e&l.P,b=e&l.B,v=e&l.W,m=d?r:r[t]||(r[t]={}),g=m.prototype,O=d?o:h?o[t]:(o[t]||{}).prototype;d&&(n=t);for(u in n)(c=!p&&O&&void 0!==O[u])&&s(m,u)||(f=c?O[u]:n[u],m[u]=d&&"function"!=typeof O[u]?n[u]:b&&c?i(f,o):v&&O[u]==f?function(e){var t=function(t,n,o){if(this instanceof e){switch(arguments.length){case 0:return new e;case 1:return new e(t);case 2:return new e(t,n)}return new e(t,n,o)}return e.apply(this,arguments)};return t.prototype=e.prototype,t}(f):y&&"function"==typeof f?i(Function.call,f):f,y&&((m.virtual||(m.virtual={}))[u]=f,e&l.R&&g&&!g[u]&&a(g,u,f)))};l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(20),r=n(65),i=n(39),a=Object.defineProperty;t.f=n(8)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l,u,c=n(0),f=o(c),p=n(1),d=o(p),h=(u=l=function(e){function t(){return i(this,t),a(this,e.apply(this,arguments))}return s(t,e),t.prototype.getPrefix=function(){return this.context.prefix||this.props.prefix},t.prototype.getParent=function(){return this.props.parent},t.prototype.getRoot=function(){for(var e=this.props.parent;e.props.parent;)e=e.props.parent;return e},t.prototype.addRelation=function(e){return f.default.cloneElement(e,{parent:this})},t.prototype.getParentBy=function(e){for(var t=this.props.parent,n=e(t)?[t]:[];t.props.parent;)t=t.props.parent,e(t)&&n.push(t);return n},t.prototype.getParentByFlag=function(e){return this.getParentBy(function(t){return t.constructor[e]})},t.prototype.getParentByType=function(e){return this.getParentBy(function(t){return t instanceof e})},t.prototype.getChildrenInc=function(){var e=this;return Object.keys(this.refs).map(function(t){return e.refs[t]})},t.prototype.getChildrenIncByType=function(e){return this.getChildrenIncBy(function(t){return t instanceof e})},t.prototype.getChildrenIncByFlag=function(e){return this.getChildrenIncBy(function(t){return t.constructor[e]})},t.prototype.getChildrenIncBy=function(e){var t=[];return function e(n){n.forEach(function(n){n.getChildrenInc&&e(n.getChildrenInc()),t.push(n)})}(this.getChildrenInc()),t.filter(e)},t.prototype.getChildren=function(){return this.props.children},t.prototype.getChildrenByType=function(e){return this.getChildrenBy(function(t){return t.type===e})},t.prototype.getChildrenByFlag=function(e){return this.getChildrenBy(function(t){return t.type&&t.type[e]})},t.prototype.getChildrenBy=function(e){var t=[];return function e(n){c.Children.forEach(n,function(n){n.props&&n.props.children&&e(n.props.children),t.push(n)})}(this.props.children),t.filter(e)},t}(f.default.Component),l.propTypes={prefix:d.default.string,parent:d.default.any,children:d.default.any},u);h.displayName="Container",t.default=h,e.exports=t.default},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(12),r=n(25);e.exports=n(8)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(66),r=n(30);e.exports=function(e){return o(r(e))}},function(e,t,n){var o=n(37)("wks"),r=n(27),i=n(9).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var c,f,p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},d=n(0),h=o(d),y=n(4),b=o(y),v=n(1),m=o(v),g=n(2),O=o(g),x=n(6),C=o(x),w=n(3),_=n(21),E=n(28),P=o(E),k=n(13),j=o(k),S=j.default,N=function(){},T=(f=c=function(e){function t(n,o){s(this,t);var r=l(this,e.call(this,n,o));["onClick","onKeyDown","onFocus","onMouseEnter","onMouseLeave"].forEach(function(e){r[e]=r[e].bind(r)});var i=r.getRoot();if(!i)throw new Error("MenuItem should use under Menu.");return r.root=i,r.Menu=i.constructor,r.SubMenu=i.constructor.SubMenu,r}return u(t,e),t.prototype.componentDidMount=function(){this._meta=p({node:b.default.findDOMNode(this)},this.props),this.pushMetaToParent()},t.prototype.componentDidUpdate=function(){this.root=this.getRoot(),this.pushMetaToParent()},t.prototype.pushMetaToParent=function(){var e=this.getParentByFlag("_menu")[0];e&&e.addChildMeta(this._meta)},t.prototype.componentWillUnmount=function(){var e=this.getParentByFlag("_menu")[0];e&&e.removeChildMeta(this._meta)},t.prototype.render=function(){var e,t=this.props,n=t.focused,o=t.selected,r=t.disabled,s=t.helper,l=t.className,u=t.indentSize,c=t.children,f=t.focusedKey,d=t.hasSelectedIcon,y=t.index,b=t.needIndent,v=t.style,m=void 0===v?{}:v,g=a(t,["focused","selected","disabled","helper","className","indentSize","children","focusedKey","hasSelectedIcon","index","needIndent","style"]),x=this.getPrefix();void 0===o&&(o=this.root.state.selectedKeys.indexOf(y)>-1);var _=(0,O.default)((e={},i(e,x+"menu-item",!0),i(e,"disabled",r),i(e,"selected",o),i(e,"focused",y&&f===y),i(e,l,l),e)),E={onClick:this.onClick,onKeyDown:this.onKeyDown,onFocus:this.onFocus,onMouseEnter:this.onMouseEnter,onMouseLeave:this.onMouseLeave},k=h.default.createElement(P.default,{animation:{appear:"zoomIn",enter:"zoomIn",leave:"zoomOut"}},d&&o?h.default.createElement(C.default,{type:"select",className:x+"menu-icon-select",size:"xs",style:{left:(u||20)-16+"px"}}):null);s=s?h.default.createElement("em",{className:x+"menu-item-helper"},s):null,r&&(E={onSelect:function(e){e.stopPropagation()},onClick:function(e){e.stopPropagation()}}),g=(0,w.pickAttrs)(g);var j=p({},m);return u&&!0===b&&(j.paddingLeft=u),h.default.createElement("li",p({},g,E,{style:j,tabIndex:r?null:n?0:-1,role:"menuitem",className:_}),c,k,s)},t.prototype.onClick=function(e){this.root.onItemClick(e,this.props.index,"click",this),this.props.onClick(this.props.index,e),e.stopPropagation()},t.prototype.onKeyDown=function(e){var t=e.keyCode;this.props.onKeyDown(e),32!==t&&13!==t||this.onClick(e)},t.prototype.onFocus=function(e){e.stopPropagation()},t.prototype.onMouseEnter=function(e){this.root.onKeyNavNodeFocus(e),this.root.focusChild(this._meta);var t=this.getParentByType(this.Menu)[0];if(t){var n=t.getChildrenIncByType(this.SubMenu),o=t.getChildrenIncByType(_.Popup);n.forEach(function(t){t.onContentMouseEnter(),"hover"===t.props.triggerType&&t.onSubMenuMouseLeave(e)}),o.forEach(function(t){t._onContentMouseEnter(),"hover"===t.props.triggerType&&t._onTriggerMouseLeave(e)})}this.props.onMouseEnter(e)},t.prototype.onMouseLeave=function(e){this.root.unFocusChild(this._meta),this.props.onMouseLeave(e)},t}(S),c._menuItem=!0,c.propTypes={prefix:m.default.string,className:m.default.string,style:m.default.object,helper:m.default.string,disabled:m.default.bool,selected:m.default.bool,focused:m.default.bool,onClick:m.default.func,onKeyDown:m.default.func,parent:m.default.any,hasSelectedIcon:m.default.bool,needIndent:m.default.bool},c.defaultProps={helper:null,disabled:!1,prefix:"next-",hasSelectedIcon:!0,needIndent:!0,onClick:N,onKeyDown:N,onMouseEnter:N,onMouseLeave:N},c.contextTypes={parentIndex:m.default.array,parentLabel:m.default.array,prefix:m.default.string},f);T.displayName="MenuItem",t.default=T,e.exports=t.default},function(e,t,n){var o=n(16);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(51),i=o(r),a=n(50),s=o(a),l=n(52),u=o(l),c=n(98),f=o(c);i.default.Gateway=s.default,i.default.Position=u.default,i.default.Popup=f.default,t.default=i.default,e.exports=t.default},function(e,t){e.exports=!0},function(e,t,n){var o=n(71),r=n(31);e.exports=Object.keys||function(e){return o(e,r)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t){e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},function(e,t,n){var o=n(30);e.exports=function(e){return Object(o(e))}},function(e,t){var n=0,o=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+o).toString(36))}},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function i(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}Object.defineProperty(t,"__esModule",{value:!0});var u,c,f,p,d,h,y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},b=n(0),v=o(b),m=n(1),g=o(m),O=n(4),x=n(171),C=o(x),w=n(3),_=n(5),E=n(76),P=o(E),k=function(){},j=_.events.on,S=_.classList.addClass,N=_.classList.removeClass,T=(c=u=function(e){function t(){return a(this,t),s(this,e.apply(this,arguments))}return l(t,e),t.prototype.componentDidMount=function(){this.node=(0,O.findDOMNode)(this),this.onAnimateEnd=this.onAnimateEnd.bind(this),this.props.useTransition&&w.support.transition?this._animation=j(this.node,w.support.transition.end,this.onAnimateEnd):w.support.animation&&(this._animation=j(this.node,w.support.animation.end,this.onAnimateEnd))},t.prototype.componentDidUpdate=function(){this.node!==(0,O.findDOMNode)(this)&&(this._animation&&this._animation.off&&this._animation.off(),this.componentDidMount())},t.prototype.fakeAnimationEvent=function(){(!w.support.animation||this.props.useTransition&&!w.support.transition)&&(this.timeoutEnd=setTimeout(this.onAnimateEnd,10))},t.prototype.componentWillUnmount=function(){this._animation&&this._animation.off&&this._animation.off(),clearTimeout(this.timeoutEnd)},t.prototype.componentWillAppear=function(e){this.props.animationAppear?this.playAction("appear",e):e(),this.props.beforeAppear(),this.fakeAnimationEvent()},t.prototype.componentDidAppear=function(){this.props.afterAppear()},t.prototype.componentWillEnter=function(e){this.playAction("enter",e),this.props.beforeEnter(),this.fakeAnimationEvent()},t.prototype.componentDidEnter=function(){this.props.afterEnter()},t.prototype.componentWillLeave=function(e){this.playAction("leave",e),this.props.beforeLeave(),this.fakeAnimationEvent()},t.prototype.componentDidLeave=function(){this.props.afterLeave()},t.prototype.onAnimateEnd=function(e){e&&e.target!==this.node||(clearTimeout(this.timeout),this._done&&this._done(),e&&e.stopPropagation())},t.prototype.playAction=function(e,t){var n=(0,O.findDOMNode)(this),o=this.props.animation,r=o[e];"string"==typeof r?(Object.keys(o).forEach(function(e){"string"==typeof o[e]&&(N(n,o[e]),N(n,o[e]+"-active"))}),S(n,r),this.addActiveClass(n,r+"-active"),this._done=t):"function"==typeof r?r(n,t):t(),this.node=n},t.prototype.addActiveClass=function(e,t){this.timeout=setTimeout(function(){S(e,t)},20)},t.prototype.render=function(){return this.props.children},t}(v.default.Component),u.propTypes={beforeAppear:g.default.func,afterAppear:g.default.func,beforeEnter:g.default.func,afterEnter:g.default.func,beforeLeave:g.default.func,afterLeave:g.default.func,children:g.default.any,useTransition:g.default.bool,animationAppear:g.default.bool},u.defaultProps={animationAppear:!0},c);T.displayName="AnimateChild";var M=(p=f=function(e){function t(){return a(this,t),s(this,e.apply(this,arguments))}return l(t,e),t.prototype.render=function(){return v.default.Children.toArray(this.props.children)[0]||null},t}(v.default.Component),f.propTypes={children:g.default.any},p);M.displayName="SingeChildWrapper";var D=(h=d=function(e){function t(){return a(this,t),s(this,e.apply(this,arguments))}return l(t,e),t.prototype.render=function(){var e=this.props,t=e.animation,n=e.children,o=e.component,i=e.animationAppear,a=e.afterAppear,s=e.afterEnter,l=e.afterLeave,u=e.singleMode,c=e.useTransition,f=e.beforeAppear,p=e.beforeEnter,d=e.beforeLeave,h=r(e,["animation","children","component","animationAppear","afterAppear","afterEnter","afterLeave","singleMode","useTransition","beforeAppear","beforeEnter","beforeLeave"]),b={afterAppear:a,afterEnter:s,afterLeave:l,beforeAppear:f,beforeEnter:p,beforeLeave:d,animationAppear:i,animation:this.normalizeAnimation(t)},m=v.default.Children.count(n),g=v.default.Children.map(n,function(e,t){var n=e.key;return n||(n="animate-"+t),v.default.createElement(T,y({},b,{key:n,useTransition:c}),e)});return!o&&m<=1&&u&&(o=M),v.default.createElement(C.default,y({component:o},h),g)},t.prototype.normalizeAnimation=function(e){return"string"==typeof e?{appear:e+"-appear",enter:e+"-enter",leave:e+"-leave"}:e},t}(v.default.Component),d.propTypes={children:g.default.any,animation:g.default.oneOfType([g.default.string,g.default.object]),beforeAppear:g.default.func,afterAppear:g.default.func,beforeEnter:g.default.func,afterEnter:g.default.func,beforeLeave:g.default.func,afterLeave:g.default.func,component:g.default.any,singleMode:g.default.bool,useTransition:g.default.bool,animationAppear:g.default.bool},d.defaultProps={animation:{appear:k,enter:k,leave:k},beforeAppear:k,afterAppear:k,beforeEnter:k,afterEnter:k,beforeLeave:k,afterLeave:k,singleMode:!0,animationAppear:!0,useTransition:!1},h);D.displayName="Animate",t.default=D,D.names=P.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){var t=void 0,n=e.userAgent,o=n.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(o[1])?(t=/\brv[ :]+(\d+)/g.exec(n)||[],"IE "+(t[1]||"")):"Chrome"===o[1]&&(t=n.match(/\b(OPR|Edge)\/(\d+)/))?t.slice(1).join(" ").replace("OPR","Opera"):(o=o[2]?[o[1],o[2]]:[e.appName,e.appVersion,"-?"],t=n.match(/version\/(\d+)/i),t&&o.splice(1,1,t[1]),o.join(" "))}function r(e){var t=e.getBoundingClientRect(),n=e.ownerDocument.defaultView;return{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}}function i(e){var t=1;return Array.isArray(e)&&(t=e.length),t}function a(e,t,n){return 1===t?(n.first=!0,n.last=!0):(n.first=0===e,n.last=e===t-1),n}function s(e,t,n){!function e(n,o,r){var s=i(n);v.default.Children.forEach(n,function(n,i){var l=o+"-"+i;n.props&&n.props.children&&n.type&&"function"==typeof n.type&&n.type.isTreeNode&&e(n.props.children,l,{node:n,pos:l}),t(n,i,l,n.key||l,a(i,s,{}),r)})}(e,0,n)}function l(e,t){return e.every(function(e,n){return e===t[n]})}function u(e){var t={};e.forEach(function(e){var n=e.split("-").length;t[n]||(t[n]=[]),t[n].push(e)});for(var n=Object.keys(t).sort(function(e,t){return Number(e)-Number(t)}),o=0;o<n.length;o++)!function(e){n[e+1]&&t[n[e]].forEach(function(o){for(var r=e+1;r<n.length;r++)!function(e){t[n[e]].forEach(function(r,i){l(o.split("-"),r.split("-"))&&(t[n[e]][i]=null)}),t[n[e]]=t[n[e]].filter(function(e){return e})}(r)})}(o);var r=[];return n.forEach(function(e){r=r.concat(t[e])}),r}function c(e){var t=e.match(/(.+)(-[^-]+)$/),n="";return t&&3===t.length&&(n=t[1]),n}function f(e){return e.split("-")}function p(e,t,n){var o=Object.keys(e);o.forEach(function(r,i){var a=f(r),s=!1;t.forEach(function(t){var u=f(t);a.length>u.length&&l(u,a)&&(e[r].halfChecked=!1,e[r].checked=n,o[i]=null),a[0]===u[0]&&a[1]===u[1]&&(s=!0)}),s||(o[i]=null)}),o=o.filter(function(e){return e});for(var r=0;r<t.length;r++)!function(n){!function r(i){var a=f(i).length;if(!(a<=2)){var s=0,u=0,p=c(i);o.forEach(function(o){var r=f(o);if(r.length===a&&l(f(p),r))if(s++,e[o].checked){u++;var i=t.indexOf(o);i>-1&&(t.splice(i,1),i<=n&&n--)}else e[o].halfChecked&&(u+=.5)});var d=e[p];0===u?(d.checked=!1,d.halfChecked=!1):u===s?(d.checked=!0,d.halfChecked=!1):(d.halfChecked=!0,d.checked=!1),r(p)}}(t[n]),r=n}(r)}function d(e){var t=[],n=[],o=[],r=[];return Object.keys(e).forEach(function(i){var a=e[i];a.checked?(n.push(a.key),o.push(a.node),r.push({node:a.node,pos:i})):a.halfChecked&&t.push(a.key)}),{halfCheckedKeys:t,checkedKeys:n,checkedNodes:o,checkedNodesPositions:r,treeNodesStates:e}}function h(e,t){return t?{checked:e,halfChecked:t}:e}function y(e,t){if(e===t)return!0;if(null===e||void 0===e||null===t||void 0===t)return!1;if(e.length!==t.length)return!1;for(var n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.browser=o,t.getOffset=r,t.loopAllChildren=s,t.isInclude=l,t.filterParentPosition=u,t.handleCheckState=p,t.getCheck=d,t.getStrictlyValue=h,t.arraysEqual=y;var b=n(0),v=function(e){return e&&e.__esModule?e:{default:e}}(b)},function(e,t){e.exports=function(e){if(void 0==e)throw TypeError("Can't call method on "+e);return e}},function(e,t){e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(e,t){e.exports={}},function(e,t,n){var o=n(20),r=n(149),i=n(31),a=n(36)("IE_PROTO"),s=function(){},l=function(){var e,t=n(64)("iframe"),o=i.length;for(t.style.display="none",n(143).appendChild(t),t.src="javascript:",e=t.contentWindow.document,e.open(),e.write("<script>document.F=Object<\/script>"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(12).f,r=n(11),i=n(18)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(37)("keys"),r=n(27);e.exports=function(e){return o[e]||(o[e]=r(e))}},function(e,t,n){var o=n(7),r=n(9),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(22)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(16);e.exports=function(e,t){if(!o(e))return e;var n,r;if(t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;if("function"==typeof(n=e.valueOf)&&!o(r=n.call(e)))return r;if(!t&&"function"==typeof(n=e.toString)&&!o(r=n.call(e)))return r;throw TypeError("Can't convert object to primitive value")}},function(e,t,n){var o=n(9),r=n(7),i=n(22),a=n(41),s=n(12).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){t.f=n(18)},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}function c(e,t){return e.indexOf(t)>-1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var f,p,d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h=n(0),y=o(h),b=n(1),v=o(b),m=n(2),g=o(m),O=n(49),x=o(O),C=n(6),w=o(C),_=n(3),E=(p=f=function(e){function t(n,o){s(this,t);var r=l(this,e.call(this,n)),i=void 0,a=void 0,u=void 0;return o.__group__?(a=!1,i=c(o.selectedValue,n.value),u=o.disabled):(i="checked"in n?n.checked:n.defaultChecked,a="indeterminate"in n?n.indeterminate:n.defaultIndeterminate),r.state={checked:i,indeterminate:a,disabled:u},r.onChange=r.onChange.bind(r),r}return u(t,e),t.prototype.componentWillReceiveProps=function(e,t){if(t.__group__){var n=t.selectedValue,o=t.disabled;"selectedValue"in t&&"disabled"in t?this.setState({checked:c(n,e.value),disabled:o}):"selectedValue"in t?this.setState({checked:c(n,e.value)}):"disabled"in t&&this.setState({disabled:o})}else"checked"in e&&this.setState({checked:e.checked}),"indeterminate"in e&&this.setState({indeterminate:e.indeterminate})},t.prototype.onChange=function(e){var t=e.target.checked,n=this.props.value;this.state.disabled||this.props.disabled||(this.context.__group__?this.context.onChange(n,e):("checked"in this.props||this.setState({checked:t}),"indeterminate"in this.props||this.setState({indeterminate:!1}),this.props.onChange(t,e)))},t.prototype.render=function(){var e,t=this.props,n=t.className,o=t.children,r=t.defaultChecked,s=t.style,l=a(t,["className","children","defaultChecked","style"]),u=this.state.checked,c=this.state.disabled||this.props.disabled,f=this.state.indeterminate,p=(0,_.pickAttrs)(l),h=this.context.prefix||this.props.prefix,b={};"checked"in this.props?b={checked:u}:"defaultChecked"in this.props&&(b={defaultChecked:r});var v=y.default.createElement("input",d({type:"checkbox"},p,b,{onChange:this.onChange,"aria-checked":u})),m=this.getStateElement(v),O=(0,g.default)((e={},i(e,h+"checkbox",!0),i(e,n,!!n),i(e,"checked",u),i(e,"disabled",c),i(e,"indeterminate",f),i(e,this.getStateClassName(),!0),e)),x=(0,g.default)(i({},h+"checkbox-label",!!o)),C=f?"semi-select":"select";return o?y.default.createElement("label",{htmlFor:this.props.id},y.default.createElement("span",{className:O,style:s},y.default.createElement("span",{className:h+"checkbox-inner"},y.default.createElement(w.default,{type:C,size:"xs",className:f?"zoomIn":""})),m),y.default.createElement("span",{className:x},o)):y.default.createElement("label",{className:O,style:s},y.default.createElement("span",{className:h+"checkbox-inner"},y.default.createElement(w.default,{type:C,size:"xs",className:f?"zoomIn":""})),m)},t}(x.default),f.displayName="Checkbox",f.propTypes={prefix:v.default.string,className:v.default.string,style:v.default.object,checked:v.default.bool,defaultChecked:v.default.bool,disabled:v.default.bool,indeterminate:v.default.bool,defaultIndeterminate:v.default.bool,onChange:v.default.func},f.defaultProps={defaultChecked:!1,defaultIndeterminate:!1,onChange:function(){},prefix:"next-"},f.contextTypes={onChange:v.default.func,__group__:v.default.bool,selectedValue:v.default.array,disabled:v.default.bool,prefix:v.default.string},p);t.default=E,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var r=n(42),i=o(r),a=n(77),s=o(a);i.default.Group=s.default,t.default=i.default,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e.replace(/-(.)/g,function(e,t){return t.toUpperCase()})}function r(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})}function i(e,t){var n=arguments.length,i=h(e);return t=v[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,1===n?i:b(e,t,i.getPropertyValue(r(t))||e.style[o(t)])}function a(e,t,n){var r=arguments.length;if(t=v[t]?"cssFloat"in e.style?"cssFloat":"styleFloat":t,3===r)return"number"==typeof n&&d.test(t)&&(n+="px"),e.style[o(t)]=n;for(var i in t)a(e,i,t[i]);return h(e)}function s(e){return e===document.body?document.documentElement.clientWidth:e.offsetWidth}function l(e){return e===document.body?window.innerHeight||document.documentElement.clientHeight:e.offsetHeight}function u(){return{width:Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),height:Math.max(document.documentElement.scrollHeight,document.body.scrollHeight)}}function c(){return{width:document.documentElement.clientWidth,height:window.innerHeight||document.documentElement.clientHeight}}function f(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function p(e){var t=e.getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var d=/margin|padding|width|height|max|min|offset/,h=function(e){return 1==e.nodeType?e.ownerDocument.defaultView.getComputedStyle(e,null):{}},y={left:!0,top:!0},b=function(e,t,n){if(t=t.toLowerCase(),"auto"===n){if("height"===t)return e.offsetHeight;if("width"===t)return e.offsetWidth}return t in y||(y[t]=d.test(t)),y[t]?parseFloat(n)||0:n},v={cssFloat:1,styleFloat:1,float:1};e.exports={set:a,get:i,getOuterWidth:s,getOuterHeight:l,getDocSize:u,getClientSize:c,getScroll:f,getOffset:p}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.ieVersion="undefined"!=typeof document&&document.documentMode},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function u(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}function c(e){e.preventDefault()}Object.defineProperty(t,"__esModule",{value:!0});var f,p,d=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},h=n(0),y=o(h),b=n(1),v=o(b),m=n(2),g=o(m),O=n(6),x=o(O),C=n(3),w=(p=f=function(e){function t(n){s(this,t);var o=l(this,e.call(this,n)),r=void 0;return r="value"in n?n.value:n.defaultValue,o.state={value:void 0===r?"":r},o}return u(t,e),t.prototype.componentWillReceiveProps=function(e){"value"in e&&this.setState({value:void 0===e.value?"":e.value})},t.prototype.handleKeyDown=function(e){13===e.keyCode&&this.props.onPressEnter(e),this.props.onKeyDown(e)},t.prototype.onChange=function(e){var t=e.target.value;if(!("value"in this.props)){if(this.isIe()&&this.props.maxLength&&this.props.multiple){var n=parseInt(this.props.maxLength);this.getValueLength(t,!0)>n&&this.props.cutString&&(t=t.replace(/\n/g,"\n\n"),t=t.substr(0,n),t=t.replace(/\n\n/g,"\n"))}this.setState({value:t})}this.props.trim&&(t=t.trim()),this.props.onChange(t,e)},t.prototype.onFocus=function(e){this.setState({focus:!0}),this.props.onFocus(e)},t.prototype.onBlur=function(e){this.setState({focus:!1}),this.props.onBlur(e)},t.prototype.onClear=function(e){this.props.disabled||("value"in this.props||this.setState({value:""}),this.props.onChange("",e),this.refs.input.focus())},t.prototype.ieGT9=function(){return"undefined"!=typeof document&&(document.documentMode||0)>9},t.prototype.isIe=function(){return"undefined"!=typeof document&&0!==(document.documentMode||0)},t.prototype.renderInput=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=this.props.placeholder;o&&this.ieGT9()&&(o=null);var r=this.props,s=r.multiple,l=r.size,u=(r.className,r.children,r.htmlType),c=r.maxLen,f=r.maxLength,p=(r.state,r.onChange,r.style,r.addonBefore,r.addonAfter,r.onPressEnter,r.hasFeedback,a(r,["multiple","size","className","children","htmlType","maxLen","maxLength","state","onChange","style","addonBefore","addonAfter","onPressEnter","hasFeedback"])),h=this.context.prefix||this.props.prefix,b=s?"multiple":"single",v=s?"textarea":"input",m=d({},p);m.onChange=this.onChange.bind(this),m.value=this.state.value,delete m.defaultValue,!s&&delete m.rows;var O=(0,g.default)((e={},i(e,h+"input",!0),i(e,h+"input-"+b,!0),i(e,h+"input-"+l,!!l&&"single"===b),i(e,"disabled",!!this.props.disabled),i(e,"clear",this.props.hasClear),i(e,"error","error"===this.props.state),i(e,"focus",this.state.focus),i(e,"hidden","hidden"===this.props.htmlType),i(e,"noborder","file"===this.props.htmlType),i(e,n,!!n),e)),x={textIndent:this.props.textIndent};return this.props.cutString&&(m.maxLength=c||f),y.default.createElement("span",{className:O,style:t},y.default.createElement(v,d({},(0,C.pickAttrs)(m),{style:x,type:u,height:"100%",onKeyDown:this.handleKeyDown.bind(this),onFocus:this.onFocus.bind(this),onBlur:this.onBlur.bind(this),key:"input",ref:"input"})),this.renderControl())},t.prototype.getValueLength=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=""+e,o=this.props.getValueLength(n);return"number"!=typeof o&&(o=n.length),t&&this.isIe()?o+n.split("\n").length-1:o},t.prototype.renderControl=function(){var e,t=parseInt(this.props.maxLength||this.props.maxLen),n=this.props.hasLimitHint||this.props.maxLen;this.props.maxLen&&C.log.deprecated("maxLen","maxLength","Input");var o=this.context.prefix||this.props.prefix,r=this.props,a=r.hasClear,s=r.readOnly,l=r.state,u=t>0&&this.state.value?this.getValueLength(this.state.value,this.props.multiple):0,f=(0,g.default)((e={},i(e,o+"input-len",!0),i(e,"error",u>t),e)),p=null;l&&!this.props.multiple&&("success"===l?p=y.default.createElement(x.default,{type:"success"}):"loading"===l&&(p=y.default.createElement(x.default,{type:"loading"})));var d=a&&!s&&""+this.state.value?y.default.createElement(x.default,{type:"delete-filling",onClick:this.onClear.bind(this),onMouseDown:c}):null,h=t&&n?y.default.createElement("span",{className:f},u,"/",t):null;return d||h||p?y.default.createElement("span",{className:o+"input-control"},d,h,p):null},t.prototype.getInputNode=function(){return this.refs.input},t.prototype.render=function(){var e,t,n,o=this.props,r=this.context.prefix||this.props.prefix,a=(0,g.default)((e={},i(e,r+"input-group",!0),i(e,""+o.size,!!o.size),i(e,"disabled",this.props.disabled),i(e,this.props.className,!!this.props.className),e)),s=r+"input-addon",l=(0,g.default)((t={},i(t,""+s,!0),i(t,s+"-before",!0),t)),u=(0,g.default)((n={},i(n,""+s,!0),i(n,s+"-after",!0),n)),c=o.addonBefore?y.default.createElement("span",{className:l},o.addonBefore):null,f=o.addonAfter?y.default.createElement("span",{className:u},o.addonAfter):null;return c||f?y.default.createElement("span",{className:a,style:this.props.style},c,this.renderInput(),f):this.renderInput(this.props.style,this.props.className)},t}(y.default.Component),f.propTypes={prefix:v.default.string,value:v.default.oneOfType([v.default.string,v.default.number]),defaultValue:v.default.oneOfType([v.default.string,v.default.number]),size:v.default.oneOf(["small","medium","large"]),disabled:v.default.bool,multiple:v.default.bool,maxLen:v.default.number,maxLength:v.default.number,hasLimitHint:v.default.bool,cutString:v.default.bool,hasClear:v.default.bool,state:v.default.oneOf(["","error","loading","success"]),style:v.default.object,htmlType:v.default.string,readOnly:v.default.bool,trim:v.default.bool,addonBefore:v.default.node,addonAfter:v.default.node,placeholder:v.default.string,onPressEnter:v.default.func,onFocus:v.default.func,onBlur:v.default.func,onKeyDown:v.default.func,onChange:v.default.func,getValueLength:v.default.func,rows:v.default.number,textIndent:v.default.number,className:v.default.string},f.defaultProps={htmlType:"text",disabled:!1,prefix:"next-",multiple:!1,hasFeedback:!1,maxLen:null,maxLength:null,hasLimitHint:!1,cutString:!0,hasClear:!1,readOnly:!1,trim:!1,state:"",size:"medium",onPressEnter:function(){},onFocus:function(){},onBlur:function(){},onKeyDown:function(){},onChange:function(){},getValueLength:function(){},rows:4},f.contextTypes={prefix:v.default.string},p);w.displayName="Input",t.default=w,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function l(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},c=n(0),f=o(c),p=n(1),d=o(p),h=n(89),y=o(h),b="zh-cn",v={},m=function(e){return e.displayName||e.name||("string"==typeof e?e:"Component")},g=function e(t){var n,o,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},c=(o=n=function(n){function o(){return a(this,o),s(this,n.apply(this,arguments))}return l(o,n),o.prototype._getInstance=function(e){e&&(this.refs=e.refs,this._instance=e)},o.prototype.getInstance=function(){return this._instance},o.prototype.render=function(){var n=this.props,a=n.language,s=n.locale,l=void 0===s?{}:s,c=i(n,["language","locale"]),p=void 0,d=void 0,h=void 0,b=void 0;return a||(a=e.get()),p=o.LOCALE&&(o.LOCALE[a]||o.LOCALE["en-us"]),d=m(t),h=v[d]?v[d]:{},b=r.deepMerge?(0,y.default)({},p,h,l):u({},p,h,l),c.ref=this._getInstance.bind(this),f.default.createElement(t,u({locale:b,language:a},c))},o}(f.default.Component),n.propTypes={language:d.default.string,locale:d.default.object},o);return c.displayName="LocaleProvider",e.init(c),c.displayName="LocaleProvider("+m(t)+")",c};g.init=function(e){e.LOCALE=e.LOCALE||{}},g.set=function(e){b=e},g.get=function(){return b},g.setComponents=function(e){v=u({},v,e)},t.default=g,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}function i(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function a(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n={};for(var o in e)t.indexOf(o)>=0||Object.prototype.hasOwnProperty.call(e,o)&&(n[o]=e[o]);return n}function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function u(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function c(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):i(e,t))}function f(e,t,n){var o=void 0;return e[t]?(o=[].concat(r(e[t])),o.push(n)):o=[n],o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var p,d,h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},y=n(0),b=o(y),v=n(4),m=o(v),g=n(1),O=o(g),x=n(2),C=o(x),w=n(3),_=n(5),E=n(6),P=o(E),k=n(28),j=o(k),S=n(13),N=o(S),T=N.default,M=(d=p=function(e){function t(n){l(this,t);var o=u(this,e.call(this,n));["onDocumentClick","onSubMenuClick","onSubMenuMouseEnter","onSubMenuMouseLeave","onContentMouseEnter","onContentMouseLeave","onKeyDown"].forEach(function(e){o[e]=o[e].bind(o)});var r=o.getRoot();if(!r)throw new Error("SubMenu should use under Menu.");return o.root=r,o.Menu=r.constructor,o.MenuItem=r.constructor.Item,o}return c(t,e),t.prototype.getChildContext=function(){return{parentIndex:f(this.context,"parentIndex",this.props.index),parentLabel:f(this.context,"parentLabel",this.props.label||this.props.children)}},t.prototype.normalizeVisible=function(){return"visible"in this.props?this.props.visible:this.props.openKeys.indexOf(this.props.index)>-1},t.prototype.render=function(){var e,t=this,n=this.props,o=n.className,r=n.label,i=n.animation,l=n.disabled,u=n.children,c=n.indentSize,f=n.mode,p=n.triggerType,d=n.selectable,y=n.align,v=n.index,m=n.hasSelectedIcon,g=n.selected,O=s(n,["className","label","animation","disabled","children","indentSize","mode","triggerType","selectable","align","index","hasSelectedIcon","selected"]),x=this.getPrefix(),w=this.normalizeVisible(),E=(0,C.default)((e={},a(e,x+"menu-submenu-item","inline"===f),a(e,x+"menu-submenu-item-popup","popup"===f),a(e,"opened",w),a(e,y,y),a(e,"disabled",l),a(e,o,o),e)),k=this.Menu,S=this.MenuItem,N=b.default.createElement(k,null),T=void 0,M=void 0,D=void 0;if(T="inline"===f?b.default.createElement(P.default,{type:"arrow-down",className:w?"opened":"",size:"xs"}):b.default.createElement(P.default,{type:"arrow-right",size:"xs"}),"click"===p?M={onClick:function(e){t.onSubMenuClick(e),t.props.onClick(e)}}:(M={onMouseEnter:this.onSubMenuMouseEnter,onMouseLeave:this.onSubMenuMouseLeave,onClick:function(e){e&&e.stopPropagation(),d&&t.root.onItemClick(e,v,"click",t),t.props.onClick(e)}},D={onMouseEnter:this.onContentMouseEnter,onMouseLeave:this.onContentMouseLeave}),N=b.default.cloneElement(N,h({mode:f},O,D,{indentSize:"inline"===f?c+N.props.indentSize:c,ref:"content",children:u,hasSubMenu:!0,parent:this})),i){var K=function(e,t){var n=void 0,o=function(){[i.in,i.in+"-active",i.out,i.out+"-active"].forEach(function(t){_.classList.removeClass(e,t)}),_.style.set(e,"height",null),clearTimeout(n),t()};n=setTimeout(o,250)},L=function(e,t){_.classList.addClass(e,"out-screen"),_.classList.removeClass(e,"hide");var n=e.offsetHeight+"px";_.classList.addClass(e,i.in),_.classList.removeClass(e,"out-screen"),setTimeout(function(){_.classList.addClass(e,i.in+"-active"),_.style.set(e,"height",n)},1),K(e,t)},A=function(e,t){var n=e.offsetHeight+"px";_.style.set(e,"height",n),_.classList.addClass(e,i.out),setTimeout(function(){_.classList.addClass(e,i.out+"-active"),_.style.set(e,"height",0)},1),K(e,t)},I=void 0;I="inline"===f?{enter:L,leave:A,appear:L}:{enter:i.in,leave:i.out,appear:i.in},"popup"===f&&(N=b.default.createElement("div",{className:x+"menu-wrapper"},N)),N=b.default.createElement(j.default,{animationAppear:!1,animation:I,useTransition:!0},w?N:null)}else N=b.default.cloneElement(N,{style:{display:w?"":"none"}});if(d&&"click"===p)return T=b.default.cloneElement(T,M),b.default.createElement(S,h({},O,{index:v,hasSelectedIcon:m,selected:g,className:E,"aria-haspopup":!0,parent:this,onKeyDown:this.onKeyDown,indentSize:c,needIndent:!1,label:r}),b.default.createElement("div",{className:x+"menu-submenu-title",style:{paddingLeft:c}},r,T),N);void 0===g&&(g=this.root.state.selectedKeys.indexOf(v)>-1);var V=m&&d?b.default.createElement(j.default,{animation:{appear:"zoomIn",enter:"zoomIn",leave:"zoomOut"}},g?b.default.createElement(P.default,{type:"select",className:x+"menu-icon-select",size:"xs",style:{left:(c||20)-16+"px"}}):null):null;return b.default.createElement("li",{className:E,"aria-haspopup":!0,onKeyDown:this.onKeyDown},b.default.createElement("div",h({className:x+"menu-submenu-title"},M,{style:{paddingLeft:c}}),r,T),V,N)},t.prototype.componentDidMount=function(){"popup"===this.props.mode&&_.events.on(document,"click",this.onDocumentClick)},t.prototype.componentWillUnmount=function(){"popup"===this.props.mode&&_.events.off(document,"click",this.onDocumentClick)},t.prototype.onDocumentClick=function(e){var t=(0,v.findDOMNode)(this.root),n=e.target;t&&t.contains(n)||this.onVisibleChange(!1,"fromDoc")},t.prototype.onSubMenuClick=function(e,t){var n=!this.normalizeVisible();this.onVisibleChange(n),t&&t.stopPropagation?t.stopPropagation():e.stopPropagation()},t.prototype.onSubMenuMouseEnter=function(e,t){var n=this;this.onContentMouseEnter(),this._subMenuEnterTimeout=setTimeout(function(){n.onVisibleChange(!0,t)},150)},t.prototype.onSubMenuMouseLeave=function(e,t){var n=this;this._subMenuEnterTimeout&&clearTimeout(this._subMenuEnterTimeout),this._subMenuTimeout=setTimeout(function(){n.onVisibleChange(!1,t)},150)},t.prototype.onContentMouseEnter=function(){this._subMenuTimeout&&clearTimeout(this._subMenuTimeout)},t.prototype.onContentMouseLeave=function(e){this._subMenuEnterTimeout&&clearTimeout(this._subMenuEnterTimeout),this.onSubMenuMouseLeave(e,"fromContent")},t.prototype.onVisibleChange=function(e,n){var o=this;if("fromDoc"===n)this.root.onOpen(this.props.index,e);else{var r=this.getParentByType(t).map(function(e){return e.props.index||e.key}),i=[this.props.index];e||this._openByKeyBoard||"fromContent"!==n||(i=i.concat(r)),i.forEach(function(t){o.root.onOpen(t,e)}),this._openByKeyBoard=!1}},t.prototype.onKeyDown=function(e){e.keyCode!==w.keyCode.ENTER&&e.keyCode!==w.keyCode.SPACE||this.onSubMenuClick(e)},t.prototype.getContentNode=function(){return m.default.findDOMNode(this.refs.content)},t}(T),p._menuItem=!0,p._subMenu=!0,p.propTypes={prefix:O.default.string,className:O.default.string,style:O.default.object,label:O.default.any,visible:O.default.bool,mode:O.default.oneOf(["inline","popup"]),triggerType:O.default.oneOf(["click","hover"]),selectable:O.default.bool,align:O.default.oneOf(["outside","follow"]),onClick:O.default.func,hasSelectedIcon:O.default.bool},p.defaultProps={label:"sub-item",animation:{in:"slide-down",out:"slide-up"},mode:"inline",triggerType:"click",selectable:!1,align:"follow",prefix:"next-",onClick:function(){},hasSelectedIcon:!0},p.contextTypes={parentIndex:O.default.array,parentLabel:O.default.array,prefix:O.default.string},p.childContextTypes={parentIndex:O.default.array,parentLabel:O.default.array},d);M.displayName="SubMenu",t.default=M,e.exports=t.default},function(e,t,n){"use strict";function o(e){return e&&e.__esModule?e:{default:e}}function r(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var r=n[o],i=Object.getOwnPropertyDescriptor(t,r);i&&i.configurable&&void 0===e[r]&&Object.defineProperty(e,r,i)}return e}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):r(e,t))}Object.defineProperty(t,"__esModule",{value:!0});var l=n(0),u=o(l),c=n(1),f=(o(c),n(2)),p=o(f),d=n(3),h=d.func.makeChain,y=function(e){function t(n){i(this,t);var o=a(this,e.call(this,n));return o.state={},["_onUIMouseEnter","_onUIMouseLeave","_onUIFocus","_onUIBlur"].forEach(function(e){o[e]=o[e].bind(o)}),o}return s(t,e),t.prototype.getStateElement=function(e){var t=this.props,n=t.onMouseEnter,o=t.onMouseLeave,r=t.onFocus,i=t.onBlur;return u.default.cloneElement(e,{onMouseEnter:h(this._onUIMouseEnter,n),onMouseLeave:h(this._onUIMouseLeave,o),onFocus:h(this._onUIFocus,r),onBlur:h(this._onUIBlur,i)})},t.prototype.getStateClassName=functio