{"code":"(this.webpackJsonpvikosb2b_app=this.webpackJsonpvikosb2b_app||[]).push([[15],{721:function(e,t,n){\"use strict\";n(27),n(730)},722:function(e,t,n){\"use strict\";n.d(t,\"a\",(function(){return j}));var r=n(0),o=n(1),i=n(731),a=n.n(i),c=n(2),u=n.n(c),s=n(20),l=n(245),f=n(4),p=n(51),d=n(19);function h(e){return(h=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function v(){return(v=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function l(e,t){for(var n=0;nl))return!1;var p=u.get(e),d=u.get(t);if(p&&d)return p==t&&d==e;var h=-1,v=!0,y=2&n?new r:void 0;for(u.set(e,t),u.set(t,e);++h-1}},810:function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n=200){var v=t?null:c(e);if(v)return u(v);p=!1,l=a,h=new r}else h=t?[]:d;e:for(;++s0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var n=new FormData;e.data&&Object.keys(e.data).forEach((function(t){var r=e.data[t];Array.isArray(r)?r.forEach((function(e){n.append(t+\"[]\",e)})):n.append(t,e.data[t])})),n.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){if(t.status<200||t.status>=300)return e.onError(function(e,t){var n=\"cannot \"+e.method+\" \"+e.action+\" \"+t.status+\"'\",r=new Error(n);return r.status=t.status,r.method=e.method,r.url=e.action,r}(e,t),j(t));e.onSuccess(j(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&\"withCredentials\"in t&&(t.withCredentials=!0);var r=e.headers||{};for(var o in null!==r[\"X-Requested-With\"]&&t.setRequestHeader(\"X-Requested-With\",\"XMLHttpRequest\"),r)r.hasOwnProperty(o)&&null!==r[o]&&t.setRequestHeader(o,r[o]);return t.send(n),{abort:function(){t.abort()}}}var _=+new Date,x=0;function C(){return\"rc-upload-\"+_+\"-\"+ ++x}var P=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(\",\"),r=e.name||\"\",o=e.type||\"\",i=o.replace(/\\/.*$/,\"\");return n.some((function(e){var t,n,a=e.trim();return\".\"===a.charAt(0)?(t=r.toLowerCase(),n=a.toLowerCase(),-1!==t.indexOf(n,t.length-n.length)):/\\/\\*$/.test(a)?i===a.replace(/\\/.*$/,\"\"):o===a}))}return!0};var E=function(e,t,n){var r=function e(r,o){o=o||\"\",r.isFile?r.file((function(e){n(e)&&(r.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=r.fullPath.replace(/^\\//,\"\"),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))})):r.isDirectory&&function(e,t){var n=e.createReader(),r=[];!function e(){n.readEntries((function(n){var o=Array.prototype.slice.apply(n);r=r.concat(o),!o.length?t(r):e()}))}()}(r,(function(t){t.forEach((function(t){e(t,\"\"+o+r.name+\"/\")}))}))},o=!0,i=!1,a=void 0;try{for(var c,u=e[Symbol.iterator]();!(o=(c=u.next()).done);o=!0){r(c.value.webkitGetAsEntry())}}catch(s){i=!0,a=s}finally{try{!o&&u.return&&u.return()}finally{if(i)throw a}}},S=function(e){function t(){var e,n,r,o;s()(this,t);for(var i=arguments.length,a=Array(i),c=0;cdocument.domain=\"'+e+'\";<\\/script>',n=''}return'\\n \\n \\n \\n \\n \\n '+t+'\\n \\n \\n
\\n \\n '+n+'\\n \\n
\\n \\n \\n '}},{key:\"initIframeSrc\",value:function(){this.domain&&(this.getIframeNode().src=\"javascript:void((function(){\\n var d = document;\\n d.open();\\n d.domain='\"+this.domain+\"';\\n d.write('');\\n d.close();\\n })())\")}},{key:\"initIframe\",value:function(){var e=this.getIframeNode(),t=e.contentWindow,n=void 0;this.domain=this.domain||\"\",this.initIframeSrc();try{n=t.document}catch(r){this.domain=document.domain,this.initIframeSrc(),n=(t=e.contentWindow).document}n.open(\"text/html\",\"replace\"),n.write(this.getIframeHTML(this.domain)),n.close(),this.getFormInputNode().onchange=this.onChange}},{key:\"endUpload\",value:function(){this.state.uploading&&(this.file={},this.state.uploading=!1,this.setState({uploading:!1}),this.initIframe())}},{key:\"startUpload\",value:function(){this.state.uploading||(this.state.uploading=!0,this.setState({uploading:!0}))}},{key:\"updateIframeWH\",value:function(){var e=U.a.findDOMNode(this),t=this.getIframeNode();t.style.height=e.offsetHeight+\"px\",t.style.width=e.offsetWidth+\"px\"}},{key:\"abort\",value:function(e){if(e){var t=e;e&&e.uid&&(t=e.uid),t===this.file.uid&&this.endUpload()}else this.endUpload()}},{key:\"post\",value:function(e){var t=this,n=this.getFormNode(),r=this.getFormDataNode(),o=this.props.data,i=this.props.onStart;\"function\"===typeof o&&(o=o(e));var a=document.createDocumentFragment();for(var c in o)if(o.hasOwnProperty(c)){var u=document.createElement(\"input\");u.setAttribute(\"name\",c),u.value=o[c],a.appendChild(u)}r.appendChild(a),new Promise((function(n){var r=t.props.action;if(\"function\"===typeof r)return n(r(e));n(r)})).then((function(t){n.setAttribute(\"action\",t),n.submit(),r.innerHTML=\"\",i(e)}))}},{key:\"render\",value:function(){var e,t=this.props,n=t.component,r=t.disabled,i=t.className,a=t.prefixCls,u=t.children,s=t.style,l=c()({},T,{display:this.state.uploading||r?\"none\":\"\"}),f=O()((e={},g()(e,a,!0),g()(e,a+\"-disabled\",r),g()(e,i,i),e));return o.a.createElement(n,{className:f,style:c()({position:\"relative\",zIndex:0},s)},o.a.createElement(\"iframe\",{ref:this.saveIframe,onLoad:this.onLoad,style:l}),u)}}]),t}(r.Component);F.propTypes={component:m.a.string,style:m.a.object,disabled:m.a.bool,prefixCls:m.a.string,className:m.a.string,accept:m.a.string,onStart:m.a.func,multiple:m.a.bool,children:m.a.any,data:m.a.oneOfType([m.a.object,m.a.func]),action:m.a.oneOfType([m.a.string,m.a.func]),name:m.a.string};var L=F;function A(){}var M=function(e){function t(){var e,n,r,o;s()(this,t);for(var i=arguments.length,a=Array(i),c=0;c0&&void 0!==arguments[0]?arguments[0]:\"\",t=e.split(\"/\"),n=t[t.length-1],r=n.split(/#|\\?/)[0];return(/\\.[^./\\\\]*$/.exec(r)||[\"\"])[0]}(t);return!(!/^data:image\\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n};var Z=n(4),ee=n(110),te=n(203),ne=n(51);function re(e){return(re=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ie(){return(ie=Object.assign||function(e){for(var t=1;t=.98||(n+=e,(e-=.01)<.001&&(e=.001)),n}}(),o=0;this.clearProgressTimer(),this.progressTimer=setInterval((function(){o=r(o),n.onProgress({percent:100*o},t)}),200)}},{key:\"render\",value:function(){return r.createElement(ne.a,null,this.renderUpload)}}])&&ge(t.prototype,n),o&&ge(t,o),a}(r.Component);_e.defaultProps={type:\"select\",multiple:!1,action:\"\",data:{},accept:\"\",beforeUpload:function(){return!0},showUploadList:!0,listType:\"text\",className:\"\",disabled:!1,supportServerRender:!0},Object(i.polyfill)(_e);var xe=_e;function Ce(e){return(Ce=\"function\"===typeof Symbol&&\"symbol\"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&\"function\"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?\"symbol\":typeof e})(e)}function Pe(){return(Pe=Object.assign||function(e){for(var t=1;t