cty-mui-core 1.0.21 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/components/cty-camera-photo.js +4 -2
  2. package/components/cty-share-sheet.js +3 -2
  3. package/components/cty-video.js +3 -2
  4. package/components/status-bar.js +14 -0
  5. package/dist/cjs/cty-camera-photo.cjs.entry.js +2 -2
  6. package/dist/cjs/cty-media-capture.cjs.entry.js +1 -1
  7. package/dist/cjs/cty-mui.cjs.js +1 -1
  8. package/dist/cjs/cty-share-sheet.cjs.entry.js +2 -2
  9. package/dist/cjs/cty-video.cjs.entry.js +4 -3
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{status-bar-BJrl_sQk.js → status-bar-BEYjerhw.js} +14 -0
  13. package/dist/collection/components/camera-photo/camera-photo.css +2 -0
  14. package/dist/collection/components/camera-photo/camera-photo.js +4 -2
  15. package/dist/collection/components/share-sheet/share-sheet.css +4 -0
  16. package/dist/collection/components/share-sheet/share-sheet.js +3 -2
  17. package/dist/collection/components/video/video.js +3 -2
  18. package/dist/collection/utils/date.js +14 -0
  19. package/dist/cty-mui/cty-mui.esm.js +1 -1
  20. package/dist/cty-mui/index.esm.js +1 -1
  21. package/dist/cty-mui/p-061ea659.system.entry.js +1 -0
  22. package/dist/cty-mui/{p-fd2da714.entry.js → p-3bbb54df.entry.js} +1 -1
  23. package/dist/cty-mui/{p-9997121c.system.entry.js → p-3e7d39b3.system.entry.js} +1 -1
  24. package/dist/cty-mui/p-4c1ed416.system.entry.js +1 -0
  25. package/dist/cty-mui/p-7b5349e9.entry.js +1 -0
  26. package/dist/cty-mui/{p-vRZWRoQ8.js → p-BDuVecoa.js} +1 -1
  27. package/dist/cty-mui/{p-CWfyjvMz.system.js → p-C6ID7w1G.system.js} +1 -1
  28. package/dist/cty-mui/{p-BLI96Ug8.system.js → p-CX64wjp2.system.js} +1 -1
  29. package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
  30. package/dist/cty-mui/{p-78fcf340.entry.js → p-d8e7bff7.entry.js} +1 -1
  31. package/dist/cty-mui/{p-a78aa31c.entry.js → p-e26e053d.entry.js} +1 -1
  32. package/dist/cty-mui/{p-bb83aa1b.system.entry.js → p-e29c7c8d.system.entry.js} +1 -1
  33. package/dist/docs.json +1 -1
  34. package/dist/esm/cty-camera-photo.entry.js +2 -2
  35. package/dist/esm/cty-media-capture.entry.js +1 -1
  36. package/dist/esm/cty-mui.js +1 -1
  37. package/dist/esm/cty-share-sheet.entry.js +2 -2
  38. package/dist/esm/cty-video.entry.js +4 -3
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/{status-bar-DhaoWhCJ.js → status-bar-DOl3d3um.js} +14 -0
  42. package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
  43. package/dist/esm-es5/cty-media-capture.entry.js +1 -1
  44. package/dist/esm-es5/cty-mui.js +1 -1
  45. package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
  46. package/dist/esm-es5/cty-video.entry.js +1 -1
  47. package/dist/esm-es5/index.js +1 -1
  48. package/dist/esm-es5/loader.js +1 -1
  49. package/dist/esm-es5/{status-bar-DhaoWhCJ.js → status-bar-DOl3d3um.js} +1 -1
  50. package/dist/types/components/camera-photo/camera-photo.d.ts +2 -2
  51. package/dist/types/components/share-sheet/share-sheet.d.ts +1 -1
  52. package/package.json +1 -1
  53. package/dist/cty-mui/p-3e33b40b.system.entry.js +0 -1
  54. package/dist/cty-mui/p-6fc16b0f.entry.js +0 -1
  55. package/dist/cty-mui/p-8a8f89d4.system.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as t,c as i,h as e,a as o,g as s}from"./p-DBsZD0Dk.js";import{g as a,b as r,a as h}from"./p-CHhKFKFA.js";import{s as n,r as c}from"./p-vRZWRoQ8.js";import{s as d,v as l}from"./p-COhU5RVg.js";import{n as v}from"./p-BqPNWsXF.js";import{d as y}from"./p-CXtPwfcM.js";import{c as f}from"./p-iD8sj4Mi.js";import{v as p,a as g,b as u,c as b,d as m,e as _}from"./p-CvHW-guK.js";import{i as x}from"./p-BqPoMbNS.js";import"./p-cERsY8tm.js";const w=class{constructor(e){t(this,e),this.ctyDismiss=i(this,"ctyDismiss",7),this.ctyVideoCanplay=i(this,"ctyVideoCanplay",7),this.ctyVideoTimeupdate=i(this,"ctyVideoTimeupdate",7),this.ctyVideoPlaying=i(this,"ctyVideoPlaying",7),this.ctyVideoPlay=i(this,"ctyVideoPlay",7),this.ctyVideoPause=i(this,"ctyVideoPause",7),this.ctyVideoStalled=i(this,"ctyVideoStalled",7),this.ctyVideoWaiting=i(this,"ctyVideoWaiting",7),this.ctyVideoEnded=i(this,"ctyVideoEnded",7),this.ctyVideoError=i(this,"ctyVideoError",7),this.ctyVideoChangeVolume=i(this,"ctyVideoChangeVolume",7),this.ctyVideoProgress=i(this,"ctyVideoProgress",7),this.ctyVideoScreenChange=i(this,"ctyVideoScreenChange",7),this.ctyVideoIAEnter=i(this,"ctyVideoIAEnter",7),this.ctyVideoIAAction=i(this,"ctyVideoIAAction",7),this.ctyVideoCtrlChange=i(this,"ctyVideoCtrlChange",7),this.ctyVideoRateChange=i(this,"ctyVideoRateChange",7),this.url="",this.poster="",this.startTime=0,this.preload="metadata",this.allowForward=!0,this.allowBackward=!0,this.unAllowForwardMsg="首次学习不允许快进哦~",this.unAllowRateMsg="首次学习不允许设置播放倍速",this.trafficMsg="当前是非WIFI网络, 可能消耗流量, 点击继续~",this.errorMsg="视频播放异常或网络故障, 请稍后重试。",this.orientation=!0,this.autoplay=!0,this.trafficAutoplay=!1,this.fullscreenOnly=!0,this.defaultFullscreen=!0,this.fullscreenIcon="cty-fullscreen",this.exitFullscreenIcon="cty-exit-fullscreen",this.direction="L",this.controls=!0,this.headerCtrl=!0,this.footerCtrl=!0,this.title="",this.rates=[.7,1,1.25,1.5],this.rate=1,this.directRate=!1,this.loading=!1,this.loadingImg="",this.updateNow=!0,this.markers=[],this.landscapeEnterTimer=20,this.landscapeLeaveTimer=420,this.togglePlayTimer=150,this.progressPosition="center",this.player="video",this.largeScreenIsPortrait=!0,this.allowBackgroundForward=!1,this.interactiveActions=[],this.playProgress=0,this.maxPlayProgress=0,this.currentTimeLabel="00:00:00",this.durationLabel="00:00:00",this.isPlaying=!1,this.isMute=!1,this.showCtrl=!0,this.showPlayRate=!1,this.showVideoError=!0,this.warningMsg="",this.isLoading=!0,this.showTogglePlay=!1,this.playVolume=100,this.playBrightness=100,this.controlIcon="",this.controlLabel="",this.controlType="",this.lastControlType="",this.touchState={isTouching:!1,right:0,height:0,top:0,bottom:0,currentY:0},this.isMoving=!1,this.opnStartTime=0,this.opnMoveTime=0,this.opnLx=0,this.opnLy=0,this.opnNx=0,this.opnNy=0,this.isMouseMove=!1,this.isMicroMessager=y.isMicroMessager,this.isPC=y.isPC,this.isIOS=y.isIos,this.isIpad=y.isIpad,this.isWifi=v.isWifi,this.isHybrid=y.isHybrid,this.lastTapScreenTime=Date.now(),this.footerPrgtime=0,this._curIsFullscreen=!0,this.showInteractiveLayer=!1,this.hasInteractive=!1,this.interactiving_action=null,this.ctrlTimer=0,this.warningMsgTimer=0,this.touchMoveTimer=0,this._rates=[],this.markerList=[],this.currentMarker={describe:"",breakpoint:0,position:0},this.showDotPanel=!1,this.dotDotPanelTop="auto",this.dotDotPanelLeft="auto",this.triangleMargin=0,this.reallyShowDot=!1,this.isRealWaiting=!0,this.isSeeking=!1,this.deviceIsPORTRAIT=!1,this.canScreenOrientation=!1,this.visibilityChangeHandler=()=>{},this.iosAppPauseHandler=()=>{},this.iosAResumeHandler=()=>{},this._doCanplay=()=>{setTimeout((()=>{this.showTogglePlay=!0}),this.togglePlayTimer),this.isLoading&&(this.videoEl.style.display="block"),this.isWifi&&!this.isMicroMessager&&this.autoplay&&this.loading||!this.isLoading||(this.isLoading=!1),this.durationLabel=n(this.videoEl.duration),this.ctyVideoCanplay.emit(),this.markerList=this.markers.map((t=>Object.assign(Object.assign({},t),{position:+(t.breakpoint/this.videoEl.duration*100).toFixed(3)})))},this._doTimeupdate=()=>{const t=this.videoEl.currentTime;!this.isPlaying&&t>0&&(this.isLoading&&(this.isLoading=!1),this.videoEl.paused||(this.isPlaying=!0)),this.touchState.isTouching||(this._updateVideoProgress(),this.interactiveCheck(t)),this.ctyVideoTimeupdate.emit(t)},this._doPlay=()=>{this.ctyVideoPlay.emit()},this._doPause=()=>{this.isPlaying=!1,this.ctyVideoPause.emit()},this._doEnded=()=>{this.isPlaying=!1,this._updateVideoProgress(),this.interactiveReset(),this.ctyVideoEnded.emit()},this._doPlaying=()=>{x("android")||(this.isLoading&&(this.isLoading=!1),this.isPlaying=!0),this.ctyVideoPlaying.emit()},this._doChangeVolume=()=>{this.playVolume=Math.round(100*this.videoEl.volume),this.ctyVideoChangeVolume.emit()},this._doError=()=>{if(!this.isLoading&&this.showVideoError)return this.warningMsg=this.errorMsg,this.clearWarningMsg(),void this.ctyVideoError.emit(!0);this.isLoading&&(this.isLoading=!1,this.showTogglePlay=!0),this.ctyVideoError.emit(!1)},this._doStalled=()=>{this.ctyVideoStalled.emit()},this._doWaiting=()=>{this.isRealWaiting&&!this.isSeeking&&this.ctyVideoWaiting.emit(this.videoEl.currentTime)},this._doSeeked=()=>{(this.isSeeking=!1)&&(this.isRealWaiting=!0)},this._dismiss=()=>!this.fullscreenOnly&&this.curIsFullscreen?(this.curIsFullscreen=!1,this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&d.lock("portrait").catch((()=>{})),void this.ctyDismiss.emit(!1)):this.videoEl.paused?(this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&(this.landscapeLeaveTimer>0?setTimeout((()=>{d.lock("portrait").catch((()=>{}))}),this.landscapeLeaveTimer):d.lock("portrait").catch((()=>{}))),void this.ctyDismiss.emit(!0)):(this.pause(),void this.ctyDismiss.emit(!1)),this._doSetRate=()=>{if(!this.allowForward)return this.warningMsg=this.unAllowRateMsg,void this.clearWarningMsg();if("L"!=this.direction||this.directRate){let t=this.rates.findIndex((t=>t==this.rate))+1;return t==this.rates.length&&(t=0),void this.setPlayRate(this.rates[t])}this.showCtrl=!1,this.showPlayRate=!0,this._resetDot(),this.ctyVideoCtrlChange.emit(this.showCtrl)},this._toggleFullScreen=t=>{this.curIsFullscreen=t,this.isHybrid&&c.toggleStatusBar(!t),this.canScreenOrientation&&d.lock(t?"landscape":"portrait").catch((()=>{})),this.ctyVideoScreenChange.emit(t)},this._doPrgTouchstart=t=>{var i;if("mousedown"==t.type&&(this.isMouseMove=!0),this.isRealWaiting=!1,!this.allowForward&&!this.allowBackward||(null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;this.isSeeking=!0;const e=a(t.currentTarget);return this.touchState.top=e.top,this.touchState.height=e.bottom-this.touchState.top,this.touchState.right=e.right,this.touchState.bottom=e.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=e.left,this.touchState.height=e.right-this.touchState.top,this.touchState.right=e.bottom,this.touchState.bottom=e.right),this.touchState.currentY=this._getPoint(t).x,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this._changeProgressByTouch(),this.clearCtrlTimeout(),!0},this._doPrgTouchmove=t=>{var i;if(!this.isMouseMove&&"mousemove"==t.type)return;if((null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;const e=Date.now();if(this.footerPrgtime+50>e)return!0;this.footerPrgtime=e;const o=this._getPoint(t).x,s=100*Math.abs(o-this.touchState.currentY)/this.touchState.height;return this.touchState.currentY=o,(s>1||"mousemove"==t.type)&&this._changeProgressByTouch(this.updateNow),!0},this._doPrgTouchend=t=>{if("mouseleave"!=t.type||this.isMouseMove)return"mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),this.touchState.isTouching&&this._changeProgressByTouch(),this.touchState.isTouching=!1,this.isSeeking=!1,!0},this._doOpnStart=t=>{"mousedown"==t.type&&(this.isMouseMove=!0),this.isSeeking=!0,this.isRealWaiting=!1;const i=a(t.currentTarget);this.touchState.top=i.top,this.touchState.height=i.bottom-this.touchState.top,this.touchState.right=i.right,this.touchState.bottom=i.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=i.left,this.touchState.height=i.right-this.touchState.top,this.touchState.right=i.bottom,this.touchState.bottom=i.right);const{x:e,y:o}=this._getPoint(t);return this.opnLx=e,this.opnLy=o,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this.opnStartTime=(new Date).getTime(),!0},this._doOpnMove=t=>{if((this.isMouseMove||"mousemove"!=t.type)&&(0===this.opnMoveTime&&(this.opnMoveTime=(new Date).getTime()),this.opnMoveTime-this.opnStartTime<1500)){this.showCtrl=!0,this.clearCtrlTimeout(),this.isMoving=!0;const{x:i,y:e}=this._getPoint(t);switch(this.opnNx=i,this.opnNy=e,this.controlType||(Math.abs(this.opnNx-this.opnLx)>=Math.abs(this.opnNy-this.opnLy)?(this.controlType="P",this.controlLabel=this.currentTimeLabel):this.isIOS?(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%"):this.opnLx>.5*this.touchState.height?(this.controlType="V",this.controlIcon="cty-volume-high",this.controlLabel=this.playVolume+"%"):(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%")),"P"==this.controlType&&(this.controlIcon=this.opnNx-this.opnLx>0?"cty-forward":"cty-backward"),this.controlType){case"B":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playBrightness-=2,this.playBrightness=Math.max(this.playBrightness,0),this.updateNow&&this._updateBrightness()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playBrightness+=2,this.playBrightness=Math.min(this.playBrightness,100),this.updateNow&&this._updateBrightness()),this.controlLabel=this.playBrightness+"%";break;case"V":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playVolume-=2,this.playVolume=Math.max(this.playVolume,0),this.updateNow&&this._updateVolume()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playVolume+=2,this.playVolume=Math.min(this.playVolume,100),this.updateNow&&this._updateVolume()),this.controlLabel=this.playVolume+"%";break;case"P":if(this.opnNx-this.opnLx>0){if(!this.allowForward&&this.playProgress>=this.maxPlayProgress)return this.isMoving=!1,void this.unAllowForward();this.playProgress+=1,this.playProgress=Math.min(this.playProgress,1e3),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)}else this.opnNx-this.opnLx<0?(this.playProgress-=1,this.playProgress=Math.max(0,this.playProgress),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)):this.interactiveReset()}this.lastControlType=this.controlType,this.opnLx=this.opnNx,this.opnLy=this.opnNy}},this._doOpnEnd=t=>{if("mouseleave"!=t.type||this.isMouseMove){if("mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),!this.isMoving){this.showCtrl=!this.showCtrl,this.ctyVideoCtrlChange.emit(this.showCtrl),this._resetDot();const t=Date.now();t-this.lastTapScreenTime<400?(this.lastTapScreenTime=this.lastTapScreenTime-1e3,this.toggleVideo(null)):this.lastTapScreenTime=t}if(!this.updateNow)switch(this.controlType){case"B":this._updateBrightness();break;case"V":this._updateVolume();break;case"P":this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()}this.controlType="",this.clearCtrlTimeout(),this.touchState.isTouching=!1,this.opnMoveTime=0,this._clearTouchMoveToast(),this.isSeeking=!1}},this._doDot=(t,i)=>{if(t.stopPropagation(),this.clearCtrlTimeout(),this.currentMarker.breakpoint>0&&i.breakpoint==this.currentMarker.breakpoint)return void this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}));this.showDotPanel=!0,this.currentMarker=i;const e=a(t.target),o=e.top+e.height/2,s=e.left+e.width/2;this.reallyShowDot=!1,window.setTimeout((()=>{const t=this.dotPanelEl,i=t.parentNode.offsetHeight,e=t.parentNode.offsetWidth,a=t.offsetWidth,r=t.children[t.children.length-1],h=o-r.offsetLeft-r.offsetWidth/2+this.triangleMargin,n=s-r.offsetLeft-r.offsetWidth/2+this.triangleMargin;this.dotDotPanelTop=h+"px",this.dotDotPanelLeft=n+"px";const c=i-a-20,d=e-a-20;this.canScreenOrientation?(n>d?(this.triangleMargin=n-d,this.dotDotPanelLeft=d+"px"):n<5?(this.triangleMargin=n-5,this.dotDotPanelLeft="5px"):this.triangleMargin=0,this.dotDotPanelTop="auto"):(h>c?(this.triangleMargin=h-c,this.dotDotPanelTop=c+"px"):h<5?(this.triangleMargin=h-5,this.dotDotPanelTop="5px"):this.triangleMargin=0,this.dotDotPanelLeft="auto"),window.setTimeout((()=>{this.reallyShowDot=!0}),10)}),100)},this._toPoint=()=>{this.clearCtrlTimeout(),this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}))}}get curIsFullscreen(){return this._curIsFullscreen}set curIsFullscreen(t){this._curIsFullscreen=t,this.deviceIsPORTRAIT="P"==this.direction||!t||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation&&t}async componentWillLoad(){if(!this.isIOS&&!this.isMicroMessager&&l.isAvailable)try{this.playVolume=await l.getVolume(),this.isMute=await l.isMuted()}catch(t){}this.defaultFullscreen||this.fullscreenOnly||(this.curIsFullscreen=!1);let t=this.rates.map((t=>t));this._rates=t,this.hasInteractive=Array.isArray(this.interactiveActions)&&this.interactiveActions.length>0,this.interactiveReset(),this.showTogglePlay=!this.autoplay}componentDidLoad(){if(this.canScreenOrientation=this.orientation&&"L"==this.direction&&this.isHybrid&&x("mobile")&&!this.isIpad,this.deviceIsPORTRAIT="P"==this.direction||!this.curIsFullscreen||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation,this.canScreenOrientation&&this.curIsFullscreen?this.landscapeEnterTimer>0?setTimeout((()=>{d.lock("landscape").catch((()=>{}))}),this.landscapeEnterTimer):d.lock("landscape").catch((()=>{})):this.isHybrid&&x("mobile")&&d.lock("portrait").catch((()=>{})),+this.startTime>0&&(this.videoEl.currentTime=Number(this.startTime)),this.videoEl.controls=!1,this.videoEl.playbackRate=this.rate,this.isMicroMessager?window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),2500):this.isWifi?+this.startTime>0&&(this.videoEl.style.display="block"):window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),1500),!this.allowBackgroundForward&&this.isIOS){let t=1,i="",e=0;this.isMicroMessager?(this.visibilityChangeHandler=()=>{!this.allowForward&&this.videoEl&&(t%2==1?(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ=="):(this.videoEl.src=i,window.setTimeout((()=>{this.videoEl.currentTime=e,this.showVideoError=!0}),1500)),t++)},document.addEventListener("visibilitychange",this.visibilityChangeHandler)):(this.iosAppPauseHandler=()=>{this.videoEl&&!this.allowForward&&(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ==")},this.iosAResumeHandler=()=>{this.videoEl&&!this.allowForward&&(this.videoEl.src=i,window.setTimeout((()=>{this.showVideoError=!1,this.videoEl.currentTime=e}),1500))},document.addEventListener("pause",this.iosAppPauseHandler),document.addEventListener("resume",this.iosAResumeHandler))}}disconnectedCallback(){clearTimeout(this.ctrlTimer),clearTimeout(this.warningMsgTimer),clearTimeout(this.touchMoveTimer),!this.allowBackgroundForward&&this.isIOS&&(this.isMicroMessager?document.removeEventListener("visibilitychange",this.visibilityChangeHandler):(document.removeEventListener("pause",this.iosAppPauseHandler),document.removeEventListener("resume",this.iosAResumeHandler)))}_getVolumeIconName(){return this.isMute?p:0==this.playVolume?g:this.playVolume<30?u:this.playVolume<70?b:m}unAllowForward(){this.warningMsg=this.unAllowForwardMsg,this.clearWarningMsg()}async play(){this.videoEl.paused&&this.videoEl.play(),this.isPlaying=!0}async setCtrlShow(t=!1){this.showCtrl=t,this._resetDot(),this.ctyVideoCtrlChange.emit(t)}async pause(){this.videoEl.paused||this.videoEl.pause(),this.isPlaying=!1}async setVideoCurrentTime(t,i){this.maxPlayProgress=Math.max(this.maxPlayProgress,this.playProgress),t>this.videoEl.duration*this.maxPlayProgress/1e3&&!this.allowForward?this.unAllowForward():(this.videoEl.currentTime=t,i&&i())}_clearTouchMoveToast(){clearTimeout(this.touchMoveTimer),this.touchMoveTimer=window.setTimeout((()=>{this.isMoving=!1}),2e3)}async clearCtrlTimeout(){this.showCtrl&&(clearTimeout(this.ctrlTimer),this.ctrlTimer=window.setTimeout((()=>{this.showCtrl=!1,this.touchState.isTouching=!1,this._resetDot(),this.ctyVideoCtrlChange.emit(!1)}),4e3))}async setWarningMsg(t){this.warningMsg=t,this.clearWarningMsg()}clearWarningMsg(){""!=this.warningMsg&&(clearTimeout(this.warningMsgTimer),this.warningMsgTimer=window.setTimeout((()=>{this.warningMsg=""}),2e3))}async toggleVideo(t){this.isLoading||(this.videoEl.paused?this.play():this.pause(),t&&(this.clearCtrlTimeout(),t.stopPropagation()))}async toggleVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.muted=!this.videoEl.muted,this.isMute=this.videoEl.muted;else try{await l.toggleMute(),this.isMute=await l.isMuted()}catch(t){l.setVolume(this.isMute?this.playVolume:0),this.isMute=!this.isMute}this.clearCtrlTimeout()}async setPlayRate(t){this.rate=t,this.videoEl.playbackRate=this.rate,this.showPlayRate=!1,this.ctyVideoRateChange.emit(t)}_getPoint(t){const{x:i,y:e}=r(t);try{return this.deviceIsPORTRAIT?{x:i,y:e}:{x:e,y:i}}catch(t){return{x:0,y:0}}}_changeProgressByTouch(t=!0){if(!this.allowForward&&!this.allowBackward)return;const i=Math.round((this.touchState.currentY-this.touchState.top)/this.touchState.height*1e3);!this.allowBackward&&i<this.playProgress||(!this.allowForward&&i>this.maxPlayProgress?this.unAllowForward():(this.lastControlType="P",this.isMoving=!0,this.playProgress>i?this.controlIcon="cty-backward":this.playProgress<i&&(this.controlIcon="cty-forward"),this.playProgress=i,0==i&&(this.interactiveReset(),this.isMoving=!1),t?(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()):this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration),this._clearTouchMoveToast()))}_updateVideoProgress(){const t=this.videoEl.currentTime,i=this.videoEl.duration;this.playProgress=i>0?Math.round(t/i*1e3):0,this.ctyVideoProgress.emit(this.playProgress/10),this.currentTimeLabel=n(t),this.durationLabel=n(i),"P"==this.lastControlType&&(this.controlLabel=this.currentTimeLabel)}_updateBrightness(){this.videoCtrlEl.style.backgroundColor="rgba(0,0,0, "+(100-this.playBrightness)/1.6/100+")"}async _updateVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.volume=this.playVolume/100;else try{await l.setVolume(this.playVolume),this.isMute=await l.isMuted()}catch(t){}this.videoEl.volume=this.playVolume/100,this.playVolume>0&&this.isMute&&this.toggleVolume()}_resetDot(){this.showDotPanel=!1,this.currentMarker={describe:"",breakpoint:0,position:0}}getVideoElement(){return Promise.resolve().then((()=>this.videoEl))}getVideoState(){return Promise.resolve().then((()=>{const{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}=this;return{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}}))}interactiveCheck(t){var i;if(this.hasInteractive&&!this.showInteractiveLayer)for(const e of this.interactiveActions)if(this.checkActionTriggerCond(e,t,"play")){this.showInteractiveLayer=!0,this.interactiving_action=e,e.status.entercount++;for(const t of e.buttons)"optbtn"==t.type&&(t.val=t.defaultval);let t=!1;if((null===(i=e.autoactions)||void 0===i?void 0:i.length)>0)for(const i of e.autoactions)if(this.calcTriggerCond(this.interactiving_action,i.condtrigger)){this.pause(),this.doInteractiveAction(i),t=!0;break}!t&&e.buttons.length>0&&(this.pause(),this.showInteractiveActionUI(e));break}}changeInteractiveAction(t){if(this.hasInteractive||this.showInteractiveLayer){this.clearInteractiveActionUI(),this.interactiving_action=t,t.status.entercount++;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval);this.showInteractiveActionUI(t)}}checkActionTriggerCond(t,i,e){let o=t.playtrigger;return!("play"==e&&(i<o.min||i>=o.max)||!this.calcTriggerCond(t,t.condtrigger))}calcTriggerCond(t,i){let e=!0;for(let o of i){let i=!0,s=null;switch(o.type){case"entercount":if(s=this.findInteractiveAction(o.actionid,t),null!=s){let t=s.status.entercount;i=t>=o.min&&(t<o.max||""==o.max)}break;case"optbtn":if(s=this.findInteractiveAction(o.actionid,t),null!=s)for(let t of s.buttons)if("optbtn"==t.type&&t.id==o.btnid){i=t.val==o.val;break}break;case"group":i=this.calcTriggerCond(t,o.subs)}e="or"==o.op?e||i:e&&i}return e}findInteractiveAction(t,i){if(""==t.trim())return i;for(let i of this.interactiveActions)if(i.id==t)return i;return null}interactiveAction(t){if(t.stopPropagation(),null==this.interactiving_action)return;let i=this.interactiving_action.imgW,e=this.interactiving_action.imgH;for(let o of this.interactiving_action.buttons)if(this.interactiveClickHitCheck(t,{x:o.x,y:o.y,width:o.w,height:o.h},i,e)){switch(o.type){case"optbtn":o.val=1==o.val?"0":"1",this.refreshInteractiveActionBtnStatus(this.interactiving_action);break;case"link":case"input":this.doInteractiveAction(o);break;default:for(let t of o.actions)if(this.calcTriggerCond(this.interactiving_action,t.condtrigger)){this.doInteractiveAction(t);break}}break}}doInteractiveAction(t){if("action"==t.type)this.changeInteractiveAction(this.findInteractiveAction(t.actionid,this.interactiving_action));else if("play"==t.type)this.videoEl.currentTime=t.startTime,this.play(),this.clearInteractiveActionUI(),window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);else if("link"==t.type){if(!t.link)return this.play(),this.clearInteractiveActionUI(),void window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);this.ctyVideoIAAction.emit(t)}}interactiveClickHitCheck(t,i,e,o){let s=o,a=e,r=this.interactiveEl,n=i.y*s/o,c=i.x*a/e,d=i.width*a/e,l=i.height*s/o;const{x:v,y}=h(t);let f=(v-r.offsetLeft)*a/r.clientWidth,p=(y-r.offsetTop)*s/r.clientHeight;return f>=c&&f<=c+d&&p>=n&&p<=n+l}showInteractiveActionUI(t){this.interactiveEl.style.display="block",""!=t.img&&(this.interactiveEl.style.backgroundImage="url("+t.img+")"),this.refreshInteractiveActionBtnStatus(t),this.ctyVideoIAEnter.emit()}hideInteractiveActionUI(){this.showInteractiveLayer=!1,this.clearInteractiveActionUI(),this.interactiveEl.style.display="none"}refreshInteractiveActionBtnStatus(t){let i=this.interactiveEl,e="";for(let i of t.buttons)"optbtn"==i.type&&(e+=i.htmls[i.val]||"");i.innerHTML=e}clearInteractiveActionUI(){this.interactiveEl.innerHTML=""}interactiveReset(){if(this.hasInteractive){this.showInteractiveLayer=!1;for(let t of this.interactiveActions){t.status.entercount=0;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval)}}}renderPlayer(){const t=this.poster||`${f.get("resUrlPrefix","")}assets/cty_res/img/poster.jpg`;return e("div",{class:"cty-video__wrapper","data-tap-disable":"true"},"video"===this.player&&e("video",{ref:t=>this.videoEl=t,class:"cty-video__player",poster:t,preload:this.preload,"x5-video-player-type":"h5","x5-video-player-fullscreen":"true",playsinline:!0,"webkit-playsinline":!0,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onPlay:this._doPlay,onPause:this._doPause,onEnded:this._doEnded,onPlaying:this._doPlaying,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled,onWaiting:this._doWaiting,onSeeked:this._doSeeked,src:this.url,typeof:"video/mp4"}),"audio"===this.player&&e("div",{class:"cty-video__player cty-video__audio-player"},e("audio",{ref:t=>this.videoEl=t,class:"cty-video__player-audio",preload:this.preload,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onEnded:this._doEnded,onPlaying:this._doPlaying,onPlay:this._doPlay,onPause:this._doPause,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled},e("source",{src:this.url,type:"audio/mp3"}),e("source",{src:this.url,type:"audio/ogg"})),e("slot",{name:"audio-content"})))}renderControls(){return e("div",{class:"cty-video__controls",ref:t=>this.videoCtrlEl=t},e("slot",{name:"header"}),this.showCtrl&&this.headerCtrl&&e("ion-grid",{class:"cty-video__header"},e("ion-row",null,e("ion-col",{class:"flex-align-center cty-video__header-back"},e("ion-button",{onClick:this._dismiss},e("cty-icon",{name:_}))),e("ion-col",{size:"6",class:"cty-video__title flex-align-center cty-ellipsis"},this.title),e("ion-col",null,e("slot",{name:"headerCol"})))),e("slot",{name:"footer"}),this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1})),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1},e("span",{class:"cty-video__time",slot:"start"},this.currentTimeLabel),e("span",{class:"cty-video__time",slot:"end"},this.durationLabel))),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),(this.allowForward||this.allowBackward)&&this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer cty-video__footer-controls":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top",onClick:t=>t.stopPropagation()},!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}}))))),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("span",{class:"cty-video__time"},this.currentTimeLabel),!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),e("span",{class:"cty-video__time"},this.durationLabel)),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),this.isMoving&&e("div",{class:"cty-video__opn-toast flex-center"},e("cty-icon",{name:this.controlIcon}),e("span",null,this.controlLabel)),e("slot",{name:"controls"}),!this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onTouchStart:this._doOpnStart,onTouchMove:this._doOpnMove,onTouchEnd:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onMouseDown:this._doOpnStart,onMouseMove:this._doOpnMove,onMouseUp:this._doOpnEnd,onMouseLeave:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.showCtrl&&this.showDotPanel&&e("div",{ref:t=>{this.dotPanelEl=t},class:{"cty-video__dot-panel flex-center":!0,"cty-video__dot-panel-ex":"top"==this.progressPosition},onClick:t=>t.stopPropagation(),style:{top:this.dotDotPanelTop,left:this.dotDotPanelLeft,opacity:this.reallyShowDot?"1":"0"}},e("span",{class:"cty-video__dot-label cty-ellipsis2"},this.currentMarker.describe),e("ion-button",{onClick:this._toPoint},e("cty-icon",{name:"cty-play-ex"}),"知识点"),e("span",{class:"cty-video__dot-triangle",style:{"margin-left":this.triangleMargin+"px"}})),e("slot",{name:"ctrl"}))}render(){return e(o,{key:"6adfc085d212a7f444cbfdebcaa8db55c16c28ad",class:{"cty-video":!0,"cty-video__vertical":this.deviceIsPORTRAIT,"cty-video__unfullscreen":!this.curIsFullscreen,"cty-video__large-screen":"P"==this.direction&&this.curIsFullscreen&&(this.isPC||this.isIpad)}},this.renderPlayer(),this.renderControls(),(!this.isLoading||this.isMicroMessager)&&!this.isPlaying&&!this.showInteractiveLayer&&this.showTogglePlay&&e("ion-button",{key:"5fc0a3de547d15aacfaf97d5d88386d01f42cc36",part:"toggle-play",class:"cty-video__toggle-play flex-center",onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{key:"bdaf69d81dc56cab662dad85fade4a96211092a8",name:"cty-play"})),!this.isWifi&&!this.isPlaying&&!this.isLoading&&!this.isMicroMessager&&this.trafficMsg&&e("div",{key:"88706702c3db5d24dfdcc705166acb7d87588baf",class:"cty-video__toast cty-ellipsis",part:"toast"},this.trafficMsg),""!=this.warningMsg&&e("div",{key:"d0fc2227043e207f86006b31a101db5cff24aaa8",class:"cty-video__toast cty-ellipsis",part:"toast"},this.warningMsg),this.showPlayRate&&e("div",{key:"4f9fd7d4f4d1553cce4ff1b6b11c0f189a3ebe25",class:"cty-video__rate",onClick:()=>this.showPlayRate=!1},e("div",{key:"b6f4d58a9dd2491cb8df589e3cbde6116a5930ab",class:"cty-video__rate-mask flex-center-justify-end"},e("div",{key:"9d9fa14f992b76a7c3068992c2a5ba2bf6d90f84",class:"cty-video__rate-list"},this._rates.map((t=>e("button",{onClick:()=>this.setPlayRate(t),class:{active:this.rate==t,"cty-video__rate-list-item":!0}},e("span",null,t,"X"))))))),this.hasInteractive&&this.curIsFullscreen&&e("div",{key:"dfa51bb93aecc26bfca408f3670f1ca839fa942f",class:"cty-video__player cty-video__interactive",onClick:()=>{},ref:t=>this.interactiveEl=t}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};w.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-ellipsis[class]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:normal}.cty-ellipsis2[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis3[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis4[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;word-break:break-all;word-wrap:break-word}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}:host{--cty-video-width:100vw;--cty-video-height:100vh;--cty-video-half-width:calc(var(--cty-video-width) / 2);--cty-video-fit:fill;--cty-video-header-height:50px;--cty-video-header-background:var(--cty-overlay-color-lighter);--cty-video-header-unfullscreen-background:transparent;--cty-video-header-unfullscreen-height:30px;--cty-video-header-padding-top:0px;--cty-video-header-padding-bottom:0px;--cty-video-header-padding-start:0px;--cty-video-header-padding-end:0px;--cty-video-header-back-display:flex;--cty-video-header-back-background:transparent;--cty-video-header-back-height:36px;--cty-video-header-back-width:36px;--cty-video-header-back-radius:var(--cty-border-radius-circle);--cty-video-header-back-offset-start:2px;--cty-video-header-back-offset-end:0px;--cty-video-header-back-size:25px;--cty-video-header-back-color:var(--cty-color-white);--cty-video-header-title-size:var(--cty-font-size-medium);--cty-video-header-title-color:var(--cty-color-white);--cty-video-header-title-display:flex;--cty-video-footer-height:50px;--cty-video-footer-background:var(--cty-overlay-color-lighter);--cty-video-footer-unfullscreen-background:transparent;--cty-video-footer-unfullscreen-height:35px;--cty-video-footer-progress-height:0px;--cty-video-footer-padding-start:0px;--cty-video-footer-padding-end:0px;--cty-video-footer-progress-size:var(--cty-font-size-medium);--cty-video-footer-icon-size:24px;--cty-video-footer-fullscreen-icon-size:20px;--cty-video-play-size:80px;--cty-video-play-border:5px solid rgb(238 238 238 / 80%);--cty-video-play-icon-size:40px;--cty-video-unfullscreen-play-size:40px;--cty-video-unfullscreen-play-border:4px solid rgb(238 238 238 / 80%);--cty-video-unfullscreen-play-icon-size:26px;--cty-video-range-bar-height:2px;--cty-video-bar-size:12px;--cty-video-bar-color:var(--cty-color-white);--cty-video-range-knob-background:var(--cty-color-white);--cty-video-range-background:rgb(255 255 255 / 50%);--cty-video-range-background-active:var(--cty-color-primary);--cty-video-loading-background-color:rgb(0 0 0 / 90%);--cty-video-loading-img-width:100px;--cty-video-half-screen-height:56vw;--cty-video-dot-size:7px;--cty-video-dot-padding:9px;--cty-video-dot-active-color:var(--cty-color-primary);--cty-video-progress-vertical-padding:0 15px;--cty-video-progress-horizongtal-padding:0px;--cty-video-rate-active-color:var(--cty-color-primary);--cty-video-toast-width:calc(var(--cty-video-width) * 0.4);--cty-video-toast-height:40px;--cty-video-opn-toast-icon-size:20px;position:relative;display:block;width:var(--cty-video-width);height:var(--cty-video-height);background:var(--cty-color-black)}ion-row{height:100%}ion-col{overflow:hidden}ion-button{min-height:auto;margin:0}.cty-video__wrapper{position:relative;width:100%;height:100%}.cty-video__player{position:absolute;top:0;left:0;display:none;width:var(--cty-video-height);height:var(--cty-video-width);margin:0;-o-object-fit:var(--cty-video-fit);object-fit:var(--cty-video-fit);-webkit-transform:rotate(90deg) translate(0, -100%);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__controls{position:absolute;top:0;left:0;width:100%;height:100%}.cty-video__header{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:content-box;box-sizing:content-box;width:calc(var(--cty-video-height) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));height:var(--cty-video-header-height);padding:var(--cty-video-header-padding-top) var(--cty-video-header-padding-end) var(--cty-video-header-padding-bottom) var(--cty-video-header-padding-start);background:var(--cty-video-header-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__header-back{display:var(--cty-video-header-back-display);-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__header-back ion-button{width:var(--cty-video-header-back-width);height:var(--cty-video-header-back-height);margin-right:var(--cty-video-header-back-offset-end);margin-left:var(--cty-video-header-back-offset-start);border-radius:var(--cty-video-header-back-radius);--background:var(--cty-video-header-back-background);--padding-start:5px;--padding-end:5px;--padding-top:0;--padding-bottom:0}.cty-video__header-back cty-icon{font-size:var(--cty-video-header-back-size);color:var(--cty-video-header-back-color)}.cty-video__title[class]{display:var(--cty-video-header-title-display);font-size:var(--cty-video-header-title-size);line-height:var(--cty-video-header-height);color:var(--cty-video-header-title-color)}.cty-video__footer{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--cty-video-height);height:var(--cty-video-footer-height);padding-right:var(--cty-video-footer-padding-end);padding-left:var(--cty-video-footer-padding-start);background:var(--cty-video-footer-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2);transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2)}.cty-video__footer ion-button{height:100%;--background:transparent;--padding-start:12px;--padding-end:12px;--padding-top:0;--padding-bottom:0;--color:var(--cty-color-white)}.cty-video__footer ion-row{height:calc(var(--cty-video-footer-height) - var(--cty-video-footer-progress-height))}.cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height);-webkit-transform:translateY(calc(var(--cty-video-footer-progress-height) / 2));transform:translateY(calc(var(--cty-video-footer-progress-height) / 2))}.cty-video__footer-controls{background:transparent}.cty-video__footer-controls ion-col:not(.cty-video__footer-progress){opacity:0}.cty-video__footer-controls .cty-video__time{opacity:0}.cty-video__footer-toggle-play{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-toggle-play cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-flex{-ms-flex:1;flex:1}.cty-video__footer-time-label{margin-left:8px;font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white);letter-spacing:0.2px}.cty-video__footer-time-label span{margin:0 1px;-webkit-transform:translateY(-1px);transform:translateY(-1px)}.cty-video__footer-progress{-ms-flex:1;flex:1;overflow:auto}.cty-video__time{font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white)}.cty-video__time:nth-child(1){margin-right:12px}.cty-video__time:nth-child(2),.cty-video__time:last-child{margin-left:12px}.cty-video__footer-range{--height:100%;--knob-size:var(--cty-video-bar-size);--bar-height:var(--cty-video-range-bar-height);padding:0;font-size:var(--cty-font-size-medium);color:var(--cty-video-bar-color);opacity:1;--knob-background:var(--cty-video-range-knob-background);--bar-background:var(--cty-video-range-background);--bar-background-active:var(--cty-video-range-background-active)}.cty-video__footer-bar{position:relative;-ms-flex:1;flex:1;height:80%;cursor:pointer}.cty-video__footer-progress__top{position:relative;z-index:2;padding:var(--cty-video-progress-horizongtal-padding)}.cty-video__footer-progress__top .cty-video__footer-bar{height:100%}.cty-video__footer-dot{position:absolute;top:50%;padding:var(--cty-video-dot-padding);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-video__footer-dot::after{display:block;width:var(--cty-video-dot-size);height:var(--cty-video-dot-size);content:"";background:var(--cty-video-dot-active-color);border-radius:var(--cty-border-radius-circle)}.cty-video__footer-rate{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-rate ion-button{--padding-start:5px;--padding-end:5px;--padding-top:4px;--padding-bottom:4px;width:36px;height:auto;margin-left:12px;font-size:var(--cty-font-size-extra-small);font-weight:bold;white-space:nowrap;border:1px solid var(--cty-color-white);border-radius:var(--cty-border-radius-base)}.cty-video__footer-volume{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-volume cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-fullscreen{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-fullscreen ion-button{--padding-start:0px}.cty-video__footer-fullscreen cty-icon{font-size:var(--cty-video-footer-fullscreen-icon-size)}.cty-video__toggle-play{position:absolute;top:50%;left:50%;z-index:8;width:var(--cty-video-play-size);height:var(--cty-video-play-size);margin:calc(var(--cty-video-play-size) / -2) 0 0 calc(var(--cty-video-play-size) / -2);font-weight:bold;text-align:center;border:var(--cty-video-play-border);border-radius:var(--cty-border-radius-circle);--background:transparent;--padding-top:0;--padding-end:0;--padding-start:0;--padding-bottom:0}.cty-video__toggle-play cty-icon{font-size:var(--cty-video-play-icon-size);color:rgba(238, 238, 238, 0.9);text-align:center;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__opn-toast{position:absolute;top:50%;left:50%;z-index:4;width:var(--cty-video-toast-width);max-width:150px;height:var(--cty-video-toast-height);font-size:var(--cty-font-size-medium);font-weight:bold;color:var(--cty-color-white);background:var(--cty-overlay-color-light);border-radius:var(--cty-border-radius-round);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__opn-toast cty-icon{margin-right:10px;font-size:var(--cty-video-opn-toast-icon-size)}.cty-video__opn-panel{position:absolute;top:50%;left:50%;z-index:5;width:var(--cty-video-height);height:calc(var(--cty-video-width) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:0 0 0 calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / 2);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__dot-panel{position:absolute;z-index:6;padding:5px 11px 5px 8px;margin-left:calc(var(--cty-video-footer-height) + 13px + 46px);background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-base);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:left top;transform-origin:left top}.cty-video__dot-panel .cty-video__dot-label{position:relative;max-width:160px;padding-right:17px;font-size:var(--cty-font-size-small);line-height:1.38;color:var(--cty-color-white)}.cty-video__dot-panel .cty-video__dot-label::after{position:absolute;top:0;right:7px;width:1px;height:100%;content:"";background-color:rgba(255, 255, 255, 0.3);-webkit-transform:scaleX(1.5);transform:scaleX(1.5)}.cty-video__dot-panel ion-button{height:36px;font-size:var(--cty-font-size-small);font-weight:bold;--padding-start:0;--padding-end:0;--background:transparent;--border-radius:0;--color:var(--cty-video-dot-active-color)}.cty-video__dot-panel cty-icon{margin-right:4px;font-size:var(--cty-font-size-medium)}.cty-video__dot-panel .cty-video__dot-triangle{position:absolute;bottom:-18px;left:20px;border-color:transparent;border-style:solid;border-width:9px 8px;border-top-color:var(--cty-overlay-color)}.cty-video__dot-panel-ex{margin-left:calc(var(--cty-video-footer-height) + 46px)}.cty-video__toast[class]{position:absolute;top:50%;z-index:7;min-width:300px;max-width:96vw;padding:0 15px;margin:0 0 0 -60px;font-size:var(--cty-font-size-extra-small);font-weight:bold;line-height:30px;color:rgba(238, 238, 238, 0.9);text-align:center;pointer-events:none;background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-large);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__rate{position:absolute;top:0;left:0;z-index:9;width:var(--cty-video-height);height:var(--cty-video-width);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__rate-mask{position:absolute;top:0;right:0;width:40%;height:100%;background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.9)), color-stop(rgba(0, 0, 0, 0.8)), color-stop(rgba(0, 0, 0, 0.5)), to(transparent));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), transparent)}.cty-video__rate-list-item{display:block;width:112px;min-height:50px;font-size:var(--cty-font-size-base);color:var(--cty-color-white);text-align:center;outline:none;background-color:transparent;border:none}.cty-video__rate-list-item.active{color:var(--cty-video-rate-active-color)}.cty-video__interactive{z-index:101;display:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%}:host(.cty-video__vertical) cty-loading{--cty-loading-transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__player{top:50%;width:var(--cty-video-width);height:auto;max-height:100%;-webkit-transform:rotate(0deg) translateY(-50%);transform:rotate(0deg) translateY(-50%)}:host(.cty-video__vertical) .cty-video__toggle-play cty-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__toast{top:80%;left:50%;margin:0;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}:host(.cty-video__vertical) .cty-video__header{width:calc(var(--cty-video-width) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__opn-panel{width:var(--cty-video-width);height:calc(var(--cty-video-height) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / -2) 0 0;-webkit-transform:translate(-50%, -50%) rotate(0);transform:translate(-50%, -50%) rotate(0)}:host(.cty-video__vertical) .cty-video__opn-toast{top:50%;-webkit-transform:translate(-50%, 0) rotate(0deg);transform:translate(-50%, 0) rotate(0deg)}:host(.cty-video__vertical) .cty-video__footer{top:auto;bottom:0;width:var(--cty-video-width);-webkit-transform:rotate(0);transform:rotate(0)}:host(.cty-video__vertical) .cty-video__footer-progress__top{padding:var(--cty-video-progress-vertical-padding)}:host(.cty-video__vertical) .cty-video__time{font-size:var(--cty-font-size-small)}:host(.cty-video__vertical) .cty-video__footer-time-label{margin-left:0}:host(.cty-video__vertical) .cty-video__rate{width:var(--cty-video-width);height:var(--cty-video-height);-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel{bottom:calc(var(--cty-video-footer-height) + 13px);margin-left:0;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel-ex{bottom:var(--cty-video-footer-height)}:host(.cty-video__unfullscreen){height:var(--cty-video-half-screen-height)}:host(.cty-video__unfullscreen) .cty-video__wrapper{background-color:var(--cty-color-black)}:host(.cty-video__unfullscreen) .cty-video__player{top:0;height:var(--cty-video-half-screen-height);max-height:initial;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__unfullscreen) .cty-video__toggle-play{width:var(--cty-video-unfullscreen-play-size);height:var(--cty-video-unfullscreen-play-size);margin:calc(var(--cty-video-unfullscreen-play-size) / -2) 0 0 calc(var(--cty-video-unfullscreen-play-size) / -2);border:var(--cty-video-unfullscreen-play-border)}:host(.cty-video__unfullscreen) .cty-video__toggle-play cty-icon{font-size:var(--cty-video-unfullscreen-play-icon-size)}:host(.cty-video__unfullscreen) .cty-video__header{height:var(--cty-video-header-unfullscreen-height);background:var(--cty-video-header-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__title{line-height:var(--cty-video-header-unfullscreen-height)}:host(.cty-video__unfullscreen) .cty-video__header-back ion-button{width:30px;height:100%}:host(.cty-video__unfullscreen) .cty-video__footer{height:var(--cty-video-footer-unfullscreen-height);background:var(--cty-video-footer-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__footer ion-row{height:calc(var(--cty-video-footer-unfullscreen-height) - var(--cty-video-footer-progress-height))}:host(.cty-video__unfullscreen) .cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height)}:host(.cty-video__unfullscreen) .cty-video__footer ion-button{--padding-start:8px;--padding-end:8px}:host(.cty-video__unfullscreen) .cty-video__footer-fullscreen ion-button{--padding-start:0px}:host(.cty-video__unfullscreen) .cty-video__opn-panel{height:calc(var(--cty-video-half-screen-height) - var(--cty-video-header-unfullscreen-height) - var(--cty-video-footer-unfullscreen-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom))}:host(.cty-video__unfullscreen) .cty-video__opn-toast{top:40%;height:30px}:host(.cty-video__unfullscreen) .cty-video__toast{top:70%}:host(.cty-video__unfullscreen) cty-loading{--cty-loading-overlay-height:var(--cty-video-half-screen-height)}:host(.cty-video__large-screen) .cty-video__player{top:0;left:50%;width:auto;max-width:100%;height:100%;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}.cty-video__audio-player{display:block}.cty-video__player-audio{position:absolute;display:none;visibility:hidden}';export{w as cty_video}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(t,o,e,c){function a(t){return t instanceof e?t:new e((function(o){o(t)}))}return new(e||(e=Promise))((function(e,i){function r(t){try{s(c.next(t))}catch(t){i(t)}}function n(t){try{s(c["throw"](t))}catch(t){i(t)}}function s(t){t.done?e(t.value):a(t.value).then(r,n)}s((c=c.apply(t,o||[])).next())}))};var __generator=this&&this.__generator||function(t,o){var e={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},c,a,i,r;return r={next:n(0),throw:n(1),return:n(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function n(t){return function(o){return s([t,o])}}function s(n){if(c)throw new TypeError("Generator is already executing.");while(r&&(r=0,n[0]&&(e=0)),e)try{if(c=1,a&&(i=n[0]&2?a["return"]:n[0]?a["throw"]||((i=a["return"])&&i.call(a),0):a.next)&&!(i=i.call(a,n[1])).done)return i;if(a=0,i)n=[n[0]&2,i.value];switch(n[0]){case 0:case 1:i=n;break;case 4:e.label++;return{value:n[1],done:false};case 5:e.label++;a=n[1];n=[0];continue;case 7:n=e.ops.pop();e.trys.pop();continue;default:if(!(i=e.trys,i=i.length>0&&i[i.length-1])&&(n[0]===6||n[0]===2)){e=0;continue}if(n[0]===3&&(!i||n[1]>i[0]&&n[1]<i[3])){e.label=n[1];break}if(n[0]===6&&e.label<i[1]){e.label=i[1];i=n;break}if(i&&e.label<i[2]){e.label=i[2];e.ops.push(n);break}if(i[2])e.ops.pop();e.trys.pop();continue}n=o.call(t,e)}catch(t){n=[6,t];a=0}finally{c=i=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};System.register(["./p-BpC3ubr-.system.js","./p-ipv7ZxeZ.system.js","./p-DSgG8qVn.system.js","./p-DJ6AO4zz.system.js","./p-CMMoObqS.system.js","./p-cQwGvN5a.system.js","./p-FsCPkocx.system.js","./p-DNT6lW3H.system.js","./p-NPOR6IxC.system.js","./p-B6ewx4qT.system.js","./p-DvPCY95C.system.js","./p-D5YThY9F.system.js","./p-Ck01D6Xe.system.js","./p-CKjUa3W_.system.js"],(function(t){"use strict";var o,e,c,a,i,r,n,s,h,p,y,l,u,m,d,f,b,v,g,x;return{setters:[function(t){o=t.r;e=t.c;c=t.h;a=t.a;i=t.g},function(t){r=t.i},function(t){n=t.d;s=t.c},function(t){h=t.e;p=t.f;y=t.p;l=t.g;u=t.h;m=t.j;d=t.k},function(t){f=t.c},function(t){b=t.r},function(t){v=t.g;g=t.l;x=t.e},null,null,null,null,null,null,null],execute:function(){var w="*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.cty-pos-rel{position:relative}.cty-pos-abs{position:absolute}.cty-pos-fix{position:fixed}.cty-pos-sti{position:-webkit-sticky;position:sticky}.cty-pos-cover{position:absolute;top:0;bottom:0;left:0;right:0}.cty-pos-l-t{position:absolute;left:0;top:0}.cty-pos-l-b{position:absolute;left:0;bottom:0}.cty-pos-r-t{position:absolute;right:0;top:0}.cty-pos-r-b{position:absolute;right:0;bottom:0}.cty-pos-100{position:absolute;left:0;top:0;width:100%;height:100%}.cty-pos-w100{position:absolute;left:0;width:100%}.cty-pos-h100{position:absolute;top:0;height:100%}.cty-pos-c{position:absolute;left:50%;top:50%;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-pos-c-x{position:absolute;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.cty-pos-c-x-t{position:absolute;top:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.cty-pos-c-x-b{position:absolute;bottom:0;left:50%;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.cty-pos-c-y{position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cty-pos-c-y-l{position:absolute;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.cty-pos-c-y-r{position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}:host{--cty-camera-photo-overlay-position:fixed;--cty-camera-photo-overlay-z-index:10;--cty-camera-photo-overlay-background:var(--cty-overlay-color);--cty-camera-photo-overlay-width:100vw;--cty-camera-photo-overlay-height:100vh;--cty-camera-photo-padding:0;--cty-camera-photo-border-radius:0;--cty-camera-photo-title-color:var(--cty-text-color-primary);--cty-camera-photo-title-size:var(--cty-font-size-medium);--cty-camera-photo-title-line-height:36px;--cty-camera-photo-title-weight:500;--cty-camera-photo-title-align:center;--cty-camera-photo-close-top:10px;--cty-camera-photo-close-right:10px;--cty-camera-photo-close-color:var(--cty-text-color-secondary);--cty-camera-photo-close-size:20px;--cty-camera-photo-option-padding-bottom:14px;--cty-camera-photo-option-padding-top:14px;--cty-camera-photo-option-text-align:center;--cty-camera-photo-option-text-color:var(--cty-text-color-primary);--cty-camera-photo-option-text-size:var(--cty-font-size-medium);--cty-camera-photo-option-text-line-height:22px;--cty-camera-photo-cancel-background:var(--cty-color-white);--cty-camera-photo-cancel-padding-top:0;--cty-camera-photo-cancel-padding-bottom:0;--cty-camera-photo-cancel-border:8px solid var(--cty-border-color-extra-light);--cty-camera-photo-cancel-color:var(--cty-text-color-primary);--cty-camera-photo-cancel-min-height:48px;--cty-camera-photo-cancel-size:var(--cty-font-size-medium);--cty-camera-photo-crop-width:100vw;--cty-camera-photo-crop-height:100vh;--cty-camera-photo-crop-background:var(--cty-color-black);--cty-camera-photo-crop-clip-height:100vw;--cty-camera-photo-crop-clip-width:100vw;--cty-camera-photo-crop-clip-background:var(--cty-overlay-color-dark);--cty-camera-photo-crop-clip-border:1px solid #767676;--cty-camera-photo-crop-buttons-padding:12px 0;--cty-camera-photo-crop-button-padding:0 12px;--cty-camera-photo-crop-button-color:var(--cty-text-color-white);--cty-camera-photo-crop-button-active-color:var(--cty-text-color-white);--cty-camera-photo-crop-button-size:var(--cty-font-size-base);--cty-camera-photo-crop-button-line-height:30px;--cty-camera-photo-crop-button-weight:400;--cty-camera-photo-crop-overlay-background:var(--cty-overlay-color);--cty-camera-photo-crop-overlay-z-index:999999;--cty-camera-photo-permission-purpose-overlay-background:transparent;--cty-camera-photo-permission-purpose-overlay-height:auto}:host(.overlay-hidden){display:none}cty-action-sheet{--cty-action-sheet-overlay-position:var(--cty-camera-photo-overlay-position);--cty-action-sheet-overlay-z-index:var(--cty-camera-photo-overlay-z-index);--cty-action-sheet-overlay-width:var(--cty-camera-photo-overlay-width);--cty-action-sheet-overlay-height:var(--cty-camera-photo-overlay-height);--cty-action-sheet-overlay-background:var(--cty-camera-photo-overlay-background);--cty-action-sheet-padding:var(--cty-camera-photo-padding);--cty-action-sheet-border-radius:var(--cty-camera-photo-border-radius);--cty-action-sheet-title-color:var(--cty-camera-photo-title-color);--cty-action-sheet-title-size:var(--cty-camera-photo-title-size);--cty-action-sheet-title-line-height:var(--cty-camera-photo-title-line-height);--cty-action-sheet-title-weight:var(--cty-camera-photo-title-weight);--cty-action-sheet-title-align:var(--cty-camera-photo-title-align);--cty-action-sheet-close-top:var(--cty-action-sheet-close-top);--cty-action-sheet-close-right:var(--cty-action-sheet-close-right);--cty-action-sheet-close-color:var(--cty-action-sheet-close-color);--cty-action-sheet-close-size:var(--cty-action-sheet-close-size);--cty-action-sheet-option-padding-bottom:var(--cty-camera-photo-option-padding-bottom);--cty-action-sheet-option-padding-top:var(--cty-camera-photo-option-padding-top);--cty-action-sheet-option-text-align:var(--cty-camera-photo-option-text-align);--cty-action-sheet-option-text-color:var(--cty-camera-photo-option-text-color);--cty-action-sheet-option-text-size:var(--cty-camera-photo-option-text-size);--cty-action-sheet-option-text-line-height:var(--cty-camera-photo-option-text-line-height);--cty-action-sheet-cancel-background:var(--cty-camera-photo-cancel-background);--cty-action-sheet-cancel-padding-top:var(--cty-camera-photo-cancel-padding-top);--cty-action-sheet-cancel-padding-bottom:var(--cty-camera-photo-cancel-padding-bottom);--cty-action-sheet-cancel-border:var(--cty-camera-photo-cancel-border);--cty-action-sheet-cancel-color:var(--cty-camera-photo-cancel-color);--cty-action-sheet-cancel-min-height:var(--cty-camera-photo-cancel-min-height);--cty-action-sheet-cancel-size:var(--cty-camera-photo-cancel-size)}cty-backdrop{z-index:var(--cty-camera-photo-crop-overlay-z-index);background:var(--cty-camera-photo-crop-overlay-background)}cty-crop-image{background:var(--cty-camera-photo-crop-background);width:var(--cty-camera-photo-crop-width);height:var(--cty-camera-photo-crop-height);--cty-crop-image-clip-width:var(--cty-camera-photo-crop-clip-width);--cty-crop-image-clip-height:var(--cty-camera-photo-crop-clip-height);--cty-crop-image-clip-background:var(--cty-camera-photo-crop-clip-background);--cty-crop-image-clip-border:var(--cty-camera-photo-crop-clip-border);--cty-crop-image-buttons-padding:var(--cty-camera-photo-crop-buttons-padding);--cty-crop-image-button-padding:var(--cty-camera-photo-crop-button-padding);--cty-crop-image-button-color:var(--cty-camera-photo-crop-button-color);--cty-crop-image-button-active-color:var(--cty-camera-photo-crop-button-active-color);--cty-crop-image-button-size:var(--cty-camera-photo-crop-button-size);--cty-crop-image-button-line-height:var(--cty-camera-photo-crop-button-line-height);--cty-crop-image-button-weight:var(--cty-camera-photo-crop-overlay-weight)}cty-permission-purpose{--cty-permission-purpose-overlay-background:var(--cty-camera-photo-permission-purpose-overlay-background);--cty-permission-purpose-overlay-height:var(--cty-camera-photo-permission-purpose-overlay-height)}";var k=t("cty_camera_photo",function(){function t(t){o(this,t);this.ctyTapStart=e(this,"ctyTapStart",7);this.ctyTap=e(this,"ctyTap",7);this.ctyDismiss=e(this,"ctyDismiss",7);this.didPresent=e(this,"ctyDidPresent",7);this.willPresent=e(this,"ctyWillPresent",7);this.willDismiss=e(this,"ctyWillDismiss",7);this.didDismiss=e(this,"ctyDidDismiss",7);this.delegateController=h(this);this.lockController=f();this.triggerController=p();this.presented=false;this.hasController=false;this.backdropDismiss=true;this.title="";this.closeable=false;this.closeIcon="cty-close2";this.cancelText="取消";this.file=true;this.count=1;this.photoOption={};this.options=[{text:"从手机相册选择",permissionDescription:"存储空间权限使用说明:<br/>用于访问图片、视频、音频文件",action:"album"},{text:"拍一张",permissionDescription:"相机权限使用说明:<br/>用于拍摄、录制视频等场景",action:"camera"}];this.clipPt="";this.clipCancelText="取消";this.clipCconfirmText="选取";this.clipImageWidth=750;this.clipImageBg="";this.clipMaxScale=2;this.clipMinScale=1;this.clipImageQuality=1;this.clipImageSuffix="jpeg";this.permissionPurpose=true;this.root="default";this.animated=false;this.overlay=true;this.isMicroMessager=n.isMicroMessager;this.isIOS=n.isIos;this.allowEdit=false;this.showCropImage=false;this.clipImage="";this.imageSource={option:{action:""},imageList:[],index:0};this.showPermissionPurpose=false;this.permissionDescription=""}t.prototype.triggerChanged=function(){var t=this,o=t.trigger,e=t.el,c=t.triggerController;if(o){c.addClickListener(e,o)}};t.prototype.connectedCallback=function(){y(this.el);this.triggerChanged()};t.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();this.presented&&l()};t.prototype.componentDidLoad=function(){var t=this;!this.hasController&&b((function(){return t.present()}))};t.prototype.componentWillLoad=function(){this.allowEdit=this.clipPt.indexOf(this.isMicroMessager?"W":this.isIOS?"I":"A")>=0&&!this.photoOption.allowEdit};t.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var t;return __generator(this,(function(o){switch(o.label){case 0:return[4,this.lockController.lock()];case 1:t=o.sent();return[4,this.delegateController.attachViewToDom(this.root)];case 2:o.sent();return[4,u(this,"cameraPhotoEnter",(function(t){return x(t,".cty-camera-photo")}))];case 3:o.sent();t();return[2]}}))}))};t.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){var t,o;return __generator(this,(function(e){switch(e.label){case 0:return[4,this.lockController.lock()];case 1:t=e.sent();return[4,m(this,"cameraPhotoLeave",(function(t){return g(t,".cty-camera-photo")}))];case 2:o=e.sent();if(o){this.delegateController.removeViewFromDom()}t();return[2,o]}}))}))};t.prototype.onDidDismiss=function(){return d(this.el,"ctyDidDismiss")};t.prototype.onWillDismiss=function(){return d(this.el,"ctyWillDismiss")};t.prototype._buttonClick=function(t){return __awaiter(this,void 0,void 0,(function(){var o,e,c,a,i;return __generator(this,(function(n){switch(n.label){case 0:t.stopPropagation();o=t.detail.index;e=this.options[o];this.ctyTapStart.emit(o);if(e.action!="album"&&e.action!="camera"){e.handler&&e.handler({option:e,imageList:[]});this.ctyTap.emit({index:o,imageList:[]});return[2]}if(!(!this.isIOS&&!this.isMicroMessager))return[3,2];return[4,this.checkPermission(e.action||"",e.permissionDescription||"")];case 1:n.sent();n.label=2;case 2:c=[];n.label=3;case 3:n.trys.push([3,5,,6]);a={camera:e.action==="camera",file:this.file,count:this.count,option:this.photoOption};return[4,r.getPictures(a)];case 4:c=n.sent();this.showPermissionPurpose=false;return[3,6];case 5:i=n.sent();this.showPermissionPurpose=false;return[3,6];case 6:if(this.allowEdit&&(e.action==="camera"||e.action==="album"&&this.count==1)&&c.length>0){this.showCropImage=true;this.clipImage=c[0].url;this.imageSource={option:e,imageList:c,index:o};return[2]}e.handler&&e.handler({option:e,imageList:c});this.ctyTap.emit({index:o,imageList:c});return[2]}}))}))};t.prototype.checkPermission=function(t,o){var e=this;return Promise.resolve().then((function(){return __awaiter(e,void 0,void 0,(function(){var e,c,a;return __generator(this,(function(i){switch(i.label){case 0:if(!this.permissionPurpose||!o){return[2]}this.permissionDescription=o;if(!(t=="camera"))return[3,2];return[4,s("CAMERA")];case 1:e=i.sent();if(e===false){this.showPermissionPurpose=true}return[2];case 2:if(!(t=="album"))return[3,5];return[4,s("READ_MEDIA_IMAGES")];case 3:c=i.sent();return[4,s("READ_EXTERNAL_STORAGE")];case 4:a=i.sent();if(c===false&&a===false){this.showPermissionPurpose=true}return[2];case 5:return[2]}}))}))})).catch((function(t){return t===undefined?null:t}))};t.prototype._doCropCancel=function(){this.showCropImage=false;var t=this.imageSource.index;this._buttonClick({detail:{item:{},index:t}})};t.prototype._doCropConfirm=function(t){var o=t.detail;var e=this.imageSource,c=e.option,a=e.imageList,i=e.index;a[0]=o;this.showCropImage=false;c.handler&&c.handler({option:c,imageList:a});this.ctyTap.emit({index:i,imageList:a})};t.prototype.render=function(){var t=this;return c(a,{key:"4994ab89e969ab4f135e61d465ce4fcd34739b0b",class:Object.assign(Object.assign({},v(this.cssClass)),{"overlay-hidden":true,"cty-pos-cover":this.overlay}),style:{zIndex:"".concat(2e4+this.overlayIndex)}},c("cty-action-sheet",{key:"deef5fb5f31944b226bcb22e0df2bafb685bedbd",class:"cty-camera-photo",animated:false,overlayIndex:1,backdropDismiss:this.backdropDismiss,title:this.title,closeable:this.closeable,closeIcon:this.closeIcon,cancelText:this.cancelText,options:this.options,onCtyDismiss:function(){return t.dismiss()},onCtyTap:function(o){return t._buttonClick(o)}}),this.showCropImage&&c("cty-backdrop",{key:"e264d6caf8b866f83f5d1b9bc46bf8ede10f3420",backdropDismiss:false},c("cty-crop-image",{key:"3d3068238520a825596c106be9bcea7c88d8ea4c",url:this.clipImage,cancelText:this.clipCancelText,confirmText:this.clipCconfirmText,imageWidth:this.clipImageWidth,imageBackground:this.clipImageBg,maxScale:this.clipMaxScale,minScale:this.clipMinScale,suffix:this.clipImageSuffix,quality:this.clipImageQuality,onCtyCancel:function(){return t._doCropCancel()},onCtyConfirm:function(o){return t._doCropConfirm(o)}})),this.showPermissionPurpose&&c("cty-permission-purpose",{key:"924373b5916aa0abd717e5c35e041f82b6b73bb0",description:this.permissionDescription}))};Object.defineProperty(t.prototype,"el",{get:function(){return i(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{trigger:["triggerChanged"]}},enumerable:false,configurable:true});return t}());k.style=w}}}));