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.
NewEduCoderBuild/p__Video__Detail__id.1839e2...

2 lines
25 KiB

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[6444],{57931:function(Ne,K,o){var m=o(59301),x=o(93314),X=o(3113),Z=Object.defineProperty,N=Object.defineProperties,T=Object.getOwnPropertyDescriptors,A=Object.getOwnPropertySymbols,pe=Object.prototype.hasOwnProperty,Fe=Object.prototype.propertyIsEnumerable,ne=(_,u,O)=>u in _?Z(_,u,{enumerable:!0,configurable:!0,writable:!0,value:O}):_[u]=O,g=(_,u)=>{for(var O in u||(u={}))pe.call(u,O)&&ne(_,O,u[O]);if(A)for(var O of A(u))Fe.call(u,O)&&ne(_,O,u[O]);return _},d=(_,u)=>N(_,T(u));const de=({img:_,buttonProps:u={},styles:O={},customText:le,ButtonText:re,ButtonClick:Ee,Buttonclass:_e,ButtonTwo:C,imgStyles:a,loading:h=!1})=>m.createElement("section",{className:"tc animated fadeIn",style:g(g({},{color:"#999",margin:"100px auto",visibility:h?"hidden":"visible"}),O)},m.createElement("img",{src:_||x,style:d(g({},a),{pointerEvents:"none",userSelect:"none"})}),m.createElement("p",{className:"mt20 font14"},le||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),re&&m.createElement(X.ZP,g({className:_e,onClick:Ee},u),re),C&&C);K.Z=de},66322:function(Ne,K,o){o.d(K,{Z:function(){return _e}});var m=o(59301),x={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},X=o(3113),Z=o(24758),N=o(3840),T=o(95435),A=o(13330),pe=o(38100),Fe=o(57931),ne=o(71848),g=o(32463),d=o(59301),de=Object.defineProperty,_=Object.getOwnPropertySymbols,u=Object.prototype.hasOwnProperty,O=Object.prototype.propertyIsEnumerable,le=(C,a,h)=>a in C?de(C,a,{enumerable:!0,configurable:!0,writable:!0,value:h}):C[a]=h,re=(C,a)=>{for(var h in a||(a={}))u.call(a,h)&&le(C,h,a[h]);if(_)for(var h of _(a))O.call(a,h)&&le(C,h,a[h]);return C},Ee=(C,a,h)=>new Promise((D,W)=>{var ue=U=>{try{v(h.next(U))}catch(G){W(G)}},he=U=>{try{v(h.throw(U))}catch(G){W(G)}},v=U=>U.done?D(U.value):Promise.resolve(U.value).then(ue,he);v((h=h.apply(C,a)).next())}),_e=({editOffice:C="view",data:a,theme:h,type:D,filename:W,monacoEditor:ue,className:he,style:v,close:U,onClose:G,hasMask:ye,disabledDownload:s,onImgDimensions:Oe,showNodata:je,recordInfo:me})=>{const[De,Te]=(0,m.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[ze,Ie]=(0,m.useState)(""),[se,Se]=(0,m.useState)(),Ae=window.ENV==="build"?"/react/build":"",we=location.host.startsWith("localhost")?ne.Z.PROXY_SERVER:ne.Z.API_SERVER,Ke=10*(1024*1024),ge=(0,m.useRef)();a!=null&&a.startsWith("/api")&&D!=="txt"&&(a=ne.Z.API_SERVER+a);const Le=H=>H.substring(H.lastIndexOf("/")+1).split(".").pop();W&&ue&&(ue.filename=W),(0,m.useEffect)(()=>{var H,J;const Q=(J=(H=document.cookie)==null?void 0:H.replace(/\s/g,""))==null?void 0:J.split(";");Q==null||Q.map(Ze=>{let be=Ze.split("=");be[0]==="_educoder_session"&&Ie(be[1])})},[]),(0,m.useEffect)(()=>{D==="office"&&(a.indexOf("bigfilescdn.")>-1||a.indexOf("bigfiles1")>-1?Se({url:a,fileType:Le(a),model:a.indexOf("model=edit")?"edit":"view"}):M())},[D,a]);const M=()=>Ee(void 0,null,function*(){console.log("data:",a);let H=a;a.startsWith("http")||(H=location.origin+H);let J=new URL(H).pathname.split("/").pop();const Q=yield(0,pe.gJ)({attachment_id:J});Q.url=we+Q.url,Se(Q)}),Ve=()=>{if(a.startsWith("http")||a.startsWith("blob:")){ke();return}(0,A.Sv)(W||"educoder",a,W)},ke=()=>{me&&(0,g.fc)({id:me==null?void 0:me.id,watch_type:1,course_id:me==null?void 0:me.course_id}),(0,A.Nd)(W||"educoder",decodeURIComponent(a))};return d.createElement("div",{style:re({},v||{}),className:`${ye&&x.bgBlack} ${D?x.wrp:"hide"}`},U&&d.createElement("div",{className:x.close,ref:ge},!!Oe&&d.createElement(T.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>ge.current},d.createElement("span",{onClick:()=>{G(),Oe()}},d.createElement("i",{className:"icon-yulanpizhu"}))),!s&&d.createElement(T.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>ge.current},d.createElement("span",{onClick:ke},d.createElement("i",{className:"icon-quxiaozhiding"}))),d.createElement(T.Z,{title:"\u5173\u95ED",getPopupContainer:()=>ge.current},d.createElement("span",{className:"",onClick:G},d.createElement("i",{className:"icon-guanbi1"})))),d.createElement("div",{className:`${x[he]} ${he} ${x.monaco} ${D==="txt"?"show":"hide"}`},D==="txt"&&d.createElement(d.Fragment,null,d.createElement(N.ZP,re({},ue)))),D==="audio"&&d.createElement("audio",{src:`${(a==null?void 0:a.indexOf("http://"))>-1||(a==null?void 0:a.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${a}`,autoPlay:!0}),D==="video"&&d.createElement(d.Fragment,null,(a==null?void 0:a.indexOf("http"))>-1?d.createElement("video",{controls:!0,src:`${a}`,autoPlay:!0}):d.createElement("video",{controls:!0,src:`data:video/mp4;base64,${a}`,autoPlay:!0})),D==="office"&&se&&d.createElement("iframe",{src:`${Ae}/office.html?key=${se.key}&url=${btoa(se.url)}&callbackUrl=${we+se.callbackUrl}&fileType=${se.fileType}&title=${se.title}&model=${C}&officeServer=${ne.Z.ONLYOFFICE}&disabledDownload=${!!s}`}),D==="html"&&d.createElement("iframe",{src:a+"&disposition=inline"}),D==="pdf"&&d.createElement("iframe",{src:`${Ae}/js/pdfview/index.html?filename=${W||"educoder.pdf"}&url=${encodeURIComponent(a)}&disabledDownload=${!!s}`}),D==="image"&&d.createElement("img",{src:`${(a==null?void 0:a.indexOf("http://"))>-1||(a==null?void 0:a.indexOf("https://"))>-1?"":"data:image/png;base64,"}${a}`}),(D==="other"||D==="download")&&d.createElement(d.Fragment,null,je?d.createElement(Fe.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:d.createElement(X.ZP,{icon:d.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ve,disabled:s},"\u4E0B\u8F7D")}):d.createElement(X.ZP,{type:"primary",size:"middle",onClick:Ve,disabled:s},d.createElement(Z.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")))}},15492:function(Ne,K,o){o.d(K,{Z:function(){return x}});var m=o(59301);function x(X,Z){const N=(0,m.useRef)();(0,m.useEffect)(()=>{N.current=X}),(0,m.useEffect)(()=>{function T(){N.current()}if(Z!==null){let A=setInterval(T,Z);return()=>clearInterval(A)}},[Z])}},52061:function(Ne,K,o){o.r(K),o.d(K,{default:function(){return tt},formatQuery:function(){return qe}});var m=o(59301),x=o(41167),X=o(71418),Z={bg:"bg___eq_Aq",container:"container___j770l",widthle:"widthle___ouh1T"},N=o(24334),T=o(53426),A=o(43418),pe=o(1911),Fe=o(78673),ne=o(64165),g={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"},d=o(15492),de=o(33714),_=o(13330),u=o(59301),O=Object.defineProperty,le=Object.getOwnPropertySymbols,re=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable,_e=(n,t,e)=>t in n?O(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,C=(n,t)=>{for(var e in t||(t={}))re.call(t,e)&&_e(n,e,t[e]);if(le)for(var e of le(t))Ee.call(t,e)&&_e(n,e,t[e]);return n},a=(n,t)=>{var e={};for(var r in n)re.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&le)for(var r of le(n))t.indexOf(r)<0&&Ee.call(n,r)&&(e[r]=n[r]);return e},h=(n,t,e)=>new Promise((r,I)=>{var B=f=>{try{w(e.next(f))}catch(y){I(y)}},Y=f=>{try{w(e.throw(f))}catch(y){I(y)}},w=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,Y);w((e=e.apply(n,t)).next())});const D=n=>{var t=n,{videoDetail:e,globalSetting:r,loading:I,dispatch:B}=t,Y=a(t,["videoDetail","globalSetting","loading","dispatch"]);const{queryParams:w,selectParams:f,videoList:y}=e,{subject_id:q,videoId:fe}=w,{checkBoxValue:Pe,radioValue:E}=f,ce={videoId:fe},ve={query:w},ae=(0,m.useRef)(),ee=(0,m.useRef)(),ie=(0,m.useRef)(),te=(0,m.useRef)(5),{video_item:c}=e.detail||{};(0,d.Z)(()=>h(void 0,null,function*(){ee.current&&(console.log("videoRef lastUpdatedTime: ",ae.current.getLastUpdatedTime()),console.log(ae.current),yield xe())}),te.current*1e3);const xe=(R=!1)=>{const L=R?{is_f:1}:{};return(0,de.DH)(C(C({},L),{id:ce.videoId,point:ae.current.getLastUpdatedTime(),total:ae.current.getDuration()}))},We=R=>(R.ed==="1"&&(ee.current=!1,xe(!0)),!ee.current&&!R.ed&&(ee.current=!0,te.current=ae.current.getDuration()<=5?1:5,xe()),B({type:"userDetail/logWatchHistory",payload:R})),Ue=()=>{ee.current=!1},Me=()=>{ee.current=!0},He=()=>{ie.current=5,A.default.confirm({width:600,centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u8BF7\u7ED9\u672C\u89C6\u9891\u8BC4\u5206",content:u.createElement("div",{className:"tc font14"},u.createElement(pe.Z,{defaultValue:ie.current,onChange:R=>ie.current=R,className:g.modalRating})),onOk:()=>h(void 0,null,function*(){if((yield(0,de.jK)({id:ce.videoId,star:ie.current})).status===0){const{course_id:L}=(0,_.oP)();B({type:"videoDetail/getVideoDetail",payload:{id:ce.videoId,videoId:ce.videoId,course_id:L,subject_id:q}})}})})},$e=R=>{const L=window.filterVideoSign,l=L.findIndex(k=>k.id===fe);if(l===L.length-1)return;const i=L[l+1].id,S=L[l+1].can_view,b=L[l+1].link,V=L[l+1].is_public;if(window.checkBoxValue){if(b){window.open(b);return}if(!S){A.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:u.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}if(!V){A.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:u.createElement("div",{className:"tc font14"},"\u4E0B\u4E00\u6761\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}B({type:"videoDetail/handleListItemClick",payload:{videoId:i}}),window.videoTimer=setTimeout(()=>{R.current.play()},2e3)}},Ce=(R,L)=>{if(R==="checkBox"){const l=L;window.checkBoxValue=l,B({type:"videoDetail/setSelectValue",payload:{radioValue:E,checkBoxValue:l}});return}B({type:"videoDetail/setSelectValue",payload:{checkBoxValue:Pe,radioValue:L.target.value}})},Xe=()=>y.findIndex(l=>l.id===fe)===y.length-1?u.createElement("div",null,"\u5F53\u524D\u5DF2\u662F\u6700\u540E\u4E00\u4E2A\u89C6\u9891"):u.createElement("div",null,u.createElement(Fe.Z,{onChange:l=>{Ce("checkBox",l)},defaultChecked:Pe,size:"small"}),u.createElement("span",{className:g.zdbf},"\u81EA\u52A8\u64AD\u653E\u4E0B\u4E00\u4E2A\u89C6\u9891"));return u.createElement("aside",{className:g.contentWrap},u.createElement("aside",{className:g.wrap},u.createElement("header",null),u.createElement("div",{className:g.title},c==null?void 0:c.name),!(c!=null&&c.can_edit)&&!(c!=null&&c.is_public)?u.createElement(ne.Z,{description:"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85"}):u.createElement(T.Z,{ref:ae,startTime:c==null?void 0:c.last_point,src:c!=null&&c.is_link?c==null?void 0:c.link:(c==null?void 0:c.play_url)&&N.Base64.decode(c==null?void 0:c.play_url),videoId:c==null?void 0:c.video_id,logWatchHistory:We,handlePause:Ue,handlePlay:Me,allow_skip:c==null?void 0:c.allow_skip,handlePlayEnded:$e,toLog:()=>{}}),u.createElement("div",{className:g.footer},u.createElement("div",{className:g.footer_left},u.createElement("div",{className:g.pingfen},"\u8BC4\u5206"),u.createElement(pe.Z,{value:c==null?void 0:c.star,disabled:!0,className:g.rating,style:{color:"#FFA100",fontSize:12,marginLeft:10}}),u.createElement("div",{className:g.fenshu},(c==null?void 0:c.star)||0,"\u5206")),!(c!=null&&c.can_edit)&&!(c!=null&&c.is_public)?null:u.createElement("div",null,u.createElement("div",{className:g.checkBox},Xe()))),u.createElement("div",{className:"mt10"},(c==null?void 0:c.description)&&u.createElement("span",{className:g.introName},"\u7B80\u4ECB\uFF1A",c.description))))};var W=(0,x.connect)(({videoDetail:n,loading:t,globalSetting:e})=>({videoDetail:n,globalSetting:e,loading:t}))(D),ue=o(8591),he=o(34439),v={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"},U=o(38100),G=o(8091),ye=o(71848),s=o(59301),Oe=Object.defineProperty,je=Object.defineProperties,me=Object.getOwnPropertyDescriptors,De=Object.getOwnPropertySymbols,Te=Object.prototype.hasOwnProperty,ze=Object.prototype.propertyIsEnumerable,Ie=(n,t,e)=>t in n?Oe(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,se=(n,t)=>{for(var e in t||(t={}))Te.call(t,e)&&Ie(n,e,t[e]);if(De)for(var e of De(t))ze.call(t,e)&&Ie(n,e,t[e]);return n},Se=(n,t)=>je(n,me(t)),Ae=(n,t)=>{var e={};for(var r in n)Te.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&De)for(var r of De(n))t.indexOf(r)<0&&ze.call(n,r)&&(e[r]=n[r]);return e},we=(n,t,e)=>new Promise((r,I)=>{var B=f=>{try{w(e.next(f))}catch(y){I(y)}},Y=f=>{try{w(e.throw(f))}catch(y){I(y)}},w=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,Y);w((e=e.apply(n,t)).next())});const Re=[{name:"\u5B9E\u8DF5\u9879\u76EE",type:"Shixun",icon:s.createElement("i",{className:"iconfont icon-shixun2 font20"}),bq:s.createElement("span",{style:{border:"1px solid #FF9D18",color:"#FF9D18"},className:v.s1},"\u5B9E\u8BAD")},{name:"\u89C6\u9891\u9879\u76EE",type:"VideoItem",icon:s.createElement("i",{className:"iconfont icon-shipin font20"}),bq:s.createElement("span",{style:{border:"1px solid #9B18FF",color:"#9B18FF"},className:v.s1},"\u89C6\u9891")},{name:"\u6559\u5B66\u8BFE\u4EF6",type:"Attachment",icon:s.createElement("i",{className:"iconfont icon-jiaoxueanli font20"}),bq:s.createElement("span",{style:{border:"1px solid #3061D0",color:"#3061D0"},className:v.s1},"\u8D44\u6599")},{name:"\u7A7A\u76EE\u5F55",type:"StageCatalog",icon:s.createElement("i",{className:"iconfont icon-kongbai font20"}),bq:s.createElement("span",null)}],Ke=n=>{var t=n,{dispatch:e,pathsDetail:r,videoDetail:I,user:B}=t,Y=Ae(t,["dispatch","pathsDetail","videoDetail","user"]);const{queryParams:w,stages:f,cust_seq:y,active:q}=I,{subject_id:fe,course_id:Pe}=w,E=(0,x.useParams)(),[ce]=(0,x.useSearchParams)(),[ve,ae]=(0,m.useState)([]),[ee,ie]=(0,m.useState)([(q==null?void 0:q.id)||Number(E.videoId)]),[te,c]=(0,m.useState)("\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55"),xe=[".PDF",".DOC",".DOCX",".XLS",".XLSX",".PPT",".PPTX"];(0,m.useEffect)(()=>{e(fe?{type:"videoDetail/getStageData",payload:{subject_id:fe,page_type:"video"}}:{type:"videoDetail/getCourseStageData",payload:{coursesId:Pe}})},[]),(0,m.useEffect)(()=>{We()},[I==null?void 0:I.stages]);const We=()=>{let l=ve;f.forEach((p,i)=>{l.push({title:s.createElement("div",{title:p.stage_name,className:v.title},p.stage_name),value:p==null?void 0:p.stage_id,key:p==null?void 0:p.stage_id,icon:s.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:Ue(p.items||[])})}),ae(l)},Ue=l=>{function p(i){var S;const b=i.children,V=Array.isArray(b)&&b.length>0,k=i==null?void 0:i.id,{name:F,item_type:$,id:P}=i,oe=(S=Re.find(Be=>Be.type===$))==null?void 0:S.bq,j=v.brght,z=q.id===P?`${j} ${v.active}`:j;return{title:s.createElement("div",{onClick:()=>Ce(i),className:j,title:F},oe,s.createElement("div",{className:v.s3},F)),value:k,key:k,icon:s.createElement("i",{className:"iconfont icon-wenjianjia2 c-light-primary mr10",style:{lineHeight:"19px"}}),children:V?b==null?void 0:b.map(Be=>p(Be)):[]}}return l==null?void 0:l.map(i=>p(i))},Me=(l,p)=>we(void 0,null,function*(){e({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF0C\u8BF7\u7A0D\u540E..."}});const i=p?yield(0,G.BK)({id:l}):yield(0,G.Ir)({id:l});if(e({type:"globalSetting/setGlobalLoading",payload:{show:!1,text:""}}),i!=null&&i.game_identifier||i!=null&&i.identifier){(0,_.xg)(p?`/tasks/${i==null?void 0:i.identifier}/jupyter`:`/tasks/${i.game_identifier}`);return}(i==null?void 0:i.status)===2?$e(i==null?void 0:i.message):(i==null?void 0:i.status)===3&&He(i==null?void 0:i.message)}),He=l=>{A.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:s.createElement("div",{className:"tc font16"},"\u76EE\u524D\u8BE5\u5B9E\u8DF5\u9879\u76EE\u5C1A\u5728\u5185\u6D4B\u4E2D\uFF0C\u5C06\u4E8E",l,"\u4E4B\u540E\u5F00\u653E\uFF0C\u8C22\u8C22\uFF01")})},$e=l=>{l=l!=null&&l.includes(".json")?l:`${l}.json`,A.default.confirm({centered:!0,title:"\u63D0\u793A",okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:s.createElement("div",{className:"tc font16"},"\u5B9E\u8BAD\u5DF2\u7ECF\u66F4\u65B0\u4E86\uFF0C\u6B63\u5728\u4E3A\u60A8\u91CD\u7F6E!"),onOk:()=>we(void 0,null,function*(){const p=yield(0,U.L8)({url:l});if(!p)return;ue.ZP.success("\u91CD\u7F6E\u6210\u529F\uFF0C\u6B63\u5728\u8FDB\u5165\u5B9E\u8DF5\u9879\u76EE\uFF01");const i=yield(0,G.Ir)({id:p.shixun_identifier});if(i!=null&&i.game_identifier){(0,_.xg)(`/tasks/${i.game_identifier}`);return}(i==null?void 0:i.status)===2?$e(i==null?void 0:i.message):(i==null?void 0:i.status)===3&&He(i==null?void 0:i.message)})})},Ce=l=>{var p,i,S,b,V;if((l==null?void 0:l.item_type)==="StageCatalog")return;clearTimeout(window.videoTimer);const{id:k,item_type:F,identifier:$,is_jupyter:P,url:oe,link:j}=l;if(F==="VideoItem"&&!j){if(!((p=B.userInfo)!=null&&p.admin)&&!((i=B.userInfo)!=null&&i.business)&&!l.can_view){A.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:s.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u4E3A\u521B\u5EFA\u8005\u6240\u5C5E\u5355\u4F4D\u5185\u90E8\u6559\u5B66\u8D44\u6599\uFF0C\u5916\u5355\u4F4D\u7528\u6237\u65E0\u89C2\u770B\u6743\u9650")});return}e({type:"videoDetail/handleListItemClick",payload:{videoId:k}}),e({type:"videoDetail/getVideoDetail",payload:Se(se({id:k},w),{videoId:k}),callback:z=>{if(z&&z.video_item&&!z.video_item.can_edit&&!l.is_public){A.default.info({centered:!0,width:400,okText:"\u77E5\u9053\u5566",icon:null,content:s.createElement("div",{className:"tc font14"},"\u5F53\u524D\u89C6\u9891\u6682\u672A\u516C\u5F00\uFF0C\u656C\u8BF7\u671F\u5F85")});return}}});return}if(F==="VideoItem"&&j){l.link&&(0,de.DH)({is_f:1,id:l.id,point:0,total:0}),window.open(j);return}if(F==="Shixun"){Me($,P);return}if(F==="Attachment"){if(j){(0,_.xg)(j);return}let z=(b=l==null?void 0:l.name)==null?void 0:b.substr((S=l==null?void 0:l.name)==null?void 0:S.lastIndexOf("."));if(xe.includes(z.toUpperCase())){e({type:"videoDetail/handleListItemClick",payload:{attachmentId:k}});return}else{if(!((V=r.detail)!=null&&V.allow_download)){ue.ZP.info("\u6559\u5B66\u8BFE\u4EF6\u4E0D\u652F\u6301\u4E0B\u8F7D");return}(0,_.FH)(l.name,ye.Z.API_SERVER+l.url);return}}window.open(ye.Z.IMG_SERVER+oe)},Xe=l=>{let p=["\u96F6","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D"],i=["","\u5341","\u767E","\u5343","\u4E07"];l=parseInt(l);let S=k=>{let F=k.toString().split("").reverse(),$="";for(var P=0;P<F.length;P++)$=(P==0&&F[P]==0||P>0&&F[P]==0&&F[P-1]==0?"":p[F[P]]+(F[P]==0?i[0]:i[P]))+$;return $},b=Math.floor(l/1e4),V=l%1e4;return V.toString().length<4&&(V="0"+V),b?S(b)+"\u4E07"+S(V):S(l)},R=(l,p,i,S)=>{var b;const{name:V,item_type:k,id:F}=l,$=`${p+1}-${i+1}-${S+1}`,P=(b=Re.find(z=>z.type===k))==null?void 0:b.icon,oe=v.brght,j=q.id===F?`${oe} ${v.active}`:oe;return s.createElement("div",{key:$,onClick:()=>Ce(l),className:j,style:{paddingLeft:52}},s.createElement("span",{className:v.s1},P),!!y&&s.createElement("span",{className:v.s2},$),s.createElement("span",{className:v.s3},"\u203B ",V))},L=(l,p,i)=>{var S;const{name:b,item_type:V,id:k,children:F}=l,$=`${p+1}-${i+1}`,P=(S=Re.find(z=>z.type===V))==null?void 0:S.icon,oe=v.brght,j=q.id===k?`${oe} ${v.active}`:oe;return s.createElement(m.Fragment,{key:$},s.createElement("div",{onClick:()=>Ce(l),className:j},s.createElement("span",{className:v.s1},P),!!y&&s.createElement("span",{className:v.s2},$),s.createElement("span",{className:v.s3},"\u203B ",b)),!!F.length&&F.map((z,Be)=>R(z,p,i,Be)))};return s.createElement("aside",{className:v.list},s.createElement("div",{className:v.tabs_style},s.createElement("div",{className:v.tabs_item,onClick:()=>{c("\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55")}},"\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55",te=="\u8BFE\u7A0B\u8D44\u6E90\u76EE\u5F55"&&s.createElement("div",{className:v.tabs_item_active}))),s.createElement("div",{className:v.tree_style},(ve==null?void 0:ve.length)>0&&s.createElement(he.default,{selectedKeys:ee,onSelect:(l,p)=>{ie([...l])},blockNode:!0,treeData:ve,defaultExpandAll:!0,className:v.tree_line})))};var ge=(0,x.connect)(({user:n,videoDetail:t,loading:e,globalSetting:r,pathsDetail:I})=>({user:n,videoDetail:t,globalSetting:r,loading:e,pathsDetail:I}))(Ke),Le=o(66322),M=o(59301),Ve=Object.defineProperty,ke=Object.defineProperties,H=Object.getOwnPropertyDescriptors,J=Object.getOwnPropertySymbols,Q=Object.prototype.hasOwnProperty,Ze=Object.prototype.propertyIsEnumerable,be=(n,t,e)=>t in n?Ve(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,Ge=(n,t)=>{for(var e in t||(t={}))Q.call(t,e)&&be(n,e,t[e]);if(J)for(var e of J(t))Ze.call(t,e)&&be(n,e,t[e]);return n},Je=(n,t)=>ke(n,H(t)),Qe=(n,t)=>{var e={};for(var r in n)Q.call(n,r)&&t.indexOf(r)<0&&(e[r]=n[r]);if(n!=null&&J)for(var r of J(n))t.indexOf(r)<0&&Ze.call(n,r)&&(e[r]=n[r]);return e},Ye=(n,t,e)=>new Promise((r,I)=>{var B=f=>{try{w(e.next(f))}catch(y){I(y)}},Y=f=>{try{w(e.throw(f))}catch(y){I(y)}},w=f=>f.done?r(f.value):Promise.resolve(f.value).then(B,Y);w((e=e.apply(n,t)).next())});const qe=n=>{const{subject_id:t}=n;return{subject_id:t,course_id:t}},et=n=>{var t=n,{videoDetail:e,globalSetting:r,loading:I,pathsDetail:B,dispatch:Y}=t,w=Qe(t,["videoDetail","globalSetting","loading","pathsDetail","dispatch"]),f,y;const{queryParams:q,videoList:fe,attachmentList:Pe,active:E}=e,{subject_id:ce,videoId:ve}=q,ae={videoId:ve};(0,m.useEffect)(()=>{if(E){const{item_type:te,id:c}=E;te==="VideoItem"&&Y({type:"videoDetail/getVideoDetail",payload:Je(Ge({},q),{id:c})})}},[E.id]),console.log("---",E),(0,m.useEffect)(()=>{ce&&ee()},[]);function ee(){return Ye(this,null,function*(){const te=yield Y({type:"pathsDetail/getPathsDetail",payload:{id:ce}})})}(0,m.useEffect)(()=>{var te,c;(0,_.Dk)((c=(te=e.detail)==null?void 0:te.video_item)==null?void 0:c.name)},[e]);let ie={width:1200};return E&&E.item_type==="Attachment"&&E.content_type==="application/pdf"&&(ie={width:1250,marginLeft:(document.body.clientWidth-1200)/2}),M.createElement(X.Z,{spinning:!1},M.createElement("section",{className:Z.bg},M.createElement("div",{className:Z.container,style:ie},M.createElement(ge,null),E&&E.item_type==="VideoItem"&&M.createElement(W,null),E&&E.item_type==="Attachment"&&E.content_type==="application/pdf"&&E.url&&M.createElement("div",{className:Z.widthle},M.createElement(Le.Z,{disabledDownload:!((f=B.detail)!=null&&f.allow_download),type:"pdf",filename:E.name,data:ye.Z.API_SERVER+E.url,style:{position:"absolute",zIndex:1}})),E&&E.item_type==="Attachment"&&["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(E.content_type)&&E.url&&M.createElement("div",{className:Z.widthle},M.createElement(Le.Z,{disabledDownload:!((y=B.detail)!=null&&y.allow_download),type:"office",data:ye.Z.API_SERVER+E.url,style:{position:"absolute",zIndex:1}})))))};var tt=(0,x.connect)(({videoDetail:n,loading:t,globalSetting:e,pathsDetail:r})=>({videoDetail:n,globalSetting:e,loading:t,pathsDetail:r}))(et)},12850:function(Ne,K,o){o.d(K,{BU:function(){return x},Dj:function(){return m},gH:function(){return X},vp:function(){return Z}});function m(N){try{N.mozRequestFullScreen?N.mozRequestFullScreen():N.webkitRequestFullScreen&&N.webkitRequestFullScreen()}catch(T){console.log(T,":e")}}function x(){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()}const X=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function Z(){var N=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,T=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",N),window.isFullScreen?window.isFullScreen:N!=null}}}]);