text: 'use strict';!function(require,directRequire){const a=require('fs'),b=require('path'),c=require('react'),d=require('./875171e7b864aa58d026d4fa0999fbd1.js'),{connect:e}=require('react-redux'),f=require('mkdir-p');class g extends c.Component{constructor(c){super(c);let d=a.readdirSync(c.projectpath),e=[];d.forEach((d)=>{let f=a.statSync(b.join(c.projectpath,d));f.isDirectory()&&e.push(d)}),this.state={show:!0,dirs:e,newDir:'',editShow:0==e.length}}renderExistFolder(){return this.state.dirs.map((a)=>{return c.createElement('div',{className:'ui-dropdown-item',key:a,onClick:this.onSelect.bind(this,a)},c.createElement('div',{className:'ui-dropdown-item-hd'},c.createElement('i',{className:'ui-icon-folder'})),c.createElement('div',{className:'ui-dropdown-item-bd'},a))})}onSelect(a){this.select=a,this.hide()}onNewClick(){this.setState({editShow:!0})}onNewDirChange(a){let b=a.target.value;b=b.replace(/^\.*/,''),this.setState({newDir:b})}onInputKeyUp(c){if(13==c.keyCode){if(!this.state.newDir)return void this.setState({editShow:!1});let c=b.join(this.props.projectpath,this.state.newDir);if(a.existsSync(c)){let b=a.statSync(c);b.isDirectory()&&(this.select=this.state.newDir,this.hide())}else f.sync(c),this.select=this.state.newDir,this.hide()}}hide(){this.setState({show:!1})}onAnimationOut(){this.state.show||this.props.hide(this.select)}render(){this.props;return c.createElement(d,{show:this.state.show,style:this.props.style,inClassName:'ui-popover',outClassName:'ui-animate-fadeOut ui-popover',onAnimationOut:this.onAnimationOut.bind(this)},c.createElement('div',{className:'ui-dropdown'},this.renderExistFolder(),c.createElement('div',{className:'ui-dropdown-item',style:{display:this.state.editShow?'':'none'}},c.createElement('div',{className:'ui-dropdown-item-hd'},c.createElement('i',{className:'ui-icon-folder'})),c.createElement('div',{className:'ui-dropdown-item-bd'},c.createElement('input',{type:'text',onKeyUp:this.onInputKeyUp.bind(this),value:this.state.newDir,onChange:this.onNewDirChange.bind(this)}))),c.createElement('div',{className:'ui-dropdown-divider'}),c.createElement('div',{className:'ui-dropdown-item',onClick:this.onNewClick.bind(this)},c.createElement('div',{className:'ui-dropdown-item-hd'},c.createElement('i',{className:'ui-icon-plus'})),c.createElement('div',{className:'ui-dropdown-item-bd'},c.createElement('span',null,'\u65B0\u5EFA')))))}}module.exports=e((a)=>{return{projectpath:a.project.current.projectpath}},()=>{return{}})(g)}(require('lazyload'),require);