(self.webpackChunk=self.webpackChunk||[]).push([[8186],{35593:function(t,e,n){"use strict";n.d(e,{Z:function(){return K}});var i=n(20439),r=n(50298),s=n(62646),a=n(43403),o=n(92310),l=n.n(o),u=n(29301),h=n(76846),c=n(96452),d=n(6089),f=n(80402),p=n(34280),g=n(49658),m=n(59301),v=n(14809),y=n(77900),A=n(8654);function b(t){var e=t.prefixCls,n=t.align,i=t.arrow,r=t.arrowPos,s=i||{},a=s.className,o=s.content,u=r.x,h=void 0===u?0:u,c=r.y,d=void 0===c?0:c,f=m.useRef();if(!n||!n.points)return null;var p={position:"absolute"};if(!1!==n.autoArrow){var g=n.points[0],v=n.points[1],y=g[0],A=g[1],b=v[0],w=v[1];y!==b&&["t","b"].includes(y)?"t"===y?p.top=0:p.bottom=0:p.top=d,A!==w&&["l","r"].includes(A)?"l"===A?p.left=0:p.right=0:p.left=h}return m.createElement("div",{ref:f,className:l()("".concat(e,"-arrow"),a),style:p},o)}function w(t){var e=t.prefixCls,n=t.open,i=t.zIndex,r=t.mask,s=t.motion;return r?m.createElement(y.ZP,(0,v.Z)({},s,{motionAppear:!0,visible:n,removeOnLeave:!0}),(function(t){var n=t.className;return m.createElement("div",{style:{zIndex:i},className:l()("".concat(e,"-mask"),n)})})):null}var E=m.memo((function(t){return t.children}),(function(t,e){return e.cache}));var x=m.forwardRef((function(t,e){var n=t.popup,s=t.className,a=t.prefixCls,o=t.style,h=t.target,c=t.onVisibleChanged,d=t.open,f=t.keepDom,g=t.fresh,x=t.onClick,k=t.mask,T=t.arrow,C=t.arrowPos,D=t.align,S=t.motion,I=t.maskMotion,R=t.forceRender,L=t.getPopupContainer,B=t.autoDestroy,P=t.portal,O=t.zIndex,M=t.onMouseEnter,N=t.onMouseLeave,F=t.onPointerEnter,_=t.ready,U=t.offsetX,z=t.offsetY,j=t.offsetR,G=t.offsetB,q=t.onAlign,H=t.onPrepare,Q=t.stretch,V=t.targetWidth,Y=t.targetHeight,K="function"==typeof n?n():n,X=d||f,W=(null==L?void 0:L.length)>0,Z=m.useState(!L||!W),J=(0,r.Z)(Z,2),$=J[0],tt=J[1];if((0,p.Z)((function(){!$&&W&&h&&tt(!0)}),[$,W,h]),!$)return null;var et="auto",nt={left:"-1000vw",top:"-1000vh",right:et,bottom:et};if(_||!d){var it,rt=D.points,st=D.dynamicInset||(null===(it=D._experimental)||void 0===it?void 0:it.dynamicInset),at=st&&"r"===rt[0][1],ot=st&&"b"===rt[0][0];at?(nt.right=j,nt.left=et):(nt.left=U,nt.right=et),ot?(nt.bottom=G,nt.top=et):(nt.top=z,nt.bottom=et)}var lt={};return Q&&(Q.includes("height")&&Y?lt.height=Y:Q.includes("minHeight")&&Y&&(lt.minHeight=Y),Q.includes("width")&&V?lt.width=V:Q.includes("minWidth")&&V&&(lt.minWidth=V)),d||(lt.pointerEvents="none"),m.createElement(P,{open:R||X,getContainer:L&&function(){return L(h)},autoDestroy:B},m.createElement(w,{prefixCls:a,open:d,zIndex:O,mask:k,motion:I}),m.createElement(u.Z,{onResize:q,disabled:!d},(function(t){return m.createElement(y.ZP,(0,v.Z)({motionAppear:!0,motionEnter:!0,motionLeave:!0,removeOnLeave:!1,forceRender:R,leavedClassName:"".concat(a,"-hidden")},S,{onAppearPrepare:H,onEnterPrepare:H,visible:d,onVisibleChanged:function(t){var e;null==S||null===(e=S.onVisibleChanged)||void 0===e||e.call(S,t),c(t)}}),(function(n,r){var u=n.className,h=n.style,c=l()(a,u,s);return m.createElement("div",{ref:(0,A.sQ)(t,e,r),className:c,style:(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({"--arrow-x":"".concat(C.x||0,"px"),"--arrow-y":"".concat(C.y||0,"px")},nt),lt),h),{},{boxSizing:"border-box",zIndex:O},o),onMouseEnter:M,onMouseLeave:N,onPointerEnter:F,onClick:x},T&&m.createElement(b,{prefixCls:a,arrow:T,arrowPos:C,align:D}),m.createElement(E,{cache:!d&&!g},K))}))})))}));var k=m.forwardRef((function(t,e){var n=t.children,i=t.getTriggerDOMNode,r=(0,A.Yr)(n),s=m.useCallback((function(t){(0,A.mH)(e,i?i(t):t)}),[i]),a=(0,A.x1)(s,n.ref);return r?m.cloneElement(n,{ref:a}):n})),T=m.createContext(null);function C(t){return t?Array.isArray(t)?t:[t]:[]}function D(t,e,n,i){return m.useMemo((function(){var r=C(null!=n?n:e),s=C(null!=i?i:e),a=new Set(r),o=new Set(s);return t&&(a.has("hover")&&(a.delete("hover"),a.add("click")),o.has("hover")&&(o.delete("hover"),o.add("click"))),[a,o]}),[t,e,n,i])}var S=n(29194);function I(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2?arguments[2]:void 0;return n?t[0]===e[0]:t[0]===e[0]&&t[1]===e[1]}function R(t,e,n,i){for(var r=n.points,s=Object.keys(t),a=0;a1&&void 0!==arguments[1]?arguments[1]:1;return Number.isNaN(t)?e:t}function M(t){return O(parseFloat(t),0)}function N(t,e){var n=(0,i.Z)({},t);return(e||[]).forEach((function(t){if(!(t instanceof HTMLBodyElement||t instanceof HTMLHtmlElement)){var e=B(t).getComputedStyle(t),i=e.overflow,r=e.overflowClipMargin,s=e.borderTopWidth,a=e.borderBottomWidth,o=e.borderLeftWidth,l=e.borderRightWidth,u=t.getBoundingClientRect(),h=t.offsetHeight,c=t.clientHeight,d=t.offsetWidth,f=t.clientWidth,p=M(s),g=M(a),m=M(o),v=M(l),y=O(Math.round(u.width/d*1e3)/1e3),A=O(Math.round(u.height/h*1e3)/1e3),b=(d-f-m-v)*y,w=(h-c-p-g)*A,E=p*A,x=g*A,k=m*y,T=v*y,C=0,D=0;if("clip"===i){var S=M(r);C=S*y,D=S*A}var I=u.x+k-C,R=u.y+E-D,L=I+u.width+2*C-k-T-b,P=R+u.height+2*D-E-x-w;n.left=Math.max(n.left,I),n.top=Math.max(n.top,R),n.right=Math.min(n.right,L),n.bottom=Math.min(n.bottom,P)}})),n}function F(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n="".concat(e),i=n.match(/^(.*)\%$/);return i?t*(parseFloat(i[1])/100):parseFloat(n)}function _(t,e){var n=e||[],i=(0,r.Z)(n,2),s=i[0],a=i[1];return[F(t.width,s),F(t.height,a)]}function U(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return[t[0],t[1]]}function z(t,e){var n,i=e[0],r=e[1];return n="t"===i?t.y:"b"===i?t.y+t.height:t.y+t.height/2,{x:"l"===r?t.x:"r"===r?t.x+t.width:t.x+t.width/2,y:n}}function j(t,e){var n={t:"b",b:"t",l:"r",r:"l"};return t.map((function(t,i){return i===e?n[t]||"c":t})).join("")}function G(t,e,n,s,a,o,l){var u=m.useState({ready:!1,offsetX:0,offsetY:0,offsetR:0,offsetB:0,arrowX:0,arrowY:0,scaleX:1,scaleY:1,align:a[s]||{}}),c=(0,r.Z)(u,2),f=c[0],g=c[1],v=m.useRef(0),y=m.useMemo((function(){return e?P(e):[]}),[e]),A=m.useRef({});t||(A.current={});var b=(0,d.Z)((function(){if(e&&n&&t){var u,c,d,f=e,p=f.ownerDocument,m=B(f).getComputedStyle(f),v=m.width,b=m.height,w=m.position,E=f.style.left,x=f.style.top,k=f.style.right,T=f.style.bottom,C=f.style.overflow,D=(0,i.Z)((0,i.Z)({},a[s]),o),I=p.createElement("div");if(null===(u=f.parentElement)||void 0===u||u.appendChild(I),I.style.left="".concat(f.offsetLeft,"px"),I.style.top="".concat(f.offsetTop,"px"),I.style.position=w,I.style.height="".concat(f.offsetHeight,"px"),I.style.width="".concat(f.offsetWidth,"px"),f.style.left="0",f.style.top="0",f.style.right="auto",f.style.bottom="auto",f.style.overflow="hidden",Array.isArray(n))d={x:n[0],y:n[1],width:0,height:0};else{var R=n.getBoundingClientRect();d={x:R.x,y:R.y,width:R.width,height:R.height}}var L=f.getBoundingClientRect(),P=p.documentElement,M=P.clientWidth,F=P.clientHeight,G=P.scrollWidth,q=P.scrollHeight,H=P.scrollTop,Q=P.scrollLeft,V=L.height,Y=L.width,K=d.height,X=d.width,W={left:0,top:0,right:M,bottom:F},Z={left:-Q,top:-H,right:G-Q,bottom:q-H},J=D.htmlRegion,$="visible",tt="visibleFirst";"scroll"!==J&&J!==tt&&(J=$);var et=J===tt,nt=N(Z,y),it=N(W,y),rt=J===$?it:nt,st=et?it:rt;f.style.left="auto",f.style.top="auto",f.style.right="0",f.style.bottom="0";var at=f.getBoundingClientRect();f.style.left=E,f.style.top=x,f.style.right=k,f.style.bottom=T,f.style.overflow=C,null===(c=f.parentElement)||void 0===c||c.removeChild(I);var ot=O(Math.round(Y/parseFloat(v)*1e3)/1e3),lt=O(Math.round(V/parseFloat(b)*1e3)/1e3);if(0===ot||0===lt||(0,h.Sh)(n)&&!(0,S.Z)(n))return;var ut=D.offset,ht=D.targetOffset,ct=_(L,ut),dt=(0,r.Z)(ct,2),ft=dt[0],pt=dt[1],gt=_(d,ht),mt=(0,r.Z)(gt,2),vt=mt[0],yt=mt[1];d.x-=vt,d.y-=yt;var At=D.points||[],bt=(0,r.Z)(At,2),wt=bt[0],Et=U(bt[1]),xt=U(wt),kt=z(d,Et),Tt=z(L,xt),Ct=(0,i.Z)({},D),Dt=kt.x-Tt.x+ft,St=kt.y-Tt.y+pt;function we(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rt,i=L.x+t,r=L.y+e,s=i+Y,a=r+V,o=Math.max(i,n.left),l=Math.max(r,n.top),u=Math.min(s,n.right),h=Math.min(a,n.bottom);return Math.max(0,(u-o)*(h-l))}var It,Rt,Lt,Bt,Pt=we(Dt,St),Ot=we(Dt,St,it),Mt=z(d,["t","l"]),Nt=z(L,["t","l"]),Ft=z(d,["b","r"]),_t=z(L,["b","r"]),Ut=D.overflow||{},zt=Ut.adjustX,jt=Ut.adjustY,Gt=Ut.shiftX,qt=Ut.shiftY,Ht=function(t){return"boolean"==typeof t?t:t>=0};function Ee(){It=L.y+St,Rt=It+V,Lt=L.x+Dt,Bt=Lt+Y}Ee();var Qt=Ht(jt),Vt=xt[0]===Et[0];if(Qt&&"t"===xt[0]&&(Rt>st.bottom||A.current.bt)){var Yt=St;Vt?Yt-=V-K:Yt=Mt.y-_t.y-pt;var Kt=we(Dt,Yt),Xt=we(Dt,Yt,it);Kt>Pt||Kt===Pt&&(!et||Xt>=Ot)?(A.current.bt=!0,St=Yt,pt=-pt,Ct.points=[j(xt,0),j(Et,0)]):A.current.bt=!1}if(Qt&&"b"===xt[0]&&(ItPt||Zt===Pt&&(!et||Jt>=Ot)?(A.current.tb=!0,St=Wt,pt=-pt,Ct.points=[j(xt,0),j(Et,0)]):A.current.tb=!1}var $t=Ht(zt),te=xt[1]===Et[1];if($t&&"l"===xt[1]&&(Bt>st.right||A.current.rl)){var ee=Dt;te?ee-=Y-X:ee=Mt.x-_t.x-ft;var ne=we(ee,St),ie=we(ee,St,it);ne>Pt||ne===Pt&&(!et||ie>=Ot)?(A.current.rl=!0,Dt=ee,ft=-ft,Ct.points=[j(xt,1),j(Et,1)]):A.current.rl=!1}if($t&&"r"===xt[1]&&(LtPt||se===Pt&&(!et||ae>=Ot)?(A.current.lr=!0,Dt=re,ft=-ft,Ct.points=[j(xt,1),j(Et,1)]):A.current.lr=!1}Ee();var oe=!0===Gt?0:Gt;"number"==typeof oe&&(Ltit.right&&(Dt-=Bt-it.right-ft,d.x>it.right-oe&&(Dt+=d.x-it.right+oe)));var le=!0===qt?0:qt;"number"==typeof le&&(Itit.bottom&&(St-=Rt-it.bottom-pt,d.y>it.bottom-le&&(St+=d.y-it.bottom+le)));var ue=L.x+Dt,he=ue+Y,ce=L.y+St,de=ce+V,fe=d.x,pe=fe+X,ge=d.y,me=ge+K,ve=(Math.max(ue,fe)+Math.min(he,pe))/2-ue,ye=(Math.max(ce,ge)+Math.min(de,me))/2-ce;null==l||l(e,Ct);var Ae=at.right-L.x-(Dt+L.width),be=at.bottom-L.y-(St+L.height);g({ready:!0,offsetX:Dt/ot,offsetY:St/lt,offsetR:Ae/ot,offsetB:be/lt,arrowX:ve/ot,arrowY:ye/lt,scaleX:ot,scaleY:lt,align:Ct})}})),w=function(){g((function(t){return(0,i.Z)((0,i.Z)({},t),{},{ready:!1})}))};return(0,p.Z)(w,[s]),(0,p.Z)((function(){t||w()}),[t]),[f.ready,f.offsetX,f.offsetY,f.offsetR,f.offsetB,f.arrowX,f.arrowY,f.scaleX,f.scaleY,f.align,function(){v.current+=1;var t=v.current;Promise.resolve().then((function(){v.current===t&&b()}))}]}var q=n(95190);function H(t,e,n,i,r){(0,p.Z)((function(){if(t&&e&&n){var s=n,a=P(e),o=P(s),l=B(s),u=new Set([l].concat((0,q.Z)(a),(0,q.Z)(o)));function h(){i(),r()}return u.forEach((function(t){t.addEventListener("scroll",h,{passive:!0})})),l.addEventListener("resize",h,{passive:!0}),i(),function(){u.forEach((function(t){t.removeEventListener("scroll",h),l.removeEventListener("resize",h)}))}}}),[t,e,n])}n(48736);var Q=n(16089);function V(t,e,n,i,s,a,o,l){var u=m.useRef(t),h=m.useRef(!1);u.current!==t&&(h.current=!0,u.current=t),m.useEffect((function(){var t=(0,Q.Z)((function(){h.current=!1}));return function(){Q.Z.cancel(t)}}),[t]),m.useEffect((function(){if(e&&i&&(!s||a)){var t=function(){var t=!1;return[function(e){var n=e.target;t=o(n)},function(e){var n=e.target;h.current||!u.current||t||o(n)||l(!1)}]},d=t(),f=(0,r.Z)(d,2),p=f[0],g=f[1],m=t(),v=(0,r.Z)(m,2),y=v[0],A=v[1],b=B(i);b.addEventListener("mousedown",p,!0),b.addEventListener("click",g,!0),b.addEventListener("contextmenu",g,!0);var w=(0,c.A)(n);return w&&(w.addEventListener("mousedown",y,!0),w.addEventListener("click",A,!0),w.addEventListener("contextmenu",A,!0)),function(){b.removeEventListener("mousedown",p,!0),b.removeEventListener("click",g,!0),b.removeEventListener("contextmenu",g,!0),w&&(w.removeEventListener("mousedown",y,!0),w.removeEventListener("click",A,!0),w.removeEventListener("contextmenu",A,!0))}}}),[e,n,i,s,a])}var Y=["prefixCls","children","action","showAction","hideAction","popupVisible","defaultPopupVisible","onPopupVisibleChange","afterPopupVisibleChange","mouseEnterDelay","mouseLeaveDelay","focusDelay","blurDelay","mask","maskClosable","getPopupContainer","forceRender","autoDestroy","destroyPopupOnHide","popup","popupClassName","popupStyle","popupPlacement","builtinPlacements","popupAlign","zIndex","stretch","getPopupClassNameFromAlign","fresh","alignPoint","onPopupClick","onPopupAlign","arrow","popupMotion","maskMotion","popupTransitionName","popupAnimation","maskTransitionName","maskAnimation","className","getTriggerDOMNode"];var K=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:a.Z,e=m.forwardRef((function(e,n){var a=e.prefixCls,o=void 0===a?"rc-trigger-popup":a,v=e.children,y=e.action,A=void 0===y?"hover":y,b=e.showAction,w=e.hideAction,E=e.popupVisible,C=e.defaultPopupVisible,S=e.onPopupVisibleChange,I=e.afterPopupVisibleChange,B=e.mouseEnterDelay,P=e.mouseLeaveDelay,O=void 0===P?.1:P,M=e.focusDelay,N=e.blurDelay,F=e.mask,_=e.maskClosable,U=void 0===_||_,z=e.getPopupContainer,j=e.forceRender,q=e.autoDestroy,Q=e.destroyPopupOnHide,K=e.popup,X=e.popupClassName,W=e.popupStyle,Z=e.popupPlacement,J=e.builtinPlacements,$=void 0===J?{}:J,tt=e.popupAlign,et=e.zIndex,nt=e.stretch,it=e.getPopupClassNameFromAlign,rt=e.fresh,st=e.alignPoint,at=e.onPopupClick,ot=e.onPopupAlign,lt=e.arrow,ut=e.popupMotion,ht=e.maskMotion,ct=e.popupTransitionName,dt=e.popupAnimation,ft=e.maskTransitionName,pt=e.maskAnimation,gt=e.className,mt=e.getTriggerDOMNode,vt=(0,s.Z)(e,Y),yt=q||Q||!1,At=m.useState(!1),bt=(0,r.Z)(At,2),wt=bt[0],Et=bt[1];(0,p.Z)((function(){Et((0,g.Z)())}),[]);var xt=m.useRef({}),kt=m.useContext(T),Tt=m.useMemo((function(){return{registerSubPopup:function(t,e){xt.current[t]=e,null==kt||kt.registerSubPopup(t,e)}}}),[kt]),Ct=(0,f.Z)(),Dt=m.useState(null),St=(0,r.Z)(Dt,2),It=St[0],Rt=St[1],Lt=(0,d.Z)((function(t){(0,h.Sh)(t)&&It!==t&&Rt(t),null==kt||kt.registerSubPopup(Ct,t)})),Bt=m.useState(null),Pt=(0,r.Z)(Bt,2),Ot=Pt[0],Mt=Pt[1],Nt=m.useRef(null),Ft=(0,d.Z)((function(t){(0,h.Sh)(t)&&Ot!==t&&(Mt(t),Nt.current=t)})),_t=m.Children.only(v),Ut=(null==_t?void 0:_t.props)||{},zt={},jt=(0,d.Z)((function(t){var e,n,i=Ot;return(null==i?void 0:i.contains(t))||(null===(e=(0,c.A)(i))||void 0===e?void 0:e.host)===t||t===i||(null==It?void 0:It.contains(t))||(null===(n=(0,c.A)(It))||void 0===n?void 0:n.host)===t||t===It||Object.values(xt.current).some((function(e){return(null==e?void 0:e.contains(t))||t===e}))})),Gt=L(o,ut,dt,ct),qt=L(o,ht,pt,ft),Ht=m.useState(C||!1),Qt=(0,r.Z)(Ht,2),Vt=Qt[0],Yt=Qt[1],Kt=null!=E?E:Vt,Xt=(0,d.Z)((function(t){void 0===E&&Yt(t)}));(0,p.Z)((function(){Yt(E||!1)}),[E]);var Wt=m.useRef(Kt);Wt.current=Kt;var Zt=m.useRef([]);Zt.current=[];var Jt=(0,d.Z)((function(t){var e;Xt(t),(null!==(e=Zt.current[Zt.current.length-1])&&void 0!==e?e:Kt)!==t&&(Zt.current.push(t),null==S||S(t))})),$t=m.useRef(),te=function(){clearTimeout($t.current)},ee=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;te(),0===e?Jt(t):$t.current=setTimeout((function(){Jt(t)}),1e3*e)};m.useEffect((function(){return te}),[]);var ne=m.useState(!1),ie=(0,r.Z)(ne,2),re=ie[0],se=ie[1];(0,p.Z)((function(t){t&&!Kt||se(!0)}),[Kt]);var ae=m.useState(null),oe=(0,r.Z)(ae,2),le=oe[0],ue=oe[1],he=m.useState([0,0]),ce=(0,r.Z)(he,2),de=ce[0],fe=ce[1],pe=function(t){fe([t.clientX,t.clientY])},ge=G(Kt,It,st?de:Ot,Z,$,tt,ot),me=(0,r.Z)(ge,11),ve=me[0],ye=me[1],Ae=me[2],be=me[3],we=me[4],Ee=me[5],xe=me[6],ke=me[7],Te=me[8],Ce=me[9],De=me[10],Se=D(wt,A,b,w),Ie=(0,r.Z)(Se,2),Re=Ie[0],Le=Ie[1],Be=Re.has("click"),Pe=Le.has("click")||Le.has("contextMenu"),Oe=(0,d.Z)((function(){re||De()}));H(Kt,Ot,It,Oe,(function(){Wt.current&&st&&Pe&&ee(!1)})),(0,p.Z)((function(){Oe()}),[de,Z]),(0,p.Z)((function(){!Kt||null!=$&&$[Z]||Oe()}),[JSON.stringify(tt)]);var Me=m.useMemo((function(){var t=R($,o,Ce,st);return l()(t,null==it?void 0:it(Ce))}),[Ce,it,$,o,st]);m.useImperativeHandle(n,(function(){return{nativeElement:Nt.current,forceAlign:Oe}}));var Ne=m.useState(0),Fe=(0,r.Z)(Ne,2),_e=Fe[0],Ue=Fe[1],ze=m.useState(0),je=(0,r.Z)(ze,2),Ge=je[0],qe=je[1],He=function(){if(nt&&Ot){var t=Ot.getBoundingClientRect();Ue(t.width),qe(t.height)}};function Qe(t,e,n,i){zt[t]=function(r){var s;null==i||i(r),ee(e,n);for(var a=arguments.length,o=new Array(a>1?a-1:0),l=1;l1?n-1:0),r=1;r1?n-1:0),r=1;r","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n")},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {","\t$0","}"].join("\n")},{label:"if",content:["if () {","\t$0","}"].join("\n")},{label:"for",content:["for(int j=0 ; j<10; j++){","\t$0","}"].join("\n")},{label:"trycatch",content:["try{","\t$0","}catch(ExceptionName e){","}"].join("\n")},{label:"using namespace std;",content:["using namespace std;"].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")}]},I={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join("\n")}]},R={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join("\n")}]},L=n(53184),B=n.n(L),P={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}};var O=n(82100),M=n.n(O),N=n(29186),F=n.n(N),_=n(85573),U=n.n(_),z=function(){function t(e,n,i){var r=this;M()(this,t),this.placeholder=e,this.editor=n,this.monaco=i,n.onDidChangeModelContent((function(){return r.onDidChangeModelContent()})),this.onDidChangeModelContent()}return F()(t,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return t.ID}},{key:"getDomNode",value:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}},{key:"getPosition",value:function(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"dispose",value:function(){this.editor.removeContentWidget(this)}}]),t}();U()(z,"ID","editor.widget.placeholderHint");var j=z,G=n(96236),q=n(8591),H=n(6848),Q=n(89392),V=n(1499),Y=n(56102),K=n(37712),X=["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder"];function W(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function Z(){}var J={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function $(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!t||""===t.trim())return!0;for(var n=wt.current.instance.getModel(),i=n.getLineTokens(e),r=!1,s=0;s<2;s++)1===i.getStandardTokenType(s)&&(r=!0);return r};function Ot(t){(window.navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)&&83==t.keyCode&&(t.preventDefault(),N())}(0,c.useEffect)((function(){var t,e=null===(t=wt.current)||void 0===t?void 0:t.instance;if(e&&Lt&&z){var n=e.onDidBlurEditorWidget((function(){St.current=!1})),i=e.onDidFocusEditorText((function(){St.current=!0}));return function(){n.dispose(),i.dispose()}}}),[wt.current,Lt,z]),(0,c.useEffect)((function(){var t;if(null!==(t=wt.current)&&void 0!==t&&t.instance&&Lt&&vt){var e=wt.current.instance,n=e.getModel();if(!n)return;!function(){var t,i=[],r=[],s=n.getAllDecorations(),a=E()(s);try{for(a.s();!(t=a.n()).done;){var o,l=t.value;if("highlighted-line"===l.options.className)i.push(null==l||null===(o=l.range)||void 0===o?void 0:o.startLineNumber),r.push(null==l?void 0:l.id)}}catch(t){a.e(t)}finally{a.f()}if(gt!==i[0]){n.deltaDecorations(r,[]);var u=n.getLineCount();gt&><=u&&(e.deltaDecorations([],[{range:new tt.Range(gt,1,gt,n.getLineMaxColumn(gt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),e.revealLineInCenter(gt))}}();var i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],s=n.getAllDecorations(),a=E()(s);try{for(a.s();!(t=a.n()).done;){var o,l=t.value;if("breakpoints-select"===l.options.linesDecorationsClassName)i.push(null==l||null===(o=l.range)||void 0===o?void 0:o.startLineNumber),r.push(null==l?void 0:l.id)}}catch(t){a.e(t)}finally{a.f()}if(e)return{lines:i,ids:r};ot(i)},r=function(){var t=l()(a()().mark((function t(e){var r;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={range:new tt.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},t.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),s=function(){var t=l()(a()().mark((function t(r){var s,o,l,u,h;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:s=[],o=e.getLineDecorations(r),l=E()(o);try{for(l.s();!(u=l.n()).done;)"breakpoints-select"===(h=u.value).options.linesDecorationsClassName&&s.push(h.id)}catch(t){l.e(t)}finally{l.f()}return t.next=6,n.deltaDecorations(s,[]);case 6:i();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o=function(t){var n,i=e.getLineDecorations(t),r=E()(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(t){r.e(t)}finally{r.f()}return!1};if(!(0,Q.isEqual)(ut,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var u=ut.map((function(t){return{range:new tt.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],u)}var h=e.onDidChangeModelContent((function(t){var a=e.getPosition();if(a){var l=a.lineNumber;clearTimeout(Dt.current),Dt.current=setTimeout((function(){Pt(n.getLineContent(l),l)?s(l):o(l)?(s(l),r(l)):i()}),100)}})),c=e.onMouseDown((function(t){var e;if(t.target.detail&&null!==(e=t.target)&&void 0!==e&&null!==(e=e.element)&&void 0!==e&&null!==(e=e.className)&&void 0!==e&&e.includes("line-numbers")){var i=t.target.position.lineNumber;if(Pt(n.getLineContent(i),i))return;o(i)?s(i):r(i)}})),d=function(){kt.current=e.deltaDecorations(kt.current,[])},f=e.onMouseMove((function(t){var i;if(d(),t.target.detail&&null!==(i=t.target)&&void 0!==i&&null!==(i=i.element)&&void 0!==i&&null!==(i=i.className)&&void 0!==i&&i.includes("line-numbers")){var r=t.target.position.lineNumber;if(Pt(n.getLineContent(r),r))return;!function(t){var n={range:new tt.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};kt.current=e.deltaDecorations(kt.current,[n])}(r)}})),p=e.onMouseLeave((function(){d()}));return function(){h.dispose(),c.dispose(),f.dispose(),p.dispose()}}}),[wt.current,Lt,ut,gt,vt,f]),(0,c.useEffect)((function(){var t;null!==(t=wt.current)&&void 0!==t&&t.instance&&vt&&wt.current.instance.setPosition({lineNumber:0,column:0})}),[gt]);var Mt=function(){if(_&&wt.current.instance){var t=wt.current.instance.getContentHeight();Ht(t0||i.target.offsetWidth>0)&&wt.current.instance.layout()}}catch(t){n.e(t)}finally{n.f()}}))).observe(bt.current),t}();return At&&"string"==typeof At&&new j(At,e,tt),Bt(!0),function(){var t=wt.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),wt.current.subscription&&wt.current.subscription.dispose(),r.unobserve(bt.current)}}catch(t){}}))}),[]),(0,c.useEffect)((function(){if(wt.current.instance&&Lt)return document.addEventListener("keydown",Ot,!1),function(){document.removeEventListener("keydown",Ot)}}),[N,Lt]),(0,c.useEffect)((function(){var t=wt.current.instance;if(t&&Lt){var e=$(f);tt.editor.setModelLanguage(t.getModel(),e)}}),[f,Lt]),(0,c.useEffect)((function(){wt.current.instance&&Lt&&tt.editor.setTheme(x)}),[x,Lt]),(0,c.useEffect)((function(){var t=wt.current.instance;Et.current=v,t&&Lt&&(t.updateOptions(r()({},v)),setTimeout((function(){t.getModel().updateOptions(r()({},v))}),200))}),[JSON.stringify(v),Lt]),(0,c.useEffect)((function(){var t=wt.current.instance;t&&Lt&&t.layout()}),[i,o,Lt]);var _t=(0,c.useState)(W(i)),Ut=h()(_t,2),zt=Ut[0],jt=(Ut[1],(0,c.useState)(W(o))),Gt=h()(jt,2),qt=Gt[0],Ht=Gt[1],Qt=r()(r()({},g),{},{width:zt,height:qt,position:"relative"});return(0,K.jsx)("div",{className:"my-monaco-editor",ref:bt,style:Qt,children:M&&(0,K.jsx)(Y.CopyToClipboard,{text:u,onCopy:function(){return q.ZP.success("复制成功")},children:(0,K.jsx)(H.Z,{title:"复制代码",children:(0,K.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,K.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};var nt=n(1079),it=n(26613),rt=n(46172),st=n(67390),at=n(78318),ot=function(t){var e,n,i,s,o,u,p=t.editOffice,g=void 0===p?"view":p,m=t.data,v=(t.theme,t.type),A=t.filename,b=t.monacoEditor,w=t.className,E=t.style,x=t.close,k=t.onClose,T=t.hasMask,C=t.disabledDownload,D=t.onImgDimensions,S=t.showNodata,I=t.recordInfo,R=(0,c.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=h()(R,2),B=(L[0],L[1],(0,c.useState)("")),P=h()(B,2),O=(P[0],P[1]),M=(0,c.useState)(),N=h()(M,2),F=N[0],_=N[1],U="build"===window.ENV?"/react/build":"",z=location.host.startsWith("localhost")?st.Z.PROXY_SERVER:st.Z.API_SERVER,j=(0,c.useRef)();null!==(e=m)&&void 0!==e&&e.startsWith("/api")&&"txt"!==v&&(m=st.Z.API_SERVER+m);A&&b&&(b.filename=A),(0,c.useEffect)((function(){var t,e=null===(t=document.cookie)||void 0===t||null===(t=t.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==e||e.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&O(e[1])}))}),[]),(0,c.useEffect)((function(){var t;"office"===v&&(m.indexOf("bigfilescdn.")>-1||m.indexOf("bigfiles1")>-1?_({url:m,fileType:(t=m,t.substring(t.lastIndexOf("/")+1).split(".").pop()),model:m.indexOf("model=edit")?"edit":"view"}):G())}),[v,m]);var G=function(){var t=l()(a()().mark((function t(){var e,n,i;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",m),e=m,m.startsWith("http")||(e=location.origin+e),n=new URL(e).pathname.split("/").pop(),t.next=6,(0,it.gJ)({attachment_id:n});case 6:(i=t.sent).url=z+i.url,_(i);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),q=function(){m.startsWith("http")||m.startsWith("blob:")?Q():(0,nt.Sv)(A||"educoder",m,A)},Q=function(){I&&(0,at.fc)({id:null==I?void 0:I.id,watch_type:1,course_id:null==I?void 0:I.course_id}),(0,nt.Nd)(A||"educoder",decodeURIComponent(m))};return(0,K.jsxs)("div",{style:r()({},E||{}),className:"".concat(T&&d.bgBlack," ").concat(v?d.wrp:"hide"),children:[x&&(0,K.jsxs)("div",{className:d.close,ref:j,children:[!!D&&(0,K.jsx)(H.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return j.current},children:(0,K.jsx)("span",{onClick:function(){k(),D()},children:(0,K.jsx)("i",{className:"icon-yulanpizhu"})})}),!C&&(0,K.jsx)(H.Z,{title:"点击下载此文件",getPopupContainer:function(){return j.current},children:(0,K.jsx)("span",{onClick:Q,children:(0,K.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,K.jsx)(H.Z,{title:"关闭",getPopupContainer:function(){return j.current},children:(0,K.jsx)("span",{className:"",onClick:k,children:(0,K.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,K.jsx)("div",{className:"".concat(d[w]," ").concat(w," ").concat(d.monaco," ").concat("txt"===v?"show":"hide"),children:"txt"===v&&(0,K.jsx)(K.Fragment,{children:(0,K.jsx)(et,r()({},b))})}),"audio"===v&&(0,K.jsx)("audio",{src:"".concat((null===(n=m)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=m)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(m),autoPlay:!0}),"video"===v&&(0,K.jsx)(K.Fragment,{children:(null===(s=m)||void 0===s?void 0:s.indexOf("http"))>-1?(0,K.jsx)("video",{controls:!0,src:"".concat(m),autoPlay:!0}):(0,K.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(m),autoPlay:!0})}),"office"===v&&F&&(0,K.jsx)("iframe",{src:"".concat(U,"/office.html?key=").concat(F.key,"&url=").concat(btoa(F.url),"&callbackUrl=").concat(z+(F.callbackUrl||""),"&fileType=").concat(F.fileType,"&title=").concat(F.title||"","&model=").concat(g,"&officeServer=").concat(st.Z.ONLYOFFICE,"&disabledDownload=").concat(!!C)}),"html"===v&&(0,K.jsx)("iframe",{src:m+"&disposition=inline"}),"pdf"===v&&(0,K.jsx)("iframe",{src:"".concat(U,"/js/pdfview/index.html?filename=").concat(A||"educoder.pdf","&url=").concat(encodeURIComponent(m),"&disabledDownload=").concat(!!C)}),"image"===v&&(0,K.jsx)("img",{src:"".concat((null===(o=m)||void 0===o?void 0:o.indexOf("http://"))>-1||(null===(u=m)||void 0===u?void 0:u.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(m)}),("other"===v||"download"===v)&&(0,K.jsx)(K.Fragment,{children:S?(0,K.jsx)(rt.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,K.jsx)(f.ZP,{icon:(0,K.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:q,disabled:C,children:"下载"})}):(0,K.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:q,disabled:C,children:[(0,K.jsx)(y,{}),"点击下载"]})})]})}},5627:function(t,e,n){"use strict";n.d(e,{Z:function(){return Q}});var i=n(82242),r=n.n(i),s=n(37205),a=n.n(s),o=n(91232),l=n.n(o),u=n(79800),h=n.n(u),c=n(59301),d=(n(8944),n(32834)),f=n.n(d),p=n(11690),g=1;var m=[],v=["