forgeplus/public/react/build/static/js/21.6156be56.chunk.js

1 line
30 KiB
JavaScript

(this.webpackJsonp=this.webpackJsonp||[]).push([[21],{"+QRC":function(e,t,n){"use strict";var r=n("E9nw"),o={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,i,a,c,l,s,u=!1;t||(t={}),n=t.debug||!1;try{if(a=r(),c=document.createRange(),l=document.getSelection(),(s=document.createElement("span")).textContent=e,s.style.all="unset",s.style.position="fixed",s.style.top=0,s.style.clip="rect(0, 0, 0, 0)",s.style.whiteSpace="pre",s.style.webkitUserSelect="text",s.style.MozUserSelect="text",s.style.msUserSelect="text",s.style.userSelect="text",s.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var i=o[t.format]||o.default;window.clipboardData.setData(i,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(s),c.selectNodeContents(s),l.addRange(c),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");u=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),u=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),i=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(i,e)}}finally{l&&("function"==typeof l.removeRange?l.removeRange(c):l.removeAllRanges()),s&&document.body.removeChild(s),a()}return u}},E9nw:function(e,t){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},HdAM:function(e,t,n){},NJEC:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("VCL8"),i=n("3S7+"),a=n("CtXQ"),c=n("2/Rp"),l=n("YMnH"),s=n("ZvpZ"),u=n("H84U");function f(e){return(f="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 p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return(d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v(e);if(t){var o=v(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return m(this,n)}}function m(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?h(e):t}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},O=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&d(e,t)}(f,e);var t,n,o,a=b(f);function f(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,f),(t=a.call(this,e)).onConfirm=function(e){t.setVisible(!1,e);var n=t.props.onConfirm;n&&n.call(h(t),e)},t.onCancel=function(e){t.setVisible(!1,e);var n=t.props.onCancel;n&&n.call(h(t),e)},t.onVisibleChange=function(e){t.props.disabled||t.setVisible(e)},t.saveTooltip=function(e){t.tooltip=e},t.renderOverlay=function(e,n){var o=t.props,i=o.okButtonProps,a=o.cancelButtonProps,l=o.title,s=o.cancelText,u=o.okText,f=o.okType,y=o.icon;return r.createElement("div",null,r.createElement("div",{className:"".concat(e,"-inner-content")},r.createElement("div",{className:"".concat(e,"-message")},y,r.createElement("div",{className:"".concat(e,"-message-title")},l)),r.createElement("div",{className:"".concat(e,"-buttons")},r.createElement(c.default,p({onClick:t.onCancel,size:"small"},a),s||n.cancelText),r.createElement(c.default,p({onClick:t.onConfirm,type:f,size:"small"},i),u||n.okText))))},t.renderConfirm=function(e){var n=e.getPrefixCls,o=t.props,a=o.prefixCls,c=o.placement,u=g(o,["prefixCls","placement"]),f=n("popover",a),y=r.createElement(l.a,{componentName:"Popconfirm",defaultLocale:s.a.Popconfirm},(function(e){return t.renderOverlay(f,e)}));return r.createElement(i.default,p({},u,{prefixCls:f,placement:c,onVisibleChange:t.onVisibleChange,visible:t.state.visible,overlay:y,ref:t.saveTooltip}))},t.state={visible:e.visible},t}return t=f,o=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:"defaultVisible"in e?{visible:e.defaultVisible}:null}}],(n=[{key:"getPopupDomNode",value:function(){return this.tooltip.getPopupDomNode()}},{key:"setVisible",value:function(e,t){var n=this.props;"visible"in n||this.setState({visible:e});var r=n.onVisibleChange;r&&r(e,t)}},{key:"render",value:function(){return r.createElement(u.a,null,this.renderConfirm)}}])&&y(t.prototype,n),o&&y(t,o),f}(r.Component);O.defaultProps={transitionName:"zoom-big",placement:"top",trigger:"click",okType:"primary",icon:r.createElement(a.default,{type:"exclamation-circle",theme:"filled"}),disabled:!1},Object(o.polyfill)(O),t.default=O},"O+5t":function(e,t,n){"use strict";n.r(t);n("SchZ"),n("HdAM"),n("TfFZ"),n("1vPl")},R3zJ:function(e,t,n){"use strict";n.d(t,"b",(function(){return o}));var r=function(e){if("undefined"!=typeof window&&window.document&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1},o=r(["flex","webkitFlex","Flex","msFlex"]);t.a=r},gDlH:function(e,t,n){"use strict";var r=n("q1tI"),o=n("4IlW");function i(e){return(i="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 a(){return(a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function s(e,t){return(s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function u(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p(e);if(t){var o=p(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return f(this,n)}}function f(e,t){return!t||"object"!==i(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function p(e){return(p=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var y=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},d={border:0,background:"transparent",padding:0,lineHeight:"inherit",display:"inline-block"},b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(p,e);var t,n,i,f=u(p);function p(){var e;return c(this,p),(e=f.apply(this,arguments)).onKeyDown=function(e){e.keyCode===o.a.ENTER&&e.preventDefault()},e.onKeyUp=function(t){var n=t.keyCode,r=e.props.onClick;n===o.a.ENTER&&r&&r()},e.setRef=function(t){e.div=t},e}return t=p,(n=[{key:"focus",value:function(){this.div&&this.div.focus()}},{key:"blur",value:function(){this.div&&this.div.blur()}},{key:"render",value:function(){var e=this.props,t=e.style,n=e.noStyle,o=y(e,["style","noStyle"]);return r.createElement("div",a({role:"button",tabIndex:0,ref:this.setRef},o,{onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,style:a(a({},n?null:d),t)}))}}])&&l(t.prototype,n),i&&l(t,i),p}(r.Component);t.a=b},k994:function(e,t,n){"use strict";n.r(t);n("SchZ"),n("Aosp"),n("L/Qf")},wFql:function(e,t,n){"use strict";n.r(t);var r=n("q1tI"),o=n("TSYQ"),i=n.n(o),a=n("H84U"),c=n("6CfX");function l(e){return(l="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 s(e,t){"function"==typeof e?e(t):"object"===l(e)&&e&&"current"in e&&(e.current=t)}function u(e){return(u="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 f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function y(e,t){return(y=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m(e);if(t){var o=m(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return b(this,n)}}function b(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function m(e){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function h(){return(h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var v,g=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},O=function(e,t){var n=e.prefixCls,o=e.component,l=void 0===o?"article":o,u=e.className,f=e["aria-label"],p=e.setContentRef,y=e.children,d=g(e,["prefixCls","component","className","aria-label","setContentRef","children"]),b=t;return p&&(Object(c.a)(!1,"Typography","`setContentRef` is deprecated. Please use `ref` instead."),b=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){s(t,e)}))}}(t,p)),r.createElement(a.a,null,(function(e){var t=e.getPrefixCls,o=l,a=t("typography",n);return r.createElement(o,h({className:i()(a,u),"aria-label":f,ref:b},d),y)}))};r.forwardRef?(v=r.forwardRef(O)).displayName="Typography":v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&y(e,t)}(a,e);var t,n,o,i=d(a);function a(){var e;return f(this,a),(e=i.apply(this,arguments)).state={},e}return t=a,(n=[{key:"render",value:function(){return r.createElement(O,this.props)}}])&&p(t.prototype,n),o&&p(t,o),a}(r.Component);var C=v,E=n("VCL8"),w=n("Zm9Q"),x=n("m+aA"),S=n("+QRC"),j=n.n(S),P=n("BGR+"),k=n("t23M"),R=n.n(k),T=n("wEI+"),N=n("YMnH"),D=n("gDlH"),_=n("oHiP"),A=n("R3zJ"),I=n("CtXQ"),U=n("3S7+"),H=n("4IlW"),K=n("whJP");function z(e){return(z="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(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function M(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function F(e,t){return(F=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Q(e);if(t){var o=Q(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return B(this,n)}}function B(e,t){return!t||"object"!==z(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Q(e){return(Q=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var W=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&F(e,t)}(c,e);var t,n,o,a=L(c);function c(){var e;return V(this,c),(e=a.apply(this,arguments)).inComposition=!1,e.state={current:""},e.onChange=function(t){var n=t.target.value;e.setState({current:n.replace(/[\r\n]/g,"")})},e.onCompositionStart=function(){e.inComposition=!0},e.onCompositionEnd=function(){e.inComposition=!1},e.onKeyDown=function(t){var n=t.keyCode;e.inComposition||(e.lastKeyCode=n)},e.onKeyUp=function(t){var n=t.keyCode,r=t.ctrlKey,o=t.altKey,i=t.metaKey,a=t.shiftKey,c=e.props.onCancel;e.lastKeyCode!==n||e.inComposition||r||o||i||a||(n===H.a.ENTER?e.confirmChange():n===H.a.ESC&&c())},e.onBlur=function(){e.confirmChange()},e.confirmChange=function(){var t=e.state.current;(0,e.props.onSave)(t.trim())},e.setTextarea=function(t){e.textarea=t},e}return t=c,o=[{key:"getDerivedStateFromProps",value:function(e,t){var n=t.prevValue,r=e.value,o={prevValue:r};return n!==r&&(o.current=r),o}}],(n=[{key:"componentDidMount",value:function(){if(this.textarea&&this.textarea.resizableTextArea){var e=this.textarea.resizableTextArea.textArea;e.focus();var t=e.value.length;e.setSelectionRange(t,t)}}},{key:"render",value:function(){var e=this.state.current,t=this.props,n=t.prefixCls,o=t["aria-label"],a=t.className,c=t.style;return r.createElement("div",{className:i()(n,"".concat(n,"-edit-content"),a),style:c},r.createElement(K.a,{ref:this.setTextarea,value:e,onChange:this.onChange,onKeyDown:this.onKeyDown,onKeyUp:this.onKeyUp,onCompositionStart:this.onCompositionStart,onCompositionEnd:this.onCompositionEnd,onBlur:this.onBlur,"aria-label":o,autoSize:!0}),r.createElement(I.default,{type:"enter",className:"".concat(n,"-edit-content-confirm")}))}}])&&M(t.prototype,n),o&&M(t,o),c}(r.Component);Object(E.polyfill)(W);var J,Z=W,q=n("i8i4"),X={padding:0,margin:0,display:"inline",lineHeight:"inherit"};function Y(e){if(!e)return 0;var t=e.match(/^\d*(\.\d*)?/);return t?Number(t[0]):0}var G=function(e,t,n,o,i){J||((J=document.createElement("div")).setAttribute("aria-hidden","true"),document.body.appendChild(J));var a,c=window.getComputedStyle(e),l=(a=c,Array.prototype.slice.apply(a).map((function(e){return"".concat(e,": ").concat(a.getPropertyValue(e),";")})).join("")),s=Y(c.lineHeight)*(t+1)+Y(c.paddingTop)+Y(c.paddingBottom);J.setAttribute("style",l),J.style.position="fixed",J.style.left="0",J.style.height="auto",J.style.minHeight="auto",J.style.maxHeight="auto",J.style.top="-999999px",J.style.zIndex="-1000",J.style.textOverflow="clip",J.style.whiteSpace="normal",J.style.webkitLineClamp="none";var u,f,p=(u=Object(w.a)(n),f=[],u.forEach((function(e){var t=f[f.length-1];"string"==typeof e&&"string"==typeof t?f[f.length-1]+=e:f.push(e)})),f);function y(){return J.offsetHeight<s}if(Object(q.render)(r.createElement("div",{style:X},r.createElement("span",{style:X},p),r.createElement("span",{style:X},o)),J),y())return Object(q.unmountComponentAtNode)(J),{content:n,text:J.innerHTML,ellipsis:!1};var d=Array.prototype.slice.apply(J.childNodes[0].childNodes[0].cloneNode(!0).childNodes).filter((function(e){return 8!==e.nodeType})),b=Array.prototype.slice.apply(J.childNodes[0].childNodes[1].cloneNode(!0).childNodes);Object(q.unmountComponentAtNode)(J);var m=[];J.innerHTML="";var h=document.createElement("span");J.appendChild(h);var v=document.createTextNode(i);function g(e){h.insertBefore(e,v)}function O(e,t){var n=e.nodeType;if(1===n)return g(e),y()?{finished:!1,reactNode:p[t]}:(h.removeChild(e),{finished:!0,reactNode:null});if(3===n){var r=e.textContent||"",o=document.createTextNode(r);return g(o),function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n.length,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,a=Math.floor((r+o)/2),c=n.slice(0,a);if(t.textContent=c,r>=o-1)for(var l=o;l>=r;l-=1){var s=n.slice(0,l);if(t.textContent=s,y())return l===n.length?{finished:!1,reactNode:n}:{finished:!0,reactNode:s}}return y()?e(t,n,a,o,a):e(t,n,r,a,i)}(o,r)}return{finished:!1,reactNode:null}}return h.appendChild(v),b.forEach((function(e){J.appendChild(e)})),d.some((function(e,t){var n=O(e,t),r=n.finished,o=n.reactNode;return o&&m.push(o),r})),{content:m,text:J.innerHTML,ellipsis:!0}};function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function ee(e){return function(e){if(Array.isArray(e))return te(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ne(e){return(ne="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 re(){return(re=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function oe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ie(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function ae(e,t){return(ae=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ce(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se(e);if(t){var o=se(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return le(this,n)}}function le(e,t){return!t||"object"!==ne(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function se(e){return(se=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var ue=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},fe=Object(A.a)("webkitLineClamp"),pe=Object(A.a)("textOverflow");var ye=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&ae(e,t)}(l,e);var t,n,o,a=ce(l);function l(){var e;return oe(this,l),(e=a.apply(this,arguments)).state={edit:!1,copied:!1,ellipsisText:"",ellipsisContent:null,isEllipsis:!1,expanded:!1,clientRendered:!1},e.onExpandClick=function(){var t=e.getEllipsis().onExpand;e.setState({expanded:!0}),t&&t()},e.onEditClick=function(){e.triggerEdit(!0)},e.onEditChange=function(t){var n=e.getEditable().onChange;n&&n(t),e.triggerEdit(!1)},e.onEditCancel=function(){e.triggerEdit(!1)},e.onCopyClick=function(){var t=e.props,n=t.children,r=t.copyable,o=re({},"object"===ne(r)?r:null);void 0===o.text&&(o.text=String(n)),j()(o.text||""),e.setState({copied:!0},(function(){o.onCopy&&o.onCopy(),e.copyId=window.setTimeout((function(){e.setState({copied:!1})}),3e3)}))},e.setContentRef=function(t){e.content=t},e.setEditRef=function(t){e.editIcon=t},e.triggerEdit=function(t){var n=e.getEditable().onStart;t&&n&&n(),e.setState({edit:t},(function(){!t&&e.editIcon&&e.editIcon.focus()}))},e.resizeOnNextFrame=function(){_.a.cancel(e.rafId),e.rafId=Object(_.a)((function(){e.syncEllipsis()}))},e}return t=l,o=[{key:"getDerivedStateFromProps",value:function(e){var t=e.children,n=e.editable;return Object(c.a)(!n||"string"==typeof t,"Typography","When `editable` is enabled, the `children` should use string."),{}}}],(n=[{key:"componentDidMount",value:function(){this.setState({clientRendered:!0}),this.resizeOnNextFrame()}},{key:"componentDidUpdate",value:function(e){var t=this.props.children,n=this.getEllipsis(),r=this.getEllipsis(e);t===e.children&&n.rows===r.rows||this.resizeOnNextFrame()}},{key:"componentWillUnmount",value:function(){window.clearTimeout(this.copyId),_.a.cancel(this.rafId)}},{key:"getEditable",value:function(e){var t=this.state.edit,n=(e||this.props).editable;return n?re({editing:t},"object"===ne(n)?n:null):{editing:t}}},{key:"getEllipsis",value:function(e){var t=(e||this.props).ellipsis;return t?re({rows:1,expandable:!1},"object"===ne(t)?t:null):{}}},{key:"canUseCSSEllipsis",value:function(){var e=this.state.clientRendered,t=this.props,n=t.editable,r=t.copyable,o=this.getEllipsis(),i=o.rows,a=o.expandable;return!(n||r||a||!e)&&(1===i?pe:fe)}},{key:"syncEllipsis",value:function(){var e=this.state,t=e.ellipsisText,n=e.isEllipsis,r=e.expanded,o=this.getEllipsis().rows,i=this.props.children;if(o&&!(o<0)&&this.content&&!r&&!this.canUseCSSEllipsis()){Object(c.a)(Object(w.a)(i).every((function(e){return"string"==typeof e})),"Typography","`ellipsis` should use string as children only.");var a=G(Object(x.a)(this.content),o,i,this.renderOperations(!0),"..."),l=a.content,s=a.text,u=a.ellipsis;t===s&&n===u||this.setState({ellipsisText:s,ellipsisContent:l,isEllipsis:u})}}},{key:"renderExpand",value:function(e){var t=this.getEllipsis().expandable,n=this.props.prefixCls,o=this.state,i=o.expanded,a=o.isEllipsis;return t&&(e||!i&&a)?r.createElement("a",{key:"expand",className:"".concat(n,"-expand"),onClick:this.onExpandClick,"aria-label":this.expandStr},this.expandStr):null}},{key:"renderEdit",value:function(){var e=this.props,t=e.editable,n=e.prefixCls;if(t)return r.createElement(U.default,{key:"edit",title:this.editStr},r.createElement(D.a,{ref:this.setEditRef,className:"".concat(n,"-edit"),onClick:this.onEditClick,"aria-label":this.editStr},r.createElement(I.default,{role:"button",type:"edit"})))}},{key:"renderCopy",value:function(){var e=this.state.copied,t=this.props,n=t.copyable,o=t.prefixCls;if(n){var a=e?this.copiedStr:this.copyStr;return r.createElement(U.default,{key:"copy",title:a},r.createElement(D.a,{className:i()("".concat(o,"-copy"),e&&"".concat(o,"-copy-success")),onClick:this.onCopyClick,"aria-label":a},r.createElement(I.default,{role:"button",type:e?"check":"copy"})))}}},{key:"renderEditInput",value:function(){var e=this.props,t=e.children,n=e.prefixCls,o=e.className,i=e.style;return r.createElement(Z,{value:"string"==typeof t?t:"",onSave:this.onEditChange,onCancel:this.onEditCancel,prefixCls:n,className:o,style:i})}},{key:"renderOperations",value:function(e){return[this.renderExpand(e),this.renderEdit(),this.renderCopy()].filter((function(e){return e}))}},{key:"renderContent",value:function(){var e=this,t=this.state,n=t.ellipsisContent,o=t.isEllipsis,a=t.expanded,c=this.props,l=c.component,s=c.children,u=c.className,f=c.prefixCls,p=c.type,y=c.disabled,d=c.style,b=ue(c,["component","children","className","prefixCls","type","disabled","style"]),m=this.getEllipsis().rows,h=Object(P.a)(b,["prefixCls","editable","copyable","ellipsis","mark","underline","mark","code","delete","underline","strong"].concat(ee(T.configConsumerProps))),v=this.canUseCSSEllipsis(),g=1===m&&v,O=m&&m>1&&v,E=s,w=null;return m&&o&&!a&&!v&&(w=String(s),E=r.createElement("span",{title:String(s),"aria-hidden":"true"},n,"...")),E=function(e,t){var n=e.mark,o=e.code,i=e.underline,a=e.delete,c=e.strong,l=t;function s(e,t){e&&(l=r.createElement(t,{},l))}return s(c,"strong"),s(i,"u"),s(a,"del"),s(o,"code"),s(n,"mark"),l}(this.props,E),r.createElement(N.a,{componentName:"Text"},(function(t){var n,o=t.edit,a=t.copy,c=t.copied,s=t.expand;return e.editStr=o,e.copyStr=a,e.copiedStr=c,e.expandStr=s,r.createElement(R.a,{onResize:e.resizeOnNextFrame,disabled:!m},r.createElement(C,re({className:i()(u,(n={},$(n,"".concat(f,"-").concat(p),p),$(n,"".concat(f,"-disabled"),y),$(n,"".concat(f,"-ellipsis"),m),$(n,"".concat(f,"-ellipsis-single-line"),g),$(n,"".concat(f,"-ellipsis-multiple-line"),O),n)),style:re(re({},d),{WebkitLineClamp:O?m:null}),component:l,ref:e.setContentRef,"aria-label":w},h),E,e.renderOperations()))}))}},{key:"render",value:function(){return this.getEditable().editing?this.renderEditInput():this.renderContent()}}])&&ie(t.prototype,n),o&&ie(t,o),l}(r.Component);ye.defaultProps={children:""},Object(E.polyfill)(ye);var de=Object(a.c)({prefixCls:"typography"})(ye);function be(){return(be=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function me(e){return(me="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)}var he=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},ve=function(e){var t=e.ellipsis,n=he(e,["ellipsis"]);return Object(c.a)("object"!==me(t),"Typography.Text","`ellipsis` only supports boolean value."),r.createElement(de,be({},n,{ellipsis:!!t,component:"span"}))},ge=n("2W6z"),Oe=n.n(ge),Ce=n("CWQg");function Ee(){return(Ee=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var we=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},xe=Object(Ce.b)(1,2,3,4),Se=function(e){var t,n=e.level,o=void 0===n?1:n,i=we(e,["level"]);return-1!==xe.indexOf(o)?t="h".concat(o):(Oe()(!1,"Title only accept `1 | 2 | 3 | 4` as `level` value."),t="h1"),r.createElement(de,Ee({},i,{component:t}))};function je(){return(je=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var Pe=function(e){return r.createElement(de,je({},e,{component:"div"}))},ke=C;ke.Text=ve,ke.Title=Se,ke.Paragraph=Pe;t.default=ke}}]);