@tarojs/components 3.7.0-alpha.1 → 3.7.0-alpha.3
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.
- package/dist/cjs/hls-00fec546.js +25673 -0
- package/dist/{esm/index-394db4c1.js → cjs/index-f6805218.js} +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +6 -11
- package/dist/cjs/taro-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +23 -20
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +6 -0
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/taro-text-core.cjs.entry.js +9 -6
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -8
- package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -3
- package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/input/input.js +9 -13
- package/dist/collection/components/picker/picker-group.js +29 -26
- package/dist/collection/components/picker/picker.js +42 -16
- package/dist/collection/components/rich-text/rich-text.js +71 -0
- package/dist/collection/components/rich-text/style/index.css +16 -0
- package/dist/collection/components/text/style/index.css +20 -3
- package/dist/collection/components/text/text.js +66 -6
- package/dist/collection/components/textarea/textarea.js +4 -10
- package/dist/collection/components/video/video.js +1 -1
- package/dist/components/hls.js +23206 -24210
- package/dist/components/index2.js +1 -7
- package/dist/components/picker-group.js +9 -9
- package/dist/components/taro-checkbox-core.js +1 -1
- package/dist/components/taro-input-core.js +7 -12
- package/dist/components/taro-picker-core.js +16 -13
- package/dist/components/taro-rich-text-core.js +10 -1
- package/dist/components/taro-text-core.js +13 -7
- package/dist/components/taro-textarea-core.js +2 -9
- package/dist/components/taro-video-core.js +2 -2
- package/dist/esm/hls-4018c7ea.js +25671 -0
- package/dist/{cjs/index-067a58c1.js → esm/index-c3e4004b.js} +1 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +6 -11
- package/dist/esm/taro-navigator-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +23 -20
- package/dist/esm/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +6 -0
- package/dist/esm/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +1 -1
- package/dist/esm/taro-text-core.entry.js +9 -6
- package/dist/esm/taro-textarea-core.entry.js +1 -8
- package/dist/esm/taro-video-control_3.entry.js +3 -3
- package/dist/esm/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/hls-4018c7ea.js +1 -0
- package/dist/esm-es5/index-c3e4004b.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/taro-components/p-01e163f8.system.entry.js +1 -0
- package/dist/taro-components/p-085076c5.system.entry.js +1 -0
- package/dist/taro-components/{p-25adb80c.entry.js → p-091a7153.entry.js} +1 -1
- package/dist/taro-components/{p-cd90bead.system.entry.js → p-0cf235de.system.entry.js} +1 -1
- package/dist/taro-components/p-0fa96970.entry.js +1 -0
- package/dist/taro-components/{p-edbb1a17.system.entry.js → p-1991cc1a.system.entry.js} +1 -1
- package/dist/taro-components/{p-c0ec2f41.system.entry.js → p-2accb92c.system.entry.js} +1 -1
- package/dist/taro-components/p-2ec68968.system.js +7 -0
- package/dist/taro-components/{p-18703731.system.entry.js → p-416cc4dd.system.entry.js} +1 -1
- package/dist/taro-components/p-425c209a.entry.js +1 -0
- package/dist/taro-components/p-43efbf30.js +1 -0
- package/dist/taro-components/{p-385d8aed.entry.js → p-4874f671.entry.js} +1 -1
- package/dist/taro-components/{p-2c89af5b.system.entry.js → p-657cb6e4.system.entry.js} +1 -1
- package/dist/taro-components/p-6cde180b.entry.js +1 -0
- package/dist/taro-components/{p-c490cd45.entry.js → p-7152d85b.entry.js} +1 -1
- package/dist/taro-components/{p-ab2d4f12.entry.js → p-719e1eaf.entry.js} +1 -1
- package/dist/taro-components/{p-b898d734.entry.js → p-78e4805e.entry.js} +1 -1
- package/dist/taro-components/{p-6800ccdc.system.entry.js → p-7ff654e6.system.entry.js} +1 -1
- package/dist/taro-components/{p-16336cc6.system.entry.js → p-98f9f50f.system.entry.js} +1 -1
- package/dist/taro-components/p-9edea30f.system.entry.js +1 -0
- package/dist/taro-components/{p-3f9f3448.entry.js → p-9fe49bab.entry.js} +1 -1
- package/dist/taro-components/{p-31bba7c3.entry.js → p-a20ecd3b.entry.js} +1 -1
- package/dist/taro-components/p-a20fed0a.entry.js +1 -0
- package/dist/taro-components/{p-7c2454dd.system.entry.js → p-a8925584.system.entry.js} +1 -1
- package/dist/taro-components/p-a8e7cf87.entry.js +1 -0
- package/dist/taro-components/{p-5905e3ef.system.entry.js → p-a96b4b19.system.entry.js} +1 -1
- package/dist/taro-components/{p-c2322741.system.entry.js → p-b1d2b575.system.entry.js} +1 -1
- package/dist/taro-components/p-c39a46ca.system.entry.js +1 -0
- package/dist/taro-components/{p-ca3a269f.entry.js → p-c4b8851b.entry.js} +1 -1
- package/dist/taro-components/{p-e5f78321.system.entry.js → p-cdb76676.system.entry.js} +1 -1
- package/dist/taro-components/p-de951a46.js +7 -0
- package/dist/taro-components/p-e09451c5.system.entry.js +1 -0
- package/dist/taro-components/{p-df4c2f21.entry.js → p-e33f3592.entry.js} +1 -1
- package/dist/taro-components/p-e78775ce.system.js +1 -0
- package/dist/taro-components/p-ebc7b6fc.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/p-f02b6f70.entry.js +1 -0
- package/dist/taro-components/{p-1e43a2d5.entry.js → p-f07cd1de.entry.js} +1 -1
- package/dist/taro-components/p-f6f6a996.system.entry.js +1 -0
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -2
- package/dist/types/components/picker/picker-group.d.ts +3 -3
- package/dist/types/components/picker/picker.d.ts +7 -2
- package/dist/types/components/rich-text/rich-text.d.ts +4 -0
- package/dist/types/components/text/text.d.ts +4 -0
- package/dist/types/components/textarea/textarea.d.ts +0 -1
- package/dist/types/components.d.ts +26 -8
- package/lib/react/component-lib/index.js +50 -50
- package/lib/react/component-lib/index.js.map +1 -1
- package/lib/react/component-lib/reactify-wc.js +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +1 -3
- package/lib/react/components.js +2 -2
- package/lib/react/components.js.map +1 -1
- package/lib/react/helper.d.ts +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/utils/attachProps.js +1 -4
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/vue2/components.d.ts +9 -3
- package/lib/vue2/components.js +12 -6
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue2/vue-component-lib/utils.js.map +1 -1
- package/lib/vue3/component-lib/index.js +48 -48
- package/lib/vue3/component-lib/index.js.map +1 -1
- package/lib/vue3/components.d.ts +1 -1
- package/lib/vue3/components.js +13 -6
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +13 -11
- package/types/Button.d.ts +9 -7
- package/types/ChannelVideo.d.ts +4 -0
- package/types/Form.d.ts +11 -0
- package/types/Image.d.ts +5 -0
- package/types/Input.d.ts +6 -1
- package/types/LivePlayer.d.ts +17 -0
- package/types/LivePusher.d.ts +10 -0
- package/types/Picker.d.ts +9 -0
- package/types/Progress.d.ts +2 -2
- package/types/RichText.d.ts +6 -4
- package/types/ScrollView.d.ts +5 -5
- package/types/ShareElement.d.ts +39 -0
- package/types/StickySection.d.ts +0 -1
- package/types/Swiper.d.ts +10 -0
- package/types/Text.d.ts +8 -3
- package/types/Textarea.d.ts +10 -3
- package/types/Video.d.ts +12 -0
- package/types/View.d.ts +1 -1
- package/virtual-list/index.js +2 -2
- package/dist/cjs/hls-0f2d4d85.js +0 -26677
- package/dist/esm/hls-0e83e558.js +0 -26675
- package/dist/esm-es5/hls-0e83e558.js +0 -289
- package/dist/esm-es5/index-394db4c1.js +0 -7
- package/dist/taro-components/p-198000d8.system.js +0 -289
- package/dist/taro-components/p-2fad2a65.js +0 -7
- package/dist/taro-components/p-387314fa.system.js +0 -7
- package/dist/taro-components/p-3e701660.js +0 -289
- package/dist/taro-components/p-4e9bd4f6.entry.js +0 -1
- package/dist/taro-components/p-589293fd.entry.js +0 -1
- package/dist/taro-components/p-58b19305.system.entry.js +0 -1
- package/dist/taro-components/p-5b67a98e.entry.js +0 -1
- package/dist/taro-components/p-735c2a72.system.entry.js +0 -1
- package/dist/taro-components/p-97f0ad72.system.entry.js +0 -1
- package/dist/taro-components/p-a132ebb9.entry.js +0 -1
- package/dist/taro-components/p-c43c5e89.system.entry.js +0 -1
- package/dist/taro-components/p-cc7b95fd.system.entry.js +0 -1
- package/dist/taro-components/p-d9e2e3aa.entry.js +0 -1
- package/dist/taro-components/p-dcbb7b2d.entry.js +0 -1
- package/dist/taro-components/p-ed011ff9.entry.js +0 -1
- package/dist/taro-components/p-fa43177b.system.entry.js +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,h as s,H as t}from"./p-9137dcab.js";import{c as r}from"./p-2fad2a65.js";const i=class{constructor(s){o(this,s),this.type=void 0,this.size="23",this.color=void 0}render(){const{type:o,size:i,color:c}=this,a=null==o?void 0:o.replace(/_/g,"-"),e=r({[`weui-icon-${a}`]:!0});return s(t,{class:e,style:{"font-size":`${i}px`,color:c}})}};export{i as taro_icon_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as h}from"./p-9137dcab.js";import{c as n}from"./p-2fad2a65.js";function o(t,i){const s=[];for(let e=t;e<=i;e++)s.push(`${e<10?"0":""}${e}`);return s}const r=["20","21","22","23",...o(0,23),"00","01","02","03"],a=["56","57","58","59",...o(0,59),"00","01","02","03"];function c(t,i){return!isNaN(+t)&&t>=0&&t<i.length}function u(t){if(!/^\d{1,2}:\d{1,2}$/.test(t))return!1;const i=t.split(":").map((t=>+t));return!(i[0]<0||i[0]>23||i[1]<0||i[1]>59)}function d(t,i){const s=t.split(":").map((t=>+t)),e=i.split(":").map((t=>+t));return s[0]<e[0]||s[0]===e[0]&&s[1]<=e[1]}function l(t){if(!t)return!1;const i=new Date(t.replace(/-/g,"/"));return!isNaN(i.getMonth())&&i}function p(t){let i;return i=Array.isArray(t)?t.map((t=>String(t))):t,i}function m(t,i){const s=[];for(let e=t;e<=i;e++)s.push(e);return s}function g(t,i){return m(t,i)}function f(t,i,s){let e=1,h=12;return t.getFullYear()===s&&(e=t.getMonth()+1),i.getFullYear()===s&&(h=i.getMonth()+1),m(e,h)}function v(t,i,s,e){let h=1,n=function(t,i){return 4===i||6===i||9===i||11===i?30:2===i?t%4==0&&t%100!=0||t%400==0?29:28:31}(s,e);return t.getFullYear()===s&&t.getMonth()+1===e&&(h=t.getDate()),i.getFullYear()===s&&i.getMonth()+1===e&&(n=i.getDate()),m(h,n)}const _=102,k=34,w=class{constructor(e){t(this,e),this.onChange=i(this,"change",7),this.onColumnChange=i(this,"columnchange",7),this.onCancel=i(this,"cancel",7),this.index=[],this.showPicker=()=>{this.disabled||(this.height=this.getHeightByIndex(),this.hidden=!1)},this.getHeightByIndex=()=>this.index.map((t=>{let i=0;return"time"===this.mode&&(i=136),_-k*t-i})),this.hidePicker=()=>{this.fadeOut=!0,setTimeout((()=>{this.hidden=!0,this.fadeOut=!1}),350)},this.handleChange=()=>{this.hidePicker(),this.index=this.height.map((t=>(_-t)/k));let t=this.index.length&&"selector"!==this.mode?this.index:this.index[0];if("time"===this.mode){const i=[r.slice(),a.slice()],s=this.index.map(((t,s)=>i[s][t]));this.index=s.map((t=>parseInt(t))),t=s.join(":")}if("date"===this.mode){const{_start:i,_end:s,_updateValue:e}=this.pickerDate,h=e[0],n=e[1],o=g(i.getFullYear(),s.getFullYear()),r=f(i,s,h),a=v(i,s,h,n),c=o[this.index[0]],u=r[this.index[1]];t="year"===this.fields?[c]:"month"===this.fields?[c,u]:[c,u,a[this.index[2]]],t=t.map((t=>t<10?`0${t}`:t)).join("-")}this.pickerValue=t,this.onChange.emit({value:t})},this.handleCancel=()=>{this.hidePicker(),this.onCancel.emit()},this.updateHeight=(t,i,s=!1)=>{const e=[...this.height];if(e[i]=t,this.height=e,s){let{start:t,end:i}=this;if(u(t)||(t="00:00"),u(i)||(i="23:59"),!d(t,i))return;const s=[r.slice(),a.slice()],e=this.height.map((t=>(_-t)/k)),h=e.map(((t,i)=>s[i][t])).join(":");if(d(t,h)){if(!d(h,i)){const t=i.split(":").map((t=>_-k*(+t+4)));requestAnimationFrame((()=>this.height=t))}}else{const i=t.split(":").map((t=>_-k*(+t+4)));requestAnimationFrame((()=>this.height=i))}}},this.handleColumnChange=(t,i)=>{this.onColumnChange.emit({column:Number(i),value:(_-t)/k})},this.updateDay=(t,i)=>{const{_start:s,_end:e,_updateValue:h}=this.pickerDate;h[i]=t;const n=h[0],o=h[1],r=h[2];if(0===i){const t=f(s,e,n),i=t[t.length-1],r=t[0];o>i&&(h[1]=i),o<r&&(h[1]=r);const a=t.indexOf(h[1]),c=_-k*a;this.updateDay(h[1],1),this.updateHeight(c,"1")}else if(1===i){const t=v(s,e,n,o),i=t[t.length-1],a=t[0];r>i&&(h[2]=i),r<a&&(h[2]=a);const c=t.indexOf(h[2]),u=_-k*c;this.updateDay(h[2],2),this.updateHeight(u,"2")}},this.getSelector=()=>s("taro-picker-group",{range:this.range,rangeKey:this.rangeKey,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),this.getMultiSelector=()=>this.range.map(((t,i)=>s("taro-picker-group",{range:t,rangeKey:this.rangeKey,height:this.height[i],updateHeight:this.updateHeight,onColumnChange:this.handleColumnChange,columnId:String(i)}))),this.getTimeSelector=()=>{const t=r.slice(),i=a.slice();return[s("taro-picker-group",{mode:"time",range:t,height:this.height[0],updateHeight:this.updateHeight,columnId:"0"}),s("taro-picker-group",{mode:"time",range:i,height:this.height[1],updateHeight:this.updateHeight,columnId:"1"})]},this.getDateSelector=()=>{const{fields:t,height:i}=this,{_start:e,_end:h,_updateValue:n}=this.pickerDate,o=n[0],r=n[1],a=g(e.getFullYear(),h.getFullYear()).map((t=>`${t}年`)),c=f(e,h,o).map((t=>`${t<10?`0${t}`:t}月`)),u=v(e,h,o,r).map((t=>`${t<10?`0${t}`:t}日`)),d=[s("taro-picker-group",{mode:"date",range:a,height:i[0],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"0"})];return"month"!==t&&"day"!==t||d.push(s("taro-picker-group",{mode:"date",range:c,height:i[1],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"1"})),"day"===t&&d.push(s("taro-picker-group",{mode:"date",range:u,height:i[2],updateDay:this.updateDay,updateHeight:this.updateHeight,columnId:"2"})),d},this.mode="selector",this.disabled=!1,this.range=[],this.rangeKey=void 0,this.value=void 0,this.start="",this.end="",this.fields="day",this.name="",this.pickerValue=[],this.height=[],this.hidden=!0,this.fadeOut=!1,this.isWillLoadCalled=!1}componentWillLoad(){this.isWillLoadCalled=!0,this.handleProps()}componentDidLoad(){Object.defineProperty(this.el,"value",{get:()=>this.pickerValue,set:t=>this.value!==t&&(this.value=t),configurable:!0}),this.overlay&&document.body.appendChild(this.overlay)}disconnectedCallback(){var t;this.overlay&&(null===(t=this.overlay.parentNode)||void 0===t||t.removeChild(this.overlay))}onPropsChange(){this.isWillLoadCalled&&this.handleProps()}handleProps(){const{mode:t,start:i,end:s}=this;if("selector"===t){const t=this.value;this.index=[c(t,this.range)?Math.floor(t):0]}else if("multiSelector"===t){const t=this.value;this.index=[],this.range.forEach(((i,s)=>{const e=null==t?void 0:t[s],h=c(e,i)?Math.floor(e):0;this.index.push(h)}))}else if("time"===t){let t=this.value;u(t)||(console.warn("time picker value illegal"),t="0:0");const i=t.split(":").map((t=>+t));this.index=i}else if("date"===t){const t=l(this.value)||new Date((new Date).setHours(0,0,0,0)),e=l(i)||new Date("1970/01/01"),h=l(s)||new Date("2999/01/01");if(!(t>=e&&t<=h))throw new Error("Date Interval Error");{const i=t.getFullYear(),s=t.getMonth()+1,n=t.getDate(),o=g(e.getFullYear(),h.getFullYear()),r=f(e,h,i),a=v(e,h,i,s);this.index=[o.indexOf(i),r.indexOf(s),a.indexOf(n)],this.pickerDate&&this.pickerDate._value.getTime()===t.getTime()&&this.pickerDate._start.getTime()===e.getTime()&&this.pickerDate._end.getTime()===h.getTime()||(this.pickerDate={_value:t,_start:e,_end:h,_updateValue:[i,s,n]})}}if(this.height=this.getHeightByIndex(),this.pickerValue=this.value,"date"===t){const t=this.pickerValue;"month"===this.fields?this.pickerValue=t.split("-").slice(0,2).join("-"):"year"===this.fields&&(this.pickerValue=t.split("-")[0])}}render(){const{name:t,mode:i,fadeOut:h,hidden:o}=this;let r;switch(i){case"multiSelector":r=this.getMultiSelector();break;case"time":r=this.getTimeSelector();break;case"date":r=this.getDateSelector();break;default:r=this.getSelector()}const a=n("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":h}),c=n("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":h}),u=o?{display:"none"}:{};return s(e,null,s("div",{onClick:this.showPicker},s("slot",null),s("input",{type:"hidden",name:t,value:p(this.pickerValue)})),s("div",{class:"weui-picker__overlay",style:u,ref:t=>{this.overlay=t}},s("div",{class:a,onClick:this.handleCancel}),s("div",{class:c},s("div",{class:"weui-picker__hd"},s("div",{class:"weui-picker__action",onClick:this.handleCancel},"取消"),s("div",{class:"weui-picker__action",onClick:this.handleChange},"确定")),s("div",{class:"weui-picker__bd"},r),s("input",{type:"hidden",name:t,value:p(this.pickerValue)}))))}get el(){return h(this)}static get watchers(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}}};w.style=".weui-picker,.weui-picker__hd{font-size:12px}";const y=class{constructor(i){t(this,i),this.mode=void 0,this.range=[],this.rangeKey=void 0,this.height=void 0,this.columnId=void 0,this.updateHeight=void 0,this.onColumnChange=void 0,this.updateDay=void 0,this.startY=void 0,this.preY=void 0,this.hadMove=void 0,this.touchEnd=void 0,this.isMove=void 0}getPosition(){const t=`translate3d(0, ${this.height}px, 0)`,i=`transform ${this.touchEnd?.3:0}s`;return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}}formulaUnlimitedScroll(t,i,s){const{height:e,updateHeight:h,columnId:n}=this,o="up"===s?1:-1;this.touchEnd=!1,h(-t*o*k+e,n),requestAnimationFrame((()=>{this.touchEnd=!0;const s=Math.round(i/-34)+t*o;h(_-k*s,n,!0)}))}async handleMoveStart(t){this.startY=t,this.preY=t,this.hadMove=!1}async handleMoving(t){const i=t,s=i-this.preY;this.preY=i,this.touchEnd=!1,Math.abs(i-this.startY)>10&&(this.hadMove=!0);let e=this.height+s;"time"===this.mode&&("0"===this.columnId?(e>0&&(e=-816+s),e<-850&&(e=-34+s)):"1"===this.columnId&&(e>0&&(e=-2040+s),e<-2074&&(e=-34+s))),this.updateHeight(e,this.columnId)}async handleMoveEnd(t){const{mode:i,range:s,height:e,updateHeight:h,onColumnChange:n,columnId:o}=this,r=-34*(s.length-1),a=t;let c;if(this.touchEnd=!0,this.hadMove)c=e-_;else{const t=window.innerHeight;if(c=e-_-(a-(t-119)),"time"===i)if("0"===o){if(c>-85)return this.formulaUnlimitedScroll(24,c,"up");if(c<-969)return this.formulaUnlimitedScroll(24,c,"down")}else if("1"===o){if(c>-85)return this.formulaUnlimitedScroll(60,c,"up");if(c<-2193)return this.formulaUnlimitedScroll(60,c,"down")}}c>0&&(c=0),c<r&&(c=r);const u=Math.round(c/-34),d=_-k*u;"date"===this.mode&&("0"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),0),"1"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),1),"2"===this.columnId&&this.updateDay(+this.range[u].replace(/[^0-9]/gi,""),2)),h(d,o,"time"===i),n&&n(d,o)}onMouseDown(t){this.isMove=!0,this.handleMoveStart(t.clientY)}onMouseMove(t){t.preventDefault(),this.isMove&&this.handleMoving(t.clientY)}onMouseMoveEnd(t){this.isMove&&(this.isMove=!1,this.handleMoveEnd(t.clientY))}onTouchStart(t){this.handleMoveStart(t.changedTouches[0].clientY)}onTouchMove(t){t.preventDefault(),this.handleMoving(t.changedTouches[0].clientY)}onTouchEnd(t){this.handleMoveEnd(t.changedTouches[0].clientY)}render(){const{range:t,rangeKey:i}=this,h=t.map((t=>s("div",{class:"weui-picker__item"},i?t[i]:t)));return s(e,{class:"weui-picker__group"},s("div",{class:"weui-picker__mask"}),s("div",{class:"weui-picker__indicator"}),s("div",{class:"weui-picker__content",style:this.getPosition()},h))}};export{w as taro_picker_core,y as taro_picker_group}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js","./p-387314fa.system.js"],(function(t){"use strict";var e,n,r,i;return{setters:[function(t){e=t.r;n=t.h;r=t.H},function(t){i=t.c}],execute:function(){var o=t("taro_icon_core",function(){function t(t){e(this,t);this.type=undefined;this.size="23";this.color=undefined}t.prototype.render=function(){var t;var e=this,o=e.type,c=e.size,s=e.color;var u=o===null||o===void 0?void 0:o.replace(/_/g,"-");var a=i((t={},t["weui-icon-".concat(u)]=true,t));var f={"font-size":"".concat(c,"px"),color:s};return n(r,{class:a,style:f})};return t}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as r,H as n}from"./p-9137dcab.js";const e=class{constructor(n){t(this,n),this.renderNode=t=>{if("type"in t&&"text"===t.type)return(t.text||"").replace(/ /g," ");if("name"in t&&t.name){const{name:n,attrs:e,children:s}=t,o={};let i=[];if(e&&"object"==typeof e)for(const t in e){const r=e[t];if("style"!==t||"string"!=typeof r)o[t]=r;else{const t=r.split(";").map((t=>t.trim())).filter((t=>t)),n={};t.forEach((t=>{if(!t)return;const r=/(.+): *(.+)/g.exec(t);if(!r)return;const[,e,s]=r,o=e.replace(/-([a-z])/g,((...t)=>t[1].toUpperCase()));n[o]=s})),Object.keys(n).length&&(o.style=n)}}return s&&s.length&&(i=s.map((t=>this.renderNode(t)))),r(n,o,i)}return null},this.nodes=void 0}render(){const{nodes:t,renderNode:e}=this;return Array.isArray(t)?r(n,null,t.map((t=>e(t)))):r(n,{innerHTML:t})}};export{e as taro_rich_text_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function r(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function o(e){try{s(n.next(e))}catch(e){a(e)}}function u(e){try{s(n["throw"](e))}catch(e){a(e)}}function s(e){e.done?i(e.value):r(e.value).then(o,u)}s((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,r,a,o;return o={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function u(e){return function(t){return s([e,t])}}function s(u){if(n)throw new TypeError("Generator is already executing.");while(o&&(o=0,u[0]&&(i=0)),i)try{if(n=1,r&&(a=u[0]&2?r["return"]:u[0]?r["throw"]||((a=r["return"])&&a.call(r),0):r.next)&&!(a=a.call(r,u[1])).done)return a;if(r=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:i.label++;return{value:u[1],done:false};case 5:i.label++;r=u[1];u=[0];continue;case 7:u=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){i=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){i.label=u[1];break}if(u[0]===6&&i.label<a[1]){i.label=a[1];a=u;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(u);break}if(a[2])i.ops.pop();i.trys.pop();continue}u=t.call(e,i)}catch(e){u=[6,e];r=0}finally{n=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,r=t.length,a;n<r;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-7e6b54cb.system.js","./p-387314fa.system.js"],(function(e){"use strict";var t,i,n,r,a,o;return{setters:[function(e){t=e.r;i=e.c;n=e.h;r=e.H;a=e.g},function(e){o=e.c}],execute:function(){function u(e,t){var i=[];for(var n=e;n<=t;n++){i.push("".concat(n<10?"0":"").concat(n))}return i}var s=__spreadArray(__spreadArray(["20","21","22","23"],u(0,23),true),["00","01","02","03"],false);var h=__spreadArray(__spreadArray(["56","57","58","59"],u(0,59),true),["00","01","02","03"],false);function l(e,t){if(!isNaN(+e)&&e>=0&&e<t.length)return true;return false}function c(e){if(!/^\d{1,2}:\d{1,2}$/.test(e))return false;var t=e.split(":").map((function(e){return+e}));if(t[0]<0||t[0]>23)return false;if(t[1]<0||t[1]>59)return false;return true}function d(e,t){var i=e.split(":").map((function(e){return+e}));var n=t.split(":").map((function(e){return+e}));if(i[0]<n[0])return true;if(i[0]===n[0]&&i[1]<=n[1])return true;return false}function f(e){if(!e)return false;var t=new Date(e.replace(/-/g,"/"));return isNaN(t.getMonth())?false:t}function p(e,t){if(t===4||t===6||t===9||t===11)return 30;if(t===2){if(e%4===0&&e%100!==0||e%400===0)return 29;else return 28}return 31}function v(e){var t;if(Array.isArray(e)){t=e.map((function(e){return String(e)}))}else{t=e}return t}function g(e,t){var i=[];for(var n=e;n<=t;n++){i.push(n)}return i}function m(e,t){return g(e,t)}function y(e,t,i){var n=1;var r=12;if(e.getFullYear()===i){n=e.getMonth()+1}if(t.getFullYear()===i){r=t.getMonth()+1}return g(n,r)}function _(e,t,i,n){var r=1;var a=p(i,n);if(e.getFullYear()===i&&e.getMonth()+1===n){r=e.getDate()}if(t.getFullYear()===i&&t.getMonth()+1===n){a=t.getDate()}return g(r,a)}var k=102;var w=34;var C=w*7;var M=".weui-picker,.weui-picker__hd{font-size:12px}";var b=e("taro_picker_core",function(){function e(e){var r=this;t(this,e);this.onChange=i(this,"change",7);this.onColumnChange=i(this,"columnchange",7);this.onCancel=i(this,"cancel",7);this.index=[];this.showPicker=function(){if(r.disabled)return;r.height=r.getHeightByIndex();r.hidden=false};this.getHeightByIndex=function(){var e=r.index.map((function(e){var t=0;if(r.mode==="time"){t=w*4}return k-w*e-t}));return e};this.hidePicker=function(){r.fadeOut=true;setTimeout((function(){r.hidden=true;r.fadeOut=false}),350)};this.handleChange=function(){r.hidePicker();r.index=r.height.map((function(e){return(k-e)/w}));var e=r.index.length&&r.mode!=="selector"?r.index:r.index[0];if(r.mode==="time"){var t=[s.slice(),h.slice()];var i=r.index.map((function(e,i){return t[i][e]}));r.index=i.map((function(e){return parseInt(e)}));e=i.join(":")}if(r.mode==="date"){var n=r.pickerDate,a=n._start,o=n._end,u=n._updateValue;var l=u[0];var c=u[1];var d=m(a.getFullYear(),o.getFullYear());var f=y(a,o,l);var p=_(a,o,l,c);var v=d[r.index[0]];var g=f[r.index[1]];var C=p[r.index[2]];if(r.fields==="year"){e=[v]}else if(r.fields==="month"){e=[v,g]}else{e=[v,g,C]}e=e.map((function(e){return e<10?"0".concat(e):e})).join("-")}r.pickerValue=e;r.onChange.emit({value:e})};this.handleCancel=function(){r.hidePicker();r.onCancel.emit()};this.updateHeight=function(e,t,i){if(i===void 0){i=false}var n=__spreadArray([],r.height,true);n[t]=e;r.height=n;if(i){var a=r,o=a.start,u=a.end;if(!c(o))o="00:00";if(!c(u))u="23:59";if(!d(o,u))return;var l=[s.slice(),h.slice()];var f=r.height.map((function(e){return(k-e)/w}));var p=f.map((function(e,t){return l[t][e]})).join(":");if(!d(o,p)){var v=o.split(":").map((function(e){return k-w*(+e+4)}));requestAnimationFrame((function(){return r.height=v}))}else if(!d(p,u)){var g=u.split(":").map((function(e){return k-w*(+e+4)}));requestAnimationFrame((function(){return r.height=g}))}}};this.handleColumnChange=function(e,t){r.onColumnChange.emit({column:Number(t),value:(k-e)/w})};this.updateDay=function(e,t){var i=r.pickerDate,n=i._start,a=i._end,o=i._updateValue;o[t]=e;var u=o[0];var s=o[1];var h=o[2];if(t===0){var l=y(n,a,u);var c=l[l.length-1];var d=l[0];if(s>c)o[1]=c;if(s<d)o[1]=d;var f=l.indexOf(o[1]);var p=k-w*f;r.updateDay(o[1],1);r.updateHeight(p,"1")}else if(t===1){var v=_(n,a,u,s);var c=v[v.length-1];var d=v[0];if(h>c)o[2]=c;if(h<d)o[2]=d;var f=v.indexOf(o[2]);var p=k-w*f;r.updateDay(o[2],2);r.updateHeight(p,"2")}};this.getSelector=function(){return n("taro-picker-group",{range:r.range,rangeKey:r.rangeKey,height:r.height[0],updateHeight:r.updateHeight,columnId:"0"})};this.getMultiSelector=function(){return r.range.map((function(e,t){return n("taro-picker-group",{range:e,rangeKey:r.rangeKey,height:r.height[t],updateHeight:r.updateHeight,onColumnChange:r.handleColumnChange,columnId:String(t)})}))};this.getTimeSelector=function(){var e=s.slice();var t=h.slice();return[n("taro-picker-group",{mode:"time",range:e,height:r.height[0],updateHeight:r.updateHeight,columnId:"0"}),n("taro-picker-group",{mode:"time",range:t,height:r.height[1],updateHeight:r.updateHeight,columnId:"1"})]};this.getDateSelector=function(){var e=r,t=e.fields,i=e.height;var a=r.pickerDate,o=a._start,u=a._end,s=a._updateValue;var h=s[0];var l=s[1];var c=m(o.getFullYear(),u.getFullYear()).map((function(e){return"".concat(e,"年")}));var d=y(o,u,h).map((function(e){return"".concat(e<10?"0".concat(e):e,"月")}));var f=_(o,u,h,l).map((function(e){return"".concat(e<10?"0".concat(e):e,"日")}));var p=[n("taro-picker-group",{mode:"date",range:c,height:i[0],updateDay:r.updateDay,updateHeight:r.updateHeight,columnId:"0"})];if(t==="month"||t==="day"){p.push(n("taro-picker-group",{mode:"date",range:d,height:i[1],updateDay:r.updateDay,updateHeight:r.updateHeight,columnId:"1"}))}if(t==="day"){p.push(n("taro-picker-group",{mode:"date",range:f,height:i[2],updateDay:r.updateDay,updateHeight:r.updateHeight,columnId:"2"}))}return p};this.mode="selector";this.disabled=false;this.range=[];this.rangeKey=undefined;this.value=undefined;this.start="";this.end="";this.fields="day";this.name="";this.pickerValue=[];this.height=[];this.hidden=true;this.fadeOut=false;this.isWillLoadCalled=false}e.prototype.componentWillLoad=function(){this.isWillLoadCalled=true;this.handleProps()};e.prototype.componentDidLoad=function(){var e=this;Object.defineProperty(this.el,"value",{get:function(){return e.pickerValue},set:function(t){return e.value!==t&&(e.value=t)},configurable:true});if(this.overlay){document.body.appendChild(this.overlay)}};e.prototype.disconnectedCallback=function(){var e;if(this.overlay){(e=this.overlay.parentNode)===null||e===void 0?void 0:e.removeChild(this.overlay)}};e.prototype.onPropsChange=function(){if(!this.isWillLoadCalled)return;this.handleProps()};e.prototype.handleProps=function(){var e=this;var t=this,i=t.mode,n=t.start,r=t.end;if(i==="selector"){var a=this.value;this.index=[l(a,this.range)?Math.floor(a):0]}else if(i==="multiSelector"){var o=this.value;this.index=[];this.range.forEach((function(t,i){var n=o===null||o===void 0?void 0:o[i];var r=l(n,t)?Math.floor(n):0;e.index.push(r)}))}else if(i==="time"){var a=this.value;if(!c(a)){console.warn("time picker value illegal");a="0:0"}var u=a.split(":").map((function(e){return+e}));this.index=u}else if(i==="date"){var a=this.value;var s=f(a)||new Date((new Date).setHours(0,0,0,0));var h=f(n)||new Date("1970/01/01");var d=f(r)||new Date("2999/01/01");if(s>=h&&s<=d){var p=s.getFullYear();var v=s.getMonth()+1;var g=s.getDate();var k=m(h.getFullYear(),d.getFullYear());var w=y(h,d,p);var C=_(h,d,p,v);this.index=[k.indexOf(p),w.indexOf(v),C.indexOf(g)];if(!this.pickerDate||this.pickerDate._value.getTime()!==s.getTime()||this.pickerDate._start.getTime()!==h.getTime()||this.pickerDate._end.getTime()!==d.getTime()){this.pickerDate={_value:s,_start:h,_end:d,_updateValue:[p,v,g]}}}else{throw new Error("Date Interval Error")}}this.height=this.getHeightByIndex();this.pickerValue=this.value;if(i==="date"){var M=this.pickerValue;if(this.fields==="month"){this.pickerValue=M.split("-").slice(0,2).join("-")}else if(this.fields==="year"){this.pickerValue=M.split("-")[0]}}};e.prototype.render=function(){var e=this;var t=this,i=t.name,a=t.mode,u=t.fadeOut,s=t.hidden;var h;switch(a){case"multiSelector":h=this.getMultiSelector();break;case"time":h=this.getTimeSelector();break;case"date":h=this.getDateSelector();break;default:h=this.getSelector()}var l=o("weui-mask","weui-animate-fade-in",{"weui-animate-fade-out":u});var c=o("weui-picker","weui-animate-slide-up",{"weui-animate-slide-down":u});var d=s?{display:"none"}:{};return n(r,null,n("div",{onClick:this.showPicker},n("slot",null),n("input",{type:"hidden",name:i,value:v(this.pickerValue)})),n("div",{class:"weui-picker__overlay",style:d,ref:function(t){e.overlay=t}},n("div",{class:l,onClick:this.handleCancel}),n("div",{class:c},n("div",{class:"weui-picker__hd"},n("div",{class:"weui-picker__action",onClick:this.handleCancel},"取消"),n("div",{class:"weui-picker__action",onClick:this.handleChange},"确定")),n("div",{class:"weui-picker__bd"},h),n("input",{type:"hidden",name:i,value:v(this.pickerValue)}))))};Object.defineProperty(e.prototype,"el",{get:function(){return a(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{mode:["onPropsChange"],value:["onPropsChange"],range:["onPropsChange"],start:["onPropsChange"],end:["onPropsChange"]}},enumerable:false,configurable:true});return e}());b.style=M;var D=e("taro_picker_group",function(){function e(e){t(this,e);this.mode=undefined;this.range=[];this.rangeKey=undefined;this.height=undefined;this.columnId=undefined;this.updateHeight=undefined;this.onColumnChange=undefined;this.updateDay=undefined;this.startY=undefined;this.preY=undefined;this.hadMove=undefined;this.touchEnd=undefined;this.isMove=undefined}e.prototype.getPosition=function(){var e=this.touchEnd?.3:0;var t="translate3d(0, ".concat(this.height,"px, 0)");var i="transform ".concat(e,"s");return{transform:t,"-webkit-transform":t,transition:i,"-webkit-transition":i}};e.prototype.formulaUnlimitedScroll=function(e,t,i){var n=this;var r=this,a=r.height,o=r.updateHeight,u=r.columnId;var s=i==="up"?1:-1;this.touchEnd=false;o(-e*s*w+a,u);requestAnimationFrame((function(){n.touchEnd=true;var i=Math.round(t/-w)+e*s;var r=k-w*i;o(r,u,true)}))};e.prototype.handleMoveStart=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.startY=e;this.preY=e;this.hadMove=false;return[2]}))}))};e.prototype.handleMoving=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n;return __generator(this,(function(r){t=e;i=t-this.preY;this.preY=t;this.touchEnd=false;if(Math.abs(t-this.startY)>10)this.hadMove=true;n=this.height+i;if(this.mode==="time"){if(this.columnId==="0"){if(n>k-w*3){n=k-w*27+i}if(n<k-w*28){n=k-w*4+i}}else if(this.columnId==="1"){if(n>k-w*3){n=k-w*63+i}if(n<k-w*64){n=k-w*4+i}}}this.updateHeight(n,this.columnId);return[2]}))}))};e.prototype.handleMoveEnd=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,r,a,o,u,s,h,l,c,d,f,p,v;return __generator(this,(function(g){t=this,i=t.mode,n=t.range,r=t.height,a=t.updateHeight,o=t.onColumnChange,u=t.columnId;s=0;h=-w*(n.length-1);l=e;this.touchEnd=true;if(!this.hadMove){d=window.innerHeight;f=d-C/2;c=r-k-(l-f);if(i==="time"){if(u==="0"){if(c>-w*2.5){return[2,this.formulaUnlimitedScroll(24,c,"up")]}if(c<-w*28.5){return[2,this.formulaUnlimitedScroll(24,c,"down")]}}else if(u==="1"){if(c>-w*2.5){return[2,this.formulaUnlimitedScroll(60,c,"up")]}if(c<-w*64.5){return[2,this.formulaUnlimitedScroll(60,c,"down")]}}}}else{c=r-k}if(c>s)c=0;if(c<h)c=h;p=Math.round(c/-w);v=k-w*p;if(this.mode==="date"){if(this.columnId==="0"){this.updateDay(+this.range[p].replace(/[^0-9]/gi,""),0)}if(this.columnId==="1"){this.updateDay(+this.range[p].replace(/[^0-9]/gi,""),1)}if(this.columnId==="2"){this.updateDay(+this.range[p].replace(/[^0-9]/gi,""),2)}}a(v,u,i==="time");o&&o(v,u);return[2]}))}))};e.prototype.onMouseDown=function(e){this.isMove=true;this.handleMoveStart(e.clientY)};e.prototype.onMouseMove=function(e){e.preventDefault();if(!this.isMove)return;this.handleMoving(e.clientY)};e.prototype.onMouseMoveEnd=function(e){if(!this.isMove)return;this.isMove=false;this.handleMoveEnd(e.clientY)};e.prototype.onTouchStart=function(e){this.handleMoveStart(e.changedTouches[0].clientY)};e.prototype.onTouchMove=function(e){e.preventDefault();this.handleMoving(e.changedTouches[0].clientY)};e.prototype.onTouchEnd=function(e){this.handleMoveEnd(e.changedTouches[0].clientY)};e.prototype.render=function(){var e=this,t=e.range,i=e.rangeKey;var a=t.map((function(e){var t=i?e[i]:e;return n("div",{class:"weui-picker__item"},t)}));return n(r,{class:"weui-picker__group"},n("div",{class:"weui-picker__mask"}),n("div",{class:"weui-picker__indicator"}),n("div",{class:"weui-picker__content",style:this.getPosition()},a))};return e}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js","@tarojs/taro","./p-387314fa.system.js"],(function(e){"use strict";var t,i,r,a,s,n;return{setters:[function(e){t=e.r;i=e.c;r=e.h;a=e.H},function(e){s=e.default},function(e){n=e.c}],execute:function(){var o=".navigator-hover{background:#efefef}";var c=e("taro_navigator_core",function(){function e(e){t(this,e);this.onSuccess=i(this,"cuccess",7);this.onFail=i(this,"fail",7);this.onComplete=i(this,"complete",7);this.hoverClass=undefined;this.url=undefined;this.openType="navigate";this.isHover=false;this.delta=0}e.prototype.onClick=function(){var e=this,t=e.openType,i=e.onSuccess,r=e.onFail,a=e.onComplete;var n=Promise.resolve();switch(t){case"navigate":n=s.navigateTo({url:this.url});break;case"redirect":n=s.redirectTo({url:this.url});break;case"switchTab":n=s.switchTab({url:this.url});break;case"reLaunch":n=s.reLaunch({url:this.url});break;case"navigateBack":n=s.navigateBack({delta:this.delta});break;case"exit":n=Promise.reject(new Error('navigator:fail 暂不支持"openType: exit"'));break}if(n){n.then((function(e){i.emit(e)})).catch((function(e){r.emit(e)})).finally((function(){a.emit()}))}};e.prototype.render=function(){var e;var t=this,i=t.isHover,s=t.hoverClass;return r(a,{class:n((e={},e[s]=i,e))})};return e}());c.style=o}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,g as h}from"./p-9137dcab.js";function o(t,i,s){if("search"===i&&(t="search"),s&&(t="password"),void 0===t)return"text";if(!t)throw new Error("unexpected type");return"digit"===t&&(t="number"),t}function e(t){return null!=t?t:""}const n=class{constructor(s){t(this,s),this.onInput=i(this,"input",7),this.onPaste=i(this,"paste",7),this.onFocus=i(this,"focus",7),this.onBlur=i(this,"blur",7),this.onConfirm=i(this,"confirm",7),this.onChange=i(this,"change",7),this.onKeyDown=i(this,"keydown",7),this.isOnComposition=!1,this.isOnPaste=!1,this.onInputExcuted=!1,this.handleInput=t=>{t.stopPropagation();const{type:i,maxlength:s,confirmType:h,password:e}=this;if(!this.isOnComposition&&!this.onInputExcuted){let n=t.target.value;const u=o(i,h,e);this.onInputExcuted=!0,"number"===u&&n&&s>-1&&s<=n.length&&(n=n.substring(0,s),t.target.value=n),this.value=n,this.onInput.emit({value:n,cursor:n.length}),this.onInputExcuted=!1}},this.handlePaste=t=>{t.stopPropagation(),this.isOnPaste=!0,this.onPaste.emit({value:t.target.value})},this.handleFocus=t=>{t.stopPropagation(),this.onInputExcuted=!1,this.onFocus.emit({value:t.target.value})},this.handleBlur=t=>{t.stopPropagation(),this.onBlur.emit({value:t.target.value})},this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:t.target.value}),this.isOnPaste&&(this.isOnPaste=!1,this.value=t.target.value,this.onInput.emit({value:t.target.value,cursor:t.target.value.length}))},this.handleKeyDown=t=>{t.stopPropagation();const{value:i}=t.target,s=t.keyCode||t.code;this.onInputExcuted=!1,this.onKeyDown.emit({value:i,cursor:i.length,keyCode:s}),13===s&&this.onConfirm.emit({value:i})},this.handleComposition=t=>{t.stopPropagation(),t.target instanceof HTMLInputElement&&("compositionend"===t.type?(this.isOnComposition=!1,this.value=t.target.value,this.onInput.emit({value:t.target.value,cursor:t.target.value.length})):this.isOnComposition=!0)},this.handleBeforeinput=t=>{if(!t.data)return;const i=t.data&&/[0-9]/.test(t.data);"number"!==this.type||i||t.preventDefault(),"digit"!==this.type||i||("."!==t.data||"."===t.data&&t.target.value.indexOf(".")>-1)&&t.preventDefault()},this.value=void 0,this.type=void 0,this.password=!1,this.placeholder=void 0,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.confirmType="done",this.name=void 0,this.nativeProps={}}async focus(){this.inputRef.focus()}watchAutoFocus(t,i){var s;!i&&t&&(null===(s=this.inputRef)||void 0===s||s.focus())}watchValue(t){const i=e(t);this.inputRef.value!==i&&(this.inputRef.value=i)}componentDidLoad(){var t,i,s,h,o;"file"===this.type?(this.fileListener=()=>{this.onInput.emit()},null===(t=this.inputRef)||void 0===t||t.addEventListener("change",this.fileListener)):(null===(i=this.inputRef)||void 0===i||i.addEventListener("compositionstart",this.handleComposition),null===(s=this.inputRef)||void 0===s||s.addEventListener("compositionend",this.handleComposition),null===(h=this.inputRef)||void 0===h||h.addEventListener("beforeinput",this.handleBeforeinput),null===(o=this.inputRef)||void 0===o||o.addEventListener("textInput",this.handleBeforeinput)),Object.defineProperty(this.el,"value",{get:()=>this.inputRef.value,set:t=>this.value!==t&&(this.value=t),configurable:!0})}disconnectedCallback(){var t,i,s,h,o;"file"===this.type?null===(t=this.inputRef)||void 0===t||t.removeEventListener("change",this.fileListener):(null===(i=this.inputRef)||void 0===i||i.removeEventListener("compositionstart",this.handleComposition),null===(s=this.inputRef)||void 0===s||s.removeEventListener("compositionend",this.handleComposition),null===(h=this.inputRef)||void 0===h||h.removeEventListener("beforeinput",this.handleBeforeinput),null===(o=this.inputRef)||void 0===o||o.removeEventListener("textInput",this.handleBeforeinput))}render(){const{value:t,type:i,password:h,placeholder:n,autoFocus:u,disabled:a,maxlength:r,confirmType:l,name:c,nativeProps:d}=this;return s("input",Object.assign({ref:t=>{this.inputRef=t,u&&t&&t.focus()},class:"weui-input",type:o(i,l,h),placeholder:n,autoFocus:u,disabled:a,maxlength:r,name:c,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},d,{value:e(t)}))}get el(){return h(this)}static get watchers(){return{autoFocus:["watchAutoFocus"],value:["watchValue"]}}};n.style="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";export{n as taro_input_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js"],(function(r){"use strict";var e,t,n;return{setters:[function(r){e=r.r;t=r.h;n=r.H}],execute:function(){var i=r("taro_rich_text_core",function(){function r(r){var n=this;e(this,r);this.renderNode=function(r){if("type"in r&&r.type==="text"){var e=(r.text||"").replace(/ /g," ");return e}else if("name"in r&&r.name){var i=r.name,u=r.attrs,a=r.children;var o={};var f=[];if(u&&typeof u==="object"){var c=function(r){var e=u[r];if(r==="style"&&typeof e==="string"){var t=e.split(";").map((function(r){return r.trim()})).filter((function(r){return r}));var n={};t.forEach((function(r){if(!r)return;var e=/(.+): *(.+)/g.exec(r);if(!e)return;var t=e[1],i=e[2];var u=t.replace(/-([a-z])/g,(function(){var r=[];for(var e=0;e<arguments.length;e++){r[e]=arguments[e]}return r[1].toUpperCase()}));n[u]=i}));if(Object.keys(n).length){o.style=n}return"continue"}o[r]=e};for(var s in u){c(s)}}if(a&&a.length){f=a.map((function(r){return n.renderNode(r)}))}return t(i,o,f)}return null};this.nodes=undefined}r.prototype.render=function(){var r=this,e=r.nodes,i=r.renderNode;if(Array.isArray(e)){return t(n,null,e.map((function(r){return i(r)})))}else{return t(n,{innerHTML:e})}};return r}())}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var __awaiter=this&&this.__awaiter||function(t,e,n,i){function o(t){return t instanceof n?t:new n((function(e){e(t)}))}return new(n||(n=Promise))((function(n,a){function r(t){try{s(i.next(t))}catch(t){a(t)}}function u(t){try{s(i["throw"](t))}catch(t){a(t)}}function s(t){t.done?n(t.value):o(t.value).then(r,u)}s((i=i.apply(t,e||[])).next())}))};var __generator=this&&this.__generator||function(t,e){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},i,o,a,r;return r={next:u(0),throw:u(1),return:u(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function u(t){return function(e){return s([t,e])}}function s(u){if(i)throw new TypeError("Generator is already executing.");while(r&&(r=0,u[0]&&(n=0)),n)try{if(i=1,o&&(a=u[0]&2?o["return"]:u[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,u[1])).done)return a;if(o=0,a)u=[u[0]&2,a.value];switch(u[0]){case 0:case 1:a=u;break;case 4:n.label++;return{value:u[1],done:false};case 5:n.label++;o=u[1];u=[0];continue;case 7:u=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1];a=u;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(u);break}if(a[2])n.ops.pop();n.trys.pop();continue}u=e.call(t,n)}catch(t){u=[6,t];o=0}finally{i=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:true}}};System.register(["./p-7e6b54cb.system.js"],(function(t){"use strict";var e,n,i,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h;o=t.g}],execute:function(){var a="taro-input-core{display:block}input{display:block;overflow:hidden;height:1.4rem;text-overflow:clip;text-align:inherit;white-space:nowrap}";function r(t,e,n){if(e==="search")t="search";if(n)t="password";if(typeof t==="undefined"){return"text"}if(!t){throw new Error("unexpected type")}if(t==="digit")t="number";return t}function u(t){return t!==null&&t!==void 0?t:""}var s=t("taro_input_core",function(){function t(t){var i=this;e(this,t);this.onInput=n(this,"input",7);this.onPaste=n(this,"paste",7);this.onFocus=n(this,"focus",7);this.onBlur=n(this,"blur",7);this.onConfirm=n(this,"confirm",7);this.onChange=n(this,"change",7);this.onKeyDown=n(this,"keydown",7);this.isOnComposition=false;this.isOnPaste=false;this.onInputExcuted=false;this.handleInput=function(t){t.stopPropagation();var e=i,n=e.type,o=e.maxlength,a=e.confirmType,u=e.password;if(!i.isOnComposition&&!i.onInputExcuted){var s=t.target.value;var l=r(n,a,u);i.onInputExcuted=true;if(l==="number"&&s&&o>-1&&o<=s.length){s=s.substring(0,o);t.target.value=s}i.value=s;i.onInput.emit({value:s,cursor:s.length});i.onInputExcuted=false}};this.handlePaste=function(t){t.stopPropagation();i.isOnPaste=true;i.onPaste.emit({value:t.target.value})};this.handleFocus=function(t){t.stopPropagation();i.onInputExcuted=false;i.onFocus.emit({value:t.target.value})};this.handleBlur=function(t){t.stopPropagation();i.onBlur.emit({value:t.target.value})};this.handleChange=function(t){t.stopPropagation();i.onChange.emit({value:t.target.value});if(i.isOnPaste){i.isOnPaste=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}};this.handleKeyDown=function(t){t.stopPropagation();var e=t.target.value;var n=t.keyCode||t.code;i.onInputExcuted=false;i.onKeyDown.emit({value:e,cursor:e.length,keyCode:n});n===13&&i.onConfirm.emit({value:e})};this.handleComposition=function(t){t.stopPropagation();if(!(t.target instanceof HTMLInputElement))return;if(t.type==="compositionend"){i.isOnComposition=false;i.value=t.target.value;i.onInput.emit({value:t.target.value,cursor:t.target.value.length})}else{i.isOnComposition=true}};this.handleBeforeinput=function(t){if(!t.data)return;var e=t.data&&/[0-9]/.test(t.data);if(i.type==="number"&&!e){t.preventDefault()}if(i.type==="digit"&&!e){if(t.data!=="."||t.data==="."&&t.target.value.indexOf(".")>-1){t.preventDefault()}}};this.value=undefined;this.type=undefined;this.password=false;this.placeholder=undefined;this.disabled=false;this.maxlength=140;this.autoFocus=false;this.confirmType="done";this.name=undefined;this.nativeProps={}}t.prototype.focus=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){this.inputRef.focus();return[2]}))}))};t.prototype.watchAutoFocus=function(t,e){var n;if(!e&&t){(n=this.inputRef)===null||n===void 0?void 0:n.focus()}};t.prototype.watchValue=function(t){var e=u(t);if(this.inputRef.value!==e){this.inputRef.value=e}};t.prototype.componentDidLoad=function(){var t=this;var e,n,i,o,a;if(this.type==="file"){this.fileListener=function(){t.onInput.emit()};(e=this.inputRef)===null||e===void 0?void 0:e.addEventListener("change",this.fileListener)}else{(n=this.inputRef)===null||n===void 0?void 0:n.addEventListener("compositionstart",this.handleComposition);(i=this.inputRef)===null||i===void 0?void 0:i.addEventListener("compositionend",this.handleComposition);(o=this.inputRef)===null||o===void 0?void 0:o.addEventListener("beforeinput",this.handleBeforeinput);(a=this.inputRef)===null||a===void 0?void 0:a.addEventListener("textInput",this.handleBeforeinput)}Object.defineProperty(this.el,"value",{get:function(){return t.inputRef.value},set:function(e){return t.value!==e&&(t.value=e)},configurable:true})};t.prototype.disconnectedCallback=function(){var t,e,n,i,o;if(this.type==="file"){(t=this.inputRef)===null||t===void 0?void 0:t.removeEventListener("change",this.fileListener)}else{(e=this.inputRef)===null||e===void 0?void 0:e.removeEventListener("compositionstart",this.handleComposition);(n=this.inputRef)===null||n===void 0?void 0:n.removeEventListener("compositionend",this.handleComposition);(i=this.inputRef)===null||i===void 0?void 0:i.removeEventListener("beforeinput",this.handleBeforeinput);(o=this.inputRef)===null||o===void 0?void 0:o.removeEventListener("textInput",this.handleBeforeinput)}};t.prototype.render=function(){var t=this;var e=this,n=e.value,o=e.type,a=e.password,s=e.placeholder,l=e.autoFocus,h=e.disabled,f=e.maxlength,p=e.confirmType,c=e.name,d=e.nativeProps;return i("input",Object.assign({ref:function(e){t.inputRef=e;if(l&&e)e.focus()},class:"weui-input",type:r(o,p,a),placeholder:s,autoFocus:l,disabled:h,maxlength:f,name:c,onInput:this.handleInput,onFocus:this.handleFocus,onBlur:this.handleBlur,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onPaste:this.handlePaste,onCompositionStart:this.handleComposition,onCompositionEnd:this.handleComposition},d,{value:u(n)}))};Object.defineProperty(t.prototype,"el",{get:function(){return o(this)},enumerable:false,configurable:true});Object.defineProperty(t,"watchers",{get:function(){return{autoFocus:["watchAutoFocus"],value:["watchValue"]}},enumerable:false,configurable:true});return t}());s.style=a}}}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as i,g as s}from"./p-9137dcab.js";function h(t){return null!=t?t:""}const a=class{constructor(i){t(this,i),this.onInput=e(this,"input",7),this.onFocus=e(this,"focus",7),this.onBlur=e(this,"blur",7),this.onConfirm=e(this,"confirm",7),this.onChange=e(this,"change",7),this.onLineChange=e(this,"linechange",7),this.onKeyDown=e(this,"keydown",7),this.handleInput=t=>{t.stopPropagation(),this.handleLineChange();const e=t.target.value||"";this.onInput.emit({value:e,cursor:e.length})},this.handleFocus=t=>{t.stopPropagation(),this.onFocus.emit({value:t.target.value})},this.handleBlur=t=>{t.stopPropagation(),this.onBlur.emit({value:t.target.value})},this.handleChange=t=>{t.stopPropagation(),this.onChange.emit({value:t.target.value})},this.handleLineChange=()=>{const t=this.getNumberOfLines();t!==this.line&&(this.line=t,this.onLineChange.emit({height:this.textareaRef.clientHeight,lineCount:this.line}))},this.handleKeyDown=t=>{t.stopPropagation();const{value:e}=t.target,i=t.keyCode||t.code;this.onKeyDown.emit({value:e,cursor:e.length,keyCode:i}),13===i&&this.onConfirm.emit({value:e})},this.calculateContentHeight=(t,e)=>{let i=t.style.height,s=t.offsetHeight,h=t.scrollHeight,a=t.style.overflow,o=t.style.minHeight||null;if(!(s>=h))return h;if(t.style.minHeight=0,t.style.height=s+e+"px",t.style.overflow="hidden",h<t.scrollHeight){for(;t.offsetHeight>=t.scrollHeight;)t.style.height=(s-=e)+"px";for(;t.offsetHeight<t.scrollHeight;)t.style.height=s+++"px";return t.style.height=i,t.style.overflow=a,t.style.minHeight=o,s}},this.getNumberOfLines=()=>{const t=this.textareaRef,e=window.getComputedStyle?window.getComputedStyle(t):t.style,i=parseInt(e.lineHeight,10),s=this.calculateContentHeight(t,i);return Math.floor(s/i)},this.value=void 0,this.placeholder=void 0,this.disabled=!1,this.maxlength=140,this.autoFocus=!1,this.autoHeight=!1,this.name=void 0,this.nativeProps={},this.line=1}watchAutoFocus(t,e){var i;!e&&t&&(null===(i=this.textareaRef)||void 0===i||i.focus())}async focus(){this.textareaRef.focus()}componentDidLoad(){Object.defineProperty(this.el,"value",{get:()=>this.textareaRef.value,set:t=>this.value!==t&&(this.value=t),configurable:!0})}render(){const{value:t,placeholder:e,disabled:s,maxlength:a,autoFocus:o,autoHeight:n,name:r,nativeProps:u,handleInput:c,handleFocus:l,handleBlur:d,handleChange:p}=this,g={};return n&&(g.rows=this.line),i("textarea",Object.assign({ref:t=>{t&&(this.textareaRef=t,o&&t&&t.focus())},class:"taro-textarea "+(n?"auto-height":""),value:h(t),placeholder:e,name:r,disabled:s,maxlength:a,autofocus:o,onInput:c,onFocus:l,onBlur:d,onChange:p,onKeyDown:this.handleKeyDown},u,g))}get el(){return s(this)}static get watchers(){return{autoFocus:["watchAutoFocus"]}}};a.style="taro-textarea-core{display:block;width:300px}taro-textarea-core .auto-height{height:auto}.taro-textarea{display:block;position:relative;border:0;width:100%;height:inherit;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:auto;line-height:1.5}.taro-textarea:focus{outline:none}";export{a as taro_textarea_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as i,H as e,g as o,c as s}from"./p-9137dcab.js";import{c as r}from"./p-2fad2a65.js";import{t as a}from"./p-d3c7f87d.js";const n=t=>{if(!t)return"";const i=Math.round(t%60),e=Math.round((t-i)/60);return`${e<10?`0${e}`:e}:${i<10?`0${i}`:i}`},h=t=>Math.max(-1,Math.min(t,1));let l="default";const d=function(){let t;const i=[["requestFullscreen","exitFullscreen","fullscreenElement","fullscreenEnabled","fullscreenchange","fullscreenerror"],["webkitRequestFullscreen","webkitExitFullscreen","webkitFullscreenElement","webkitFullscreenEnabled","webkitfullscreenchange","webkitfullscreenerror"],["webkitRequestFullScreen","webkitCancelFullScreen","webkitCurrentFullScreenElement","webkitCancelFullScreen","webkitfullscreenchange","webkitfullscreenerror"],["mozRequestFullScreen","mozCancelFullScreen","mozFullScreenElement","mozFullScreenEnabled","mozfullscreenchange","mozfullscreenerror"],["msRequestFullscreen","msExitFullscreen","msFullscreenElement","msFullscreenEnabled","MSFullscreenChange","MSFullscreenError"]];var e=["webkitEnterFullscreen","webkitExitFullscreen","webkitCurrentFullScreenElement","webkitSupportsFullscreen","fullscreenchange","fullscreenerror"];let o=0;const s=i.length,r={};for(;o<s;o++)if(t=i[o],t&&t[1]in document){for(o=0;o<t.length;o++)r[i[0][o]]=t[o];return r}if(!r[i[0][0]])for(l="iOS",o=0;o<e.length;o++)r[i[0][o]]=e[o];return r}(),A=class{constructor(i){t(this,i),this.visible=!1,this.isDraggingProgressBall=!1,this.percentage=0,this.progressDimensions={left:0,width:0},this.calcPercentage=t=>{let i=t-this.progressDimensions.left;return i=Math.max(i,0),i=Math.min(i,this.progressDimensions.width),i/this.progressDimensions.width},this.onDragProgressBallStart=()=>{this.isDraggingProgressBall=!0,this.hideControlsTimer&&clearTimeout(this.hideControlsTimer)},this.onClickProgress=t=>{t.stopPropagation();const i=this.calcPercentage(t.pageX);this.seekFunc(i*this.duration),this.toggleVisibility(!0)},this.controls=void 0,this.currentTime=void 0,this.duration=void 0,this.isPlaying=void 0,this.pauseFunc=void 0,this.playFunc=void 0,this.seekFunc=void 0,this.showPlayBtn=void 0,this.showProgress=void 0}onDocumentTouchMove(t){this.isDraggingProgressBall&&(this.percentage=this.calcPercentage(t.touches[0].pageX),this.setProgressBall(this.percentage),this.setCurrentTime(this.percentage*this.duration))}onDocumentTouchEnd(){this.isDraggingProgressBall&&(this.isDraggingProgressBall=!1,this.seekFunc(this.percentage*this.duration),this.toggleVisibility(!0))}async setProgressBall(t){this.progressBallRef&&(this.progressBallRef.style.left=100*t+"%")}async toggleVisibility(t){const i=void 0===t?!this.visible:t;i?(this.hideControlsTimer&&clearTimeout(this.hideControlsTimer),this.isPlaying&&(this.hideControlsTimer=setTimeout((()=>{this.toggleVisibility(!1)}),2e3)),this.el.style.visibility="visible"):this.el.style.visibility="hidden",this.visible=!!i}async getIsDraggingProgressBall(){return this.isDraggingProgressBall}async setCurrentTime(t){this.currentTimeRef.innerHTML=n(t)}render(){const{controls:t,currentTime:o,duration:s,isPlaying:r,pauseFunc:a,playFunc:h,showPlayBtn:l,showProgress:d}=this,A=n(s);let c;return c=l?i("div",r?{class:"taro-video-control-button taro-video-control-button-pause",onClick:a}:{class:"taro-video-control-button taro-video-control-button-play",onClick:h}):null,i(e,{class:"taro-video-bar taro-video-bar-full"},t&&i("div",{class:"taro-video-controls"},c,d&&i("div",{class:"taro-video-current-time",ref:t=>this.currentTimeRef=t},n(o)),d&&i("div",{class:"taro-video-progress-container",onClick:this.onClickProgress},i("div",{class:"taro-video-progress",ref:t=>{if(!t)return;const i=t.getBoundingClientRect();this.progressDimensions.left=i.left,this.progressDimensions.width=i.width}},i("div",{class:"taro-video-progress-buffered",style:{width:"100%"}}),i("div",{class:"taro-video-ball",ref:t=>this.progressBallRef=t,onTouchStart:this.onDragProgressBallStart,style:{left:(A?this.currentTime/s*100:0)+"%"}},i("div",{class:"taro-video-inner"})))),d&&i("div",{class:"taro-video-duration"},A)),i("slot",null))}get el(){return o(this)}},c=class{constructor(i){t(this,i),this.onPlay=s(this,"play",7),this.onPause=s(this,"pause",7),this.onEnded=s(this,"ended",7),this.onTimeUpdate=s(this,"timeupdate",7),this.onError=s(this,"error",7),this.onFullScreenChange=s(this,"fullscreenchange",7),this.onProgress=s(this,"progress",7),this.onLoadedMetaData=s(this,"loadedmetadata",7),this.currentTime=0,this.isDraggingProgress=!1,this.gestureType="none",this.analyzeGesture=t=>{var i;const e={type:"none"},o=t.touches[0].screenX-this.lastTouchScreenX,s=t.touches[0].screenY-this.lastTouchScreenY,r=this.isFullScreen?this.vslideGestureInFullscreen:this.vslideGesture;if("none"===this.gestureType){if(a=s,Math.sqrt(Math.pow(o,2)+Math.pow(a,2))<10)return e;if(Math.abs(s)>=Math.abs(o)){if(!r)return e;this.gestureType="adjustVolume",this.lastVolume=this.videoRef.volume}else if(Math.abs(s)<Math.abs(o)){if(!this.enableProgressGesture)return e;this.gestureType="adjustProgress",this.lastPercentage=this.currentTime/(null!==(i=this.duration)&&void 0!==i?i:this._duration)}}var a;return e.type=this.gestureType,e.dataX=h(o/200),e.dataY=h(s/200),e},this.loadNativePlayer=()=>{var t,i;this.videoRef&&(this.videoRef.src=this.src,null===(i=(t=this.videoRef).load)||void 0===i||i.call(t))},this.init=()=>{const{src:t,videoRef:i}=this;/\.(m3u8)($|\?)/i.test(t)?import("./p-3e701660.js").then((function(t){return t.h})).then((e=>{const o=e.default;this.HLS=o,o.isSupported()?(this.hls&&this.hls.destroy(),this.hls=new o,this.hls.loadSource(t),this.hls.attachMedia(i),this.hls.on(o.Events.MANIFEST_PARSED,(()=>{this.autoplay&&this.play()})),this.hls.on(o.Events.ERROR,((t,i)=>{this.handleError(i)}))):i.canPlayType("application/vnd.apple.mpegurl")?this.loadNativePlayer():console.error("该浏览器不支持 HLS 播放")})):this.loadNativePlayer()},this.handlePlay=()=>{this.isPlaying=!0,this.isFirst=!1,this.controlsRef.toggleVisibility(!0),this.onPlay.emit()},this.handlePause=()=>{this.isPlaying=!1,this.controlsRef.toggleVisibility(!0),this.onPause.emit()},this.handleEnded=()=>{this.isFirst=!0,this.pause(),this.controlsRef.toggleVisibility(),this.onEnded.emit()},this.handleTimeUpdate=a((async t=>{var i,e;this.currentTime=this.videoRef.currentTime;const o=this.duration||this._duration,s=await this.controlsRef.getIsDraggingProgressBall();this.controls&&this.showProgress&&(s||this.isDraggingProgress||(this.controlsRef.setProgressBall(this.currentTime/o),this.controlsRef.setCurrentTime(this.currentTime))),this.danmuRef.tick(this.currentTime),this.onTimeUpdate.emit({duration:null===(i=t.target)||void 0===i?void 0:i.duration,currentTime:null===(e=t.target)||void 0===e?void 0:e.currentTime}),this.duration&&this.currentTime>=this.duration&&(this.seek(0),this.handleEnded())}),250),this.handleError=t=>{var i,e;if(this.hls)switch(t.type){case this.HLS.ErrorTypes.NETWORK_ERROR:this.onError.emit({errMsg:t.response}),this.hls.startLoad();break;case this.HLS.ErrorTypes.MEDIA_ERROR:this.onError.emit({errMsg:t.reason||"媒体错误,请重试"}),this.hls.recoverMediaError()}else this.onError.emit({errMsg:null===(e=null===(i=t.target)||void 0===i?void 0:i.error)||void 0===e?void 0:e.message})},this.handleDurationChange=()=>{this._duration=this.videoRef.duration},this.handleProgress=()=>{this.onProgress.emit()},this.handleLoadedMetaData=t=>{const i=t.target;this.onLoadedMetaData.emit({width:i.videoWidth,height:i.videoHeight,duration:i.duration})},this._play=()=>this.videoRef.play(),this._pause=()=>this.videoRef.pause(),this._stop=()=>{this.videoRef.pause(),this._seek(0)},this._seek=t=>{this.videoRef.currentTime=t},this.onTouchStartContainer=t=>{this.lastTouchScreenX=t.touches[0].screenX,this.lastTouchScreenY=t.touches[0].screenY},this.onClickContainer=()=>{if(this.enablePlayGesture){const t=Date.now();t-this.lastClickedTime<300&&(this.isPlaying?this.pause():this.play()),this.lastClickedTime=t}this.controlsRef.toggleVisibility()},this.onClickFullScreenBtn=t=>{t.stopPropagation(),this.toggleFullScreen()},this.handleFullScreenChange=t=>{const i=(new Date).getTime();!t.detail&&this.isFullScreen&&!document[d.fullscreenElement]&&i-this.fullScreenTimestamp>100&&this.toggleFullScreen(!1)},this.toggleFullScreen=(t=!this.isFullScreen)=>{this.isFullScreen=t,this.controlsRef.toggleVisibility(!0),this.fullScreenTimestamp=(new Date).getTime(),this.onFullScreenChange.emit({fullScreen:this.isFullScreen,direction:"vertical"}),this.isFullScreen&&!document[d.fullscreenElement]&&setTimeout((()=>{this.videoRef[d.requestFullscreen]({navigationUI:"auto"})}),0)},this.toggleMute=t=>{t.stopPropagation(),this.videoRef.muted=!this.isMute,this.controlsRef.toggleVisibility(!0),this.isMute=!this.isMute},this.toggleDanmu=t=>{t.stopPropagation(),this.controlsRef.toggleVisibility(!0),this._enableDanmu=!this._enableDanmu},this.src=void 0,this.duration=void 0,this.controls=!0,this.autoplay=!1,this.loop=!1,this.muted=!1,this.initialTime=0,this.poster=void 0,this.objectFit="contain",this.showProgress=!0,this.showFullscreenBtn=!0,this.showPlayBtn=!0,this.showCenterPlayBtn=!0,this.showMuteBtn=!1,this.danmuList=void 0,this.danmuBtn=!1,this.enableDanmu=!1,this.enablePlayGesture=!1,this.enableProgressGesture=!0,this.vslideGesture=!1,this.vslideGestureInFullscreen=!0,this.nativeProps={},this._duration=void 0,this._enableDanmu=!1,this.isPlaying=!1,this.isFirst=!0,this.isFullScreen=!1,this.fullScreenTimestamp=(new Date).getTime(),this.isMute=!1}componentWillLoad(){this._enableDanmu=this.enableDanmu}componentDidLoad(){var t,i;this.init(),this.initialTime&&(this.videoRef.currentTime=this.initialTime),null===(i=(t=this.danmuRef).sendDanmu)||void 0===i||i.call(t,this.danmuList),document.addEventListener&&document.addEventListener(d.fullscreenchange,this.handleFullScreenChange),this.videoRef&&"iOS"===l&&this.videoRef.addEventListener("webkitendfullscreen",this.handleFullScreenChange)}componentDidRender(){}disconnectedCallback(){document.removeEventListener&&document.removeEventListener(d.fullscreenchange,this.handleFullScreenChange),this.videoRef&&"iOS"===l&&this.videoRef.removeEventListener("webkitendfullscreen",this.handleFullScreenChange)}watchEnableDanmu(t){this._enableDanmu=t}watchSrc(){this.init()}async onDocumentTouchMove(t){if(void 0===this.lastTouchScreenX||void 0===this.lastTouchScreenY)return;if(await this.controlsRef.getIsDraggingProgressBall())return;const i=this.analyzeGesture(t);if("adjustVolume"===i.type){this.toastVolumeRef.style.visibility="visible";const t=Math.max(Math.min(this.lastVolume-i.dataY,1),0);this.videoRef.volume=t,this.toastVolumeBarRef.style.width=100*t+"%"}else if("adjustProgress"===i.type){this.isDraggingProgress=!0,this.nextPercentage=Math.max(Math.min(this.lastPercentage+(i.dataX||0),1),0),this.controls&&this.showProgress&&(this.controlsRef.setProgressBall(this.nextPercentage),this.controlsRef.toggleVisibility(!0));const t=this.duration||this._duration;this.toastProgressTitleRef.innerHTML=`${n(this.nextPercentage*t)} / ${n(t)}`,this.toastProgressRef.style.visibility="visible"}}onDocumentTouchEnd(){var t;"adjustVolume"===this.gestureType?this.toastVolumeRef.style.visibility="hidden":"adjustProgress"===this.gestureType&&(this.toastProgressRef.style.visibility="hidden"),this.isDraggingProgress&&(this.isDraggingProgress=!1,this.seek(this.nextPercentage*(null!==(t=this.duration)&&void 0!==t?t:this._duration))),this.gestureType="none",this.lastTouchScreenX=void 0,this.lastTouchScreenY=void 0}async getHlsObject(){return this.hls}async play(){this._play()}async pause(){this._pause()}async stop(){this._stop()}async seek(t){this._seek(t)}async requestFullScreen(){this.toggleFullScreen(!0)}async exitFullScreen(){this.toggleFullScreen(!1)}render(){const{controls:t,autoplay:o,loop:s,muted:a,poster:h,objectFit:l,isFirst:d,isMute:A,isFullScreen:c,showCenterPlayBtn:u,isPlaying:g,_enableDanmu:b,showMuteBtn:p,danmuBtn:v,showFullscreenBtn:m,nativeProps:w}=this,E=this.duration||this._duration,I=n(E);return i(e,{class:r("taro-video-container",{"taro-video-type-fullscreen":c}),onTouchStart:this.onTouchStartContainer,onClick:this.onClickContainer},i("video",Object.assign({class:"taro-video-video",style:{"object-fit":l},ref:t=>{t&&(this.videoRef=t)},autoplay:o,loop:s,muted:a,poster:t?h:void 0,playsinline:!0,"webkit-playsinline":!0,onPlay:this.handlePlay,onPause:this.handlePause,onEnded:this.handleEnded,onTimeUpdate:this.handleTimeUpdate,onError:this.handleError,onDurationChange:this.handleDurationChange,onProgress:this.handleProgress,onLoadedMetaData:this.handleLoadedMetaData},w),"暂时不支持播放该视频"),i("taro-video-danmu",{ref:t=>{t&&(this.danmuRef=t)},enable:b}),d&&u&&!g&&i("div",{class:"taro-video-cover"},i("div",{class:"taro-video-cover-play-button",onClick:()=>this.play()}),i("p",{class:"taro-video-cover-duration"},I)),i("taro-video-control",{ref:t=>{t&&(this.controlsRef=t)},controls:t,currentTime:this.currentTime,duration:E,isPlaying:this.isPlaying,pauseFunc:this._pause,playFunc:this._play,seekFunc:this._seek,showPlayBtn:this.showPlayBtn,showProgress:this.showProgress},p&&i("div",{class:r("taro-video-mute",{"taro-video-type-mute":A}),onClick:this.toggleMute}),v&&i("div",{class:r("taro-video-danmu-button",{"taro-video-danmu-button-active":b}),onClick:this.toggleDanmu},"弹幕"),m&&i("div",{class:r("taro-video-fullscreen",{"taro-video-type-fullscreen":c}),onClick:this.onClickFullScreenBtn})),i("div",{class:"taro-video-toast taro-video-toast-volume",ref:t=>{t&&(this.toastVolumeRef=t)}},i("div",{class:"taro-video-toast-title"},"音量"),i("div",{class:"taro-video-toast-icon"}),i("div",{class:"taro-video-toast-value"},i("div",{class:"taro-video-toast-value-content",ref:t=>{t&&(this.toastVolumeBarRef=t)}},i("div",{class:"taro-video-toast-volume-grids"},Array(10).fill(1).map((()=>i("div",{class:"taro-video-toast-volume-grids-item"}))))))),i("div",{class:"taro-video-toast taro-video-toast-progress",ref:t=>{t&&(this.toastProgressRef=t)}},i("div",{class:"taro-video-toast-title",ref:t=>{t&&(this.toastProgressTitleRef=t)}})))}get el(){return o(this)}static get watchers(){return{enableDanmu:["watchEnableDanmu"],src:["watchSrc"]}}};c.style='.taro-video{display:inline-block;overflow:hidden;position:relative;width:100%;height:225px;line-height:0}.taro-video[hidden]{display:none}.taro-video-container{display:inline-block;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#000;-o-object-position:inherit;object-position:inherit}.taro-video-container.taro-video-type-fullscreen{position:fixed;left:0;right:0;top:0;bottom:0;z-index:999}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-left{-webkit-transform:translate(-50%, -50%) rotate(-90deg);transform:translate(-50%, -50%) rotate(-90deg)}.taro-video-container.taro-video-type-fullscreen.taro-video-type-rotate-right{-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.taro-video-video{width:100%;height:100%;-o-object-position:inherit;object-position:inherit}.taro-video-cover{display:-ms-flexbox;display:flex;position:absolute;left:0;top:0;bottom:0;z-index:1;-ms-flex-direction:column;flex-direction:column;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;width:100%;background-color:rgba(1, 1, 1, 0.5);-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-box-pack:center;-webkit-box-align:center}.taro-video-cover-play-button{width:40px;height:40px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-cover-duration{margin-top:10px;line-height:1;font-size:16px;color:#fff}.taro-video-bar{display:-ms-flexbox;display:flex;visibility:hidden;overflow:hidden;position:absolute;right:0;bottom:0;z-index:1;-ms-flex-align:center;align-items:center;padding:0 10px;height:44px;background-color:rgba(0, 0, 0, 0.5);-webkit-box-align:center}.taro-video-bar.taro-video-bar-full{left:0}.taro-video-controls{display:-ms-flexbox;display:flex;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;margin:0 8.5px}.taro-video-control-button{-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-8.5px;padding:14.5px 12.5px;width:13px;height:15px}.taro-video-control-button::after{display:block;width:100%;height:100%;background-repeat:no-repeat;background-position:50% 50%;background-size:100%;content:""}.taro-video-control-button.taro-video-control-button-play::after,.taro-video-cover-play-button{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAeCAYAAAAy2w7YAAAAAXNSR0IArs4c6QAAAWhJREFUSA1j+P///0cgBoHjQGzCQCsAtgJB/AMy5wCxGNXtQ9iBwvoA5BUCMQvVLEQxHpNzDSjkRhXLMM3GKrIeKKpEkYVYjcUu+AMo3ALE3GRZiN1MvKKPgbIRJFuG10j8koeA0gZEW4jfLIKyf4EqpgOxMEELCRpFnIJ3QGU5QMyM00LizCFa1SWgSkeslhFtBGkKVwGVy6FYSJp+klR/A6quB2JOkIWMIK0oNlOf8xBoZDE9LAI7nYn6HsBq4l96WHQEaLUpAyiOaASeAM2NgvuPBpaACt82IEYtfKls0UagecpwXyAzqGTRdaA57sjmYrAptAjUsCkGYlYMg9EFyLQI1IiZB8Ti6Obh5JNh0QmgHlOcBuKSIMGi50C18UDMiMssvOJEWPQLqKYbiHnxGkRIkoBF24DyaoTMIEoeh0W3geI+RBlArCI0iz4D+RVAzEasfqLVAQ19AcSg5LoYiKWI1kiiQgCMBLnEEcfDSgAAAABJRU5ErkJggg==")}.taro-video-control-button.taro-video-control-button-pause::after{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAAgCAYAAAAffCjxAAAAAXNSR0IArs4c6QAAAFlJREFUSA3tksEKACAIQ7X//5zq98wOgQayum8QaGweHhMzG/6OujzKAymn+0LMqivu1XznWmX8/echTIyMyAgTwA72iIwwAexgj8gIE8CO3aMRbDPMaEy5BRGaKcZv8YxRAAAAAElFTkSuQmCC")}.taro-video-current-time,.taro-video-duration{margin-top:15px;margin-bottom:14.5px;height:14.5px;line-height:14.5px;font-size:12px;color:#cbcbcb}.taro-video-progress-container{position:relative;-ms-flex-positive:2;flex-grow:2;-webkit-box-flex:2}.taro-video-progress{position:relative;margin:21px 12px;height:2px;background-color:rgba(255, 255, 255, 0.4)}.taro-video-progress-buffered{position:absolute;left:0;top:0;width:0;height:100%;background-color:rgba(255, 255, 255, 0.8);-webkit-transition:width 0.1s;transition:width 0.1s}.taro-video-ball{position:absolute;left:0;top:-21px;-webkit-box-sizing:content-box;box-sizing:content-box;margin-left:-22px;padding:14px;width:16px;height:16px}.taro-video-inner{border-radius:50%;width:100%;height:100%;background-color:#fff}.taro-video-danmu-button{margin:0 8.5px;padding:2px 10px;border:1px solid #fff;border-radius:5px;line-height:1;font-size:13px;color:#fff;white-space:nowrap}.taro-video-danmu-button.taro-video-danmu-button-active{border-color:#48c23d;color:#48c23d}.taro-video-fullscreen,.taro-video-mute{-webkit-box-sizing:content-box;box-sizing:content-box;padding:8.5px;width:17px;height:17px;background-repeat:no-repeat;background-position:50% 50%;background-size:50%}.taro-video-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAhUlEQVRYR+2WSwrAMAhEnZO3PfmULLooGEFTiIXJ2s/kRY2wzQeb85sE9CRA8jSzY1YfAFzhJBnU1AVgxH2dSiArCnD9QgGzRNnOech48SRABHoSyFb5in3PSbhyo6yvCPQkEM3u7BsPe/0FIvBfAh/vhKmVbO9SWun1qk/PSVi9TcVPBG6R1YIhgWwNpQAAAABJRU5ErkJggg==")}.taro-video-fullscreen.taro-video-type-fullscreen{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABPUlEQVRYR+2Xu0pDURBF1/ZLxNcHKNiIlfhA7C0UBSEE8RNEBNFPUEQEEbGxFiSSSrCwEHsf5E/ccsSUuWfUhKQ40947+y42Z8+ZK/pcinzf9hhwD1xJ2q/qsb0JHAOzkl5y+lGAGnCWICQtZgAS6DxQk3TeLYA6cAo0JSXxjmW7CcwBdUkJurKiDhSA4kBvHbA9CqwBQx2O7BSw8ssU3ALPFRF4knT3nQLbr8B4LjLBOdAAFgJaLUkjbYC9n+zm+i4kXWbmwCqwnRMCHiXthuZAQOzPrxSA4kBxYDAcsH0EzATCfCLpJjOINoCtgFZabg7bk7AFDAeaGpKWgitZT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AoTWFjaW50b3NoKSIgc3RFdnQ6Y2hhbmdlZD0iLyIvPiA8L3JkZjpTZXE+IDwveG1wTU06SGlzdG9yeT4gPC9yZGY6RGVzY3JpcHRpb24+IDwvcmRmOlJERj4gPC94OnhtcG1ldGE+IDw/eHBhY2tldCBlbmQ9InIiPz459+FoAAABqElEQVRYhc2XPWsVQRSGnxPjF4oGRfxoRQKGWCU2Ft7CykrQWosEyf/If0hhIPgHDEmbNJZqCFxiQEgTUGxsBUVEHgvnyrjZZJO92V1fGIaZnTPvszPszNlQ6VIjnbr/DwCoDLMNak/dUVfUK0f2rQugnlcX/FevWgFQH6gf3autRgHUC+piiXHzAOmtPx9gXgug8itQx9SXwDpw47AGKXZWvXvQmNFCwE3gCXA2dY0Az4GrRzHONA9cU/vAbERsllEOyh31e8USV2mrMPdG9uyn+rDom2/BHHCm5puWKiKmgdtAnz+rvaxO5mNygEvHaZ5BfADuARvAaWBpP4DGFBHfgBngFzClTrUKkCDeA+9S837rAEnbqb7VFcCpVJ/oCmCw959aB1AfAROpudYqgDoOLKRmPyLelAF8bcD4pPoMeAtcB34AT4uDBqXXwFG8XXUU/72MIuK1OgE8Bs6l7mEvo8up7lN1Ge0n9aK6VHMFZvJTr9S3CiALaCQhqZOSvegMIAvu2UVSWpigLC1fbQ0gm6in7qpfLCQbhwGIYcyPQ53/G3YO8BtUtd35bvKcVwAAAABJRU5ErkJggg==")}.taro-video-mute.taro-video-type-mute{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACIAAAAgCAYAAAB3j6rJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGAGlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDAgNzku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sByFWiCgEBH1GHAF2JlMPcBt4GC3HUYEaj9wF3gVEVPtfNVTwAXgWX7CDKq/1piAZTSZBmim8qJ6sQ3EgDqb/L7kU3MH2NHtl3dQX3r3Ak21UYAYAj4A/cl0JB+RF+uMRj4iQ+p8zt7KYFLdXKHuRi0gacBhV6a6pd5bA6KRNagFJPU9qv5u47toLmW1HnoR8Q5oAK1CVQu4FBHj/wUkaXsb+4pzpVaQFPqXrN7Be4Fx9VztIOr1BLEtmX4A94E/qdwHTKjDWYM6lu81dSlnn3V570BtuLxaMs2rZ/IgYxsBovaoPwsQA4VoFWEm8ql5DiysNyURsQTMpOIMcDYiPhd8xoGr/FtNC2G6FKXD6ihwGdiVHMoeeh8jYlA9ANwE3kTEp3bO6vE03qOONzR1r/q4RGrquaFFxFxE3ALOA9+6jExpdb180y55AhirhaRTatq0GXEzL8+ZIuI9cBJ4WKiartJf9nWV/mty7UfUafW7erpqRGI9EBuprffvu9n6C1KOmsqwI5A1AAAAAElFTkSuQmCC")}.taro-video-danmu{overflow:visible;position:absolute;left:0;top:0;bottom:0;margin-top:14px;margin-bottom:44px;width:100%;line-height:14px;font-size:14px}.taro-video-danmu-item{position:absolute;left:100%;line-height:1;color:#fff;white-space:nowrap;-webkit-transform:translateX(0);transform:translateX(0);-webkit-transition-property:left, -webkit-transform;transition-property:left, -webkit-transform;transition-property:left, transform;transition-property:left, transform, -webkit-transform;-webkit-transition-duration:3s;transition-duration:3s;-webkit-transition-timing-function:linear;transition-timing-function:linear}.taro-video-toast{display:block;visibility:hidden;position:absolute;left:50%;top:50%;border-radius:5px;background-color:rgba(255, 255, 255, 0.8);pointer-events:none;color:#000;-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.taro-video-toast.taro-video-toast-volume{display:block;width:100px;height:100px}.taro-video-toast-volume .taro-video-toast-title{display:block;margin-top:10px;width:100%;line-height:16px;text-align:center;font-size:12px}.taro-video-toast-volume .taro-video-toast-icon{display:block;margin-left:25%;width:50%;height:50%;background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s5pKwIvACA+pzFwZIF9OlKm36QyQV7jEqDDJk5VD58uFgGIGX1Se+6yJFqAKsqI6X84GdDb4Mh0Y5zUqjFYFakUTCXja5QLSmBQHbAL8ahAgT1AeYVreSKLLphGwF/CuAfLJQLldGSTFD75c5d4mNCoWyAqG9gYWGED1AOMKo12ZbiWA/idA++deY2DVTZ0Jh5UJPsFQtD/wDaAHGWl5EzgwaUi2gK4UXS11S0cTIjrMFBtYQdAk4DID0BnAAz4B6wNLgTKKG0VIDBHwqitwpOcW+OOB540FdeipNKbUWFrUtn06o5xOij4KyDuqU0IE3Obl/rLA63pTzm9XA8jKACjdniZAaSKFmUpB1yUhAlTsUEpMh913wEkuTe7rKTzPAHqO44vpKPkFhH3cWWBVV6ogJVYZUgz/tXtIYelzI3Ct0fExIGx6j7iKWBUUveyYBehv1RIjIEsfqziq8Xp4pSBJOYTVJFQcVY3wCFeKUjVGyYfQWB00+5bEVBECrNS+qsOKBpVHNCVWHs+LS7H5PV5pOu9v0+OKEOAXR39w1e1C7wM6AkJ1eLmkRcrpRQiQrqobXO5S3vL3/4kBKMsCknV0k+iasVLUMV3UX5SAPGtED8EOT+L9YENnCasUIXNO2goChFWHqAIRyxXN4qI1BCQg9dJESYq8LnbrCBAR8t50Lig6i0krCRBoVWhVlt45wkBrCRBuRZyPuAguxIPe9lXqhpd9DcZMXOvdkPF0Xu/8dohNUmZ/1QQkuitXr+d4fryuFx3jywQYm6suAqSX8vLTXKJDt4QqO6rtLYspXWZ/nQQkOJTAUJZGIav19q9MvKvN1RUIWKMAY5P3EBBjqO393d4C/gMVHwRQlpx21QAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-position:50% 50%;background-size:50%;fill:#000}.taro-video-toast-volume .taro-video-toast-value{margin-left:10px;margin-top:5px;width:80px;height:5px}.taro-video-toast-volume .taro-video-toast-value>.taro-video-toast-value-content{overflow:hidden}.taro-video-toast-volume-grids{width:80px;height:5px}.taro-video-toast-volume-grids-item{float:left;width:7.1px;height:5px;background-color:#000}.taro-video-toast-volume-grids-item:not(:first-child){margin-left:1px}.taro-video-toast.taro-video-toast-progress{padding:6px;background-color:rgba(0, 0, 0, 0.8);line-height:18px;font-size:14px;color:#fff}';const u=class{constructor(i){t(this,i),this.list=[],this.danmuElList=[],this.currentTime=0,this.enable=!1,this.danmuList=[]}ensureProperties(t){const i=Object.assign({},t);return"time"in t||(i.time=this.currentTime),i.key=Math.random(),i.bottom=90*Math.random()+5+"%",i}async sendDanmu(t=[]){this.list=Array.isArray(t)?[...this.list,...t.map((t=>this.ensureProperties(t)))]:[...this.list,Object.assign({},this.ensureProperties(t))]}async tick(t){if(this.currentTime=t,!this.enable)return;const i=this.list.filter((({time:i})=>t-i<4&&t>i));let e=!1;const o=this.danmuList;e=i.length!==o.length||i.some((({key:t})=>o.every((i=>t!==i.key)))),e&&(this.danmuList=i)}componentDidUpdate(){requestAnimationFrame((()=>{setTimeout((()=>{this.danmuElList.splice(0).forEach((t=>{t.style.left="0",t.style.webkitTransform="translateX(-100%)",t.style.transform="translateX(-100%)"}))}))}))}render(){return this.enable?i(e,{class:"taro-video-danmu"},this.danmuList.map((({text:t,color:e,bottom:o,key:s})=>i("p",{class:"taro-video-danmu-item",key:s,style:{color:e,bottom:o},ref:t=>{t&&this.danmuElList.push(t)}},t)))):""}};export{A as taro_video_control,c as taro_video_core,u as taro_video_danmu}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e,h as t,H as s}from"./p-9137dcab.js";import{c as r}from"./p-2fad2a65.js";const o=class{constructor(t){e(this,t),this.selectable=!1}render(){const e=r({"taro-text__selectable":this.selectable});return t(s,{class:e},t("slot",null))}};o.style="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";export{o as taro_text_core}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
System.register(["./p-7e6b54cb.system.js","./p-387314fa.system.js"],(function(e){"use strict";var t,s,r,n;return{setters:[function(e){t=e.r;s=e.h;r=e.H},function(e){n=e.c}],execute:function(){var c="taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:pre-wrap}.taro-text__selectable{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}";var l=e("taro_text_core",function(){function e(e){t(this,e);this.selectable=false}e.prototype.render=function(){var e=n({"taro-text__selectable":this.selectable});return s(r,{class:e},s("slot",null))};return e}());l.style=c}}}));
|