diff --git a/show/src/bundle.js b/show/src/bundle.js index f804ea2..a0c402d 100644 --- a/show/src/bundle.js +++ b/show/src/bundle.js @@ -120,8 +120,8 @@ browserFullVersion:s.browser.version||i,browserMinorVersion:u.minor||i,browserNa e.exports=r}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t){e.setMode("composite"),e.update(o.set(e._latestEditorState,{inCompositionMode:!0})),e._onCompositionStart(t)}var o=n(1447);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=e._latestEditorState,r=n.getSelection();return r.isCollapsed()?void t.preventDefault():void e.setClipboard(o(e._latestEditorState))}var o=n(1507);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.getSelection();return t.isCollapsed()?null:o(e.getCurrentContent(),t)}var o=n(1436);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=e._latestEditorState,r=n.getSelection(),a=t.target,i=void 0;if(r.isCollapsed())return void t.preventDefault();a instanceof Node&&(i=s(l.getScrollParent(a)));var u=c(n);e.setClipboard(u),e.setMode("cut"),setTimeout(function(){e.restoreEditorDOM(i),e.exitCurrentMode(),e.update(o(n))},0)}function o(e){var t=a.removeRange(e.getCurrentContent(),e.getSelection(),"forward");return i.push(e,t,"remove-range")}var a=n(1429),i=n(1447),l=n(1485),c=n(1507),s=n(1489);e.exports=r},function(e,t){"use strict";function n(e,t){e._internalDrag=!1,e.setMode("drag"),t.preventDefault()}e.exports=n},function(e,t){"use strict";function n(e){e._internalDrag=!0,e.setMode("drag")}e.exports=n},function(e,t,n){"use strict";function r(e,t){var n=e._latestEditorState,r=n.getSelection();if(!r.getHasFocus()){var i=r.set("hasFocus",!0);e.props.onFocus&&e.props.onFocus(t),a.isBrowser("Chrome < 60.0.3081.0")?e.update(o.forceSelection(n,i)):e.update(o.acceptSelection(n,i))}}var o=n(1447),a=n(1475);e.exports=r},function(e,t,n){(function(t){"use strict";function r(e){void 0!==e._pendingStateFromBeforeInput&&(e.update(e._pendingStateFromBeforeInput),e._pendingStateFromBeforeInput=void 0);var n=t.getSelection(),r=n.anchorNode,c=n.isCollapsed,p=r.nodeType!==Node.TEXT_NODE,h=r.nodeType!==Node.TEXT_NODE&&r.nodeType!==Node.ELEMENT_NODE;if(o.draft_killswitch_allow_nontextnodes){if(p)return}else if(h)return;if(r.nodeType===Node.TEXT_NODE&&(null!==r.previousSibling||null!==r.nextSibling)){var m=r.parentNode;r.nodeValue=m.textContent;for(var b=m.firstChild;null!==b;b=b.nextSibling)b!==r&&m.removeChild(b)}var v=r.textContent,y=e._latestEditorState,g=u(s(r)),_=i.decode(g),w=_.blockKey,x=_.decoratorKey,k=_.leafKey,O=y.getBlockTree(w).getIn([x,"leaves",k]),M=O.start,S=O.end,C=y.getCurrentContent(),E=C.getBlockForKey(w),P=E.getText().slice(M,S);if(v.endsWith(f)&&(v=v.slice(0,-1)),v!==P){var j,T,L,z,D=y.getSelection(),N=D.merge({anchorOffset:M,focusOffset:S,isBackward:!1}),H=E.getEntityAt(M),A=H&&C.getEntity(H),V=A&&A.getMutability(),I="MUTABLE"===V,R=I?"spellcheck-change":"apply-entity",F=a.replaceText(C,N,v,E.getInlineStyleAt(M),I?E.getEntityAt(M):null);if(d)j=n.anchorOffset,T=n.focusOffset,L=M+Math.min(j,T),z=L+Math.abs(j-T),j=L,T=z;else{var Y=v.length-P.length;L=D.getStartOffset(),z=D.getEndOffset(),j=c?z+Y:L,T=z+Y}var W=F.merge({selectionBefore:C.getSelectionAfter(),selectionAfter:D.merge({anchorOffset:j,focusOffset:T})});e.update(l.push(y,W,R))}}var o=n(1427),a=n(1429),i=n(1483),l=n(1447),c=n(1475),s=n(1496),u=n(1458),d=c.isEngine("Gecko"),f="\n\n";e.exports=r}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t){switch(e){case"redo":return i.redo(t);case"delete":return g(t);case"delete-word":return h(t);case"backspace":return y(t);case"backspace-word":return p(t);case"backspace-to-start-of-line":return f(t);case"split-block":return m(t);case"transpose-characters":return _(t);case"move-selection-to-start-of-block":return v(t);case"move-selection-to-end-of-block":return b(t);case"secondary-cut":return s.cut(t);case"secondary-paste":return s.paste(t);default:return t}}function o(e,t){var n=t.which,o=e._latestEditorState;switch(n){case c.RETURN:if(t.preventDefault(),e.props.handleReturn&&d(e.props.handleReturn(t,o)))return;break;case c.ESC:return t.preventDefault(),void(e.props.onEscape&&e.props.onEscape(t));case c.TAB:return void(e.props.onTab&&e.props.onTab(t));case c.UP:return void(e.props.onUpArrow&&e.props.onUpArrow(t));case c.RIGHT:return void(e.props.onRightArrow&&e.props.onRightArrow(t));case c.DOWN:return void(e.props.onDownArrow&&e.props.onDownArrow(t));case c.LEFT:return void(e.props.onLeftArrow&&e.props.onLeftArrow(t));case c.SPACE:if(k&&x(t)){t.preventDefault();var l=a.replaceText(o.getCurrentContent(),o.getSelection()," ");return void e.update(i.push(o,l,"insert-characters"))}}var s=e.props.keyBindingFn(t);if(s){if("undo"===s)return void w(t,o,e.update);if(t.preventDefault(),!e.props.handleKeyCommand||!d(e.props.handleKeyCommand(s,o))){var u=r(s,o);u!==o&&e.update(u)}}}var a=n(1429),i=n(1447),l=n(1514),c=n(1466),s=n(1515),u=n(1475),d=n(1468),f=n(1516),p=n(1523),h=n(1526),m=n(1528),b=n(1529),v=n(1530),y=n(1531),g=n(1532),_=n(1533),w=n(1534),x=l.isOptionKeyCommand,k=u.isBrowser("Chrome");e.exports=o},function(e,t,n){"use strict";var r=n(1475),o=r.isPlatform("Mac OS X"),a={isCtrlKeyCommand:function(e){return!!e.ctrlKey&&!e.altKey},isOptionKeyCommand:function(e){return o&&e.altKey},hasCommandModifier:function(e){return o?!!e.metaKey&&!e.altKey:a.isCtrlKeyCommand(e)}};e.exports=a},function(e,t,n){"use strict";var r=n(1429),o=n(1447),a=n(1436),i=n(1458),l=null,c={cut:function(e){var t=e.getCurrentContent(),n=e.getSelection(),c=null;if(n.isCollapsed()){var s=n.getAnchorKey(),u=t.getBlockForKey(s).getLength();if(u===n.getAnchorOffset())return e;c=n.set("focusOffset",u)}else c=n;c=i(c),l=a(t,c);var d=r.removeRange(t,c,"forward");return d===t?e:o.push(e,d,"remove-range")},paste:function(e){if(!l)return e;var t=r.replaceWithFragment(e.getCurrentContent(),e.getSelection(),l);return o.push(e,t,"insert-fragment")}};e.exports=c},function(e,t,n){(function(t){"use strict";function r(e){var n=c(e,function(e){var n=e.getSelection();if(n.isCollapsed()&&0===n.getAnchorOffset())return l(e,1);var r=t.getSelection(),o=r.getRangeAt(0);return o=a(o),i(e,null,o.endContainer,o.endOffset,o.startContainer,o.startOffset).selectionState},"backward");return n===e.getCurrentContent()?e:o.push(e,n,"remove-range")}var o=n(1447),a=n(1517),i=n(1520),l=n(1521),c=n(1522);e.exports=r}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e){var t=getComputedStyle(e),n=document.createElement("div");n.style.fontFamily=t.fontFamily,n.style.fontSize=t.fontSize,n.style.fontStyle=t.fontStyle,n.style.fontWeight=t.fontWeight,n.style.lineHeight=t.lineHeight,n.style.position="absolute",n.textContent="M";var r=document.body;r?void 0:s(!1),r.appendChild(n);var o=n.getBoundingClientRect();return r.removeChild(n),o.height}function o(e,t){for(var n=1/0,r=1/0,o=-(1/0),a=-(1/0),i=0;i=0;h--)if(!(null!=p&&h>0&&l.isSurrogatePair(p,h-1))){if(e.setStart(d,h),!o(c(e),n))break;i=d,u=h}if(h===-1||0===d.childNodes.length)break;d=d.childNodes[h],f=a(d)}return e.setStart(i,u),e}var l=n(1518),c=n(1519),s=n(342);e.exports=i},function(e,t,n){"use strict";function r(e){return f<=e&&e<=m}function o(e,t){if(0<=t&&tr||n<=0)return"";var o=0;if(t>0){for(;t>0&&o=r)return""}else if(t<0){for(o=r;t<0&&00&&l0&&(n=r.childNodes.length)),0===n){var u=null;if(null!=i)u=i;else{var p=o(r);u=f(s(p))}return{key:u,offset:0}}var h=r.childNodes[n-1],m=null,b=null;if(s(h)){var v=a(h);m=f(s(v)),b=l(v)}else m=f(i),b=l(h);return{key:m,offset:b}}function l(e){var t=e.textContent;return"\n"===t?0:t.length}var c=n(1496),s=n(1497),u=n(1499),d=n(342),f=n(1458);e.exports=r},function(e,t){"use strict";function n(e,t){var n=e.getSelection(),r=e.getCurrentContent(),o=n.getStartKey(),a=n.getStartOffset(),i=o,l=0;if(t>a){var c=r.getKeyBefore(o);if(null==c)i=o;else{i=c;var s=r.getBlockForKey(c);l=s.getText().length}}else l=a-t;return n.merge({focusKey:i,focusOffset:l,isBackward:!0})}e.exports=n},function(e,t,n){"use strict";function r(e,t,n){var r=e.getSelection(),a=e.getCurrentContent(),i=r;if(r.isCollapsed()){if("forward"===n){if(e.isSelectionAtEndOfContent())return a}else if(e.isSelectionAtStartOfContent())return a;if(i=t(e),i===r)return a}return o.removeRange(a,i,n)}var o=n(1429);e.exports=r},function(e,t,n){"use strict";function r(e){var t=l(e,function(e){var t=e.getSelection(),n=t.getStartOffset();if(0===n)return i(e,1);var r=t.getStartKey(),a=e.getCurrentContent(),l=a.getBlockForKey(r).getText().slice(0,n),c=o.getBackward(l);return i(e,c.length||1)},"backward");return t===e.getCurrentContent()?e:a.push(e,t,"remove-range")}var o=n(1524),a=n(1447),i=n(1521),l=n(1522);e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=t?d.exec(e):s.exec(e);return n?n[0]:e}var o=n(1525),a=o.getPunctuation(),i="['‘’]",l="\\s|(?![_])"+a,c="^(?:"+l+")*(?:"+i+"|(?!"+l+").)*(?:(?!"+l+").)",s=new RegExp(c),u="(?:(?!"+l+").)(?:"+i+"|(?!"+l+").)*(?:"+l+")*$",d=new RegExp(u),f={getBackward:function(e){return r(e,!0)},getForward:function(e){return r(e,!1)}};e.exports=f},function(e,t){"use strict";var n="[.,+*?$|#{}()'\\^\\-\\[\\]\\\\\\/!@%\"~=<>_:;・、。〈-】〔-〟:-?!-/[-`{-・⸮؟٪-٬؛،؍﴾﴿᠁।၊။‐-‧‰-⁞¡-±´-¸º»¿]";e.exports={getPunctuation:function(){return n}}},function(e,t,n){"use strict";function r(e){var t=l(e,function(e){var t=e.getSelection(),n=t.getStartOffset(),r=t.getStartKey(),a=e.getCurrentContent(),l=a.getBlockForKey(r).getText().slice(n),c=o.getForward(l);return i(e,c.length||1)},"forward");return t===e.getCurrentContent()?e:a.push(e,t,"remove-range")}var o=n(1524),a=n(1447),i=n(1527),l=n(1522);e.exports=r},function(e,t){"use strict";function n(e,t){var n,r=e.getSelection(),o=r.getStartKey(),a=r.getStartOffset(),i=e.getCurrentContent(),l=o,c=i.getBlockForKey(o);return t>c.getText().length-a?(l=i.getKeyAfter(o),n=0):n=a+t,r.merge({focusKey:l,focusOffset:n})}e.exports=n},function(e,t,n){"use strict";function r(e){var t=o.splitBlock(e.getCurrentContent(),e.getSelection());return a.push(e,t,"split-block")}var o=n(1429),a=n(1447);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.getSelection(),n=t.getEndKey(),r=e.getCurrentContent(),a=r.getBlockForKey(n).getLength();return o.set(e,{selection:t.merge({anchorKey:n,anchorOffset:a,focusKey:n,focusOffset:a,isBackward:!1}),forceSelection:!0})}var o=n(1447);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.getSelection(),n=t.getStartKey();return o.set(e,{selection:t.merge({anchorKey:n,anchorOffset:0,focusKey:n,focusOffset:0,isBackward:!1}),forceSelection:!0})}var o=n(1447);e.exports=r},function(e,t,n){"use strict";function r(e){var t=l(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),l=n.getBlockForKey(r).getText()[o-1];return i(e,l?a.getUTF16Length(l,0):1)},"backward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return o.push(e,t.set("selectionBefore",n),n.isCollapsed()?"backspace-character":"remove-range")}var o=n(1447),a=n(1518),i=n(1521),l=n(1522);e.exports=r},function(e,t,n){"use strict";function r(e){var t=l(e,function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=t.getAnchorKey(),o=t.getAnchorOffset(),l=n.getBlockForKey(r).getText()[o];return i(e,l?a.getUTF16Length(l,0):1)},"forward");if(t===e.getCurrentContent())return e;var n=e.getSelection();return o.push(e,t.set("selectionBefore",n),n.isCollapsed()?"delete-character":"remove-range")}var o=n(1447),a=n(1518),i=n(1527),l=n(1522);e.exports=r},function(e,t,n){"use strict";function r(e){var t=e.getSelection();if(!t.isCollapsed())return e;var n=t.getAnchorOffset();if(0===n)return e;var r=t.getAnchorKey(),l=e.getCurrentContent(),c=l.getBlockForKey(r),s=c.getLength();if(s<=1)return e;var u,d;n===s?(u=t.set("anchorOffset",n-1),d=t):(u=t.set("focusOffset",n+1),d=u.set("anchorOffset",n+1));var f=i(l,u),p=o.removeRange(l,u,"backward"),h=p.getSelectionAfter(),m=h.getAnchorOffset()-1,b=h.merge({anchorOffset:m,focusOffset:m}),v=o.replaceWithFragment(p,b,f),y=a.push(e,v,"insert-fragment");return a.acceptSelection(y,d)}var o=n(1429),a=n(1447),i=n(1436);e.exports=r},function(e,t,n){"use strict";function r(e,t,n){var r=o.undo(t);if("spellcheck-change"===t.getLastChangeType()){var a=r.getCurrentContent();return void n(o.set(r,{nativelyRenderedContent:a}))}return e.preventDefault(),t.getNativelyRenderedContent()?(n(o.set(t,{nativelyRenderedContent:null})),void setTimeout(function(){n(r)},0)):void n(r)}var o=n(1447);e.exports=r},function(e,t,n){"use strict";function r(e,t){t.preventDefault();var n=new c(t.clipboardData);if(!n.isRichText()){var r=n.getFiles(),v=n.getText();if(r.length>0){if(e.props.handlePastedFiles&&m(e.props.handlePastedFiles(r)))return;return void h(r,function(t){if(t=t||v){var n=e._latestEditorState,r=b(t),o=l.create({style:n.getCurrentInlineStyle(),entity:p(n.getCurrentContent(),n.getSelection())}),a=f.getCurrentBlockType(n),c=u.processText(r,o,a),h=i.createFromArray(c),m=s.replaceWithFragment(n.getCurrentContent(),n.getSelection(),h);e.update(d.push(n,m,"insert-fragment"))}})}}var y=[],g=n.getText(),_=n.getHTML(),w=e._latestEditorState;if(!e.props.handlePastedText||!m(e.props.handlePastedText(g,_,w))){if(g&&(y=b(g)),!e.props.stripPastedStyles){var x=e.getClipboard();if(n.isRichText()&&x){if(_.indexOf(e.getEditorKey())!==-1||1===y.length&&1===x.size&&x.first().getText()===g)return void e.update(o(e._latestEditorState,x))}else if(x&&n.types.includes("com.apple.webarchive")&&!n.types.includes("text/html")&&a(y,x))return void e.update(o(e._latestEditorState,x));if(_){var k=u.processHTML(_,e.props.blockRenderMap);if(k){var O=k.contentBlocks,M=k.entityMap;if(O){var S=i.createFromArray(O);return void e.update(o(e._latestEditorState,S,M))}}}e.setClipboard(null)}if(y.length){var C=l.create({style:w.getCurrentInlineStyle(),entity:p(w.getCurrentContent(),w.getSelection())}),E=f.getCurrentBlockType(w),P=u.processText(y,C,E),j=i.createFromArray(P);e.update(o(e._latestEditorState,j))}}}function o(e,t,n){var r=s.replaceWithFragment(e.getCurrentContent(),e.getSelection(),t);return d.push(e,r.set("entityMap",n),"insert-fragment")}function a(e,t){return e.length===t.size&&t.valueSeq().every(function(t,n){return t.getText()===e[n]})}var i=n(1421),l=n(1423),c=n(1494),s=n(1429),u=n(1536),d=n(1447),f=n(1540),p=n(1467),h=n(1498),m=n(1468),b=n(1542);e.exports=r},function(e,t,n){"use strict";var r=n(334),o=r||function(e){for(var t=1;t=0?e.add("BOLD"):D.indexOf(t)>=0&&e.remove("BOLD"),"italic"===n?e.add("ITALIC"):"normal"===n&&e.remove("ITALIC"),"underline"===r&&e.add("UNDERLINE"),"line-through"===r&&e.add("STRIKETHROUGH"),"none"===r&&(e.remove("UNDERLINE"),e.remove("STRIKETHROUGH"))}).toOrderedSet()}return n},q=function(e,t,n){var r=e.text.slice(-1),o=t.text.slice(0,1);if("\r"!==r||"\r"!==o||n||(e.text=e.text.slice(0,-1),e.inlines.pop(),e.entities.pop(),e.blocks.pop()),"\r"===r){if(t.text===S||"\n"===t.text)return e;o!==S&&"\n"!==o||(t.text=t.text.slice(1),t.inlines.shift(),t.entities.shift())}return{text:e.text+t.text,inlines:e.inlines.concat(t.inlines),entities:e.entities.concat(t.entities),blocks:e.blocks.concat(t.blocks)}},G=function(e,t){return t.some(function(t){return e.indexOf("<"+t)!==-1})},J=function(e){e instanceof HTMLAnchorElement?void 0:_(!1);var t=e.protocol;return"http:"===t||"https:"===t||"mailto:"===t},X=function(e){var t=new Array(1);return e&&(t[0]=e),a({},R,{text:S,inlines:[O()],entities:t})},Z=function(){return a({},R,{text:"\n",inlines:[O()],entities:new Array(1)})},$=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a({},F,e)},Q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;return{text:"\r",inlines:[O()],entities:new Array(1),blocks:[$({parent:n,key:y(),type:e,depth:Math.max(0,Math.min(C,t))})]}},ee=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Object.keys(H).some(function(n){e.classList.contains(n)&&(t=H[n])}),t},te=function e(t,n,r,o,i,l,c,s,u,f){var p=I,h=n.nodeName.toLowerCase(),m=t,v="unstyled",y=!1,g=i&&K(i,o,s),_=a({},R),w=null,k=void 0;if("#text"===h){var O=n.textContent,M=O.trim();if(o&&""===M&&n.parentElement){var C=n.parentElement.nodeName.toLowerCase();if("ol"===C||"ul"===C)return{chunk:a({},R),entityMap:t}}return""===M&&"pre"!==i?{chunk:X(u),entityMap:t}:("pre"!==i&&(O=O.replace(P,S)),I=h,{chunk:{text:O,inlines:Array(O.length).fill(r),entities:Array(O.length).fill(u),blocks:[]},entityMap:t})}if(I=h,"br"===h)return"br"!==p||i&&"unstyled"!==g?{chunk:Z(),entityMap:t}:{chunk:Q("unstyled",c,f),entityMap:t};if("img"===h&&n instanceof HTMLImageElement&&n.attributes.getNamedItem("src")&&n.attributes.getNamedItem("src").value){var E=n,j={};V.forEach(function(e){var t=E.getAttribute(e);t&&(j[e]=t)}),n.textContent="📷",u=d.__create("IMAGE","MUTABLE",j||{})}r=U(h,n,r),"ul"!==h&&"ol"!==h||(o&&(c+=1),o=h),!x&&"li"===h&&n instanceof HTMLElement&&(c=ee(n,c));var T=K(h,o,s),L=o&&"li"===i&&"li"===h,z=(!i||x)&&l.indexOf(h)!==-1;(L||z)&&(_=Q(T,c,f),k=_.blocks[0].key,i=h,y=!x),L&&(v="ul"===o?"unordered-list-item":"ordered-list-item");var D=n.firstChild;null!=D&&(h=D.nodeName.toLowerCase());for(var N=null;D;){D instanceof HTMLAnchorElement&&D.href&&J(D)?!function(){var e=D,t={};A.forEach(function(n){var r=e.getAttribute(n);r&&(t[n]=r)}),t.url=new b(e.href).toString(),N=d.__create("LINK","MUTABLE",t||{})}():N=void 0;var H=e(m,D,r,o,i,l,c,s,N||u,x?k:null),F=H.chunk,Y=H.entityMap;w=F,m=Y,_=q(_,w,x);var W=D.nextSibling;!f&&W&&l.indexOf(h)>=0&&i&&(_=q(_,Z())),W&&(h=W.nodeName.toLowerCase()),D=W}return y&&(_=q(_,Q(v,c,f))),{chunk:_,entityMap:m}},ne=function(e,t,n,r){e=e.trim().replace(E,"").replace(j,S).replace(T,"").replace(L,"");var o=W(n),i=t(e);if(!i)return null;I=null;var l=G(e,o)?o:["div"],c=te(r,i,O(),"ul",null,l,-1,n),s=c.chunk,u=c.entityMap;return 0===s.text.indexOf("\r")&&(s={text:s.text.slice(1),inlines:s.inlines.slice(1),entities:s.entities.slice(1),blocks:s.blocks}),"\r"===s.text.slice(-1)&&(s.text=s.text.slice(0,-1),s.inlines=s.inlines.slice(0,-1),s.entities=s.entities.slice(0,-1),s.blocks.pop()),0===s.blocks.length&&s.blocks.push(a({},R,{type:"unstyled",depth:0})),s.text.split("\r").length===s.blocks.length+1&&s.blocks.unshift({type:"unstyled",depth:0}),{chunk:s,entityMap:u}},re=function(e){if(!e||!e.text||!Array.isArray(e.blocks))return null;var t={cacheRef:{},contentBlocks:[]},n=0,r=e.blocks,o=e.inlines,a=e.entities,i=x?s:c;return e.text.split("\r").reduce(function(e,t,c){t=w(t);var u=r[c],d=n+t.length,f=o.slice(n,d),p=a.slice(n,d),h=k(f.map(function(e,t){var n={style:e,entity:null};return p[t]&&(n.entity=p[t]),l.create(n)}));n=d+1;var m=u.depth,b=u.type,v=u.parent,g=u.key||y(),_=null;if(v){var x=e.cacheRef[v],O=e.contentBlocks[x];if(O.getChildKeys().isEmpty()&&O.getText()){var M=O.getCharacterList(),S=O.getText();_=y();var C=new s({key:_,text:S,characterList:M,parent:v,nextSibling:g});e.contentBlocks.push(C),O=O.withMutations(function(e){e.set("characterList",k()).set("text","").set("children",O.children.push(C.getKey()))})}e.contentBlocks[x]=O.set("children",O.children.push(g))}var E=new i({key:g,parent:v,type:b,depth:m,text:t,characterList:h,prevSibling:_||(0===c||r[c-1].parent!==v?null:r[c-1].key),nextSibling:c===r.length-1||r[c+1].parent!==v?null:r[c+1].key});return e.contentBlocks.push(E),e.cacheRef[E.key]=c,e},t).contentBlocks},oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:g,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:u,r=ne(e,t,n,d);if(null==r)return null;var o=r.chunk,a=r.entityMap,i=re(o);return{contentBlocks:i,entityMap:a}};e.exports=oe},function(e,t){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var r=function(){function e(t){n(this,e),this._uri=t}return e.prototype.toString=function(){return this._uri},e}();e.exports=r},function(e,t,n){"use strict";function r(e){var t,n=null;return!i&&document.implementation&&document.implementation.createHTMLDocument&&(t=document.implementation.createHTMLDocument("foo"),t.documentElement?void 0:a(!1),t.documentElement.innerHTML=e,n=t.getElementsByTagName("body")[0]),n}var o=n(1475),a=n(342),i=o.isBrowser("IE <= 9");e.exports=r},function(e,t,n){"use strict";var r=n(1429),o=n(1447),a=(n(1452),n(1541)),i=n(1458),l={currentBlockContainsLink:function(e){var t=e.getSelection(),n=e.getCurrentContent(),r=n.getEntityMap();return n.getBlockForKey(t.getAnchorKey()).getCharacterList().slice(t.getStartOffset(),t.getEndOffset()).some(function(e){var t=e.getEntity();return!!t&&"LINK"===r.__get(t).getType()})},getCurrentBlockType:function(e){var t=e.getSelection();return e.getCurrentContent().getBlockForKey(t.getStartKey()).getType()},getDataObjectForLinkURL:function(e){return{url:e.toString()}},handleKeyCommand:function(e,t){switch(t){case"bold":return l.toggleInlineStyle(e,"BOLD");case"italic":return l.toggleInlineStyle(e,"ITALIC");case"underline":return l.toggleInlineStyle(e,"UNDERLINE");case"code":return l.toggleCode(e);case"backspace":case"backspace-word":case"backspace-to-start-of-line":return l.onBackspace(e);case"delete":case"delete-word":case"delete-to-end-of-block":return l.onDelete(e);default:return null}},insertSoftNewline:function(e){var t=r.insertText(e.getCurrentContent(),e.getSelection(),"\n",e.getCurrentInlineStyle(),null),n=o.push(e,t,"insert-characters");return o.forceSelection(n,t.getSelectionAfter())},onBackspace:function(e){var t=e.getSelection();if(!t.isCollapsed()||t.getAnchorOffset()||t.getFocusOffset())return null;var n=e.getCurrentContent(),r=t.getStartKey(),a=n.getBlockBefore(r);if(a&&"atomic"===a.getType()){var i=n.getBlockMap().delete(a.getKey()),c=n.merge({blockMap:i,selectionAfter:t});if(c!==n)return o.push(e,c,"remove-range")}var s=l.tryToRemoveBlockStyle(e);return s?o.push(e,s,"change-block-type"):null},onDelete:function(e){var t=e.getSelection();if(!t.isCollapsed())return null;var n=e.getCurrentContent(),a=t.getStartKey(),i=n.getBlockForKey(a),l=i.getLength();if(t.getStartOffset()0&&i!==l)return null;var c=i.getType(),s=a.getBlockBefore(o);if("code-block"===c&&s&&"code-block"===s.getType()&&0!==s.getLength())return null;if("unstyled"!==c)return r.setBlockType(a,t,"unstyled")}return null}};e.exports=l},function(e,t){"use strict";function n(e,t,n,r){var o=t.getStartKey(),a=t.getEndKey(),i=e.getBlockMap(),l=i.toSeq().skipUntil(function(e,t){return t===o}).takeUntil(function(e,t){return t===a}).concat([[a,i.get(a)]]).map(function(e){var t=e.getDepth()+n;return t=Math.max(0,Math.min(t,r)),e.set("depth",t)});return i=i.merge(l),e.merge({blockMap:i,selectionBefore:t,selectionAfter:t})}e.exports=n},function(e,t){"use strict";function n(e){return e.split(r)}var r=/\r\n?|\n/g;e.exports=n},function(e,t,n){"use strict";function r(e){if(!e._blockSelectEvents&&e._latestEditorState===e.props.editorState){var t=e.props.editorState,n=a.findDOMNode(e.editorContainer);n?void 0:l(!1),n.firstChild instanceof HTMLElement?void 0:l(!1);var r=i(t,n.firstChild),c=r.selectionState;c!==t.getSelection()&&(t=r.needsRecovery?o.forceSelection(t,c):o.acceptSelection(t,c),e.update(t))}}var o=n(1447),a=n(364),i=n(1544),l=n(342);e.exports=r},function(e,t,n){(function(t){"use strict";function r(e,n){var r=t.getSelection();return 0===r.rangeCount?{selectionState:e.getSelection().set("hasFocus",!1),needsRecovery:!1}:o(e,n,r.anchorNode,r.anchorOffset,r.focusNode,r.focusOffset)}var o=n(1520);e.exports=r}).call(t,function(){return this}())},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(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 a(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):e.__proto__=t)}var i=n(332),l=n(1462),c=function(e){function t(){return r(this,t),o(this,e.apply(this,arguments))}return a(t,e),t.prototype.shouldComponentUpdate=function(e){ return this.props.text!==e.text||this.props.editorState.getSelection().getHasFocus()!==e.editorState.getSelection().getHasFocus()},t.prototype.render=function(){var e=this.props.editorState.getSelection().getHasFocus(),t=l({"public/DraftEditorPlaceholder/root":!0,"public/DraftEditorPlaceholder/hasFocus":e}),n={whiteSpace:"pre-wrap"};return i.createElement("div",{className:t},i.createElement("div",{className:l("public/DraftEditorPlaceholder/inner"),id:this.props.accessibilityID,style:n},this.props.text))},t}(i.Component);e.exports=c},function(e,t,n){"use strict";function r(e){return d&&e.altKey||m(e)}function o(e){return h(e)?e.shiftKey?"redo":"undo":null}function a(e){return f&&e.shiftKey?null:r(e)?"delete-word":"delete"}function i(e){return h(e)&&d?"backspace-to-start-of-line":r(e)?"backspace-word":"backspace"}function l(e){switch(e.keyCode){case 66:return h(e)?"bold":null;case 68:return m(e)?"delete":null;case 72:return m(e)?"backspace":null;case 73:return h(e)?"italic":null;case 74:return h(e)?"code":null;case 75:return!f&&m(e)?"secondary-cut":null;case 77:return m(e)?"split-block":null;case 79:return m(e)?"split-block":null;case 84:return d&&m(e)?"transpose-characters":null;case 85:return h(e)?"underline":null;case 87:return d&&m(e)?"backspace-word":null;case 89:return m(e)?f?"redo":"secondary-paste":null;case 90:return o(e)||null;case s.RETURN:return"split-block";case s.DELETE:return a(e);case s.BACKSPACE:return i(e);case s.LEFT:return p&&h(e)?"move-selection-to-start-of-block":null;case s.RIGHT:return p&&h(e)?"move-selection-to-end-of-block":null;default:return null}}var c=n(1514),s=n(1466),u=n(1475),d=u.isPlatform("Mac OS X"),f=u.isPlatform("Windows"),p=d&&u.isBrowser("Firefox < 29"),h=c.hasCommandModifier,m=c.isCtrlKeyCommand;e.exports=l},function(e,t,n){"use strict";var r=n(334),o=r||function(e){for(var t=1;t0;){var u=s.pop(),d=u.parentRef,f=d.getChildKeys(),p=f.indexOf(u.key),h=Array.isArray(u.children);if(!h){h?void 0:v(!1);break}var m=u.children.map(O),b=new i(o({},x(u,t),{parent:d.getKey(),children:g(m.map(function(e){return e.key})),prevSibling:0===p?null:f.get(p-1),nextSibling:p===f.size-1?null:f.get(p+1)}));n=n.set(b.getKey(),b),s=M(s,m,b)}return n},w())},C=function(e,t){return w(e.map(function(e){var n=new a(x(e,t));return[n.getKey(),n]}))},E=function(e,t){var n=Array.isArray(e.blocks[0].children),r=y&&!n?u.fromRawStateToRawTreeState(e).blocks:e.blocks;return y?S(r,t):C(n?u.fromRawTreeStateToRawState(e).blocks:r,t)},P=function(e){var t=e.entityMap,n={};return Object.keys(t).forEach(function(e){var r=t[e],o=r.type,a=r.mutability,i=r.data;n[e]=c.__create(o,a,i||{})}),n},j=function(e){Array.isArray(e.blocks)?void 0:v(!1);var t=P(e),n=E(e,t),r=n.isEmpty()?new f:f.createEmpty(n.first().getKey());return new l({blockMap:n,entityMap:t,selectionBefore:r,selectionAfter:r})};e.exports=j},function(e,t,n){"use strict";var r=n(334),o=r||function(e){for(var t=1;t0){var s=t[i-1];return s?void 0:a(!1),void s.children.push(c)}n.push(c)}),o({},e,{blocks:n})}};e.exports=s},function(e,t,n){"use strict";function r(e,t){var n=e.map(function(e,n){var r=t[n];return o.create({style:e,entity:r})});return i(n)}var o=n(1423),a=n(1422),i=a.List;e.exports=r},function(e,t,n){"use strict";function r(e,t){var n=Array(e.length).fill(null);return t&&t.forEach(function(t){for(var r=a(e,0,t.offset).length,o=r+a(e,t.offset,t.length).length,i=r;i1&&0===t[0].width){var l=t[1];n=l.top,r=l.right,a=l.bottom,i=l.left}else{var c=t[0];n=c.top,r=c.right,a=c.bottom,i=c.left}for(var s=1;s0&&void 0!==arguments[0]?arguments[0]:this.props;return Array.isArray(e.prefix)?e.prefix:[e.prefix]},t.prototype.render=function(){var e,t=this,n=this.props,r=n.prefixCls,o=n.style,i=n.tag,l=n.multiLines,c=n.editorKey,s=n.suggestionStyle,u=n.placeholder,d=n.defaultValue,f=n.className,h=n.notFoundContent,m=n.getSuggestionContainer,b=n.readOnly,_=n.disabled,w=n.placement,x=n.mode,k=this.state.suggestions,O=this.Suggestions,M=(0,v.default)(f,(e={},e[r+"-wrapper"]=!0,e.readonly=b,e.disabled=_,e.multilines=l,e)),S=this.controlledMode?{value:this.state.value}:{},C=d&&g.EditorState.createWithContent("string"==typeof d?g.ContentState.createFromText(d):d,this._decorator);return p.default.createElement("div",{className:M,style:o,ref:function(e){return t._wrapper=e}},p.default.createElement(y.EditorCore,(0,a.default)({ref:function(e){return t._editor=e},prefixCls:r,style:o,multiLines:l,editorKey:c,plugins:this.plugins,defaultValue:C,placeholder:u,onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onChange:this.onEditorChange},S,{readOnly:b||_}),p.default.createElement(O,{mode:i?"immutable":x,prefix:this.getPrefix(),prefixCls:r,style:s,placement:w,notFoundContent:h,suggestions:k,getSuggestionContainer:m?function(){return m(t._wrapper)}:null,onSearchChange:this.props.onSearchChange,onSelect:this.props.onSelect,noRedup:this.props.noRedup})))},t}(p.default.Component);O.propTypes={value:m.default.object,suggestions:m.default.array,prefix:m.default.oneOfType([m.default.string,m.default.arrayOf(m.default.string)]),prefixCls:m.default.string,tag:m.default.oneOfType([m.default.element,m.default.func]),style:m.default.object,className:m.default.string,onSearchChange:m.default.func,onChange:m.default.func,mode:m.default.string,multiLines:m.default.bool,suggestionStyle:m.default.object,placeholder:m.default.string,defaultValue:m.default.object,notFoundContent:m.default.any,position:m.default.string,onFocus:m.default.func,onBlur:m.default.func,onSelect:m.default.func,onKeyDown:m.default.func,getSuggestionContainer:m.default.func,noRedup:m.default.bool,mentionStyle:m.default.object,placement:m.default.string,editorKey:m.default.string},O.controlledMode=!1,O.defaultProps={prefixCls:"rc-editor-mention",prefix:"@",mode:"mutable",suggestions:[],multiLines:!1,className:"",suggestionStyle:{},notFoundContent:"无法找到",position:"absolute",placement:"bottom",mentionStyle:{}},t.default=O,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0,t.toEditorState=t.GetHTML=t.GetText=t.EditorCore=void 0;var o=n(1560),a=r(o),i=a.default.GetText,l=a.default.GetHTML,c=a.default.ToEditorState,s={EditorCore:a.default,GetText:i,GetHTML:l,toEditorState:c};t.EditorCore=a.default,t.GetText=i,t.GetHTML=l,t.toEditorState=c,t.default=s},function(e,t,n){(function(r,o){"use strict";function a(e){return e&&e.__esModule?e:{default:e}}function i(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 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):e.__proto__=t)}function s(){}t.__esModule=!0;var u=Object.assign||function(e){for(var t=1;t> 插件: [",t.name,"] 无效。插件或许已经过期。"),!1}).filter(function(e){return e}).toArray():[]},t.prototype.componentWillMount=function(){var e=this.initPlugins().concat([T]),t={},n={},r=(0,b.Map)(m.DefaultDraftBlockRenderMap),o=(0,b.List)([]),a=new m.CompositeDecorator(e.filter(function(e){return void 0!==e.decorators}).map(function(e){return e.decorators}).reduce(function(e,t){return e.concat(t)},[])),i=(0,b.List)(e.filter(function(e){return!!e.component&&"toolbar"!==e.name}));e.forEach(function(e){var a=e.styleMap,i=e.blockStyleMap,l=e.blockRenderMap,c=e.toHtml;if(a)for(var s in a)a.hasOwnProperty(s)&&(t[s]=a[s]);if(i)for(var u in i)i.hasOwnProperty(u)&&(n[u]=i[u],r=r.set(u,{element:null}));if(c&&(o=o.push(c)),l)for(var d in l)l.hasOwnProperty(d)&&(r=r.set(d,l[d]))}),L.set("customStyleMap",t),L.set("customBlockStyleMap",n),L.set("blockRenderMap",r),L.set("customStyleFn",this.customStyleFn.bind(this)),L.set("toHTMLList",o),this.setState({toolbarPlugins:i,compositeDecorator:a}),this.setEditorState(m.EditorState.set(this.state.editorState,{decorator:a}),!1,!1)},t.prototype.componentWillReceiveProps=function(e){if(this.forceUpdateImmediate&&this.cancelForceUpdateImmediate(),this.controlledMode){var t=e.value.getDecorator(),n=t?e.value:m.EditorState.set(e.value,{decorator:this.state.compositeDecorator});this.setState({editorState:n})}},t.prototype.componentWillUnmount=function(){this.cancelForceUpdateImmediate()},t.prototype.generatorDefaultValue=function(e){var t=this.getDefaultValue();return t?t:e},t.prototype.getStyleMap=function(){return L.get("customStyleMap")},t.prototype.setStyleMap=function(e){L.set("customStyleMap",e),this.render()},t.prototype.initPlugins=function(){var e=this,t=["focus","getEditorState","setEditorState","getStyleMap","setStyleMap"];return this.getPlugins().map(function(n){return t.forEach(function(t){n.callbacks.hasOwnProperty(t)&&(n.callbacks[t]=e[t].bind(e))}),n})},t.prototype.focusEditor=function(e){this.refs.editor.focus(e),this.props.readOnly&&this._focusDummy.focus(),this.props.onFocus&&this.props.onFocus(e)},t.prototype._focus=function(e){if(e&&e.nativeEvent&&e.nativeEvent.target&&(!document.activeElement||"true"!==document.activeElement.getAttribute("contenteditable")))return this.focus(e)},t.prototype.focus=function(e){var t=this,n=e&&e.nativeEvent;if(n&&n.target===this._editorWrapper){var r=this.state.editorState,o=r.getSelection();if(!o.getHasFocus()&&o.isCollapsed())return this.setState({editorState:m.EditorState.moveSelectionToEnd(r)},function(){t.focusEditor(e)})}this.focusEditor(e)},t.prototype.getPlugins=function(){return this.state.plugins.slice()},t.prototype.getEventHandler=function(){var e=this,t=["onUpArrow","onDownArrow","handleReturn","onFocus","onBlur","onTab","handlePastedText"],n={};return t.forEach(function(t){n[t]=e.generatorEventHandler(t)}),n},t.prototype.getEditorState=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e&&this.refs.editor.focus(),this.state.editorState},t.prototype.setEditorState=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],a=e;this.getPlugins().forEach(function(e){if(e.onChange){var t=e.onChange(a);t&&(a=t)}}),this.props.onChange&&r&&(this.props.onChange(a),this.controlledMode&&(this.forceUpdateImmediate=o(function(){return t.setState({editorState:new m.EditorState(t.state.editorState.getImmutable())})}))),this.controlledMode||this.setState({editorState:a},n?function(){return o(function(){return t.refs.editor.focus()})}:s)},t.prototype.handleKeyBinding=function(e){if(this.props.onKeyDown){e.ctrlKey=E(e);var t=this.props.onKeyDown(e);return t?t:(0,m.getDefaultKeyBinding)(e)}return(0,m.getDefaultKeyBinding)(e)},t.prototype.handleKeyCommand=function(e){return this.props.multiLines?this.eventHandle("handleKeyBinding",e):"split-block"===e?"handled":"not-handled"},t.prototype.getBlockStyle=function(e){var t=L.get("customBlockStyleMap"),n=e.getType();return t.hasOwnProperty(n)?t[n]:""},t.prototype.blockRendererFn=function(e){var t=null;return this.getPlugins().forEach(function(n){if(n.blockRendererFn){var r=n.blockRendererFn(e);r&&(t=r)}}),t},t.prototype.eventHandle=function(e){for(var t,n=this.getPlugins(),r=arguments.length,o=Array(r>1?r-1:0),a=1;a=0&&(e._idleTimeoutId=setTimeout(function(){e._onTimeout&&e._onTimeout()},t))},n(1562),t.setImmediate="undefined"!=typeof self&&self.setImmediate||"undefined"!=typeof e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||"undefined"!=typeof e&&e.clearImmediate||this&&this.clearImmediate}).call(t,function(){return this}())},1503,function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){}function a(){function e(e){}var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{onChange:e,onUpArrow:o,onDownArrow:o,getEditorState:o,setEditorState:o,handleReturn:o});return{name:"toolbar",decorators:[],callbacks:t,onChange:function(e){return t.onChange?t.onChange(e):e},component:l.default}}t.__esModule=!0,t.createToolbar=a;var i=n(1564),l=r(i)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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 i(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):e.__proto__=t)}function l(){}t.__esModule=!0;var c=n(332),s=r(c),u=n(1422),d=n(1565),f=r(d),p=function(e){function t(n){o(this,t);var r=a(this,e.call(this,n)),i={};return n.plugins.forEach(function(e){i[e.name]=e}),r.pluginsMap=(0,u.Map)(i),r.state={editorState:n.editorState,toolbars:[]},r}return i(t,e),t.prototype.renderToolbarItem=function(e,t){var n=this.pluginsMap.get(e);if(n&&n.component){var r=n.component,o={key:"toolbar-item-"+t,onClick:r.props?r.props.onClick:l};return s.default.isValidElement(r)?s.default.cloneElement(r,o):s.default.createElement(r,o)}return null},t.prototype.conpomentWillReceiveProps=function(e){this.render()},t.prototype.render=function(){var e=this,t=this.props,n=t.toolbars,r=t.prefixCls;return s.default.createElement("div",{className:r+"-toolbar"},n.map(function(t,n){var r=s.default.Children.map(t,e.renderToolbarItem.bind(e));return s.default.createElement(f.default,{key:"toolbar-"+n},r)}))},t}(s.default.Component);t.default=p,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(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 i(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):e.__proto__=t)}t.__esModule=!0;var l=n(332),c=r(l),s=function(e){function t(){return o(this,t),a(this,e.apply(this,arguments))}return i(t,e),t.prototype.render=function(){return c.default.createElement("div",null,this.props.children)},t}(c.default.Component);t.default=s,e.exports=t.default},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}t.__esModule=!0;var o=n(1422),a=function(){function e(){r(this,e),this._store=(0,o.Map)()}return e.prototype.set=function(e,t){this._store=this._store.set(e,t)},e.prototype.get=function(e){return this._store.get(e)},e}();t.default=a,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return e.split("&").join("&").split("<").join("<").split(">").join(">").split(" ").join(" ").split("\n").join("
\n")}function a(e){return e.replace(g,"-$1").toLowerCase().replace(v,"-$1-")}function i(e,t){var n=void 0;return"string"==typeof t?n=y.test(t):(n=!0,t=String(t)),n&&"0"!==t&&h.default[e]!==!0?t+"px":t}function l(e){return e?Object.keys(e).map(function(t){var n=a(t),r=i(t,e[t]);return n+":"+r}).join(";"):""}function c(e){return function(t){var n=t.getCurrentContent(),r=n.getBlockMap(),a=e.get("customStyleMap")||{},i=e.get("blockRenderMap")||{},c=e.get("customStyleFn"),d=e.get("toHTMLList");return u(a,b),r.map(function(e){var t="
",r="
",f=e.getText(),p=e.getType(),h=i.get(p);if(h){var m="function"==typeof h.element?h.elementTag||"div":"div";t="<"+(m||"div")+' style="'+l(i.get(p).style||{})+'">',r=""}for(var b=e.getCharacterList(),v=null,y=null,g=[],_=0,w=0,x=f.length;w0&&v!==y&&(g.push([y,s(f.slice(_,w),b.slice(_,w))]),_=w)}return g.push([v,s(f.slice(_),b.slice(_))]),g.map(function(e){var r=e[0],i=e[1],s=i.map(function(e){var t=e[0];return t}).join(""),f=i.map(function(e){var t=e[0],n=e[1],r=o(t);if(n.size){var i={};n.forEach(function(e){if(a.hasOwnProperty(e)){var t=a[e];i=u(i,t)}});var s=c(n);return i=u(i,s),''+r+""}return""+r+""}).join("");if(r){var p=n.getEntity(r),h=p.getData();if(h&&h.export)t+=h.export(f,h);else{var m="";d.forEach(function(e){var t=e(s,p,n);t&&(m=t)}),m&&(t+=m)}}else t+=f}),t+=r}).join("\n")}}function s(e,t){for(var n=m,r=m,o=[],a=0,i=0,l=e.length;i0&&!(0,f.is)(n,r)&&(o.push([e.slice(a,i),r]),a=i)}return o.push([e.slice(a),n]),o}t.__esModule=!0,t.DEFAULT_INLINE_STYLE=t.DEFAULT_ELEMENT=t.EMPTY_SET=void 0;var u=Object.assign||function(e){for(var t=1;t").join(">").split(" ").join(" ").split("\n").join("
\n")}function r(e){return e.split("
\n").join("\n")}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{encode:!1},r=e.getCurrentContent(),o=r.getBlockMap(),a=t.encode;return o.map(function(e){var t="",o=0,i=e.getText();return e.findEntityRanges(function(e){return!!e.getEntity()},function(n,a){var l=e.getEntityAt(n),c=r.getEntity(l).getData();t+=i.slice(o,n),t+=c&&c.export?c.export(c):i.slice(n,a),o=a}),t+=i.slice(o),a?n(t):t}).join(a?"
\n":"\n")}t.__esModule=!0,t.encodeContent=n,t.decodeContent=r,t.default=o},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){for(var e=arguments.length,t=Array(e),n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t={onChange:i,onUpArrow:i,onDownArrow:i,getEditorState:i,setEditorState:i,handleReturn:i,onBlur:i},n={callbacks:t,mentionStore:g.default},r=(0,k.default)(e.prefix),l=e.tag||v.default,c=[{strategy:function(e,t){o(r,e,t)},component:function(t){return d.default.createElement(m.default,(0,s.default)({},t,n,{style:e.mentionStyle,suggestionRegex:(0,k.default)(e.prefix)}))}}];return"immutable"===e.mode&&c.unshift({strategy:a,component:function(e){return d.default.createElement(O,(0,s.default)({tag:l},e,{callbacks:t}))}}),{name:"mention",Suggestions:function(e){return d.default.createElement(p.default,(0,s.default)({},e,n,{store:g.default}))},decorators:c,onChange:function(e){return t.onChange?t.onChange(e):e},callbacks:t,export:w.default}}t.__esModule=!0;var c=n(512),s=r(c);t.default=l;var u=n(332),d=r(u),f=n(1591),p=r(f),h=n(1600),m=r(h),b=n(1601),v=r(b),y=n(1602),g=r(y),_=n(1603),w=r(_),x=n(1599),k=r(x),O=function(e){var t=e.entityKey,n=e.tag,r=e.callbacks,o=r.getEditorState().getCurrentContent(),a=o.getEntity(t).getData();return d.default.createElement(n,(0,s.default)({},e,{data:a}))};e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(512),a=r(o),i=n(739),l=r(i),c=n(741),s=r(c),u=n(775),d=r(u),f=n(332),p=r(f),h=n(364),m=r(h),b=n(560),v=r(b),y=n(1483),g=n(734),_=r(g),w=n(510),x=r(w),k=n(824),O=r(k),M=n(1592),S=r(M),C=n(1593),E=r(C),P=n(1594),j=r(P),T=n(1596),L=r(T),z=n(1597),D=r(z),N=n(1598),H=r(N),A=n(1595),V=r(A),I=function(e){return e!==!1},R=function(e){function t(){(0,l.default)(this,t);var n=(0,s.default)(this,e.call(this));return n.onEditorStateChange=function(e){var t=n.props.store.getOffset();if(0===t.size)return n.closeDropDown(),e;var r=e.getSelection();if(!n.props.callbacks.getEditorState().getSelection().getHasFocus()&&r.getHasFocus())return e;var o=(0,V.default)(e,r),a=o.word;if(!a)return n.closeDropDown(),e;var i=t.map(function(t){var n=t.offsetKey,o=(0,y.decode)(n),i=o.blockKey,l=o.decoratorKey,c=o.leafKey;if(i!==r.anchorKey)return!1;var s=e.getBlockTree(i).getIn([l,"leaves",c]);if(!s)return!1;var u=s.get("start"),d=s.get("end");return!!a&&(u===d-1?r.anchorOffset>=u+1&&r.anchorOffset<=d&&n:r.anchorOffset>u+1&&r.anchorOffset<=d&&n)}),l=i.some(I);n.activeOffsetKey=i.find(I)||n.activeOffsetKey;var c=n.props.store.getTrigger(n.activeOffsetKey);if(!l||!r.getHasFocus())return n.closeDropDown(),e;var s=a.substring(c.length,a.length);return n.lastSearchValue===s&&n.lastTrigger===c||(n.lastSearchValue=s,n.lastTrigger=c,n.props.onSearchChange(s,c)),n.state.active||c&&a.indexOf(c)===-1||n.openDropDown(),e},n.onUpArrow=function(e){if(e.preventDefault(),n.props.suggestions.length>0){var t=n.state.focusedIndex-1;n.setState({focusedIndex:Math.max(t,0)})}},n.onBlur=function(e){e.preventDefault(),n.closeDropDown()},n.onDownArrow=function(e){e.preventDefault();var t=n.state.focusedIndex+1;n.setState({focusedIndex:t>=n.props.suggestions.length?0:t})},n.getContainer=function(){var e=document.createElement("div"),t=void 0;return n.props.getSuggestionContainer?(t=n.props.getSuggestionContainer(),e.style.position="relative"):t=document.body,t.appendChild(e),e},n.handleKeyBinding=function(e){return"split-block"===e},n.handleReturn=function(e){e.preventDefault();var t=n.props.suggestions[n.state.focusedIndex];return!!t&&(p.default.isValidElement(t)?n.onMentionSelect(t.props.value,t.props.data):n.onMentionSelect(t),n.lastSearchValue=null,n.lastTrigger=null,!0)},n.renderReady=function(){var e=n.dropdownContainer;if(e){var t=n.state.active,r=n.activeOffsetKey,o=n.props.store.getOffset(),a=o.get(r);if(t&&a){var i=n.props.placement,l=n.getPositionStyle(!0,a.position()),c=parseFloat(l.top)-window.scrollY-e.offsetHeight<0,s=(window.innerHeight||document.documentElement.clientHeight)-(parseFloat(l.top)-window.scrollY)-e.offsetHeight<0;"top"!==i||c||(l.top=(parseFloat(l.top)-e.offsetHeight||0)+"px"),"bottom"===i&&s&&!c&&(l.top=(parseFloat(l.top)-e.offsetHeight||0)+"px"),Object.keys(l).forEach(function(t){e.style[t]=l[t]})}n.focusItem&&(0,O.default)(m.default.findDOMNode(n.focusItem),e,{onlyScrollIfNeeded:!0})}},n.getNavigations=function(){var e=n.props,t=e.prefixCls,r=e.suggestions,o=n.state.focusedIndex;return r.length?p.default.Children.map(r,function(e,r){var a=r===o,i=a?function(e){n.focusItem=e}:null,l=(0,x.default)(t+"-dropdown-item",{focus:a});return p.default.isValidElement(e)?p.default.cloneElement(e,{className:l,onMouseDown:function(){return n.onDropdownMentionSelect(e.props.value,e.props.data)},ref:i}):p.default.createElement(S.default,{ref:i,className:l,onMouseDown:function(){return n.onDropdownMentionSelect(e)}},e)},n):p.default.createElement("div",{className:t+"-dropdown-notfound "+t+"-dropdown-item"},n.props.notFoundContent)},n.state={isActive:!1,focusedIndex:0,container:!1},n}return(0,d.default)(t,e),t.prototype.componentDidMount=function(){this.props.callbacks.onChange=this.onEditorStateChange},t.prototype.componentWillReceiveProps=function(e){e.suggestions.length!==this.props.suggestions.length&&this.setState({focusedIndex:0})},t.prototype.onDropdownMentionSelect=function(e,t){var n=this;setTimeout(function(){n.onMentionSelect(e,t)},100)},t.prototype.onMentionSelect=function(e,t){var n=this.props.callbacks.getEditorState(),r=this.props,o=r.store,a=r.onSelect,i=o.getTrigger(this.activeOffsetKey);if(a&&a(e,t||e),this.props.noRedup){var l=(0,H.default)(n.getCurrentContent(),i);if(l.indexOf(""+i+e)!==-1)return console.warn("you have specified `noRedup` props but have duplicated mentions."),this.closeDropDown(),void this.props.callbacks.setEditorState((0,L.default)(n))}this.props.callbacks.setEditorState((0,j.default)(n,""+i+e,t,this.props.mode),!0),this.closeDropDown()},t.prototype.getPositionStyle=function(e,t){if(this.props.getSuggestionStyle)return this.props.getSuggestionStyle(e,t);var n=this.props.getSuggestionContainer?this.state.container:document.body,r=(0,D.default)(n);return t?(0,a.default)({position:"absolute",left:t.left-r.left+"px",top:t.top-r.top+"px"},this.props.style):{}},t.prototype.openDropDown=function(){this.props.callbacks.onUpArrow=this.onUpArrow,this.props.callbacks.handleReturn=this.handleReturn,this.props.callbacks.handleKeyBinding=this.handleKeyBinding,this.props.callbacks.onDownArrow=this.onDownArrow,this.props.callbacks.onBlur=this.onBlur,this.setState({active:!0,container:this.state.container||this.getContainer()})},t.prototype.closeDropDown=function(){this.props.callbacks.onUpArrow=null,this.props.callbacks.handleReturn=null,this.props.callbacks.handleKeyBinding=null,this.props.callbacks.onDownArrow=null,this.props.callbacks.onBlur=null,this.setState({active:!1})},t.prototype.render=function(){var e,t=this,n=this.props,r=n.prefixCls,o=n.className,i=n.placement,l=this.state,c=l.container,s=l.active,u=(0,x.default)((0,a.default)((e={},e[r+"-dropdown"]=!0,e[r+"-dropdown-placement-"+i]=!0,e),o)),d="top"===i?"slide-down":"slide-up",f=this.getNavigations();return c?p.default.createElement(E.default,{renderReady:this.renderReady,container:c},p.default.createElement(_.default,{transitionName:d},s?p.default.createElement("div",{className:u,ref:function(e){t.dropdownContainer=e}},f):null)):null},t}(p.default.Component);t.default=R,R.propTypes={callbacks:v.default.object,suggestions:v.default.array,store:v.default.object,onSearchChange:v.default.func,prefixCls:v.default.string,mode:v.default.string,style:v.default.object,onSelect:v.default.func,getSuggestionContainer:v.default.func,notFoundContent:v.default.any,getSuggestionStyle:v.default.func,className:v.default.string,noRedup:v.default.bool,placement:v.default.string},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(739),a=r(o),i=n(741),l=r(i),c=n(775),s=r(c),u=n(332),d=r(u),f=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.render=function(){var e=this.props;return d.default.createElement("div",e)},t}(u.Component);t.default=f,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(739),a=r(o),i=n(741),l=r(i),c=n(775),s=r(c),u=n(332),d=r(u),f=n(560),p=r(f),h=n(364),m=!!h.createPortal,b=function(e){function t(){return(0,a.default)(this,t),(0,l.default)(this,e.apply(this,arguments))}return(0,s.default)(t,e),t.prototype.componentDidMount=function(){this.renderOrReady()},t.prototype.componentDidUpdate=function(){this.renderOrReady()},t.prototype.renderOrReady=function(){m?this.props.renderReady():this.renderComponent()},t.prototype.renderComponent=function(){var e=this.props,t=e.children,n=e.container,r=e.renderReady;(0,h.unstable_renderSubtreeIntoContainer)(this,t,n,function(){r&&r.call(this)})},t.prototype.render=function(){if(m){var e=this.props,t=e.children,n=e.container;return(0,h.createPortal)(t,n)}return null},t}(d.default.Component);t.default=b,b.propTypes={children:p.default.any,renderReady:p.default.func,container:p.default.any},e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t,n,r){var o="immutable"===r?"IMMUTABLE":"MUTABLE",i=e.getSelection(),c=e.getCurrentContent();c.createEntity("mention",o,n||t);var s=(0,l.default)(e,i),u=s.begin,d=s.end,f=a.Modifier.replaceText(c,i.merge({anchorOffset:u,focusOffset:d}),t,null,c.getLastCreatedEntityKey()),p=a.Modifier.insertText(f,f.getSelectionAfter()," "),h=a.EditorState.push(e,p,"insert-mention");return a.EditorState.forceSelection(h,p.getSelectionAfter())}t.__esModule=!0,t.default=o;var a=n(1419),i=n(1595),l=r(i);e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=String(e),r=Number(t)>>>0,o=n.slice(0,r+1).search(/\S+$/),a=n.slice(r).search(/\s/);return a<0?{word:n.slice(o),begin:o,end:n.length}:{word:n.slice(o,a+r),begin:o,end:a+r}}function r(e,t){var r=t.getAnchorKey(),o=t.getAnchorOffset()-1,a=e.getCurrentContent(),i=a.getBlockForKey(r);if(i){var l=i.getText();return n(l,o)}return""}t.__esModule=!0,t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=e.getSelection(),n=(0,l.default)(e,t),r=n.begin,o=n.end,i=a.Modifier.replaceText(e.getCurrentContent(),t.merge({anchorOffset:r,focusOffset:o}),"",null),c=a.Modifier.insertText(i,i.getSelectionAfter()," "),s=a.EditorState.push(e,c,"insert-mention");return a.EditorState.forceSelection(s,c.getSelectionAfter())}t.__esModule=!0,t.default=o;var a=n(1419),i=n(1595),l=r(i);e.exports=t.default},function(e,t){"use strict";function n(e,t){var n=e.getBoundingClientRect();if(n.width||n.height){var r=t||e.parentElement;return{top:n.top-r.clientTop,left:n.left-r.clientLeft}}return n}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"@",n=(0,i.default)(t),r=[];return e.getBlockMap().forEach(function(e){for(var t=e.getText(),o=void 0;null!==(o=n.exec(t));)r.push(o[0].trim())}),r}t.__esModule=!0,t.default=o;var a=n(1599),i=r(a);e.exports=t.default},function(e,t){"use strict";function n(e){var t=Array.isArray(e)?e:[e],n=t.join("").replace(/(\$|\^)/g,"\\$1");return t.length>1&&(n="["+n+"]"),new RegExp("(\\s|^)("+n+")[^\\s]*","g")}t.__esModule=!0,t.default=n,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}t.__esModule=!0;var o=n(739),a=r(o),i=n(741),l=r(i),c=n(775),s=r(c),u=n(332),d=r(u),f=n(560),p=r(f),h=n(1597),m=r(h),b=function(e){function t(){var n,r,o;(0,a.default)(this,t);for(var i=arguments.length,c=Array(i),s=0;s").join(">").split(" ").join(" ").split("\n").join("
\n")}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new s(e,t).generate()}t.__esModule=!0;var i=n(739),l=r(i);t.default=a;var c=n(1419),s=function(){function e(t,n){(0,l.default)(this,e),this.contentState=t,this.options=n}return e.prototype.generate=function(){var e=(0,c.convertToRaw)(this.contentState);return this.processContent(e)},e.prototype.processContent=function(e){var t=e.blocks,n=this.options.encode;return t.map(function(e){return n?o(e.text):e.text}).join(n?"
\n":"\n")},e}();e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n(1605)),a=r(n(1728));o.default.Dragger=a.default;var i=o.default;t.default=i},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=r?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(n,a,l):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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 l(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function c(){return c=Object.assign||function(e){for(var t=1;t0&&(t.percent=t.loaded/t.total*100),e.onProgress(t)});var o=new FormData;e.data&&Object.keys(e.data).forEach(function(t){var n=e.data[t];return Array.isArray(n)?void n.forEach(function(e){o.append(t+"[]",e)}):void o.append(t,e.data[t])}),o.append(e.filename,e.file),t.onerror=function(t){e.onError(t)},t.onload=function(){return t.status<200||t.status>=300?e.onError(n(e,t),r(t)):void e.onSuccess(r(t),t)},t.open(e.method,e.action,!0),e.withCredentials&&"withCredentials"in t&&(t.withCredentials=!0);var a=e.headers||{};null!==a["X-Requested-With"]&&t.setRequestHeader("X-Requested-With","XMLHttpRequest");for(var i in a)a.hasOwnProperty(i)&&null!==a[i]&&t.setRequestHeader(i,a[i]); -return t.send(o),{abort:function(){t.abort()}}}Object.defineProperty(t,"__esModule",{value:!0}),t.default=o,e.exports=t.default},function(e,t){"use strict";function n(){return"rc-upload-"+r+"-"+ ++o}Object.defineProperty(t,"__esModule",{value:!0}),t.default=n;var r=+new Date,o=0;e.exports=t.default},function(e,t){"use strict";function n(e,t){return e.indexOf(t,e.length-t.length)!==-1}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(e&&t){var r=Array.isArray(t)?t:t.split(","),o=e.name||"",a=e.type||"",i=a.replace(/\/.*$/,"");return r.some(function(e){var t=e.trim();return"."===t.charAt(0)?n(o.toLowerCase(),t.toLowerCase()):/\/\*$/.test(t)?i===t.replace(/\/.*$/,""):a===t})}return!0},e.exports=t.default},function(e,t){"use strict";function n(e,t){function n(){r.readEntries(function(e){var r=Array.prototype.slice.apply(e);o=o.concat(r);var a=!r.length;a?t(o):n()})}var r=e.createReader(),o=[];n()}Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t,r){var o=function e(o,a){a=a||"",o.isFile?o.file(function(e){r(e)&&(o.fullPath&&!e.webkitRelativePath&&(Object.defineProperties(e,{webkitRelativePath:{writable:!0}}),e.webkitRelativePath=o.fullPath.replace(/^\//,""),Object.defineProperties(e,{webkitRelativePath:{writable:!1}})),t([e]))}):o.isDirectory&&n(o,function(t){t.forEach(function(t){e(t,""+a+o.name+"/")})})},a=!0,i=!1,l=void 0;try{for(var c,s=e[Symbol.iterator]();!(a=(c=s.next()).done);a=!0){var u=c.value;o(u.webkitGetAsEntry())}}catch(e){i=!0,l=e}finally{try{!a&&s.return&&s.return()}finally{if(i)throw l}}};t.default=r,e.exports=t.default},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}Object.defineProperty(t,"__esModule",{value:!0});var o=n(735),a=r(o),i=n(512),l=r(i),c=n(739),s=r(c),u=n(740),d=r(u),f=n(741),p=r(f),h=n(775),m=r(h),b=n(332),v=r(b),y=n(560),g=r(y),_=n(364),w=r(_),x=n(510),k=r(x),O=n(1610),M=r(O),S=n(1614),C=r(S),E={position:"absolute",top:0,opacity:0,filter:"alpha(opacity=0)",left:0,zIndex:9999},P=function(e){function t(){var e,n,r,o;(0,s.default)(this,t);for(var a=arguments.length,i=Array(a),l=0;ldocument.domain="'+e+'";",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(),t=e.contentWindow,n=t.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=w.default.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,a=this.props.onStart;"function"==typeof o&&(o=o(e));var i=document.createDocumentFragment();for(var l in o)if(o.hasOwnProperty(l)){var c=document.createElement("input");c.setAttribute("name",l),c.value=o[l],i.appendChild(c)}r.appendChild(i),new Promise(function(n){var r=t.props.action;return"function"==typeof r?n(r(e)):void n(r)}).then(function(t){n.setAttribute("action",t),n.submit(),r.innerHTML="",a(e)})}},{key:"render",value:function(){var e,t=this.props,n=t.component,r=t.disabled,o=t.className,i=t.prefixCls,c=t.children,s=t.style,u=(0,l.default)({},E,{display:this.state.uploading||r?"none":""}),d=(0,k.default)((e={},(0,a.default)(e,i,!0),(0,a.default)(e,i+"-disabled",r),(0,a.default)(e,o,o),e));return v.default.createElement(n,{className:d,style:(0,l.default)({position:"relative",zIndex:0},s)},v.default.createElement("iframe",{ref:this.saveIframe,onLoad:this.onLoad,style:u}),c)}}]),t}(b.Component);P.propTypes={component:g.default.string,style:g.default.object,disabled:g.default.bool,prefixCls:g.default.string,className:g.default.string,accept:g.default.string,onStart:g.default.func,multiple:g.default.bool,children:g.default.any,data:g.default.oneOfType([g.default.object,g.default.func]),action:g.default.oneOfType([g.default.string,g.default.func]),name:g.default.string},t.default=P,e.exports=t.default},707,function(e,t,n){function r(e,t){return e&&e.length?a(e,o(t,2)):[]}var o=n(1616),a=n(1716);e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?l(e)?a(e[0],e[1]):o(e):c(e)}var o=n(1617),a=n(1701),i=n(1713),l=n(1196),c=n(1714);e.exports=r},function(e,t,n){function r(e){var t=a(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(1618),a=n(1698),i=n(1700);e.exports=r},function(e,t,n){function r(e,t,n,r){var c=n.length,s=c,u=!r;if(null==e)return!s;for(e=Object(e);c--;){var d=n[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++cf))return!1;var h=u.get(e);if(h&&u.get(t))return h==t;var m=-1,b=!0,v=n&c?new o:void 0;for(u.set(e,t),u.set(t,e);++m=u){var b=t?null:c(e);if(b)return s(b);p=!1,d=l,m=new o}else m=t?[]:h;e:for(;++r-1}var o=n(1718);e.exports=r},function(e,t,n){function r(e,t,n){return t===t?i(e,t,n):o(e,a,n)}var o=n(1719),a=n(1720),i=n(1721);e.exports=r},function(e,t){function n(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a=n?o:(o+=e,e-=t,e<.001&&(e=.001),o)}}function i(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter(function(t){return t[n]===e[n]})[0]}function l(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter(function(t){return t[n]!==e[n]});return r.length===t.length?null:r}function c(e){return new Promise(function(t){if(!u(e.type))return void t("");var n=document.createElement("canvas");n.width=f,n.height=f,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(f,"px; height: ").concat(f,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;o.onload=function(){var e=o.width,a=o.height,i=f,l=f,c=0,s=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1],r=n.split(/#|\?/)[0];return(/\.[^.\/\\]*$/.exec(r)||[""])[0]},u=function(e){return!!e&&0===e.indexOf("image/")},d=function(e){if(u(e.type))return!0;var t=e.thumbUrl||e.url,n=s(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n};t.isImageUrl=d;var f=200},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=r?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(n,a,l):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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 l(){return l=Object.assign||function(e){for(var t=1;t=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},a.forEach(["delete","get","head"],function(e){c.headers[e]={}}),a.forEach(["post","put","patch"],function(e){c.headers[e]=a.merge(l)}),e.exports=c}).call(t,n(446))},function(e,t,n){"use strict";var r=n(1736);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(1736),o=n(1747),a=n(1739),i=n(1750),l=n(1753),c=n(1754),s=n(1748);e.exports=function(e){return new Promise(function(t,u){var d=e.data,f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";f.Authorization="Basic "+btoa(h+":"+m)}var b=i(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(b,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?p.response:p.responseText,a={data:r,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,u,a),p=null}},p.onabort=function(){p&&(u(s("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){u(s("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),u(s(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var v=n(1755),y=(e.withCredentials||c(b))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(f,function(e,t){"undefined"==typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),u(e),p=null)}),void 0===d&&(d=null),p.send(d)})}},function(e,t,n){"use strict";var r=n(1748);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(1749);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(1751),o=n(1752);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(1736),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(1736);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(1736);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,a,i){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(o)&&l.push("path="+o),r.isString(a)&&l.push("domain="+a),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(1736);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],a=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(a,function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(i,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])});var l=o.concat(a).concat(i),c=Object.keys(t).filter(function(e){return l.indexOf(e)===-1});return r.forEach(c,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(1757);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(1761),r.prototype.loadAsync=n(1832),r.support=n(1764),r.defaults=n(1803),r.version="3.4.0",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(1796),e.exports=r},function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var o=n(1762),a=n(1763),i=n(1799),l=n(1800),c=n(1803),s=n(1804),u=n(1809),d=n(1810),f=n(1794),p=n(1831),h=function(e,t,n){var r,o=a.getTypeOf(t),l=a.extend(n||{},c);l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=b(e)),l.createFolders&&(r=m(e))&&v.call(this,r,!0);var d="string"===o&&l.binary===!1&&l.base64===!1;n&&"undefined"!=typeof n.binary||(l.binary=!d);var h=t instanceof s&&0===t.uncompressedSize;(h||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",o="string");var y=null;y=t instanceof s||t instanceof i?t:f.isNode&&f.isStream(t)?new p(e,t):a.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var g=new u(e,y,l);this.files[e]=g},m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},b=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t="undefined"!=typeof t?t:c.createFolders,e=b(e),this.files[e]||h.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],n=t.slice(this.root.length,t.length),n&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,h.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=v.call(this,t),o=this.clone();return o.root=n.name,o},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1;var d=function(e){var t,n,r,o,a,l=e.length,c=0;for(o=0;o>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},f=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t},p=function(e){var t,n,r,o,i=e.length,l=new Array(2*i);for(n=0,t=0;t4)l[n++]=65533,t+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&t1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),a.applyFromCharCode(l)};t.utf8encode=function(e){return i.nodebuffer?l.newBufferFrom(e,"utf-8"):d(e)},t.utf8decode=function(e){return i.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):(e=a.transformTo(i.uint8array?"uint8array":"array",e),p(e))},a.inherits(r,c),r.prototype.processChunk=function(e){var n=a.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var o=f(n),l=n;o!==n.length&&(i.uint8array?(l=n.subarray(0,o),this.leftOver=n.subarray(o,n.length)):(l=n.slice(0,o),this.leftOver=n.slice(o,n.length))),this.push({data:t.utf8decode(l),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,a.inherits(o,c),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o},function(e,t,n){"use strict";function r(e){var t=null;return t=c.uint8array?new Uint8Array(e.length):new Array(e.length),a(e,t)}function o(e){return e}function a(e,t){for(var n=0;n1;)try{return p.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return p.stringifyByChar(e)}function l(e,t){for(var n=0;ndocument.domain="'+e+'";",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(),t=e.contentWindow,n=t.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=w.default.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,a=this.props.onStart;"function"==typeof o&&(o=o(e));var i=document.createDocumentFragment();for(var l in o)if(o.hasOwnProperty(l)){var c=document.createElement("input");c.setAttribute("name",l),c.value=o[l],i.appendChild(c)}r.appendChild(i),new Promise(function(n){var r=t.props.action;return"function"==typeof r?n(r(e)):void n(r)}).then(function(t){n.setAttribute("action",t),n.submit(),r.innerHTML="",a(e)})}},{key:"render",value:function(){var e,t=this.props,n=t.component,r=t.disabled,o=t.className,i=t.prefixCls,c=t.children,s=t.style,u=(0,l.default)({},E,{display:this.state.uploading||r?"none":""}),d=(0,k.default)((e={},(0,a.default)(e,i,!0),(0,a.default)(e,i+"-disabled",r),(0,a.default)(e,o,o),e));return v.default.createElement(n,{className:d,style:(0,l.default)({position:"relative",zIndex:0},s)},v.default.createElement("iframe",{ref:this.saveIframe,onLoad:this.onLoad,style:u}),c)}}]),t}(b.Component);P.propTypes={component:g.default.string,style:g.default.object,disabled:g.default.bool,prefixCls:g.default.string,className:g.default.string,accept:g.default.string,onStart:g.default.func,multiple:g.default.bool,children:g.default.any,data:g.default.oneOfType([g.default.object,g.default.func]),action:g.default.oneOfType([g.default.string,g.default.func]),name:g.default.string},t.default=P,e.exports=t.default},707,function(e,t,n){function r(e,t){return e&&e.length?a(e,o(t,2)):[]}var o=n(1616),a=n(1716);e.exports=r},function(e,t,n){function r(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?l(e)?a(e[0],e[1]):o(e):c(e)}var o=n(1617),a=n(1701),i=n(1713),l=n(1196),c=n(1714);e.exports=r},function(e,t,n){function r(e){var t=a(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||o(n,e,t)}}var o=n(1618),a=n(1698),i=n(1700);e.exports=r},function(e,t,n){function r(e,t,n,r){var c=n.length,s=c,u=!r;if(null==e)return!s;for(e=Object(e);c--;){var d=n[c];if(u&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++cf))return!1;var h=u.get(e);if(h&&u.get(t))return h==t;var m=-1,b=!0,v=n&c?new o:void 0;for(u.set(e,t),u.set(t,e);++m=u){var b=t?null:c(e);if(b)return s(b);p=!1,d=l,m=new o}else m=t?[]:h;e:for(;++r-1}var o=n(1718);e.exports=r},function(e,t,n){function r(e,t,n){return t===t?i(e,t,n):o(e,a,n)}var o=n(1719),a=n(1720),i=n(1721);e.exports=r},function(e,t){function n(e,t,n,r){for(var o=e.length,a=n+(r?1:-1);r?a--:++a=n?o:(o+=e,e-=t,e<.001&&(e=.001),o)}}function i(e,t){var n=void 0!==e.uid?"uid":"name";return t.filter(function(t){return t[n]===e[n]})[0]}function l(e,t){var n=void 0!==e.uid?"uid":"name",r=t.filter(function(t){return t[n]!==e[n]});return r.length===t.length?null:r}function c(e){return new Promise(function(t){if(!u(e.type))return void t("");var n=document.createElement("canvas");n.width=f,n.height=f,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(f,"px; height: ").concat(f,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),o=new Image;o.onload=function(){var e=o.width,a=o.height,i=f,l=f,c=0,s=0;e0&&void 0!==arguments[0]?arguments[0]:"",t=e.split("/"),n=t[t.length-1],r=n.split(/#|\?/)[0];return(/\.[^.\/\\]*$/.exec(r)||[""])[0]},u=function(e){return!!e&&0===e.indexOf("image/")},d=function(e){if(u(e.type))return!0;var t=e.thumbUrl||e.url,n=s(t);return!(!/^data:image\//.test(t)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(t)&&!n};t.isImageUrl=d;var f=200},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function a(e){if(e&&e.__esModule)return e;if(null===e||"object"!==i(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var l=r?Object.getOwnPropertyDescriptor(e,a):null;l&&(l.get||l.set)?Object.defineProperty(n,a,l):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}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 l(){return l=Object.assign||function(e){for(var t=1;t=200&&e<300}};c.headers={common:{Accept:"application/json, text/plain, */*"}},a.forEach(["delete","get","head"],function(e){c.headers[e]={}}),a.forEach(["post","put","patch"],function(e){c.headers[e]=a.merge(l)}),e.exports=c}).call(t,n(446))},function(e,t,n){"use strict";var r=n(1736);e.exports=function(e,t){r.forEach(e,function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])})}},function(e,t,n){"use strict";var r=n(1736),o=n(1747),a=n(1739),i=n(1750),l=n(1753),c=n(1754),s=n(1748);e.exports=function(e){return new Promise(function(t,u){var d=e.data,f=e.headers;r.isFormData(d)&&delete f["Content-Type"];var p=new XMLHttpRequest;if(e.auth){var h=e.auth.username||"",m=e.auth.password||"";f.Authorization="Basic "+btoa(h+":"+m)}var b=i(e.baseURL,e.url);if(p.open(e.method.toUpperCase(),a(b,e.params,e.paramsSerializer),!0),p.timeout=e.timeout,p.onreadystatechange=function(){if(p&&4===p.readyState&&(0!==p.status||p.responseURL&&0===p.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in p?l(p.getAllResponseHeaders()):null,r=e.responseType&&"text"!==e.responseType?p.response:p.responseText,a={data:r,status:p.status,statusText:p.statusText,headers:n,config:e,request:p};o(t,u,a),p=null}},p.onabort=function(){p&&(u(s("Request aborted",e,"ECONNABORTED",p)),p=null)},p.onerror=function(){u(s("Network Error",e,null,p)),p=null},p.ontimeout=function(){var t="timeout of "+e.timeout+"ms exceeded";e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),u(s(t,e,"ECONNABORTED",p)),p=null},r.isStandardBrowserEnv()){var v=n(1755),y=(e.withCredentials||c(b))&&e.xsrfCookieName?v.read(e.xsrfCookieName):void 0;y&&(f[e.xsrfHeaderName]=y)}if("setRequestHeader"in p&&r.forEach(f,function(e,t){"undefined"==typeof d&&"content-type"===t.toLowerCase()?delete f[t]:p.setRequestHeader(t,e)}),r.isUndefined(e.withCredentials)||(p.withCredentials=!!e.withCredentials),e.responseType)try{p.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}"function"==typeof e.onDownloadProgress&&p.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&p.upload&&p.upload.addEventListener("progress",e.onUploadProgress),e.cancelToken&&e.cancelToken.promise.then(function(e){p&&(p.abort(),u(e),p=null)}),void 0===d&&(d=null),p.send(d)})}},function(e,t,n){"use strict";var r=n(1748);e.exports=function(e,t,n){var o=n.config.validateStatus;!o||o(n.status)?e(n):t(r("Request failed with status code "+n.status,n.config,null,n.request,n))}},function(e,t,n){"use strict";var r=n(1749);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},function(e,t){"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},e}},function(e,t,n){"use strict";var r=n(1751),o=n(1752);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},function(e,t){"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},function(e,t){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},function(e,t,n){"use strict";var r=n(1736),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;"set-cookie"===t?i[t]=(i[t]?i[t]:[]).concat([n]):i[t]=i[t]?i[t]+", "+n:n}}),i):i}},function(e,t,n){"use strict";var r=n(1736);e.exports=r.isStandardBrowserEnv()?function(){function e(e){var t=e;return n&&(o.setAttribute("href",t),t=o.href),o.setAttribute("href",t),{href:o.href,protocol:o.protocol?o.protocol.replace(/:$/,""):"",host:o.host,search:o.search?o.search.replace(/^\?/,""):"",hash:o.hash?o.hash.replace(/^#/,""):"",hostname:o.hostname,port:o.port,pathname:"/"===o.pathname.charAt(0)?o.pathname:"/"+o.pathname}}var t,n=/(msie|trident)/i.test(navigator.userAgent),o=document.createElement("a");return t=e(window.location.href),function(n){var o=r.isString(n)?e(n):n;return o.protocol===t.protocol&&o.host===t.host}}():function(){return function(){return!0}}()},function(e,t,n){"use strict";var r=n(1736);e.exports=r.isStandardBrowserEnv()?function(){return{write:function(e,t,n,o,a,i){var l=[];l.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&l.push("expires="+new Date(n).toGMTString()),r.isString(o)&&l.push("path="+o),r.isString(a)&&l.push("domain="+a),i===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}()},function(e,t,n){"use strict";var r=n(1736);e.exports=function(e,t){t=t||{};var n={},o=["url","method","params","data"],a=["headers","auth","proxy"],i=["baseURL","url","transformRequest","transformResponse","paramsSerializer","timeout","withCredentials","adapter","responseType","xsrfCookieName","xsrfHeaderName","onUploadProgress","onDownloadProgress","maxContentLength","validateStatus","maxRedirects","httpAgent","httpsAgent","cancelToken","socketPath"];r.forEach(o,function(e){"undefined"!=typeof t[e]&&(n[e]=t[e])}),r.forEach(a,function(o){r.isObject(t[o])?n[o]=r.deepMerge(e[o],t[o]):"undefined"!=typeof t[o]?n[o]=t[o]:r.isObject(e[o])?n[o]=r.deepMerge(e[o]):"undefined"!=typeof e[o]&&(n[o]=e[o])}),r.forEach(i,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])});var l=o.concat(a).concat(i),c=Object.keys(t).filter(function(e){return l.indexOf(e)===-1});return r.forEach(c,function(r){"undefined"!=typeof t[r]?n[r]=t[r]:"undefined"!=typeof e[r]&&(n[r]=e[r])}),n}},function(e,t){"use strict";function n(e){this.message=e}n.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},n.prototype.__CANCEL__=!0,e.exports=n},function(e,t,n){"use strict";function r(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise(function(e){t=e});var n=this;e(function(e){n.reason||(n.reason=new o(e),t(n.reason))})}var o=n(1757);r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},r.source=function(){var e,t=new r(function(t){e=t});return{token:t,cancel:e}},e.exports=r},function(e,t){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";function r(){if(!(this instanceof r))return new r;if(arguments.length)throw new Error("The constructor with parameters has been removed in JSZip 3.0, please check the upgrade guide.");this.files={},this.comment=null,this.root="",this.clone=function(){var e=new r;for(var t in this)"function"!=typeof this[t]&&(e[t]=this[t]);return e}}r.prototype=n(1761),r.prototype.loadAsync=n(1832),r.support=n(1764),r.defaults=n(1803),r.version="3.4.0",r.loadAsync=function(e,t){return(new r).loadAsync(e,t)},r.external=n(1796),e.exports=r},function(e,t,n){"use strict";function r(e){return"[object RegExp]"===Object.prototype.toString.call(e)}var o=n(1762),a=n(1763),i=n(1799),l=n(1800),c=n(1803),s=n(1804),u=n(1809),d=n(1810),f=n(1794),p=n(1831),h=function(e,t,n){var r,o=a.getTypeOf(t),l=a.extend(n||{},c);l.date=l.date||new Date,null!==l.compression&&(l.compression=l.compression.toUpperCase()),"string"==typeof l.unixPermissions&&(l.unixPermissions=parseInt(l.unixPermissions,8)),l.unixPermissions&&16384&l.unixPermissions&&(l.dir=!0),l.dosPermissions&&16&l.dosPermissions&&(l.dir=!0),l.dir&&(e=b(e)),l.createFolders&&(r=m(e))&&v.call(this,r,!0);var d="string"===o&&l.binary===!1&&l.base64===!1;n&&"undefined"!=typeof n.binary||(l.binary=!d);var h=t instanceof s&&0===t.uncompressedSize;(h||l.dir||!t||0===t.length)&&(l.base64=!1,l.binary=!0,t="",l.compression="STORE",o="string");var y=null;y=t instanceof s||t instanceof i?t:f.isNode&&f.isStream(t)?new p(e,t):a.prepareContent(e,t,l.binary,l.optimizedBinaryString,l.base64);var g=new u(e,y,l);this.files[e]=g},m=function(e){"/"===e.slice(-1)&&(e=e.substring(0,e.length-1));var t=e.lastIndexOf("/");return t>0?e.substring(0,t):""},b=function(e){return"/"!==e.slice(-1)&&(e+="/"),e},v=function(e,t){return t="undefined"!=typeof t?t:c.createFolders,e=b(e),this.files[e]||h.call(this,e,null,{dir:!0,createFolders:t}),this.files[e]},y={load:function(){throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.")},forEach:function(e){var t,n,r;for(t in this.files)this.files.hasOwnProperty(t)&&(r=this.files[t],n=t.slice(this.root.length,t.length),n&&t.slice(0,this.root.length)===this.root&&e(n,r))},filter:function(e){var t=[];return this.forEach(function(n,r){e(n,r)&&t.push(r)}),t},file:function(e,t,n){if(1===arguments.length){if(r(e)){var o=e;return this.filter(function(e,t){return!t.dir&&o.test(e)})}var a=this.files[this.root+e];return a&&!a.dir?a:null}return e=this.root+e,h.call(this,e,t,n),this},folder:function(e){if(!e)return this;if(r(e))return this.filter(function(t,n){return n.dir&&e.test(t)});var t=this.root+e,n=v.call(this,t),o=this.clone();return o.root=n.name,o},remove:function(e){e=this.root+e;var t=this.files[e];if(t||("/"!==e.slice(-1)&&(e+="/"),t=this.files[e]),t&&!t.dir)delete this.files[e];else for(var n=this.filter(function(t,n){return n.name.slice(0,e.length)===e}),r=0;r=252?6:u>=248?5:u>=240?4:u>=224?3:u>=192?2:1;s[254]=s[254]=1;var d=function(e){var t,n,r,o,a,l=e.length,c=0;for(o=0;o>>6,t[a++]=128|63&n):n<65536?(t[a++]=224|n>>>12,t[a++]=128|n>>>6&63,t[a++]=128|63&n):(t[a++]=240|n>>>18,t[a++]=128|n>>>12&63,t[a++]=128|n>>>6&63,t[a++]=128|63&n);return t},f=function(e,t){var n;for(t=t||e.length,t>e.length&&(t=e.length),n=t-1;n>=0&&128===(192&e[n]);)n--;return n<0?t:0===n?t:n+s[e[n]]>t?n:t},p=function(e){var t,n,r,o,i=e.length,l=new Array(2*i);for(n=0,t=0;t4)l[n++]=65533,t+=o-1;else{for(r&=2===o?31:3===o?15:7;o>1&&t1?l[n++]=65533:r<65536?l[n++]=r:(r-=65536,l[n++]=55296|r>>10&1023,l[n++]=56320|1023&r)}return l.length!==n&&(l.subarray?l=l.subarray(0,n):l.length=n),a.applyFromCharCode(l)};t.utf8encode=function(e){return i.nodebuffer?l.newBufferFrom(e,"utf-8"):d(e)},t.utf8decode=function(e){return i.nodebuffer?a.transformTo("nodebuffer",e).toString("utf-8"):(e=a.transformTo(i.uint8array?"uint8array":"array",e),p(e))},a.inherits(r,c),r.prototype.processChunk=function(e){var n=a.transformTo(i.uint8array?"uint8array":"array",e.data);if(this.leftOver&&this.leftOver.length){if(i.uint8array){var r=n;n=new Uint8Array(r.length+this.leftOver.length),n.set(this.leftOver,0),n.set(r,this.leftOver.length)}else n=this.leftOver.concat(n);this.leftOver=null}var o=f(n),l=n;o!==n.length&&(i.uint8array?(l=n.subarray(0,o),this.leftOver=n.subarray(o,n.length)):(l=n.slice(0,o),this.leftOver=n.slice(o,n.length))),this.push({data:t.utf8decode(l),meta:e.meta})},r.prototype.flush=function(){this.leftOver&&this.leftOver.length&&(this.push({data:t.utf8decode(this.leftOver),meta:{}}),this.leftOver=null)},t.Utf8DecodeWorker=r,a.inherits(o,c),o.prototype.processChunk=function(e){this.push({data:t.utf8encode(e.data),meta:e.meta})},t.Utf8EncodeWorker=o},function(e,t,n){"use strict";function r(e){var t=null;return t=c.uint8array?new Uint8Array(e.length):new Array(e.length),a(e,t)}function o(e){return e}function a(e,t){for(var n=0;n1;)try{return p.stringifyByChunk(e,r,n)}catch(e){n=Math.floor(n/2)}return p.stringifyByChar(e)}function l(e,t){for(var n=0;n