You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
21 KiB
1 line
21 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[96444],{72721:function(e,t,n){var i=n(82242),o=n.n(i),a=(n(59301),n(93314)),l=n(3113),c=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,s=e.styles,r=void 0===s?{}:s,d=e.customText,u=e.ButtonText,f=e.ButtonClick,p=e.Buttonclass,m=e.ButtonTwo,_=e.imgStyles,v=e.loading,x=void 0!==v&&v;return(0,c.jsxs)("section",{className:"tc animated fadeIn",style:o()(o()({},{color:"#999",margin:"100px auto",visibility:x?"hidden":"visible"}),r),children:[(0,c.jsx)("img",{src:t||a,style:o()(o()({},_),{},{pointerEvents:"none",userSelect:"none"})}),(0,c.jsx)("p",{className:"mt20 font14",children:d||"暂时还没有相关数据哦!"}),u&&(0,c.jsx)(l.ZP,o()(o()({className:p,onClick:f},i),{},{children:u})),m&&m]})}},83385:function(e,t,n){n.d(t,{Z:function(){return j}});var i=n(82242),o=n.n(i),a=n(7557),l=n.n(a),c=n(41498),s=n.n(c),r=n(79800),d=n.n(r),u=n(59301),f={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=n(3113),m=n(38827),_=n(40906),v=n(6848),x=n(23756),h=n(37924),g=n(72721),b=n(97730),y=n(36424),w=n(37712),j=function(e){var t,n,i,a,c,r,j=e.editOffice,k=void 0===j?"view":j,N=e.data,D=(e.theme,e.type),S=e.filename,I=e.monacoEditor,E=e.className,Z=e.style,F=e.close,C=e.onClose,P=e.hasMask,R=e.disabledDownload,V=e.onImgDimensions,B=e.showNodata,T=e.recordInfo,z=(0,u.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),L=d()(z,2),q=(L[0],L[1],(0,u.useState)("")),O=d()(q,2),A=(O[0],O[1]),U=(0,u.useState)(),W=d()(U,2),X=W[0],H=W[1],G="build"===window.ENV?"/react/build":"",J=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,M=(0,u.useRef)();null!==(t=N)&&void 0!==t&&t.startsWith("/api")&&"txt"!==D&&(N=b.Z.API_SERVER+N);S&&I&&(I.filename=S),(0,u.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&A(t[1])}))}),[]),(0,u.useEffect)((function(){var e;"office"===D&&(N.indexOf("bigfilescdn.")>-1||N.indexOf("bigfiles1")>-1?H({url:N,fileType:(e=N,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:N.indexOf("model=edit")?"edit":"view"}):Q())}),[D,N]);var Q=function(){var e=s()(l()().mark((function e(){var t,n,i;return l()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",N),t=N,N.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,h.gJ)({attachment_id:n});case 6:(i=e.sent).url=J+i.url,H(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){N.startsWith("http")||N.startsWith("blob:")?K():(0,x.Sv)(S||"educoder",N,S)},K=function(){T&&(0,y.fc)({id:null==T?void 0:T.id,watch_type:1,course_id:null==T?void 0:T.course_id}),(0,x.Nd)(S||"educoder",decodeURIComponent(N))};return(0,w.jsxs)("div",{style:o()({},Z||{}),className:"".concat(P&&f.bgBlack," ").concat(D?f.wrp:"hide"),children:[F&&(0,w.jsxs)("div",{className:f.close,ref:M,children:[!!V&&(0,w.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return M.current},children:(0,w.jsx)("span",{onClick:function(){C(),V()},children:(0,w.jsx)("i",{className:"icon-yulanpizhu"})})}),!R&&(0,w.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return M.current},children:(0,w.jsx)("span",{onClick:K,children:(0,w.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,w.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return M.current},children:(0,w.jsx)("span",{className:"",onClick:C,children:(0,w.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,w.jsx)("div",{className:"".concat(f[E]," ").concat(E," ").concat(f.monaco," ").concat("txt"===D?"show":"hide"),children:"txt"===D&&(0,w.jsx)(w.Fragment,{children:(0,w.jsx)(_.ZP,o()({},I))})}),"audio"===D&&(0,w.jsx)("audio",{src:"".concat((null===(n=N)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=N)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(N),autoPlay:!0}),"video"===D&&(0,w.jsx)(w.Fragment,{children:(null===(a=N)||void 0===a?void 0:a.indexOf("http"))>-1?(0,w.jsx)("video",{controls:!0,src:"".concat(N),autoPlay:!0}):(0,w.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(N),autoPlay:!0})}),"office"===D&&X&&(0,w.jsx)("iframe",{src:"".concat(G,"/office.html?key=").concat(X.key,"&url=").concat(btoa(X.url),"&callbackUrl=").concat(J+X.callbackUrl,"&fileType=").concat(X.fileType,"&title=").concat(X.title,"&model=").concat(k,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!R)}),"html"===D&&(0,w.jsx)("iframe",{src:N+"&disposition=inline"}),"pdf"===D&&(0,w.jsx)("iframe",{src:"".concat(G,"/js/pdfview/index.html?filename=").concat(S||"educoder.pdf","&url=").concat(encodeURIComponent(N),"&disabledDownload=").concat(!!R)}),"image"===D&&(0,w.jsx)("img",{src:"".concat((null===(c=N)||void 0===c?void 0:c.indexOf("http://"))>-1||(null===(r=N)||void 0===r?void 0:r.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(N)}),("other"===D||"download"===D)&&(0,w.jsx)(w.Fragment,{children:B?(0,w.jsx)(g.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,w.jsx)(p.ZP,{icon:(0,w.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Y,disabled:R,children:"下载"})}):(0,w.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:Y,disabled:R,children:[(0,w.jsx)(m.Z,{}),"点击下载"]})})]})}},36944:function(e,t,n){n.d(t,{Z:function(){return o}});var i=n(59301);function o(e,t){var n=(0,i.useRef)();(0,i.useEffect)((function(){n.current=e})),(0,i.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},62858:function(e,t,n){n.r(t),n.d(t,{default:function(){return H},formatQuery:function(){return X}});var i=n(7557),o=n.n(i),a=n(41498),l=n.n(a),c=n(82242),s=n.n(c),r=n(39647),d=n.n(r),u=n(59301),f=n(3858),p=n(71418),m="bg___eq_Aq",_="container___j770l",v="widthle___ouh1T",x=n(24334),h=n(45812),g=n(43418),b=n(31395),y=n(78673),w=n(64165),j={contentWrap:"contentWrap___xMJQi",title:"title___z4t4P",footer:"footer___CLzrT",footer_left:"footer_left___N2sZZ",footer_bfcs:"footer_bfcs___UmvUE",footer_bfcs_value:"footer_bfcs_value___yiYga",pingfen:"pingfen___aEEMe",fenshu:"fenshu___I6HCo",radioGroup:"radioGroup___RT1dL",wrap:"wrap___QZGSJ",introName:"introName___m17tA",rating:"rating___MXLBr",modalRating:"modalRating___aluwj",zdbf:"zdbf___9PNEF"},k=n(36944),N=n(27971),D=n(23756),S=n(37712),I=["videoDetail","globalSetting","loading","dispatch"],E=(0,f.connect)((function(e){var t=e.videoDetail,n=e.loading;return{videoDetail:t,globalSetting:e.globalSetting,loading:n}}))((function(e){var t=e.videoDetail,n=(e.globalSetting,e.loading,e.dispatch),i=(d()(e,I),t.queryParams),a=t.selectParams,c=t.videoList,r=(i.subject_id,i.videoId),f=a.checkBoxValue,p=a.radioValue,m={videoId:r},_=(0,u.useRef)(),v=(0,u.useRef)(),D=((0,u.useRef)(),(0,u.useRef)(5)),E=(t.detail||{}).video_item;(0,k.Z)(l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!v.current){e.next=5;break}return console.log("videoRef lastUpdatedTime: ",_.current.getLastUpdatedTime()),console.log(_.current),e.next=5,Z();case 5:case"end":return e.stop()}}),e)}))),1e3*D.current);var Z=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?{is_f:1}:{};return(0,N.DH)(s()(s()({},t),{id:m.videoId,point:_.current.getLastUpdatedTime(),total:_.current.getDuration()}))};return(0,S.jsx)("aside",{className:j.contentWrap,children:(0,S.jsxs)("aside",{className:j.wrap,children:[(0,S.jsx)("header",{}),(0,S.jsx)("div",{className:j.title,children:null==E?void 0:E.name}),null!=E&&E.can_edit||null!=E&&E.is_public?(0,S.jsx)(h.Z,{ref:_,startTime:null==E?void 0:E.last_point,src:null!=E&&E.is_link?null==E?void 0:E.link:(null==E?void 0:E.play_url)&&x.Base64.decode(null==E?void 0:E.play_url),videoId:null==E?void 0:E.video_id,logWatchHistory:function(e){return"1"===e.ed&&(v.current=!1,Z(!0)),v.current||e.ed||(v.current=!0,D.current=_.current.getDuration()<=5?1:5,Z()),n({type:"userDetail/logWatchHistory",payload:e})},handlePause:function(){v.current=!1},handlePlay:function(){v.current=!0},allow_skip:null==E?void 0:E.allow_skip,handlePlayEnded:function(e){var t=window.filterVideoSign,i=t.findIndex((function(e){return e.id===r}));if(!(i===t.length-1)){var o=t[i+1].id,a=t[i+1].can_view,l=t[i+1].link,c=t[i+1].is_public;if(window.checkBoxValue){if(l)return void window.open(l);if(!a)return void g.Z.info({centered:!0,width:400,okText:"知道啦",icon:null,content:(0,S.jsx)("div",{className:"tc font14",children:"下一条视频为创建者所属单位内部教学资料,外单位用户无观看权限"})});if(!c)return void g.Z.info({centered:!0,width:400,okText:"知道啦",icon:null,content:(0,S.jsx)("div",{className:"tc font14",children:"下一条视频暂未公开,敬请期待"})});n({type:"videoDetail/handleListItemClick",payload:{videoId:o}}),window.videoTimer=setTimeout((function(){e.current.play()}),2e3)}}},toLog:function(){}}):(0,S.jsx)(w.Z,{description:"当前视频暂未公开,敬请期待"}),(0,S.jsxs)("div",{className:j.footer,children:[(0,S.jsxs)("div",{className:j.footer_left,children:[(0,S.jsx)("div",{className:j.pingfen,children:"评分"}),(0,S.jsx)(b.Z,{value:null==E?void 0:E.star,disabled:!0,className:j.rating,style:{color:"#FFA100",fontSize:12,marginLeft:10}}),(0,S.jsxs)("div",{className:j.fenshu,children:[(null==E?void 0:E.star)||0,"分"]})]}),null!=E&&E.can_edit||null!=E&&E.is_public?(0,S.jsx)("div",{children:(0,S.jsx)("div",{className:j.checkBox,children:c.findIndex((function(e){return e.id===r}))===c.length-1?(0,S.jsx)("div",{children:"当前已是最后一个视频"}):(0,S.jsxs)("div",{children:[(0,S.jsx)(y.Z,{onChange:function(e){!function(e,t){if("checkBox"===e){var i=t;return window.checkBoxValue=i,void n({type:"videoDetail/setSelectValue",payload:{radioValue:p,checkBoxValue:i}})}n({type:"videoDetail/setSelectValue",payload:{checkBoxValue:f,radioValue:t.target.value}})}("checkBox",e)},defaultChecked:f,size:"small"}),(0,S.jsx)("span",{className:j.zdbf,children:"自动播放下一个视频"})]})})}):null]}),(0,S.jsx)("div",{className:"mt10",children:(null==E?void 0:E.description)&&(0,S.jsxs)("span",{className:j.introName,children:["简介:",E.description]})})]})})})),Z=n(37205),F=n.n(Z),C=n(79800),P=n.n(C),R=n(8591),V=n(38318),B={flex_box_center:"flex_box_center___yWqSL",flex_space_between:"flex_space_between___LgFmv",flex_box_vertical_center:"flex_box_vertical_center____lt6U",flex_box_center_end:"flex_box_center_end___UqkaD",flex_box_column:"flex_box_column___V8XLF",list:"list___8tjfT",tree_style:"tree_style___ZzDvO",title:"title___IVfkQ",gray:"gray___RnyYk",brght:"brght___EWRNa",s1:"s1___dPBQg",s3:"s3___SRBBG",active:"active___hsNCX",tree_line:"tree_line___EGn30",tabs_style:"tabs_style___Nwkiq",tabs_item:"tabs_item___Vzu_U",tabs_item_active:"tabs_item_active___BcIwZ"},T=n(37924),z=n(44081),L=n(97730),q=["dispatch","pathsDetail","videoDetail","user"],O=[{name:"实践项目",type:"Shixun",icon:(0,S.jsx)("i",{className:"iconfont icon-shixun2 font20"}),bq:(0,S.jsx)("span",{style:{border:"1px solid #FF9D18",color:"#FF9D18"},className:B.s1,children:"实训"})},{name:"视频项目",type:"VideoItem",icon:(0,S.jsx)("i",{className:"iconfont icon-shipin font20"}),bq:(0,S.jsx)("span",{style:{border:"1px solid #9B18FF",color:"#9B18FF"},className:B.s1,children:"视频"})},{name:"教学课件",type:"Attachment",icon:(0,S.jsx)("i",{className:"iconfont icon-jiaoxueanli font20"}),bq:(0,S.jsx)("span",{style:{border:"1px solid #3061D0",color:"#3061D0"},className:B.s1,children:"资料"})},{name:"空目录",type:"StageCatalog",icon:(0,S.jsx)("i",{className:"iconfont icon-kongbai font20"}),bq:(0,S.jsx)("span",{})}],A=(0,f.connect)((function(e){var t=e.user,n=e.videoDetail,i=e.loading;return{user:t,videoDetail:n,globalSetting:e.globalSetting,loading:i,pathsDetail:e.pathsDetail}}))((function(e){var t=e.dispatch,n=e.pathsDetail,i=e.videoDetail,a=e.user,c=(d()(e,q),i.queryParams),r=i.stages,p=(i.cust_seq,i.active),m=c.subject_id,_=c.course_id,v=(0,f.useParams)(),x=(0,f.useSearchParams)(),h=(P()(x,1)[0],(0,u.useState)([])),b=P()(h,2),y=b[0],w=b[1],j=(0,u.useState)([(null==p?void 0:p.id)||Number(v.videoId)]),k=P()(j,2),I=k[0],E=k[1],Z=(0,u.useState)("课程资源目录"),C=P()(Z,2),A=C[0],U=C[1],W=[".PDF",".DOC",".DOCX",".XLS",".XLSX",".PPT",".PPTX"];(0,u.useEffect)((function(){t(m?{type:"videoDetail/getStageData",payload:{subject_id:m,page_type:"video"}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:_}})}),[]),(0,u.useEffect)((function(){X()}),[null==i?void 0:i.stages]);var X=function(){var e=y;r.forEach((function(t,n){e.push({title:(0,S.jsx)("div",{title:t.stage_name,className:B.title,children:t.stage_name}),value:null==t?void 0:t.stage_id,key:null==t?void 0:t.stage_id,icon:(0,S.jsx)("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:H(t.items||[])})})),w(e)},H=function(e){function t(e){var n,i=e.children,o=Array.isArray(i)&&i.length>0,a=null==e?void 0:e.id,l=e.name,c=e.item_type,s=e.id,r=null===(n=O.find((function(e){return e.type===c})))||void 0===n?void 0:n.bq,d=B.brght;p.id===s&&"".concat(d," ").concat(B.active);return{title:(0,S.jsxs)("div",{onClick:function(){return Q(e)},className:d,title:l,children:[r,(0,S.jsx)("div",{className:B.s3,children:l})]}),value:a,key:a,icon:(0,S.jsx)("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:o?null==i?void 0:i.map((function(e){return t(e)})):[]}}return null==e?void 0:e.map((function(e){return t(e)}))},G=function(){var e=l()(o()().mark((function e(n,i){var a;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在进入实践项目,请稍后..."}}),!i){e.next=7;break}return e.next=4,(0,z.BK)({id:n});case 4:e.t0=e.sent,e.next=10;break;case 7:return e.next=9,(0,z.Ir)({id:n});case 9:e.t0=e.sent;case 10:if(a=e.t0,t({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),!(null!=a&&a.game_identifier||null!=a&&a.identifier)){e.next=15;break}return(0,D.xg)(i?"/tasks/".concat(null==a?void 0:a.identifier,"/jupyter"):"/tasks/".concat(a.game_identifier)),e.abrupt("return");case 15:2===(null==a?void 0:a.status)?M(null==a?void 0:a.message):3===(null==a?void 0:a.status)&&J(null==a?void 0:a.message);case 16:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),J=function(e){g.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,S.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},M=function e(t){var n,i;t=null!==(n=t)&&void 0!==n&&n.includes(".json")?t:"".concat(t,".json"),g.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,S.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(i=l()(o()().mark((function n(){var i,a;return o()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,T.$Q)({url:t});case 2:if(i=n.sent){n.next=5;break}return n.abrupt("return");case 5:return R.ZP.success("重置成功,正在进入实践项目!"),n.next=8,(0,z.Ir)({id:i.shixun_identifier});case 8:if(null==(a=n.sent)||!a.game_identifier){n.next=12;break}return(0,D.xg)("/tasks/".concat(a.game_identifier)),n.abrupt("return");case 12:2===(null==a?void 0:a.status)?e(null==a?void 0:a.message):3===(null==a?void 0:a.status)&&J(null==a?void 0:a.message);case 13:case"end":return n.stop()}}),n)}))),function(){return i.apply(this,arguments)})})},Q=function(e){if("StageCatalog"!==(null==e?void 0:e.item_type)){clearTimeout(window.videoTimer);var i,o,l=e.id,r=e.item_type,d=e.identifier,u=e.is_jupyter,f=e.url,p=e.link;if("VideoItem"===r&&!p)return null!==(i=a.userInfo)&&void 0!==i&&i.admin||null!==(o=a.userInfo)&&void 0!==o&&o.business||e.can_view?(t({type:"videoDetail/handleListItemClick",payload:{videoId:l}}),void t({type:"videoDetail/getVideoDetail",payload:s()(s()({id:l},c),{},{videoId:l}),callback:function(t){!t||!t.video_item||t.video_item.can_edit||e.is_public||g.Z.info({centered:!0,width:400,okText:"知道啦",icon:null,content:(0,S.jsx)("div",{className:"tc font14",children:"当前视频暂未公开,敬请期待"})})}})):void g.Z.info({centered:!0,width:400,okText:"知道啦",icon:null,content:(0,S.jsx)("div",{className:"tc font14",children:"当前视频为创建者所属单位内部教学资料,外单位用户无观看权限"})});if("VideoItem"===r&&p)return e.link&&(0,N.DH)({is_f:1,id:e.id,point:0,total:0}),void window.open(p);if("Shixun"!==r){if("Attachment"===r){var m,_;if(p)return void(0,D.xg)(p);var v,x=null==e||null===(m=e.name)||void 0===m?void 0:m.substr(null==e||null===(_=e.name)||void 0===_?void 0:_.lastIndexOf("."));return W.includes(x.toUpperCase())?void t({type:"videoDetail/handleListItemClick",payload:{attachmentId:l}}):null!==(v=n.detail)&&void 0!==v&&v.allow_download?void(0,D.FH)(e.name,L.Z.API_SERVER+e.url):void R.ZP.info("教学课件不支持下载")}window.open(L.Z.IMG_SERVER+f)}else G(d,u)}};return(0,S.jsxs)("aside",{className:B.list,children:[(0,S.jsx)("div",{className:B.tabs_style,children:(0,S.jsxs)("div",{className:B.tabs_item,onClick:function(){U("课程资源目录")},children:["课程资源目录","课程资源目录"==A&&(0,S.jsx)("div",{className:B.tabs_item_active})]})}),(0,S.jsx)("div",{className:B.tree_style,children:(null==y?void 0:y.length)>0&&(0,S.jsx)(V.Z,{selectedKeys:I,onSelect:function(e,t){E(F()(e))},blockNode:!0,treeData:y,defaultExpandAll:!0,className:B.tree_line})})]})})),U=n(83385),W=["videoDetail","globalSetting","loading","pathsDetail","dispatch"],X=function(e){var t=e.subject_id;return{subject_id:t,course_id:t}},H=(0,f.connect)((function(e){var t=e.videoDetail,n=e.loading;return{videoDetail:t,globalSetting:e.globalSetting,loading:n,pathsDetail:e.pathsDetail}}))((function(e){var t,n,i=e.videoDetail,a=(e.globalSetting,e.loading,e.pathsDetail),c=e.dispatch,r=(d()(e,W),i.queryParams),f=(i.videoList,i.attachmentList,i.active),x=r.subject_id;r.videoId;function h(){return(h=l()(o()().mark((function e(){return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,c({type:"pathsDetail/getPathsDetail",payload:{id:x}});case 2:e.sent;case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,u.useEffect)((function(){if(f){var e=f.item_type,t=f.id;"VideoItem"===e&&c({type:"videoDetail/getVideoDetail",payload:s()(s()({},r),{},{id:t})})}}),[f.id]),console.log("---",f),(0,u.useEffect)((function(){x&&function(){h.apply(this,arguments)}()}),[]),(0,u.useEffect)((function(){var e;(0,D.Dk)(null===(e=i.detail)||void 0===e||null===(e=e.video_item)||void 0===e?void 0:e.name)}),[i]);var g={width:1200};return f&&"Attachment"===f.item_type&&"application/pdf"===f.content_type&&(g={width:1250,marginLeft:(document.body.clientWidth-1200)/2}),(0,S.jsx)(p.Z,{spinning:!1,children:(0,S.jsx)("section",{className:m,children:(0,S.jsxs)("div",{className:_,style:g,children:[(0,S.jsx)(A,{}),f&&"VideoItem"===f.item_type&&(0,S.jsx)(E,{}),f&&"Attachment"===f.item_type&&"application/pdf"===f.content_type&&f.url&&(0,S.jsx)("div",{className:v,children:(0,S.jsx)(U.Z,{disabledDownload:!(null!==(t=a.detail)&&void 0!==t&&t.allow_download),type:"pdf",filename:f.name,data:L.Z.API_SERVER+f.url,style:{position:"absolute",zIndex:1}})}),f&&"Attachment"===f.item_type&&["application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.wordprocessingml.document"].includes(f.content_type)&&f.url&&(0,S.jsx)("div",{className:v,children:(0,S.jsx)(U.Z,{disabledDownload:!(null!==(n=a.detail)&&void 0!==n&&n.allow_download),type:"office",data:L.Z.API_SERVER+f.url,style:{position:"absolute",zIndex:1}})})]})})})}))},26653:function(e,t,n){function i(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function o(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}n.d(t,{BU:function(){return o},Dj:function(){return i},gH:function(){return a},vp:function(){return l}});var a=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function l(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",e),null!=e}}}]); |